@timurproko/a1 0.1.8-dev.0b6d8cc → 0.1.8-dev.121
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 +29 -23
- package/bin/cli.js +7 -7
- package/bin/guardian.js +1 -1
- package/bin/supervisor.js +1 -1
- package/bin/ui.js +3 -3
- package/dist/{src/cli → cli}/dispatch.js +14 -12
- package/dist/{src/cli → cli}/packages.d.ts +10 -2
- package/dist/{src/cli → cli}/packages.js +24 -20
- package/dist/{src/cli → cli}/version-stats.js +4 -4
- 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 +25 -0
- package/dist/composition/owned-ui.js +40 -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 +73 -0
- package/dist/{src/features → features}/owned-ui/customization.d.ts +1 -1
- package/dist/{src/features → features}/owned-ui/customization.js +1 -1
- package/dist/{src/features → features}/owned-ui/diagnostics.d.ts +1 -1
- package/dist/{src/features → features}/owned-ui/run.d.ts +2 -2
- package/dist/{src/features → features}/owned-ui/settings-app.d.ts +3 -3
- package/dist/{src/features → features}/owned-ui/settings-app.js +1 -1
- package/dist/{src/features → features}/workspace/capabilities.d.ts +1 -1
- package/dist/{src/features → features}/workspace/reducer.d.ts +1 -1
- package/dist/{src/features → features}/workspace/reducer.js +1 -1
- package/dist/{src/features → features}/workspace/router.d.ts +1 -1
- package/dist/{src/features → features}/workspace/store.d.ts +1 -1
- package/dist/{src/foundation → foundation}/launch-guardian/main.js +8 -2
- package/dist/foundation/lifecycle/paths.d.ts +28 -0
- package/dist/{src/foundation → foundation}/lifecycle/paths.js +21 -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/{src/foundation → foundation}/release/bootstrap.js +42 -10
- package/dist/foundation/release/endpoints.d.ts +20 -0
- package/dist/foundation/release/endpoints.js +50 -0
- package/dist/{src/foundation → foundation}/release/index.d.ts +1 -0
- package/dist/{src/foundation → foundation}/release/index.js +1 -0
- package/dist/{src/foundation → foundation}/release/release-gc.d.ts +4 -1
- package/dist/{src/foundation → foundation}/release/release-gc.js +9 -1
- package/dist/{src/foundation → foundation}/release/update.d.ts +9 -1
- package/dist/{src/foundation → foundation}/release/update.js +69 -35
- package/dist/{src/foundation → foundation}/storage/control-store.d.ts +1 -1
- package/dist/{src/foundation → foundation}/storage/control-store.js +1 -1
- package/dist/{src/foundation → foundation}/structured-agent-runtime/backpressure.d.ts +1 -1
- package/dist/{src/foundation → foundation}/structured-agent-runtime/backpressure.js +1 -1
- package/dist/{src/foundation → foundation}/structured-agent-runtime/commands.d.ts +1 -1
- package/dist/{src/foundation → foundation}/structured-agent-runtime/commands.js +1 -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 +1 -1
- package/dist/{src/foundation → foundation}/structured-agent-runtime/reconnection.js +1 -1
- package/dist/{src/foundation → foundation}/structured-agent-runtime/state.d.ts +1 -1
- package/dist/{src/foundation → foundation}/structured-agent-runtime/state.js +1 -1
- package/dist/foundation/supervision/index.d.ts +3 -0
- package/dist/foundation/supervision/index.js +3 -0
- package/dist/{src/foundation → foundation}/supervision/main.js +11 -5
- 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 +18 -1
- package/dist/{src/foundation → foundation}/supervision/server.js +52 -1
- 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.js +2 -2
- 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 +1 -1
- package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/shell-presenters-transcript.d.ts +1 -1
- package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/shell-presenters-transcript.js +1 -1
- package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/shell-selectors-dialogs.d.ts +1 -1
- package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/shell-shared-facade.d.ts +1 -1
- 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 +2 -2
- package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/adapter.js +113 -16
- package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/conformance.js +2 -2
- package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/model-auth-integration.d.ts +1 -1
- 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 +1 -1
- package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/resource-extension-integration.d.ts +1 -1
- package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/session-integration.d.ts +1 -1
- package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/session-integration.js +1 -1
- package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/settings-integration.d.ts +1 -1
- package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/workflow-controllers.d.ts +1 -1
- package/dist/{src/foundation/pi-owned-ui-integration → integrations/pi/owned-ui}/route-host.d.ts +1 -1
- package/dist/{src/foundation/pi-owned-ui-integration/session-shell.d.ts → integrations/pi/owned-ui/session-shell-root.d.ts} +13 -46
- package/dist/integrations/pi/owned-ui/session-shell-root.js +722 -0
- package/dist/integrations/pi/owned-ui/session-shell.d.ts +46 -0
- package/dist/{src/foundation/pi-owned-ui-integration → integrations/pi/owned-ui}/session-shell.js +24 -704
- 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 +1 -1
- package/dist/native/linux-x64/manifest.json +1 -1
- package/dist/native/win32-x64/manifest.json +2 -2
- package/dist/native/win32-x64/process-guardian.exe +0 -0
- package/dist/{src/foundation/ui-apps → ui/apps}/contracts.d.ts +1 -1
- package/dist/{src/foundation/ui-apps → ui/apps}/host.d.ts +1 -1
- package/dist/{src/foundation/ui-apps → ui/apps}/host.js +1 -1
- package/dist/{src/foundation/owned-ui-settings → ui/settings}/session.d.ts +1 -1
- package/docs/architecture/boundaries.md +8 -8
- package/docs/architecture/project-structure.md +52 -29
- package/docs/architecture/toolchain.md +5 -5
- package/docs/ci-release-runbook.md +76 -79
- package/docs/features/launch-profiles.md +7 -9
- package/docs/manual-owned-ui-checkpoint.md +52 -0
- package/docs/manual-terminal-colour-check.md +1 -1
- package/package.json +24 -22
- package/dist/src/composition/index.d.ts +0 -48
- package/dist/src/composition/index.js +0 -258
- package/dist/src/foundation/lifecycle/paths.d.ts +0 -10
- package/dist/src/foundation/supervision/index.d.ts +0 -3
- package/dist/src/foundation/supervision/index.js +0 -3
- package/dist/src/foundation/supervision/paths.d.ts +0 -1
- package/dist/src/foundation/supervision/paths.js +0 -1
- package/docs/manual-transparent-checkpoint.md +0 -53
- /package/dist/{src/cli → cli}/capabilities.d.ts +0 -0
- /package/dist/{src/cli → cli}/capabilities.js +0 -0
- /package/dist/{src/cli → cli}/dispatch.d.ts +0 -0
- /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-stats.d.ts +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.d.ts +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-validation.js +0 -0
- /package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/domain.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.d.ts +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.d.ts +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/owned-ui-contracts → contracts/owned-ui}/validation.js +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/development-launch.js +0 -0
- /package/dist/{src/features → features}/launch/index.d.ts +0 -0
- /package/dist/{src/features → features}/launch/index.js +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/intent.d.ts +0 -0
- /package/dist/{src/features → features}/launch/intent.js +0 -0
- /package/dist/{src/features → features}/launch/prepare-launch.d.ts +0 -0
- /package/dist/{src/features → features}/launch/prepare-launch.js +0 -0
- /package/dist/{src/features → features}/launch/profile-paths.d.ts +0 -0
- /package/dist/{src/features → features}/launch/profile-paths.js +0 -0
- /package/dist/{src/features → features}/launch/profiles.d.ts +0 -0
- /package/dist/{src/features → features}/launch/profiles.js +0 -0
- /package/dist/{src/features → features}/launch/runtime-selection.d.ts +0 -0
- /package/dist/{src/features → features}/launch/runtime-selection.js +0 -0
- /package/dist/{src/features → features}/owned-ui/diagnostics.js +0 -0
- /package/dist/{src/features → features}/owned-ui/index.d.ts +0 -0
- /package/dist/{src/features → features}/owned-ui/index.js +0 -0
- /package/dist/{src/features → features}/owned-ui/run.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/features → features}/workspace/router.js +0 -0
- /package/dist/{src/features → features}/workspace/store.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}/launch-guardian/main.d.ts +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/index.d.ts +0 -0
- /package/dist/{src/foundation → foundation}/lifecycle/index.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}/lifecycle/model.d.ts +0 -0
- /package/dist/{src/foundation → foundation}/lifecycle/model.js +0 -0
- /package/dist/{src/foundation → foundation}/native-host-protocol/codec.d.ts +0 -0
- /package/dist/{src/foundation → foundation}/native-host-protocol/codec.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}/process-containment/index.d.ts +0 -0
- /package/dist/{src/foundation → foundation}/process-containment/index.js +0 -0
- /package/dist/{src/foundation → foundation}/process-containment/linux-process-inspector.d.ts +0 -0
- /package/dist/{src/foundation → foundation}/process-containment/linux-process-inspector.js +0 -0
- /package/dist/{src/foundation → foundation}/process-containment/native-guardian-containment.d.ts +0 -0
- /package/dist/{src/foundation → foundation}/process-containment/native-guardian-containment.js +0 -0
- /package/dist/{src/foundation → foundation}/process-containment/windows-process-inspector.d.ts +0 -0
- /package/dist/{src/foundation → foundation}/process-containment/windows-process-inspector.js +0 -0
- /package/dist/{src/foundation → foundation}/protocol/client.d.ts +0 -0
- /package/dist/{src/foundation → foundation}/protocol/client.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}/protocol/messages.d.ts +0 -0
- /package/dist/{src/foundation → foundation}/protocol/messages.js +0 -0
- /package/dist/{src/foundation → foundation}/release/bootstrap.d.ts +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/cohort-state.d.ts +0 -0
- /package/dist/{src/foundation → foundation}/release/cohort-state.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/release-store.d.ts +0 -0
- /package/dist/{src/foundation → foundation}/release/release-store.js +0 -0
- /package/dist/{src/foundation → foundation}/release/release.d.ts +0 -0
- /package/dist/{src/foundation → foundation}/release/release.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}/release/update-transaction.d.ts +0 -0
- /package/dist/{src/foundation → foundation}/release/update-transaction.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 → foundation}/supervision/main.d.ts +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}/conformance.d.ts +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/index.d.ts +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/index.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-components.d.ts +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/shell-components.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-editor-autocomplete.js +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}/shell-footer-status.js +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/shell-selectors-dialogs.js +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/shell-shared-facade.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/adjacent/core/keybindings.d.ts +0 -0
- /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/adjacent/core/keybindings.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}/conformance.d.ts +0 -0
- /package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/index.d.ts +0 -0
- /package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/index.js +0 -0
- /package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/model-auth-integration.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}/resource-extension-integration.js +0 -0
- /package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/runtime-integration.d.ts +0 -0
- /package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/runtime-integration.js +0 -0
- /package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/settings-integration.js +0 -0
- /package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/workflow-controllers.js +0 -0
- /package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/workflows.d.ts +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/owned-ui}/index.d.ts +0 -0
- /package/dist/{src/foundation/pi-owned-ui-integration → integrations/pi/owned-ui}/index.js +0 -0
- /package/dist/{src/foundation/pi-owned-ui-integration → integrations/pi/owned-ui}/route-host.js +0 -0
- /package/dist/{src/foundation/pi-tui-runtime-adapter → integrations/pi/tui-runtime}/adapter.d.ts +0 -0
- /package/dist/{src/foundation/pi-tui-runtime-adapter → integrations/pi/tui-runtime}/adapter.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.d.ts +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}/index.d.ts +0 -0
- /package/dist/{src/foundation/pi-tui-runtime-adapter → integrations/pi/tui-runtime}/index.js +0 -0
- /package/dist/{src/foundation/pi-tui-runtime-adapter → integrations/pi/tui-runtime}/presentation-adapter.js +0 -0
- /package/dist/{src/product-identity.d.ts → product-identity.d.ts} +0 -0
- /package/dist/{src/product-identity.js → product-identity.js} +0 -0
- /package/dist/{src/product-identity.json → product-identity.json} +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-apps → ui/apps}/registry.d.ts +0 -0
- /package/dist/{src/foundation/ui-apps → ui/apps}/registry.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}/dialog-panel.js +0 -0
- /package/dist/{src/foundation/ui-components → ui/components}/frame.d.ts +0 -0
- /package/dist/{src/foundation/ui-components → ui/components}/frame.js +0 -0
- /package/dist/{src/foundation/ui-components → ui/components}/index.d.ts +0 -0
- /package/dist/{src/foundation/ui-components → ui/components}/index.js +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}/line-input.d.ts +0 -0
- /package/dist/{src/foundation/ui-components → ui/components}/line-input.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}/list-view.d.ts +0 -0
- /package/dist/{src/foundation/ui-components → ui/components}/list-view.js +0 -0
- /package/dist/{src/foundation/ui-components → ui/components}/mouse.d.ts +0 -0
- /package/dist/{src/foundation/ui-components → ui/components}/mouse.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}/scrollbar.d.ts +0 -0
- /package/dist/{src/foundation/ui-components → ui/components}/scrollbar.js +0 -0
- /package/dist/{src/foundation/ui-components → ui/components}/shortcuts.d.ts +0 -0
- /package/dist/{src/foundation/ui-components → ui/components}/shortcuts.js +0 -0
- /package/dist/{src/foundation/ui-components → ui/components}/spans.d.ts +0 -0
- /package/dist/{src/foundation/ui-components → ui/components}/spans.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}/surface.d.ts +0 -0
- /package/dist/{src/foundation/ui-components → ui/components}/surface.js +0 -0
- /package/dist/{src/foundation/ui-components → ui/components}/text.d.ts +0 -0
- /package/dist/{src/foundation/ui-components → ui/components}/text.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}/declarations.d.ts +0 -0
- /package/dist/{src/foundation/owned-ui-settings → ui/settings}/declarations.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}/migrations.d.ts +0 -0
- /package/dist/{src/foundation/owned-ui-settings → ui/settings}/migrations.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
- /package/dist/{src/foundation/owned-ui-settings → ui/settings}/sections.d.ts +0 -0
- /package/dist/{src/foundation/owned-ui-settings → ui/settings}/sections.js +0 -0
- /package/dist/{src/foundation/owned-ui-settings → ui/settings}/session.js +0 -0
- /package/dist/{src/foundation/owned-ui-settings → ui/settings}/store.d.ts +0 -0
- /package/dist/{src/foundation/owned-ui-settings → ui/settings}/store.js +0 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { SETTINGS_APP_ID, SETTINGS_ROUTE, SettingsApp } from "../features/owned-ui/index.js";
|
|
2
|
+
import { piTheme } from "../integrations/pi/components/index.js";
|
|
3
|
+
import { UiAppHost, UiAppRegistry } from "../ui/apps/index.js";
|
|
4
|
+
import { faint } from "../ui/components/index.js";
|
|
5
|
+
/**
|
|
6
|
+
* Registers the A1-owned screens and adapts the app host to the shell's route
|
|
7
|
+
* seam. The shell mounts whatever surface it is handed and forwards keys; it
|
|
8
|
+
* never learns what an app is.
|
|
9
|
+
*/
|
|
10
|
+
export function createOwnedRouteHost(settings) {
|
|
11
|
+
const registry = new UiAppRegistry();
|
|
12
|
+
registry.register({ id: SETTINGS_APP_ID, route: SETTINGS_ROUTE, create: () => new SettingsApp(settings) });
|
|
13
|
+
return {
|
|
14
|
+
claims: route => registry.forRoute(route) !== null,
|
|
15
|
+
open: route => {
|
|
16
|
+
const registration = registry.forRoute(route);
|
|
17
|
+
if (registration === null)
|
|
18
|
+
return null;
|
|
19
|
+
let size = { width: 80, height: 24 };
|
|
20
|
+
let frame = [];
|
|
21
|
+
let closed = false;
|
|
22
|
+
let onRender = () => undefined;
|
|
23
|
+
let onExit = () => undefined;
|
|
24
|
+
const host = new UiAppHost({
|
|
25
|
+
registry,
|
|
26
|
+
closeOnInterrupt: true,
|
|
27
|
+
theme: pinnedTheme(),
|
|
28
|
+
surface: {
|
|
29
|
+
size: () => size,
|
|
30
|
+
requestRender: () => onRender(),
|
|
31
|
+
exit: () => onExit(),
|
|
32
|
+
present: lines => {
|
|
33
|
+
if (lines === null)
|
|
34
|
+
closed = true;
|
|
35
|
+
else
|
|
36
|
+
frame = lines;
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
host.open(registration.id);
|
|
41
|
+
const surface = {
|
|
42
|
+
id: registration.id,
|
|
43
|
+
render: (width, height) => {
|
|
44
|
+
size = { width, height };
|
|
45
|
+
host.render();
|
|
46
|
+
return frame.length === height ? frame : [...frame.slice(0, height), ...Array(Math.max(0, height - frame.length)).fill("")];
|
|
47
|
+
},
|
|
48
|
+
handleInput: data => host.handleInput(data).consumed,
|
|
49
|
+
handleMouse: event => host.handleMouse(event).consumed,
|
|
50
|
+
isClosed: () => closed || !host.isPresenting,
|
|
51
|
+
close: () => host.close(),
|
|
52
|
+
onRenderRequested: listener => { onRender = listener; },
|
|
53
|
+
onExitRequested: listener => { onExit = listener; },
|
|
54
|
+
};
|
|
55
|
+
return surface;
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
/** Maps A1 UI tokens onto the pinned Pi theme so owned screens match the shell. */
|
|
60
|
+
function pinnedTheme() {
|
|
61
|
+
return {
|
|
62
|
+
fg: (token, text) => piTheme().fg(token, text),
|
|
63
|
+
bold: (text) => piTheme().bold(text),
|
|
64
|
+
// Unpainted, so a list reads against the terminal the reader actually has
|
|
65
|
+
// rather than against the background the configured theme was built for.
|
|
66
|
+
plain: (text) => text,
|
|
67
|
+
// Quiet, and quieter again: the terminal's own faint attribute over the
|
|
68
|
+
// dimmest colour the theme has.
|
|
69
|
+
disabled: (text) => faint(piTheme().fg("dim", text)),
|
|
70
|
+
highlight: (text) => `[48;2;82;82;82m[97m${text}[39m[49m`,
|
|
71
|
+
panel: (text) => `[48;2;55;55;55m${text}[49m`,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type OwnedUiCommand, type OwnedUiCustomization, type OwnedUiSlotId, type OwnedUiTranscriptBlock } from "../../
|
|
1
|
+
import { type OwnedUiCommand, type OwnedUiCustomization, type OwnedUiSlotId, type OwnedUiTranscriptBlock } from "../../contracts/owned-ui/index.js";
|
|
2
2
|
export interface OwnedUiSlotImplementation {
|
|
3
3
|
readonly payload: unknown;
|
|
4
4
|
render?(input: unknown, width: number): readonly string[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OwnedUiDiagnostics } from "../../
|
|
1
|
+
import type { OwnedUiDiagnostics } from "../../contracts/owned-ui/index.js";
|
|
2
2
|
export interface OwnedUiFrameObservation {
|
|
3
3
|
readonly requestedFrames: number;
|
|
4
4
|
readonly presentedFrames: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { OwnedUiApplicationPort } from "../../
|
|
2
|
-
import type { OwnedUiSettingsSession } from "../../
|
|
1
|
+
import type { OwnedUiApplicationPort } from "../../contracts/presentation/index.js";
|
|
2
|
+
import type { OwnedUiSettingsSession } from "../../ui/settings/index.js";
|
|
3
3
|
export interface OwnedUiRunOptions {
|
|
4
4
|
readonly application: OwnedUiApplicationPort;
|
|
5
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { AppHostServices, UiApp } from "../../
|
|
2
|
-
import { ShortcutRegistry, type PaneInputResult, type PaneMouseEvent, type PaneRect } from "../../
|
|
3
|
-
import type { OwnedUiSettingsSession } from "../../
|
|
1
|
+
import type { AppHostServices, UiApp } from "../../ui/apps/index.js";
|
|
2
|
+
import { ShortcutRegistry, type PaneInputResult, type PaneMouseEvent, type PaneRect } from "../../ui/components/index.js";
|
|
3
|
+
import type { OwnedUiSettingsSession } from "../../ui/settings/index.js";
|
|
4
4
|
export declare const SETTINGS_APP_ID = "settings";
|
|
5
5
|
export declare const SETTINGS_ROUTE = "settings";
|
|
6
6
|
type Action = "move-up" | "move-down" | "block-up" | "block-down" | "first" | "last" | "page-up" | "page-down" | "previous-value" | "next-value" | "activate" | "open-filter" | "close" | "part-previous" | "part-next" | "part-change";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GLOBAL_SCOPE, LineInput, PLAIN_THEME, ShortcutRegistry, PROMPT_GLYPH, blockJumpTarget, dialogValueColumn, numericValues, RAIL_COLUMNS, renderDialogPanel, renderEmptyState, renderGroupHeader, renderInputRow, renderStatusLine, renderListRow, renderNote, dialogRowAt, menuRowAt, regionAt, renderValueMenu, withScrollbarRail, stepperEnds, steppedValue, valueColumnFor, valueMenuFrame, promptRule, caretCell, blockRowSpan, displayWidth, faint, handleLineInputKey, humanizeLabel, humanizeTitle, indexOfKey, isThumbRow, layoutList, moveSelection, rowKey, scrollForSelection, scrollbarGeometry, selectableIndexes, } from "../../
|
|
1
|
+
import { GLOBAL_SCOPE, LineInput, PLAIN_THEME, ShortcutRegistry, PROMPT_GLYPH, blockJumpTarget, dialogValueColumn, numericValues, RAIL_COLUMNS, renderDialogPanel, renderEmptyState, renderGroupHeader, renderInputRow, renderStatusLine, renderListRow, renderNote, dialogRowAt, menuRowAt, regionAt, renderValueMenu, withScrollbarRail, stepperEnds, steppedValue, valueColumnFor, valueMenuFrame, promptRule, caretCell, blockRowSpan, displayWidth, faint, handleLineInputKey, humanizeLabel, humanizeTitle, indexOfKey, isThumbRow, layoutList, moveSelection, rowKey, scrollForSelection, scrollbarGeometry, selectableIndexes, } from "../../ui/components/index.js";
|
|
2
2
|
export const SETTINGS_APP_ID = "settings";
|
|
3
3
|
export const SETTINGS_ROUTE = "settings";
|
|
4
4
|
const SCOPE = SETTINGS_APP_ID;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ManagedAgentDescriptor } from "../../
|
|
1
|
+
import type { ManagedAgentDescriptor } from "../../contracts/workspace/index.js";
|
|
2
2
|
export type WorkspaceCapabilityAction = {
|
|
3
3
|
readonly type: "structured-command";
|
|
4
4
|
readonly command: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ManagedAgentDescriptor } from "../../
|
|
1
|
+
import { type ManagedAgentDescriptor } from "../../contracts/workspace/index.js";
|
|
2
2
|
export interface WorkspaceAgentFailure {
|
|
3
3
|
readonly code: string;
|
|
4
4
|
readonly message: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { assertManagedAgentDescriptor, } from "../../
|
|
1
|
+
import { assertManagedAgentDescriptor, } from "../../contracts/workspace/index.js";
|
|
2
2
|
const REMOVABLE_STATES = new Set(["stopped", "failed", "discontinuous"]);
|
|
3
3
|
export class WorkspaceReducer {
|
|
4
4
|
workspaceId;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type StructuredCommandRecord } from "../../foundation/structured-agent-runtime/index.js";
|
|
2
|
-
import type { ManagedAgentDescriptor } from "../../
|
|
2
|
+
import type { ManagedAgentDescriptor } from "../../contracts/workspace/index.js";
|
|
3
3
|
import { WorkspaceReducer, type WorkspaceAgentState, type WorkspaceView } from "./reducer.js";
|
|
4
4
|
export interface RoutedStructuredCommand {
|
|
5
5
|
readonly agentId: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AgentRecoveryAuthority, RecoveryReferenceId } from "../../
|
|
1
|
+
import type { AgentRecoveryAuthority, RecoveryReferenceId } from "../../contracts/workspace/index.js";
|
|
2
2
|
import { WorkspaceReducer, type WorkspaceView } from "./reducer.js";
|
|
3
3
|
export declare class WorkspaceStore {
|
|
4
4
|
#private;
|
|
@@ -4,7 +4,7 @@ import { resolve } from "node:path";
|
|
|
4
4
|
import { assertLaunchProfileId } from "../lifecycle/index.js";
|
|
5
5
|
import { closeVerifiedContainment, LinuxNativeProcessInspector, NativeGuardianContainment, resolveProcessGuardianPath, verifyProcessGuardianArtifact, WindowsNativeProcessInspector, } from "../process-containment/index.js";
|
|
6
6
|
import { SupervisorClient } from "../protocol/index.js";
|
|
7
|
-
import { resolveProductPaths } from "../supervision/index.js";
|
|
7
|
+
import { resolveCohortEndpoint, resolveProductPaths } from "../supervision/index.js";
|
|
8
8
|
export async function runLaunchGuardian(options) {
|
|
9
9
|
assertLaunchProfileId(options.profileId);
|
|
10
10
|
const environment = { ...(options.environment ?? process.env) };
|
|
@@ -17,7 +17,13 @@ export async function runLaunchGuardian(options) {
|
|
|
17
17
|
if (!guardianIdentity)
|
|
18
18
|
throw diagnosticError("launch guardian cannot verify its own native process identity", "PROCESS_IDENTITY_UNAVAILABLE");
|
|
19
19
|
const client = options.control ?? new SupervisorClient(environment[PRODUCT_IDENTITY.environment.releaseId]);
|
|
20
|
-
|
|
20
|
+
// An instance belongs to the cohort that launched it and talks to that cohort's endpoint
|
|
21
|
+
// for its whole life, whatever release becomes the active one meanwhile.
|
|
22
|
+
const releaseId = environment[PRODUCT_IDENTITY.environment.releaseId];
|
|
23
|
+
const endpoint = releaseId
|
|
24
|
+
? resolveCohortEndpoint(paths, releaseId, environment).endpoint
|
|
25
|
+
: paths.endpoint;
|
|
26
|
+
await client.connect(endpoint);
|
|
21
27
|
const containment = options.containment ?? new NativeGuardianContainment(instanceId, helperPath, resolve(paths.runtimeDir, "launch-instances", `${instanceId}.ready.json`));
|
|
22
28
|
const stop = stopRequests(client, instanceId);
|
|
23
29
|
let rootIdentity = null;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface ProductPaths {
|
|
2
|
+
readonly configDir: string;
|
|
3
|
+
readonly dataDir: string;
|
|
4
|
+
readonly runtimeDir: string;
|
|
5
|
+
readonly databasePath: string;
|
|
6
|
+
/** The endpoint written by releases that predate cohort-scoped identity. */
|
|
7
|
+
readonly endpoint: string;
|
|
8
|
+
/** The metadata written by releases that predate cohort-scoped identity. */
|
|
9
|
+
readonly endpointMetadataPath: string;
|
|
10
|
+
readonly endpointsDir: string;
|
|
11
|
+
readonly supervisorLogPath: string;
|
|
12
|
+
}
|
|
13
|
+
/** Where one cohort listens, and where it records that it is listening. */
|
|
14
|
+
export interface CohortEndpointPaths {
|
|
15
|
+
readonly endpoint: string;
|
|
16
|
+
readonly endpointMetadataPath: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Endpoint identity for one release cohort. Two cohorts can be live at once — an update
|
|
20
|
+
* leaves a working session on the release it started on — so the name a supervisor listens
|
|
21
|
+
* on has to name the release as well as the runtime directory, or the two contend for one
|
|
22
|
+
* endpoint and replacing one means ending the other.
|
|
23
|
+
*
|
|
24
|
+
* An explicit endpoint override keeps its single endpoint: it is how an isolated run pins
|
|
25
|
+
* the address it is going to talk to.
|
|
26
|
+
*/
|
|
27
|
+
export declare function resolveCohortEndpoint(paths: ProductPaths, releaseId: string, environment?: NodeJS.ProcessEnv, hostPlatform?: NodeJS.Platform): CohortEndpointPaths;
|
|
28
|
+
export declare function resolveProductPaths(environment?: NodeJS.ProcessEnv, hostPlatform?: NodeJS.Platform, fallbackHome?: string): ProductPaths;
|
|
@@ -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.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;
|
|
@@ -37,6 +57,7 @@ export function resolveProductPaths(environment = process.env, hostPlatform = pl
|
|
|
37
57
|
databasePath: path.resolve(databaseOverride ?? path.join(dataDir, PRODUCT_IDENTITY.endpoint.databaseFilename)),
|
|
38
58
|
endpoint,
|
|
39
59
|
endpointMetadataPath: path.join(runtimeDir, PRODUCT_IDENTITY.endpoint.metadataFilename),
|
|
60
|
+
endpointsDir: path.join(runtimeDir, "endpoints"),
|
|
40
61
|
supervisorLogPath: path.join(runtimeDir, PRODUCT_IDENTITY.endpoint.supervisorLogFilename),
|
|
41
62
|
};
|
|
42
63
|
}
|
|
@@ -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;
|
|
@@ -5,9 +5,10 @@ import { platform } from "node:os";
|
|
|
5
5
|
import { resolve } from "node:path";
|
|
6
6
|
import { selectCohortLaunch } from "./cohort-selection.js";
|
|
7
7
|
import { CohortStateStore } from "./cohort-state.js";
|
|
8
|
-
import { assertLaunchProfileId, resolveProductPaths } from "../lifecycle/index.js";
|
|
8
|
+
import { assertLaunchProfileId, resolveCohortEndpoint, resolveProductPaths } from "../lifecycle/index.js";
|
|
9
9
|
import { encodeFrame, LineFrameDecoder } from "../protocol/index.js";
|
|
10
10
|
import { cleanupProvenIdleOwner, processIsAlive } from "./process-cleanup.js";
|
|
11
|
+
import { sweepDeadEndpoints } from "./endpoints.js";
|
|
11
12
|
import { consumeMaterializationProof, materializeRelease, readCertifiedReleaseManifest, readMaterializedRelease, resolveReleaseEntryPoint, verifyMaterializedRelease } from "./release-store.js";
|
|
12
13
|
import { PRODUCT_IDENTITY, PRODUCT_TEXT } from "../../product-identity.js";
|
|
13
14
|
export async function runBootstrap(options) {
|
|
@@ -20,7 +21,27 @@ export async function runBootstrap(options) {
|
|
|
20
21
|
await mkdir(paths.runtimeDir, { recursive: true, mode: 0o700 });
|
|
21
22
|
const stateStore = new CohortStateStore(paths.dataDir);
|
|
22
23
|
let state = await stateStore.read();
|
|
23
|
-
|
|
24
|
+
// Records left by cohorts whose processes are gone say nothing about ownership, and there
|
|
25
|
+
// can now be several of them. Clearing them first keeps the decision below about what is
|
|
26
|
+
// actually running.
|
|
27
|
+
await sweepDeadEndpoints(paths).catch(() => []);
|
|
28
|
+
// Each cohort keeps its own endpoint, so a launch looks for the endpoint of the release it
|
|
29
|
+
// is about to run rather than for the one endpoint the runtime directory used to have.
|
|
30
|
+
const activeReleaseId = state.references.active;
|
|
31
|
+
let endpointPaths = activeReleaseId === null
|
|
32
|
+
? { endpoint: paths.endpoint, endpointMetadataPath: paths.endpointMetadataPath }
|
|
33
|
+
: resolveCohortEndpoint(paths, activeReleaseId, environment);
|
|
34
|
+
let endpoint = await readEndpointMetadata(endpointPaths.endpointMetadataPath);
|
|
35
|
+
if (endpoint === null) {
|
|
36
|
+
// A release that predates cohort-scoped endpoints published one endpoint for the whole
|
|
37
|
+
// runtime directory. Recognizing it is what lets a session started by that release keep
|
|
38
|
+
// working through the first launch that knows about cohorts.
|
|
39
|
+
const legacy = await readEndpointMetadata(paths.endpointMetadataPath);
|
|
40
|
+
if (legacy !== null) {
|
|
41
|
+
endpoint = legacy;
|
|
42
|
+
endpointPaths = { endpoint: paths.endpoint, endpointMetadataPath: paths.endpointMetadataPath };
|
|
43
|
+
}
|
|
44
|
+
}
|
|
24
45
|
let probe = endpoint ? await probeOwnership(endpoint) : "dead";
|
|
25
46
|
const installedVersion = await readInstalledVersion(options.packageRoot);
|
|
26
47
|
const activeId = state.references.active;
|
|
@@ -35,10 +56,11 @@ export async function runBootstrap(options) {
|
|
|
35
56
|
}
|
|
36
57
|
if (endpoint === null || probe === "dead") {
|
|
37
58
|
if (endpoint)
|
|
38
|
-
await removeEndpointArtifacts(
|
|
59
|
+
await removeEndpointArtifacts(endpointPaths.endpointMetadataPath, endpointPaths.endpoint);
|
|
39
60
|
const retained = await readMaterializedRelease(active.releaseRoot);
|
|
61
|
+
const retainedPaths = resolveCohortEndpoint(paths, retained.releaseId, environment);
|
|
40
62
|
await startSupervisor(retained, environment);
|
|
41
|
-
await waitForVerifiedEndpoint(
|
|
63
|
+
await waitForVerifiedEndpoint(retainedPaths.endpointMetadataPath, retained, 8_000);
|
|
42
64
|
return await launchUi(retained, environment);
|
|
43
65
|
}
|
|
44
66
|
}
|
|
@@ -51,7 +73,17 @@ export async function runBootstrap(options) {
|
|
|
51
73
|
await stateStore.activate(candidate.releaseId);
|
|
52
74
|
state = await stateStore.read();
|
|
53
75
|
}
|
|
54
|
-
endpoint
|
|
76
|
+
// The candidate's own endpoint decides whether this launch attaches or starts a supervisor.
|
|
77
|
+
// A cohort other than this one is not in the way: it listens somewhere else.
|
|
78
|
+
endpointPaths = resolveCohortEndpoint(paths, candidate.releaseId, environment);
|
|
79
|
+
endpoint = await readEndpointMetadata(endpointPaths.endpointMetadataPath);
|
|
80
|
+
if (endpoint === null) {
|
|
81
|
+
const legacy = await readEndpointMetadata(paths.endpointMetadataPath);
|
|
82
|
+
if (legacy !== null) {
|
|
83
|
+
endpoint = legacy;
|
|
84
|
+
endpointPaths = { endpoint: paths.endpoint, endpointMetadataPath: paths.endpointMetadataPath };
|
|
85
|
+
}
|
|
86
|
+
}
|
|
55
87
|
probe = endpoint ? await probeOwnership(endpoint) : "dead";
|
|
56
88
|
let decision = selectCohortLaunch(candidate, state, endpoint, probe);
|
|
57
89
|
if (decision.action === "blocked") {
|
|
@@ -64,11 +96,11 @@ export async function runBootstrap(options) {
|
|
|
64
96
|
await writeFile(resolve(paths.dataDir, `cleanup-${Date.now()}.json`), JSON.stringify(diagnostics, null, 2));
|
|
65
97
|
if (!diagnostics.terminated)
|
|
66
98
|
throw new Error(`could not safely clean stale ${PRODUCT_TEXT.displayName} supervisor ${endpoint.pid}`);
|
|
67
|
-
await removeEndpointArtifacts(
|
|
99
|
+
await removeEndpointArtifacts(endpointPaths.endpointMetadataPath, endpointPaths.endpoint);
|
|
68
100
|
decision = selectCohortLaunch(candidate, await stateStore.read(), null, "dead");
|
|
69
101
|
}
|
|
70
102
|
else if (endpoint && probe === "dead") {
|
|
71
|
-
await removeEndpointArtifacts(
|
|
103
|
+
await removeEndpointArtifacts(endpointPaths.endpointMetadataPath, endpointPaths.endpoint);
|
|
72
104
|
}
|
|
73
105
|
if (decision.action === "launch-retained-ui") {
|
|
74
106
|
const retained = await verifyMaterializedRelease(decision.releaseRoot, undefined, resolve(paths.dataDir, "releases"));
|
|
@@ -94,7 +126,7 @@ export async function runBootstrap(options) {
|
|
|
94
126
|
output.write(`${PRODUCT_TEXT.diagnostic("could not complete bounded idle cohort shutdown; the candidate remains pending.")}\n`);
|
|
95
127
|
return 1;
|
|
96
128
|
}
|
|
97
|
-
await removeEndpointArtifacts(
|
|
129
|
+
await removeEndpointArtifacts(endpointPaths.endpointMetadataPath, endpointPaths.endpoint);
|
|
98
130
|
await stateStore.activate(candidate.releaseId);
|
|
99
131
|
decision = { action: "activate-candidate", releaseId: candidate.releaseId, releaseRoot: candidate.releaseRoot, reason: "idle cohort released ownership" };
|
|
100
132
|
}
|
|
@@ -113,7 +145,7 @@ export async function runBootstrap(options) {
|
|
|
113
145
|
selected = await readMaterializedRelease(decision.releaseRoot);
|
|
114
146
|
}
|
|
115
147
|
await startSupervisor(selected, environment);
|
|
116
|
-
await waitForVerifiedEndpoint(paths.endpointMetadataPath, selected, 8_000);
|
|
148
|
+
await waitForVerifiedEndpoint(resolveCohortEndpoint(paths, selected.releaseId, environment).endpointMetadataPath, selected, 8_000);
|
|
117
149
|
return await launchUi(selected, environment);
|
|
118
150
|
}
|
|
119
151
|
async function readInstalledVersion(packageRoot) {
|
|
@@ -274,7 +306,7 @@ async function activatePendingAfterBlockerExit(candidate, stateStore, paths, env
|
|
|
274
306
|
await removeEndpointArtifacts(paths.endpointMetadataPath, paths.endpoint);
|
|
275
307
|
await stateStore.activate(candidate.releaseId);
|
|
276
308
|
await startSupervisor(candidate, environment);
|
|
277
|
-
await waitForVerifiedEndpoint(paths.endpointMetadataPath, candidate, 8_000);
|
|
309
|
+
await waitForVerifiedEndpoint(resolveCohortEndpoint(paths, candidate.releaseId, environment).endpointMetadataPath, candidate, 8_000);
|
|
278
310
|
}
|
|
279
311
|
export async function releaseVerifiedIdleOwner(metadata, dataDir, operations = {}) {
|
|
280
312
|
try {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { SupervisorEndpointMetadata } from "./cohort-state.js";
|
|
2
|
+
import type { CohortEndpointPaths, ProductPaths } from "../lifecycle/index.js";
|
|
3
|
+
export interface RecordedEndpoint {
|
|
4
|
+
readonly metadata: SupervisorEndpointMetadata;
|
|
5
|
+
readonly paths: CohortEndpointPaths;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Every endpoint recorded under this runtime directory: one per cohort, plus the single
|
|
9
|
+
* endpoint published by releases that predate cohort-scoped identity. More than one can be
|
|
10
|
+
* live at a time, and each is validated on its own identity rather than by being the only one.
|
|
11
|
+
*/
|
|
12
|
+
export declare function listRecordedEndpoints(paths: ProductPaths): Promise<readonly RecordedEndpoint[]>;
|
|
13
|
+
/**
|
|
14
|
+
* Removes the records of cohorts whose processes are gone. A record left by a cohort that
|
|
15
|
+
* exited without cleaning up is not evidence of ownership, and a later launch should not have
|
|
16
|
+
* to reason about it. Returns the release ids whose records were removed.
|
|
17
|
+
*/
|
|
18
|
+
export declare function sweepDeadEndpoints(paths: ProductPaths): Promise<readonly string[]>;
|
|
19
|
+
/** The releases that a live cohort is running from, and so must be retained. */
|
|
20
|
+
export declare function liveReleaseIds(paths: ProductPaths): Promise<readonly string[]>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { readdir } from "node:fs/promises";
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
import { readEndpointMetadata, removeEndpointArtifacts } from "./bootstrap.js";
|
|
4
|
+
import { processIsAlive } from "./process-cleanup.js";
|
|
5
|
+
/**
|
|
6
|
+
* Every endpoint recorded under this runtime directory: one per cohort, plus the single
|
|
7
|
+
* endpoint published by releases that predate cohort-scoped identity. More than one can be
|
|
8
|
+
* live at a time, and each is validated on its own identity rather than by being the only one.
|
|
9
|
+
*/
|
|
10
|
+
export async function listRecordedEndpoints(paths) {
|
|
11
|
+
const recorded = [];
|
|
12
|
+
const legacy = await readEndpointMetadata(paths.endpointMetadataPath);
|
|
13
|
+
if (legacy) {
|
|
14
|
+
recorded.push({ metadata: legacy, paths: { endpoint: paths.endpoint, endpointMetadataPath: paths.endpointMetadataPath } });
|
|
15
|
+
}
|
|
16
|
+
const names = await readdir(paths.endpointsDir).catch(() => []);
|
|
17
|
+
for (const name of names) {
|
|
18
|
+
if (!name.endsWith(".json"))
|
|
19
|
+
continue;
|
|
20
|
+
const endpointMetadataPath = resolve(paths.endpointsDir, name);
|
|
21
|
+
const metadata = await readEndpointMetadata(endpointMetadataPath);
|
|
22
|
+
if (metadata)
|
|
23
|
+
recorded.push({ metadata, paths: { endpoint: metadata.endpoint, endpointMetadataPath } });
|
|
24
|
+
}
|
|
25
|
+
return recorded;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Removes the records of cohorts whose processes are gone. A record left by a cohort that
|
|
29
|
+
* exited without cleaning up is not evidence of ownership, and a later launch should not have
|
|
30
|
+
* to reason about it. Returns the release ids whose records were removed.
|
|
31
|
+
*/
|
|
32
|
+
export async function sweepDeadEndpoints(paths) {
|
|
33
|
+
const swept = [];
|
|
34
|
+
for (const recorded of await listRecordedEndpoints(paths)) {
|
|
35
|
+
if (processIsAlive(recorded.metadata.pid))
|
|
36
|
+
continue;
|
|
37
|
+
await removeEndpointArtifacts(recorded.paths.endpointMetadataPath, recorded.paths.endpoint);
|
|
38
|
+
swept.push(recorded.metadata.releaseId);
|
|
39
|
+
}
|
|
40
|
+
return swept;
|
|
41
|
+
}
|
|
42
|
+
/** The releases that a live cohort is running from, and so must be retained. */
|
|
43
|
+
export async function liveReleaseIds(paths) {
|
|
44
|
+
const live = [];
|
|
45
|
+
for (const recorded of await listRecordedEndpoints(paths)) {
|
|
46
|
+
if (processIsAlive(recorded.metadata.pid))
|
|
47
|
+
live.push(recorded.metadata.releaseId);
|
|
48
|
+
}
|
|
49
|
+
return live;
|
|
50
|
+
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { CohortStateStore } from "./cohort-state.js";
|
|
2
|
+
import type { ProductPaths } from "../lifecycle/index.js";
|
|
2
3
|
/** Remove only a release that has no active, pending, approval, rollback,
|
|
3
4
|
* retention, process, agent, or migration reference. State is detached first;
|
|
4
5
|
* a filesystem failure can leave a safe orphan but never a dangling selector. */
|
|
5
|
-
export declare function collectRelease(store: CohortStateStore, dataDir: string, releaseId: string, externalReferences: readonly string[]
|
|
6
|
+
export declare function collectRelease(store: CohortStateStore, dataDir: string, releaseId: string, externalReferences: readonly string[],
|
|
7
|
+
/** Where endpoints are recorded, so a release a live cohort runs from is retained. */
|
|
8
|
+
paths?: ProductPaths): Promise<void>;
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
import { rm } from "node:fs/promises";
|
|
2
2
|
import { resolve } from "node:path";
|
|
3
3
|
import { CohortStateStore } from "./cohort-state.js";
|
|
4
|
+
import { liveReleaseIds } from "./endpoints.js";
|
|
4
5
|
import { verifyMaterializedRelease } from "./release-store.js";
|
|
5
6
|
/** Remove only a release that has no active, pending, approval, rollback,
|
|
6
7
|
* retention, process, agent, or migration reference. State is detached first;
|
|
7
8
|
* a filesystem failure can leave a safe orphan but never a dangling selector. */
|
|
8
|
-
export async function collectRelease(store, dataDir, releaseId, externalReferences
|
|
9
|
+
export async function collectRelease(store, dataDir, releaseId, externalReferences,
|
|
10
|
+
/** Where endpoints are recorded, so a release a live cohort runs from is retained. */
|
|
11
|
+
paths) {
|
|
9
12
|
const state = await store.read();
|
|
10
13
|
const release = state.releases[releaseId];
|
|
11
14
|
if (!release)
|
|
12
15
|
throw new Error(`unknown release ${releaseId}`);
|
|
16
|
+
// A superseded cohort keeps working until its last session leaves, and it runs from this
|
|
17
|
+
// content while it does. Collecting it would pull the release out from under live work.
|
|
18
|
+
if (paths && (await liveReleaseIds(paths)).includes(releaseId)) {
|
|
19
|
+
throw new Error(`release ${releaseId} is still running a live cohort`);
|
|
20
|
+
}
|
|
13
21
|
await verifyMaterializedRelease(release.releaseRoot, undefined, resolve(dataDir, "releases"));
|
|
14
22
|
await store.removeUnreferencedRelease(releaseId, externalReferences);
|
|
15
23
|
await rm(release.releaseRoot, { recursive: true, force: false });
|
|
@@ -33,7 +33,7 @@ export interface UpdatePerformanceEvidence {
|
|
|
33
33
|
export interface SelfUpdateOptions {
|
|
34
34
|
packageRoot: string;
|
|
35
35
|
channel?: UpdateChannel;
|
|
36
|
-
/** A specific preview to install, named by its
|
|
36
|
+
/** A specific preview to install, named by its development number or full version. */
|
|
37
37
|
target?: string;
|
|
38
38
|
environment?: NodeJS.ProcessEnv;
|
|
39
39
|
fileSystem?: UpdateFileSystem;
|
|
@@ -77,6 +77,14 @@ export interface UpdateTransactionJournal {
|
|
|
77
77
|
clearCompleted(): Promise<void>;
|
|
78
78
|
}
|
|
79
79
|
export declare function createNpmProcessRunner(platform?: NodeJS.Platform): UpdateProcessRunner;
|
|
80
|
+
export type UpdateOwnershipAction = "clean-dead-record" | "leave-running" | "end-session";
|
|
81
|
+
/**
|
|
82
|
+
* What an update does about the owner it found. A cohort running from retained immutable
|
|
83
|
+
* content keeps its work: the installation replaces files it does not read, and it listens on
|
|
84
|
+
* its own endpoint. A cohort running from the mutable installation is the one exception,
|
|
85
|
+
* because that installation is exactly what is about to be replaced under it.
|
|
86
|
+
*/
|
|
87
|
+
export declare function planUpdateOwnership(ownership: "live-verified" | "dead", runsFromRetainedRelease: boolean): UpdateOwnershipAction;
|
|
80
88
|
export declare function createUpdateLifecycleCoordinator(environment?: NodeJS.ProcessEnv, fileSystem?: UpdateFileSystem, output?: UpdateOutput): UpdateLifecycleCoordinator;
|
|
81
89
|
export declare function runSelfUpdate(options: SelfUpdateOptions): Promise<number>;
|
|
82
90
|
export declare function assertUpdatePerformanceBudget(evidence: UpdatePerformanceEvidence, maximumPostNpmDurationMs?: number): void;
|