gentle-pi 4.5.1 → 4.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -6
- package/assets/agents/gentle-ai-verify.md +4 -0
- package/assets/agents/gentle-ai-worker.md +1 -0
- package/assets/migrations/agent-body-history.json +147 -0
- package/assets/orchestrator-delegation-reference.md +3 -3
- package/assets/orchestrator-delegation.md +2 -2
- package/assets/orchestrator-verification.md +10 -6
- package/assets/orchestrator.md +8 -8
- package/bin/gentle-shell.mjs +61 -26
- package/docs/ci-performance.md +11 -0
- package/docs/delegated-verification.md +6 -0
- package/docs/fast-mode.md +15 -0
- package/docs/gentle-agents-activity.md +8 -0
- package/docs/gentle-shell.md +69 -19
- package/docs/install-wizard.md +1 -1
- package/docs/mcp-status.md +52 -0
- package/docs/prompt-budget.md +28 -0
- package/docs/readme-reference.md +79 -20
- package/docs/session-profile-format.md +20 -5
- package/docs/sound-notifications.md +1 -1
- package/docs/star-prompt.md +32 -0
- package/docs/work-continuity.md +46 -0
- package/extensions/ask-user-question.ts +1 -0
- package/extensions/codegraph-tools.ts +38 -4
- package/extensions/gentle-agents.ts +477 -50
- package/extensions/gentle-ai.ts +1041 -188
- package/extensions/gentle-fast.ts +61 -0
- package/extensions/gentle-guide.ts +174 -0
- package/extensions/gentle-herdr-activity.ts +21 -1
- package/extensions/gentle-herdr-agent.ts +144 -0
- package/extensions/gentle-program-identity.ts +61 -0
- package/extensions/gentle-shell.ts +642 -97
- package/extensions/gentle-star-prompt.ts +334 -0
- package/extensions/gentle-stats.ts +5 -5
- package/extensions/gentle-todo.ts +42 -22
- package/extensions/history/store.ts +18 -12
- package/extensions/skill-registry.ts +35 -3
- package/extensions/startup-banner.ts +39 -7
- package/lib/agent-assets.ts +74 -17
- package/lib/agent-profiles.ts +1 -1
- package/lib/agents-config.ts +12 -3
- package/lib/agents-keys.ts +8 -16
- package/lib/agents-protocol.ts +80 -4
- package/lib/agents-runner.ts +105 -4
- package/lib/agents-view.ts +6 -1
- package/lib/agents-widget.ts +132 -9
- package/lib/bridge-cost.ts +28 -0
- package/lib/codemode-renderer.ts +16 -0
- package/lib/command-palette-catalog.ts +1 -0
- package/lib/command-palette.ts +21 -8
- package/lib/exploration-budget.ts +62 -0
- package/lib/gentle-guide.ts +201 -0
- package/lib/gentle-shell-launcher.ts +4 -0
- package/lib/herdr-activity.ts +9 -3
- package/lib/herdr-task-summary-policy.ts +85 -0
- package/lib/inprocess-reviewer.ts +33 -13
- package/lib/jobs-sidebar-state.ts +5 -6
- package/lib/jobs-widget.ts +16 -52
- package/lib/keymaps-customize.ts +81 -0
- package/lib/keymaps.ts +291 -0
- package/lib/model-fallback-notice.ts +61 -0
- package/lib/model-fallback-policy.ts +141 -0
- package/lib/model-fallback-store.ts +143 -0
- package/lib/model-routing-authority.ts +10 -2
- package/lib/nan-provider.ts +3 -2
- package/lib/native-review-cli.ts +7 -2
- package/lib/notification-customize.ts +48 -51
- package/lib/openai-fast-tier.ts +22 -0
- package/lib/orchestrator-discovery.ts +5 -1
- package/lib/orchestrator-fallback.ts +75 -0
- package/lib/pasted-image-paths.ts +113 -0
- package/lib/questionnaire/questionnaire-view.ts +121 -7
- package/lib/review-candidate-view-owner.ts +4 -0
- package/lib/review-candidate-view.ts +10 -7
- package/lib/review-host-relay.ts +5 -1
- package/lib/review-integration-v2.ts +22 -7
- package/lib/review-repository.ts +5 -0
- package/lib/session-profile-append-controller.ts +21 -6
- package/lib/session-profile-authority.ts +119 -0
- package/lib/session-profile-binding.ts +54 -5
- package/lib/session-profile-freeze.ts +105 -9
- package/lib/session-profile-integration.ts +313 -0
- package/lib/session-profile-persistence.ts +63 -9
- package/lib/shell-bar.ts +171 -56
- package/lib/shell-card.ts +26 -6
- package/lib/shell-page.ts +120 -0
- package/lib/shell-panel.ts +149 -0
- package/lib/shell-prompt.ts +53 -1
- package/lib/shell-sidebar-layout.ts +98 -25
- package/lib/shell-sidebar.ts +54 -1
- package/lib/shell-stats.ts +123 -0
- package/lib/shell-todo.ts +71 -0
- package/lib/shell-usage.ts +12 -2
- package/lib/star-prompt.ts +197 -0
- package/lib/verifier-admission.ts +18 -8
- package/lib/verifier-settle-reminder.ts +64 -0
- package/lib/vim-editor-adapter.ts +6 -1
- package/lib/visual-customization-policy.ts +41 -6
- package/lib/visual-customize-view.ts +164 -26
- package/lib/visual-layout-preview.ts +43 -0
- package/lib/yolo-session-policy.ts +28 -1
- package/package.json +1 -1
- package/runtime/gentle-shell-launcher.mjs +4 -0
- package/runtime/native-review-cli.mjs +7 -2
- package/runtime/review-integration-v2.mjs +22 -7
- package/runtime/windows-session-transport.ps1 +60 -3
- package/scripts/bootstrap.sh +4 -1
- package/scripts/installer-preflight.mjs +1 -1
- package/scripts/pi-update.mjs +113 -3
- package/scripts/run-test-suite.mjs +17 -1
- package/scripts/shell-snapshot.mjs +340 -0
- package/scripts/test-packed-runner.mjs +1 -1
- package/scripts/update-agent-body-history.mjs +41 -0
- package/scripts/verify-installer-tap.mjs +45 -0
- package/scripts/verify-package-files.mjs +2 -0
- package/skills/gentle-ai/SKILL.md +2 -2
- package/skills/tui-design/NOTICE.md +5 -0
- package/skills/tui-design/SKILL.md +56 -0
- package/skills/tui-design/references/commands.md +75 -0
- package/skills/tui-design/references/critique.md +48 -0
- package/skills/tui-design/references/design-doc.md +44 -0
- package/skills/tui-design/references/terminal-craft.md +64 -0
- package/skills/tui-design/references/visual-loop.md +32 -0
- package/tests/agents-protocol.test.ts +53 -1
- package/tests/agents-runner.test.ts +168 -3
- package/tests/agents-view.test.ts +27 -0
- package/tests/agents-widget.test.ts +312 -10
- package/tests/bounded-scan-contract.test.ts +39 -0
- package/tests/bridge-cost.test.ts +32 -0
- package/tests/bundled-install.test.ts +6 -4
- package/tests/ci-concurrency.test.ts +11 -0
- package/tests/ci-merge-base-identity.test.ts +114 -0
- package/tests/codegraph-tools.test.ts +69 -0
- package/tests/codemode-rendering.test.ts +22 -2
- package/tests/command-palette.test.ts +16 -2
- package/tests/commit-slice-signal.test.ts +11 -9
- package/tests/delegate-for-reason-contract.test.ts +5 -4
- package/tests/exploration-budget.test.ts +128 -0
- package/tests/fixtures/agent-assets/gentle-ai-worker.strict-tdd-era.md +122 -0
- package/tests/fixtures/measure-orchestrator-prompt.mjs +2 -1
- package/tests/fixtures/primary-session-prompt/gentleman.golden.md +18 -10
- package/tests/fixtures/session-profile-v1/replay.ts +125 -0
- package/tests/fixtures/session-profile-v1/session-profile-authority.ts +113 -0
- package/tests/fixtures/session-profile-v1/session-profile-binding.ts +83 -0
- package/tests/fixtures/session-profile-v1/session-profile-disk-reader.ts +182 -0
- package/tests/fixtures/session-profile-v1/session-profile-freeze.ts +290 -0
- package/tests/fixtures/session-profile-v1/session-profile-persistence.ts +195 -0
- package/tests/fixtures/session-profile-v1/v1-inputs.ts +16 -0
- package/tests/fixtures/windows-pipe-availability.ps1 +26 -0
- package/tests/fixtures/windows-session-bootstrap.ps1 +6 -2
- package/tests/gentle-agents.test.ts +416 -21
- package/tests/gentle-ai-exploration-budget.test.ts +135 -0
- package/tests/gentle-ai.test.ts +1007 -33
- package/tests/gentle-fast.test.ts +73 -0
- package/tests/gentle-guide.test.ts +208 -0
- package/tests/gentle-herdr-activity.test.ts +76 -2
- package/tests/gentle-herdr-agent.test.ts +111 -0
- package/tests/gentle-program-identity.test.ts +197 -0
- package/tests/gentle-shell-bin.test.ts +49 -26
- package/tests/gentle-shell-launcher.test.ts +18 -2
- package/tests/gentle-shell.test.ts +1068 -37
- package/tests/gentle-stats.test.ts +15 -2
- package/tests/gentle-todo.test.ts +50 -4
- package/tests/herdr-task-summary-policy.test.ts +128 -0
- package/tests/history-store-private-mode.test.ts +40 -0
- package/tests/image-paste-chips.test.ts +42 -0
- package/tests/inprocess-reviewer.test.ts +122 -0
- package/tests/installer-posix-bootstrap.test.ts +67 -5
- package/tests/installer-server.test.ts +2 -2
- package/tests/installer-windows-diagnostics.test.ts +4 -5
- package/tests/isolated-config-home.ts +28 -0
- package/tests/jobs-widget.test.ts +25 -37
- package/tests/keymaps-customize.test.ts +114 -0
- package/tests/keymaps.test.ts +103 -0
- package/tests/maintainer/mcp-status.maintest.ts +88 -0
- package/tests/maintainer/pi-update-source.maintest.ts +116 -0
- package/tests/model-fallback-notice.test.ts +45 -0
- package/tests/model-fallback-policy.test.ts +83 -0
- package/tests/model-fallback-store.test.ts +111 -0
- package/tests/nan-provider.test.ts +4 -4
- package/tests/no-self-pause-contract.test.ts +19 -0
- package/tests/notification-customize.test.ts +58 -34
- package/tests/odd-routing-canonical-ratchet.test.ts +3 -3
- package/tests/odd-routing-contract.test.ts +1 -1
- package/tests/orchestrator-fallback.test.ts +82 -0
- package/tests/orchestrator-prompt-budget.test.ts +131 -0
- package/tests/package-manifest.test.ts +160 -7
- package/tests/pasted-image-paths.test.ts +118 -0
- package/tests/persona-reply-language.test.ts +20 -1
- package/tests/pi-update-launcher.test.ts +32 -8
- package/tests/pi-update-source.test.ts +162 -0
- package/tests/profile-fast-tier.test.ts +311 -0
- package/tests/profile-tier-footer.test.ts +79 -0
- package/tests/questionnaire-view.test.ts +150 -0
- package/tests/review-candidate-owner-sweep.test.ts +93 -0
- package/tests/review-candidate-view.test.ts +51 -0
- package/tests/review-controller-native-routing.test.ts +120 -6
- package/tests/review-gate.test.ts +24 -0
- package/tests/review-inspect-preflight.test.ts +197 -0
- package/tests/review-integration-v2-forward.test.ts +59 -0
- package/tests/review-repository.test.ts +52 -1
- package/tests/review-sidebar-state.test.ts +5 -5
- package/tests/run-test-suite.test.ts +61 -5
- package/tests/sensitive-path-tools.test.ts +74 -0
- package/tests/session-profile-append-controller.test.ts +63 -0
- package/tests/session-profile-authority.test.ts +259 -0
- package/tests/session-profile-binding.test.ts +15 -0
- package/tests/session-profile-extension.test.ts +615 -0
- package/tests/session-profile-freeze.test.ts +110 -2
- package/tests/session-profile-integration.test.ts +857 -0
- package/tests/session-profile-persistence.test.ts +57 -0
- package/tests/session-profile-v1-compat.test.ts +221 -0
- package/tests/shell-bar.test.ts +113 -55
- package/tests/shell-card.test.ts +13 -1
- package/tests/shell-page.test.ts +108 -0
- package/tests/shell-panel.test.ts +332 -0
- package/tests/shell-prompt.test.ts +54 -0
- package/tests/shell-render-cache.test.ts +5 -0
- package/tests/shell-sidebar-fullscreen.test.ts +12 -0
- package/tests/shell-sidebar-layout.test.ts +159 -27
- package/tests/shell-stats.test.ts +90 -0
- package/tests/shell-usage.test.ts +14 -0
- package/tests/skill-registry.test.ts +68 -1
- package/tests/star-prompt.test.ts +470 -0
- package/tests/startup-banner.test.ts +57 -1
- package/tests/task-size-routing-contract.test.ts +45 -1
- package/tests/verifier-settle-reminder.test.ts +281 -0
- package/tests/verify-first-launch-contract.test.ts +56 -5
- package/tests/verify-installer-tap.test.ts +57 -0
- package/tests/vim-editor-adapter.test.ts +2 -2
- package/tests/visual-customization-policy.test.ts +61 -7
- package/tests/visual-customize-view.test.ts +253 -8
- package/tests/visual-layout-preview.test.ts +28 -0
- package/tests/windows-session-bootstrap.test.ts +105 -2
- package/tests/work-continuity-contract.test.ts +86 -0
- package/tests/writer-surfaces.test.ts +12 -10
- package/tests/yolo-customize.test.ts +30 -11
- package/tests/yolo-mode-runtime.test.ts +4 -2
- package/tests/yolo-mode.test.ts +16 -2
package/docs/readme-reference.md
CHANGED
|
@@ -16,7 +16,7 @@ The primary-session prompt renders steps 1-7, the phase-reporting line, and the
|
|
|
16
16
|
1. **Authorize** — read-only unless implementation is authorized; ask one clarification when intent is ambiguous.
|
|
17
17
|
2. **Explore** — read existing code and requirements first, proportionately to the request.
|
|
18
18
|
3. **Resolve uncertainty** — optional research or one focused product question only for a real unresolved decision.
|
|
19
|
-
4. **Classify** — by the Task Size section: small when understood, risk is contained, and the work could be resumed from the request plus `git diff`; large only when that resume test fails. Counts never classify.
|
|
19
|
+
4. **Classify** — use only small or large by the Task Size section: small when understood, risk is contained, and the work could be resumed from the request plus `git diff`; large only when that resume test fails. Counts never classify. Reassess cumulative discovery after each batch: a fired evidence-budget trigger takes precedence over initial size, including for read-only requests. Preparation for an already understood inline write stays inline; further discovery does not use that exception.
|
|
20
20
|
5. **Track before the first write** — create the feature document and Engram mirror automatically for large work, and tell the user in one line.
|
|
21
21
|
6. **Implement task by task** — route each task through the smallest safe workflow, with configured TDD and applicable checks. Commit work units in reviewable slices of about 400 authored changed lines on the feature branch (branch first when on the default branch), with tests and docs alongside the behavior and a Conventional Commit message; a unit whose Risk line names a high-risk item gets its own commit so native review can take it alone, and the last slice closes the feature; the feature document records the commit that holds each task as evidence.
|
|
22
22
|
7. **Close** — report the verified outcome, failed/pending checks, and the next step. The native review candidate is a work-unit commit or a PR slice, never a TODO checkbox and never the accumulated feature branch.
|
|
@@ -126,8 +126,9 @@ other layouts may need manual adjustment. No CLI/socket query measures width.
|
|
|
126
126
|
Source `gentle:activity` owns only `summary`/`summary2`, not lifecycle. Updates are
|
|
127
127
|
latest-only, serialized and best-effort offline, with a 30-second TTL refreshed every
|
|
128
128
|
10 seconds while active. Each report clears an unused second row; idle, session
|
|
129
|
-
changes and shutdown clear both. TTL expiry covers abrupt exits. The
|
|
130
|
-
|
|
129
|
+
changes and shutdown clear both. TTL expiry covers abrupt exits. The pane's lifecycle
|
|
130
|
+
reporter (Gentle Shell's own, or Herdr's managed bridge; see [Herdr lifecycle bridge](#herdr-lifecycle-bridge))
|
|
131
|
+
remains lifecycle authority, and summaries carry its agent label (`gentle-shell` or `pi`). Reports invoke `HERDR_BIN_PATH` when supplied,
|
|
131
132
|
otherwise `herdr` from `PATH`, without a shell.
|
|
132
133
|
|
|
133
134
|
## Navigation
|
|
@@ -158,7 +159,7 @@ otherwise `herdr` from `PATH`, without a shell.
|
|
|
158
159
|
| **Delivery skills** | Includes issue-first PRs, chained PRs, work-unit commits, cognitive docs, comment writing, and Judgment Day review. |
|
|
159
160
|
| **Bounded native review** | Freezes one candidate, dispatches only controller-selected lenses, and records native authority. Review outcomes are informational; delivery follows ordinary repository policy. |
|
|
160
161
|
| **Verified native runtime** | The current source checkout provisions the exact package-local Gentle AI v4.3.1 runtime: signed, SHA-256-pinned release archives on Darwin/Linux and a Go SumDB-verified source build on Windows x64/arm64. It validates package-local integrity and rejects PATH, global, sibling, symlink, and mode fallbacks. |
|
|
161
|
-
| **Runtime safety** | Blocks destructive shell commands, asks for confirmation for sensitive operations, and blocks direct read/write/edit access to sensitive paths. Blocks writing a test file that reads git history at a literal commit or points `TMPDIR` inside the working directory (including a relative path such as `.tmp`, `./.tmp`, or `tmp/x`), in the primary session and in subagents. Refuses native review tools (`gentle_review*`) called from inside another tool, such as a codemode script: they run only as direct tool calls. |
|
|
162
|
+
| **Runtime safety** | Blocks destructive shell commands, asks for confirmation for sensitive operations, and blocks direct read/write/edit/grep/find/ls access to sensitive paths (the guard checks the tool's `path` input, so a search scoped to a directory still reads whatever that directory contains, and bash is not covered). Blocks writing a test file that reads git history at a literal commit or points `TMPDIR` inside the working directory (including a relative path such as `.tmp`, `./.tmp`, or `tmp/x`), in the primary session and in subagents. Refuses native review tools (`gentle_review*`) called from inside another tool, such as a codemode script: they run only as direct tool calls. |
|
|
162
163
|
|
|
163
164
|
## Audio notifications
|
|
164
165
|
|
|
@@ -222,7 +223,7 @@ This checkout declares `gentle-pi` `4.0.0` with a package-local Gentle AI `v4.3.
|
|
|
222
223
|
|
|
223
224
|
### Pi compatibility
|
|
224
225
|
|
|
225
|
-
The current package requires Pi 1.2.0 or newer and Node >=22.19.0. Development tests resolve Pi through the open `>=1.0.0` development range. The private Vim editor adapter admits only the audited Pi `0.99.1`, `0.99.2`, `1.0.0`, `1.1.0`, `1.2.0`, `1.3.0`, and `1.
|
|
226
|
+
The current package requires Pi 1.2.0 or newer and Node >=22.19.0. Development tests resolve Pi through the open `>=1.0.0` development range. The private Vim editor adapter admits only the audited Pi `0.99.1`, `0.99.2`, `1.0.0`, `1.1.0`, `1.2.0`, `1.3.0`, `1.4.0`, and `1.5.0` releases; any other release keeps ordinary prompt editing until its editor is audited. Use the latest Pi release; gentle-pi does not update your installed Pi automatically. Children, including any `GENTLE_PI_AGENTS_PI` override, must emit `agent_settled`: `agent_end` records a run's output but is not completion because retries or queued continuations may follow.
|
|
226
227
|
|
|
227
228
|
The [`v2.6.0` release](https://github.com/Gentleman-Programming/gentle-shell/releases/tag/v2.6.0) added persistent registered worktrees and grouped `/gentle:changes` views; fuller workspace interaction details are in the [Gentle Shell reference](gentle-shell.md). It also adds named atomic `/gentle:profiles`, native review intended-untracked selection and provider continuations, and opt-in custom ask responses. Pi recognizes its global Git-managed package path; subsystems install with explicit recovery guidance when npm lifecycle work was skipped. Windows keeps child consoles hidden and fixes ownership mode; Gentle Todo keeps the next pending task visible when collapsed.
|
|
228
229
|
|
|
@@ -379,9 +380,9 @@ Tradeoff: `--link` shares one credential store with pi; `import-pi` duplicates i
|
|
|
379
380
|
|
|
380
381
|
`gentle-shell list` and extension updates follow that same home selection. `gentle-shell update --extensions-only` preserves Pi's extension-only command; `--extensions`, package targets, and model updates also stay with Pi.
|
|
381
382
|
|
|
382
|
-
`gentle-shell update` updates the selected Pi through its verified npm or pnpm global owner, avoiding Pi's self-update refusal for pnpm v11 linked stores. Ownership requires successful global listing JSON, an exact canonical listed package-root/CLI match, and binding to the selected runtime. An adjacent peer (the launcher's `bundled` runtime) is supplied by the exact listed `gentle-pi` package: that Shell package is reinstalled at its current version so the manager re-resolves the peer (a main-channel `<version>-main.<sha12>` Shell, which is never published, from the tarball `gentle-shell upgrade --channel main` packed under `<config home>/main/packages/` (an absolute `GENTLE_PI_CONFIG_HOME`, else `~/.pi/gentle-ai`; a relative override is refused), refusing without installation when it is missing and naming `gentle-shell upgrade --channel release` then `--channel main` as the rebuild path), and a separate global Pi is never the target, because updating it leaves the peer a Shell install runs unchanged. A `PATH` or `GENTLE_SHELL_PI` runtime is supplied only by its own listed global Pi package; when that executable is a package-manager shim (pnpm's POSIX shim, a `.cmd`), Shell follows the single `dist/bundle/cli.js` it names, relative to the shim's directory, and refuses shims naming none or several. Pi and Shell are never installed together in a comma group, and unrelated packages are never reinstalled. Merely residing under `PNPM_HOME` proves nothing. Adjacent peers resolve where the package manager places them: nested under the Shell package (npm), beside it in pnpm's linked store, or in the global group's own `node_modules`.
|
|
383
|
+
`gentle-shell update` updates the selected Pi through its verified npm or pnpm global owner, avoiding Pi's self-update refusal for pnpm v11 linked stores. Ownership requires successful global listing JSON, an exact canonical listed package-root/CLI match, and binding to the selected runtime. An adjacent peer (the launcher's `bundled` runtime) is supplied by the exact listed `gentle-pi` package: that Shell package is reinstalled at its current version so the manager re-resolves the peer (a main-channel `<version>-main.<sha12>` Shell, which is never published, from the tarball `gentle-shell upgrade --channel main` packed under `<config home>/main/packages/` (an absolute `GENTLE_PI_CONFIG_HOME`, else `~/.pi/gentle-ai`; a relative override is refused), refusing without installation when it is missing and naming `gentle-shell upgrade --channel release` then `--channel main` as the rebuild path), and a separate global Pi is never the target, because updating it leaves the peer a Shell install runs unchanged. A `PATH` or `GENTLE_SHELL_PI` runtime is supplied only by its own listed global Pi package; when that executable is a package-manager shim (pnpm's POSIX shim, a `.cmd`), Shell follows the single `dist/bundle/cli.js` it names, relative to the shim's directory, and refuses shims naming none or several. Pi and Shell are never installed together in a comma group, and unrelated packages are never reinstalled. Merely residing under `PNPM_HOME` proves nothing. Adjacent peers resolve where the package manager places them: nested under the Shell package (npm), beside it in pnpm's linked store, or in the global group's own `node_modules`. Linked Pi entries remain rejected. A source-linked Shell instead updates its exact checkout's local Pi, without replacing its global link: single-project Git roots only, an npm/pnpm `packageManager` declaration (pnpm at least that version; npm exact) and matching available version, a direct registry Pi range, and one matching lockfile are required. Multi-project/ancestor workspaces and conflicting lockfiles refuse before installation. Root-only pnpm configuration is retained after read-only manager queries prove a sole root project; updates do not ignore or rewrite its security policy. The named update disables lifecycle scripts and range changes, but may update Pi's transitive lockfile graph. pnpm updates additionally require that the actual old global group contains only the target top-level package: aggregated listings may contain other, separate groups, but shared groups are rejected because pnpm can remove the whole old group. Unknown, malformed, failed, or ambiguous ownership refuses before installation; update unsupported layouts with their supplying package manager.
|
|
383
384
|
|
|
384
|
-
After a successful install, Shell reads the supplied Pi version back from a fresh global listing and reports it, naming the previous version when it changed. An unchanged pnpm result also names pnpm's `minimumReleaseAge` setting: pnpm installs only releases older than that age (pnpm 11 defaults to 4320 minutes), so a very recent Pi release is picked up once it is old enough; Shell reports the rule rather than overriding it.
|
|
385
|
+
After a successful install, Shell reads the supplied Pi version back from a fresh global listing and reports it, naming the previous version when it changed. An unchanged pnpm result also names pnpm's `minimumReleaseAge` setting: pnpm installs only releases older than that age (pnpm 11 defaults to 4320 minutes), so a very recent Pi release is picked up once it is old enough; Shell reports the rule rather than overriding it. Global listings, manager version probes and global installations run from the system temporary directory, so a project's `packageManager` pin in the current directory never changes which pnpm answers. A verified source update alone runs from the checkout and rechecks the Shell link, unchanged manifest and adjacent Pi there instead of reading a separate global Pi. When the version cannot be read back, the output says so and points at `gentle-shell --version`.
|
|
385
386
|
|
|
386
387
|
Prefix-bundled installations keep their existing `gentle-shell upgrade` route for Pi, or `gentle-shell update --latest` for the newest published Pi without the release's verified lockfile (see [`upgrade`](#upgrade-subcommand-and-channels)). Outside a bundled install `--latest` changes nothing: `update` already installs the latest Pi. `update --all` updates the verified owner before forwarding extension updates; an ownership refusal stops without mutation. Shell's `upgrade` and `self-uninstall` ownership behavior is unchanged.
|
|
387
388
|
|
|
@@ -407,6 +408,8 @@ Requires the package-local gentle-ai pin at v3.6.0 or newer — the pin that add
|
|
|
407
408
|
|
|
408
409
|
**Configuring MCP servers**: `gentle-shell mcp <command>` runs Pi's own `mcp` command against the resolved home, so a standalone install configures MCP without a separate `pi` command. For example, `gentle-shell mcp add <name> -- <command> [args...]` adds a stdio server, `gentle-shell mcp add <name> --url <url>` adds a remote one, and `gentle-shell mcp list` shows what the home's `mcp.json` defines. Restart Gentle Shell to load new servers.
|
|
409
410
|
|
|
411
|
+
**MCP connection status for extensions**: [Observe native MCP status](mcp-status.md) documents the sanitized snapshot/event API, feature detection on older Pi builds, and the isolated maintainer integration check. Configured counts and registered tools are not connectivity evidence.
|
|
412
|
+
|
|
410
413
|
**MCP migration**: Pi >= 0.99.0 provides built-in MCP; gentle-ai retires `pi-mcp-adapter` instead of installing it. After successful setup and package cleanup, Gentle Shell warns on stderr if `settings.json` still contains `"-builtin:mcp"`, `mcp.json` defines servers, and no active adapter remains. The warning names both files and the entry to remove. Setup never removes that entry or edits `mcp.json`: disabling MCP may be intentional. To enable those servers, remove only `"-builtin:mcp"` from `extensions` in the named `settings.json`, preserve other entries, and restart Pi. A declaration with `autoload: false` and no enabling extension patterns, an empty `extensions` list, or an ordinary `extensions: ["!**"]` filter without force-includes is inactive. Other nonempty filters require matching actual package resources, so setup reports uncertain adapter activity instead of silently treating the adapter as active. This read-only check also runs after automatic provisioning, but not during `--dry-run`. Errors encountered by the diagnostic produce an inspection warning without changing a successful setup's exit code; existing install and cleanup failures still propagate normally.
|
|
411
414
|
|
|
412
415
|
**Known limitation**: the pinned gentle-ai writes its persona file to the shared `~/.pi/gentle-ai/persona.json` without honoring `PI_CODING_AGENT_DIR` (for the isolated home it may also write `~/.gentle-shell/gentle-ai/persona.json`; both are restored), so the persona is shared across every home `gentle-shell setup` provisions, not per-home. `setup` keeps that file byte-identical across the run regardless — snapshotting it before spawning gentle-ai and restoring it afterward, in manual, `--dry-run`, and automatic first-run modes alike — because the pinned gentle-ai still writes the Pi persona outside `PI_CODING_AGENT_DIR`. gentle-ai also records the running binary's managed-asset digest in the shared `~/.gentle-ai/state.json` (`managed_asset_digest`), again regardless of `PI_CODING_AGENT_DIR`, so a `setup` run otherwise leaves the user's own (unrelated, on-`PATH`) gentle-ai reporting its managed assets as outdated and demanding `gentle-ai sync`. `setup` restores just that one field afterward, the same way and in the same modes — but never the whole file, since `state.json` also carries fields (like the installed-agents list) the pinned gentle-ai is meant to update, and it never creates or deletes `state.json` itself.
|
|
@@ -619,9 +622,13 @@ Setting `GENTLE_SHELL_INTERACTIVE_HOST=1` on a `pi --mode rpc` process turns on
|
|
|
619
622
|
|
|
620
623
|
### Herdr lifecycle bridge
|
|
621
624
|
|
|
622
|
-
For an interactive isolated-home launch inside Herdr, `gentle-shell
|
|
625
|
+
For an interactive isolated-home launch inside Herdr, Gentle Shell reports its own agent identity: Herdr lists the pane as `gentle-shell`, while plain Pi sessions keep Herdr's managed Pi integration and still show as `pi`. Herdr's managed `extensions/herdr-agent-state.ts` bridge always reports `agent: "pi"`, so `gentle-shell` no longer loads it from the incoming `PI_CODING_AGENT_DIR` or `~/.pi/agent`. Instead it sets `GENTLE_SHELL_HERDR_REPORTER=1`, and the bundled `gentle-herdr-agent` extension sends the same lifecycle reports (session, `working`, `blocked`, `idle`) with source and agent `gentle-shell`, following Herdr's custom-agent contract. Herdr's Pi integration does not need to be installed. The activity summary (`gentle:activity`) uses the same agent label.
|
|
626
|
+
|
|
627
|
+
Exactly one reporter owns a pane, because Herdr rejects a second source once a session has an owner. When the selected Gentle Shell home already contains the bridge, Pi discovers it anyway: the launcher declares that canonical file as before, does not enable its own reporter, and the pane shows as `pi`. An explicit `-e` that resolves to the bridge is treated the same way. A home whose `settings.json` declares its own `gentle-pi` loads that installed copy instead of this package, and the copy may predate the reporter, so that launch keeps loading the managed bridge exactly as before. Nothing is installed into Herdr, and the launcher never copies the bridge or rewrites home configuration.
|
|
623
628
|
|
|
624
|
-
|
|
629
|
+
Tradeoffs of a custom agent name on Herdr 0.9.3: Herdr keeps no session reference for a custom agent, so it cannot restore a Gentle Shell pane after a Herdr server restart (Pi panes are restored as Pi sessions). Custom resume commands require Herdr 0.10.0 or later and are not reported yet. Herdr operations that need a known agent kind, such as `agent.prompt`, may not apply to `gentle-shell` panes.
|
|
630
|
+
|
|
631
|
+
The Gentle Shell reporter requires `HERDR_ENV=1`, a nonempty `HERDR_PANE_ID`, an existing Unix socket at `HERDR_SOCKET_PATH`, and terminal stdin/stdout. It is skipped for `--no-extensions`/`-ne`, print/JSON/RPC modes (including interactive RPC hosts), export/model listing, package commands, and Gentle Agents children; the launcher also removes an inherited `GENTLE_SHELL_HERDR_REPORTER` there. `--mode text` still permits an interactive TUI. Linked and explicit custom homes keep their own resource policy, so they keep whatever Herdr integration that home discovers and show as `pi`. User-supplied extension paths remain unchanged, including under `--no-extensions`.
|
|
625
632
|
|
|
626
633
|
### Herdr native working detection
|
|
627
634
|
|
|
@@ -659,7 +666,7 @@ Synthetic tests prove the observer's behavior, not the cause of issue #213. A ne
|
|
|
659
666
|
```text
|
|
660
667
|
/gentle:status Check package assets and global model config.
|
|
661
668
|
/gentle:doctor Run read-only diagnostics for assets, config, tools, guards, and Herdr setup.
|
|
662
|
-
/gentle:profiles Open the models screen on this repository's profile. Subcommands: export <name>, import, publish <name>, export-routing, restore-routing.
|
|
669
|
+
/gentle:profiles Open the models screen on this repository's profile. Subcommands: export <name>, import, publish <name>, export-routing, restore-routing, clear.
|
|
663
670
|
/gentle:persona Switch between gentleman and neutral persona modes.
|
|
664
671
|
/gentle:background-subagents Show or set the managed background-subagents policy, with its deciding source.
|
|
665
672
|
/gentle:review-mode Show or set the receipt-driven development mode (status|enable|disable).
|
|
@@ -710,6 +717,8 @@ Size and uncertainty can call for scoped exploration or delegation within ODD. T
|
|
|
710
717
|
| Wrong cwd, worktree/git accident, merge recovery, confusing test/env issue | Stop, preserve the affected scope, and investigate separately before resuming. |
|
|
711
718
|
| The runtime signals the context backstop | Pause and delegate the next bounded unit that needs several steps (its reads, edits, and checks), or stop and explain the exact blocker. Single small edits and state checks stay inline; keep command output bounded; a small task still runs its focused test and suite inline. |
|
|
712
719
|
|
|
720
|
+
The primary session also receives a one-shot, nonblocking `Exploration budget:` notice when successful tracked discovery in one request exceeds three lookups or 40,000 UTF-8 output text bytes. Bytes are an approximate evidence-budget signal, not a token count. The covered tools are `read`, `grep`, `find`, `ls`, `mem_search`, `mem_get_observation`, `mem_context`, `codegraph` with `query` or `explore` operation, `codegraph_query`, `codegraph_explore`, and their `mcp__codegraph__`-prefixed CodeGraph names. Bash and PowerShell commands count only when the existing pure phase inference classifies them as `exploring`; commands classified as checking or unknown are excluded. This is an accounting heuristic, never permission to execute a command. Other memory tool names or aliases are not counted. Local CodeGraph init and failure fallback results do not count. Nested discovery counts only under a direct `codemode` or `mcp` call, not inside review, mutation, or verification tools. Counters span tool turns and automatic retries and reset at the next primary request; child and failed results are excluded. Direct and nested results remain untouched; the notice is a separate context message steered into an already-active run before its next model step. It is never sent while idle and never starts a new agent run. It is guidance, not a gate, a delegation guarantee, or permission to bypass mutation guards. Preparation for an already understood authorized inline write remains exempt.
|
|
721
|
+
|
|
713
722
|
The intended balanced loop for a bounded bugfix is:
|
|
714
723
|
|
|
715
724
|
```text
|
|
@@ -722,7 +731,9 @@ parent git/status + clarify → one worker writes authorized fixes → focused v
|
|
|
722
731
|
|
|
723
732
|
A second admission check stops small-task delegation: in the primary session, a `gentle-ai-worker` or `worker` launch is admitted only when its task or context has a line that starts with `Spec: odd/tasks/<feature>.md` and names a task `T<n>` later on that line (for example `, T2, S3` or the delegation card's `(read until "## Log"). Do T2; S3.`), where the document is a regular file under the writer root's `odd/tasks/` after resolving symlinks, or when the parent's measured context reaches the context backstop described below. Otherwise the launch is rejected with an instruction to write the unit inline. Judgment Day fix agents, read-only subagents, and continuations are not affected.
|
|
724
733
|
|
|
725
|
-
A third admission check keeps the independent verifier for high-risk changes: in the primary session, a `gentle-ai-verify` launch is admitted only when its task or context has a declaration that starts a line (optionally as a list item) or a sentence (after `.`, `!` or `?` and a space) with `Risk:` and names a Task Size high-risk item first, in the form `Risk: item N` with N from 1 to 6 (several items are allowed, for example `Risk: item 2, item 3 (reason)`), or when it carries a feature-document task line the writer check above accepts, or when the parent's measured context reaches the context backstop. `Risk: none`, a mention inside a sentence, or no declaration is rejected with an instruction to run the change's focused test and suite inline, not to retry the launch, and never to add a Risk line or create a feature document only to get a verifier admitted. Subagent children, continuations, writers, Judgment Day agents, native review relays, and read-only explorers are not affected.
|
|
734
|
+
A third admission check keeps the independent verifier for high-risk changes: in the primary session, a `gentle-ai-verify` launch is admitted only when its task or context has a declaration that starts a line (optionally as a list item) or a sentence (after `.`, `!` or `?` and a space) with `Risk:` and names a Task Size high-risk item first, in the form `Risk: item N` with N from 1 to 6 (several items are allowed, for example `Risk: item 2, item 3 (reason)`), or when it carries a feature-document task line the writer check above accepts, or when the parent's measured context reaches the context backstop. `Risk: none`, a mention inside a sentence, or no declaration is rejected with a message that says no supported `Risk: item N` declaration was recognized in the launch `task` or `context`, and an instruction to run the change's focused test and suite inline, not to retry the launch, and never to add a Risk line or create a feature document only to get a verifier admitted. Subagent children, continuations, writers, Judgment Day agents, native review relays, and read-only explorers are not affected.
|
|
735
|
+
|
|
736
|
+
The admission only sees launches that happen, so a settle reminder covers the run that declares a high-risk item and never launches the verifier. At `agent_before_settle` in the primary session, when the run's final assistant message declares `Risk: item N` with the same grammar and no `subagent_run` call for `gentle-ai-verify` was attempted during the current user prompt (an admitted or a rejected launch both count), Gentle AI appends one visible reminder and requests one continuation. The reminder names the item, says to launch `gentle-ai-verify` with the `Risk: item N` line in its `task`, states that a user's visual or manual approval does not replace technical verification, and says to close with **Needs your decision** naming the missing proof when verification is unavailable. It is sent at most once per user prompt, so the continuation never loops; a new user prompt resets it, a steer during the run does not. `Risk: none`, no declared item, an aborted or failed run, and subagent children get no reminder.
|
|
726
737
|
|
|
727
738
|
Every subagent child runs with its own `TMPDIR` (also `TMP` and `TEMP` on Windows): a fresh `gaXXXXXX` directory created under the inherited temp directory (joined to the inherited value as given, never its real path), so scratch the child makes with `mktemp` stays out of the worktree. The runtime removes that directory and everything in it when the child ends, including a failed launch. A quarantined child, whose process exit is unconfirmed, keeps its directory under the system temp directory, because a surviving descendant may still use it; once its exit is proven, including a process group that ends after the child's own exit, the directory is removed and the slot is freed. Each continuation is a new child with a new directory.
|
|
728
739
|
|
|
@@ -817,9 +828,11 @@ Contract `/v2` replaces the Base64 `candidate_diff` reviewer transport of `/v1`
|
|
|
817
828
|
|
|
818
829
|
Target status owns `current_target`, `unrelated`, `ambiguous`, and `corrupted` applicability and returns one native action. Pi does not reconstruct ordinary authority from provider-private files or choose a lineage from repository-wide history. Restart recovery rebuilds only the derived candidate view from the native Git/content projection, including intended-untracked paths, symlinks, and immutable gitlink identities. Native failure envelopes retain their exact mutation outcome, replayability, required inputs, request digest, and next action. After an unknown or lost mutating result, Pi calls target status before any replay decision and returns only the provider-declared action.
|
|
819
830
|
|
|
820
|
-
Candidate views materialize tracked Git symlinks from their frozen blobs even when `core.symlinks=false`, including unchanged links outside the changed scope. Unsafe targets fail before any link is created; a host without native symlink capability fails closed with `symlink-materialization-failed`. Pi does not alter the contributor's Git configuration or install symlink privileges.
|
|
831
|
+
Candidate views materialize tracked Git symlinks from their frozen blobs even when `core.symlinks=false`, including unchanged links outside the changed scope. Unsafe targets fail before any link is created; a host without native symlink capability fails closed with `symlink-materialization-failed`. Pi does not alter the contributor's Git configuration or install symlink privileges. Before `inspect` advertises a ready `review.start`, it runs the same non-persistent capability check over the frozen candidate tree (the probe creates and removes a temporary directory under the candidate-views parent, or its nearest existing ancestor), so a host that cannot create the tracked symlinks sees the refusal at inspect time instead of a START that cannot begin (gentle-ai#2196).
|
|
832
|
+
|
|
833
|
+
Windows skips automatic candidate-owner sweeping during startup and candidate materialization: local owner provenance is unavailable, so that sweep cannot safely reclaim owners and would only repeat synchronous ACL probes. Candidate creation, verification, and explicit cleanup still enforce their existing ownership and permission checks. Existing orphan candidates are preserved; this does not add automatic Windows orphan reclamation.
|
|
821
834
|
|
|
822
|
-
On POSIX, if START rejects a group- or world-accessible `.git/gentle-ai/candidate-views` parent, Pi reports `candidate-owner-parent-privacy` before native START. When a sanitized probe shows the filesystem cannot represent private POSIX modes (for example WSL DrvFS mounts without `metadata`), Pi instead reports `candidate-owner-parent-chmod-ineffective` with guidance to move the Git common directory to a POSIX-metadata filesystem or enable metadata support. Inspect that parent's ownership and permissions and correct them out of band before retrying; Pi does not change them automatically. Other owner-preparation failures retain a generic diagnostic rather than exposing filesystem errors.
|
|
835
|
+
On POSIX, if START rejects a group- or world-accessible `.git/gentle-ai/candidate-views` parent, Pi reports `candidate-owner-parent-privacy` before native START. When a sanitized probe shows the filesystem cannot represent private POSIX modes (for example WSL DrvFS mounts without `metadata`), Pi instead reports `candidate-owner-parent-chmod-ineffective` with guidance to move the Git common directory to a POSIX-metadata filesystem or enable metadata support. Inspect that parent's ownership and permissions and correct them out of band before retrying; Pi does not change them automatically. Other owner-preparation failures retain a generic diagnostic rather than exposing filesystem errors. `inspect` runs the same read-only privacy assert before advertising a ready `review.start` and withholds the advertisement with the identical typed diagnostic under `candidate-view-preflight-blocked`, so STATUS and START stop disagreeing about a candidate whose view cannot materialize (gentle-ai#2196).
|
|
823
836
|
|
|
824
837
|
Once the source checkout's pinned gentle-ai runtime (currently v4.3.1) has written review authority, rollback MUST preserve every native store and receipt and MUST NOT run a downgraded binary against that repository. Disable the Pi route or roll forward to a compatible authority-aware release instead; deleting authority data or reinstalling an older binary is not a rollback path.
|
|
825
838
|
|
|
@@ -1030,11 +1043,11 @@ A project can still override the global default with:
|
|
|
1030
1043
|
╰──────────────────────────────────────────────────────────────────────────────╯
|
|
1031
1044
|
```
|
|
1032
1045
|
|
|
1033
|
-
- **Tabs are profiles.** Click a tab or press `←` `→` to show another one; the screen redraws in place. Symbols show where a profile is in effect: `◉` this session, `★` the default for new sessions, `⌂` this repository. Leaving a profile with unsaved changes asks first: **Save and switch**, **Discard**, or **Stay**.
|
|
1046
|
+
- **Tabs are profiles.** Click a tab or press `←` `→` to show another one; the screen redraws in place. Symbols show where a profile is in effect: `◉` this session, `★` the default for new sessions, `⌂` this repository. `◉` marks the profile this session's launches use: the one chosen with **Use in this session**, or the one it took at startup (see **Session profile frozen at startup**), so it can differ from `★` and `⌂` after they change. The screen opens on that profile. Leaving a profile with unsaved changes asks first: **Save and switch**, **Discard**, or **Stay**.
|
|
1034
1047
|
- **The table is that profile's routing.** The orchestrator is the first row; agents follow. Click a model or press `enter` to choose from a searchable list (the current one is marked `✓`; **Custom model id…** takes any `provider/model`). Click an effort or press `e` to pick from a single row of levels: only the levels that row's model supports, as its provider's catalog declares them (every level when the row inherits its model or the model is not in the catalog). Pi lands an unsupported level on the nearest supported one at launch, and the table says where: `max → high`. Click `Model ▾` or `Effort ▾`, or move the cursor to that header, to change every agent at once; the orchestrator is never part of that.
|
|
1035
1048
|
- **Three buttons decide where it applies.** **Use in this session** (`u`) binds what you see to this Pi session only and switches its orchestrator; nothing shared is written. **Make default** (`d`) makes it the default for new sessions through the guarded global apply (diff confirmation, pin honesty, rollback). **Save** (`s` or `ctrl+s`) writes what you see into the profile. Use and Make default save pending edits first and say so.
|
|
1036
1049
|
- **The profile menu**, `▾` on the active tab (`m`), holds **Rename**, **Duplicate**, **Use in this repo** (the clone pin; it reads **Stop using in this repo** when it already applies), and **Delete**. **+ New** (`n`) starts a profile as a copy of the current one, from what is running now, or empty.
|
|
1037
|
-
- Problems the screen will not hide appear under the profile name with `⚠`: a pin file that is not a valid pin or names a profile that does not exist (either way it is ignored),
|
|
1050
|
+
- Problems the screen will not hide appear under the profile name with `⚠`: a pin file that is not a valid pin or names a profile that does not exist (either way it is ignored), routing keys no agent matches (ignored at launch), with the agent name it probably meant when there is one, and a session profile that was deleted from `profiles.json` after this session took it (its launches keep that routing), or edited there since (the table shows the saved routing, the launches keep the one they took, and Use in this session adopts the table). When the session profile record cannot be read, the screen says its launches are blocked, marks no tab with `◉`, and refuses From what's running now until Use in this session selects a profile.
|
|
1038
1051
|
- Edited values are highlighted until saved, and the footer counts them (`● 2 unsaved`). `esc` closes; with unsaved edits the first press warns and the second closes without saving. Every action reports on the line under the footer.
|
|
1039
1052
|
- Everything clickable highlights under the pointer, and a click runs one action. Keys: `←→` profile, `↑↓` agent, `enter` model, `e` effort, `s` save, `u` use, `d` default, `n` new, `m` the profile menu, `esc` close.
|
|
1040
1053
|
|
|
@@ -1098,13 +1111,32 @@ The file operations are subcommands:
|
|
|
1098
1111
|
| `/gentle:profiles import` | Import the profile in `~/.pi/gentle-ai/profiles.export.json`, asking before it replaces one with the same name. |
|
|
1099
1112
|
| `/gentle:profiles publish <name>` | Publish the shared repository declaration at `<worktree-root>/.pi/gentle-ai/profile.json` so the whole team starts from that profile; run it again to remove the declaration. |
|
|
1100
1113
|
|
|
1101
|
-
The binding made by **Use in this session** writes no shared routing: not `models.json`, Pi's global `settings.json`, agent frontmatter, `subagents.json`, or repository pins. When the table has unsaved edits, they are saved to the profile in `profiles.json` first, exactly as **Save** would, and the screen says so; with no pending edits nothing is written at all. Other open sessions keep their own bindings and live orchestrators. The session binding overrides pins and global routing as a complete snapshot, including reviewer routing; omitted roles do not fall back to another profile. The
|
|
1114
|
+
The binding made by **Use in this session** writes no shared routing: not `models.json`, Pi's global `settings.json`, agent frontmatter, `subagents.json`, or repository pins. When the table has unsaved edits, they are saved to the profile in `profiles.json` first, exactly as **Save** would, and the screen says so; with no pending edits nothing is written at all. Other open sessions keep their own bindings and live orchestrators. The session binding overrides pins and global routing as a complete snapshot, including reviewer routing; omitted roles do not fall back to another profile. The selection is appended to the session file as its own record, so start, resume, reload, fork and tree navigation restore it from the current branch without selecting it again. Re-selecting re-copies the profile definition from `profiles.json`; later edits to `subagents.json` or agent frontmatter never reach a bound session, in that session or through a re-selection.
|
|
1115
|
+
|
|
1116
|
+
| Outcome | What happens |
|
|
1117
|
+
| --- | --- |
|
|
1118
|
+
| Persisted | The selected record is corroborated on disk before routing is published. |
|
|
1119
|
+
| Not yet persisted | Use in this session explicitly reports a preflush selection. It is usable now, but detach/reload does not restore it without later disk corroboration. |
|
|
1120
|
+
| Append failure | No success or live-model effect. Keep only returned disk-corroborated state; otherwise block affected launches. |
|
|
1121
|
+
| Invalid, future or unavailable authority | Do not fall through to shared routing; affected subagent launches are blocked. An explicit successful selection or fresh corroboration can restore availability. |
|
|
1122
|
+
|
|
1123
|
+
`/gentle:profiles clear` removes this session's selection and returns the session to the state it started with, when that state is known:
|
|
1124
|
+
|
|
1125
|
+
| Situation | What clear appends | New launches use |
|
|
1126
|
+
| --- | --- | --- |
|
|
1127
|
+
| The session started on a profile | A startup record of that profile, with the definition it had at startup | That profile, labeled with its origin, for example `team (local)` |
|
|
1128
|
+
| The session started with no profile | A clear marked "started with no profile" | No session profile, as at startup |
|
|
1129
|
+
| The startup state is unknown (a session resumed in a new process without a recorded startup state), or `follow` mode | A plain clear | The routing without a session profile (pins, repository declaration, global) |
|
|
1130
|
+
|
|
1131
|
+
The startup state comes from the newest record of the session, else from the profile the session froze when it started in this process. The notice names where launches go back, for example: `New launches go back to the profile this session started with, "team (local)", and use it.` Resume and reload keep the result. The live orchestrator, `profiles.json`, `models.json`, pins and Pi settings are untouched. A session that never selected a profile, or is already back on its startup state or cleared, writes nothing and says so. Clear is also the recovery path for an invalid or newer-version record: on start, resume, reload and tree navigation such a record raises a warning with the session file and entry index, and affected launches stay blocked until Use in this session or clear replaces it.
|
|
1132
|
+
|
|
1133
|
+
Start, resume, reload, fork and tree navigation restore only the current corroborated branch state. Restoration never applies the profile's orchestrator. Fork capture is read-only until a confirmed transition; cancellation/rejection preserves current authority. Pending Use in this session live operations settle before fork-copy, tree movement or detach.
|
|
1102
1134
|
|
|
1103
1135
|
Outside a pinned repository, **Make default** writes `~/.pi/gentle-ai/models.json`, then reconciles agent frontmatter and `subagents.json` with the shared materialization rules. When a valid pin wins, it only re-pins this clone to the profile and writes none of `models.json`, materialized routing, `settings.json`, or the active marker (see **Per-repository pins**). A profile is a complete snapshot: every discoverable agent it omits returns to inherit, so routing materialized by a previous profile, by an earlier apply, or by a migration never survives a switch silently. The active profile is persisted so `/gentle:profiles` reopens with the applied profile marked.
|
|
1104
1136
|
|
|
1105
1137
|
A profile also carries the orchestrator under the reserved routing key `orchestrator`. Outside a pinned repository, **Make default** on a profile that defines one writes `defaultProvider`, `defaultModel`, and `defaultThinkingLevel` to Pi's global `settings.json` (preserving every other key; an unreadable `settings.json` aborts that part and is reported instead of being overwritten) and switches the session you are in to that model and thinking level right away, so the orchestrator answers with the profile's model from the next turn. **Use in this session** skips the settings write and switches only the session you are in: same live move, nothing persisted. When the model is not in Pi's catalog or its provider has no authentication, **Make default** still records the default for new sessions and says this session kept its current model, while **Use in this session** simply reports the refusal. Applying or binding a profile without an `orchestrator` entry never moves the orchestrator, and **+ New › From what's running now** captures the orchestrator the session actually runs together with the routing. `orchestrator` is reserved: it is not a subagent name, is never written to `subagents.json`, and is not counted as a role.
|
|
1106
1138
|
|
|
1107
|
-
|
|
1139
|
+
**From what's running now** captures what this session's launches use: its `◉` profile when it has one, otherwise the global routing below. A pin written after the session started does not reach its launches, so it is not captured. The `current` seed reads the routing in effect: a valid local pin or repository declaration wins first, so inside a pinned repository it reads the pinned profile's routing. Otherwise both read `models.json` where it has an entry, and the `subagents.json` model profile or frontmatter routing the runtime actually resolves for agents it omits. A sparse `models.json` therefore never hides routing that is still live. When `profiles.json` is missing, the command seeds one profile named `current` captured from that effective routing, marked active only when it has routing entries. Profiles or routing entries dropped by normalization are named in a warning instead of being lost silently.
|
|
1108
1140
|
|
|
1109
1141
|
Saved globally at:
|
|
1110
1142
|
|
|
@@ -1139,6 +1171,33 @@ The `profiles` values use the same per-agent shape as `models.json`. Profile nam
|
|
|
1139
1171
|
|
|
1140
1172
|
The store is replaced atomically through a sibling temp file and a rename, so an interrupted write cannot leave truncated JSON behind. **Make default** writes `profiles.json` first and then materializes routing; if materialization fails, the previous active marker is restored, and the previous routing is restored when a profile was active before. With no previously active profile there is no routing to restore: `models.json` keeps the new routing and the warning says so. Anything that could not be restored is named in the warning.
|
|
1141
1173
|
|
|
1174
|
+
### Model fallback chains
|
|
1175
|
+
|
|
1176
|
+
Each profile can give every agent an ordered list of fallback models, kept in `profile-fallbacks.json` next to `profiles.json` (older versions keep reading `profiles.json` and simply never fall back):
|
|
1177
|
+
|
|
1178
|
+
```json
|
|
1179
|
+
{
|
|
1180
|
+
"kind": "gentle-pi.profile_model_fallbacks",
|
|
1181
|
+
"version": 1,
|
|
1182
|
+
"profiles": {
|
|
1183
|
+
"work": {
|
|
1184
|
+
"orchestrator": [{ "model": "openai/gpt-5.5", "thinking": "high" }],
|
|
1185
|
+
"*": [{ "model": "anthropic/claude-sonnet-5-5" }, { "model": "qwen/qwen3.8" }]
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
```
|
|
1190
|
+
|
|
1191
|
+
Edit them in `/gentle:profiles`: on an agent row (or the `set every agent` row, for `*`), `f` opens its chain; there `f` adds a model from the catalog (the row's own model and models already in the chain are not offered), `e` sets the step's effort, shift+↑/↓ move a step, `x` removes it and `esc` goes back. Each change is saved at once, apart from the profile's `s save`, and only for a profile already saved (save a new one with `s` first); a row with a chain shows `↪ first-model +N`. Renaming or deleting a profile takes its chains along. An agent without its own chain uses the profile's `*` chain. A chain holds at most eight unique `provider/model` ids, each with an optional effort. A launch uses the chain of the profile it resolved (a session binding, a frozen or pinned profile), else the active profile's.
|
|
1192
|
+
|
|
1193
|
+
When a run's final response fails, its error category decides:
|
|
1194
|
+
|
|
1195
|
+
- `quota` (usage limit, billing) and `auth` move on at once.
|
|
1196
|
+
- `rate_limit`, `provider_unavailable`, `timeout` and `network` move on too. Pi already retried them on the same model before the run failed.
|
|
1197
|
+
- `context_length`, `invalid_request`, unknown errors and aborts never move on, because another model would fail the same way.
|
|
1198
|
+
|
|
1199
|
+
The orchestrator uses its `orchestrator` chain once the run settles (after Pi's own retries; a run you abort never moves on): the session switches to the next model (and its effort) and a follow-up message resumes the work; a model Pi refuses or cannot log in to is skipped. The chain is walked once per episode, which ends when a turn succeeds. A subagent switches its live child to the next model (`set_model`, plus the step's effort, or the agent's configured effort when the step has none) and is asked to continue the same conversation, so finished steps are not repeated. A model that failed is skipped by every agent of the session for a while: 30 minutes after a limit or auth error, 2 minutes after a transient one. A launch whose primary model is cooling down starts on the first usable fallback. When `/gentle:usage` reads a spent limit, the model it names waits until that limit resets (providers such as NaN report one limit per model), and the whole provider waits only when every one of its limits is spent, until the earliest reset; so a subagent starts on its next fallback instead of failing first. A later reading with room releases the provider; a model cooled by its own spent limit waits until that limit resets. A full window whose reset already passed is treated as stale. A limit that covers the whole provider (Codex's main limit) holds every model of it while spent; other limits name one model (NaN reports one per model, Codex extras use display names such as `GPT-5.3 Codex_Spark`, matched as `gpt-5.3-codex-spark`). Each switch shows a warning naming the agent, the reason, the new model and, when it costs more, how much (`2.0x the price`), and is recorded in the session as `gentle-pi.model-fallback/v1`; the agent's row in the sidebar then reads `↪ <task> · <model>`, the model shown when the rail has room (failed rows keep their failure note instead). Only models you put in a chain are ever used; when the chain runs out, the run fails as before.
|
|
1200
|
+
|
|
1142
1201
|
### Per-repository pins
|
|
1143
1202
|
|
|
1144
1203
|
A profile can be pinned to one repository, so that repository's subagent launches use that profile regardless of which profile is globally active. This is what keeps parallel repositories independent: without a pin, switching the active profile in one repository changes the routing every other repository will use for its next subagent launch.
|
|
@@ -1218,7 +1277,7 @@ The notice appears once per distinct change: further launches stay quiet until t
|
|
|
1218
1277
|
|
|
1219
1278
|
**Task card layer token.** Every agents task card shows which layer supplied the launch's model, right after the model itself (for example `nan/glm5.3 · binding`): `binding` (selected in this session), `frozen:local` / `frozen:repo` / `frozen:global` (the startup snapshot and its origin), `pin:local` / `pin:repo` (a repository pin won), `declaration` (a non-Git repository declaration won), `profile` (the globally active profile routing), `definition` (the agent's own frontmatter), or `default` (Pi's default model). This makes staleness visible: a launch through a frozen session keeps showing its frozen token even after the editable layers below it change on disk.
|
|
1220
1279
|
|
|
1221
|
-
**Current limits.** The frozen profile is kept in memory for the life of the Pi process, so `/reload` keeps it.
|
|
1280
|
+
**Current limits.** The frozen profile is kept in memory for the life of the Pi process, so `/reload` keeps it. A session whose newest record holds its startup state (written by `/gentle:profiles clear`) resumes on that state instead. Otherwise the limit applies to the startup-frozen profile: resuming a session in a new process (`--resume`, `--continue`, `--session`), `/new`, and `/fork` freeze it again from the defaults current at that moment, and the drift notice memory starts empty, so a pending change is announced once more. A profile chosen with **Use in this session** is not affected: it is restored from the current branch of the session file, and it records the startup state when the session knows it, so a later clear can return there. Recording the frozen profile at every startup is planned.
|
|
1222
1281
|
|
|
1223
1282
|
## Commands
|
|
1224
1283
|
|
|
@@ -1246,7 +1305,7 @@ The notice appears once per distinct change: further launches stay quiet until t
|
|
|
1246
1305
|
| `/skill-registry:refresh` | Regenerates `.atl/skill-registry.md`. |
|
|
1247
1306
|
| `/skill-creation` | Creates or updates an LLM-first skill using the packaged `gentle-ai-skill-creator` contract and style guide. |
|
|
1248
1307
|
|
|
1249
|
-
Startup installs and refreshes delegation and review assets. Status and doctor identify missing or stale managed assets and the relevant repair command. User and project overrides are reported separately from package drift. Package refresh preserves overrides; explicit saved model settings may still update packaged or custom-agent routing at startup.
|
|
1308
|
+
Startup installs and refreshes delegation and review assets. Status and doctor identify missing or stale managed assets and the relevant repair command. User and project overrides are reported separately from package drift. Package refresh preserves overrides; explicit saved model settings may still update packaged or custom-agent routing at startup. A packaged agent with outdated instructions that still match a shipped version is refreshed even when its frontmatter was edited (for example a hand-set `model:`/`thinking:` or a tool that reformatted `tools:`): refresh installs the current agent and keeps its `model:`/`thinking:` lines. An agent with edited instructions, or with frontmatter edits on the current instructions, stays as a user override. After changing any `assets/agents` file, run `node scripts/update-agent-body-history.mjs` to record the new instructions.
|
|
1250
1309
|
|
|
1251
1310
|
### Native cache warming (Pi 0.86.1+)
|
|
1252
1311
|
|
|
@@ -1349,7 +1408,7 @@ The frame labels INSERT, NORMAL, VISUAL (characterwise), or VISUAL LINE (linewis
|
|
|
1349
1408
|
|
|
1350
1409
|
**Deliberate `/` divergence from Claude Code:** NORMAL `/` hands off to **Pi's native slash commands and skills**, enters INSERT, and inserts `/` at the existing cursor. Pi offers slash completion only at the start of the first line; elsewhere it inserts a literal slash without moving or replacing the draft. There is **no reverse prompt-history search**. Pi's explicit history shortcuts still work, transferring to INSERT first. Unknown NORMAL printable input, encoded text and bracketed paste do not silently insert; application shortcuts can transfer to INSERT before acting.
|
|
1351
1410
|
|
|
1352
|
-
This is a bounded command subset, not full Claude Code/Vim parity. The private editor adapter supports only the audited Pi coding-agent/TUI `0.99.1`, `0.99.2`, `1.0.0`, `1.1.0`, `1.2.0`, `1.3.0`, and `1.
|
|
1411
|
+
This is a bounded command subset, not full Claude Code/Vim parity. The private editor adapter supports only the audited Pi coding-agent/TUI `0.99.1`, `0.99.2`, `1.0.0`, `1.1.0`, `1.2.0`, `1.3.0`, `1.4.0`, and `1.5.0` package pairs. The two 0.99 releases have byte-identical editor and undo-stack sources. Pi 1.0.0, 1.1.0 and 1.2.0 are separately audited against the touched state, paste/history, cursor/layout, autocomplete and undo-snapshot contracts. Pi 1.2.0's paired APC fake-cursor markers remain intact so the host can suppress software cursors when hardware cursors are visible; selection inversion and empty-prompt hints support both these markers and legacy SGR cursors. Pi 1.5.0 keeps undo-stack.js and editor-component.js byte-identical to 1.2.0; its editor.js adds a read-only `capturesViewportInput` getter and autocomplete pageUp/pageDown matching, and its keys.js adds Kitty F1-F12 mappings plus the functional PUA filter — all additive to input handling, leaving the audited state, paste, layout and autocomplete contracts unchanged. Current bundled and unbundled 1.2.0 tests prove identity, edit/undo, paste, selection, wrapping/scroll and autocomplete behavior, not old/new byte identity. Fabricated metadata tests preserve exact-version admission coverage for the older audited releases. Version metadata must come from a canonical candidate host package root whose actual `CustomEditor` and `Editor` classes match the loaded classes, never from the extension's local metadata or CLI path alone. Unknown versions, mismatched prototypes, or invalid layouts fail closed: a single compatibility warning is shown and the prompt continues with ordinary editing instead of silently entering inert NORMAL mode. Operations that would cross a registered collapsed paste marker, or encounter duplicate occurrences of a registered marker ID, are rejected without editing it. Visual highlighting relies on Pi's render layout and may be omitted if its geometry cannot be validated. No live-terminal proof of every layout or complete parity is claimed.
|
|
1353
1412
|
|
|
1354
1413
|
Startup banner settings remain global in `banner.json` under `GENTLE_PI_CONFIG_HOME` (default `~/.pi/gentle-ai`). Existing `showRose` and `showTextLogo` opt-outs independently control the main startup artwork; both default to enabled. Changes apply on the next session or `/reload`. Color presets are `pink` (default), `cyan`, `yellow`, and `green`. The static sidebar heading is independent of these preferences and follows the active theme.
|
|
1355
1414
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Session profile record format
|
|
2
2
|
|
|
3
3
|
`lib/session-profile-persistence.ts` defines the optional session profile v1
|
|
4
|
-
codec and pure replay contract.
|
|
5
|
-
|
|
4
|
+
codec and pure replay contract. The record shapes and how each version reads
|
|
5
|
+
them are specified in gentle-shell#2742.
|
|
6
6
|
|
|
7
7
|
## Payloads
|
|
8
8
|
|
|
@@ -10,12 +10,27 @@ A custom entry uses `customType: "gentle-pi.session-profile/v1"` and one payload
|
|
|
10
10
|
|
|
11
11
|
```json
|
|
12
12
|
{"kind":"bind","origin":"user","name":"work","modelProfiles":{"worker":{"model":"provider/model"},"orchestrator":{"thinking":"high"}}}
|
|
13
|
+
{"kind":"bind","origin":"user","name":"work","modelProfiles":{"worker":{"model":"provider/model"}},"startup":"none"}
|
|
14
|
+
{"kind":"bind","origin":"local","name":"team","modelProfiles":{"worker":{"model":"provider/model"},"orchestrator":{"model":"provider/model"}}}
|
|
13
15
|
{"kind":"clear"}
|
|
16
|
+
{"kind":"clear","startup":"none"}
|
|
14
17
|
```
|
|
15
18
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
| Payload | Meaning |
|
|
20
|
+
| --- | --- |
|
|
21
|
+
| `bind`, origin `user` | An explicit choice (Use in this session). An optional `startup` field holds the session's startup state: `{"origin","name","modelProfiles"}` with origin `local`, `repo` or `global`, or `"none"`. |
|
|
22
|
+
| `bind`, origin `local`, `repo` or `global` | A startup record: the profile the session started with and the layer it came from. `modelProfiles` is the full normalized definition, `orchestrator` included; launch routing uses its role entries only. |
|
|
23
|
+
| `clear` | A legacy clear: no session profile, startup state unknown. |
|
|
24
|
+
| `clear` with `startup: "none"` | The session started with no profile in any layer. |
|
|
25
|
+
|
|
26
|
+
The decoder accepts the closed origin set `user`, `local`, `repo`, and `global`.
|
|
27
|
+
A malformed `startup` field is dropped, so the record keeps the routing a v1
|
|
28
|
+
reader gives it, and a `startup` on a clear other than `"none"` reads as a
|
|
29
|
+
legacy clear. A v1 reader ignores `startup`, reads a startup record as an
|
|
30
|
+
explicit choice and a clear with `startup: "none"` as a clear; launch routing
|
|
31
|
+
is the same except in the case gentle-shell#2742 section 2 documents (a session
|
|
32
|
+
that started with no profile, resumed by a v1 version after a default
|
|
33
|
+
appeared). A bound empty snapshot is not a
|
|
19
34
|
clear. Snapshots are detached, known invalid fields reject the whole binding,
|
|
20
35
|
and unknown extra fields carry no routing meaning. Existing route normalization
|
|
21
36
|
supports legacy model strings and `effort`; valid `thinking` takes precedence.
|
|
@@ -13,7 +13,7 @@ Audio is **off by default**. In a primary Pi terminal, open `/gentle:customize`
|
|
|
13
13
|
|
|
14
14
|
**Context warning.** When context usage reaches **90%** of the active model's window, Gentle warns once per high episode. The sound is the `context.high` event: turn **Audio notifications** on, expand **Advanced**, and select its sound. A file saved before `context.high` existed stays silent for it, so select a sound on that Advanced row to hear it; its recommended tone is `builtin:attention`. The visual warning is fully independent: the **Sections → Section contextWarning** row in `/gentle:customize` (shown by default) toggles it, and neither toggle changes the other. The episode rearms when usage drops below 90%, after a successful compaction, or in a new session; a canceled or failed compaction does not rearm, and the unknown reading right after a successful compaction never repeats the warning.
|
|
15
15
|
|
|
16
|
-
The inline field and the recovery confirmation render inside the same card. **Escape** cancels the field or confirmation; a second Escape closes the card. If the field, value or `y yes` cannot be shown in full (a resize or a very small terminal), Enter or `y` is refused instead of acting on something invisible. Invalid/unreadable configuration disables automatic audio: saving in that state requires a fresh explicit inline confirmation to replace it, cancel preserves the file and settings, and a failed write does not grant consent to the next attempt. Diagnostics are generic local UI notices, not conversation messages, tools, model context or agent state.
|
|
16
|
+
The inline field and the recovery confirmation render inside the same card. Long input prompts and values wrap across the available preview lines (up to three when the card has at least 11 rows), and Enter submits the exact value only when it is fully visible. If the input still cannot fit, `Needs N columns for one line · Esc cancel` gives a sufficient terminal width; shorten the value, enlarge the terminal, or cancel. **Escape** cancels the field or confirmation; a second Escape closes the card. If the field, value or `y yes` cannot be shown in full (a resize or a very small terminal), Enter or `y` is refused instead of acting on something invisible. Invalid/unreadable configuration disables automatic audio: saving in that state requires a fresh explicit inline confirmation to replace it, cancel preserves the file and settings, and a failed write does not grant consent to the next attempt. Diagnostics are generic local UI notices, not conversation messages, tools, model context or agent state.
|
|
17
17
|
|
|
18
18
|
## Supported events and defaults
|
|
19
19
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# GitHub star prompt
|
|
2
|
+
|
|
3
|
+
Gentle Shell can thank engaged users with a single, non-blocking invitation to star the repository — modeled on t3code's `GitHubStarPrompt` courtesies, and engineered to never interrupt active work.
|
|
4
|
+
|
|
5
|
+
## Behavior
|
|
6
|
+
|
|
7
|
+
- **Engagement gate.** The offer may appear only after more than five interactive prompts have been sent across sessions (the counter persists in the gentle config home). Prompts 1–5 stay silent.
|
|
8
|
+
- **Idle only.** The offer waits for 30 seconds without any keyboard activity and for no running agent before showing anything. Typing at any moment restarts the wait and is never consumed.
|
|
9
|
+
- **Once per session.** If the offer goes unanswered, it auto-hides after five minutes and does not return until the next session.
|
|
10
|
+
- **Dismissal is forever.** `Alt+D` (or any dismissal path) persists a never-ask-again flag. If state cannot be read or written, the extension never asks at all: a dismissal that cannot be saved must not be replaced by nagging.
|
|
11
|
+
- **Already starred.** When the authenticated `gh` account already starred the repositories, the offer marks itself dismissed without ever showing. If `gh` cannot answer, the offer stays silent for that session.
|
|
12
|
+
|
|
13
|
+
## The offer
|
|
14
|
+
|
|
15
|
+
When idle conditions are met, a one-line offer appears below the editor, painted in the theme's `success` green (the color of added lines in the changes view) so it stands out, followed by a `[star]` button:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
Enjoying Gentle Shell? Ctrl+G stars both Gentleman-Programming repos (github.com/Gentleman-Programming/gentle-shell and github.com/Gentleman-Programming/gentle-ai) on GitHub, Alt+D never asks again [star]
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The row is responsive: it shows the longest wording that fits whole, from the full text above down to `Enjoying Gentle Shell? Ctrl+G stars us on GitHub, Alt+D never asks again`, `Ctrl+G star, Alt+D dismiss`, and `Ctrl+G star`, so no word is ever cut. The `[star]` button stays right-aligned at every width, like the changes row's `/gentle:changes` hint, and exists only while the offer is visible.
|
|
22
|
+
|
|
23
|
+
Only two control chords are intercepted while the offer is visible — plain typing is passed through untouched, so the prompt can never eat a character:
|
|
24
|
+
|
|
25
|
+
- `Ctrl+G` or a left click on `[star]` — star now.
|
|
26
|
+
- `Alt+D` — never ask again.
|
|
27
|
+
|
|
28
|
+
The `[star]` button uses the shell's shared hover treatment, like the sidebar's clickable controls. Mouse reports arrive only in fullscreen mode; under tmux, zellij, and screen clicks work but hover does not, and without mouse support the chords keep working.
|
|
29
|
+
|
|
30
|
+
## Starring
|
|
31
|
+
|
|
32
|
+
`Ctrl+G` stars **both sibling repositories**, `Gentleman-Programming/gentle-shell` and `Gentleman-Programming/gentle-ai`, right from the terminal through the authenticated `gh` account, only after that explicit keypress (each PUT is an idempotent no-op when already starred). If `gh` is missing or fails, it falls back to opening both URLs in the browser instead of dead-ending.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Bounded work continuity
|
|
2
|
+
|
|
3
|
+
## Scope and delivered guidance
|
|
4
|
+
|
|
5
|
+
This is a Shell prompt-guidance improvement, not an incident closure for #2211 or #1669. The always-on parent guidance distinguishes a recoverable failure from genuinely inaccessible proof before a bounded stop, and describes a parent-only route for explicitly authorized maintenance that a worker cannot perform. Neither rule grants permission, changes correction limits, or implements a backup or rollback operation.
|
|
6
|
+
|
|
7
|
+
| Situation | Guidance delivered to the parent |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| A test or harness check fails, but a correction and rerun remain in scope and within the existing budget | Correct and continue without asking for approval of each transition. Do not reset the budget or weaken the check. |
|
|
10
|
+
| The human specified one run, no retries, or diagnostic only | Honor that limit; do not propose diagnostic-only or single-attempt authorization unless requested. |
|
|
11
|
+
| Proof is genuinely inaccessible, consent is required, an action is denied, or the correction budget is exhausted | Stop and report the blocker. Terminal outcomes and existing bounded-stop rules remain binding; an unavailable verifier is not retried. |
|
|
12
|
+
| A worker cannot perform an upgrade | Only the parent may act after explicit authorization of the operation, exact scope and ownership, preservation, permitted tools, applicable fresh consent and guards, a validated backup, applicable artifact/migration validation, and a recovery path are established. |
|
|
13
|
+
| An authorized rollback mixes task changes and unrelated changes, even in one file | Preserve unrelated edits; remove only proven task-created helpers. Never blanket restore, reset, or clean. Ambiguous ownership or denial stops the operation. |
|
|
14
|
+
|
|
15
|
+
Broad feature approval is not destructive-operation authority. Do not reroute a denial to another worker or tool. No real maintenance, backup, migration, rollback, destructive Git operation, or model/provider operation was performed for this work.
|
|
16
|
+
|
|
17
|
+
## Current bounded checks
|
|
18
|
+
|
|
19
|
+
On the current Windows workspace, with existing dependencies and no installation, network, provider, or model calls, the bounded verification run recorded these results:
|
|
20
|
+
|
|
21
|
+
| Command | Result |
|
|
22
|
+
| --- | --- |
|
|
23
|
+
| `node --experimental-strip-types --test tests/work-continuity-contract.test.ts` | Exit 0; 2 passed, 0 failed, 0 skipped, 0 cancelled. |
|
|
24
|
+
| `node --experimental-strip-types --test tests/append-system-prompt-route.test.ts` | Exit 0; 4 passed, 0 failed, 0 skipped, 0 cancelled. |
|
|
25
|
+
| `node --experimental-strip-types --test tests/review-contract-prompt.test.ts` | Exit 0; 12 passed, 0 failed, 0 skipped, 0 cancelled. |
|
|
26
|
+
| `node scripts/check-provider-contract.mjs` | Exit 0; mirror contract 1.4.0, 10 bundle entries, and 2 generated baselines verified. |
|
|
27
|
+
|
|
28
|
+
Each test command ran once. The parent repeated the provider-mirror check as a spot check; it also exited 0. These checks establish prompt delivery through Pi's `before_agent_start` event, prompt idempotence, child and named-agent exclusions, and offline provider-mirror integrity. They do not execute a model's decisions or reproduce either reported incident. Actual model behavior, including recovery, explicit-limit, upgrade, and mixed-ownership rollback decisions, remains unverified.
|
|
29
|
+
|
|
30
|
+
## Historical preservation and later baseline evidence
|
|
31
|
+
|
|
32
|
+
The original preservation snapshot remains historical evidence, not a current conclusion: its recorded focused result was 11 instruction-delivery tests plus typecheck, provider-contract, and runtime-harness passes. Its full-suite record was 337 failures, 1 cancellation, and 331 skipped tests. The full log became unavailable, so those failures were not waived, attributed to this change, or comprehensively compared with baseline.
|
|
33
|
+
|
|
34
|
+
The snapshot's statement that no representative baseline/candidate comparisons had run was accurate at that time. Subsequent committed Windows diagnostics now provide narrower current evidence:
|
|
35
|
+
|
|
36
|
+
- [Representative baseline/candidate probes](../odd/diagnostics/work-continuity-windows/representative-baseline-candidate-probes.md) show three exact selected failures on both baseline `eff5d24694b21663095a4790b3ef15de21c290c2` and the original WIP candidate.
|
|
37
|
+
- [Remaining commit-path verification](../odd/diagnostics/work-continuity-windows/remaining-commit-path-verification.md) establishes a fourth selected baseline failure, then records its fixture-only portability correction and a complete-file result of 12 passed.
|
|
38
|
+
- [Complete-file verification](../odd/diagnostics/work-continuity-windows/complete-file-verification.md) records 17 passed for writer surfaces and 23 passed with 46 POSIX skips for bundled install; the later commit-path report supersedes its earlier 11/12 result for that file.
|
|
39
|
+
|
|
40
|
+
Those four selected cases are bounded Windows evidence only. They do not attribute all 337 historical failures, test Linux or skipped POSIX behavior, waive the unavailable full-suite evidence, or establish delivery readiness. The later fixture corrections are separate from the original Shell prompt-guidance improvement.
|
|
41
|
+
|
|
42
|
+
## Ownership and review limits
|
|
43
|
+
|
|
44
|
+
The continuity clarification is Shell-owned and operates before existing terminal outcomes. The provider owns the mirrored Close contract; its bundle, hashes, and wording remain unchanged. A provider-owned semantic change requires separate authority.
|
|
45
|
+
|
|
46
|
+
Global RDD was on. An earlier preflight stopped with `immutable_review_transport_unsupported`; no review authority was started, no receipt exists, and review or mode was not retried. That unavailable review transport does not itself authorize or prohibit ordinary delivery; any delivery decision must use its applicable authority and evidence. Two wording advisories remain nonblocking and unproven: the sentence about not proposing diagnostic-only or single-attempt authorization, and the maintenance sentence that stops when a prerequisite is missing. No GitHub issue status was consulted, and this document does not claim publishing, delivery approval, or issue closure.
|
|
@@ -288,6 +288,7 @@ export default function askUserQuestion(pi: ExtensionAPI): void {
|
|
|
288
288
|
theme,
|
|
289
289
|
keybindings,
|
|
290
290
|
onComplete: (result) => done(result),
|
|
291
|
+
rows: () => tui?.terminal?.rows ?? 24,
|
|
291
292
|
});
|
|
292
293
|
// Native dock swap, never an overlay: the transcript stays scrollable
|
|
293
294
|
// while the questionnaire owns focus. No `overlay` option is passed.
|
|
@@ -78,6 +78,40 @@ const FALLBACK_INSTRUCTIONS = "Use read, grep, and find for this exploration.";
|
|
|
78
78
|
// init is the legitimately slow first index, so only the user's signal bounds it.
|
|
79
79
|
const CODEGRAPH_QUERY_TIMEOUT_MS = 180_000;
|
|
80
80
|
const execFileAsync = promisify(execFile);
|
|
81
|
+
const GIT_ROOT_REQUIRED = "CodeGraph requires a real Git project root equal to the current workspace.";
|
|
82
|
+
const GIT_DIAGNOSTIC_MAX_CHARS = 1_000;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Compare two directories by file identity, not path spelling. On Windows a mapped
|
|
86
|
+
* drive (`X:\repo`) and the UNC path Git reports for it (`\\server\share\repo`) name
|
|
87
|
+
* the same directory but never compare equal as strings (#2558).
|
|
88
|
+
*/
|
|
89
|
+
export function isSameDirectory(left: string, right: string): boolean {
|
|
90
|
+
if (left === right) return true;
|
|
91
|
+
try {
|
|
92
|
+
const a = statSync(left, { bigint: true });
|
|
93
|
+
const b = statSync(right, { bigint: true });
|
|
94
|
+
// A zero inode means the filesystem reports no identity; never treat that as a match.
|
|
95
|
+
return a.isDirectory() && b.isDirectory() && a.ino !== 0n && a.dev === b.dev && a.ino === b.ino;
|
|
96
|
+
} catch {
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Keep the stable prefix and append what was compared, so a path mismatch and a Git
|
|
103
|
+
* refusal (for example safe.directory on a network share) are told apart (#2558).
|
|
104
|
+
*/
|
|
105
|
+
function gitRootRequiredError(workspace: string, label: "git toplevel" | "git", detail: string): Error {
|
|
106
|
+
return new Error(`${GIT_ROOT_REQUIRED}\n workspace: ${workspace}\n ${label}: ${detail.split(/\r?\n/).filter((line) => line.trim()).join("\n ")}`);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/** Prefer Git's own stderr over Node's "Command failed" wrapper, bounded for the tool output. */
|
|
110
|
+
function gitFailureDetail(error: unknown): string {
|
|
111
|
+
const stderr = (error as { stderr?: unknown } | undefined)?.stderr;
|
|
112
|
+
const text = (typeof stderr === "string" && stderr.trim()) || (error instanceof Error ? error.message : String(error)).trim();
|
|
113
|
+
return text.length > GIT_DIAGNOSTIC_MAX_CHARS ? `${text.slice(0, GIT_DIAGNOSTIC_MAX_CHARS)}...` : text;
|
|
114
|
+
}
|
|
81
115
|
|
|
82
116
|
function resolveWorkspaceCwd(cwd: string): string {
|
|
83
117
|
const resolved = realpathSync(cwd);
|
|
@@ -91,16 +125,16 @@ function resolveWorkspaceCwd(cwd: string): string {
|
|
|
91
125
|
const root = realpathSync(execFileSync("git", ["rev-parse", "--show-toplevel"], {
|
|
92
126
|
cwd: resolved,
|
|
93
127
|
encoding: "utf8",
|
|
94
|
-
stdio: ["ignore", "pipe", "
|
|
128
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
95
129
|
windowsHide: true,
|
|
96
130
|
}).trim());
|
|
97
|
-
if (root
|
|
98
|
-
throw
|
|
131
|
+
if (!isSameDirectory(root, resolved)) {
|
|
132
|
+
throw gitRootRequiredError(resolved, "git toplevel", root);
|
|
99
133
|
}
|
|
100
134
|
return resolved;
|
|
101
135
|
} catch (error) {
|
|
102
136
|
if (error instanceof Error && /real Git project root/.test(error.message)) throw error;
|
|
103
|
-
throw
|
|
137
|
+
throw gitRootRequiredError(resolved, "git", gitFailureDetail(error));
|
|
104
138
|
}
|
|
105
139
|
}
|
|
106
140
|
|