@timurproko/a1 0.1.8-dev.472 → 0.1.8-dev.508
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/bin/cli.js +4 -5
- package/bin/guardian.js +5 -1
- package/bin/module-identity.js +53 -98
- package/bin/module-resolver.js +138 -0
- package/bin/pinned-pi-public.js +25 -6
- package/bin/ui.js +7 -2
- package/bin/update-recovery.js +76 -7
- package/bin/warmup.js +3 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/clipboard-diagnostics.d.ts +1 -1
- package/dist/{integrations/pi/session-ui → app/session-shell}/clipboard-image.js +1 -1
- package/dist/app/session-shell/helper-pool.d.ts +33 -0
- package/dist/app/session-shell/helper-pool.js +98 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/image-preparation-client.d.ts +1 -1
- package/dist/{integrations/pi/session-ui → app/session-shell}/image-preparation-client.js +1 -1
- package/dist/{integrations/pi/session-ui → app/session-shell}/image-preparation.js +1 -1
- package/dist/{integrations/pi/session-ui → app/session-shell}/image-source.js +1 -1
- package/dist/{integrations/pi/session-ui → app/session-shell}/image-worker.js +1 -1
- package/dist/app/session-shell/index.d.ts +7 -0
- package/dist/app/session-shell/index.js +4 -0
- package/dist/app/session-shell/paste-executor.d.ts +18 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/paste-executor.js +50 -29
- package/dist/{integrations/pi/session-ui → app/session-shell}/paste-helper.js +1 -1
- package/dist/app/session-shell/paste-preparation-client.d.ts +31 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/paste-preparation-client.js +19 -8
- package/dist/{integrations/pi/session-ui → app/session-shell}/paste-protocol.d.ts +1 -1
- package/dist/{integrations/pi/session-ui → app/session-shell}/paste-protocol.js +1 -1
- package/dist/app/session-shell/paste-text-preparation.d.ts +6 -0
- package/dist/{integrations/pi/session-ui/paste-text-preparation.d.ts → app/session-shell/paste-types.d.ts} +1 -4
- package/dist/{integrations/pi/session-ui → app/session-shell}/path-chip-presentation.d.ts +1 -1
- package/dist/{integrations/pi/session-ui → app/session-shell}/prompt-chips.d.ts +5 -1
- package/dist/{integrations/pi/session-ui → app/session-shell}/prompt-chips.js +6 -2
- package/dist/{integrations/pi/session-ui → app/session-shell}/prompt-history-controller.d.ts +2 -2
- package/dist/{integrations/pi/session-ui → app/session-shell}/prompt-history-controller.js +2 -2
- package/dist/{integrations/pi/session-ui → app/session-shell}/prompt-suggestion-controller.d.ts +1 -1
- package/dist/{integrations/pi/session-ui → app/session-shell}/prompt-suggestion-controller.js +2 -2
- package/dist/{integrations/pi/session-ui → app/session-shell}/quit-outro.js +1 -1
- package/dist/{integrations/pi/session-ui → app/session-shell}/response-copy-coordinator.d.ts +1 -1
- package/dist/{integrations/pi/session-ui → app/session-shell}/response-copy-coordinator.js +3 -5
- package/dist/{integrations/pi/session-ui → app/session-shell}/response-copy-helper.js +1 -1
- package/dist/{integrations/pi/session-ui → app/session-shell}/response-copy-protocol.d.ts +1 -1
- package/dist/{integrations/pi/session-ui → app/session-shell}/response-copy-transport.d.ts +10 -2
- package/dist/{integrations/pi/session-ui → app/session-shell}/response-copy-transport.js +45 -19
- package/dist/{integrations/pi/session-ui → app/session-shell}/session-shell-root.d.ts +75 -53
- package/dist/{integrations/pi/session-ui → app/session-shell}/session-shell-root.js +30 -20
- package/dist/{integrations/pi/session-ui → app/session-shell}/session-shell.d.ts +9 -8
- package/dist/{integrations/pi/session-ui → app/session-shell}/session-shell.js +108 -67
- package/dist/{integrations/pi/session-ui → app/session-shell}/session-viewport-controller.d.ts +5 -5
- package/dist/{integrations/pi/session-ui → app/session-shell}/session-viewport-controller.js +5 -5
- package/dist/{integrations/pi/session-ui → app/session-shell}/system-clipboard.d.ts +1 -1
- package/dist/{integrations/pi/session-ui → app/session-shell}/system-clipboard.js +1 -1
- package/dist/cli/index.d.ts +8 -5
- package/dist/cli/index.js +4 -5
- package/dist/composition/index.d.ts +0 -1
- package/dist/composition/index.js +0 -1
- package/dist/composition/owned-ui.d.ts +2 -2
- package/dist/composition/owned-ui.js +35 -36
- package/dist/composition/settings-route-host.d.ts +2 -2
- package/dist/contracts/agent-engine/domain.d.ts +6 -1
- package/dist/contracts/agent-engine/index.d.ts +11 -8
- package/dist/contracts/agent-engine/index.js +6 -8
- package/dist/contracts/owned-ui/extension-ui.d.ts +8 -0
- package/dist/contracts/owned-ui/index.d.ts +12 -8
- package/dist/contracts/owned-ui/index.js +8 -8
- package/dist/features/launch/index.d.ts +12 -6
- package/dist/features/launch/index.js +6 -6
- package/dist/features/launch/intent.d.ts +5 -5
- package/dist/features/launch/intent.js +2 -2
- package/dist/features/owned-ui/index.d.ts +6 -6
- package/dist/features/owned-ui/index.js +4 -6
- package/dist/features/owned-ui/run.d.ts +2 -2
- package/dist/features/owned-ui/settings-app.d.ts +2 -2
- package/dist/features/owned-ui/settings-app.js +18 -5
- package/dist/features/prompt-history/service.d.ts +1 -1
- package/dist/features/prompt-history/service.js +1 -1
- package/dist/features/prompt-history/store.js +3 -7
- package/dist/features/prompt-suggestions/diagnostics.js +1 -1
- package/dist/features/prompt-suggestions/index.d.ts +2 -1
- package/dist/features/prompt-suggestions/index.js +1 -1
- package/dist/foundation/launch-guardian/index.d.ts +2 -1
- package/dist/foundation/launch-guardian/index.js +1 -1
- package/dist/foundation/lifecycle/index.d.ts +11 -6
- package/dist/foundation/lifecycle/index.js +5 -6
- package/dist/foundation/process-containment/index.d.ts +8 -6
- package/dist/foundation/process-containment/index.js +6 -6
- package/dist/foundation/process-containment/native-guardian-containment.js +3 -3
- package/dist/foundation/protocol/index.d.ts +3 -2
- package/dist/foundation/protocol/index.js +2 -2
- package/dist/foundation/release/bootstrap.d.ts +0 -4
- package/dist/foundation/release/bootstrap.js +1 -82
- package/dist/foundation/release/dependency-layer.d.ts +2 -5
- package/dist/foundation/release/endpoints.d.ts +4 -0
- package/dist/foundation/release/endpoints.js +86 -2
- package/dist/foundation/release/index.d.ts +30 -16
- package/dist/foundation/release/index.js +16 -16
- package/dist/foundation/release/release.d.ts +1 -1
- package/dist/foundation/release/types.d.ts +11 -0
- package/dist/foundation/release/types.js +1 -0
- package/dist/foundation/release/update-transaction.d.ts +1 -1
- package/dist/foundation/release/update.d.ts +2 -1
- package/dist/foundation/release/update.js +3 -18
- package/dist/foundation/startup/index.d.ts +4 -2
- package/dist/foundation/startup/index.js +2 -2
- package/dist/foundation/startup/startup-descriptor.js +2 -2
- package/dist/foundation/storage/control-store.d.ts +1 -45
- package/dist/foundation/storage/control-store.js +54 -277
- package/dist/foundation/storage/index.d.ts +1 -1
- package/dist/foundation/storage/index.js +1 -1
- package/dist/foundation/supervision/index.d.ts +2 -2
- package/dist/foundation/supervision/index.js +2 -2
- package/dist/foundation/supervision/server.d.ts +5 -10
- package/dist/foundation/supervision/server.js +7 -7
- package/dist/foundation/terminal-cleanup/index.d.ts +3 -2
- package/dist/foundation/terminal-cleanup/index.js +2 -2
- package/dist/integrations/pi/components/editor-interaction.d.ts +1 -1
- package/dist/integrations/pi/components/history-editor-loader.d.ts +1 -1
- package/dist/integrations/pi/components/index.d.ts +20 -13
- package/dist/integrations/pi/components/index.js +12 -13
- package/dist/integrations/pi/components/owned-editor-ux.js +5 -8
- package/dist/integrations/pi/components/resources/builtin-themes.d.ts +7 -5
- package/dist/integrations/pi/components/resources/builtin-themes.js +7 -5
- package/dist/integrations/pi/components/shell-editor-autocomplete.js +1 -1
- package/dist/integrations/pi/components/shell-extension-ui.js +2 -1
- package/dist/integrations/pi/components/shell-footer-status.js +1 -1
- package/dist/integrations/pi/components/shell-presenters-info.d.ts +1 -1
- package/dist/integrations/pi/components/shell-presenters-info.js +1 -1
- package/dist/integrations/pi/components/shell-presenters-transcript.js +1 -1
- package/dist/integrations/pi/components/shell-selectors-dialogs.d.ts +9 -3
- package/dist/integrations/pi/components/shell-selectors-dialogs.js +9 -6
- package/dist/integrations/pi/components/shell-shared-facade.d.ts +3 -1
- package/dist/integrations/pi/components/shell-shared-facade.js +4 -2
- package/dist/integrations/pi/components/submitted-prompt-adapter.d.ts +1 -1
- package/dist/integrations/pi/components/submitted-prompt-adapter.js +1 -1
- package/dist/integrations/pi/components/tool-image-presentation.d.ts +1 -1
- package/dist/integrations/pi/components/tool-image-presentation.js +4 -7
- package/dist/integrations/pi/components/upstream/adjacent/core/keybindings.d.ts +36 -22
- package/dist/integrations/pi/components/upstream/adjacent/core/keybindings.js +43 -7
- package/dist/integrations/pi/components/upstream/assets/earendil-image.json +2 -2
- package/dist/integrations/pi/components/upstream/components/countdown-timer.d.ts +6 -3
- package/dist/integrations/pi/components/upstream/components/daxnuts.d.ts +8 -1
- package/dist/integrations/pi/components/upstream/components/daxnuts.js +7 -3
- package/dist/integrations/pi/components/upstream/components/earendil-announcement.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/earendil-announcement.js +10 -4
- package/dist/integrations/pi/components/upstream/components/extension-editor.d.ts +7 -4
- package/dist/integrations/pi/components/upstream/components/extension-editor.js +7 -4
- package/dist/integrations/pi/components/upstream/components/mermaid.js +8 -4
- package/dist/integrations/pi/components/upstream/components/owned-editor.d.ts +9 -5
- package/dist/integrations/pi/components/upstream/components/owned-editor.js +10 -6
- package/dist/integrations/pi/components/upstream/components/scoped-models-selector.d.ts +8 -4
- package/dist/integrations/pi/components/upstream/components/scoped-models-selector.js +27 -25
- package/dist/integrations/pi/components/upstream/components/session-footer.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/session-footer.js +8 -10
- package/dist/integrations/pi/components/upstream/components/session-selector-search.js +6 -4
- package/dist/integrations/pi/components/upstream/components/session-selector.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/session-selector.js +8 -4
- package/dist/integrations/pi/components/upstream/components/skill-invocation-message.d.ts +7 -5
- package/dist/integrations/pi/components/upstream/components/skill-invocation-message.js +8 -6
- package/dist/integrations/pi/components/upstream/components/status-indicator.d.ts +9 -4
- package/dist/integrations/pi/components/upstream/components/status-indicator.js +15 -5
- package/dist/integrations/pi/components/upstream/components/tool-execution.d.ts +8 -2
- package/dist/integrations/pi/components/upstream/components/tool-execution.js +58 -37
- package/dist/integrations/pi/components/upstream/components/tree-selector.d.ts +7 -4
- package/dist/integrations/pi/components/upstream/components/tree-selector.js +7 -4
- package/dist/integrations/pi/components/upstream/components/trust-selector.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/trust-selector.js +10 -5
- package/dist/integrations/pi/components/upstream/external-editor.js +8 -4
- package/dist/integrations/pi/components/upstream/history/editor-core.d.ts +13 -4
- package/dist/integrations/pi/components/upstream/history/editor-core.js +112 -30
- package/dist/integrations/pi/components/upstream/history/kill-ring.d.ts +6 -3
- package/dist/integrations/pi/components/upstream/history/kill-ring.js +6 -3
- package/dist/integrations/pi/components/upstream/history/printable-key.js +7 -4
- package/dist/integrations/pi/components/upstream/history/text-helpers.js +6 -3
- package/dist/integrations/pi/components/upstream/history/undo-stack.d.ts +6 -3
- package/dist/integrations/pi/components/upstream/history/undo-stack.js +6 -3
- package/dist/integrations/pi/components/upstream/history/word-navigation.js +6 -3
- package/dist/integrations/pi/components/upstream/model-search.d.ts +5 -2
- package/dist/integrations/pi/components/upstream/theme/theme-controller.d.ts +8 -0
- package/dist/integrations/pi/components/upstream/theme/theme-controller.js +0 -3
- package/dist/integrations/pi/components/upstream/theme/theme.d.ts +2 -2
- package/dist/integrations/pi/components/upstream/theme/theme.js +17 -6
- package/dist/integrations/pi/engine/adapter.d.ts +39 -138
- package/dist/integrations/pi/engine/adapter.js +338 -3226
- package/dist/integrations/pi/engine/command-dispatch.d.ts +41 -0
- package/dist/integrations/pi/engine/command-dispatch.js +125 -0
- package/dist/integrations/pi/engine/event-delivery.d.ts +100 -0
- package/dist/integrations/pi/engine/event-delivery.js +184 -0
- package/dist/integrations/pi/engine/extension-ui-binding.d.ts +35 -0
- package/dist/integrations/pi/engine/extension-ui-binding.js +81 -0
- package/dist/integrations/pi/engine/index.d.ts +18 -14
- package/dist/integrations/pi/engine/index.js +10 -14
- package/dist/integrations/pi/engine/message-values.d.ts +29 -0
- package/dist/integrations/pi/engine/message-values.js +168 -0
- package/dist/integrations/pi/engine/pending-delivery.d.ts +2 -2
- package/dist/integrations/pi/engine/pending-delivery.js +2 -4
- package/dist/integrations/pi/engine/pi-settings-metadata.json +382 -371
- package/dist/integrations/pi/engine/prompt-suggestions.d.ts +30 -0
- package/dist/integrations/pi/engine/prompt-suggestions.js +102 -0
- package/dist/integrations/pi/engine/provider-authentication.d.ts +34 -0
- package/dist/integrations/pi/engine/provider-authentication.js +209 -0
- package/dist/integrations/pi/engine/resource-catalog.d.ts +49 -0
- package/dist/integrations/pi/engine/resource-catalog.js +289 -0
- package/dist/integrations/pi/engine/resources/changelog.json +4 -4
- package/dist/integrations/pi/engine/session-events.d.ts +48 -0
- package/dist/integrations/pi/engine/session-events.js +223 -0
- package/dist/integrations/pi/engine/session-integration.js +2 -4
- package/dist/integrations/pi/engine/session-runtime.d.ts +84 -0
- package/dist/integrations/pi/engine/session-runtime.js +249 -0
- package/dist/integrations/pi/engine/{settings-effects.d.ts → settings-bridge.d.ts} +57 -2
- package/dist/integrations/pi/engine/settings-bridge.js +514 -0
- package/dist/integrations/pi/engine/settings-metadata.d.ts +31 -0
- package/dist/integrations/pi/engine/settings-metadata.js +67 -0
- package/dist/integrations/pi/engine/settings-port.d.ts +42 -0
- package/dist/integrations/pi/engine/settings-port.js +353 -0
- package/dist/integrations/pi/engine/transcript-projection.d.ts +39 -0
- package/dist/integrations/pi/engine/transcript-projection.js +405 -0
- package/dist/integrations/pi/engine/usage-view.d.ts +4 -0
- package/dist/integrations/pi/engine/usage-view.js +56 -0
- package/dist/integrations/pi/engine/workflow-contexts.d.ts +59 -0
- package/dist/integrations/pi/engine/workflow-contexts.js +316 -0
- package/dist/integrations/pi/engine/workflow-runner.d.ts +60 -0
- package/dist/integrations/pi/engine/workflow-runner.js +509 -0
- package/dist/integrations/pi/engine/workflow-support.d.ts +33 -0
- package/dist/integrations/pi/engine/workflow-support.js +352 -0
- package/dist/integrations/pi/engine/workflows.d.ts +63 -2
- package/dist/integrations/pi/engine/workflows.js +5 -2
- package/dist/integrations/pi/startup-public.js +576 -554
- package/dist/integrations/pi/startup-public.manifest.json +1730 -984
- package/dist/integrations/pi/tui-runtime/adapter.js +10 -13
- package/dist/integrations/pi/tui-runtime/contracts.d.ts +11 -1
- package/dist/integrations/pi/tui-runtime/damage-aware-terminal.d.ts +1 -1
- package/dist/integrations/pi/tui-runtime/damage-aware-terminal.js +4 -7
- package/dist/integrations/pi/tui-runtime/index.d.ts +8 -6
- package/dist/integrations/pi/tui-runtime/index.js +4 -6
- package/dist/integrations/pi/tui-runtime/mouse-report-input.js +2 -4
- package/dist/integrations/pi/tui-runtime/overlay-geometry.d.ts +2 -2
- package/dist/integrations/pi/tui-runtime/overlay-geometry.js +4 -5
- package/dist/integrations/pi/tui-runtime/presentation-adapter.js +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/runtime-payload-inventory.json +51320 -46509
- package/dist/ui/apps/index.d.ts +5 -3
- package/dist/ui/apps/index.js +3 -3
- package/dist/ui/components/index.d.ts +47 -25
- package/dist/ui/components/index.js +25 -25
- package/dist/ui/components/prompt-input.js +1 -4
- package/dist/ui/settings/declarations.d.ts +119 -0
- package/dist/ui/settings/declarations.js +20 -11
- package/dist/ui/settings/index.d.ts +10 -6
- package/dist/ui/settings/index.js +5 -6
- package/dist/ui/settings/manager.d.ts +54 -0
- package/dist/ui/settings/{session.js → manager.js} +101 -9
- package/dist/ui/settings/sections.d.ts +2 -7
- package/docs/architecture/boundaries.md +4 -4
- package/docs/architecture/history-editor-provenance.md +1 -1
- package/docs/architecture/project-structure.md +6 -6
- package/docs/architecture/prompt-suggestions.md +1 -1
- package/docs/architecture/terminal-host-proof-gate.md +1 -1
- package/docs/architecture/terminal-host-spike-evidence.md +1 -1
- package/docs/architecture/toolchain.md +8 -0
- package/docs/architecture/ui-reference-provenance.md +4 -4
- package/docs/ci-release-runbook.md +7 -1
- package/docs/features/modal-content-interaction.md +2 -2
- package/docs/local-worktree-cleanup.md +4 -2
- package/docs/validation.md +6 -4
- package/package.json +7 -11
- package/bin/pi-tui.d.ts +0 -6
- package/bin/pi-tui.js +0 -28
- package/bin/sync-pi-tui-proxy.js +0 -97
- package/dist/cli/version.d.ts +0 -2
- package/dist/cli/version.js +0 -23
- package/dist/composition/agent-engine-bridge.d.ts +0 -3
- package/dist/composition/agent-engine-bridge.js +0 -108
- package/dist/composition/process.d.ts +0 -16
- package/dist/composition/process.js +0 -45
- package/dist/contracts/workspace/index.d.ts +0 -2
- package/dist/contracts/workspace/index.js +0 -2
- package/dist/contracts/workspace/model.d.ts +0 -248
- package/dist/contracts/workspace/model.js +0 -2
- package/dist/contracts/workspace/validation.d.ts +0 -13
- package/dist/contracts/workspace/validation.js +0 -335
- package/dist/features/owned-ui/customization.d.ts +0 -40
- package/dist/features/owned-ui/customization.js +0 -110
- package/dist/features/owned-ui/diagnostics.d.ts +0 -34
- package/dist/features/owned-ui/diagnostics.js +0 -95
- package/dist/features/workspace/capabilities.d.ts +0 -31
- package/dist/features/workspace/capabilities.js +0 -75
- package/dist/features/workspace/index.d.ts +0 -6
- package/dist/features/workspace/index.js +0 -6
- package/dist/features/workspace/presentation.d.ts +0 -30
- package/dist/features/workspace/presentation.js +0 -70
- package/dist/features/workspace/reconciliation.d.ts +0 -15
- package/dist/features/workspace/reconciliation.js +0 -82
- package/dist/features/workspace/reducer.d.ts +0 -43
- package/dist/features/workspace/reducer.js +0 -214
- package/dist/features/workspace/router.d.ts +0 -32
- package/dist/features/workspace/router.js +0 -125
- package/dist/features/workspace/store.d.ts +0 -18
- package/dist/features/workspace/store.js +0 -55
- package/dist/foundation/native-host-protocol/codec.d.ts +0 -13
- package/dist/foundation/native-host-protocol/codec.js +0 -58
- package/dist/foundation/native-host-protocol/evidence.d.ts +0 -67
- package/dist/foundation/native-host-protocol/evidence.js +0 -141
- package/dist/foundation/native-host-protocol/index.d.ts +0 -4
- package/dist/foundation/native-host-protocol/index.js +0 -4
- package/dist/foundation/native-host-protocol/messages.d.ts +0 -56
- package/dist/foundation/native-host-protocol/messages.js +0 -149
- package/dist/foundation/native-host-protocol/proof-gate.d.ts +0 -13
- package/dist/foundation/native-host-protocol/proof-gate.js +0 -33
- package/dist/foundation/structured-agent-runtime/backpressure.d.ts +0 -47
- package/dist/foundation/structured-agent-runtime/backpressure.js +0 -119
- package/dist/foundation/structured-agent-runtime/commands.d.ts +0 -53
- package/dist/foundation/structured-agent-runtime/commands.js +0 -165
- package/dist/foundation/structured-agent-runtime/handshake.d.ts +0 -41
- package/dist/foundation/structured-agent-runtime/handshake.js +0 -151
- package/dist/foundation/structured-agent-runtime/index.d.ts +0 -5
- package/dist/foundation/structured-agent-runtime/index.js +0 -5
- package/dist/foundation/structured-agent-runtime/reconnection.d.ts +0 -38
- package/dist/foundation/structured-agent-runtime/reconnection.js +0 -130
- package/dist/foundation/structured-agent-runtime/state.d.ts +0 -57
- package/dist/foundation/structured-agent-runtime/state.js +0 -119
- package/dist/integrations/pi/components/upstream/components/custom-entry.d.ts +0 -17
- package/dist/integrations/pi/components/upstream/components/custom-entry.js +0 -51
- package/dist/integrations/pi/components/upstream/components/first-time-setup.d.ts +0 -24
- package/dist/integrations/pi/components/upstream/components/first-time-setup.js +0 -105
- package/dist/integrations/pi/components/upstream/components/markdown-transform.d.ts +0 -2
- package/dist/integrations/pi/components/upstream/components/markdown-transform.js +0 -18
- package/dist/integrations/pi/engine/model-auth-integration.d.ts +0 -31
- package/dist/integrations/pi/engine/model-auth-integration.js +0 -62
- package/dist/integrations/pi/engine/resource-extension-integration.d.ts +0 -32
- package/dist/integrations/pi/engine/resource-extension-integration.js +0 -81
- package/dist/integrations/pi/engine/settings-effects.js +0 -249
- package/dist/integrations/pi/engine/settings-integration.d.ts +0 -43
- package/dist/integrations/pi/engine/settings-integration.js +0 -227
- package/dist/integrations/pi/engine/workflow-controllers.d.ts +0 -21
- package/dist/integrations/pi/engine/workflow-controllers.js +0 -49
- package/dist/integrations/pi/session-ui/index.d.ts +0 -5
- package/dist/integrations/pi/session-ui/index.js +0 -5
- package/dist/integrations/pi/session-ui/paste-executor.d.ts +0 -10
- package/dist/integrations/pi/session-ui/paste-preparation-client.d.ts +0 -16
- package/dist/integrations/pi/session-ui/route-host.d.ts +0 -5
- package/dist/integrations/pi/tui-runtime/conformance.d.ts +0 -18
- package/dist/integrations/pi/tui-runtime/conformance.js +0 -145
- package/dist/ui/components/prompt-row.d.ts +0 -14
- package/dist/ui/components/prompt-row.js +0 -20
- package/dist/ui/settings/session.d.ts +0 -36
- package/dist/ui/settings/store.d.ts +0 -29
- package/dist/ui/settings/store.js +0 -91
- package/dist/{integrations/pi/session-ui → app/session-shell}/clipboard-diagnostics.js +2 -2
- package/dist/{integrations/pi/session-ui → app/session-shell}/clipboard-image.d.ts +0 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/editor-hyperlink-budget.d.ts +0 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/editor-hyperlink-budget.js +0 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/image-preparation.d.ts +0 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/image-source.d.ts +0 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/image-worker.d.ts +0 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/paste-helper.d.ts +0 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/paste-text-preparation.js +0 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/paste-text-worker.d.ts +0 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/paste-text-worker.js +0 -0
- package/dist/{integrations/pi/session-ui/response-copy-helper.d.ts → app/session-shell/paste-types.js} +0 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/path-chip-presentation.js +0 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/quit-outro-effects.d.ts +0 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/quit-outro-effects.js +0 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/quit-outro.d.ts +0 -0
- package/dist/{integrations/pi/session-ui/route-host.js → app/session-shell/response-copy-helper.d.ts} +0 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/response-copy-protocol.js +0 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/stream-presentation-coalescer.d.ts +0 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/stream-presentation-coalescer.js +3 -3
- /package/dist/{integrations/pi/session-ui → app/session-shell}/text-paste.d.ts +0 -0
- /package/dist/{integrations/pi/session-ui → app/session-shell}/text-paste.js +0 -0
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type OwnershipProbe } from "./cohort-selection.js";
|
|
2
1
|
import { type SupervisorEndpointMetadata } from "./cohort-state.js";
|
|
3
2
|
import { resolveProductPaths, type SessionSelection, type LaunchProfileId, type SupervisorStartupAttemptIdentity } from "../lifecycle/index.js";
|
|
4
3
|
import { cleanupProvenIdleOwner } from "./process-cleanup.js";
|
|
@@ -45,11 +44,8 @@ export declare function startSupervisor(release: MaterializedRelease, environmen
|
|
|
45
44
|
*/
|
|
46
45
|
export declare function releaseEnvironment(environment: NodeJS.ProcessEnv, release: MaterializedRelease, profile?: LaunchProfileId): NodeJS.ProcessEnv;
|
|
47
46
|
export declare function waitForVerifiedEndpoint(path: string, release: MaterializedRelease, timeoutMs: number, startup?: SupervisorStartupAttempt): Promise<void>;
|
|
48
|
-
export declare function readEndpointMetadata(path: string): Promise<SupervisorEndpointMetadata | null>;
|
|
49
|
-
export declare function probeOwnership(metadata: SupervisorEndpointMetadata): Promise<OwnershipProbe>;
|
|
50
47
|
export declare function releaseVerifiedIdleOwner(metadata: SupervisorEndpointMetadata, dataDir: string, operations?: {
|
|
51
48
|
readonly waitForExit?: typeof waitForProcessExit;
|
|
52
49
|
readonly cleanup?: typeof cleanupProvenIdleOwner;
|
|
53
50
|
}): Promise<boolean>;
|
|
54
51
|
export declare function waitForProcessExit(pid: number, timeoutMs: number): Promise<void>;
|
|
55
|
-
export declare function removeEndpointArtifacts(metadataPath: string, endpoint: string): Promise<void>;
|
|
@@ -9,7 +9,7 @@ import { CohortStateStore } from "./cohort-state.js";
|
|
|
9
9
|
import { assertLaunchProfileId, createSupervisorStartupAttempt, readSupervisorStartupResult, resolveCohortEndpoint, resolveProductPaths, sessionSelectionArguments } from "../lifecycle/index.js";
|
|
10
10
|
import { encodeFrame, LineFrameDecoder } from "../protocol/index.js";
|
|
11
11
|
import { cleanupProvenIdleOwner, processIsAlive } from "./process-cleanup.js";
|
|
12
|
-
import { sweepDeadEndpoints } from "./endpoints.js";
|
|
12
|
+
import { probeOwnership, readEndpointMetadata, removeEndpointArtifacts, sweepDeadEndpoints } from "./endpoints.js";
|
|
13
13
|
import { UpdateTransactionStore } from "./update-transaction.js";
|
|
14
14
|
import { selectUpdateLaunchRelease } from "./update-launch.js";
|
|
15
15
|
import { consumeMaterializationProof, materializeRelease, readCertifiedReleaseManifest, readMaterializedRelease, resolveReleaseEntryPoint, verifyMaterializedRelease } from "./release-store.js";
|
|
@@ -355,79 +355,6 @@ export async function waitForVerifiedEndpoint(path, release, timeoutMs, startup)
|
|
|
355
355
|
throw collision;
|
|
356
356
|
throw new Error(PRODUCT_TEXT.diagnostic(`supervisor did not publish verified endpoint metadata within ${timeoutMs}ms`));
|
|
357
357
|
}
|
|
358
|
-
export async function readEndpointMetadata(path) {
|
|
359
|
-
try {
|
|
360
|
-
const value = JSON.parse(await readFile(path, "utf8"));
|
|
361
|
-
const ownership = value.ownership;
|
|
362
|
-
const liveInstanceIds = Array.isArray(ownership?.liveInstanceIds)
|
|
363
|
-
? ownership.liveInstanceIds
|
|
364
|
-
: Array.isArray(ownership?.liveGenerationIds) ? ownership.liveGenerationIds : null;
|
|
365
|
-
const nonResumableInstanceIds = Array.isArray(ownership?.nonResumableInstanceIds)
|
|
366
|
-
? ownership.nonResumableInstanceIds
|
|
367
|
-
: Array.isArray(ownership?.nonResumableGenerationIds) ? ownership.nonResumableGenerationIds : null;
|
|
368
|
-
const uncertainInstanceIds = Array.isArray(ownership?.uncertainInstanceIds) ? ownership.uncertainInstanceIds : [];
|
|
369
|
-
if (!value || value.schema !== PRODUCT_IDENTITY.protocol.supervisorSchema || typeof value.supervisorId !== "string" || typeof value.endpoint !== "string" || !Number.isSafeInteger(value.pid)
|
|
370
|
-
|| typeof value.pidStartIdentity !== "string" || typeof value.bootNonce !== "string" || typeof value.releaseId !== "string"
|
|
371
|
-
|| typeof value.releaseRoot !== "string" || typeof value.contentDigest !== "string" || !ownership
|
|
372
|
-
|| !isStringArray(liveInstanceIds) || !isStringArray(nonResumableInstanceIds) || !isStringArray(uncertainInstanceIds)) {
|
|
373
|
-
return null;
|
|
374
|
-
}
|
|
375
|
-
return {
|
|
376
|
-
...value,
|
|
377
|
-
ownership: {
|
|
378
|
-
...ownership,
|
|
379
|
-
liveInstanceIds,
|
|
380
|
-
nonResumableInstanceIds,
|
|
381
|
-
uncertainInstanceIds,
|
|
382
|
-
},
|
|
383
|
-
};
|
|
384
|
-
}
|
|
385
|
-
catch {
|
|
386
|
-
return null;
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
export async function probeOwnership(metadata) {
|
|
390
|
-
if (!processIsAlive(metadata.pid))
|
|
391
|
-
return "dead";
|
|
392
|
-
const identity = await requestIdentity(metadata.endpoint, 500);
|
|
393
|
-
if (!identity)
|
|
394
|
-
return "unresponsive";
|
|
395
|
-
return identity.supervisorId === metadata.supervisorId
|
|
396
|
-
&& identity.bootNonce === metadata.bootNonce
|
|
397
|
-
&& identity.pidStartIdentity === metadata.pidStartIdentity
|
|
398
|
-
&& identity.releaseId === metadata.releaseId
|
|
399
|
-
? "live-verified"
|
|
400
|
-
: "identity-mismatch";
|
|
401
|
-
}
|
|
402
|
-
async function requestIdentity(endpoint, timeoutMs) {
|
|
403
|
-
return await new Promise(resolvePromise => {
|
|
404
|
-
const socket = connect(endpoint);
|
|
405
|
-
const decoder = new LineFrameDecoder();
|
|
406
|
-
let settled = false;
|
|
407
|
-
const finish = (value) => {
|
|
408
|
-
if (settled)
|
|
409
|
-
return;
|
|
410
|
-
settled = true;
|
|
411
|
-
socket.destroy();
|
|
412
|
-
resolvePromise(value);
|
|
413
|
-
};
|
|
414
|
-
socket.once("error", () => finish(null));
|
|
415
|
-
socket.once("connect", () => socket.write(encodeFrame({ type: "identity-probe" })));
|
|
416
|
-
socket.on("data", chunk => {
|
|
417
|
-
try {
|
|
418
|
-
const message = decoder.push(chunk)[0];
|
|
419
|
-
if (message?.type === "identity" && typeof message.supervisorId === "string" && typeof message.bootNonce === "string"
|
|
420
|
-
&& typeof message.pidStartIdentity === "string" && typeof message.releaseId === "string") {
|
|
421
|
-
finish({ supervisorId: message.supervisorId, bootNonce: message.bootNonce, pidStartIdentity: message.pidStartIdentity, releaseId: message.releaseId });
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
catch {
|
|
425
|
-
finish(null);
|
|
426
|
-
}
|
|
427
|
-
});
|
|
428
|
-
setTimeout(() => finish(null), timeoutMs).unref();
|
|
429
|
-
});
|
|
430
|
-
}
|
|
431
358
|
async function activatePendingAfterBlockerExit(candidate, stateStore, paths, environment) {
|
|
432
359
|
const deadline = Date.now() + 2_000;
|
|
433
360
|
let endpoint = null;
|
|
@@ -489,9 +416,6 @@ async function requestIdleOwnershipRelease(metadata, candidateReleaseId, timeout
|
|
|
489
416
|
setTimeout(() => finish(false), timeoutMs).unref();
|
|
490
417
|
});
|
|
491
418
|
}
|
|
492
|
-
function isStringArray(value) {
|
|
493
|
-
return Array.isArray(value) && value.every(item => typeof item === "string" && item.length > 0);
|
|
494
|
-
}
|
|
495
419
|
export async function waitForProcessExit(pid, timeoutMs) {
|
|
496
420
|
const deadline = Date.now() + timeoutMs;
|
|
497
421
|
while (Date.now() < deadline) {
|
|
@@ -501,8 +425,3 @@ export async function waitForProcessExit(pid, timeoutMs) {
|
|
|
501
425
|
}
|
|
502
426
|
throw new Error(PRODUCT_TEXT.diagnostic(`supervisor ${pid} did not release process ownership within ${timeoutMs}ms`));
|
|
503
427
|
}
|
|
504
|
-
export async function removeEndpointArtifacts(metadataPath, endpoint) {
|
|
505
|
-
await rm(metadataPath, { force: true });
|
|
506
|
-
if (platform() !== "win32")
|
|
507
|
-
await rm(endpoint, { force: true });
|
|
508
|
-
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { type ReadDependencyCertificationOptions } from "./dependency-certification.js";
|
|
2
2
|
export { dependencyLayerCertificationPath, legacyDependencyLayerCertificationPath } from "./dependency-certification.js";
|
|
3
3
|
import { type ReleaseFileIdentity } from "./release.js";
|
|
4
|
+
import type { DependencyLayerReference } from "./types.js";
|
|
5
|
+
export type { DependencyLayerReference } from "./types.js";
|
|
4
6
|
import { PRODUCT_IDENTITY } from "../../product-identity.js";
|
|
5
7
|
export declare const DEPENDENCY_LAYER_SCHEMA: string;
|
|
6
8
|
export declare const DEPENDENCY_LAYER_MANIFEST = "dependency-layer-manifest.json";
|
|
@@ -25,11 +27,6 @@ export interface DependencyLayerIdentity {
|
|
|
25
27
|
readonly files: readonly ReleaseFileIdentity[];
|
|
26
28
|
readonly inventory: RuntimePayloadInventory;
|
|
27
29
|
}
|
|
28
|
-
export interface DependencyLayerReference {
|
|
29
|
-
readonly layerId: string;
|
|
30
|
-
readonly contentDigest: string;
|
|
31
|
-
readonly binding: "node_modules";
|
|
32
|
-
}
|
|
33
30
|
export interface MaterializedDependencyLayer extends DependencyLayerIdentity {
|
|
34
31
|
readonly layerRoot: string;
|
|
35
32
|
readonly reused: boolean;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { OwnershipProbe } from "./cohort-selection.js";
|
|
1
2
|
import type { SupervisorEndpointMetadata } from "./cohort-state.js";
|
|
2
3
|
import type { CohortEndpointPaths, ProductPaths } from "../lifecycle/index.js";
|
|
3
4
|
export interface RecordedEndpoint {
|
|
@@ -18,3 +19,6 @@ export declare function listRecordedEndpoints(paths: ProductPaths): Promise<read
|
|
|
18
19
|
export declare function sweepDeadEndpoints(paths: ProductPaths): Promise<readonly string[]>;
|
|
19
20
|
/** The releases that an identity-verified live cohort runs from and that must be retained. */
|
|
20
21
|
export declare function liveReleaseIds(paths: ProductPaths): Promise<readonly string[]>;
|
|
22
|
+
export declare function readEndpointMetadata(path: string): Promise<SupervisorEndpointMetadata | null>;
|
|
23
|
+
export declare function probeOwnership(metadata: SupervisorEndpointMetadata): Promise<OwnershipProbe>;
|
|
24
|
+
export declare function removeEndpointArtifacts(metadataPath: string, endpoint: string): Promise<void>;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { readdir } from "node:fs/promises";
|
|
1
|
+
import { readdir, readFile, rm } from "node:fs/promises";
|
|
2
|
+
import { connect } from "node:net";
|
|
3
|
+
import { platform } from "node:os";
|
|
2
4
|
import { resolve } from "node:path";
|
|
3
|
-
import {
|
|
5
|
+
import { PRODUCT_IDENTITY } from "../../product-identity.js";
|
|
6
|
+
import { encodeFrame, LineFrameDecoder } from "../protocol/index.js";
|
|
4
7
|
import { processIsAlive } from "./process-cleanup.js";
|
|
5
8
|
/**
|
|
6
9
|
* Every endpoint recorded under this runtime directory: one per cohort, plus the single
|
|
@@ -48,3 +51,84 @@ export async function liveReleaseIds(paths) {
|
|
|
48
51
|
})));
|
|
49
52
|
return [...new Set(ownership.filter(item => item.probe === "live-verified").map(item => item.releaseId))].sort();
|
|
50
53
|
}
|
|
54
|
+
export async function readEndpointMetadata(path) {
|
|
55
|
+
try {
|
|
56
|
+
const value = JSON.parse(await readFile(path, "utf8"));
|
|
57
|
+
const ownership = value.ownership;
|
|
58
|
+
const liveInstanceIds = Array.isArray(ownership?.liveInstanceIds)
|
|
59
|
+
? ownership.liveInstanceIds
|
|
60
|
+
: Array.isArray(ownership?.liveGenerationIds) ? ownership.liveGenerationIds : null;
|
|
61
|
+
const nonResumableInstanceIds = Array.isArray(ownership?.nonResumableInstanceIds)
|
|
62
|
+
? ownership.nonResumableInstanceIds
|
|
63
|
+
: Array.isArray(ownership?.nonResumableGenerationIds) ? ownership.nonResumableGenerationIds : null;
|
|
64
|
+
const uncertainInstanceIds = Array.isArray(ownership?.uncertainInstanceIds) ? ownership.uncertainInstanceIds : [];
|
|
65
|
+
if (!value || value.schema !== PRODUCT_IDENTITY.protocol.supervisorSchema || typeof value.supervisorId !== "string" || typeof value.endpoint !== "string" || !Number.isSafeInteger(value.pid)
|
|
66
|
+
|| typeof value.pidStartIdentity !== "string" || typeof value.bootNonce !== "string" || typeof value.releaseId !== "string"
|
|
67
|
+
|| typeof value.releaseRoot !== "string" || typeof value.contentDigest !== "string" || !ownership
|
|
68
|
+
|| !isStringArray(liveInstanceIds) || !isStringArray(nonResumableInstanceIds) || !isStringArray(uncertainInstanceIds)) {
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
...value,
|
|
73
|
+
ownership: {
|
|
74
|
+
...ownership,
|
|
75
|
+
liveInstanceIds,
|
|
76
|
+
nonResumableInstanceIds,
|
|
77
|
+
uncertainInstanceIds,
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
export async function probeOwnership(metadata) {
|
|
86
|
+
if (!processIsAlive(metadata.pid))
|
|
87
|
+
return "dead";
|
|
88
|
+
const identity = await requestIdentity(metadata.endpoint, 500);
|
|
89
|
+
if (!identity)
|
|
90
|
+
return "unresponsive";
|
|
91
|
+
return identity.supervisorId === metadata.supervisorId
|
|
92
|
+
&& identity.bootNonce === metadata.bootNonce
|
|
93
|
+
&& identity.pidStartIdentity === metadata.pidStartIdentity
|
|
94
|
+
&& identity.releaseId === metadata.releaseId
|
|
95
|
+
? "live-verified"
|
|
96
|
+
: "identity-mismatch";
|
|
97
|
+
}
|
|
98
|
+
async function requestIdentity(endpoint, timeoutMs) {
|
|
99
|
+
return await new Promise(resolvePromise => {
|
|
100
|
+
const socket = connect(endpoint);
|
|
101
|
+
const decoder = new LineFrameDecoder();
|
|
102
|
+
let settled = false;
|
|
103
|
+
const finish = (value) => {
|
|
104
|
+
if (settled)
|
|
105
|
+
return;
|
|
106
|
+
settled = true;
|
|
107
|
+
socket.destroy();
|
|
108
|
+
resolvePromise(value);
|
|
109
|
+
};
|
|
110
|
+
socket.once("error", () => finish(null));
|
|
111
|
+
socket.once("connect", () => socket.write(encodeFrame({ type: "identity-probe" })));
|
|
112
|
+
socket.on("data", chunk => {
|
|
113
|
+
try {
|
|
114
|
+
const message = decoder.push(chunk)[0];
|
|
115
|
+
if (message?.type === "identity" && typeof message.supervisorId === "string" && typeof message.bootNonce === "string"
|
|
116
|
+
&& typeof message.pidStartIdentity === "string" && typeof message.releaseId === "string") {
|
|
117
|
+
finish({ supervisorId: message.supervisorId, bootNonce: message.bootNonce, pidStartIdentity: message.pidStartIdentity, releaseId: message.releaseId });
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
catch {
|
|
121
|
+
finish(null);
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
setTimeout(() => finish(null), timeoutMs).unref();
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
function isStringArray(value) {
|
|
128
|
+
return Array.isArray(value) && value.every(item => typeof item === "string" && item.length > 0);
|
|
129
|
+
}
|
|
130
|
+
export async function removeEndpointArtifacts(metadataPath, endpoint) {
|
|
131
|
+
await rm(metadataPath, { force: true });
|
|
132
|
+
if (platform() !== "win32")
|
|
133
|
+
await rm(endpoint, { force: true });
|
|
134
|
+
}
|
|
@@ -1,16 +1,30 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
1
|
+
export { certifyMaterializedRelease, ensureSupervisor, recordParentCertifiedRelease, releaseEnvironment, releaseVerifiedIdleOwner, runBootstrap, startSupervisor, waitForProcessExit, waitForVerifiedEndpoint, } from "./bootstrap.js";
|
|
2
|
+
export type { BootstrapOptions, SupervisorStartupAttempt } from "./bootstrap.js";
|
|
3
|
+
export { selectCohortLaunch } from "./cohort-selection.js";
|
|
4
|
+
export type { CohortLaunchDecision, OwnershipProbe } from "./cohort-selection.js";
|
|
5
|
+
export { CohortStateStore, RELEASE_COHORT_SCHEMA, emptyState, planProtectedReleases } from "./cohort-state.js";
|
|
6
|
+
export type { ActiveReleaseTransactionReference, CohortState, EndpointOwnership, ExternalReleaseHold, ExternalReleaseHoldAuthority, OrphanReleaseDisposition, ProtectedReleaseInputs, ProtectedReleasePlan, ReleaseApproval, ReleaseCleanupDiagnostic, ReleaseCleanupDisposition, ReleaseCleanupStage, ReleaseCleanupState, ReleaseCleanupWorkerRun, ReleaseCleanupWorkerStatus, ReleaseCleanupWorkerSummary, ReleaseRecord, ReleaseReferences, ReleaseRetentionReconciliation, SupervisorEndpointMetadata, } from "./cohort-state.js";
|
|
7
|
+
export { DEPENDENCY_LAYER_MANIFEST, DEPENDENCY_LAYER_SCHEMA, RUNTIME_PAYLOAD_INVENTORY, dependencyLayerCertificationPath, dependencyReference, generateDependencyRuntimePayload, legacyDependencyLayerCertificationPath, materializeDependencyLayer, readCertifiedDependencyLayer, selectDependencyRuntimePayload, selectPublishedDependencyRuntimePayload, verifyDependencyLayer, } from "./dependency-layer.js";
|
|
8
|
+
export type { DependencyLayerIdentity, DependencyLayerOperationEvent, DependencyLayerReference, GeneratedRuntimePayload, MaterializeDependencyLayerOptions, MaterializedDependencyLayer, PublishedRuntimeFileClassification, PublishedRuntimePayload, ReadCertifiedDependencyLayerOptions, RuntimePayloadExclusion, RuntimePayloadInventory, SelectedRuntimePayload, } from "./dependency-layer.js";
|
|
9
|
+
export { listRecordedEndpoints, liveReleaseIds, probeOwnership, readEndpointMetadata, removeEndpointArtifacts, sweepDeadEndpoints } from "./endpoints.js";
|
|
10
|
+
export type { RecordedEndpoint } from "./endpoints.js";
|
|
11
|
+
export { cleanupProvenIdleOwner, cleanupVerifiedOwner, processIsAlive } from "./process-cleanup.js";
|
|
12
|
+
export type { CleanupDiagnostics } from "./process-cleanup.js";
|
|
13
|
+
export { PRODUCT_PACKAGE_NAME, createReleaseIdentity, deriveReleaseIdentity, digestManifestFiles, discoverReleasePayload, packageRootFromModule, releaseFileIdentity, resolveWithin, } from "./release.js";
|
|
14
|
+
export type { DiscoverReleasePayloadOptions, DiscoveredReleasePayload, ReleaseFileIdentity, ReleaseIdentity } from "./release.js";
|
|
15
|
+
export { collectRelease, prepareReleaseCleanup, runBoundedReleaseCleanup, runReleaseCleanupWorker, scheduleReleaseCleanup } from "./release-gc.js";
|
|
16
|
+
export type { ReleaseCleanupLimits, ReleaseCleanupOperations, ReleaseCleanupOptions, ReleaseCleanupResult, ReleaseCleanupWorkerOptions } from "./release-gc.js";
|
|
17
|
+
export { RELEASE_MANIFEST_FILENAME, assertImmutableExecutionRoot, consumeMaterializationProof, materializeRelease, readCertifiedReleaseManifest, readMaterializedRelease, resolveReleaseEntryPoint, verifyMaterializedRelease, } from "./release-store.js";
|
|
18
|
+
export type { CertifiedReleaseRecord, MaterializeReleaseOptions, MaterializedRelease, ReadCertifiedReleaseManifestOptions, ReleaseContentOperation, ReleaseContentOperationEvent, VerifyMaterializedReleaseOptions, } from "./release-store.js";
|
|
19
|
+
export { createRestartSeal, readRestartCertifiedRelease, releaseCertificationDocument, restartSealDigest } from "./restart-certification.js";
|
|
20
|
+
export type { RestartSeal, RestartValidationEvent } from "./restart-certification.js";
|
|
21
|
+
export { STABLE_RELEASE_SCHEMA, createStableReleaseEvidence, verifyStableRegistry } from "./stable-release.js";
|
|
22
|
+
export type { StableRegistryState, StableRegistryVerificationOptions, StableReleaseEvidence, StableReleaseEvidenceInput } from "./stable-release.js";
|
|
23
|
+
export { PRODUCT_PACKAGE, assertUpdatePerformanceBudget, createNpmProcessRunner, createUpdateLifecycleCoordinator, planUpdateOwnership, renderUpdateProgressBar, runSelfUpdate, } from "./update.js";
|
|
24
|
+
export type { ProcessRequest, ProcessResult, SelfUpdateOptions, UpdateActivationPhase, UpdateChannel, UpdateFileSystem, UpdateLifecycleCoordinator, UpdateMaterializationProgress, UpdateMeasuredPhase, UpdateOutput, UpdateOwnershipAction, UpdatePackageReplacementInput, UpdatePerformanceEvidence, UpdatePhaseTimingEvent, UpdateProcessRunner, UpdateTransactionJournal, } from "./update.js";
|
|
25
|
+
export { selectSupervisorLaunchReleaseId, selectUpdateLaunchRelease } from "./update-launch.js";
|
|
26
|
+
export { UPDATE_RECOVERY_SCHEMA, cleanupUpdateRecoveryCapsules, inspectUpdateLauncherSet, prepareUpdateRecoveryCapsule, readUpdateRecoveryCapsule, removeUpdateRecoveryCapsule, runProtectedPackageReplacement, updateLauncherPaths, } from "./update-recovery.js";
|
|
27
|
+
export type { ProtectedPackageReplacementOptions, ProtectedPackageReplacementResult, UpdateRecoveryCapsule, UpdateRecoveryResult } from "./update-recovery.js";
|
|
28
|
+
export { UPDATE_JOURNAL_SCHEMA, UpdateTransactionStore } from "./update-transaction.js";
|
|
29
|
+
export type { UpdateRecoveryState, UpdateTransaction, UpdateTransactionPhase } from "./update-transaction.js";
|
|
30
|
+
export { warmMaterializedRelease } from "./warmup.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
1
|
+
export { certifyMaterializedRelease, ensureSupervisor, recordParentCertifiedRelease, releaseEnvironment, releaseVerifiedIdleOwner, runBootstrap, startSupervisor, waitForProcessExit, waitForVerifiedEndpoint, } from "./bootstrap.js";
|
|
2
|
+
export { selectCohortLaunch } from "./cohort-selection.js";
|
|
3
|
+
export { CohortStateStore, RELEASE_COHORT_SCHEMA, emptyState, planProtectedReleases } from "./cohort-state.js";
|
|
4
|
+
export { DEPENDENCY_LAYER_MANIFEST, DEPENDENCY_LAYER_SCHEMA, RUNTIME_PAYLOAD_INVENTORY, dependencyLayerCertificationPath, dependencyReference, generateDependencyRuntimePayload, legacyDependencyLayerCertificationPath, materializeDependencyLayer, readCertifiedDependencyLayer, selectDependencyRuntimePayload, selectPublishedDependencyRuntimePayload, verifyDependencyLayer, } from "./dependency-layer.js";
|
|
5
|
+
export { listRecordedEndpoints, liveReleaseIds, probeOwnership, readEndpointMetadata, removeEndpointArtifacts, sweepDeadEndpoints } from "./endpoints.js";
|
|
6
|
+
export { cleanupProvenIdleOwner, cleanupVerifiedOwner, processIsAlive } from "./process-cleanup.js";
|
|
7
|
+
export { PRODUCT_PACKAGE_NAME, createReleaseIdentity, deriveReleaseIdentity, digestManifestFiles, discoverReleasePayload, packageRootFromModule, releaseFileIdentity, resolveWithin, } from "./release.js";
|
|
8
|
+
export { collectRelease, prepareReleaseCleanup, runBoundedReleaseCleanup, runReleaseCleanupWorker, scheduleReleaseCleanup } from "./release-gc.js";
|
|
9
|
+
export { RELEASE_MANIFEST_FILENAME, assertImmutableExecutionRoot, consumeMaterializationProof, materializeRelease, readCertifiedReleaseManifest, readMaterializedRelease, resolveReleaseEntryPoint, verifyMaterializedRelease, } from "./release-store.js";
|
|
10
|
+
export { createRestartSeal, readRestartCertifiedRelease, releaseCertificationDocument, restartSealDigest } from "./restart-certification.js";
|
|
11
|
+
export { STABLE_RELEASE_SCHEMA, createStableReleaseEvidence, verifyStableRegistry } from "./stable-release.js";
|
|
12
|
+
export { PRODUCT_PACKAGE, assertUpdatePerformanceBudget, createNpmProcessRunner, createUpdateLifecycleCoordinator, planUpdateOwnership, renderUpdateProgressBar, runSelfUpdate, } from "./update.js";
|
|
13
|
+
export { selectSupervisorLaunchReleaseId, selectUpdateLaunchRelease } from "./update-launch.js";
|
|
14
|
+
export { UPDATE_RECOVERY_SCHEMA, cleanupUpdateRecoveryCapsules, inspectUpdateLauncherSet, prepareUpdateRecoveryCapsule, readUpdateRecoveryCapsule, removeUpdateRecoveryCapsule, runProtectedPackageReplacement, updateLauncherPaths, } from "./update-recovery.js";
|
|
15
|
+
export { UPDATE_JOURNAL_SCHEMA, UpdateTransactionStore } from "./update-transaction.js";
|
|
16
|
+
export { warmMaterializedRelease } from "./warmup.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Leaf types shared across the release subsystem. They live here so that the transaction store,
|
|
3
|
+
* launch selection, and dependency layers can name them without importing the update command or
|
|
4
|
+
* the release reader, which is what closed the subsystem's import cycles.
|
|
5
|
+
*/
|
|
6
|
+
export type UpdateChannel = "stable" | "next";
|
|
7
|
+
export interface DependencyLayerReference {
|
|
8
|
+
readonly layerId: string;
|
|
9
|
+
readonly contentDigest: string;
|
|
10
|
+
readonly binding: "node_modules";
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const UPDATE_JOURNAL_SCHEMA: string;
|
|
2
|
-
import type { UpdateChannel } from "./
|
|
2
|
+
import type { UpdateChannel } from "./types.js";
|
|
3
3
|
export type UpdateTransactionPhase = "shutdown-intent" | "ownership-released" | "package-installed" | "materialized" | "certified" | "active-reference-committed" | "supervisor-verified";
|
|
4
4
|
export interface UpdateRecoveryState {
|
|
5
5
|
readonly capsulePath: string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { UpdateChannel } from "./types.js";
|
|
1
2
|
import { type UpdateRecoveryState, type UpdateTransaction, type UpdateTransactionPhase } from "./update-transaction.js";
|
|
2
3
|
import { type ProtectedPackageReplacementResult } from "./update-recovery.js";
|
|
3
4
|
export declare const PRODUCT_PACKAGE: string;
|
|
4
|
-
export type UpdateChannel
|
|
5
|
+
export type { UpdateChannel } from "./types.js";
|
|
5
6
|
export interface ProcessRequest {
|
|
6
7
|
captureStdout: boolean;
|
|
7
8
|
}
|
|
@@ -5,7 +5,8 @@ import { isAbsolute, relative, resolve, sep } from "node:path";
|
|
|
5
5
|
import crossSpawn from "cross-spawn";
|
|
6
6
|
import { valid as validSemver } from "semver";
|
|
7
7
|
import { PRODUCT_IDENTITY, PRODUCT_TEXT } from "../../product-identity.js";
|
|
8
|
-
import { certifyMaterializedRelease,
|
|
8
|
+
import { certifyMaterializedRelease, ensureSupervisor, waitForProcessExit, } from "./bootstrap.js";
|
|
9
|
+
import { probeOwnership, readEndpointMetadata, removeEndpointArtifacts } from "./endpoints.js";
|
|
9
10
|
import { resolveCohortEndpoint, resolveProductPaths } from "../lifecycle/index.js";
|
|
10
11
|
import { encodeFrame, LineFrameDecoder } from "../protocol/index.js";
|
|
11
12
|
import { CohortStateStore } from "./cohort-state.js";
|
|
@@ -470,19 +471,6 @@ export async function runSelfUpdate(options) {
|
|
|
470
471
|
transaction = await transactionStore.advance("package-installed");
|
|
471
472
|
}
|
|
472
473
|
}
|
|
473
|
-
// Compatibility: npm 12 blocks install scripts unless allowScripts covers the package, so
|
|
474
|
-
// the postinstall that points the #pi-tui proxy at the tree npm just built
|
|
475
|
-
// may never have run. Run the shipped script directly: the proxy must be
|
|
476
|
-
// correct before the release store copies this tree. A failure is reported
|
|
477
|
-
// and left to the launch-time self-heal rather than failing the update.
|
|
478
|
-
try {
|
|
479
|
-
const proxySync = await runner(process.execPath, [resolve(packageRoot, "bin", "sync-pi-tui-proxy.js")], { captureStdout: true });
|
|
480
|
-
if (proxySync.code !== 0)
|
|
481
|
-
output.stderr(`${PRODUCT_TEXT.diagnostic(`could not point the #pi-tui proxy at the installed tree (exited ${formatExitCode(proxySync.code)}).`)}\n`);
|
|
482
|
-
}
|
|
483
|
-
catch (error) {
|
|
484
|
-
output.stderr(`${PRODUCT_TEXT.diagnostic(`could not point the #pi-tui proxy at the installed tree: ${errorMessage(error)}`)}\n`);
|
|
485
|
-
}
|
|
486
474
|
progress.set(70, 75);
|
|
487
475
|
// Concurrency: ownership can be reacquired after an interrupted installation (for
|
|
488
476
|
// example, if bare A1 is launched before the update is resumed). Recheck
|
|
@@ -623,10 +611,7 @@ function phaseBefore(current, target) {
|
|
|
623
611
|
}
|
|
624
612
|
class UpdateFailure extends Error {
|
|
625
613
|
exitCode;
|
|
626
|
-
constructor(exitCode, message) {
|
|
627
|
-
super(message);
|
|
628
|
-
this.exitCode = exitCode;
|
|
629
|
-
}
|
|
614
|
+
constructor(exitCode, message) { super(message); this.exitCode = exitCode; }
|
|
630
615
|
}
|
|
631
616
|
async function canonicalImmutableRoot(dataDir, releaseRoot) {
|
|
632
617
|
try {
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export { assertStartupPerformanceBudget, evaluateStartupPerformanceBudget, formatStartupBudgetViolation, resolveStartupBudgetMs } from "./startup-budget.js";
|
|
2
|
+
export type { StartupBudgetViolation, StartupPerformanceEvidence } from "./startup-budget.js";
|
|
3
|
+
export { assertImmutableWarmupEnvironment, collectCompileCaches, enableEnvironmentCompileCache, enableStartupCompileCache, initializeStartupTrace, markStartupPhase, parseStartupTrace, startupCompileCachePath, } from "./startup-runtime.js";
|
|
4
|
+
export type { StartupPhase, StartupTraceEvent } from "./startup-runtime.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export { assertStartupPerformanceBudget, evaluateStartupPerformanceBudget, formatStartupBudgetViolation, resolveStartupBudgetMs } from "./startup-budget.js";
|
|
2
|
+
export { assertImmutableWarmupEnvironment, collectCompileCaches, enableEnvironmentCompileCache, enableStartupCompileCache, initializeStartupTrace, markStartupPhase, parseStartupTrace, startupCompileCachePath, } from "./startup-runtime.js";
|
|
@@ -10,7 +10,7 @@ export const STARTUP_DESCRIPTOR = Object.freeze({
|
|
|
10
10
|
],
|
|
11
11
|
"generatedArtifact": {
|
|
12
12
|
"path": "dist/integrations/pi/startup-public.js",
|
|
13
|
-
"sha256": "
|
|
13
|
+
"sha256": "8782a192051008e2d99edaa7abc2eb47bd37a8b8ebda1b7fbd62a74f990e6d48"
|
|
14
14
|
},
|
|
15
15
|
"dependencyLayerIdentity": {
|
|
16
16
|
"source": "A1_RELEASE_LAYERS",
|
|
@@ -19,7 +19,7 @@ export const STARTUP_DESCRIPTOR = Object.freeze({
|
|
|
19
19
|
"compileCacheNamespace": {
|
|
20
20
|
"strategy": "node-abi-version-and-ordered-layer-sha256-v1"
|
|
21
21
|
},
|
|
22
|
-
"identity": "
|
|
22
|
+
"identity": "24b9db93df1ea18ef3fc7f669a9f45587750eb50c6de2ed7f57541c26c42ff0e"
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
export function loadDeclaredStartupGraph() {
|
|
@@ -1,27 +1,12 @@
|
|
|
1
1
|
import { DatabaseSync } from "node:sqlite";
|
|
2
|
-
import type { ManagedAgentDescriptor, PaneId, AgentRecoveryAuthority, RecoveryReferenceId, TerminalSessionLaunch, TerminalTopologySnapshot } from "../../contracts/workspace/index.js";
|
|
3
2
|
import type { LaunchInstance, LaunchInstanceId, LaunchInstanceOutcome, NativeProcessIdentity, ProcessContainmentIdentity } from "../lifecycle/index.js";
|
|
4
|
-
export declare const DEFAULT_WORKSPACE_ID = "workspace-default";
|
|
5
|
-
export interface WorkspaceAgentPresentation {
|
|
6
|
-
readonly unreadActivity: number;
|
|
7
|
-
readonly attention: boolean;
|
|
8
|
-
readonly failure: {
|
|
9
|
-
readonly code: string;
|
|
10
|
-
readonly message: string;
|
|
11
|
-
} | null;
|
|
12
|
-
}
|
|
13
|
-
export interface StoredWorkspaceAgent {
|
|
14
|
-
readonly agent: ManagedAgentDescriptor;
|
|
15
|
-
readonly presentation: WorkspaceAgentPresentation;
|
|
16
|
-
}
|
|
17
3
|
/** Owns WAL-backed control persistence and reconciles prior-boot records before current use. */
|
|
18
4
|
export declare class ControlStore {
|
|
19
5
|
#private;
|
|
20
|
-
readonly bootNonce: string | null;
|
|
21
6
|
readonly database: DatabaseSync;
|
|
7
|
+
readonly bootNonce: string | null;
|
|
22
8
|
constructor(path: string, bootNonce?: string | null);
|
|
23
9
|
migrate(): void;
|
|
24
|
-
reconcilePriorBootGenerations(bootNonce: string): number;
|
|
25
10
|
createLaunchInstance(instance: LaunchInstance): void;
|
|
26
11
|
activateLaunchInstance(instanceId: LaunchInstanceId, ownerClientId: string, rootIdentity: NativeProcessIdentity, containmentIdentity: ProcessContainmentIdentity, activatedAt: string): boolean;
|
|
27
12
|
beginLaunchInstanceStop(instanceId: LaunchInstanceId, ownerClientId: string, stoppingAt: string): boolean;
|
|
@@ -29,34 +14,5 @@ export declare class ControlStore {
|
|
|
29
14
|
loadActiveLaunchInstances(): LaunchInstance[];
|
|
30
15
|
loadLaunchInstance(instanceId: LaunchInstanceId): LaunchInstance | null;
|
|
31
16
|
reconcilePriorBootLaunchInstances(bootNonce: string, reconciledAt?: string): number;
|
|
32
|
-
persistWorkspaceAgent(agent: ManagedAgentDescriptor, updatedAt?: string): void;
|
|
33
|
-
persistWorkspaceAgentRecord(record: StoredWorkspaceAgent, updatedAt?: string): void;
|
|
34
|
-
replaceWorkspaceAgentRecords(records: readonly StoredWorkspaceAgent[], selectedAgentId: string | null, revision: number, updatedAt?: string): void;
|
|
35
|
-
loadWorkspaceAgents(): ManagedAgentDescriptor[];
|
|
36
|
-
loadWorkspaceAgentRecord(agentId: string): StoredWorkspaceAgent | null;
|
|
37
|
-
loadWorkspaceAgentRecords(): StoredWorkspaceAgent[];
|
|
38
|
-
loadSelectedWorkspaceAgentId(): string | null;
|
|
39
|
-
loadWorkspaceRevision(): number;
|
|
40
|
-
saveNativeHostTopology(topology: TerminalTopologySnapshot, rollbackTopology: TerminalTopologySnapshot | null, updatedAt?: string): void;
|
|
41
|
-
loadNativeHostTopology(hostInstanceId: string): {
|
|
42
|
-
readonly topology: TerminalTopologySnapshot;
|
|
43
|
-
readonly rollback: unknown;
|
|
44
|
-
readonly updatedAt: string;
|
|
45
|
-
} | null;
|
|
46
|
-
persistTerminalSession(session: TerminalSessionLaunch, hostInstanceId: string, paneId: PaneId, lifecycle: string, recoveryReferenceId: RecoveryReferenceId | null, updatedAt?: string): void;
|
|
47
|
-
loadTerminalSessions(): {
|
|
48
|
-
readonly session: TerminalSessionLaunch;
|
|
49
|
-
readonly hostInstanceId: string;
|
|
50
|
-
readonly paneId: PaneId;
|
|
51
|
-
readonly lifecycle: string;
|
|
52
|
-
readonly recoveryReferenceId: RecoveryReferenceId | null;
|
|
53
|
-
}[];
|
|
54
|
-
persistRecoveryReference(authority: AgentRecoveryAuthority, status: "pending" | "accepted" | "rejected" | "discontinuous", rollbackMetadata: Readonly<Record<string, unknown>>, updatedAt?: string): void;
|
|
55
|
-
loadRecoveryReference(id: RecoveryReferenceId): {
|
|
56
|
-
readonly authority: unknown;
|
|
57
|
-
readonly status: string;
|
|
58
|
-
readonly rollback: unknown;
|
|
59
|
-
readonly updatedAt: string;
|
|
60
|
-
} | null;
|
|
61
17
|
close(): void;
|
|
62
18
|
}
|