gentle-pi 4.5.1 → 4.7.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 +17 -15
- package/assets/agents/gentle-ai-explore.md +1 -0
- package/assets/agents/gentle-ai-verify.md +8 -1
- package/assets/agents/gentle-ai-worker.md +4 -0
- package/assets/agents/jd-fix-agent.md +1 -0
- package/assets/agents/jd-judge-a.md +1 -0
- package/assets/agents/jd-judge-b.md +1 -0
- package/assets/design-canvas/canvas.css +13 -1
- package/assets/design-canvas/canvas.js +11 -2
- package/assets/install-wizard/wizard.js +1 -0
- package/assets/migrations/agent-body-history.json +162 -0
- package/assets/orchestrator-delegation-reference.md +7 -7
- package/assets/orchestrator-delegation.md +3 -3
- package/assets/orchestrator-full-delegation-card.md +65 -0
- package/assets/orchestrator-full-delegation.md +34 -0
- package/assets/orchestrator-memory.md +3 -3
- package/assets/orchestrator-prompts.md +1 -1
- package/assets/orchestrator-skills.md +1 -1
- package/assets/orchestrator-verification.md +14 -8
- package/assets/orchestrator.md +11 -11
- package/bin/gentle-shell.mjs +225 -82
- package/docs/agent-status.md +61 -0
- package/docs/bundled-install.md +7 -5
- package/docs/ci-performance.md +11 -0
- package/docs/delegated-verification.md +35 -7
- package/docs/fast-mode.md +15 -0
- package/docs/gentle-agents-activity.md +22 -0
- package/docs/gentle-shell.md +113 -25
- package/docs/install-wizard.md +2 -2
- package/docs/mcp-status.md +52 -0
- package/docs/permission-modes.md +9 -4
- package/docs/prompt-budget.md +28 -0
- package/docs/readme-reference.md +154 -50
- package/docs/render-cache-performance.md +11 -1
- package/docs/review-coordinator.md +33 -0
- package/docs/review-request-context.md +19 -0
- package/docs/review-windows-acl.md +18 -0
- package/docs/session-profile-format.md +20 -5
- package/docs/sound-notifications.md +1 -1
- package/docs/star-prompt.md +32 -0
- package/docs/voice.md +6 -3
- package/docs/work-continuity.md +46 -0
- package/docs/yolo-mode.md +5 -5
- package/extensions/ask-user-choice.ts +1 -0
- package/extensions/ask-user-question.ts +2 -0
- package/extensions/child-safety.ts +3 -0
- package/extensions/codegraph-tools.ts +38 -4
- package/extensions/gentle-agent-status.ts +99 -0
- package/extensions/gentle-agents.ts +803 -84
- package/extensions/gentle-ai.ts +2491 -596
- package/extensions/gentle-fast.ts +61 -0
- package/extensions/gentle-guide.ts +174 -0
- package/extensions/gentle-herdr-activity.ts +21 -1
- package/extensions/gentle-herdr-agent.ts +144 -0
- package/extensions/gentle-program-identity.ts +61 -0
- package/extensions/gentle-shell.ts +895 -120
- package/extensions/gentle-star-prompt.ts +334 -0
- package/extensions/gentle-stats.ts +5 -5
- package/extensions/gentle-todo.ts +59 -23
- package/extensions/gentle-tps.ts +48 -0
- package/extensions/history/store.ts +18 -12
- package/extensions/quiet-tools.ts +38 -8
- package/extensions/skill-registry.ts +210 -21
- package/extensions/startup-banner.ts +69 -10
- package/lib/agent-assets.ts +74 -17
- package/lib/agent-profile-pin.ts +3 -3
- package/lib/agent-profiles.ts +161 -3
- package/lib/agent-status.ts +105 -0
- package/lib/agents-config.ts +58 -3
- package/lib/agents-history.ts +24 -5
- package/lib/agents-keys.ts +8 -16
- package/lib/agents-messaging.ts +47 -5
- package/lib/agents-protocol.ts +80 -4
- package/lib/agents-runner.ts +287 -15
- package/lib/agents-view.ts +6 -1
- package/lib/agents-widget.ts +132 -9
- package/lib/auto-permission-runtime.ts +1 -1
- package/lib/bounded-writer-admission.ts +13 -1
- package/lib/bridge-cost.ts +28 -0
- package/lib/card-content-policy.ts +8 -6
- package/lib/codemode-renderer.ts +16 -0
- package/lib/command-palette-catalog.ts +1 -0
- package/lib/command-palette.ts +154 -25
- package/lib/context-backstop.ts +14 -5
- package/lib/destructive-command-guard.ts +48 -4
- package/lib/execution-surface-guard.ts +20 -0
- package/lib/exploration-budget.ts +64 -0
- package/lib/gentle-ai-binary.ts +1 -1
- package/lib/gentle-design.ts +3 -0
- package/lib/gentle-guide.ts +201 -0
- package/lib/gentle-shell-bundled.ts +6 -19
- package/lib/gentle-shell-launcher.ts +47 -8
- package/lib/herdr-activity.ts +23 -5
- package/lib/herdr-busy.ts +45 -0
- package/lib/herdr-task-summary-policy.ts +85 -0
- package/lib/image-attachments.ts +33 -0
- package/lib/image-disk-cache.ts +137 -0
- package/lib/inprocess-reviewer.ts +282 -132
- package/lib/jobs-sidebar-state.ts +5 -6
- package/lib/jobs-view.ts +198 -11
- package/lib/jobs-widget.ts +16 -52
- package/lib/keymaps-customize.ts +81 -0
- package/lib/keymaps.ts +291 -0
- package/lib/model-fallback-notice.ts +61 -0
- package/lib/model-fallback-policy.ts +141 -0
- package/lib/model-fallback-store.ts +143 -0
- package/lib/model-routing-authority.ts +32 -6
- package/lib/nan-provider.ts +3 -2
- package/lib/native-choice-list.ts +20 -2
- package/lib/native-review-cli.ts +103 -21
- package/lib/notification-customize.ts +48 -51
- package/lib/openai-fast-tier.ts +22 -0
- package/lib/orchestrator-discovery.ts +5 -1
- package/lib/orchestrator-fallback.ts +75 -0
- package/lib/orchestrator-mode-policy.ts +105 -0
- package/lib/pasted-image-paths.ts +113 -0
- package/lib/questionnaire/questionnaire-view.ts +225 -18
- package/lib/rdd-mode-control.ts +32 -0
- package/lib/reply-language-anchor.ts +104 -0
- package/lib/review-blocker.ts +92 -0
- package/lib/review-candidate-symlink-scan.ts +136 -0
- package/lib/review-candidate-view-owner.ts +85 -44
- package/lib/review-candidate-view.ts +10 -7
- package/lib/review-continuation-registry.ts +99 -0
- package/lib/review-coordinator.ts +163 -0
- package/lib/review-failure-facts.ts +49 -0
- package/lib/review-host-relay.ts +51 -11
- package/lib/review-integration-v2.ts +29 -8
- package/lib/review-relay-phase-timing.ts +45 -0
- package/lib/review-repository.ts +5 -0
- package/lib/review-start-context.ts +17 -0
- package/lib/session-profile-append-controller.ts +21 -6
- package/lib/session-profile-authority.ts +119 -0
- package/lib/session-profile-binding.ts +54 -5
- package/lib/session-profile-freeze.ts +107 -9
- package/lib/session-profile-integration.ts +313 -0
- package/lib/session-profile-persistence.ts +63 -9
- package/lib/shell-bar.ts +269 -72
- package/lib/shell-card.ts +26 -6
- package/lib/shell-changes.ts +2 -0
- package/lib/shell-page.ts +120 -0
- package/lib/shell-panel.ts +163 -0
- package/lib/shell-prompt.ts +53 -1
- package/lib/shell-sidebar-layout.ts +198 -53
- package/lib/shell-sidebar.ts +61 -1
- package/lib/shell-stats.ts +123 -0
- package/lib/shell-todo.ts +79 -1
- package/lib/shell-usage.ts +12 -2
- package/lib/star-prompt.ts +197 -0
- package/lib/verifier-admission.ts +18 -8
- package/lib/verifier-settle-reminder.ts +64 -0
- package/lib/vim-editor-adapter.ts +6 -1
- package/lib/visual-customization-policy.ts +67 -12
- package/lib/visual-customize-view.ts +373 -40
- package/lib/visual-layout-preview.ts +47 -0
- package/lib/visual-profiles.ts +2 -2
- package/lib/windows-session-transport.ts +53 -2
- package/lib/yolo-session-policy.ts +68 -16
- package/package.json +2 -1
- package/runtime/gentle-ai-binary.mjs +1 -1
- package/runtime/gentle-shell-bundled.mjs +6 -19
- package/runtime/gentle-shell-launcher.mjs +46 -7
- package/runtime/native-review-cli.mjs +100 -18
- package/runtime/review-integration-v2.mjs +29 -8
- package/runtime/windows-session-transport.ps1 +60 -3
- package/scripts/bootstrap.sh +4 -1
- package/scripts/build-full-delegation-card.mjs +175 -0
- package/scripts/bundled-install.mjs +38 -8
- package/scripts/download-progress.mjs +68 -0
- package/scripts/gentle-ai-installer.mjs +41 -18
- package/scripts/gentle-ai-proxy.mjs +294 -0
- package/scripts/install-gentle-ai.mjs +14 -1
- package/scripts/installer-preflight.mjs +6 -6
- package/scripts/installer-runner.mjs +27 -12
- package/scripts/installer-server.mjs +8 -7
- package/scripts/pi-update.mjs +113 -3
- package/scripts/render-cache-host.mjs +72 -0
- package/scripts/render-cache-performance-worker.mjs +5 -4
- package/scripts/render-cache-performance.mjs +6 -1
- package/scripts/run-test-suite.mjs +41 -13
- package/scripts/shell-snapshot.mjs +340 -0
- package/scripts/test-packed-runner.mjs +1 -1
- package/scripts/update-agent-body-history.mjs +41 -0
- package/scripts/verify-installer-tap.mjs +45 -0
- package/scripts/verify-package-files.mjs +14 -2
- package/scripts/voice-worker.cjs +32 -6
- package/skills/design/SKILL.md +11 -8
- package/skills/gentle-ai/SKILL.md +4 -4
- package/skills/gentle-ui-design/SKILL.md +46 -0
- package/skills/gentle-ui-design/references/adaptive-interfaces.md +46 -0
- package/skills/gentle-ui-design/references/browse-and-compare.md +62 -0
- package/skills/gentle-ui-design/references/composition-and-feedback.md +56 -0
- package/skills/gentle-ui-design/references/task-and-content.md +60 -0
- package/skills/skill-registry/SKILL.md +4 -2
- package/skills/tui-design/NOTICE.md +5 -0
- package/skills/tui-design/SKILL.md +56 -0
- package/skills/tui-design/references/commands.md +75 -0
- package/skills/tui-design/references/critique.md +48 -0
- package/skills/tui-design/references/design-doc.md +44 -0
- package/skills/tui-design/references/terminal-craft.md +64 -0
- package/skills/tui-design/references/visual-loop.md +32 -0
- package/skills/work-unit-commits/SKILL.md +6 -7
- package/tests/agent-home.test.ts +28 -9
- package/tests/agent-profiles-workflow.test.ts +163 -0
- package/tests/agent-risk-escalation.test.ts +1 -1
- package/tests/agent-status.test.ts +143 -0
- package/tests/agents-config.test.ts +96 -0
- package/tests/agents-history.test.ts +31 -0
- package/tests/agents-jobs-frames.test.ts +93 -0
- package/tests/agents-prompt-lifecycle-runtime.test.ts +376 -0
- package/tests/agents-protocol.test.ts +53 -1
- package/tests/agents-runner-drain.test.ts +193 -0
- package/tests/agents-runner.test.ts +345 -4
- package/tests/agents-view.test.ts +27 -0
- package/tests/agents-widget.test.ts +312 -10
- package/tests/append-system-prompt-route.test.ts +4 -1
- package/tests/ask-user-choice.test.ts +4 -3
- package/tests/ask-user-question.test.ts +97 -0
- package/tests/auto-permission-runtime.test.ts +1 -1
- package/tests/autonomous-guard.test.ts +346 -10
- package/tests/bounded-scan-contract.test.ts +39 -0
- package/tests/bounded-stop-contract.test.ts +43 -3
- package/tests/bridge-cost.test.ts +47 -0
- package/tests/bundled-install.test.ts +36 -9
- package/tests/card-content-policy.test.ts +3 -3
- package/tests/chained-pr-skill.test.ts +8 -6
- package/tests/child-safety.test.ts +11 -0
- package/tests/ci-concurrency.test.ts +11 -0
- package/tests/ci-merge-base-identity.test.ts +114 -0
- package/tests/codegraph-tools.test.ts +80 -5
- package/tests/codemode-rendering.test.ts +22 -2
- package/tests/command-palette.test.ts +300 -3
- package/tests/commit-slice-signal.test.ts +11 -9
- package/tests/delegate-for-reason-contract.test.ts +8 -7
- package/tests/design-canvas-assets.test.ts +185 -2
- package/tests/destructive-command-guard.test.ts +52 -0
- package/tests/download-progress.test.ts +71 -0
- package/tests/execution-surface-guard.test.ts +55 -0
- package/tests/exploration-budget.test.ts +128 -0
- package/tests/fixtures/agent-assets/gentle-ai-worker.strict-tdd-era.md +122 -0
- package/tests/fixtures/measure-orchestrator-prompt.mjs +2 -1
- package/tests/fixtures/primary-session-prompt/gentleman.golden.md +26 -14
- package/tests/fixtures/proxy-tls/proxy.crt +19 -0
- package/tests/fixtures/proxy-tls/proxy.key +28 -0
- package/tests/fixtures/session-profile-v1/gentle-ai-reviewer.ts +89 -0
- package/tests/fixtures/session-profile-v1/replay.ts +172 -0
- package/tests/fixtures/session-profile-v1/session-profile-authority.ts +113 -0
- package/tests/fixtures/session-profile-v1/session-profile-binding.ts +83 -0
- package/tests/fixtures/session-profile-v1/session-profile-disk-reader.ts +182 -0
- package/tests/fixtures/session-profile-v1/session-profile-freeze.ts +290 -0
- package/tests/fixtures/session-profile-v1/session-profile-persistence.ts +195 -0
- package/tests/fixtures/session-profile-v1/v1-inputs.ts +16 -0
- package/tests/fixtures/windows-pipe-availability.ps1 +26 -0
- package/tests/fixtures/windows-session-bootstrap.ps1 +6 -2
- package/tests/full-delegation-closure.test.ts +131 -0
- package/tests/full-delegation-notices.test.ts +76 -0
- package/tests/generic-agent-tools.test.ts +3 -3
- package/tests/gentle-agent-status.test.ts +74 -0
- package/tests/gentle-agents-child-jobs.test.ts +237 -0
- package/tests/gentle-agents.test.ts +1491 -38
- package/tests/gentle-ai-binary.test.ts +3 -1
- package/tests/gentle-ai-elapsed-store.test.ts +19 -0
- package/tests/gentle-ai-exploration-budget.test.ts +151 -0
- package/tests/gentle-ai-installer.test.ts +134 -51
- package/tests/gentle-ai-proxy.test.ts +434 -0
- package/tests/gentle-ai.test.ts +1101 -52
- package/tests/gentle-design.test.ts +21 -0
- package/tests/gentle-fast.test.ts +73 -0
- package/tests/gentle-guide.test.ts +208 -0
- package/tests/gentle-herdr-activity.test.ts +80 -3
- package/tests/gentle-herdr-agent.test.ts +111 -0
- package/tests/gentle-program-identity.test.ts +197 -0
- package/tests/gentle-shell-bin.test.ts +172 -26
- package/tests/gentle-shell-bundled.test.ts +207 -31
- package/tests/gentle-shell-launcher.test.ts +93 -10
- package/tests/gentle-shell.test.ts +1937 -66
- package/tests/gentle-stats.test.ts +15 -2
- package/tests/gentle-todo.test.ts +67 -4
- package/tests/gentle-tps.test.ts +123 -0
- package/tests/gentle-ui-design-skill.test.ts +59 -0
- package/tests/herdr-busy.test.ts +59 -0
- package/tests/herdr-task-summary-policy.test.ts +132 -0
- package/tests/history-store-private-mode.test.ts +40 -0
- package/tests/image-disk-cache.test.ts +163 -0
- package/tests/image-paste-chips.test.ts +42 -0
- package/tests/independent-recovery-delivery.test.ts +83 -0
- package/tests/inprocess-reviewer.test.ts +298 -4
- package/tests/installer-posix-bootstrap.test.ts +68 -6
- package/tests/installer-preflight.test.ts +5 -4
- package/tests/installer-runner.test.ts +79 -44
- package/tests/installer-server.test.ts +14 -11
- package/tests/installer-windows-diagnostics.test.ts +4 -5
- package/tests/isolated-config-home.ts +28 -0
- package/tests/jobs-view.test.ts +260 -6
- package/tests/jobs-widget.test.ts +25 -37
- package/tests/keymaps-customize.test.ts +114 -0
- package/tests/keymaps.test.ts +103 -0
- package/tests/maintainer/mcp-status.maintest.ts +88 -0
- package/tests/maintainer/pi-update-source.maintest.ts +116 -0
- package/tests/modal-mouse-boundaries.test.ts +136 -0
- package/tests/model-fallback-notice.test.ts +45 -0
- package/tests/model-fallback-policy.test.ts +83 -0
- package/tests/model-fallback-store.test.ts +111 -0
- package/tests/model-routing-authority.test.ts +178 -2
- package/tests/nan-provider.test.ts +4 -4
- package/tests/native-choice-list.test.ts +77 -2
- package/tests/native-review-capability-contract.test.ts +7 -1
- package/tests/native-review-cli.test.ts +269 -1
- package/tests/no-self-pause-contract.test.ts +22 -0
- package/tests/notification-customize.test.ts +58 -34
- package/tests/odd-routing-canonical-ratchet.test.ts +6 -6
- package/tests/odd-routing-contract.test.ts +1 -1
- package/tests/orchestrator-budget.test.ts +7 -2
- package/tests/orchestrator-delegation-mode.test.ts +153 -0
- package/tests/orchestrator-fallback.test.ts +82 -0
- package/tests/orchestrator-mode-policy.test.ts +175 -0
- package/tests/orchestrator-prompt-budget.test.ts +133 -0
- package/tests/orchestrator-rdd-ownership.test.ts +2 -2
- package/tests/package-manifest.test.ts +169 -14
- package/tests/pasted-image-paths.test.ts +118 -0
- package/tests/permission-allowlist.test.ts +202 -0
- package/tests/persona-reply-language.test.ts +20 -1
- package/tests/pi-update-launcher.test.ts +40 -8
- package/tests/pi-update-source.test.ts +162 -0
- package/tests/pnpm-workspace-config.test.ts +58 -0
- package/tests/primary-session-prompt.test.ts +13 -0
- package/tests/profile-fast-tier.test.ts +311 -0
- package/tests/profile-pin.test.ts +29 -2
- package/tests/profile-tier-footer.test.ts +84 -0
- package/tests/profiles-panel-delegation-mode.test.ts +422 -0
- package/tests/questionnaire-view.test.ts +265 -0
- package/tests/quiet-bash-runtime.test.ts +1 -1
- package/tests/quiet-tool-rendering.test.ts +48 -0
- package/tests/rdd-aware-verification-contract.test.ts +16 -11
- package/tests/rdd-customize.test.ts +287 -0
- package/tests/rdd-mode-cache.test.ts +450 -0
- package/tests/rdd-mode-control.test.ts +407 -0
- package/tests/rdd-mode-scope-regression.test.ts +137 -0
- package/tests/rdd-off-independent-regression.test.ts +69 -0
- package/tests/rdd-status-line.test.ts +18 -0
- package/tests/render-cache-performance.test.ts +171 -2
- package/tests/reply-language-anchor.test.ts +173 -0
- package/tests/review-agent-end-preflight.test.ts +1 -1
- package/tests/review-blocker.test.ts +193 -0
- package/tests/review-candidate-owner-retry.test.ts +1 -1
- package/tests/review-candidate-owner-sweep.test.ts +93 -0
- package/tests/review-candidate-symlink-scan.test.ts +157 -0
- package/tests/review-candidate-view.test.ts +52 -1
- package/tests/review-candidate-windows-boundary.test.ts +131 -0
- package/tests/review-candidate-windows-probe.test.ts +63 -0
- package/tests/review-committed-restart-ack.test.ts +129 -0
- package/tests/review-continuation-registry.test.ts +76 -0
- package/tests/review-controller-native-routing.test.ts +381 -11
- package/tests/review-controller-workspace-root.test.ts +230 -3
- package/tests/review-controller.test.ts +96 -11
- package/tests/review-coordinator-runtime.test.ts +117 -0
- package/tests/review-coordinator.test.ts +195 -0
- package/tests/review-failure-facts.test.ts +87 -0
- package/tests/review-gate.test.ts +24 -0
- package/tests/review-host-relay-routing.test.ts +258 -4
- package/tests/review-host-relay.test.ts +39 -0
- package/tests/review-inspect-preflight.test.ts +197 -0
- package/tests/review-integration-v2-forward.test.ts +59 -0
- package/tests/review-integration-v2.test.ts +46 -3
- package/tests/review-json-arguments.test.ts +65 -10
- package/tests/review-last-event-closure.test.ts +68 -0
- package/tests/review-loadout-rdd-off-sdk.test.ts +65 -31
- package/tests/review-owner-identity.test.ts +60 -24
- package/tests/review-relay-phase-timing.test.ts +128 -0
- package/tests/review-relay-transport-agent.test.ts +12 -2
- package/tests/review-repository.test.ts +52 -1
- package/tests/review-reviewer-evidence.test.ts +183 -0
- package/tests/review-risk-assessment.test.ts +74 -3
- package/tests/review-session-standing-permission-controller.test.ts +21 -1
- package/tests/review-sidebar-state.test.ts +5 -5
- package/tests/review-start-context.test.ts +19 -0
- package/tests/review-tool-prose-budget.test.ts +121 -0
- package/tests/run-test-suite.test.ts +183 -6
- package/tests/runtime-harness.mjs +4 -1
- package/tests/sensitive-path-tools.test.ts +250 -0
- package/tests/session-profile-append-controller-pi.test.ts +60 -31
- package/tests/session-profile-append-controller.test.ts +63 -0
- package/tests/session-profile-authority.test.ts +259 -0
- package/tests/session-profile-binding.test.ts +34 -1
- package/tests/session-profile-disk-reader-pi.test.ts +58 -16
- package/tests/session-profile-extension.test.ts +615 -0
- package/tests/session-profile-freeze.test.ts +110 -2
- package/tests/session-profile-integration.test.ts +857 -0
- package/tests/session-profile-persistence.test.ts +57 -0
- package/tests/session-profile-v1-compat.test.ts +255 -0
- package/tests/shell-bar.test.ts +274 -72
- package/tests/shell-card.test.ts +13 -1
- package/tests/shell-page.test.ts +108 -0
- package/tests/shell-panel.test.ts +360 -0
- package/tests/shell-prompt.test.ts +54 -0
- package/tests/shell-render-cache.test.ts +5 -0
- package/tests/shell-sidebar-fullscreen.test.ts +13 -1
- package/tests/shell-sidebar-layout.test.ts +447 -44
- package/tests/shell-sidebar-scroll-benchmark.test.ts +1 -1
- package/tests/shell-stats.test.ts +90 -0
- package/tests/shell-surface-transparent.test.ts +89 -0
- package/tests/shell-todo.test.ts +12 -0
- package/tests/shell-usage.test.ts +14 -0
- package/tests/skill-registry.test.ts +902 -2
- package/tests/star-prompt.test.ts +470 -0
- package/tests/startup-banner.test.ts +209 -2
- package/tests/startup-home-repo.test.ts +2 -0
- package/tests/support/review-coordinator-runtime.ts +69 -0
- package/tests/task-size-routing-contract.test.ts +50 -4
- package/tests/verifier-admission.test.ts +49 -0
- package/tests/verifier-settle-reminder.test.ts +281 -0
- package/tests/verify-first-launch-contract.test.ts +134 -8
- package/tests/verify-installer-tap.test.ts +57 -0
- package/tests/vim-editor-adapter.test.ts +2 -2
- package/tests/visual-customization-policy.test.ts +95 -8
- package/tests/visual-customize-view.test.ts +818 -9
- package/tests/visual-layout-preview.test.ts +42 -0
- package/tests/visual-profiles.test.ts +11 -0
- package/tests/voice-worker.test.ts +73 -2
- package/tests/windows-session-bootstrap.test.ts +105 -2
- package/tests/windows-session-transport.test.ts +126 -0
- package/tests/work-continuity-contract.test.ts +114 -0
- package/tests/writer-feature-document-admission.test.ts +92 -0
- package/tests/writer-surfaces.test.ts +12 -10
- package/tests/yolo-customize.test.ts +57 -15
- package/tests/yolo-mode-runtime.test.ts +4 -2
- package/tests/yolo-mode.test.ts +39 -20
- package/tests/yolo-session-policy.test.ts +270 -1
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
// Lifecycle adapter only: no extension registration, binding publication or UI.
|
|
2
|
+
import {
|
|
3
|
+
createSessionProfileAppendController,
|
|
4
|
+
type SessionProfileAppendOptions,
|
|
5
|
+
type SessionProfileAppendOutcome,
|
|
6
|
+
type SessionProfileAttachment,
|
|
7
|
+
type SessionProfileForkView,
|
|
8
|
+
type SessionProfileForkTarget,
|
|
9
|
+
type SessionProfileForkPreparation,
|
|
10
|
+
type SessionProfileForkHandoff,
|
|
11
|
+
} from "./session-profile-append-controller.ts";
|
|
12
|
+
|
|
13
|
+
export type SessionProfileLifecycleManager = SessionProfileForkView;
|
|
14
|
+
export type SessionProfileLifecycleReason =
|
|
15
|
+
| "startup"
|
|
16
|
+
| "reload"
|
|
17
|
+
| "new"
|
|
18
|
+
| "resume"
|
|
19
|
+
| "fork";
|
|
20
|
+
type Owner = {
|
|
21
|
+
controller: ReturnType<typeof createSessionProfileAppendController>;
|
|
22
|
+
adapter: object;
|
|
23
|
+
attachment?: SessionProfileAttachment;
|
|
24
|
+
preparation?: SessionProfileForkPreparation;
|
|
25
|
+
outgoing?: Transfer;
|
|
26
|
+
pending?: Promise<void>;
|
|
27
|
+
};
|
|
28
|
+
type Transfer = {
|
|
29
|
+
manager: SessionProfileLifecycleManager;
|
|
30
|
+
previousFile?: string;
|
|
31
|
+
targetFile?: string;
|
|
32
|
+
handoff?: SessionProfileForkHandoff;
|
|
33
|
+
};
|
|
34
|
+
type Registry = {
|
|
35
|
+
version: 1;
|
|
36
|
+
owners: WeakMap<object, Owner>;
|
|
37
|
+
transfers: Set<Transfer>;
|
|
38
|
+
};
|
|
39
|
+
// Stable key, explicit protocol: a new implementation must not reset evidence.
|
|
40
|
+
const registryKey = Symbol.for("gentle-pi.session-profile.lifecycle");
|
|
41
|
+
function registry(): Registry {
|
|
42
|
+
const existing = Reflect.get(globalThis, registryKey) as Registry | undefined;
|
|
43
|
+
if (existing) {
|
|
44
|
+
if (
|
|
45
|
+
existing.version !== 1 ||
|
|
46
|
+
!(existing.owners instanceof WeakMap) ||
|
|
47
|
+
!(existing.transfers instanceof Set)
|
|
48
|
+
)
|
|
49
|
+
throw new Error("lifecycle-protocol");
|
|
50
|
+
return existing;
|
|
51
|
+
}
|
|
52
|
+
const value: Registry = {
|
|
53
|
+
version: 1,
|
|
54
|
+
owners: new WeakMap(),
|
|
55
|
+
transfers: new Set(),
|
|
56
|
+
};
|
|
57
|
+
Object.defineProperty(globalThis, registryKey, { value });
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
function unavailable(): SessionProfileAppendOutcome {
|
|
61
|
+
return {
|
|
62
|
+
status: "indeterminate",
|
|
63
|
+
state: { status: "indeterminate", reason: "unavailable-lifecycle" },
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function inactive(): SessionProfileAttachment {
|
|
67
|
+
return {
|
|
68
|
+
bind: unavailable,
|
|
69
|
+
bindStartup: unavailable,
|
|
70
|
+
clear: unavailable,
|
|
71
|
+
refresh: unavailable,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
/** Read/revalidate the existing owner without adopting its adapter identity. */
|
|
75
|
+
export function readCurrentSessionProfileOutcome(
|
|
76
|
+
manager: SessionProfileLifecycleManager,
|
|
77
|
+
): SessionProfileAppendOutcome | undefined {
|
|
78
|
+
try {
|
|
79
|
+
const owner = registry().owners.get(manager);
|
|
80
|
+
return owner ? (owner.attachment?.refresh() ?? unavailable()) : undefined;
|
|
81
|
+
} catch {
|
|
82
|
+
return unavailable();
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** Serialize explicit selections; lifecycle hooks drain this same owner queue.
|
|
87
|
+
* The promise is transient work, not another quarantine or authority store.
|
|
88
|
+
*/
|
|
89
|
+
export async function runCurrentSessionProfileSelection<T>(
|
|
90
|
+
manager: SessionProfileLifecycleManager,
|
|
91
|
+
effect: (
|
|
92
|
+
attachment: SessionProfileAttachment,
|
|
93
|
+
current: () => boolean,
|
|
94
|
+
) => Promise<T>,
|
|
95
|
+
): Promise<T | undefined> {
|
|
96
|
+
let owner: Owner | undefined;
|
|
97
|
+
try {
|
|
98
|
+
owner = registry().owners.get(manager);
|
|
99
|
+
} catch {
|
|
100
|
+
// An incompatible registry has no authority to select against.
|
|
101
|
+
return undefined;
|
|
102
|
+
}
|
|
103
|
+
if (!owner?.attachment) return undefined;
|
|
104
|
+
const attachment = owner.attachment,
|
|
105
|
+
adapter = owner.adapter;
|
|
106
|
+
const id = manager.getSessionId(),
|
|
107
|
+
file = manager.getSessionFile();
|
|
108
|
+
const current = () =>
|
|
109
|
+
registry().owners.get(manager) === owner &&
|
|
110
|
+
owner.adapter === adapter &&
|
|
111
|
+
owner.attachment === attachment &&
|
|
112
|
+
manager.getSessionId() === id &&
|
|
113
|
+
manager.getSessionFile() === file;
|
|
114
|
+
const operation = (owner.pending ?? Promise.resolve()).then(() =>
|
|
115
|
+
current() ? effect(attachment, current) : undefined,
|
|
116
|
+
);
|
|
117
|
+
const pending = operation.then(
|
|
118
|
+
() => {},
|
|
119
|
+
() => {},
|
|
120
|
+
);
|
|
121
|
+
owner.pending = pending;
|
|
122
|
+
try {
|
|
123
|
+
return await operation;
|
|
124
|
+
} finally {
|
|
125
|
+
if (owner.pending === pending) owner.pending = undefined;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/** Whether an Enter selection is still settling, so callers wait only when needed.
|
|
130
|
+
* A registry protocol failure means nothing of ours is pending.
|
|
131
|
+
*/
|
|
132
|
+
export function hasPendingSessionProfileSelection(
|
|
133
|
+
manager: SessionProfileLifecycleManager,
|
|
134
|
+
): boolean {
|
|
135
|
+
try {
|
|
136
|
+
return registry().owners.get(manager)?.pending !== undefined;
|
|
137
|
+
} catch {
|
|
138
|
+
return false;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/** Await before fork-copy/tree movement and before detach/invalidation. */
|
|
143
|
+
export async function waitCurrentSessionProfileSelection(
|
|
144
|
+
manager: SessionProfileLifecycleManager,
|
|
145
|
+
): Promise<void> {
|
|
146
|
+
try {
|
|
147
|
+
let pending: Promise<void> | undefined;
|
|
148
|
+
while ((pending = registry().owners.get(manager)?.pending)) await pending;
|
|
149
|
+
} catch {
|
|
150
|
+
// Protocol failure: there is no owner queue of ours to drain.
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/** The registry retains controller evidence, never old ctx/pi or append handles.
|
|
155
|
+
* Manager identity covers same-process reload only. Replacements require an
|
|
156
|
+
* exact, uniquely matched confirmed handoff; paths alone never restore binding.
|
|
157
|
+
*/
|
|
158
|
+
export function createSessionProfileIntegration(
|
|
159
|
+
options: SessionProfileAppendOptions = {},
|
|
160
|
+
) {
|
|
161
|
+
const identity = {};
|
|
162
|
+
function owned(manager: SessionProfileLifecycleManager): Owner | undefined {
|
|
163
|
+
const owner = registry().owners.get(manager);
|
|
164
|
+
return owner?.adapter === identity ? owner : undefined;
|
|
165
|
+
}
|
|
166
|
+
function forget(owner: Owner) {
|
|
167
|
+
if (owner.outgoing) registry().transfers.delete(owner.outgoing);
|
|
168
|
+
owner.outgoing = undefined;
|
|
169
|
+
}
|
|
170
|
+
return {
|
|
171
|
+
isCurrent(manager: SessionProfileLifecycleManager): boolean {
|
|
172
|
+
return owned(manager)?.attachment !== undefined;
|
|
173
|
+
},
|
|
174
|
+
start(
|
|
175
|
+
manager: SessionProfileLifecycleManager,
|
|
176
|
+
append: (type: string, data: unknown) => void,
|
|
177
|
+
event: {
|
|
178
|
+
reason: SessionProfileLifecycleReason;
|
|
179
|
+
previousSessionFile?: string;
|
|
180
|
+
},
|
|
181
|
+
) {
|
|
182
|
+
let owner: Owner | undefined;
|
|
183
|
+
try {
|
|
184
|
+
const store = registry();
|
|
185
|
+
owner = store.owners.get(manager);
|
|
186
|
+
if (!owner) {
|
|
187
|
+
owner = {
|
|
188
|
+
controller: createSessionProfileAppendController(
|
|
189
|
+
manager,
|
|
190
|
+
append,
|
|
191
|
+
options,
|
|
192
|
+
),
|
|
193
|
+
adapter: identity,
|
|
194
|
+
};
|
|
195
|
+
store.owners.set(manager, owner);
|
|
196
|
+
}
|
|
197
|
+
owner.controller.detach();
|
|
198
|
+
owner.adapter = identity;
|
|
199
|
+
owner.preparation = undefined;
|
|
200
|
+
const location = {
|
|
201
|
+
sessionId: manager.getSessionId(),
|
|
202
|
+
sessionFile: manager.getSessionFile(),
|
|
203
|
+
};
|
|
204
|
+
let handoff: SessionProfileForkHandoff | undefined;
|
|
205
|
+
if (event.reason === "fork") {
|
|
206
|
+
const candidates = [...store.transfers].filter(
|
|
207
|
+
(t) =>
|
|
208
|
+
t.previousFile === event.previousSessionFile &&
|
|
209
|
+
t.targetFile === location.sessionFile &&
|
|
210
|
+
(location.sessionFile !== undefined || t.manager === manager),
|
|
211
|
+
);
|
|
212
|
+
// Consume even a conflicting match so later starts cannot retry it.
|
|
213
|
+
for (const candidate of candidates) store.transfers.delete(candidate);
|
|
214
|
+
if (candidates.length === 1) handoff = candidates[0].handoff;
|
|
215
|
+
}
|
|
216
|
+
forget(owner);
|
|
217
|
+
owner.attachment = owner.controller.attach(
|
|
218
|
+
manager,
|
|
219
|
+
append,
|
|
220
|
+
{
|
|
221
|
+
reason: event.reason,
|
|
222
|
+
previousSessionFile: event.previousSessionFile,
|
|
223
|
+
...(handoff ? { fork: { handoff, publicView: manager } } : {}),
|
|
224
|
+
},
|
|
225
|
+
options,
|
|
226
|
+
);
|
|
227
|
+
const outcome = owner.attachment.refresh();
|
|
228
|
+
const stable =
|
|
229
|
+
manager.getSessionId() === location.sessionId &&
|
|
230
|
+
manager.getSessionFile() === location.sessionFile;
|
|
231
|
+
return {
|
|
232
|
+
attachment: owner.attachment,
|
|
233
|
+
outcome: stable ? outcome : unavailable(),
|
|
234
|
+
scope: location,
|
|
235
|
+
};
|
|
236
|
+
} catch {
|
|
237
|
+
owner?.controller.detach();
|
|
238
|
+
if (owner) owner.attachment = undefined;
|
|
239
|
+
return { attachment: inactive(), outcome: unavailable(), scope: undefined };
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
beforeFork(
|
|
243
|
+
manager: SessionProfileLifecycleManager,
|
|
244
|
+
target: SessionProfileForkTarget,
|
|
245
|
+
) {
|
|
246
|
+
try {
|
|
247
|
+
const owner = owned(manager);
|
|
248
|
+
if (!owner?.attachment)
|
|
249
|
+
return {
|
|
250
|
+
status: "indeterminate" as const,
|
|
251
|
+
reason: "unavailable-lifecycle",
|
|
252
|
+
};
|
|
253
|
+
forget(owner);
|
|
254
|
+
const result = owner.controller.captureForkEvidence(target, manager);
|
|
255
|
+
owner.preparation =
|
|
256
|
+
result.status === "captured" ? result.evidence : undefined;
|
|
257
|
+
return result;
|
|
258
|
+
} catch {
|
|
259
|
+
return {
|
|
260
|
+
status: "indeterminate" as const,
|
|
261
|
+
reason: "unavailable-lifecycle",
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
shutdown(
|
|
266
|
+
manager: SessionProfileLifecycleManager,
|
|
267
|
+
event: {
|
|
268
|
+
reason: SessionProfileLifecycleReason | "quit";
|
|
269
|
+
targetSessionFile?: string;
|
|
270
|
+
},
|
|
271
|
+
) {
|
|
272
|
+
try {
|
|
273
|
+
const owner = owned(manager);
|
|
274
|
+
if (!owner) return;
|
|
275
|
+
forget(owner);
|
|
276
|
+
const previousFile = manager.getSessionFile();
|
|
277
|
+
const handoff = owner.controller.detach({
|
|
278
|
+
reason: event.reason === "startup" ? "quit" : event.reason,
|
|
279
|
+
targetSessionFile: event.targetSessionFile,
|
|
280
|
+
preparation: owner.preparation,
|
|
281
|
+
});
|
|
282
|
+
owner.attachment = undefined;
|
|
283
|
+
owner.preparation = undefined;
|
|
284
|
+
if (event.reason === "fork") {
|
|
285
|
+
const transfer = {
|
|
286
|
+
manager,
|
|
287
|
+
previousFile,
|
|
288
|
+
targetFile: event.targetSessionFile,
|
|
289
|
+
handoff,
|
|
290
|
+
};
|
|
291
|
+
registry().transfers.add(transfer);
|
|
292
|
+
owner.outgoing = transfer;
|
|
293
|
+
}
|
|
294
|
+
} catch {
|
|
295
|
+
// Cleanup still revokes capabilities when observing the transition fails.
|
|
296
|
+
try {
|
|
297
|
+
const owner = owned(manager);
|
|
298
|
+
owner?.controller.detach();
|
|
299
|
+
if (owner) owner.attachment = undefined;
|
|
300
|
+
} catch {
|
|
301
|
+
/* Protocol itself is unavailable. */
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
tree(manager: SessionProfileLifecycleManager): SessionProfileAppendOutcome {
|
|
306
|
+
try {
|
|
307
|
+
return owned(manager)?.attachment?.refresh() ?? unavailable();
|
|
308
|
+
} catch {
|
|
309
|
+
return unavailable();
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
};
|
|
313
|
+
}
|
|
@@ -4,6 +4,7 @@ import { isValidProfileName } from "./agent-profiles.ts";
|
|
|
4
4
|
import {
|
|
5
5
|
isSafeAgentName,
|
|
6
6
|
isThinkingLevel,
|
|
7
|
+
isServiceTier,
|
|
7
8
|
normalizeModelId,
|
|
8
9
|
normalizeRoutingEntry,
|
|
9
10
|
type AgentModelConfig,
|
|
@@ -27,16 +28,30 @@ export function isSessionProfileFamilyEntry(entry: unknown): boolean {
|
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
export type SessionProfileOrigin = "user" | "local" | "repo" | "global";
|
|
31
|
+
export type SessionProfileStartupOrigin = Exclude<SessionProfileOrigin, "user">;
|
|
32
|
+
|
|
33
|
+
/** The profile a session took at startup, with the layer that supplied it. */
|
|
34
|
+
export interface SessionProfileStartupProfile {
|
|
35
|
+
origin: SessionProfileStartupOrigin;
|
|
36
|
+
name: string;
|
|
37
|
+
modelProfiles: AgentModelConfig;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** A known startup state (gentle-shell#2742, section 3): a profile, or none in any layer. */
|
|
41
|
+
export type SessionProfileStartupState = SessionProfileStartupProfile | "none";
|
|
30
42
|
|
|
31
43
|
export interface SessionProfileBindPayload {
|
|
32
44
|
kind: "bind";
|
|
33
45
|
origin: SessionProfileOrigin;
|
|
34
46
|
name: string;
|
|
35
47
|
modelProfiles: AgentModelConfig;
|
|
48
|
+
/** Only on an explicit choice (`origin: "user"`); a startup record is its own startup state. */
|
|
49
|
+
startup?: SessionProfileStartupState;
|
|
36
50
|
}
|
|
37
51
|
|
|
38
52
|
export interface SessionProfileClearPayload {
|
|
39
53
|
kind: "clear";
|
|
54
|
+
startup?: "none";
|
|
40
55
|
}
|
|
41
56
|
|
|
42
57
|
/** Public structural entry shape only; ordinary messages need no custom fields. */
|
|
@@ -49,7 +64,7 @@ export interface SessionProfileEntry {
|
|
|
49
64
|
export type SessionProfileReadResult =
|
|
50
65
|
| { status: "absent" }
|
|
51
66
|
| { status: "bound"; binding: SessionProfileBindPayload }
|
|
52
|
-
| { status: "cleared" }
|
|
67
|
+
| { status: "cleared"; startup?: "none" }
|
|
53
68
|
| { status: "invalid" }
|
|
54
69
|
| { status: "unsupported" };
|
|
55
70
|
|
|
@@ -69,7 +84,12 @@ function hasOwn(value: Record<string, unknown>, key: string): boolean {
|
|
|
69
84
|
|
|
70
85
|
function isOrigin(value: unknown): value is SessionProfileOrigin {
|
|
71
86
|
return (
|
|
72
|
-
value === "user" ||
|
|
87
|
+
value === "user" || isStartupOrigin(value)
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function isStartupOrigin(value: unknown): value is SessionProfileStartupOrigin {
|
|
92
|
+
return (
|
|
73
93
|
value === "local" ||
|
|
74
94
|
value === "repo" ||
|
|
75
95
|
value === "global"
|
|
@@ -89,7 +109,7 @@ function readRoute(
|
|
|
89
109
|
? Object.fromEntries(
|
|
90
110
|
Object.entries(value).filter(
|
|
91
111
|
([key, field]) =>
|
|
92
|
-
!((key === "model" || key === "thinking") && field === undefined),
|
|
112
|
+
!((key === "model" || key === "thinking" || key === "tier") && field === undefined),
|
|
93
113
|
),
|
|
94
114
|
)
|
|
95
115
|
: value;
|
|
@@ -99,10 +119,12 @@ function readRoute(
|
|
|
99
119
|
return undefined;
|
|
100
120
|
if (hasOwn(route, "effort") && !isThinkingLevel(route.effort))
|
|
101
121
|
return undefined;
|
|
122
|
+
if (hasOwn(route, "tier") && !isServiceTier(route.tier))
|
|
123
|
+
return undefined;
|
|
102
124
|
// Project only own known fields. Unknown extras, even an unknown-only route,
|
|
103
125
|
// carry no routing meaning. Thinking wins over legacy effort as elsewhere.
|
|
104
126
|
const known = Object.fromEntries(
|
|
105
|
-
["model", "thinking", "effort"]
|
|
127
|
+
["model", "thinking", "effort", "tier"]
|
|
106
128
|
.filter((key) => hasOwn(route, key))
|
|
107
129
|
.map((key) => [key, route[key]]),
|
|
108
130
|
);
|
|
@@ -140,21 +162,52 @@ function readBind(
|
|
|
140
162
|
if (!isOrigin(data.origin) || !isValidProfileName(data.name)) return undefined;
|
|
141
163
|
const modelProfiles = readSnapshot(data.modelProfiles, encoderInput);
|
|
142
164
|
if (modelProfiles === undefined) return undefined;
|
|
143
|
-
|
|
165
|
+
const binding: SessionProfileBindPayload = { kind: "bind", origin: data.origin, name: data.name, modelProfiles };
|
|
166
|
+
if (data.origin !== "user" || !hasOwn(data, "startup")) return binding;
|
|
167
|
+
// Older readers ignore the startup state, so a malformed one only leaves it
|
|
168
|
+
// unknown: it never invalidates the selection the record routes.
|
|
169
|
+
const startup = readStartup(data.startup, encoderInput);
|
|
170
|
+
return startup === undefined ? binding : { ...binding, startup };
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
function readStartup(
|
|
174
|
+
value: unknown,
|
|
175
|
+
encoderInput = false,
|
|
176
|
+
): SessionProfileStartupState | undefined {
|
|
177
|
+
if (value === "none") return "none";
|
|
178
|
+
if (!isRecord(value) || !isStartupOrigin(value.origin)) return undefined;
|
|
179
|
+
const binding = readBind({ origin: value.origin, name: value.name, modelProfiles: value.modelProfiles }, encoderInput);
|
|
180
|
+
return binding && { origin: value.origin, name: binding.name, modelProfiles: binding.modelProfiles };
|
|
144
181
|
}
|
|
145
182
|
|
|
146
183
|
/** Create a detached user selection payload; never appends or claims durability. */
|
|
147
184
|
export function createSessionProfileBind(
|
|
148
185
|
name: string,
|
|
149
186
|
modelProfiles: AgentModelConfig,
|
|
187
|
+
startup?: SessionProfileStartupState,
|
|
150
188
|
): SessionProfileBindPayload {
|
|
151
189
|
const binding = readBind({ origin: "user", name, modelProfiles }, true);
|
|
152
190
|
if (!binding) throw new TypeError("Invalid session profile binding");
|
|
153
|
-
return binding;
|
|
191
|
+
if (startup === undefined) return binding;
|
|
192
|
+
const state = readStartup(startup, true);
|
|
193
|
+
if (state === undefined) throw new TypeError("Invalid session profile startup state");
|
|
194
|
+
return { ...binding, startup: state };
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/** Create a detached startup record: the full normalized definition, orchestrator included. */
|
|
198
|
+
export function createSessionProfileStartupBind(
|
|
199
|
+
origin: SessionProfileStartupOrigin,
|
|
200
|
+
name: string,
|
|
201
|
+
modelProfiles: AgentModelConfig,
|
|
202
|
+
): SessionProfileBindPayload {
|
|
203
|
+
const startup = isStartupOrigin(origin) ? readStartup({ origin, name, modelProfiles }, true) : undefined;
|
|
204
|
+
if (typeof startup !== "object") throw new TypeError("Invalid session profile startup binding");
|
|
205
|
+
return { kind: "bind", ...startup };
|
|
154
206
|
}
|
|
155
207
|
|
|
156
|
-
|
|
157
|
-
|
|
208
|
+
/** A legacy clear, or with `"none"` the record of a session started without a profile. */
|
|
209
|
+
export function createSessionProfileClear(startup?: "none"): SessionProfileClearPayload {
|
|
210
|
+
return startup === "none" ? { kind: "clear", startup } : { kind: "clear" };
|
|
158
211
|
}
|
|
159
212
|
|
|
160
213
|
/** Unknown family identifiers are terminal unsupported states, regardless of data. */
|
|
@@ -166,7 +219,8 @@ export function readSessionProfileEntry(
|
|
|
166
219
|
return { status: "unsupported" };
|
|
167
220
|
const data = entry.data;
|
|
168
221
|
if (!isRecord(data) || !hasOwn(data, "kind")) return { status: "invalid" };
|
|
169
|
-
if (data.kind === "clear")
|
|
222
|
+
if (data.kind === "clear")
|
|
223
|
+
return data.startup === "none" ? { status: "cleared", startup: "none" } : { status: "cleared" };
|
|
170
224
|
if (data.kind !== "bind") return { status: "invalid" };
|
|
171
225
|
const binding = readBind(data);
|
|
172
226
|
return binding ? { status: "bound", binding } : { status: "invalid" };
|