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
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Request Fast mode
|
|
2
|
+
|
|
3
|
+
Use `/gentle:profiles` to save **Standard** or **Fast** per compatible model route. Select a row and press `t` (or click the tier) to switch it. Click **All Fast** in the table header or press `a` to set the orchestrator and every compatible agent route in the current profile to Fast; already-Fast routes stay Fast, and unsupported or inherited routes are unchanged. This edits the draft only: save and choose **Use in this session** to persist and apply it. The profile's session snapshot restores the selection when the session is resumed. **Make default** applies the choice now and supplies the orchestrator tier for new sessions; already-running sessions keep their frozen startup default unless they apply a profile themselves. Child and direct routes use their own configured tiers.
|
|
4
|
+
|
|
5
|
+
After installing or updating the extension, run `/reload` to load it. The bottom bar shows the orchestrator's configured **Standard** or **Fast** next to its effort. It reads the named profile's saved configuration, not an older session snapshot or a server response. Tier status is not listed in Integrations.
|
|
6
|
+
|
|
7
|
+
This is a configuration indicator, not confirmation of server processing, billing, or account eligibility. Save and choose **Use in this session** to apply changes to the current session; the indicator itself does not change request routing. Older profiles without a tier keep existing request behavior and clear a previous profile selection when applied. An explicit profile session snapshot restores its request tier on reload or resume.
|
|
8
|
+
|
|
9
|
+
## Availability and cost
|
|
10
|
+
|
|
11
|
+
OpenAI documents that Codex Fast uses **2.5x included subscription usage** or **2x purchased credits**. API use follows its own pricing, not those subscription multipliers. Check your account, plan, model availability, and current [Codex Fast documentation](https://developers.openai.com/codex/speed) and [API pricing](https://openai.com/api/pricing/) before use. Pi's local cost estimates may not reflect actual tier, subscription quota, or billed charges; consult OpenAI for authoritative usage and billing.
|
|
12
|
+
|
|
13
|
+
The selector applies only to `openai` / `openai-responses` (including native ChatGPT sign-in) and `openai-codex` / `openai-codex-responses` (legacy sign-in), for these model IDs: `gpt-5.6-luna`, `gpt-5.6-sol`, `gpt-5.6-terra`, `gpt-6-astra`, `gpt-6-sol`, `gpt-6-luna`, `gpt-6.1-sol`, and `gpt-6.1-terra`. This conservative list reflects the installed model catalog and OpenAI's documented Codex Fast family; it is not an entitlement check. Other providers, APIs, and models are untouched. A profile tier belongs only to its selected model and clears when you switch to a different model.
|
|
14
|
+
|
|
15
|
+
Fast sends `service_tier: priority`; Standard sends `service_tier: default`, clearing a previous Fast request on supported models. Other payload fields are preserved. The server may reject or handle a request differently; the extension does not retry or automatically fall back. No separate tier-observation integration is registered. Native response-tier accounting remains unchanged and may depend on the provider's response. Other extensions can also alter a request later in the chain.
|
|
@@ -4,6 +4,14 @@ An interactive RPC host — a client that runs `pi --mode rpc` itself, such as t
|
|
|
4
4
|
|
|
5
5
|
Source map: [publisher](../lib/agents-rpc-publisher.ts), [wiring](../extensions/gentle-agents.ts), [store](../lib/agents-protocol.ts).
|
|
6
6
|
|
|
7
|
+
## Activity labels
|
|
8
|
+
|
|
9
|
+
The scrollable TUI sidebar shows each task's existing label below its agent when
|
|
10
|
+
there is no room for the inline task column. The line is clipped to the card
|
|
11
|
+
width; waiting questions and errors retain their existing display priority. The
|
|
12
|
+
height-capped card above the editor retains its existing layout. The RPC payload
|
|
13
|
+
carries the task label for hosts to display.
|
|
14
|
+
|
|
7
15
|
## Same-profile orchestrator discovery (Refs #1701)
|
|
8
16
|
|
|
9
17
|
`orchestrator_list` keeps stable raw routing session IDs and adds recorded display
|
package/docs/gentle-shell.md
CHANGED
|
@@ -6,11 +6,19 @@ For development, use [ODD and feature recovery](readme-reference.md#organic-driv
|
|
|
6
6
|
|
|
7
7
|
Source map: [shell extension](../extensions/gentle-shell.ts), [shell bar](../lib/shell-bar.ts), [changes model](../lib/shell-changes.ts), [changes view](../lib/shell-changes-view.ts), [usage model](../lib/shell-usage.ts), [usage view](../lib/shell-usage-view.ts), [agents extension](../extensions/gentle-agents.ts), and [agent runner](../lib/agents-runner.ts).
|
|
8
8
|
|
|
9
|
+
## Terminal program identity
|
|
10
|
+
|
|
11
|
+
`gentle-shell` identifies as `gentle-shell` in native OSC 7501 reports, so terminals and dashboards can distinguish it from plain Pi. The launcher sets `PI_PROGRAM_STATUS_APP=gentle-shell`; the bundled `gentle-program-identity` extension consumes it even when Pi itself does not. Ordinary Pi sessions without that marker, delegated children, RPC, JSON and print modes are unchanged. `PI_PROGRAM_STATUS=1|0` still controls whether the native terminal sends reports.
|
|
12
|
+
|
|
13
|
+
The extension wraps only the active terminal instance's `setProgramStatus`, preserving Pi's states and messages. Pi can emit an initial `pi` report before extensions load; the extension immediately replays its cached native status with the corrected identity, without waiting for a prompt. The wrapper and guarded startup-cache replay are compatibility adaptations, not an official Pi identity hook; shutdown, reload and session replacement release the wrapper without overwriting later extensions. If a terminal has no compatible cached status, correction begins with its next native report. Disabling this extension removes the fallback on Pi versions that ignore the variable. This changes reported identity, not Herdr's resume-command configuration.
|
|
14
|
+
|
|
9
15
|
## Updating Pi safely
|
|
10
16
|
|
|
11
17
|
Run `gentle-shell update` to update the Pi this launcher runs. It also works when that Pi is older than the required minimum version, which every other command refuses. Shell verifies npm/pnpm global listing JSON and canonical package roots before installing exactly one supplying package. This supports pnpm v11 linked stores without relying on `PNPM_HOME` containment. When the launcher runs its adjacent Pi peer, the supplier is the listed `gentle-pi` package itself: Shell is reinstalled at its current version so the package manager re-resolves the peer, because updating a separate global Pi never changes the peer a Shell install runs. A main-channel Shell (`<version>-main.<sha12>`) is never published, so it is reinstalled 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); when that tarball is missing, `update` installs nothing and names the rebuild path (`gentle-shell upgrade --channel release`, then `--channel main`), because `upgrade --channel main` alone is a no-op when already at the latest main. A Pi found on `PATH` or through `GENTLE_SHELL_PI` is updated through its own listed global package; a package-manager shim is followed to the single `cli.js` it names. Pi and Shell are never combined into a comma install.
|
|
12
18
|
|
|
13
|
-
|
|
19
|
+
A source-linked Shell uses a separate local route: the exact listed Shell link and selected adjacent Pi must resolve to the checkout. A single-project Git checkout needs an exact `npm@x.y.z` or `pnpm@x.y.z` `packageManager` declaration and a compatible manager on PATH: pnpm may match or exceed the declared version; npm must match its pin. pnpm's `--pm-on-fail=ignore` keeps the checked newer manager instead of downloading the older project pin, without changing the declaration or release-age/security policy. Bundled installations continue to use their own contained manager; source checkouts do not borrow an unverified manager from another prefix. The checkout also needs a direct registry Pi dependency, and exactly one matching lockfile (`package-lock.json` or `pnpm-lock.yaml`). `update` runs a named, range-respecting local update with `--no-save` and lifecycle scripts disabled, preserving the global Shell link and declared ranges. Its Pi/transitive lockfile graph may change. pnpm's metadata cache and minimum-release-age policy still apply: an unchanged version is reported without clearing caches or overriding that policy. The checkout's adjacent Pi is read back after installation; an unreadable version is reported, never invented. Root-only `pnpm-workspace.yaml` configuration is allowed only when the pinned manager's read-only selectors and recursive project listing prove that the checkout is the sole project. Its release-age/security settings are loaded normally, never ignored, and its bytes must remain unchanged. Declared multi-project or ancestor workspaces, conflicting/missing lockfiles, linked manifests/lockfiles and installed Pi source-checkout overrides (including `npm link` without a manifest change) refuse before installation; resolve these layouts manually rather than deleting a lockfile blindly.
|
|
20
|
+
|
|
21
|
+
Unknown or ambiguous ownership, unsupported source/link packages, and pnpm global groups shared with other top-level packages refuse without installation changes. Separate groups in one aggregated listing are allowed. After the install, Shell reads the supplied Pi version back from a fresh listing and reports whether it changed. pnpm installs only releases older than its `minimumReleaseAge` setting (pnpm 11 defaults to 4320 minutes), so a very recent Pi release is picked up once it is old enough; Shell reports that rule instead of overriding it. Global listings, version probes and global installations run from the system temporary directory so the current project's `packageManager` pin never changes which pnpm answers. Only a verified source update runs from its checkout. Use the supplying package manager for unsupported layouts. `gentle-shell update --extensions-only` remains an extension-only Pi command; prefix-bundled Pi still updates with `gentle-shell upgrade`, or with `gentle-shell update --latest` to the newest published Pi without the release's verified lockfile (after a warning that features relying on audited Pi internals, such as the Vim editor, may turn off; `upgrade` never downgrades it afterwards). See [managing packages](readme-reference.md#managing-packages) for the ownership contract.
|
|
14
22
|
|
|
15
23
|
When the install fails, `update` names the package manager and the exact command it ran, then one sanitized line of that manager's own output. That line is the last error line (`Error:` or an `ERR_` code) in its stdout or stderr, stderr's when both have one, because npm prints its error on stderr while pnpm 11 prints `ERR_PNPM_*` on stdout. A warning on stderr never hides that error. Without any error line, it is the last line of stderr, else of stdout. Terminal escapes and control characters are removed, your home directory becomes `~`, and the line is at most 300 characters. For example:
|
|
16
24
|
|
|
@@ -38,19 +46,27 @@ Gentle Shell is the Pi workspace experience provided by the `gentle-pi` package.
|
|
|
38
46
|
|
|
39
47
|
### Fullscreen layout
|
|
40
48
|
|
|
41
|
-
At 140 columns or wider, fullscreen
|
|
49
|
+
At 140 columns or wider, fullscreen with the header on top draws an IDE inside the terminal (design: [`design/shell-rework`](../design/shell-rework/02-proposal.html)), driven by [`lib/shell-sidebar-layout.ts`](../lib/shell-sidebar-layout.ts):
|
|
42
50
|
|
|
43
51
|
```text
|
|
44
|
-
✿
|
|
52
|
+
✿ gentle-pi ~/work/gentle-pi fleet adopt · claude (session)
|
|
53
|
+
… transcript … ▾ TODOS 2/6
|
|
54
|
+
✓ 2 done
|
|
55
|
+
◐ Run the full suite
|
|
56
|
+
└ job-1
|
|
57
|
+
─ ✿ waiting for input ───────────────── INSERT ─ ▾ AGENTS 3 running · 1 waiting
|
|
58
|
+
› type, or / for commands …
|
|
59
|
+
main ±3 │ SUPER-YOLO gpt-5.5 · medium │ ctx ▰▰▰▰▱▱▱▱ 45% │ $9.49 sub │ usage · alt+u
|
|
45
60
|
```
|
|
46
61
|
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
- Below 140 columns,
|
|
62
|
+
- **Title row.** The project name and path once, and the session name and profile on the right; when space runs out the path gives way first, so the profile always shows.
|
|
63
|
+
- **Page.** With a light theme (`appearance: "light"`) the fullscreen frame is painted on a paper background with the theme's text color, so a dark terminal never shows through the conversation, the gaps or the column beside the rail. Dark themes keep the terminal background. In Ghostty, set `window-padding-color = extend` so the window padding takes the same color.
|
|
64
|
+
- **Rail.** One tinted panel (the theme's `customMessageBg`) that runs to the bottom of the screen, not a stack of cards. Sections have a one-row header (`▾ NAME … count`, a click on it collapses the section) and dense rows, live work first: **Todos → Jobs → Agents → Changes → Review → Integrations**, then the key hints (`ctrl+shift+t todos · alt+u usage · / commands`). Finished todos fold into `✓ N done`; the task in progress (or blocked) wraps its title and note in full, the note hanging under it (`└ job-1`); other tasks take one clipped row. Agents list one row per agent with the task first, the agent kind, tokens and elapsed, ordered by what needs you (asking, running, queued, failed), finished agents folded into `✓ N done · /gentle:agents`, at most eight rows before `… N more`; a click on an agent row opens `/gentle:agents`. Every section header folds its section on a click (Changes, Review and Integrations too), and the Changes row opens `/gentle:changes`; hovering a control paints it in the shared hover role. Changes shows `N files` with `+added −deleted` or `clean`; Review appears only with current-session RDD evidence and says `needs you` on consent; With the `stats` section on (the Power user preset turns it on; Customize → Sections toggles it), a **Stats** section sits before Integrations: what the session spent, input/output tokens, cache hit rate and reads, tool calls with failures, what started subagents spent (runs · tokens · cost, from the Agents section), the span from the first to the last entry, and one row per model (turns · tokens · cost), most expensive first, with the numbers on their own row when the rail is too narrow. Integrations lists other extensions' statuses and says what the permission mode means without repeating it. An idle section keeps one muted row with the command that opens it. The panel is the same in every card style; `neon` and `float` dress transcript cards.
|
|
65
|
+
- **Status bar.** One full-width row under the transcript and the rail: branch and dirty count, a non-default permission mode once, then model · effort, the context gauge, cost and the subscription usage (clicking `usage` opens `/gentle:usage`). When space runs out, usage gives way first (gauges, secondary windows, the segment), then the model.
|
|
66
|
+
- **Editor.** A titled rule `─ ✿ <state> ──── <vim mode or esc hint> ─` above the input, which sits behind a `›` prompt with no frame; the state scans while the agent works and shows the ODD phase. In mobile/minimal fullscreen chrome, `[ Panel ]` appears on that rule and opens `/gentle:panel` even without live work or Vim; it and individual agent rows use the shared hover role to signal their click targets. Owned shell controls and unhandled transcript or blank-space motion clear the previous shell hover; arbitrary handled third-party components do not guarantee a leave notification. Row count, cursor, selection, autocomplete and mouse geometry stay native. When a subagent asks you a question (a dialog relayed to this session), a row above the editor says so: `? explore asked: Which file? … /gentle:agents`.
|
|
67
|
+
- The sidebar reuses its last frame until something it paints changes, so silent frames stay cheap; a per-section cache means one section's changing digest (or the header's) never forces an unrelated section to redraw.
|
|
68
|
+
- **Mobile and minimal.** Below 140 columns, or at any width with Status at the bottom (the **Light** preset), fullscreen with the header on top keeps the same split without the rail (design: [`05-mobile`](../design/shell-rework/05-mobile.html)): the title row carries the model, the status bar keeps branch, permission mode, running jobs (`⧗ 1 job`), context and cost, and the editor keeps its titled rule. Live work folds into one row drawn inside the editor, right above its rule — the current todo with `done/planned`, or the agents while they run (`◐ 3 agents · ? 1 waiting · ✗ 1 … 2/6 todos`) — replacing the Todos and Agents cards. Tapping that row opens `/gentle:agents` while the agents lead it (a subagent running or failed); otherwise the tap, like `/gentle:panel` at any width, opens the rail's sections as a full-width sheet hanging from the top; it leaves the bottom rows to the work row, the editor and the status bar, shows only the sections the rail would show (the Todos switch included), and holds the keyboard while open: `↑`/`↓` (or `j`/`k`) or the wheel scroll it, and `esc` (or `q`, or a click on `esc back`) closes it. The work row's `▸` lights up under the pointer to show it is clickable. A subagent question keeps its row above the editor on a phone too.
|
|
69
|
+
- Header placement is configurable. Below input, the header keeps its previous chrome, and the rail adds a Session section and keeps the permission mode in Integrations, since no title row or status bar shows them: the float footer groups Changes (when the session's roots have uncommitted work), header data, and locally owned integration statuses under one upper edge; it never duplicates statuses owned by the rail. Without a top header, or with Status hidden, a narrow fullscreen terminal keeps the bottom bar and the Agents and TODO cards above the editor. Regular mode keeps the compact one-line bottom bar and the above-editor Agents widget, without a fullscreen header or sidebar.
|
|
54
70
|
|
|
55
71
|
The regular-mode compact bar replaces pi's three-line footer with a single line of segments:
|
|
56
72
|
|
|
@@ -60,10 +76,11 @@ The regular-mode compact bar replaces pi's three-line footer with a single line
|
|
|
60
76
|
|
|
61
77
|
- Context is a gauge, not a number. It turns amber at 80% and red at 95%; after compaction it shows `?%` until the next response.
|
|
62
78
|
- Cost carries `sub` when the active model runs on a subscription login.
|
|
79
|
+
- `pi-claude-bridge` records every turn at $0, so a `claude-bridge` turn is priced at the Anthropic list price of the same model when it ends. The cost (shown with `sub`), the Stats section and `/gentle:stats` then show what those tokens would cost on the API, not what the subscription bills. Subagents price their `claude-bridge` turns the same way, so the Stats `agents` row adds them to subagents on other providers. Sessions recorded before this stay at $0.
|
|
63
80
|
- Statuses other extensions publish through `setStatus` are appended as trailing segments; the session name sits at the right edge.
|
|
64
81
|
- On narrow terminals the session name is dropped first, then trailing segments, before the line is truncated.
|
|
65
82
|
|
|
66
|
-
|
|
83
|
+
Outside the fullscreen IDE chrome, the prompt follows the selected card style. `neon` keeps pi's editor in its rounded frame:
|
|
67
84
|
|
|
68
85
|
```text
|
|
69
86
|
╭─ ✿ working ──────────────────────────────────────────╮
|
|
@@ -88,7 +105,8 @@ While a draft holds chips, a strip above the prompt lists each one:
|
|
|
88
105
|
|
|
89
106
|
- **Preview:** terminals with an image protocol (Kitty, Ghostty, WezTerm, Warp, iTerm2) draw a small thumbnail under each label while the agent is idle. While it works, and in terminals or multiplexers that hide the protocol (such as tmux), the label alone is shown, so streaming never re-sends the image to the terminal.
|
|
90
107
|
- **Clipboard sources:** the native clipboard on macOS and Windows; `wl-paste` or `xclip` on Linux. On WSL, a Windows screenshot (`Win+Shift+S`) is read from the Windows clipboard through `powershell.exe`, because the Linux clipboard never receives it.
|
|
91
|
-
- **
|
|
108
|
+
- **Pasted paths:** an image that arrives as a file path also becomes a chip. Herdr's desktop app and `herdr --remote` hand a clipboard image to a terminal on another machine as a temp file and paste its path (`herdr-paste-*.png`, `client-N-clipboard-*.png`); dropping images on a Herdr pane, or copying image files in a file manager, pastes quoted paths. Up to eight paths are read from the file itself, with spaces, `~` and `file://` forms. A paste that is not made only of image paths still goes through Pi unchanged.
|
|
109
|
+
- **What stays Pi's:** text, other files copied in a file manager, and image formats other than PNG, JPEG, WebP and GIF go through Pi's own paste handler unchanged.
|
|
92
110
|
- **Models without image input:** the strip warns before you send. If you send anyway, each chip becomes `[Image#N omitted: the current model does not accept images]` and a notice explains why, so nothing is dropped silently.
|
|
93
111
|
- **Numbering:** numbers keep counting up for the whole session, so a chip recalled from prompt history never points at a newer image. A recalled chip is plain text; paste the image again to attach it.
|
|
94
112
|
- **Sending while the clipboard is read:** reading the Windows clipboard on WSL takes about a second. If you send the message before it finishes, the image is discarded with a notice instead of landing in the next draft; paste again to attach it.
|
|
@@ -135,7 +153,34 @@ Captured evidence (`gentle-pi.session-change/v1`) is still stored for session st
|
|
|
135
153
|
|
|
136
154
|
### Command palette
|
|
137
155
|
|
|
138
|
-
`/gentle:commands` or `alt+k` opens a curated, grouped command menu, OpenCode-style — not a raw listing of every registered extension command. Entries are grouped under Configuration, Session, Diagnostics, and Skills, each shown by a human label with its
|
|
156
|
+
`/gentle:commands` or `alt+k` opens a curated, grouped command menu, OpenCode-style — not a raw listing of every registered extension command. Entries are grouped under Configuration, Session, Diagnostics, and Skills, each shown by a human label with its current key where it has one (a key saved but not yet applied reads `(reload)`); a command only appears when it is both in the curated set and actually registered. The Search row filters by label, by the underlying command name, and by description; arrows or `ctrl+j`/`ctrl+k` move, enter runs the highlighted entry exactly as if its command had been typed, `tab` assigns a key to it (press the key next; escape cancels), escape closes. `GENTLE_PI_COMMANDS_KEY` rebinds the shortcut; `off` disables it. Built-in Pi commands are not listed. The default is `alt+k`, not `ctrl+k`, because Pi reserves `ctrl+k` for the editor's delete-to-line-end action.
|
|
157
|
+
|
|
158
|
+
### Guided tour
|
|
159
|
+
|
|
160
|
+
`/gentle:guide` gives a guided tour of Gentle Shell, one step at a time, in the style of [driver.js](https://driverjs.com/). Each step is a popover beside the part of the screen it describes (the prompt, the sidebar or the middle of the screen) with a step counter and the command and key to try it.
|
|
161
|
+
|
|
162
|
+
- **With a model**, the agent drives the tour through its `gentle_guide` tool and explains each step in the chat. The popover never takes the prompt's focus: reply to continue, or ask anything and the agent answers before moving on.
|
|
163
|
+
- **Without a model**, or with `/gentle:guide local`, you step through it yourself: `→`, `Enter` or `Space` next, `←` back, `Esc` ends.
|
|
164
|
+
- `/gentle:guide stop` closes the tour at any point.
|
|
165
|
+
|
|
166
|
+
Steps only appear for features the session has (for example, Design only when `/gentle:design` is registered). The startup banner ends with a one-line reminder of `/gentle:guide` on every start, while the command exists.
|
|
167
|
+
|
|
168
|
+
### Keymaps
|
|
169
|
+
|
|
170
|
+
Every Gentle shortcut, and any command in the palette, can get a key of your choice:
|
|
171
|
+
|
|
172
|
+
- `/gentle:customize` → **Keymaps** lists each action with its current key. `Enter` waits for the new key, `⌫` disables the key, `r` restores the default, and the last row reloads.
|
|
173
|
+
- In the command palette, `tab` assigns a key to the highlighted command.
|
|
174
|
+
|
|
175
|
+
Keys are saved in `keymaps.json` in the Gentle config home and **apply after `/reload`**, because Pi reads shortcuts only at startup and on reload; the shell says so after every change.
|
|
176
|
+
|
|
177
|
+
| Rule | Behavior |
|
|
178
|
+
|---|---|
|
|
179
|
+
| Typing keys | Only keys with `ctrl` or `alt` (with or without `shift`), or `f1`-`f12`, can be assigned. |
|
|
180
|
+
| Keys Pi reserves | Refused with the Pi action that owns them (for example `ctrl+k`, delete to line end). |
|
|
181
|
+
| A key another action uses | Asks first; confirming moves the key and leaves the other action without one. |
|
|
182
|
+
| Environment variables | A `GENTLE_PI_*_KEY` variable still wins; its row shows the variable and cannot be changed there. |
|
|
183
|
+
| Unreadable `keymaps.json` | The default keys apply, startup warns once, and the file is never overwritten. |
|
|
139
184
|
|
|
140
185
|
To use `ctrl+p` like OpenCode, rebind Pi's `app.model.cycleForward` in `~/.pi/agent/keybindings.json` (Pi reserves that action, so an extension cannot take `ctrl+p` while it holds it) and set `GENTLE_PI_COMMANDS_KEY=ctrl+p`.
|
|
141
186
|
|
|
@@ -155,7 +200,7 @@ The panel rows a provider reports its windows with:
|
|
|
155
200
|
|
|
156
201
|
- For Codex, usage comes from the same account usage endpoint the Codex CLI reads, using the OAuth token pi already holds. It is fetched at session start, at most every 5 minutes after a turn, and on `r` in the panel. Rate-limit headers on SSE responses are picked up too. Codex windows require a finite positive duration reported by the provider; missing or invalid durations are ignored, never shown as `0m` or replaced with an assumed `5h` quota. A real `0%` remains visible when its window is valid, and a response with no valid header windows leaves the previous snapshot untouched. The same refresh covers every provider the session targets: the active model's own provider plus every provider the session profile's subagent routing names — the same profile subagent launches use: the profile selected in this session, otherwise the profile the session froze at startup from the local pin, the repository declaration, or the global active profile (see [Session profile frozen at startup](readme-reference.md#session-profile-frozen-at-startup)). Each provider keeps its own 5-minute window, its own stale-source guard, and its own last good snapshot. Providers refresh concurrently, each inside its own bounded window (default 10s, `GENTLE_PI_SHELL_USAGE_TIMEOUT_MS`): the abort signal reaches the underlying fetch — composed with the caller's own signal when it carries one, never replacing it — a provider that outlives its window wears the generic failure note, and whatever it answers afterwards is discarded — a late answer never replaces what the timeout settled, exactly like the stale-source guard above.
|
|
157
202
|
- A routing entry names its provider with a qualified ref (`provider/model`); a bare model id is resolved through the model registry only when exactly one provider carries that id, and is left untargeted rather than guessed when none or several do. The targeted scope is resolved when a refresh runs — at session start, on each turn's throttled refresh, on `r` or reopening the panel, and when a usage source registers — so a profile selected in the session (or a default change in `follow` mode) is picked up by the next refresh rather than live per render.
|
|
158
|
-
- For Claude Pro/Max, usage arrives in the rate-limit headers of every response, so the 5h and weekly windows appear after the first turn.
|
|
203
|
+
- For Claude Pro/Max, usage arrives in the rate-limit headers of every response, so the 5h and weekly windows appear after the first turn. `pi-claude-bridge` 0.9.3 and later forward Claude Code's usage updates as those same headers, so a `claude-bridge` session shows them too. A header snapshot is filed under the provider that served the response (the session's `claude-bridge`, not `anthropic`), and falls back to the provider the headers name only when no model is known.
|
|
159
204
|
- For NaN Cloud, usage comes from the quota endpoint the official dashboard reads, with the same API key pi already holds. Each metered model reports one allowance for the billing period, and that window carries no label: the model id names it in the bar and the reset text says what it is in the panel. A model that also reports a rolling window shows that one labeled next to it (`4h`), which today's payload does not send; percentages are tokens used over the allowance, exactly as the dashboard draws them, and the allowance is the full-period cap (`fullCap`) whenever the model reports a positive one, because `cap` alone is the prorated allowance of the period in progress. It is fetched under the same 5-minute rule as Codex, counted per provider so a switch fetches the provider it switched to, refuses redirects so the bearer cannot be replayed to another origin, and keeps no cached copy. The endpoint sits outside NaN's published OpenAPI, so the parser reads it defensively: a model that reports no allowance is skipped, as the dashboard skips it, while a metered model whose usage cannot be read fails the whole read, so a partial payload never replaces a complete snapshot with a cheaper-looking one. A session that already has a snapshot keeps the last valid one through a malformed payload or a failed fetch, and the pending note appears only while there is nothing to draw.
|
|
160
205
|
- Extensions can register a usage source for their own provider: gentle-shell has no built-in knowledge of it, but treats it exactly like Codex or NaN once registered. Emit `gentle-pi:usage-source/v1` on `pi.events` with `{ schema: "gentle-pi.usage-source/v1", provider, pendingNote?, fetch(apiKey, fetchFn, now) }`, where `fetch` resolves a `ProviderUsage` the same shape the built-in providers produce, or `undefined` when there is nothing to show yet. A malformed payload, a `fetch` that isn't a function, a provider id outside the safe id pattern, or a `fetch` call that throws or rejects is ignored rather than crashing the shell. The `fetchFn` a source receives is bounded the same way: once the provider's window expires it aborts, and a later resolution is discarded. Re-registering the same provider replaces its source, so emitting again at every `session_start` is safe and keeps load order irrelevant. Once registered, the provider shows `pendingNote` (or the same "no usage yet · r to fetch" default the built-ins use) until its first fetch, and a registration that arrives after the session already started, for any targeted provider (the session's own or a subagent route of the session profile), triggers one immediate refresh of that provider instead of waiting for the next turn or the 5-minute window. Example, using a neutral provider id:
|
|
161
206
|
|
|
@@ -209,7 +254,7 @@ Pick the conversation-card and shell-chrome style in `/gentle:customize` → **C
|
|
|
209
254
|
▎
|
|
210
255
|
```
|
|
211
256
|
|
|
212
|
-
- `float` applies to tool, Code and 🌹 cards, Agent
|
|
257
|
+
- `float` applies to tool, Code and 🌹 cards, agent tool cards, Agent answer and stale cards, the review preflight reminder, the dev-binary notice, and the Agents, Todos and Status panels. The prompt and fullscreen header/footer use their specialized float chrome described above. The regular-mode one-line Status bar is unchanged.
|
|
213
258
|
- A theme without a tool background, or a card narrower than 10 columns, falls back to `neon`. A malformed `card-style.json` reads as `float` and the panel refuses to overwrite it.
|
|
214
259
|
|
|
215
260
|
### Card content
|
|
@@ -227,6 +272,8 @@ Quiet tool cards redraw immediately after a change; bash rows follow on new call
|
|
|
227
272
|
|
|
228
273
|
With quiet tools enabled, `codemode` uses the same rounded **Code** card. The collapsed view shows up to eight observed child calls in their original order, including repeats, with Pi's actual status and available nonnegative duration. Additional calls and failures are counted. Error payloads have a separate two-row preview even when their child falls outside the first eight; final output has a three-row physical budget, and a full-output locator remains visible when available.
|
|
229
274
|
|
|
275
|
+
The same registration adds thin-orchestration rules to `codemode`'s prompt guidelines, after Pi's own guideline. Pi puts them in the system prompt only while `codemode` is active, in the primary session and in subagents. They ask the model to give each script one coherent objective, run only independent calls together with `Promise.allSettled()`, check each result's failure fields (such as bash `exit_code` or MCP `isError`) instead of trusting a fulfilled promise, treat side effects as non-transactional, return evidence rather than hiding failures, move long waits to background tools (or one bounded direct foreground call when those are unavailable), and discover unfamiliar tools with `searchTools()` and `describeTool()`. Discovery does not make a tool callable: direct-only tools stay direct-only, and permissions, consent, and sandbox boundaries still apply, since codemode never bypasses them. The rules live in `CODEMODE_GUIDELINES` in `lib/codemode-renderer.ts`.
|
|
276
|
+
|
|
230
277
|
- JavaScript and child arguments stay out of the collapsed preview. Expand with the configured key shown in the top rule for the actual script, all observed children, complete available error/output text, image fallback and full-output locator.
|
|
231
278
|
- Host failure/partial flags and observed child failures retain their existing semantic colors; no generic `finished` heading, inferred children, progress percentage, or aggregate duration is added. Pi's final status/wall-time header stays in expanded output rather than displacing useful collapsed content. Child success does not promise rollback or overall success.
|
|
232
279
|
- Missing metadata is reported honestly. Terminal controls are stripped from displayed text; this is terminal-spoofing protection, **not secret redaction**. Both collapsed previews and expanded content can contain sensitive data.
|
|
@@ -245,7 +292,7 @@ Gentle Shell ships its own interactive tools instead of depending on third-party
|
|
|
245
292
|
|
|
246
293
|
### Gentle Agents
|
|
247
294
|
|
|
248
|
-
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.
|
|
295
|
+
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.
|
|
249
296
|
|
|
250
297
|
The `subagent_*` tools and the agents card replace the third-party subagents package (remove `npm:pi-subagents-j0k3r` from your pi packages; while it is still installed the tools stay unregistered and a warning says so at startup). Agent definitions and settings are the ones you already have: markdown agents in `~/.pi/agent/agents/`, `~/.pi/agent/subagents/`, `<cwd>/.pi/agents/`, `<cwd>/.pi/subagents/` (project beats global, `subagents/` beats `agents/`), and `subagents.json` at the global and project level (`default_model`, `default_effort`, `default_mode`, `model_profiles`, `stall_timeout_ms`, `tool_stall_timeout_ms`, `max_concurrency`, `history_max_tasks`).
|
|
251
298
|
|
|
@@ -273,11 +320,14 @@ In the isolated Gentle Shell home, `settings.json` does not declare gentle-pi; t
|
|
|
273
320
|
- A takeover forwards every package the parent loaded, so a settings package with no extensions (for example a skills-only package with only a `package.json`), which already makes the takeover parent fail with `Failed to load extension`, makes the child fail the same way; this limitation predates forwarding.
|
|
274
321
|
|
|
275
322
|
- `subagent_list_agents`, `subagent_run` (`agent`, `task`, `label?`, `context?`, `workspace_root?` or `repository_root?`, `mode?` task or background), `subagent_status`, `subagent_result`, `subagent_list_tasks`, `subagent_reply` (one current-session reply to a live child query), `subagent_cancel`, `subagent_send_message` (steer a running child), `subagent_continue` (resume a finished task in its own session).
|
|
323
|
+
- Each agent tool call renders as one continuous card in the active card style: the call draws the heading and a `running…` row while it waits, and the result continues the same card and closes it. `subagent_result` is the exception: its call draws nothing and a poll of a running task renders no rows; any other result draws a card with its own `↩ Agent answer` heading. The heading names the action with its own glyph (`→ Delegating`, `◎ Agent status`, `↩ Agent answer`, `⨯ Stopping agent`, `✉ Messaging agent` / `✉ Replying to agent`, `↻ Resuming agent`, `☰ Agent tasks` / `☰ Agent roster`) and the agent; calls that carry only a task id resolve the agent's name from the tasks already loaded in this session, and otherwise show `task <id>` alone (a task from an earlier session loads only when the call runs). The heading also names what the child runs on — `provider/model · effort`, resolved from the child's own report and reading `inherit` when no layer picked a model — which a launch learns only once its result exists. A heading that cannot hold all of it with the expand hint sheds effort first, then the model, then the task id, and finally the agent name — the hint itself never goes. Status and answer bodies lead with the task state in uppercase (`RUNNING`, `WAITING`, `COMPLETED`, `FAILED`, `CANCELLED`, `TIMED OUT`) in its role color. A status card follows it with the task label and last step; collapsed, it keeps those three on one row each, clipping them on narrow terminals, and expanded, it also shows the workspace and any error. An answer card follows the state with the answer or error text. Agent cards for work in progress wear their own iris chrome (frame, heading, glyph, the running state and the float tint) in every theme. Waiting, finished, failed and stale cards take the theme's warning, success or error color for their frame and heading, and the theme's background; text and hints always keep the theme's colors. A call that fails before any task exists — a rejected workspace or repository scope, for instance — keeps its action heading in the error color and leads its body with a `FAILED` pill, so a delegation that never happened never reads as one still running. Card headings stay on one row: a line break in an agent name or task id is folded into a space. Results without structured task details keep a plain text preview. The text the model reads is unchanged.
|
|
276
324
|
- `orchestrator_session_id`, `orchestrator_list`, and `orchestrator_send_message` provide local-profile session notifications. List results advertise IDs only and reachability remains unknown. Sending selects the sole advertised peer or asks the user to choose; outbound messages require explicit interactive human consent before dispatch (Allow once, Allow for this session, or Deny), and fail closed if interactive UI or its selector is unavailable, even after a session grant. Each send requires a caller-supplied reason with at least 8 characters after trimming and at most 512 UTF-8 bytes. The consent preview visibly escapes controls and Unicode line separators; the delivered message remains unchanged. A successful ACK means the peer accepted the notification for delivery, not that it read or completed work. This is notification-and-ACK transport only: it has no cross-session queries, offline queue, retries, broadcasts, or read/completion guarantees. On Unix, presence records remain in the profile's private transport directory while socket endpoints use a private, profile-hashed directory below the canonical system temporary directory, keeping endpoint length independent of the profile path and at most 100 encoded bytes. The shared system temporary parent is only validated (current-user-owned without group/other write, or root/current-user-owned, world-writable, and sticky); it is never claimed, permissioned, or cleaned up by gentle-pi. On POSIX, the transport uses private Unix-domain sockets; on Windows, it uses private named pipes scoped by the current account SID, served by a package-local PowerShell helper (`runtime/windows-session-transport.ps1`): the transport selects that fixed helper, and availability and delivery depend on the helper's bounded startup and pipe checks. Notification and ACK limits remain bounded across platforms.
|
|
325
|
+
|
|
326
|
+
Windows discovery checks pipe availability without connecting or consuming an accept slot. Each check waits at most 1ms, over at most 64 directory entries; only a missing pipe is classified as dead. Busy pipes, timeouts, access errors, and other inconclusive results retain unknown reachability. Dead records are omitted even if cleanup cannot safely acquire them. Best-effort cleanup revalidates the exact file identity, private ACL, and record contents through a rooted handle that prevents write/delete sharing, checks pipe absence again, and deletes through that same handle. Reopening a session creates a separate activation; cleanup does not remove its newer record.
|
|
277
327
|
- `subagent_run.workspace_root` selects the parent's main worktree or an existing linked worktree in the parent's Git clone only. Validation happens before queueing; the child runs at that canonical root. Successful OS spawn registers it in the originating parent's same-clone registry, including delayed queued launches; failed spawns do not register.
|
|
278
328
|
- Alternatively, `subagent_run.repository_root` selects an explicit canonical root of an independent Git repository; the two root selectors cannot be combined. A direct interactive parent must grant that clone before queue or child session-directory writes. The grant belongs to the live parent session and canonical Git common directory: subsequent launches there can reuse it, but denial, cancellation, lost UI, reload, or changed session/repository identity fails closed. Print, RPC, and child callers cannot request a foreign target; foreign remediation launches are unsupported. Task and background launches still obey their ordinary mode restrictions. Queued tasks revalidate immediately before spawn; `subagent_continue` retains the target cwd and revalidates the grant rather than prompting to restore a lost one. Status and task details expose the cwd. Foreign children never enter the same-clone registry or its footer/widget counts. A delegation grant is not permission to review, commit, push, or deliver in the target repository.
|
|
279
329
|
- Background work requires a live interactive/RPC parent. Both `subagent_run` and `subagent_continue` reject background mode in `pi -p` before creating or spawning a task: the parent exits before it can receive a later result. Use task mode for bounded print-mode work.
|
|
280
|
-
- A background task's result comes back to the model as a `gentle-agents.result` message and starts a new turn when the agent is idle; the model never polls. Its
|
|
330
|
+
- A background task's result comes back to the model as a `gentle-agents.result` message and starts a new turn when the agent is idle; the model never polls. Its **↩ Agent answer** card uses the success color when the task completed and the error color otherwise. Collapsed, it shows at most three rows: the task state in uppercase when the result carries task details, then the first non-blank rows of the answer or error, leaving out the `Subagent … (task …) <outcome>.` bookkeeping line the model reads; older results without that line preview their text unmodified, within the same three rows. Expanded, it shows the complete message, header included. A result held past the stale window does not replay its report: the model gets a compact `gentle-agents.stale-notice` naming the task and telling it to call `subagent_result` (an idle parent is woken for it), and the human gets a **↩ Stale agent answer** card in the warning color that previews up to three rows of its warning and never shows an answer it does not have. A completion whose forwarding fails stays queued for the next turn boundary instead of being lost. An idle parent has no boundary coming, so a failed delivery or a wake the host rejects there is retried after the wake grace, at most three times in a row.
|
|
281
331
|
- A configured child can call `subagent_parent_message` with bounded, well-formed Unicode text. Notifications retain their existing admission semantics. A `kind: "query"` waits for one strictly correlated `subagent_reply` for at most 30 seconds; each child has at most four pending queries, and disconnect, timeout, stop, and send failure settle each request once. The current parent session alone can reply. The first admitted task-mode query ends the original tool response while its child keeps running; its eventual non-cancelled completion returns once as a follow-up only if that same session is still active. Channel closure prevents later sends and automatic retry is not provided. Peer transport, offline delivery, retries, and broadcasts are unsupported.
|
|
282
332
|
- The card shows the active session's tasks only: after `/new` or `/resume` the earlier session's tasks leave it and come back with their session. Finished rows stay for one minute (three at most), and the card spends at most a quarter of the terminal (three to eight rows) on tasks; beyond that the rest fold into one `… N more · alt+a to view` line so the editor never leaves the screen. Questions and running work keep their rows first.
|
|
283
333
|
- `/gentle:agents` or `alt+a` opens a full-terminal overlay. At 60+ columns, the split view shows groups/tasks beside the retained semantic thread; uppercase `F` or **Fullscreen** expands that thread. At 12–59 columns, click a current subagent directly to inspect its thread; in All sessions, first select its orchestrator. `Enter`/`Tab` also enter a narrow selection. **Back** or `Escape` returns one level, closing only at the root; **Close** or `q` closes globally without cancelling children. Selection and manual thread scrolling survive Back and resize.
|
|
@@ -288,7 +338,7 @@ In the isolated Gentle Shell home, `settings.json` does not declare gentle-pi; t
|
|
|
288
338
|
- Presence refresh is paged while the overlay is open. Graceful shutdown withdraws an instance; after abrupt closure its last heartbeat may remain visible for up to 15 seconds plus the time to complete the next directory refresh. A recent heartbeat is a heuristic, not proof that a process is alive. Same-profile, same-user processes share retained activity text; this is not an authorization channel.
|
|
289
339
|
- `alt+s` confirms stopping the current active or queued subagents owned by the current process. `GENTLE_PI_AGENTS_STOP_KEY` rebinds it; `off` disables it.
|
|
290
340
|
- Finished tasks are written to `~/.pi/agent/gentle-agents/tasks/` (one JSON per task, newest `history_max_tasks` kept, default 200) and come back on demand for `subagent_result` and `subagent_continue`; an id looked up this way from an unrelated session never enters the overlay or becomes cancellable. Child sessions live under `~/.pi/agent/gentle-agents/sessions/`.
|
|
291
|
-
- `ctrl+shift+a` or a left click on the card's `▾ Collapse` / `▸ Expand` header control collapses the card to its first row (`GENTLE_PI_AGENTS_KEY` rebinds the key), `GENTLE_PI_AGENTS_VIEW_KEY` rebinds the overlay, `GENTLE_PI_AGENTS_PI` overrides the pi command used for children, and `GENTLE_PI_AGENTS=0` disables the tools and the card.
|
|
341
|
+
- `ctrl+shift+a` or a left click on the card's `▾ Collapse` / `▸ Expand` header control collapses the card to its first row, and a left click on an agent row opens the `/gentle:agents` overlay (`GENTLE_PI_AGENTS_KEY` rebinds the key), `GENTLE_PI_AGENTS_VIEW_KEY` rebinds the overlay, `GENTLE_PI_AGENTS_PI` overrides the pi command used for children, and `GENTLE_PI_AGENTS=0` disables the tools and the card.
|
|
292
342
|
|
|
293
343
|
### Background jobs
|
|
294
344
|
|
|
@@ -401,7 +451,7 @@ The canvas server binds `127.0.0.1` on a random port and needs a random per-serv
|
|
|
401
451
|
|
|
402
452
|
### Bridge providers
|
|
403
453
|
|
|
404
|
-
Idle Claude Bridge continuation uses the normal user-prompt lifecycle so prompt preparation and tool declarations are retained. Gentle Agents hides only its exact, uniquely generated reserved wake in Pi's interactive transcript; child result and query cards remain visible. Native providers keep their hidden `display: false` custom wake.
|
|
454
|
+
Idle Claude Bridge continuation uses the normal user-prompt lifecycle so prompt preparation and tool declarations are retained. Gentle Agents hides only its exact, uniquely generated reserved wake in Pi's interactive transcript; child result and query cards remain visible. Native providers keep their hidden `display: false` custom wake. Pi gives custom messages to the model with the user role, so the native wake carries the same "not written by the user" label as the Bridge wake and asks for a reply in the language of the human's own last message, never the language of the notification or of the subagent output. The Bridge wake text is unchanged because persisted wake identities embed it.
|
|
405
455
|
|
|
406
456
|
The reserved identity is stored once per session as a non-context custom entry and reconstructed on reload/resume, including identities on abandoned branches. It is session-owned: switching sessions releases the previous identity. Ordinary text quoting the old notification, prefixes, substrings, and whitespace variations is not hidden. Pi's transformer exposes no author/message ID, so an exact copy of the current reserved identity is indistinguishable from its generated wake.
|
|
407
457
|
|
package/docs/install-wizard.md
CHANGED
|
@@ -734,7 +734,7 @@ PNPM_HOME, `pnpm add -g @earendil-works/pi-coding-agent@1.0.0 gentle-pi@4.0.0`
|
|
|
734
734
|
lists Pi 1.0.0 while the Pi beside gentle-pi is 1.1.0. So Gentle Shell may run a
|
|
735
735
|
Pi newer than `PI_INSTALL_VERSION`, always at least the minimum: the runner
|
|
736
736
|
verifies that Pi (`verify-global-list`, the setup recovery, a pnpm
|
|
737
|
-
`verify-updated-shell`) and, when it is not `PI_INSTALL_VERSION` (1.
|
|
737
|
+
`verify-updated-shell`) and, when it is not `PI_INSTALL_VERSION` (1.5.0 now; the 1.0.0/1.1.0/1.2.0 figures above are that older verification), the outcome says which Pi
|
|
738
738
|
Gentle Shell runs. `--config.auto-install-peers=false` would leave gentle-pi
|
|
739
739
|
with no Pi beside it, so the launcher would run any `pi` on PATH, and
|
|
740
740
|
`--config.overrides` is ignored for global installs.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Observe native MCP connection status
|
|
2
|
+
|
|
3
|
+
Gentle Shell extensions use Pi's native MCP status API directly. No second MCP manager, polling command or installed-dependency patch is involved.
|
|
4
|
+
|
|
5
|
+
## Availability
|
|
6
|
+
|
|
7
|
+
Use a Pi build that exposes `pi.getMcpStatus()` and `pi.onMcpStatusChanged()`. Published Pi 1.4.0 predates these methods; this Shell change does not claim that an upstream release is already available or raise the optional peer requirement to a nonexistent version. Feature-detect both methods on older Pi builds.
|
|
8
|
+
|
|
9
|
+
The native implementation targets Pi base `6291b9b` (commit `c8fb968` on a local contribution branch) and has not yet been proposed upstream. Shell never patches installed dependencies to provide it.
|
|
10
|
+
|
|
11
|
+
Configured-server counts and `pi.getAllTools()` are **not** connection health. A server can retain registered tools after its transport dies. Until the native API is available, show `connection status: /mcp`, not an inferred ready/error state.
|
|
12
|
+
|
|
13
|
+
## Extension example
|
|
14
|
+
|
|
15
|
+
This optional JavaScript extension uses the existing footer-status interface; it is not enabled by default:
|
|
16
|
+
|
|
17
|
+
```javascript
|
|
18
|
+
export default function (pi) {
|
|
19
|
+
let subscription;
|
|
20
|
+
pi.on("session_start", (_event, ctx) => {
|
|
21
|
+
subscription?.dispose();
|
|
22
|
+
if (typeof pi.getMcpStatus !== "function" ||
|
|
23
|
+
typeof pi.onMcpStatusChanged !== "function") {
|
|
24
|
+
ctx.ui.setStatus("mcp-health", "connection status: /mcp");
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const render = (all) => ctx.ui.setStatus("mcp-health",
|
|
28
|
+
all.map((server) => server.name + " · " + server.state +
|
|
29
|
+
(server.error ? " (" + server.error.kind + ")" : "")).join(" | ") || undefined);
|
|
30
|
+
subscription = pi.onMcpStatusChanged(render);
|
|
31
|
+
render(pi.getMcpStatus());
|
|
32
|
+
});
|
|
33
|
+
pi.on("session_shutdown", () => subscription?.dispose());
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Snapshots contain only `name`, `state`, optional `tools` and `error.kind`, and `since`. States are exactly `connecting`, `ready`, `error`, `disabled`; categories are `auth`, `timeout`, `transport`, `config`, `unknown`. The normalized name matches the tool namespace suffix: `dev-docs` becomes `dev_docs` in `mcp__dev_docs`.
|
|
38
|
+
|
|
39
|
+
Reads and subscriptions never start connections, retries or authentication. Events include count/category changes; `since` changes only when the public state changes. Empty snapshots do not prove health: the native manager may not have started, may be disabled/replaced, or may have no servers. Invalid entries without runtime records remain diagnostics in `/mcp`.
|
|
40
|
+
|
|
41
|
+
The API excludes credentials, configuration values, URLs, raw errors, stderr and auth prompts. Keep all authentication and connection management in `/mcp`.
|
|
42
|
+
|
|
43
|
+
## Maintainer integration check
|
|
44
|
+
|
|
45
|
+
Build the Pi coding-agent package containing the API, then run:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
GENTLE_MCP_STATUS_PI_ROOT=/path/to/pi/packages/coding-agent \
|
|
49
|
+
node --experimental-strip-types --test tests/maintainer/mcp-status.maintest.ts
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
The explicit probe uses Shell's child invocation builder and Pi's real bundled CLI with a disposable home, an inert disabled MCP server and a synthetic provider that rejects model calls. It checks the exact snapshot and change event for one disabled server — normalized namespace and no fields beyond `name`, `state` and `since` — the exit status, that a server environment value never appears in the output, plus empty stdout and one exact status report on stderr (Pi's print-mode output guard redirects extension writes there). It does not exercise `tools`, `error.kind`, state transitions or provider credentials; Pi's own tests cover the full state, error-category and redaction contract. Without the selected runtime it reports a skip, not proof of API support. It neither reads your MCP configuration nor contacts a server or model provider.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Prompt byte budgets
|
|
2
|
+
|
|
3
|
+
The regression test measures a fixed primary-session fixture, not every live Pi loadout. Run it with:
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
node --experimental-strip-types --test tests/orchestrator-prompt-budget.test.ts tests/session-subject-routing-contract.test.ts tests/orchestrator-state.test.ts tests/orchestrator-work-search.test.ts tests/orchestrator-status-publication-contract.test.ts
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Use isolated temporary and Gentle Pi configuration directories when running tests.
|
|
10
|
+
|
|
11
|
+
## Budgets and measurements
|
|
12
|
+
|
|
13
|
+
| Measurement | Ceiling | Before | After |
|
|
14
|
+
| --- | ---: | ---: | ---: |
|
|
15
|
+
| Rendered orchestrator core plus selected declarations | 16,600 B | 16,990 B | 16,554 B |
|
|
16
|
+
| Fixed assembled system text | 40,000 B | 33,993 B | 33,993 B |
|
|
17
|
+
|
|
18
|
+
The core is 9,114 B in both targeted measurements. The selected declarations decreased from 7,876 B to 7,440 B: a 436 B reduction. They are measured as UTF-8 bytes of compact JSON containing each registered tool's name, description and parameters, in the fixed order `orchestrator_session_id`, `orchestrator_list`, `subagent_run`. The targeted cap leaves 46 B of headroom. Only descriptions changed; the test also pins each tool's schema with descriptions excluded. The focused command includes the existing session-subject contract tests, retaining their exact exemption, identity-preservation, and privacy phrases.
|
|
19
|
+
|
|
20
|
+
The baseline is commit `eff5d24694b21663095a4790b3ef15de21c290c2`. Running the same fixture with that commit's `gentle-agents.ts` loaded in memory fails the targeted budget at 16,990 B and passes the non-description schema checks. The assembled system text is unchanged: this compaction reduces selected declaration bytes, not system-message bytes. These fixture results are not directly comparable to historical measurements with other loadouts or Pi versions.
|
|
21
|
+
|
|
22
|
+
## Fixed assembly fixture
|
|
23
|
+
|
|
24
|
+
The test calls Pi 1.4's actual pure system prompt builder, with the primary Gentleman harness in TUI mode, background policy off, RDD status unknown, and the verified mirrored review fragment. The production `appendSystemPromptOnce` helper appends harness then review; both complete fragments must appear exactly once in the assembled text. An explicit project-policy file inside the temporary fixture pins background off above ambient/global configuration; a regression check renders under both ambient `off` and `on` and requires identical output. Active tools are `read`, `bash`, `edit`, `write`, and the three named declarations above. Registered tool snippets and guidelines and one `work-unit-commits` skill are passed to the builder. The assets, installation/docs, fixture cwd and skill paths in the generated text are normalized to fixed `/fixture` paths before counting UTF-8 bytes.
|
|
25
|
+
|
|
26
|
+
Pi 1.4 does not export the builder at its package root. This test deliberately resolves its installed internal `core/system-prompt.js` adjacent to the public entrypoint; an upstream move or API change fails the test and requires maintenance. It starts no session and makes no model or native-review call.
|
|
27
|
+
|
|
28
|
+
The assembly budget excludes other extensions' guidelines, other skills, project instructions, dynamic session state, and provider serialization. The three declaration bytes are reported separately, not as part of the assembled system-text count. The fixture is not an exact provider request or a guarantee for other configurations. Bytes are not tokens, and these measurements do not establish latency or cost savings.
|