gentle-pi 4.9.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 +2 -2
- package/assets/agents/gentle-ai-explore.md +3 -6
- package/assets/agents/gentle-ai-verify.md +2 -2
- package/assets/agents/gentle-ai-worker.md +9 -9
- package/assets/agents/jd-fix-agent.md +2 -2
- 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 +9 -0
- package/assets/orchestrator-delegation.md +1 -1
- 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-tracking.md +2 -2
- package/assets/orchestrator-verification.md +10 -8
- package/assets/orchestrator.md +2 -2
- package/bin/gentle-shell.mjs +69 -17
- package/contracts/review-provider-contract-mirror/provider-contract.lock.json +11 -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 +2 -2
- 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 +10 -6
- package/docs/desktop-feed.md +15 -6
- package/docs/desktop-rpc.md +298 -30
- package/docs/gentle-shell-desktop.md +10 -3
- package/docs/gentle-shell.md +25 -19
- package/docs/install-wizard.md +7 -5
- package/docs/native-authority-architecture.md +3 -3
- package/docs/odd-preparation-continuity.md +2 -2
- package/docs/permission-modes.md +10 -2
- package/docs/readme-reference.md +53 -24
- package/docs/review-coordinator.md +4 -2
- package/docs/session-profile-format.md +33 -7
- package/docs/sound-notifications.md +1 -1
- package/docs/work-continuity.md +7 -7
- package/docs/yolo-mode.md +1 -1
- package/extensions/ask-user-choice.ts +2 -2
- package/extensions/ask-user-question.ts +1 -1
- package/extensions/child-context.ts +2 -11
- package/extensions/gentle-agents.ts +86 -30
- package/extensions/gentle-ai.ts +918 -632
- package/extensions/gentle-desktop-feed.ts +13 -3
- package/extensions/gentle-desktop-rpc.ts +51 -2
- package/extensions/gentle-fast.ts +9 -2
- package/extensions/gentle-music.ts +2 -0
- package/extensions/gentle-notifications.ts +12 -4
- package/extensions/gentle-shell.ts +157 -62
- package/extensions/gentle-star-prompt.ts +3 -0
- package/extensions/gentle-tps.ts +7 -0
- package/extensions/history/index.ts +1 -1
- package/extensions/quiet-tools.ts +13 -22
- package/extensions/skill-registry.ts +9 -1
- package/extensions/startup-banner.ts +8 -13
- 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 +69 -5
- 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/banner-config.ts +69 -0
- package/lib/child-session.ts +6 -0
- package/lib/claude-bridge-config.ts +41 -0
- package/lib/codex-turn-continuation.ts +40 -0
- package/lib/compaction-threshold.ts +46 -0
- package/lib/context-threshold.ts +5 -5
- package/lib/desktop-agent-definitions-service.ts +93 -0
- package/lib/desktop-auth-service.ts +102 -0
- package/lib/desktop-background-subagents-service.ts +155 -0
- 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 +119 -0
- package/lib/desktop-rpc-agents.ts +44 -3
- package/lib/desktop-rpc-auth.ts +103 -0
- package/lib/desktop-rpc-background-subagents.ts +126 -0
- package/lib/desktop-rpc-changes.ts +13 -4
- package/lib/desktop-rpc-config.ts +287 -13
- package/lib/desktop-rpc-profile-binding.ts +212 -0
- package/lib/desktop-rpc-profiles.ts +2 -0
- package/lib/desktop-rpc-stats.ts +16 -4
- package/lib/desktop-rpc-status.ts +103 -0
- package/lib/desktop-status-service.ts +86 -0
- package/lib/destructive-command-guard.ts +9 -185
- 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 +120 -8
- package/lib/mcp-config.ts +214 -0
- package/lib/native-choice-list.ts +1 -1
- package/lib/native-fullscreen-interaction.ts +3 -0
- package/lib/native-pointer-region.ts +1 -1
- package/lib/native-review-cli.ts +213 -397
- 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/persona-config.ts +77 -0
- package/lib/pi-settings.ts +157 -0
- package/lib/questionnaire/questionnaire-view.ts +1 -1
- package/lib/review-continuation-registry.ts +9 -26
- package/lib/review-coordinator.ts +13 -2
- package/lib/review-host-relay.ts +2 -35
- package/lib/review-integration-v2.ts +129 -180
- package/lib/review-object-store.ts +0 -57
- package/lib/review-repository.ts +0 -44
- package/lib/review-risk-assessment.ts +11 -36
- package/lib/review-start-context.ts +2 -1
- package/lib/review-transaction.ts +6 -6
- package/lib/sensitive-paths.ts +45 -0
- package/lib/session-profile-binding.ts +29 -0
- package/lib/session-profile-freeze.ts +11 -4
- package/lib/session-worktree-registry.ts +11 -5
- package/lib/shell-bar.ts +41 -18
- 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/stats-collector.ts +24 -0
- package/lib/tower-open.ts +8 -1
- package/lib/tps-policy.ts +85 -0
- package/lib/vim-editor-adapter.ts +9 -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 +120 -8
- package/runtime/native-review-cli.mjs +206 -390
- package/runtime/review-integration-v2.mjs +129 -180
- package/runtime/review-risk-assessment.mjs +11 -36
- package/runtime/sensitive-paths.mjs +46 -0
- package/runtime/tower-open.mjs +8 -1
- package/scripts/build-runtime-modules.mjs +2 -0
- package/scripts/gentle-ai-installer.mjs +13 -14
- package/scripts/installer-preflight.mjs +1 -1
- package/scripts/main-channel.mjs +47 -11
- package/scripts/pi-update.mjs +10 -4
- package/scripts/prepare-verifier.mjs +14 -4
- package/scripts/verify-package-files.mjs +45 -13
- package/skills/judgment-day/SKILL.md +1 -1
- package/skills/judgment-day/references/prompts-and-formats.md +1 -1
- package/skills/provider-defect-report/SKILL.md +1 -1
- package/skills/rdd-defect-workflow/SKILL.md +2 -2
- package/skills/skill-creator/SKILL.md +4 -4
- package/skills/skill-improver/SKILL.md +4 -4
- package/skills/skill-registry/SKILL.md +2 -2
- package/tests/agent-profiles-workflow.test.ts +102 -0
- package/tests/agent-risk-escalation.test.ts +15 -0
- package/tests/agents-config.test.ts +22 -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/ask-user-choice.test.ts +19 -0
- package/tests/ask-user-question.test.ts +23 -4
- package/tests/auto-permission-runtime.test.ts +4 -4
- package/tests/bounded-stop-contract.test.ts +50 -62
- package/tests/built-web-guard.test.ts +32 -0
- package/tests/child-context-files.test.ts +6 -6
- package/tests/child-ui-extensions.test.ts +125 -0
- package/tests/child-web-package.test.ts +1 -1
- package/tests/codex-turn-continuation.test.ts +183 -0
- package/tests/committed-range-untracked-exclusion.test.ts +18 -0
- 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/delegate-for-reason-contract.test.ts +1 -1
- package/tests/delivery-b-rendered-surfaces.test.ts +1 -1
- package/tests/delivery-conflict-markers.test.ts +2 -3
- 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 +219 -0
- package/tests/desktop-rpc-agents.test.ts +113 -3
- package/tests/desktop-rpc-auth.test.ts +278 -0
- package/tests/desktop-rpc-background-subagents.test.ts +186 -0
- package/tests/desktop-rpc-changes.test.ts +81 -4
- 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-settings.test.ts +234 -0
- package/tests/desktop-rpc-config.test.ts +17 -3
- package/tests/desktop-rpc-design.test.ts +30 -1
- package/tests/desktop-rpc-jobs.test.ts +9 -1
- package/tests/desktop-rpc-permissions.test.ts +9 -1
- package/tests/desktop-rpc-profile-binding.test.ts +195 -0
- package/tests/desktop-rpc-review.test.ts +1 -1
- package/tests/desktop-rpc-session-snapshot-commands.test.ts +50 -0
- package/tests/desktop-rpc-session.test.ts +2 -2
- package/tests/desktop-rpc-stats.test.ts +42 -11
- package/tests/desktop-rpc-status.test.ts +195 -0
- package/tests/desktop-rpc-updates.test.ts +1 -1
- package/tests/desktop-rpc-usage.test.ts +9 -1
- package/tests/desktop-rpc.test.ts +2 -2
- 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 +15 -11
- package/tests/full-delegation-closure.test.ts +19 -9
- package/tests/generic-agent-tools.test.ts +3 -3
- package/tests/gentle-agents.test.ts +215 -10
- package/tests/gentle-ai-binary.test.ts +3 -3
- package/tests/gentle-ai-exploration-budget.test.ts +3 -2
- package/tests/gentle-ai-installer.test.ts +60 -59
- package/tests/gentle-ai.test.ts +30 -59
- 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-notifications.test.ts +43 -5
- 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-launcher-tower.test.ts +7 -1
- package/tests/gentle-shell.test.ts +163 -15
- 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/installer-server.test.ts +3 -2
- package/tests/installer-windows-bootstrap.test.ts +6 -0
- package/tests/job-turn-end-texts.test.ts +57 -0
- package/tests/judgment-day-dispatch-diagnostics.test.ts +87 -0
- package/tests/lazy-module-contradictions-contract.test.ts +2 -3
- package/tests/main-channel-upgrade.test.ts +14 -7
- package/tests/main-channel.test.ts +78 -23
- package/tests/maintainer/desktop-rpc.maintest.ts +4 -4
- package/tests/native-fullscreen-interaction.test.ts +37 -1
- package/tests/native-review-capability-contract.test.ts +13 -1
- package/tests/native-review-cli-nonblocking-findings.test.ts +9 -84
- package/tests/native-review-cli.test.ts +199 -21
- package/tests/native-review-consent.test.ts +20 -3
- package/tests/native-review-start-escalation-real-binary.test.ts +42 -0
- 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 +2 -2
- 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/persona-config.test.ts +42 -0
- package/tests/pi-update-launcher.test.ts +1 -1
- package/tests/pi-update-source.test.ts +48 -2
- 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 +109 -0
- package/tests/review-actor-tool-deny.test.ts +1 -2
- package/tests/review-agent-end-preflight.test.ts +3 -1
- package/tests/review-assess-escalation-forwarding.test.ts +99 -0
- package/tests/review-authority-recovery-docs.test.ts +9 -12
- package/tests/review-continuation-registry.test.ts +24 -25
- package/tests/review-controller-native-recovery.test.ts +165 -178
- package/tests/review-controller-native-routing.test.ts +352 -27
- package/tests/review-coordinator-correction-gate.test.ts +5 -9
- package/tests/review-coordinator-runtime.test.ts +3 -2
- package/tests/review-coordinator.test.ts +14 -0
- package/tests/review-due-compaction.test.ts +1 -1
- package/tests/review-failure-facts.test.ts +2 -2
- package/tests/review-host-relay-restart-parity.test.ts +2 -52
- package/tests/review-host-relay-routing.test.ts +59 -298
- package/tests/review-host-relay.test.ts +0 -46
- package/tests/review-integration-nonblocking-findings.test.ts +3 -6
- package/tests/review-integration-v2-forward.test.ts +114 -234
- package/tests/review-integration-v2.test.ts +85 -39
- package/tests/review-json-arguments.test.ts +30 -9
- package/tests/review-legacy-check.test.ts +38 -0
- package/tests/review-object-store.test.ts +2 -57
- package/tests/review-one-call-findings.test.ts +1 -0
- package/tests/review-one-call.test.ts +56 -0
- package/tests/review-risk-assessment.test.ts +14 -43
- package/tests/review-run-escalate-forwarding.test.ts +59 -0
- package/tests/review-sidebar-state.test.ts +2 -1
- package/tests/review-untracked-inventory-replay.test.ts +181 -0
- package/tests/runtime-harness.mjs +30 -4
- package/tests/sensitive-path-tools.test.ts +210 -5
- package/tests/session-profile-binding-observers.test.ts +47 -0
- package/tests/session-profile-extension.test.ts +109 -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-bar.test.ts +21 -3
- 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-sidebar-layout.test.ts +1 -1
- package/tests/shell-sidebar-scroll-benchmark.test.ts +14 -5
- package/tests/shell-untracked-cache.test.ts +213 -0
- package/tests/short-check-routing-contract.test.ts +11 -7
- package/tests/skill-references.test.ts +39 -0
- package/tests/skill-registry.test.ts +4 -4
- package/tests/startup-banner.test.ts +2 -1
- package/tests/status-timing-diagnostics.test.ts +2 -1
- package/tests/support/capabilities-v26.ts +22 -0
- package/tests/support/chat-ui.ts +39 -0
- package/tests/support/review-coordinator-runtime.ts +11 -2
- package/tests/support/status-v9.ts +8 -0
- package/tests/t7-recovery-preservation.test.ts +68 -0
- package/tests/tower-open.test.ts +24 -0
- package/tests/tower-pack.test.ts +48 -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-proportionality.test.ts +1 -1
- package/tests/verification-scoped-stop-contract.test.ts +1 -1
- package/tests/verification-tiers-contract.test.ts +4 -3
- package/tests/verifier-admission.test.ts +1 -1
- package/tests/verifier-preparation.test.ts +94 -1
- package/tests/verifier-settle-reminder.test.ts +1 -1
- package/tests/verify-first-launch-contract.test.ts +19 -7
- package/tests/vim-editor-adapter.test.ts +12 -2
- 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/web/tower/dist/assets/BatchableSprite-BJ_TQxjN.js +217 -0
- package/web/tower/dist/assets/BufferResource-DeJpHuO6.js +139 -0
- package/web/tower/dist/assets/CanvasPool-cwc03T_x.js +23 -0
- package/web/tower/dist/assets/CanvasRenderer-DO84oP5R.js +1 -0
- package/web/tower/dist/assets/Filter-BKhT9lO8.js +1 -0
- package/web/tower/dist/assets/GlUniformGroupSystem-DluI7cqd.js +130 -0
- package/web/tower/dist/assets/GpuUboSystem-CM4Dys0F.js +17 -0
- package/web/tower/dist/assets/Graphics-3OyUtCzC.js +1 -0
- package/web/tower/dist/assets/RenderTargetSystem-X-9GAQ1C.js +184 -0
- package/web/tower/dist/assets/WebGLRenderer-I0fqIX1w.js +20 -0
- package/web/tower/dist/assets/WebGPURenderer-BRWSXotK.js +79 -0
- package/web/tower/dist/assets/_commonjsHelpers-CqkleIqs.js +1 -0
- package/web/tower/dist/assets/abnfDiagram-VCTEODGH-C4iBBhTL.js +1 -0
- package/web/tower/dist/assets/architectureDiagram-5GKGNRK7-Ih-qvfTu.js +36 -0
- package/web/tower/dist/assets/blockDiagram-I7D4REHJ-I9z_u3wb.js +129 -0
- package/web/tower/dist/assets/browserAll-gmBFNIA4.js +14 -0
- package/web/tower/dist/assets/c4Diagram-7LVT6UL2-DOyk2rEJ.js +38 -0
- package/web/tower/dist/assets/canvasUtils-DTaMcbkN.js +1 -0
- package/web/tower/dist/assets/channel-wuxBkGGz.js +1 -0
- package/web/tower/dist/assets/chunk-2Q5K7J3B-BaJ-OrJ_.js +1 -0
- package/web/tower/dist/assets/chunk-5VM5RSS4-wICrhvyw.js +15 -0
- package/web/tower/dist/assets/chunk-F27PBJKO-DUQ_JqvZ.js +1 -0
- package/web/tower/dist/assets/chunk-IMKFNOWR-DKfgQrGM.js +231 -0
- package/web/tower/dist/assets/chunk-JWPE2WC7-1k1LW87d.js +1 -0
- package/web/tower/dist/assets/chunk-POPQ4Y6H-Df8cN2w9.js +1 -0
- package/web/tower/dist/assets/chunk-SVP7TREG-CxU5LDj8.js +88 -0
- package/web/tower/dist/assets/chunk-TICWLB2K-CEuHEBi0.js +206 -0
- package/web/tower/dist/assets/chunk-XXDRQBXY-CbSAjj9l.js +1 -0
- package/web/tower/dist/assets/classDiagram-ZZMXUADV-DbRmVQRX.js +1 -0
- package/web/tower/dist/assets/classDiagram-v2-VYDZK3BY-DbRmVQRX.js +1 -0
- package/web/tower/dist/assets/cose-bilkent-JH36ORCC-8xZLSHER.js +1 -0
- package/web/tower/dist/assets/cynefin-OW5HDTMX-Cw4XG9Zj.js +166 -0
- package/web/tower/dist/assets/cynefinDiagram-5FMLGOSQ-CcQdokUv.js +62 -0
- package/web/tower/dist/assets/cytoscape.esm-BHa1VTXv.js +321 -0
- package/web/tower/dist/assets/d3-scale-4DPf7zan.js +1 -0
- package/web/tower/dist/assets/dagre-GXQ25YYZ-D-Xv7L9X.js +4 -0
- package/web/tower/dist/assets/diagram-S7CK7UJ4-Bqy2eT2c.js +30 -0
- package/web/tower/dist/assets/diagram-UQ7AKVKN-B2wK2GHj.js +41 -0
- package/web/tower/dist/assets/diagram-VSXAHHWV-CIZqh7BH.js +3 -0
- package/web/tower/dist/assets/diagram-VX7I27RA-BGX4HBj2.js +24 -0
- package/web/tower/dist/assets/diagram-Z3DM3KII-DYpsfaJW.js +24 -0
- package/web/tower/dist/assets/ebnfDiagram-PWID7BFC-BNnwCZNv.js +1 -0
- package/web/tower/dist/assets/erDiagram-RLTQ6QDP-_MN9W-1E.js +99 -0
- package/web/tower/dist/assets/flowDiagram-HODETNUW-D_ndx1UC.js +168 -0
- package/web/tower/dist/assets/ganttDiagram-EL5Y4UJY-C8chdEiZ.js +292 -0
- package/web/tower/dist/assets/getPo2TextureFromSource-CqJsdi0J.js +1 -0
- package/web/tower/dist/assets/getTexelRangeRects-DN3N5aFp.js +57 -0
- package/web/tower/dist/assets/getTextureBatchBindGroup-RNSiAVH3.js +1 -0
- package/web/tower/dist/assets/gitGraphDiagram-WWUBYQGX-B5ijv7LI.js +106 -0
- package/web/tower/dist/assets/index-B1Ho-Igs.css +1 -0
- package/web/tower/dist/assets/index-CfNjH1Wr.js +45 -0
- package/web/tower/dist/assets/infoDiagram-27XIBGKW-AYbp5ElT.js +2 -0
- package/web/tower/dist/assets/ishikawaDiagram-5VMMS53U-DnmwARuR.js +70 -0
- package/web/tower/dist/assets/journeyDiagram-3NMN7TZE-CK737kko.js +139 -0
- package/web/tower/dist/assets/kanban-definition-UXKFOSKX-0AhM3axC.js +89 -0
- package/web/tower/dist/assets/katex-HP8lGamR.js +257 -0
- package/web/tower/dist/assets/layout-wOIeK9c_.js +1 -0
- package/web/tower/dist/assets/mermaid.core-CGYyw6G7.js +310 -0
- package/web/tower/dist/assets/mindmap-definition-YA3MSWOX-CkZ_JOdx.js +96 -0
- package/web/tower/dist/assets/pegDiagram-XKGWAZYB-CHAPspih.js +1 -0
- package/web/tower/dist/assets/pieDiagram-E7YTZNPT-LwCcZl5o.js +39 -0
- package/web/tower/dist/assets/preload-helper-PPVm8Dsz.js +1 -0
- package/web/tower/dist/assets/quadrantDiagram-AXDQQJYC-Cm4uijV2.js +7 -0
- package/web/tower/dist/assets/railroadDiagram-O6MQD6OU-BPQHZ2b5.js +1 -0
- package/web/tower/dist/assets/requirementDiagram-BXWQKSXE-JLtSUDfS.js +84 -0
- package/web/tower/dist/assets/sankeyDiagram-P5KCCOFB-DJsYv9ii.js +40 -0
- package/web/tower/dist/assets/sequenceDiagram-WJ2MYXX4-Ca8T8sT0.js +162 -0
- package/web/tower/dist/assets/sizeCapture-INFHLROL-Ch4i2dS-.js +1 -0
- package/web/tower/dist/assets/stateDiagram-D77RDMKH-DDSkncYm.js +1 -0
- package/web/tower/dist/assets/stateDiagram-v2-MP3YSRHH-BkO_9mIH.js +1 -0
- package/web/tower/dist/assets/swimlanes-42K2YHIH-Bns5iI3y.js +1 -0
- package/web/tower/dist/assets/swimlanesDiagram-VR7AAH4N--LEBb1ti.js +8 -0
- package/web/tower/dist/assets/timeline-definition-24CTP7MA-QJDuVTb3.js +120 -0
- package/web/tower/dist/assets/vennDiagram-4TSXK5OY-pBNxKxOV.js +34 -0
- package/web/tower/dist/assets/wardleyDiagram-VM6X3IG4-1PEarjN1.js +78 -0
- package/web/tower/dist/assets/webworkerAll-D_Np003p.js +83 -0
- package/web/tower/dist/assets/xychartDiagram-S5SC5T6Z-CLwsvOg7.js +7 -0
- package/web/tower/dist/index.html +41 -0
- package/contracts/review-provider-contract-mirror/v1.6.0/bundle/vectors/lens.json +0 -1
- package/docs/review-delivery-preflight.md +0 -22
- package/extensions/codegraph-tools.ts +0 -437
- package/lib/native-review-authority-quarantine.ts +0 -2
- package/lib/review-delivery-preflight.ts +0 -85
- package/lib/review-legacy-detector.ts +0 -81
- package/tests/child-codegraph-bootstrap.test.ts +0 -74
- package/tests/codegraph-tools.test.ts +0 -554
- package/tests/fixtures/devbinary/capabilities-v2.1.derived.json +0 -331
- package/tests/fixtures/refusal-identity.probe.mjs +0 -139
- package/tests/native-review-authority-quarantine.test.ts +0 -10
- package/tests/native-review-refusal-identity.test.ts +0 -25
- package/tests/review-delivery-preflight.test.ts +0 -462
- /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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { realpathSync } from "node:fs";
|
|
2
2
|
import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
3
|
-
import { resolveGentlePiAgentHome } from "../lib/agent-home.ts";
|
|
3
|
+
import { gentlePiConfigHome, resolveGentlePiAgentHome } from "../lib/agent-home.ts";
|
|
4
|
+
import { resolvePersonaMode, type PersonaMode } from "../lib/persona-config.ts";
|
|
4
5
|
import { CLAUDE_BRIDGE_PROVIDER } from "../lib/bridge-cost.ts";
|
|
5
6
|
import { isHomeOrBroadUserDirectory } from "../lib/bounded-writer-admission.ts";
|
|
6
7
|
import {
|
|
@@ -24,7 +25,7 @@ import { createDesktopFeedStore, sweepDesktopFeedOrphans, type DesktopFeedStore
|
|
|
24
25
|
import { answerableFromDesktop, createDesktopActionInbox, DESKTOP_ACTION_LIMITS, createDesktopActivityTimeline, providerDecisionIn, questionShape, sweepDesktopActionOrphans, watchDesktopActionInbox, type DesktopActionInbox, type DesktopActionQuestion, type DesktopActivityTimeline } from "../lib/desktop-feed-actions.ts";
|
|
25
26
|
import { askAnswerHandle } from "../lib/desktop-feed-answers.ts";
|
|
26
27
|
import { DesktopPermissionBridge } from "../lib/desktop-rpc-permissions.ts";
|
|
27
|
-
import { createDesktopFeedProfileReader, createUntrackedLineCounter, desktopFeedGitRunner, processAncestors,
|
|
28
|
+
import { createDesktopFeedProfileReader, createUntrackedLineCounter, desktopFeedGitRunner, processAncestors, type DesktopFeedProfile, type ParentOf, type UntrackedLineCounter } from "../lib/desktop-feed-sources.ts";
|
|
28
29
|
import { DesktopAgentsBridge } from "../lib/desktop-agents-service.ts";
|
|
29
30
|
import { DesktopJobsBridge } from "../lib/desktop-jobs-service.ts";
|
|
30
31
|
import { DesktopUsageBridge } from "../lib/desktop-usage-service.ts";
|
|
@@ -72,6 +73,8 @@ export interface DesktopFeedOptions {
|
|
|
72
73
|
git?: (root: string) => GitRunner;
|
|
73
74
|
parentOf?: ParentOf;
|
|
74
75
|
profile?: (cwd: string, sessionId: string | undefined) => DesktopFeedProfile;
|
|
76
|
+
/** The persona for a session cwd; defaults to the persona.json resolution the TUI uses. */
|
|
77
|
+
persona?: (cwd: string) => PersonaMode | undefined;
|
|
75
78
|
realpath?: (path: string) => string | undefined;
|
|
76
79
|
rootExists?: (root: string) => boolean;
|
|
77
80
|
sweep?: (agentDir: string, keep: string) => void;
|
|
@@ -83,6 +86,11 @@ export interface DesktopFeedOptions {
|
|
|
83
86
|
|
|
84
87
|
const SUBSCRIPTION_PROVIDERS = new Set([CLAUDE_BRIDGE_PROVIDER]);
|
|
85
88
|
|
|
89
|
+
// A persona that cannot be read leaves the feed field null instead of failing the snapshot.
|
|
90
|
+
function safePersona(read: (cwd: string) => PersonaMode | undefined, cwd: string): PersonaMode | undefined {
|
|
91
|
+
try { return read(cwd); } catch { return undefined; }
|
|
92
|
+
}
|
|
93
|
+
|
|
86
94
|
function permissionDetail(mode: string): string | undefined {
|
|
87
95
|
const text = mode === "yolo" ? YOLO_STATUS_TEXT : mode === "super-yolo" ? SUPER_YOLO_STATUS_TEXT : undefined;
|
|
88
96
|
return text?.includes(" — ") ? text.slice(text.indexOf(" — ") + 3).trim() : text;
|
|
@@ -189,6 +197,7 @@ export function createDesktopFeedExtension(options: DesktopFeedOptions = {}) {
|
|
|
189
197
|
const timers = options.timers ?? realDesktopFeedTimers;
|
|
190
198
|
const gitFor = options.git ?? ((root: string) => desktopFeedGitRunner(root, env));
|
|
191
199
|
const readProfile = options.profile ?? createDesktopFeedProfileReader(env);
|
|
200
|
+
const readPersona = options.persona ?? ((cwd: string) => resolvePersonaMode(cwd, gentlePiConfigHome(env)));
|
|
192
201
|
const rootExists = options.rootExists ?? ((root: string) => { try { return realpathSync(root) !== ""; } catch { return false; } });
|
|
193
202
|
const realpath = options.realpath ?? ((path: string) => { try { return realpathSync.native(path); } catch { return undefined; } });
|
|
194
203
|
const activityClock = options.activityClock ?? Date.now;
|
|
@@ -285,6 +294,7 @@ export function createDesktopFeedExtension(options: DesktopFeedOptions = {}) {
|
|
|
285
294
|
thinkingLevel,
|
|
286
295
|
subscription,
|
|
287
296
|
profile: session.profile,
|
|
297
|
+
persona: safePersona(readPersona, ctx.cwd),
|
|
288
298
|
context: context ? { percent: context.percent, tokens: context.tokens, contextWindow: context.contextWindow } : undefined,
|
|
289
299
|
usage: session.usage,
|
|
290
300
|
usageProviders: session.usageProviders,
|
|
@@ -525,7 +535,7 @@ export function createDesktopFeedExtension(options: DesktopFeedOptions = {}) {
|
|
|
525
535
|
session.yolo = { adapter, unobserve };
|
|
526
536
|
refreshPermission(session);
|
|
527
537
|
}, () => undefined);
|
|
528
|
-
void processAncestors(process.ppid, DESKTOP_FEED_LIMITS.ancestors, options.parentOf
|
|
538
|
+
void processAncestors(process.ppid, DESKTOP_FEED_LIMITS.ancestors, options.parentOf).then((ancestors) => {
|
|
529
539
|
if (!current(session) || ancestors.length === 0) return;
|
|
530
540
|
session.ancestors = ancestors;
|
|
531
541
|
schedule();
|
|
@@ -37,6 +37,15 @@ import { DESKTOP_STATS_EVENTS, DESKTOP_STATS_METHODS } from "../lib/desktop-rpc-
|
|
|
37
37
|
import { DesktopStatsBridge } from "../lib/desktop-stats-service.ts";
|
|
38
38
|
import { DESKTOP_UPDATES_EVENTS, DESKTOP_UPDATES_METHODS } from "../lib/desktop-rpc-updates.ts";
|
|
39
39
|
import { DesktopUpdatesBridge, type UpdateSourcesFactory } from "../lib/desktop-updates-service.ts";
|
|
40
|
+
import { DESKTOP_AGENT_DEFINITIONS_EVENTS, DESKTOP_AGENT_DEFINITIONS_METHODS } from "../lib/desktop-rpc-agent-definitions.ts";
|
|
41
|
+
import { DesktopAgentDefinitionsBridge, type AgentDefinitionsLocationFactory } from "../lib/desktop-agent-definitions-service.ts";
|
|
42
|
+
import { DESKTOP_STATUS_EVENTS, DESKTOP_STATUS_METHODS } from "../lib/desktop-rpc-status.ts";
|
|
43
|
+
import { DesktopStatusBridge } from "../lib/desktop-status-service.ts";
|
|
44
|
+
import { DESKTOP_BACKGROUND_SUBAGENTS_EVENTS, DESKTOP_BACKGROUND_SUBAGENTS_METHODS } from "../lib/desktop-rpc-background-subagents.ts";
|
|
45
|
+
import { DesktopBackgroundSubagentsBridge } from "../lib/desktop-background-subagents-service.ts";
|
|
46
|
+
import { DESKTOP_PROFILE_BINDING_EVENTS, DESKTOP_PROFILE_BINDING_METHODS, DesktopProfileBindingBridge } from "../lib/desktop-rpc-profile-binding.ts";
|
|
47
|
+
import { DESKTOP_AUTH_EVENTS, DESKTOP_AUTH_METHODS } from "../lib/desktop-rpc-auth.ts";
|
|
48
|
+
import { DesktopAuthBridge } from "../lib/desktop-auth-service.ts";
|
|
40
49
|
import { isInteractiveRpcHost } from "../lib/rpc-host.ts";
|
|
41
50
|
import type { DesktopChangeTimers, DesktopDirectoryWatch } from "../lib/desktop-rpc-config-watch.ts";
|
|
42
51
|
|
|
@@ -47,6 +56,8 @@ export interface DesktopRpcExtensionOptions {
|
|
|
47
56
|
/** Test seams for `get_update_status`; production reads the real update sources. */
|
|
48
57
|
updateSources?: UpdateSourcesFactory;
|
|
49
58
|
updateTimeoutMs?: number;
|
|
59
|
+
/** Test seam for `list_agent_definitions`; production uses the session's discovery roots. */
|
|
60
|
+
agentDefinitionsLocation?: AgentDefinitionsLocationFactory;
|
|
50
61
|
}
|
|
51
62
|
|
|
52
63
|
function publisher(ctx: ExtensionContext): DesktopRpcPublish {
|
|
@@ -107,7 +118,15 @@ export default function desktopRpc(pi: ExtensionAPI, options: DesktopRpcExtensio
|
|
|
107
118
|
...(options.updateSources === undefined ? {} : { sources: options.updateSources }),
|
|
108
119
|
...(options.updateTimeoutMs === undefined ? {} : { timeoutMs: options.updateTimeoutMs }),
|
|
109
120
|
});
|
|
121
|
+
const packageStatus = new DesktopStatusBridge(pi);
|
|
122
|
+
const auth = new DesktopAuthBridge();
|
|
123
|
+
const profileBinding = new DesktopProfileBindingBridge(pi);
|
|
124
|
+
const backgroundSubagents = new DesktopBackgroundSubagentsBridge(pi);
|
|
125
|
+
const agentDefinitions = new DesktopAgentDefinitionsBridge(options.agentDefinitionsLocation === undefined ? {} : { location: options.agentDefinitionsLocation });
|
|
110
126
|
const domain: DesktopRpcDomain = (method, params) => {
|
|
127
|
+
// Captured before any await: a background-subagents write dispatched before a
|
|
128
|
+
// session reset must not run under the replacement session.
|
|
129
|
+
const backgroundGeneration = backgroundSubagents.dispatchGeneration();
|
|
111
130
|
const sessionsOutcome = sessionList.handle(method, params, dispatchingRequestId);
|
|
112
131
|
if (sessionsOutcome !== undefined) return sessionsOutcome;
|
|
113
132
|
// Config is the only synchronous bridge; permission, usage, design, jobs,
|
|
@@ -116,6 +135,9 @@ export default function desktopRpc(pi: ExtensionAPI, options: DesktopRpcExtensio
|
|
|
116
135
|
// early `undefined`.
|
|
117
136
|
const configOutcome = config.handle(method, params);
|
|
118
137
|
if (configOutcome !== undefined) return configOutcome;
|
|
138
|
+
// Agent definitions are a synchronous file read as well.
|
|
139
|
+
const definitionsOutcome = agentDefinitions.handle(method, params);
|
|
140
|
+
if (definitionsOutcome !== undefined) return definitionsOutcome;
|
|
119
141
|
return (async () => {
|
|
120
142
|
const permissionOutcome = await permissions.handle(method, params);
|
|
121
143
|
if (permissionOutcome !== undefined) return permissionOutcome;
|
|
@@ -127,6 +149,8 @@ export default function desktopRpc(pi: ExtensionAPI, options: DesktopRpcExtensio
|
|
|
127
149
|
if (jobsOutcome !== undefined) return jobsOutcome;
|
|
128
150
|
const profilesOutcome = await profiles.handle(method, params);
|
|
129
151
|
if (profilesOutcome !== undefined) return profilesOutcome;
|
|
152
|
+
const bindingOutcome = await profileBinding.handle(method, params);
|
|
153
|
+
if (bindingOutcome !== undefined) return bindingOutcome;
|
|
130
154
|
const agentsOutcome = await agents.handle(method, params);
|
|
131
155
|
if (agentsOutcome !== undefined) return agentsOutcome;
|
|
132
156
|
const changesOutcome = await changes.handle(method, params);
|
|
@@ -135,12 +159,18 @@ export default function desktopRpc(pi: ExtensionAPI, options: DesktopRpcExtensio
|
|
|
135
159
|
if (reviewOutcome !== undefined) return reviewOutcome;
|
|
136
160
|
const statsOutcome = await stats.handle(method, params);
|
|
137
161
|
if (statsOutcome !== undefined) return statsOutcome;
|
|
162
|
+
const statusOutcome = await packageStatus.handle(method, params);
|
|
163
|
+
if (statusOutcome !== undefined) return statusOutcome;
|
|
164
|
+
const authOutcome = await auth.handle(method, params);
|
|
165
|
+
if (authOutcome !== undefined) return authOutcome;
|
|
166
|
+
const backgroundOutcome = await backgroundSubagents.handle(method, params, backgroundGeneration);
|
|
167
|
+
if (backgroundOutcome !== undefined) return backgroundOutcome;
|
|
138
168
|
return updates.handle(method, params);
|
|
139
169
|
})();
|
|
140
170
|
};
|
|
141
|
-
const events = [...DESKTOP_CONFIG_EVENTS, DESKTOP_PERMISSION_EVENT, ...DESKTOP_USAGE_EVENTS, ...DESKTOP_DESIGN_EVENTS, ...DESKTOP_JOBS_EVENTS, ...DESKTOP_PROFILES_EVENTS, ...DESKTOP_AGENTS_EVENTS, ...DESKTOP_SESSIONS_EVENTS, ...DESKTOP_CHANGES_EVENTS, ...DESKTOP_REVIEW_EVENTS, ...DESKTOP_STATS_EVENTS, ...DESKTOP_UPDATES_EVENTS];
|
|
171
|
+
const events = [...DESKTOP_CONFIG_EVENTS, DESKTOP_PERMISSION_EVENT, ...DESKTOP_USAGE_EVENTS, ...DESKTOP_DESIGN_EVENTS, ...DESKTOP_JOBS_EVENTS, ...DESKTOP_PROFILES_EVENTS, ...DESKTOP_AGENTS_EVENTS, ...DESKTOP_SESSIONS_EVENTS, ...DESKTOP_CHANGES_EVENTS, ...DESKTOP_REVIEW_EVENTS, ...DESKTOP_STATS_EVENTS, ...DESKTOP_UPDATES_EVENTS, ...DESKTOP_AGENT_DEFINITIONS_EVENTS, ...DESKTOP_STATUS_EVENTS, ...DESKTOP_BACKGROUND_SUBAGENTS_EVENTS, ...DESKTOP_PROFILE_BINDING_EVENTS, ...DESKTOP_AUTH_EVENTS];
|
|
142
172
|
const router = new DesktopRpcRouter(
|
|
143
|
-
["capabilities", "get_snapshot", ...DESKTOP_CONFIG_METHODS, ...DESKTOP_PERMISSION_METHODS, ...DESKTOP_USAGE_METHODS, ...DESKTOP_DESIGN_METHODS, ...DESKTOP_JOBS_METHODS, ...DESKTOP_PROFILES_METHODS, ...DESKTOP_AGENTS_METHODS, ...DESKTOP_SESSIONS_METHODS, ...DESKTOP_CHANGES_METHODS, ...DESKTOP_REVIEW_METHODS, ...DESKTOP_STATS_METHODS, ...DESKTOP_UPDATES_METHODS],
|
|
173
|
+
["capabilities", "get_snapshot", ...DESKTOP_CONFIG_METHODS, ...DESKTOP_PERMISSION_METHODS, ...DESKTOP_USAGE_METHODS, ...DESKTOP_DESIGN_METHODS, ...DESKTOP_JOBS_METHODS, ...DESKTOP_PROFILES_METHODS, ...DESKTOP_AGENTS_METHODS, ...DESKTOP_SESSIONS_METHODS, ...DESKTOP_CHANGES_METHODS, ...DESKTOP_REVIEW_METHODS, ...DESKTOP_STATS_METHODS, ...DESKTOP_UPDATES_METHODS, ...DESKTOP_AGENT_DEFINITIONS_METHODS, ...DESKTOP_STATUS_METHODS, ...DESKTOP_BACKGROUND_SUBAGENTS_METHODS, ...DESKTOP_PROFILE_BINDING_METHODS, ...DESKTOP_AUTH_METHODS],
|
|
144
174
|
// `session_snapshot` is advertised only while the feed owner seam is wired.
|
|
145
175
|
() => (sessions.wired ? [...events, ...DESKTOP_SESSION_EVENTS] : events),
|
|
146
176
|
() => config.snapshotState(),
|
|
@@ -167,6 +197,11 @@ export default function desktopRpc(pi: ExtensionAPI, options: DesktopRpcExtensio
|
|
|
167
197
|
review.reset();
|
|
168
198
|
stats.reset();
|
|
169
199
|
updates.reset();
|
|
200
|
+
agentDefinitions.reset();
|
|
201
|
+
packageStatus.reset();
|
|
202
|
+
backgroundSubagents.reset();
|
|
203
|
+
profileBinding.reset();
|
|
204
|
+
auth.reset();
|
|
170
205
|
router.stop();
|
|
171
206
|
activePublish = undefined;
|
|
172
207
|
retiredPublish = undefined;
|
|
@@ -209,6 +244,10 @@ export default function desktopRpc(pi: ExtensionAPI, options: DesktopRpcExtensio
|
|
|
209
244
|
void permissions.wire((event, data) => router.emit(event, data));
|
|
210
245
|
config.attach(ctx);
|
|
211
246
|
config.wire((event, data) => router.emit(event, data));
|
|
247
|
+
// Binding writes made outside Desktop RPC (the /gentle:profiles screen, a
|
|
248
|
+
// resume restoring the record) become `profile_binding_changed` events.
|
|
249
|
+
profileBinding.attach(ctx);
|
|
250
|
+
profileBinding.wire((event, data) => router.emit(event, data));
|
|
212
251
|
});
|
|
213
252
|
|
|
214
253
|
pi.on("session_shutdown", () => {
|
|
@@ -234,6 +273,11 @@ export default function desktopRpc(pi: ExtensionAPI, options: DesktopRpcExtensio
|
|
|
234
273
|
review.reset();
|
|
235
274
|
stats.reset();
|
|
236
275
|
updates.reset();
|
|
276
|
+
agentDefinitions.reset();
|
|
277
|
+
packageStatus.reset();
|
|
278
|
+
backgroundSubagents.reset();
|
|
279
|
+
profileBinding.reset();
|
|
280
|
+
auth.reset();
|
|
237
281
|
router.stop();
|
|
238
282
|
});
|
|
239
283
|
|
|
@@ -263,6 +307,11 @@ export default function desktopRpc(pi: ExtensionAPI, options: DesktopRpcExtensio
|
|
|
263
307
|
review.attach(ctx);
|
|
264
308
|
stats.attach(ctx);
|
|
265
309
|
updates.attach(ctx);
|
|
310
|
+
agentDefinitions.attach(ctx);
|
|
311
|
+
packageStatus.attach(ctx);
|
|
312
|
+
backgroundSubagents.attach(ctx);
|
|
313
|
+
profileBinding.attach(ctx);
|
|
314
|
+
auth.attach(ctx);
|
|
266
315
|
dispatchingRequestId = desktopRequestId(args);
|
|
267
316
|
let pending: void | Promise<void>;
|
|
268
317
|
try {
|
|
@@ -2,12 +2,19 @@ import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-a
|
|
|
2
2
|
import { readSessionProfileBinding } from "../lib/session-profile-binding.ts";
|
|
3
3
|
import { readSessionProfileAuthority } from "../lib/session-profile-authority.ts";
|
|
4
4
|
import { gentlePiConfigHome } from "../lib/agent-home.ts";
|
|
5
|
-
import { freezeSessionProfileAtStartup, readFrozenDefaultOrchestrator } from "../lib/session-profile-freeze.ts";
|
|
5
|
+
import { freezeSessionProfileAtStartup, profileFollowEnabled, readFrozenDefaultOrchestrator } from "../lib/session-profile-freeze.ts";
|
|
6
6
|
import { isServiceTier } from "../lib/model-routing-authority.ts";
|
|
7
7
|
import { applyOpenAITier, CHILD_TIER_ENV, PROFILE_TIER_EVENT } from "../lib/openai-fast-tier.ts";
|
|
8
8
|
|
|
9
9
|
type Selection = "standard" | "fast" | undefined;
|
|
10
10
|
|
|
11
|
+
// gentle-shell#1064 A3 S4 reading side: a `follow` session ignores the startup
|
|
12
|
+
// record and resolves the current defaults, exactly as `resolveSessionProfile`
|
|
13
|
+
// does. An explicit choice is not a startup state and still wins.
|
|
14
|
+
function ignoredStartupBinding(binding: { origin: string }): boolean {
|
|
15
|
+
return binding.origin !== "user" && profileFollowEnabled();
|
|
16
|
+
}
|
|
17
|
+
|
|
11
18
|
export default function (pi: ExtensionAPI) {
|
|
12
19
|
let selection: Selection;
|
|
13
20
|
let profileModel: string | undefined;
|
|
@@ -24,7 +31,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
24
31
|
// later default into a session that already froze its startup choice.
|
|
25
32
|
freezeSessionProfileAtStartup({ sessionId, cwd, configHome: gentlePiConfigHome() });
|
|
26
33
|
}
|
|
27
|
-
const entry = binding ? binding.modelProfiles.orchestrator
|
|
34
|
+
const entry = binding && !ignoredStartupBinding(binding) ? binding.modelProfiles.orchestrator
|
|
28
35
|
: authority && !authority.available ? undefined : readFrozenDefaultOrchestrator(sessionId);
|
|
29
36
|
const matches = entry?.model === `${ctx.model?.provider}/${ctx.model?.id}`;
|
|
30
37
|
let child: { tier?: unknown; model?: unknown } | undefined;
|
|
@@ -4,6 +4,7 @@ import { homedir } from "node:os";
|
|
|
4
4
|
import { delimiter, join } from "node:path";
|
|
5
5
|
import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
6
6
|
import type { Component } from "@earendil-works/pi-tui";
|
|
7
|
+
import { isChildSession } from "../lib/child-session.ts";
|
|
7
8
|
import { runningBundledPrefix } from "../lib/gentle-shell-bundled.ts";
|
|
8
9
|
|
|
9
10
|
// Gentle Music: /gentle:music hands the whole terminal to gentle-stream's own
|
|
@@ -258,6 +259,7 @@ async function handOverTerminal<T>(tui: TerminalOwner, signals: MusicSignals, ru
|
|
|
258
259
|
}
|
|
259
260
|
|
|
260
261
|
export default function gentleMusic(pi: ExtensionAPI, deps: GentleMusicDeps = {}): void {
|
|
262
|
+
if (isChildSession()) return;
|
|
261
263
|
const which = deps.which ?? ((name: string) => findOnPath(name));
|
|
262
264
|
const spawn = deps.spawn ?? defaultSpawn;
|
|
263
265
|
const signals = deps.signals ?? defaultSignals;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
import { isTokenCount, readCompactionThreshold } from "../lib/compaction-threshold.ts";
|
|
2
3
|
import { CONTEXT_HIGH_PERCENT, ContextHighLatch } from "../lib/context-threshold.ts";
|
|
3
4
|
import { MainNotificationRun, NOTIFICATION_ATTENTION_EVENT, NOTIFICATION_SOURCE_EVENT, isNotificationSourceEvent } from "../lib/notification-events.ts";
|
|
4
5
|
import { claimNotificationOwner, type NotificationServiceDependencies } from "../lib/notification-service.ts";
|
|
@@ -31,13 +32,20 @@ export function createNotificationExtension(pi: ExtensionAPI, deps: Notification
|
|
|
31
32
|
/** One sound and one optional visual notice per high episode; the latch owns rearming. */
|
|
32
33
|
const evaluateContextHigh = (ctx: ExtensionContext): void => {
|
|
33
34
|
if (!valid(ctx) || !sessionId || !contextRunId) return;
|
|
34
|
-
const
|
|
35
|
-
|
|
35
|
+
const usage = ctx.getContextUsage?.();
|
|
36
|
+
const threshold = readCompactionThreshold(pi, ctx.model, usage?.contextWindow ?? ctx.model?.contextWindow);
|
|
37
|
+
const percent = usage?.percent ?? null;
|
|
38
|
+
const high = typeof threshold === "number"
|
|
39
|
+
? contextHigh.observe(isTokenCount(usage?.tokens) ? usage.tokens : null, threshold)
|
|
40
|
+
: contextHigh.observe(percent);
|
|
41
|
+
if (!high) return;
|
|
36
42
|
owner.enqueue({ sessionId, runId: contextRunId, sequence: ++contextSequence,
|
|
37
43
|
event: "context.high", occurredAt: owner.now() });
|
|
38
44
|
if (!visualNotice()) return;
|
|
39
|
-
const
|
|
40
|
-
|
|
45
|
+
const notice = typeof threshold === "number"
|
|
46
|
+
? "Context usage has reached the auto-compaction threshold; Pi compacts when usage exceeds it."
|
|
47
|
+
: `Context usage is at ${Math.round(percent ?? CONTEXT_HIGH_PERCENT)}% (\u2265 ${CONTEXT_HIGH_PERCENT}%); consider compacting before the next turn.`;
|
|
48
|
+
try { ctx.ui.notify(notice, "warning"); }
|
|
41
49
|
catch { /* A local visual diagnostic cannot fail a run. */ }
|
|
42
50
|
};
|
|
43
51
|
const remember = (off: unknown) => { if (typeof off === "function") nativeOff.push(off as () => void); };
|