@timurproko/a1 0.1.0 → 0.1.1-dev.10
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 +10 -43
- package/bin/{addone.js → cli.js} +2 -2
- package/bin/guardian.js +22 -0
- package/bin/ui.js +20 -0
- package/dist/native/darwin-arm64/manifest.json +20 -0
- package/dist/native/darwin-arm64/process-guardian +0 -0
- package/dist/native/linux-x64/manifest.json +20 -0
- package/dist/native/linux-x64/process-guardian +0 -0
- package/dist/native/win32-x64/manifest.json +20 -0
- package/dist/native/win32-x64/process-guardian.exe +0 -0
- package/dist/src/cli/dispatch.d.ts +4 -5
- package/dist/src/cli/dispatch.js +11 -11
- package/dist/src/cli/index.d.ts +0 -1
- package/dist/src/cli/index.js +0 -1
- package/dist/src/cli/version-stats.d.ts +0 -1
- package/dist/src/cli/version-stats.js +27 -23
- package/dist/src/cli/version.d.ts +1 -2
- package/dist/src/cli/version.js +4 -4
- package/dist/src/composition/index.d.ts +48 -0
- package/dist/src/composition/index.js +258 -0
- package/dist/src/features/launch/development-launch.d.ts +0 -1
- package/dist/src/features/launch/development-launch.js +12 -11
- package/dist/src/features/launch/index.d.ts +0 -1
- package/dist/src/features/launch/index.js +0 -1
- package/dist/src/features/launch/initialize-profile.d.ts +1 -2
- package/dist/src/features/launch/initialize-profile.js +24 -4
- package/dist/src/features/launch/intent.d.ts +0 -1
- package/dist/src/features/launch/intent.js +0 -1
- package/dist/src/features/launch/prepare-launch.d.ts +2 -3
- package/dist/src/features/launch/prepare-launch.js +3 -4
- package/dist/src/features/launch/profile-paths.d.ts +2 -3
- package/dist/src/features/launch/profile-paths.js +9 -8
- package/dist/src/features/launch/profiles.d.ts +3 -4
- package/dist/src/features/launch/profiles.js +7 -8
- package/dist/src/features/launch/runtime-selection.d.ts +13 -9
- package/dist/src/features/launch/runtime-selection.js +6 -7
- package/dist/src/features/owned-ui/customization.d.ts +5 -3
- package/dist/src/features/owned-ui/customization.js +2 -4
- package/dist/src/features/owned-ui/diagnostics.d.ts +0 -1
- package/dist/src/features/owned-ui/diagnostics.js +0 -1
- package/dist/src/features/owned-ui/index.d.ts +1 -2
- package/dist/src/features/owned-ui/index.js +1 -2
- package/dist/src/features/owned-ui/run.d.ts +9 -7
- package/dist/src/features/owned-ui/run.js +9 -15
- package/dist/src/features/owned-ui/settings-app.d.ts +22 -0
- package/dist/src/features/owned-ui/settings-app.js +633 -0
- package/dist/src/features/workspace/capabilities.d.ts +0 -1
- package/dist/src/features/workspace/capabilities.js +0 -1
- package/dist/src/features/workspace/index.d.ts +0 -1
- package/dist/src/features/workspace/index.js +0 -1
- package/dist/src/features/workspace/presentation.d.ts +1 -2
- package/dist/src/features/workspace/presentation.js +5 -4
- package/dist/src/features/workspace/reconciliation.d.ts +0 -1
- package/dist/src/features/workspace/reconciliation.js +0 -1
- package/dist/src/features/workspace/reducer.d.ts +0 -1
- package/dist/src/features/workspace/reducer.js +0 -1
- package/dist/src/features/workspace/router.d.ts +0 -1
- package/dist/src/features/workspace/router.js +0 -1
- package/dist/src/features/workspace/store.d.ts +0 -1
- package/dist/src/features/workspace/store.js +0 -1
- package/dist/src/foundation/agent-engine-contracts/capability-ports.d.ts +95 -0
- package/dist/src/foundation/agent-engine-contracts/capability-ports.js +35 -0
- package/dist/src/foundation/agent-engine-contracts/domain-validation.d.ts +12 -0
- package/dist/src/foundation/agent-engine-contracts/domain-validation.js +89 -0
- package/dist/src/foundation/agent-engine-contracts/domain.d.ts +116 -0
- package/dist/src/foundation/agent-engine-contracts/domain.js +1 -0
- package/dist/src/foundation/agent-engine-contracts/index.d.ts +7 -0
- package/dist/src/foundation/agent-engine-contracts/index.js +7 -0
- package/dist/src/foundation/agent-engine-contracts/model.d.ts +78 -0
- package/dist/src/foundation/agent-engine-contracts/model.js +1 -0
- package/dist/src/foundation/agent-engine-contracts/ports.d.ts +18 -0
- package/dist/src/foundation/agent-engine-contracts/ports.js +1 -0
- package/dist/src/foundation/agent-engine-contracts/serialization.d.ts +7 -0
- package/dist/src/foundation/agent-engine-contracts/serialization.js +58 -0
- package/dist/src/foundation/agent-engine-contracts/validation.d.ts +5 -0
- package/dist/src/foundation/agent-engine-contracts/validation.js +128 -0
- package/dist/src/foundation/launch-guardian/index.d.ts +1 -0
- package/dist/src/foundation/launch-guardian/index.js +1 -0
- package/dist/src/foundation/launch-guardian/main.d.ts +31 -0
- package/dist/src/foundation/launch-guardian/main.js +165 -0
- package/dist/src/foundation/lifecycle/commands.d.ts +40 -0
- package/dist/src/foundation/lifecycle/commands.js +1 -0
- package/dist/src/foundation/lifecycle/index.d.ts +2 -1
- package/dist/src/foundation/lifecycle/index.js +2 -1
- package/dist/src/foundation/lifecycle/launch-instance.d.ts +46 -0
- package/dist/src/foundation/lifecycle/launch-instance.js +134 -0
- package/dist/src/foundation/lifecycle/model.d.ts +7 -44
- package/dist/src/foundation/lifecycle/model.js +3 -3
- package/dist/src/foundation/lifecycle/paths.d.ts +2 -3
- package/dist/src/foundation/lifecycle/paths.js +32 -16
- package/dist/src/foundation/native-host-protocol/codec.d.ts +0 -1
- package/dist/src/foundation/native-host-protocol/codec.js +0 -1
- package/dist/src/foundation/native-host-protocol/evidence.d.ts +2 -3
- package/dist/src/foundation/native-host-protocol/evidence.js +4 -4
- package/dist/src/foundation/native-host-protocol/index.d.ts +0 -1
- package/dist/src/foundation/native-host-protocol/index.js +0 -1
- package/dist/src/foundation/native-host-protocol/messages.d.ts +1 -2
- package/dist/src/foundation/native-host-protocol/messages.js +2 -2
- package/dist/src/foundation/native-host-protocol/proof-gate.d.ts +0 -1
- package/dist/src/foundation/native-host-protocol/proof-gate.js +0 -1
- package/dist/src/foundation/owned-ui-contracts/extension-ui.d.ts +0 -1
- package/dist/src/foundation/owned-ui-contracts/extension-ui.js +0 -1
- package/dist/src/foundation/owned-ui-contracts/index.d.ts +0 -1
- package/dist/src/foundation/owned-ui-contracts/index.js +0 -1
- package/dist/src/foundation/owned-ui-contracts/model.d.ts +0 -1
- package/dist/src/foundation/owned-ui-contracts/model.js +0 -1
- package/dist/src/foundation/owned-ui-contracts/validation.d.ts +0 -1
- package/dist/src/foundation/owned-ui-contracts/validation.js +0 -1
- package/dist/src/foundation/owned-ui-settings/declarations.d.ts +13 -0
- package/dist/src/foundation/owned-ui-settings/declarations.js +39 -0
- package/dist/src/foundation/owned-ui-settings/index.d.ts +6 -0
- package/dist/src/foundation/owned-ui-settings/index.js +6 -0
- package/dist/src/foundation/owned-ui-settings/migrations.d.ts +13 -0
- package/dist/src/foundation/owned-ui-settings/migrations.js +28 -0
- package/dist/src/foundation/owned-ui-settings/resolution.d.ts +45 -0
- package/dist/src/foundation/owned-ui-settings/resolution.js +147 -0
- package/dist/src/foundation/owned-ui-settings/sections.d.ts +70 -0
- package/dist/src/foundation/owned-ui-settings/sections.js +93 -0
- package/dist/src/foundation/owned-ui-settings/session.d.ts +44 -0
- package/dist/src/foundation/owned-ui-settings/session.js +145 -0
- package/dist/src/foundation/owned-ui-settings/store.d.ts +28 -0
- package/dist/src/foundation/owned-ui-settings/store.js +90 -0
- package/dist/src/foundation/pi-component-adapter/components.d.ts +0 -1
- package/dist/src/foundation/pi-component-adapter/components.js +0 -1
- package/dist/src/foundation/pi-component-adapter/conformance.d.ts +1 -1
- package/dist/src/foundation/pi-component-adapter/conformance.js +10 -4
- package/dist/src/foundation/pi-component-adapter/index.d.ts +1 -1
- package/dist/src/foundation/pi-component-adapter/index.js +1 -1
- package/dist/src/foundation/pi-component-adapter/resources/builtin-themes.d.ts +165 -0
- package/dist/src/foundation/pi-component-adapter/resources/builtin-themes.js +166 -0
- package/dist/src/foundation/pi-component-adapter/shell-components.d.ts +0 -1
- package/dist/src/foundation/pi-component-adapter/shell-components.js +0 -1
- package/dist/src/foundation/pi-component-adapter/shell-editor-autocomplete.d.ts +0 -1
- package/dist/src/foundation/pi-component-adapter/shell-editor-autocomplete.js +10 -13
- package/dist/src/foundation/pi-component-adapter/shell-extension-ui.d.ts +0 -1
- package/dist/src/foundation/pi-component-adapter/shell-extension-ui.js +0 -1
- package/dist/src/foundation/pi-component-adapter/shell-footer-status.d.ts +0 -1
- package/dist/src/foundation/pi-component-adapter/shell-footer-status.js +5 -62
- package/dist/src/foundation/pi-component-adapter/shell-presenters-transcript.d.ts +0 -1
- package/dist/src/foundation/pi-component-adapter/shell-presenters-transcript.js +0 -1
- package/dist/src/foundation/pi-component-adapter/shell-selectors-dialogs.d.ts +9 -2
- package/dist/src/foundation/pi-component-adapter/shell-selectors-dialogs.js +10 -9
- package/dist/src/foundation/pi-component-adapter/shell-shared-facade.d.ts +0 -1
- package/dist/src/foundation/pi-component-adapter/shell-shared-facade.js +0 -1
- package/dist/src/foundation/pi-component-adapter/theme.d.ts +0 -1
- package/dist/src/foundation/pi-component-adapter/theme.js +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/adjacent/core/keybindings.d.ts +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/adjacent/core/keybindings.js +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/countdown-timer.d.ts +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/countdown-timer.js +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/custom-entry.d.ts +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/custom-entry.js +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/daxnuts.d.ts +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/daxnuts.js +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/earendil-announcement.d.ts +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/earendil-announcement.js +3 -27
- package/dist/src/foundation/pi-component-adapter/upstream/components/extension-editor.d.ts +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/extension-editor.js +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/first-time-setup.d.ts +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/first-time-setup.js +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/markdown-transform.d.ts +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/markdown-transform.js +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/mermaid.d.ts +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/mermaid.js +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/owned-editor.d.ts +18 -0
- package/dist/src/foundation/pi-component-adapter/upstream/components/owned-editor.js +55 -0
- package/dist/src/foundation/pi-component-adapter/upstream/components/scoped-models-selector.d.ts +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/scoped-models-selector.js +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/session-footer.d.ts +10 -0
- package/dist/src/foundation/pi-component-adapter/upstream/components/session-footer.js +120 -0
- package/dist/src/foundation/pi-component-adapter/upstream/components/session-selector-search.d.ts +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/session-selector-search.js +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/session-selector.d.ts +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/session-selector.js +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/skill-invocation-message.d.ts +1 -2
- package/dist/src/foundation/pi-component-adapter/upstream/components/skill-invocation-message.js +1 -2
- package/dist/src/foundation/pi-component-adapter/upstream/components/status-indicator.d.ts +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/status-indicator.js +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/tree-selector.d.ts +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/tree-selector.js +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/trust-selector.d.ts +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/trust-selector.js +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/external-editor.d.ts +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/external-editor.js +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/model-search.d.ts +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/model-search.js +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/theme/theme-controller.d.ts +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/theme/theme-controller.js +1 -2
- package/dist/src/foundation/pi-component-adapter/upstream/theme/theme.d.ts +8 -1
- package/dist/src/foundation/pi-component-adapter/upstream/theme/theme.js +30 -15
- package/dist/src/foundation/pi-engine-adapter/adapter.d.ts +19 -205
- package/dist/src/foundation/pi-engine-adapter/adapter.js +156 -181
- package/dist/src/foundation/pi-engine-adapter/conformance.d.ts +24 -1
- package/dist/src/foundation/pi-engine-adapter/conformance.js +60 -15
- package/dist/src/foundation/pi-engine-adapter/index.d.ts +6 -1
- package/dist/src/foundation/pi-engine-adapter/index.js +6 -1
- package/dist/src/foundation/pi-engine-adapter/model-auth-integration.d.ts +30 -0
- package/dist/src/foundation/pi-engine-adapter/model-auth-integration.js +61 -0
- package/dist/src/foundation/pi-engine-adapter/pi-settings-metadata.json +374 -0
- package/dist/src/foundation/pi-engine-adapter/public-main-entry.d.ts +5 -0
- package/dist/src/foundation/pi-engine-adapter/public-main-entry.js +27 -0
- package/dist/src/foundation/pi-engine-adapter/resource-extension-integration.d.ts +31 -0
- package/dist/src/foundation/pi-engine-adapter/resource-extension-integration.js +80 -0
- package/dist/src/foundation/pi-engine-adapter/runtime-integration.d.ts +18 -0
- package/dist/src/foundation/pi-engine-adapter/runtime-integration.js +32 -0
- package/dist/src/foundation/pi-engine-adapter/session-integration.d.ts +43 -0
- package/dist/src/foundation/pi-engine-adapter/session-integration.js +97 -0
- package/dist/src/foundation/pi-engine-adapter/settings-integration.d.ts +55 -0
- package/dist/src/foundation/pi-engine-adapter/settings-integration.js +233 -0
- package/dist/src/foundation/pi-engine-adapter/workflow-controllers.d.ts +20 -0
- package/dist/src/foundation/pi-engine-adapter/workflow-controllers.js +48 -0
- package/dist/src/foundation/pi-engine-adapter/workflows.d.ts +9 -1
- package/dist/src/foundation/pi-engine-adapter/workflows.js +0 -1
- package/dist/src/foundation/pi-owned-ui-integration/index.d.ts +2 -0
- package/dist/src/foundation/pi-owned-ui-integration/index.js +2 -0
- package/dist/src/foundation/pi-owned-ui-integration/route-host.d.ts +29 -0
- package/dist/src/foundation/pi-owned-ui-integration/route-host.js +1 -0
- package/dist/src/{features/owned-ui/pi-session-shell.d.ts → foundation/pi-owned-ui-integration/session-shell.d.ts} +23 -14
- package/dist/src/{features/owned-ui/pi-session-shell.js → foundation/pi-owned-ui-integration/session-shell.js} +130 -61
- package/dist/src/foundation/pi-tui-runtime-adapter/adapter.d.ts +6 -1
- package/dist/src/foundation/pi-tui-runtime-adapter/adapter.js +9 -1
- package/dist/src/foundation/pi-tui-runtime-adapter/conformance.d.ts +8 -4
- package/dist/src/foundation/pi-tui-runtime-adapter/conformance.js +22 -9
- package/dist/src/foundation/pi-tui-runtime-adapter/contracts.d.ts +0 -2
- package/dist/src/foundation/pi-tui-runtime-adapter/contracts.js +1 -2
- package/dist/src/foundation/pi-tui-runtime-adapter/index.d.ts +1 -1
- package/dist/src/foundation/pi-tui-runtime-adapter/index.js +1 -1
- package/dist/src/foundation/pi-tui-runtime-adapter/presentation-adapter.d.ts +4 -0
- package/dist/src/foundation/pi-tui-runtime-adapter/presentation-adapter.js +48 -0
- package/dist/src/foundation/presentation-contracts/index.d.ts +96 -0
- package/dist/src/foundation/presentation-contracts/index.js +38 -0
- package/dist/src/foundation/process-containment/artifact.d.ts +1 -0
- package/dist/src/foundation/process-containment/artifact.js +34 -0
- package/dist/src/foundation/process-containment/contracts.d.ts +31 -0
- package/dist/src/foundation/process-containment/contracts.js +35 -0
- package/dist/src/foundation/process-containment/index.d.ts +5 -0
- package/dist/src/foundation/process-containment/index.js +5 -0
- package/dist/src/foundation/process-containment/linux-process-inspector.d.ts +6 -0
- package/dist/src/foundation/process-containment/linux-process-inspector.js +26 -0
- package/dist/src/foundation/process-containment/native-guardian-containment.d.ts +16 -0
- package/dist/src/foundation/process-containment/native-guardian-containment.js +139 -0
- package/dist/src/foundation/process-containment/windows-process-inspector.d.ts +17 -0
- package/dist/src/foundation/process-containment/windows-process-inspector.js +53 -0
- package/dist/src/foundation/protocol/client.d.ts +2 -2
- package/dist/src/foundation/protocol/client.js +3 -1
- package/dist/src/foundation/protocol/index.d.ts +0 -1
- package/dist/src/foundation/protocol/index.js +0 -1
- package/dist/src/foundation/protocol/messages.d.ts +6 -7
- package/dist/src/foundation/protocol/messages.js +3 -3
- package/dist/src/foundation/release/bootstrap.d.ts +2 -3
- package/dist/src/foundation/release/bootstrap.js +85 -33
- package/dist/src/foundation/release/cohort-selection.d.ts +0 -1
- package/dist/src/foundation/release/cohort-selection.js +3 -4
- package/dist/src/foundation/release/cohort-state.d.ts +6 -4
- package/dist/src/foundation/release/cohort-state.js +5 -4
- package/dist/src/foundation/release/concurrency.d.ts +1 -0
- package/dist/src/foundation/release/concurrency.js +17 -0
- package/dist/src/foundation/release/development-preview-release.d.ts +2 -2
- package/dist/src/foundation/release/development-preview-release.js +3 -2
- package/dist/src/foundation/release/index.d.ts +0 -1
- package/dist/src/foundation/release/index.js +0 -1
- package/dist/src/foundation/release/process-cleanup.d.ts +1 -2
- package/dist/src/foundation/release/process-cleanup.js +2 -3
- package/dist/src/foundation/release/release-gc.d.ts +0 -1
- package/dist/src/foundation/release/release-gc.js +0 -1
- package/dist/src/foundation/release/release-store.d.ts +38 -6
- package/dist/src/foundation/release/release-store.js +103 -43
- package/dist/src/foundation/release/release.d.ts +20 -6
- package/dist/src/foundation/release/release.js +77 -48
- package/dist/src/foundation/release/stable-release.d.ts +2 -2
- package/dist/src/foundation/release/stable-release.js +6 -5
- package/dist/src/foundation/release/update-transaction.d.ts +2 -2
- package/dist/src/foundation/release/update-transaction.js +8 -7
- package/dist/src/foundation/release/update.d.ts +20 -4
- package/dist/src/foundation/release/update.js +152 -36
- package/dist/src/foundation/storage/control-store.d.ts +8 -8
- package/dist/src/foundation/storage/control-store.js +132 -61
- package/dist/src/foundation/storage/index.d.ts +0 -1
- package/dist/src/foundation/storage/index.js +0 -1
- package/dist/src/foundation/structured-agent-runtime/backpressure.d.ts +0 -1
- package/dist/src/foundation/structured-agent-runtime/backpressure.js +0 -1
- package/dist/src/foundation/structured-agent-runtime/commands.d.ts +0 -1
- package/dist/src/foundation/structured-agent-runtime/commands.js +0 -1
- package/dist/src/foundation/structured-agent-runtime/handshake.d.ts +2 -3
- package/dist/src/foundation/structured-agent-runtime/handshake.js +13 -13
- package/dist/src/foundation/structured-agent-runtime/index.d.ts +0 -1
- package/dist/src/foundation/structured-agent-runtime/index.js +0 -1
- package/dist/src/foundation/structured-agent-runtime/reconnection.d.ts +0 -1
- package/dist/src/foundation/structured-agent-runtime/reconnection.js +0 -1
- package/dist/src/foundation/structured-agent-runtime/state.d.ts +0 -1
- package/dist/src/foundation/structured-agent-runtime/state.js +0 -1
- package/dist/src/foundation/supervision/index.d.ts +1 -2
- package/dist/src/foundation/supervision/index.js +1 -2
- package/dist/src/foundation/supervision/main.d.ts +0 -1
- package/dist/src/foundation/supervision/main.js +11 -10
- package/dist/src/foundation/supervision/paths.d.ts +1 -2
- package/dist/src/foundation/supervision/paths.js +1 -2
- package/dist/src/foundation/supervision/server.d.ts +6 -5
- package/dist/src/foundation/supervision/server.js +259 -91
- package/dist/src/foundation/ui-apps/contracts.d.ts +42 -0
- package/dist/src/foundation/ui-apps/contracts.js +12 -0
- package/dist/src/foundation/ui-apps/host.d.ts +42 -0
- package/dist/src/foundation/ui-apps/host.js +152 -0
- package/dist/src/foundation/ui-apps/index.d.ts +3 -0
- package/dist/src/foundation/ui-apps/index.js +3 -0
- package/dist/src/foundation/ui-apps/registry.d.ts +11 -0
- package/dist/src/foundation/ui-apps/registry.js +32 -0
- package/dist/src/foundation/ui-components/dialog-panel.d.ts +36 -0
- package/dist/src/foundation/ui-components/dialog-panel.js +47 -0
- package/dist/src/foundation/ui-components/frame.d.ts +21 -0
- package/dist/src/foundation/ui-components/frame.js +54 -0
- package/dist/src/foundation/ui-components/index.d.ts +18 -0
- package/dist/src/foundation/ui-components/index.js +18 -0
- package/dist/src/foundation/ui-components/label.d.ts +8 -0
- package/dist/src/foundation/ui-components/label.js +36 -0
- package/dist/src/foundation/ui-components/line-input.d.ts +74 -0
- package/dist/src/foundation/ui-components/line-input.js +245 -0
- package/dist/src/foundation/ui-components/list-block.d.ts +66 -0
- package/dist/src/foundation/ui-components/list-block.js +176 -0
- package/dist/src/foundation/ui-components/list-view.d.ts +66 -0
- package/dist/src/foundation/ui-components/list-view.js +76 -0
- package/dist/src/foundation/ui-components/mouse.d.ts +15 -0
- package/dist/src/foundation/ui-components/mouse.js +46 -0
- package/dist/src/foundation/ui-components/pane.d.ts +33 -0
- package/dist/src/foundation/ui-components/pane.js +7 -0
- package/dist/src/foundation/ui-components/revision.d.ts +35 -0
- package/dist/src/foundation/ui-components/revision.js +79 -0
- package/dist/src/foundation/ui-components/scrollbar.d.ts +62 -0
- package/dist/src/foundation/ui-components/scrollbar.js +102 -0
- package/dist/src/foundation/ui-components/shortcuts.d.ts +57 -0
- package/dist/src/foundation/ui-components/shortcuts.js +81 -0
- package/dist/src/foundation/ui-components/spans.d.ts +7 -0
- package/dist/src/foundation/ui-components/spans.js +59 -0
- package/dist/src/foundation/ui-components/status-line.d.ts +16 -0
- package/dist/src/foundation/ui-components/status-line.js +14 -0
- package/dist/src/foundation/ui-components/stepper.d.ts +24 -0
- package/dist/src/foundation/ui-components/stepper.js +33 -0
- package/dist/src/foundation/ui-components/surface.d.ts +20 -0
- package/dist/src/foundation/ui-components/surface.js +38 -0
- package/dist/src/foundation/ui-components/text.d.ts +24 -0
- package/dist/src/foundation/ui-components/text.js +123 -0
- package/dist/src/foundation/ui-components/theme.d.ts +23 -0
- package/dist/src/foundation/ui-components/theme.js +13 -0
- package/dist/src/foundation/ui-components/value-menu.d.ts +41 -0
- package/dist/src/foundation/ui-components/value-menu.js +33 -0
- package/dist/src/foundation/workspace-contracts/index.d.ts +0 -1
- package/dist/src/foundation/workspace-contracts/index.js +0 -1
- package/dist/src/foundation/workspace-contracts/model.d.ts +0 -1
- package/dist/src/foundation/workspace-contracts/model.js +0 -1
- package/dist/src/foundation/workspace-contracts/validation.d.ts +0 -1
- package/dist/src/foundation/workspace-contracts/validation.js +0 -1
- package/dist/src/product-identity.d.ts +37 -0
- package/dist/src/product-identity.js +150 -0
- package/dist/src/product-identity.json +99 -0
- package/docs/architecture/boundaries.md +32 -14
- package/docs/architecture/process-guardian-provenance.md +26 -0
- package/docs/architecture/project-structure.md +2 -2
- package/docs/architecture/resource-and-data-policy.md +1 -1
- package/docs/architecture/terminal-host-proof-gate.md +2 -2
- package/docs/architecture/terminal-host-provenance.md +3 -3
- package/docs/architecture/terminal-host-spike-evidence.md +1 -1
- package/docs/architecture/toolchain.md +40 -8
- package/docs/architecture/ui-reference-provenance.md +50 -0
- package/docs/ci-release-runbook.md +67 -0
- package/docs/features/launch-profiles.md +12 -6
- package/docs/manual-launch-instance-acceptance.md +66 -0
- package/docs/manual-pi-boundary-candidate.md +33 -0
- package/docs/manual-terminal-colour-check.md +55 -0
- package/docs/manual-transparent-checkpoint.md +11 -11
- package/package.json +27 -14
- package/bin/addone-ui.js +0 -20
- package/dist/src/cli/dispatch.d.ts.map +0 -1
- package/dist/src/cli/dispatch.js.map +0 -1
- package/dist/src/cli/index.d.ts.map +0 -1
- package/dist/src/cli/index.js.map +0 -1
- package/dist/src/cli/version-stats.d.ts.map +0 -1
- package/dist/src/cli/version-stats.js.map +0 -1
- package/dist/src/cli/version.d.ts.map +0 -1
- package/dist/src/cli/version.js.map +0 -1
- package/dist/src/features/launch/development-launch.d.ts.map +0 -1
- package/dist/src/features/launch/development-launch.js.map +0 -1
- package/dist/src/features/launch/index.d.ts.map +0 -1
- package/dist/src/features/launch/index.js.map +0 -1
- package/dist/src/features/launch/initialize-profile.d.ts.map +0 -1
- package/dist/src/features/launch/initialize-profile.js.map +0 -1
- package/dist/src/features/launch/intent.d.ts.map +0 -1
- package/dist/src/features/launch/intent.js.map +0 -1
- package/dist/src/features/launch/prepare-launch.d.ts.map +0 -1
- package/dist/src/features/launch/prepare-launch.js.map +0 -1
- package/dist/src/features/launch/profile-paths.d.ts.map +0 -1
- package/dist/src/features/launch/profile-paths.js.map +0 -1
- package/dist/src/features/launch/profiles.d.ts.map +0 -1
- package/dist/src/features/launch/profiles.js.map +0 -1
- package/dist/src/features/launch/runtime-selection.d.ts.map +0 -1
- package/dist/src/features/launch/runtime-selection.js.map +0 -1
- package/dist/src/features/owned-ui/customization.d.ts.map +0 -1
- package/dist/src/features/owned-ui/customization.js.map +0 -1
- package/dist/src/features/owned-ui/diagnostics.d.ts.map +0 -1
- package/dist/src/features/owned-ui/diagnostics.js.map +0 -1
- package/dist/src/features/owned-ui/index.d.ts.map +0 -1
- package/dist/src/features/owned-ui/index.js.map +0 -1
- package/dist/src/features/owned-ui/pi-session-shell.d.ts.map +0 -1
- package/dist/src/features/owned-ui/pi-session-shell.js.map +0 -1
- package/dist/src/features/owned-ui/run.d.ts.map +0 -1
- package/dist/src/features/owned-ui/run.js.map +0 -1
- package/dist/src/features/workspace/capabilities.d.ts.map +0 -1
- package/dist/src/features/workspace/capabilities.js.map +0 -1
- package/dist/src/features/workspace/index.d.ts.map +0 -1
- package/dist/src/features/workspace/index.js.map +0 -1
- package/dist/src/features/workspace/presentation.d.ts.map +0 -1
- package/dist/src/features/workspace/presentation.js.map +0 -1
- package/dist/src/features/workspace/reconciliation.d.ts.map +0 -1
- package/dist/src/features/workspace/reconciliation.js.map +0 -1
- package/dist/src/features/workspace/reducer.d.ts.map +0 -1
- package/dist/src/features/workspace/reducer.js.map +0 -1
- package/dist/src/features/workspace/router.d.ts.map +0 -1
- package/dist/src/features/workspace/router.js.map +0 -1
- package/dist/src/features/workspace/store.d.ts.map +0 -1
- package/dist/src/features/workspace/store.js.map +0 -1
- package/dist/src/foundation/lifecycle/index.d.ts.map +0 -1
- package/dist/src/foundation/lifecycle/index.js.map +0 -1
- package/dist/src/foundation/lifecycle/model.d.ts.map +0 -1
- package/dist/src/foundation/lifecycle/model.js.map +0 -1
- package/dist/src/foundation/lifecycle/paths.d.ts.map +0 -1
- package/dist/src/foundation/lifecycle/paths.js.map +0 -1
- package/dist/src/foundation/native-host-protocol/codec.d.ts.map +0 -1
- package/dist/src/foundation/native-host-protocol/codec.js.map +0 -1
- package/dist/src/foundation/native-host-protocol/evidence.d.ts.map +0 -1
- package/dist/src/foundation/native-host-protocol/evidence.js.map +0 -1
- package/dist/src/foundation/native-host-protocol/index.d.ts.map +0 -1
- package/dist/src/foundation/native-host-protocol/index.js.map +0 -1
- package/dist/src/foundation/native-host-protocol/messages.d.ts.map +0 -1
- package/dist/src/foundation/native-host-protocol/messages.js.map +0 -1
- package/dist/src/foundation/native-host-protocol/proof-gate.d.ts.map +0 -1
- package/dist/src/foundation/native-host-protocol/proof-gate.js.map +0 -1
- package/dist/src/foundation/owned-ui-contracts/extension-ui.d.ts.map +0 -1
- package/dist/src/foundation/owned-ui-contracts/extension-ui.js.map +0 -1
- package/dist/src/foundation/owned-ui-contracts/index.d.ts.map +0 -1
- package/dist/src/foundation/owned-ui-contracts/index.js.map +0 -1
- package/dist/src/foundation/owned-ui-contracts/model.d.ts.map +0 -1
- package/dist/src/foundation/owned-ui-contracts/model.js.map +0 -1
- package/dist/src/foundation/owned-ui-contracts/validation.d.ts.map +0 -1
- package/dist/src/foundation/owned-ui-contracts/validation.js.map +0 -1
- package/dist/src/foundation/pi-component-adapter/components.d.ts.map +0 -1
- package/dist/src/foundation/pi-component-adapter/components.js.map +0 -1
- package/dist/src/foundation/pi-component-adapter/conformance.d.ts.map +0 -1
- package/dist/src/foundation/pi-component-adapter/conformance.js.map +0 -1
- package/dist/src/foundation/pi-component-adapter/index.d.ts.map +0 -1
- package/dist/src/foundation/pi-component-adapter/index.js.map +0 -1
- package/dist/src/foundation/pi-component-adapter/shell-components.d.ts.map +0 -1
- package/dist/src/foundation/pi-component-adapter/shell-components.js.map +0 -1
- package/dist/src/foundation/pi-component-adapter/shell-editor-autocomplete.d.ts.map +0 -1
- package/dist/src/foundation/pi-component-adapter/shell-editor-autocomplete.js.map +0 -1
- package/dist/src/foundation/pi-component-adapter/shell-extension-ui.d.ts.map +0 -1
- package/dist/src/foundation/pi-component-adapter/shell-extension-ui.js.map +0 -1
- package/dist/src/foundation/pi-component-adapter/shell-footer-status.d.ts.map +0 -1
- package/dist/src/foundation/pi-component-adapter/shell-footer-status.js.map +0 -1
- package/dist/src/foundation/pi-component-adapter/shell-presenters-transcript.d.ts.map +0 -1
- package/dist/src/foundation/pi-component-adapter/shell-presenters-transcript.js.map +0 -1
- package/dist/src/foundation/pi-component-adapter/shell-selectors-dialogs.d.ts.map +0 -1
- package/dist/src/foundation/pi-component-adapter/shell-selectors-dialogs.js.map +0 -1
- package/dist/src/foundation/pi-component-adapter/shell-shared-facade.d.ts.map +0 -1
- package/dist/src/foundation/pi-component-adapter/shell-shared-facade.js.map +0 -1
- package/dist/src/foundation/pi-component-adapter/theme.d.ts.map +0 -1
- package/dist/src/foundation/pi-component-adapter/theme.js.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/adjacent/core/keybindings.d.ts.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/adjacent/core/keybindings.js.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/countdown-timer.d.ts.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/countdown-timer.js.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/custom-entry.d.ts.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/custom-entry.js.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/daxnuts.d.ts.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/daxnuts.js.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/earendil-announcement.d.ts.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/earendil-announcement.js.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/extension-editor.d.ts.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/extension-editor.js.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/first-time-setup.d.ts.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/first-time-setup.js.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/markdown-transform.d.ts.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/markdown-transform.js.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/mermaid.d.ts.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/mermaid.js.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/scoped-models-selector.d.ts.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/scoped-models-selector.js.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/session-selector-search.d.ts.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/session-selector-search.js.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/session-selector.d.ts.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/session-selector.js.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/skill-invocation-message.d.ts.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/skill-invocation-message.js.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/status-indicator.d.ts.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/status-indicator.js.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/tree-selector.d.ts.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/tree-selector.js.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/trust-selector.d.ts.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/components/trust-selector.js.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/external-editor.d.ts.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/external-editor.js.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/model-search.d.ts.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/model-search.js.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/theme/theme-controller.d.ts.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/theme/theme-controller.js.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/theme/theme.d.ts.map +0 -1
- package/dist/src/foundation/pi-component-adapter/upstream/theme/theme.js.map +0 -1
- package/dist/src/foundation/pi-engine-adapter/adapter.d.ts.map +0 -1
- package/dist/src/foundation/pi-engine-adapter/adapter.js.map +0 -1
- package/dist/src/foundation/pi-engine-adapter/conformance.d.ts.map +0 -1
- package/dist/src/foundation/pi-engine-adapter/conformance.js.map +0 -1
- package/dist/src/foundation/pi-engine-adapter/index.d.ts.map +0 -1
- package/dist/src/foundation/pi-engine-adapter/index.js.map +0 -1
- package/dist/src/foundation/pi-engine-adapter/workflows.d.ts.map +0 -1
- package/dist/src/foundation/pi-engine-adapter/workflows.js.map +0 -1
- package/dist/src/foundation/pi-tui-runtime-adapter/adapter.d.ts.map +0 -1
- package/dist/src/foundation/pi-tui-runtime-adapter/adapter.js.map +0 -1
- package/dist/src/foundation/pi-tui-runtime-adapter/conformance.d.ts.map +0 -1
- package/dist/src/foundation/pi-tui-runtime-adapter/conformance.js.map +0 -1
- package/dist/src/foundation/pi-tui-runtime-adapter/contracts.d.ts.map +0 -1
- package/dist/src/foundation/pi-tui-runtime-adapter/contracts.js.map +0 -1
- package/dist/src/foundation/pi-tui-runtime-adapter/index.d.ts.map +0 -1
- package/dist/src/foundation/pi-tui-runtime-adapter/index.js.map +0 -1
- package/dist/src/foundation/protocol/client.d.ts.map +0 -1
- package/dist/src/foundation/protocol/client.js.map +0 -1
- package/dist/src/foundation/protocol/index.d.ts.map +0 -1
- package/dist/src/foundation/protocol/index.js.map +0 -1
- package/dist/src/foundation/protocol/messages.d.ts.map +0 -1
- package/dist/src/foundation/protocol/messages.js.map +0 -1
- package/dist/src/foundation/release/bootstrap.d.ts.map +0 -1
- package/dist/src/foundation/release/bootstrap.js.map +0 -1
- package/dist/src/foundation/release/cohort-selection.d.ts.map +0 -1
- package/dist/src/foundation/release/cohort-selection.js.map +0 -1
- package/dist/src/foundation/release/cohort-state.d.ts.map +0 -1
- package/dist/src/foundation/release/cohort-state.js.map +0 -1
- package/dist/src/foundation/release/development-preview-release.d.ts.map +0 -1
- package/dist/src/foundation/release/development-preview-release.js.map +0 -1
- package/dist/src/foundation/release/index.d.ts.map +0 -1
- package/dist/src/foundation/release/index.js.map +0 -1
- package/dist/src/foundation/release/process-cleanup.d.ts.map +0 -1
- package/dist/src/foundation/release/process-cleanup.js.map +0 -1
- package/dist/src/foundation/release/release-gc.d.ts.map +0 -1
- package/dist/src/foundation/release/release-gc.js.map +0 -1
- package/dist/src/foundation/release/release-store.d.ts.map +0 -1
- package/dist/src/foundation/release/release-store.js.map +0 -1
- package/dist/src/foundation/release/release.d.ts.map +0 -1
- package/dist/src/foundation/release/release.js.map +0 -1
- package/dist/src/foundation/release/stable-release.d.ts.map +0 -1
- package/dist/src/foundation/release/stable-release.js.map +0 -1
- package/dist/src/foundation/release/update-transaction.d.ts.map +0 -1
- package/dist/src/foundation/release/update-transaction.js.map +0 -1
- package/dist/src/foundation/release/update.d.ts.map +0 -1
- package/dist/src/foundation/release/update.js.map +0 -1
- package/dist/src/foundation/storage/control-store.d.ts.map +0 -1
- package/dist/src/foundation/storage/control-store.js.map +0 -1
- package/dist/src/foundation/storage/index.d.ts.map +0 -1
- package/dist/src/foundation/storage/index.js.map +0 -1
- package/dist/src/foundation/structured-agent-runtime/backpressure.d.ts.map +0 -1
- package/dist/src/foundation/structured-agent-runtime/backpressure.js.map +0 -1
- package/dist/src/foundation/structured-agent-runtime/commands.d.ts.map +0 -1
- package/dist/src/foundation/structured-agent-runtime/commands.js.map +0 -1
- package/dist/src/foundation/structured-agent-runtime/handshake.d.ts.map +0 -1
- package/dist/src/foundation/structured-agent-runtime/handshake.js.map +0 -1
- package/dist/src/foundation/structured-agent-runtime/index.d.ts.map +0 -1
- package/dist/src/foundation/structured-agent-runtime/index.js.map +0 -1
- package/dist/src/foundation/structured-agent-runtime/reconnection.d.ts.map +0 -1
- package/dist/src/foundation/structured-agent-runtime/reconnection.js.map +0 -1
- package/dist/src/foundation/structured-agent-runtime/state.d.ts.map +0 -1
- package/dist/src/foundation/structured-agent-runtime/state.js.map +0 -1
- package/dist/src/foundation/supervision/index.d.ts.map +0 -1
- package/dist/src/foundation/supervision/index.js.map +0 -1
- package/dist/src/foundation/supervision/main.d.ts.map +0 -1
- package/dist/src/foundation/supervision/main.js.map +0 -1
- package/dist/src/foundation/supervision/paths.d.ts.map +0 -1
- package/dist/src/foundation/supervision/paths.js.map +0 -1
- package/dist/src/foundation/supervision/server.d.ts.map +0 -1
- package/dist/src/foundation/supervision/server.js.map +0 -1
- package/dist/src/foundation/transparent-terminal/command-resolution.d.ts +0 -14
- package/dist/src/foundation/transparent-terminal/command-resolution.d.ts.map +0 -1
- package/dist/src/foundation/transparent-terminal/command-resolution.js +0 -70
- package/dist/src/foundation/transparent-terminal/command-resolution.js.map +0 -1
- package/dist/src/foundation/transparent-terminal/foreground-broker.d.ts +0 -33
- package/dist/src/foundation/transparent-terminal/foreground-broker.d.ts.map +0 -1
- package/dist/src/foundation/transparent-terminal/foreground-broker.js +0 -88
- package/dist/src/foundation/transparent-terminal/foreground-broker.js.map +0 -1
- package/dist/src/foundation/transparent-terminal/index.d.ts +0 -4
- package/dist/src/foundation/transparent-terminal/index.d.ts.map +0 -1
- package/dist/src/foundation/transparent-terminal/index.js +0 -4
- package/dist/src/foundation/transparent-terminal/index.js.map +0 -1
- package/dist/src/foundation/transparent-terminal/main.d.ts +0 -10
- package/dist/src/foundation/transparent-terminal/main.d.ts.map +0 -1
- package/dist/src/foundation/transparent-terminal/main.js +0 -107
- package/dist/src/foundation/transparent-terminal/main.js.map +0 -1
- package/dist/src/foundation/transparent-terminal/native-launcher.d.ts +0 -26
- package/dist/src/foundation/transparent-terminal/native-launcher.d.ts.map +0 -1
- package/dist/src/foundation/transparent-terminal/native-launcher.js +0 -147
- package/dist/src/foundation/transparent-terminal/native-launcher.js.map +0 -1
- package/dist/src/foundation/workspace-contracts/index.d.ts.map +0 -1
- package/dist/src/foundation/workspace-contracts/index.js.map +0 -1
- package/dist/src/foundation/workspace-contracts/model.d.ts.map +0 -1
- package/dist/src/foundation/workspace-contracts/model.js.map +0 -1
- package/dist/src/foundation/workspace-contracts/validation.d.ts.map +0 -1
- package/dist/src/foundation/workspace-contracts/validation.js.map +0 -1
- /package/bin/{addone-supervisor.js → supervisor.js} +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ScrollbarGeometry } from "./scrollbar.js";
|
|
2
|
+
import type { UiTheme } from "./theme.js";
|
|
3
|
+
/**
|
|
4
|
+
* The chrome around a list: the rail down its right edge, and what it shows when
|
|
5
|
+
* there is nothing to list. Both are the same on any screen, so neither is a
|
|
6
|
+
* screen's to draw.
|
|
7
|
+
*/
|
|
8
|
+
/** Columns the rail occupies: its own, plus the gap before it. */
|
|
9
|
+
export declare const RAIL_COLUMNS = 2;
|
|
10
|
+
export interface RailOptions {
|
|
11
|
+
/** Rows at the top the rail does not run beside, such as a sticky header. */
|
|
12
|
+
readonly topInset?: number;
|
|
13
|
+
}
|
|
14
|
+
/** Draws the rail beside each row, padding the rows to a common width first. */
|
|
15
|
+
export declare function withScrollbarRail(lines: readonly string[], geometry: ScrollbarGeometry | null, contentWidth: number, theme: UiTheme, options?: RailOptions): readonly string[];
|
|
16
|
+
/**
|
|
17
|
+
* What a list shows instead of rows: a mark and a line, both quiet, sitting in
|
|
18
|
+
* the middle of the space the rows would have had.
|
|
19
|
+
*/
|
|
20
|
+
export declare function renderEmptyState(message: string, mark: string, height: number, width: number, theme: UiTheme): readonly string[];
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { isThumbRow } from "./scrollbar.js";
|
|
2
|
+
import { displayWidth } from "./text.js";
|
|
3
|
+
/**
|
|
4
|
+
* The chrome around a list: the rail down its right edge, and what it shows when
|
|
5
|
+
* there is nothing to list. Both are the same on any screen, so neither is a
|
|
6
|
+
* screen's to draw.
|
|
7
|
+
*/
|
|
8
|
+
/** Columns the rail occupies: its own, plus the gap before it. */
|
|
9
|
+
export const RAIL_COLUMNS = 2;
|
|
10
|
+
/** Draws the rail beside each row, padding the rows to a common width first. */
|
|
11
|
+
export function withScrollbarRail(lines, geometry, contentWidth, theme, options = {}) {
|
|
12
|
+
const inset = options.topInset ?? 0;
|
|
13
|
+
return lines.map((line, offset) => {
|
|
14
|
+
const cell = offset < inset || geometry === null
|
|
15
|
+
? " "
|
|
16
|
+
: isThumbRow(geometry, offset - inset) ? theme.fg("accent", "│") : theme.fg("dim", "│");
|
|
17
|
+
return `${pad(line, contentWidth)} ${cell}`;
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* What a list shows instead of rows: a mark and a line, both quiet, sitting in
|
|
22
|
+
* the middle of the space the rows would have had.
|
|
23
|
+
*/
|
|
24
|
+
export function renderEmptyState(message, mark, height, width, theme) {
|
|
25
|
+
const middle = Math.floor(height / 2);
|
|
26
|
+
return Array.from({ length: Math.max(0, height) }, (_line, index) => {
|
|
27
|
+
if (index === middle - 1)
|
|
28
|
+
return centre(theme.fg("muted", mark), mark, width);
|
|
29
|
+
return index === middle ? centre(theme.fg("muted", message), message, width) : "";
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function centre(painted, raw, width) {
|
|
33
|
+
return `${" ".repeat(Math.max(0, Math.floor((width - displayWidth(raw)) / 2)))}${painted}`;
|
|
34
|
+
}
|
|
35
|
+
function pad(line, width) {
|
|
36
|
+
const visible = displayWidth(line);
|
|
37
|
+
return visible >= width ? line : line + " ".repeat(width - visible);
|
|
38
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Display-width text handling. Terminals lay out by column, not by code unit,
|
|
3
|
+
* so measuring with `String.length` mis-sizes CJK, emoji, and combining marks,
|
|
4
|
+
* and counting styling escapes as visible width breaks every layout that uses
|
|
5
|
+
* colour.
|
|
6
|
+
*/
|
|
7
|
+
/** Removes styling sequences so only visible characters remain. */
|
|
8
|
+
export declare function stripAnsi(text: string): string;
|
|
9
|
+
/** Columns this text occupies once styling is removed. */
|
|
10
|
+
export declare function displayWidth(text: string): number;
|
|
11
|
+
/**
|
|
12
|
+
* Truncates to a column budget without splitting a grapheme. Styling sequences
|
|
13
|
+
* are carried through and a reset is appended when any style was opened, so a
|
|
14
|
+
* truncated row cannot leak colour into the rest of the line.
|
|
15
|
+
*/
|
|
16
|
+
export declare function truncateToWidth(text: string, maxWidth: number): string;
|
|
17
|
+
/** Pads to an exact column count, truncating when the text is already wider. */
|
|
18
|
+
export declare function padToWidth(text: string, width: number): string;
|
|
19
|
+
/**
|
|
20
|
+
* A control that is present but cannot be used: the terminal own faint
|
|
21
|
+
* attribute over whatever colour it already carries, so it reads as half of what
|
|
22
|
+
* it would otherwise be in any theme.
|
|
23
|
+
*/
|
|
24
|
+
export declare function faint(text: string): string;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Display-width text handling. Terminals lay out by column, not by code unit,
|
|
3
|
+
* so measuring with `String.length` mis-sizes CJK, emoji, and combining marks,
|
|
4
|
+
* and counting styling escapes as visible width breaks every layout that uses
|
|
5
|
+
* colour.
|
|
6
|
+
*/
|
|
7
|
+
const ANSI_PATTERN = /\[[0-9;:?]*[ -/]*[@-~]|\][^]*(?:|\\)|[@-Z\\-_]/g;
|
|
8
|
+
const SEGMENTER = new Intl.Segmenter(undefined, { granularity: "grapheme" });
|
|
9
|
+
/** Removes styling sequences so only visible characters remain. */
|
|
10
|
+
export function stripAnsi(text) {
|
|
11
|
+
return text.replace(ANSI_PATTERN, "");
|
|
12
|
+
}
|
|
13
|
+
function codePointWidth(codePoint) {
|
|
14
|
+
// Zero-width: combining marks, joiners, variation selectors, and format characters.
|
|
15
|
+
if (codePoint === 0x200d || codePoint === 0xfeff)
|
|
16
|
+
return 0;
|
|
17
|
+
if (codePoint >= 0x0300 && codePoint <= 0x036f)
|
|
18
|
+
return 0;
|
|
19
|
+
if (codePoint >= 0x200b && codePoint <= 0x200f)
|
|
20
|
+
return 0;
|
|
21
|
+
if (codePoint >= 0xfe00 && codePoint <= 0xfe0f)
|
|
22
|
+
return 0;
|
|
23
|
+
if (codePoint >= 0x20d0 && codePoint <= 0x20f0)
|
|
24
|
+
return 0;
|
|
25
|
+
if (codePoint >= 0x1ab0 && codePoint <= 0x1aff)
|
|
26
|
+
return 0;
|
|
27
|
+
if (codePoint >= 0x1dc0 && codePoint <= 0x1dff)
|
|
28
|
+
return 0;
|
|
29
|
+
if (codePoint >= 0xe0100 && codePoint <= 0xe01ef)
|
|
30
|
+
return 0;
|
|
31
|
+
// Wide: CJK, Hangul, fullwidth forms, and the emoji planes terminals render double-width.
|
|
32
|
+
if (codePoint >= 0x1100 && codePoint <= 0x115f)
|
|
33
|
+
return 2;
|
|
34
|
+
if (codePoint >= 0x2e80 && codePoint <= 0xa4cf && codePoint !== 0x303f)
|
|
35
|
+
return 2;
|
|
36
|
+
if (codePoint >= 0xac00 && codePoint <= 0xd7a3)
|
|
37
|
+
return 2;
|
|
38
|
+
if (codePoint >= 0xf900 && codePoint <= 0xfaff)
|
|
39
|
+
return 2;
|
|
40
|
+
if (codePoint >= 0xfe30 && codePoint <= 0xfe6f)
|
|
41
|
+
return 2;
|
|
42
|
+
if (codePoint >= 0xff00 && codePoint <= 0xff60)
|
|
43
|
+
return 2;
|
|
44
|
+
if (codePoint >= 0xffe0 && codePoint <= 0xffe6)
|
|
45
|
+
return 2;
|
|
46
|
+
if (codePoint >= 0x1f300 && codePoint <= 0x1f64f)
|
|
47
|
+
return 2;
|
|
48
|
+
if (codePoint >= 0x1f900 && codePoint <= 0x1f9ff)
|
|
49
|
+
return 2;
|
|
50
|
+
if (codePoint >= 0x20000 && codePoint <= 0x3fffd)
|
|
51
|
+
return 2;
|
|
52
|
+
// Control characters occupy nothing.
|
|
53
|
+
if (codePoint < 0x20 || (codePoint >= 0x7f && codePoint < 0xa0))
|
|
54
|
+
return 0;
|
|
55
|
+
return 1;
|
|
56
|
+
}
|
|
57
|
+
/** Width of one grapheme cluster: the widest code point it contains, marks excluded. */
|
|
58
|
+
function graphemeWidth(grapheme) {
|
|
59
|
+
let width = 0;
|
|
60
|
+
for (const character of grapheme) {
|
|
61
|
+
width = Math.max(width, codePointWidth(character.codePointAt(0) ?? 0));
|
|
62
|
+
}
|
|
63
|
+
return width;
|
|
64
|
+
}
|
|
65
|
+
/** Columns this text occupies once styling is removed. */
|
|
66
|
+
export function displayWidth(text) {
|
|
67
|
+
let width = 0;
|
|
68
|
+
for (const { segment } of SEGMENTER.segment(stripAnsi(text)))
|
|
69
|
+
width += graphemeWidth(segment);
|
|
70
|
+
return width;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Truncates to a column budget without splitting a grapheme. Styling sequences
|
|
74
|
+
* are carried through and a reset is appended when any style was opened, so a
|
|
75
|
+
* truncated row cannot leak colour into the rest of the line.
|
|
76
|
+
*/
|
|
77
|
+
export function truncateToWidth(text, maxWidth) {
|
|
78
|
+
if (maxWidth <= 0)
|
|
79
|
+
return "";
|
|
80
|
+
if (displayWidth(text) <= maxWidth)
|
|
81
|
+
return text;
|
|
82
|
+
let out = "";
|
|
83
|
+
let width = 0;
|
|
84
|
+
let styled = false;
|
|
85
|
+
let index = 0;
|
|
86
|
+
while (index < text.length) {
|
|
87
|
+
ANSI_PATTERN.lastIndex = index;
|
|
88
|
+
const match = ANSI_PATTERN.exec(text);
|
|
89
|
+
if (match && match.index === index) {
|
|
90
|
+
out += match[0];
|
|
91
|
+
styled = true;
|
|
92
|
+
index += match[0].length;
|
|
93
|
+
continue;
|
|
94
|
+
}
|
|
95
|
+
const nextEscape = match ? match.index : text.length;
|
|
96
|
+
for (const { segment } of SEGMENTER.segment(text.slice(index, nextEscape))) {
|
|
97
|
+
const segmentWidth = graphemeWidth(segment);
|
|
98
|
+
if (width + segmentWidth > maxWidth)
|
|
99
|
+
return styled ? `${out}[0m` : out;
|
|
100
|
+
out += segment;
|
|
101
|
+
width += segmentWidth;
|
|
102
|
+
}
|
|
103
|
+
index = nextEscape;
|
|
104
|
+
}
|
|
105
|
+
return styled ? `${out}[0m` : out;
|
|
106
|
+
}
|
|
107
|
+
/** Pads to an exact column count, truncating when the text is already wider. */
|
|
108
|
+
export function padToWidth(text, width) {
|
|
109
|
+
if (width <= 0)
|
|
110
|
+
return "";
|
|
111
|
+
const current = displayWidth(text);
|
|
112
|
+
if (current > width)
|
|
113
|
+
return truncateToWidth(text, width);
|
|
114
|
+
return text + " ".repeat(width - current);
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* A control that is present but cannot be used: the terminal own faint
|
|
118
|
+
* attribute over whatever colour it already carries, so it reads as half of what
|
|
119
|
+
* it would otherwise be in any theme.
|
|
120
|
+
*/
|
|
121
|
+
export function faint(text) {
|
|
122
|
+
return `[2m${text}[22m`;
|
|
123
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Colour as a port, so a screen can be rendered and asserted without a terminal
|
|
3
|
+
* or a theme, and so the component layer never imports a Pi adapter.
|
|
4
|
+
*/
|
|
5
|
+
export type UiThemeToken = "accent" | "text" | "muted" | "dim" | "border" | "error";
|
|
6
|
+
export interface UiTheme {
|
|
7
|
+
fg(token: UiThemeToken, text: string): string;
|
|
8
|
+
bold(text: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* The terminal's own foreground, left unpainted. What a list's own text is:
|
|
11
|
+
* a theme built for a light background would otherwise write near-black rows
|
|
12
|
+
* into a dark terminal, which is how the engine leaves its lists too.
|
|
13
|
+
*/
|
|
14
|
+
plain(text: string): string;
|
|
15
|
+
/** Inverted styling for the active row of a floating surface. */
|
|
16
|
+
highlight(text: string): string;
|
|
17
|
+
/** A control that is present but cannot act: quieter than quiet text. */
|
|
18
|
+
disabled(text: string): string;
|
|
19
|
+
/** Background for a floating surface, so it reads as above the content. */
|
|
20
|
+
panel(text: string): string;
|
|
21
|
+
}
|
|
22
|
+
/** Renders every token as plain text. What tests assert against. */
|
|
23
|
+
export declare const PLAIN_THEME: UiTheme;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Colour as a port, so a screen can be rendered and asserted without a terminal
|
|
3
|
+
* or a theme, and so the component layer never imports a Pi adapter.
|
|
4
|
+
*/
|
|
5
|
+
/** Renders every token as plain text. What tests assert against. */
|
|
6
|
+
export const PLAIN_THEME = Object.freeze({
|
|
7
|
+
fg: (_token, text) => text,
|
|
8
|
+
bold: (text) => text,
|
|
9
|
+
plain: (text) => text,
|
|
10
|
+
highlight: (text) => text,
|
|
11
|
+
disabled: (text) => text,
|
|
12
|
+
panel: (text) => text,
|
|
13
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { UiTheme } from "./theme.js";
|
|
2
|
+
/**
|
|
3
|
+
* The menu a value opens: anchored to the row it was opened from, marking what
|
|
4
|
+
* is in effect, highlighting nothing until something is picked, and flipping
|
|
5
|
+
* above its anchor only when it would otherwise run off the bottom.
|
|
6
|
+
*/
|
|
7
|
+
export interface ValueMenuState {
|
|
8
|
+
/** Values offered, as they should read. */
|
|
9
|
+
readonly choices: readonly string[];
|
|
10
|
+
/** The value in effect, marked rather than highlighted. */
|
|
11
|
+
readonly current: string | null;
|
|
12
|
+
/** The entry picked by a key or the pointer, or -1 while none is. */
|
|
13
|
+
readonly index: number;
|
|
14
|
+
}
|
|
15
|
+
export interface ValueMenuAnchor {
|
|
16
|
+
/** Row the menu was opened from, which it keeps even as the selection moves. */
|
|
17
|
+
readonly screenRow: number;
|
|
18
|
+
/** Column the values start at. */
|
|
19
|
+
readonly valueColumn: number;
|
|
20
|
+
}
|
|
21
|
+
/** Where a menu sits on screen, for reading a pointer against it. */
|
|
22
|
+
export interface ValueMenuFrame {
|
|
23
|
+
readonly top: number;
|
|
24
|
+
readonly column: number;
|
|
25
|
+
readonly width: number;
|
|
26
|
+
readonly rows: number;
|
|
27
|
+
}
|
|
28
|
+
export interface ValueMenuLayout {
|
|
29
|
+
/** Rows available above the footer. */
|
|
30
|
+
readonly bodyHeight: number;
|
|
31
|
+
/** Full surface width, so the menu stays inside it. */
|
|
32
|
+
readonly surfaceWidth: number;
|
|
33
|
+
/** Columns reserved at the right edge, such as a scrollbar rail. */
|
|
34
|
+
readonly reservedRight: number;
|
|
35
|
+
}
|
|
36
|
+
/** Where the menu is placed: below its anchor where there is room, else above. */
|
|
37
|
+
export declare function valueMenuFrame(state: ValueMenuState, anchor: ValueMenuAnchor, layout: ValueMenuLayout): ValueMenuFrame;
|
|
38
|
+
/** Draws the menu over the rows behind it, leaving them otherwise untouched. */
|
|
39
|
+
export declare function renderValueMenu(lines: readonly string[], state: ValueMenuState, frame: ValueMenuFrame, theme: UiTheme): readonly string[];
|
|
40
|
+
/** Whether a pointer report lands inside the menu rather than behind it. */
|
|
41
|
+
export declare function menuRowAt(frame: ValueMenuFrame, row: number, column: number): number | null;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { overlaySpan } from "./spans.js";
|
|
2
|
+
import { displayWidth, padToWidth } from "./text.js";
|
|
3
|
+
/** Where the menu is placed: below its anchor where there is room, else above. */
|
|
4
|
+
export function valueMenuFrame(state, anchor, layout) {
|
|
5
|
+
const below = anchor.screenRow + 1;
|
|
6
|
+
const top = below + state.choices.length <= layout.bodyHeight
|
|
7
|
+
? below
|
|
8
|
+
: Math.max(0, anchor.screenRow - state.choices.length);
|
|
9
|
+
const width = Math.max(...state.choices.map(choice => displayWidth(choice) + 4), 6);
|
|
10
|
+
const column = Math.min(anchor.valueColumn, Math.max(0, layout.surfaceWidth - width - layout.reservedRight));
|
|
11
|
+
return { top, column, width, rows: state.choices.length };
|
|
12
|
+
}
|
|
13
|
+
/** Draws the menu over the rows behind it, leaving them otherwise untouched. */
|
|
14
|
+
export function renderValueMenu(lines, state, frame, theme) {
|
|
15
|
+
const output = [...lines];
|
|
16
|
+
state.choices.forEach((choice, index) => {
|
|
17
|
+
const target = frame.top + index;
|
|
18
|
+
if (target < 0 || target >= output.length)
|
|
19
|
+
return;
|
|
20
|
+
const mark = choice === state.current ? "✓ " : " ";
|
|
21
|
+
const text = padToWidth(`${mark}${choice} `, frame.width);
|
|
22
|
+
const painted = index === state.index ? theme.highlight(text) : theme.panel(text);
|
|
23
|
+
output[target] = overlaySpan(output[target] ?? "", frame.column, frame.column + frame.width, painted);
|
|
24
|
+
});
|
|
25
|
+
return output;
|
|
26
|
+
}
|
|
27
|
+
/** Whether a pointer report lands inside the menu rather than behind it. */
|
|
28
|
+
export function menuRowAt(frame, row, column) {
|
|
29
|
+
const at = row - frame.top;
|
|
30
|
+
if (at < 0 || at >= frame.rows)
|
|
31
|
+
return null;
|
|
32
|
+
return column > frame.column && column <= frame.column + frame.width ? at : null;
|
|
33
|
+
}
|
|
@@ -11,4 +11,3 @@ export declare function assertTerminalTopologySnapshot(topology: TerminalTopolog
|
|
|
11
11
|
export declare function assertNativeHostCommand(command: NativeHostCommand): void;
|
|
12
12
|
export declare function assertRecoveryAuthority(authority: AgentRecoveryAuthority): void;
|
|
13
13
|
export declare function assertTerminalSessionLaunch(session: TerminalSessionLaunch): void;
|
|
14
|
-
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
declare const ENVIRONMENT_KEYS: readonly ["certificationTarball", "configDir", "dataDir", "databasePath", "developmentInstanceId", "developmentRoot", "endpoint", "fixture", "fixtureInput", "fixtureToken", "inputAcknowledgement", "internalPackaging", "launchArgumentsJson", "launchProfile", "nativePi", "paneId", "piParityIntentionalMutation", "piPortRoot", "piSourceLedgerPath", "piSourceScanRoot", "probeTrace", "processGuardianPath", "profileHome", "protocolVersion", "releaseDigest", "releaseId", "releaseRoot", "releaseRunnerLabel", "runtimeDir", "structuredFlowLimits", "terminalArgumentsJson", "terminalExecutable", "terminalSessionId"];
|
|
2
|
+
declare const FILESYSTEM_KEYS: readonly ["slug", "windowsDirectory", "unixDirectory", "temporaryPrefix"];
|
|
3
|
+
declare const STATE_KEYS: readonly ["windowsControlDirectory", "unixControlDirectory", "developmentDirectory", "piAgentProfile", "piVanillaProfile", "piSandboxProfile"];
|
|
4
|
+
declare const ENDPOINT_KEYS: readonly ["windowsPipeStem", "unixSocketFilename", "metadataFilename", "supervisorLogFilename", "databaseFilename"];
|
|
5
|
+
declare const MANIFEST_KEYS: readonly ["releaseFilename", "packageFilename"];
|
|
6
|
+
declare const PROTOCOL_KEYS: readonly ["namespace", "controlEnvelope", "supervisorSchema", "nativeHostSchema", "structuredAgentSchema", "controlStoreSchema", "releaseCohortSchema", "updateJournalSchema"];
|
|
7
|
+
declare const EVIDENCE_KEYS: readonly ["nativeSpikeSchema", "terminalProvenanceSchema", "terminalProofSchema", "stableReleaseSchema", "previewReleaseSchema", "releaseCertificationSchema", "previewPlatformVerdictSchema", "piSourceLedgerSchema", "piComponentParitySchema", "piEventFrameParitySchema"];
|
|
8
|
+
declare const ARTIFACT_KEYS: readonly ["cliEntry", "supervisorEntry", "guardianEntry", "uiEntry", "nativeExecutable", "nativeCrate", "processGuardianExecutable", "releaseTarballStem", "diagnosticStem"];
|
|
9
|
+
type StringRecord<Keys extends readonly string[]> = {
|
|
10
|
+
readonly [Key in Keys[number]]: string;
|
|
11
|
+
};
|
|
12
|
+
export interface ProductIdentity {
|
|
13
|
+
readonly schema: string;
|
|
14
|
+
readonly displayName: string;
|
|
15
|
+
readonly commandName: string;
|
|
16
|
+
readonly packageName: string;
|
|
17
|
+
readonly filesystem: StringRecord<typeof FILESYSTEM_KEYS>;
|
|
18
|
+
readonly environment: StringRecord<typeof ENVIRONMENT_KEYS>;
|
|
19
|
+
readonly state: StringRecord<typeof STATE_KEYS>;
|
|
20
|
+
readonly endpoint: StringRecord<typeof ENDPOINT_KEYS>;
|
|
21
|
+
readonly manifest: StringRecord<typeof MANIFEST_KEYS>;
|
|
22
|
+
readonly protocol: StringRecord<typeof PROTOCOL_KEYS>;
|
|
23
|
+
readonly evidence: StringRecord<typeof EVIDENCE_KEYS>;
|
|
24
|
+
readonly artifacts: StringRecord<typeof ARTIFACT_KEYS>;
|
|
25
|
+
}
|
|
26
|
+
export declare function validateProductIdentity(value: unknown): ProductIdentity;
|
|
27
|
+
export interface ProductIdentityText {
|
|
28
|
+
readonly displayName: string;
|
|
29
|
+
readonly commandName: string;
|
|
30
|
+
readonly packageName: string;
|
|
31
|
+
readonly diagnostic: (message: string) => string;
|
|
32
|
+
readonly usage: (forms: readonly string[]) => string;
|
|
33
|
+
}
|
|
34
|
+
export declare function createProductIdentityText(identity: Pick<ProductIdentity, "displayName" | "commandName" | "packageName">): ProductIdentityText;
|
|
35
|
+
export declare const PRODUCT_IDENTITY: ProductIdentity;
|
|
36
|
+
export declare const PRODUCT_TEXT: ProductIdentityText;
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import rawIdentity from "./product-identity.json" with { type: "json" };
|
|
2
|
+
const ENVIRONMENT_KEYS = [
|
|
3
|
+
"certificationTarball",
|
|
4
|
+
"configDir",
|
|
5
|
+
"dataDir",
|
|
6
|
+
"databasePath",
|
|
7
|
+
"developmentInstanceId",
|
|
8
|
+
"developmentRoot",
|
|
9
|
+
"endpoint",
|
|
10
|
+
"fixture",
|
|
11
|
+
"fixtureInput",
|
|
12
|
+
"fixtureToken",
|
|
13
|
+
"inputAcknowledgement",
|
|
14
|
+
"internalPackaging",
|
|
15
|
+
"launchArgumentsJson",
|
|
16
|
+
"launchProfile",
|
|
17
|
+
"nativePi",
|
|
18
|
+
"paneId",
|
|
19
|
+
"piParityIntentionalMutation",
|
|
20
|
+
"piPortRoot",
|
|
21
|
+
"piSourceLedgerPath",
|
|
22
|
+
"piSourceScanRoot",
|
|
23
|
+
"probeTrace",
|
|
24
|
+
"processGuardianPath",
|
|
25
|
+
"profileHome",
|
|
26
|
+
"protocolVersion",
|
|
27
|
+
"releaseDigest",
|
|
28
|
+
"releaseId",
|
|
29
|
+
"releaseRoot",
|
|
30
|
+
"releaseRunnerLabel",
|
|
31
|
+
"runtimeDir",
|
|
32
|
+
"structuredFlowLimits",
|
|
33
|
+
"terminalArgumentsJson",
|
|
34
|
+
"terminalExecutable",
|
|
35
|
+
"terminalSessionId",
|
|
36
|
+
];
|
|
37
|
+
const FILESYSTEM_KEYS = ["slug", "windowsDirectory", "unixDirectory", "temporaryPrefix"];
|
|
38
|
+
const STATE_KEYS = ["windowsControlDirectory", "unixControlDirectory", "developmentDirectory", "piAgentProfile", "piVanillaProfile", "piSandboxProfile"];
|
|
39
|
+
const ENDPOINT_KEYS = ["windowsPipeStem", "unixSocketFilename", "metadataFilename", "supervisorLogFilename", "databaseFilename"];
|
|
40
|
+
const MANIFEST_KEYS = ["releaseFilename", "packageFilename"];
|
|
41
|
+
const PROTOCOL_KEYS = ["namespace", "controlEnvelope", "supervisorSchema", "nativeHostSchema", "structuredAgentSchema", "controlStoreSchema", "releaseCohortSchema", "updateJournalSchema"];
|
|
42
|
+
const EVIDENCE_KEYS = ["nativeSpikeSchema", "terminalProvenanceSchema", "terminalProofSchema", "stableReleaseSchema", "previewReleaseSchema", "releaseCertificationSchema", "previewPlatformVerdictSchema", "piSourceLedgerSchema", "piComponentParitySchema", "piEventFrameParitySchema"];
|
|
43
|
+
const ARTIFACT_KEYS = ["cliEntry", "supervisorEntry", "guardianEntry", "uiEntry", "nativeExecutable", "nativeCrate", "processGuardianExecutable", "releaseTarballStem", "diagnosticStem"];
|
|
44
|
+
const ROOT_KEYS = ["schema", "displayName", "commandName", "packageName", "filesystem", "environment", "state", "endpoint", "manifest", "protocol", "evidence", "artifacts"];
|
|
45
|
+
export function validateProductIdentity(value) {
|
|
46
|
+
const root = exactObject(value, ROOT_KEYS, "product identity");
|
|
47
|
+
const schema = stringValue(root.schema, "product identity schema");
|
|
48
|
+
const displayName = stringValue(root.displayName, "product display name");
|
|
49
|
+
const commandName = stringValue(root.commandName, "product command name");
|
|
50
|
+
const packageName = stringValue(root.packageName, "product package name");
|
|
51
|
+
const filesystem = stringObject(root.filesystem, FILESYSTEM_KEYS, "filesystem identity");
|
|
52
|
+
const environment = stringObject(root.environment, ENVIRONMENT_KEYS, "environment identity");
|
|
53
|
+
const state = stringObject(root.state, STATE_KEYS, "state identity");
|
|
54
|
+
const endpoint = stringObject(root.endpoint, ENDPOINT_KEYS, "endpoint identity");
|
|
55
|
+
const manifest = stringObject(root.manifest, MANIFEST_KEYS, "manifest identity");
|
|
56
|
+
const protocol = stringObject(root.protocol, PROTOCOL_KEYS, "protocol identity");
|
|
57
|
+
const evidence = stringObject(root.evidence, EVIDENCE_KEYS, "evidence identity");
|
|
58
|
+
const artifacts = stringObject(root.artifacts, ARTIFACT_KEYS, "artifact identity");
|
|
59
|
+
if (!/^[a-z][a-z0-9-]*$/.test(commandName))
|
|
60
|
+
throw new TypeError("product command name must be a lowercase command slug");
|
|
61
|
+
if (!/^@[a-z0-9-]+\/[a-z0-9-]+$/.test(packageName))
|
|
62
|
+
throw new TypeError("product package name must be a lowercase scoped npm package");
|
|
63
|
+
if (displayName.trim() !== displayName || displayName.length === 0)
|
|
64
|
+
throw new TypeError("product display name must be non-empty without surrounding whitespace");
|
|
65
|
+
if (schema !== `${commandName}-product-identity-v1`)
|
|
66
|
+
throw new TypeError("product identity schema must derive from the command name");
|
|
67
|
+
if (filesystem.slug !== commandName || filesystem.unixDirectory !== filesystem.slug || filesystem.windowsDirectory !== displayName) {
|
|
68
|
+
throw new TypeError("product filesystem identity must derive from display and command names");
|
|
69
|
+
}
|
|
70
|
+
if (filesystem.temporaryPrefix !== `${filesystem.slug}-`)
|
|
71
|
+
throw new TypeError("product temporary prefix must derive from the filesystem slug");
|
|
72
|
+
if (state.windowsControlDirectory !== filesystem.windowsDirectory || state.unixControlDirectory !== filesystem.unixDirectory) {
|
|
73
|
+
throw new TypeError("product state directories must match the filesystem identity");
|
|
74
|
+
}
|
|
75
|
+
if (endpoint.windowsPipeStem !== filesystem.slug)
|
|
76
|
+
throw new TypeError("product endpoint stem must match the filesystem slug");
|
|
77
|
+
if (protocol.namespace !== commandName)
|
|
78
|
+
throw new TypeError("product protocol namespace must match the command name");
|
|
79
|
+
if (artifacts.diagnosticStem !== filesystem.slug)
|
|
80
|
+
throw new TypeError("product diagnostic stem must match the filesystem slug");
|
|
81
|
+
const environmentPrefix = `${commandName.toUpperCase()}_`;
|
|
82
|
+
const environmentValues = Object.values(environment);
|
|
83
|
+
if (new Set(environmentValues).size !== environmentValues.length)
|
|
84
|
+
throw new TypeError("product environment keys must be unique");
|
|
85
|
+
for (const key of environmentValues) {
|
|
86
|
+
if (!key.startsWith(environmentPrefix) || !/^[A-Z][A-Z0-9_]+$/.test(key)) {
|
|
87
|
+
throw new TypeError(`product environment key must use ${environmentPrefix}: ${key}`);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
for (const [name, identifier] of Object.entries(protocol)) {
|
|
91
|
+
if (name !== "namespace" && !identifier.startsWith(`${protocol.namespace}-`)) {
|
|
92
|
+
throw new TypeError(`product protocol identifier must use ${protocol.namespace}: ${identifier}`);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
for (const identifier of Object.values(evidence)) {
|
|
96
|
+
if (!identifier.startsWith(`${protocol.namespace}-`))
|
|
97
|
+
throw new TypeError(`product evidence identifier must use ${protocol.namespace}: ${identifier}`);
|
|
98
|
+
}
|
|
99
|
+
return deepFreeze({
|
|
100
|
+
schema,
|
|
101
|
+
displayName,
|
|
102
|
+
commandName,
|
|
103
|
+
packageName,
|
|
104
|
+
filesystem,
|
|
105
|
+
environment,
|
|
106
|
+
state,
|
|
107
|
+
endpoint,
|
|
108
|
+
manifest,
|
|
109
|
+
protocol,
|
|
110
|
+
evidence,
|
|
111
|
+
artifacts,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
export function createProductIdentityText(identity) {
|
|
115
|
+
return Object.freeze({
|
|
116
|
+
displayName: identity.displayName,
|
|
117
|
+
commandName: identity.commandName,
|
|
118
|
+
packageName: identity.packageName,
|
|
119
|
+
diagnostic: (message) => `${identity.displayName} ${message}`,
|
|
120
|
+
usage: (forms) => `Usage: ${forms.map(form => `${identity.commandName}${form ? ` ${form}` : ""}`).join(" | ")}`,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
export const PRODUCT_IDENTITY = validateProductIdentity(rawIdentity);
|
|
124
|
+
export const PRODUCT_TEXT = createProductIdentityText(PRODUCT_IDENTITY);
|
|
125
|
+
function exactObject(value, keys, name) {
|
|
126
|
+
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
127
|
+
throw new TypeError(`${name} must be an object`);
|
|
128
|
+
const actualKeys = Object.keys(value).sort();
|
|
129
|
+
const expectedKeys = [...keys].sort();
|
|
130
|
+
if (actualKeys.length !== expectedKeys.length || actualKeys.some((key, index) => key !== expectedKeys[index])) {
|
|
131
|
+
throw new TypeError(`${name} must contain exactly: ${expectedKeys.join(", ")}`);
|
|
132
|
+
}
|
|
133
|
+
return value;
|
|
134
|
+
}
|
|
135
|
+
function stringObject(value, keys, name) {
|
|
136
|
+
const object = exactObject(value, keys, name);
|
|
137
|
+
return Object.fromEntries(keys.map((key) => [key, stringValue(object[key], `${name}.${key}`)]));
|
|
138
|
+
}
|
|
139
|
+
function stringValue(value, name) {
|
|
140
|
+
if (typeof value !== "string" || value.length === 0)
|
|
141
|
+
throw new TypeError(`${name} must be a non-empty string`);
|
|
142
|
+
return value;
|
|
143
|
+
}
|
|
144
|
+
function deepFreeze(value) {
|
|
145
|
+
if (typeof value !== "object" || value === null || Object.isFrozen(value))
|
|
146
|
+
return value;
|
|
147
|
+
for (const child of Object.values(value))
|
|
148
|
+
deepFreeze(child);
|
|
149
|
+
return Object.freeze(value);
|
|
150
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "a1-product-identity-v1",
|
|
3
|
+
"displayName": "A1",
|
|
4
|
+
"commandName": "a1",
|
|
5
|
+
"packageName": "@timurproko/a1",
|
|
6
|
+
"filesystem": {
|
|
7
|
+
"slug": "a1",
|
|
8
|
+
"windowsDirectory": "A1",
|
|
9
|
+
"unixDirectory": "a1",
|
|
10
|
+
"temporaryPrefix": "a1-"
|
|
11
|
+
},
|
|
12
|
+
"environment": {
|
|
13
|
+
"certificationTarball": "A1_CERTIFICATION_TARBALL",
|
|
14
|
+
"configDir": "A1_CONFIG_DIR",
|
|
15
|
+
"dataDir": "A1_DATA_DIR",
|
|
16
|
+
"databasePath": "A1_DATABASE_PATH",
|
|
17
|
+
"developmentInstanceId": "A1_DEV_INSTANCE_ID",
|
|
18
|
+
"developmentRoot": "A1_DEV_ROOT",
|
|
19
|
+
"endpoint": "A1_ENDPOINT",
|
|
20
|
+
"fixture": "A1_FIXTURE",
|
|
21
|
+
"fixtureInput": "A1_FIXTURE_INPUT",
|
|
22
|
+
"fixtureToken": "A1_FIXTURE_TOKEN",
|
|
23
|
+
"inputAcknowledgement": "A1_INPUT_ACK",
|
|
24
|
+
"internalPackaging": "A1_INTERNAL_PACKAGING",
|
|
25
|
+
"launchArgumentsJson": "A1_LAUNCH_ARGUMENTS_JSON",
|
|
26
|
+
"launchProfile": "A1_LAUNCH_PROFILE",
|
|
27
|
+
"nativePi": "A1_NATIVE_PI",
|
|
28
|
+
"paneId": "A1_PANE_ID",
|
|
29
|
+
"piParityIntentionalMutation": "A1_PI_PARITY_INTENTIONAL_MUTATION",
|
|
30
|
+
"piPortRoot": "A1_PI_PORT_ROOT",
|
|
31
|
+
"piSourceLedgerPath": "A1_PI_SOURCE_LEDGER_PATH",
|
|
32
|
+
"piSourceScanRoot": "A1_PI_SOURCE_SCAN_ROOT",
|
|
33
|
+
"probeTrace": "A1_PROBE_TRACE",
|
|
34
|
+
"processGuardianPath": "A1_PROCESS_GUARDIAN_PATH",
|
|
35
|
+
"profileHome": "A1_PROFILE_HOME",
|
|
36
|
+
"protocolVersion": "A1_PROTOCOL_VERSION",
|
|
37
|
+
"releaseDigest": "A1_RELEASE_DIGEST",
|
|
38
|
+
"releaseId": "A1_RELEASE_ID",
|
|
39
|
+
"releaseRoot": "A1_RELEASE_ROOT",
|
|
40
|
+
"releaseRunnerLabel": "A1_RELEASE_RUNNER_LABEL",
|
|
41
|
+
"runtimeDir": "A1_RUNTIME_DIR",
|
|
42
|
+
"structuredFlowLimits": "A1_STRUCTURED_FLOW_LIMITS",
|
|
43
|
+
"terminalArgumentsJson": "A1_TERMINAL_ARGUMENTS_JSON",
|
|
44
|
+
"terminalExecutable": "A1_TERMINAL_EXECUTABLE",
|
|
45
|
+
"terminalSessionId": "A1_TERMINAL_SESSION_ID"
|
|
46
|
+
},
|
|
47
|
+
"state": {
|
|
48
|
+
"windowsControlDirectory": "A1",
|
|
49
|
+
"unixControlDirectory": "a1",
|
|
50
|
+
"developmentDirectory": "a1-development",
|
|
51
|
+
"piAgentProfile": ".a1/agent",
|
|
52
|
+
"piVanillaProfile": ".pi/agent",
|
|
53
|
+
"piSandboxProfile": ".a1/sandbox"
|
|
54
|
+
},
|
|
55
|
+
"endpoint": {
|
|
56
|
+
"windowsPipeStem": "a1",
|
|
57
|
+
"unixSocketFilename": "supervisor.sock",
|
|
58
|
+
"metadataFilename": "supervisor.json",
|
|
59
|
+
"supervisorLogFilename": "supervisor.log",
|
|
60
|
+
"databaseFilename": "control.sqlite3"
|
|
61
|
+
},
|
|
62
|
+
"manifest": {
|
|
63
|
+
"releaseFilename": ".a1-release.json",
|
|
64
|
+
"packageFilename": "package.json"
|
|
65
|
+
},
|
|
66
|
+
"protocol": {
|
|
67
|
+
"namespace": "a1",
|
|
68
|
+
"controlEnvelope": "a1-control-envelope",
|
|
69
|
+
"supervisorSchema": "a1-supervisor-v1",
|
|
70
|
+
"nativeHostSchema": "a1-native-host-v1",
|
|
71
|
+
"structuredAgentSchema": "a1-structured-agent-v1",
|
|
72
|
+
"controlStoreSchema": "a1-control-store-v1",
|
|
73
|
+
"releaseCohortSchema": "a1-release-cohort-v1",
|
|
74
|
+
"updateJournalSchema": "a1-update-journal-v1"
|
|
75
|
+
},
|
|
76
|
+
"evidence": {
|
|
77
|
+
"nativeSpikeSchema": "a1-native-host-spike-evidence-v1",
|
|
78
|
+
"terminalProvenanceSchema": "a1-terminal-host-provenance-v1",
|
|
79
|
+
"terminalProofSchema": "a1-terminal-host-proof-v1",
|
|
80
|
+
"stableReleaseSchema": "a1-stable-release-v1",
|
|
81
|
+
"previewReleaseSchema": "a1-preview-release-v1",
|
|
82
|
+
"releaseCertificationSchema": "a1-release-certification-v1",
|
|
83
|
+
"previewPlatformVerdictSchema": "a1-development-preview-platform-verdict-v2",
|
|
84
|
+
"piSourceLedgerSchema": "a1-pinned-pi-source-port-ledger-v1",
|
|
85
|
+
"piComponentParitySchema": "a1-pi-static-component-parity-v1",
|
|
86
|
+
"piEventFrameParitySchema": "a1-pi-event-frame-parity-v1"
|
|
87
|
+
},
|
|
88
|
+
"artifacts": {
|
|
89
|
+
"cliEntry": "bin/cli.js",
|
|
90
|
+
"supervisorEntry": "bin/supervisor.js",
|
|
91
|
+
"guardianEntry": "bin/guardian.js",
|
|
92
|
+
"uiEntry": "bin/ui.js",
|
|
93
|
+
"nativeExecutable": "terminal-host",
|
|
94
|
+
"nativeCrate": "terminal-host",
|
|
95
|
+
"processGuardianExecutable": "process-guardian",
|
|
96
|
+
"releaseTarballStem": "timurproko-a1",
|
|
97
|
+
"diagnosticStem": "a1"
|
|
98
|
+
}
|
|
99
|
+
}
|