From 6cefc8e0aa4e970a86c55fab386580a02efddcdc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 11 Jul 2026 23:25:39 +0000 Subject: [PATCH] chore: version packages --- .changeset/add-project-flow.md | 5 - .changeset/architect-await-gate.md | 5 - .changeset/auto-accept-naming-325.md | 5 - .changeset/cli-real-version.md | 5 - .changeset/cli-update-check.md | 5 - .changeset/confirmation-gate-358.md | 5 - .changeset/dashboard-browser-notifications.md | 7 -- .changeset/dashboard-center-main.md | 5 - .changeset/dashboard-control-channel.md | 5 - .changeset/dashboard-document-sidebar.md | 7 -- .changeset/dashboard-layout-fill-height.md | 5 - .changeset/dashboard-port-4200.md | 5 - .../dashboard-preset-routing-narration.md | 7 -- .changeset/dashboard-project-log-panel.md | 5 - .changeset/dashboard-run-history.md | 7 -- .changeset/dashboard-start-run.md | 5 - .changeset/dashboard-sticky-header-sidebar.md | 5 - .changeset/doc-sidebar-session-scoped.md | 7 -- .changeset/eventstream-iterator-cancel.md | 7 -- .changeset/framework-dashboard-csrf-xss.md | 5 - .../framework-system-prompt-injection.md | 7 -- .changeset/gate-refire-after-realternative.md | 7 -- .changeset/global-options-engine-314.md | 5 - .changeset/global-options-panel-314.md | 5 - .changeset/interactive-choices-autopilot.md | 7 -- .../maintainability-minimal-preset-362.md | 5 - .changeset/maintainability-preset-361.md | 5 - .changeset/multi-project-daemon-reads.md | 5 - .changeset/multi-project-install-core.md | 5 - .changeset/multi-project-registry-module.md | 5 - .changeset/multi-select-gate-332.md | 5 - .changeset/multiselect-turn-boundary-gate.md | 7 -- .changeset/persistent-dashboard-daemon.md | 7 -- .changeset/preset-params-330.md | 5 - .changeset/presets-prefill-textarea.md | 5 - .changeset/project-second-sidebar.md | 5 - .changeset/projects-sidebar.md | 5 - .changeset/readability-preset-360.md | 5 - .changeset/registry-single-file.md | 5 - .changeset/relay-sandbox-hardening.md | 10 -- .changeset/research-preset-button.md | 5 - .changeset/show-real-prompts-343.md | 5 - .changeset/single-select-gate-primitive.md | 7 -- .changeset/start-run-feedback.md | 5 - .changeset/system-prompt-326.md | 5 - .../the-framework-log-run-completion.md | 5 - .changeset/the-framework-logs-module.md | 5 - .changeset/the-framework-project-helpers.md | 5 - .changeset/todo-backlog-loop.md | 5 - .changeset/turn-boundary-choice-gate.md | 7 -- .changeset/unify-the-framework-dir.md | 5 - .changeset/usage-accounting-budget-cap.md | 7 -- examples/framework-demo/CHANGELOG.md | 59 ++++++++++ examples/framework-demo/package.json | 2 +- .../framework-discovery-demo/CHANGELOG.md | 59 ++++++++++ .../framework-discovery-demo/package.json | 2 +- packages/ai-autopilot/CHANGELOG.md | 8 ++ packages/ai-autopilot/package.json | 2 +- packages/framework/CHANGELOG.md | 105 ++++++++++++++++++ packages/framework/package.json | 2 +- 60 files changed, 235 insertions(+), 297 deletions(-) delete mode 100644 .changeset/add-project-flow.md delete mode 100644 .changeset/architect-await-gate.md delete mode 100644 .changeset/auto-accept-naming-325.md delete mode 100644 .changeset/cli-real-version.md delete mode 100644 .changeset/cli-update-check.md delete mode 100644 .changeset/confirmation-gate-358.md delete mode 100644 .changeset/dashboard-browser-notifications.md delete mode 100644 .changeset/dashboard-center-main.md delete mode 100644 .changeset/dashboard-control-channel.md delete mode 100644 .changeset/dashboard-document-sidebar.md delete mode 100644 .changeset/dashboard-layout-fill-height.md delete mode 100644 .changeset/dashboard-port-4200.md delete mode 100644 .changeset/dashboard-preset-routing-narration.md delete mode 100644 .changeset/dashboard-project-log-panel.md delete mode 100644 .changeset/dashboard-run-history.md delete mode 100644 .changeset/dashboard-start-run.md delete mode 100644 .changeset/dashboard-sticky-header-sidebar.md delete mode 100644 .changeset/doc-sidebar-session-scoped.md delete mode 100644 .changeset/eventstream-iterator-cancel.md delete mode 100644 .changeset/framework-dashboard-csrf-xss.md delete mode 100644 .changeset/framework-system-prompt-injection.md delete mode 100644 .changeset/gate-refire-after-realternative.md delete mode 100644 .changeset/global-options-engine-314.md delete mode 100644 .changeset/global-options-panel-314.md delete mode 100644 .changeset/interactive-choices-autopilot.md delete mode 100644 .changeset/maintainability-minimal-preset-362.md delete mode 100644 .changeset/maintainability-preset-361.md delete mode 100644 .changeset/multi-project-daemon-reads.md delete mode 100644 .changeset/multi-project-install-core.md delete mode 100644 .changeset/multi-project-registry-module.md delete mode 100644 .changeset/multi-select-gate-332.md delete mode 100644 .changeset/multiselect-turn-boundary-gate.md delete mode 100644 .changeset/persistent-dashboard-daemon.md delete mode 100644 .changeset/preset-params-330.md delete mode 100644 .changeset/presets-prefill-textarea.md delete mode 100644 .changeset/project-second-sidebar.md delete mode 100644 .changeset/projects-sidebar.md delete mode 100644 .changeset/readability-preset-360.md delete mode 100644 .changeset/registry-single-file.md delete mode 100644 .changeset/relay-sandbox-hardening.md delete mode 100644 .changeset/research-preset-button.md delete mode 100644 .changeset/show-real-prompts-343.md delete mode 100644 .changeset/single-select-gate-primitive.md delete mode 100644 .changeset/start-run-feedback.md delete mode 100644 .changeset/system-prompt-326.md delete mode 100644 .changeset/the-framework-log-run-completion.md delete mode 100644 .changeset/the-framework-logs-module.md delete mode 100644 .changeset/the-framework-project-helpers.md delete mode 100644 .changeset/todo-backlog-loop.md delete mode 100644 .changeset/turn-boundary-choice-gate.md delete mode 100644 .changeset/unify-the-framework-dir.md delete mode 100644 .changeset/usage-accounting-budget-cap.md diff --git a/.changeset/add-project-flow.md b/.changeset/add-project-flow.md deleted file mode 100644 index 482cce1..0000000 --- a/.changeset/add-project-flow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@gemstack/framework": minor ---- - -Add the "Add project(s)" install flow to the dashboard. A `POST /api/projects` (guarded like the other state-changing routes) installs The Framework into a repo, or every git repo directly under a folder, then registers each so it shows up in the Projects list; the daemon wires it to install-core. The Projects sidebar gains an "Add" control with a small path form (single repo or "folder of repos"), shown only when the server enables adding. Also fixes `enumerateGitRepos` to detect repo roots via `git rev-parse --show-prefix` instead of comparing `--show-toplevel` to the path, which failed across a symlink (e.g. macOS `/var` -> `/private/var`) and returned no repos. diff --git a/.changeset/architect-await-gate.md b/.changeset/architect-await-gate.md deleted file mode 100644 index e791dc1..0000000 --- a/.changeset/architect-await-gate.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@gemstack/framework': patch ---- - -Architect turns now honor agent-authored await gates (#356): an architect (or re-architect) turn that stops to ask via `showChoices()` / `showMultiSelect()` resolves through the live dashboard gate and re-prompts with the answer, instead of the question being silently swallowed into a stub fallback plan at the plan-approval gate. Headless runs are unchanged. Bounded at 5 rounds, like the build gate. diff --git a/.changeset/auto-accept-naming-325.md b/.changeset/auto-accept-naming-325.md deleted file mode 100644 index 43ae8fa..0000000 --- a/.changeset/auto-accept-naming-325.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@gemstack/framework': patch ---- - -Untangle the two "autopilot" concepts in the dashboard (#325): the countdown text now reads "Auto accept in 10s" (and "Auto accept canceled" / "Auto accept off"), so "autopilot" is left to mean the mode preset. The checkbox that arms the countdown is labeled "Autopilot", per Rom's call on the issue. diff --git a/.changeset/cli-real-version.md b/.changeset/cli-real-version.md deleted file mode 100644 index d3f9d55..0000000 --- a/.changeset/cli-real-version.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@gemstack/framework': patch ---- - -Fix `framework --version` (and the bare-`framework` footer) reporting `0.0.0` instead of the real package version (#312). The version is now read from the package's own `package.json` at runtime, so it always matches what is installed. diff --git a/.changeset/cli-update-check.md b/.changeset/cli-update-check.md deleted file mode 100644 index 00757d3..0000000 --- a/.changeset/cli-update-check.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@gemstack/framework': minor ---- - -Bare `framework` now tells you whether the CLI is up to date (#312): after the version footer it checks npm's `dist-tags.latest` (2.5s cap) and prints "Up to date" or "Update available: vX (you have vY). Run: npm i -g @gemstack/framework". Offline or on any fetch failure it prints nothing. Display only; no auto-update. diff --git a/.changeset/confirmation-gate-358.md b/.changeset/confirmation-gate-358.md deleted file mode 100644 index 143f12f..0000000 --- a/.changeset/confirmation-gate-358.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@gemstack/framework': minor ---- - -Turn-boundary gate for plan approval (`showMarkdown()` + AWAIT): a build turn that ends with an `await-confirmation` block (the #326 large-scope PLAN flow) now pauses the run with a green Approve and a red Decline button on the dashboard. Approve resumes the build; Decline logs "Plan declined, awaiting user instructions." and stops the run cleanly (like the budget cap), so nothing reviews or improves work the user just declined. Headless runs auto-approve, keeping programmatic runs deterministic. Try it offline with `FRAMEWORK_FAKE_AWAIT=confirmation`. diff --git a/.changeset/dashboard-browser-notifications.md b/.changeset/dashboard-browser-notifications.md deleted file mode 100644 index e5af5d7..0000000 --- a/.changeset/dashboard-browser-notifications.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@gemstack/framework': minor ---- - -feat(framework): opt-in browser notifications on the dashboard for run-end and choice gates (#317) - -The localhost dashboard can now notify you when a run finishes (or fails/stops) and when a run reaches a `` gate that needs your input (e.g. a PLAN.md approval). Opt in via the header bell; it only nudges when the dashboard tab is backgrounded, so a run you are watching stays quiet. diff --git a/.changeset/dashboard-center-main.md b/.changeset/dashboard-center-main.md deleted file mode 100644 index be7ac55..0000000 --- a/.changeset/dashboard-center-main.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@gemstack/framework': patch ---- - -Center the dashboard's main grid in the content column. `main` had a `max-width: 1100px` cap but no horizontal centering, so on a wide window the panels hugged the left edge next to the runs sidebar. Add `margin: 0 auto` so the capped grid sits centered. diff --git a/.changeset/dashboard-control-channel.md b/.changeset/dashboard-control-channel.md deleted file mode 100644 index 976902f..0000000 --- a/.changeset/dashboard-control-channel.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@gemstack/framework': minor ---- - -Dashboard control channel: the persistent daemon dashboard can now steer any run in its workspace. Its Stop button and choice picks append to `.framework/control.jsonl`; the run tails the file and aborts or resolves its parked gate. Gates now pause whenever a workspace daemon is live, not only when the run owns its own dashboard; headless behavior without a daemon is unchanged. Also fixes the fresh-workspace daemon startup: bare `framework` in a project with no `.framework/` yet used to fail and leave a zombie server on the port. diff --git a/.changeset/dashboard-document-sidebar.md b/.changeset/dashboard-document-sidebar.md deleted file mode 100644 index d13e429..0000000 --- a/.changeset/dashboard-document-sidebar.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@gemstack/framework': minor ---- - -feat(framework): document sidebar on the dashboard, rendering the run's PLAN.md / TODO.md (#319) - -The localhost dashboard now surfaces the `PLAN.md` and `TODO.md` the agent writes at the workspace root (via the anti-lazy-pill) in a right sidebar, rendered as markdown with a sticky tab nav to jump between them. A new `GET /api/docs` endpoint reads the surfaced docs (fixed filenames, gated on the workspace `cwd` like `/api/runs`); the sidebar polls it so a plan written mid-run appears, and stays hidden when there are no docs. diff --git a/.changeset/dashboard-layout-fill-height.md b/.changeset/dashboard-layout-fill-height.md deleted file mode 100644 index 5eab17f..0000000 --- a/.changeset/dashboard-layout-fill-height.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@gemstack/framework': patch ---- - -Make the dashboard layout fill the viewport height. `#layout` only grew to its content height, so on a short page the runs-sidebar right border stopped partway down instead of reaching the bottom. Give `#layout` a `min-height: calc(100vh - 57px)` (matching the sidebar's existing header-height key) so the stretched sidebar runs full-height. diff --git a/.changeset/dashboard-port-4200.md b/.changeset/dashboard-port-4200.md deleted file mode 100644 index e20bcfe..0000000 --- a/.changeset/dashboard-port-4200.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@gemstack/framework': minor ---- - -Default dashboard port is now 4200 (was 4477): easier to remember. Pass `--port` to override. diff --git a/.changeset/dashboard-preset-routing-narration.md b/.changeset/dashboard-preset-routing-narration.md deleted file mode 100644 index 0d8c9e5..0000000 --- a/.changeset/dashboard-preset-routing-narration.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@gemstack/framework': patch ---- - -fix(framework): narrate the auto-preset routing turn so the dashboard is not blank at the start of a run (#310) - -A preset-less live run first does a real Claude routing turn to auto-select a domain preset. The dashboard was started only after that turn, so its first few seconds looked dead. The dashboard now starts before the routing turn and the turn narrates a log line into it. diff --git a/.changeset/dashboard-project-log-panel.md b/.changeset/dashboard-project-log-panel.md deleted file mode 100644 index 89cf95f..0000000 --- a/.changeset/dashboard-project-log-panel.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@gemstack/framework': minor ---- - -Add a Project log panel to the dashboard (#384). It surfaces the committed `.the-framework/LOGS.md` history (#378/#379) for the workspace: every loop/prompt/build run with its title, status, kind, session link, and a loop's constituent prompts, newest-first. Served by a new `GET /api/logs` endpoint and refreshed on load, on run-end, and on an interval. All fields are escaped and the session link is passed through the page's safe-URL guard, since the log is agent-authored. diff --git a/.changeset/dashboard-run-history.md b/.changeset/dashboard-run-history.md deleted file mode 100644 index 7a0f1e0..0000000 --- a/.changeset/dashboard-run-history.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@gemstack/framework': minor ---- - -feat(framework): browse a project's run history in the dashboard (#303) - -The dashboard now has a left sidebar listing a project's past runs (intent, status, session link); clicking one replays that run's projection in the main view, and "Back to live" returns to the current run. Each finished run is archived under `.framework/runs/.jsonl` + `.framework/runs/.json` (a crash that skips the final flush is archived on the next run), and served over `GET /api/runs` and `GET /api/runs/`. Single project only. Closes #303. diff --git a/.changeset/dashboard-start-run.md b/.changeset/dashboard-start-run.md deleted file mode 100644 index 91a51a2..0000000 --- a/.changeset/dashboard-start-run.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@gemstack/framework': minor ---- - -Start runs from the daemon dashboard (#345): a prompt textarea + `POST /api/start` that spawns `framework "" --no-dashboard` as a detached child, with a one-run-at-a-time guard. The started run streams into the page via the tailed event log and is steerable (gates + Stop) through the control channel. diff --git a/.changeset/dashboard-sticky-header-sidebar.md b/.changeset/dashboard-sticky-header-sidebar.md deleted file mode 100644 index 5af808f..0000000 --- a/.changeset/dashboard-sticky-header-sidebar.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@gemstack/framework': patch ---- - -Keep the dashboard header and sidebar in view while scrolling. The header is now sticky at the top (with a background and z-index so content scrolls under it), and the app-running banner and the runs sidebar stick just below it. On a long page you no longer lose the title, stop button, and run list when you scroll down. diff --git a/.changeset/doc-sidebar-session-scoped.md b/.changeset/doc-sidebar-session-scoped.md deleted file mode 100644 index 66c3c24..0000000 --- a/.changeset/doc-sidebar-session-scoped.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@gemstack/framework': patch ---- - -fix(framework): surface session-scoped PLAN/TODO docs in the dashboard sidebar (#323) - -The document sidebar now also surfaces the session-scoped `PLAN_.agent.md` / `TODO_.agent.md` files The Framework writes per run (#323/#326), not just flat `PLAN.md` / `TODO.md`. Flat files stay supported as a fallback for hand-written docs. Names are matched against the workspace root with a fixed slug pattern, so there is still no path traversal. diff --git a/.changeset/eventstream-iterator-cancel.md b/.changeset/eventstream-iterator-cancel.md deleted file mode 100644 index b0a96e5..0000000 --- a/.changeset/eventstream-iterator-cancel.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@gemstack/ai-autopilot': patch ---- - -fix(ai-autopilot): EventStream iterators are now cancellable - -A consumer's async iterator gained a `return()` that drops its waiter from the stream and settles any pending `next()`. Previously a consumer that stopped iterating (e.g. a disconnected SSE client) left its waiter registered until the next `push`/`close`, so many short-lived consumers on an idle stream leaked. Live iteration and history replay are unchanged. diff --git a/.changeset/framework-dashboard-csrf-xss.md b/.changeset/framework-dashboard-csrf-xss.md deleted file mode 100644 index 85435e8..0000000 --- a/.changeset/framework-dashboard-csrf-xss.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@gemstack/framework': patch ---- - -Harden the dashboard against cross-site abuse and event-borne XSS. The state-changing dashboard routes (`/stop`, `/choice`, `/api/start`) now reject any request whose `Origin` is a foreign site, so a page on another origin can no longer drive the localhost dashboard into spawning or steering a run (a non-browser caller that sends no `Origin` is unaffected). The client render pipeline no longer trusts event strings: link URLs (session link, preview URL, run-history link) are scheme-checked so a `javascript:` URL collapses to `#`, and the HTML escaper now escapes quotes so a relay-published event can't break out of an attribute (e.g. a choice option id like `x" autofocus onfocus=...`). diff --git a/.changeset/framework-system-prompt-injection.md b/.changeset/framework-system-prompt-injection.md deleted file mode 100644 index 078fbf8..0000000 --- a/.changeset/framework-system-prompt-injection.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@gemstack/framework': minor ---- - -feat(framework): inject a system prompt into every prompt (anti-lazy-pill + SYSTEM.md) - -Every run is now framed with a built-in system prompt: the validated anti-lazy-pill (#297), which turns unclear scope into a ranked list, a large scope into a `PLAN.md`, and a very large one into a `TODO.md` backlog, so the agent builds a real backend and declares what it descopes instead of silently faking it. Drop a `SYSTEM.md` at the workspace root to add project-specific instructions on top, or set `antiLazyPill: false` in `the-framework.yml` to remove the built-in default. Closes #301. diff --git a/.changeset/gate-refire-after-realternative.md b/.changeset/gate-refire-after-realternative.md deleted file mode 100644 index f4f78a4..0000000 --- a/.changeset/gate-refire-after-realternative.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@gemstack/framework': patch ---- - -fix(framework): re-fire the plan-approval gate after picking an alternative (#324) - -Picking an alternative at the plan-approval gate re-architects the plan, and that fresh plan can differ a lot from the one you rejected. The gate now re-fires on the re-architected plan so you approve the plan you will actually build, not just the first one. Bounded to a few re-architect rounds so a run of alternative-picks can't loop forever. diff --git a/.changeset/global-options-engine-314.md b/.changeset/global-options-engine-314.md deleted file mode 100644 index d427b99..0000000 --- a/.changeset/global-options-engine-314.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@gemstack/framework': minor ---- - -Thread the #314 Global options through the run engine (#370). `POST /api/start` now carries an `options` object which the daemon turns into CLI flags: `--vanilla` removes the built-in #326 system prompt entirely (raw Claude Code), and `--eco-auto-planning` / `--eco-auto-research` / `--eco-auto-maintenance` drop the matching #326 sections to save tokens (Autopilot and Technical keep mapping to modes). `system-prompt.ts` drops the Eco sections at render, so the #343 Prompts panel reflects the toggles live; the #326 template stays byte-identical. The dashboard panel that drives these lands separately (#371); all fields default off, so today's behavior is unchanged. diff --git a/.changeset/global-options-panel-314.md b/.changeset/global-options-panel-314.md deleted file mode 100644 index 7db9f87..0000000 --- a/.changeset/global-options-panel-314.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@gemstack/framework': minor ---- - -Add the #314 Global options panel to the dashboard (#371). Beside the Start box the daemon dashboard now shows persistent toggles: Autopilot (auto-accept, sharing its key with the choice-panel toggle so the two stay in lockstep), Technical control, Vanilla (remove all system prompts, fully transparent), and Eco with Auto planning / Auto research / Auto maintenance to trim the built-in prompt. Each persists in localStorage and rides along in the `POST /api/start` body, so flipping a toggle changes what the run gets (and, with the engine plumbing in #370, what the #343 Prompts panel shows). Vanilla disables Eco, since a removed prompt has nothing left to trim. diff --git a/.changeset/interactive-choices-autopilot.md b/.changeset/interactive-choices-autopilot.md deleted file mode 100644 index 14997e3..0000000 --- a/.changeset/interactive-choices-autopilot.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@gemstack/framework': minor ---- - -feat(framework): interactive plan-approval choice + autopilot in the dashboard (#304) - -The run now pauses at a plan-approval gate right after the architect decides the stack (the AWAIT point of the plan-then-AWAIT flow): the dashboard shows a "Your call" panel with "Proceed" plus each architect alternative as "Use X instead". Accept with the button or Ctrl+Enter, or leave the `[x] autopilot` countdown auto-accept the recommended plan after 10s (moving the mouse cancels it). Picking an alternative re-architects the run around it. New `requestChoice` option on `runFramework`, `choice` / `choice-resolved` events, and a `POST /choice` dashboard route; a headless run with no handler auto-accepts the recommended plan, so nothing else changes. Closes #304. diff --git a/.changeset/maintainability-minimal-preset-362.md b/.changeset/maintainability-minimal-preset-362.md deleted file mode 100644 index 2976df0..0000000 --- a/.changeset/maintainability-minimal-preset-362.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@gemstack/framework': minor ---- - -Add a [Maintainability (minimal)] preset button on the dashboard (#362) beside the existing [Maintainability] one (#361), as a deliberate A/B. The minimal variant prefills the bare prompt "Look for maintainability red flags, and fix them." with no target scope and no goal framing, where #361 adds a `` target and a "make it as maintainable as possible" lead line. Both prefill the start textarea for review/editing and run verbatim as a direct prompt. Once the comparison settles, the losing variant will be removed. diff --git a/.changeset/maintainability-preset-361.md b/.changeset/maintainability-preset-361.md deleted file mode 100644 index 19b075b..0000000 --- a/.changeset/maintainability-preset-361.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@gemstack/framework': minor ---- - -New [Maintainability] preset button on the dashboard (#361): prefills the deliberately minimal refactor-for-future-changes prompt ("look for maintainability red flags, and fix them") into the start textarea for review or editing; Start runs the text verbatim as a direct prompt run. The one blank, ``, defaults to `this PR`. diff --git a/.changeset/multi-project-daemon-reads.md b/.changeset/multi-project-daemon-reads.md deleted file mode 100644 index 3a7e145..0000000 --- a/.changeset/multi-project-daemon-reads.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@gemstack/framework": minor ---- - -Make the dashboard multi-project on the read side: `GET /api/projects` lists the registered projects (from the registry) with a per-project summary (name, activated, last activity), and `?project=` on `/api/logs`, `/api/runs`, `/api/runs/`, and `/api/docs` reads that project's data (an absent id keeps the daemon's own workspace, single-project back-compat). The daemon auto-registers its own workspace on boot when it is activated, so the Projects list is populated for the common single-project case. Live event streaming and per-project run start/stop stay single-project for now. Adds `ProjectSummary` / `ProjectsProvider` / `summarizeProject` / `defaultProjectsProvider`. diff --git a/.changeset/multi-project-install-core.md b/.changeset/multi-project-install-core.md deleted file mode 100644 index 87e2466..0000000 --- a/.changeset/multi-project-install-core.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@gemstack/framework": minor ---- - -Add the install-core module: `installProject(cwd)` activates a repo for The Framework by creating the `.the-framework/` marker with a seeded `LOGS.md`, committing any pre-existing dirty changes first (`[The Framework] uncommitted changes`) so the install commit (`[The Framework] install The Framework`) is clean; an already-activated repo is a no-op. Also `enumerateGitRepos(dir)` lists the immediate child directories that are their own git repo roots (for the "add a directory of repos" flow). Pure core over the existing `GitRunner` + `StoreFs` seams; any git failure surfaces as a value, never a throw. No daemon or UI wiring yet. diff --git a/.changeset/multi-project-registry-module.md b/.changeset/multi-project-registry-module.md deleted file mode 100644 index b5e8111..0000000 --- a/.changeset/multi-project-registry-module.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@gemstack/framework": minor ---- - -Add the multi-project registry module: reads and writes the list of projects The Framework is installed into, as a small `{id, path, addedAt}` JSON index under the user's config dir. Exposes `projectId`, `registryPath`, `listProjects`, `addProject`, `removeProject`, and an injectable `RegistryFs` seam with a `nodeRegistryFs()` adapter. No daemon or UI wiring yet. diff --git a/.changeset/multi-select-gate-332.md b/.changeset/multi-select-gate-332.md deleted file mode 100644 index 1748915..0000000 --- a/.changeset/multi-select-gate-332.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@gemstack/framework': minor ---- - -Add a multi-select gate (`showMultiSelect()`): a dashboard checklist with pre-checked defaults that pauses the run and resolves to the selected subset. Built on the existing single-select choice gate (same panel and POST-back resolver), exposed as `requestMultiSelect()`; a headless run auto-accepts the default set. This is the primitive the [Research] preset uses to let the user pick which problems to deep-dive. diff --git a/.changeset/multiselect-turn-boundary-gate.md b/.changeset/multiselect-turn-boundary-gate.md deleted file mode 100644 index a5189e1..0000000 --- a/.changeset/multiselect-turn-boundary-gate.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@gemstack/framework': minor ---- - -feat(framework): turn an agent's showMultiSelect()+AWAIT into a live checklist gate (#339) - -The multi twin of the single-select turn-boundary gate (#337). When a build turn ends on an `await-multiselect` block, the framework shows a checklist on the dashboard (via `requestMultiSelect`, with the agent-marked defaults pre-checked), waits for the selection, and re-prompts the agent to continue from it. This is what the research preset needs to let the user pick which problems to deep-dive. Same safety as #337: a no-op when headless and when the agent just finishes. diff --git a/.changeset/persistent-dashboard-daemon.md b/.changeset/persistent-dashboard-daemon.md deleted file mode 100644 index a5da1dd..0000000 --- a/.changeset/persistent-dashboard-daemon.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@gemstack/framework': minor ---- - -feat(framework): persistent background dashboard daemon (#302) - -Bare `framework` now ensures a long-lived dashboard process for the workspace and prints its URL plus the convenience commands; `framework stop` shuts it down. The dashboard is a projection of `.framework/events.jsonl`: the detached daemon tails the log and pushes each new event to connected browsers, so it outlives any single run. The tailer also detects an in-place truncation when a fresh run rewrites the log to the same byte length (size unchanged but mtime advanced), and the daemon spawn refuses to re-exec a test entry so a `node --test` run can never fork-bomb itself. diff --git a/.changeset/preset-params-330.md b/.changeset/preset-params-330.md deleted file mode 100644 index ccd60ce..0000000 --- a/.changeset/preset-params-330.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@gemstack/framework': minor ---- - -Add preset-prompt param substitution (``), the foundation for prompt-preset buttons. A preset prompt template can carry `` placeholders substituted from supplied values or declared defaults; unfilled params are surfaced so a caller can ask the user to fill the blanks. diff --git a/.changeset/presets-prefill-textarea.md b/.changeset/presets-prefill-textarea.md deleted file mode 100644 index 9ca103d..0000000 --- a/.changeset/presets-prefill-textarea.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@gemstack/framework': minor ---- - -Dashboard presets only prefill the textarea (#353): the [Research] button now loads the full rendered preset prompt for review and editing, and nothing runs until Start / Ctrl+Enter. The edited text is sent verbatim via a new `prompt` start kind and `framework prompt ` subcommand (the direct path: gates honored, no build pipeline). Clearing the box reverts Start to a normal build run. diff --git a/.changeset/project-second-sidebar.md b/.changeset/project-second-sidebar.md deleted file mode 100644 index f04903f..0000000 --- a/.changeset/project-second-sidebar.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@gemstack/framework": minor ---- - -Add the per-project second sidebar and main view. The second sidebar now shows the selected project's loops/prompts (its `.the-framework/LOGS.md`, scoped via `?project=`) with its Runs archive below it, both following the selection. The main view shows the selected or latest loop/prompt claude.ai/code-style (kind, title, status, session link, and a loop's constituent prompts); clicking a loop in the sidebar opens it. On load the most recently active project is auto-selected, so the view is populated immediately. diff --git a/.changeset/projects-sidebar.md b/.changeset/projects-sidebar.md deleted file mode 100644 index 4399e2c..0000000 --- a/.changeset/projects-sidebar.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@gemstack/framework": minor ---- - -Add the Projects sidebar to the dashboard: a leftmost nav with Overview (project count plus the most recently active projects), Projects (every registered project with an activation dot and last-activity, from `/api/projects`), and Queue (the open TODO items aggregated across all projects). Selecting a project re-points the project log to `?project=`. The per-project second sidebar and main view come next. diff --git a/.changeset/readability-preset-360.md b/.changeset/readability-preset-360.md deleted file mode 100644 index 57f1c28..0000000 --- a/.changeset/readability-preset-360.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@gemstack/framework': minor ---- - -New [Readability] preset button on the dashboard (#360): prefills Rom's refactor-for-human-readers prompt (architectural seams, linearity/altitude pass, exhaustive per-function rating lists, one commit per refactor) into the start textarea for review or editing; Start runs the text verbatim as a direct prompt run. The one blank, ``, defaults to `this PR`. diff --git a/.changeset/registry-single-file.md b/.changeset/registry-single-file.md deleted file mode 100644 index 9ed8eac..0000000 --- a/.changeset/registry-single-file.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@gemstack/framework": patch ---- - -Store the multi-project registry as a single file, `.bashrc`-style: `$HOME/.the-framework.json` (or `$XDG_CONFIG_HOME/the-framework.json`) instead of a `projects.json` nested inside a `.the-framework/` directory (#390). diff --git a/.changeset/relay-sandbox-hardening.md b/.changeset/relay-sandbox-hardening.md deleted file mode 100644 index 473cf38..0000000 --- a/.changeset/relay-sandbox-hardening.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -'@gemstack/framework': patch ---- - -fix(framework): harden the run relay and workspace sandbox against resource exhaustion - -- The relay now caps how many runs it holds in memory and evicts the least-recently-used one on overflow. Because it is unauthenticated, an anonymous request to `/r//…` could previously create per-run state that was never freed; run creation is now bounded (`maxRuns`, default 200). -- A disconnected SSE viewer now cancels its stream iterator, releasing its waiter immediately instead of lingering on the stream until the next event (which may never arrive for an idle run). -- `snapshotWorkspace` checks a file's size before reading it, so a large asset in the workspace is skipped without ever being loaded into memory during a `--sandbox docker` sync. -- `relayPublisher`'s POST has a timeout, so a relay that accepts a connection but never responds can no longer hang the CLI on exit (`flush()`). diff --git a/.changeset/research-preset-button.md b/.changeset/research-preset-button.md deleted file mode 100644 index b7c924f..0000000 --- a/.changeset/research-preset-button.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@gemstack/framework': minor ---- - -The [Research] preset (#331): `framework research [what]` and a [Research] button on the daemon dashboard run Rom's problem-variability review as a direct prompt via the new `runPrompt()` path, which honors await gates (showChoices/showMultiSelect) but skips the scope/architect/build scaffolding. The "what" defaults to `this PR`. diff --git a/.changeset/show-real-prompts-343.md b/.changeset/show-real-prompts-343.md deleted file mode 100644 index cdd3419..0000000 --- a/.changeset/show-real-prompts-343.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@gemstack/framework': minor ---- - -Show the real prompts on the dashboard (#343). The framework now emits the exact system prompt it runs the agent under, the #326 block plus any persona / skill / memory framing, as a `system-prompt` event at session start (both the direct-prompt path and the full build path). A new "Prompts sent to Claude Code" panel renders it alongside each turn's user prompt (harvested from the `driver` `start` events already in the stream), so the normally-hidden prompt is fully visible for transparency. Prompt text renders as inert text, never markup. Read-only; nothing is gated on it. diff --git a/.changeset/single-select-gate-primitive.md b/.changeset/single-select-gate-primitive.md deleted file mode 100644 index 8cced42..0000000 --- a/.changeset/single-select-gate-primitive.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@gemstack/framework': minor ---- - -feat(framework): extract a shared single-select gate primitive (`requestChoices`) (#335) - -The single-select choice gate (#304) is now a reusable `requestChoices({ id, title, options, recommended })` export, the twin of `requestMultiSelect` (#332): it emits the `choice` event, parks for the pick, and falls back to the recommended option if the run is headless or aborts. The plan-approval gate builds on it, and it is the primitive the system prompt's `showChoices()` and the research preset need. No behavior change for existing runs. diff --git a/.changeset/start-run-feedback.md b/.changeset/start-run-feedback.md deleted file mode 100644 index 54d80ed..0000000 --- a/.changeset/start-run-feedback.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@gemstack/framework": minor ---- - -Give the dashboard clear feedback when a run is started. A run is spawned detached, so there was a gap between clicking Start and the first event (and a failed launch produced nothing, so the page looked frozen). Now clicking Start shows an immediate "Starting your run..." banner; if no output arrives within ~8s it warns that the run may have failed to start; a run-launch/exit failure surfaces as an error banner; and a rejected Start (a run is already active) shows a clear "busy" banner instead of a tiny note. diff --git a/.changeset/system-prompt-326.md b/.changeset/system-prompt-326.md deleted file mode 100644 index 4be61a5..0000000 --- a/.changeset/system-prompt-326.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@gemstack/framework': minor ---- - -The built-in system prompt is now Rom's #326 text, verbatim, replacing the anti-lazy-pill it grew out of: unclear scope becomes a ranked `showChoices()` list, a large scope a `PLAN_.agent.md` to approve, a very large one also a `TODO_.agent.md` backlog, an alternatives pass rates problem "variability" before code is written, and edits to existing code stay minimal. The prompt is a template (#350): `${{ ... }}` JS fragments render against the run context, so `tf.params.autopilot` relaxes the maintenance stance on autopilot runs and `${{tf.prompt}}` carries the user prompt slot. New exports: `SYSTEM_PROMPT_TEMPLATE`, `renderSystemPrompt`, `renderTemplate`; the `ANTI_LAZY_PILL` export is gone (the `antiLazyPill` config key still toggles the built-in prompt). `--autopilot` now has an effect without a preset. diff --git a/.changeset/the-framework-log-run-completion.md b/.changeset/the-framework-log-run-completion.md deleted file mode 100644 index 10751a9..0000000 --- a/.changeset/the-framework-log-run-completion.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@gemstack/framework': minor ---- - -Record every finished run in the project log `.the-framework/LOGS.md` (#379). When a run ends, the CLI appends an entry with the intent/prompt title, the kind (build or prompt), the final status (done/stopped/failed), and the Claude Code session id and link. Best-effort, so a log write can never break a run. This is what makes the project DB (#378) fill itself; the run-history sidebar in #314 reads from it. diff --git a/.changeset/the-framework-logs-module.md b/.changeset/the-framework-logs-module.md deleted file mode 100644 index 8310dff..0000000 --- a/.changeset/the-framework-logs-module.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@gemstack/framework': minor ---- - -New `.the-framework/LOGS.md` project-log module (#378): `appendLog`/`readLogs` keep a human-readable markdown log of every loop, prompt, and build in a project, with `renderLogEntry`/`parseLogs` as the pure core over the same StoreFs seam as the run store. Parsing is forgiving: a malformed entry is skipped, never thrown. Standalone for now; the run-lifecycle wiring and dashboard UI land in follow-up issues. diff --git a/.changeset/the-framework-project-helpers.md b/.changeset/the-framework-project-helpers.md deleted file mode 100644 index fa9ed3c..0000000 --- a/.changeset/the-framework-project-helpers.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@gemstack/framework': minor ---- - -Add project repo helpers (#380): `isActivated()` checks the `.the-framework/` activation marker via an injectable `ProjectFs`, and `crawlRepoFiles()` lists every tracked + untracked (gitignore-honoring) file via `git ls-files -z` behind an injectable `GitRunner`. Both forgiving: any failure reads as not-activated / an empty list. Building blocks for the #314 sidebars. diff --git a/.changeset/todo-backlog-loop.md b/.changeset/todo-backlog-loop.md deleted file mode 100644 index 1f33d4a..0000000 --- a/.changeset/todo-backlog-loop.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@gemstack/framework': minor ---- - -The backlog loop (#323): after the build settles, the run consumes the agent's own TODO backlog (`TODO_.agent.md`, or the flat `TODO.md`) one entry per turn until it is empty. When a dashboard can answer, the loop gates before each entry ("start the next item?"), so autopilot consumes the backlog unattended and autopilot-off pauses per item. Caps make it safe overnight: the budget/Stop signal ends any turn, `--max-todo-items` bounds the run (default 25), and two no-progress items stop the loop. `--no-todo-loop` opts out. diff --git a/.changeset/turn-boundary-choice-gate.md b/.changeset/turn-boundary-choice-gate.md deleted file mode 100644 index c8de255..0000000 --- a/.changeset/turn-boundary-choice-gate.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@gemstack/framework': minor ---- - -feat(framework): turn an agent's showChoices()+AWAIT into a live gate at the turn boundary (#337) - -The system prompt tells the agent to `showChoices()` and `AWAIT` at unclear-scope / alternatives points, but until now only framework-emitted gates (the plan-approval gate, multi-select) could pause a run. Now when a build turn ends by asking the user, an `await-choices` block, the framework shows the choice on the dashboard, waits for the pick, and re-prompts the agent to continue from that decision. It is the agent-authored counterpart to the plan-approval gate: a no-op when headless and when the agent just finishes instead of asking, so existing runs are unchanged. diff --git a/.changeset/unify-the-framework-dir.md b/.changeset/unify-the-framework-dir.md deleted file mode 100644 index 84b2dc0..0000000 --- a/.changeset/unify-the-framework-dir.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@gemstack/framework": minor ---- - -Keep everything in a single `.the-framework/` directory (#313). The transient run state (`events.jsonl`, `run.json`, `runs/`, `control.jsonl`, `daemon.json`) now lives in `.the-framework/` alongside the committed project log `LOGS.md`, instead of a separate `.framework/` directory. `install` seeds a `.the-framework/.gitignore` that ignores everything except `LOGS.md`, so the run state stays transient and only the log is committed. diff --git a/.changeset/usage-accounting-budget-cap.md b/.changeset/usage-accounting-budget-cap.md deleted file mode 100644 index 023baf4..0000000 --- a/.changeset/usage-accounting-budget-cap.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@gemstack/framework': minor ---- - -feat(framework): track agent spend and add a budget cap (#322) - -The framework now accumulates the token + cost usage the wrapped agent reports each turn, streams a running total as a `usage` event, and shows a live spend readout on the dashboard header. Pass `--max-cost ` to stop a run once it has spent that much: the current turn finishes, then the run stops cleanly (not a failure). Useful for long autopilot runs where you only review the result at the end. diff --git a/examples/framework-demo/CHANGELOG.md b/examples/framework-demo/CHANGELOG.md index efbf2b2..4f71cc2 100644 --- a/examples/framework-demo/CHANGELOG.md +++ b/examples/framework-demo/CHANGELOG.md @@ -1,5 +1,64 @@ # @gemstack/example-framework-demo +## 0.0.7 + +### Patch Changes + +- Updated dependencies [0faa297] +- Updated dependencies [40491ba] +- Updated dependencies [6721c0f] +- Updated dependencies [7a94b48] +- Updated dependencies [016fb8d] +- Updated dependencies [87d67c8] +- Updated dependencies [27f522a] +- Updated dependencies [900efbb] +- Updated dependencies [4ed510f] +- Updated dependencies [63b2a73] +- Updated dependencies [48aba07] +- Updated dependencies [dabdf0f] +- Updated dependencies [8cbff44] +- Updated dependencies [16e86c4] +- Updated dependencies [388f3ad] +- Updated dependencies [72fb351] +- Updated dependencies [ed25ab8] +- Updated dependencies [131f349] +- Updated dependencies [734da1a] +- Updated dependencies [c05a186] +- Updated dependencies [5882932] +- Updated dependencies [07f1756] +- Updated dependencies [eec009d] +- Updated dependencies [5d54b64] +- Updated dependencies [1f6a0d3] +- Updated dependencies [1300765] +- Updated dependencies [28fff61] +- Updated dependencies [4aaa00a] +- Updated dependencies [f0a024c] +- Updated dependencies [4746188] +- Updated dependencies [f496a54] +- Updated dependencies [e370b41] +- Updated dependencies [21fe373] +- Updated dependencies [721f539] +- Updated dependencies [d834af8] +- Updated dependencies [5108aea] +- Updated dependencies [32e9d3e] +- Updated dependencies [f736b55] +- Updated dependencies [1e1b4dc] +- Updated dependencies [734da1a] +- Updated dependencies [98f44e2] +- Updated dependencies [03ca1b0] +- Updated dependencies [34d3ec2] +- Updated dependencies [c72d155] +- Updated dependencies [5c83bc2] +- Updated dependencies [9345476] +- Updated dependencies [59e3707] +- Updated dependencies [6b561fc] +- Updated dependencies [d1202dc] +- Updated dependencies [e4b518a] +- Updated dependencies [bc3586b] +- Updated dependencies [7db5a9c] + - @gemstack/framework@0.9.0 + - @gemstack/ai-autopilot@0.9.1 + ## 0.0.6 ### Patch Changes diff --git a/examples/framework-demo/package.json b/examples/framework-demo/package.json index fb4ba9c..34fa323 100644 --- a/examples/framework-demo/package.json +++ b/examples/framework-demo/package.json @@ -1,6 +1,6 @@ { "name": "@gemstack/example-framework-demo", - "version": "0.0.6", + "version": "0.0.7", "private": true, "description": "Showable end-to-end demo of @gemstack/framework: one prompt → scope → architect → build → full-fledged loop → deploy → a real running app, offline and deterministic via the fake driver.", "type": "module", diff --git a/examples/framework-discovery-demo/CHANGELOG.md b/examples/framework-discovery-demo/CHANGELOG.md index f67cc31..4df75e2 100644 --- a/examples/framework-discovery-demo/CHANGELOG.md +++ b/examples/framework-discovery-demo/CHANGELOG.md @@ -1,5 +1,64 @@ # @gemstack/example-framework-discovery +## 0.0.7 + +### Patch Changes + +- Updated dependencies [0faa297] +- Updated dependencies [40491ba] +- Updated dependencies [6721c0f] +- Updated dependencies [7a94b48] +- Updated dependencies [016fb8d] +- Updated dependencies [87d67c8] +- Updated dependencies [27f522a] +- Updated dependencies [900efbb] +- Updated dependencies [4ed510f] +- Updated dependencies [63b2a73] +- Updated dependencies [48aba07] +- Updated dependencies [dabdf0f] +- Updated dependencies [8cbff44] +- Updated dependencies [16e86c4] +- Updated dependencies [388f3ad] +- Updated dependencies [72fb351] +- Updated dependencies [ed25ab8] +- Updated dependencies [131f349] +- Updated dependencies [734da1a] +- Updated dependencies [c05a186] +- Updated dependencies [5882932] +- Updated dependencies [07f1756] +- Updated dependencies [eec009d] +- Updated dependencies [5d54b64] +- Updated dependencies [1f6a0d3] +- Updated dependencies [1300765] +- Updated dependencies [28fff61] +- Updated dependencies [4aaa00a] +- Updated dependencies [f0a024c] +- Updated dependencies [4746188] +- Updated dependencies [f496a54] +- Updated dependencies [e370b41] +- Updated dependencies [21fe373] +- Updated dependencies [721f539] +- Updated dependencies [d834af8] +- Updated dependencies [5108aea] +- Updated dependencies [32e9d3e] +- Updated dependencies [f736b55] +- Updated dependencies [1e1b4dc] +- Updated dependencies [734da1a] +- Updated dependencies [98f44e2] +- Updated dependencies [03ca1b0] +- Updated dependencies [34d3ec2] +- Updated dependencies [c72d155] +- Updated dependencies [5c83bc2] +- Updated dependencies [9345476] +- Updated dependencies [59e3707] +- Updated dependencies [6b561fc] +- Updated dependencies [d1202dc] +- Updated dependencies [e4b518a] +- Updated dependencies [bc3586b] +- Updated dependencies [7db5a9c] + - @gemstack/framework@0.9.0 + - @gemstack/ai-autopilot@0.9.1 + ## 0.0.6 ### Patch Changes diff --git a/examples/framework-discovery-demo/package.json b/examples/framework-discovery-demo/package.json index 5698250..333442a 100644 --- a/examples/framework-discovery-demo/package.json +++ b/examples/framework-discovery-demo/package.json @@ -1,6 +1,6 @@ { "name": "@gemstack/example-framework-discovery", - "version": "0.0.6", + "version": "0.0.7", "private": true, "description": "End-to-end proof of The Framework's extension SPI (#190): this project depends on the third-party `framework-hello` package, and the CLI discovers, registers, and composes it into the agent frame - offline and deterministic via the fake driver.", "type": "module", diff --git a/packages/ai-autopilot/CHANGELOG.md b/packages/ai-autopilot/CHANGELOG.md index 2f4d0c2..4c5a34e 100644 --- a/packages/ai-autopilot/CHANGELOG.md +++ b/packages/ai-autopilot/CHANGELOG.md @@ -1,5 +1,13 @@ # @gemstack/ai-autopilot +## 0.9.1 + +### Patch Changes + +- 734da1a: fix(ai-autopilot): EventStream iterators are now cancellable + + A consumer's async iterator gained a `return()` that drops its waiter from the stream and settles any pending `next()`. Previously a consumer that stopped iterating (e.g. a disconnected SSE client) left its waiter registered until the next `push`/`close`, so many short-lived consumers on an idle stream leaked. Live iteration and history replay are unchanged. + ## 0.9.0 ### Minor Changes diff --git a/packages/ai-autopilot/package.json b/packages/ai-autopilot/package.json index 66e6d3a..e9140e5 100644 --- a/packages/ai-autopilot/package.json +++ b/packages/ai-autopilot/package.json @@ -1,6 +1,6 @@ { "name": "@gemstack/ai-autopilot", - "version": "0.9.0", + "version": "0.9.1", "description": "Orchestration for @gemstack/ai-sdk agents: a Supervisor that plans, dispatches subagents (bounded concurrency + budget guardrails), and synthesizes the result.", "keywords": [ "ai", diff --git a/packages/framework/CHANGELOG.md b/packages/framework/CHANGELOG.md index e12c167..7e87c91 100644 --- a/packages/framework/CHANGELOG.md +++ b/packages/framework/CHANGELOG.md @@ -1,5 +1,110 @@ # @gemstack/framework +## 0.9.0 + +### Minor Changes + +- 0faa297: Add the "Add project(s)" install flow to the dashboard. A `POST /api/projects` (guarded like the other state-changing routes) installs The Framework into a repo, or every git repo directly under a folder, then registers each so it shows up in the Projects list; the daemon wires it to install-core. The Projects sidebar gains an "Add" control with a small path form (single repo or "folder of repos"), shown only when the server enables adding. Also fixes `enumerateGitRepos` to detect repo roots via `git rev-parse --show-prefix` instead of comparing `--show-toplevel` to the path, which failed across a symlink (e.g. macOS `/var` -> `/private/var`) and returned no repos. +- 016fb8d: Bare `framework` now tells you whether the CLI is up to date (#312): after the version footer it checks npm's `dist-tags.latest` (2.5s cap) and prints "Up to date" or "Update available: vX (you have vY). Run: npm i -g @gemstack/framework". Offline or on any fetch failure it prints nothing. Display only; no auto-update. +- 87d67c8: Turn-boundary gate for plan approval (`showMarkdown()` + AWAIT): a build turn that ends with an `await-confirmation` block (the #326 large-scope PLAN flow) now pauses the run with a green Approve and a red Decline button on the dashboard. Approve resumes the build; Decline logs "Plan declined, awaiting user instructions." and stops the run cleanly (like the budget cap), so nothing reviews or improves work the user just declined. Headless runs auto-approve, keeping programmatic runs deterministic. Try it offline with `FRAMEWORK_FAKE_AWAIT=confirmation`. +- 27f522a: feat(framework): opt-in browser notifications on the dashboard for run-end and choice gates (#317) + + The localhost dashboard can now notify you when a run finishes (or fails/stops) and when a run reaches a `` gate that needs your input (e.g. a PLAN.md approval). Opt in via the header bell; it only nudges when the dashboard tab is backgrounded, so a run you are watching stays quiet. + +- 4ed510f: Dashboard control channel: the persistent daemon dashboard can now steer any run in its workspace. Its Stop button and choice picks append to `.framework/control.jsonl`; the run tails the file and aborts or resolves its parked gate. Gates now pause whenever a workspace daemon is live, not only when the run owns its own dashboard; headless behavior without a daemon is unchanged. Also fixes the fresh-workspace daemon startup: bare `framework` in a project with no `.framework/` yet used to fail and leave a zombie server on the port. +- 63b2a73: feat(framework): document sidebar on the dashboard, rendering the run's PLAN.md / TODO.md (#319) + + The localhost dashboard now surfaces the `PLAN.md` and `TODO.md` the agent writes at the workspace root (via the anti-lazy-pill) in a right sidebar, rendered as markdown with a sticky tab nav to jump between them. A new `GET /api/docs` endpoint reads the surfaced docs (fixed filenames, gated on the workspace `cwd` like `/api/runs`); the sidebar polls it so a plan written mid-run appears, and stays hidden when there are no docs. + +- dabdf0f: Default dashboard port is now 4200 (was 4477): easier to remember. Pass `--port` to override. +- 16e86c4: Add a Project log panel to the dashboard (#384). It surfaces the committed `.the-framework/LOGS.md` history (#378/#379) for the workspace: every loop/prompt/build run with its title, status, kind, session link, and a loop's constituent prompts, newest-first. Served by a new `GET /api/logs` endpoint and refreshed on load, on run-end, and on an interval. All fields are escaped and the session link is passed through the page's safe-URL guard, since the log is agent-authored. +- 388f3ad: feat(framework): browse a project's run history in the dashboard (#303) + + The dashboard now has a left sidebar listing a project's past runs (intent, status, session link); clicking one replays that run's projection in the main view, and "Back to live" returns to the current run. Each finished run is archived under `.framework/runs/.jsonl` + `.framework/runs/.json` (a crash that skips the final flush is archived on the next run), and served over `GET /api/runs` and `GET /api/runs/`. Single project only. Closes #303. + +- 72fb351: Start runs from the daemon dashboard (#345): a prompt textarea + `POST /api/start` that spawns `framework "" --no-dashboard` as a detached child, with a one-run-at-a-time guard. The started run streams into the page via the tailed event log and is steerable (gates + Stop) through the control channel. +- 5882932: feat(framework): inject a system prompt into every prompt (anti-lazy-pill + SYSTEM.md) + + Every run is now framed with a built-in system prompt: the validated anti-lazy-pill (#297), which turns unclear scope into a ranked list, a large scope into a `PLAN.md`, and a very large one into a `TODO.md` backlog, so the agent builds a real backend and declares what it descopes instead of silently faking it. Drop a `SYSTEM.md` at the workspace root to add project-specific instructions on top, or set `antiLazyPill: false` in `the-framework.yml` to remove the built-in default. Closes #301. + +- eec009d: Thread the #314 Global options through the run engine (#370). `POST /api/start` now carries an `options` object which the daemon turns into CLI flags: `--vanilla` removes the built-in #326 system prompt entirely (raw Claude Code), and `--eco-auto-planning` / `--eco-auto-research` / `--eco-auto-maintenance` drop the matching #326 sections to save tokens (Autopilot and Technical keep mapping to modes). `system-prompt.ts` drops the Eco sections at render, so the #343 Prompts panel reflects the toggles live; the #326 template stays byte-identical. The dashboard panel that drives these lands separately (#371); all fields default off, so today's behavior is unchanged. +- 5d54b64: Add the #314 Global options panel to the dashboard (#371). Beside the Start box the daemon dashboard now shows persistent toggles: Autopilot (auto-accept, sharing its key with the choice-panel toggle so the two stay in lockstep), Technical control, Vanilla (remove all system prompts, fully transparent), and Eco with Auto planning / Auto research / Auto maintenance to trim the built-in prompt. Each persists in localStorage and rides along in the `POST /api/start` body, so flipping a toggle changes what the run gets (and, with the engine plumbing in #370, what the #343 Prompts panel shows). Vanilla disables Eco, since a removed prompt has nothing left to trim. +- 1f6a0d3: feat(framework): interactive plan-approval choice + autopilot in the dashboard (#304) + + The run now pauses at a plan-approval gate right after the architect decides the stack (the AWAIT point of the plan-then-AWAIT flow): the dashboard shows a "Your call" panel with "Proceed" plus each architect alternative as "Use X instead". Accept with the button or Ctrl+Enter, or leave the `[x] autopilot` countdown auto-accept the recommended plan after 10s (moving the mouse cancels it). Picking an alternative re-architects the run around it. New `requestChoice` option on `runFramework`, `choice` / `choice-resolved` events, and a `POST /choice` dashboard route; a headless run with no handler auto-accepts the recommended plan, so nothing else changes. Closes #304. + +- 1300765: Add a [Maintainability (minimal)] preset button on the dashboard (#362) beside the existing [Maintainability] one (#361), as a deliberate A/B. The minimal variant prefills the bare prompt "Look for maintainability red flags, and fix them." with no target scope and no goal framing, where #361 adds a `` target and a "make it as maintainable as possible" lead line. Both prefill the start textarea for review/editing and run verbatim as a direct prompt. Once the comparison settles, the losing variant will be removed. +- 28fff61: New [Maintainability] preset button on the dashboard (#361): prefills the deliberately minimal refactor-for-future-changes prompt ("look for maintainability red flags, and fix them") into the start textarea for review or editing; Start runs the text verbatim as a direct prompt run. The one blank, ``, defaults to `this PR`. +- 4aaa00a: Make the dashboard multi-project on the read side: `GET /api/projects` lists the registered projects (from the registry) with a per-project summary (name, activated, last activity), and `?project=` on `/api/logs`, `/api/runs`, `/api/runs/`, and `/api/docs` reads that project's data (an absent id keeps the daemon's own workspace, single-project back-compat). The daemon auto-registers its own workspace on boot when it is activated, so the Projects list is populated for the common single-project case. Live event streaming and per-project run start/stop stay single-project for now. Adds `ProjectSummary` / `ProjectsProvider` / `summarizeProject` / `defaultProjectsProvider`. +- f0a024c: Add the install-core module: `installProject(cwd)` activates a repo for The Framework by creating the `.the-framework/` marker with a seeded `LOGS.md`, committing any pre-existing dirty changes first (`[The Framework] uncommitted changes`) so the install commit (`[The Framework] install The Framework`) is clean; an already-activated repo is a no-op. Also `enumerateGitRepos(dir)` lists the immediate child directories that are their own git repo roots (for the "add a directory of repos" flow). Pure core over the existing `GitRunner` + `StoreFs` seams; any git failure surfaces as a value, never a throw. No daemon or UI wiring yet. +- 4746188: Add the multi-project registry module: reads and writes the list of projects The Framework is installed into, as a small `{id, path, addedAt}` JSON index under the user's config dir. Exposes `projectId`, `registryPath`, `listProjects`, `addProject`, `removeProject`, and an injectable `RegistryFs` seam with a `nodeRegistryFs()` adapter. No daemon or UI wiring yet. +- f496a54: Add a multi-select gate (`showMultiSelect()`): a dashboard checklist with pre-checked defaults that pauses the run and resolves to the selected subset. Built on the existing single-select choice gate (same panel and POST-back resolver), exposed as `requestMultiSelect()`; a headless run auto-accepts the default set. This is the primitive the [Research] preset uses to let the user pick which problems to deep-dive. +- e370b41: feat(framework): turn an agent's showMultiSelect()+AWAIT into a live checklist gate (#339) + + The multi twin of the single-select turn-boundary gate (#337). When a build turn ends on an `await-multiselect` block, the framework shows a checklist on the dashboard (via `requestMultiSelect`, with the agent-marked defaults pre-checked), waits for the selection, and re-prompts the agent to continue from it. This is what the research preset needs to let the user pick which problems to deep-dive. Same safety as #337: a no-op when headless and when the agent just finishes. + +- 21fe373: feat(framework): persistent background dashboard daemon (#302) + + Bare `framework` now ensures a long-lived dashboard process for the workspace and prints its URL plus the convenience commands; `framework stop` shuts it down. The dashboard is a projection of `.framework/events.jsonl`: the detached daemon tails the log and pushes each new event to connected browsers, so it outlives any single run. The tailer also detects an in-place truncation when a fresh run rewrites the log to the same byte length (size unchanged but mtime advanced), and the daemon spawn refuses to re-exec a test entry so a `node --test` run can never fork-bomb itself. + +- 721f539: Add preset-prompt param substitution (``), the foundation for prompt-preset buttons. A preset prompt template can carry `` placeholders substituted from supplied values or declared defaults; unfilled params are surfaced so a caller can ask the user to fill the blanks. +- d834af8: Dashboard presets only prefill the textarea (#353): the [Research] button now loads the full rendered preset prompt for review and editing, and nothing runs until Start / Ctrl+Enter. The edited text is sent verbatim via a new `prompt` start kind and `framework prompt ` subcommand (the direct path: gates honored, no build pipeline). Clearing the box reverts Start to a normal build run. +- 5108aea: Add the per-project second sidebar and main view. The second sidebar now shows the selected project's loops/prompts (its `.the-framework/LOGS.md`, scoped via `?project=`) with its Runs archive below it, both following the selection. The main view shows the selected or latest loop/prompt claude.ai/code-style (kind, title, status, session link, and a loop's constituent prompts); clicking a loop in the sidebar opens it. On load the most recently active project is auto-selected, so the view is populated immediately. +- 32e9d3e: Add the Projects sidebar to the dashboard: a leftmost nav with Overview (project count plus the most recently active projects), Projects (every registered project with an activation dot and last-activity, from `/api/projects`), and Queue (the open TODO items aggregated across all projects). Selecting a project re-points the project log to `?project=`. The per-project second sidebar and main view come next. +- f736b55: New [Readability] preset button on the dashboard (#360): prefills Rom's refactor-for-human-readers prompt (architectural seams, linearity/altitude pass, exhaustive per-function rating lists, one commit per refactor) into the start textarea for review or editing; Start runs the text verbatim as a direct prompt run. The one blank, ``, defaults to `this PR`. +- 98f44e2: The [Research] preset (#331): `framework research [what]` and a [Research] button on the daemon dashboard run Rom's problem-variability review as a direct prompt via the new `runPrompt()` path, which honors await gates (showChoices/showMultiSelect) but skips the scope/architect/build scaffolding. The "what" defaults to `this PR`. +- 03ca1b0: Show the real prompts on the dashboard (#343). The framework now emits the exact system prompt it runs the agent under, the #326 block plus any persona / skill / memory framing, as a `system-prompt` event at session start (both the direct-prompt path and the full build path). A new "Prompts sent to Claude Code" panel renders it alongside each turn's user prompt (harvested from the `driver` `start` events already in the stream), so the normally-hidden prompt is fully visible for transparency. Prompt text renders as inert text, never markup. Read-only; nothing is gated on it. +- 34d3ec2: feat(framework): extract a shared single-select gate primitive (`requestChoices`) (#335) + + The single-select choice gate (#304) is now a reusable `requestChoices({ id, title, options, recommended })` export, the twin of `requestMultiSelect` (#332): it emits the `choice` event, parks for the pick, and falls back to the recommended option if the run is headless or aborts. The plan-approval gate builds on it, and it is the primitive the system prompt's `showChoices()` and the research preset need. No behavior change for existing runs. + +- c72d155: Give the dashboard clear feedback when a run is started. A run is spawned detached, so there was a gap between clicking Start and the first event (and a failed launch produced nothing, so the page looked frozen). Now clicking Start shows an immediate "Starting your run..." banner; if no output arrives within ~8s it warns that the run may have failed to start; a run-launch/exit failure surfaces as an error banner; and a rejected Start (a run is already active) shows a clear "busy" banner instead of a tiny note. +- 5c83bc2: The built-in system prompt is now Rom's #326 text, verbatim, replacing the anti-lazy-pill it grew out of: unclear scope becomes a ranked `showChoices()` list, a large scope a `PLAN_.agent.md` to approve, a very large one also a `TODO_.agent.md` backlog, an alternatives pass rates problem "variability" before code is written, and edits to existing code stay minimal. The prompt is a template (#350): `${{ ... }}` JS fragments render against the run context, so `tf.params.autopilot` relaxes the maintenance stance on autopilot runs and `${{tf.prompt}}` carries the user prompt slot. New exports: `SYSTEM_PROMPT_TEMPLATE`, `renderSystemPrompt`, `renderTemplate`; the `ANTI_LAZY_PILL` export is gone (the `antiLazyPill` config key still toggles the built-in prompt). `--autopilot` now has an effect without a preset. +- 9345476: Record every finished run in the project log `.the-framework/LOGS.md` (#379). When a run ends, the CLI appends an entry with the intent/prompt title, the kind (build or prompt), the final status (done/stopped/failed), and the Claude Code session id and link. Best-effort, so a log write can never break a run. This is what makes the project DB (#378) fill itself; the run-history sidebar in #314 reads from it. +- 59e3707: New `.the-framework/LOGS.md` project-log module (#378): `appendLog`/`readLogs` keep a human-readable markdown log of every loop, prompt, and build in a project, with `renderLogEntry`/`parseLogs` as the pure core over the same StoreFs seam as the run store. Parsing is forgiving: a malformed entry is skipped, never thrown. Standalone for now; the run-lifecycle wiring and dashboard UI land in follow-up issues. +- 6b561fc: Add project repo helpers (#380): `isActivated()` checks the `.the-framework/` activation marker via an injectable `ProjectFs`, and `crawlRepoFiles()` lists every tracked + untracked (gitignore-honoring) file via `git ls-files -z` behind an injectable `GitRunner`. Both forgiving: any failure reads as not-activated / an empty list. Building blocks for the #314 sidebars. +- d1202dc: The backlog loop (#323): after the build settles, the run consumes the agent's own TODO backlog (`TODO_.agent.md`, or the flat `TODO.md`) one entry per turn until it is empty. When a dashboard can answer, the loop gates before each entry ("start the next item?"), so autopilot consumes the backlog unattended and autopilot-off pauses per item. Caps make it safe overnight: the budget/Stop signal ends any turn, `--max-todo-items` bounds the run (default 25), and two no-progress items stop the loop. `--no-todo-loop` opts out. +- e4b518a: feat(framework): turn an agent's showChoices()+AWAIT into a live gate at the turn boundary (#337) + + The system prompt tells the agent to `showChoices()` and `AWAIT` at unclear-scope / alternatives points, but until now only framework-emitted gates (the plan-approval gate, multi-select) could pause a run. Now when a build turn ends by asking the user, an `await-choices` block, the framework shows the choice on the dashboard, waits for the pick, and re-prompts the agent to continue from that decision. It is the agent-authored counterpart to the plan-approval gate: a no-op when headless and when the agent just finishes instead of asking, so existing runs are unchanged. + +- bc3586b: Keep everything in a single `.the-framework/` directory (#313). The transient run state (`events.jsonl`, `run.json`, `runs/`, `control.jsonl`, `daemon.json`) now lives in `.the-framework/` alongside the committed project log `LOGS.md`, instead of a separate `.framework/` directory. `install` seeds a `.the-framework/.gitignore` that ignores everything except `LOGS.md`, so the run state stays transient and only the log is committed. +- 7db5a9c: feat(framework): track agent spend and add a budget cap (#322) + + The framework now accumulates the token + cost usage the wrapped agent reports each turn, streams a running total as a `usage` event, and shows a live spend readout on the dashboard header. Pass `--max-cost ` to stop a run once it has spent that much: the current turn finishes, then the run stops cleanly (not a failure). Useful for long autopilot runs where you only review the result at the end. + +### Patch Changes + +- 40491ba: Architect turns now honor agent-authored await gates (#356): an architect (or re-architect) turn that stops to ask via `showChoices()` / `showMultiSelect()` resolves through the live dashboard gate and re-prompts with the answer, instead of the question being silently swallowed into a stub fallback plan at the plan-approval gate. Headless runs are unchanged. Bounded at 5 rounds, like the build gate. +- 6721c0f: Untangle the two "autopilot" concepts in the dashboard (#325): the countdown text now reads "Auto accept in 10s" (and "Auto accept canceled" / "Auto accept off"), so "autopilot" is left to mean the mode preset. The checkbox that arms the countdown is labeled "Autopilot", per Rom's call on the issue. +- 7a94b48: Fix `framework --version` (and the bare-`framework` footer) reporting `0.0.0` instead of the real package version (#312). The version is now read from the package's own `package.json` at runtime, so it always matches what is installed. +- 900efbb: Center the dashboard's main grid in the content column. `main` had a `max-width: 1100px` cap but no horizontal centering, so on a wide window the panels hugged the left edge next to the runs sidebar. Add `margin: 0 auto` so the capped grid sits centered. +- 48aba07: Make the dashboard layout fill the viewport height. `#layout` only grew to its content height, so on a short page the runs-sidebar right border stopped partway down instead of reaching the bottom. Give `#layout` a `min-height: calc(100vh - 57px)` (matching the sidebar's existing header-height key) so the stretched sidebar runs full-height. +- 8cbff44: fix(framework): narrate the auto-preset routing turn so the dashboard is not blank at the start of a run (#310) + + A preset-less live run first does a real Claude routing turn to auto-select a domain preset. The dashboard was started only after that turn, so its first few seconds looked dead. The dashboard now starts before the routing turn and the turn narrates a log line into it. + +- ed25ab8: Keep the dashboard header and sidebar in view while scrolling. The header is now sticky at the top (with a background and z-index so content scrolls under it), and the app-running banner and the runs sidebar stick just below it. On a long page you no longer lose the title, stop button, and run list when you scroll down. +- 131f349: fix(framework): surface session-scoped PLAN/TODO docs in the dashboard sidebar (#323) + + The document sidebar now also surfaces the session-scoped `PLAN_.agent.md` / `TODO_.agent.md` files The Framework writes per run (#323/#326), not just flat `PLAN.md` / `TODO.md`. Flat files stay supported as a fallback for hand-written docs. Names are matched against the workspace root with a fixed slug pattern, so there is still no path traversal. + +- c05a186: Harden the dashboard against cross-site abuse and event-borne XSS. The state-changing dashboard routes (`/stop`, `/choice`, `/api/start`) now reject any request whose `Origin` is a foreign site, so a page on another origin can no longer drive the localhost dashboard into spawning or steering a run (a non-browser caller that sends no `Origin` is unaffected). The client render pipeline no longer trusts event strings: link URLs (session link, preview URL, run-history link) are scheme-checked so a `javascript:` URL collapses to `#`, and the HTML escaper now escapes quotes so a relay-published event can't break out of an attribute (e.g. a choice option id like `x" autofocus onfocus=...`). +- 07f1756: fix(framework): re-fire the plan-approval gate after picking an alternative (#324) + + Picking an alternative at the plan-approval gate re-architects the plan, and that fresh plan can differ a lot from the one you rejected. The gate now re-fires on the re-architected plan so you approve the plan you will actually build, not just the first one. Bounded to a few re-architect rounds so a run of alternative-picks can't loop forever. + +- 1e1b4dc: Store the multi-project registry as a single file, `.bashrc`-style: `$HOME/.the-framework.json` (or `$XDG_CONFIG_HOME/the-framework.json`) instead of a `projects.json` nested inside a `.the-framework/` directory (#390). +- 734da1a: fix(framework): harden the run relay and workspace sandbox against resource exhaustion + + - The relay now caps how many runs it holds in memory and evicts the least-recently-used one on overflow. Because it is unauthenticated, an anonymous request to `/r//…` could previously create per-run state that was never freed; run creation is now bounded (`maxRuns`, default 200). + - A disconnected SSE viewer now cancels its stream iterator, releasing its waiter immediately instead of lingering on the stream until the next event (which may never arrive for an idle run). + - `snapshotWorkspace` checks a file's size before reading it, so a large asset in the workspace is skipped without ever being loaded into memory during a `--sandbox docker` sync. + - `relayPublisher`'s POST has a timeout, so a relay that accepts a connection but never responds can no longer hang the CLI on exit (`flush()`). + +- Updated dependencies [734da1a] + - @gemstack/ai-autopilot@0.9.1 + ## 0.8.0 ### Minor Changes diff --git a/packages/framework/package.json b/packages/framework/package.json index 788680f..fd7bf7d 100644 --- a/packages/framework/package.json +++ b/packages/framework/package.json @@ -1,6 +1,6 @@ { "name": "@gemstack/framework", - "version": "0.8.0", + "version": "0.9.0", "description": "The (AI) Framework: turnkey, zero-config AI orchestration that wraps a coding-agent CLI (Claude Code) as a black box and takes you from an idea to a running app. Vite for AI.", "keywords": [ "ai",