@timurproko/a1 0.1.8-dev.472 → 0.1.8-dev.508
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.js +4 -5
- package/bin/guardian.js +5 -1
- package/bin/module-identity.js +53 -98
- package/bin/module-resolver.js +138 -0
- package/bin/pinned-pi-public.js +25 -6
- package/bin/ui.js +7 -2
- package/bin/update-recovery.js +76 -7
- package/bin/warmup.js +3 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/clipboard-diagnostics.d.ts +1 -1
- package/dist/{integrations/pi/session-ui → app/session-shell}/clipboard-image.js +1 -1
- package/dist/app/session-shell/helper-pool.d.ts +33 -0
- package/dist/app/session-shell/helper-pool.js +98 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/image-preparation-client.d.ts +1 -1
- package/dist/{integrations/pi/session-ui → app/session-shell}/image-preparation-client.js +1 -1
- package/dist/{integrations/pi/session-ui → app/session-shell}/image-preparation.js +1 -1
- package/dist/{integrations/pi/session-ui → app/session-shell}/image-source.js +1 -1
- package/dist/{integrations/pi/session-ui → app/session-shell}/image-worker.js +1 -1
- package/dist/app/session-shell/index.d.ts +7 -0
- package/dist/app/session-shell/index.js +4 -0
- package/dist/app/session-shell/paste-executor.d.ts +18 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/paste-executor.js +50 -29
- package/dist/{integrations/pi/session-ui → app/session-shell}/paste-helper.js +1 -1
- package/dist/app/session-shell/paste-preparation-client.d.ts +31 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/paste-preparation-client.js +19 -8
- package/dist/{integrations/pi/session-ui → app/session-shell}/paste-protocol.d.ts +1 -1
- package/dist/{integrations/pi/session-ui → app/session-shell}/paste-protocol.js +1 -1
- package/dist/app/session-shell/paste-text-preparation.d.ts +6 -0
- package/dist/{integrations/pi/session-ui/paste-text-preparation.d.ts → app/session-shell/paste-types.d.ts} +1 -4
- package/dist/{integrations/pi/session-ui → app/session-shell}/path-chip-presentation.d.ts +1 -1
- package/dist/{integrations/pi/session-ui → app/session-shell}/prompt-chips.d.ts +5 -1
- package/dist/{integrations/pi/session-ui → app/session-shell}/prompt-chips.js +6 -2
- package/dist/{integrations/pi/session-ui → app/session-shell}/prompt-history-controller.d.ts +2 -2
- package/dist/{integrations/pi/session-ui → app/session-shell}/prompt-history-controller.js +2 -2
- package/dist/{integrations/pi/session-ui → app/session-shell}/prompt-suggestion-controller.d.ts +1 -1
- package/dist/{integrations/pi/session-ui → app/session-shell}/prompt-suggestion-controller.js +2 -2
- package/dist/{integrations/pi/session-ui → app/session-shell}/quit-outro.js +1 -1
- package/dist/{integrations/pi/session-ui → app/session-shell}/response-copy-coordinator.d.ts +1 -1
- package/dist/{integrations/pi/session-ui → app/session-shell}/response-copy-coordinator.js +3 -5
- package/dist/{integrations/pi/session-ui → app/session-shell}/response-copy-helper.js +1 -1
- package/dist/{integrations/pi/session-ui → app/session-shell}/response-copy-protocol.d.ts +1 -1
- package/dist/{integrations/pi/session-ui → app/session-shell}/response-copy-transport.d.ts +10 -2
- package/dist/{integrations/pi/session-ui → app/session-shell}/response-copy-transport.js +45 -19
- package/dist/{integrations/pi/session-ui → app/session-shell}/session-shell-root.d.ts +75 -53
- package/dist/{integrations/pi/session-ui → app/session-shell}/session-shell-root.js +30 -20
- package/dist/{integrations/pi/session-ui → app/session-shell}/session-shell.d.ts +9 -8
- package/dist/{integrations/pi/session-ui → app/session-shell}/session-shell.js +108 -67
- package/dist/{integrations/pi/session-ui → app/session-shell}/session-viewport-controller.d.ts +5 -5
- package/dist/{integrations/pi/session-ui → app/session-shell}/session-viewport-controller.js +5 -5
- package/dist/{integrations/pi/session-ui → app/session-shell}/system-clipboard.d.ts +1 -1
- package/dist/{integrations/pi/session-ui → app/session-shell}/system-clipboard.js +1 -1
- package/dist/cli/index.d.ts +8 -5
- package/dist/cli/index.js +4 -5
- package/dist/composition/index.d.ts +0 -1
- package/dist/composition/index.js +0 -1
- package/dist/composition/owned-ui.d.ts +2 -2
- package/dist/composition/owned-ui.js +35 -36
- package/dist/composition/settings-route-host.d.ts +2 -2
- package/dist/contracts/agent-engine/domain.d.ts +6 -1
- package/dist/contracts/agent-engine/index.d.ts +11 -8
- package/dist/contracts/agent-engine/index.js +6 -8
- package/dist/contracts/owned-ui/extension-ui.d.ts +8 -0
- package/dist/contracts/owned-ui/index.d.ts +12 -8
- package/dist/contracts/owned-ui/index.js +8 -8
- package/dist/features/launch/index.d.ts +12 -6
- package/dist/features/launch/index.js +6 -6
- package/dist/features/launch/intent.d.ts +5 -5
- package/dist/features/launch/intent.js +2 -2
- package/dist/features/owned-ui/index.d.ts +6 -6
- package/dist/features/owned-ui/index.js +4 -6
- package/dist/features/owned-ui/run.d.ts +2 -2
- package/dist/features/owned-ui/settings-app.d.ts +2 -2
- package/dist/features/owned-ui/settings-app.js +18 -5
- package/dist/features/prompt-history/service.d.ts +1 -1
- package/dist/features/prompt-history/service.js +1 -1
- package/dist/features/prompt-history/store.js +3 -7
- package/dist/features/prompt-suggestions/diagnostics.js +1 -1
- package/dist/features/prompt-suggestions/index.d.ts +2 -1
- package/dist/features/prompt-suggestions/index.js +1 -1
- package/dist/foundation/launch-guardian/index.d.ts +2 -1
- package/dist/foundation/launch-guardian/index.js +1 -1
- package/dist/foundation/lifecycle/index.d.ts +11 -6
- package/dist/foundation/lifecycle/index.js +5 -6
- package/dist/foundation/process-containment/index.d.ts +8 -6
- package/dist/foundation/process-containment/index.js +6 -6
- package/dist/foundation/process-containment/native-guardian-containment.js +3 -3
- package/dist/foundation/protocol/index.d.ts +3 -2
- package/dist/foundation/protocol/index.js +2 -2
- package/dist/foundation/release/bootstrap.d.ts +0 -4
- package/dist/foundation/release/bootstrap.js +1 -82
- package/dist/foundation/release/dependency-layer.d.ts +2 -5
- package/dist/foundation/release/endpoints.d.ts +4 -0
- package/dist/foundation/release/endpoints.js +86 -2
- package/dist/foundation/release/index.d.ts +30 -16
- package/dist/foundation/release/index.js +16 -16
- package/dist/foundation/release/release.d.ts +1 -1
- package/dist/foundation/release/types.d.ts +11 -0
- package/dist/foundation/release/types.js +1 -0
- package/dist/foundation/release/update-transaction.d.ts +1 -1
- package/dist/foundation/release/update.d.ts +2 -1
- package/dist/foundation/release/update.js +3 -18
- package/dist/foundation/startup/index.d.ts +4 -2
- package/dist/foundation/startup/index.js +2 -2
- package/dist/foundation/startup/startup-descriptor.js +2 -2
- package/dist/foundation/storage/control-store.d.ts +1 -45
- package/dist/foundation/storage/control-store.js +54 -277
- package/dist/foundation/storage/index.d.ts +1 -1
- package/dist/foundation/storage/index.js +1 -1
- package/dist/foundation/supervision/index.d.ts +2 -2
- package/dist/foundation/supervision/index.js +2 -2
- package/dist/foundation/supervision/server.d.ts +5 -10
- package/dist/foundation/supervision/server.js +7 -7
- package/dist/foundation/terminal-cleanup/index.d.ts +3 -2
- package/dist/foundation/terminal-cleanup/index.js +2 -2
- package/dist/integrations/pi/components/editor-interaction.d.ts +1 -1
- package/dist/integrations/pi/components/history-editor-loader.d.ts +1 -1
- package/dist/integrations/pi/components/index.d.ts +20 -13
- package/dist/integrations/pi/components/index.js +12 -13
- package/dist/integrations/pi/components/owned-editor-ux.js +5 -8
- package/dist/integrations/pi/components/resources/builtin-themes.d.ts +7 -5
- package/dist/integrations/pi/components/resources/builtin-themes.js +7 -5
- package/dist/integrations/pi/components/shell-editor-autocomplete.js +1 -1
- package/dist/integrations/pi/components/shell-extension-ui.js +2 -1
- package/dist/integrations/pi/components/shell-footer-status.js +1 -1
- package/dist/integrations/pi/components/shell-presenters-info.d.ts +1 -1
- package/dist/integrations/pi/components/shell-presenters-info.js +1 -1
- package/dist/integrations/pi/components/shell-presenters-transcript.js +1 -1
- package/dist/integrations/pi/components/shell-selectors-dialogs.d.ts +9 -3
- package/dist/integrations/pi/components/shell-selectors-dialogs.js +9 -6
- package/dist/integrations/pi/components/shell-shared-facade.d.ts +3 -1
- package/dist/integrations/pi/components/shell-shared-facade.js +4 -2
- package/dist/integrations/pi/components/submitted-prompt-adapter.d.ts +1 -1
- package/dist/integrations/pi/components/submitted-prompt-adapter.js +1 -1
- package/dist/integrations/pi/components/tool-image-presentation.d.ts +1 -1
- package/dist/integrations/pi/components/tool-image-presentation.js +4 -7
- package/dist/integrations/pi/components/upstream/adjacent/core/keybindings.d.ts +36 -22
- package/dist/integrations/pi/components/upstream/adjacent/core/keybindings.js +43 -7
- package/dist/integrations/pi/components/upstream/assets/earendil-image.json +2 -2
- package/dist/integrations/pi/components/upstream/components/countdown-timer.d.ts +6 -3
- package/dist/integrations/pi/components/upstream/components/daxnuts.d.ts +8 -1
- package/dist/integrations/pi/components/upstream/components/daxnuts.js +7 -3
- package/dist/integrations/pi/components/upstream/components/earendil-announcement.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/earendil-announcement.js +10 -4
- package/dist/integrations/pi/components/upstream/components/extension-editor.d.ts +7 -4
- package/dist/integrations/pi/components/upstream/components/extension-editor.js +7 -4
- package/dist/integrations/pi/components/upstream/components/mermaid.js +8 -4
- package/dist/integrations/pi/components/upstream/components/owned-editor.d.ts +9 -5
- package/dist/integrations/pi/components/upstream/components/owned-editor.js +10 -6
- package/dist/integrations/pi/components/upstream/components/scoped-models-selector.d.ts +8 -4
- package/dist/integrations/pi/components/upstream/components/scoped-models-selector.js +27 -25
- package/dist/integrations/pi/components/upstream/components/session-footer.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/session-footer.js +8 -10
- package/dist/integrations/pi/components/upstream/components/session-selector-search.js +6 -4
- package/dist/integrations/pi/components/upstream/components/session-selector.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/session-selector.js +8 -4
- package/dist/integrations/pi/components/upstream/components/skill-invocation-message.d.ts +7 -5
- package/dist/integrations/pi/components/upstream/components/skill-invocation-message.js +8 -6
- package/dist/integrations/pi/components/upstream/components/status-indicator.d.ts +9 -4
- package/dist/integrations/pi/components/upstream/components/status-indicator.js +15 -5
- package/dist/integrations/pi/components/upstream/components/tool-execution.d.ts +8 -2
- package/dist/integrations/pi/components/upstream/components/tool-execution.js +58 -37
- package/dist/integrations/pi/components/upstream/components/tree-selector.d.ts +7 -4
- package/dist/integrations/pi/components/upstream/components/tree-selector.js +7 -4
- package/dist/integrations/pi/components/upstream/components/trust-selector.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/trust-selector.js +10 -5
- package/dist/integrations/pi/components/upstream/external-editor.js +8 -4
- package/dist/integrations/pi/components/upstream/history/editor-core.d.ts +13 -4
- package/dist/integrations/pi/components/upstream/history/editor-core.js +112 -30
- package/dist/integrations/pi/components/upstream/history/kill-ring.d.ts +6 -3
- package/dist/integrations/pi/components/upstream/history/kill-ring.js +6 -3
- package/dist/integrations/pi/components/upstream/history/printable-key.js +7 -4
- package/dist/integrations/pi/components/upstream/history/text-helpers.js +6 -3
- package/dist/integrations/pi/components/upstream/history/undo-stack.d.ts +6 -3
- package/dist/integrations/pi/components/upstream/history/undo-stack.js +6 -3
- package/dist/integrations/pi/components/upstream/history/word-navigation.js +6 -3
- package/dist/integrations/pi/components/upstream/model-search.d.ts +5 -2
- package/dist/integrations/pi/components/upstream/theme/theme-controller.d.ts +8 -0
- package/dist/integrations/pi/components/upstream/theme/theme-controller.js +0 -3
- package/dist/integrations/pi/components/upstream/theme/theme.d.ts +2 -2
- package/dist/integrations/pi/components/upstream/theme/theme.js +17 -6
- package/dist/integrations/pi/engine/adapter.d.ts +39 -138
- package/dist/integrations/pi/engine/adapter.js +338 -3226
- package/dist/integrations/pi/engine/command-dispatch.d.ts +41 -0
- package/dist/integrations/pi/engine/command-dispatch.js +125 -0
- package/dist/integrations/pi/engine/event-delivery.d.ts +100 -0
- package/dist/integrations/pi/engine/event-delivery.js +184 -0
- package/dist/integrations/pi/engine/extension-ui-binding.d.ts +35 -0
- package/dist/integrations/pi/engine/extension-ui-binding.js +81 -0
- package/dist/integrations/pi/engine/index.d.ts +18 -14
- package/dist/integrations/pi/engine/index.js +10 -14
- package/dist/integrations/pi/engine/message-values.d.ts +29 -0
- package/dist/integrations/pi/engine/message-values.js +168 -0
- package/dist/integrations/pi/engine/pending-delivery.d.ts +2 -2
- package/dist/integrations/pi/engine/pending-delivery.js +2 -4
- package/dist/integrations/pi/engine/pi-settings-metadata.json +382 -371
- package/dist/integrations/pi/engine/prompt-suggestions.d.ts +30 -0
- package/dist/integrations/pi/engine/prompt-suggestions.js +102 -0
- package/dist/integrations/pi/engine/provider-authentication.d.ts +34 -0
- package/dist/integrations/pi/engine/provider-authentication.js +209 -0
- package/dist/integrations/pi/engine/resource-catalog.d.ts +49 -0
- package/dist/integrations/pi/engine/resource-catalog.js +289 -0
- package/dist/integrations/pi/engine/resources/changelog.json +4 -4
- package/dist/integrations/pi/engine/session-events.d.ts +48 -0
- package/dist/integrations/pi/engine/session-events.js +223 -0
- package/dist/integrations/pi/engine/session-integration.js +2 -4
- package/dist/integrations/pi/engine/session-runtime.d.ts +84 -0
- package/dist/integrations/pi/engine/session-runtime.js +249 -0
- package/dist/integrations/pi/engine/{settings-effects.d.ts → settings-bridge.d.ts} +57 -2
- package/dist/integrations/pi/engine/settings-bridge.js +514 -0
- package/dist/integrations/pi/engine/settings-metadata.d.ts +31 -0
- package/dist/integrations/pi/engine/settings-metadata.js +67 -0
- package/dist/integrations/pi/engine/settings-port.d.ts +42 -0
- package/dist/integrations/pi/engine/settings-port.js +353 -0
- package/dist/integrations/pi/engine/transcript-projection.d.ts +39 -0
- package/dist/integrations/pi/engine/transcript-projection.js +405 -0
- package/dist/integrations/pi/engine/usage-view.d.ts +4 -0
- package/dist/integrations/pi/engine/usage-view.js +56 -0
- package/dist/integrations/pi/engine/workflow-contexts.d.ts +59 -0
- package/dist/integrations/pi/engine/workflow-contexts.js +316 -0
- package/dist/integrations/pi/engine/workflow-runner.d.ts +60 -0
- package/dist/integrations/pi/engine/workflow-runner.js +509 -0
- package/dist/integrations/pi/engine/workflow-support.d.ts +33 -0
- package/dist/integrations/pi/engine/workflow-support.js +352 -0
- package/dist/integrations/pi/engine/workflows.d.ts +63 -2
- package/dist/integrations/pi/engine/workflows.js +5 -2
- package/dist/integrations/pi/startup-public.js +576 -554
- package/dist/integrations/pi/startup-public.manifest.json +1730 -984
- package/dist/integrations/pi/tui-runtime/adapter.js +10 -13
- package/dist/integrations/pi/tui-runtime/contracts.d.ts +11 -1
- package/dist/integrations/pi/tui-runtime/damage-aware-terminal.d.ts +1 -1
- package/dist/integrations/pi/tui-runtime/damage-aware-terminal.js +4 -7
- package/dist/integrations/pi/tui-runtime/index.d.ts +8 -6
- package/dist/integrations/pi/tui-runtime/index.js +4 -6
- package/dist/integrations/pi/tui-runtime/mouse-report-input.js +2 -4
- package/dist/integrations/pi/tui-runtime/overlay-geometry.d.ts +2 -2
- package/dist/integrations/pi/tui-runtime/overlay-geometry.js +4 -5
- package/dist/integrations/pi/tui-runtime/presentation-adapter.js +1 -1
- package/dist/native/darwin-arm64/manifest.json +1 -1
- package/dist/native/linux-x64/manifest.json +1 -1
- package/dist/native/win32-x64/manifest.json +2 -2
- package/dist/native/win32-x64/process-guardian.exe +0 -0
- package/dist/runtime-payload-inventory.json +51320 -46509
- package/dist/ui/apps/index.d.ts +5 -3
- package/dist/ui/apps/index.js +3 -3
- package/dist/ui/components/index.d.ts +47 -25
- package/dist/ui/components/index.js +25 -25
- package/dist/ui/components/prompt-input.js +1 -4
- package/dist/ui/settings/declarations.d.ts +119 -0
- package/dist/ui/settings/declarations.js +20 -11
- package/dist/ui/settings/index.d.ts +10 -6
- package/dist/ui/settings/index.js +5 -6
- package/dist/ui/settings/manager.d.ts +54 -0
- package/dist/ui/settings/{session.js → manager.js} +101 -9
- package/dist/ui/settings/sections.d.ts +2 -7
- package/docs/architecture/boundaries.md +4 -4
- package/docs/architecture/history-editor-provenance.md +1 -1
- package/docs/architecture/project-structure.md +6 -6
- package/docs/architecture/prompt-suggestions.md +1 -1
- package/docs/architecture/terminal-host-proof-gate.md +1 -1
- package/docs/architecture/terminal-host-spike-evidence.md +1 -1
- package/docs/architecture/toolchain.md +8 -0
- package/docs/architecture/ui-reference-provenance.md +4 -4
- package/docs/ci-release-runbook.md +7 -1
- package/docs/features/modal-content-interaction.md +2 -2
- package/docs/local-worktree-cleanup.md +4 -2
- package/docs/validation.md +6 -4
- package/package.json +7 -11
- package/bin/pi-tui.d.ts +0 -6
- package/bin/pi-tui.js +0 -28
- package/bin/sync-pi-tui-proxy.js +0 -97
- package/dist/cli/version.d.ts +0 -2
- package/dist/cli/version.js +0 -23
- package/dist/composition/agent-engine-bridge.d.ts +0 -3
- package/dist/composition/agent-engine-bridge.js +0 -108
- package/dist/composition/process.d.ts +0 -16
- package/dist/composition/process.js +0 -45
- package/dist/contracts/workspace/index.d.ts +0 -2
- package/dist/contracts/workspace/index.js +0 -2
- package/dist/contracts/workspace/model.d.ts +0 -248
- package/dist/contracts/workspace/model.js +0 -2
- package/dist/contracts/workspace/validation.d.ts +0 -13
- package/dist/contracts/workspace/validation.js +0 -335
- package/dist/features/owned-ui/customization.d.ts +0 -40
- package/dist/features/owned-ui/customization.js +0 -110
- package/dist/features/owned-ui/diagnostics.d.ts +0 -34
- package/dist/features/owned-ui/diagnostics.js +0 -95
- package/dist/features/workspace/capabilities.d.ts +0 -31
- package/dist/features/workspace/capabilities.js +0 -75
- package/dist/features/workspace/index.d.ts +0 -6
- package/dist/features/workspace/index.js +0 -6
- package/dist/features/workspace/presentation.d.ts +0 -30
- package/dist/features/workspace/presentation.js +0 -70
- package/dist/features/workspace/reconciliation.d.ts +0 -15
- package/dist/features/workspace/reconciliation.js +0 -82
- package/dist/features/workspace/reducer.d.ts +0 -43
- package/dist/features/workspace/reducer.js +0 -214
- package/dist/features/workspace/router.d.ts +0 -32
- package/dist/features/workspace/router.js +0 -125
- package/dist/features/workspace/store.d.ts +0 -18
- package/dist/features/workspace/store.js +0 -55
- package/dist/foundation/native-host-protocol/codec.d.ts +0 -13
- package/dist/foundation/native-host-protocol/codec.js +0 -58
- package/dist/foundation/native-host-protocol/evidence.d.ts +0 -67
- package/dist/foundation/native-host-protocol/evidence.js +0 -141
- package/dist/foundation/native-host-protocol/index.d.ts +0 -4
- package/dist/foundation/native-host-protocol/index.js +0 -4
- package/dist/foundation/native-host-protocol/messages.d.ts +0 -56
- package/dist/foundation/native-host-protocol/messages.js +0 -149
- package/dist/foundation/native-host-protocol/proof-gate.d.ts +0 -13
- package/dist/foundation/native-host-protocol/proof-gate.js +0 -33
- package/dist/foundation/structured-agent-runtime/backpressure.d.ts +0 -47
- package/dist/foundation/structured-agent-runtime/backpressure.js +0 -119
- package/dist/foundation/structured-agent-runtime/commands.d.ts +0 -53
- package/dist/foundation/structured-agent-runtime/commands.js +0 -165
- package/dist/foundation/structured-agent-runtime/handshake.d.ts +0 -41
- package/dist/foundation/structured-agent-runtime/handshake.js +0 -151
- package/dist/foundation/structured-agent-runtime/index.d.ts +0 -5
- package/dist/foundation/structured-agent-runtime/index.js +0 -5
- package/dist/foundation/structured-agent-runtime/reconnection.d.ts +0 -38
- package/dist/foundation/structured-agent-runtime/reconnection.js +0 -130
- package/dist/foundation/structured-agent-runtime/state.d.ts +0 -57
- package/dist/foundation/structured-agent-runtime/state.js +0 -119
- package/dist/integrations/pi/components/upstream/components/custom-entry.d.ts +0 -17
- package/dist/integrations/pi/components/upstream/components/custom-entry.js +0 -51
- package/dist/integrations/pi/components/upstream/components/first-time-setup.d.ts +0 -24
- package/dist/integrations/pi/components/upstream/components/first-time-setup.js +0 -105
- package/dist/integrations/pi/components/upstream/components/markdown-transform.d.ts +0 -2
- package/dist/integrations/pi/components/upstream/components/markdown-transform.js +0 -18
- package/dist/integrations/pi/engine/model-auth-integration.d.ts +0 -31
- package/dist/integrations/pi/engine/model-auth-integration.js +0 -62
- package/dist/integrations/pi/engine/resource-extension-integration.d.ts +0 -32
- package/dist/integrations/pi/engine/resource-extension-integration.js +0 -81
- package/dist/integrations/pi/engine/settings-effects.js +0 -249
- package/dist/integrations/pi/engine/settings-integration.d.ts +0 -43
- package/dist/integrations/pi/engine/settings-integration.js +0 -227
- package/dist/integrations/pi/engine/workflow-controllers.d.ts +0 -21
- package/dist/integrations/pi/engine/workflow-controllers.js +0 -49
- package/dist/integrations/pi/session-ui/index.d.ts +0 -5
- package/dist/integrations/pi/session-ui/index.js +0 -5
- package/dist/integrations/pi/session-ui/paste-executor.d.ts +0 -10
- package/dist/integrations/pi/session-ui/paste-preparation-client.d.ts +0 -16
- package/dist/integrations/pi/session-ui/route-host.d.ts +0 -5
- package/dist/integrations/pi/tui-runtime/conformance.d.ts +0 -18
- package/dist/integrations/pi/tui-runtime/conformance.js +0 -145
- package/dist/ui/components/prompt-row.d.ts +0 -14
- package/dist/ui/components/prompt-row.js +0 -20
- package/dist/ui/settings/session.d.ts +0 -36
- package/dist/ui/settings/store.d.ts +0 -29
- package/dist/ui/settings/store.js +0 -91
- package/dist/{integrations/pi/session-ui → app/session-shell}/clipboard-diagnostics.js +2 -2
- package/dist/{integrations/pi/session-ui → app/session-shell}/clipboard-image.d.ts +0 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/editor-hyperlink-budget.d.ts +0 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/editor-hyperlink-budget.js +0 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/image-preparation.d.ts +0 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/image-source.d.ts +0 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/image-worker.d.ts +0 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/paste-helper.d.ts +0 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/paste-text-preparation.js +0 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/paste-text-worker.d.ts +0 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/paste-text-worker.js +0 -0
- package/dist/{integrations/pi/session-ui/response-copy-helper.d.ts → app/session-shell/paste-types.js} +0 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/path-chip-presentation.js +0 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/quit-outro-effects.d.ts +0 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/quit-outro-effects.js +0 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/quit-outro.d.ts +0 -0
- package/dist/{integrations/pi/session-ui/route-host.js → app/session-shell/response-copy-helper.d.ts} +0 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/response-copy-protocol.js +0 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/stream-presentation-coalescer.d.ts +0 -0
- package/dist/{integrations/pi/session-ui → app/session-shell}/stream-presentation-coalescer.js +3 -3
- /package/dist/{integrations/pi/session-ui → app/session-shell}/text-paste.d.ts +0 -0
- /package/dist/{integrations/pi/session-ui → app/session-shell}/text-paste.js +0 -0
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* packages/coding-agent/src/modes/interactive/components/extension-editor.ts
|
|
4
|
-
* Modifications:
|
|
2
|
+
* Provenance: @earendil-works/pi-coding-agent 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
|
|
3
|
+
* packages/coding-agent/src/modes/interactive/components/extension-editor.ts.
|
|
4
|
+
* Modifications: Mechanical port: remap pi-tui to the root public singleton, use owned
|
|
5
|
+
* keybindings/theme and external-editor seams, preserve editor layout, hints, focus, submission,
|
|
6
|
+
* cancellation, and external-editor lifecycle.
|
|
7
|
+
* Deviations: none.
|
|
5
8
|
*/
|
|
6
|
-
import { Container, Editor, Spacer, Text, } from "
|
|
9
|
+
import { Container, Editor, Spacer, Text, } from "@earendil-works/pi-tui";
|
|
7
10
|
import { DynamicBorder, getSelectListTheme } from "../../../startup-public.js";
|
|
8
11
|
import { editInExternalEditor } from "../external-editor.js";
|
|
9
12
|
import { piTheme } from "../../theme.js";
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Provenance: @earendil-works/pi-coding-agent 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
|
|
3
|
+
* packages/coding-agent/src/modes/interactive/components/mermaid.ts.
|
|
4
|
+
* Modifications: Mechanical pinned source port with private imports remapped to public package-root
|
|
5
|
+
* types/APIs and A1-owned theme boundaries; behavior remains acceptance-tested.
|
|
6
|
+
* Deviations: none.
|
|
7
|
+
*/
|
|
8
|
+
import { Marked } from "@earendil-works/pi-tui";
|
|
5
9
|
import { render } from "grok-mermaid";
|
|
6
10
|
const markdownParser = new Marked();
|
|
7
11
|
function isMermaid(token) {
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* packages/coding-agent/src/modes/interactive/components/custom-editor.ts
|
|
4
|
-
* Modifications: A1-owned class name
|
|
5
|
-
*
|
|
2
|
+
* Provenance: @earendil-works/pi-coding-agent 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
|
|
3
|
+
* packages/coding-agent/src/modes/interactive/components/custom-editor.ts.
|
|
4
|
+
* Modifications: A1-owned class name and synchronized A1 keybinding contract replace the nominal
|
|
5
|
+
* private upstream keybinding constructor dependency; bare A1 injects the shared Settings/agent input
|
|
6
|
+
* frame, transient contextual-suggestion branch, and explicit body geometry for selection and
|
|
7
|
+
* above-prompt autocomplete. Bare A1 also clears a sole top-level slash-command search on Escape.
|
|
8
|
+
* Deviations: owned-shared-input-frame, above-prompt-autocomplete-placement,
|
|
9
|
+
* clear-command-search-on-escape.
|
|
6
10
|
*/
|
|
7
|
-
import { type EditorOptions, type EditorTheme, type TUI } from "
|
|
11
|
+
import { type EditorOptions, type EditorTheme, type TUI } from "@earendil-works/pi-tui";
|
|
8
12
|
import type { AppKeybinding, KeybindingsManager } from "../adjacent/core/keybindings.js";
|
|
9
13
|
import type { EditorSurface } from "../../editor-interaction.js";
|
|
10
14
|
import type { PiShellPromptInputPresentation } from "../../prompt-input-port.js";
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* packages/coding-agent/src/modes/interactive/components/custom-editor.ts
|
|
4
|
-
* Modifications: A1-owned class name
|
|
5
|
-
*
|
|
2
|
+
* Provenance: @earendil-works/pi-coding-agent 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
|
|
3
|
+
* packages/coding-agent/src/modes/interactive/components/custom-editor.ts.
|
|
4
|
+
* Modifications: A1-owned class name and synchronized A1 keybinding contract replace the nominal
|
|
5
|
+
* private upstream keybinding constructor dependency; bare A1 injects the shared Settings/agent input
|
|
6
|
+
* frame, transient contextual-suggestion branch, and explicit body geometry for selection and
|
|
7
|
+
* above-prompt autocomplete. Bare A1 also clears a sole top-level slash-command search on Escape.
|
|
8
|
+
* Deviations: owned-shared-input-frame, above-prompt-autocomplete-placement,
|
|
9
|
+
* clear-command-search-on-escape.
|
|
6
10
|
*/
|
|
7
|
-
import { CURSOR_MARKER, Editor, visibleWidth, wrapTextWithAnsi, } from "
|
|
11
|
+
import { CURSOR_MARKER, Editor, visibleWidth, wrapTextWithAnsi, } from "@earendil-works/pi-tui";
|
|
8
12
|
const PROMPT_GRAPHEMES = new Intl.Segmenter(undefined, { granularity: "grapheme" });
|
|
9
13
|
export function createOwnedEditorClass(Base) {
|
|
10
14
|
return class extends Base {
|
|
11
|
-
keybindings;
|
|
12
15
|
actionHandlers = new Map();
|
|
13
16
|
onEscape;
|
|
14
17
|
onCtrlD;
|
|
@@ -23,6 +26,7 @@ export function createOwnedEditorClass(Base) {
|
|
|
23
26
|
#getVisualLineCount;
|
|
24
27
|
#clearCommandSearchOnEscape;
|
|
25
28
|
#renderedBodyRowCount = 0;
|
|
29
|
+
keybindings;
|
|
26
30
|
constructor(tui, theme, keybindings, options = {}) {
|
|
27
31
|
super(tui, theme, options);
|
|
28
32
|
this.keybindings = keybindings;
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* packages/coding-agent/src/modes/interactive/components/scoped-models-selector.ts
|
|
4
|
-
*
|
|
2
|
+
* Provenance: @earendil-works/pi-coding-agent 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
|
|
3
|
+
* packages/coding-agent/src/modes/interactive/components/scoped-models-selector.ts.
|
|
4
|
+
* Modifications: Source-synchronized scoped-model selector port: preserve session-only toggles,
|
|
5
|
+
* search, bulk/provider/reorder actions, dirty state, Ctrl+S persistence, refresh status,
|
|
6
|
+
* cancellation, and focus while remapping theme and public helper imports; local key labels preserve
|
|
7
|
+
* pinned platform formatting before layout without changing binding identities.
|
|
8
|
+
* Deviations: none.
|
|
5
9
|
*/
|
|
6
10
|
interface ScopedModel {
|
|
7
11
|
readonly provider: string;
|
|
8
12
|
readonly id: string;
|
|
9
13
|
readonly name?: string;
|
|
10
14
|
}
|
|
11
|
-
import { Container, type Focusable, Input } from "
|
|
15
|
+
import { Container, type Focusable, Input } from "@earendil-works/pi-tui";
|
|
12
16
|
export interface ModelsConfig {
|
|
13
17
|
allModels: ScopedModel[];
|
|
14
18
|
enabledModelIds: string[] | null;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import { Container, fuzzyFilter, getKeybindings, Input, Key, matchesKey, Spacer, Text, } from "
|
|
1
|
+
import { Container, fuzzyFilter, getKeybindings, Input, Key, matchesKey, Spacer, Text, } from "@earendil-works/pi-tui";
|
|
2
2
|
import { DynamicBorder } from "../../../startup-public.js";
|
|
3
3
|
import { getModelSearchText } from "../model-search.js";
|
|
4
4
|
import { piTheme } from "../theme/theme.js";
|
|
5
|
-
|
|
5
|
+
// Rationale: upstream's capitalized hint formatter is private to the package; the same mapping lives here.
|
|
6
|
+
function keyDisplayText(keybinding) {
|
|
6
7
|
return getKeybindings().getKeys(keybinding)
|
|
7
|
-
.map((key) => key.split("+").map((part) =>
|
|
8
|
+
.map((key) => key.split("+").map((part) => {
|
|
9
|
+
const display = process.platform === "darwin" && part.toLowerCase() === "alt" ? "option" : part;
|
|
10
|
+
return display.charAt(0).toUpperCase() + display.slice(1);
|
|
11
|
+
}).join("+"))
|
|
8
12
|
.join("/");
|
|
9
13
|
}
|
|
10
14
|
const theme = new Proxy({}, {
|
|
@@ -17,13 +21,17 @@ const theme = new Proxy({}, {
|
|
|
17
21
|
function isEnabled(enabledIds, id) {
|
|
18
22
|
return enabledIds === null || enabledIds.includes(id);
|
|
19
23
|
}
|
|
20
|
-
|
|
24
|
+
/** Collapse an explicit list back to null (= all enabled) when it covers every available model. */
|
|
25
|
+
function normalizeEnabled(result, allIds) {
|
|
26
|
+
return result.length === allIds.length && result.every((id) => allIds.includes(id)) ? null : result;
|
|
27
|
+
}
|
|
28
|
+
function toggle(enabledIds, allIds, id) {
|
|
21
29
|
if (enabledIds === null)
|
|
22
|
-
return
|
|
30
|
+
return allIds.filter((modelId) => modelId !== id);
|
|
23
31
|
const index = enabledIds.indexOf(id);
|
|
24
32
|
if (index >= 0)
|
|
25
33
|
return [...enabledIds.slice(0, index), ...enabledIds.slice(index + 1)];
|
|
26
|
-
return [...enabledIds, id];
|
|
34
|
+
return normalizeEnabled([...enabledIds, id], allIds);
|
|
27
35
|
}
|
|
28
36
|
function enableAll(enabledIds, allIds, targetIds) {
|
|
29
37
|
if (enabledIds === null)
|
|
@@ -34,7 +42,7 @@ function enableAll(enabledIds, allIds, targetIds) {
|
|
|
34
42
|
if (!result.includes(id))
|
|
35
43
|
result.push(id);
|
|
36
44
|
}
|
|
37
|
-
return result
|
|
45
|
+
return normalizeEnabled(result, allIds);
|
|
38
46
|
}
|
|
39
47
|
function clearAll(enabledIds, allIds, targetIds) {
|
|
40
48
|
if (enabledIds === null) {
|
|
@@ -105,7 +113,7 @@ export class ScopedModelsSelectorComponent extends Container {
|
|
|
105
113
|
this.addChild(new DynamicBorder());
|
|
106
114
|
this.addChild(new Spacer(1));
|
|
107
115
|
this.addChild(new Text(theme.fg("accent", theme.bold("Model Configuration")), 0, 0));
|
|
108
|
-
this.addChild(new Text(theme.fg("muted", `Session-only. ${
|
|
116
|
+
this.addChild(new Text(theme.fg("muted", `Session-only. ${keyDisplayText("app.models.save")} to save to settings.`), 0, 0));
|
|
109
117
|
this.addChild(new Spacer(1));
|
|
110
118
|
// Search input
|
|
111
119
|
this.searchInput = new Input();
|
|
@@ -161,12 +169,12 @@ export class ScopedModelsSelectorComponent extends Container {
|
|
|
161
169
|
? "all enabled"
|
|
162
170
|
: `${enabledCount}/${this.allIds.length} enabled${unavailableCount ? ` · ${unavailableCount} unavailable` : ""}`;
|
|
163
171
|
const parts = [
|
|
164
|
-
`${
|
|
165
|
-
`${
|
|
166
|
-
`${
|
|
167
|
-
`${
|
|
168
|
-
`${
|
|
169
|
-
`${
|
|
172
|
+
`${keyDisplayText("tui.select.confirm")} toggle`,
|
|
173
|
+
`${keyDisplayText("app.models.enableAll")} all`,
|
|
174
|
+
`${keyDisplayText("app.models.clearAll")} clear`,
|
|
175
|
+
`${keyDisplayText("app.models.toggleProvider")} provider`,
|
|
176
|
+
`${keyDisplayText("app.models.reorderUp")}/${keyDisplayText("app.models.reorderDown")} reorder`,
|
|
177
|
+
`${keyDisplayText("app.models.save")} save`,
|
|
170
178
|
countText,
|
|
171
179
|
];
|
|
172
180
|
return this.isDirty
|
|
@@ -200,22 +208,16 @@ export class ScopedModelsSelectorComponent extends Container {
|
|
|
200
208
|
}
|
|
201
209
|
const startIndex = Math.max(0, Math.min(this.selectedIndex - Math.floor(this.maxVisible / 2), this.filteredItems.length - this.maxVisible));
|
|
202
210
|
const endIndex = Math.min(startIndex + this.maxVisible, this.filteredItems.length);
|
|
203
|
-
const allEnabled = this.enabledIds === null;
|
|
204
211
|
for (let i = startIndex; i < endIndex; i++) {
|
|
205
212
|
const item = this.filteredItems[i];
|
|
206
213
|
const isSelected = i === this.selectedIndex;
|
|
207
214
|
const prefix = isSelected ? theme.fg("accent", "→ ") : " ";
|
|
208
215
|
const id = item.model?.id ?? item.fullId;
|
|
209
|
-
const
|
|
216
|
+
const styledId = item.model ? id : theme.strikethrough(id);
|
|
217
|
+
const modelText = isSelected ? theme.fg("accent", styledId) : styledId;
|
|
210
218
|
const providerBadge = theme.fg("muted", item.model ? ` [${item.model.provider}]` : " [unavailable]");
|
|
211
|
-
const status = item.model
|
|
212
|
-
|
|
213
|
-
? ""
|
|
214
|
-
: item.enabled
|
|
215
|
-
? theme.fg("success", " ✓")
|
|
216
|
-
: theme.fg("dim", " ✗")
|
|
217
|
-
: theme.fg("dim", " ✗");
|
|
218
|
-
this.listContainer.addChild(new Text(`${prefix}${modelText}${providerBadge}${status}`, 0, 0));
|
|
219
|
+
const status = item.model && item.enabled ? theme.fg("accent", "✓ ") : " ";
|
|
220
|
+
this.listContainer.addChild(new Text(`${prefix}${status}${modelText}${providerBadge}`, 0, 0));
|
|
219
221
|
}
|
|
220
222
|
// Add scroll indicator if needed
|
|
221
223
|
if (startIndex > 0 || endIndex < this.filteredItems.length) {
|
|
@@ -270,7 +272,7 @@ export class ScopedModelsSelectorComponent extends Container {
|
|
|
270
272
|
if (kb.matches(data, "tui.select.confirm")) {
|
|
271
273
|
const item = this.filteredItems[this.selectedIndex];
|
|
272
274
|
if (item) {
|
|
273
|
-
this.enabledIds = toggle(this.enabledIds, item.fullId);
|
|
275
|
+
this.enabledIds = toggle(this.enabledIds, this.allIds, item.fullId);
|
|
274
276
|
this.isDirty = true;
|
|
275
277
|
this.refresh();
|
|
276
278
|
this.notifyChange();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Component } from "
|
|
1
|
+
import { type Component } from "@earendil-works/pi-tui";
|
|
2
2
|
import type { OwnedUiSessionViewModel } from "../../../../../contracts/owned-ui/index.js";
|
|
3
3
|
export declare class SessionFooter implements Component {
|
|
4
4
|
private readonly getView;
|
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* packages/coding-agent/src/modes/interactive/components/footer.ts
|
|
4
|
-
* Modifications:
|
|
5
|
-
* bare
|
|
2
|
+
* Provenance: @earendil-works/pi-coding-agent 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
|
|
3
|
+
* packages/coding-agent/src/modes/interactive/components/footer.ts.
|
|
4
|
+
* Modifications: Consumes neutral owned-UI view data instead of a fabricated concrete AgentSession; an
|
|
5
|
+
* explicit bare-A1 profile colors the thinking-level name while preserving the remaining footer layout
|
|
6
|
+
* and formatting.
|
|
7
|
+
* Deviations: owned-status-level-color.
|
|
6
8
|
*/
|
|
7
9
|
import { isAbsolute, relative, resolve, sep } from "node:path";
|
|
8
|
-
import { truncateToWidth, visibleWidth } from "
|
|
10
|
+
import { truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
|
|
9
11
|
import { piTheme } from "../../theme.js";
|
|
10
12
|
export class SessionFooter {
|
|
11
13
|
getView;
|
|
12
14
|
cwd;
|
|
13
15
|
profile;
|
|
14
|
-
constructor(getView, cwd, profile = "pi") {
|
|
15
|
-
this.getView = getView;
|
|
16
|
-
this.cwd = cwd;
|
|
17
|
-
this.profile = profile;
|
|
18
|
-
}
|
|
16
|
+
constructor(getView, cwd, profile = "pi") { this.getView = getView; this.cwd = cwd; this.profile = profile; }
|
|
19
17
|
invalidate() { }
|
|
20
18
|
dispose() { }
|
|
21
19
|
render(width) {
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* packages/coding-agent/src/modes/interactive/components/session-selector-search.ts
|
|
4
|
-
*
|
|
2
|
+
* Provenance: @earendil-works/pi-coding-agent 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
|
|
3
|
+
* packages/coding-agent/src/modes/interactive/components/session-selector-search.ts.
|
|
4
|
+
* Modifications: Source-synchronized session search port with only the public SessionInfo type import
|
|
5
|
+
* remapped.
|
|
6
|
+
* Deviations: none.
|
|
5
7
|
*/
|
|
6
|
-
import { fuzzyMatch } from "
|
|
8
|
+
import { fuzzyMatch } from "@earendil-works/pi-tui";
|
|
7
9
|
function normalizeWhitespaceLower(text) {
|
|
8
10
|
return text.toLowerCase().replace(/\s+/g, " ").trim();
|
|
9
11
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Component, Container, type Focusable } from "
|
|
1
|
+
import { type Component, Container, type Focusable } from "@earendil-works/pi-tui";
|
|
2
2
|
import { KeybindingsManager } from "../adjacent/core/keybindings.js";
|
|
3
3
|
import { type SessionInfo } from "@earendil-works/pi-coding-agent";
|
|
4
4
|
type SessionListProgress = (loaded: number, total: number) => void;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* packages/coding-agent/src/modes/interactive/components/session-selector.ts
|
|
4
|
-
*
|
|
2
|
+
* Provenance: @earendil-works/pi-coding-agent 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
|
|
3
|
+
* packages/coding-agent/src/modes/interactive/components/session-selector.ts.
|
|
4
|
+
* Modifications: Source-synchronized session selector port: preserve threaded/current/all scope,
|
|
5
|
+
* search, sort, named/path filters, rename, delete confirmation, active-session protection, loading
|
|
6
|
+
* progress, cancellation, focus, and disposal while remapping public helpers, owned keybindings/theme,
|
|
7
|
+
* and canonical path handling.
|
|
8
|
+
* Deviations: none.
|
|
5
9
|
*/
|
|
6
10
|
import { spawnSync } from "node:child_process";
|
|
7
11
|
import { existsSync, realpathSync } from "node:fs";
|
|
8
12
|
import { unlink } from "node:fs/promises";
|
|
9
13
|
import * as os from "node:os";
|
|
10
|
-
import { Container, getKeybindings, Input, Spacer, Text, truncateToWidth, visibleWidth, } from "
|
|
14
|
+
import { Container, getKeybindings, Input, Spacer, Text, truncateToWidth, visibleWidth, } from "@earendil-works/pi-tui";
|
|
11
15
|
import { KeybindingsManager } from "../adjacent/core/keybindings.js";
|
|
12
16
|
import { DynamicBorder } from "../../../startup-public.js";
|
|
13
17
|
import { piTheme } from "../theme/theme.js";
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* packages/coding-agent/src/modes/interactive/components/skill-invocation-message.ts
|
|
4
|
-
*
|
|
5
|
-
*
|
|
2
|
+
* Provenance: @earendil-works/pi-coding-agent 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
|
|
3
|
+
* packages/coding-agent/src/modes/interactive/components/skill-invocation-message.ts.
|
|
4
|
+
* Modifications: Mechanical port uses A1's public pi-tui instance, owned theme boundary, and
|
|
5
|
+
* root-instance keybinding registry because the public coding-agent component closes over a second
|
|
6
|
+
* nested pi-tui singleton and cannot observe A1's keybindings.
|
|
7
|
+
* Deviations: none.
|
|
6
8
|
*/
|
|
7
|
-
import { Box, type MarkdownTheme } from "
|
|
9
|
+
import { Box, type MarkdownTheme } from "@earendil-works/pi-tui";
|
|
8
10
|
export interface SkillInvocationBlock {
|
|
9
11
|
readonly name: string;
|
|
10
12
|
readonly content: string;
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* packages/coding-agent/src/modes/interactive/components/skill-invocation-message.ts
|
|
4
|
-
*
|
|
5
|
-
*
|
|
2
|
+
* Provenance: @earendil-works/pi-coding-agent 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
|
|
3
|
+
* packages/coding-agent/src/modes/interactive/components/skill-invocation-message.ts.
|
|
4
|
+
* Modifications: Mechanical port uses A1's public pi-tui instance, owned theme boundary, and
|
|
5
|
+
* root-instance keybinding registry because the public coding-agent component closes over a second
|
|
6
|
+
* nested pi-tui singleton and cannot observe A1's keybindings.
|
|
7
|
+
* Deviations: none.
|
|
6
8
|
*/
|
|
7
|
-
import { Box, getKeybindings, Markdown, Text } from "
|
|
9
|
+
import { Box, getKeybindings, Markdown, Text } from "@earendil-works/pi-tui";
|
|
8
10
|
import { piTheme } from "../theme/theme.js";
|
|
9
11
|
export class SkillInvocationMessageComponent extends Box {
|
|
12
|
+
#expanded = false;
|
|
10
13
|
skillBlock;
|
|
11
14
|
markdownTheme;
|
|
12
|
-
#expanded = false;
|
|
13
15
|
constructor(skillBlock, markdownTheme) {
|
|
14
16
|
super(1, 1, text => piTheme().bg("customMessageBg", text));
|
|
15
17
|
this.skillBlock = skillBlock;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* packages/coding-agent/src/modes/interactive/components/status-indicator.ts
|
|
2
|
+
* Provenance: @earendil-works/pi-coding-agent 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
|
|
3
|
+
* packages/coding-agent/src/modes/interactive/components/status-indicator.ts.
|
|
4
|
+
* Modifications: Mechanical source port with public package-root keybinding, Loader, and owned
|
|
5
|
+
* theme/countdown imports plus ECMAScript private fields.
|
|
6
|
+
* Deviations: status-indicator-public-boundaries.
|
|
4
7
|
*/
|
|
5
|
-
import { type Component, Loader, type LoaderIndicatorOptions, type TUI } from "
|
|
8
|
+
import { type Component, Loader, type LoaderIndicatorOptions, type TUI } from "@earendil-works/pi-tui";
|
|
6
9
|
export type StatusIndicatorKind = "working" | "retry" | "compaction" | "branchSummary";
|
|
7
10
|
export declare class StatusIndicator extends Loader {
|
|
8
11
|
readonly kind: StatusIndicatorKind;
|
|
@@ -10,7 +13,9 @@ export declare class StatusIndicator extends Loader {
|
|
|
10
13
|
dispose(): void;
|
|
11
14
|
}
|
|
12
15
|
export declare class WorkingStatusIndicator extends StatusIndicator {
|
|
13
|
-
constructor(ui: TUI, message: string, indicator?: LoaderIndicatorOptions);
|
|
16
|
+
constructor(ui: TUI, message: string, indicator?: LoaderIndicatorOptions, colorFn?: (text: string) => string);
|
|
17
|
+
renderInBorder(width: number): string;
|
|
18
|
+
renderSpinnerInBorder(width: number): string;
|
|
14
19
|
}
|
|
15
20
|
export declare class RetryStatusIndicator extends StatusIndicator {
|
|
16
21
|
#private;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* packages/coding-agent/src/modes/interactive/components/status-indicator.ts
|
|
2
|
+
* Provenance: @earendil-works/pi-coding-agent 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
|
|
3
|
+
* packages/coding-agent/src/modes/interactive/components/status-indicator.ts.
|
|
4
|
+
* Modifications: Mechanical source port with public package-root keybinding, Loader, and owned
|
|
5
|
+
* theme/countdown imports plus ECMAScript private fields.
|
|
6
|
+
* Deviations: status-indicator-public-boundaries.
|
|
4
7
|
*/
|
|
5
|
-
import { Loader } from "
|
|
8
|
+
import { Loader, truncateToWidth } from "@earendil-works/pi-tui";
|
|
6
9
|
import { keyText } from "../../../startup-public.js";
|
|
7
10
|
import { piTheme } from "../theme/theme.js";
|
|
8
11
|
import { CountdownTimer } from "./countdown-timer.js";
|
|
@@ -17,8 +20,15 @@ export class StatusIndicator extends Loader {
|
|
|
17
20
|
}
|
|
18
21
|
}
|
|
19
22
|
export class WorkingStatusIndicator extends StatusIndicator {
|
|
20
|
-
constructor(ui, message, indicator) {
|
|
21
|
-
super("working", ui, spinner => piTheme().fg("accent", spinner), text => piTheme().fg("muted", text), message, indicator);
|
|
23
|
+
constructor(ui, message, indicator, colorFn) {
|
|
24
|
+
super("working", ui, colorFn ?? (spinner => piTheme().fg("accent", spinner)), colorFn ?? (text => piTheme().fg("muted", text)), message, indicator);
|
|
25
|
+
}
|
|
26
|
+
renderInBorder(width) {
|
|
27
|
+
const line = super.render(width + 2)[1] ?? "";
|
|
28
|
+
return truncateToWidth(line.startsWith(" ") ? line.slice(1).trimEnd() : line.trimEnd(), width, "");
|
|
29
|
+
}
|
|
30
|
+
renderSpinnerInBorder(width) {
|
|
31
|
+
return truncateToWidth(this.getRenderedIndicator(), width, "");
|
|
22
32
|
}
|
|
23
33
|
}
|
|
24
34
|
export class RetryStatusIndicator extends StatusIndicator {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { Container, type TUI } from "
|
|
1
|
+
import { Container, type TUI, type TuiMouseEvent } from "@earendil-works/pi-tui";
|
|
2
2
|
import { type ToolDefinition } from "@earendil-works/pi-coding-agent";
|
|
3
3
|
type ToolPresentationResult = Parameters<NonNullable<ToolDefinition["renderResult"]>>[0] & {
|
|
4
4
|
isError: boolean;
|
|
5
5
|
};
|
|
6
|
+
/** The caller-side merge 0.85.1 performs before handing a definition to the component: built-in renderers fill the gaps. */
|
|
7
|
+
export declare function mergeBuiltInRenderers(definition: ToolDefinition<any, any, any> | undefined, builtIn: ToolDefinition<any, any, any> | undefined): ToolDefinition<any, any, any> | undefined;
|
|
6
8
|
export interface ToolExecutionOptions {
|
|
7
9
|
showImages?: boolean;
|
|
8
10
|
imageWidthCells?: number;
|
|
@@ -10,7 +12,9 @@ export interface ToolExecutionOptions {
|
|
|
10
12
|
export declare class ToolExecutionComponent extends Container {
|
|
11
13
|
private contentBox;
|
|
12
14
|
private contentText;
|
|
15
|
+
private contentTextRegion;
|
|
13
16
|
private selfRenderContainer;
|
|
17
|
+
private selfRenderHeight;
|
|
14
18
|
private callRendererComponent;
|
|
15
19
|
private resultRendererComponent;
|
|
16
20
|
private rendererState;
|
|
@@ -34,7 +38,7 @@ export declare class ToolExecutionComponent extends Container {
|
|
|
34
38
|
private argsComplete;
|
|
35
39
|
private result;
|
|
36
40
|
private hideComponent;
|
|
37
|
-
constructor(toolName: string, toolCallId: string, args: any, options: ToolExecutionOptions | undefined, toolDefinition: ToolDefinition<any, any> | undefined, ui: TUI, cwd: string);
|
|
41
|
+
constructor(toolName: string, toolCallId: string, args: any, options: ToolExecutionOptions | undefined, toolDefinition: ToolDefinition<any, any, any> | undefined, ui: TUI, cwd: string);
|
|
38
42
|
private getCallRenderer;
|
|
39
43
|
private getResultRenderer;
|
|
40
44
|
private hasRendererDefinition;
|
|
@@ -42,6 +46,7 @@ export declare class ToolExecutionComponent extends Container {
|
|
|
42
46
|
private getRenderContext;
|
|
43
47
|
private createCallFallback;
|
|
44
48
|
private createResultFallback;
|
|
49
|
+
private createResultRegion;
|
|
45
50
|
updateArgs(args: any): void;
|
|
46
51
|
markExecutionStarted(): void;
|
|
47
52
|
setArgsComplete(): void;
|
|
@@ -53,6 +58,7 @@ export declare class ToolExecutionComponent extends Container {
|
|
|
53
58
|
setImageWidthCells(width: number): void;
|
|
54
59
|
invalidate(): void;
|
|
55
60
|
render(width: number): string[];
|
|
61
|
+
handleMouse(event: TuiMouseEvent): ReturnType<Container["handleMouse"]>;
|
|
56
62
|
private updateDisplay;
|
|
57
63
|
private composeDisplay;
|
|
58
64
|
private getTextOutput;
|