@timurproko/a1 0.2.7-dev.1249 → 0.2.7-dev.1252
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 +11 -36
- package/bin/cli.js +2 -17
- package/bin/ui.js +7 -48
- package/dist/app/session-shell/exit-notice.d.ts +2 -2
- package/dist/app/session-shell/exit-notice.js +10 -10
- package/dist/app/session-shell/prompt-submission.d.ts +2 -4
- package/dist/app/session-shell/prompt-submission.js +3 -23
- package/dist/app/session-shell/response-copy-transport.js +1 -2
- package/dist/app/session-shell/session-lifecycle.d.ts +1 -2
- package/dist/app/session-shell/session-lifecycle.js +2 -4
- package/dist/app/session-shell/session-shell-root.d.ts +0 -31
- package/dist/app/session-shell/session-shell-root.js +3 -4
- package/dist/app/session-shell/session-shell.js +6 -47
- package/dist/app/session-shell/session-viewport-controller.js +3 -6
- package/dist/app/session-shell/shell-host.js +2 -18
- package/dist/app/session-shell/transcript-document.d.ts +1 -2
- package/dist/app/session-shell/transcript-document.js +3 -28
- package/dist/app/session-shell/workflow-output.js +1 -1
- package/dist/app/session-shell/workflow-router.d.ts +1 -3
- package/dist/app/session-shell/workflow-router.js +1 -4
- package/dist/cli/dispatch.d.ts +1 -11
- package/dist/cli/dispatch.js +5 -92
- package/dist/cli/session-context.js +5 -7
- package/dist/cli/uninstall.d.ts +1 -5
- package/dist/cli/uninstall.js +6 -35
- package/dist/cli/version-stats.js +4 -7
- package/dist/composition/owned-settings.d.ts +0 -1
- package/dist/composition/owned-settings.js +0 -1
- package/dist/composition/owned-ui.d.ts +2 -24
- package/dist/composition/owned-ui.js +11 -87
- package/dist/composition/release-update-observation.d.ts +4 -4
- package/dist/composition/release-update-observation.js +17 -47
- package/dist/composition/session-backend.d.ts +0 -1
- package/dist/composition/session-runtime-registry.d.ts +3 -3
- package/dist/composition/settings-route-host.d.ts +0 -7
- package/dist/composition/settings-route-host.js +4 -10
- package/dist/composition/startup-route.d.ts +0 -1
- package/dist/composition/startup-route.js +0 -1
- package/dist/contracts/owned-ui/index.d.ts +1 -1
- package/dist/contracts/owned-ui/model.d.ts +0 -3
- package/dist/contracts/owned-ui/session-workflows.d.ts +1 -4
- package/dist/features/launch/development-launch.js +0 -1
- package/dist/features/launch/index.d.ts +1 -1
- package/dist/features/launch/intent.d.ts +1 -3
- package/dist/features/launch/intent.js +2 -4
- package/dist/features/launch/session-context.d.ts +2 -2
- package/dist/features/owned-ui/reference-screen-app.d.ts +0 -2
- package/dist/features/owned-ui/reference-screen-app.js +2 -9
- package/dist/features/owned-ui/settings-app.d.ts +0 -6
- package/dist/features/owned-ui/settings-app.js +5 -36
- package/dist/foundation/launch-context/index.d.ts +0 -12
- package/dist/foundation/launch-context/index.js +0 -26
- package/dist/foundation/lifecycle/claim-gate.d.ts +8 -0
- package/dist/foundation/lifecycle/claim-gate.js +37 -0
- package/dist/foundation/lifecycle/index.d.ts +5 -9
- package/dist/foundation/lifecycle/index.js +3 -4
- package/dist/foundation/lifecycle/model.d.ts +2 -59
- package/dist/foundation/lifecycle/model.js +0 -35
- package/dist/foundation/lifecycle/paths.d.ts +0 -24
- package/dist/foundation/lifecycle/paths.js +0 -40
- package/dist/foundation/lifecycle/process-liveness.d.ts +8 -0
- package/dist/foundation/lifecycle/process-liveness.js +18 -0
- package/dist/foundation/lifecycle/session-claim-lock.d.ts +1 -1
- package/dist/foundation/lifecycle/session-claim-lock.js +2 -2
- package/dist/foundation/lifecycle/session-repository-context.d.ts +6 -6
- package/dist/foundation/lifecycle/session-repository-context.js +2 -3
- package/dist/foundation/release/automatic-update.d.ts +1 -3
- package/dist/foundation/release/automatic-update.js +9 -30
- package/dist/foundation/release/bootstrap.d.ts +2 -25
- package/dist/foundation/release/bootstrap.js +33 -344
- package/dist/foundation/release/cohort-state.d.ts +21 -46
- package/dist/foundation/release/cohort-state.js +30 -62
- package/dist/foundation/release/dependency-certification.d.ts +1 -1
- package/dist/foundation/release/index.d.ts +10 -17
- package/dist/foundation/release/index.js +7 -11
- package/dist/foundation/release/latest-release.d.ts +1 -2
- package/dist/foundation/release/latest-release.js +1 -2
- package/dist/foundation/release/process-liveness.d.ts +2 -0
- package/dist/foundation/release/process-liveness.js +12 -0
- package/dist/foundation/release/release-gc.d.ts +12 -9
- package/dist/foundation/release/release-gc.js +34 -98
- package/dist/foundation/release/release-store.d.ts +2 -2
- package/dist/foundation/release/release-store.js +2 -2
- package/dist/foundation/release/restart-certification.js +1 -1
- package/dist/foundation/release/update-activation.d.ts +2 -9
- package/dist/foundation/release/update-activation.js +28 -43
- package/dist/foundation/release/update-execution-lease.js +1 -1
- package/dist/foundation/release/update-launch.d.ts +0 -2
- package/dist/foundation/release/update-launch.js +0 -7
- package/dist/foundation/release/update-recovery.js +1 -1
- package/dist/foundation/release/update-transaction.d.ts +1 -1
- package/dist/foundation/release/update-transaction.js +5 -2
- package/dist/foundation/release/update.d.ts +2 -10
- package/dist/foundation/release/update.js +23 -200
- package/dist/foundation/session-writer-lock/index.d.ts +14 -6
- package/dist/foundation/session-writer-lock/index.js +48 -103
- package/dist/foundation/startup/startup-runtime.d.ts +1 -1
- package/dist/foundation/terminal-cleanup/exit-notice.d.ts +6 -0
- package/dist/foundation/terminal-cleanup/exit-notice.js +36 -0
- package/dist/foundation/terminal-cleanup/index.d.ts +2 -1
- package/dist/foundation/terminal-cleanup/index.js +2 -1
- package/dist/foundation/terminal-cleanup/terminal-reset.d.ts +0 -5
- package/dist/foundation/terminal-cleanup/terminal-reset.js +0 -5
- package/dist/integrations/pi/components/index.d.ts +1 -1
- package/dist/integrations/pi/components/index.js +1 -1
- package/dist/integrations/pi/components/shell-editor-autocomplete.js +1 -4
- package/dist/integrations/pi/components/shell-footer-status.d.ts +1 -1
- package/dist/integrations/pi/components/shell-footer-status.js +2 -2
- package/dist/integrations/pi/components/shell-hotkey-sections.js +1 -1
- package/dist/integrations/pi/components/shell-presenters-info.d.ts +2 -5
- package/dist/integrations/pi/components/shell-presenters-info.js +4 -18
- package/dist/integrations/pi/components/shell-presenters-transcript.d.ts +1 -1
- package/dist/integrations/pi/components/shell-presenters-transcript.js +1 -1
- package/dist/integrations/pi/components/shell-shared-facade.d.ts +0 -2
- package/dist/integrations/pi/components/submitted-prompt-adapter.d.ts +2 -5
- package/dist/integrations/pi/components/submitted-prompt-adapter.js +2 -16
- package/dist/integrations/pi/components/upstream/components/session-footer.d.ts +1 -2
- package/dist/integrations/pi/components/upstream/components/session-footer.js +6 -8
- package/dist/integrations/pi/engine/adapter.d.ts +0 -1
- package/dist/integrations/pi/engine/adapter.js +1 -16
- package/dist/integrations/pi/engine/diagnostics-state.d.ts +0 -1
- package/dist/integrations/pi/engine/diagnostics-state.js +0 -14
- package/dist/integrations/pi/engine/prompt-suggestions.d.ts +0 -1
- package/dist/integrations/pi/engine/prompt-suggestions.js +0 -40
- package/dist/integrations/pi/engine/session-runtime.js +0 -2
- package/dist/integrations/pi/engine/workflow-runner.js +1 -1
- package/dist/integrations/pi/tui-runtime/adapter.d.ts +2 -2
- package/dist/integrations/pi/tui-runtime/adapter.js +2 -2
- package/dist/product-identity.d.ts +4 -6
- package/dist/product-identity.js +6 -11
- package/dist/product-identity.json +1 -40
- package/dist/runtime-payload-inventory.json +0 -3
- package/dist/ui/components/index.d.ts +2 -2
- package/dist/ui/components/index.js +1 -1
- package/dist/ui/components/submitted-prompt.d.ts +3 -13
- package/dist/ui/components/submitted-prompt.js +8 -41
- package/dist/ui/components/transcript-viewport.d.ts +1 -3
- package/dist/ui/components/transcript-viewport.js +1 -4
- package/dist/ui/settings/declarations.d.ts +3 -97
- package/dist/ui/settings/declarations.js +3 -78
- package/dist/ui/settings/migrations.js +18 -2
- package/docs/architecture/boundaries.md +22 -39
- package/docs/architecture/code-documentation.md +2 -2
- package/docs/architecture/internal-naming.md +9 -17
- package/docs/architecture/project-structure.md +9 -14
- package/docs/architecture/resource-and-data-policy.md +16 -31
- package/docs/architecture/toolchain.md +14 -19
- package/docs/architecture/ui-reference-provenance.md +2 -2
- package/docs/ci-release-runbook.md +5 -5
- package/docs/features/launch-profiles.md +11 -17
- package/docs/features/prompt-history.md +10 -11
- package/docs/local-worktree-cleanup.md +28 -1
- package/docs/manual-owned-ui-checkpoint.md +0 -1
- package/docs/validation.md +5 -11
- package/docs/worktree-link-recovery.md +6 -6
- package/package.json +7 -19
- package/bin/guardian.js +0 -42
- package/bin/supervisor.js +0 -7
- package/bin/tab-launch-context.d.ts +0 -27
- package/bin/tab-launch-context.js +0 -94
- package/dist/app/session-shell/resident-tab-coordinator.d.ts +0 -38
- package/dist/app/session-shell/resident-tab-coordinator.js +0 -77
- package/dist/cli/tabs-request.d.ts +0 -7
- package/dist/cli/tabs-request.js +0 -1
- package/dist/cli/tabs.d.ts +0 -14
- package/dist/cli/tabs.js +0 -151
- package/dist/composition/resident-tab-bridge.d.ts +0 -41
- package/dist/composition/resident-tab-bridge.js +0 -209
- package/dist/composition/utility-tab.d.ts +0 -28
- package/dist/composition/utility-tab.js +0 -244
- package/dist/features/owned-ui/plus-menu-dialog.d.ts +0 -28
- package/dist/features/owned-ui/plus-menu-dialog.js +0 -89
- package/dist/features/resident-tab/auto-name.d.ts +0 -11
- package/dist/features/resident-tab/auto-name.js +0 -44
- package/dist/features/resident-tab/index.d.ts +0 -5
- package/dist/features/resident-tab/index.js +0 -7
- package/dist/features/resident-tab/shortcut-bindings-file.d.ts +0 -8
- package/dist/features/resident-tab/shortcut-bindings-file.js +0 -40
- package/dist/features/resident-tab/shortcut-declarations.d.ts +0 -13
- package/dist/features/resident-tab/shortcut-declarations.js +0 -26
- package/dist/features/resident-tab/shortcut-projection.d.ts +0 -29
- package/dist/features/resident-tab/shortcut-projection.js +0 -64
- package/dist/features/resident-tab/status-deriver.d.ts +0 -10
- package/dist/features/resident-tab/status-deriver.js +0 -12
- package/dist/foundation/launch-guardian/exit-watcher.d.ts +0 -14
- package/dist/foundation/launch-guardian/exit-watcher.js +0 -103
- package/dist/foundation/launch-guardian/index.d.ts +0 -2
- package/dist/foundation/launch-guardian/index.js +0 -1
- package/dist/foundation/launch-guardian/main.d.ts +0 -39
- package/dist/foundation/launch-guardian/main.js +0 -232
- package/dist/foundation/lifecycle/commands.d.ts +0 -40
- package/dist/foundation/lifecycle/commands.js +0 -1
- package/dist/foundation/lifecycle/launch-instance.d.ts +0 -46
- package/dist/foundation/lifecycle/launch-instance.js +0 -134
- package/dist/foundation/lifecycle/native-claim-gate.d.ts +0 -5
- package/dist/foundation/lifecycle/native-claim-gate.js +0 -41
- package/dist/foundation/lifecycle/supervisor-startup.d.ts +0 -30
- package/dist/foundation/lifecycle/supervisor-startup.js +0 -106
- package/dist/foundation/process-containment/addon-containment.d.ts +0 -20
- package/dist/foundation/process-containment/addon-containment.js +0 -139
- package/dist/foundation/process-containment/addon-process-inspector.d.ts +0 -11
- package/dist/foundation/process-containment/addon-process-inspector.js +0 -36
- package/dist/foundation/process-containment/addon.d.ts +0 -47
- package/dist/foundation/process-containment/addon.js +0 -57
- package/dist/foundation/process-containment/artifact.d.ts +0 -1
- package/dist/foundation/process-containment/artifact.js +0 -35
- package/dist/foundation/process-containment/contracts.d.ts +0 -33
- package/dist/foundation/process-containment/contracts.js +0 -35
- package/dist/foundation/process-containment/index.d.ts +0 -9
- package/dist/foundation/process-containment/index.js +0 -7
- package/dist/foundation/process-containment/linux-process-inspector.d.ts +0 -7
- package/dist/foundation/process-containment/linux-process-inspector.js +0 -27
- package/dist/foundation/process-containment/native-process-inspector.d.ts +0 -4
- package/dist/foundation/process-containment/native-process-inspector.js +0 -21
- package/dist/foundation/protocol/client.d.ts +0 -18
- package/dist/foundation/protocol/client.js +0 -130
- package/dist/foundation/protocol/index.d.ts +0 -3
- package/dist/foundation/protocol/index.js +0 -2
- package/dist/foundation/protocol/messages.d.ts +0 -90
- package/dist/foundation/protocol/messages.js +0 -100
- package/dist/foundation/release/cohort-selection.d.ts +0 -33
- package/dist/foundation/release/cohort-selection.js +0 -67
- package/dist/foundation/release/endpoint-lock.d.ts +0 -2
- package/dist/foundation/release/endpoint-lock.js +0 -37
- package/dist/foundation/release/endpoint-recovery.d.ts +0 -10
- package/dist/foundation/release/endpoint-recovery.js +0 -45
- package/dist/foundation/release/endpoints.d.ts +0 -32
- package/dist/foundation/release/endpoints.js +0 -152
- package/dist/foundation/release/prepared-update-activation.d.ts +0 -3
- package/dist/foundation/release/prepared-update-activation.js +0 -27
- package/dist/foundation/release/process-cleanup.d.ts +0 -14
- package/dist/foundation/release/process-cleanup.js +0 -76
- package/dist/foundation/release/supervisor-identity.d.ts +0 -15
- package/dist/foundation/release/supervisor-identity.js +0 -63
- package/dist/foundation/resident-tabs/boot-identity.d.ts +0 -6
- package/dist/foundation/resident-tabs/boot-identity.js +0 -16
- package/dist/foundation/resident-tabs/bounded-host-command.d.ts +0 -20
- package/dist/foundation/resident-tabs/bounded-host-command.js +0 -62
- package/dist/foundation/resident-tabs/bridge-client.d.ts +0 -73
- package/dist/foundation/resident-tabs/bridge-client.js +0 -327
- package/dist/foundation/resident-tabs/continuity.d.ts +0 -12
- package/dist/foundation/resident-tabs/continuity.js +0 -63
- package/dist/foundation/resident-tabs/doctor.d.ts +0 -28
- package/dist/foundation/resident-tabs/doctor.js +0 -166
- package/dist/foundation/resident-tabs/draft-checkpoint.d.ts +0 -27
- package/dist/foundation/resident-tabs/draft-checkpoint.js +0 -145
- package/dist/foundation/resident-tabs/ensure-terminal-host.d.ts +0 -36
- package/dist/foundation/resident-tabs/ensure-terminal-host.js +0 -151
- package/dist/foundation/resident-tabs/fault-injection.d.ts +0 -8
- package/dist/foundation/resident-tabs/fault-injection.js +0 -26
- package/dist/foundation/resident-tabs/fixture-control.d.ts +0 -7
- package/dist/foundation/resident-tabs/fixture-control.js +0 -35
- package/dist/foundation/resident-tabs/host-entry.d.ts +0 -1
- package/dist/foundation/resident-tabs/host-entry.js +0 -17
- package/dist/foundation/resident-tabs/index.d.ts +0 -15
- package/dist/foundation/resident-tabs/index.js +0 -10
- package/dist/foundation/resident-tabs/maintenance.d.ts +0 -39
- package/dist/foundation/resident-tabs/maintenance.js +0 -75
- package/dist/foundation/resident-tabs/progress-observation-schema.d.ts +0 -34
- package/dist/foundation/resident-tabs/progress-observation-schema.js +0 -1
- package/dist/foundation/resident-tabs/progress-observation.d.ts +0 -4
- package/dist/foundation/resident-tabs/progress-observation.js +0 -150
- package/dist/foundation/resident-tabs/prompt-journal.d.ts +0 -63
- package/dist/foundation/resident-tabs/prompt-journal.js +0 -213
- package/dist/foundation/resident-tabs/protocol.d.ts +0 -12
- package/dist/foundation/resident-tabs/protocol.js +0 -195
- package/dist/foundation/resident-tabs/recovery.d.ts +0 -26
- package/dist/foundation/resident-tabs/recovery.js +0 -205
- package/dist/foundation/resident-tabs/release-holds.d.ts +0 -28
- package/dist/foundation/resident-tabs/release-holds.js +0 -78
- package/dist/foundation/resident-tabs/routes.d.ts +0 -5
- package/dist/foundation/resident-tabs/routes.js +0 -5
- package/dist/foundation/resident-tabs/routing.d.ts +0 -11
- package/dist/foundation/resident-tabs/routing.js +0 -10
- package/dist/foundation/resident-tabs/runtime-control.d.ts +0 -38
- package/dist/foundation/resident-tabs/runtime-control.js +0 -74
- package/dist/foundation/resident-tabs/session-sync.d.ts +0 -14
- package/dist/foundation/resident-tabs/session-sync.js +0 -37
- package/dist/foundation/resident-tabs/settings.d.ts +0 -16
- package/dist/foundation/resident-tabs/settings.js +0 -60
- package/dist/foundation/resident-tabs/terminal-host-artifact.d.ts +0 -14
- package/dist/foundation/resident-tabs/terminal-host-artifact.js +0 -78
- package/dist/foundation/resident-tabs/zip-archive.d.ts +0 -9
- package/dist/foundation/resident-tabs/zip-archive.js +0 -56
- package/dist/foundation/storage/control-store.d.ts +0 -20
- package/dist/foundation/storage/control-store.js +0 -331
- package/dist/foundation/storage/index.d.ts +0 -1
- package/dist/foundation/storage/index.js +0 -1
- package/dist/foundation/supervision/index.d.ts +0 -3
- package/dist/foundation/supervision/index.js +0 -3
- package/dist/foundation/supervision/main.d.ts +0 -1
- package/dist/foundation/supervision/main.js +0 -86
- package/dist/foundation/supervision/paths.d.ts +0 -1
- package/dist/foundation/supervision/paths.js +0 -1
- package/dist/foundation/supervision/server.d.ts +0 -46
- package/dist/foundation/supervision/server.js +0 -611
- package/dist/integrations/pi/engine/offline-settings-port.d.ts +0 -23
- package/dist/integrations/pi/engine/offline-settings-port.js +0 -54
- package/dist/native/darwin-arm64/manifest.json +0 -23
- package/dist/native/darwin-arm64/process-guardian.node +0 -0
- package/dist/native/darwin-arm64/terminal-host-THIRD-PARTY-NOTICES.txt +0 -10500
- package/dist/native/darwin-arm64/terminal-host.manifest.json +0 -46
- package/dist/native/darwin-arm64/terminal-host.node +0 -0
- package/dist/native/darwin-x64/manifest.json +0 -23
- package/dist/native/darwin-x64/process-guardian.node +0 -0
- package/dist/native/darwin-x64/terminal-host-THIRD-PARTY-NOTICES.txt +0 -10737
- package/dist/native/darwin-x64/terminal-host.manifest.json +0 -46
- package/dist/native/darwin-x64/terminal-host.node +0 -0
- package/dist/native/linux-x64/manifest.json +0 -23
- package/dist/native/linux-x64/process-guardian.node +0 -0
- package/dist/native/linux-x64/terminal-host-THIRD-PARTY-NOTICES.txt +0 -11226
- package/dist/native/linux-x64/terminal-host.manifest.json +0 -46
- package/dist/native/linux-x64/terminal-host.node +0 -0
- package/dist/native/win32-x64/manifest.json +0 -23
- package/dist/native/win32-x64/process-guardian.node +0 -0
- package/dist/native/win32-x64/terminal-host-THIRD-PARTY-NOTICES.txt +0 -10757
- package/dist/native/win32-x64/terminal-host.manifest.json +0 -46
- package/dist/native/win32-x64/terminal-host.node +0 -0
- package/docs/architecture/evidence/resident-tabs/linux-x64.md +0 -37
- package/docs/architecture/evidence/resident-tabs/macos-arm64.md +0 -36
- package/docs/architecture/evidence/resident-tabs/macos-x64.md +0 -35
- package/docs/architecture/evidence/resident-tabs/windows-x64.md +0 -36
- package/docs/architecture/evidence/terminal-host-spike/manual-one-pane-terminal-host.md +0 -70
- package/docs/architecture/evidence/terminal-host-spike/manual-two-by-two-basic-terminal-host.md +0 -32
- package/docs/architecture/evidence/terminal-host-spike/milestone-baseline.json +0 -115
- package/docs/architecture/evidence/terminal-host-spike/owned-ui-foundation-prerequisite.json +0 -48
- package/docs/architecture/evidence/terminal-host-spike/terminal-host-provenance.json +0 -125
- package/docs/architecture/evidence/terminal-host-spike/terminal-host-task-5-1.json +0 -56
- package/docs/architecture/evidence/terminal-host-spike/terminal-host-task-5-3.json +0 -174
- package/docs/architecture/evidence/terminal-host-spike/terminal-spike-acceptance-record.json +0 -18
- package/docs/architecture/native-fixture-isolation.md +0 -23
- package/docs/architecture/process-guardian-provenance.md +0 -36
- package/docs/architecture/resident-tabs-requirements.md +0 -18
- package/docs/architecture/resident-tabs.md +0 -668
- package/docs/architecture/terminal-host-proof-gate.md +0 -34
- package/docs/architecture/terminal-host-provenance.md +0 -81
- package/docs/architecture/terminal-host-spike-evidence.md +0 -39
- package/docs/launch-recovery.md +0 -23
- package/docs/manual-launch-instance-acceptance.md +0 -43
- package/docs/manual-resident-tabs-acceptance.md +0 -51
|
@@ -167,8 +167,8 @@ export async function repairMaterializedRelease(packageRoot, releaseRoot) {
|
|
|
167
167
|
}
|
|
168
168
|
/**
|
|
169
169
|
* Load metadata for a release whose bytes were already certified by the
|
|
170
|
-
* current parent process or an authenticated
|
|
171
|
-
* establish
|
|
170
|
+
* current parent process or recorded by an authenticated certification. Callers must
|
|
171
|
+
* establish that precondition; untrusted releases require full
|
|
172
172
|
* verification.
|
|
173
173
|
*/
|
|
174
174
|
export async function readCertifiedReleaseManifest(record, selectedStoreRoot, options = {}) {
|
|
@@ -10,7 +10,7 @@ import { PRODUCT_PACKAGE_NAME } from "./release.js";
|
|
|
10
10
|
import { RELEASE_MANIFEST_FILENAME } from "./release-store.js";
|
|
11
11
|
import { UpdateTransactionStore } from "./update-transaction.js";
|
|
12
12
|
const RESTART_SEAL_VERSION = 1;
|
|
13
|
-
const REQUIRED_LAUNCH_ENTRIES = ["bin/
|
|
13
|
+
const REQUIRED_LAUNCH_ENTRIES = ["bin/ui.js"];
|
|
14
14
|
/** Build compact restart authority after complete content verification established read-only payload files. */
|
|
15
15
|
export async function createRestartSeal(release, dataDir) {
|
|
16
16
|
const policy = immutablePlatformPolicy();
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ContinuityOptions } from "../resident-tabs/index.js";
|
|
2
1
|
/**
|
|
3
2
|
* The one activation contract an installed tree can offer the updater that installed it.
|
|
4
3
|
* The updater knows nothing else about the tree: the manifest names the contracts the tree
|
|
@@ -9,10 +8,6 @@ export declare const UPDATE_ACTIVATION_ENTRY = "bin/activate.js";
|
|
|
9
8
|
/** Manifest field listing the activation contracts an installed tree serves. */
|
|
10
9
|
export declare const UPDATE_ACTIVATION_MANIFEST_FIELD = "updateActivationContracts";
|
|
11
10
|
export type UpdateActivationPhase = "materialized" | "certified" | "active-reference-committed";
|
|
12
|
-
/** A certified candidate is safe to retain, but resident control continuity blocks selection. */
|
|
13
|
-
export declare class UpdateActivationBlockedError extends Error {
|
|
14
|
-
readonly code: "resident-continuity-blocked";
|
|
15
|
-
}
|
|
16
11
|
/**
|
|
17
12
|
* Copying the release is the longest step with nothing to say for itself, so it
|
|
18
13
|
* reports the files it has written against the files it must write. A caller that
|
|
@@ -49,12 +44,11 @@ export type UpdateActivationEvent = {
|
|
|
49
44
|
} | {
|
|
50
45
|
readonly event: "failed";
|
|
51
46
|
readonly message: string;
|
|
52
|
-
readonly code?: UpdateActivationBlockedError["code"];
|
|
53
47
|
};
|
|
54
48
|
/**
|
|
55
49
|
* Activate the installed tree at `packageRoot` with this process's own release code:
|
|
56
|
-
* materialize it into the immutable store, certify, warm,
|
|
57
|
-
*
|
|
50
|
+
* materialize it into the immutable store, certify, warm, and only then move the active
|
|
51
|
+
* reference. This is what the installed tree runs for itself through
|
|
58
52
|
* its activation entry, and what an updater runs in-process for a tree older than the contract.
|
|
59
53
|
*/
|
|
60
54
|
export declare function activateInstalledRelease(request: UpdateActivationRequest, callbacks: UpdateActivationCallbacks): Promise<void>;
|
|
@@ -76,4 +70,3 @@ export declare function delegateActivation(request: UpdateActivationRequest, cal
|
|
|
76
70
|
export declare function runActivationEntry(argv: readonly string[], entryUrl: string, io?: {
|
|
77
71
|
write(line: string): void;
|
|
78
72
|
}, environment?: NodeJS.ProcessEnv): Promise<number>;
|
|
79
|
-
export declare function assertContinuityOrBlock(context: ContinuityOptions): Promise<void>;
|
|
@@ -2,10 +2,9 @@ import { spawn } from "node:child_process";
|
|
|
2
2
|
import { readFile } from "node:fs/promises";
|
|
3
3
|
import { resolve } from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
|
-
import {
|
|
6
|
-
import { certifyMaterializedRelease
|
|
5
|
+
import { PRODUCT_TEXT } from "../../product-identity.js";
|
|
6
|
+
import { certifyMaterializedRelease } from "./bootstrap.js";
|
|
7
7
|
import { CohortStateStore } from "./cohort-state.js";
|
|
8
|
-
import { encodeFrame, LineFrameDecoder } from "../protocol/index.js";
|
|
9
8
|
import { resolveProductPaths } from "../lifecycle/index.js";
|
|
10
9
|
import { materializeRelease } from "./release-store.js";
|
|
11
10
|
import { warmMaterializedRelease } from "./warmup.js";
|
|
@@ -19,14 +18,12 @@ export const UPDATE_ACTIVATION_ENTRY = "bin/activate.js";
|
|
|
19
18
|
/** Manifest field listing the activation contracts an installed tree serves. */
|
|
20
19
|
export const UPDATE_ACTIVATION_MANIFEST_FIELD = "updateActivationContracts";
|
|
21
20
|
const ACTIVATION_DIAGNOSTIC_LIMIT = 2_000;
|
|
22
|
-
/**
|
|
23
|
-
|
|
24
|
-
code = "resident-continuity-blocked";
|
|
25
|
-
}
|
|
21
|
+
/** Bound on one progress line; the activator's events are all far shorter. */
|
|
22
|
+
const ACTIVATION_LINE_LIMIT = 64 * 1_024;
|
|
26
23
|
/**
|
|
27
24
|
* Activate the installed tree at `packageRoot` with this process's own release code:
|
|
28
|
-
* materialize it into the immutable store, certify, warm,
|
|
29
|
-
*
|
|
25
|
+
* materialize it into the immutable store, certify, warm, and only then move the active
|
|
26
|
+
* reference. This is what the installed tree runs for itself through
|
|
30
27
|
* its activation entry, and what an updater runs in-process for a tree older than the contract.
|
|
31
28
|
*/
|
|
32
29
|
export async function activateInstalledRelease(request, callbacks) {
|
|
@@ -55,16 +52,6 @@ export async function activateInstalledRelease(request, callbacks) {
|
|
|
55
52
|
callbacks.onWarmup?.("started");
|
|
56
53
|
await warmMaterializedRelease(candidate, request.environment);
|
|
57
54
|
callbacks.onWarmup?.("completed");
|
|
58
|
-
await completeActivation(candidate, request, callbacks, stateStore);
|
|
59
|
-
}
|
|
60
|
-
async function completeActivation(candidate, request, callbacks, stateStore) {
|
|
61
|
-
const paths = resolveProductPaths(request.environment);
|
|
62
|
-
const continuity = { releaseRoot: candidate.releaseRoot, dataDir: request.dataDir, environment: request.environment,
|
|
63
|
-
profileRoot: request.environment[PRODUCT_IDENTITY.environment.profileHome] ?? paths.configDir, runtimeDir: paths.runtimeDir };
|
|
64
|
-
await assertContinuityOrBlock(continuity);
|
|
65
|
-
await ensureSupervisor(candidate, request.environment);
|
|
66
|
-
// Invariant: revalidate after supervision, before committing client activation or restart readiness.
|
|
67
|
-
await assertContinuityOrBlock(continuity);
|
|
68
55
|
await stateStore.activate(candidate.releaseId);
|
|
69
56
|
await callbacks.phase("active-reference-committed");
|
|
70
57
|
}
|
|
@@ -94,7 +81,7 @@ export async function delegateActivation(request, callbacks) {
|
|
|
94
81
|
stdio: ["ignore", "pipe", "pipe"],
|
|
95
82
|
windowsHide: true,
|
|
96
83
|
});
|
|
97
|
-
|
|
84
|
+
let pending = "";
|
|
98
85
|
let diagnostics = "";
|
|
99
86
|
let failure = null;
|
|
100
87
|
let completed = false;
|
|
@@ -102,14 +89,25 @@ export async function delegateActivation(request, callbacks) {
|
|
|
102
89
|
let relay = Promise.resolve();
|
|
103
90
|
child.stderr?.setEncoding("utf8");
|
|
104
91
|
child.stderr?.on("data", chunk => { diagnostics = `${diagnostics}${chunk}`.slice(-ACTIVATION_DIAGNOSTIC_LIMIT); });
|
|
92
|
+
child.stdout?.setEncoding("utf8");
|
|
105
93
|
child.stdout?.on("data", chunk => {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
94
|
+
const lines = `${pending}${String(chunk)}`.split("\n");
|
|
95
|
+
pending = lines.pop() ?? "";
|
|
96
|
+
if (pending.length > ACTIVATION_LINE_LIMIT) {
|
|
97
|
+
failure ??= new Error("activation event exceeds the line limit");
|
|
98
|
+
pending = "";
|
|
109
99
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
100
|
+
const events = [];
|
|
101
|
+
for (const line of lines) {
|
|
102
|
+
if (line.trim().length === 0)
|
|
103
|
+
continue;
|
|
104
|
+
try {
|
|
105
|
+
events.push(JSON.parse(line));
|
|
106
|
+
}
|
|
107
|
+
catch (error) {
|
|
108
|
+
failure ??= new Error(errorMessage(error));
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
113
111
|
}
|
|
114
112
|
for (const event of events) {
|
|
115
113
|
relay = relay.then(async () => {
|
|
@@ -127,9 +125,7 @@ export async function delegateActivation(request, callbacks) {
|
|
|
127
125
|
else if (parsed.event === "completed")
|
|
128
126
|
completed = true;
|
|
129
127
|
else
|
|
130
|
-
failure ??= parsed.
|
|
131
|
-
? new UpdateActivationBlockedError(parsed.message)
|
|
132
|
-
: new Error(parsed.message);
|
|
128
|
+
failure ??= new Error(parsed.message);
|
|
133
129
|
}).catch(error => { failure ??= new Error(errorMessage(error)); });
|
|
134
130
|
}
|
|
135
131
|
});
|
|
@@ -150,7 +146,7 @@ export async function delegateActivation(request, callbacks) {
|
|
|
150
146
|
* writing one progress event per line so the updater that started it can follow along.
|
|
151
147
|
*/
|
|
152
148
|
export async function runActivationEntry(argv, entryUrl, io = { write: line => process.stdout.write(line) }, environment = process.env) {
|
|
153
|
-
const emit = (event) => io.write(
|
|
149
|
+
const emit = (event) => io.write(`${JSON.stringify(event)}\n`);
|
|
154
150
|
try {
|
|
155
151
|
const arguments_ = parseEntryArguments(argv);
|
|
156
152
|
const packageRoot = resolve(fileURLToPath(new URL("..", entryUrl)));
|
|
@@ -168,7 +164,7 @@ export async function runActivationEntry(argv, entryUrl, io = { write: line => p
|
|
|
168
164
|
return 0;
|
|
169
165
|
}
|
|
170
166
|
catch (error) {
|
|
171
|
-
emit({ event: "failed", message: errorMessage(error)
|
|
167
|
+
emit({ event: "failed", message: errorMessage(error) });
|
|
172
168
|
return 1;
|
|
173
169
|
}
|
|
174
170
|
}
|
|
@@ -206,22 +202,11 @@ function parseActivationEvent(value) {
|
|
|
206
202
|
case "completed":
|
|
207
203
|
return { event: "completed" };
|
|
208
204
|
case "failed":
|
|
209
|
-
return typeof record.message === "string"
|
|
210
|
-
? { event: "failed", message: record.message, ...(record.code === undefined ? {} : { code: record.code }) }
|
|
211
|
-
: null;
|
|
205
|
+
return typeof record.message === "string" ? { event: "failed", message: record.message } : null;
|
|
212
206
|
default:
|
|
213
207
|
return null;
|
|
214
208
|
}
|
|
215
209
|
}
|
|
216
|
-
export async function assertContinuityOrBlock(context) {
|
|
217
|
-
const { assertResidentContinuity } = await import("../resident-tabs/index.js");
|
|
218
|
-
try {
|
|
219
|
-
await assertResidentContinuity(context);
|
|
220
|
-
}
|
|
221
|
-
catch (error) {
|
|
222
|
-
throw new UpdateActivationBlockedError(errorMessage(error), { cause: error });
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
210
|
function summarize(text) {
|
|
226
211
|
const lines = text.split(/\r?\n/).map(line => line.trim()).filter(line => line.length > 0);
|
|
227
212
|
return lines.length === 0 ? "" : `: ${lines.slice(0, 4).join(" | ")}`;
|
|
@@ -2,7 +2,7 @@ import { randomUUID } from "node:crypto";
|
|
|
2
2
|
import { mkdir, open, readFile, rename, rm } from "node:fs/promises";
|
|
3
3
|
import { dirname, resolve } from "node:path";
|
|
4
4
|
import lockfile from "proper-lockfile";
|
|
5
|
-
import { processIsAlive } from "./process-
|
|
5
|
+
import { processIsAlive } from "./process-liveness.js";
|
|
6
6
|
import { UpdateTransactionStore } from "./update-transaction.js";
|
|
7
7
|
export const UPDATE_EXECUTION_LEASE_FILENAME = "update-execution.json";
|
|
8
8
|
const LEASE_SCHEMA = 1;
|
|
@@ -2,5 +2,3 @@ import type { CohortState, ReleaseRecord } from "./cohort-state.js";
|
|
|
2
2
|
import type { UpdateTransaction } from "./update-transaction.js";
|
|
3
3
|
/** Keep interactive launches on the last successful release until the update commits success. */
|
|
4
4
|
export declare function selectUpdateLaunchRelease(state: CohortState, transaction: UpdateTransaction | null): ReleaseRecord | null;
|
|
5
|
-
/** Pause cohort retirement during preparation; afterward only the successful launch release admits new sessions. */
|
|
6
|
-
export declare function selectSupervisorLaunchReleaseId(state: CohortState, transaction: UpdateTransaction | null): string | null;
|
|
@@ -8,10 +8,3 @@ export function selectUpdateLaunchRelease(state, transaction) {
|
|
|
8
8
|
}
|
|
9
9
|
return prior;
|
|
10
10
|
}
|
|
11
|
-
/** Pause cohort retirement during preparation; afterward only the successful launch release admits new sessions. */
|
|
12
|
-
export function selectSupervisorLaunchReleaseId(state, transaction) {
|
|
13
|
-
// Concurrency: both the previous cohort and the warming candidate must remain available until cutover.
|
|
14
|
-
if (transaction?.status === "active")
|
|
15
|
-
return null;
|
|
16
|
-
return selectUpdateLaunchRelease(state, transaction)?.releaseId ?? state.references.active;
|
|
17
|
-
}
|
|
@@ -4,7 +4,7 @@ import { chmod, lstat, mkdir, open, readFile, readdir, realpath, rename, rm, wri
|
|
|
4
4
|
import { basename, dirname, isAbsolute, relative, resolve, sep } from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
6
|
import { PRODUCT_IDENTITY, PRODUCT_TEXT } from "../../product-identity.js";
|
|
7
|
-
import { processIsAlive } from "./process-
|
|
7
|
+
import { processIsAlive } from "./process-liveness.js";
|
|
8
8
|
import { PRIVATE_LAUNCH_CONTRACT, assertCurrentLaunchContract } from "../launch-context/index.js";
|
|
9
9
|
export const UPDATE_RECOVERY_SCHEMA = "a1-update-recovery-v1";
|
|
10
10
|
const WORKER_TIMEOUT_MS = 15 * 60 * 1_000;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const UPDATE_JOURNAL_SCHEMA: string;
|
|
2
2
|
import type { UpdateChannel } from "./types.js";
|
|
3
|
-
export type UpdateTransactionPhase = "shutdown-intent" | "ownership-released" | "package-installed" | "materialized" | "certified" | "active-reference-committed"
|
|
3
|
+
export type UpdateTransactionPhase = "shutdown-intent" | "ownership-released" | "package-installed" | "materialized" | "certified" | "active-reference-committed";
|
|
4
4
|
export interface UpdateRecoveryState {
|
|
5
5
|
readonly capsulePath: string;
|
|
6
6
|
readonly status: "prepared" | "running" | "package-installed" | "recovery-launcher";
|
|
@@ -3,13 +3,16 @@ import { mkdir, open, readFile, rename, rm } from "node:fs/promises";
|
|
|
3
3
|
import { dirname, resolve } from "node:path";
|
|
4
4
|
import { PRODUCT_IDENTITY, PRODUCT_TEXT } from "../../product-identity.js";
|
|
5
5
|
export const UPDATE_JOURNAL_SCHEMA = PRODUCT_IDENTITY.protocol.updateJournalSchema;
|
|
6
|
+
/** Compatibility: a journal written before supervision was removed may name its last phase. */
|
|
7
|
+
const LEGACY_FINAL_PHASE = "supervisor-verified";
|
|
6
8
|
/** Persists the durable update journal and permits only validated forward transaction phases. */
|
|
7
9
|
export class UpdateTransactionStore {
|
|
8
10
|
path;
|
|
9
11
|
constructor(dataDir) { this.path = resolve(dataDir, "update-transaction.json"); }
|
|
10
12
|
async read() {
|
|
11
13
|
try {
|
|
12
|
-
const
|
|
14
|
+
const parsed = JSON.parse(await readFile(this.path, "utf8"));
|
|
15
|
+
const value = parsed.phase === LEGACY_FINAL_PHASE ? { ...parsed, phase: "active-reference-committed" } : parsed;
|
|
13
16
|
validate(value);
|
|
14
17
|
return value;
|
|
15
18
|
}
|
|
@@ -87,7 +90,7 @@ export class UpdateTransactionStore {
|
|
|
87
90
|
}
|
|
88
91
|
}
|
|
89
92
|
function phaseOrder(phase) {
|
|
90
|
-
return ["shutdown-intent", "ownership-released", "package-installed", "materialized", "certified", "active-reference-committed"
|
|
93
|
+
return ["shutdown-intent", "ownership-released", "package-installed", "materialized", "certified", "active-reference-committed"].indexOf(phase);
|
|
91
94
|
}
|
|
92
95
|
function validate(value) {
|
|
93
96
|
if (value.schema !== UPDATE_JOURNAL_SCHEMA || typeof value.transactionId !== "string" || !["stable", "next"].includes(value.channel)
|
|
@@ -40,7 +40,7 @@ export interface UpdateOutput {
|
|
|
40
40
|
stdout(message: string): void;
|
|
41
41
|
stderr(message: string): void;
|
|
42
42
|
}
|
|
43
|
-
export type UpdateMeasuredPhase = "package-version" | "target-resolution" | "global-root" | "ownership-release" | "npm-install" | "materialized" | "certified" | "active-reference-committed" | "warmup" | "
|
|
43
|
+
export type UpdateMeasuredPhase = "package-version" | "target-resolution" | "global-root" | "ownership-release" | "npm-install" | "materialized" | "certified" | "active-reference-committed" | "warmup" | "transaction-complete";
|
|
44
44
|
export interface UpdatePhaseTimingEvent {
|
|
45
45
|
readonly phase: UpdateMeasuredPhase;
|
|
46
46
|
readonly durationMs: number;
|
|
@@ -89,13 +89,8 @@ export interface SelfUpdateOptions {
|
|
|
89
89
|
export type { UpdateActivationPhase, UpdateMaterializationProgress } from "./update-activation.js";
|
|
90
90
|
export interface UpdateLifecycleCoordinator {
|
|
91
91
|
targetIsActive(targetVersion: string): Promise<boolean>;
|
|
92
|
-
verifyAutomaticSafety?(): Promise<void>;
|
|
93
|
-
shutdownVerifiedOwners(targetVersion: string): Promise<{
|
|
94
|
-
priorActiveVersion: string | null;
|
|
95
|
-
}>;
|
|
96
92
|
verifyPackageUnlocked(packageRoot: string): Promise<void>;
|
|
97
93
|
activateInstalled(packageRoot: string, targetVersion: string, phase: (phase: UpdateActivationPhase) => Promise<void>, onMaterializing?: (progress: UpdateMaterializationProgress) => void, onWarmup?: (state: "started" | "completed") => void): Promise<void>;
|
|
98
|
-
activatePrepared?(targetVersion: string, phase: (phase: UpdateActivationPhase) => Promise<void>): Promise<void>;
|
|
99
94
|
}
|
|
100
95
|
export interface UpdateTransactionJournal {
|
|
101
96
|
readonly path: string;
|
|
@@ -136,7 +131,6 @@ export interface UpdatePackageReplacementInput {
|
|
|
136
131
|
*/
|
|
137
132
|
export declare const PACKAGE_UNLOCK_PATIENCE_MS = 15000;
|
|
138
133
|
export declare const UPDATE_ALREADY_RUNNING_EXIT_CODE = 75;
|
|
139
|
-
export declare const UPDATE_ACTIVATION_BLOCKED_EXIT_CODE = 76;
|
|
140
134
|
/** Whether a rename failure means something holds the tree, as opposed to the tree being wrong. */
|
|
141
135
|
export declare function isPackageLockError(error: unknown): boolean;
|
|
142
136
|
/** What the user reads when the package stayed held for the whole patience window. */
|
|
@@ -144,9 +138,7 @@ export declare function lockedPackageDiagnostic(packageRoot: string, waitedMs: n
|
|
|
144
138
|
/** Bound on the child diagnostics an update keeps: enough for npm's failure reason, never a log. */
|
|
145
139
|
export declare const CHILD_DIAGNOSTIC_LIMIT = 8000;
|
|
146
140
|
export declare function createNpmProcessRunner(platform?: NodeJS.Platform): UpdateProcessRunner;
|
|
147
|
-
export
|
|
148
|
-
export declare function planUpdateOwnership(ownership: "live-verified" | "dead", runsFromRetainedRelease: boolean): UpdateOwnershipAction;
|
|
149
|
-
export declare function createUpdateLifecycleCoordinator(environment?: NodeJS.ProcessEnv, fileSystem?: UpdateFileSystem, output?: UpdateOutput, patience?: UpdateUnlockPatience): UpdateLifecycleCoordinator;
|
|
141
|
+
export declare function createUpdateLifecycleCoordinator(environment?: NodeJS.ProcessEnv, fileSystem?: UpdateFileSystem, _output?: UpdateOutput, patience?: UpdateUnlockPatience): UpdateLifecycleCoordinator;
|
|
150
142
|
/** Renders the terminal-only update meter; the visual preview shares this exact frame. */
|
|
151
143
|
export declare function renderUpdateProgressBar(percent: number, accent?: string): string;
|
|
152
144
|
export declare function runSelfUpdate(options: SelfUpdateOptions): Promise<number>;
|