gentle-pi 5.0.0 → 5.1.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 +1 -1
- package/assets/agents/gentle-ai-explore.md +3 -6
- package/assets/agents/gentle-ai-verify.md +1 -1
- package/assets/agents/gentle-ai-worker.md +9 -9
- package/assets/agents/jd-fix-agent.md +1 -1
- package/assets/agents/jd-judge-a.md +0 -1
- package/assets/agents/jd-judge-b.md +0 -1
- package/assets/migrations/agent-body-history.json +6 -0
- package/assets/orchestrator-full-delegation.md +1 -1
- package/assets/orchestrator-maintenance.md +11 -0
- package/assets/orchestrator-quota-recovery.md +1 -1
- package/assets/orchestrator-skills.md +10 -0
- package/assets/orchestrator-verification.md +9 -7
- package/assets/orchestrator.md +1 -1
- package/bin/gentle-shell.mjs +67 -15
- package/contracts/review-provider-contract-mirror/provider-contract.lock.json +10 -10
- package/contracts/review-provider-contract-mirror/{v1.6.0 → v1.7.0}/bundle/manifest.json +5 -5
- package/contracts/review-provider-contract-mirror/{v1.6.0 → v1.7.0}/bundle/orchestration/pi.md +5 -3
- package/contracts/review-provider-contract-mirror/{v1.6.0 → v1.7.0}/bundle/routing/pi.md +1 -1
- package/contracts/review-provider-contract-mirror/{v1.6.0 → v1.7.0}/bundle/schemas/lens.schema.json +3 -3
- package/contracts/review-provider-contract-mirror/v1.7.0/bundle/vectors/lens.json +1 -0
- package/contracts/review-provider-contract-mirror/{v1.6.0 → v1.7.0}/generated/provider-capabilities.baseline.json +3 -3
- package/contracts/review-provider-contract-mirror/{v1.6.0 → v1.7.0}/generated/provider-roles.baseline.json +3 -3
- package/docs/bundled-install.md +2 -2
- package/docs/delegated-verification.md +8 -4
- package/docs/desktop-feed.md +15 -6
- package/docs/desktop-rpc.md +44 -20
- package/docs/gentle-shell-desktop.md +10 -3
- package/docs/gentle-shell.md +17 -13
- package/docs/install-wizard.md +2 -2
- package/docs/odd-preparation-continuity.md +2 -2
- package/docs/permission-modes.md +10 -2
- package/docs/readme-reference.md +46 -11
- package/docs/session-profile-format.md +33 -7
- package/docs/work-continuity.md +7 -7
- package/docs/yolo-mode.md +1 -1
- package/extensions/child-context.ts +2 -11
- package/extensions/gentle-agents.ts +47 -28
- package/extensions/gentle-ai.ts +573 -353
- package/extensions/gentle-desktop-feed.ts +13 -3
- package/extensions/gentle-fast.ts +9 -2
- package/extensions/gentle-shell.ts +142 -55
- package/extensions/gentle-tps.ts +5 -0
- package/extensions/quiet-tools.ts +13 -22
- package/extensions/skill-registry.ts +9 -1
- package/herdr/mods/gentle-agents/snapshot.js +30 -23
- package/herdr/mods/gentle-chat/feed.js +6 -0
- package/herdr/mods/gentle-chat/main.js +76 -16
- package/herdr/mods/gentle-chat/session.js +13 -5
- package/herdr/mods/gentle-chat/snapshot.js +30 -23
- package/herdr/mods/gentle-chat/ui.js +7 -1
- package/herdr/mods/gentle-inspector/main.js +2 -0
- package/herdr/mods/gentle-inspector/snapshot.js +30 -23
- package/herdr/mods/gentle-palette/main.js +1 -1
- package/herdr/mods/gentle-palette/snapshot.js +30 -23
- package/herdr/mods/gentle-pane/snapshot.js +30 -23
- package/herdr/mods/gentle-sidebar/snapshot.js +30 -23
- package/herdr/mods/gentle-spaces/snapshot.js +30 -23
- package/herdr/mods/gentle-status/snapshot.js +30 -23
- package/herdr/mods/gentle-tabs/main.js +3 -2
- package/herdr/mods/gentle-tabs/new-tab.js +9 -0
- package/herdr/mods/gentle-tabs/snapshot.js +30 -23
- package/herdr/mods/gentle-tokens/snapshot.js +30 -23
- package/lib/agent-profiles.ts +50 -10
- package/lib/agents-config.ts +59 -4
- package/lib/agents-runner.ts +34 -1
- package/lib/auto-permission-runtime.ts +2 -1
- package/lib/background-jobs-tools.ts +24 -16
- package/lib/claude-bridge-config.ts +41 -0
- package/lib/desktop-agent-definitions-service.ts +10 -6
- package/lib/desktop-command-rpc.ts +71 -0
- package/lib/desktop-feed-sources.ts +44 -1
- package/lib/desktop-feed.ts +41 -29
- package/lib/desktop-rpc-agent-definitions.ts +7 -3
- package/lib/desktop-rpc-changes.ts +13 -4
- package/lib/desktop-rpc-config.ts +106 -3
- package/lib/exploration-budget.ts +3 -7
- package/lib/gentle-design.ts +23 -4
- package/lib/gentle-shell-desktop.ts +85 -0
- package/lib/gentle-shell-launcher.ts +106 -3
- package/lib/mcp-config.ts +214 -0
- package/lib/native-review-cli.ts +78 -34
- package/lib/odd-phase-inference.ts +1 -1
- package/lib/orchestrator-mode-policy.ts +25 -12
- package/lib/path-consent-fence.ts +113 -0
- package/lib/pi-settings.ts +157 -0
- package/lib/review-continuation-registry.ts +7 -20
- package/lib/review-coordinator.ts +5 -0
- package/lib/review-host-relay.ts +2 -35
- package/lib/review-integration-v2.ts +31 -12
- package/lib/sensitive-paths.ts +22 -2
- package/lib/session-profile-freeze.ts +11 -4
- package/lib/session-worktree-registry.ts +11 -5
- package/lib/shell-card.ts +27 -1
- package/lib/shell-changes-view.ts +6 -2
- package/lib/shell-changes.ts +94 -37
- package/lib/shell-git-worker.ts +158 -0
- package/lib/shell-idle-changes.ts +88 -0
- package/lib/shell-untracked-cache.ts +142 -0
- package/lib/shell-untracked-lines.ts +178 -0
- package/lib/tps-policy.ts +85 -0
- package/lib/vim-editor-adapter.ts +3 -2
- package/lib/voice-artifacts.ts +8 -1
- package/lib/voice-install.ts +7 -3
- package/lib/yolo-session-policy.ts +2 -2
- package/package.json +1 -1
- package/runtime/gentle-shell-desktop.mjs +85 -0
- package/runtime/gentle-shell-launcher.mjs +106 -3
- package/runtime/native-review-cli.mjs +77 -33
- package/runtime/review-integration-v2.mjs +31 -12
- package/runtime/sensitive-paths.mjs +22 -2
- package/scripts/gentle-ai-installer.mjs +10 -10
- package/scripts/main-channel.mjs +27 -7
- package/scripts/verify-package-files.mjs +13 -12
- package/skills/rdd-defect-workflow/SKILL.md +2 -2
- package/tests/agent-profiles-workflow.test.ts +102 -0
- package/tests/agents-config.test.ts +1 -2
- package/tests/agents-protocol.test.ts +1 -1
- package/tests/agents-runner.test.ts +94 -2
- package/tests/append-system-prompt-route.test.ts +16 -11
- package/tests/auto-permission-runtime.test.ts +4 -4
- package/tests/bounded-stop-contract.test.ts +50 -62
- package/tests/child-context-files.test.ts +6 -6
- package/tests/child-web-package.test.ts +1 -1
- package/tests/controlled-engineering-editor.test.ts +192 -0
- package/tests/controlled-engineering-launch.test.ts +136 -0
- package/tests/controlled-engineering.test.ts +244 -0
- package/tests/delivery-b-rendered-surfaces.test.ts +1 -1
- package/tests/desktop-feed-tool-summaries.test.ts +1 -1
- package/tests/desktop-feed-transcript.test.ts +17 -0
- package/tests/desktop-feed.test.ts +141 -7
- package/tests/desktop-liveness.test.ts +125 -0
- package/tests/desktop-persona.test.ts +17 -0
- package/tests/desktop-rpc-agent-definitions.test.ts +23 -2
- package/tests/desktop-rpc-changes.test.ts +80 -3
- package/tests/desktop-rpc-config-mcp-fidelity.test.ts +106 -0
- package/tests/desktop-rpc-config-readonly-stores.test.ts +458 -0
- package/tests/desktop-rpc-config.test.ts +5 -2
- package/tests/desktop-rpc-design.test.ts +21 -0
- package/tests/desktop-rpc-session-snapshot-commands.test.ts +50 -0
- package/tests/desktop-session-switch.test.ts +237 -0
- package/tests/desktop-target-session.test.ts +104 -0
- package/tests/destructive-command-guard.test.ts +187 -0
- package/tests/devbinary/pi-host-relay.devtest.ts +73 -9
- package/tests/exploration-budget.test.ts +2 -26
- package/tests/fixtures/primary-session-prompt/gentleman.golden.md +14 -10
- package/tests/full-delegation-closure.test.ts +19 -9
- package/tests/generic-agent-tools.test.ts +3 -3
- package/tests/gentle-agents.test.ts +214 -9
- package/tests/gentle-ai-exploration-budget.test.ts +3 -2
- package/tests/gentle-ai-installer.test.ts +52 -51
- package/tests/gentle-ai.test.ts +29 -5
- package/tests/gentle-chat-read-failure.test.ts +74 -0
- package/tests/gentle-chat-session-read.test.ts +127 -0
- package/tests/gentle-design.test.ts +39 -0
- package/tests/gentle-shell-desktop.test.ts +108 -0
- package/tests/gentle-shell-launcher-auto-provision.test.ts +152 -0
- package/tests/gentle-shell-launcher-machine-output.test.ts +356 -0
- package/tests/gentle-shell.test.ts +93 -12
- package/tests/gentle-tps.test.ts +57 -0
- package/tests/independent-recovery-delivery.test.ts +15 -13
- package/tests/installer-preflight.test.ts +3 -2
- package/tests/job-turn-end-texts.test.ts +57 -0
- package/tests/lazy-module-contradictions-contract.test.ts +1 -2
- package/tests/main-channel.test.ts +12 -1
- package/tests/maintainer/desktop-rpc.maintest.ts +2 -2
- package/tests/native-review-capability-contract.test.ts +7 -1
- package/tests/native-review-cli.test.ts +113 -1
- package/tests/no-self-pause-contract.test.ts +8 -7
- package/tests/odd-phase-inference.test.ts +2 -2
- package/tests/odd-routing-canonical-ratchet.test.ts +1 -1
- package/tests/odd-routing-contract.test.ts +1 -1
- package/tests/orchestrator-budget.test.ts +7 -2
- package/tests/orchestrator-prompt-diet-contract.test.ts +5 -5
- package/tests/orchestrator-skills-inline-contract.test.ts +26 -0
- package/tests/package-manifest.test.ts +11 -16
- package/tests/packaged-agent-codemode.test.ts +79 -0
- package/tests/path-consent-fence.test.ts +326 -0
- package/tests/pi-update-launcher.test.ts +1 -1
- package/tests/primary-session-prompt.test.ts +9 -7
- package/tests/profile-fast-tier.test.ts +79 -4
- package/tests/progress-rule-contract.test.ts +54 -0
- package/tests/rdd-delivery-warning.test.ts +42 -4
- package/tests/review-actor-tool-deny.test.ts +1 -2
- package/tests/review-continuation-registry.test.ts +17 -17
- package/tests/review-controller-native-recovery.test.ts +100 -0
- package/tests/review-controller-native-routing.test.ts +129 -24
- package/tests/review-coordinator.test.ts +14 -0
- package/tests/review-host-relay-restart-parity.test.ts +2 -52
- package/tests/review-host-relay-routing.test.ts +57 -297
- package/tests/review-host-relay.test.ts +0 -46
- package/tests/review-integration-v2-forward.test.ts +39 -2
- package/tests/review-json-arguments.test.ts +30 -9
- package/tests/review-one-call-findings.test.ts +1 -0
- package/tests/review-untracked-inventory-replay.test.ts +181 -0
- package/tests/runtime-harness.mjs +27 -1
- package/tests/sensitive-path-tools.test.ts +155 -4
- package/tests/session-profile-extension.test.ts +90 -11
- package/tests/session-profile-freeze.test.ts +49 -2
- package/tests/session-profile-v1-compat.test.ts +11 -3
- package/tests/session-worktree-registry.test.ts +23 -0
- package/tests/shell-changes-idle-start.test.ts +510 -0
- package/tests/shell-changes-untracked-bound.test.ts +230 -0
- package/tests/shell-changes-view.test.ts +8 -2
- package/tests/shell-changes.test.ts +134 -0
- package/tests/shell-git-runner-stall.test.ts +74 -0
- package/tests/shell-git-worker-fallback.test.ts +140 -0
- package/tests/shell-git-worker-lifetime.test.ts +91 -0
- package/tests/shell-render-cache-runtime.test.ts +256 -3
- package/tests/shell-untracked-cache.test.ts +213 -0
- package/tests/short-check-routing-contract.test.ts +11 -7
- package/tests/skill-registry.test.ts +3 -3
- package/tests/support/chat-ui.ts +39 -0
- package/tests/t7-recovery-preservation.test.ts +68 -0
- package/tests/tps-policy.test.ts +96 -0
- package/tests/turn-end-rule-contract.test.ts +155 -0
- package/tests/turn-end-scope.test.ts +39 -0
- package/tests/verification-scoped-stop-contract.test.ts +1 -1
- package/tests/verification-tiers-contract.test.ts +4 -3
- package/tests/verify-first-launch-contract.test.ts +19 -7
- package/tests/vim-editor-adapter.test.ts +4 -4
- package/tests/voice-install.test.ts +97 -11
- package/tests/windows-hidden-processes.test.ts +11 -44
- package/tests/work-continuity-contract.test.ts +48 -55
- package/tests/yolo-session-policy.test.ts +2 -0
- package/contracts/review-provider-contract-mirror/v1.6.0/bundle/vectors/lens.json +0 -1
- package/extensions/codegraph-tools.ts +0 -437
- package/tests/child-codegraph-bootstrap.test.ts +0 -74
- package/tests/codegraph-tools.test.ts +0 -554
- /package/contracts/review-provider-contract-mirror/{v1.6.0 → v1.7.0}/bundle/README.md +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.6.0 → v1.7.0}/bundle/schemas/refuter.schema.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.6.0 → v1.7.0}/bundle/schemas/targeted-validator.schema.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.6.0 → v1.7.0}/bundle/vectors/refuter.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.6.0 → v1.7.0}/bundle/vectors/targeted-validator.json +0 -0
package/contracts/review-provider-contract-mirror/{v1.6.0 → v1.7.0}/bundle/schemas/lens.schema.json
RENAMED
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
"title": "Gentle AI reviewer result",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"additionalProperties": false,
|
|
7
|
-
"required": ["
|
|
7
|
+
"required": ["inspection", "findings", "evidence"],
|
|
8
8
|
"properties": {
|
|
9
|
-
"subject_hash": {"type": "string", "pattern": "^sha256:[0-9a-f]{64}$"},
|
|
9
|
+
"subject_hash": {"type": "string", "pattern": "^sha256:[0-9a-f]{64}$", "description": "Optional legacy echo; omit it from new reviewer output."},
|
|
10
10
|
"inspection": {"type": "object", "additionalProperties": false, "required": ["status", "paths"], "allOf": [{"if": {"properties": {"status": {"const": "unavailable"}}, "required": ["status"]}, "then": {"required": ["reason"]}}], "properties": {"status": {"type": "string", "enum": ["completed", "unavailable"], "description": "\"completed\" asserts every changed_path_manifest path was actually inspected. \"unavailable\" asserts the candidate could not be inspected at all and requires a non-empty reason; this is the typed admission-completeness signal; evidence prose is not a substitute for it."}, "paths": {"type": "array", "description": "Complete unique unordered set of every changed_path_manifest.path when status is \"completed\"; empty when status is \"unavailable\".", "uniqueItems": true, "items": {"type": "string", "minLength": 1}}, "reason": {"type": "string", "minLength": 1, "description": "Required and non-empty only when status is \"unavailable\": why the candidate could not be inspected."}}},
|
|
11
11
|
"lens": {"type": "string", "description": "Optional selected lens binding. Omission canonicalizes to the selected subject lens.", "enum": ["risk", "resilience", "readability", "reliability", "review-risk", "review-resilience", "review-readability", "review-reliability"]},
|
|
12
12
|
"findings": {"type": "array", "items": {"type": "object", "additionalProperties": false, "required": ["location", "severity", "claim", "proof_refs"], "allOf": [{"if": {"properties": {"severity": {"enum": ["BLOCKER", "CRITICAL"]}}, "required": ["severity"]}, "then": {"required": ["evidence_class", "causal_disposition"]}}], "properties": {"id": {"type": "string", "pattern": "^R[1-4]-[A-Za-z0-9][A-Za-z0-9._-]*$", "description": "Optional explicit ID; omit it to receive a native-assigned ID. When present it must carry the prefix bound to the selected lens, not the selection order: review-risk=R1-, review-readability=R2-, review-reliability=R3-, review-resilience=R4-."}, "lens": {"type": "string", "enum": ["risk", "resilience", "readability", "reliability", "review-risk", "review-resilience", "review-readability", "review-reliability"]}, "location": {"type": "string", "description": "One canonical repository-relative path:line or inclusive path:start-end span.", "pattern": "^.+:[1-9][0-9]*(?:-[1-9][0-9]*)?$"}, "severity": {"type": "string", "enum": ["BLOCKER", "CRITICAL", "WARNING", "SUGGESTION"]}, "claim": {"type": "string", "minLength": 1}, "proof_refs": {"type": "array", "minItems": 1, "items": {"type": "string", "pattern": "\\S", "not": {"pattern": "^\\s*(?:[nN]/[aA]|[nN][aA]|[nN][oO][nN][eE]|[tT][oO][dD][oO]|[tT][bB][dD]|[pP][aA][sS][sS]|[pP][aA][sS][sS][eE][dD]|[sS][uU][cC][cC][eE][sS][sS]|[pP][lL][aA][cC][eE][hH][oO][lL][dD][eE][rR])\\s*$"}}}, "evidence_class": {"type": "string", "enum": ["deterministic", "inferential", "insufficient"]}, "causal_disposition": {"type": "string", "enum": ["introduced", "behavior-activated", "worsened", "pre-existing", "base-only", "unknown"]}}}},
|
|
13
13
|
"evidence": {"type": "array", "minItems": 1, "items": {"type": "string", "pattern": "\\S", "not": {"pattern": "^\\s*(?:[nN]/[aA]|[nN][aA]|[nN][oO][nN][eE]|[tT][oO][dD][oO]|[tT][bB][dD]|[pP][aA][sS][sS]|[pP][aA][sS][sS][eE][dD]|[sS][uU][cC][cC][eE][sS][sS]|[pP][lL][aA][cC][eE][hH][oO][lL][dD][eE][rR])\\s*$"}}}
|
|
14
14
|
},
|
|
15
|
-
"examples": [{"
|
|
15
|
+
"examples": [{"inspection": {"status": "completed", "paths": ["internal/example.go"]}, "findings": [], "evidence": ["reviewed the complete candidate scope"]}, {"inspection": {"status": "unavailable", "paths": [], "reason": "the immutable inspection command timed out before any path could be read"}, "findings": [], "evidence": ["inspection was unavailable; see inspection.reason"]}]
|
|
16
16
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"inspection":{"status":"completed","paths":["internal/example.go"]},"findings":[],"evidence":["reviewed the complete candidate scope"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "gentle-pi.provider-contract-capabilities-baseline/v1",
|
|
3
|
-
"contract_semver": "1.
|
|
3
|
+
"contract_semver": "1.7.0",
|
|
4
4
|
"transport_capability": "gentle-ai.provider-transport/v1",
|
|
5
5
|
"mandatory_capabilities": [
|
|
6
6
|
"gentle-ai.provider-transport/v1"
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
{
|
|
17
17
|
"runtime": "pi",
|
|
18
18
|
"path": "orchestration/pi.md",
|
|
19
|
-
"sha256": "
|
|
19
|
+
"sha256": "e0c978bc67eca6db19b0ecb38352e201f7e9f91900d7c3797896d5cd15a5f415"
|
|
20
20
|
}
|
|
21
21
|
],
|
|
22
22
|
"routing": [
|
|
23
23
|
{
|
|
24
24
|
"runtime": "pi",
|
|
25
25
|
"path": "routing/pi.md",
|
|
26
|
-
"sha256": "
|
|
26
|
+
"sha256": "9e38df86c6733672c5b07e3cf6727da254395c8c5d43c1c742d9eae305fc7be4"
|
|
27
27
|
}
|
|
28
28
|
]
|
|
29
29
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "gentle-pi.provider-contract-roles-baseline/v1",
|
|
3
|
-
"contract_semver": "1.
|
|
3
|
+
"contract_semver": "1.7.0",
|
|
4
4
|
"roles": [
|
|
5
5
|
{
|
|
6
6
|
"id": "lens",
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
"gentle-ai.provider-transport/v1"
|
|
11
11
|
],
|
|
12
12
|
"schema_path": "schemas/lens.schema.json",
|
|
13
|
-
"schema_sha256": "
|
|
13
|
+
"schema_sha256": "fb4b03ef18925c0ad9e804ecea50c30037fa9cb947a7e45ffa8fe0d6693177ab",
|
|
14
14
|
"vector_path": "vectors/lens.json",
|
|
15
|
-
"vector_sha256": "
|
|
15
|
+
"vector_sha256": "82f89f20bcf58d7bf32889cf01397068b88649bf4ddf9ecb322fdc0338d7e701"
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"id": "refuter",
|
package/docs/bundled-install.md
CHANGED
|
@@ -347,14 +347,14 @@ S9. Everything Gentle AI and gentle-pi keep lives in the prefix, except Engram's
|
|
|
347
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.
|
|
348
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.
|
|
349
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.
|
|
350
|
-
- **Historical compatibility (Gentle AI 4.0.0).** The current Gentle AI 5.
|
|
350
|
+
- **Historical compatibility (Gentle AI 4.0.0).** The current Gentle AI 5.1.0 pin honors the four `GENTLE_AI_*` variables above. Gentle AI 4.0.0 ignored them:
|
|
351
351
|
- Setup still writes `~/.gentle-ai` and `~/.pi/gentle-ai`, with the restores above, and still acquires Engram its own way.
|
|
352
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.
|
|
353
353
|
- The background-subagents policy already lands in `<prefix>/config/gentle-ai/` through `GENTLE_PI_CONFIG_HOME=<prefix>/config` (see above).
|
|
354
354
|
|
|
355
355
|
What stays the user's:
|
|
356
356
|
|
|
357
|
-
- `git
|
|
357
|
+
- `git` and `gh`, which the agent runs for the user's work, from the user's `PATH`.
|
|
358
358
|
- Engram's memory data in `~/.engram`, shared with the user's other agents.
|
|
359
359
|
- pi-pretty's reads of `$HOME/.pi/agent/settings.json` (its `index.js` and `render.js` look for its settings there whatever the agent home is). This needs an upstream pi-pretty change; `node_modules` is not patched.
|
|
360
360
|
- `GENTLE_SHELL_PREFIX` and `ENGRAM_BIN` reach the agent's shell, like the agent home variables. A gentle-pi the user runs there is not bundled and ignores the prefix (see above).
|
|
@@ -4,7 +4,9 @@ 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. 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
|
|
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 and does not reset the verifier's setup limit. Correction batches and scoped rechecks for independent verifier findings keep their separate protocol limits. Successful preparation continues to authorized checks and independent probes within the existing isolation and permission boundaries.
|
|
8
|
+
|
|
9
|
+
Auxiliary verifier tooling defects have a separate correction bound: one fix per failing check, a second only if it still fails after a real fix. If still failing, report `status: partial` with command and output. Setup failure never resets it. It is neither a setup retry allowance nor a default attempt count for writers.
|
|
8
10
|
|
|
9
11
|
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. The helper applies the sensitive-path policy (`.env`, `auth.json`, `.pem`/`.key`, `secrets/` and the rest of the guard's list): a tracked sensitive file is skipped, never blocked: it is absent from `work`, hidden from the clone's `git status` (`skip-worktree`), HEAD and the receipt's `head`/`baseline` stay unchanged, and it is listed in the receipt's `skippedSensitive`; a directory in `include` skips sensitive entries and lists them there too. It refuses with `setup-failed` only when `include` names a sensitive path directly (remove it from `include` and re-run, or verify that check without the isolated preparer). Skipped tracked files and sensitive files that exist only in Git history remain reachable through the clone's Git objects: the clone carries reachable history. 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
12
|
|
|
@@ -18,11 +20,13 @@ A failed setup is not the same as an unavailable verifier capability. After the
|
|
|
18
20
|
|
|
19
21
|
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.
|
|
20
22
|
|
|
21
|
-
### Parent continuation after worker
|
|
23
|
+
### Parent continuation after a worker's partial handoff
|
|
24
|
+
|
|
25
|
+
A failed check is an obstacle. The worker keeps correcting while each attempt names a cause from the output and makes a change to address it. It never repeats the same change or stops because of an attempt count. It returns `status: partial` only if the same cause fails again after a real fix and no new hypothesis exists, passing would require weakening, skipping or rewriting the check, or the fix requires work outside the allowed surfaces or crosses an explicit limit. An explicit limit binds only the work it names.
|
|
22
26
|
|
|
23
|
-
|
|
27
|
+
That ends the worker's cycle, not the unit. The partial report preserves the failing commands and outputs, remaining implementation work, missing proof, and diagnosed cause with evidence. After a repeated-cause stop, the worker does not start a fresh correction cycle or use a new session as a reset. On any such partial handoff, including after a first failure, the parent decides the next step from the returned evidence, without asking the user: it names the cause and uses the route the active delegation mode allows, within the user's authorized scope and native authority. 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 new evidence with a changed scope or hypothesis. The parent never repeats the same attempt and never swaps executors to dodge a limit. If no permitted new approach remains, including when the cause recurs without a new hypothesis, the parent reports only that work as incomplete 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 does not reset an explicit limit, and an active or uncertain child prevents continuation.
|
|
24
28
|
|
|
25
|
-
RED construction is not a fix correction. Making a new test fail for the expected reason has its own setup
|
|
29
|
+
RED construction is not a fix correction. Making a new test fail for the expected reason has its own setup limit: one self-fix for the test's harness or setup errors. If the test still cannot reproduce the failure, the worker returns a reproduction blocker with its evidence.
|
|
26
30
|
|
|
27
31
|
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.
|
|
28
32
|
|
package/docs/desktop-feed.md
CHANGED
|
@@ -41,8 +41,12 @@ Every live snapshot is a session the desktop shows, wherever it runs: in a
|
|
|
41
41
|
terminal of the Herdr app window (kind **Herdr**), or in any other terminal —
|
|
42
42
|
the Herdr TUI, Ghostty, a herdr-core terminal this window does not show (kind
|
|
43
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;
|
|
45
|
-
|
|
44
|
+
(one `ps -p` per refresh for the pids not checked in the last 5 s; where `ps`
|
|
45
|
+
cannot start or does not answer, as on Windows, one `tasklist` instead). Only a
|
|
46
|
+
listing that answered decides: `ps` exiting 0, or 1 with nothing on stderr (a pid
|
|
47
|
+
is gone), or `tasklist` exiting 0. A `ps` that rejects its own flags (an MSYS/Git
|
|
48
|
+
`ps` on a Windows `PATH`) decides nothing, and when no listing answers every
|
|
49
|
+
snapshot counts. A Herdr session takes typed input in its terminal; a TUI
|
|
46
50
|
session takes prompts and answers through its inbox (`send_prompt`,
|
|
47
51
|
`answer_question` with `via: "session"`, below). A
|
|
48
52
|
snapshot from an older Gentle Shell without `identity.agentDir` is treated as
|
|
@@ -64,10 +68,10 @@ gone or that were not updated for a day. The folder is created `0700` and files
|
|
|
64
68
|
|
|
65
69
|
| Field | Content |
|
|
66
70
|
|---|---|
|
|
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` |
|
|
71
|
+
| `identity` | `sessionId`, exact `sessionFile`, `sessionName`, `cwd`, `realCwd`, `pid`, `ppid`, `ancestors` (nearest first, best effort: `ps` per hop, or on Windows one process-table read per walk; empty when it cannot be read), `mode`, `agentDir` (absolute agent dir the snapshot lives under), `herdr` (`paneId` from `HERDR_PANE_ID`, `env`) or `null` |
|
|
68
72
|
| `project` | `cwd`, `branch`, `dirty` (changed files, `null` before the first scan) |
|
|
69
73
|
| `model` | `id`, `provider`, `effort` (thinking level when the model reasons), `profile` `{ name, tier }` |
|
|
70
|
-
| `persona` |
|
|
74
|
+
| `persona` | the active persona mode (`"gentleman"` or `"neutral"`, read like `/gentle:persona` does), or `null` when it could not be resolved |
|
|
71
75
|
| `context` | `percent`, `tokens`, `window` |
|
|
72
76
|
| `cost` | `total` (session spend), `subscription` |
|
|
73
77
|
| `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 |
|
|
@@ -82,7 +86,7 @@ gone or that were not updated for a day. The folder is created `0700` and files
|
|
|
82
86
|
| `stats` | `turns`, `toolCalls`, `toolErrors`, `cost`, token counts, `cacheHitRate`, `durationMs`, `models[]` |
|
|
83
87
|
| `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
88
|
| `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) |
|
|
89
|
+
| `commands` | the session's slash commands for the desktop palette and the composer's `/` menu: `items[]` (`name`, `description`, `args`, `terminal`, `rpc`, `source`) and `truncated` (below) |
|
|
86
90
|
|
|
87
91
|
`pendingQuestion.kind` is `choice` (`ask_user_choice`), `questionnaire`
|
|
88
92
|
(`ask_user_question`), `prompt` (an extension dialog: `promptKind` is `select`,
|
|
@@ -111,7 +115,12 @@ away), then pi's command registry in its own order: extension commands
|
|
|
111
115
|
(`extension`), prompt templates (`prompt`) and skills (`skill`). `terminal` is `true`
|
|
112
116
|
when the command answers with a screen of the TUI (a picker, a panel, a status
|
|
113
117
|
report), so the desktop shows the Terminal after sending it; prompt templates and
|
|
114
|
-
skills answer in the conversation. `
|
|
118
|
+
skills answer in the conversation. `rpc` is `true` when the command works from an RPC
|
|
119
|
+
client (Gentle Shell's own declaration in `lib/desktop-command-rpc.ts` for extension
|
|
120
|
+
commands, a matching Pi RPC command for built-ins, always for prompt templates and
|
|
121
|
+
skills) and `false` otherwise, including every undeclared extension command; it never
|
|
122
|
+
changes `terminal`, which keeps its meaning for Herdr, and `send_prompt` still refuses
|
|
123
|
+
extension commands (`terminal_command`). `args` names the argument a command needs
|
|
115
124
|
(`/name <name>`): the desktop puts it in the composer instead of sending it. The
|
|
116
125
|
desktop RPC's own `gentle:desktop` channel is never listed; source paths never
|
|
117
126
|
reach the file.
|
package/docs/desktop-rpc.md
CHANGED
|
@@ -12,6 +12,8 @@ GENTLE_SHELL_INTERACTIVE_HOST=1 pi --mode rpc
|
|
|
12
12
|
|
|
13
13
|
The channel is inactive in the TUI and in headless RPC children. It does not register an agent-callable tool.
|
|
14
14
|
|
|
15
|
+
A Desktop that shows the design canvas itself also sets `GENTLE_DESIGN_OPEN_BROWSER=0`, so `gentle_design {action: "open"}` never launches the system browser. The canvas still starts, the `open` transition still reaches the `design_canvas` event, and the tool answers `opened: false, browserDisabled: true` with the URL.
|
|
16
|
+
|
|
15
17
|
## Transport
|
|
16
18
|
|
|
17
19
|
Desktop sends an ordinary Pi `prompt` command. Its `message` contains `/gentle:desktop` followed by one JSON request:
|
|
@@ -88,14 +90,17 @@ Returns the current event sequence and a bounded state projection:
|
|
|
88
90
|
{ "store": "managed_assets", "scope": "global", "readOnly": true, "status": "ok", "revision": "sha256:be05…" },
|
|
89
91
|
{ "store": "persona", "scope": "global+project", "readOnly": false, "status": "ok", "revision": "sha256:41aa…" },
|
|
90
92
|
{ "store": "banner", "scope": "global", "readOnly": false, "status": "missing", "revision": "sha256:9c02…" },
|
|
91
|
-
{ "store": "notifications", "scope": "global", "readOnly": false, "status": "ok", "revision": "sha256:d317…" }
|
|
93
|
+
{ "store": "notifications", "scope": "global", "readOnly": false, "status": "ok", "revision": "sha256:d317…" },
|
|
94
|
+
{ "store": "mcp", "scope": "global+project", "readOnly": true, "status": "ok", "revision": "sha256:5e21…" },
|
|
95
|
+
{ "store": "pi_settings", "scope": "global+project", "readOnly": true, "status": "ok", "revision": "sha256:a8c4…" },
|
|
96
|
+
{ "store": "claude_bridge", "scope": "global", "readOnly": true, "status": "missing", "revision": "sha256:07fd…" }
|
|
92
97
|
]
|
|
93
98
|
}
|
|
94
99
|
}
|
|
95
100
|
}
|
|
96
101
|
```
|
|
97
102
|
|
|
98
|
-
The projection carries only store identity, scope, mutability, status, and revision — never store content, never a path. It is the cheap way for a client to notice that one of the
|
|
103
|
+
The projection carries only store identity, scope, mutability, status, and revision — never store content, never a path. It is the cheap way for a client to notice that one of the twelve revisions moved and then call `get_config` for that store. `state` is `{}` when no Desktop command has bound a session context yet, or when that context has no working directory: without one, the project and pin layers cannot be read truthfully, so nothing is projected instead of a guess.
|
|
99
104
|
|
|
100
105
|
This snapshot does not project permission state: use `get_permission_mode` for that. `sequence` is the number of delivered events, so a client that saw `seq: 4` expects `sequence: 4` from a fresh snapshot unless it missed an event.
|
|
101
106
|
|
|
@@ -136,6 +141,8 @@ Without a `sections` key the request is the legacy read above, byte-for-byte (ot
|
|
|
136
141
|
|
|
137
142
|
Each section is the feed's own shape (see `DesktopFeedSnapshot` in `lib/desktop-feed.ts`) with two path-free changes: `project` is `{ "name", "branch", "dirty" }`, where `name` is the basename of the working directory (`null` for a filesystem root such as `/` or a drive root such as `C:\`), and in `changes` every worktree `root` is an opaque, stable label (`root-` plus 12 hex characters) while every file carries a `path` relative to its worktree plus that worktree's `root` label (`null`, with the bare file name, for a path no worktree holds). Windows-style roots (a drive letter or backslashes) match their files case- and separator-insensitively; POSIX roots match case-sensitively. A worktree whose root is `/` or a bare drive gets `root: null` and never relativizes a path: its files cross as bare file names with `root: null`. A section the session has nothing for is `null`, as in the feed (`changes` before the first scan, `review` before a review, `pendingQuestion` with no open question). When the feed is not running for this session (the extension is not loaded, the process is not Gentle Shell, or the session is not live) the answer is `session_unavailable`; `get_snapshot` without `sections` is unaffected. A read never emits an event.
|
|
138
143
|
|
|
144
|
+
The `commands` section lists `items[]` of `{ "name", "description", "args", "terminal", "rpc", "source" }` and `truncated`, the same 200-item bound as the feed. `terminal` keeps its Herdr meaning: the command answers with a screen of the TUI, so a client that types it into the TUI shows the Terminal afterwards; it is unchanged by `rpc`. `rpc` is `true` when the command works from an RPC client: for an extension command, Gentle Shell declares it in `lib/desktop-command-rpc.ts` after reading its handler, because it answers only through what Pi's RPC mode forwards (select, confirm, input, editor dialogs and notifications) or through messages and side effects, never `ctx.ui.custom`, an overlay, a TUI component, raw keys, or a refusal outside the TUI; for a built-in, Pi's RPC protocol has a matching command (`new_session`, `fork`, `clone`, `compact`, `set_session_name`, `export_html`, `get_session_stats`, `get_last_assistant_text`, `set_model`, `set_thinking_level`), since typing a built-in into Pi's `prompt` does not run it; prompt templates and skills are always `true`, because Pi's `prompt` expands them. Any extension command Gentle Shell does not declare, including every third-party one, is `false`. `rpc` is advisory, for an RPC client that sends the command through Pi's own `prompt`: this channel's `send_prompt` still answers `terminal_command` for every extension command and built-in, whatever `rpc` says.
|
|
145
|
+
|
|
139
146
|
### `get_config`
|
|
140
147
|
|
|
141
148
|
Reads one existing configuration store through the owner that already reads it. Desktop names a store identifier, never a path: the request accepts exactly one param.
|
|
@@ -151,7 +158,7 @@ Reads one existing configuration store through the owner that already reads it.
|
|
|
151
158
|
|
|
152
159
|
| Param | Required | Type | Meaning |
|
|
153
160
|
| --- | --- | --- | --- |
|
|
154
|
-
| `store` | yes | one of the
|
|
161
|
+
| `store` | yes | one of the twelve store identifiers below | The store to read. |
|
|
155
162
|
|
|
156
163
|
Any other key — including `scope`, `path`, `file`, or `physical_path` — is rejected as `invalid_request`. A string that is not a known store identifier is rejected as `unknown_store`. Neither case reads anything.
|
|
157
164
|
|
|
@@ -166,6 +173,9 @@ Any other key — including `scope`, `path`, `file`, or `physical_path` — is r
|
|
|
166
173
|
| `persona` | `readPersonaLayer` + `resolvePersonaMode` over `<configHome>/persona.json` + `<cwd>/.pi/gentle-ai/persona.json` | `global+project` | `false` | `{ mode }`: the persona in effect, the project layer winning. |
|
|
167
174
|
| `banner` | `readBannerConfigSync` over `<configHome>/banner.json` | `global` | `false` | `{ showRose, showTextLogo, color }`. |
|
|
168
175
|
| `notifications` | `parseNotificationSettingsFile` over `<configHome>/notifications.json` | `global` | `false` | The validated settings without `schema`, every `file:` sound replaced by `"file"`. |
|
|
176
|
+
| `mcp` | `readMcpConfig` (mirrors Pi's `loadMcpConfig`) over `<agentHome>/mcp.json` + `<cwd>/.pi/mcp.json` (project file only for a trusted project) | `global+project` | `true` | `{ servers: [{ name, transport, enabled }], truncated, omitted }`, `transport` being `stdio` or `http`: at most 64 servers, in Pi's load order; `truncated` reports the cut at 64 and `omitted` counts servers left out because their name is longer than 128 characters. No `command`, `args`, `env`, `cwd`, `url`, `headers`, `oauth`, or `auth` value. |
|
|
177
|
+
| `pi_settings` | `readPiSettings` through Pi's `SettingsManager` over `<agentHome>/settings.json` + `<cwd>/.pi/settings.json` (project file only for a trusted project) | `global+project` | `true` | Display settings only: `{ defaultProvider, defaultModel, defaultThinkingLevel, enabledModels, extensions, truncated }`, `extensions` being names. Packages (see `get_update_status`), the theme, and `sessionDir` are not part of it. |
|
|
178
|
+
| `claude_bridge` | `readClaudeBridgeConfig` over `<agentHome>/claude-bridge.json` | `global` | `true` | `{ plan }` from `provider.plan` in the config file of `pi-claude-bridge`, a third-party Pi package some users already have. `missing` when the file is absent. |
|
|
169
179
|
|
|
170
180
|
Success:
|
|
171
181
|
|
|
@@ -197,7 +207,7 @@ Success:
|
|
|
197
207
|
| --- | --- |
|
|
198
208
|
| `store` | The store identifier that was read. |
|
|
199
209
|
| `scope` | Which owner layers this store is assembled from: `global`, `global+project`, or `local+repo`. |
|
|
200
|
-
| `readOnly` | `false` for the six writable stores (`profiles`, `profile_fallbacks`, `pins`, `persona`, `banner`, `notifications`); `true` for the three derived or installer-owned stores (`models`, `subagents`, `managed_assets`). |
|
|
210
|
+
| `readOnly` | `false` for the six writable stores (`profiles`, `profile_fallbacks`, `pins`, `persona`, `banner`, `notifications`); `true` for the three derived or installer-owned stores (`models`, `subagents`, `managed_assets`) and the three display stores (`mcp`, `pi_settings`, `claude_bridge`). |
|
|
201
211
|
| `status` | `ok` (normalized content follows), `missing` (no layer produced content because no layer file exists), or `invalid` (layers exist but none of them produced content). See [Layer semantics](#layer-semantics). |
|
|
202
212
|
| `revision` | Opaque read-time digest of the canonical normalized content. See [Revision limits](#revision-limits). |
|
|
203
213
|
| `value` | Normalized owner content, present when the store produced one. Absent when a layer is missing or invalid. |
|
|
@@ -208,7 +218,11 @@ Success:
|
|
|
208
218
|
|
|
209
219
|
`status` answers for the store; `layers` answers for each file it is assembled from. For a merged store the two are different questions:
|
|
210
220
|
|
|
211
|
-
- `profiles`, `profile_fallbacks`, `managed_assets`, `banner`, and `
|
|
221
|
+
- `profiles`, `profile_fallbacks`, `managed_assets`, `banner`, `notifications`, and `claude_bridge` have one layer, so `status` is that layer's status.
|
|
222
|
+
- `mcp` and `pi_settings` follow Pi's project trust: Pi reads the project `mcp.json` and `settings.json` only when the session trusts the project, so these stores list a `project` layer only then. For an untrusted project (or a host that cannot say) `layers` holds the `global` layer alone and `value` ignores the project file. A file that is not JSON (or, for `mcp`, not an object with an `mcpServers` object) is an `invalid` layer and the other layer still merges. Pi does not announce a trust change to extensions, so a change made during the session is noticed when the next Desktop command binds the session: `mcp` and `pi_settings` are re-read then, and each whose revision moved is announced as an external `config_changed`. Until a command arrives nothing is pushed, so a client should re-read these stores (or send any command) after the user trusts or distrusts the project.
|
|
223
|
+
- `mcp` lists the servers Pi's MCP loader would produce from those files: a project entry replaces the global entry of the same name, a project entry without `command`, `url`, or `type` only overrides `enabled` (and exposure) of an existing global server, and an entry Pi would reject is left out while the rest of the file still loads. `transport` is the one Pi connects with: `http` whenever the entry has a `url` key (even with `type: "stdio"` and a `command`), otherwise `stdio`; `enabled` is `false` only when the file says so. Pi's loader is not part of its package exports, so `lib/mcp-config.ts` mirrors that resolution and its per-entry checks (OAuth and `auth` included), and a test compares it with Pi's own loader. Servers an extension registers at runtime are not listed.
|
|
224
|
+
- `pi_settings` is Pi's own merged view (global, then the trusted project file on top, with Pi's migrations), read without taking Pi's settings lock and never written back. `defaultProvider` is shown only as one plain token. `defaultModel` and each `enabledModels` entry are shown only in Pi's `--models` shape: a bare model id or `provider/modelId` (the id may hold more `/`, as in `openrouter/anthropic/claude-3.5-sonnet`), with wildcards and an optional `:thinking` suffix; every `/`-separated segment starts with a letter or digit. Any other value is `null` (or left out of `enabledModels`): a value with both `@` and `:` (`user:secret@host`), a backslash, an absolute path (`/home/...`) or a `./` / `../` path, a URL, control text, or more than 128 characters. `defaultThinkingLevel` is one of Pi's levels or `null`; `enabledModels` is `null` when no layer restricts models. An extension is named by its last path segment, and only when that segment is a plain file or package name (letters, digits, `.`, `_`, `+`, `-`; at most 128 characters); an entry that is a URL, or whose name is longer, credential-shaped, or holds control text, is left out. Each list keeps at most 64 entries and `truncated` reports a cut. When Pi's own getters cannot read a merged value, `value` is absent, every layer whose file exists reads `invalid`, and an absent file still reads `missing`.
|
|
225
|
+
- `claude_bridge` reads `claude-bridge.json` in the Pi agent dir, the config file of the third-party `pi-claude-bridge` package. Gentle Shell does not install or write it; the store only lets a client show the plan a user already chose. `value` is `{ "plan": <string> | null }`: the plan when `provider.plan` is a short plain token (letters, digits, `.`, `_`, `-`; at most 32 characters), otherwise `null`. No other key crosses. The installed package version is not reported: Pi's package listing can run `npm root -g` synchronously, which a revision recompute must not do.
|
|
212
226
|
- `persona` has a `global` layer (`persona.json` in the Gentle config home) and a `project` layer (`<cwd>/.pi/gentle-ai/persona.json`); `value` is `{ "mode": "gentleman" | "neutral" }`, the mode in effect (the project layer wins), exactly as the prompt build resolves it.
|
|
213
227
|
- `banner` is `{ showRose, showTextLogo, color }` from `banner.json`. A file without those three valid settings is `invalid` and is never repaired by a read; extra keys are ignored, as the `/gentle:banner` editor ignores them, and a Desktop write keeps only the three settings.
|
|
214
228
|
- `notifications` is the owner's validated `notifications.json` without its `schema` key. Every `file:` sound is replaced by the marker `"file"`, so no sound path crosses the wire.
|
|
@@ -350,7 +364,7 @@ Writes one existing, owner-maintained store. Desktop names a store and, for `pin
|
|
|
350
364
|
| `data` | yes | store-specific object (below) | The **complete** new content of that store, not a patch. |
|
|
351
365
|
| `expectedRevision` | yes | string | `writeTargets[].writeRevision` of the target as the client last read it. |
|
|
352
366
|
|
|
353
|
-
Exactly these three keys are accepted. Any other key — including `scope`, `path`, `file`, or `physical_path` — is rejected as `invalid_request` before anything is read or written. An unknown store string is `unknown_store`. A write to `models`, `subagents`, or `
|
|
367
|
+
Exactly these three keys are accepted. Any other key — including `scope`, `path`, `file`, or `physical_path` — is rejected as `invalid_request` before anything is read or written. An unknown store string is `unknown_store`. A write to `models`, `subagents`, `managed_assets`, `mcp`, `pi_settings`, or `claude_bridge` is `read_only`, rejected before its `data` is inspected, because the reason the write cannot happen is the store, not the payload.
|
|
354
368
|
|
|
355
369
|
#### `data` for `profiles`
|
|
356
370
|
|
|
@@ -426,8 +440,8 @@ A layer whose file currently reads `invalid` is likewise a valid target for a se
|
|
|
426
440
|
The checks below run in this order, and the first one that fails answers the request. Nothing is read or written after a rejection.
|
|
427
441
|
|
|
428
442
|
1. **Envelope** (`invalid_request`): exactly the keys `store`, `data`, and `expectedRevision`; `store` must be a string; `data` must be present. A request missing `data` is malformed whatever store or revision it names, so this check comes before the store rules — a `models` write without `data` is `invalid_request`, not `read_only`. Store contents are not looked at here.
|
|
429
|
-
2. **Store identity** (`unknown_store`): the string must be one of the
|
|
430
|
-
3. **Mutability** (`read_only`): `models`, `subagents`, and `
|
|
443
|
+
2. **Store identity** (`unknown_store`): the string must be one of the twelve store identifiers.
|
|
444
|
+
3. **Mutability** (`read_only`): `models`, `subagents`, `managed_assets`, `mcp`, `pi_settings`, and `claude_bridge` are rejected before their `data` is inspected or their revision is compared, so any payload gets the same answer.
|
|
431
445
|
4. **Usable revision** (`revision_conflict`): `expectedRevision` must be a non-empty string. Absent, empty, and non-string tokens are all "the client did not prove it saw the current state", and this is decided before the payload is validated.
|
|
432
446
|
5. **Session roots** (`config_unavailable`): the bound session must have a working directory.
|
|
433
447
|
6. **Payload** (`invalid_data`): `data` is validated by the owner's own normalizer (`normalizeProfilesFile`, `normalizeFallbacksFile`, the pin name and store rules). A value the owner would reject is `invalid_data`. So is any value the owner's normalizer would **rewrite or silently drop** — an illegal profile or agent name, a stale `active` marker, an unknown workflow mode, an empty fallback chain, the `effort` alias, an organic workflow entry, an unknown routing member. A write is applied complete or not at all, so a client can never delete or silently reshape content by sending it: send exactly the canonical form `get_config` returned. For `pins`, `profile` must be a defined profile name or the literal `null`; a missing, empty, non-string, or unknown `profile`, an extra `data` key, and a `source` other than `local`/`repo` are all `invalid_data`, and a pin request outside a resolvable Git worktree is `config_unavailable`.
|
|
@@ -1398,7 +1412,7 @@ No absolute path, raw package source, registry URL, token, command line, or look
|
|
|
1398
1412
|
|
|
1399
1413
|
### `list_agent_definitions`
|
|
1400
1414
|
|
|
1401
|
-
Lists the agent definitions
|
|
1415
|
+
Lists the agent definitions `/gentle:profiles` can route, the subagent defaults, and Pi's default orchestrator, so a client can build its profile routing table from this answer alone. It reads the same roots `/gentle:profiles` lists, fresh on every call, lowest precedence first: the agents bundled with the package (the installed `pi-subagents` agent folders), `<agent home>/agents`, `<agent home>/subagents`, `~/.agents`, `<cwd>/.agents`, `<cwd>/.pi/agents`, and `<cwd>/.pi/subagents` (a later folder wins a name clash, so a project definition replaces a global one, and a user one replaces a built-in one). Only the `.md` files directly inside each folder are read. It also reads the global and project `subagents.json`, and the three orchestrator keys of Pi's `settings.json` in the agent home. Params must be an empty object; any key is `invalid_request`, and a malformed request reads nothing. It has no side effects and emits no event.
|
|
1402
1416
|
|
|
1403
1417
|
```json
|
|
1404
1418
|
{ "schema": "gentle-shell.desktop-rpc/v1", "requestId": "desktop-90", "method": "list_agent_definitions", "params": {} }
|
|
@@ -1412,8 +1426,8 @@ Lists the agent definitions this session can launch, the subagent defaults, and
|
|
|
1412
1426
|
"ok": true,
|
|
1413
1427
|
"data": {
|
|
1414
1428
|
"agents": [
|
|
1415
|
-
{ "name": "explore", "description": "Global explorer.", "scope": "global", "model": "openai-codex/gpt-5.6-terra", "thinking": "high", "mode": null, "tools": ["read", "grep"], "toolsTruncated": false },
|
|
1416
|
-
{ "name": "worker", "description": "Project worker.", "scope": "project", "model": null, "thinking": null, "mode": "background", "tools": [], "toolsTruncated": false }
|
|
1429
|
+
{ "name": "explore", "description": "Global explorer.", "scope": "global", "source": "user", "model": "openai-codex/gpt-5.6-terra", "thinking": "high", "mode": null, "tools": ["read", "grep"], "toolsTruncated": false },
|
|
1430
|
+
{ "name": "worker", "description": "Project worker.", "scope": "project", "source": "project", "model": null, "thinking": null, "mode": "background", "tools": [], "toolsTruncated": false }
|
|
1417
1431
|
],
|
|
1418
1432
|
"truncated": false,
|
|
1419
1433
|
"problems": { "invalid": 1, "notices": 0 },
|
|
@@ -1426,6 +1440,8 @@ Lists the agent definitions this session can launch, the subagent defaults, and
|
|
|
1426
1440
|
| Field | Meaning |
|
|
1427
1441
|
| --- | --- |
|
|
1428
1442
|
| `agents` | The discovered definitions, sorted by name, at most 200. `model`, `thinking`, and `mode` are what the definition declares (`null` when it inherits); the model a launch actually uses can still come from `subagents.json` profiles or a repository profile pin. `tools` is the list after tool overlays, at most 64 names. |
|
|
1443
|
+
| `agents[].scope` | `global` for the built-in, agent-home, and `~/.agents` folders; `project` for the `<cwd>` folders. |
|
|
1444
|
+
| `agents[].source` | Where the winning definition came from: `builtin` (bundled with the package), `user` (agent home or `~/.agents`), or `project` (`<cwd>/.agents` or `<cwd>/.pi`). |
|
|
1429
1445
|
| `truncated` | `true` when more than 200 definitions exist. |
|
|
1430
1446
|
| `problems` | Counts of definitions that failed to parse (`invalid`) and of discovery notices such as unknown frontmatter keys or overlays naming unknown agents (`notices`). Their text names files, so only counts cross. |
|
|
1431
1447
|
| `subagentDefaults` | `default_model`, `default_thinking`, and `default_mode` from `subagents.json` (project over global); `mode` defaults to `task`. |
|
|
@@ -1608,13 +1624,13 @@ Failure:
|
|
|
1608
1624
|
}
|
|
1609
1625
|
```
|
|
1610
1626
|
|
|
1611
|
-
Current error codes are `invalid_request`, `unknown_store`, `read_only`, `invalid_data`, `revision_conflict`, `write_failed`, `unsupported_method`, `permission_unavailable`, `permission_denied`, `config_unavailable`, `usage_unavailable`, `design_unavailable`, `jobs_unavailable`, `agents_unavailable`, `profiles_unavailable`, `unknown_profile`, `profile_apply_busy`, `sessions_unavailable`, `session_switching`, `review_unavailable`, `review_mode_busy`, `stats_unavailable`, `not_found`, and `internal_error`. A request that cannot supply a valid correlation ID uses `requestId: null`. State/provider failures use the generic `internal_error` message rather than exposing raw paths, credentials, or provider errors. Transport failures from `setWidget` are never retried as a second response.
|
|
1627
|
+
Current error codes are `invalid_request`, `unknown_store`, `read_only`, `invalid_data`, `revision_conflict`, `write_failed`, `unsupported_method`, `permission_unavailable`, `permission_denied`, `config_unavailable`, `usage_unavailable`, `design_unavailable`, `jobs_unavailable`, `agents_unavailable`, `changes_unavailable`, `profiles_unavailable`, `unknown_profile`, `profile_apply_busy`, `sessions_unavailable`, `session_switching`, `review_unavailable`, `review_mode_busy`, `stats_unavailable`, `session_unavailable`, `updates_unavailable`, `agent_definitions_unavailable`, `status_unavailable`, `background_subagents_unavailable`, `background_subagents_busy`, `auth_unavailable`, `reload_failed`, `not_found`, and `internal_error`. A request that cannot supply a valid correlation ID uses `requestId: null`. State/provider failures use the generic `internal_error` message rather than exposing raw paths, credentials, or provider errors. Transport failures from `setWidget` are never retried as a second response.
|
|
1612
1628
|
|
|
1613
1629
|
| Code | Meaning |
|
|
1614
1630
|
| --- | --- |
|
|
1615
1631
|
| `invalid_request` | Malformed envelope, unsupported params (including a physical path, `set_config` without `data`, or an `apply_profile` mode other than `default`/`session`), or an unknown permission mode. State unchanged. |
|
|
1616
1632
|
| `unknown_store` | A store identifier this slice does not implement. Nothing was read or written. |
|
|
1617
|
-
| `read_only` | `set_config` named `models`, `subagents`, or `
|
|
1633
|
+
| `read_only` | `set_config` named `models`, `subagents`, `managed_assets`, `mcp`, `pi_settings`, or `claude_bridge`. Rejected before the payload was inspected; nothing was written. |
|
|
1618
1634
|
| `invalid_data` | `set_config` data the owner would reject or would silently drop. Nothing was written, and no file was created. |
|
|
1619
1635
|
| `revision_conflict` | `expectedRevision` was missing, unusable, or no longer current. Nothing was written. |
|
|
1620
1636
|
| `write_failed` | The owner's atomic write threw. State is whatever the owner left; the message stays generic. |
|
|
@@ -1635,6 +1651,14 @@ Current error codes are `invalid_request`, `unknown_store`, `read_only`, `invali
|
|
|
1635
1651
|
| `review_unavailable` | The review-mode owner did not answer for this session (extension not loaded, subagent child, or no Desktop command bound a session context), `gentle-ai` is not installed or does not support `review mode`, `set_review_mode` could not read the current state, or a write's outcome is unknown. The message says which; it never carries a path, CLI output, or a command line. |
|
|
1636
1652
|
| `review_mode_busy` | A `set_review_mode` is still running. Nothing was written by this request. |
|
|
1637
1653
|
| `stats_unavailable` | No sessions root could be read, or the stats owner did not answer for this session (the owning extension is not loaded, or the session changed). Nothing was read. |
|
|
1654
|
+
| `session_unavailable` | `get_snapshot` with `sections`: no Desktop command bound a session context, the feed owner did not answer for this session (the feed is not running, or the session changed), or its read failed. |
|
|
1655
|
+
| `updates_unavailable` | `get_update_status`: no Desktop command bound a session context, the session was replaced during the read, or a source failed unexpectedly. The message never carries the failure text. |
|
|
1656
|
+
| `agent_definitions_unavailable` | `list_agent_definitions`: no Desktop command bound a session context, or discovery failed (for example an unreadable folder). The message never carries the failure text. |
|
|
1657
|
+
| `status_unavailable` | `get_status`: no Desktop command bound a session context, the session was replaced during the read, no owner answered (for example inside a subagent process), or the owner's answer failed validation or threw. The message never carries the failure text. |
|
|
1658
|
+
| `background_subagents_unavailable` | `get_background_subagents` or `set_background_subagents`: no Desktop command bound a session context, no owner answered (for example inside a subagent process), the state could not be read, the request predates a session reset, or a write could not be confirmed, so the change may already have applied (re-read the policy). |
|
|
1659
|
+
| `background_subagents_busy` | A `set_background_subagents` is still running. Nothing was written by this request. |
|
|
1660
|
+
| `auth_unavailable` | `get_auth_status` or `reload_credentials`: no credential registry in this session, the registry read failed, or the session was replaced during the reload. |
|
|
1661
|
+
| `reload_failed` | The `reload_credentials` refresh itself failed. The error text never crosses. |
|
|
1638
1662
|
| `not_found` | `cancel_job` or `get_job_output` named a job id, or `cancel_subagent` or `get_subagent_thread` named a subagent id, that does not exist, belongs to another session, or was already evicted by the store; or `switch_session` named an id that does not resolve in the requested scope; or `get_change_diff` named a root and path that are not a file in the owner's current change set. Nothing was stopped, read, or switched. |
|
|
1639
1663
|
| `internal_error` | Unexpected failure; message stays generic. |
|
|
1640
1664
|
|
|
@@ -1757,7 +1781,7 @@ An external change:
|
|
|
1757
1781
|
|
|
1758
1782
|
`store`, `scope`, `revision`, and `status` match what `get_config` and `get_snapshot` would answer for that store at that moment. There is no `value`, no `writeTarget` or `writeRevision` (an external writer may have touched any layer), and no path; read the store with `get_config` for its content and write targets.
|
|
1759
1783
|
|
|
1760
|
-
Detection watches the owner files' directories, non-recursively, for an interactive RPC host only: the config home (`profiles.json`, `profile-fallbacks.json`, `models.json`, `persona.json`, `banner.json`, `notifications.json`), the project `.pi/gentle-ai/` directory (`persona.json`), the agent home and its `gentle-ai/` directory (global `subagents.json`, the managed-assets manifest), the session cwd's `.pi/` and `.pi/gentle-ai/` (project `subagents.json` and `models.json`, the `repo` pin), and the Git common dir's `gentle-ai/` (the `local` pin) when the cwd is a resolvable worktree. Only events for those owner file names count. About 250 ms after the last relevant event, every store's revision is recomputed with the same readers `get_config` uses, and an event is emitted only for a store whose revision differs from the last revision this channel reported (a `get_config` answer, a `get_snapshot` projection, a `set_config` answer, or an earlier event). Consequences:
|
|
1784
|
+
Detection watches the owner files' directories, non-recursively, for an interactive RPC host only: the config home (`profiles.json`, `profile-fallbacks.json`, `models.json`, `persona.json`, `banner.json`, `notifications.json`), the project `.pi/gentle-ai/` directory (`persona.json`), the agent home and its `gentle-ai/` directory (global `subagents.json`, `mcp.json`, `settings.json`, `claude-bridge.json`, the managed-assets manifest), the session cwd's `.pi/` and `.pi/gentle-ai/` (project `subagents.json`, `mcp.json`, `settings.json`, and `models.json`, the `repo` pin), and the Git common dir's `gentle-ai/` (the `local` pin) when the cwd is a resolvable worktree. Only events for those owner file names count. About 250 ms after the last relevant event, every store's revision is recomputed with the same readers `get_config` uses, and an event is emitted only for a store whose revision differs from the last revision this channel reported (a `get_config` answer, a `get_snapshot` projection, a `set_config` answer, or an earlier event). Consequences:
|
|
1761
1785
|
|
|
1762
1786
|
- a Desktop `set_config` is never echoed: its response records the resulting revision before the owner's own rename wakes the watcher;
|
|
1763
1787
|
- reformatting a file, rewriting identical content, or undoing a change inside the window emits nothing, because the revision did not move;
|
|
@@ -1767,7 +1791,7 @@ Detection watches the owner files' directories, non-recursively, for an interact
|
|
|
1767
1791
|
|
|
1768
1792
|
A directory that does not exist yet (for example a project without `.pi/`, or a fresh `<git-common-dir>/gentle-ai/`) is watched through its nearest existing ancestor, non-recursively and only for the creation of the next path segment. When that segment appears the ancestor watcher is closed and the next level is watched, until the owner directory itself is; each step recomputes once, so a pin that `/gentle:profiles` writes into a new directory raises exactly one event. A watched directory that is later removed reports its stores (now `missing`) and falls back to the same ancestor watching, so recreating it and writing the store again raises one event.
|
|
1769
1793
|
|
|
1770
|
-
When a Desktop command binds a different session cwd, the watchers move with it, and the stores whose layers depend on the cwd (`models`, `subagents`, and `
|
|
1794
|
+
When a Desktop command binds a different session cwd, the watchers move with it, and the stores whose layers depend on the cwd (`models`, `subagents`, `persona`, `mcp`, and `pi_settings` project layers, and `pins`) are re-read at that moment: each one whose revision differs from the last one this channel reported is announced with `source: "external"` and becomes the new baseline, so a later unrelated change never carries stale extra events. If a change was detected but its debounce window had not closed when the cwd moved, every store is re-read instead, so that change is reported rather than dropped with the old watchers.
|
|
1771
1795
|
|
|
1772
1796
|
This is **best effort**, and `get_snapshot` revisions stay the source of truth. A path with no existing ancestor, an unsupported platform, or an exhausted watcher limit simply produces no external events for that directory; the channel keeps working and never reports an error for it. Watchers are created on `session_start` and are disposed, ancestor watchers included, on session shutdown and on session switch. A client that must not miss a change still compares `get_snapshot` revisions after connecting and after a sequence gap.
|
|
1773
1797
|
|
|
@@ -1831,7 +1855,7 @@ Carries the sanitized post-transition state of the session's design canvas whene
|
|
|
1831
1855
|
|
|
1832
1856
|
| Field | Meaning |
|
|
1833
1857
|
| --- | --- |
|
|
1834
|
-
| `transition` | One of `open` (a canvas was shown
|
|
1858
|
+
| `transition` | One of `open` (a canvas was shown: a browser tab opened, or the system browser was skipped because the host set `GENTLE_DESIGN_OPEN_BROWSER=0`), `refresh` (an already-connected page was told to reload), or `stop` (a running server was closed). |
|
|
1835
1859
|
| `running`, `slug`, `connectedClients` | The sanitized post-transition state, exactly as `get_design_canvas` reports it. A `stop` transition carries `running: false`, `slug: null`, `connectedClients: 0`. |
|
|
1836
1860
|
| `url` | Present only for a trusted interactive Desktop client (the same trust gate as `get_design_canvas` `includeUrl`). Sanitized by default — the URL and its embedded token are never a default event field and never a bare token. A `stop` transition has no URL. |
|
|
1837
1861
|
|
|
@@ -1936,13 +1960,13 @@ Follows a confirmed `set_review_mode` whose re-read state differs from the state
|
|
|
1936
1960
|
|
|
1937
1961
|
## Configuration limits
|
|
1938
1962
|
|
|
1939
|
-
- **One reader and one writer per store.** Each `get_config` answer and each `set_config` write comes from the module that already owns that file (`agent-profiles.ts`, `model-routing-authority.ts`, `model-fallback-store.ts`, `agents-config.ts`, `agent-profile-pin.ts`, `agent-assets.ts`, `persona-config.ts`, `banner-config.ts`, `notification-policy.ts`).
|
|
1963
|
+
- **One reader and one writer per store.** Each `get_config` answer and each `set_config` write comes from the module that already owns that file (`agent-profiles.ts`, `model-routing-authority.ts`, `model-fallback-store.ts`, `agents-config.ts`, `agent-profile-pin.ts`, `agent-assets.ts`, `persona-config.ts`, `banner-config.ts`, `notification-policy.ts`, Pi's `SettingsManager` through `pi-settings.ts`, `claude-bridge-config.ts`). The one exception is `mcp-config.ts`: Pi does not export its `mcp.json` loader, so this module is a parallel reader that re-implements Pi's resolution and per-entry validation (layering, trust gate, overrides, field and OAuth checks, and the transport Pi connects with). `tests/desktop-rpc-config-mcp-fidelity.test.ts` runs Pi's real `loadMcpConfig` and transport factory on the same fixtures and fails when the two disagree, so a Pi update that changes the rules is caught by the suite. For every other store there is no second store, no cached copy, no parallel parser, no shadow precedence, and no re-implemented invariant: the merge rules are the owner's own (`readSavedModelConfig`, `parseAgentsConfig`, `evaluateProfilePin`) and the writes are the owner's validated atomic writers (`writeProfilesFileSync`, `writeFallbacksFile`, `writeProfilePinSync`).
|
|
1940
1964
|
- **Settings stores.** `persona` takes `{ "mode": "gentleman" | "neutral" }` and writes like `/gentle:persona`: the global file, plus the project file only when it already exists, so a project override never silently outranks the change (its `writeRevision` covers both layers, and a project file is never created). `banner` takes exactly `{ showRose, showTextLogo, color }`. `notifications` takes the settings as read: an event may keep the `"file"` marker only where its current sound is a file, which keeps that file; a new `file:` path is `invalid_data`, because the Desktop never sees one. All three write atomically, and none waits for a profile apply (`profile_apply_busy` applies only to the profile stores). Telemetry and the Pi theme are not config stores here: telemetry is a consent switch, and Pi persists its theme through an asynchronous settings queue and exports no list of installed themes to validate against.
|
|
1941
|
-
- **Bounded write surface.** `set_config` exists only for `profiles`, `profile_fallbacks`, `pins`, and the settings stores above, and only as a whole-store replacement, one explicitly selected pin layer, or the explicit clear of one pin layer (`profile: null`). There is no generic physical-file target, no patch operation, no setter for `models`, `subagents`, or `
|
|
1942
|
-
- **Read-only rationale.** `models` and `subagents` are derived: the owners write them when a profile is applied or a route is materialized, so a Desktop write would fight that writer and leave the runtime and the store disagreeing. `managed_assets` is the installer's ownership manifest with hashes it verifies on install, so a client write would silently disable ownership checks. Only the stores whose owners accept validated writes report `readOnly: false`, and that flag describes the store's owner capability, which now matches this slice's write surface.
|
|
1965
|
+
- **Bounded write surface.** `set_config` exists only for `profiles`, `profile_fallbacks`, `pins`, and the settings stores above, and only as a whole-store replacement, one explicitly selected pin layer, or the explicit clear of one pin layer (`profile: null`). There is no generic physical-file target, no patch operation, no setter for `models`, `subagents`, `managed_assets`, `mcp`, `pi_settings`, or `claude_bridge`, no way to clear both layers in one request, and no profile application or materialization: a profile write stores the definition, it does not apply it, and nothing else is rewritten as a side effect.
|
|
1966
|
+
- **Read-only rationale.** `models` and `subagents` are derived: the owners write them when a profile is applied or a route is materialized, so a Desktop write would fight that writer and leave the runtime and the store disagreeing. `managed_assets` is the installer's ownership manifest with hashes it verifies on install, so a client write would silently disable ownership checks. `mcp`, `pi_settings`, and `claude_bridge` are display projections of files Pi and a third-party package own (and `mcp.json` and `settings.json` can hold credentials this channel never returns), so they stay read-only; settings changes go through `apply_profile` and Pi's own editors. Only the stores whose owners accept validated writes report `readOnly: false`, and that flag describes the store's owner capability, which now matches this slice's write surface.
|
|
1943
1967
|
- **No-op means no write.** Sending the content a store already holds, or clearing a pin layer that has no file, is answered with `changed: false`, no rewrite, no mtime churn, no removal, and no event, so a client can safely reconcile by re-sending what it read.
|
|
1944
1968
|
- **Per-process guard, not a transaction.** The `expectedRevision` check and the owner's atomic rename happen in one synchronous step, so concurrent Desktop requests in one process cannot both commit from the same revision. Across processes there is no lock: another `pi` process, `/gentle:profiles`, or the installer can write between the check and the rename, and this contract cannot detect that. Treat `expectedRevision` as conflict detection, not as mutual exclusion.
|
|
1945
|
-
- **No paths, no secrets.** Physical paths are rejected as request input and never appear in a response, an event, or an error message. Content is limited to what these stores hold: profile names, routing entries, fallback chains, pin names, layer statuses,
|
|
1969
|
+
- **No paths, no secrets.** Physical paths are rejected as request input and never appear in a response, an event, or an error message. Content is limited to what these stores hold: profile names, routing entries, fallback chains, pin names, layer statuses, asset ownership keys and hashes, MCP server names with their transport and enabled flag, the default model and thinking level, enabled model patterns, extension names, and the bridge plan. `managed_assets` is additionally filtered to ownership-shaped entries — a relative asset path below the agent home plus a 64-hex sha256 digest — so an absolute path, a traversal segment, or an arbitrary string in the manifest is omitted rather than echoed. `mcp.json`, `settings.json`, and `claude-bridge.json` can hold env values, headers, tokens, commands, and paths: they are read to build the projection, but only the fields listed for each store are returned, and the `mcp`, `pi_settings`, and `claude_bridge` revisions digest only the returned value, so a hidden field never reaches the wire, not even as a digest. No auth file, provider error, or conversation content is read or returned.
|
|
1946
1970
|
- **Truthful normalization.** Content is what the owner's normalizer produced. Entries an owner drops (an unsafe agent key, an unknown thinking level, a stale `active` marker) are absent from `value`; if everything was dropped, the store reads `ok` with an empty map rather than being reported as `invalid`. A file the owner cannot parse at all reads `invalid`. A **write** may not rely on that leniency: data the normalizer would drop is rejected as `invalid_data`, so a Desktop write can never delete content it does not understand.
|
|
1947
1971
|
- **Best-effort external events.** A change made by another `pi` process, by `/gentle:profiles`, by an editor, or by the installer produces a debounced `config_changed` with `source: "external"` when the owner directory can be watched and the store's revision really moved (see [`config_changed`](#config_changed)). When a watcher cannot be created, nothing is pushed for that directory and the change becomes visible on the next read. There is no polling and no cached copy: the watcher only decides when to recompute revisions with the owner readers.
|
|
1948
1972
|
- **This slice does not implement** permission changes beyond the existing slice, subscription usage beyond the read/refresh contract below, subagents beyond the list/cancel/thread-read contract below, music, profile application, store materialization, or any Gentle Desktop client change.
|
|
@@ -82,7 +82,7 @@ with the session's name, its Herdr badge, its folder and the same **Chat \| Term
|
|
|
82
82
|
(Terminal active; on a narrow card the switch keeps only its icons). Click **Chat** or press `⌘J` to
|
|
83
83
|
go back. Nothing is copied: the chat and the TUI are two views of one session.
|
|
84
84
|
|
|
85
|
-
Some facts are not published yet and show as empty:
|
|
85
|
+
Some facts are not published yet and show as empty: integrations
|
|
86
86
|
("Engram and MCP status are not published by this session yet"), and plan usage for providers
|
|
87
87
|
that report none (the usage panel's own note, such as "usage arrives with the first response").
|
|
88
88
|
|
|
@@ -112,7 +112,7 @@ chosen in Herdr's Settings still wins, as for any layout.
|
|
|
112
112
|
|
|
113
113
|
| Control | Does |
|
|
114
114
|
|---|---|
|
|
115
|
-
| Project row | Click selects the project; drag reorders; right-click opens Herdr's space menu. |
|
|
115
|
+
| Project row | Click selects the project and every region follows it, even when a session in another terminal was shown; drag reorders; right-click opens Herdr's space menu. |
|
|
116
116
|
| **+** next to Projects | Opens a new project (Herdr's `space.new`). |
|
|
117
117
|
| Agent row | **Herdr** section: focuses that agent's pane. **TUI** section: shows that session in every region. |
|
|
118
118
|
| Project row of a project no space holds | Shows its session that needs you, else its newest one. |
|
|
@@ -120,7 +120,7 @@ chosen in Herdr's Settings still wins, as for any layout.
|
|
|
120
120
|
| **Add machine** (sidebar footer) | Herdr's own Add machine dialog (`mod.open machine-add`, as in Herdr's sidebar): lists your ssh-config hosts and says what each needs. |
|
|
121
121
|
| Machine header in Projects | Shown once a machine other than this computer exists. **+** opens a new project on that machine; an unavailable machine opens Settings › Machines (its login guidance). |
|
|
122
122
|
| Gear in Plan usage | Opens Herdr's settings. |
|
|
123
|
-
| Tab | Click selects;
|
|
123
|
+
| Tab | Click selects and every region follows it; a tab with no Gentle Shell session shows no session (the chat says "No Gentle Shell session"), never the session shown before. Drag reorders; double-click renames; right-click opens the tab menu; the wheel moves between tabs. A TUI session's tab: click shows it. |
|
|
124
124
|
| **+** after the tabs | Starts a new Gentle Shell session in the project's folder. |
|
|
125
125
|
| Window buttons (Windows, Linux) | Minimise, maximise (restore when maximised) and close, at the end of the tab bar, as in Herdr's own layout. On macOS the traffic lights stay at the top left. |
|
|
126
126
|
|
|
@@ -182,6 +182,9 @@ from another session, until the next Expand all / Collapse all.
|
|
|
182
182
|
| Paperclip | Pastes the clipboard (an image, or files on macOS) into the session's draft, as `Ctrl+V` does in the TUI. It goes with your next message. |
|
|
183
183
|
| **Stop** | Replaces Send while the agent works and the draft is empty. Stops the turn, as `Esc Esc` does in the TUI. Typing brings Send back: the message is queued, as in the TUI. |
|
|
184
184
|
|
|
185
|
+
Send, answers, **Apply** and the chat's other actions go to the session the window shows at that
|
|
186
|
+
moment, also while the chat still reads the session shown before.
|
|
187
|
+
|
|
185
188
|
### Inspector
|
|
186
189
|
|
|
187
190
|
| Tab | Controls |
|
|
@@ -193,6 +196,9 @@ from another session, until the next Expand all / Collapse all.
|
|
|
193
196
|
| **Review** | **Start review** and **Skip for this change** show the Terminal, where you answer the review consent. The **RDD** row turns receipt-driven review on or off **for every repository**, after a dialog that says so. |
|
|
194
197
|
| **Session** | Read only: stats, cost by model, integrations. |
|
|
195
198
|
|
|
199
|
+
A refusal or notice under the panel belongs to the session it came from: it is cleared when
|
|
200
|
+
the window shows another session.
|
|
201
|
+
|
|
196
202
|
### Status bar
|
|
197
203
|
|
|
198
204
|
Click **Commands** to open the palette. Everything else on the bar is read only.
|
|
@@ -347,6 +353,7 @@ own instructions. `gentle-shell self-uninstall` covers Gentle Shell itself
|
|
|
347
353
|
| The window looks stale, or `herdr-app shot` returns an old frame | Herdr does not draw a covered or hidden window. Bring it to the front. |
|
|
348
354
|
| A working session's dot does not pulse | On purpose: any animation redraws the whole Herdr window on every frame, which kept Herdr app near 40 % CPU while a session worked. The dot's colour and its word (Working, streaming) say it; the chat and the inspector update as the session writes. Measurements: `herdr/PERF.md`. |
|
|
349
355
|
| "No Gentle Shell session focused" / "No Gentle Shell session here" | Focus a tab that runs `gentle-shell`, or start one with **+** in the tab bar. Sessions started with `--link` or `--home` are not seen ([Requirements](#requirements)). |
|
|
356
|
+
| "Cannot read this conversation" | The chat could not read the session file the session names (moved, deleted or unreadable). It reads it again when the session updates; its Terminal still shows the conversation. |
|
|
350
357
|
| A session in another terminal is missing | It is listed while its process runs and once it published a snapshot (an interactive Gentle Shell TUI does). Check **TUI · Other terminals**. |
|
|
351
358
|
| "This session started before desktop messages: type in its own terminal, or restart it." / "This session takes no prompts from the desktop. Update Gentle Shell and restart it." | The TUI session runs a Gentle Shell from before desktop messages. Restart it, or type in its own terminal. |
|
|
352
359
|
| "Open that session's terminal to run /commands." | The shown session runs in another terminal; pi's and extensions' commands run only there. |
|