gentle-pi 4.7.0 → 4.9.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 +115 -44
- package/assets/agents/gentle-ai-explore.md +3 -3
- package/assets/agents/gentle-ai-verify.md +20 -6
- package/assets/agents/gentle-ai-worker.md +14 -13
- package/assets/agents/jd-judge-a.md +1 -3
- package/assets/agents/jd-judge-b.md +1 -3
- package/assets/agents/review-readability.md +1 -5
- package/assets/agents/review-reliability.md +1 -5
- package/assets/agents/review-resilience.md +1 -5
- package/assets/agents/review-risk.md +1 -5
- package/assets/design-canvas/canvas-api.js +45 -0
- package/assets/design-canvas/canvas-boards.js +476 -0
- package/assets/design-canvas/canvas-boot.js +219 -0
- package/assets/design-canvas/canvas-checks.js +491 -0
- package/assets/design-canvas/canvas-comments.js +315 -0
- package/assets/design-canvas/canvas-compare.js +159 -0
- package/assets/design-canvas/canvas-events.js +75 -0
- package/assets/design-canvas/canvas-export.js +393 -0
- package/assets/design-canvas/canvas-focus.js +203 -0
- package/assets/design-canvas/canvas-handoffs.js +150 -0
- package/assets/design-canvas/canvas-i18n-es.js +397 -0
- package/assets/design-canvas/canvas-i18n.js +108 -0
- package/assets/design-canvas/canvas-layout.js +526 -0
- package/assets/design-canvas/canvas-menu.js +219 -0
- package/assets/design-canvas/canvas-messages.js +86 -0
- package/assets/design-canvas/canvas-minimap.js +163 -0
- package/assets/design-canvas/canvas-parts.js +401 -0
- package/assets/design-canvas/canvas-popover.js +234 -0
- package/assets/design-canvas/canvas-rail.js +351 -0
- package/assets/design-canvas/canvas-sizes.js +524 -0
- package/assets/design-canvas/canvas-store.js +167 -0
- package/assets/design-canvas/canvas-theme.js +69 -0
- package/assets/design-canvas/canvas-tokens.js +674 -0
- package/assets/design-canvas/canvas-ui.js +24 -0
- package/assets/design-canvas/canvas-view.js +184 -0
- package/assets/design-canvas/canvas.css +773 -17
- package/assets/design-canvas/canvas.js +2 -1506
- package/assets/design-canvas/index.html +120 -36
- package/assets/design-canvas/inspector.js +574 -21
- package/assets/design-canvas/theme-early.js +10 -0
- package/assets/install-wizard/wizard.js +5 -1
- package/assets/migrations/agent-body-history.json +30 -0
- package/assets/orchestrator-delegation-reference.md +8 -14
- package/assets/orchestrator-delegation.md +5 -9
- package/assets/orchestrator-full-delegation-card.md +11 -16
- package/assets/orchestrator-full-delegation.md +9 -9
- package/assets/orchestrator-memory.md +4 -4
- package/assets/orchestrator-prompts.md +3 -31
- package/assets/orchestrator-quota-recovery.md +5 -0
- package/assets/orchestrator-skills.md +13 -12
- package/assets/orchestrator-tracking.md +13 -17
- package/assets/orchestrator-verification.md +12 -10
- package/assets/orchestrator-writer.md +13 -13
- package/assets/orchestrator.md +20 -24
- package/bin/gentle-shell.mjs +205 -10
- package/contracts/review-provider-contract-mirror/provider-contract.lock.json +8 -9
- package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.6.0}/bundle/manifest.json +3 -3
- package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.6.0}/bundle/orchestration/pi.md +2 -1
- package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.6.0}/bundle/routing/pi.md +16 -16
- package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.6.0}/generated/provider-capabilities.baseline.json +3 -3
- package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.6.0}/generated/provider-roles.baseline.json +1 -1
- package/docs/assets/brand/sponsor-banner.svg +60 -0
- package/docs/assets/features/gentle-tower.png +0 -0
- package/docs/auto-permission-answers.md +1 -1
- package/docs/bundled-install.md +14 -6
- package/docs/delegated-verification.md +23 -5
- package/docs/desktop-feed.md +303 -0
- package/docs/desktop-rpc.md +1931 -0
- package/docs/fast-mode.md +2 -2
- package/docs/gentle-agents-activity.md +26 -0
- package/docs/gentle-shell-desktop.md +465 -0
- package/docs/gentle-shell.md +102 -17
- package/docs/images/desktop/chat.png +0 -0
- package/docs/images/desktop/palette.png +0 -0
- package/docs/images/desktop/todo.png +0 -0
- package/docs/install-wizard.md +30 -21
- package/docs/odd-preparation-continuity.md +24 -0
- package/docs/permission-modes.md +9 -1
- package/docs/prompt-budget.md +12 -0
- package/docs/rdd-odd-friction-triage-2026-11-07.md +57 -0
- package/docs/readme-reference.md +113 -32
- package/docs/review-coordinator.md +29 -9
- package/docs/review-delivery-preflight.md +22 -0
- package/docs/work-continuity.md +19 -6
- package/extensions/ask-user-choice.ts +36 -18
- package/extensions/ask-user-question.ts +48 -9
- package/extensions/child-context.ts +21 -7
- package/extensions/gentle-agents.ts +436 -66
- package/extensions/gentle-ai.ts +809 -158
- package/extensions/gentle-design.ts +69 -3
- package/extensions/gentle-desktop-feed.ts +778 -0
- package/extensions/gentle-desktop-rpc.ts +276 -0
- package/extensions/gentle-guide.ts +3 -0
- package/extensions/gentle-herdr-desktop-status.ts +275 -0
- package/extensions/gentle-shell.ts +174 -59
- package/extensions/gentle-stats.ts +30 -1
- package/extensions/gentle-todo.ts +48 -25
- package/extensions/gentle-tower.ts +305 -0
- package/extensions/skill-registry.ts +260 -225
- package/herdr/RECIPE.md +157 -0
- package/herdr/keys.json +14 -0
- package/herdr/layouts/gentle-shell.json +202 -0
- package/herdr/mods/gentle-agents/icons/kind-herdr.svg +1 -0
- package/herdr/mods/gentle-agents/icons/kind-remote.svg +1 -0
- package/herdr/mods/gentle-agents/icons/kind-tui.svg +1 -0
- package/herdr/mods/gentle-agents/main.js +190 -0
- package/herdr/mods/gentle-agents/mod.json +1 -0
- package/herdr/mods/gentle-agents/snapshot.js +469 -0
- package/herdr/mods/gentle-agents/tokens.js +273 -0
- package/herdr/mods/gentle-chat/MINIMAL.md +69 -0
- package/herdr/mods/gentle-chat/actions.js +180 -0
- package/herdr/mods/gentle-chat/feed.js +321 -0
- package/herdr/mods/gentle-chat/icons/branch.svg +1 -0
- package/herdr/mods/gentle-chat/icons/chat.svg +1 -0
- package/herdr/mods/gentle-chat/icons/check.svg +1 -0
- package/herdr/mods/gentle-chat/icons/chev.svg +1 -0
- package/herdr/mods/gentle-chat/icons/clip.svg +1 -0
- package/herdr/mods/gentle-chat/icons/down.svg +1 -0
- package/herdr/mods/gentle-chat/icons/folder.svg +1 -0
- package/herdr/mods/gentle-chat/icons/kind-herdr.svg +1 -0
- package/herdr/mods/gentle-chat/icons/kind-remote.svg +1 -0
- package/herdr/mods/gentle-chat/icons/kind-tui.svg +1 -0
- package/herdr/mods/gentle-chat/icons/mark.svg +1 -0
- package/herdr/mods/gentle-chat/icons/send.svg +1 -0
- package/herdr/mods/gentle-chat/icons/shield.svg +1 -0
- package/herdr/mods/gentle-chat/icons/stop.svg +1 -0
- package/herdr/mods/gentle-chat/icons/term.svg +1 -0
- package/herdr/mods/gentle-chat/icons/user.svg +1 -0
- package/herdr/mods/gentle-chat/icons/x.svg +1 -0
- package/herdr/mods/gentle-chat/main.js +968 -0
- package/herdr/mods/gentle-chat/mod.json +1 -0
- package/herdr/mods/gentle-chat/session.js +212 -0
- package/herdr/mods/gentle-chat/snapshot.js +469 -0
- package/herdr/mods/gentle-chat/tokens.js +137 -0
- package/herdr/mods/gentle-chat/ui.js +883 -0
- package/herdr/mods/gentle-confirm/main.js +60 -0
- package/herdr/mods/gentle-confirm/mod.json +1 -0
- package/herdr/mods/gentle-inspector/actions.js +180 -0
- package/herdr/mods/gentle-inspector/icons/bolt.svg +1 -0
- package/herdr/mods/gentle-inspector/icons/bot.svg +1 -0
- package/herdr/mods/gentle-inspector/icons/check.svg +1 -0
- package/herdr/mods/gentle-inspector/icons/db.svg +1 -0
- package/herdr/mods/gentle-inspector/icons/diff.svg +1 -0
- package/herdr/mods/gentle-inspector/icons/jobs.svg +1 -0
- package/herdr/mods/gentle-inspector/icons/plug.svg +1 -0
- package/herdr/mods/gentle-inspector/icons/review.svg +1 -0
- package/herdr/mods/gentle-inspector/icons/stats.svg +1 -0
- package/herdr/mods/gentle-inspector/icons/stop.svg +1 -0
- package/herdr/mods/gentle-inspector/icons/todo.svg +1 -0
- package/herdr/mods/gentle-inspector/main.js +500 -0
- package/herdr/mods/gentle-inspector/mod.json +1 -0
- package/herdr/mods/gentle-inspector/snapshot.js +469 -0
- package/herdr/mods/gentle-inspector/tokens.js +273 -0
- package/herdr/mods/gentle-palette/actions.js +180 -0
- package/herdr/mods/gentle-palette/icons/bolt.svg +1 -0
- package/herdr/mods/gentle-palette/icons/bot.svg +1 -0
- package/herdr/mods/gentle-palette/icons/chat.svg +1 -0
- package/herdr/mods/gentle-palette/icons/check.svg +1 -0
- package/herdr/mods/gentle-palette/icons/cmd.svg +1 -0
- package/herdr/mods/gentle-palette/icons/diff.svg +1 -0
- package/herdr/mods/gentle-palette/icons/jobs.svg +1 -0
- package/herdr/mods/gentle-palette/icons/plus.svg +1 -0
- package/herdr/mods/gentle-palette/icons/review.svg +1 -0
- package/herdr/mods/gentle-palette/icons/search.svg +1 -0
- package/herdr/mods/gentle-palette/icons/shield.svg +1 -0
- package/herdr/mods/gentle-palette/icons/stats.svg +1 -0
- package/herdr/mods/gentle-palette/icons/stop.svg +1 -0
- package/herdr/mods/gentle-palette/icons/term.svg +1 -0
- package/herdr/mods/gentle-palette/icons/todo.svg +1 -0
- package/herdr/mods/gentle-palette/main.js +333 -0
- package/herdr/mods/gentle-palette/mod.json +1 -0
- package/herdr/mods/gentle-palette/snapshot.js +469 -0
- package/herdr/mods/gentle-palette/tokens.js +273 -0
- package/herdr/mods/gentle-pane/icons/chat.svg +1 -0
- package/herdr/mods/gentle-pane/icons/close.svg +1 -0
- package/herdr/mods/gentle-pane/icons/kind-herdr.svg +1 -0
- package/herdr/mods/gentle-pane/icons/kind-remote.svg +1 -0
- package/herdr/mods/gentle-pane/icons/kind-tui.svg +1 -0
- package/herdr/mods/gentle-pane/icons/split-down.svg +1 -0
- package/herdr/mods/gentle-pane/icons/split-right.svg +1 -0
- package/herdr/mods/gentle-pane/icons/term.svg +1 -0
- package/herdr/mods/gentle-pane/icons/unzoom.svg +1 -0
- package/herdr/mods/gentle-pane/icons/zoom.svg +1 -0
- package/herdr/mods/gentle-pane/main.js +91 -0
- package/herdr/mods/gentle-pane/mod.json +1 -0
- package/herdr/mods/gentle-pane/snapshot.js +469 -0
- package/herdr/mods/gentle-pane/tokens.js +273 -0
- package/herdr/mods/gentle-sidebar/actions.js +180 -0
- package/herdr/mods/gentle-sidebar/icons/gear.svg +1 -0
- package/herdr/mods/gentle-sidebar/icons/mark.svg +1 -0
- package/herdr/mods/gentle-sidebar/icons/refresh.svg +1 -0
- package/herdr/mods/gentle-sidebar/icons/server-plus.svg +1 -0
- package/herdr/mods/gentle-sidebar/main.js +171 -0
- package/herdr/mods/gentle-sidebar/mod.json +1 -0
- package/herdr/mods/gentle-sidebar/snapshot.js +469 -0
- package/herdr/mods/gentle-sidebar/tokens.js +273 -0
- package/herdr/mods/gentle-spaces/icons/kind-herdr.svg +1 -0
- package/herdr/mods/gentle-spaces/icons/kind-remote.svg +1 -0
- package/herdr/mods/gentle-spaces/icons/kind-tui.svg +1 -0
- package/herdr/mods/gentle-spaces/icons/monitor.svg +1 -0
- package/herdr/mods/gentle-spaces/icons/plus.svg +1 -0
- package/herdr/mods/gentle-spaces/icons/server.svg +1 -0
- package/herdr/mods/gentle-spaces/machines.js +31 -0
- package/herdr/mods/gentle-spaces/main.js +299 -0
- package/herdr/mods/gentle-spaces/mod.json +1 -0
- package/herdr/mods/gentle-spaces/snapshot.js +469 -0
- package/herdr/mods/gentle-spaces/tokens.js +273 -0
- package/herdr/mods/gentle-status/actions.js +180 -0
- package/herdr/mods/gentle-status/main.js +192 -0
- package/herdr/mods/gentle-status/mod.json +1 -0
- package/herdr/mods/gentle-status/snapshot.js +469 -0
- package/herdr/mods/gentle-status/tokens.js +273 -0
- package/herdr/mods/gentle-tabs/icons/close.svg +1 -0
- package/herdr/mods/gentle-tabs/icons/kind-herdr.svg +1 -0
- package/herdr/mods/gentle-tabs/icons/kind-remote.svg +1 -0
- package/herdr/mods/gentle-tabs/icons/kind-tui.svg +1 -0
- package/herdr/mods/gentle-tabs/icons/plus.svg +1 -0
- package/herdr/mods/gentle-tabs/icons/win-close.svg +1 -0
- package/herdr/mods/gentle-tabs/icons/win-max.svg +1 -0
- package/herdr/mods/gentle-tabs/icons/win-min.svg +1 -0
- package/herdr/mods/gentle-tabs/icons/win-restore.svg +1 -0
- package/herdr/mods/gentle-tabs/main.js +171 -0
- package/herdr/mods/gentle-tabs/mod.json +1 -0
- package/herdr/mods/gentle-tabs/snapshot.js +469 -0
- package/herdr/mods/gentle-tabs/tokens.js +273 -0
- package/herdr/mods/gentle-tokens/main.js +20 -0
- package/herdr/mods/gentle-tokens/mod.json +1 -0
- package/herdr/mods/gentle-tokens/snapshot.js +469 -0
- package/herdr/mods/gentle-tokens/tokens.js +273 -0
- package/herdr/preview.png +0 -0
- package/herdr/themes/gentle-shell-dark.json +33 -0
- package/herdr/themes/gentle-shell-light.json +34 -0
- package/lib/agent-assets.ts +30 -6
- package/lib/agent-tool-overlay.ts +117 -0
- package/lib/agents-config.ts +47 -6
- package/lib/agents-message-delivery.ts +17 -0
- package/lib/agents-messaging.ts +8 -2
- package/lib/agents-protocol.ts +17 -0
- package/lib/agents-report-cap.ts +115 -0
- package/lib/agents-rpc-publisher.ts +39 -12
- package/lib/agents-runner.ts +92 -6
- package/lib/agents-session-transport.ts +17 -1
- package/lib/auto-permission-answers.ts +2 -1
- package/lib/background-jobs-tools.ts +9 -4
- package/lib/background-jobs.ts +22 -2
- package/lib/bounded-writer-admission.ts +184 -31
- package/lib/change-diff.ts +104 -0
- package/lib/child-context-files.ts +21 -6
- package/lib/codemode-renderer.ts +1 -0
- package/lib/commit-slice-signal.ts +1 -1
- package/lib/delivery-conflict-markers.ts +349 -0
- package/lib/design-canvas-assets.ts +38 -0
- package/lib/design-canvas-server.ts +241 -23
- package/lib/design-comments.ts +94 -4
- package/lib/design-handoffs.ts +2 -1
- package/lib/design-layout.ts +125 -0
- package/lib/design-parts.ts +281 -0
- package/lib/design-system-tokens.ts +111 -0
- package/lib/desktop-agents-service.ts +315 -0
- package/lib/desktop-changes-service.ts +171 -0
- package/lib/desktop-design-service.ts +233 -0
- package/lib/desktop-feed-actions.ts +804 -0
- package/lib/desktop-feed-answers.ts +129 -0
- package/lib/desktop-feed-sources.ts +184 -0
- package/lib/desktop-feed-stats.ts +98 -0
- package/lib/desktop-feed-store.ts +124 -0
- package/lib/desktop-feed.ts +788 -0
- package/lib/desktop-jobs-service.ts +290 -0
- package/lib/desktop-review-service.ts +187 -0
- package/lib/desktop-rpc-agents.ts +403 -0
- package/lib/desktop-rpc-changes.ts +223 -0
- package/lib/desktop-rpc-config-watch.ts +285 -0
- package/lib/desktop-rpc-config.ts +885 -0
- package/lib/desktop-rpc-design.ts +138 -0
- package/lib/desktop-rpc-jobs.ts +290 -0
- package/lib/desktop-rpc-permissions.ts +328 -0
- package/lib/desktop-rpc-profiles.ts +196 -0
- package/lib/desktop-rpc-review.ts +180 -0
- package/lib/desktop-rpc-session.ts +203 -0
- package/lib/desktop-rpc-sessions.ts +250 -0
- package/lib/desktop-rpc-stats.ts +187 -0
- package/lib/desktop-rpc-updates.ts +143 -0
- package/lib/desktop-rpc-usage.ts +229 -0
- package/lib/desktop-rpc.ts +336 -0
- package/lib/desktop-session-service.ts +223 -0
- package/lib/desktop-sessions-service.ts +249 -0
- package/lib/desktop-stats-service.ts +142 -0
- package/lib/desktop-updates-service.ts +268 -0
- package/lib/desktop-usage-service.ts +310 -0
- package/lib/destructive-command-guard.ts +188 -13
- package/lib/gentle-ai-renderer.ts +13 -1
- package/lib/gentle-design.ts +201 -14
- package/lib/gentle-shell-bundled.ts +100 -9
- package/lib/gentle-shell-desktop.ts +1370 -0
- package/lib/gentle-shell-launcher.ts +45 -3
- package/lib/herdr-desktop-events.ts +40 -0
- package/lib/herdr-desktop-status.ts +229 -0
- package/lib/hidden-tools.ts +35 -0
- package/lib/inprocess-reviewer.ts +96 -12
- package/lib/jobs-sidebar-state.ts +5 -0
- package/lib/model-fallback-policy.ts +9 -0
- package/lib/model-routing-authority.ts +9 -0
- package/lib/nan-provider.ts +42 -28
- package/lib/native-review-cli.ts +86 -4
- package/lib/openai-fast-tier.ts +1 -0
- package/lib/orchestrator-discovery.ts +39 -2
- package/lib/reply-language-anchor.ts +27 -2
- package/lib/request-context-placement.ts +53 -0
- package/lib/review-candidate-view.ts +11 -1
- package/lib/review-continuation-registry.ts +17 -0
- package/lib/review-coordinator.ts +252 -8
- package/lib/review-delivery-preflight.ts +85 -0
- package/lib/review-host-relay.ts +5 -1
- package/lib/review-integration-v2.ts +56 -3
- package/lib/reviewer-stream.ts +87 -0
- package/lib/session-profile-freeze.ts +13 -5
- package/lib/shell-prompt.ts +16 -3
- package/lib/shell-usage.ts +10 -0
- package/lib/stats-collector.ts +56 -27
- package/lib/tower-actions.ts +100 -0
- package/lib/tower-hub.ts +73 -0
- package/lib/tower-launch.ts +111 -0
- package/lib/tower-open.ts +99 -0
- package/lib/tower-presence.ts +70 -0
- package/lib/tower-server.ts +234 -0
- package/lib/tower-snapshot.ts +298 -0
- package/lib/update-status.ts +238 -0
- package/lib/verifier-settle-reminder.ts +1 -1
- package/lib/vim-editor-adapter.ts +9 -2
- package/lib/writer-batch-admission.ts +55 -0
- package/lib/yolo-session-policy.ts +6 -1
- package/package.json +14 -5
- package/prompts/skill-creation.md +1 -10
- package/runtime/design-canvas-assets.mjs +39 -0
- package/runtime/gentle-shell-bundled.mjs +100 -9
- package/runtime/gentle-shell-desktop.mjs +1371 -0
- package/runtime/gentle-shell-launcher.mjs +44 -2
- package/runtime/native-review-cli.mjs +86 -4
- package/runtime/review-integration-v2.mjs +56 -3
- package/runtime/tower-actions.mjs +101 -0
- package/runtime/tower-hub.mjs +74 -0
- package/runtime/tower-launch.mjs +112 -0
- package/runtime/tower-open.mjs +100 -0
- package/runtime/tower-presence.mjs +71 -0
- package/runtime/tower-server.mjs +234 -0
- package/runtime/tower-snapshot.mjs +299 -0
- package/scripts/bootstrap.cmd +2 -2
- package/scripts/bootstrap.sh +41 -4
- package/scripts/build-full-delegation-card.mjs +5 -21
- package/scripts/build-runtime-modules.mjs +10 -0
- package/scripts/gentle-ai-installer.mjs +10 -10
- package/scripts/gentle-ai-proxy.mjs +1 -1
- package/scripts/installer-downloads.mjs +34 -8
- package/scripts/installer-preflight.mjs +28 -17
- package/scripts/installer-probes.mjs +25 -5
- package/scripts/installer-server.mjs +38 -9
- package/scripts/installer-windows.mjs +2 -2
- package/scripts/pi-update.mjs +166 -27
- package/scripts/prepare-verifier.mjs +107 -0
- package/scripts/update-agent-body-history.mjs +55 -8
- package/scripts/verify-package-files.mjs +61 -20
- package/skills/branch-pr/SKILL.md +16 -16
- package/skills/comment-writer/SKILL.md +1 -1
- package/skills/design/SKILL.md +6 -6
- package/skills/gentle-ai/SKILL.md +5 -5
- package/skills/judgment-day/SKILL.md +2 -2
- package/skills/judgment-day/references/prompts-and-formats.md +1 -1
- package/skills/provider-defect-report/SKILL.md +61 -0
- package/skills/rdd-defect-workflow/SKILL.md +6 -6
- package/skills/skill-improver/SKILL.md +2 -2
- package/skills/skill-registry/SKILL.md +11 -13
- package/skills/tui-design/SKILL.md +1 -1
- package/skills/work-unit-commits/SKILL.md +5 -5
- package/tests/agent-prompt-diet-contract.test.ts +101 -0
- package/tests/agent-tool-overlay-acceptance.test.ts +158 -0
- package/tests/agent-tool-overlay.test.ts +89 -0
- package/tests/agents-config.test.ts +10 -1
- package/tests/agents-message-delivery.test.ts +36 -0
- package/tests/agents-queries.test.ts +144 -4
- package/tests/agents-report-cap.test.ts +126 -0
- package/tests/agents-runner.test.ts +37 -1
- package/tests/agents-session-transport.test.ts +34 -0
- package/tests/always-on-prompt-verdicts-contract.test.ts +188 -0
- package/tests/append-system-prompt-route.test.ts +26 -7
- package/tests/approved-text-leftovers-contract.test.ts +136 -0
- package/tests/artifact-language.test.ts +1 -1
- package/tests/ask-user-choice.test.ts +78 -21
- package/tests/ask-user-question.test.ts +61 -6
- package/tests/audit-leftovers-contract.test.ts +51 -0
- package/tests/auto-permission-answers.test.ts +12 -1
- package/tests/background-jobs.test.ts +12 -0
- package/tests/bounded-stop-contract.test.ts +148 -27
- package/tests/branch-pr-skill.test.ts +10 -1
- package/tests/bundled-install.test.ts +1 -1
- package/tests/change-diff.test.ts +75 -0
- package/tests/child-context-files.test.ts +64 -8
- package/tests/child-skills-catalog.test.ts +56 -0
- package/tests/codemode-rendering.test.ts +4 -1
- package/tests/commit-slice-signal.test.ts +3 -2
- package/tests/decision-routing-contract.test.ts +390 -0
- package/tests/delegate-for-reason-contract.test.ts +30 -8
- package/tests/delegated-key-learnings-contract.test.ts +21 -28
- package/tests/delivery-b-rendered-surfaces.test.ts +32 -0
- package/tests/delivery-conflict-markers.test.ts +348 -0
- package/tests/design-canvas-all-sizes.test.ts +631 -0
- package/tests/design-canvas-allowlist.test.ts +32 -0
- package/tests/design-canvas-assets.test.ts +11 -878
- package/tests/design-canvas-boards.test.ts +77 -0
- package/tests/design-canvas-checks.test.ts +655 -0
- package/tests/design-canvas-compare.test.ts +79 -0
- package/tests/design-canvas-events.test.ts +59 -0
- package/tests/design-canvas-export.test.ts +1168 -0
- package/tests/design-canvas-focus.test.ts +113 -0
- package/tests/design-canvas-handoffs.test.ts +59 -0
- package/tests/design-canvas-i18n-review.test.ts +513 -0
- package/tests/design-canvas-i18n-views.test.ts +259 -0
- package/tests/design-canvas-i18n.test.ts +528 -0
- package/tests/design-canvas-inspector.test.ts +1004 -0
- package/tests/design-canvas-layout.test.ts +1222 -0
- package/tests/design-canvas-minimap.test.ts +413 -0
- package/tests/design-canvas-modules.test.ts +91 -0
- package/tests/design-canvas-parts.test.ts +721 -0
- package/tests/design-canvas-rail.test.ts +799 -0
- package/tests/design-canvas-server.test.ts +855 -17
- package/tests/design-canvas-sizes.test.ts +548 -0
- package/tests/design-canvas-store.test.ts +189 -0
- package/tests/design-canvas-theme.test.ts +198 -0
- package/tests/design-canvas-tokens.test.ts +965 -0
- package/tests/design-canvas-view.test.ts +299 -0
- package/tests/design-comments.test.ts +201 -1
- package/tests/design-handoffs.test.ts +20 -0
- package/tests/design-layout.test.ts +100 -0
- package/tests/design-parts.test.ts +260 -0
- package/tests/design-system-tokens.test.ts +215 -0
- package/tests/desktop-feed-actions-guards.test.ts +595 -0
- package/tests/desktop-feed-actions.test.ts +761 -0
- package/tests/desktop-feed-live-work.test.ts +209 -0
- package/tests/desktop-feed-performance.test.ts +369 -0
- package/tests/desktop-feed-plan-profiles.test.ts +509 -0
- package/tests/desktop-feed-send-prompt.test.ts +303 -0
- package/tests/desktop-feed-tool-summaries.test.ts +69 -0
- package/tests/desktop-feed.test.ts +615 -0
- package/tests/desktop-rpc-agents.test.ts +1319 -0
- package/tests/desktop-rpc-changes.test.ts +608 -0
- package/tests/desktop-rpc-config-watch.test.ts +1159 -0
- package/tests/desktop-rpc-config.test.ts +1462 -0
- package/tests/desktop-rpc-design.test.ts +672 -0
- package/tests/desktop-rpc-jobs.test.ts +1193 -0
- package/tests/desktop-rpc-permissions.test.ts +321 -0
- package/tests/desktop-rpc-profiles.test.ts +140 -0
- package/tests/desktop-rpc-review.test.ts +678 -0
- package/tests/desktop-rpc-safety.test.ts +119 -0
- package/tests/desktop-rpc-session.test.ts +642 -0
- package/tests/desktop-rpc-sessions.test.ts +647 -0
- package/tests/desktop-rpc-stats.test.ts +431 -0
- package/tests/desktop-rpc-updates.test.ts +525 -0
- package/tests/desktop-rpc-usage.test.ts +707 -0
- package/tests/desktop-rpc.test.ts +293 -0
- package/tests/devbinary/pi-host-relay.devtest.ts +149 -80
- package/tests/devbinary/review-session-consent.devtest.ts +84 -0
- package/tests/engram-safety.test.ts +111 -0
- package/tests/fixtures/devbinary/status-v9-escalated-non-blocking.captured.json +92 -0
- package/tests/fixtures/devbinary/status-v9-escalated-non-blocking.provenance.md +3 -0
- package/tests/fixtures/primary-session-prompt/gentleman.golden.md +30 -41
- package/tests/fixtures/refusal-identity.probe.mjs +139 -0
- package/tests/fixtures/session-profile-v1/replay.ts +4 -1
- package/tests/full-delegation-closure.test.ts +48 -0
- package/tests/gentle-agents.test.ts +848 -8
- package/tests/gentle-ai-binary.test.ts +1 -1
- package/tests/gentle-ai-child-guards.test.ts +1 -0
- package/tests/gentle-ai-installer.test.ts +52 -51
- package/tests/gentle-ai-renderer.test.ts +36 -2
- package/tests/gentle-ai.test.ts +195 -21
- package/tests/gentle-design.test.ts +365 -1
- package/tests/gentle-fast.test.ts +15 -0
- package/tests/gentle-herdr-desktop-status.test.ts +595 -0
- package/tests/gentle-shell-bundled.test.ts +91 -5
- package/tests/gentle-shell-desktop-bin.test.ts +125 -0
- package/tests/gentle-shell-desktop.test.ts +927 -0
- package/tests/gentle-shell-launcher-tower.test.ts +104 -0
- package/tests/gentle-shell-launcher.test.ts +1 -1
- package/tests/gentle-shell.test.ts +121 -87
- package/tests/gentle-todo.test.ts +32 -9
- package/tests/gentle-tower.test.ts +578 -0
- package/tests/herdr-desktop-status.test.ts +285 -0
- package/tests/hidden-tools.test.ts +188 -0
- package/tests/independent-recovery-delivery.test.ts +35 -9
- package/tests/inprocess-reviewer.test.ts +73 -0
- package/tests/install-wizard.test.ts +27 -1
- package/tests/installer-downloads.test.ts +30 -1
- package/tests/installer-posix-bootstrap.test.ts +114 -13
- package/tests/installer-preflight.test.ts +49 -1
- package/tests/installer-probes.test.ts +146 -0
- package/tests/installer-server.test.ts +203 -4
- package/tests/installer-windows-bootstrap.test.ts +19 -1
- package/tests/judgment-day-severity-admission.test.ts +46 -0
- package/tests/lazy-module-contradictions-contract.test.ts +181 -0
- package/tests/maintainer/desktop-rpc.maintest.ts +907 -0
- package/tests/maintainer/pi-update-source.maintest.ts +48 -18
- package/tests/model-fallback-policy.test.ts +26 -7
- package/tests/nan-provider-runtime.test.ts +17 -3
- package/tests/nan-provider.test.ts +111 -56
- package/tests/native-review-capability-contract.test.ts +19 -1
- package/tests/native-review-cli-nonblocking-findings.test.ts +165 -0
- package/tests/native-review-parity.test.ts +24 -5
- package/tests/native-review-refusal-identity.test.ts +25 -0
- package/tests/no-self-pause-contract.test.ts +33 -15
- package/tests/odd-integration.test.ts +11 -3
- package/tests/odd-routing-canonical-ratchet.test.ts +10 -0
- package/tests/odd-routing-contract.test.ts +99 -31
- package/tests/orchestrator-budget.test.ts +32 -5
- package/tests/orchestrator-consultation-sdk.test.ts +32 -6
- package/tests/orchestrator-delegation-mode.test.ts +2 -1
- package/tests/orchestrator-discovery.test.ts +28 -0
- package/tests/orchestrator-prompt-budget.test.ts +12 -2
- package/tests/orchestrator-prompt-diet-contract.test.ts +249 -0
- package/tests/orchestrator-rdd-ownership.test.ts +2 -1
- package/tests/orchestrator-work-search.test.ts +4 -2
- package/tests/package-files.test.ts +25 -1
- package/tests/package-manifest.test.ts +15 -14
- package/tests/parallel-reason-contract.test.ts +6 -3
- package/tests/permission-allowlist.test.ts +200 -30
- package/tests/persona-neutral-voseo.test.ts +4 -4
- package/tests/persona-reply-language.test.ts +1 -1
- package/tests/persona-single-channel.test.ts +13 -5
- package/tests/pi-routing-measured-values.test.ts +24 -0
- package/tests/pi-update-launcher.test.ts +17 -7
- package/tests/pi-update-source.test.ts +113 -6
- package/tests/pi-update.test.ts +294 -19
- package/tests/pnpm-workspace-policy.test.ts +47 -0
- package/tests/primary-context-files.test.ts +233 -0
- package/tests/primary-context-three-files.test.ts +174 -0
- package/tests/primary-session-prompt.test.ts +25 -0
- package/tests/profile-fast-tier.test.ts +66 -1
- package/tests/provider-defect-handoff.test.ts +124 -99
- package/tests/rdd-aware-verification-contract.test.ts +1 -1
- package/tests/rdd-status-line.test.ts +94 -1
- package/tests/reply-language-anchor-placement.test.ts +184 -0
- package/tests/reply-language-anchor.test.ts +17 -1
- package/tests/request-context-append-only.test.ts +218 -0
- package/tests/request-context-placement.test.ts +148 -0
- package/tests/review-agent-end-preflight.test.ts +79 -1
- package/tests/review-candidate-view.test.ts +65 -0
- package/tests/review-continuation-registry.test.ts +31 -0
- package/tests/review-contract-prompt.test.ts +2 -1
- package/tests/review-controller.test.ts +2 -1
- package/tests/review-coordinator-correction-gate.test.ts +105 -0
- package/tests/review-coordinator-findings.test.ts +206 -0
- package/tests/review-coordinator-nonblocking-scope.test.ts +169 -0
- package/tests/review-coordinator.test.ts +271 -4
- package/tests/review-delivery-preflight.test.ts +462 -0
- package/tests/review-due-compaction.test.ts +31 -0
- package/tests/review-due-public-boundary.test.ts +27 -0
- package/tests/review-integration-nonblocking-findings.test.ts +108 -0
- package/tests/review-json-arguments.test.ts +41 -2
- package/tests/review-ledger-contract.test.ts +19 -40
- package/tests/review-loadout-rdd-off-sdk.test.ts +30 -1
- package/tests/review-one-call-findings.test.ts +131 -0
- package/tests/review-one-call-followups.test.ts +308 -0
- package/tests/review-one-call-reviewer-requests.test.ts +207 -0
- package/tests/review-one-call.test.ts +452 -0
- package/tests/review-relay-transport-agent.test.ts +28 -1
- package/tests/review-reviewer-evidence.test.ts +41 -1
- package/tests/review-risk-assessment.test.ts +52 -5
- package/tests/review-run-statement-guidance-independent.test.ts +54 -0
- package/tests/review-session-standing-permission-controller.test.ts +32 -2
- package/tests/review-tool-prose-budget.test.ts +1 -0
- package/tests/reviewer-stream.test.ts +149 -0
- package/tests/sensitive-path-tools.test.ts +138 -4
- package/tests/session-profile-extension.test.ts +312 -18
- package/tests/session-profile-freeze.test.ts +26 -0
- package/tests/session-profile-v1-compat.test.ts +20 -0
- package/tests/shell-prompt.test.ts +17 -0
- package/tests/shell-usage.test.ts +59 -10
- package/tests/skill-collision-prefixes.test.ts +1 -0
- package/tests/skill-contradictions-contract.test.ts +124 -0
- package/tests/skill-registry-watcher.test.ts +216 -2
- package/tests/skill-registry.test.ts +983 -306
- package/tests/stats-collector.test.ts +109 -2
- package/tests/support/design-canvas-dom.ts +386 -0
- package/tests/support/review-coordinator-runtime.ts +212 -17
- package/tests/task-size-routing-contract.test.ts +49 -14
- package/tests/test-strength-contract.test.ts +2 -1
- package/tests/todo-request-append-only.test.ts +214 -0
- package/tests/tool-batching-contract.test.ts +3 -1
- package/tests/tower-actions.test.ts +247 -0
- package/tests/tower-artifacts.test.ts +114 -0
- package/tests/tower-open.test.ts +97 -0
- package/tests/tower-presence.test.ts +175 -0
- package/tests/tower-server.test.ts +122 -0
- package/tests/tower-snapshot.test.ts +236 -0
- package/tests/tower-web-echo.test.ts +125 -0
- package/tests/tower-web-hover.test.ts +251 -0
- package/tests/update-agent-body-history.test.ts +138 -0
- package/tests/verification-scoped-stop-contract.test.ts +32 -0
- package/tests/verification-tiers-contract.test.ts +229 -0
- package/tests/verifier-preparation.test.ts +229 -0
- package/tests/verifier-settle-reminder.test.ts +2 -2
- package/tests/verify-agent-contract.test.ts +20 -2
- package/tests/verify-first-launch-contract.test.ts +88 -12
- package/tests/vim-editor-adapter.test.ts +2 -2
- package/tests/work-continuity-contract.test.ts +136 -27
- package/tests/writer-admission-messages.test.ts +232 -0
- package/tests/writer-batch-admission.test.ts +66 -0
- package/tests/writer-edit-surface-scope.test.ts +52 -20
- package/tests/writer-feature-document-admission.test.ts +184 -0
- package/tests/writer-rejection-next-step.test.ts +55 -0
- package/tests/writer-surface-authority-contract.test.ts +158 -0
- package/tests/yolo-mode.test.ts +39 -0
- package/skills/_shared/review-ledger-contract.md +0 -106
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.6.0}/bundle/README.md +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.6.0}/bundle/schemas/lens.schema.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.6.0}/bundle/schemas/refuter.schema.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.6.0}/bundle/schemas/targeted-validator.schema.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.6.0}/bundle/vectors/lens.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.6.0}/bundle/vectors/refuter.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.6.0}/bundle/vectors/targeted-validator.json +0 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="400" viewBox="0 0 1200 400" role="img" aria-labelledby="title desc">
|
|
2
|
+
<title id="title">Sponsor Gentleman Programming on GitHub Sponsors</title>
|
|
3
|
+
<desc id="desc">Free forever, independent by choice. No investors, no paywalls. Gentle AI, Engram and Gentle Shell are funded by the people who use them. Sponsor on GitHub, monthly or one-time.</desc>
|
|
4
|
+
<defs>
|
|
5
|
+
<radialGradient id="glow" cx="18%" cy="50%" r="60%">
|
|
6
|
+
<stop offset="0%" stop-color="#F095C8" stop-opacity="0.30"/>
|
|
7
|
+
<stop offset="55%" stop-color="#F095C8" stop-opacity="0.06"/>
|
|
8
|
+
<stop offset="100%" stop-color="#F095C8" stop-opacity="0"/>
|
|
9
|
+
</radialGradient>
|
|
10
|
+
<linearGradient id="border" x1="0" y1="0" x2="1" y2="1">
|
|
11
|
+
<stop offset="0%" stop-color="#F095C8"/>
|
|
12
|
+
<stop offset="50%" stop-color="#6E3A57"/>
|
|
13
|
+
<stop offset="100%" stop-color="#F095C8"/>
|
|
14
|
+
</linearGradient>
|
|
15
|
+
<linearGradient id="cta" x1="0" y1="0" x2="1" y2="0">
|
|
16
|
+
<stop offset="0%" stop-color="#FF7AC0"/>
|
|
17
|
+
<stop offset="100%" stop-color="#F095C8"/>
|
|
18
|
+
</linearGradient>
|
|
19
|
+
<filter id="neon" x="-50%" y="-50%" width="200%" height="200%">
|
|
20
|
+
<feGaussianBlur stdDeviation="9" result="blur"/>
|
|
21
|
+
<feMerge><feMergeNode in="blur"/><feMergeNode in="blur"/><feMergeNode in="SourceGraphic"/></feMerge>
|
|
22
|
+
</filter>
|
|
23
|
+
<filter id="soft" x="-20%" y="-50%" width="140%" height="200%">
|
|
24
|
+
<feGaussianBlur stdDeviation="12"/>
|
|
25
|
+
</filter>
|
|
26
|
+
<pattern id="grid" width="32" height="32" patternUnits="userSpaceOnUse">
|
|
27
|
+
<path d="M32 0H0V32" fill="none" stroke="#F095C8" stroke-opacity="0.06" stroke-width="1"/>
|
|
28
|
+
</pattern>
|
|
29
|
+
<style>
|
|
30
|
+
.heart { transform-origin: 200px 200px; animation: beat 1.6s ease-in-out infinite; }
|
|
31
|
+
@keyframes beat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.12); } 24% { transform: scale(0.98); } 36% { transform: scale(1.08); } 50% { transform: scale(1); } }
|
|
32
|
+
.ring { transform-origin: 200px 200px; animation: ring 3.2s ease-out infinite; }
|
|
33
|
+
@keyframes ring { 0% { transform: scale(0.7); opacity: 0.7; } 100% { transform: scale(1.5); opacity: 0; } }
|
|
34
|
+
text { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; }
|
|
35
|
+
</style>
|
|
36
|
+
</defs>
|
|
37
|
+
|
|
38
|
+
<rect x="2" y="2" width="1196" height="396" rx="28" fill="#120D11"/>
|
|
39
|
+
<rect x="2" y="2" width="1196" height="396" rx="28" fill="url(#grid)"/>
|
|
40
|
+
<rect x="2" y="2" width="1196" height="396" rx="28" fill="url(#glow)"/>
|
|
41
|
+
<rect x="2" y="2" width="1196" height="396" rx="28" fill="none" stroke="url(#border)" stroke-width="3"/>
|
|
42
|
+
|
|
43
|
+
<circle class="ring" cx="200" cy="200" r="92" fill="none" stroke="#F095C8" stroke-width="3"/>
|
|
44
|
+
<g class="heart" filter="url(#neon)">
|
|
45
|
+
<path transform="translate(0 9)" d="M200 268 C 120 214, 112 150, 152 128 C 176 115, 194 126, 200 144 C 206 126, 224 115, 248 128 C 288 150, 280 214, 200 268 Z"
|
|
46
|
+
fill="none" stroke="#F095C8" stroke-width="9" stroke-linejoin="round"/>
|
|
47
|
+
</g>
|
|
48
|
+
|
|
49
|
+
<text x="380" y="94" fill="#F095C8" font-size="20" font-weight="700" letter-spacing="5">SUPPORT THE PROJECT</text>
|
|
50
|
+
<text x="378" y="152" fill="#FFFFFF" font-size="50" font-weight="800">Free forever.</text>
|
|
51
|
+
<text x="378" y="208" fill="#FFFFFF" font-size="50" font-weight="800">Independent <tspan fill="#F095C8">by choice.</tspan></text>
|
|
52
|
+
<text x="380" y="250" fill="#D7A0B8" font-size="21">No investors, no paywalls. Gentle AI, Engram and Gentle Shell</text>
|
|
53
|
+
<text x="380" y="278" fill="#D7A0B8" font-size="21">are funded by the people who use them.</text>
|
|
54
|
+
|
|
55
|
+
<rect x="380" y="306" width="300" height="58" rx="29" fill="#F095C8" filter="url(#soft)" opacity="0.55"/>
|
|
56
|
+
<rect x="380" y="306" width="300" height="58" rx="29" fill="url(#cta)"/>
|
|
57
|
+
<path d="M420 348 C 406 339, 404 327, 411 323 C 415 321, 419 323, 420 326 C 421 323, 425 321, 429 323 C 436 327, 434 339, 420 348 Z" fill="#1A1218"/>
|
|
58
|
+
<text x="443" y="343" fill="#1A1218" font-size="22" font-weight="800">Sponsor on GitHub</text>
|
|
59
|
+
<text x="704" y="342" fill="#8F7A86" font-size="17">Monthly or one-time · every contribution counts</text>
|
|
60
|
+
</svg>
|
|
Binary file
|
|
@@ -11,7 +11,7 @@ Each frozen `HumanAnswerReceipt` contains:
|
|
|
11
11
|
- `branchAnchor`: the original `sessionManager.getLeafId()` (`string | null`), unchanged at delivery.
|
|
12
12
|
- `toolName`, `toolCallId`, `questionIndex`: the exact question interaction and zero-based question position.
|
|
13
13
|
- `question`: the original question text, an **untrusted referent**, not an instruction.
|
|
14
|
-
- `prompt`: a pre-UI JSON string containing original question and offered labels/descriptions. Choice prompts include `allowCustomResponse`; questionnaire prompts include header, multi-select status, and previews for the TUI where previews are displayed. This entire field is **untrusted context**, separate from authenticated answer text.
|
|
14
|
+
- `prompt`: a pre-UI JSON string containing original question and offered labels/descriptions. Choice prompts include the effective `allowCustomResponse` (`true` unless the call passed `false`; a custom answer to a closed choice is never delivered); questionnaire prompts include header, multi-select status, and previews for the TUI where previews are displayed. This entire field is **untrusted context**, separate from authenticated answer text.
|
|
15
15
|
- `answer`: the authenticated visible answer: `{ kind: "option" | "custom", text, selected? }` or `{ kind: "multi", selected }`.
|
|
16
16
|
|
|
17
17
|
Opaque choice values are excluded entirely. Option descriptions and displayed questionnaire previews are included only in the untrusted `prompt`, never in authenticated answer text. A selected label still authorizes only what the human actually agreed to, not arbitrary instructions embedded in the question. The bridge itself grants no permission, changes no counters, and creates no synthetic user message.
|
package/docs/bundled-install.md
CHANGED
|
@@ -13,7 +13,7 @@ The building blocks live in `scripts/bundled-install.mjs`. The web installer and
|
|
|
13
13
|
| `~/.gentle-shell/npm/{prefix,cache}/`, `~/.gentle-shell/npm/npmrc` | npm's global prefix, cache and global config. The global config file is never written. |
|
|
14
14
|
| `~/.gentle-shell/runtime/pnpm-11.1.1/package/` | Our pnpm, from the verified registry tarball. |
|
|
15
15
|
| `~/.gentle-shell/runtime/go/1.25.14/go/` | Our Go, only when asked (`acquireGo` layout). |
|
|
16
|
-
| `~/.gentle-shell/runtime/engram-3.
|
|
16
|
+
| `~/.gentle-shell/runtime/engram-3.7.2/engram` | Our Engram, from the verified GitHub release archive ([Isolation from the user's Gentle AI](#isolation-from-the-users-gentle-ai)). |
|
|
17
17
|
| `~/.gentle-shell/gentle-ai/` | Gentle AI's state, managed assets, backups and telemetry state (`GENTLE_AI_HOME`). |
|
|
18
18
|
| `~/.gentle-shell/config/gentle-ai/` | gentle-pi's config home in a bundled install (derived, never exported to Pi): profiles, preferences, persona, background subagents. |
|
|
19
19
|
| `~/.gentle-shell/pnpm/{store,cache,state,config}/` | Every folder pnpm writes. |
|
|
@@ -248,7 +248,7 @@ Dropped: inherited npm and pnpm settings, `NODE_OPTIONS`, `NODE_PATH`, and the w
|
|
|
248
248
|
|
|
249
249
|
### Engram startup safety
|
|
250
250
|
|
|
251
|
-
A bundled Shell shares the global Engram server, like other agents' hooks: it reuses a verified server already listening on the default endpoint and, when nothing listens, starts one itself with its verified bundled core. It decides before setup and again right before Pi starts. When memory may not be used, Shell keeps working without memory and **points `ENGRAM_BIN` at its own guard**, so no provider, whichever Pi route loaded it, can open, create or migrate a store directly. The core pin is **3.
|
|
251
|
+
A bundled Shell shares the global Engram server, like other agents' hooks: it reuses a verified server already listening on the default endpoint and, when nothing listens, starts one itself with its verified bundled core. It decides before setup and again right before Pi starts. When memory may not be used, Shell keeps working without memory and **points `ENGRAM_BIN` at its own guard**, so no provider, whichever Pi route loaded it, can open, create or migrate a store directly. The core pin is **3.7.2**, acquired through the existing size- and checksum-verified path. Cores from 3.7.0 on start as a first-class daemon (`engram run -d`, so the standard `engram ps`, `stop`, `logs` and `restart` verbs manage the shared server); older cores, or a daemon handoff that does not come up, keep the legacy detached `serve`.
|
|
252
252
|
|
|
253
253
|
#### Decision
|
|
254
254
|
|
|
@@ -261,13 +261,13 @@ A bundled Shell shares the global Engram server, like other agents' hooks: it re
|
|
|
261
261
|
| Anything else listening: a different service, timeout, 401/404, an older server, malformed answers | Disabled; the listener is never stopped or replaced | Guard |
|
|
262
262
|
| Explicit `ENGRAM_BIN`, `ENGRAM_URL`, `ENGRAM_PORT`, `ENGRAM_SOCKET`, `ENGRAM_DATA_DIR`, `ENGRAM_DATABASE_URL`, `ENGRAM_SERVER_MODE`, or an invalid `ENGRAM_STARTUP_POLICY` | Disabled, never probed or started | Explicit `ENGRAM_BIN`/`ENGRAM_URL` kept; `ENGRAM_URL` alone gets the verified core (or the guard) as `ENGRAM_BIN`; otherwise guard |
|
|
263
263
|
|
|
264
|
-
An existing store at `~/.engram` does not disable memory by itself, whoever created it (an earlier Shell or the global Engram CLI): the server owns the store, and Shell only talks to a server that proves itself through `/compatibility`. The one exception is the header tripwire: when `engram.db` is a regular, unlinked file whose first 100 bytes are a valid SQLite header (magic, page size, bytes 18/19 each 1 or 2) and whose `user_version` (bytes 60-63) is **greater** than the bundled core's schema (`1`, verified from `v3.
|
|
264
|
+
An existing store at `~/.engram` does not disable memory by itself, whoever created it (an earlier Shell or the global Engram CLI): the server owns the store, and Shell only talks to a server that proves itself through `/compatibility`. The one exception is the header tripwire: when `engram.db` is a regular, unlinked file whose first 100 bytes are a valid SQLite header (magic, page size, bytes 18/19 each 1 or 2) and whose `user_version` (bytes 60-63) is **greater** than the bundled core's schema (`1`, verified from `v3.7.2:internal/store/store.go`), a newer Engram migrated the store, so Shell does not start its older core on it. Start that newer Engram's server yourself; Shell then reuses it. A pin without a verified schema entry treats any readable header as newer. Equal or lower (including a stale `0` before a WAL checkpoint) is no signal either way.
|
|
265
265
|
|
|
266
266
|
Classification never runs an Engram executable, never opens SQLite, and never infers compatibility from a version string. It reads the raw database header and makes bounded (1 s) read-only `GET /compatibility` and `GET /health` requests to the default endpoint on a direct loopback socket, without proxy, redirects or credentials. `gentle-shell --version` and a Pi version or help flag (`--version`, `-v`, `--help`, `-h` where Pi reads it as a flag: before Pi's own `--` and not as another option's value, so a prompt or option value containing `-v` does not count) never probe, start a server, ensure the companion or print memory notices. A Pi subcommand (`gentle-shell list`, `install`, ...) and `gentle-shell setup` never start a server either.
|
|
267
267
|
|
|
268
268
|
#### Starting the shared server
|
|
269
269
|
|
|
270
|
-
Only the final pre-Pi decision starts a server. Shell runs the verified bundled core as plain `engram serve`, with Engram's own default port and data directory, **detached** (its own process group, `stdio` ignored, unreferenced, `windowsHide` on Windows, working directory the home folder), so it outlives Pi like a server other agents' hooks start. Its environment is the user's minus every `ENGRAM_*` setting and `GH_TOKEN`/`GITHUB_TOKEN`, plus `ENGRAM_NO_UPDATE_CHECK=1`. For `TMPDIR`/`TMP`/`TEMP` whose final path component is session scratch (`gp` or `ga` followed by exactly six alphanumeric characters), POSIX drops the setting. Windows instead explicitly replaces it with its original absolute ancestor outside consecutive scratch components: omitting `TEMP` can cause Node to inherit the parent's scratch again. When any Windows scratch setting is replaced and `TEMP` is absent, Shell also sets `TEMP` to that stable ancestor. Existing custom temp settings retain their own values, even when they name different roots. Windows path separators and case-insensitive environment keys are supported. An unsafe relative scratch path disables this startup attempt before spawning; Shell never guesses a root or creates a temp folder. Unrelated variables remain unchanged. Pi keeps the user's environment. Shell then polls `GET /compatibility` for up to 10 seconds. A ready answer allows memory through the reuse URL; otherwise (the core fails to start, exits, or never answers ready) memory is disabled for that launch with a notice, and Shell still starts Pi. Concurrent launches converge: when the child exits (for example because another launch won the bind), Shell keeps polling for a short grace, and a ready `/compatibility` from the winner counts as started. Shell never stops a server it started or found; it keeps running for every client until you stop it.
|
|
270
|
+
Only the final pre-Pi decision starts a server. From Engram 3.7.0, Shell starts its verified bundled core through `engram run -d`, so the server is a pidfile-tracked daemon the standard `engram ps`, `stop`, `logs` and `restart` verbs manage, and the wrapper's bounded await plus a short `/compatibility` grace decide readiness. Anything else (an older core, a failed or timed-out daemon handoff) keeps the following legacy path. Shell runs the verified bundled core as plain `engram serve`, with Engram's own default port and data directory, **detached** (its own process group, `stdio` ignored, unreferenced, `windowsHide` on Windows, working directory the home folder), so it outlives Pi like a server other agents' hooks start. Its environment is the user's minus every `ENGRAM_*` setting and `GH_TOKEN`/`GITHUB_TOKEN`, plus `ENGRAM_NO_UPDATE_CHECK=1`. For `TMPDIR`/`TMP`/`TEMP` whose final path component is session scratch (`gp` or `ga` followed by exactly six alphanumeric characters), POSIX drops the setting. Windows instead explicitly replaces it with its original absolute ancestor outside consecutive scratch components: omitting `TEMP` can cause Node to inherit the parent's scratch again. When any Windows scratch setting is replaced and `TEMP` is absent, Shell also sets `TEMP` to that stable ancestor. Existing custom temp settings retain their own values, even when they name different roots. Windows path separators and case-insensitive environment keys are supported. An unsafe relative scratch path disables this startup attempt before spawning; Shell never guesses a root or creates a temp folder. Unrelated variables remain unchanged. Pi keeps the user's environment. Shell then polls `GET /compatibility` for up to 10 seconds. A ready answer allows memory through the reuse URL; otherwise (the core fails to start, exits, or never answers ready) memory is disabled for that launch with a notice, and Shell still starts Pi. Concurrent launches converge: when the child exits (for example because another launch won the bind), Shell keeps polling for a short grace, and a ready `/compatibility` from the winner counts as started. Shell never stops a server it started or found; it keeps running for every client until you stop it.
|
|
271
271
|
|
|
272
272
|
#### The guard
|
|
273
273
|
|
|
@@ -290,6 +290,14 @@ The memory decision never skips or fails setup: `gentle-shell setup` publishes t
|
|
|
290
290
|
|
|
291
291
|
In a Shell-owned home, a missing companion is installed through Pi as `npm:gentle-engram` and checked for `engram.startupPolicy: 1`; a failed check is reported and Shell still starts, protected by the guard. Shell migrates its old `npm:gentle-engram@0.4.2` registration to the unversioned source using Pi's package manager without installing an update. Pi then includes it in its normal startup package-update notice; run `gentle-shell update --extensions` to update it. An existing selection is not automatically reinstalled on launch, and linked/foreign homes, local companions, other companion pins and unrelated extension pins are not rewritten. This changes the Pi package, not the separately pinned native Engram core. `setup --dry-run` installs nothing.
|
|
292
292
|
|
|
293
|
+
Because that update leaves the unversioned source to Pi, Shell re-verifies the companion once the extensions update finishes instead of leaving the replaced install unchecked, and reports the version it found. It never turns a successful update into a failure and never rewrites the selection.
|
|
294
|
+
|
|
295
|
+
#### Companion and core must speak the same runtime contract
|
|
296
|
+
|
|
297
|
+
The companion and the core agree on a runtime contract identified by `contract_id` and `revision`, and validated by a digest: the companion ships it in `runtime-contract.json`, and the running core answers it on `GET /runtime-contract`. Shell publishes a verified digest for each pinned core (read from the real release binaries), and **warns** when the installed companion's digest differs from the pinned core's or from the digest the running server actually answers. A companion can require a newer core than the one Shell publishes, and until now the only signal was memory failing for the whole session.
|
|
298
|
+
|
|
299
|
+
The warning is deliberately non-blocking: an incompatible pair is still installed and still runs, the exit code never changes, the selection is never rewritten, and a missing or malformed `runtime-contract.json` is no signal rather than an error. Memory may be unavailable until the pair matches; update the core with a new Gentle Shell release, or update the companion.
|
|
300
|
+
|
|
293
301
|
#### Explicit recovery after a core upgrade
|
|
294
302
|
|
|
295
303
|
Earlier Shell releases provisioned `~/.engram` themselves and recorded `<prefix>/config/engram-provenance.json`; ordinary startup no longer reads that record. To migrate such a **Shell-provisioned store** with the bundled core explicitly, stop every Engram client and server using the directory, retain a complete backup (including WAL and configuration), then run:
|
|
@@ -298,7 +306,7 @@ Earlier Shell releases provisioned `~/.engram` themselves and recorded `<prefix>
|
|
|
298
306
|
gentle-shell memory migrate --confirm-quiescent
|
|
299
307
|
```
|
|
300
308
|
|
|
301
|
-
**Release dependency:** this requires a published bundled core advertising `migrate-copy`. The pinned Engram 3.
|
|
309
|
+
**Release dependency:** this requires a published bundled core advertising `migrate-copy`. The pinned Engram 3.7.2 implements it; Engram 3.4.0 did not. Shell checks help in an isolated home and refuses without invoking an unknown migration command or changing the source/provenance. Do not substitute an unpublished binary, edit hashes, or assume equal schema versions authorize recovery.
|
|
302
310
|
|
|
303
311
|
When supported, the provider copies the complete directory to a new sibling and validates/migrates only that copy. Shell checks the provider's directory and identity evidence, renames the original to the reported `backup_dir`, promotes the copy, and atomically replaces its core-bound provenance. Success prints one JSON record with `status: "migrated"`, `instance_id`, and `backup_dir`. Keep that backup until you have verified your records in Shell. Provider failures preserve the original and provenance; any incomplete copy is identified and retained, never promoted. Explicit foreign data locations or endpoints are not adopted by this command.
|
|
304
312
|
|
|
@@ -339,7 +347,7 @@ S9. Everything Gentle AI and gentle-pi keep lives in the prefix, except Engram's
|
|
|
339
347
|
- **gentle-engram.** The gentle-engram Pi extension finds Engram only through `ENGRAM_BIN`, read once when it loads, and otherwise runs `engram` from `PATH`. So Pi gets `ENGRAM_BIN` (the guard; memory reaches the shared server through `ENGRAM_URL`), and no `PATH` entry is added. An `ENGRAM_BIN` the user set is kept. The agent's shell inherits `ENGRAM_BIN` too, so an Engram MCP launcher started there through `ENGRAM_BIN` uses the same guard.
|
|
340
348
|
- **Personas.** Setup snapshots and restores the persona Gentle AI may rewrite: the prefix's `config/gentle-ai/persona.json`, and also the user's `~/.pi/gentle-ai/persona.json`. A Gentle AI release without the variables still writes the user's file, and restoring an unchanged file does nothing. The managed-asset record is restored only in the user's `~/.gentle-ai/state.json`; the prefix's record belongs to the pinned Gentle AI.
|
|
341
349
|
- **pi-pretty and prompt history.** In bundled mode only, the pi-pretty wrapper passes `deps.sdk` with Pi's five tool factories and `getAgentDir`, so its FFF database lands in `<agent home>/pi-pretty/fff`, and prompt history keeps its store under `<agent home>/history` ([Prompt history](prompt-history.md)). Elsewhere both keep their existing locations: Pi's deps reach pi-pretty unchanged (`$HOME/.pi/agent/pi-pretty/fff`, or no store without `HOME`), and history stays under `~/.pi/agent/history`, also in the isolated home of a pnpm or npm install, so existing histories are not left behind.
|
|
342
|
-
- **
|
|
350
|
+
- **Historical compatibility (Gentle AI 4.0.0).** The current Gentle AI 4.6.0 pin honors the four `GENTLE_AI_*` variables above. Gentle AI 4.0.0 ignored them:
|
|
343
351
|
- Setup still writes `~/.gentle-ai` and `~/.pi/gentle-ai`, with the restores above, and still acquires Engram its own way.
|
|
344
352
|
- The persona goes to the user's `~/.pi/gentle-ai/persona.json` (Gentle AI 4.0.0 resolves it from the OS home) and is restored there. The prefix's `config/gentle-ai/persona.json` is not created by setup.
|
|
345
353
|
- The background-subagents policy already lands in `<prefix>/config/gentle-ai/` through `GENTLE_PI_CONFIG_HOME=<prefix>/config` (see above).
|
|
@@ -4,7 +4,13 @@ How the Gentle Pi orchestrator decides who verifies a bounded writer's work. The
|
|
|
4
4
|
|
|
5
5
|
## Verifier preparation
|
|
6
6
|
|
|
7
|
-
The independent verifier makes one isolated preparation attempt.
|
|
7
|
+
The independent verifier makes one isolated preparation attempt. When it fails on a deterministic error in a command or environment the verifier constructed (a wrong flag, conflicting config, a typo, a path it chose), the verifier makes exactly one corrected attempt without asking and reports both. At a second failure, or at any missing or unavailable prerequisite (a tool, network, space, permission), it stops setup and reports one concrete blocker, the exact checks left unrun as unverified, not passed, and any scratch directories created. It does not otherwise retry setup or chain helper repairs. When the verifier returns a self-caused setup error without having used its correction, the parent relaunches it once with the corrected command, without asking a human; otherwise the parent stops that verification and reports the blocker and exact unrun checks as unverified (the unit stays `status: partial`; independent authorized work continues), without continuing helper repairs or automatically relaunching for the same prerequisite. After the prerequisite is repaired, the human may explicitly request one new bounded verification attempt. Setup or infrastructure failure is distinct from a code finding, whose existing correction allowance remains; auxiliary tooling defects remain subject to the existing correction bound, which setup failure does not reset. Successful preparation continues to authorized checks and independent probes within the existing isolation and permission boundaries.
|
|
8
|
+
|
|
9
|
+
For Git-dependent checks, the runner exposes the absolute packaged `scripts/prepare-verifier.mjs` path through `GENTLE_PI_VERIFIER_PREPARER`. In one Bash call, invoke `s=$(mktemp -d) && node "$GENTLE_PI_VERIFIER_PREPARER" "$PWD" "$s" '<plan-json>'` to create and use an empty system-temp scratch directory. The plan has `include` (required untracked source and ignored dependency paths), `checks` (exact commands left unrun on failure), optional `baseline` (full commit ID), and optional `runtimeArtifacts` (known socket/FIFO paths to verify and identify as excluded). Git does not enumerate sockets; exclusions are explicitly declared, not discovered by a recursive filesystem scan. It preserves HEAD, the index and current tracked bytes in an independent local Git repository; unselected ignored evidence is excluded. It never runs probes, fetches remote objects or installs dependencies. A successful receipt identifies `work`, elapsed milliseconds, regular-file payload bytes and excluded runtime artifacts; failure exits nonzero with zero probes and exact unrun commands.
|
|
10
|
+
|
|
11
|
+
This pilot supports ordinary single-root Git repositories and regular-file dependencies inside that root. It rejects links, submodules, worktrees, shallow/shared/sparse/partial history and inputs outside the root; declare unsupported external dependencies as prerequisites. Limits are 20000 files, 256MiB regular-file payload, a 512MiB staged-patch buffer and a 60-second checked preparation budget. Staged patches retain raw bytes and fixed path prefixes regardless of repository diff settings. Scratch may have linked ancestors, but its final directory must not be a link and its real path must remain under system temp, empty and separate from the source. Git subprocesses receive the remaining deadline; filesystem operations check between steps. Git object transfer is not included in the regular-file payload measurement; unavailable baseline/history, capacity or deadline failures leave partial scratch and no probe result. This is deterministic helper behavior, not proof of model adherence or representative large-project performance.
|
|
12
|
+
|
|
13
|
+
The existing Bash `pipefail` tar copy is retained only for probes independent of Git metadata. A failed archive producer cannot be hidden by a successful extractor. Chain probes with `&&` when they share either setup call; a non-zero preparation result leaves them unrun even if the partial destination contains files. This does not make an oversized copy faster or establish that model-selected alternatives preserve the required payload. The one-attempt rule remains prompt policy, not a runtime-enforced limit.
|
|
8
14
|
|
|
9
15
|
### Explicit recovery after a setup failure
|
|
10
16
|
|
|
@@ -12,21 +18,33 @@ A failed setup is not the same as an unavailable verifier capability. After the
|
|
|
12
18
|
|
|
13
19
|
This request does not permit automatic retries, reset native budgets, override a denial or terminal native outcome, or bypass consent or an explicit one-run/no-retry limit. If the prerequisite is still missing, report the exact blocker rather than repeating the failed setup.
|
|
14
20
|
|
|
15
|
-
###
|
|
21
|
+
### Parent continuation after worker correction exhaustion
|
|
22
|
+
|
|
23
|
+
The worker keeps its limit: one correction per failing check, a second only if the same check still fails after a real fix, then `status: partial`. That ends the worker's cycle, not the unit. The partial report must preserve the failed commands, output, remaining implementation work, missing proof, and the worker's diagnosed cause of the loop with its evidence. The parent decides the next step from the returned evidence, without asking the user: it names the cause (a wrong test, a wrong hypothesis, missing context, a setup or environment error, a real blocker) and acts on it through the route the active delegation mode allows. In organic mode it may fix the cause inline when it is small and understood (Task Size and writer rules unchanged); in full delegation mode it never edits and launches a new bounded writer whose handoff carries the diagnosis and the new evidence with a changed scope or hypothesis. The parent never repeats the same attempt and never swaps executors merely to dodge a limit. If the next attempt fails with the same cause, or no new hypothesis exists, the parent stops that unit as blocked with the evidence and continues independent work. The user is asked only for a genuinely human decision: scope, authority, consent, privacy, destructive or publishing actions, or a denial. A later conversation is not a budget reset, and an active or uncertain child prevents continuation.
|
|
16
24
|
|
|
17
|
-
|
|
25
|
+
RED construction is not a fix correction. Making a new test fail for the expected reason has its own setup bound: one self-fix for the test's harness or setup errors, separate from the fix's correction limit. If the test still cannot reproduce the failure, the worker returns a reproduction blocker with its evidence, not exhausted corrections.
|
|
18
26
|
|
|
19
27
|
Specifically authorized compilation or implementation can continue only when actual native authority and other applicable limits permit it. A read-only inspection with no instantiated native budget does not itself prohibit ordinary edits; it also grants no review approval. Missing required proof still blocks completion and delivery. Native recovery, consent, and terminal-outcome rules remain separate and unchanged.
|
|
20
28
|
|
|
21
29
|
This is prompt policy, not a runtime-enforced limit; contract tests establish instruction delivery, not agent compliance or a measured speedup.
|
|
22
30
|
|
|
31
|
+
## What the independent verifier checks
|
|
32
|
+
|
|
33
|
+
The change kind decides the verifier's evidence; it never decides whether a verifier runs, which still needs a named high-risk item. The verifier's evidence is what the writer could not see: it does not re-run the suite the writer reported, because the parent's single spot check of one reported command is the check on the writer's own results; the one exception is the user's failing command the parent passes, which it runs even when it is that suite. It runs the commands the parent authorizes as its evidence (the real-case command, the user's failing command, the spec's example commands) and its own probes, including a focused test only when a probe needs it. The parent names the change kind in the verify handoff:
|
|
34
|
+
|
|
35
|
+
- **External tool or environment** (package managers, CLIs, network services, operating-system behavior): the verifier reproduces the real case with the real tool and the configuration the change will meet, plus its own probes derived from the spec. A fixture that does not match that configuration is not proof.
|
|
36
|
+
- **Prompt or other contract text**: the verifier compares every removed or rewritten sentence with the baseline, one by one, for a lost qualifier or a rule turned absolute, and reads each new rule as a literal model would.
|
|
37
|
+
- **A fix for a failure the user reported**: the parent passes the user's exact failing command and error text verbatim, with the user's tool versions and configuration; the verifier runs that command against the baseline and against the change. The fix is not verified until that command passes there. The failure counts as reproduced only when that command fails at the baseline with the user's error; when it passes at the baseline or fails there with a different error, the verifier reports the fix unverified and says which, never verified. A handoff without the failing command leaves the fix unverified, with the missing command named; the verifier never guesses one.
|
|
38
|
+
|
|
39
|
+
When the real case needs the network, an install, or a tool, version, or configuration the verifier's scratch copy does not have, the verifier reports that check unverified with its exact command, and the parent runs that check itself before calling the change verified. Evidence for this split: in one long session the verifier's change-caused findings came only from real-case reproduction, sentence-by-sentence review of prompt text, and its own probes; re-running the writer's suite found none, and the one defect that reached the user escaped because the fixture did not match the user's environment.
|
|
40
|
+
|
|
23
41
|
## Verifier launch admission and post-denial disposition (gentle-shell#2478)
|
|
24
42
|
|
|
25
43
|
The `gentle-ai-verify` launch is admitted only when its `task` or `context` declares a named high-risk item, names a task of an existing feature document, or the parent's measured context reaches the backstop. The declaration grammar is strict: `Risk: item N (reason)` must start a line (optionally after a list marker like `- `) or start a sentence (after `.`, `!` or `?` and a space). A declaration after another separator such as `; ` or `,` inside a sentence is not recognized. Keep the risk evidence tied to the actual change; never add a Risk line only to gain admission.
|
|
26
44
|
|
|
27
45
|
Assessment and admission are separate gates. A `gentle_review assess` plan (or its native `review assess` source) may name an independent verifier in the verification plan; it does not grant launch admission. Admission re-validates the actual launch envelope at `tool_call` time and does not receive the assessment result, so a plan that names the verifier can still be rejected when the envelope carries no supported declaration.
|
|
28
46
|
|
|
29
|
-
After a rejection, no gate-level disposition exists for the same launch: do not retry it, and do not substitute another agent for the verifier. The rejection is launch-scoped, not feature-scoped: it does not make the verifier unavailable for the whole feature, does not mean the change has no risk, and does not by itself keep later required proof unavailable. A new verifier launch requires the user's explicit decision in a new prompt, with a conforming envelope whose risk declaration reflects the actual change. Inline tests, the writer's self-verification, and a user's visual approval never replace the missing independent verification; when it stays unavailable,
|
|
47
|
+
After a rejection, no gate-level disposition exists for the same launch: do not retry it, and do not substitute another agent for the verifier. The rejection is launch-scoped, not feature-scoped: it does not make the verifier unavailable for the whole feature, does not mean the change has no risk, and does not by itself keep later required proof unavailable. A new verifier launch requires the user's explicit decision in a new prompt, with a conforming envelope whose risk declaration reflects the actual change. Inline tests, the writer's self-verification, and a user's visual approval never replace the missing independent verification; when it stays unavailable, report the missing proof and do not claim the change complete.
|
|
30
48
|
|
|
31
49
|
## Background capability admission
|
|
32
50
|
|
|
@@ -78,7 +96,7 @@ The plan risk (`risk`) is high only with an escalation; otherwise a native passi
|
|
|
78
96
|
|
|
79
97
|
With RDD off, do not require ASSESS to run the writer's applicable functional checks or the named-risk independent verifier. A direct plan request does not run native assessment or provide a review continuation; it never enables RDD or authorizes a review lifecycle operation.
|
|
80
98
|
|
|
81
|
-
This table applies in every RDD state; a closed native review never removes a verifier the tier requires. An unknown RDD line never waives named-risk verification. The parent's own spot check (re-running one reported command before delivery) stays required in every tier.
|
|
99
|
+
This table applies in every RDD state; a closed native review never removes a verifier the tier requires. An unknown RDD line never waives named-risk verification. The parent's own spot check (re-running one reported command before delivery) stays required in every tier. A passive change that reports no command needs only its readback.
|
|
82
100
|
|
|
83
101
|
A native code review is not a substitute for applicable functional checks: tests, builds, and functional verification such as browser checks for UI changes still run when applicable. Review outcomes never authorize delivery; human consent for native review and the user-owned RDD switch are unchanged.
|
|
84
102
|
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
# Read a Gentle Shell session's desktop snapshot
|
|
2
|
+
|
|
3
|
+
Every live Gentle Shell session keeps one JSON snapshot of what its terminal UI
|
|
4
|
+
shows, so another process (the Gentle Shell Desktop mods for Herdr app) can show
|
|
5
|
+
the same information without attaching to the session. The packaged
|
|
6
|
+
`gentle-desktop-feed` extension loads automatically; it is only active in
|
|
7
|
+
interactive top-level Gentle Shell sessions (the TUI or an interactive RPC host).
|
|
8
|
+
Subagent children, plain Pi, and print/JSON runs publish nothing.
|
|
9
|
+
|
|
10
|
+
## Location
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
<agentDir>/desktop/sessions/<sessionId>.json
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
`agentDir` is the session's Pi agent directory (`GENTLE_PI_AGENT_HOME`, then
|
|
17
|
+
`PI_CODING_AGENT_DIR`, then `~/.pi/agent`): `~/.gentle-shell/agent` for the
|
|
18
|
+
bundled Gentle Shell, `~/.pi/agent` for Gentle AI installed as a Pi extension,
|
|
19
|
+
or a custom home. The snapshot names it in `identity.agentDir` (absolute), and
|
|
20
|
+
every other path of the session (its action inbox and outbox) is under it. A
|
|
21
|
+
session id that is not a plain `[A-Za-z0-9_-]` name is stored under its SHA-256
|
|
22
|
+
instead.
|
|
23
|
+
|
|
24
|
+
### Where readers look
|
|
25
|
+
|
|
26
|
+
The Herdr app mods read the snapshots of every agent dir they know, bundled
|
|
27
|
+
first:
|
|
28
|
+
|
|
29
|
+
1. `~/.gentle-shell/agent`
|
|
30
|
+
2. `~/.pi/agent`
|
|
31
|
+
3. each entry of `~/.config/herdr-app/gentle-shell-roots.json`, when that file
|
|
32
|
+
exists: `{ "roots": ["/abs/agent/dir", "~/other/agent"] }` (a bare array works
|
|
33
|
+
too). Entries are absolute or start with `~/`; anything else is ignored, and
|
|
34
|
+
at most 8 agent dirs are read in total.
|
|
35
|
+
|
|
36
|
+
They watch each existing `desktop/sessions` folder (a 10 s timer catches a
|
|
37
|
+
folder created later), match a terminal to a snapshot across all of them, and
|
|
38
|
+
send that session's actions to the inbox under its own `identity.agentDir`.
|
|
39
|
+
|
|
40
|
+
Every live snapshot is a session the desktop shows, wherever it runs: in a
|
|
41
|
+
terminal of the Herdr app window (kind **Herdr**), or in any other terminal —
|
|
42
|
+
the Herdr TUI, Ghostty, a herdr-core terminal this window does not show (kind
|
|
43
|
+
**TUI**). A snapshot counts as live while its publisher's `identity.pid` runs
|
|
44
|
+
(one `ps -p` per refresh for the pids not checked in the last 5 s; without `ps`
|
|
45
|
+
every snapshot counts). A Herdr session takes typed input in its terminal; a TUI
|
|
46
|
+
session takes prompts and answers through its inbox (`send_prompt`,
|
|
47
|
+
`answer_question` with `via: "session"`, below). A
|
|
48
|
+
snapshot from an older Gentle Shell without `identity.agentDir` is treated as
|
|
49
|
+
belonging to the agent dir it was found in. Herdr app lets mods read only under
|
|
50
|
+
the home folder, so an agent dir outside it is not seen.
|
|
51
|
+
|
|
52
|
+
The file is replaced atomically (exclusive temp file in the same folder, then
|
|
53
|
+
rename), only when its content changed (`updatedAt` and job elapsed counters
|
|
54
|
+
are not content): an idle session never rewrites it and arms no timer. Writes
|
|
55
|
+
come in two tiers (see Performance below): urgent state within 16 ms, the rest
|
|
56
|
+
at most once per second while the session is busy and 250 ms after a change
|
|
57
|
+
while it is idle. It is removed when
|
|
58
|
+
the session shuts down (quit, `/new`, `/resume`, reload). A crashed session can
|
|
59
|
+
leave its file behind; the next session start drops files whose publisher pid is
|
|
60
|
+
gone or that were not updated for a day. The folder is created `0700` and files
|
|
61
|
+
`0600`; symlinked folders or files are refused.
|
|
62
|
+
|
|
63
|
+
## Format: `gentle-shell.desktop-feed/v1`
|
|
64
|
+
|
|
65
|
+
| Field | Content |
|
|
66
|
+
|---|---|
|
|
67
|
+
| `identity` | `sessionId`, exact `sessionFile`, `sessionName`, `cwd`, `realCwd`, `pid`, `ppid`, `ancestors` (nearest first, best effort), `mode`, `agentDir` (absolute agent dir the snapshot lives under), `herdr` (`paneId` from `HERDR_PANE_ID`, `env`) or `null` |
|
|
68
|
+
| `project` | `cwd`, `branch`, `dirty` (changed files, `null` before the first scan) |
|
|
69
|
+
| `model` | `id`, `provider`, `effort` (thinking level when the model reasons), `profile` `{ name, tier }` |
|
|
70
|
+
| `persona` | always `null` (no reachable owner yet) |
|
|
71
|
+
| `context` | `percent`, `tokens`, `window` |
|
|
72
|
+
| `cost` | `total` (session spend), `subscription` |
|
|
73
|
+
| `usage` | what the TUI usage panel (alt+u, `/gentle:usage`) shows, from the same owner: the session's provider at the top level (`provider`, `status`, `plan`, `fetchedAt`, `note`, `limits[]` with `name`, `limitReached` and every `windows[]` entry: `label`, `usedPercent`, `windowSeconds`, `resetAt`), and every provider the panel lists in `providers[]` (the session's own first, then its subagent routes; same fields). `note` is the panel's own words for a provider without windows (`usage arrives with the first response`, `no usage yet · r to fetch`, `fetch failed · r to retry`, `no subscription usage for this provider`), else `null`. `plan` is the plan name the provider reports (Codex does; Anthropic's headers carry none, so it stays `null` there, as in the panel). `null` before the owner answered |
|
|
74
|
+
| `profiles` | the saved model profiles (`/gentle:profiles`' store): `active` (the profile this session routes with), `default` (the store's default for new sessions), `items[]` (`name`, `tier`, `mode`, `orchestrator` `{ model, thinking, tier }` or `null`, `roles[]` `{ agent, model, thinking }` alphabetical, `inherit` when unset, `truncated`), `truncated`; `null` when the store cannot be read |
|
|
75
|
+
| `permission` | `mode` (`normal`, `auto`, `yolo`, `super-yolo`), `defaultMode`, `yolo`, `detail` |
|
|
76
|
+
| `statuses`, `integrations` | always `null` (pi exposes extension statuses only to the footer owner) |
|
|
77
|
+
| `todo` | `items[]` (`id`, `title`, `state`, `note`), `progress` (`done`, `total`, `open`), `current`, `truncated` |
|
|
78
|
+
| `changes` | `files[]` (`path`, `status`, `added`, `deleted`), `summary`, `worktrees[]`, `truncated`; `null` before the first scan. An untracked file's `added` is its line count (git's numstat never lists it); a binary file, a file over 1 MiB, an unreadable file or one past 200 untracked files per scan has `added` and `deleted` `null` (no count) |
|
|
79
|
+
| `agents` | `items[]` (`id`, `name`, `role` = `null`, `state`, `step`, `model`, `thinking`, `spend`), `active`, `spend` |
|
|
80
|
+
| `jobs` | `running[]` and `recent[]` (finished tail) with `startedAt`, `endedAt`, `exitCode`, `elapsedMs` at write time |
|
|
81
|
+
| `review` | `state`, `label`, `scope` |
|
|
82
|
+
| `stats` | `turns`, `toolCalls`, `toolErrors`, `cost`, token counts, `cacheHitRate`, `durationMs`, `models[]` |
|
|
83
|
+
| `activity` | `state` (`working`, `waiting`, `blocked`, `idle`), `streaming`, ODD `phase` and `phaseLabel`, `blockedLabel`; S15: `agents` and `jobs` (the session's subagents and background jobs that still run, the same numbers as `agents.active` and `jobs.running`) and `label`, the words every desktop region shows: "Working · 2 agents" while the turn runs, "Waiting on 2 agents · 1 job" once the turn ended but that work still runs (`waiting`, never `idle`), the blocker's label, else "Idle". Background subagents are the agents owner's, not the jobs registry's: they count in `agents`, never in `jobs` |
|
|
84
|
+
| `pendingQuestion` | the open question or `null` (below) |
|
|
85
|
+
| `commands` | the session's slash commands for the desktop palette and the composer's `/` menu: `items[]` (`name`, `description`, `args`, `terminal`, `source`) and `truncated` (below) |
|
|
86
|
+
|
|
87
|
+
`pendingQuestion.kind` is `choice` (`ask_user_choice`), `questionnaire`
|
|
88
|
+
(`ask_user_question`), `prompt` (an extension dialog: `promptKind` is `select`,
|
|
89
|
+
`confirm`, `input` or `editor`) or `consent` (a blocker without content, such as
|
|
90
|
+
review consent; `question` is its label). Ask tool questions carry `tool` and
|
|
91
|
+
`toolCallId`, the flattened first `question`, `header`, `options`
|
|
92
|
+
(`label`, `description`), `multi`, `custom`, and every question in `questions`.
|
|
93
|
+
Opaque answer tokens (`ask_user_choice` option values) are never written.
|
|
94
|
+
`terminalOnly` is `true` when the desktop must not pick an answer: prompts,
|
|
95
|
+
consent, several questions or a multi-select question, and a provider consent or
|
|
96
|
+
maintenance authorization the agent relays through an ask tool (below). The
|
|
97
|
+
desktop then shows the options for reading only, with "Answer in Terminal".
|
|
98
|
+
|
|
99
|
+
`usage` follows the panel's own fetches; the feed never asks a provider itself.
|
|
100
|
+
gentle-shell fetches when the session starts (forced) and after each turn (at most
|
|
101
|
+
once per provider every 5 minutes), and records the windows Claude and Codex send
|
|
102
|
+
with every response. The feed reads the owner's store when the session starts and
|
|
103
|
+
after each turn, then again 2 s and 12 s later (the fetch has no event of its own;
|
|
104
|
+
its window is 10 s), and takes every response-carried snapshot as it is recorded.
|
|
105
|
+
The desktop's refresh is the panel's `r` (`refresh_usage`, below).
|
|
106
|
+
|
|
107
|
+
`commands.items` lists pi's built-in commands first (`source` `builtin`: `new`,
|
|
108
|
+
`resume`, `fork`, `clone`, `tree`, `compact`, `name`, `export`, `session`, `copy`,
|
|
109
|
+
`model`, `thinking`, … — every built-in but `/quit`, which is typed, never one click
|
|
110
|
+
away), then pi's command registry in its own order: extension commands
|
|
111
|
+
(`extension`), prompt templates (`prompt`) and skills (`skill`). `terminal` is `true`
|
|
112
|
+
when the command answers with a screen of the TUI (a picker, a panel, a status
|
|
113
|
+
report), so the desktop shows the Terminal after sending it; prompt templates and
|
|
114
|
+
skills answer in the conversation. `args` names the argument a command needs
|
|
115
|
+
(`/name <name>`): the desktop puts it in the composer instead of sending it. The
|
|
116
|
+
desktop RPC's own `gentle:desktop` channel is never listed; source paths never
|
|
117
|
+
reach the file.
|
|
118
|
+
|
|
119
|
+
Arrays are capped (200 changes, 100 todo items, 50 jobs, 50 agents, 20 models,
|
|
120
|
+
4 questions, 10 options, 200 commands, 8 usage providers, 20 profiles of 40 roles); command descriptions are cut at 200
|
|
121
|
+
characters; free text is cut at 500 characters (questions at 2000,
|
|
122
|
+
paths at 1000/4096) and stripped of control characters. Readers should ignore an
|
|
123
|
+
unknown `schema`.
|
|
124
|
+
|
|
125
|
+
## Performance
|
|
126
|
+
|
|
127
|
+
S13 (`odd/tasks/herdr-desktop.md`): every write wakes every desktop reader, and
|
|
128
|
+
every flush runs on pi's event loop, so the publisher keeps both rare and cheap.
|
|
129
|
+
|
|
130
|
+
- **Urgent tier (≤ 16 ms):** a question opening or closing (`pendingQuestion`),
|
|
131
|
+
a permission mode change, an `activity.state` transition (idle ↔ working ↔
|
|
132
|
+
waiting ↔ blocked; S15: the last subagent or job ending moves `waiting` to
|
|
133
|
+
`idle` at once) are written at once; a desktop prompt being held or released flushes
|
|
134
|
+
at once too (the snapshot has no field of its own for it, so it writes only
|
|
135
|
+
what changed with it). A pending routine write rides along.
|
|
136
|
+
- **Routine tier:** everything else (stats, context, changes, usage, commands,
|
|
137
|
+
agents and jobs progress, streaming) coalesces: at most one write per 1000 ms
|
|
138
|
+
while the agent, a job or a subagent works, 250 ms after the change while
|
|
139
|
+
idle. A flush whose content did not change writes nothing.
|
|
140
|
+
- **Cheap flushes:** session stats fold only the entries added since the last
|
|
141
|
+
flush (`lib/desktop-feed-stats.ts`; pi's `getEntryCount()` skips the read
|
|
142
|
+
when nothing was added); pi's command registry is read at the first flush
|
|
143
|
+
after `session_start` and after `resources_discover`, not per flush;
|
|
144
|
+
untracked files are counted again only when their size or mtime changed.
|
|
145
|
+
|
|
146
|
+
Measured with `tests/desktop-feed-performance.test.ts` (virtual clock; real
|
|
147
|
+
store writes on the local disk, Apple Silicon):
|
|
148
|
+
|
|
149
|
+
| Measure | Before | After |
|
|
150
|
+
| --- | --- | --- |
|
|
151
|
+
| Writes for 100 tool events in 10 s while working | 34 (≈ 204/min) | 10 (≈ 60/min) |
|
|
152
|
+
| Writes in a quiet minute | 0 | 0 |
|
|
153
|
+
| Question / blocker / state change visible | ≤ 250 ms | ≤ 16 ms |
|
|
154
|
+
| Flush, 5,000 entries + 200 changed files, incremental path (median) | 1.46 ms | 0.18–0.30 ms |
|
|
155
|
+
| First stats walk of 5,000 entries (once per session start) | every count change | 1.5–2.2 ms once |
|
|
156
|
+
|
|
157
|
+
The test asserts ≤ 11 routine writes per 10 s burst, writes at least one second
|
|
158
|
+
apart, urgent changes within 50 ms, and a median flush under 15 ms.
|
|
159
|
+
|
|
160
|
+
A command registered at runtime by another extension (no pi event announces it)
|
|
161
|
+
appears after the next session start or resource rediscovery.
|
|
162
|
+
|
|
163
|
+
## Privacy
|
|
164
|
+
|
|
165
|
+
The snapshot holds workspace paths, the session file path, todo titles and notes,
|
|
166
|
+
changed file names, and open question text. It never holds prompts, tool
|
|
167
|
+
arguments other than an open question, tool output, or job commands. Do not
|
|
168
|
+
expose the folder through a public server.
|
|
169
|
+
|
|
170
|
+
## Actions: `gentle-shell.desktop-action/v1`
|
|
171
|
+
|
|
172
|
+
The desktop acts on a session with exactly the authority the person has in its
|
|
173
|
+
terminal, never more. Each session that publishes a snapshot also keeps a private
|
|
174
|
+
inbox and outbox:
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
<agentDir>/desktop/inbox/<session>/<id>.json the desktop drops one action
|
|
178
|
+
<agentDir>/desktop/outbox/<session>/<id>.json the session answers it
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
`<session>` is the snapshot's file name without `.json`. The session creates both
|
|
182
|
+
folders `0700` when it starts (with its pid in `inbox/<session>/.owner`) and
|
|
183
|
+
removes them when it ends; the desktop never creates them (no inbox means the
|
|
184
|
+
session takes no actions). The agent's own file and shell tools are denied the
|
|
185
|
+
whole `<agentDir>/desktop/` folder like any other sensitive path. An action file is
|
|
186
|
+
|
|
187
|
+
```json
|
|
188
|
+
{ "schema": "gentle-shell.desktop-action/v1", "id": "<[A-Za-z0-9_-], 1-64, = file name>",
|
|
189
|
+
"sessionId": "<this session>", "kind": "<kind>", "args": { }, "createdAt": "<ISO time>" }
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
| `kind` | `args` | Runs through |
|
|
193
|
+
|---|---|---|
|
|
194
|
+
| `set_permission_mode` | `{ mode }` (`normal`, `auto`, `yolo`, `super-yolo`) | the permission owner, as desktop RPC `set_permission_mode` (the `/gentle:mode` controller decides); an escalation is first checked against the session's activity (below) |
|
|
195
|
+
| `cancel_job` | `{ id }` | the background-jobs owner, as desktop RPC `cancel_job` |
|
|
196
|
+
| `cancel_subagent` | `{ id }` | the subagents owner, as desktop RPC `cancel_subagent` |
|
|
197
|
+
| `answer_question` | `{ toolCallId, option }` or `{ toolCallId, text }` | nothing is answered here: the session checks that `toolCallId` is the open `ask_user_choice` / single-question `ask_user_question` and answers the keys its real list takes (`up` to the top, `down` to the row, `enter`); the desktop presses them in the terminal, then types `text` into the list's own editor |
|
|
198
|
+
| `abort_turn` | `{}` | the session's own abort, the one its TUI's Esc Esc runs (in the TUI, queued messages go back to the editor); refused with `not_working` while the agent is idle |
|
|
199
|
+
| `send_prompt` | `{ text }` (1-4000 characters, not blank; new lines and tabs, no other control character; a CRLF line end counts as one new line) | pi's `sendUserMessage`, as if typed in the session's editor and submitted: a prompt while the agent is idle, a steer while it works (the TUI's Enter); trimmed like the editor. Refused with `question_open` while a question, an extension prompt or a consent is open. A prompt template or a skill (`/review …`, `/skill:…`) expands as in the editor; a pi built-in command, an extension command (`/gentle:mode`, …) or a `!` shell line is refused with `terminal_command` (they are TUI code with their own authority); a `/word` no command owns is plain text. Answers `{ queued }`. While pi runs a manual compaction (`/compact`) or a `/tree` navigation it refuses prompts, so the session holds the text, as the TUI editor queues it, and submits it once pi takes prompts again; it answers `{ queued: true, after: "compaction" }` (`{ queued: true }` when pi is busy with no agent run the session heard of yet). One prompt is held at a time: another one is refused with `session_compacting`; a held prompt the session ends before submitting is dropped with an error in that session's UI |
|
|
200
|
+
| `refresh_usage` | `{}` or `{ provider }` (1-128 characters) | the usage owner's forced refresh, as desktop RPC `refresh_subscription_usage` and the TUI usage panel's `r`; answers `{ providers: [{ provider, status, refresh? }] }` (`refresh`: `unsupported` for a provider whose windows only come with responses, `out_of_scope` for a provider the session does not target); the snapshot's `usage` follows |
|
|
201
|
+
| `apply_profile` | `{ name }` or `{ name, confirmation }` (each 1-128 characters) | `/gentle:profiles`' own "Use in this session", as desktop RPC `apply_profile` with mode `session` (never the global default, never another mode): the owner checks the name and binds the profile to this session. Answers `{ profile, mode, status, notes }` (`applied` or `not_applied`, with the screen's notices), or `status: "confirmation_required"` with `confirmation` `{ title, message, token }`: the desktop shows that dialog and, on Confirm, sends the same action with `confirmation: token` (the owner accepts it only while its dialog would still say the same). Owner refusals keep their codes: `unknown_profile`, `profile_apply_busy`, `profiles_unavailable`. Like `/gentle:profiles`, it also runs while the session works |
|
|
202
|
+
| `answer_question` with `via: "session"` | `{ toolCallId, option, via }` or `{ toolCallId, text, via }` | the same checks as the key path (still the open question, answerable from the desktop, an existing option or the list's free-text row), then the ask tool's own list takes the answer, exactly as a click or Enter in it would; answers `{ toolCallId, answered: true }`, or `answer_in_terminal` ("Answer this question in that session's terminal.") when the list has no handle (a Gentle Shell older than this one) |
|
|
203
|
+
|
|
204
|
+
The session refuses, removes and answers (code in `error.code`) a file that is a
|
|
205
|
+
link, not a private regular file (`unsafe_file`), over 16 KiB (`too_large`), older
|
|
206
|
+
than 60 s or dated ahead (`stale`), of another kind (`unknown_kind`), for another
|
|
207
|
+
session (`wrong_session`), malformed or with other args (`invalid_action`), already
|
|
208
|
+
run (`duplicate`), a question that is no longer open (`question_mismatch`), a
|
|
209
|
+
stop while the agent is idle (`not_working`), a permission escalation written
|
|
210
|
+
while the session was busy (`escalation_while_busy`), a prompt while a question is
|
|
211
|
+
open (`question_open`), a prompt that is a command or shell line only the terminal
|
|
212
|
+
runs (`terminal_command`), a second prompt while one is held for after a
|
|
213
|
+
compaction (`session_compacting`), a prompt to a session without a prompt
|
|
214
|
+
owner (`unsupported`).
|
|
215
|
+
|
|
216
|
+
**Prompts are not human evidence.** A `send_prompt` reaches pi with the input
|
|
217
|
+
source `extension`, as any extension message does, never `interactive`: Gentle
|
|
218
|
+
AI's consent and reply-language rules, which count only interactive input as the
|
|
219
|
+
person's own words, never treat a desktop prompt as a typed consent. Consent stays
|
|
220
|
+
in the terminal.
|
|
221
|
+
|
|
222
|
+
**The ask tools' answer handle.** `ask_user_choice` and `ask_user_question`
|
|
223
|
+
register, while their TUI list is open, one handle per tool call id in a
|
|
224
|
+
process-wide registry (`lib/desktop-feed-answers.ts`; their event-bus traffic is
|
|
225
|
+
unchanged). It finishes the list once, with the result a click gives; a finished
|
|
226
|
+
list leaves the registry. Only a single single-select question can be answered
|
|
227
|
+
through it, and never with a consent token (`granted`, `declined`) as the option
|
|
228
|
+
value, label or typed text.
|
|
229
|
+
A non-regular entry (a folder, a FIFO, a device) is refused once: an empty
|
|
230
|
+
folder is removed, anything that cannot be removed is skipped until it changes.
|
|
231
|
+
|
|
232
|
+
**Escalations.** Any process of the same user can write the inbox, the agent's
|
|
233
|
+
own tools included (the tool guard covers the folder by name, but a shell can
|
|
234
|
+
spell a path other ways). So a change to a less restrictive mode (`normal` →
|
|
235
|
+
`auto` → `yolo` → `super-yolo`) is refused with `escalation_while_busy`, before
|
|
236
|
+
the permission owner is asked, when its file was last written (the later of the
|
|
237
|
+
file's `mtime` and `ctime`, never `createdAt`) while the agent worked, a
|
|
238
|
+
background job or a subagent of the session ran, within 2 s after that activity
|
|
239
|
+
ended, or before the session started. Lowering the mode, `abort_turn` and the
|
|
240
|
+
`cancel_*` actions are always accepted. `apply_profile` does not follow this rule:
|
|
241
|
+
like `/gentle:profiles` in the TUI, it runs while the session works. The desktop's confirmation dialog stays
|
|
242
|
+
the human gate for Super-YOLO; the session does not ask for a dialog nonce,
|
|
243
|
+
because a nonce file would be written by the same user the agent runs as and
|
|
244
|
+
proves nothing the activity check does not.
|
|
245
|
+
|
|
246
|
+
Multi-question and multi-select questions, extension prompts and consent are
|
|
247
|
+
answered in the terminal (`answer_in_terminal`); consent is never answered from
|
|
248
|
+
the desktop. That includes a provider consent or maintenance authorization the
|
|
249
|
+
agent relays through `ask_user_choice` / `ask_user_question`: the session treats
|
|
250
|
+
an ask call as such a relay when a tool result in the same or the previous agent
|
|
251
|
+
run carried a provider decision (a `gentle-ai.review-integration.consent/…` or
|
|
252
|
+
`gentle-ai.review-repair-authorization/…` envelope, a consent binding,
|
|
253
|
+
`maintainer_authorization`), or when the call's own options carry the consent
|
|
254
|
+
answers (`granted` / `declined`) or such an envelope. Every file is removed once
|
|
255
|
+
read; a fresh file that does not parse yet is read again 250 ms later (it may
|
|
256
|
+
still be written).
|
|
257
|
+
|
|
258
|
+
The answer is `{ schema: "gentle-shell.desktop-action-result/v1", id, sessionId,
|
|
259
|
+
kind, ok, data | error, finishedAt }`, `0600`, `data` at most 4 KiB. Owner errors
|
|
260
|
+
keep the owner's code and message (`permission_denied`, `not_found`, …); the
|
|
261
|
+
desktop shows them. The session keeps at most 32 answers for 10 minutes and
|
|
262
|
+
removes the folder when it ends (Herdr mods may write files only under the app's
|
|
263
|
+
own folder, so the desktop leaves answers in place). A session killed without
|
|
264
|
+
its shutdown leaves both folders behind; a later session start removes them once
|
|
265
|
+
they have not changed for 10 minutes and their session is proven gone: the pid in
|
|
266
|
+
`.owner` (or, without one, in its snapshot) no longer runs, or there is neither.
|
|
267
|
+
A live session's folders stay however long it is idle.
|
|
268
|
+
|
|
269
|
+
What the desktop does without this inbox, as the person would, for a session in
|
|
270
|
+
a terminal of its window (kind Herdr): it sends prompts
|
|
271
|
+
and the TUI's own slash commands (any command typed in the composer or chosen in
|
|
272
|
+
the `/` menu or the ⌘K palette, and the views' own `/gentle:changes`,
|
|
273
|
+
`/gentle:agents`, `/gentle:jobs`, `/gentle:profiles`, `/gentle:persona`) with
|
|
274
|
+
`hc send`, only while no question is open (the composer refuses to send while
|
|
275
|
+
one is); it pastes the clipboard with Ctrl+V; and the review switch runs
|
|
276
|
+
`gentle-ai review mode enable|disable --scope global --cwd <project> --json`
|
|
277
|
+
after a confirmation that says it is global: it changes receipt-driven review for
|
|
278
|
+
every repository (a repository's clone-local `off` still wins). Super-YOLO and
|
|
279
|
+
the review switch ask in a dialog first (`gentle-confirm`: Confirm runs the
|
|
280
|
+
action once; Cancel or Esc forgets it, and an unanswered dialog expires after two
|
|
281
|
+
minutes). Right before pressing an answer's keys, the chat reads the snapshot
|
|
282
|
+
again and presses nothing if the question changed.
|
|
283
|
+
|
|
284
|
+
## Desktop keys
|
|
285
|
+
|
|
286
|
+
The Herdr mods ship `herdr/keys.json`, a `layout:gentle-shell` section for the
|
|
287
|
+
person's `~/.config/herdr-app/keys.json` (merged into it, never replacing a key
|
|
288
|
+
they already use):
|
|
289
|
+
|
|
290
|
+
| Key | Command | Does |
|
|
291
|
+
|---|---|---|
|
|
292
|
+
| ⌘K | `mod.open:gentle-palette` | the Gentle commands palette: needs-you items, session commands, views, permission modes, every command of the session |
|
|
293
|
+
| ⌘J | `gentle-status.toggle` | Chat ↔ Terminal |
|
|
294
|
+
| ⌘. | `gentle-status.stop` | stops the shown session's turn (`abort_turn`) |
|
|
295
|
+
| ⌥⌘1 … ⌥⌘6 | `gentle-inspector.tab-<changes\|todo\|agents\|jobs\|review\|session>` | the inspector tab |
|
|
296
|
+
|
|
297
|
+
`gentle-status.session-next` and `gentle-status.session-prev` (no default key; run
|
|
298
|
+
them with `herdr-app do` or bind them) show the next or previous live session,
|
|
299
|
+
wherever it runs.
|
|
300
|
+
|
|
301
|
+
Inside the chat, without that merge: ⌘K opens the palette, ⌘J shows the Terminal,
|
|
302
|
+
Esc Esc stops the agent (Esc first closes the `/` menu), and `/` in the composer
|
|
303
|
+
opens the command menu (↑/↓ move, Enter runs, Tab completes, Esc closes).
|