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
|
@@ -90,20 +90,20 @@ test("P6 (X9): full delegation reaches tracking and verification, not the organi
|
|
|
90
90
|
assert.ok(prompt.includes("tracked work: `orchestrator-tracking.md`"));
|
|
91
91
|
assert.ok(prompt.includes("verification, handoffs, verifier setup failure: `orchestrator-verification.md`"));
|
|
92
92
|
assert.ok(prompt.includes(PARALLEL_LAUNCH_RULE), "the parallel-launch sentence");
|
|
93
|
-
assert.ok(prompt.includes("
|
|
93
|
+
assert.ok(prompt.includes("Continue a progressing worker (`subagent_continue`), never a new worker per fix."));
|
|
94
94
|
});
|
|
95
95
|
|
|
96
96
|
// cost-speed P6b: "in one message with no other tool call" read as "each call in a message of its own" (F3: three
|
|
97
97
|
// writers in three messages, no overlap, 887-1,092 s vs 393-478 s from one codemode script). Both routes are admitted
|
|
98
98
|
// and overlap in full delegation (real Pi probes); the sequential tools are those declaring `executionMode: "sequential"`.
|
|
99
|
-
const PARALLEL_LAUNCH_RULE = "Independent units with disjoint surfaces launch together: all their `subagent_run` calls in the same assistant message or one `codemode` script, never one launch per message nor beside a sequential `todo`, `ask_user_
|
|
99
|
+
const PARALLEL_LAUNCH_RULE = "Independent units with disjoint surfaces launch together: all their `subagent_run` calls in the same assistant message or one `codemode` script, never one launch per message nor beside a sequential `todo`, `ask_user_*` or `gentle_review*` (it serializes them); units needing the same file run one at a time.";
|
|
100
100
|
|
|
101
101
|
test("P6b: full delegation launches independent units in the same assistant message or one codemode script, never one per message", () => {
|
|
102
102
|
const prompt = render("full-delegation");
|
|
103
103
|
assert.ok(prompt.includes("in the same assistant message"), "same assistant message");
|
|
104
104
|
assert.ok(prompt.includes("or one `codemode` script"), "codemode route");
|
|
105
105
|
assert.ok(prompt.includes("never one launch per message"), "never one launch per message");
|
|
106
|
-
for (const tool of ["`todo`", "`ask_user_*`", "`
|
|
106
|
+
for (const tool of ["`todo`", "`ask_user_*`", "`gentle_review*`"]) assert.ok(prompt.includes(tool), `sequential tool ${tool}`);
|
|
107
107
|
assert.ok(!prompt.includes("in one message with no other tool call"), "the ambiguous clause is gone");
|
|
108
108
|
assert.ok(!prompt.includes("as direct `subagent_run` calls"), "codemode is no longer excluded");
|
|
109
109
|
});
|
|
@@ -142,19 +142,29 @@ test("S2: the projected ODD steps keep every unchanged step and the shared tail
|
|
|
142
142
|
}
|
|
143
143
|
});
|
|
144
144
|
|
|
145
|
+
test("turn-end-coherence S8: both modes gate Close on runnable work before giving the report format", () => {
|
|
146
|
+
for (const mode of ["organic", "full-delegation"] as const) {
|
|
147
|
+
const close = render(mode).split("\n").find((line) => line.startsWith("7. **Close.**"));
|
|
148
|
+
assert.ok(close?.startsWith("7. **Close.** Close only when no runnable authorized step remains. Then report the verified outcome, every failed, skipped, or pending check, and the next step."),
|
|
149
|
+
`[${mode}] Close must put the runnable-work condition before the report format`);
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
|
|
145
153
|
test("S3: both modes keep the canonical authorized-work boundary and a legitimate pending child", () => {
|
|
146
154
|
const canonical = [
|
|
147
|
-
"
|
|
148
|
-
"
|
|
149
|
-
"A tracked task ends the turn pending only
|
|
150
|
-
"
|
|
151
|
-
"
|
|
155
|
+
"Run authorized in-scope steps. Work through failures with a permitted route. A pending child is a wait: completion resumes the turn without asking.",
|
|
156
|
+
"Only a real human decision, explicit user stop, denial, missing consent, exhausted limit, or failure without a permitted route stops only affected work.",
|
|
157
|
+
"A tracked task ends the turn pending only for launched work still running, a real human decision, denial, missing consent, explicit stop, or exhausted limit.",
|
|
158
|
+
"Report failures without a permitted route as incomplete. Continue independent authorized work; never abandon runnable work or present an unverified outcome as final.",
|
|
159
|
+
"Missing, partial, unavailable, or declined proof bars claiming completion of affected work, not independent authorized work or required authorized checks in budget.",
|
|
152
160
|
"Never turn a report into a blind self-reprompt loop.",
|
|
153
161
|
"Hedged wording is not a stop.",
|
|
154
162
|
];
|
|
155
163
|
for (const mode of ["organic", "full-delegation"] as const) {
|
|
156
164
|
const prompt = render(mode);
|
|
157
|
-
|
|
165
|
+
const close = prompt.split("\n").find((line) => line.startsWith("7. **Close.**"));
|
|
166
|
+
assert.ok(close, `[${mode}] canonical Close is missing`);
|
|
167
|
+
for (const clause of canonical) assert.ok(close.includes(clause), `[${mode}] canonical Close is missing: ${clause}`);
|
|
158
168
|
assert.ok(prompt.includes("An explicit user stop applies only to the work it names."), `[${mode}] explicit-stop coverage`);
|
|
159
169
|
assert.ok(!prompt.includes("Needs your decision"), `[${mode}] no generic terminal phrase`);
|
|
160
170
|
assert.ok(!prompt.includes("never more verification"), `[${mode}] no broad verification stop`);
|
|
@@ -5,9 +5,9 @@ import test from "node:test";
|
|
|
5
5
|
|
|
6
6
|
const agents = join(process.cwd(), "assets", "agents");
|
|
7
7
|
const roles: Record<string, string[]> = {
|
|
8
|
-
"gentle-ai-explore.md": ["read", "grep", "find", "
|
|
9
|
-
"gentle-ai-worker.md": ["read", "grep", "find", "edit", "write", "bash", "
|
|
10
|
-
"gentle-ai-verify.md": ["read", "grep", "find", "bash", "
|
|
8
|
+
"gentle-ai-explore.md": ["read", "grep", "find", "web_enable", "web_search", "source_check", "fetch_content", "get_search_content", "codemode"],
|
|
9
|
+
"gentle-ai-worker.md": ["read", "grep", "find", "edit", "write", "bash", "codemode", "mem_save"],
|
|
10
|
+
"gentle-ai-verify.md": ["read", "grep", "find", "bash", "codemode"],
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
function tools(file: string): string[] {
|
|
@@ -249,7 +249,7 @@ function fakeContext(tui: { requestRender(): void } = fakeTui, confirmResult: (t
|
|
|
249
249
|
const factory = widgets.get("gentle-agents");
|
|
250
250
|
return factory ? factory(tui, plainTheme).render(72).map(stripAnsi) : undefined;
|
|
251
251
|
};
|
|
252
|
-
const widgetComponent = () => widgets.get("gentle-agents")?.(tui, plainTheme) as Component | undefined;
|
|
252
|
+
const widgetComponent = () => widgets.get("gentle-agents")?.(tui, plainTheme) as unknown as Component | undefined;
|
|
253
253
|
return { ctx, widget, widgetComponent, widgets, dialogs, overlays, customCompletions, customOptions };
|
|
254
254
|
}
|
|
255
255
|
|
|
@@ -2179,11 +2179,11 @@ function missingToolsChild(env: NodeJS.ProcessEnv, toolNames: string[] | (() =>
|
|
|
2179
2179
|
}
|
|
2180
2180
|
|
|
2181
2181
|
test("a child warns once about requested tools it does not have", async () => {
|
|
2182
|
-
const child = missingToolsChild({ [REQUESTED_TOOLS_ENV]: "read,gentle_review_scope,grep,
|
|
2182
|
+
const child = missingToolsChild({ [REQUESTED_TOOLS_ENV]: "read,gentle_review_scope,grep,subagent_parent_message" }, ["read", "grep", "subagent_parent_message"]);
|
|
2183
2183
|
await child.start();
|
|
2184
2184
|
assert.deepEqual(child.notes, [], "session_start runs before later extensions register their tools");
|
|
2185
2185
|
assert.deepEqual(await child.prompt(), [undefined], "the check never alters the prompt");
|
|
2186
|
-
assert.deepEqual(child.notes, [{ message: `${MISSING_TOOLS_NOTE_PREFIX} gentle_review_scope
|
|
2186
|
+
assert.deepEqual(child.notes, [{ message: `${MISSING_TOOLS_NOTE_PREFIX} gentle_review_scope`, type: "warning" }]);
|
|
2187
2187
|
await child.start();
|
|
2188
2188
|
assert.deepEqual(await child.prompt(), [undefined]);
|
|
2189
2189
|
assert.equal(child.notes.length, 1, "later prompts and session replacements do not repeat the warning");
|
|
@@ -2218,7 +2218,7 @@ test("a child stays quiet when every checkable requested tool exists or nothing
|
|
|
2218
2218
|
});
|
|
2219
2219
|
|
|
2220
2220
|
test("the missing-tools check never throws into before_agent_start", async () => {
|
|
2221
|
-
const child = missingToolsChild({ [REQUESTED_TOOLS_ENV]: "read
|
|
2221
|
+
const child = missingToolsChild({ [REQUESTED_TOOLS_ENV]: "read" }, () => { throw new Error("tool registry unavailable"); });
|
|
2222
2222
|
await child.start();
|
|
2223
2223
|
assert.deepEqual(await child.prompt(), [undefined]);
|
|
2224
2224
|
assert.deepEqual(child.notes, []);
|
|
@@ -3866,8 +3866,99 @@ test("a queued launch keeps the session routing frozen across a rebind", async t
|
|
|
3866
3866
|
}
|
|
3867
3867
|
});
|
|
3868
3868
|
|
|
3869
|
-
// gentle-shell#1064
|
|
3870
|
-
//
|
|
3869
|
+
// gentle-shell#1064 A4: two concurrent parent sessions in the same clone select
|
|
3870
|
+
// different profiles; neither launch observes the other's binding, and the
|
|
3871
|
+
// shared routing files are byte-identical afterwards.
|
|
3872
|
+
test("two concurrent parent sessions keep separate bindings without shared writes", async t => {
|
|
3873
|
+
t.after(() => resetSessionProfileBindingsForTesting());
|
|
3874
|
+
const base = pinFixture("two-parents");
|
|
3875
|
+
base.writeStore({
|
|
3876
|
+
first: { explore: { model: "openai/alpha", thinking: "minimal" } },
|
|
3877
|
+
second: { explore: { model: "openai/beta" } },
|
|
3878
|
+
});
|
|
3879
|
+
base.writePin("first");
|
|
3880
|
+
const sharedFiles = [join(base.configHome, "profiles.json"), base.localPinPath];
|
|
3881
|
+
const before = sharedFiles.map((path) => readFileSync(path, "utf8"));
|
|
3882
|
+
const model = (args: string[]) => args[args.indexOf("--model") + 1];
|
|
3883
|
+
const launchAs = async (sessionId: string, profile: string, routing: Record<string, unknown>, label: string) => {
|
|
3884
|
+
const harness = deps();
|
|
3885
|
+
harness.deps.resolveWorktree = () => ({ root: base.root, commonDir: base.commonDir });
|
|
3886
|
+
harness.deps.env = { PATH: "/bin", GENTLE_PI_CONFIG_HOME: base.configHome };
|
|
3887
|
+
const { pi, tools, fire } = fakePi();
|
|
3888
|
+
gentleAgents(pi, {}, harness.deps);
|
|
3889
|
+
const { ctx } = fakeContext();
|
|
3890
|
+
ctx.sessionManager.getSessionId = () => sessionId;
|
|
3891
|
+
bindSessionProfile(sessionId, profile, routing as never);
|
|
3892
|
+
await fire("session_start", ctx);
|
|
3893
|
+
try {
|
|
3894
|
+
await tools.get("subagent_run")!.execute(`two-parents-${label}`, { agent: "explore", task: `Map ${label}`, mode: "background" }, undefined, undefined, ctx);
|
|
3895
|
+
await tick();
|
|
3896
|
+
return { model: model(harness.spawned[0]), shutdown: async () => { await fire("session_shutdown", ctx); await tick(); } };
|
|
3897
|
+
} catch (error) {
|
|
3898
|
+
await fire("session_shutdown", ctx);
|
|
3899
|
+
await tick();
|
|
3900
|
+
throw error;
|
|
3901
|
+
}
|
|
3902
|
+
};
|
|
3903
|
+
const parentA = await launchAs("s1", "first", { explore: { model: "openai/alpha", thinking: "minimal" } }, "a");
|
|
3904
|
+
const parentB = await launchAs("s2", "second", { explore: { model: "openai/beta" } }, "b");
|
|
3905
|
+
try {
|
|
3906
|
+
assert.equal(parentA.model, "openai/alpha:minimal", "parent A's child launches on its own binding");
|
|
3907
|
+
assert.equal(parentB.model, "openai/beta:high", "parent B's child launches on its own binding, not A's");
|
|
3908
|
+
assert.deepEqual(sharedFiles.map((path) => readFileSync(path, "utf8")), before, "no session wrote to the shared profiles store or pin layers");
|
|
3909
|
+
} finally {
|
|
3910
|
+
await parentA.shutdown();
|
|
3911
|
+
await parentB.shutdown();
|
|
3912
|
+
}
|
|
3913
|
+
});
|
|
3914
|
+
|
|
3915
|
+
// gentle-shell#1064 A4: the running half of child stability. The queued half is
|
|
3916
|
+
// pinned above; here the child is already spawned and running when the parent
|
|
3917
|
+
// rebinds, and its frozen routing must survive both the rebind and its own
|
|
3918
|
+
// settlement.
|
|
3919
|
+
test("a running child keeps the routing resolved at its launch across a mid-flight rebind", async t => {
|
|
3920
|
+
t.after(() => resetSessionProfileBindingsForTesting());
|
|
3921
|
+
const base = pinFixture("running-freeze");
|
|
3922
|
+
base.writeStore({
|
|
3923
|
+
first: { explore: { model: "openai/alpha", thinking: "minimal" } },
|
|
3924
|
+
second: { explore: { model: "openai/beta" } },
|
|
3925
|
+
});
|
|
3926
|
+
bindSessionProfile("s1", "first", { explore: { model: "openai/alpha", thinking: "minimal" } });
|
|
3927
|
+
const harness = deps();
|
|
3928
|
+
harness.deps.resolveWorktree = () => ({ root: base.root, commonDir: base.commonDir });
|
|
3929
|
+
harness.deps.env = { PATH: "/bin", GENTLE_PI_CONFIG_HOME: base.configHome };
|
|
3930
|
+
const { pi, tools, fire } = fakePi();
|
|
3931
|
+
gentleAgents(pi, {}, harness.deps);
|
|
3932
|
+
const { ctx } = fakeContext();
|
|
3933
|
+
await fire("session_start", ctx);
|
|
3934
|
+
try {
|
|
3935
|
+
const model = (args: string[]) => args[args.indexOf("--model") + 1];
|
|
3936
|
+
await tools.get("subagent_run")!.execute("running-1", { agent: "explore", task: "Map first", mode: "background" }, undefined, undefined, ctx);
|
|
3937
|
+
await tick();
|
|
3938
|
+
// The child is spawned and still running here; only after confirming it is
|
|
3939
|
+
// live does the parent rebind.
|
|
3940
|
+
assert.equal(harness.spawned.length, 1, "the first child is already spawned before the rebind");
|
|
3941
|
+
const runningModel = model(harness.spawned[0]);
|
|
3942
|
+
bindSessionProfile("s1", "second", { explore: { model: "openai/beta" } });
|
|
3943
|
+
assert.equal(model(harness.spawned[0]), runningModel, "the running child's spawn routing is untouched by the rebind");
|
|
3944
|
+
// The running child settles normally under the new binding.
|
|
3945
|
+
const child = harness.children[0]!;
|
|
3946
|
+
child.emit({ type: "agent_end", messages: [] });
|
|
3947
|
+
child.emit({ type: "agent_settled" });
|
|
3948
|
+
child.exit(0);
|
|
3949
|
+
await tick();
|
|
3950
|
+
await tools.get("subagent_run")!.execute("running-2", { agent: "explore", task: "Map second", mode: "background" }, undefined, undefined, ctx);
|
|
3951
|
+
await tick();
|
|
3952
|
+
assert.equal(runningModel, "openai/alpha:minimal", "the child ran on the routing frozen at its launch");
|
|
3953
|
+
assert.equal(model(harness.spawned[1]), "openai/beta:high", "only a child launched after the rebind resolves the new binding");
|
|
3954
|
+
} finally {
|
|
3955
|
+
await fire("session_shutdown", ctx);
|
|
3956
|
+
await tick();
|
|
3957
|
+
}
|
|
3958
|
+
});
|
|
3959
|
+
|
|
3960
|
+
// gentle-shell#1064 slice 3b-ii: a parent session without an explicit Enter
|
|
3961
|
+
// binding freezes p → P → G at session_start; later default changes only show
|
|
3871
3962
|
// a drift notice once per change. GENTLE_PI_PROFILE_FOLLOW=1 keeps the live
|
|
3872
3963
|
// resolution.
|
|
3873
3964
|
async function launchSession(base: ReturnType<typeof pinFixture>, env: Record<string, string> = {}) {
|
|
@@ -4192,7 +4283,7 @@ test("subagent_list_agents publishes each agent's declared tool inventory so rou
|
|
|
4192
4283
|
const fixture = mkdtempSync(join(tmpdir(), "capability-catalog-"));
|
|
4193
4284
|
const agentHome = join(fixture, "agent-home");
|
|
4194
4285
|
mkdirSync(join(agentHome, ".pi", "agent", "agents"), { recursive: true });
|
|
4195
|
-
writeFileSync(join(agentHome, ".pi", "agent", "agents", "explore.md"), "---\ndescription: maps things\ntools: [read, grep, find
|
|
4286
|
+
writeFileSync(join(agentHome, ".pi", "agent", "agents", "explore.md"), "---\ndescription: maps things\ntools: [read, grep, find]\n---\nYou map things.");
|
|
4196
4287
|
writeFileSync(join(agentHome, ".pi", "agent", "agents", "open.md"), "---\ndescription: no allowlist\n---\nYou are open.");
|
|
4197
4288
|
writeFileSync(join(agentHome, ".pi", "agent", "agents", "unknown.md"), "---\ndescription: unverified name\ntools: [glob]\n---\nYou explore.");
|
|
4198
4289
|
writeFileSync(join(agentHome, ".pi", "agent", "agents", "lens.md"), "---\ndescription: review lane\ntools:\n - \"*\": false\n - read\n - grep\n - gentle_review_scope\n---\nYou review.");
|
|
@@ -4204,7 +4295,7 @@ test("subagent_list_agents publishes each agent's declared tool inventory so rou
|
|
|
4204
4295
|
const { ctx } = fakeContext();
|
|
4205
4296
|
await h.fire("session_start", ctx);
|
|
4206
4297
|
const listed = await h.tools.get("subagent_list_agents")!.execute("c0", {}, undefined, undefined, ctx);
|
|
4207
|
-
assert.match(listed.content[0].text, /- explore \(global\): maps things \[declared tools \(not verified\): read, grep, find
|
|
4298
|
+
assert.match(listed.content[0].text, /- explore \(global\): maps things \[declared tools \(not verified\): read, grep, find\]/);
|
|
4208
4299
|
// gentle-shell#1269: a definition without an allowlist keeps Pi's default
|
|
4209
4300
|
// tool set, so the catalog must never render it as having no tools at all.
|
|
4210
4301
|
assert.match(listed.content[0].text, /- open \(global\): no allowlist \[declared tools: Pi defaults \(no allowlist\)\]/);
|
|
@@ -8014,6 +8105,76 @@ function fakeJobShell() {
|
|
|
8014
8105
|
const jobIo = () => new Promise((done) => setTimeout(done, 50));
|
|
8015
8106
|
const toolText = (result: { content: Array<{ text?: string }> }) => result.content.map((part) => part.text ?? "").join("\n");
|
|
8016
8107
|
|
|
8108
|
+
async function jobTextHarness(t: TestContext, provider?: string) {
|
|
8109
|
+
const h = fakePi(provider), jobs = fakeJobShell(), { ctx } = fakeContext();
|
|
8110
|
+
gentleAgents(h.pi, {}, { ...deps().deps, jobShell: jobs.shell, jobOutputDir: () => jobs.dir });
|
|
8111
|
+
t.after(async () => {
|
|
8112
|
+
try { await h.fire("session_shutdown", ctx); } finally { jobs.cleanup(); }
|
|
8113
|
+
});
|
|
8114
|
+
await h.fire("session_start", ctx);
|
|
8115
|
+
const notices = () => h.sent.filter(({ message }) => message.customType === "gentle-jobs.notice");
|
|
8116
|
+
return { ...h, jobs, ctx, notices };
|
|
8117
|
+
}
|
|
8118
|
+
|
|
8119
|
+
for (const { name, input, provider, heading, intro, resume } of [
|
|
8120
|
+
{
|
|
8121
|
+
name: "bash_background", input: { command: "make build", label: "Build" }, provider: "claude-bridge",
|
|
8122
|
+
heading: 'Started background job job-1 ("Build").', intro: "You will be notified once when it exits.",
|
|
8123
|
+
resume: "Resume dependent work on the exit notice.",
|
|
8124
|
+
},
|
|
8125
|
+
{
|
|
8126
|
+
name: "monitor", input: { command: "watch checks", label: "Checks", timeout_seconds: 30 }, provider: "openai-codex",
|
|
8127
|
+
heading: 'Started monitor job-1 ("Checks") for up to 30s.', intro: "Each new output line reaches you as an event.",
|
|
8128
|
+
resume: "Resume work on relevant events or the exit notice.",
|
|
8129
|
+
},
|
|
8130
|
+
]) {
|
|
8131
|
+
test(`${name} launch says to continue independent work before ending the turn to wait`, async (t) => {
|
|
8132
|
+
const { tools, jobs, ctx } = await jobTextHarness(t, provider);
|
|
8133
|
+
const result = await tools.get(name)!.execute("start", input, undefined, undefined, ctx);
|
|
8134
|
+
assert.equal(toolText(result), `${heading}\nOutput: ${join(jobs.dir, "job-1.log")}\n${intro} Continue independent in-scope work now; end the turn to wait only when none remains. ${resume} Stop it with job_stop.`);
|
|
8135
|
+
});
|
|
8136
|
+
|
|
8137
|
+
test(`${name} starts at once and still delivers one exit notice to its owner only`, async (t) => {
|
|
8138
|
+
const { tools, jobs, ctx, fire, notices, events, delivery } = await jobTextHarness(t, provider);
|
|
8139
|
+
const { ctx: other } = fakeContext();
|
|
8140
|
+
other.sessionManager.getSessionId = () => "other";
|
|
8141
|
+
const run = await tools.get(name)!.execute("start", input, undefined, undefined, ctx);
|
|
8142
|
+
assert.equal(jobs.runs.length, 1);
|
|
8143
|
+
assert.equal(jobs.runs[0]!.command, input.command);
|
|
8144
|
+
assert.deepEqual(run.details.gentleJobs, {
|
|
8145
|
+
jobId: "job-1", kind: name === "monitor" ? "monitor" : "command", label: input.label,
|
|
8146
|
+
status: "running", exitCode: null, outputPath: join(jobs.dir, "job-1.log"),
|
|
8147
|
+
});
|
|
8148
|
+
assert.deepEqual(delivery, []);
|
|
8149
|
+
await fire("session_start", other, { reason: "new" });
|
|
8150
|
+
jobs.runs[0]!.exit(0);
|
|
8151
|
+
await eventually(() => events.some(({ name }) => name === "gentle-pi:herdr-desktop:job-settled"), "job settles while the other session is active");
|
|
8152
|
+
assert.deepEqual(delivery, [], "the other session does not receive the notice or wake");
|
|
8153
|
+
await fire("session_start", ctx, { reason: "resume" });
|
|
8154
|
+
await fire("turn_end", ctx);
|
|
8155
|
+
await eventually(() => notices().length === 1, "the owner receives the retained notice");
|
|
8156
|
+
assert.deepEqual(notices()[0]!.options, { triggerTurn: false });
|
|
8157
|
+
await fire("agent_settled", ctx);
|
|
8158
|
+
await fire("turn_end", ctx);
|
|
8159
|
+
assert.deepEqual(delivery, ["custom:gentle-jobs.notice", provider === "claude-bridge" ? "user" : "custom:gentle-agents.wake"]);
|
|
8160
|
+
});
|
|
8161
|
+
}
|
|
8162
|
+
|
|
8163
|
+
test("job exit notices themselves tell the parent to continue and diagnose a failed exit as an obstacle", async (t) => {
|
|
8164
|
+
const { tools, jobs, ctx, notices } = await jobTextHarness(t);
|
|
8165
|
+
const start = tools.get("bash_background")!;
|
|
8166
|
+
await start.execute("a", { command: "passing check" }, undefined, undefined, ctx);
|
|
8167
|
+
await start.execute("b", { command: "failing check" }, undefined, undefined, ctx);
|
|
8168
|
+
jobs.runs[0]!.exit(0);
|
|
8169
|
+
jobs.runs[1]!.exit(7);
|
|
8170
|
+
await eventually(() => notices().length === 2, "both results reach the idle parent");
|
|
8171
|
+
const continuation = (jobId: string) => String(notices().find(({ message }) => String(message.content).startsWith(`Background job ${jobId} `))!.message.content).split("\n").at(-1);
|
|
8172
|
+
assert.deepEqual([continuation("job-1"), continuation("job-2")], [
|
|
8173
|
+
"This result does not end the task: read it and continue the authorized work that depended on this job.",
|
|
8174
|
+
"This failure is an obstacle, not the end of the task: read the result, diagnose the cause, and continue the authorized work that depended on this job.",
|
|
8175
|
+
]);
|
|
8176
|
+
});
|
|
8177
|
+
|
|
8017
8178
|
test("standalone bash sleep is blocked only while background work is active (#1903)", async () => {
|
|
8018
8179
|
const { pi, tools, fire, sent } = fakePi();
|
|
8019
8180
|
const jobs = fakeJobShell();
|
|
@@ -8031,7 +8192,8 @@ test("standalone bash sleep is blocked only while background work is active (#19
|
|
|
8031
8192
|
const blocked = await call("bash", command);
|
|
8032
8193
|
assert.equal(blocked?.block, true, command);
|
|
8033
8194
|
assert.match(blocked!.reason!, /background work is active/);
|
|
8034
|
-
assert.match(blocked!.reason!, /
|
|
8195
|
+
assert.match(blocked!.reason!, /Continue independent in-scope work; end the turn to wait only when none remains\./);
|
|
8196
|
+
assert.doesNotMatch(blocked!.reason!, /End the turn now/);
|
|
8035
8197
|
}
|
|
8036
8198
|
// Real wait conditions, mixed commands and the sanctioned background tools stay allowed.
|
|
8037
8199
|
for (const command of ["until curl -s x; do sleep 1; done", "sleep 5 && gh run view 42", "for i in 1 2; do sleep 1; echo $i; done", "sleep $N"]) {
|
|
@@ -8265,8 +8427,19 @@ test("a job notice survives session switching and is delivered only to its owner
|
|
|
8265
8427
|
assert.equal(notices().length, 0, "the inactive owner's notice is never delivered to another session");
|
|
8266
8428
|
|
|
8267
8429
|
await fire("session_start", owner, { reason: "resume" });
|
|
8430
|
+
// The owner's run ended while its session was away: settle it, because a
|
|
8431
|
+
// notice queued after the last boundary is flushed by queueJobNotice itself
|
|
8432
|
+
// only while no agent run is active (the busy-parent test below keeps its
|
|
8433
|
+
// run and fires its own turn boundaries instead).
|
|
8434
|
+
await fire("agent_end", owner);
|
|
8435
|
+
await fire("agent_settled", owner);
|
|
8268
8436
|
await fire("turn_end", owner);
|
|
8269
|
-
|
|
8437
|
+
// The retained notice lands when the job log closes, which can outlast the resume boundary
|
|
8438
|
+
// under load (the busy-parent test below allows the same); give it a wider bounded window.
|
|
8439
|
+
for (let attempt = 0; attempt < 400 && notices().length === 0; attempt++) {
|
|
8440
|
+
await new Promise((resolve) => setTimeout(resolve, 25));
|
|
8441
|
+
}
|
|
8442
|
+
assert.equal(notices().length, 1, "resuming the owner delivers its retained notice");
|
|
8270
8443
|
assert.match(String(notices()[0]!.message.content), /job-1 \(\"owner job\"\) exited with code 0/);
|
|
8271
8444
|
await fire("turn_end", owner);
|
|
8272
8445
|
assert.equal(notices().length, 1, "the retained notice is delivered exactly once");
|
|
@@ -8552,6 +8725,38 @@ test("monitor delivers line events to an idle parent with one wake, and reports
|
|
|
8552
8725
|
}
|
|
8553
8726
|
});
|
|
8554
8727
|
|
|
8728
|
+
test("the monitor deadline stops watching and wakes the parent with the agent-configured limit", async () => {
|
|
8729
|
+
const { pi, tools, fire, sent, userMessages } = fakePi();
|
|
8730
|
+
const harness = deps();
|
|
8731
|
+
const timers = recordTimers(harness.deps);
|
|
8732
|
+
const jobs = fakeJobShell();
|
|
8733
|
+
gentleAgents(pi, {}, { ...harness.deps, jobShell: jobs.shell, jobOutputDir: () => jobs.dir });
|
|
8734
|
+
const { ctx } = fakeContext();
|
|
8735
|
+
try {
|
|
8736
|
+
await fire("session_start", ctx);
|
|
8737
|
+
await tools.get("monitor")!.execute("m1", { command: "tail -f log", label: "checks", timeout_seconds: 17 }, undefined, undefined, ctx);
|
|
8738
|
+
assert.equal(jobs.runs.length, 1);
|
|
8739
|
+
assert.equal(sent.length, 0, "a running monitor has not reached its deadline");
|
|
8740
|
+
assert.equal(timers.run(17_000), 1, "fire the monitor controller's scheduled deadline");
|
|
8741
|
+
assert.equal(jobs.runs[0]!.signal?.aborted, true, "the limit stops the running monitor");
|
|
8742
|
+
await eventually(() => userMessages.length === 1, "the deadline notice wakes the idle parent");
|
|
8743
|
+
const outputPath = join(jobs.dir, "job-1.log");
|
|
8744
|
+
const notices = sent.filter(({ message }) => message.customType === "gentle-jobs.notice");
|
|
8745
|
+
assert.equal(notices.length, 1);
|
|
8746
|
+
assert.deepEqual(notices[0]!.options, { triggerTurn: false });
|
|
8747
|
+
assert.deepEqual(notices[0]!.message.details, {
|
|
8748
|
+
gentleJobs: { jobId: "job-1", kind: "monitor", label: "checks", status: "stopped", exitCode: null, outputPath, event: "timeout" },
|
|
8749
|
+
});
|
|
8750
|
+
assert.equal(notices[0]!.message.content,
|
|
8751
|
+
`Monitor job-1 ("checks") reached its 17s timeout after 0 events and ended. This is the limit you set with timeout_seconds, not a failure or a user stop. Start a new monitor only if watching is still needed for authorized work and other limits allow it.\nFull output: ${outputPath}`);
|
|
8752
|
+
assert.equal(timers.pending(17_000), 0, "the deadline is not rearmed");
|
|
8753
|
+
assert.equal(jobs.runs.length, 1, "a new watch was not started automatically");
|
|
8754
|
+
} finally {
|
|
8755
|
+
await fire("session_shutdown", ctx);
|
|
8756
|
+
jobs.cleanup();
|
|
8757
|
+
}
|
|
8758
|
+
});
|
|
8759
|
+
|
|
8555
8760
|
test("monitor events wait for a busy parent's turn boundary and coalesce into one notice", async () => {
|
|
8556
8761
|
const { pi, tools, fire, sent } = fakePi();
|
|
8557
8762
|
const harness = deps();
|
|
@@ -97,8 +97,8 @@ async function writeWindowsSourceBinary(packageRoot: string): Promise<{ binaryPa
|
|
|
97
97
|
await writeFile(manifestPath, `${JSON.stringify({
|
|
98
98
|
version: GENTLE_AI_VERSION,
|
|
99
99
|
method: "go-sumdb-source-build",
|
|
100
|
-
package: "github.com/gentleman-programming/gentle-ai/
|
|
101
|
-
module: "github.com/gentleman-programming/gentle-ai/
|
|
100
|
+
package: "github.com/gentleman-programming/gentle-ai/v5/cmd/gentle-ai",
|
|
101
|
+
module: "github.com/gentleman-programming/gentle-ai/v5",
|
|
102
102
|
tag: RUNTIME_DIRECTORY,
|
|
103
103
|
architecture: process.arch === "x64" ? "x64" : "arm64",
|
|
104
104
|
binarySha256: createHash("sha256").update(binary).digest("hex"),
|
|
@@ -324,7 +324,7 @@ verifiedBinaryTest("production native client never invokes a global gentle-ai ex
|
|
|
324
324
|
|
|
325
325
|
await assert.rejects(
|
|
326
326
|
() => createNativeReviewCli(adapter, () => resolveGentleAiBinary(packageRoot, process.platform)).targetStatus!({ cwd: packageRoot, lineageId: "review-status-fixture" }),
|
|
327
|
-
/
|
|
327
|
+
/status\/v3 is older than the supported v9 \(gentle-ai v4\.6\.0\)/,
|
|
328
328
|
);
|
|
329
329
|
assert.deepEqual(calls, [binaryPath]);
|
|
330
330
|
assert.ok(calls.every((file) => file !== "gentle-ai"));
|
|
@@ -88,8 +88,9 @@ test("parallel nested results emit one independent context message and keep thei
|
|
|
88
88
|
const f = fixture(t);
|
|
89
89
|
await f.start();
|
|
90
90
|
await f.call("p", "codemode");
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
const tool = "mcp__codegraph__codegraph_query";
|
|
92
|
+
for (let i = 0; i < 4; i++) await f.call(`p/${i}`, tool, { parentToolCallId: "p" });
|
|
93
|
+
const results = await Promise.all(Array.from({ length: 4 }, (_, i) => f.result(`p/${i}`, tool, { parentToolCallId: "p" })));
|
|
93
94
|
assert.deepEqual(results, [undefined, undefined, undefined, undefined]);
|
|
94
95
|
assert.equal(f.messages.length, 1);
|
|
95
96
|
assert.match(f.messages[0].message.content, /Exploration budget:/);
|