Add safe piece creation and validated LLM generation #95

Merged
eleith merged 3 commits from feat/interactive-generation-core into main 2026-10-03 15:21:21 +00:00
3 Commits
Author SHA1 Message Date
eleith b21cc2a5b5 [cli] validate assistant options before generation
ci/woodpecker/pr/cli Pipeline was successful
ci/woodpecker/pr/core Pipeline was successful
ci/woodpecker/pr/web-db Pipeline was successful
ci/woodpecker/pr/web-jobs Pipeline was successful
ci/woodpecker/pr/web-pieces Pipeline was successful
ci/woodpecker/pr/web-worker Pipeline was successful
ci/woodpecker/pr/web Pipeline was successful
ci/woodpecker/push/cli Pipeline was successful
ci/woodpecker/push/core Pipeline was successful
ci/woodpecker/push/web-db Pipeline was successful
ci/woodpecker/push/web-jobs Pipeline was successful
ci/woodpecker/push/web-pieces Pipeline was successful
Reject incompatible update, directory, and title arguments before loading a piece or calling the provider. Keep the CLI quiet and preserve existing generation, output, and write behavior.

Regression tests assert invalid commands do not parse a piece, generate metadata, serialize YAML, or print output.

Verified with Node v26.4.0 and pnpm 11.2.2: pnpm lint, pnpm check, and pnpm test pass. CLI has 88 passing tests and 100% coverage across statements, branches, functions, and lines.

Known baseline failure: pnpm build stops in @luzzle/web prebuild because apps/web/config.yaml is missing; CLI builds successfully. The root build gate is not passing.
2026-10-01 10:58:43 -07:00
eleith 8eb6435045 [core] add validated generation with progress
ci/woodpecker/pr/cli Pipeline was successful
ci/woodpecker/pr/core Pipeline was successful
ci/woodpecker/pr/web-db Pipeline was successful
ci/woodpecker/pr/web-jobs Pipeline was successful
ci/woodpecker/pr/web-pieces Pipeline was successful
ci/woodpecker/pr/web-worker Pipeline was successful
ci/woodpecker/pr/web Pipeline was successful
Add Google-specific metadata, field, and body generation entry points with shared SDK request handling. Preserve the final-metadata compatibility wrapper, use Gemini 3.8 Flash with SDK 2.24.0, and build reference-free partial schemas using json-schema-traverse.

Report progress without token previews. Finish accepted work despite observer failure, enforce file/output budgets and bounded processing polling, and attempt cleanup of known provider files using SDK request timeouts. No caller cancellation, overall deadline, or archive writes during generation.

Verified on Node v26.4.0 and pnpm 11.2.2: pnpm lint, pnpm check, and pnpm test pass. Core has 414 passing tests and 100% coverage across statements, branches, functions, and lines.

Known baseline failure, present before this work: pnpm build stops in @luzzle/web prebuild because apps/web/config.yaml is missing. Core builds successfully; the repository build gate is not passing.

Owner explicitly approved deferring real-provider manual verification until the UI is connected. Completion, abandoned-observer behavior, and provider-file cleanup remain pending manual checks; none are claimed passed here.
2026-10-01 07:07:26 -07:00
eleith 6cc5404cdf [core] support create-only piece writes
Add write(markdown, { createOnly: true }) backed by exclusive filesystem creation. Preserve ordinary overwrite behavior and validate and serialize before writing. Update storage mocks, unit tests, and API documentation.

Verified with Node v26.4.0 and pnpm 11.2.2: pnpm lint, pnpm check, and pnpm test pass. Core has 330 passing tests; coverage remains 100% statements/lines/functions and 99.84% branches.

Known baseline failure, also reproduced before changes at b57b93bc: pnpm build fails in @luzzle/web prebuild because apps/web/config.yaml is missing. Core builds successfully; the repository build gate is not passing.

Per owner review, use an optional write argument rather than writeNew and retain mocked unit coverage instead of the proposed real-filesystem integration suite.
2026-09-30 14:08:11 -07:00