@timurproko/a1 0.1.8-dev.235df0e → 0.1.8-dev.259
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 +107 -67
- package/bin/cli.js +28 -10
- package/bin/guardian.js +8 -3
- package/bin/module-identity.js +69 -35
- package/bin/pi-tui.d.ts +6 -0
- package/bin/pi-tui.js +28 -0
- package/bin/release-cleanup.js +8 -0
- package/bin/supervisor.js +2 -2
- package/bin/sync-pi-tui-proxy.js +97 -0
- package/bin/ui.js +47 -20
- package/bin/warmup.js +27 -0
- package/dist/cli/capabilities.d.ts +6 -0
- package/dist/{src/cli → cli}/capabilities.js +1 -1
- package/dist/{src/cli → cli}/dispatch.d.ts +15 -1
- package/dist/cli/dispatch.js +261 -0
- package/dist/cli/package-messages.d.ts +26 -0
- package/dist/cli/package-messages.js +71 -0
- package/dist/{src/cli → cli}/packages.d.ts +11 -2
- package/dist/{src/cli → cli}/packages.js +24 -27
- package/dist/{src/cli → cli}/version-stats.d.ts +6 -0
- package/dist/cli/version-stats.js +112 -0
- package/dist/composition/agent-engine-bridge.d.ts +3 -0
- package/dist/composition/agent-engine-bridge.js +108 -0
- package/dist/composition/index.d.ts +3 -0
- package/dist/composition/index.js +3 -0
- package/dist/composition/owned-ui.d.ts +31 -0
- package/dist/composition/owned-ui.js +66 -0
- package/dist/composition/process.d.ts +16 -0
- package/dist/composition/process.js +45 -0
- package/dist/composition/settings-route-host.d.ts +8 -0
- package/dist/composition/settings-route-host.js +75 -0
- package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/capability-ports.d.ts +2 -2
- package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/domain-validation.js +22 -4
- package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/domain.d.ts +17 -0
- package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/package-ports.d.ts +6 -0
- package/dist/{src/foundation/owned-ui-contracts → contracts/owned-ui}/model.d.ts +36 -0
- package/dist/{src/foundation/owned-ui-contracts → contracts/owned-ui}/validation.js +25 -0
- package/dist/{src/features → features}/launch/development-launch.js +11 -3
- package/dist/{src/features → features}/launch/index.d.ts +0 -1
- package/dist/{src/features → features}/launch/index.js +0 -1
- package/dist/features/launch/intent.d.ts +10 -0
- package/dist/features/launch/intent.js +8 -0
- package/dist/{src/features → features}/launch/prepare-launch.d.ts +0 -2
- package/dist/{src/features → features}/launch/prepare-launch.js +2 -9
- package/dist/{src/features → features}/launch/profile-paths.d.ts +1 -2
- package/dist/{src/features → features}/launch/profile-paths.js +2 -8
- package/dist/{src/features → features}/launch/runtime-selection.d.ts +2 -5
- package/dist/{src/features → features}/owned-ui/customization.d.ts +3 -1
- package/dist/{src/features → features}/owned-ui/customization.js +3 -1
- package/dist/{src/features → features}/owned-ui/diagnostics.d.ts +2 -1
- package/dist/{src/features → features}/owned-ui/diagnostics.js +1 -0
- package/dist/{src/features → features}/owned-ui/index.d.ts +2 -0
- package/dist/{src/features → features}/owned-ui/index.js +2 -0
- package/dist/features/owned-ui/project-trust-prompt.d.ts +25 -0
- package/dist/features/owned-ui/project-trust-prompt.js +149 -0
- package/dist/{src/features → features}/owned-ui/run.d.ts +2 -2
- package/dist/{src/features → features}/owned-ui/run.js +2 -0
- package/dist/features/owned-ui/session-fork-prompt.d.ts +8 -0
- package/dist/features/owned-ui/session-fork-prompt.js +34 -0
- package/dist/{src/features → features}/owned-ui/settings-app.d.ts +3 -3
- package/dist/{src/features → features}/owned-ui/settings-app.js +103 -54
- package/dist/{src/features → features}/workspace/capabilities.d.ts +1 -1
- package/dist/{src/features → features}/workspace/reducer.d.ts +2 -1
- package/dist/{src/features → features}/workspace/reducer.js +2 -1
- package/dist/{src/features → features}/workspace/router.d.ts +2 -1
- package/dist/{src/features → features}/workspace/router.js +1 -0
- package/dist/{src/features → features}/workspace/store.d.ts +2 -1
- package/dist/{src/features → features}/workspace/store.js +1 -0
- package/dist/{src/foundation → foundation}/launch-guardian/main.d.ts +2 -0
- package/dist/{src/foundation → foundation}/launch-guardian/main.js +18 -5
- package/dist/{src/foundation → foundation}/lifecycle/index.d.ts +2 -0
- package/dist/{src/foundation → foundation}/lifecycle/index.js +2 -0
- package/dist/{src/foundation → foundation}/lifecycle/model.d.ts +1 -1
- package/dist/{src/foundation → foundation}/lifecycle/model.js +1 -1
- package/dist/foundation/lifecycle/paths.d.ts +30 -0
- package/dist/{src/foundation → foundation}/lifecycle/paths.js +29 -1
- package/dist/foundation/lifecycle/session-selection.d.ts +9 -0
- package/dist/foundation/lifecycle/session-selection.js +39 -0
- package/dist/foundation/lifecycle/supervisor-startup.d.ts +30 -0
- package/dist/foundation/lifecycle/supervisor-startup.js +106 -0
- package/dist/{src/foundation → foundation}/native-host-protocol/codec.d.ts +2 -0
- package/dist/{src/foundation → foundation}/native-host-protocol/codec.js +2 -0
- package/dist/{src/foundation → foundation}/native-host-protocol/messages.d.ts +1 -1
- package/dist/{src/foundation → foundation}/native-host-protocol/messages.js +1 -1
- package/dist/foundation/process-containment/darwin-process-inspector.d.ts +5 -0
- package/dist/foundation/process-containment/darwin-process-inspector.js +7 -0
- package/dist/{src/foundation → foundation}/process-containment/index.d.ts +1 -0
- package/dist/{src/foundation → foundation}/process-containment/index.js +1 -0
- package/dist/{src/foundation → foundation}/process-containment/linux-process-inspector.d.ts +1 -0
- package/dist/{src/foundation → foundation}/process-containment/linux-process-inspector.js +1 -0
- package/dist/{src/foundation → foundation}/process-containment/native-guardian-containment.d.ts +1 -0
- package/dist/{src/foundation → foundation}/process-containment/native-guardian-containment.js +1 -0
- package/dist/{src/foundation → foundation}/process-containment/windows-process-inspector.d.ts +3 -1
- package/dist/{src/foundation → foundation}/process-containment/windows-process-inspector.js +5 -2
- package/dist/{src/foundation → foundation}/protocol/client.d.ts +1 -0
- package/dist/{src/foundation → foundation}/protocol/client.js +1 -0
- package/dist/{src/foundation → foundation}/protocol/messages.d.ts +1 -0
- package/dist/{src/foundation → foundation}/protocol/messages.js +1 -0
- package/dist/{src/foundation → foundation}/release/bootstrap.d.ts +23 -6
- package/dist/{src/foundation → foundation}/release/bootstrap.js +120 -34
- package/dist/foundation/release/cohort-state.d.ts +156 -0
- package/dist/foundation/release/cohort-state.js +471 -0
- package/dist/foundation/release/dependency-layer.d.ts +78 -0
- package/dist/foundation/release/dependency-layer.js +488 -0
- package/dist/foundation/release/endpoints.d.ts +20 -0
- package/dist/foundation/release/endpoints.js +50 -0
- package/dist/foundation/release/immutable-platform.d.ts +6 -0
- package/dist/foundation/release/immutable-platform.js +13 -0
- package/dist/{src/foundation → foundation}/release/index.d.ts +4 -0
- package/dist/{src/foundation → foundation}/release/index.js +4 -0
- package/dist/foundation/release/release-gc.d.ts +71 -0
- package/dist/foundation/release/release-gc.js +734 -0
- package/dist/{src/foundation → foundation}/release/release-store.d.ts +4 -2
- package/dist/{src/foundation → foundation}/release/release-store.js +64 -12
- package/dist/{src/foundation → foundation}/release/release.d.ts +4 -1
- package/dist/{src/foundation → foundation}/release/release.js +10 -3
- package/dist/foundation/release/restart-certification.d.ts +67 -0
- package/dist/foundation/release/restart-certification.js +211 -0
- package/dist/{src/foundation → foundation}/release/update-transaction.d.ts +1 -0
- package/dist/{src/foundation → foundation}/release/update-transaction.js +1 -0
- package/dist/{src/foundation → foundation}/release/update.d.ts +19 -3
- package/dist/{src/foundation → foundation}/release/update.js +116 -56
- package/dist/foundation/release/warmup.d.ts +3 -0
- package/dist/foundation/release/warmup.js +35 -0
- package/dist/foundation/startup/index.d.ts +1 -0
- package/dist/foundation/startup/index.js +1 -0
- package/dist/foundation/startup/startup-runtime.d.ts +36 -0
- package/dist/foundation/startup/startup-runtime.js +140 -0
- package/dist/{src/foundation → foundation}/storage/control-store.d.ts +2 -1
- package/dist/{src/foundation → foundation}/storage/control-store.js +39 -4
- package/dist/{src/foundation → foundation}/structured-agent-runtime/backpressure.d.ts +2 -1
- package/dist/{src/foundation → foundation}/structured-agent-runtime/backpressure.js +2 -1
- package/dist/{src/foundation → foundation}/structured-agent-runtime/commands.d.ts +2 -1
- package/dist/{src/foundation → foundation}/structured-agent-runtime/commands.js +2 -1
- package/dist/{src/foundation → foundation}/structured-agent-runtime/handshake.d.ts +1 -1
- package/dist/{src/foundation → foundation}/structured-agent-runtime/handshake.js +1 -1
- package/dist/{src/foundation → foundation}/structured-agent-runtime/reconnection.d.ts +2 -1
- package/dist/{src/foundation → foundation}/structured-agent-runtime/reconnection.js +2 -1
- package/dist/{src/foundation → foundation}/structured-agent-runtime/state.d.ts +2 -1
- package/dist/{src/foundation → foundation}/structured-agent-runtime/state.js +2 -1
- package/dist/foundation/supervision/index.d.ts +3 -0
- package/dist/foundation/supervision/index.js +3 -0
- package/dist/foundation/supervision/main.d.ts +1 -0
- package/dist/foundation/supervision/main.js +77 -0
- package/dist/foundation/supervision/paths.d.ts +1 -0
- package/dist/foundation/supervision/paths.js +1 -0
- package/dist/{src/foundation → foundation}/supervision/server.d.ts +19 -1
- package/dist/{src/foundation → foundation}/supervision/server.js +65 -3
- package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/components.d.ts +1 -1
- package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/conformance.d.ts +1 -0
- package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/conformance.js +3 -2
- package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/index.d.ts +1 -1
- package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/index.js +1 -1
- package/dist/integrations/pi/components/owned-editor-ux.d.ts +55 -0
- package/dist/integrations/pi/components/owned-editor-ux.js +778 -0
- package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/shell-components.d.ts +1 -0
- package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/shell-components.js +1 -0
- package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/shell-editor-autocomplete.js +54 -6
- package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/shell-extension-ui.d.ts +1 -1
- package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/shell-footer-status.d.ts +3 -3
- package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/shell-footer-status.js +49 -18
- package/dist/integrations/pi/components/shell-presenters-info.d.ts +36 -0
- package/dist/integrations/pi/components/shell-presenters-info.js +78 -0
- package/dist/integrations/pi/components/shell-presenters-transcript.d.ts +25 -0
- package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/shell-presenters-transcript.js +92 -131
- package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/shell-selectors-dialogs.d.ts +5 -2
- package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/shell-selectors-dialogs.js +2 -1
- package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/shell-shared-facade.d.ts +57 -8
- package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/shell-shared-facade.js +4 -2
- package/dist/integrations/pi/components/submitted-prompt-adapter.d.ts +13 -0
- package/dist/integrations/pi/components/submitted-prompt-adapter.js +27 -0
- package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/adjacent/core/keybindings.d.ts +10 -2
- package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/adjacent/core/keybindings.js +36 -3
- package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/session-footer.d.ts +1 -1
- package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/adapter.d.ts +28 -4
- package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/adapter.js +714 -127
- package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/conformance.d.ts +2 -0
- package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/conformance.js +4 -2
- package/dist/integrations/pi/engine/http-dispatcher.d.ts +4 -0
- package/dist/integrations/pi/engine/http-dispatcher.js +25 -0
- package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/index.d.ts +4 -0
- package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/index.js +4 -0
- package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/model-auth-integration.d.ts +2 -1
- package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/model-auth-integration.js +1 -0
- package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/package-integration.d.ts +1 -1
- package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/package-integration.js +32 -26
- package/dist/integrations/pi/engine/project-trust-preflight.d.ts +22 -0
- package/dist/integrations/pi/engine/project-trust-preflight.js +50 -0
- package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/resource-extension-integration.d.ts +2 -1
- package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/resource-extension-integration.js +1 -0
- package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/runtime-integration.d.ts +19 -1
- package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/runtime-integration.js +47 -5
- package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/session-integration.d.ts +4 -2
- package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/session-integration.js +19 -4
- package/dist/integrations/pi/engine/session-selection.d.ts +28 -0
- package/dist/integrations/pi/engine/session-selection.js +90 -0
- package/dist/integrations/pi/engine/settings-effects.d.ts +66 -0
- package/dist/integrations/pi/engine/settings-effects.js +249 -0
- package/dist/integrations/pi/engine/settings-integration.d.ts +43 -0
- package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/settings-integration.js +102 -108
- package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/workflow-controllers.d.ts +3 -2
- package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/workflow-controllers.js +1 -0
- package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/workflows.d.ts +18 -1
- package/dist/integrations/pi/session-ui/clipboard-image.d.ts +11 -0
- package/dist/integrations/pi/session-ui/clipboard-image.js +29 -0
- package/dist/{src/foundation/pi-owned-ui-integration → integrations/pi/session-ui}/index.d.ts +1 -0
- package/dist/{src/foundation/pi-owned-ui-integration → integrations/pi/session-ui}/index.js +1 -0
- package/dist/integrations/pi/session-ui/prompt-chips.d.ts +23 -0
- package/dist/integrations/pi/session-ui/prompt-chips.js +246 -0
- package/dist/integrations/pi/session-ui/route-host.d.ts +5 -0
- package/dist/integrations/pi/session-ui/session-shell-root.d.ts +141 -0
- package/dist/integrations/pi/session-ui/session-shell-root.js +1158 -0
- package/dist/integrations/pi/session-ui/session-shell.d.ts +55 -0
- package/dist/{src/foundation/pi-owned-ui-integration → integrations/pi/session-ui}/session-shell.js +479 -719
- package/dist/integrations/pi/session-ui/session-viewport-controller.d.ts +45 -0
- package/dist/integrations/pi/session-ui/session-viewport-controller.js +463 -0
- package/dist/integrations/pi/session-ui/stream-presentation-coalescer.d.ts +29 -0
- package/dist/integrations/pi/session-ui/stream-presentation-coalescer.js +79 -0
- package/dist/integrations/pi/session-ui/system-clipboard.d.ts +20 -0
- package/dist/integrations/pi/session-ui/system-clipboard.js +130 -0
- package/dist/{src/foundation/pi-tui-runtime-adapter → integrations/pi/tui-runtime}/adapter.d.ts +8 -1
- package/dist/{src/foundation/pi-tui-runtime-adapter → integrations/pi/tui-runtime}/adapter.js +216 -9
- package/dist/{src/foundation/pi-tui-runtime-adapter → integrations/pi/tui-runtime}/contracts.d.ts +29 -6
- package/dist/integrations/pi/tui-runtime/damage-aware-terminal.d.ts +74 -0
- package/dist/integrations/pi/tui-runtime/damage-aware-terminal.js +380 -0
- package/dist/{src/foundation/pi-tui-runtime-adapter → integrations/pi/tui-runtime}/index.d.ts +2 -0
- package/dist/{src/foundation/pi-tui-runtime-adapter → integrations/pi/tui-runtime}/index.js +2 -0
- package/dist/integrations/pi/tui-runtime/input-presentation-coordinator.d.ts +39 -0
- package/dist/integrations/pi/tui-runtime/input-presentation-coordinator.js +139 -0
- package/dist/{src/foundation/pi-tui-runtime-adapter → integrations/pi/tui-runtime}/presentation-adapter.d.ts +1 -1
- package/dist/native/darwin-arm64/manifest.json +4 -4
- package/dist/native/darwin-arm64/process-guardian +0 -0
- package/dist/native/linux-x64/manifest.json +3 -3
- package/dist/native/linux-x64/process-guardian +0 -0
- package/dist/native/win32-x64/manifest.json +3 -3
- package/dist/native/win32-x64/process-guardian.exe +0 -0
- package/dist/{src/product-identity.d.ts → product-identity.d.ts} +3 -3
- package/dist/{src/product-identity.js → product-identity.js} +7 -5
- package/dist/{src/product-identity.json → product-identity.json} +11 -6
- package/dist/runtime-payload-inventory.json +122328 -0
- package/dist/{src/foundation/ui-apps → ui/apps}/contracts.d.ts +23 -1
- package/dist/{src/foundation/ui-apps → ui/apps}/host.d.ts +1 -1
- package/dist/{src/foundation/ui-apps → ui/apps}/host.js +14 -10
- package/dist/{src/foundation/ui-apps → ui/apps}/registry.d.ts +1 -0
- package/dist/{src/foundation/ui-apps → ui/apps}/registry.js +1 -0
- package/dist/{src/foundation/ui-components → ui/components}/dialog-panel.js +5 -3
- package/dist/{src/foundation/ui-components → ui/components}/frame.d.ts +1 -0
- package/dist/{src/foundation/ui-components → ui/components}/frame.js +1 -0
- package/dist/{src/foundation/ui-components → ui/components}/index.d.ts +5 -0
- package/dist/{src/foundation/ui-components → ui/components}/index.js +5 -0
- package/dist/{src/foundation/ui-components → ui/components}/line-input.d.ts +1 -6
- package/dist/{src/foundation/ui-components → ui/components}/line-input.js +4 -9
- package/dist/{src/foundation/ui-components → ui/components}/list-view.d.ts +0 -6
- package/dist/{src/foundation/ui-components → ui/components}/list-view.js +14 -7
- package/dist/{src/foundation/ui-components → ui/components}/mouse.d.ts +10 -0
- package/dist/{src/foundation/ui-components → ui/components}/mouse.js +23 -0
- package/dist/ui/components/progress-status.d.ts +2 -0
- package/dist/ui/components/progress-status.js +4 -0
- package/dist/ui/components/prompt-row.d.ts +14 -0
- package/dist/ui/components/prompt-row.js +20 -0
- package/dist/{src/foundation/ui-components → ui/components}/scrollbar.d.ts +26 -0
- package/dist/{src/foundation/ui-components → ui/components}/scrollbar.js +35 -0
- package/dist/{src/foundation/ui-components → ui/components}/shortcuts.d.ts +1 -0
- package/dist/{src/foundation/ui-components → ui/components}/shortcuts.js +1 -0
- package/dist/ui/components/spans.d.ts +25 -0
- package/dist/ui/components/spans.js +257 -0
- package/dist/ui/components/submitted-prompt.d.ts +23 -0
- package/dist/ui/components/submitted-prompt.js +50 -0
- package/dist/{src/foundation/ui-components → ui/components}/surface.d.ts +0 -5
- package/dist/{src/foundation/ui-components → ui/components}/surface.js +1 -5
- package/dist/ui/components/text-selection.d.ts +62 -0
- package/dist/ui/components/text-selection.js +208 -0
- package/dist/{src/foundation/ui-components → ui/components}/text.d.ts +14 -0
- package/dist/{src/foundation/ui-components → ui/components}/text.js +66 -4
- package/dist/ui/components/transcript-viewport.d.ts +152 -0
- package/dist/ui/components/transcript-viewport.js +631 -0
- package/dist/ui/components/visible-hyperlinks.d.ts +19 -0
- package/dist/ui/components/visible-hyperlinks.js +64 -0
- package/dist/{src/foundation/owned-ui-settings → ui/settings}/declarations.d.ts +8 -1
- package/dist/{src/foundation/owned-ui-settings → ui/settings}/declarations.js +33 -5
- package/dist/{src/foundation/owned-ui-settings → ui/settings}/migrations.d.ts +1 -1
- package/dist/{src/foundation/owned-ui-settings → ui/settings}/migrations.js +21 -2
- package/dist/{src/foundation/owned-ui-settings → ui/settings}/sections.d.ts +6 -19
- package/dist/{src/foundation/owned-ui-settings → ui/settings}/sections.js +32 -23
- package/dist/{src/foundation/owned-ui-settings → ui/settings}/session.d.ts +9 -17
- package/dist/{src/foundation/owned-ui-settings → ui/settings}/session.js +65 -55
- package/dist/{src/foundation/owned-ui-settings → ui/settings}/store.d.ts +1 -0
- package/dist/{src/foundation/owned-ui-settings → ui/settings}/store.js +2 -1
- package/docs/architecture/boundaries.md +9 -9
- package/docs/architecture/code-documentation.md +77 -0
- package/docs/architecture/process-guardian-provenance.md +3 -1
- package/docs/architecture/project-structure.md +67 -30
- package/docs/architecture/resource-and-data-policy.md +1 -1
- package/docs/architecture/toolchain.md +10 -10
- package/docs/architecture/ui-reference-provenance.md +36 -5
- package/docs/ci-release-runbook.md +186 -79
- package/docs/features/launch-profiles.md +24 -17
- package/docs/manual-ghost-link-baseline.md +89 -0
- package/docs/manual-launch-instance-acceptance.md +12 -35
- package/docs/manual-owned-ui-checkpoint.md +78 -0
- package/docs/manual-pi-boundary-candidate.md +4 -5
- package/docs/manual-terminal-colour-check.md +4 -3
- package/docs/repository-governance-live-acceptance.md +77 -0
- package/package.json +37 -27
- package/dist/src/cli/capabilities.d.ts +0 -15
- package/dist/src/cli/dispatch.js +0 -177
- package/dist/src/cli/version-stats.js +0 -72
- package/dist/src/composition/index.d.ts +0 -48
- package/dist/src/composition/index.js +0 -258
- package/dist/src/features/launch/intent.d.ts +0 -7
- package/dist/src/features/launch/intent.js +0 -4
- package/dist/src/features/launch/profiles.d.ts +0 -12
- package/dist/src/features/launch/profiles.js +0 -26
- package/dist/src/foundation/lifecycle/paths.d.ts +0 -10
- package/dist/src/foundation/pi-component-adapter/shell-presenters-transcript.d.ts +0 -57
- package/dist/src/foundation/pi-engine-adapter/settings-integration.d.ts +0 -55
- package/dist/src/foundation/pi-owned-ui-integration/route-host.d.ts +0 -29
- package/dist/src/foundation/pi-owned-ui-integration/session-shell.d.ts +0 -106
- package/dist/src/foundation/release/cohort-state.d.ts +0 -70
- package/dist/src/foundation/release/cohort-state.js +0 -202
- package/dist/src/foundation/release/release-gc.d.ts +0 -5
- package/dist/src/foundation/release/release-gc.js +0 -16
- package/dist/src/foundation/supervision/index.d.ts +0 -3
- package/dist/src/foundation/supervision/index.js +0 -3
- package/dist/src/foundation/supervision/main.d.ts +0 -1
- package/dist/src/foundation/supervision/main.js +0 -41
- package/dist/src/foundation/supervision/paths.d.ts +0 -1
- package/dist/src/foundation/supervision/paths.js +0 -1
- package/dist/src/foundation/ui-components/spans.d.ts +0 -7
- package/dist/src/foundation/ui-components/spans.js +0 -59
- package/docs/manual-transparent-checkpoint.md +0 -53
- /package/dist/{src/cli → cli}/index.d.ts +0 -0
- /package/dist/{src/cli → cli}/index.js +0 -0
- /package/dist/{src/cli → cli}/version.d.ts +0 -0
- /package/dist/{src/cli → cli}/version.js +0 -0
- /package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/capability-ports.js +0 -0
- /package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/domain-validation.d.ts +0 -0
- /package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/domain.js +0 -0
- /package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/index.d.ts +0 -0
- /package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/index.js +0 -0
- /package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/model.d.ts +0 -0
- /package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/model.js +0 -0
- /package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/package-ports.js +0 -0
- /package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/ports.d.ts +0 -0
- /package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/ports.js +0 -0
- /package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/serialization.d.ts +0 -0
- /package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/serialization.js +0 -0
- /package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/validation.d.ts +0 -0
- /package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/validation.js +0 -0
- /package/dist/{src/foundation/owned-ui-contracts → contracts/owned-ui}/extension-ui.d.ts +0 -0
- /package/dist/{src/foundation/owned-ui-contracts → contracts/owned-ui}/extension-ui.js +0 -0
- /package/dist/{src/foundation/owned-ui-contracts → contracts/owned-ui}/index.d.ts +0 -0
- /package/dist/{src/foundation/owned-ui-contracts → contracts/owned-ui}/index.js +0 -0
- /package/dist/{src/foundation/owned-ui-contracts → contracts/owned-ui}/model.js +0 -0
- /package/dist/{src/foundation/owned-ui-contracts → contracts/owned-ui}/validation.d.ts +0 -0
- /package/dist/{src/foundation/presentation-contracts → contracts/presentation}/index.d.ts +0 -0
- /package/dist/{src/foundation/presentation-contracts → contracts/presentation}/index.js +0 -0
- /package/dist/{src/foundation/workspace-contracts → contracts/workspace}/index.d.ts +0 -0
- /package/dist/{src/foundation/workspace-contracts → contracts/workspace}/index.js +0 -0
- /package/dist/{src/foundation/workspace-contracts → contracts/workspace}/model.d.ts +0 -0
- /package/dist/{src/foundation/workspace-contracts → contracts/workspace}/model.js +0 -0
- /package/dist/{src/foundation/workspace-contracts → contracts/workspace}/validation.d.ts +0 -0
- /package/dist/{src/foundation/workspace-contracts → contracts/workspace}/validation.js +0 -0
- /package/dist/{src/features → features}/launch/development-launch.d.ts +0 -0
- /package/dist/{src/features → features}/launch/initialize-profile.d.ts +0 -0
- /package/dist/{src/features → features}/launch/initialize-profile.js +0 -0
- /package/dist/{src/features → features}/launch/runtime-selection.js +0 -0
- /package/dist/{src/features → features}/workspace/capabilities.js +0 -0
- /package/dist/{src/features → features}/workspace/index.d.ts +0 -0
- /package/dist/{src/features → features}/workspace/index.js +0 -0
- /package/dist/{src/features → features}/workspace/presentation.d.ts +0 -0
- /package/dist/{src/features → features}/workspace/presentation.js +0 -0
- /package/dist/{src/features → features}/workspace/reconciliation.d.ts +0 -0
- /package/dist/{src/features → features}/workspace/reconciliation.js +0 -0
- /package/dist/{src/foundation → foundation}/launch-guardian/index.d.ts +0 -0
- /package/dist/{src/foundation → foundation}/launch-guardian/index.js +0 -0
- /package/dist/{src/foundation → foundation}/lifecycle/commands.d.ts +0 -0
- /package/dist/{src/foundation → foundation}/lifecycle/commands.js +0 -0
- /package/dist/{src/foundation → foundation}/lifecycle/launch-instance.d.ts +0 -0
- /package/dist/{src/foundation → foundation}/lifecycle/launch-instance.js +0 -0
- /package/dist/{src/foundation → foundation}/native-host-protocol/evidence.d.ts +0 -0
- /package/dist/{src/foundation → foundation}/native-host-protocol/evidence.js +0 -0
- /package/dist/{src/foundation → foundation}/native-host-protocol/index.d.ts +0 -0
- /package/dist/{src/foundation → foundation}/native-host-protocol/index.js +0 -0
- /package/dist/{src/foundation → foundation}/native-host-protocol/proof-gate.d.ts +0 -0
- /package/dist/{src/foundation → foundation}/native-host-protocol/proof-gate.js +0 -0
- /package/dist/{src/foundation → foundation}/process-containment/artifact.d.ts +0 -0
- /package/dist/{src/foundation → foundation}/process-containment/artifact.js +0 -0
- /package/dist/{src/foundation → foundation}/process-containment/contracts.d.ts +0 -0
- /package/dist/{src/foundation → foundation}/process-containment/contracts.js +0 -0
- /package/dist/{src/foundation → foundation}/protocol/index.d.ts +0 -0
- /package/dist/{src/foundation → foundation}/protocol/index.js +0 -0
- /package/dist/{src/foundation → foundation}/release/cohort-selection.d.ts +0 -0
- /package/dist/{src/foundation → foundation}/release/cohort-selection.js +0 -0
- /package/dist/{src/foundation → foundation}/release/concurrency.d.ts +0 -0
- /package/dist/{src/foundation → foundation}/release/concurrency.js +0 -0
- /package/dist/{src/foundation → foundation}/release/process-cleanup.d.ts +0 -0
- /package/dist/{src/foundation → foundation}/release/process-cleanup.js +0 -0
- /package/dist/{src/foundation → foundation}/release/stable-release.d.ts +0 -0
- /package/dist/{src/foundation → foundation}/release/stable-release.js +0 -0
- /package/dist/{src/foundation → foundation}/storage/index.d.ts +0 -0
- /package/dist/{src/foundation → foundation}/storage/index.js +0 -0
- /package/dist/{src/foundation → foundation}/structured-agent-runtime/index.d.ts +0 -0
- /package/dist/{src/foundation → foundation}/structured-agent-runtime/index.js +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/components.js +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/resources/builtin-themes.d.ts +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/resources/builtin-themes.js +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/shell-editor-autocomplete.d.ts +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/shell-extension-ui.js +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/theme.d.ts +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/theme.js +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/countdown-timer.d.ts +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/countdown-timer.js +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/custom-entry.d.ts +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/custom-entry.js +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/daxnuts.d.ts +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/daxnuts.js +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/earendil-announcement.d.ts +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/earendil-announcement.js +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/extension-editor.d.ts +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/extension-editor.js +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/first-time-setup.d.ts +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/first-time-setup.js +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/markdown-transform.d.ts +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/markdown-transform.js +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/mermaid.d.ts +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/mermaid.js +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/owned-editor.d.ts +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/owned-editor.js +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/scoped-models-selector.d.ts +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/scoped-models-selector.js +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/session-footer.js +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/session-selector-search.d.ts +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/session-selector-search.js +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/session-selector.d.ts +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/session-selector.js +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/skill-invocation-message.d.ts +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/skill-invocation-message.js +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/status-indicator.d.ts +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/status-indicator.js +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/tree-selector.d.ts +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/tree-selector.js +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/trust-selector.d.ts +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/trust-selector.js +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/external-editor.d.ts +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/external-editor.js +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/model-search.d.ts +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/model-search.js +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/theme/theme-controller.d.ts +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/theme/theme-controller.js +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/theme/theme.d.ts +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/theme/theme.js +0 -0
- /package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/pi-settings-metadata.json +0 -0
- /package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/public-main-entry.d.ts +0 -0
- /package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/public-main-entry.js +0 -0
- /package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/workflows.js +0 -0
- /package/dist/{src/foundation/pi-owned-ui-integration → integrations/pi/session-ui}/route-host.js +0 -0
- /package/dist/{src/foundation/pi-tui-runtime-adapter → integrations/pi/tui-runtime}/conformance.d.ts +0 -0
- /package/dist/{src/foundation/pi-tui-runtime-adapter → integrations/pi/tui-runtime}/conformance.js +0 -0
- /package/dist/{src/foundation/pi-tui-runtime-adapter → integrations/pi/tui-runtime}/contracts.js +0 -0
- /package/dist/{src/foundation/pi-tui-runtime-adapter → integrations/pi/tui-runtime}/presentation-adapter.js +0 -0
- /package/dist/{src/foundation/ui-apps → ui/apps}/contracts.js +0 -0
- /package/dist/{src/foundation/ui-apps → ui/apps}/index.d.ts +0 -0
- /package/dist/{src/foundation/ui-apps → ui/apps}/index.js +0 -0
- /package/dist/{src/foundation/ui-components → ui/components}/dialog-panel.d.ts +0 -0
- /package/dist/{src/foundation/ui-components → ui/components}/label.d.ts +0 -0
- /package/dist/{src/foundation/ui-components → ui/components}/label.js +0 -0
- /package/dist/{src/foundation/ui-components → ui/components}/list-block.d.ts +0 -0
- /package/dist/{src/foundation/ui-components → ui/components}/list-block.js +0 -0
- /package/dist/{src/foundation/ui-components → ui/components}/pane.d.ts +0 -0
- /package/dist/{src/foundation/ui-components → ui/components}/pane.js +0 -0
- /package/dist/{src/foundation/ui-components → ui/components}/revision.d.ts +0 -0
- /package/dist/{src/foundation/ui-components → ui/components}/revision.js +0 -0
- /package/dist/{src/foundation/ui-components → ui/components}/status-line.d.ts +0 -0
- /package/dist/{src/foundation/ui-components → ui/components}/status-line.js +0 -0
- /package/dist/{src/foundation/ui-components → ui/components}/stepper.d.ts +0 -0
- /package/dist/{src/foundation/ui-components → ui/components}/stepper.js +0 -0
- /package/dist/{src/foundation/ui-components → ui/components}/theme.d.ts +0 -0
- /package/dist/{src/foundation/ui-components → ui/components}/theme.js +0 -0
- /package/dist/{src/foundation/ui-components → ui/components}/value-menu.d.ts +0 -0
- /package/dist/{src/foundation/ui-components → ui/components}/value-menu.js +0 -0
- /package/dist/{src/foundation/owned-ui-settings → ui/settings}/index.d.ts +0 -0
- /package/dist/{src/foundation/owned-ui-settings → ui/settings}/index.js +0 -0
- /package/dist/{src/foundation/owned-ui-settings → ui/settings}/resolution.d.ts +0 -0
- /package/dist/{src/foundation/owned-ui-settings → ui/settings}/resolution.js +0 -0
|
@@ -2,6 +2,26 @@ import { createHash } from "node:crypto";
|
|
|
2
2
|
import { homedir, platform } from "node:os";
|
|
3
3
|
import { posix, win32 } from "node:path";
|
|
4
4
|
import { PRODUCT_IDENTITY } from "../../product-identity.js";
|
|
5
|
+
/**
|
|
6
|
+
* Endpoint identity for one release cohort. Two cohorts can be live at once — an update
|
|
7
|
+
* leaves a working session on the release it started on — so the name a supervisor listens
|
|
8
|
+
* on has to name the release as well as the runtime directory, or the two contend for one
|
|
9
|
+
* endpoint and replacing one means ending the other.
|
|
10
|
+
*
|
|
11
|
+
* An explicit endpoint override keeps its single endpoint: it is how an isolated run pins
|
|
12
|
+
* the address it is going to talk to.
|
|
13
|
+
*/
|
|
14
|
+
export function resolveCohortEndpoint(paths, releaseId, environment = process.env, hostPlatform = platform()) {
|
|
15
|
+
if (environment[PRODUCT_IDENTITY.environment.endpoint]) {
|
|
16
|
+
return { endpoint: paths.endpoint, endpointMetadataPath: paths.endpointMetadataPath };
|
|
17
|
+
}
|
|
18
|
+
const path = hostPlatform === "win32" ? win32 : posix;
|
|
19
|
+
const token = createHash("sha256").update(releaseId).digest("hex").slice(0, 16);
|
|
20
|
+
const endpoint = hostPlatform === "win32"
|
|
21
|
+
? `${paths.endpoint}-${token}`
|
|
22
|
+
: path.join(paths.endpointDirectory ?? paths.runtimeDir, `${token}-${PRODUCT_IDENTITY.endpoint.unixSocketFilename}`);
|
|
23
|
+
return { endpoint, endpointMetadataPath: path.join(paths.endpointsDir, `${token}.json`) };
|
|
24
|
+
}
|
|
5
25
|
export function resolveProductPaths(environment = process.env, hostPlatform = platform(), fallbackHome = homedir()) {
|
|
6
26
|
const windows = hostPlatform === "win32";
|
|
7
27
|
const path = windows ? win32 : posix;
|
|
@@ -26,10 +46,16 @@ export function resolveProductPaths(environment = process.env, hostPlatform = pl
|
|
|
26
46
|
? path.join(environment.XDG_RUNTIME_DIR, PRODUCT_IDENTITY.state.unixControlDirectory)
|
|
27
47
|
: path.join(dataDir, "runtime")));
|
|
28
48
|
const namespace = createHash("sha256").update(runtimeDir.toLowerCase()).digest("hex").slice(0, 20);
|
|
49
|
+
// Platform: Darwin limits Unix-domain socket paths to roughly 104 bytes. Runtime roots
|
|
50
|
+
// under /var/folders can exceed that before the cohort suffix is added, so only socket
|
|
51
|
+
// files use a short owned namespace while metadata remains under the selected runtime.
|
|
52
|
+
const endpointDirectory = !endpointOverride && hostPlatform === "darwin"
|
|
53
|
+
? posix.join("/tmp", `${PRODUCT_IDENTITY.state.unixControlDirectory}-${namespace}`)
|
|
54
|
+
: null;
|
|
29
55
|
const endpoint = endpointOverride
|
|
30
56
|
?? (windows
|
|
31
57
|
? `\\\\.\\pipe\\${PRODUCT_IDENTITY.endpoint.windowsPipeStem}-${namespace}`
|
|
32
|
-
: path.join(runtimeDir, PRODUCT_IDENTITY.endpoint.unixSocketFilename));
|
|
58
|
+
: path.join(endpointDirectory ?? runtimeDir, PRODUCT_IDENTITY.endpoint.unixSocketFilename));
|
|
33
59
|
return {
|
|
34
60
|
configDir,
|
|
35
61
|
dataDir,
|
|
@@ -37,6 +63,8 @@ export function resolveProductPaths(environment = process.env, hostPlatform = pl
|
|
|
37
63
|
databasePath: path.resolve(databaseOverride ?? path.join(dataDir, PRODUCT_IDENTITY.endpoint.databaseFilename)),
|
|
38
64
|
endpoint,
|
|
39
65
|
endpointMetadataPath: path.join(runtimeDir, PRODUCT_IDENTITY.endpoint.metadataFilename),
|
|
66
|
+
endpointsDir: path.join(runtimeDir, "endpoints"),
|
|
67
|
+
endpointDirectory,
|
|
40
68
|
supervisorLogPath: path.join(runtimeDir, PRODUCT_IDENTITY.endpoint.supervisorLogFilename),
|
|
41
69
|
};
|
|
42
70
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Invocation-scoped selection; never inferred from a parent's active-session environment. */
|
|
2
|
+
export interface SessionSelection {
|
|
3
|
+
readonly target: string;
|
|
4
|
+
readonly sessionDir?: string;
|
|
5
|
+
}
|
|
6
|
+
/** Shared public/internal grammar, deliberately not arbitrary Pi argument passthrough. */
|
|
7
|
+
export declare function parseSessionSelection(arguments_: readonly string[]): SessionSelection | undefined;
|
|
8
|
+
/** Encode only validated values into separate argv entries; no shell quoting or evaluation. */
|
|
9
|
+
export declare function sessionSelectionArguments(selection?: SessionSelection): string[];
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** Shared public/internal grammar, deliberately not arbitrary Pi argument passthrough. */
|
|
2
|
+
export function parseSessionSelection(arguments_) {
|
|
3
|
+
if (arguments_.length === 0)
|
|
4
|
+
return undefined;
|
|
5
|
+
let target;
|
|
6
|
+
let sessionDir;
|
|
7
|
+
for (let index = 0; index < arguments_.length; index += 2) {
|
|
8
|
+
const option = arguments_[index];
|
|
9
|
+
if (option !== "--session" && option !== "--session-dir")
|
|
10
|
+
throw new Error("expected --session <path|id> with optional --session-dir <dir>");
|
|
11
|
+
const value = arguments_[index + 1];
|
|
12
|
+
if (value === undefined || value.startsWith("-") || !validValue(value))
|
|
13
|
+
throw new Error(`${option} requires a nonempty value`);
|
|
14
|
+
if (option === "--session") {
|
|
15
|
+
if (target !== undefined)
|
|
16
|
+
throw new Error("--session may occur only once");
|
|
17
|
+
target = value;
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
if (sessionDir !== undefined)
|
|
21
|
+
throw new Error("--session-dir may occur only once");
|
|
22
|
+
sessionDir = value;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (target === undefined)
|
|
26
|
+
throw new Error("--session-dir requires --session <path|id>");
|
|
27
|
+
return Object.freeze({ target, ...(sessionDir === undefined ? {} : { sessionDir }) });
|
|
28
|
+
}
|
|
29
|
+
/** Encode only validated values into separate argv entries; no shell quoting or evaluation. */
|
|
30
|
+
export function sessionSelectionArguments(selection) {
|
|
31
|
+
if (selection === undefined)
|
|
32
|
+
return [];
|
|
33
|
+
const args = [...(selection.sessionDir === undefined ? [] : ["--session-dir", selection.sessionDir]), "--session", selection.target];
|
|
34
|
+
parseSessionSelection(args);
|
|
35
|
+
return args;
|
|
36
|
+
}
|
|
37
|
+
function validValue(value) {
|
|
38
|
+
return value.trim().length > 0 && value.length <= 32_768 && !/[\u0000\r\n]/.test(value);
|
|
39
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
declare const STARTUP_SCHEMA = "a1-supervisor-startup-v1";
|
|
2
|
+
export interface SupervisorStartupAttemptIdentity {
|
|
3
|
+
readonly attemptId: string;
|
|
4
|
+
readonly releaseId: string;
|
|
5
|
+
readonly resultPath: string;
|
|
6
|
+
}
|
|
7
|
+
export type SupervisorStartupResult = {
|
|
8
|
+
readonly schema: typeof STARTUP_SCHEMA;
|
|
9
|
+
readonly attemptId: string;
|
|
10
|
+
readonly releaseId: string;
|
|
11
|
+
readonly outcome: "ready";
|
|
12
|
+
readonly pid: number;
|
|
13
|
+
} | {
|
|
14
|
+
readonly schema: typeof STARTUP_SCHEMA;
|
|
15
|
+
readonly attemptId: string;
|
|
16
|
+
readonly releaseId: string;
|
|
17
|
+
readonly outcome: "failure";
|
|
18
|
+
readonly stage: string;
|
|
19
|
+
readonly code: string | null;
|
|
20
|
+
readonly message: string;
|
|
21
|
+
};
|
|
22
|
+
/** Create one unguessable startup result authority under the protected runtime root. */
|
|
23
|
+
export declare function createSupervisorStartupAttempt(runtimeDir: string, releaseId: string): Promise<SupervisorStartupAttemptIdentity>;
|
|
24
|
+
export declare function supervisorStartupResultPath(runtimeDir: string, attemptId: string): string;
|
|
25
|
+
/** Atomically publish the bounded result for one detached supervisor startup attempt. */
|
|
26
|
+
export declare function publishSupervisorStartupResult(path: string, result: SupervisorStartupResult): Promise<void>;
|
|
27
|
+
export declare function readSupervisorStartupResult(path: string, attemptId: string, releaseId: string): Promise<SupervisorStartupResult | null>;
|
|
28
|
+
export declare function supervisorStartupFailure(error: unknown, attemptId: string, releaseId: string, stage: string): SupervisorStartupResult;
|
|
29
|
+
export declare function supervisorStartupReady(attemptId: string, releaseId: string): SupervisorStartupResult;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { mkdir, readFile, readdir, rename, rm, stat, writeFile } from "node:fs/promises";
|
|
3
|
+
import { resolve } from "node:path";
|
|
4
|
+
const STARTUP_SCHEMA = "a1-supervisor-startup-v1";
|
|
5
|
+
const MAX_RESULT_BYTES = 8 * 1024;
|
|
6
|
+
const MAX_MESSAGE_LENGTH = 1_024;
|
|
7
|
+
const MAX_RETAINED_RESULTS = 16;
|
|
8
|
+
const MAX_RESULT_AGE_MS = 7 * 24 * 60 * 60 * 1_000;
|
|
9
|
+
const ATTEMPT_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$/;
|
|
10
|
+
/** Create one unguessable startup result authority under the protected runtime root. */
|
|
11
|
+
export async function createSupervisorStartupAttempt(runtimeDir, releaseId) {
|
|
12
|
+
const attemptId = randomUUID();
|
|
13
|
+
const directory = resolve(runtimeDir, "supervisor-startup");
|
|
14
|
+
await mkdir(directory, { recursive: true, mode: 0o700 });
|
|
15
|
+
await pruneSupervisorStartupResults(directory);
|
|
16
|
+
return { attemptId, releaseId, resultPath: supervisorStartupResultPath(runtimeDir, attemptId) };
|
|
17
|
+
}
|
|
18
|
+
export function supervisorStartupResultPath(runtimeDir, attemptId) {
|
|
19
|
+
if (!ATTEMPT_PATTERN.test(attemptId))
|
|
20
|
+
throw new TypeError("supervisor startup attempt identity is invalid");
|
|
21
|
+
return resolve(runtimeDir, "supervisor-startup", `${attemptId}.json`);
|
|
22
|
+
}
|
|
23
|
+
/** Atomically publish the bounded result for one detached supervisor startup attempt. */
|
|
24
|
+
export async function publishSupervisorStartupResult(path, result) {
|
|
25
|
+
validateSupervisorStartupResult(result, result.attemptId, result.releaseId);
|
|
26
|
+
const body = `${JSON.stringify(result)}\n`;
|
|
27
|
+
if (Buffer.byteLength(body) > MAX_RESULT_BYTES)
|
|
28
|
+
throw new Error("supervisor startup result exceeds its size bound");
|
|
29
|
+
const temporary = `${path}.${process.pid}.tmp`;
|
|
30
|
+
await writeFile(temporary, body, { encoding: "utf8", mode: 0o600 });
|
|
31
|
+
await rename(temporary, path);
|
|
32
|
+
}
|
|
33
|
+
export async function readSupervisorStartupResult(path, attemptId, releaseId) {
|
|
34
|
+
let metadata;
|
|
35
|
+
try {
|
|
36
|
+
metadata = await stat(path);
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
if (isNodeError(error, "ENOENT"))
|
|
40
|
+
return null;
|
|
41
|
+
throw error;
|
|
42
|
+
}
|
|
43
|
+
if (!metadata.isFile() || metadata.size > MAX_RESULT_BYTES)
|
|
44
|
+
throw new Error("supervisor startup result is invalid or oversized");
|
|
45
|
+
const value = JSON.parse(await readFile(path, "utf8"));
|
|
46
|
+
return validateSupervisorStartupResult(value, attemptId, releaseId);
|
|
47
|
+
}
|
|
48
|
+
export function supervisorStartupFailure(error, attemptId, releaseId, stage) {
|
|
49
|
+
const source = error instanceof Error ? error : new Error(String(error));
|
|
50
|
+
return {
|
|
51
|
+
schema: STARTUP_SCHEMA,
|
|
52
|
+
attemptId,
|
|
53
|
+
releaseId,
|
|
54
|
+
outcome: "failure",
|
|
55
|
+
stage: boundedToken(stage, "unknown"),
|
|
56
|
+
code: "code" in source && typeof source.code === "string" ? boundedToken(source.code, "UNKNOWN") : null,
|
|
57
|
+
message: sanitizeMessage(source.message),
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
export function supervisorStartupReady(attemptId, releaseId) {
|
|
61
|
+
return { schema: STARTUP_SCHEMA, attemptId, releaseId, outcome: "ready", pid: process.pid };
|
|
62
|
+
}
|
|
63
|
+
async function pruneSupervisorStartupResults(directory) {
|
|
64
|
+
const now = Date.now();
|
|
65
|
+
const entries = await readdir(directory, { withFileTypes: true });
|
|
66
|
+
const files = (await Promise.all(entries.filter(entry => entry.isFile() && entry.name.endsWith(".json")).map(async (entry) => {
|
|
67
|
+
const path = resolve(directory, entry.name);
|
|
68
|
+
const metadata = await stat(path).catch(() => null);
|
|
69
|
+
return metadata ? { path, modified: metadata.mtimeMs } : null;
|
|
70
|
+
}))).filter((file) => file !== null);
|
|
71
|
+
files.sort((left, right) => right.modified - left.modified);
|
|
72
|
+
await Promise.all(files.flatMap((file, index) => index >= MAX_RETAINED_RESULTS - 1 || now - file.modified > MAX_RESULT_AGE_MS
|
|
73
|
+
? [rm(file.path, { force: true })]
|
|
74
|
+
: []));
|
|
75
|
+
}
|
|
76
|
+
function validateSupervisorStartupResult(value, attemptId, releaseId) {
|
|
77
|
+
if (!value || typeof value !== "object")
|
|
78
|
+
throw new Error("supervisor startup result is malformed");
|
|
79
|
+
const result = value;
|
|
80
|
+
if (result.schema !== STARTUP_SCHEMA || result.attemptId !== attemptId || result.releaseId !== releaseId) {
|
|
81
|
+
throw new Error("supervisor startup result does not match the selected attempt and release");
|
|
82
|
+
}
|
|
83
|
+
if (result.outcome === "ready" && Number.isSafeInteger(result.pid) && Number(result.pid) > 0)
|
|
84
|
+
return result;
|
|
85
|
+
if (result.outcome === "failure" && typeof result.stage === "string" && result.stage.length > 0 && result.stage.length <= 128
|
|
86
|
+
&& (result.code === null || typeof result.code === "string") && typeof result.message === "string" && result.message.length <= MAX_MESSAGE_LENGTH) {
|
|
87
|
+
return result;
|
|
88
|
+
}
|
|
89
|
+
throw new Error("supervisor startup result is malformed");
|
|
90
|
+
}
|
|
91
|
+
function sanitizeMessage(message) {
|
|
92
|
+
let value = message.replace(/[\u0000-\u001f\u007f]+/g, " ").replace(/:\/\/[^\s/@:]+:[^\s/@]+@/g, "://<redacted>@");
|
|
93
|
+
for (const [name, secret] of Object.entries(process.env)) {
|
|
94
|
+
if (!secret || secret.length < 4 || !/(?:TOKEN|SECRET|PASSWORD|COOKIE|CREDENTIAL|AUTH)/i.test(name))
|
|
95
|
+
continue;
|
|
96
|
+
value = value.split(secret).join("<redacted>");
|
|
97
|
+
}
|
|
98
|
+
return value.trim().slice(0, MAX_MESSAGE_LENGTH) || "supervisor startup failed";
|
|
99
|
+
}
|
|
100
|
+
function boundedToken(value, fallback) {
|
|
101
|
+
const normalized = value.replace(/[^A-Za-z0-9_.:-]/g, "-").slice(0, 128);
|
|
102
|
+
return normalized || fallback;
|
|
103
|
+
}
|
|
104
|
+
function isNodeError(error, code) {
|
|
105
|
+
return error instanceof Error && "code" in error && error.code === code;
|
|
106
|
+
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { type NativeHostProofMessage } from "./messages.js";
|
|
2
|
+
/** Identifies a bounded native-host framing or message-contract failure. */
|
|
2
3
|
export declare class NativeHostProtocolError extends Error {
|
|
3
4
|
readonly code: "frame-too-large" | "malformed-frame" | "invalid-message";
|
|
4
5
|
constructor(code: "frame-too-large" | "malformed-frame" | "invalid-message", message: string);
|
|
5
6
|
}
|
|
7
|
+
/** Encodes and incrementally decodes size-bounded newline-delimited native-host proof messages. */
|
|
6
8
|
export declare class NativeHostFrameCodec {
|
|
7
9
|
#private;
|
|
8
10
|
encode(message: NativeHostProofMessage): string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { MAX_NATIVE_HOST_MESSAGE_BYTES, assertNativeHostProofMessage, } from "./messages.js";
|
|
2
|
+
/** Identifies a bounded native-host framing or message-contract failure. */
|
|
2
3
|
export class NativeHostProtocolError extends Error {
|
|
3
4
|
code;
|
|
4
5
|
constructor(code, message) {
|
|
@@ -7,6 +8,7 @@ export class NativeHostProtocolError extends Error {
|
|
|
7
8
|
this.name = "NativeHostProtocolError";
|
|
8
9
|
}
|
|
9
10
|
}
|
|
11
|
+
/** Encodes and incrementally decodes size-bounded newline-delimited native-host proof messages. */
|
|
10
12
|
export class NativeHostFrameCodec {
|
|
11
13
|
#buffer = "";
|
|
12
14
|
encode(message) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CorrelationId, type NativeHostCommand, type NativeHostEvent, type NativeHostHello, type PaneId, type TerminalSessionLaunch } from "
|
|
1
|
+
import { type CorrelationId, type NativeHostCommand, type NativeHostEvent, type NativeHostHello, type PaneId, type TerminalSessionLaunch } from "../../contracts/workspace/index.js";
|
|
2
2
|
export declare const NATIVE_HOST_PROTOCOL_NAME: string;
|
|
3
3
|
export declare const MAX_NATIVE_HOST_MESSAGE_BYTES: number;
|
|
4
4
|
export type NativeHostProofMessage = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NATIVE_HOST_PROTOCOL_VERSION, assertNativeHostCommand, assertTerminalSessionLaunch, } from "
|
|
1
|
+
import { NATIVE_HOST_PROTOCOL_VERSION, assertNativeHostCommand, assertTerminalSessionLaunch, } from "../../contracts/workspace/index.js";
|
|
2
2
|
import { PRODUCT_IDENTITY } from "../../product-identity.js";
|
|
3
3
|
export const NATIVE_HOST_PROTOCOL_NAME = PRODUCT_IDENTITY.protocol.nativeHostSchema;
|
|
4
4
|
export const MAX_NATIVE_HOST_MESSAGE_BYTES = 1024 * 1024;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { WindowsNativeProcessInspector, type InspectorCommandRunner } from "./windows-process-inspector.js";
|
|
2
|
+
/** Verifies Darwin process identity through the bounded native guardian inspection command. */
|
|
3
|
+
export declare class DarwinNativeProcessInspector extends WindowsNativeProcessInspector {
|
|
4
|
+
constructor(helperPath: string, runner?: InspectorCommandRunner);
|
|
5
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { WindowsNativeProcessInspector } from "./windows-process-inspector.js";
|
|
2
|
+
/** Verifies Darwin process identity through the bounded native guardian inspection command. */
|
|
3
|
+
export class DarwinNativeProcessInspector extends WindowsNativeProcessInspector {
|
|
4
|
+
constructor(helperPath, runner) {
|
|
5
|
+
super(helperPath, runner, "darwin-proc-start:");
|
|
6
|
+
}
|
|
7
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { NativeProcessIdentity } from "../lifecycle/index.js";
|
|
2
2
|
import type { NativeProcessInspector } from "./contracts.js";
|
|
3
|
+
/** Verifies Linux process identity from the PID and kernel start-time field in procfs. */
|
|
3
4
|
export declare class LinuxNativeProcessInspector implements NativeProcessInspector {
|
|
4
5
|
observe(pid: number): Promise<NativeProcessIdentity | null>;
|
|
5
6
|
matches(identity: NativeProcessIdentity): Promise<boolean>;
|
package/dist/{src/foundation → foundation}/process-containment/native-guardian-containment.d.ts
RENAMED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { NativeProcessIdentity, ProcessContainmentIdentity } from "../lifecycle/index.js";
|
|
2
2
|
import type { ContainedProcessHandle, ContainedSpawnOptions, ProcessContainment } from "./contracts.js";
|
|
3
|
+
/** Delegates one root runtime to the native guardian and exposes its verified containment identity. */
|
|
3
4
|
export declare class NativeGuardianContainment implements ProcessContainment {
|
|
4
5
|
#private;
|
|
5
6
|
readonly instanceId: string;
|
package/dist/{src/foundation → foundation}/process-containment/native-guardian-containment.js
RENAMED
|
@@ -2,6 +2,7 @@ import { spawn } from "node:child_process";
|
|
|
2
2
|
import { mkdir, readFile, rm } from "node:fs/promises";
|
|
3
3
|
import { dirname, resolve } from "node:path";
|
|
4
4
|
import { PRODUCT_IDENTITY } from "../../product-identity.js";
|
|
5
|
+
/** Delegates one root runtime to the native guardian and exposes its verified containment identity. */
|
|
5
6
|
export class NativeGuardianContainment {
|
|
6
7
|
instanceId;
|
|
7
8
|
helperPath;
|
package/dist/{src/foundation → foundation}/process-containment/windows-process-inspector.d.ts
RENAMED
|
@@ -8,10 +8,12 @@ export interface InspectorCommandResult {
|
|
|
8
8
|
export interface InspectorCommandRunner {
|
|
9
9
|
run(executable: string, arguments_: readonly string[]): Promise<InspectorCommandResult>;
|
|
10
10
|
}
|
|
11
|
+
/** Verifies Windows process identity through the bounded process-guardian inspection command. */
|
|
11
12
|
export declare class WindowsNativeProcessInspector implements NativeProcessInspector {
|
|
12
13
|
readonly helperPath: string;
|
|
13
14
|
private readonly runner;
|
|
14
|
-
|
|
15
|
+
private readonly identityPrefix;
|
|
16
|
+
constructor(helperPath: string, runner?: InspectorCommandRunner, identityPrefix?: string);
|
|
15
17
|
observe(pid: number): Promise<NativeProcessIdentity | null>;
|
|
16
18
|
matches(identity: NativeProcessIdentity): Promise<boolean>;
|
|
17
19
|
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { execFile } from "node:child_process";
|
|
2
|
+
/** Verifies Windows process identity through the bounded process-guardian inspection command. */
|
|
2
3
|
export class WindowsNativeProcessInspector {
|
|
3
4
|
helperPath;
|
|
4
5
|
runner;
|
|
5
|
-
|
|
6
|
+
identityPrefix;
|
|
7
|
+
constructor(helperPath, runner = defaultRunner, identityPrefix = "windows-filetime:") {
|
|
6
8
|
this.helperPath = helperPath;
|
|
7
9
|
this.runner = runner;
|
|
10
|
+
this.identityPrefix = identityPrefix;
|
|
8
11
|
if (!helperPath || helperPath.includes("\0"))
|
|
9
12
|
throw new TypeError("process guardian helper path is invalid");
|
|
10
13
|
}
|
|
@@ -25,7 +28,7 @@ export class WindowsNativeProcessInspector {
|
|
|
25
28
|
catch {
|
|
26
29
|
throw Object.assign(new Error("process guardian returned malformed identity data"), { code: "PROCESS_INSPECTION_INVALID" });
|
|
27
30
|
}
|
|
28
|
-
if (!isIdentity(value) || value.pid !== pid || !value.startIdentity.startsWith(
|
|
31
|
+
if (!isIdentity(value) || value.pid !== pid || !value.startIdentity.startsWith(this.identityPrefix)) {
|
|
29
32
|
throw Object.assign(new Error("process guardian returned mismatched identity data"), { code: "PROCESS_INSPECTION_INVALID" });
|
|
30
33
|
}
|
|
31
34
|
return value;
|
|
@@ -5,6 +5,7 @@ interface ClientEvents {
|
|
|
5
5
|
stopIntent: [LaunchInstanceStopIntent];
|
|
6
6
|
disconnect: [];
|
|
7
7
|
}
|
|
8
|
+
/** Maintains one negotiated supervisor connection and rejects all pending commands on disconnect. */
|
|
8
9
|
export declare class SupervisorClient extends EventEmitter<ClientEvents> {
|
|
9
10
|
#private;
|
|
10
11
|
readonly clientId: `${string}-${string}-${string}-${string}-${string}`;
|
|
@@ -2,6 +2,7 @@ import { EventEmitter } from "node:events";
|
|
|
2
2
|
import { connect } from "node:net";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
import { CONTROL_ENVELOPE, CONTROL_ENVELOPE_REVISION, encodeFrame, LineFrameDecoder, localControlHello, negotiateControlFeatures } from "./messages.js";
|
|
5
|
+
/** Maintains one negotiated supervisor connection and rejects all pending commands on disconnect. */
|
|
5
6
|
export class SupervisorClient extends EventEmitter {
|
|
6
7
|
clientId = randomUUID();
|
|
7
8
|
releaseId;
|
|
@@ -76,6 +76,7 @@ export interface ControlNegotiation {
|
|
|
76
76
|
export declare function localControlHello(releaseId?: string): ControlHello;
|
|
77
77
|
export declare function negotiateControlFeatures(client: ControlHello, server?: ControlHello): ControlNegotiation;
|
|
78
78
|
export declare function encodeFrame(message: ClientMessage | ServerMessage | Readonly<Record<string, unknown>>): string;
|
|
79
|
+
/** Incrementally decodes size-bounded newline-delimited control frames from arbitrary chunks. */
|
|
79
80
|
export declare class LineFrameDecoder {
|
|
80
81
|
#private;
|
|
81
82
|
push(chunk: Buffer | string): unknown[];
|
|
@@ -58,6 +58,7 @@ export function negotiateControlFeatures(client, server = localControlHello()) {
|
|
|
58
58
|
export function encodeFrame(message) {
|
|
59
59
|
return `${JSON.stringify(message)}\n`;
|
|
60
60
|
}
|
|
61
|
+
/** Incrementally decodes size-bounded newline-delimited control frames from arbitrary chunks. */
|
|
61
62
|
export class LineFrameDecoder {
|
|
62
63
|
#buffer = "";
|
|
63
64
|
push(chunk) {
|
|
@@ -1,24 +1,41 @@
|
|
|
1
1
|
import { type OwnershipProbe } from "./cohort-selection.js";
|
|
2
2
|
import { type SupervisorEndpointMetadata } from "./cohort-state.js";
|
|
3
|
-
import { type LaunchProfileId } from "../lifecycle/index.js";
|
|
3
|
+
import { resolveProductPaths, type SessionSelection, type LaunchProfileId, type SupervisorStartupAttemptIdentity } from "../lifecycle/index.js";
|
|
4
4
|
import { cleanupProvenIdleOwner } from "./process-cleanup.js";
|
|
5
5
|
import { type MaterializedRelease, type VerifyMaterializedReleaseOptions } from "./release-store.js";
|
|
6
6
|
export interface BootstrapOptions {
|
|
7
7
|
readonly packageRoot: string;
|
|
8
8
|
readonly launchIntent?: {
|
|
9
9
|
readonly kind: "interactive";
|
|
10
|
-
readonly
|
|
11
|
-
|
|
12
|
-
};
|
|
10
|
+
readonly profileId: LaunchProfileId;
|
|
11
|
+
readonly sessionSelection?: SessionSelection;
|
|
13
12
|
};
|
|
14
13
|
readonly environment?: NodeJS.ProcessEnv;
|
|
15
14
|
readonly output?: Pick<NodeJS.WriteStream, "write">;
|
|
15
|
+
/**
|
|
16
|
+
* Whether a materialized release copy is fit to launch. The active release
|
|
17
|
+
* is normally reused while its version matches the installation, but a copy
|
|
18
|
+
* can be broken in ways a version cannot see — materialized from a tree a
|
|
19
|
+
* blocked postinstall never finished repairing. The probe is injected from
|
|
20
|
+
* the bin entry because deciding it requires inspecting dependency
|
|
21
|
+
* resolution, which stays out of production code. Absent means every
|
|
22
|
+
* release is fit.
|
|
23
|
+
*/
|
|
24
|
+
readonly releaseIsLaunchable?: (releaseRoot: string) => boolean;
|
|
25
|
+
/** Test seam for bounded maintenance scheduled after stale endpoint sweeping. */
|
|
26
|
+
readonly scheduleMaintenance?: (dataDir: string, paths: ReturnType<typeof resolveProductPaths>) => Promise<void>;
|
|
16
27
|
}
|
|
17
28
|
export declare function runBootstrap(options: BootstrapOptions): Promise<number>;
|
|
18
29
|
export declare function certifyMaterializedRelease(release: MaterializedRelease, dataDir: string, verification?: VerifyMaterializedReleaseOptions): Promise<string>;
|
|
19
|
-
export
|
|
30
|
+
export interface SupervisorStartupAttempt extends SupervisorStartupAttemptIdentity {
|
|
31
|
+
readonly childOutcome: Promise<{
|
|
32
|
+
readonly exitCode: number | null;
|
|
33
|
+
readonly signal: NodeJS.Signals | null;
|
|
34
|
+
}>;
|
|
35
|
+
}
|
|
36
|
+
export declare function startSupervisor(release: MaterializedRelease, environment: NodeJS.ProcessEnv): Promise<SupervisorStartupAttempt>;
|
|
20
37
|
export declare function releaseEnvironment(environment: NodeJS.ProcessEnv, release: MaterializedRelease): NodeJS.ProcessEnv;
|
|
21
|
-
export declare function waitForVerifiedEndpoint(path: string, release: MaterializedRelease, timeoutMs: number): Promise<void>;
|
|
38
|
+
export declare function waitForVerifiedEndpoint(path: string, release: MaterializedRelease, timeoutMs: number, startup?: SupervisorStartupAttempt): Promise<void>;
|
|
22
39
|
export declare function readEndpointMetadata(path: string): Promise<SupervisorEndpointMetadata | null>;
|
|
23
40
|
export declare function probeOwnership(metadata: SupervisorEndpointMetadata): Promise<OwnershipProbe>;
|
|
24
41
|
export declare function releaseVerifiedIdleOwner(metadata: SupervisorEndpointMetadata, dataDir: string, operations?: {
|