@timurproko/a1 0.2.7-dev.1249 → 0.2.7-dev.1255
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 +10 -51
- package/dist/app/session-shell/clipboard-diagnostics.d.ts +2 -2
- package/dist/app/session-shell/clipboard-image.d.ts +0 -1
- package/dist/app/session-shell/clipboard-image.js +1 -1
- package/dist/app/session-shell/dialog-coordinator.d.ts +6 -5
- package/dist/app/session-shell/dialog-coordinator.js +3 -4
- package/dist/app/session-shell/dock-chrome.d.ts +11 -6
- package/dist/app/session-shell/dock-chrome.js +5 -8
- package/dist/app/session-shell/editor-hyperlink-budget.d.ts +0 -2
- package/dist/app/session-shell/editor-hyperlink-budget.js +1 -1
- package/dist/app/session-shell/exit-notice.d.ts +3 -3
- package/dist/app/session-shell/exit-notice.js +10 -10
- package/dist/app/session-shell/extension-surface.d.ts +8 -7
- package/dist/app/session-shell/helper-pool.d.ts +3 -4
- package/dist/app/session-shell/helper-pool.js +1 -1
- package/dist/app/session-shell/image-preparation-client.d.ts +4 -3
- package/dist/app/session-shell/image-preparation.d.ts +0 -2
- package/dist/app/session-shell/image-preparation.js +2 -2
- package/dist/app/session-shell/image-source.d.ts +2 -3
- package/dist/app/session-shell/image-source.js +2 -2
- package/dist/app/session-shell/input-surface-switch.d.ts +9 -7
- package/dist/app/session-shell/input-surface-switch.js +1 -2
- package/dist/app/session-shell/login-interaction.d.ts +5 -4
- package/dist/app/session-shell/login-interaction.js +2 -3
- package/dist/app/session-shell/paste-executor.d.ts +4 -8
- package/dist/app/session-shell/paste-executor.js +2 -2
- package/dist/app/session-shell/paste-protocol.d.ts +2 -2
- package/dist/app/session-shell/path-chip-presentation.d.ts +0 -5
- package/dist/app/session-shell/path-chip-presentation.js +3 -3
- package/dist/app/session-shell/prompt-chips.d.ts +8 -7
- package/dist/app/session-shell/prompt-history-controller.d.ts +3 -3
- package/dist/app/session-shell/prompt-submission.d.ts +7 -6
- package/dist/app/session-shell/prompt-submission.js +7 -28
- package/dist/app/session-shell/quit-outro-effects.d.ts +3 -3
- package/dist/app/session-shell/quit-outro-effects.js +1 -4
- package/dist/app/session-shell/quit-outro.d.ts +9 -12
- package/dist/app/session-shell/quit-outro.js +11 -11
- package/dist/app/session-shell/response-copy-protocol.d.ts +3 -2
- package/dist/app/session-shell/response-copy-transport.d.ts +2 -14
- package/dist/app/session-shell/response-copy-transport.js +2 -3
- package/dist/app/session-shell/session-lifecycle.d.ts +3 -3
- package/dist/app/session-shell/session-lifecycle.js +2 -4
- package/dist/app/session-shell/session-shell-root.d.ts +74 -120
- package/dist/app/session-shell/session-shell-root.js +82 -115
- package/dist/app/session-shell/session-shell.d.ts +13 -16
- package/dist/app/session-shell/session-shell.js +149 -314
- package/dist/app/session-shell/session-viewport-controller.d.ts +7 -6
- package/dist/app/session-shell/session-viewport-controller.js +5 -8
- package/dist/app/session-shell/settings-bindings.d.ts +24 -2
- package/dist/app/session-shell/settings-bindings.js +24 -0
- package/dist/app/session-shell/share-operation.d.ts +3 -3
- package/dist/app/session-shell/share-operation.js +4 -6
- package/dist/app/session-shell/shell-clipboard.d.ts +59 -0
- package/dist/app/session-shell/shell-clipboard.js +119 -0
- package/dist/app/session-shell/shell-editor-factory.d.ts +8 -4
- package/dist/app/session-shell/shell-editor-factory.js +13 -15
- package/dist/app/session-shell/shell-host.d.ts +16 -17
- package/dist/app/session-shell/shell-host.js +20 -37
- package/dist/app/session-shell/shell-layout.d.ts +2 -2
- package/dist/app/session-shell/shell-prompt-suggestions.d.ts +26 -0
- package/dist/app/session-shell/shell-prompt-suggestions.js +48 -0
- package/dist/app/session-shell/suggestion-surface.d.ts +1 -6
- package/dist/app/session-shell/suggestion-surface.js +1 -1
- package/dist/app/session-shell/system-clipboard.d.ts +2 -14
- package/dist/app/session-shell/system-clipboard.js +2 -7
- package/dist/app/session-shell/transcript-document.d.ts +12 -10
- package/dist/app/session-shell/transcript-document.js +15 -41
- package/dist/app/session-shell/viewport-layout.d.ts +2 -2
- package/dist/app/session-shell/workflow-output.d.ts +5 -3
- package/dist/app/session-shell/workflow-output.js +13 -15
- 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/package-messages.d.ts +0 -1
- package/dist/cli/package-messages.js +1 -1
- package/dist/cli/session-context.d.ts +1 -1
- package/dist/cli/session-context.js +5 -7
- package/dist/cli/uninstall.d.ts +4 -7
- package/dist/cli/uninstall.js +6 -35
- package/dist/cli/version-stats.js +4 -7
- package/dist/composition/owned-settings.d.ts +2 -2
- package/dist/composition/owned-settings.js +0 -4
- package/dist/composition/owned-ui.d.ts +3 -25
- package/dist/composition/owned-ui.js +37 -113
- package/dist/composition/reference-selection-options.d.ts +1 -1
- package/dist/composition/reference-selection-options.js +1 -1
- 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 +5 -4
- package/dist/composition/settings-route-host.d.ts +0 -7
- package/dist/composition/settings-route-host.js +7 -20
- package/dist/composition/settings-search-input.d.ts +2 -1
- package/dist/composition/startup-route.d.ts +2 -3
- package/dist/composition/startup-route.js +2 -3
- package/dist/contracts/owned-ui/extension-ui.d.ts +2 -1
- package/dist/contracts/owned-ui/index.d.ts +2 -1
- package/dist/contracts/owned-ui/model.d.ts +0 -3
- package/dist/contracts/owned-ui/session-presenters.d.ts +3 -0
- package/dist/contracts/owned-ui/session-workflows.d.ts +1 -4
- package/dist/contracts/owned-ui/shell-components.d.ts +543 -0
- package/dist/contracts/presentation/component.d.ts +17 -0
- package/dist/contracts/presentation/component.js +8 -0
- package/dist/contracts/presentation/index.d.ts +6 -15
- package/dist/contracts/presentation/index.js +2 -0
- package/dist/contracts/presentation/terminal.d.ts +290 -0
- package/dist/contracts/presentation/theme.d.ts +46 -0
- package/dist/features/launch/development-launch.js +1 -2
- 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/runtime-selection.d.ts +2 -2
- package/dist/features/launch/runtime-selection.js +2 -2
- package/dist/features/launch/session-context.d.ts +2 -2
- package/dist/features/owned-ui/project-trust-prompt.d.ts +2 -2
- package/dist/features/owned-ui/project-trust-prompt.js +1 -1
- 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/release-note-state.d.ts +2 -1
- package/dist/features/owned-ui/settings-app.d.ts +0 -6
- package/dist/features/owned-ui/settings-app.js +42 -254
- package/dist/features/owned-ui/settings-edits.d.ts +31 -0
- package/dist/features/owned-ui/settings-edits.js +139 -0
- package/dist/features/owned-ui/settings-scroll-rail.d.ts +29 -0
- package/dist/features/owned-ui/settings-scroll-rail.js +79 -0
- package/dist/features/owned-ui/settings-search-input.d.ts +2 -1
- package/dist/features/prompt-history/service.d.ts +3 -2
- 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 +9 -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 +6 -17
- package/dist/foundation/release/automatic-update.js +23 -44
- package/dist/foundation/release/bootstrap.d.ts +2 -25
- package/dist/foundation/release/bootstrap.js +37 -348
- package/dist/foundation/release/dependency-certification.d.ts +1 -2
- package/dist/foundation/release/dependency-certification.js +1 -1
- package/dist/foundation/release/early-accent.d.ts +2 -2
- package/dist/foundation/release/early-accent.js +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 +3 -19
- package/dist/foundation/release/latest-release.js +11 -12
- package/dist/foundation/release/ordinary-launch-selection.d.ts +1 -1
- package/dist/foundation/release/ordinary-launch-selection.js +1 -1
- 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 +13 -10
- package/dist/foundation/release/release-gc.js +37 -101
- package/dist/foundation/release/{cohort-state.d.ts → release-state.d.ts} +44 -69
- package/dist/foundation/release/{cohort-state.js → release-state.js} +38 -70
- 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 +30 -45
- package/dist/foundation/release/update-execution-lease.d.ts +2 -3
- package/dist/foundation/release/update-execution-lease.js +2 -2
- package/dist/foundation/release/update-launch.d.ts +2 -4
- 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 -12
- package/dist/foundation/release/update.js +37 -214
- 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-budget.d.ts +5 -5
- package/dist/foundation/startup/startup-budget.js +2 -2
- 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/editor-interaction.d.ts +4 -12
- package/dist/integrations/pi/components/index.d.ts +15 -9
- package/dist/integrations/pi/components/index.js +9 -5
- package/dist/integrations/pi/components/lazy-selectors.d.ts +2 -10
- package/dist/integrations/pi/components/lazy-selectors.js +1 -1
- package/dist/integrations/pi/components/modal-frame.d.ts +5 -22
- package/dist/integrations/pi/components/modal-frame.js +3 -23
- package/dist/integrations/pi/components/owned-editor-ux.d.ts +4 -3
- package/dist/integrations/pi/components/prompt-input-port.d.ts +2 -19
- package/dist/integrations/pi/components/resources/builtin-themes.d.ts +2 -1
- package/dist/integrations/pi/components/shell-editor-autocomplete.d.ts +3 -2
- package/dist/integrations/pi/components/shell-editor-autocomplete.js +1 -4
- package/dist/integrations/pi/components/shell-footer-status.d.ts +3 -3
- package/dist/integrations/pi/components/shell-footer-status.js +5 -4
- package/dist/integrations/pi/components/shell-hotkey-sections.js +1 -1
- package/dist/integrations/pi/components/shell-presenters-info.d.ts +6 -8
- package/dist/integrations/pi/components/shell-presenters-info.js +6 -19
- 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-session-info-reference.d.ts +2 -1
- package/dist/integrations/pi/components/shell-shared-facade.d.ts +33 -229
- package/dist/integrations/pi/components/shell-shared-facade.js +8 -1
- package/dist/integrations/pi/components/skills-command.d.ts +1 -9
- package/dist/integrations/pi/components/skills-command.js +5 -5
- 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/theme.d.ts +9 -2
- package/dist/integrations/pi/components/theme.js +17 -2
- package/dist/integrations/pi/components/thinking-selector-dialog.d.ts +2 -1
- package/dist/integrations/pi/components/upstream/adjacent/core/keybindings.d.ts +2 -2
- 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 +3 -6
- package/dist/integrations/pi/engine/adapter.js +4 -28
- package/dist/integrations/pi/engine/changelog.d.ts +2 -2
- package/dist/integrations/pi/engine/changelog.js +3 -3
- package/dist/integrations/pi/engine/compaction-progress.d.ts +2 -3
- package/dist/integrations/pi/engine/compaction-progress.js +1 -1
- package/dist/integrations/pi/engine/conformance.d.ts +2 -1
- package/dist/integrations/pi/engine/default-model-setting.d.ts +0 -2
- package/dist/integrations/pi/engine/default-model-setting.js +1 -2
- 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/event-delivery.d.ts +2 -1
- package/dist/integrations/pi/engine/extension-ui-binding.d.ts +2 -1
- package/dist/integrations/pi/engine/host.js +2 -2
- package/dist/integrations/pi/engine/message-values.d.ts +0 -1
- package/dist/integrations/pi/engine/message-values.js +1 -1
- package/dist/integrations/pi/engine/pending-delivery.d.ts +0 -4
- package/dist/integrations/pi/engine/pending-delivery.js +3 -3
- package/dist/integrations/pi/engine/ports.d.ts +7 -1
- package/dist/integrations/pi/engine/ports.js +4 -0
- package/dist/integrations/pi/engine/project-trust-preflight.d.ts +2 -1
- package/dist/integrations/pi/engine/prompt-suggestions.d.ts +3 -3
- package/dist/integrations/pi/engine/prompt-suggestions.js +0 -40
- package/dist/integrations/pi/engine/provider-authentication.d.ts +1 -1
- package/dist/integrations/pi/engine/public-main-entry.d.ts +1 -5
- package/dist/integrations/pi/engine/public-main-entry.js +1 -1
- package/dist/integrations/pi/engine/repository-pr-rest.d.ts +1 -9
- package/dist/integrations/pi/engine/repository-pr-rest.js +2 -2
- package/dist/integrations/pi/engine/repository-pr.d.ts +1 -3
- package/dist/integrations/pi/engine/repository-pr.js +1 -1
- package/dist/integrations/pi/engine/resource-catalog.d.ts +2 -1
- package/dist/integrations/pi/engine/session-integration.d.ts +1 -1
- package/dist/integrations/pi/engine/session-runtime.d.ts +4 -3
- package/dist/integrations/pi/engine/session-runtime.js +0 -2
- package/dist/integrations/pi/engine/settings-bridge.d.ts +0 -2
- package/dist/integrations/pi/engine/settings-bridge.js +1 -1
- package/dist/integrations/pi/engine/settings-port.d.ts +3 -2
- package/dist/integrations/pi/engine/transcript-projection.d.ts +2 -1
- package/dist/integrations/pi/engine/workflow-contexts.d.ts +1 -1
- package/dist/integrations/pi/engine/workflow-runner.d.ts +1 -1
- package/dist/integrations/pi/engine/workflow-runner.js +1 -1
- package/dist/integrations/pi/engine/workflow-support.d.ts +0 -6
- package/dist/integrations/pi/engine/workflow-support.js +4 -18
- package/dist/integrations/pi/engine/workflows.d.ts +5 -5
- package/dist/integrations/pi/session-presenters/components.d.ts +3 -0
- package/dist/integrations/pi/session-presenters/components.js +75 -0
- package/dist/integrations/pi/session-presenters/index.d.ts +1 -0
- package/dist/integrations/pi/session-presenters/index.js +1 -0
- package/dist/integrations/pi/session-presenters/presentation.d.ts +3 -0
- package/dist/integrations/pi/session-presenters/presentation.js +10 -0
- package/dist/integrations/pi/session-presenters/presenters.d.ts +2 -1
- package/dist/integrations/pi/session-presenters/presenters.js +3 -1
- package/dist/integrations/pi/tui-runtime/adapter.d.ts +2 -2
- package/dist/integrations/pi/tui-runtime/adapter.js +23 -32
- package/dist/integrations/pi/tui-runtime/contracts.d.ts +22 -166
- package/dist/integrations/pi/tui-runtime/damage-aware-terminal.d.ts +5 -40
- package/dist/integrations/pi/tui-runtime/index.d.ts +1 -0
- package/dist/integrations/pi/tui-runtime/index.js +1 -0
- package/dist/integrations/pi/tui-runtime/input-presentation-coordinator.d.ts +4 -6
- package/dist/integrations/pi/tui-runtime/overlay-geometry.d.ts +2 -8
- package/dist/integrations/pi/tui-runtime/overlay-geometry.js +3 -9
- package/dist/integrations/pi/tui-runtime/runtime-factory.d.ts +3 -0
- package/dist/integrations/pi/tui-runtime/runtime-factory.js +11 -0
- 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 +4 -4
- package/dist/ui/components/index.js +2 -2
- package/dist/ui/components/selection-copy.d.ts +0 -1
- package/dist/ui/components/selection-copy.js +0 -12
- package/dist/ui/components/submitted-prompt.d.ts +3 -13
- package/dist/ui/components/submitted-prompt.js +8 -41
- package/dist/ui/components/theme.d.ts +4 -19
- package/dist/ui/components/theme.js +6 -0
- 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 +2 -97
- package/dist/ui/settings/declarations.js +2 -78
- package/dist/ui/settings/early-accent.js +1 -1
- package/dist/ui/settings/index.d.ts +3 -5
- package/dist/ui/settings/index.js +2 -3
- package/dist/ui/settings/manager.d.ts +0 -4
- package/dist/ui/settings/manager.js +6 -62
- package/dist/ui/settings/resolution.d.ts +6 -18
- package/dist/ui/settings/resolution.js +4 -103
- package/dist/ui/settings/sections.d.ts +0 -4
- package/dist/ui/settings/sections.js +1 -1
- package/docs/architecture/boundaries.md +23 -40
- package/docs/architecture/code-documentation.md +2 -2
- package/docs/architecture/internal-naming.md +11 -17
- package/docs/architecture/project-structure.md +13 -16
- 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 -20
- 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.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/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.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/components/components.d.ts +0 -4
- package/dist/integrations/pi/components/components.js +0 -48
- package/dist/integrations/pi/components/conformance.d.ts +0 -18
- package/dist/integrations/pi/components/conformance.js +0 -70
- package/dist/integrations/pi/components/shell-components.d.ts +0 -7
- package/dist/integrations/pi/components/shell-components.js +0 -7
- package/dist/integrations/pi/components/upstream/theme/theme-controller.d.ts +0 -33
- package/dist/integrations/pi/components/upstream/theme/theme-controller.js +0 -114
- 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/dist/ui/settings/migrations.d.ts +0 -19
- package/dist/ui/settings/migrations.js +0 -209
- package/dist/ui/settings/progress-palette.generated.d.ts +0 -139
- package/dist/ui/settings/progress-palette.generated.js +0 -139
- 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
- /package/dist/{cli/tabs-request.js → contracts/owned-ui/shell-components.js} +0 -0
- /package/dist/{foundation/release → contracts/presentation}/progress-palette.generated.d.ts +0 -0
- /package/dist/{foundation/release → contracts/presentation}/progress-palette.generated.js +0 -0
- /package/dist/{foundation/lifecycle/commands.js → contracts/presentation/terminal.js} +0 -0
- /package/dist/{foundation/resident-tabs/host-entry.d.ts → contracts/presentation/theme.js} +0 -0
package/package.json
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@timurproko/a1",
|
|
3
|
-
"version": "0.2.7-dev.
|
|
4
|
-
"description": "Standalone terminal
|
|
3
|
+
"version": "0.2.7-dev.1255",
|
|
4
|
+
"description": "Standalone single-agent terminal UI on pinned Pi",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"privateLaunchContract": "neutral-launch-v1",
|
|
7
7
|
"updateActivationContracts": [
|
|
8
8
|
"activate-v1"
|
|
9
9
|
],
|
|
10
|
-
"residentControlContracts": [
|
|
11
|
-
"resident-control-v1",
|
|
12
|
-
"resident-workspace-v1"
|
|
13
|
-
],
|
|
14
10
|
"updateCommandContracts": [
|
|
15
11
|
"update-release-v1"
|
|
16
12
|
],
|
|
@@ -32,12 +28,10 @@
|
|
|
32
28
|
"clean": "node scripts/clean.mjs",
|
|
33
29
|
"build": "node scripts/development/run-build.mjs",
|
|
34
30
|
"build:core": "node scripts/development/run-build.mjs --core",
|
|
35
|
-
"build:managed": "npm run clean && tsc -p tsconfig.build.json && node scripts/release/generate-release-notes-resource.mjs && node scripts/pi/build-pi-settings-metadata.mjs && node scripts/pi/build-startup-public.mjs
|
|
36
|
-
"build:process-guardian": "node scripts/development/build-process-guardian.mjs",
|
|
37
|
-
"build:terminal-host": "node scripts/development/build-terminal-host.mjs",
|
|
31
|
+
"build:managed": "npm run clean && tsc -p tsconfig.build.json && node scripts/release/generate-release-notes-resource.mjs && node scripts/pi/build-pi-settings-metadata.mjs && node scripts/pi/build-startup-public.mjs",
|
|
38
32
|
"typecheck": "tsgo -p tsconfig.json --noEmit && tsgo -p tsconfig.bin.json",
|
|
39
|
-
"check:local": "npm run typecheck && npm run check:architecture && npm run check:names
|
|
40
|
-
"check:architecture": "node scripts/governance/check-architecture.mjs && node scripts/governance/check-session-writer-guard.mjs && node scripts/governance/check-product-identity-boundaries.mjs && node scripts/governance/check-package-identity.mjs && node scripts/governance/check-pinned-pi-source-ledger.mjs
|
|
33
|
+
"check:local": "npm run typecheck && npm run check:architecture && npm run check:names",
|
|
34
|
+
"check:architecture": "node scripts/governance/check-architecture.mjs && node scripts/governance/check-session-writer-guard.mjs && node scripts/governance/check-product-identity-boundaries.mjs && node scripts/governance/check-package-identity.mjs && node scripts/governance/check-pinned-pi-source-ledger.mjs",
|
|
41
35
|
"preflight": "node scripts/development/run-preflight.mjs",
|
|
42
36
|
"check:names": "node scripts/governance/product-identifier-policy.mjs --check",
|
|
43
37
|
"check:names:changed": "node scripts/governance/product-identifier-policy.mjs --check --selection .artifacts/validation/impact.json",
|
|
@@ -60,9 +54,6 @@
|
|
|
60
54
|
"test:scope": "node scripts/release/run-validation-tier.mjs",
|
|
61
55
|
"test:full": "node scripts/release/run-validation-tier.mjs full-release",
|
|
62
56
|
"test:release": "node scripts/release/run-release-gates.mjs",
|
|
63
|
-
"test:terminal-host": "node scripts/development/run-terminal-host-probe.mjs",
|
|
64
|
-
"test:resident-parallel-progress": "node scripts/development/verify-resident-parallel-progress.mjs",
|
|
65
|
-
"test:resident-chaos": "node scripts/development/run-resident-chaos.mjs --build",
|
|
66
57
|
"test:pi-engine-conformance": "vitest run test/integrations/pi/engine/conformance.test.ts test/integrations/pi/engine/runtime-integration.test.ts test/integrations/pi/engine/session-integration.test.ts",
|
|
67
58
|
"report:pi-engine-conformance": "npm run build --silent && node scripts/pi/run-pi-engine-conformance.mjs",
|
|
68
59
|
"report:rendering-stability": "tsx scripts/pi/report-rendering-stability.ts",
|
|
@@ -70,8 +61,6 @@
|
|
|
70
61
|
"sync:pi-ui": "npm run update:pi-component-parity && npm run update:pi-event-frame-parity",
|
|
71
62
|
"update:pi-component-parity": "tsx scripts/pi/update-pi-component-parity.ts",
|
|
72
63
|
"update:pi-event-frame-parity": "tsx scripts/pi/update-pi-event-frame-parity.ts",
|
|
73
|
-
"proof:terminal-host": "node scripts/development/run-terminal-host.mjs",
|
|
74
|
-
"proof:terminal-host:ci": "node scripts/development/certify-ci-terminal-host.mjs",
|
|
75
64
|
"start": "npm run build && node scripts/development/dev-launch.mjs",
|
|
76
65
|
"start:pi": "npm run build && node scripts/development/dev-launch.mjs pi",
|
|
77
66
|
"prepack": "node scripts/release/validate-packaged-release-note.mjs && node scripts/release/prepack-gate.mjs",
|
|
@@ -100,7 +89,6 @@
|
|
|
100
89
|
"@typescript/native-preview": "7.0.0-dev.20260707.2",
|
|
101
90
|
"@xterm/headless": "6.0.0",
|
|
102
91
|
"esbuild": "0.25.10",
|
|
103
|
-
"node-pty": "1.1.0",
|
|
104
92
|
"tsx": "4.20.3",
|
|
105
93
|
"typescript": "5.9.2",
|
|
106
94
|
"vitest": "3.2.7",
|
|
@@ -110,7 +98,6 @@
|
|
|
110
98
|
"cli",
|
|
111
99
|
"tui",
|
|
112
100
|
"terminal",
|
|
113
|
-
"multiplexer",
|
|
114
101
|
"agents"
|
|
115
102
|
],
|
|
116
103
|
"author": "Timur Prokopiev",
|
|
@@ -126,7 +113,7 @@
|
|
|
126
113
|
"@mariozechner/clipboard": "^0.3.9"
|
|
127
114
|
},
|
|
128
115
|
"publication": {
|
|
129
|
-
"source": "
|
|
130
|
-
"pullRequest":
|
|
116
|
+
"source": "c42a37a9eb7e1c01d121f82a7be42376aaa7c542",
|
|
117
|
+
"pullRequest": 879
|
|
131
118
|
}
|
|
132
119
|
}
|
package/bin/guardian.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const startup = await import("../dist/foundation/startup/startup-runtime.js");
|
|
4
|
-
startup.enableEnvironmentCompileCache(process.env);
|
|
5
|
-
await startup.markStartupPhase(process.env, "guardian-start");
|
|
6
|
-
const { resolve } = await import("node:path");
|
|
7
|
-
const { parseSessionSelection } = await import("../dist/foundation/lifecycle/session-selection.js");
|
|
8
|
-
const { runLaunchGuardian } = await import("../dist/foundation/launch-guardian/main.js");
|
|
9
|
-
|
|
10
|
-
const { readLaunchContext } = await import("../dist/foundation/launch-context/index.js");
|
|
11
|
-
const launchContext = readLaunchContext(process.env, "release");
|
|
12
|
-
const releaseRoot = launchContext.releaseRoot;
|
|
13
|
-
const profileId = readLaunchContext(process.env, "profile").launchProfile;
|
|
14
|
-
// Invariant: the "release" and "profile" requirements above already refused an environment without
|
|
15
|
-
// these values; the checks give the type checker the same certainty.
|
|
16
|
-
if (releaseRoot === undefined || profileId === undefined) throw new Error("A1 launch context is incomplete");
|
|
17
|
-
|
|
18
|
-
const sessionSelection = parseSessionSelection(process.argv.slice(2));
|
|
19
|
-
const rootCommand = launchContext.residentRootExecutable === undefined ? undefined : {
|
|
20
|
-
executable: launchContext.residentRootExecutable,
|
|
21
|
-
arguments: JSON.parse(launchContext.residentRootArguments ?? "[]"),
|
|
22
|
-
};
|
|
23
|
-
Promise.resolve().then(() => runLaunchGuardian({
|
|
24
|
-
...(sessionSelection === undefined ? {} : { sessionSelection }),
|
|
25
|
-
...(rootCommand === undefined ? {} : { rootCommand }),
|
|
26
|
-
profileId,
|
|
27
|
-
releaseRoot,
|
|
28
|
-
uiEntry: resolve(releaseRoot, "bin", "ui.js"),
|
|
29
|
-
environment: process.env,
|
|
30
|
-
cwd: process.cwd(),
|
|
31
|
-
})).then(
|
|
32
|
-
code => { process.exitCode = code; },
|
|
33
|
-
error => {
|
|
34
|
-
if (error instanceof Error && "code" in error && error.code === "release-superseded" && typeof process.send === "function") {
|
|
35
|
-
process.send({ type: "a1-release-reselection" });
|
|
36
|
-
process.exitCode = 1;
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
console.error(error instanceof Error ? error.message : String(error));
|
|
40
|
-
process.exitCode = 1;
|
|
41
|
-
},
|
|
42
|
-
);
|
package/bin/supervisor.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { runSupervisor } from "../dist/foundation/supervision/index.js";
|
|
3
|
-
|
|
4
|
-
runSupervisor(process.argv.slice(2)).catch(error => {
|
|
5
|
-
console.error(error instanceof Error ? error.stack ?? error.message : String(error));
|
|
6
|
-
process.exitCode = 1;
|
|
7
|
-
});
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export interface TabLaunchCredentials {
|
|
2
|
-
readonly tabId: string;
|
|
3
|
-
readonly token: string;
|
|
4
|
-
readonly endpoint: string;
|
|
5
|
-
readonly releaseId?: string;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export function formatResidentFallbackNotice(reason: string): string;
|
|
9
|
-
|
|
10
|
-
export function assignFreshSessionRuntimeId(
|
|
11
|
-
environment: Record<string, string | undefined>,
|
|
12
|
-
name: string,
|
|
13
|
-
createId: () => string,
|
|
14
|
-
): string;
|
|
15
|
-
|
|
16
|
-
export function waitForStandbyPromotion(input: NodeJS.ReadStream, promotionFile?: string): Promise<void>;
|
|
17
|
-
|
|
18
|
-
export function consumeTabLaunchContext(
|
|
19
|
-
arguments_: readonly string[],
|
|
20
|
-
environment: Record<string, string | undefined>,
|
|
21
|
-
): {
|
|
22
|
-
readonly uiArguments: string[];
|
|
23
|
-
readonly tabCredentials: TabLaunchCredentials | undefined;
|
|
24
|
-
readonly tabDataDir?: string;
|
|
25
|
-
readonly tabIncarnation?: number;
|
|
26
|
-
readonly tabStandby: boolean;
|
|
27
|
-
};
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { existsSync } from "node:fs";
|
|
2
|
-
|
|
3
|
-
const TAB_ENVIRONMENT_NAMES = ["A1_TAB_ID", "A1_TAB_TOKEN", "A1_TAB_ENDPOINT", "A1_TAB_RELEASE_ID"];
|
|
4
|
-
|
|
5
|
-
/** @param {string} reason */
|
|
6
|
-
export function formatResidentFallbackNotice(reason) {
|
|
7
|
-
// Protocol: a host of another generation is never replaced automatically; only the user stops it.
|
|
8
|
-
if (reason === "incompatible generation") {
|
|
9
|
-
return "A1 normal mode unavailable (running tabs use another version); running in single agent mode. Run `a1 tabs host stop` to restart them on this version.";
|
|
10
|
-
}
|
|
11
|
-
return `A1 normal mode unavailable (${reason}); running in single agent mode.`;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* @param {Record<string, string | undefined>} environment
|
|
16
|
-
* @param {string} name
|
|
17
|
-
* @param {() => string} createId
|
|
18
|
-
*/
|
|
19
|
-
export function assignFreshSessionRuntimeId(environment, name, createId) {
|
|
20
|
-
const id = createId();
|
|
21
|
-
if (typeof id !== "string" || id.length === 0 || id.includes("\0")) throw new Error("Session runtime identity generation failed");
|
|
22
|
-
environment[name] = id;
|
|
23
|
-
return id;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Keep the standby below the session/runtime boundary until its authenticated holder promotes it.
|
|
28
|
-
* Platform: Windows ConPTY may drop the in-band marker, so the holder also creates the promotion
|
|
29
|
-
* file inside the tab's private data directory; whichever arrives first promotes the standby.
|
|
30
|
-
* @param {NodeJS.ReadStream} input
|
|
31
|
-
* @param {string} [promotionFile]
|
|
32
|
-
*/
|
|
33
|
-
export function waitForStandbyPromotion(input, promotionFile) {
|
|
34
|
-
return /** @type {Promise<void>} */ (new Promise((resolve, reject) => {
|
|
35
|
-
const marker = Buffer.from("\x1b]a1;standby-promote\x07");
|
|
36
|
-
let buffered = Buffer.alloc(0);
|
|
37
|
-
/** @type {NodeJS.Timeout | undefined} */
|
|
38
|
-
let poll;
|
|
39
|
-
const cleanup = () => {
|
|
40
|
-
if (poll !== undefined) clearInterval(poll);
|
|
41
|
-
input.off("data", onData);
|
|
42
|
-
input.off("error", onError);
|
|
43
|
-
input.pause();
|
|
44
|
-
if (input.isTTY) input.setRawMode(false);
|
|
45
|
-
};
|
|
46
|
-
/** @param {Error} error */
|
|
47
|
-
const onError = error => { cleanup(); reject(error); };
|
|
48
|
-
/** @param {Buffer | string} chunk */
|
|
49
|
-
const onData = chunk => {
|
|
50
|
-
const bytes = typeof chunk === "string" ? Buffer.from(chunk) : chunk;
|
|
51
|
-
buffered = Buffer.concat([buffered, bytes]).subarray(-marker.length);
|
|
52
|
-
if (buffered.equals(marker)) { cleanup(); resolve(undefined); }
|
|
53
|
-
};
|
|
54
|
-
if (input.isTTY) input.setRawMode(true);
|
|
55
|
-
input.on("data", onData);
|
|
56
|
-
input.on("error", onError);
|
|
57
|
-
input.resume();
|
|
58
|
-
if (promotionFile !== undefined) {
|
|
59
|
-
poll = setInterval(() => {
|
|
60
|
-
if (existsSync(promotionFile)) { cleanup(); resolve(undefined); }
|
|
61
|
-
}, 10);
|
|
62
|
-
}
|
|
63
|
-
}));
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Security: consume bridge credentials into caller-private memory and erase their inheritable
|
|
68
|
-
* environment entries before any extension-capable module loads.
|
|
69
|
-
* @param {readonly string[]} arguments_
|
|
70
|
-
* @param {Record<string, string | undefined>} environment
|
|
71
|
-
*/
|
|
72
|
-
export function consumeTabLaunchContext(arguments_, environment) {
|
|
73
|
-
const uiArguments = [...arguments_];
|
|
74
|
-
const tabArgument = uiArguments.indexOf("--tab");
|
|
75
|
-
const tabMode = tabArgument !== -1;
|
|
76
|
-
if (tabMode) uiArguments.splice(tabArgument, 1);
|
|
77
|
-
const standbyArgument = uiArguments.indexOf("--tab-standby");
|
|
78
|
-
const tabStandby = standbyArgument !== -1;
|
|
79
|
-
if (tabStandby) uiArguments.splice(standbyArgument, 1);
|
|
80
|
-
const dataArgument = uiArguments.indexOf("--tab-data-dir");
|
|
81
|
-
const tabDataDir = dataArgument === -1 ? undefined : uiArguments[dataArgument + 1];
|
|
82
|
-
if (dataArgument !== -1) uiArguments.splice(dataArgument, 2);
|
|
83
|
-
const incarnationArgument = uiArguments.indexOf("--tab-incarnation");
|
|
84
|
-
const tabIncarnation = incarnationArgument === -1 ? undefined : Number(uiArguments[incarnationArgument + 1]);
|
|
85
|
-
if (incarnationArgument !== -1) uiArguments.splice(incarnationArgument, 2);
|
|
86
|
-
const [tabId, token, endpoint, releaseId] = TAB_ENVIRONMENT_NAMES.map(name => environment[name]);
|
|
87
|
-
for (const name of TAB_ENVIRONMENT_NAMES) delete environment[name];
|
|
88
|
-
if (!tabMode) return { uiArguments, tabCredentials: undefined, tabStandby: false };
|
|
89
|
-
if (!tabId || !token || !endpoint || !tabDataDir || tabDataDir.includes("\0")
|
|
90
|
-
|| typeof tabIncarnation !== "number" || !Number.isSafeInteger(tabIncarnation) || tabIncarnation < 1) {
|
|
91
|
-
throw new Error("A1 tab mode requires bridge credentials, recovery directory, and incarnation");
|
|
92
|
-
}
|
|
93
|
-
return { uiArguments, tabCredentials: { tabId, token, endpoint, ...(releaseId === undefined ? {} : { releaseId }) }, tabDataDir, tabIncarnation, tabStandby };
|
|
94
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { OwnedUiEvent, PromptHistoryImageSidecarPort } from "../../contracts/owned-ui/index.js";
|
|
2
|
-
import type { SessionConcern } from "./session-concern.js";
|
|
3
|
-
import type { OwnedUiShellEngineOptions, OwnedUiSessionShellRoot } from "./session-shell-root.js";
|
|
4
|
-
export type ResidentTabOptions = NonNullable<OwnedUiShellEngineOptions["residentTab"]>;
|
|
5
|
-
export interface ResidentTabCoordinatorPorts {
|
|
6
|
-
readonly root: Pick<OwnedUiSessionShellRoot, "appendWorkflowStatus" | "rehydrateHistoryText" | "editor">;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* The session presenter's side of a resident tab: recovered input, the idle status it reports to
|
|
10
|
-
* the strip, prompt admission and correlation through the recovery journal, draft checkpoints,
|
|
11
|
-
* detach on quit, and the graceful stop when the presenter is released. Outside a resident tab
|
|
12
|
-
* every operation is a no-op.
|
|
13
|
-
*/
|
|
14
|
-
export declare class ResidentTabCoordinator implements SessionConcern {
|
|
15
|
-
#private;
|
|
16
|
-
constructor(options: ResidentTabOptions | undefined, ports: ResidentTabCoordinatorPorts);
|
|
17
|
-
/** True inside a resident tab, where Settings and the session name live in the global strip. */
|
|
18
|
-
get active(): boolean;
|
|
19
|
-
checkpoint(text: string): void;
|
|
20
|
-
closeOwnedRoute(route: string): void;
|
|
21
|
-
/** Puts the prompts and draft a previous tab process left unfinished back into the editor. */
|
|
22
|
-
restoreInput(imageSidecar?: PromptHistoryImageSidecarPort): void;
|
|
23
|
-
/** Reports idle to the strip whenever the session leaves its busy lifecycle. */
|
|
24
|
-
observeLifecycle(event: OwnedUiEvent): void;
|
|
25
|
-
/** Journals a prompt before it is sent; undefined outside a resident tab. Rejects when the journal cannot sync. */
|
|
26
|
-
admit(input: Parameters<NonNullable<ResidentTabOptions["admit"]>>[0]): Promise<{
|
|
27
|
-
readonly id: string;
|
|
28
|
-
} | undefined>;
|
|
29
|
-
/** The admitted prompt reached the engine; its journal entry is correlated with the engine's entry. */
|
|
30
|
-
dispatched(submissionId: string, entryId: string): Promise<void>;
|
|
31
|
-
/**
|
|
32
|
-
* Leaves the tab without stopping its engine. Returns undefined outside a resident tab, true when
|
|
33
|
-
* the client detached, or the notice to show when detaching is unavailable.
|
|
34
|
-
*/
|
|
35
|
-
detach(): Promise<true | string | undefined>;
|
|
36
|
-
gracefulStop(sessionFile: string | null): Promise<void>;
|
|
37
|
-
dispose(): void;
|
|
38
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The session presenter's side of a resident tab: recovered input, the idle status it reports to
|
|
3
|
-
* the strip, prompt admission and correlation through the recovery journal, draft checkpoints,
|
|
4
|
-
* detach on quit, and the graceful stop when the presenter is released. Outside a resident tab
|
|
5
|
-
* every operation is a no-op.
|
|
6
|
-
*/
|
|
7
|
-
export class ResidentTabCoordinator {
|
|
8
|
-
#options;
|
|
9
|
-
#ports;
|
|
10
|
-
constructor(options, ports) {
|
|
11
|
-
this.#options = options;
|
|
12
|
-
this.#ports = ports;
|
|
13
|
-
}
|
|
14
|
-
/** True inside a resident tab, where Settings and the session name live in the global strip. */
|
|
15
|
-
get active() {
|
|
16
|
-
return this.#options !== undefined;
|
|
17
|
-
}
|
|
18
|
-
checkpoint(text) {
|
|
19
|
-
this.#options?.checkpoint?.(text);
|
|
20
|
-
}
|
|
21
|
-
closeOwnedRoute(route) {
|
|
22
|
-
this.#options?.closeOwnedRoute?.(route);
|
|
23
|
-
}
|
|
24
|
-
/** Puts the prompts and draft a previous tab process left unfinished back into the editor. */
|
|
25
|
-
restoreInput(imageSidecar) {
|
|
26
|
-
const recovered = this.#options?.recovered;
|
|
27
|
-
if (recovered === undefined)
|
|
28
|
-
return;
|
|
29
|
-
const { root } = this.#ports;
|
|
30
|
-
const prompts = recovered.prompts
|
|
31
|
-
.map(prompt => root.rehydrateHistoryText(prompt.text, id => imageSidecar?.readAttachment(id) ?? null))
|
|
32
|
-
.filter(Boolean);
|
|
33
|
-
if (prompts.length > 0) {
|
|
34
|
-
root.editor.setText(prompts[0]);
|
|
35
|
-
if (recovered.draft)
|
|
36
|
-
root.editor.addToHistory(recovered.draft);
|
|
37
|
-
for (const additional of prompts.slice(1))
|
|
38
|
-
root.editor.addToHistory(additional);
|
|
39
|
-
root.appendWorkflowStatus(recovered.draft
|
|
40
|
-
? `Recovered an unfinished prompt; the prior draft and ${Math.max(0, prompts.length - 1)} additional prompt${prompts.length === 2 ? "" : "s"} are in editor history.`
|
|
41
|
-
: `Recovered an unfinished prompt${prompts.length > 1 ? `; ${prompts.length - 1} additional prompts are in editor history` : ""}.`);
|
|
42
|
-
}
|
|
43
|
-
else if (recovered.draft) {
|
|
44
|
-
root.editor.setText(recovered.draft);
|
|
45
|
-
root.appendWorkflowStatus("Recovered the editor draft from the previous tab process.");
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
/** Reports idle to the strip whenever the session leaves its busy lifecycle. */
|
|
49
|
-
observeLifecycle(event) {
|
|
50
|
-
if (event.type === "session-lifecycle" && event.lifecycle !== "busy")
|
|
51
|
-
this.#options?.reportStatus?.("idle");
|
|
52
|
-
}
|
|
53
|
-
/** Journals a prompt before it is sent; undefined outside a resident tab. Rejects when the journal cannot sync. */
|
|
54
|
-
admit(input) {
|
|
55
|
-
return this.#options?.admit?.(input) ?? Promise.resolve(undefined);
|
|
56
|
-
}
|
|
57
|
-
/** The admitted prompt reached the engine; its journal entry is correlated with the engine's entry. */
|
|
58
|
-
async dispatched(submissionId, entryId) {
|
|
59
|
-
this.#options?.dispatched?.();
|
|
60
|
-
await this.#options?.correlated?.(submissionId, entryId).catch(() => undefined);
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Leaves the tab without stopping its engine. Returns undefined outside a resident tab, true when
|
|
64
|
-
* the client detached, or the notice to show when detaching is unavailable.
|
|
65
|
-
*/
|
|
66
|
-
async detach() {
|
|
67
|
-
const resident = this.#options;
|
|
68
|
-
if (resident === undefined)
|
|
69
|
-
return undefined;
|
|
70
|
-
const detached = await resident.requestDetach().catch(() => false);
|
|
71
|
-
return detached ? true : resident.unavailableNotice ?? "Press Ctrl+C twice to leave; this agent keeps running.";
|
|
72
|
-
}
|
|
73
|
-
gracefulStop(sessionFile) {
|
|
74
|
-
return this.#options?.gracefulStop?.(sessionFile) ?? Promise.resolve();
|
|
75
|
-
}
|
|
76
|
-
dispose() { }
|
|
77
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export type TabsAction = "list" | "stop" | "stop-all" | "host-status" | "host-stop" | "doctor";
|
|
2
|
-
/** One parsed `a1 tabs` form. Parsing finishes before any host is contacted. */
|
|
3
|
-
export interface TabsRequest {
|
|
4
|
-
readonly action: TabsAction;
|
|
5
|
-
readonly tabId?: string;
|
|
6
|
-
readonly json: boolean;
|
|
7
|
-
}
|
package/dist/cli/tabs.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { runTerminalHostMaintenance, writeDoctorBundle } from "../foundation/resident-tabs/index.js";
|
|
2
|
-
import type { TabsRequest } from "./tabs-request.js";
|
|
3
|
-
export type { TabsRequest } from "./tabs-request.js";
|
|
4
|
-
export interface TabsCommandOptions {
|
|
5
|
-
/** The invoking package, never a different active or retained release. */
|
|
6
|
-
readonly packageRoot?: string;
|
|
7
|
-
readonly environment?: NodeJS.ProcessEnv;
|
|
8
|
-
readonly stdout?: (message: string) => void;
|
|
9
|
-
readonly stderr?: (message: string) => void;
|
|
10
|
-
readonly maintenance?: typeof runTerminalHostMaintenance;
|
|
11
|
-
readonly doctor?: typeof writeDoctorBundle;
|
|
12
|
-
}
|
|
13
|
-
/** `a1 tabs`: inspect or stop resident tabs without attaching, and never start a host to report state. */
|
|
14
|
-
export declare function runTabsCommand(request: TabsRequest, options?: TabsCommandOptions): Promise<number>;
|
package/dist/cli/tabs.js
DELETED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import { resolveProductPaths } from "../foundation/lifecycle/index.js";
|
|
2
|
-
import { materializeRelease } from "../foundation/release/index.js";
|
|
3
|
-
import { readResidentTabLaunchSettings, runTerminalHostMaintenance, writeDoctorBundle, } from "../foundation/resident-tabs/index.js";
|
|
4
|
-
import { PRODUCT_IDENTITY, PRODUCT_TEXT } from "../product-identity.js";
|
|
5
|
-
/** `a1 tabs`: inspect or stop resident tabs without attaching, and never start a host to report state. */
|
|
6
|
-
export async function runTabsCommand(request, options = {}) {
|
|
7
|
-
const environment = options.environment ?? process.env;
|
|
8
|
-
const stdout = options.stdout ?? (message => process.stdout.write(message));
|
|
9
|
-
const stderr = options.stderr ?? (message => process.stderr.write(message));
|
|
10
|
-
const paths = resolveProductPaths(environment);
|
|
11
|
-
const profileRoot = environment[PRODUCT_IDENTITY.environment.profileHome] ?? paths.configDir;
|
|
12
|
-
const releaseRoots = await invokingReleaseRoots(paths.dataDir, options.packageRoot, environment);
|
|
13
|
-
const maintenance = options.maintenance ?? runTerminalHostMaintenance;
|
|
14
|
-
const report = await maintenance({
|
|
15
|
-
action: request.action === "doctor" ? "host-status" : request.action,
|
|
16
|
-
...(request.tabId === undefined ? {} : { tabId: request.tabId }),
|
|
17
|
-
profileRoot,
|
|
18
|
-
dataDir: paths.dataDir,
|
|
19
|
-
runtimeDir: paths.runtimeDir,
|
|
20
|
-
releaseRoots,
|
|
21
|
-
environment,
|
|
22
|
-
});
|
|
23
|
-
if (request.action === "doctor") {
|
|
24
|
-
if (!report.stateDir) {
|
|
25
|
-
stderr(`${PRODUCT_TEXT.diagnostic(`tabs doctor could not locate resident state: ${report.message ?? report.host}`)}\n`);
|
|
26
|
-
return 1;
|
|
27
|
-
}
|
|
28
|
-
const settings = await readResidentTabLaunchSettings(environment.PI_CODING_AGENT_DIR ?? paths.configDir, PRODUCT_IDENTITY.commandName, paths.configDir, "a1");
|
|
29
|
-
const bundle = await (options.doctor ?? writeDoctorBundle)({
|
|
30
|
-
stateDir: report.stateDir,
|
|
31
|
-
hostStatus: report,
|
|
32
|
-
releaseRoots,
|
|
33
|
-
settings: { tabsAutoName: settings.tabsAutoName },
|
|
34
|
-
});
|
|
35
|
-
if (request.json)
|
|
36
|
-
stdout(`${JSON.stringify({ schema: "a1-tabs-doctor-v1", path: bundle.path, bytes: bundle.bytes, dropped: bundle.dropped })}\n`);
|
|
37
|
-
else
|
|
38
|
-
stdout(`Wrote ${bundle.path}\n`);
|
|
39
|
-
return 0;
|
|
40
|
-
}
|
|
41
|
-
if (request.json) {
|
|
42
|
-
const { exitCode: _exitCode, ...printed } = report;
|
|
43
|
-
stdout(`${JSON.stringify(printed)}\n`);
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
const text = describe(request, report);
|
|
47
|
-
if (report.exitCode === 0)
|
|
48
|
-
stdout(text);
|
|
49
|
-
else
|
|
50
|
-
stderr(text);
|
|
51
|
-
}
|
|
52
|
-
return report.exitCode === 0 ? 0 : 1;
|
|
53
|
-
}
|
|
54
|
-
async function invokingReleaseRoots(dataDir, packageRoot, environment) {
|
|
55
|
-
if (!packageRoot)
|
|
56
|
-
return [];
|
|
57
|
-
if (environment[PRODUCT_IDENTITY.environment.developmentInstanceId])
|
|
58
|
-
return [packageRoot];
|
|
59
|
-
try {
|
|
60
|
-
// Invariant: immutable materialization selects exact payload bytes without activating or starting a host.
|
|
61
|
-
return [(await materializeRelease(packageRoot, dataDir)).releaseRoot];
|
|
62
|
-
}
|
|
63
|
-
catch {
|
|
64
|
-
return [];
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
const NO_TABS = "No resident tabs are running.\n";
|
|
68
|
-
function describe(request, report) {
|
|
69
|
-
const command = PRODUCT_TEXT.commandName;
|
|
70
|
-
if (report.host === "none")
|
|
71
|
-
return NO_TABS;
|
|
72
|
-
if (report.host === "unavailable")
|
|
73
|
-
return `${PRODUCT_TEXT.diagnostic(`tabs could not run maintenance: ${report.message ?? "terminal host unavailable"}`)}\n`;
|
|
74
|
-
if (report.host === "unresponsive") {
|
|
75
|
-
return `The resident host (pid ${report.pid ?? "unknown"}) is not responding. Run \`${command} tabs host stop\` to stop it.\n`;
|
|
76
|
-
}
|
|
77
|
-
if (report.host === "incompatible") {
|
|
78
|
-
return `${PRODUCT_TEXT.diagnostic(report.message ?? "running tabs use another version")} Run \`${command} tabs host stop\` from that version.\n`;
|
|
79
|
-
}
|
|
80
|
-
if (report.host === "unverifiable" || report.host === "refused") {
|
|
81
|
-
return `${PRODUCT_TEXT.diagnostic(report.message ?? "the resident host could not be verified; nothing was changed")}\n`;
|
|
82
|
-
}
|
|
83
|
-
const result = report.result ?? {};
|
|
84
|
-
if (request.action === "list")
|
|
85
|
-
return listing(result);
|
|
86
|
-
if (request.action === "host-status")
|
|
87
|
-
return status(result);
|
|
88
|
-
if (request.action === "host-stop") {
|
|
89
|
-
if (report.host === "stopped")
|
|
90
|
-
return "Stopped every tab and the resident host.\n";
|
|
91
|
-
return `Could not stop every tab: ${remaining(result)}. The host is still running.\n`;
|
|
92
|
-
}
|
|
93
|
-
if (result.accepted === false && typeof result.message === "string") {
|
|
94
|
-
return `${PRODUCT_TEXT.diagnostic(`tabs stop: ${result.message === "unknown tab" ? `no tab ${request.tabId ?? ""}` : result.message}`)}\n`;
|
|
95
|
-
}
|
|
96
|
-
const stopped = Array.isArray(result.stopped) ? result.stopped.length : 0;
|
|
97
|
-
if (result.accepted === false)
|
|
98
|
-
return `Could not stop: ${remaining(result)}.\n`;
|
|
99
|
-
if (request.action === "stop")
|
|
100
|
-
return `Stopped tab ${request.tabId ?? ""}; its session can be resumed.\n`;
|
|
101
|
-
return stopped === 0 ? NO_TABS : `Stopped ${stopped} tab${stopped === 1 ? "" : "s"}; their sessions can be resumed.\n`;
|
|
102
|
-
}
|
|
103
|
-
function remaining(result) {
|
|
104
|
-
return Array.isArray(result.remaining) && result.remaining.length > 0 ? result.remaining.join(", ") : "unknown tabs";
|
|
105
|
-
}
|
|
106
|
-
function listing(result) {
|
|
107
|
-
const tabs = Array.isArray(result.tabs) ? result.tabs : [];
|
|
108
|
-
if (tabs.length === 0)
|
|
109
|
-
return NO_TABS;
|
|
110
|
-
const rows = [
|
|
111
|
-
["ID", "NAME", "STATUS", "CWD", "RELEASE", "HOLDER"],
|
|
112
|
-
...tabs.map(tab => [tab.tabId, tab.name, tab.status, tab.cwd, tab.release, tab.holderPid ?? "-"].map(value => String(value ?? "-"))),
|
|
113
|
-
];
|
|
114
|
-
const widths = rows[0].map((_, column) => Math.max(...rows.map(row => row[column].length)));
|
|
115
|
-
return `${rows.map(row => row.map((cell, column) => column === row.length - 1 ? cell : cell.padEnd(widths[column])).join(" ")).join("\n")}\n`;
|
|
116
|
-
}
|
|
117
|
-
function status(result) {
|
|
118
|
-
const limits = (result.limits ?? {});
|
|
119
|
-
const counters = (result.counters ?? {});
|
|
120
|
-
const byStatus = (result.tabsByStatus ?? {});
|
|
121
|
-
const lines = [
|
|
122
|
-
`pid: ${String(result.pid ?? "-")}`,
|
|
123
|
-
`build: ${String(result.build ?? "-")}`,
|
|
124
|
-
`release: ${String(result.release ?? "-")}`,
|
|
125
|
-
`generation: ${String(result.generation ?? "-")}`,
|
|
126
|
-
`epoch: ${String(result.epoch ?? "-")}`,
|
|
127
|
-
`uptime: ${String(result.uptimeSeconds ?? "-")}s`,
|
|
128
|
-
`detachment: ${String(result.detachmentMode ?? "unknown")}${result.detachmentVerified === false ? " (not verified)" : ""}`,
|
|
129
|
-
`tabs: ${String(result.tabs ?? 0)}${Object.keys(byStatus).length > 0 ? ` (${Object.entries(byStatus).map(([key, value]) => `${key} ${String(value)}`).join(", ")})` : ""}`,
|
|
130
|
-
`clients: ${String(result.clients ?? 0)}`,
|
|
131
|
-
...startsAndLifecycle(result),
|
|
132
|
-
`limits: ${Object.entries(limits).map(([key, value]) => `${key} ${String(value)}`).join(", ")}`,
|
|
133
|
-
`counters: ${Object.entries(counters).map(([key, value]) => `${key} ${String(value)}`).join(", ")}`,
|
|
134
|
-
...(Array.isArray(result.logs) ? result.logs.map(path => `log: ${String(path)}`) : []),
|
|
135
|
-
];
|
|
136
|
-
return `${lines.join("\n")}\n`;
|
|
137
|
-
}
|
|
138
|
-
/** Lifecycle work running this long means a terminal's tab requests are stuck. */
|
|
139
|
-
const LIFECYCLE_STALL_MS = 10_000;
|
|
140
|
-
function startsAndLifecycle(result) {
|
|
141
|
-
const lines = [];
|
|
142
|
-
const starts = result.starts;
|
|
143
|
-
if (starts)
|
|
144
|
-
lines.push(`starts: active ${String(starts.active ?? 0)}, waiting ${String(starts.interactiveWaiting ?? 0)}, recovering ${String(starts.recoverySlots ?? 0)}`);
|
|
145
|
-
const lifecycle = result.lifecycle;
|
|
146
|
-
if (lifecycle) {
|
|
147
|
-
const oldest = typeof lifecycle.oldestMs === "number" ? lifecycle.oldestMs : 0;
|
|
148
|
-
lines.push(`lifecycle: pending ${String(lifecycle.pending ?? 0)}, oldest ${oldest}ms${oldest > LIFECYCLE_STALL_MS ? " (stalled)" : ""}`);
|
|
149
|
-
}
|
|
150
|
-
return lines;
|
|
151
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type { OwnedUiReleaseUpdate } from "../contracts/owned-ui/index.js";
|
|
2
|
-
import type { TabBridgeClient } from "../foundation/resident-tabs/bridge-client.js";
|
|
3
|
-
import { type ResidentTabRoute } from "../foundation/resident-tabs/routes.js";
|
|
4
|
-
import type { ResidentTabRecovery } from "../foundation/resident-tabs/recovery.js";
|
|
5
|
-
import type { PiKeybindingsHost } from "../integrations/pi/components/shell-shared-facade.js";
|
|
6
|
-
import type { ComposedSessionBackend } from "./session-backend.js";
|
|
7
|
-
import type { OwnedRouteHostOptions } from "./settings-route-host.js";
|
|
8
|
-
/**
|
|
9
|
-
* The keybindings the shells borrow. Inside a resident tab the host dispatches and labels the tab
|
|
10
|
-
* shortcuts this child projects from its effective declarations, so the projection is published now
|
|
11
|
-
* and again after every customization reload.
|
|
12
|
-
*/
|
|
13
|
-
export declare function residentTabKeybindings(tabBridge: TabBridgeClient | null, agentDir: string, keybindingsHost: PiKeybindingsHost): PiKeybindingsHost;
|
|
14
|
-
/**
|
|
15
|
-
* How owned screens are presented in a resident tab: a Settings or Changelog tab's screen is the tab, and the Plus menu entry opens
|
|
16
|
-
* the tab bar's own Plus Menu dialog while this tab's controlling client can show it.
|
|
17
|
-
*/
|
|
18
|
-
export declare function residentRouteHostOptions(tabBridge: TabBridgeClient | null): OwnedRouteHostOptions;
|
|
19
|
-
/** Closes a utility tab when its own screen closes. Invariant: a utility tab's screen is the tab. */
|
|
20
|
-
export declare function closeResidentUtilityRoute(tabBridge: Pick<TabBridgeClient, "tabId" | "requestClose">, route: string): void;
|
|
21
|
-
export declare function bindResidentTabBridge(tabBridge: TabBridgeClient, backend: Pick<ComposedSessionBackend, "identity" | "session" | "workflows" | "generateResidentTabName">, recovery?: Pick<ResidentTabRecovery, "settled"> | null, options?: {
|
|
22
|
-
readonly autoName?: boolean;
|
|
23
|
-
readonly openRoute?: (route: ResidentTabRoute) => void;
|
|
24
|
-
readonly onClientVersion?: (version: string) => void;
|
|
25
|
-
}): Promise<() => void>;
|
|
26
|
-
export declare function createResidentClientIdentity(announce: (update: OwnedUiReleaseUpdate) => void): {
|
|
27
|
-
current: () => string | null;
|
|
28
|
-
onChange: (listener: () => void) => void;
|
|
29
|
-
observe: (next: string) => void;
|
|
30
|
-
};
|
|
31
|
-
/** Input ownership is established before the presenter starts, and released if bridge binding fails. */
|
|
32
|
-
export declare function bindResidentPresentation(bridge: TabBridgeClient | null, backend: Parameters<typeof bindResidentTabBridge>[1], recovery: Parameters<typeof bindResidentTabBridge>[2], options: Parameters<typeof bindResidentTabBridge>[3], input: {
|
|
33
|
-
addPreInputListener(listener: (data: string) => {
|
|
34
|
-
data: string;
|
|
35
|
-
}): () => void;
|
|
36
|
-
}): Promise<{
|
|
37
|
-
unsubscribeTabBridge: () => void;
|
|
38
|
-
removeControllerBoundaryInput: () => void;
|
|
39
|
-
}>;
|
|
40
|
-
export declare function correlateResidentTabSubmission(recovery: Pick<ResidentTabRecovery, "correlated" | "settled">, backend: Pick<ComposedSessionBackend, "identity" | "session">, submissionId: string, entryId: string): Promise<void>;
|
|
41
|
-
export declare function currentBackendSessionFile(backend: Pick<ComposedSessionBackend, "identity">): string | null;
|