@code-yeongyu/senpi 2026.9.11 → 2026.9.12-3
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/CHANGELOG.md +83 -0
- package/README.md +1 -1
- package/dist/bun/cli.d.ts +2 -1
- package/dist/bun/cli.d.ts.map +1 -1
- package/dist/bun/cli.js +5 -8
- package/dist/bun/cli.js.map +1 -1
- package/dist/bun/runtime-setup.d.ts +2 -0
- package/dist/bun/runtime-setup.d.ts.map +1 -0
- package/dist/bun/runtime-setup.js +9 -0
- package/dist/bun/runtime-setup.js.map +1 -0
- package/dist/bun/sandbox-env-setup.d.ts +2 -0
- package/dist/bun/sandbox-env-setup.d.ts.map +1 -0
- package/dist/bun/sandbox-env-setup.js +4 -0
- package/dist/bun/sandbox-env-setup.js.map +1 -0
- package/dist/cli/config-selector.d.ts.map +1 -1
- package/dist/cli/config-selector.js +2 -1
- package/dist/cli/config-selector.js.map +1 -1
- package/dist/cli/setup.d.ts +2 -0
- package/dist/cli/setup.d.ts.map +1 -0
- package/dist/cli/setup.js +12 -0
- package/dist/cli/setup.js.map +1 -0
- package/dist/cli.js +3 -0
- package/dist/cli.js.map +1 -1
- package/dist/client/index.d.ts +1 -2
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -2
- package/dist/client/index.js.map +1 -1
- package/dist/config.d.ts +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +1 -0
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +18 -6
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session.d.ts +54 -17
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +153 -157
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts +1 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +6 -4
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction-settings-access.d.ts +18 -2
- package/dist/core/compaction-settings-access.d.ts.map +1 -1
- package/dist/core/compaction-settings-access.js +35 -4
- package/dist/core/compaction-settings-access.js.map +1 -1
- package/dist/core/compaction-settings-resolver.d.ts +2 -2
- package/dist/core/compaction-settings-resolver.d.ts.map +1 -1
- package/dist/core/compaction-settings-resolver.js +6 -3
- package/dist/core/compaction-settings-resolver.js.map +1 -1
- package/dist/core/cursor-history-admission.d.ts +50 -0
- package/dist/core/cursor-history-admission.d.ts.map +1 -0
- package/dist/core/cursor-history-admission.js +130 -0
- package/dist/core/cursor-history-admission.js.map +1 -0
- package/dist/core/extensions/builtin/ask-user/extension.d.ts.map +1 -1
- package/dist/core/extensions/builtin/ask-user/extension.js +11 -0
- package/dist/core/extensions/builtin/ask-user/extension.js.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/models.d.ts.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/models.js +2 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/models.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/presets.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/presets.js +7 -1
- package/dist/core/extensions/builtin/prompt-preset/presets.js.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +4 -2
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/keybindings.d.ts +10 -0
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +8 -0
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/messages.d.ts +1 -1
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js.map +1 -1
- package/dist/core/model-registry.d.ts +5 -1
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +8 -0
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +2 -0
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-runtime.d.ts +1 -0
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +5 -2
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/retry-fallback/settings.d.ts +2 -0
- package/dist/core/retry-fallback/settings.d.ts.map +1 -1
- package/dist/core/retry-fallback/settings.js.map +1 -1
- package/dist/core/session-manager.d.ts +5 -2
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +68 -19
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/session-write-reservation.d.ts +9 -0
- package/dist/core/session-write-reservation.d.ts.map +1 -1
- package/dist/core/session-write-reservation.js +33 -0
- package/dist/core/session-write-reservation.js.map +1 -1
- package/dist/core/settings-manager.d.ts +12 -5
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +18 -6
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/settings-public-types.d.ts +1 -1
- package/dist/core/settings-public-types.d.ts.map +1 -1
- package/dist/core/settings-public-types.js.map +1 -1
- package/dist/core/skills.d.ts +1 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +6 -2
- package/dist/core/skills.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +8 -9
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +3 -142
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit.d.ts +1 -12
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +4 -168
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +2 -53
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +2 -58
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +2 -47
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/read.d.ts +1 -4
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +4 -141
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/renderers/bash.d.ts +12 -0
- package/dist/core/tools/renderers/bash.d.ts.map +1 -0
- package/dist/core/tools/renderers/bash.js +156 -0
- package/dist/core/tools/renderers/bash.js.map +1 -0
- package/dist/core/tools/renderers/edit.d.ts +23 -0
- package/dist/core/tools/renderers/edit.d.ts.map +1 -0
- package/dist/core/tools/renderers/edit.js +172 -0
- package/dist/core/tools/renderers/edit.js.map +1 -0
- package/dist/core/tools/renderers/find.d.ts +10 -0
- package/dist/core/tools/renderers/find.d.ts.map +1 -0
- package/dist/core/tools/renderers/find.js +64 -0
- package/dist/core/tools/renderers/find.js.map +1 -0
- package/dist/core/tools/renderers/grep.d.ts +10 -0
- package/dist/core/tools/renderers/grep.d.ts.map +1 -0
- package/dist/core/tools/renderers/grep.js +69 -0
- package/dist/core/tools/renderers/grep.js.map +1 -0
- package/dist/core/tools/renderers/index.d.ts +28 -0
- package/dist/core/tools/renderers/index.d.ts.map +1 -0
- package/dist/core/tools/renderers/index.js +47 -0
- package/dist/core/tools/renderers/index.js.map +1 -0
- package/dist/core/tools/renderers/ls.d.ts +10 -0
- package/dist/core/tools/renderers/ls.d.ts.map +1 -0
- package/dist/core/tools/renderers/ls.js +58 -0
- package/dist/core/tools/renderers/ls.js.map +1 -0
- package/dist/core/tools/renderers/read.d.ts +19 -0
- package/dist/core/tools/renderers/read.d.ts.map +1 -0
- package/dist/core/tools/renderers/read.js +149 -0
- package/dist/core/tools/renderers/read.js.map +1 -0
- package/dist/core/tools/renderers/write.d.ts +10 -0
- package/dist/core/tools/renderers/write.d.ts.map +1 -0
- package/dist/core/tools/renderers/write.js +162 -0
- package/dist/core/tools/renderers/write.js.map +1 -0
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +4 -153
- package/dist/core/tools/write.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js +2 -2
- package/dist/migrations.js.map +1 -1
- package/dist/modes/app-server/threads/turn-runtime.d.ts +3 -1
- package/dist/modes/app-server/threads/turn-runtime.d.ts.map +1 -1
- package/dist/modes/app-server/threads/turn-runtime.js.map +1 -1
- package/dist/modes/app-server/threads/turns.js +1 -1
- package/dist/modes/app-server/threads/turns.js.map +1 -1
- package/dist/modes/app-server/turn-adapter.js +4 -2
- package/dist/modes/app-server/turn-adapter.js.map +1 -1
- package/dist/modes/interactive/chat-viewport.d.ts +22 -0
- package/dist/modes/interactive/chat-viewport.d.ts.map +1 -0
- package/dist/modes/interactive/chat-viewport.js +29 -0
- package/dist/modes/interactive/chat-viewport.js.map +1 -0
- package/dist/modes/interactive/components/ask-user-answer-key.d.ts +14 -0
- package/dist/modes/interactive/components/ask-user-answer-key.d.ts.map +1 -0
- package/dist/modes/interactive/components/ask-user-answer-key.js +65 -0
- package/dist/modes/interactive/components/ask-user-answer-key.js.map +1 -0
- package/dist/modes/interactive/components/ask-user-async-widget.d.ts +17 -12
- package/dist/modes/interactive/components/ask-user-async-widget.d.ts.map +1 -1
- package/dist/modes/interactive/components/ask-user-async-widget.js +47 -23
- package/dist/modes/interactive/components/ask-user-async-widget.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +7 -0
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +26 -2
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/assistant-render-descriptors.d.ts +4 -0
- package/dist/modes/interactive/components/assistant-render-descriptors.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-render-descriptors.js +8 -5
- package/dist/modes/interactive/components/assistant-render-descriptors.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts +10 -1
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +37 -1
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts +1 -1
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.js +8 -8
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/status-indicator.d.ts +4 -1
- package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
- package/dist/modes/interactive/components/status-indicator.js +14 -2
- package/dist/modes/interactive/components/status-indicator.js.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.js +4 -4
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution-renderer.d.ts +4 -1
- package/dist/modes/interactive/components/tool-execution-renderer.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution-renderer.js +23 -10
- package/dist/modes/interactive/components/tool-execution-renderer.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution-types.d.ts +18 -2
- package/dist/modes/interactive/components/tool-execution-types.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution-types.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +3 -3
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +5 -0
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +10 -15
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +178 -138
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/dark.json +2 -1
- package/dist/modes/interactive/theme/grok-day.json +2 -1
- package/dist/modes/interactive/theme/grok-night.json +2 -1
- package/dist/modes/interactive/theme/light.json +2 -1
- package/dist/modes/interactive/theme/theme-controller.d.ts +1 -0
- package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme-controller.js +5 -0
- package/dist/modes/interactive/theme/theme-controller.js.map +1 -1
- package/dist/modes/interactive/theme/theme-json.d.ts +84 -0
- package/dist/modes/interactive/theme/theme-json.d.ts.map +1 -0
- package/dist/modes/interactive/theme/theme-json.js +130 -0
- package/dist/modes/interactive/theme/theme-json.js.map +1 -0
- package/dist/modes/interactive/theme/theme-schema.json +6 -2
- package/dist/modes/interactive/theme/theme.d.ts +10 -5
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +14 -117
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/interactive/tips/catalog/input-tips.d.ts +5 -0
- package/dist/modes/interactive/tips/catalog/input-tips.d.ts.map +1 -1
- package/dist/modes/interactive/tips/catalog/input-tips.js +5 -0
- package/dist/modes/interactive/tips/catalog/input-tips.js.map +1 -1
- package/dist/modes/interactive/tui-renderer.d.ts +21 -0
- package/dist/modes/interactive/tui-renderer.d.ts.map +1 -0
- package/dist/modes/interactive/tui-renderer.js +67 -0
- package/dist/modes/interactive/tui-renderer.js.map +1 -0
- package/dist/modes/rpc/connection-handler.d.ts.map +1 -1
- package/dist/modes/rpc/connection-handler.js +8 -2
- package/dist/modes/rpc/connection-handler.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +11 -1
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +2 -1
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js +1 -0
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/modes/rpc/session-path-reservations.d.ts +30 -0
- package/dist/modes/rpc/session-path-reservations.d.ts.map +1 -0
- package/dist/modes/rpc/session-path-reservations.js +58 -0
- package/dist/modes/rpc/session-path-reservations.js.map +1 -0
- package/dist/modes/rpc/session-registry.d.ts +3 -1
- package/dist/modes/rpc/session-registry.d.ts.map +1 -1
- package/dist/modes/rpc/session-registry.js.map +1 -1
- package/dist/modes/rpc/session-worker-client.d.ts +10 -8
- package/dist/modes/rpc/session-worker-client.d.ts.map +1 -1
- package/dist/modes/rpc/session-worker-client.js +14 -23
- package/dist/modes/rpc/session-worker-client.js.map +1 -1
- package/dist/modes/rpc/session-worker-credit.d.ts +17 -0
- package/dist/modes/rpc/session-worker-credit.d.ts.map +1 -0
- package/dist/modes/rpc/session-worker-credit.js +39 -0
- package/dist/modes/rpc/session-worker-credit.js.map +1 -0
- package/dist/modes/rpc/session-worker-protocol.d.ts +10 -0
- package/dist/modes/rpc/session-worker-protocol.d.ts.map +1 -1
- package/dist/modes/rpc/session-worker-protocol.js +2 -0
- package/dist/modes/rpc/session-worker-protocol.js.map +1 -1
- package/dist/modes/rpc/session-worker-signals.d.ts +7 -0
- package/dist/modes/rpc/session-worker-signals.d.ts.map +1 -0
- package/dist/modes/rpc/session-worker-signals.js +19 -0
- package/dist/modes/rpc/session-worker-signals.js.map +1 -0
- package/dist/modes/rpc/session-worker.js +12 -16
- package/dist/modes/rpc/session-worker.js.map +1 -1
- package/dist/modes/rpc/worker-session-registry.d.ts +12 -0
- package/dist/modes/rpc/worker-session-registry.d.ts.map +1 -1
- package/dist/modes/rpc/worker-session-registry.js +51 -24
- package/dist/modes/rpc/worker-session-registry.js.map +1 -1
- package/dist/senpi +3 -0
- package/dist/utils/clipboard-command.d.ts +7 -0
- package/dist/utils/clipboard-command.d.ts.map +1 -0
- package/dist/utils/clipboard-command.js +45 -0
- package/dist/utils/clipboard-command.js.map +1 -0
- package/dist/utils/clipboard-image.d.ts.map +1 -1
- package/dist/utils/clipboard-image.js +52 -69
- package/dist/utils/clipboard-image.js.map +1 -1
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js +49 -126
- package/dist/utils/clipboard.js.map +1 -1
- package/dist/utils/exif-orientation.d.ts.map +1 -1
- package/dist/utils/exif-orientation.js +2 -3
- package/dist/utils/exif-orientation.js.map +1 -1
- package/dist/utils/tools-manager.d.ts +1 -0
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +41 -19
- package/dist/utils/tools-manager.js.map +1 -1
- package/docs/compaction.md +39 -13
- package/docs/containerization.md +45 -0
- package/docs/development.md +19 -0
- package/docs/docs.json +4 -0
- package/docs/environment-variables.md +2 -0
- package/docs/extensions.md +21 -10
- package/docs/keybindings.md +7 -2
- package/docs/models.md +1 -1
- package/docs/providers.md +1 -1
- package/docs/rpc.md +16 -8
- package/docs/sdk.md +7 -0
- package/docs/session-format.md +52 -38
- package/docs/settings.md +40 -4
- package/docs/skills.md +1 -1
- package/docs/termux.md +0 -1
- package/docs/themes.md +8 -6
- package/docs/tui.md +22 -3
- package/examples/README.md +3 -0
- package/examples/extensions/dynamic-resources/dynamic.json +2 -0
- package/examples/plugins/pi-example-plugin/README.md +38 -0
- package/examples/plugins/pi-example-plugin/package.json +10 -0
- package/examples/plugins/pi-example-plugin/src/contract.ts +13 -0
- package/examples/plugins/pi-example-plugin/src/session.ts +23 -0
- package/examples/plugins/pi-example-plugin/src/tui.ts +31 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-bedrock-runtime/package.json +3 -3
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +5 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/util/hasOwn.js +3 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/util/index.js +1 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/util/hasOwn.d.ts +4 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/util/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/hasOwn.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/package.json +1 -1
- package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-login/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +2 -0
- package/node_modules/@aws-sdk/credential-provider-node/dist-es/runtime/memoize-chain.js +2 -0
- package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/LICENSE +201 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/README.md +62 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +158 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/constants.js +2 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromEnvSigningName.js +16 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +84 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromStatic.js +8 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/getNewSsoOidcToken.js +11 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/getSsoOidcClient.js +10 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/index.js +4 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/nodeProvider.js +5 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/validateTokenExpiry.js +7 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/validateTokenKey.js +7 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/writeSSOTokenToFile.js +8 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/constants.d.ts +8 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/fromEnvSigningName.d.ts +18 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/fromSso.d.ts +12 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/fromStatic.d.ts +9 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/getNewSsoOidcToken.d.ts +8 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/getSsoOidcClient.d.ts +7 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/index.d.ts +7 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/nodeProvider.d.ts +18 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/constants.d.ts +3 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/fromEnvSigningName.d.ts +8 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/fromSso.d.ts +10 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/fromStatic.d.ts +5 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/getNewSsoOidcToken.d.ts +9 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/getSsoOidcClient.d.ts +7 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/index.d.ts +7 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/nodeProvider.d.ts +3 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/validateTokenExpiry.d.ts +2 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/validateTokenKey.d.ts +1 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/writeSSOTokenToFile.d.ts +2 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/validateTokenExpiry.d.ts +5 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/validateTokenKey.d.ts +4 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/writeSSOTokenToFile.d.ts +5 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +69 -0
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/package.json +2 -2
- package/node_modules/@aws-sdk/token-providers/package.json +1 -1
- package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +36 -0
- package/node_modules/@code-yeongyu/senpi-codemode/package.json +5 -5
- package/node_modules/@earendil-works/chord/README.md +205 -0
- package/node_modules/@earendil-works/chord/dist/api.d.ts +15 -0
- package/node_modules/@earendil-works/chord/dist/api.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/api.js +72 -0
- package/node_modules/@earendil-works/chord/dist/api.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/bundler.d.ts +6 -0
- package/node_modules/@earendil-works/chord/dist/bundler.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/bundler.js +3 -0
- package/node_modules/@earendil-works/chord/dist/bundler.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/context/index.d.ts +24 -0
- package/node_modules/@earendil-works/chord/dist/context/index.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/context/index.js +97 -0
- package/node_modules/@earendil-works/chord/dist/context/index.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/delta/index.d.ts +119 -0
- package/node_modules/@earendil-works/chord/dist/delta/index.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/delta/index.js +1209 -0
- package/node_modules/@earendil-works/chord/dist/delta/index.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/facets/host.d.ts +12 -0
- package/node_modules/@earendil-works/chord/dist/facets/host.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/facets/host.js +762 -0
- package/node_modules/@earendil-works/chord/dist/facets/host.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/facets/loader.d.ts +3 -0
- package/node_modules/@earendil-works/chord/dist/facets/loader.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/facets/loader.js +5 -0
- package/node_modules/@earendil-works/chord/dist/facets/loader.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/index.d.ts +11 -0
- package/node_modules/@earendil-works/chord/dist/index.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/index.js +10 -0
- package/node_modules/@earendil-works/chord/dist/index.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/json.d.ts +4 -0
- package/node_modules/@earendil-works/chord/dist/json.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/json.js +57 -0
- package/node_modules/@earendil-works/chord/dist/json.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/node/bundle-loader.d.ts +30 -0
- package/node_modules/@earendil-works/chord/dist/node/bundle-loader.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/node/bundle-loader.js +377 -0
- package/node_modules/@earendil-works/chord/dist/node/bundle-loader.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/node/bundle.d.ts +26 -0
- package/node_modules/@earendil-works/chord/dist/node/bundle.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/node/bundle.js +183 -0
- package/node_modules/@earendil-works/chord/dist/node/bundle.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/node/manifest.d.ts +36 -0
- package/node_modules/@earendil-works/chord/dist/node/manifest.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/node/manifest.js +6 -0
- package/node_modules/@earendil-works/chord/dist/node/manifest.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/node/package.d.ts +15 -0
- package/node_modules/@earendil-works/chord/dist/node/package.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/node/package.js +199 -0
- package/node_modules/@earendil-works/chord/dist/node/package.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/node.d.ts +5 -0
- package/node_modules/@earendil-works/chord/dist/node.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/node.js +3 -0
- package/node_modules/@earendil-works/chord/dist/node.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/services/consumer.d.ts +11 -0
- package/node_modules/@earendil-works/chord/dist/services/consumer.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/services/consumer.js +535 -0
- package/node_modules/@earendil-works/chord/dist/services/consumer.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/services/errors.d.ts +8 -0
- package/node_modules/@earendil-works/chord/dist/services/errors.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/services/errors.js +21 -0
- package/node_modules/@earendil-works/chord/dist/services/errors.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/services/handle.d.ts +15 -0
- package/node_modules/@earendil-works/chord/dist/services/handle.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/services/handle.js +99 -0
- package/node_modules/@earendil-works/chord/dist/services/handle.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/services/instances.d.ts +25 -0
- package/node_modules/@earendil-works/chord/dist/services/instances.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/services/instances.js +137 -0
- package/node_modules/@earendil-works/chord/dist/services/instances.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/services/loopback.d.ts +5 -0
- package/node_modules/@earendil-works/chord/dist/services/loopback.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/services/loopback.js +15 -0
- package/node_modules/@earendil-works/chord/dist/services/loopback.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/services/provider.d.ts +37 -0
- package/node_modules/@earendil-works/chord/dist/services/provider.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/services/provider.js +472 -0
- package/node_modules/@earendil-works/chord/dist/services/provider.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/services/state-codec.d.ts +15 -0
- package/node_modules/@earendil-works/chord/dist/services/state-codec.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/services/state-codec.js +115 -0
- package/node_modules/@earendil-works/chord/dist/services/state-codec.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/services/state-internals.d.ts +11 -0
- package/node_modules/@earendil-works/chord/dist/services/state-internals.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/services/state-internals.js +10 -0
- package/node_modules/@earendil-works/chord/dist/services/state-internals.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/services/state.d.ts +23 -0
- package/node_modules/@earendil-works/chord/dist/services/state.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/services/state.js +124 -0
- package/node_modules/@earendil-works/chord/dist/services/state.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/services/wire.d.ts +60 -0
- package/node_modules/@earendil-works/chord/dist/services/wire.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/services/wire.js +173 -0
- package/node_modules/@earendil-works/chord/dist/services/wire.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/types.d.ts +203 -0
- package/node_modules/@earendil-works/chord/dist/types.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/types.js +2 -0
- package/node_modules/@earendil-works/chord/dist/types.js.map +1 -0
- package/node_modules/@earendil-works/chord/package.json +73 -0
- package/node_modules/@earendil-works/pi-agent-core/README.md +4 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts +639 -384
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js +5 -250
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.d.ts +12 -6
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js +33 -27
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts +30 -8
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +53 -64
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/config.d.ts +9 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/config.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/config.js +35 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/config.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/context.d.ts +9 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/context.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/context.js +13 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/context.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.d.ts +25 -28
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js +368 -125
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.d.ts +20 -38
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.js +233 -55
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/assistant.d.ts +42 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/assistant.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/assistant.js +82 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/assistant.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/effect-gate.d.ts +22 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/effect-gate.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/effect-gate.js +48 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/effect-gate.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/tools.d.ts +67 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/tools.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/tools.js +121 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/tools.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/hooks.d.ts +38 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/hooks.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/hooks.js +404 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/hooks.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.d.ts +2 -2
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.d.ts +3 -2
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.js +17 -17
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/result.d.ts +93 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/result.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/result.js +39 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/result.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/boundary.d.ts +28 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/boundary.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/boundary.js +173 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/boundary.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/checkpoint.d.ts +8 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/checkpoint.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/checkpoint.js +133 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/checkpoint.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/deferred.d.ts +15 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/deferred.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/deferred.js +179 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/deferred.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/generation.d.ts +8 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/generation.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/generation.js +205 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/generation.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/reconcile.d.ts +5 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/reconcile.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/reconcile.js +140 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/reconcile.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/recovery.d.ts +8 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/recovery.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/recovery.js +85 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/recovery.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/response.d.ts +23 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/response.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/response.js +394 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/response.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/retry.d.ts +4 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/retry.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/retry.js +34 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/retry.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/structural.d.ts +32 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/structural.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/structural.js +929 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/structural.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/terminal.d.ts +7 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/terminal.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/terminal.js +49 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/terminal.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tool-placement.d.ts +14 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tool-placement.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tool-placement.js +244 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tool-placement.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tools.d.ts +6 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tools.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tools.js +449 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tools.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive.d.ts +6 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive.js +93 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/harness.d.ts +59 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/harness.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/harness.js +302 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/harness.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/index.d.ts +2 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/index.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/index.js +2 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/index.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/lane.d.ts +118 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/lane.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/lane.js +1559 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/lane.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/progress.d.ts +15 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/progress.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/progress.js +66 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/progress.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/reducer.d.ts +5 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/reducer.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/reducer.js +240 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/reducer.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/restore.d.ts +24 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/restore.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/restore.js +117 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/restore.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/transcript.d.ts +21 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/transcript.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/transcript.js +72 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/transcript.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/types.d.ts +105 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/types.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/types.js +50 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/types.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/commit.d.ts +53 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/commit.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/commit.js +57 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/commit.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/context.d.ts +6 -19
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/context.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/context.js +31 -53
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/context.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork-policy.d.ts +21 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork-policy.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork-policy.js +55 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork-policy.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.d.ts +16 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.js +79 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/in-memory-storage-state.d.ts +39 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/in-memory-storage-state.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/in-memory-storage-state.js +269 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/in-memory-storage-state.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/index.d.ts +9 -5
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/index.js +7 -4
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.d.ts +19 -8
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.js +34 -219
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/fork.d.ts +38 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/fork.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/fork.js +266 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/fork.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/index.d.ts +4 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/index.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/index.js +4 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/index.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/io.d.ts +14 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/io.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/io.js +86 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/io.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/legacy-v3.d.ts +44 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/legacy-v3.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/legacy-v3.js +454 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/legacy-v3.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.d.ts +27 -24
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.js +276 -151
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.d.ts +39 -41
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.js +175 -196
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.d.ts +23 -22
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.js +2 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.d.ts +44 -40
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.js +333 -115
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/mutation-line.d.ts +8 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/mutation-line.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/mutation-line.js +22 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/mutation-line.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts +78 -51
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js +327 -207
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/datasets.d.ts +12 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/datasets.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/datasets.js +24 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/datasets.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/session-repo.d.ts +42 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/session-repo.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/session-repo.js +127 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/session-repo.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/storage.d.ts +25 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/storage.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/storage.js +114 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/storage.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/session-repo.d.ts +23 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/session-repo.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/session-repo.js +809 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/session-repo.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/storage.d.ts +4 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/storage.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/storage.js +600 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/storage.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/gating-storage.d.ts +26 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/gating-storage.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/gating-storage.js +103 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/gating-storage.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/index.d.ts +9 -2
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/index.js +8 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/instrumented-storage.d.ts +11 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/instrumented-storage.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/instrumented-storage.js +19 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/instrumented-storage.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/storage-decorator.d.ts +20 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/storage-decorator.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/storage-decorator.js +40 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/storage-decorator.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/types.d.ts +5 -7
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.d.ts +425 -265
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.js +7 -7
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/values.d.ts +95 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/values.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/values.js +81 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/values.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.d.ts +3 -2
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.js +29 -26
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.d.ts +64 -43
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.js +45 -26
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.d.ts +4 -4
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.js +66 -93
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.js +17 -13
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/file-mutation-queue.d.ts +2 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/file-mutation-queue.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/file-mutation-queue.js +5 -5
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/file-mutation-queue.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/path-utils.d.ts +3 -2
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/path-utils.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/path-utils.js +5 -5
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/path-utils.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.d.ts +2 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.js +4 -6
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/write.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/write.js +12 -8
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/write.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts +128 -45
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/adaptive-publisher.d.ts +24 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/adaptive-publisher.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/adaptive-publisher.js +79 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/adaptive-publisher.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/output-capture.d.ts +31 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/output-capture.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/output-capture.js +217 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/output-capture.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.d.ts +19 -5
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js +65 -192
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.d.ts +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.js +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/usage.d.ts +4 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/usage.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/usage.js +33 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/usage.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts +4 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/index.js +3 -6
- package/node_modules/@earendil-works/pi-agent-core/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/search/index.d.ts +24 -16
- package/node_modules/@earendil-works/pi-agent-core/dist/search/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/search/index.js +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/search/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +2 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/package.json +27 -6
- package/node_modules/@earendil-works/pi-ai/README.md +39 -4
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +8 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-ai-binding.d.ts +77 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-ai-binding.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-ai-binding.js +72 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-ai-binding.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/measure.d.ts +11 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/measure.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/measure.js +18 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/measure.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.d.ts +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.js +5 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/discovery.d.ts +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/discovery.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/discovery.js +96 -51
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/discovery.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/gen/cascade_pb.d.ts +389 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/gen/cascade_pb.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/gen/cascade_pb.js +132 -4
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/gen/cascade_pb.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/metadata.d.ts +34 -4
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/metadata.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/metadata.js +41 -8
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/metadata.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/paths.d.ts +20 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/paths.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/paths.js +20 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/paths.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/request.d.ts +18 -6
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/request.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/request.js +77 -35
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/request.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/stream-state.d.ts +9 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/stream-state.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/stream-state.js +30 -38
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/stream-state.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/trailer.d.ts +16 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/trailer.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/trailer.js +69 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/trailer.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/unary.d.ts +26 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/unary.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/unary.js +61 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/unary.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/wire.d.ts +6 -4
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/wire.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/wire.js +6 -4
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent/wire.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent.d.ts +13 -5
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent.js +76 -21
- package/node_modules/@earendil-works/pi-ai/dist/api/devin-agent.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +4 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +6 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +4 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +13 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/devin.d.ts +5 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/devin.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/devin.js +7 -2
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/devin.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/cursor/context-limit-store.d.ts +32 -0
- package/node_modules/@earendil-works/pi-ai/dist/cursor/context-limit-store.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/cursor/context-limit-store.js +62 -0
- package/node_modules/@earendil-works/pi-ai/dist/cursor/context-limit-store.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/cursor/store-migration.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/cursor/store-migration.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/cursor/store-migration.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/index.d.ts +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/index.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/model.d.ts +11 -1
- package/node_modules/@earendil-works/pi-ai/dist/model.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/model.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.d.ts +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/models.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.js +5 -2
- package/node_modules/@earendil-works/pi-ai/dist/models.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/openai-responses-compat.d.ts +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/openai-responses-compat.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/openai-responses-compat.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.js +4 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/amazon-bedrock.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/azure-openai-responses.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/baseten.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/deepseek.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai-codex.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-individual.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/venice.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/devin.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/devin.js +3 -3
- package/node_modules/@earendil-works/pi-ai/dist/providers/devin.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/devin.models.d.ts +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/devin.models.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/devin.models.js +18 -9
- package/node_modules/@earendil-works/pi-ai/dist/providers/devin.models.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js +5 -5
- package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.js +4 -3
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-headers.d.ts +4 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-headers.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-headers.js +22 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-headers.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.js +5 -4
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +16 -6
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/assistant-message-frame.d.ts +77 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/assistant-message-frame.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/assistant-message-frame.js +427 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/assistant-message-frame.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/cursor-context-limit.d.ts +12 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/cursor-context-limit.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/cursor-context-limit.js +93 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/cursor-context-limit.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js +25 -5
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.d.ts +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.js +5 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/types.d.ts +10 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry.d.ts +13 -2
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js +18 -7
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/uuid.d.ts +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/utils/uuid.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/uuid.js +36 -31
- package/node_modules/@earendil-works/pi-ai/dist/utils/uuid.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/package.json +6 -6
- package/node_modules/@earendil-works/pi-pty/package.json +1 -1
- package/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
- package/node_modules/@earendil-works/pi-tui/README.md +53 -4
- package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.d.ts +21 -1
- package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.js +199 -42
- package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts +3 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/box.js +28 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/box.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts +6 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +98 -18
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts +12 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/input.js +40 -6
- package/node_modules/@earendil-works/pi-tui/dist/components/input.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/latex.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/latex.js +7 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/latex.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts +3 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.js +20 -8
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/mouse-region.d.ts +12 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/mouse-region.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/mouse-region.js +19 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/mouse-region.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.d.ts +6 -3
- package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.js +6 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts +4 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js +48 -2
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts +5 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js +54 -5
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +3 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.js +3 -0
- package/node_modules/@earendil-works/pi-tui/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/layout.d.ts +3 -1
- package/node_modules/@earendil-works/pi-tui/dist/layout.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/layout.js +32 -9
- package/node_modules/@earendil-works/pi-tui/dist/layout.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts +2 -1
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js +3 -44
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/native-platform.d.ts +18 -0
- package/node_modules/@earendil-works/pi-tui/dist/native-platform.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/native-platform.js +42 -0
- package/node_modules/@earendil-works/pi-tui/dist/native-platform.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js +2 -20
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts +31 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js +335 -41
- package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +83 -5
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.js +118 -4
- package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +2 -0
- package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.js +9 -0
- package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/native/clipboard.h +170 -0
- package/node_modules/@earendil-works/pi-tui/native/darwin/README.md +8 -6
- package/node_modules/@earendil-works/pi-tui/native/darwin/build.sh +12 -5
- package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-arm64/{darwin-modifiers.node → darwin-platform.node} +0 -0
- package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-x64/{darwin-modifiers.node → darwin-platform.node} +0 -0
- package/node_modules/@earendil-works/pi-tui/native/darwin/src/darwin-platform.m +93 -0
- package/node_modules/@earendil-works/pi-tui/native/linux/README.md +23 -0
- package/node_modules/@earendil-works/pi-tui/native/linux/build.sh +65 -0
- package/node_modules/@earendil-works/pi-tui/native/linux/prebuilds/linux-arm64/linux-platform-x11.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/linux/prebuilds/linux-x64/linux-platform-x11.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/linux/src/clipboard-worker.h +70 -0
- package/node_modules/@earendil-works/pi-tui/native/linux/src/linux-platform-x11.c +274 -0
- package/node_modules/@earendil-works/pi-tui/native/napi.h +89 -0
- package/node_modules/@earendil-works/pi-tui/native/win32/README.md +18 -7
- package/node_modules/@earendil-works/pi-tui/native/win32/build.mjs +7 -4
- package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-arm64/win32-platform.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-x64/win32-platform.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/win32/src/win32-platform.c +241 -0
- package/node_modules/@earendil-works/pi-tui/package.json +10 -3
- package/node_modules/@google/genai/dist/genai.d.ts +1799 -289
- package/node_modules/@google/genai/dist/index.cjs +319 -299
- package/node_modules/@google/genai/dist/index.mjs +319 -299
- package/node_modules/@google/genai/dist/index.mjs.map +1 -1
- package/node_modules/@google/genai/dist/node/index.cjs +320 -300
- package/node_modules/@google/genai/dist/node/index.mjs +320 -300
- package/node_modules/@google/genai/dist/node/index.mjs.map +1 -1
- package/node_modules/@google/genai/dist/node/node.d.ts +1799 -289
- package/node_modules/@google/genai/dist/tokenizer/node.cjs +49 -2
- package/node_modules/@google/genai/dist/tokenizer/node.d.ts +43 -3
- package/node_modules/@google/genai/dist/tokenizer/node.mjs +49 -2
- package/node_modules/@google/genai/dist/tokenizer/node.mjs.map +1 -1
- package/node_modules/@google/genai/dist/vertex_internal/index.cjs +39 -3
- package/node_modules/@google/genai/dist/vertex_internal/index.cjs.map +1 -1
- package/node_modules/@google/genai/dist/vertex_internal/index.d.ts +51 -9
- package/node_modules/@google/genai/dist/vertex_internal/index.js +39 -3
- package/node_modules/@google/genai/dist/vertex_internal/index.js.map +1 -1
- package/node_modules/@google/genai/dist/web/index.mjs +319 -299
- package/node_modules/@google/genai/dist/web/index.mjs.map +1 -1
- package/node_modules/@google/genai/dist/web/web.d.ts +1799 -289
- package/node_modules/@google/genai/package.json +1 -1
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +11 -4
- package/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +1 -0
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +2 -3
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +8 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/LICENSE +201 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/README.md +115 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-cjs/index.js +96 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/abort-handler.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/abort.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/HttpApiKeyAuth.js +5 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/HttpAuthScheme.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/HttpAuthSchemeProvider.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/HttpSigner.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/IdentityProviderConfig.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/auth.js +5 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/index.js +2 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/blob/blob-payload-input-types.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/checksum.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/client.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/command.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/connection/config.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/connection/index.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/connection/manager.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/connection/pool.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/crypto.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/downlevel-ts3.4/transform/type-transform.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/encode.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoint.js +5 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/EndpointParameterInstructions.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/EndpointRuleObject.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/ErrorRuleObject.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/RuleSetObject.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/TreeRuleObject.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/index.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/shared.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/eventStream.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/extensions/checksum.js +38 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/extensions/defaultClientConfiguration.js +7 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/extensions/defaultExtensionConfiguration.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/extensions/index.js +2 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/extensions/retry.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/externals-check/browser-externals-check.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/feature-ids.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/http/httpHandlerInitialization.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/http.js +5 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/identity/apiKeyIdentity.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/identity/awsCredentialIdentity.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/identity/identity.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/identity/index.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/identity/tokenIdentity.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/index.js +7 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/logger.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/metrics.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/middleware.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/pagination.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/profile.js +6 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/response.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/retry.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/schema/schema-deprecated.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/schema/schema.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/schema/sentinels.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/schema/static-schemas.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/schema/traits.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/serde.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/shapes.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/signature.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/stream.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-common-types.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-input-types.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-output-types.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transfer.js +6 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/client-method-transforms.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/client-payload-blob-type-narrow.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/exact.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/mutable.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/no-undefined.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/type-transform.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/uri.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/util.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/waiter.js +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/abort-handler.d.ts +7 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/abort.d.ts +48 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/HttpApiKeyAuth.d.ts +7 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/HttpAuthScheme.d.ts +49 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/HttpAuthSchemeProvider.d.ts +20 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/HttpSigner.d.ts +41 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/IdentityProviderConfig.d.ts +14 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/auth.d.ts +59 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/index.d.ts +7 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/blob/blob-payload-input-types.d.ts +37 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/checksum.d.ts +61 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/client.d.ts +57 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/command.d.ts +28 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/connection/config.d.ts +15 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/connection/index.d.ts +3 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/connection/manager.d.ts +34 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/connection/pool.d.ts +32 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/crypto.d.ts +58 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/downlevel-ts3.4/transform/type-transform.d.ts +24 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/encode.d.ts +31 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoint.d.ts +77 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/EndpointParameterInstructions.d.ts +41 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/EndpointRuleObject.d.ts +27 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/ErrorRuleObject.d.ts +10 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/RuleSetObject.d.ts +28 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/TreeRuleObject.d.ts +16 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/index.d.ts +5 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/shared.d.ts +55 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/eventStream.d.ts +137 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/extensions/checksum.d.ts +58 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/extensions/defaultClientConfiguration.d.ts +32 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/extensions/defaultExtensionConfiguration.d.ts +9 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/extensions/index.d.ts +6 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/extensions/retry.d.ts +18 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/externals-check/browser-externals-check.d.ts +35 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/feature-ids.d.ts +16 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/http/httpHandlerInitialization.d.ts +142 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/http.d.ts +110 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/identity/apiKeyIdentity.d.ts +14 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/identity/awsCredentialIdentity.d.ts +31 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/identity/identity.d.ts +15 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/identity/index.d.ts +4 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/identity/tokenIdentity.d.ts +14 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/index.d.ts +52 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/logger.d.ts +13 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/metrics.d.ts +93 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/middleware.d.ts +541 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/pagination.d.ts +33 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/profile.d.ts +30 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/response.d.ts +40 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/retry.d.ts +162 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/schema/schema-deprecated.d.ts +143 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/schema/schema.d.ts +236 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/schema/sentinels.d.ts +65 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/schema/static-schemas.d.ts +99 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/schema/traits.d.ts +46 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/serde.d.ts +114 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/shapes.d.ts +79 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/signature.d.ts +172 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/stream.d.ts +22 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-common-types.d.ts +28 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-input-types.d.ts +54 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-output-types.d.ts +41 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transfer.d.ts +42 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/client-method-transforms.d.ts +26 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/client-payload-blob-type-narrow.d.ts +73 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/exact.d.ts +6 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/mutable.d.ts +6 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/no-undefined.d.ts +68 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/type-transform.d.ts +39 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/abort-handler.d.ts +7 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/abort.d.ts +45 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpApiKeyAuth.d.ts +7 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpAuthScheme.d.ts +49 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpAuthSchemeProvider.d.ts +20 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpSigner.d.ts +41 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/IdentityProviderConfig.d.ts +14 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/auth.d.ts +59 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/index.d.ts +7 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/blob/blob-payload-input-types.d.ts +37 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/checksum.d.ts +61 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/client.d.ts +57 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/command.d.ts +28 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/connection/config.d.ts +15 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/connection/index.d.ts +3 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/connection/manager.d.ts +34 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/connection/pool.d.ts +32 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/crypto.d.ts +58 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/downlevel-ts3.4/transform/type-transform.d.ts +40 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/encode.d.ts +31 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoint.d.ts +77 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/EndpointParameterInstructions.d.ts +41 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/EndpointRuleObject.d.ts +27 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/ErrorRuleObject.d.ts +10 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/RuleSetObject.d.ts +28 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/TreeRuleObject.d.ts +16 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/index.d.ts +5 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/shared.d.ts +55 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/eventStream.d.ts +137 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/extensions/checksum.d.ts +58 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/extensions/defaultClientConfiguration.d.ts +32 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/extensions/defaultExtensionConfiguration.d.ts +9 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/extensions/index.d.ts +6 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/extensions/retry.d.ts +18 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/externals-check/browser-externals-check.d.ts +35 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/feature-ids.d.ts +16 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/http/httpHandlerInitialization.d.ts +142 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/http.d.ts +110 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/identity/apiKeyIdentity.d.ts +14 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/identity/awsCredentialIdentity.d.ts +31 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/identity/identity.d.ts +15 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/identity/index.d.ts +4 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/identity/tokenIdentity.d.ts +14 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/index.d.ts +52 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/logger.d.ts +13 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/metrics.d.ts +93 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/middleware.d.ts +541 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/pagination.d.ts +33 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/profile.d.ts +30 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/response.d.ts +40 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/retry.d.ts +162 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/schema/schema-deprecated.d.ts +149 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/schema/schema.d.ts +251 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/schema/sentinels.d.ts +65 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/schema/static-schemas.d.ts +118 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/schema/traits.d.ts +46 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/serde.d.ts +114 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/shapes.d.ts +79 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/signature.d.ts +172 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/stream.d.ts +22 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-common-types.d.ts +28 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-payload-input-types.d.ts +54 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-payload-output-types.d.ts +41 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transfer.d.ts +42 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/client-method-transforms.d.ts +26 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/client-payload-blob-type-narrow.d.ts +77 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/exact.d.ts +14 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/mutable.d.ts +6 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/no-undefined.d.ts +88 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/type-transform.d.ts +40 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/uri.d.ts +17 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/util.d.ts +192 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/waiter.d.ts +35 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/uri.d.ts +17 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/util.d.ts +176 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/waiter.d.ts +35 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/package.json +50 -0
- package/node_modules/@smithy/node-http-handler/package.json +2 -2
- package/node_modules/esbuild/LICENSE.md +21 -0
- package/node_modules/esbuild/README.md +3 -0
- package/node_modules/esbuild/bin/esbuild +223 -0
- package/node_modules/esbuild/install.js +300 -0
- package/node_modules/esbuild/lib/main.d.ts +720 -0
- package/node_modules/esbuild/lib/main.js +2536 -0
- package/node_modules/esbuild/package.json +47 -0
- package/node_modules/ignore/README.md +52 -0
- package/node_modules/ignore/index.js +785 -129
- package/node_modules/ignore/legacy.js +660 -98
- package/node_modules/ignore/package.json +10 -4
- package/node_modules/marked/README.md +1 -0
- package/node_modules/marked/lib/marked.d.ts +7 -0
- package/node_modules/marked/lib/marked.esm.js +30 -30
- package/node_modules/marked/lib/marked.esm.js.map +3 -3
- package/node_modules/marked/lib/marked.umd.js +30 -30
- package/node_modules/marked/lib/marked.umd.js.map +3 -3
- package/node_modules/marked/man/marked.1 +1 -1
- package/node_modules/marked/package.json +2 -2
- package/node_modules/typebox/build/compile/validator.d.mts +1 -1
- package/node_modules/typebox/build/compile/validator.mjs +1 -1
- package/node_modules/typebox/build/format/idna/idn-hostname.mjs +7 -5
- package/node_modules/typebox/build/format/iri.mjs +5 -1
- package/node_modules/typebox/build/guard/emit.mjs +2 -4
- package/node_modules/typebox/build/guard/guard.mjs +6 -18
- package/node_modules/typebox/build/guard/string.mjs +16 -24
- package/node_modules/typebox/build/schema/compile.d.mts +3 -2
- package/node_modules/typebox/build/schema/compile.mjs +8 -8
- package/node_modules/typebox/build/schema/engine/_context.d.mts +1 -6
- package/node_modules/typebox/build/schema/engine/_context.mjs +9 -14
- package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/_stack.d.mts +6 -2
- package/node_modules/typebox/build/schema/engine/_stack.mjs +135 -32
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +16 -4
- package/node_modules/typebox/build/schema/engine/allOf.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/anyOf.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/if.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/oneOf.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/propertyNames.mjs +1 -3
- package/node_modules/typebox/build/schema/engine/ref.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/schema.mjs +6 -0
- package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +2 -2
- package/node_modules/typebox/build/schema/errors.d.mts +2 -2
- package/node_modules/typebox/build/schema/errors.mjs +7 -13
- package/node_modules/typebox/build/schema/intern/index.d.mts +1 -0
- package/node_modules/typebox/build/schema/intern/index.mjs +1 -0
- package/node_modules/typebox/build/schema/intern/intern.d.mts +14 -0
- package/node_modules/typebox/build/schema/intern/intern.mjs +259 -0
- package/node_modules/typebox/build/schema/parse.d.mts +1 -0
- package/node_modules/typebox/build/schema/parse.mjs +10 -5
- package/node_modules/typebox/build/schema/resolve/resolve.d.mts +34 -3
- package/node_modules/typebox/build/schema/resolve/resolve.mjs +198 -73
- package/node_modules/typebox/build/schema/schema.d.mts +1 -0
- package/node_modules/typebox/build/schema/schema.mjs +1 -0
- package/node_modules/typebox/build/value/errors/errors.d.mts +2 -12
- package/node_modules/typebox/build/value/errors/errors.mjs +2 -7
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/typebox/readme.md +9 -5
- package/node_modules/undici/docs/docs/api/Client.md +4 -0
- package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +3 -2
- package/node_modules/undici/docs/docs/api/EventSource.md +4 -0
- package/node_modules/undici/docs/docs/api/Interceptors.md +7 -3
- package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +7 -1
- package/node_modules/undici/lib/cache/memory-cache-store.js +2 -2
- package/node_modules/undici/lib/core/symbols.js +2 -0
- package/node_modules/undici/lib/dispatcher/agent.js +7 -2
- package/node_modules/undici/lib/dispatcher/balanced-pool.js +7 -4
- package/node_modules/undici/lib/dispatcher/client-h1.js +12 -4
- package/node_modules/undici/lib/dispatcher/client-h2.js +43 -3
- package/node_modules/undici/lib/dispatcher/client.js +3 -2
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +13 -1
- package/node_modules/undici/lib/dispatcher/dispatcher.js +15 -1
- package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +3 -0
- package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +10 -3
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +18 -1
- package/node_modules/undici/lib/dispatcher/retry-agent.js +3 -0
- package/node_modules/undici/lib/dispatcher/round-robin-pool.js +1 -1
- package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +91 -21
- package/node_modules/undici/lib/handler/cache-handler.js +29 -5
- package/node_modules/undici/lib/handler/decorator-handler.js +7 -1
- package/node_modules/undici/lib/handler/deduplication-handler.js +12 -6
- package/node_modules/undici/lib/handler/redirect-handler.js +21 -4
- package/node_modules/undici/lib/handler/retry-handler.js +148 -30
- package/node_modules/undici/lib/interceptor/cache.js +65 -12
- package/node_modules/undici/lib/interceptor/decompress.js +115 -13
- package/node_modules/undici/lib/interceptor/deduplicate.js +5 -4
- package/node_modules/undici/lib/interceptor/dns.js +7 -0
- package/node_modules/undici/lib/interceptor/dump.js +10 -23
- package/node_modules/undici/lib/mock/mock-agent.js +13 -1
- package/node_modules/undici/lib/mock/mock-utils.js +11 -10
- package/node_modules/undici/lib/util/cache.js +45 -3
- package/node_modules/undici/lib/web/cookies/parse.js +150 -147
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +28 -1
- package/node_modules/undici/lib/web/eventsource/eventsource.js +13 -3
- package/node_modules/undici/lib/web/fetch/index.js +6 -0
- package/node_modules/undici/lib/web/fetch/request.js +2 -3
- package/node_modules/undici/lib/web/fetch/util.js +6 -1
- package/node_modules/undici/lib/web/webidl/index.js +3 -3
- package/node_modules/undici/lib/web/websocket/connection.js +1 -1
- package/node_modules/undici/lib/web/websocket/permessage-deflate.js +5 -0
- package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -10
- package/node_modules/undici/package.json +3 -3
- package/node_modules/undici/types/client.d.ts +10 -0
- package/node_modules/undici/types/interceptors.d.ts +2 -0
- package/node_modules/undici/types/mock-agent.d.ts +11 -10
- package/node_modules/undici/types/socks5-proxy-agent.d.ts +2 -0
- package/package.json +70 -49
- package/vendor/pi-client/client.d.ts +20 -15
- package/vendor/pi-client/client.d.ts.map +1 -1
- package/vendor/pi-client/client.js +248 -245
- package/vendor/pi-client/client.js.map +1 -1
- package/vendor/pi-client/connection.d.ts +4 -3
- package/vendor/pi-client/connection.d.ts.map +1 -1
- package/vendor/pi-client/connection.js +13 -9
- package/vendor/pi-client/connection.js.map +1 -1
- package/vendor/pi-client/errors.d.ts +6 -15
- package/vendor/pi-client/errors.d.ts.map +1 -1
- package/vendor/pi-client/errors.js +10 -25
- package/vendor/pi-client/errors.js.map +1 -1
- package/vendor/pi-client/index.d.ts +3 -4
- package/vendor/pi-client/index.d.ts.map +1 -1
- package/vendor/pi-client/index.js +2 -2
- package/vendor/pi-client/index.js.map +1 -1
- package/vendor/pi-client/types.d.ts +14 -8
- package/vendor/pi-client/types.d.ts.map +1 -1
- package/vendor/pi-client/types.js.map +1 -1
- package/vendor/pi-client/unix.d.ts +14 -1
- package/vendor/pi-client/unix.d.ts.map +1 -1
- package/vendor/pi-client/unix.js +138 -8
- package/vendor/pi-client/unix.js.map +1 -1
- package/vendor/pi-protocol/codec.d.ts +2 -4
- package/vendor/pi-protocol/codec.d.ts.map +1 -1
- package/vendor/pi-protocol/codec.js +7 -34
- package/vendor/pi-protocol/codec.js.map +1 -1
- package/vendor/pi-protocol/framing.d.ts +0 -2
- package/vendor/pi-protocol/framing.d.ts.map +1 -1
- package/vendor/pi-protocol/framing.js +0 -15
- package/vendor/pi-protocol/framing.js.map +1 -1
- package/vendor/pi-protocol/index.d.ts +1 -1
- package/vendor/pi-protocol/index.d.ts.map +1 -1
- package/vendor/pi-protocol/index.js +1 -1
- package/vendor/pi-protocol/index.js.map +1 -1
- package/vendor/pi-protocol/protocol.d.ts +167 -0
- package/vendor/pi-protocol/protocol.d.ts.map +1 -0
- package/vendor/pi-protocol/protocol.js +85 -0
- package/vendor/pi-protocol/protocol.js.map +1 -0
- package/dist/bun/register-bedrock.d.ts +0 -2
- package/dist/bun/register-bedrock.d.ts.map +0 -1
- package/dist/bun/register-bedrock.js +0 -4
- package/dist/bun/register-bedrock.js.map +0 -1
- package/dist/cli/experimental/auth.d.ts +0 -16
- package/dist/cli/experimental/auth.d.ts.map +0 -1
- package/dist/cli/experimental/auth.js +0 -13
- package/dist/cli/experimental/auth.js.map +0 -1
- package/dist/cli/experimental/cli.d.ts +0 -6
- package/dist/cli/experimental/cli.d.ts.map +0 -1
- package/dist/cli/experimental/cli.js +0 -5
- package/dist/cli/experimental/cli.js.map +0 -1
- package/dist/cli/experimental/command-options.d.ts +0 -17
- package/dist/cli/experimental/command-options.d.ts.map +0 -1
- package/dist/cli/experimental/command-options.js +0 -35
- package/dist/cli/experimental/command-options.js.map +0 -1
- package/dist/cli/experimental/command.d.ts +0 -63
- package/dist/cli/experimental/command.d.ts.map +0 -1
- package/dist/cli/experimental/command.js +0 -127
- package/dist/cli/experimental/command.js.map +0 -1
- package/dist/cli/experimental/commands/client.d.ts +0 -13
- package/dist/cli/experimental/commands/client.d.ts.map +0 -1
- package/dist/cli/experimental/commands/client.js +0 -25
- package/dist/cli/experimental/commands/client.js.map +0 -1
- package/dist/cli/experimental/commands/pi.d.ts +0 -15
- package/dist/cli/experimental/commands/pi.d.ts.map +0 -1
- package/dist/cli/experimental/commands/pi.js +0 -28
- package/dist/cli/experimental/commands/pi.js.map +0 -1
- package/dist/cli/experimental/commands/server.d.ts +0 -13
- package/dist/cli/experimental/commands/server.d.ts.map +0 -1
- package/dist/cli/experimental/commands/server.js +0 -25
- package/dist/cli/experimental/commands/server.js.map +0 -1
- package/dist/cli/experimental/transport-address.d.ts +0 -10
- package/dist/cli/experimental/transport-address.d.ts.map +0 -1
- package/dist/cli/experimental/transport-address.js +0 -38
- package/dist/cli/experimental/transport-address.js.map +0 -1
- package/dist/client/remote-session.d.ts +0 -53
- package/dist/client/remote-session.d.ts.map +0 -1
- package/dist/client/remote-session.js +0 -340
- package/dist/client/remote-session.js.map +0 -1
- package/dist/client/transcript.d.ts +0 -12
- package/dist/client/transcript.d.ts.map +0 -1
- package/dist/client/transcript.js +0 -98
- package/dist/client/transcript.js.map +0 -1
- package/dist/server/create-harness.d.ts +0 -26
- package/dist/server/create-harness.d.ts.map +0 -1
- package/dist/server/create-harness.js +0 -106
- package/dist/server/create-harness.js.map +0 -1
- package/dist/utils/clipboard-native.d.ts +0 -11
- package/dist/utils/clipboard-native.d.ts.map +0 -1
- package/dist/utils/clipboard-native.js +0 -20
- package/dist/utils/clipboard-native.js.map +0 -1
- package/docs/AGENTS.md +0 -67
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.d.ts +0 -100
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.js +0 -420
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.d.ts +0 -9
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.js +0 -18
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl.d.ts +0 -3
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl.js +0 -2
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.d.ts +0 -65
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.js +0 -320
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.d.ts +0 -4
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.js +0 -762
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.d.ts +0 -29
- package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.js +0 -103
- package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.js.map +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.d.ts +0 -69
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.js +0 -159
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/native/darwin/src/darwin-modifiers.c +0 -70
- package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-arm64/win32-console-mode.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-x64/win32-console-mode.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/win32/src/win32-console-mode.c +0 -119
- package/node_modules/@mariozechner/clipboard/.yarnrc.yml +0 -1
- package/node_modules/@mariozechner/clipboard/Cargo.toml +0 -45
- package/node_modules/@mariozechner/clipboard/README.md +0 -60
- package/node_modules/@mariozechner/clipboard/build.rs +0 -5
- package/node_modules/@mariozechner/clipboard/exp.ts +0 -12
- package/node_modules/@mariozechner/clipboard/index.d.ts +0 -37
- package/node_modules/@mariozechner/clipboard/index.js +0 -606
- package/node_modules/@mariozechner/clipboard/package.json +0 -45
- package/node_modules/@mariozechner/clipboard/src/clipboard_rs/common.rs +0 -307
- package/node_modules/@mariozechner/clipboard/src/clipboard_rs/mod.rs +0 -93
- package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/ios.rs +0 -313
- package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/macos.rs +0 -471
- package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/mod.rs +0 -252
- package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/wayland.rs +0 -431
- package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/win.rs +0 -712
- package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/x11.rs +0 -916
- package/node_modules/@mariozechner/clipboard/src/lib.rs +0 -194
- package/vendor/pi-client/session-handle.d.ts +0 -54
- package/vendor/pi-client/session-handle.d.ts.map +0 -1
- package/vendor/pi-client/session-handle.js +0 -50
- package/vendor/pi-client/session-handle.js.map +0 -1
- package/vendor/pi-client/state.d.ts +0 -22
- package/vendor/pi-client/state.d.ts.map +0 -1
- package/vendor/pi-client/state.js +0 -145
- package/vendor/pi-client/state.js.map +0 -1
- package/vendor/pi-protocol/schemas.d.ts +0 -13739
- package/vendor/pi-protocol/schemas.d.ts.map +0 -1
- package/vendor/pi-protocol/schemas.js +0 -386
- package/vendor/pi-protocol/schemas.js.map +0 -1
|
@@ -0,0 +1,1559 @@
|
|
|
1
|
+
import { reduceAssistantMessageFrames, } from "@earendil-works/pi-ai";
|
|
2
|
+
import { prepareBranchEntries } from "../compaction/branch-summarization.js";
|
|
3
|
+
import { prepareCompaction } from "../compaction/compaction.js";
|
|
4
|
+
import { awaitWithContext } from "../context.js";
|
|
5
|
+
import { toolResultFromMessage } from "../execution/tools.js";
|
|
6
|
+
import { formatPromptTemplateInvocation } from "../prompt-templates.js";
|
|
7
|
+
import { Closed, HarnessClosed, HarnessFault, InvalidMessage, InvalidNavigation, LaneBusy, NoActiveOperation, NothingToCompact, NothingToResume, OperationMismatch, Result, UnknownSkill, UnknownTarget, UnknownTemplate, } from "../result.js";
|
|
8
|
+
import { insertEntry, insertUsage } from "../session/commit.js";
|
|
9
|
+
import { SessionInvariantError, SessionPendingAssistantMessageError } from "../session/session.js";
|
|
10
|
+
import { branchTip, deleteValue, laneConfig, laneState as laneStateValue, operationMeta as operationMetaValue, operationPreparation, operationResult as operationResultValue, operationState as operationStateValue, operationToolArgs, pendingEntry, pendingToolOutput, setValue, } from "../session/values.js";
|
|
11
|
+
import { formatSkillInvocation } from "../skills.js";
|
|
12
|
+
import { durableBranchPreparation, durableCompactionPreparation } from "./drive/structural.js";
|
|
13
|
+
import { driveOperation } from "./drive.js";
|
|
14
|
+
import { readAssistantFrames } from "./progress.js";
|
|
15
|
+
import { chainEntries, committedEntryEvents, readLaneQueues } from "./transcript.js";
|
|
16
|
+
import { Drive, } from "./types.js";
|
|
17
|
+
function isPromiseLike(value) {
|
|
18
|
+
if (value === null || (typeof value !== "object" && typeof value !== "function"))
|
|
19
|
+
return false;
|
|
20
|
+
return "then" in value && typeof value.then === "function";
|
|
21
|
+
}
|
|
22
|
+
function inboxItems(inbox, kind) {
|
|
23
|
+
return inbox.filter((item) => item.kind === kind);
|
|
24
|
+
}
|
|
25
|
+
function withoutInboxItems(inbox, removed) {
|
|
26
|
+
const removedIds = new Set(removed.map((item) => item.entryId));
|
|
27
|
+
return inbox.filter((item) => !removedIds.has(item.entryId));
|
|
28
|
+
}
|
|
29
|
+
function selectAcceptedInbox(inbox, steeringMode, followUpMode) {
|
|
30
|
+
let steerTaken = false;
|
|
31
|
+
let followUpTaken = false;
|
|
32
|
+
const selected = [];
|
|
33
|
+
const remainder = [];
|
|
34
|
+
for (const item of inbox) {
|
|
35
|
+
const eligible = item.kind === "write" ||
|
|
36
|
+
item.kind === "nextRun" ||
|
|
37
|
+
(item.kind === "steer" && (steeringMode === "all" || !steerTaken)) ||
|
|
38
|
+
(item.kind === "followUp" && (followUpMode === "all" || !followUpTaken));
|
|
39
|
+
if (eligible) {
|
|
40
|
+
selected.push(item);
|
|
41
|
+
if (item.kind === "steer")
|
|
42
|
+
steerTaken = true;
|
|
43
|
+
if (item.kind === "followUp")
|
|
44
|
+
followUpTaken = true;
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
remainder.push(item);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return { selected, remainder };
|
|
51
|
+
}
|
|
52
|
+
function capturedSettings(config) {
|
|
53
|
+
return {
|
|
54
|
+
compaction: config.compaction,
|
|
55
|
+
steeringMode: config.steeringMode,
|
|
56
|
+
followUpMode: config.followUpMode,
|
|
57
|
+
toolExecution: config.toolExecution,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function durableLaneState(state, currentOperationId, inbox = state.inbox, lastOperationId = state.lastOperationId) {
|
|
61
|
+
return { currentOperationId, lastOperationId, inbox };
|
|
62
|
+
}
|
|
63
|
+
function pendingEntryWrite(entryId, pending) {
|
|
64
|
+
return pending.type === "message"
|
|
65
|
+
? { id: entryId, parentId: null, type: "message", message: pending.payload }
|
|
66
|
+
: {
|
|
67
|
+
id: entryId,
|
|
68
|
+
parentId: null,
|
|
69
|
+
type: "custom",
|
|
70
|
+
customType: pending.customType,
|
|
71
|
+
...(pending.payload === undefined ? {} : { data: pending.payload }),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
function capturedModel(operation) {
|
|
75
|
+
const { state } = operation;
|
|
76
|
+
switch (state.at) {
|
|
77
|
+
case "assistant.ready":
|
|
78
|
+
case "assistant.effect_pending":
|
|
79
|
+
case "assistant.retry_wait":
|
|
80
|
+
return state.generationContext.configuration.model;
|
|
81
|
+
case "tools":
|
|
82
|
+
return state.batch.configuration.model;
|
|
83
|
+
case "deferred.suspended":
|
|
84
|
+
case "deferred.effect_pending":
|
|
85
|
+
return state.configuration.model;
|
|
86
|
+
case "summary.ready":
|
|
87
|
+
case "summary.effect_pending":
|
|
88
|
+
case "summary.retry_wait":
|
|
89
|
+
return state.summaryContext.configuration.model;
|
|
90
|
+
default:
|
|
91
|
+
return undefined;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/** Runtime implementation of one configured lane. */
|
|
95
|
+
export class Lane {
|
|
96
|
+
constructor(name, session, models, hooks, state, onFault, emitBatch, installWatch, readConfig) {
|
|
97
|
+
this.session = session;
|
|
98
|
+
this.models = models;
|
|
99
|
+
this.hooks = hooks;
|
|
100
|
+
this.name = name;
|
|
101
|
+
this.state = state;
|
|
102
|
+
this.onFault = onFault;
|
|
103
|
+
this.emitBatch = emitBatch;
|
|
104
|
+
this.installWatch = installWatch;
|
|
105
|
+
this.config = readConfig;
|
|
106
|
+
let resolveStateChange;
|
|
107
|
+
this.stateChange = new Promise((resolve) => {
|
|
108
|
+
resolveStateChange = resolve;
|
|
109
|
+
});
|
|
110
|
+
this.resolveStateChange = resolveStateChange;
|
|
111
|
+
}
|
|
112
|
+
async getTipId(_context) {
|
|
113
|
+
this.assertOpen();
|
|
114
|
+
return this.state.tipId;
|
|
115
|
+
}
|
|
116
|
+
async getResult(operationId, context) {
|
|
117
|
+
this.assertOpen();
|
|
118
|
+
return (await this.session.getValue(operationResultValue(operationId), context))?.value;
|
|
119
|
+
}
|
|
120
|
+
readConfig() {
|
|
121
|
+
return this.config();
|
|
122
|
+
}
|
|
123
|
+
mismatch(expected, currentOperationId, lastOperationId) {
|
|
124
|
+
return new OperationMismatch({
|
|
125
|
+
lane: this.name,
|
|
126
|
+
expectedOperationId: expected,
|
|
127
|
+
...(currentOperationId === null ? {} : { currentOperationId }),
|
|
128
|
+
...(lastOperationId === null ? {} : { lastOperationId }),
|
|
129
|
+
message: `Operation ${expected} does not own lane ${JSON.stringify(this.name)}`,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Run one effect-free command on this lane's serialized mutation line. Owned `state` is authoritative; the
|
|
134
|
+
* planner receives that state plus a read-only reader for bounded payload lookups. Committed values and owned
|
|
135
|
+
* state are immutable snapshots: update them by replacement, never in place. State-independent input validation
|
|
136
|
+
* belongs before `command()`, while every state-dependent decision belongs inside its planner.
|
|
137
|
+
*
|
|
138
|
+
* A planner may choose exactly one outcome:
|
|
139
|
+
* - `commit` commits once, publishes `next`, then synchronously materializes the caller result from
|
|
140
|
+
* storage-assigned `CommitResult` metadata;
|
|
141
|
+
* - `return` returns without a commit, boxed so a promise value is not awaited while holding the Session line;
|
|
142
|
+
* - `reject` rejects outside the mutation/fault boundary as an expected caller error without a commit.
|
|
143
|
+
*
|
|
144
|
+
* Planner, commit, and materialization errors fault the harness before releasing the Session line. Close/fault gates
|
|
145
|
+
* are checked both before queueing and when the callback starts: close-first rejects, while a callback admitted
|
|
146
|
+
* before close may finish its commit, publish memory, and resolve without another open check. Never invoke providers,
|
|
147
|
+
* tools, hooks, timers, event handlers, or wait for task completion here; perform those after `command()` returns.
|
|
148
|
+
*/
|
|
149
|
+
async readLane(read, context) {
|
|
150
|
+
this.assertOpen();
|
|
151
|
+
try {
|
|
152
|
+
return await this.session.mutate(async (reader) => {
|
|
153
|
+
this.assertOpen();
|
|
154
|
+
try {
|
|
155
|
+
return await read(this.state, reader);
|
|
156
|
+
}
|
|
157
|
+
catch (error) {
|
|
158
|
+
if (this.closedError !== undefined)
|
|
159
|
+
throw this.closedError;
|
|
160
|
+
throw this.onFault(error, context);
|
|
161
|
+
}
|
|
162
|
+
}, context);
|
|
163
|
+
}
|
|
164
|
+
catch (error) {
|
|
165
|
+
if (this.closedError !== undefined)
|
|
166
|
+
throw this.closedError;
|
|
167
|
+
throw error;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
async command(plan, context) {
|
|
171
|
+
this.assertOpen();
|
|
172
|
+
while (this.idleOwner !== undefined) {
|
|
173
|
+
await awaitWithContext(Promise.race([this.idleOwner, this.stateChange]), context);
|
|
174
|
+
this.assertOpen();
|
|
175
|
+
}
|
|
176
|
+
let outcome;
|
|
177
|
+
try {
|
|
178
|
+
outcome = await this.session.mutate(async (mutator) => {
|
|
179
|
+
this.assertOpen();
|
|
180
|
+
if (this.idleOwner !== undefined) {
|
|
181
|
+
return { kind: "idle_blocked", owner: this.idleOwner, change: this.stateChange };
|
|
182
|
+
}
|
|
183
|
+
try {
|
|
184
|
+
const decision = await plan(this.state, mutator);
|
|
185
|
+
switch (decision.kind) {
|
|
186
|
+
case "return":
|
|
187
|
+
return { kind: "return", result: decision.result };
|
|
188
|
+
case "reject":
|
|
189
|
+
return { kind: "reject", error: decision.error };
|
|
190
|
+
case "commit": {
|
|
191
|
+
const commit = await mutator.commit(decision.writes, context);
|
|
192
|
+
this.state = decision.next;
|
|
193
|
+
this.signalStateChange();
|
|
194
|
+
const result = decision.materialize(commit);
|
|
195
|
+
if (isPromiseLike(result)) {
|
|
196
|
+
throw new TypeError("Lane command materialize() must be synchronous");
|
|
197
|
+
}
|
|
198
|
+
const events = decision.events?.(commit) ?? [];
|
|
199
|
+
const delivery = events.length === 0 ? undefined : this.emitBatch(events, context);
|
|
200
|
+
return { kind: "return", result, ...(delivery === undefined ? {} : { delivery }) };
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
catch (error) {
|
|
205
|
+
if (this.closedError !== undefined)
|
|
206
|
+
throw this.closedError;
|
|
207
|
+
throw this.onFault(error, context);
|
|
208
|
+
}
|
|
209
|
+
}, context);
|
|
210
|
+
}
|
|
211
|
+
catch (error) {
|
|
212
|
+
if (this.closedError !== undefined)
|
|
213
|
+
throw this.closedError;
|
|
214
|
+
throw error;
|
|
215
|
+
}
|
|
216
|
+
if (outcome.kind === "idle_blocked") {
|
|
217
|
+
await awaitWithContext(Promise.race([outcome.owner, outcome.change]), context);
|
|
218
|
+
this.assertOpen();
|
|
219
|
+
return this.command(plan, context);
|
|
220
|
+
}
|
|
221
|
+
if (outcome.kind === "reject")
|
|
222
|
+
throw outcome.error;
|
|
223
|
+
await outcome.delivery;
|
|
224
|
+
return outcome.result;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Run a command against the current operation even after cancellation is requested. Use this to settle admitted
|
|
228
|
+
* effects, finish the operation, or update concurrent child state. The capability narrows the planner's state type;
|
|
229
|
+
* the Drive continuation remains the sole top-level state writer.
|
|
230
|
+
*/
|
|
231
|
+
settleOperation(_capability, plan, context) {
|
|
232
|
+
return this.command(async (state, reader) => {
|
|
233
|
+
const operation = state.operation;
|
|
234
|
+
const decision = await plan(state, operation.state, operation.meta, reader);
|
|
235
|
+
if (decision.kind === "commit") {
|
|
236
|
+
return {
|
|
237
|
+
kind: "commit",
|
|
238
|
+
writes: [
|
|
239
|
+
...decision.writes,
|
|
240
|
+
setValue(operationStateValue(operation.meta.operationId), decision.operationState),
|
|
241
|
+
...(decision.lane?.inbox === undefined
|
|
242
|
+
? []
|
|
243
|
+
: [
|
|
244
|
+
setValue(laneStateValue(this.name), durableLaneState(state, operation.meta.operationId, decision.lane.inbox)),
|
|
245
|
+
]),
|
|
246
|
+
],
|
|
247
|
+
next: {
|
|
248
|
+
...state,
|
|
249
|
+
...decision.lane,
|
|
250
|
+
operation: { meta: operation.meta, state: decision.operationState },
|
|
251
|
+
},
|
|
252
|
+
materialize: decision.materialize,
|
|
253
|
+
...(decision.events === undefined ? {} : { events: decision.events }),
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
if (decision.kind !== "finish")
|
|
257
|
+
return decision;
|
|
258
|
+
const inbox = decision.lane?.inbox ?? state.inbox;
|
|
259
|
+
return {
|
|
260
|
+
kind: "commit",
|
|
261
|
+
writes: [
|
|
262
|
+
...decision.writes,
|
|
263
|
+
setValue(operationResultValue(operation.meta.operationId), decision.record),
|
|
264
|
+
setValue(laneStateValue(this.name), durableLaneState(state, null, inbox, operation.meta.operationId)),
|
|
265
|
+
],
|
|
266
|
+
next: {
|
|
267
|
+
...state,
|
|
268
|
+
...decision.lane,
|
|
269
|
+
inbox,
|
|
270
|
+
lastOperationId: operation.meta.operationId,
|
|
271
|
+
operation: null,
|
|
272
|
+
},
|
|
273
|
+
materialize: decision.materialize,
|
|
274
|
+
...(decision.events === undefined ? {} : { events: decision.events }),
|
|
275
|
+
};
|
|
276
|
+
}, context);
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Run an ordinary operation command only while durable control is running. Use this before starting new hooks,
|
|
280
|
+
* effects, or forward progress. Returns `cancel_requested` without invoking the planner once cancellation is requested.
|
|
281
|
+
*/
|
|
282
|
+
continueOperation(capability, plan, context) {
|
|
283
|
+
return this.settleOperation(capability, async (state, latest, meta, reader) => {
|
|
284
|
+
if (latest.control.status === "cancel_requested") {
|
|
285
|
+
return { kind: "return", result: { kind: "cancel_requested" } };
|
|
286
|
+
}
|
|
287
|
+
const decision = await plan(state, latest, meta, reader);
|
|
288
|
+
if (decision.kind === "return") {
|
|
289
|
+
return { kind: "return", result: { kind: "result", value: decision.result } };
|
|
290
|
+
}
|
|
291
|
+
return {
|
|
292
|
+
...decision,
|
|
293
|
+
materialize: (commit) => ({ kind: "result", value: decision.materialize(commit) }),
|
|
294
|
+
};
|
|
295
|
+
}, context);
|
|
296
|
+
}
|
|
297
|
+
async accept(request, context) {
|
|
298
|
+
if (this.closedError instanceof HarnessClosed) {
|
|
299
|
+
return Result.err(new Closed({ message: this.closedError.message }));
|
|
300
|
+
}
|
|
301
|
+
this.assertOpen();
|
|
302
|
+
const startedAt = Date.now();
|
|
303
|
+
const operationId = request.operationId ?? this.session.idGenerator.next(startedAt);
|
|
304
|
+
const acceptanceConfig = this.readConfig();
|
|
305
|
+
if (request.kind === "compaction") {
|
|
306
|
+
return this.acceptCompaction(request, operationId, startedAt, acceptanceConfig, context);
|
|
307
|
+
}
|
|
308
|
+
if (request.kind === "navigation") {
|
|
309
|
+
return this.acceptNavigation(request, operationId, startedAt, acceptanceConfig, context);
|
|
310
|
+
}
|
|
311
|
+
return this.acceptRun(request, operationId, startedAt, acceptanceConfig, context);
|
|
312
|
+
}
|
|
313
|
+
async acceptRun(request, operationId, startedAt, acceptanceConfig, context) {
|
|
314
|
+
let messages;
|
|
315
|
+
switch (request.kind) {
|
|
316
|
+
case "prompt":
|
|
317
|
+
if (typeof request.prompt !== "string") {
|
|
318
|
+
messages = Array.isArray(request.prompt) ? request.prompt : [request.prompt];
|
|
319
|
+
}
|
|
320
|
+
else {
|
|
321
|
+
const images = request.images ?? [];
|
|
322
|
+
messages =
|
|
323
|
+
request.prompt.length === 0 && images.length === 0
|
|
324
|
+
? []
|
|
325
|
+
: [
|
|
326
|
+
{
|
|
327
|
+
role: "user",
|
|
328
|
+
content: [
|
|
329
|
+
...(request.prompt.length === 0
|
|
330
|
+
? []
|
|
331
|
+
: [{ type: "text", text: request.prompt }]),
|
|
332
|
+
...images,
|
|
333
|
+
],
|
|
334
|
+
timestamp: startedAt,
|
|
335
|
+
},
|
|
336
|
+
];
|
|
337
|
+
}
|
|
338
|
+
break;
|
|
339
|
+
case "skill": {
|
|
340
|
+
const skill = acceptanceConfig.resources.skills?.find((candidate) => candidate.name === request.name);
|
|
341
|
+
if (skill === undefined) {
|
|
342
|
+
return Result.err(new UnknownSkill({ name: request.name, message: `Unknown skill: ${request.name}` }));
|
|
343
|
+
}
|
|
344
|
+
messages = [
|
|
345
|
+
{
|
|
346
|
+
role: "user",
|
|
347
|
+
content: [{ type: "text", text: formatSkillInvocation(skill, request.additionalInstructions) }],
|
|
348
|
+
timestamp: startedAt,
|
|
349
|
+
},
|
|
350
|
+
];
|
|
351
|
+
break;
|
|
352
|
+
}
|
|
353
|
+
case "prompt_template": {
|
|
354
|
+
const template = acceptanceConfig.resources.promptTemplates?.find((candidate) => candidate.name === request.name);
|
|
355
|
+
if (template === undefined) {
|
|
356
|
+
return Result.err(new UnknownTemplate({ name: request.name, message: `Unknown prompt template: ${request.name}` }));
|
|
357
|
+
}
|
|
358
|
+
const content = formatPromptTemplateInvocation(template, request.args);
|
|
359
|
+
messages =
|
|
360
|
+
content.length === 0
|
|
361
|
+
? []
|
|
362
|
+
: [{ role: "user", content: [{ type: "text", text: content }], timestamp: startedAt }];
|
|
363
|
+
break;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
for (const message of messages) {
|
|
367
|
+
if (message.role === "assistant" && message.stopReason === "pending") {
|
|
368
|
+
return Result.err(new InvalidMessage({
|
|
369
|
+
lane: this.name,
|
|
370
|
+
reason: "pending_assistant",
|
|
371
|
+
message: "Cannot accept a pending assistant message",
|
|
372
|
+
}));
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
const prompt = messages.map((message) => ({ id: this.session.idGenerator.next(startedAt), message }));
|
|
376
|
+
return this.command(async (state, reader) => {
|
|
377
|
+
if (state.operation !== null) {
|
|
378
|
+
return {
|
|
379
|
+
kind: "return",
|
|
380
|
+
result: Result.err(new LaneBusy({
|
|
381
|
+
lane: this.name,
|
|
382
|
+
operationId: state.operation.meta.operationId,
|
|
383
|
+
operationKind: state.operation.meta.intent.kind,
|
|
384
|
+
message: `Lane ${JSON.stringify(this.name)} already has an active operation`,
|
|
385
|
+
})),
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
const { selected: selectedItems, remainder: inbox } = selectAcceptedInbox(state.inbox, acceptanceConfig.steeringMode, acceptanceConfig.followUpMode);
|
|
389
|
+
const captured = await Promise.all(selectedItems.map(async (item) => {
|
|
390
|
+
const stored = await reader.getValue(pendingEntry(item.entryId), context);
|
|
391
|
+
if (stored === undefined) {
|
|
392
|
+
throw new SessionInvariantError(`Pending ${item.kind} entry ${item.entryId} is missing its payload`);
|
|
393
|
+
}
|
|
394
|
+
if (item.kind !== "write" && stored.value.type !== "message") {
|
|
395
|
+
throw new SessionInvariantError(`Pending ${item.kind} entry ${item.entryId} is not a message`);
|
|
396
|
+
}
|
|
397
|
+
if (stored.value.type === "message" &&
|
|
398
|
+
stored.value.payload.role === "assistant" &&
|
|
399
|
+
stored.value.payload.stopReason === "pending") {
|
|
400
|
+
throw new SessionInvariantError(`Pending ${item.kind} entry ${item.entryId} contains a pending assistant`);
|
|
401
|
+
}
|
|
402
|
+
return { item, pending: stored.value };
|
|
403
|
+
}));
|
|
404
|
+
const hasCapturedConversation = selectedItems.some((item) => item.kind !== "write");
|
|
405
|
+
if (prompt.length === 0 && !hasCapturedConversation) {
|
|
406
|
+
return {
|
|
407
|
+
kind: "return",
|
|
408
|
+
result: Result.err(new InvalidMessage({
|
|
409
|
+
lane: this.name,
|
|
410
|
+
reason: "empty",
|
|
411
|
+
message: "Acceptance must append at least one message",
|
|
412
|
+
})),
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
const entries = chainEntries(state.tipId, [
|
|
416
|
+
...captured.map(({ item, pending }) => pendingEntryWrite(item.entryId, pending)),
|
|
417
|
+
...prompt.map(({ id, message }) => ({ id, parentId: null, type: "message", message })),
|
|
418
|
+
]);
|
|
419
|
+
const parentId = entries[entries.length - 1].id;
|
|
420
|
+
const meta = {
|
|
421
|
+
operationId,
|
|
422
|
+
lane: this.name,
|
|
423
|
+
sourceTipId: state.tipId,
|
|
424
|
+
startedAt,
|
|
425
|
+
intent: { kind: "run", promptEntryIds: prompt.map(({ id }) => id) },
|
|
426
|
+
};
|
|
427
|
+
const operationState = {
|
|
428
|
+
at: "starting",
|
|
429
|
+
control: { status: "running" },
|
|
430
|
+
settings: capturedSettings(acceptanceConfig),
|
|
431
|
+
latestAssistantEntryId: null,
|
|
432
|
+
};
|
|
433
|
+
const remainingQueues = await readLaneQueues(reader, inbox, context);
|
|
434
|
+
const next = {
|
|
435
|
+
...state,
|
|
436
|
+
tipId: parentId,
|
|
437
|
+
inbox,
|
|
438
|
+
operation: { meta, state: operationState },
|
|
439
|
+
};
|
|
440
|
+
return {
|
|
441
|
+
kind: "commit",
|
|
442
|
+
writes: [
|
|
443
|
+
...entries.map((entry) => insertEntry(entry)),
|
|
444
|
+
...selectedItems.map((item) => deleteValue(pendingEntry(item.entryId))),
|
|
445
|
+
setValue(branchTip(this.name), parentId),
|
|
446
|
+
setValue(operationMetaValue(operationId), meta),
|
|
447
|
+
setValue(operationStateValue(operationId), operationState),
|
|
448
|
+
setValue(laneStateValue(this.name), durableLaneState(state, operationId, inbox)),
|
|
449
|
+
],
|
|
450
|
+
next,
|
|
451
|
+
materialize: () => Result.ok({ operationId, kind: "run", startedAt }),
|
|
452
|
+
events: (commit) => {
|
|
453
|
+
const events = [
|
|
454
|
+
{ type: "run_start", runId: operationId, startedAt, lane: this.name },
|
|
455
|
+
...committedEntryEvents(entries, commit, this.name, operationId),
|
|
456
|
+
];
|
|
457
|
+
if (selectedItems.length > 0) {
|
|
458
|
+
events.push({ type: "queue_update", queues: remainingQueues, lane: this.name });
|
|
459
|
+
}
|
|
460
|
+
return events;
|
|
461
|
+
},
|
|
462
|
+
};
|
|
463
|
+
}, context);
|
|
464
|
+
}
|
|
465
|
+
acceptCompaction(request, operationId, startedAt, acceptanceConfig, context) {
|
|
466
|
+
const taskId = this.session.idGenerator.next(startedAt);
|
|
467
|
+
return this.command(async (state, reader) => {
|
|
468
|
+
if (state.operation !== null) {
|
|
469
|
+
return {
|
|
470
|
+
kind: "return",
|
|
471
|
+
result: Result.err(new LaneBusy({
|
|
472
|
+
lane: this.name,
|
|
473
|
+
operationId: state.operation.meta.operationId,
|
|
474
|
+
operationKind: state.operation.meta.intent.kind,
|
|
475
|
+
message: `Lane ${JSON.stringify(this.name)} already has an active operation`,
|
|
476
|
+
})),
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
const path = state.tipId === null
|
|
480
|
+
? []
|
|
481
|
+
: (await reader.scanBranch({ start: state.tipId, stopAtType: "compaction", order: "newestFirst" }, context)).reverse();
|
|
482
|
+
const prepared = prepareCompaction(path, acceptanceConfig.compaction);
|
|
483
|
+
if (!prepared.ok)
|
|
484
|
+
throw prepared.error;
|
|
485
|
+
if (prepared.value === undefined) {
|
|
486
|
+
return {
|
|
487
|
+
kind: "return",
|
|
488
|
+
result: Result.err(new NothingToCompact({
|
|
489
|
+
lane: this.name,
|
|
490
|
+
message: `Lane ${JSON.stringify(this.name)} has nothing to compact`,
|
|
491
|
+
})),
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
const meta = {
|
|
495
|
+
operationId,
|
|
496
|
+
lane: this.name,
|
|
497
|
+
sourceTipId: state.tipId,
|
|
498
|
+
startedAt,
|
|
499
|
+
intent: {
|
|
500
|
+
kind: "compaction",
|
|
501
|
+
...(request.customInstructions === undefined ? {} : { customInstructions: request.customInstructions }),
|
|
502
|
+
},
|
|
503
|
+
};
|
|
504
|
+
const operationState = {
|
|
505
|
+
at: "summary.deciding",
|
|
506
|
+
control: { status: "running" },
|
|
507
|
+
settings: capturedSettings(acceptanceConfig),
|
|
508
|
+
latestAssistantEntryId: null,
|
|
509
|
+
task: {
|
|
510
|
+
taskId,
|
|
511
|
+
reason: "manual",
|
|
512
|
+
...(request.customInstructions === undefined ? {} : { customInstructions: request.customInstructions }),
|
|
513
|
+
boundary: { kind: "finish" },
|
|
514
|
+
},
|
|
515
|
+
};
|
|
516
|
+
return {
|
|
517
|
+
kind: "commit",
|
|
518
|
+
writes: [
|
|
519
|
+
setValue(operationPreparation(operationId, taskId), durableCompactionPreparation(prepared.value)),
|
|
520
|
+
setValue(operationMetaValue(operationId), meta),
|
|
521
|
+
setValue(operationStateValue(operationId), operationState),
|
|
522
|
+
setValue(laneStateValue(this.name), durableLaneState(state, operationId)),
|
|
523
|
+
],
|
|
524
|
+
next: { ...state, operation: { meta, state: operationState } },
|
|
525
|
+
materialize: () => Result.ok({ operationId, kind: "compaction", startedAt }),
|
|
526
|
+
events: () => [
|
|
527
|
+
{ type: "compaction_start", lane: this.name, runId: operationId, reason: "manual", startedAt },
|
|
528
|
+
],
|
|
529
|
+
};
|
|
530
|
+
}, context);
|
|
531
|
+
}
|
|
532
|
+
async acceptNavigation(request, operationId, startedAt, acceptanceConfig, context) {
|
|
533
|
+
const taskId = this.session.idGenerator.next(startedAt);
|
|
534
|
+
const targetId = request.targetId;
|
|
535
|
+
const options = request.options ?? {};
|
|
536
|
+
const summarize = options.summarize ?? false;
|
|
537
|
+
for (;;) {
|
|
538
|
+
const observedTipId = this.state.tipId;
|
|
539
|
+
let preparation;
|
|
540
|
+
if (summarize && observedTipId !== null && targetId !== null) {
|
|
541
|
+
const target = await this.session.getEntries([targetId], context);
|
|
542
|
+
if (target.has(targetId)) {
|
|
543
|
+
const [oldPath, targetPath] = await Promise.all([
|
|
544
|
+
this.session.scanBranch({ start: observedTipId, order: "newestFirst" }, context),
|
|
545
|
+
this.session.scanBranch({ start: targetId, order: "newestFirst" }, context),
|
|
546
|
+
]);
|
|
547
|
+
const oldIds = new Set(oldPath.map((entry) => entry.id));
|
|
548
|
+
const commonAncestorId = targetPath.find((entry) => oldIds.has(entry.id))?.id ?? null;
|
|
549
|
+
preparation = prepareBranchEntries(oldPath
|
|
550
|
+
.slice(0, commonAncestorId === null
|
|
551
|
+
? oldPath.length
|
|
552
|
+
: oldPath.findIndex((entry) => entry.id === commonAncestorId))
|
|
553
|
+
.reverse());
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
const accepted = await this.command(async (state, reader) => {
|
|
557
|
+
if (state.operation !== null) {
|
|
558
|
+
return {
|
|
559
|
+
kind: "return",
|
|
560
|
+
result: Result.err(new LaneBusy({
|
|
561
|
+
lane: this.name,
|
|
562
|
+
operationId: state.operation.meta.operationId,
|
|
563
|
+
operationKind: state.operation.meta.intent.kind,
|
|
564
|
+
message: `Lane ${JSON.stringify(this.name)} already has an active operation`,
|
|
565
|
+
})),
|
|
566
|
+
};
|
|
567
|
+
}
|
|
568
|
+
if (state.tipId !== observedTipId)
|
|
569
|
+
return { kind: "return", result: undefined };
|
|
570
|
+
if (targetId === state.tipId) {
|
|
571
|
+
return {
|
|
572
|
+
kind: "return",
|
|
573
|
+
result: Result.err(new InvalidNavigation({
|
|
574
|
+
lane: this.name,
|
|
575
|
+
reason: "current_tip",
|
|
576
|
+
message: "Navigation target must differ from the current tip",
|
|
577
|
+
})),
|
|
578
|
+
};
|
|
579
|
+
}
|
|
580
|
+
if (targetId === null && options.label !== undefined) {
|
|
581
|
+
return {
|
|
582
|
+
kind: "return",
|
|
583
|
+
result: Result.err(new InvalidNavigation({
|
|
584
|
+
lane: this.name,
|
|
585
|
+
reason: "root_label",
|
|
586
|
+
message: "Root navigation cannot set a label",
|
|
587
|
+
})),
|
|
588
|
+
};
|
|
589
|
+
}
|
|
590
|
+
if (summarize && (state.tipId === null || targetId === null)) {
|
|
591
|
+
return {
|
|
592
|
+
kind: "return",
|
|
593
|
+
result: Result.err(new InvalidNavigation({
|
|
594
|
+
lane: this.name,
|
|
595
|
+
reason: state.tipId === null ? "source_root" : "target_root",
|
|
596
|
+
message: "Summarized navigation requires non-root source and target entries",
|
|
597
|
+
})),
|
|
598
|
+
};
|
|
599
|
+
}
|
|
600
|
+
if (targetId !== null && !(await reader.getEntries([targetId], context)).has(targetId)) {
|
|
601
|
+
return {
|
|
602
|
+
kind: "return",
|
|
603
|
+
result: Result.err(new UnknownTarget({ targetId, message: `Unknown target: ${targetId}` })),
|
|
604
|
+
};
|
|
605
|
+
}
|
|
606
|
+
const intent = {
|
|
607
|
+
kind: "navigation",
|
|
608
|
+
targetId,
|
|
609
|
+
summarize,
|
|
610
|
+
...(options.label === undefined ? {} : { label: options.label }),
|
|
611
|
+
...(options.customInstructions === undefined ? {} : { customInstructions: options.customInstructions }),
|
|
612
|
+
};
|
|
613
|
+
const meta = {
|
|
614
|
+
operationId,
|
|
615
|
+
lane: this.name,
|
|
616
|
+
sourceTipId: state.tipId,
|
|
617
|
+
startedAt,
|
|
618
|
+
intent,
|
|
619
|
+
};
|
|
620
|
+
const operationScope = {
|
|
621
|
+
control: { status: "running" },
|
|
622
|
+
settings: capturedSettings(acceptanceConfig),
|
|
623
|
+
latestAssistantEntryId: null,
|
|
624
|
+
};
|
|
625
|
+
let operationState;
|
|
626
|
+
const writes = [];
|
|
627
|
+
if (summarize) {
|
|
628
|
+
if (state.tipId === null || targetId === null || preparation === undefined) {
|
|
629
|
+
throw new SessionInvariantError("Validated summarized navigation is missing its preparation");
|
|
630
|
+
}
|
|
631
|
+
writes.push(setValue(operationPreparation(operationId, taskId), durableBranchPreparation(preparation)));
|
|
632
|
+
operationState = {
|
|
633
|
+
...operationScope,
|
|
634
|
+
at: "summary.deciding",
|
|
635
|
+
task: {
|
|
636
|
+
taskId,
|
|
637
|
+
...(options.customInstructions === undefined
|
|
638
|
+
? {}
|
|
639
|
+
: { customInstructions: options.customInstructions }),
|
|
640
|
+
boundary: {
|
|
641
|
+
kind: "commit_navigation",
|
|
642
|
+
targetId,
|
|
643
|
+
...(options.label === undefined ? {} : { label: options.label }),
|
|
644
|
+
},
|
|
645
|
+
},
|
|
646
|
+
};
|
|
647
|
+
}
|
|
648
|
+
else {
|
|
649
|
+
operationState = {
|
|
650
|
+
...operationScope,
|
|
651
|
+
at: "navigation.ready_to_commit",
|
|
652
|
+
targetId,
|
|
653
|
+
...(options.label === undefined ? {} : { label: options.label }),
|
|
654
|
+
};
|
|
655
|
+
}
|
|
656
|
+
writes.push(setValue(operationMetaValue(operationId), meta), setValue(operationStateValue(operationId), operationState), setValue(laneStateValue(this.name), durableLaneState(state, operationId)));
|
|
657
|
+
return {
|
|
658
|
+
kind: "commit",
|
|
659
|
+
writes,
|
|
660
|
+
next: { ...state, operation: { meta, state: operationState } },
|
|
661
|
+
materialize: () => Result.ok({ operationId, kind: "navigation", startedAt }),
|
|
662
|
+
events: () => [{ type: "navigation_start", lane: this.name, runId: operationId, targetId, startedAt }],
|
|
663
|
+
};
|
|
664
|
+
}, context);
|
|
665
|
+
if (accepted !== undefined)
|
|
666
|
+
return accepted;
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
async drive(options, context) {
|
|
670
|
+
if (this.closedError instanceof HarnessClosed) {
|
|
671
|
+
return Result.err(new Closed({ message: this.closedError.message }));
|
|
672
|
+
}
|
|
673
|
+
this.assertOpen();
|
|
674
|
+
for (;;) {
|
|
675
|
+
const claim = await this.command(async (state, reader) => {
|
|
676
|
+
const signal = context.abortSignal;
|
|
677
|
+
if (signal?.aborted) {
|
|
678
|
+
const reason = signal.reason;
|
|
679
|
+
return {
|
|
680
|
+
kind: "reject",
|
|
681
|
+
error: reason instanceof Error ? reason : new DOMException("The operation was aborted", "AbortError"),
|
|
682
|
+
};
|
|
683
|
+
}
|
|
684
|
+
if (state.operation?.meta.operationId === options.operationId) {
|
|
685
|
+
if (this.activeDrive === undefined) {
|
|
686
|
+
const drive = new Drive(options, context);
|
|
687
|
+
this.activeDrive = drive;
|
|
688
|
+
this.signalStateChange();
|
|
689
|
+
return { kind: "return", result: { kind: "observe", drive, installed: true } };
|
|
690
|
+
}
|
|
691
|
+
return {
|
|
692
|
+
kind: "return",
|
|
693
|
+
result: this.activeDrive.operationId === options.operationId
|
|
694
|
+
? { kind: "observe", drive: this.activeDrive, installed: false }
|
|
695
|
+
: { kind: "occupied", drive: this.activeDrive },
|
|
696
|
+
};
|
|
697
|
+
}
|
|
698
|
+
const stored = await reader.getValue(operationResultValue(options.operationId), context);
|
|
699
|
+
return stored === undefined
|
|
700
|
+
? {
|
|
701
|
+
kind: "return",
|
|
702
|
+
result: {
|
|
703
|
+
kind: "mismatch",
|
|
704
|
+
error: this.mismatch(options.operationId, state.operation?.meta.operationId ?? null, state.lastOperationId),
|
|
705
|
+
},
|
|
706
|
+
}
|
|
707
|
+
: { kind: "return", result: { kind: "settled", outcome: stored.value } };
|
|
708
|
+
}, context);
|
|
709
|
+
if (claim.kind === "settled")
|
|
710
|
+
return Result.ok({ kind: "settled", outcome: claim.outcome });
|
|
711
|
+
if (claim.kind === "mismatch")
|
|
712
|
+
return Result.err(claim.error);
|
|
713
|
+
if (claim.kind === "occupied") {
|
|
714
|
+
await awaitWithContext(claim.drive.completion, context);
|
|
715
|
+
continue;
|
|
716
|
+
}
|
|
717
|
+
if (claim.installed) {
|
|
718
|
+
void driveOperation(this, claim.drive).then((outcome) => {
|
|
719
|
+
if (this.activeDrive === claim.drive) {
|
|
720
|
+
this.activeDrive = undefined;
|
|
721
|
+
this.signalStateChange();
|
|
722
|
+
}
|
|
723
|
+
claim.drive.settle(outcome);
|
|
724
|
+
}, (error) => {
|
|
725
|
+
let failure = this.closedError;
|
|
726
|
+
if (failure === undefined) {
|
|
727
|
+
try {
|
|
728
|
+
failure = this.onFault(error, claim.drive.context);
|
|
729
|
+
}
|
|
730
|
+
catch (faultError) {
|
|
731
|
+
failure = faultError;
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
if (this.activeDrive === claim.drive) {
|
|
735
|
+
this.activeDrive = undefined;
|
|
736
|
+
this.signalStateChange();
|
|
737
|
+
}
|
|
738
|
+
claim.drive.fail(failure);
|
|
739
|
+
});
|
|
740
|
+
}
|
|
741
|
+
return Result.ok(await awaitWithContext(claim.drive.completion, context));
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
/** Package-private durable cancellation primitive. Public exposure remains guarded until M8. */
|
|
745
|
+
async requestOperationAbort(operationId, context) {
|
|
746
|
+
if (this.closedError instanceof HarnessClosed) {
|
|
747
|
+
return Result.err(new Closed({ message: this.closedError.message }));
|
|
748
|
+
}
|
|
749
|
+
this.assertOpen();
|
|
750
|
+
const drive = this.activeDrive?.operationId === operationId ? this.activeDrive : undefined;
|
|
751
|
+
let resolveCancellation;
|
|
752
|
+
let rejectCancellation;
|
|
753
|
+
const cancellation = new Promise((resolve, reject) => {
|
|
754
|
+
resolveCancellation = resolve;
|
|
755
|
+
rejectCancellation = reject;
|
|
756
|
+
});
|
|
757
|
+
void cancellation.catch(() => { });
|
|
758
|
+
drive?.beginAbort(cancellation);
|
|
759
|
+
let gateSettled = false;
|
|
760
|
+
const settleGate = (signal) => {
|
|
761
|
+
if (gateSettled)
|
|
762
|
+
return;
|
|
763
|
+
gateSettled = true;
|
|
764
|
+
resolveCancellation();
|
|
765
|
+
if (signal)
|
|
766
|
+
drive?.signalAbort();
|
|
767
|
+
};
|
|
768
|
+
try {
|
|
769
|
+
const result = await this.command(async (state, reader) => {
|
|
770
|
+
const operation = state.operation;
|
|
771
|
+
if (operation?.meta.operationId !== operationId) {
|
|
772
|
+
return {
|
|
773
|
+
kind: "return",
|
|
774
|
+
result: Result.err(this.mismatch(operationId, operation?.meta.operationId ?? null, state.lastOperationId)),
|
|
775
|
+
};
|
|
776
|
+
}
|
|
777
|
+
if (operation.state.control.status === "cancel_requested") {
|
|
778
|
+
return {
|
|
779
|
+
kind: "return",
|
|
780
|
+
result: Result.ok({ operationId, newlyRequested: false, steer: [], followUp: [] }),
|
|
781
|
+
};
|
|
782
|
+
}
|
|
783
|
+
const removed = state.inbox.filter((item) => item.kind === "steer" || item.kind === "followUp");
|
|
784
|
+
const payloads = await Promise.all(removed.map(async (item) => {
|
|
785
|
+
const stored = await reader.getValue(pendingEntry(item.entryId), context);
|
|
786
|
+
if (stored?.value.type !== "message") {
|
|
787
|
+
throw new SessionInvariantError(`Pending ${item.kind} entry ${item.entryId} is missing its message`);
|
|
788
|
+
}
|
|
789
|
+
return { item, message: stored.value.payload };
|
|
790
|
+
}));
|
|
791
|
+
const steer = payloads.filter(({ item }) => item.kind === "steer").map(({ message }) => message);
|
|
792
|
+
const followUp = payloads.filter(({ item }) => item.kind === "followUp").map(({ message }) => message);
|
|
793
|
+
const removedIds = new Set(removed.map((item) => item.entryId));
|
|
794
|
+
const inbox = state.inbox.filter((item) => !removedIds.has(item.entryId));
|
|
795
|
+
const queues = await readLaneQueues(reader, inbox, context);
|
|
796
|
+
const operationState = {
|
|
797
|
+
...operation.state,
|
|
798
|
+
control: { status: "cancel_requested", requestedAt: Date.now() },
|
|
799
|
+
};
|
|
800
|
+
return {
|
|
801
|
+
kind: "commit",
|
|
802
|
+
writes: [
|
|
803
|
+
...removed.map((item) => deleteValue(pendingEntry(item.entryId))),
|
|
804
|
+
setValue(operationStateValue(operationId), operationState),
|
|
805
|
+
setValue(laneStateValue(this.name), durableLaneState(state, operationId, inbox)),
|
|
806
|
+
],
|
|
807
|
+
next: { ...state, inbox, operation: { meta: operation.meta, state: operationState } },
|
|
808
|
+
materialize: () => {
|
|
809
|
+
settleGate(true);
|
|
810
|
+
return Result.ok({ operationId, newlyRequested: true, steer, followUp });
|
|
811
|
+
},
|
|
812
|
+
events: () => [
|
|
813
|
+
{
|
|
814
|
+
type: "operation_abort",
|
|
815
|
+
operationId,
|
|
816
|
+
steer,
|
|
817
|
+
followUp,
|
|
818
|
+
lane: this.name,
|
|
819
|
+
},
|
|
820
|
+
...(removed.length === 0 ? [] : [{ type: "queue_update", queues, lane: this.name }]),
|
|
821
|
+
],
|
|
822
|
+
};
|
|
823
|
+
}, context);
|
|
824
|
+
// A fresh Drive may observe an already-durable marker; pull its gate on the repeat path too. A mismatch
|
|
825
|
+
// can leave only the stale Drive's admission gate in aborting state; its cancellation wait is still released.
|
|
826
|
+
settleGate(result.ok && result.value.newlyRequested === false);
|
|
827
|
+
return result;
|
|
828
|
+
}
|
|
829
|
+
catch (error) {
|
|
830
|
+
if (!gateSettled)
|
|
831
|
+
rejectCancellation(error);
|
|
832
|
+
throw error;
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
requestAbort(operationId, context) {
|
|
836
|
+
return this.requestOperationAbort(operationId, context);
|
|
837
|
+
}
|
|
838
|
+
inspectExecution(context) {
|
|
839
|
+
return this.readLane((state) => {
|
|
840
|
+
const operation = state.operation;
|
|
841
|
+
const captured = operation === null ? undefined : capturedModel(operation);
|
|
842
|
+
const current = operation === null
|
|
843
|
+
? null
|
|
844
|
+
: {
|
|
845
|
+
id: operation.meta.operationId,
|
|
846
|
+
kind: operation.meta.intent.kind,
|
|
847
|
+
status: operation.state.control.status === "cancel_requested"
|
|
848
|
+
? "aborting"
|
|
849
|
+
: "open",
|
|
850
|
+
startedAt: operation.meta.startedAt,
|
|
851
|
+
...(captured === undefined ? {} : { capturedModel: captured }),
|
|
852
|
+
};
|
|
853
|
+
return {
|
|
854
|
+
lane: this.name,
|
|
855
|
+
tipId: state.tipId,
|
|
856
|
+
configuredModel: state.configuration.model,
|
|
857
|
+
current,
|
|
858
|
+
lastOperationId: state.lastOperationId,
|
|
859
|
+
};
|
|
860
|
+
}, context);
|
|
861
|
+
}
|
|
862
|
+
async prompt(...args) {
|
|
863
|
+
if (args.length === 3) {
|
|
864
|
+
return this.driveRunRequest({ kind: "prompt", prompt: args[0], ...(args[1] === undefined ? {} : { images: args[1] }) }, args[2]);
|
|
865
|
+
}
|
|
866
|
+
return this.driveRunRequest({ kind: "prompt", prompt: args[0] }, args[1]);
|
|
867
|
+
}
|
|
868
|
+
skill(name, additionalInstructions, context) {
|
|
869
|
+
return this.driveRunRequest({ kind: "skill", name, ...(additionalInstructions === undefined ? {} : { additionalInstructions }) }, context);
|
|
870
|
+
}
|
|
871
|
+
promptFromTemplate(name, args, context) {
|
|
872
|
+
return this.driveRunRequest({ kind: "prompt_template", name, ...(args === undefined ? {} : { args }) }, context);
|
|
873
|
+
}
|
|
874
|
+
async driveRunRequest(request, context) {
|
|
875
|
+
const admission = await this.accept(request, context);
|
|
876
|
+
if (!admission.ok) {
|
|
877
|
+
switch (admission.error._tag) {
|
|
878
|
+
case "LaneBusy":
|
|
879
|
+
case "InvalidMessage":
|
|
880
|
+
case "UnknownSkill":
|
|
881
|
+
case "UnknownTemplate":
|
|
882
|
+
case "Closed":
|
|
883
|
+
return Result.err(admission.error);
|
|
884
|
+
default:
|
|
885
|
+
throw this.onFault(new SessionInvariantError(`Run acceptance returned ${admission.error._tag}`), context);
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
const driven = await this.drive({ operationId: admission.value.operationId, waitForRetry: true }, context);
|
|
889
|
+
if (!driven.ok) {
|
|
890
|
+
if (driven.error._tag === "Closed")
|
|
891
|
+
return Result.err(driven.error);
|
|
892
|
+
throw this.onFault(new SessionInvariantError(`Accepted run ${admission.value.operationId} no longer matches its lane`), context);
|
|
893
|
+
}
|
|
894
|
+
if (driven.value.kind === "settled")
|
|
895
|
+
return Result.ok(driven.value.outcome);
|
|
896
|
+
if (driven.value.reason === "deferred") {
|
|
897
|
+
return Result.ok({
|
|
898
|
+
operationId: admission.value.operationId,
|
|
899
|
+
status: "suspended",
|
|
900
|
+
deferred: driven.value.deferred,
|
|
901
|
+
});
|
|
902
|
+
}
|
|
903
|
+
throw this.onFault(new SessionInvariantError(`Run ${admission.value.operationId} returned an unwaited retry`), context);
|
|
904
|
+
}
|
|
905
|
+
async compact(options, context) {
|
|
906
|
+
const admission = await this.accept({
|
|
907
|
+
kind: "compaction",
|
|
908
|
+
...(options?.customInstructions === undefined ? {} : { customInstructions: options.customInstructions }),
|
|
909
|
+
}, context);
|
|
910
|
+
if (!admission.ok) {
|
|
911
|
+
switch (admission.error._tag) {
|
|
912
|
+
case "LaneBusy":
|
|
913
|
+
case "NothingToCompact":
|
|
914
|
+
case "Closed":
|
|
915
|
+
return Result.err(admission.error);
|
|
916
|
+
default:
|
|
917
|
+
throw this.onFault(new SessionInvariantError(`Compaction acceptance returned ${admission.error._tag}`), context);
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
const compacted = await this.driveStructuralAdmission(admission.value, context);
|
|
921
|
+
if (!compacted.ok)
|
|
922
|
+
return compacted;
|
|
923
|
+
const continuation = await this.continueAfterStructural(compacted.value, context);
|
|
924
|
+
return continuation.ok
|
|
925
|
+
? Result.ok({
|
|
926
|
+
compaction: compacted.value,
|
|
927
|
+
...(continuation.value === undefined ? {} : { run: continuation.value }),
|
|
928
|
+
})
|
|
929
|
+
: continuation;
|
|
930
|
+
}
|
|
931
|
+
async navigateTree(targetId, options, context) {
|
|
932
|
+
const admission = await this.accept({ kind: "navigation", targetId, ...(options === undefined ? {} : { options }) }, context);
|
|
933
|
+
if (!admission.ok) {
|
|
934
|
+
switch (admission.error._tag) {
|
|
935
|
+
case "LaneBusy":
|
|
936
|
+
case "InvalidNavigation":
|
|
937
|
+
case "UnknownTarget":
|
|
938
|
+
case "Closed":
|
|
939
|
+
return Result.err(admission.error);
|
|
940
|
+
default:
|
|
941
|
+
throw this.onFault(new SessionInvariantError(`Navigation acceptance returned ${admission.error._tag}`), context);
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
const navigated = await this.driveStructuralAdmission(admission.value, context);
|
|
945
|
+
if (!navigated.ok)
|
|
946
|
+
return navigated;
|
|
947
|
+
const continuation = await this.continueAfterStructural(navigated.value, context);
|
|
948
|
+
return continuation.ok
|
|
949
|
+
? Result.ok({
|
|
950
|
+
navigation: navigated.value,
|
|
951
|
+
...(continuation.value === undefined ? {} : { run: continuation.value }),
|
|
952
|
+
})
|
|
953
|
+
: continuation;
|
|
954
|
+
}
|
|
955
|
+
async driveStructuralAdmission(admission, context) {
|
|
956
|
+
const driven = await this.drive({ operationId: admission.operationId, waitForRetry: true }, context);
|
|
957
|
+
if (!driven.ok) {
|
|
958
|
+
if (driven.error._tag === "Closed")
|
|
959
|
+
return Result.err(driven.error);
|
|
960
|
+
throw this.onFault(new SessionInvariantError(`Accepted ${admission.kind} ${admission.operationId} no longer matches its lane`), context);
|
|
961
|
+
}
|
|
962
|
+
if (driven.value.kind === "settled")
|
|
963
|
+
return Result.ok(driven.value.outcome);
|
|
964
|
+
throw this.onFault(new SessionInvariantError(`${admission.kind} ${admission.operationId} returned ${driven.value.reason}`), context);
|
|
965
|
+
}
|
|
966
|
+
async continueAfterStructural(record, context) {
|
|
967
|
+
if (record.status === "aborted")
|
|
968
|
+
return Result.ok(undefined);
|
|
969
|
+
const admission = await this.accept({ kind: "prompt", prompt: "" }, context);
|
|
970
|
+
if (!admission.ok) {
|
|
971
|
+
switch (admission.error._tag) {
|
|
972
|
+
case "InvalidMessage":
|
|
973
|
+
case "LaneBusy":
|
|
974
|
+
return Result.ok(undefined);
|
|
975
|
+
case "Closed":
|
|
976
|
+
return Result.err(admission.error);
|
|
977
|
+
default:
|
|
978
|
+
throw this.onFault(new SessionInvariantError(`Structural continuation acceptance returned ${admission.error._tag}`), context);
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
const driven = await this.drive({ operationId: admission.value.operationId, waitForRetry: true }, context);
|
|
982
|
+
if (!driven.ok) {
|
|
983
|
+
if (driven.error._tag === "Closed")
|
|
984
|
+
return Result.err(driven.error);
|
|
985
|
+
throw this.onFault(new SessionInvariantError(`Continuation run ${admission.value.operationId} no longer matches its lane`), context);
|
|
986
|
+
}
|
|
987
|
+
if (driven.value.kind === "settled")
|
|
988
|
+
return Result.ok(driven.value.outcome);
|
|
989
|
+
if (driven.value.reason === "deferred") {
|
|
990
|
+
return Result.ok({
|
|
991
|
+
operationId: admission.value.operationId,
|
|
992
|
+
status: "suspended",
|
|
993
|
+
deferred: driven.value.deferred,
|
|
994
|
+
});
|
|
995
|
+
}
|
|
996
|
+
throw this.onFault(new SessionInvariantError(`Continuation run ${admission.value.operationId} returned an unwaited retry`), context);
|
|
997
|
+
}
|
|
998
|
+
async resume(context) {
|
|
999
|
+
if (this.closedError instanceof HarnessClosed) {
|
|
1000
|
+
return Result.err(new Closed({ message: this.closedError.message }));
|
|
1001
|
+
}
|
|
1002
|
+
this.assertOpen();
|
|
1003
|
+
const inspected = await this.command((state) => {
|
|
1004
|
+
const operation = state.operation;
|
|
1005
|
+
return operation === null
|
|
1006
|
+
? {
|
|
1007
|
+
kind: "return",
|
|
1008
|
+
result: Result.err(new NothingToResume({
|
|
1009
|
+
lane: this.name,
|
|
1010
|
+
message: `Lane ${JSON.stringify(this.name)} has no active operation to resume`,
|
|
1011
|
+
})),
|
|
1012
|
+
}
|
|
1013
|
+
: { kind: "return", result: Result.ok({ operationId: operation.meta.operationId }) };
|
|
1014
|
+
}, context);
|
|
1015
|
+
if (!inspected.ok)
|
|
1016
|
+
return inspected;
|
|
1017
|
+
const driven = await this.drive({ operationId: inspected.value.operationId, pollDeferred: true, waitForRetry: true }, context);
|
|
1018
|
+
if (!driven.ok) {
|
|
1019
|
+
if (driven.error._tag === "Closed")
|
|
1020
|
+
return Result.err(driven.error);
|
|
1021
|
+
throw this.onFault(new SessionInvariantError(`Operation ${inspected.value.operationId} no longer matches its lane`), context);
|
|
1022
|
+
}
|
|
1023
|
+
if (driven.value.kind === "settled")
|
|
1024
|
+
return Result.ok(driven.value.outcome);
|
|
1025
|
+
if (driven.value.reason === "deferred") {
|
|
1026
|
+
return Result.ok({
|
|
1027
|
+
operationId: inspected.value.operationId,
|
|
1028
|
+
status: "suspended",
|
|
1029
|
+
deferred: driven.value.deferred,
|
|
1030
|
+
});
|
|
1031
|
+
}
|
|
1032
|
+
throw this.onFault(new SessionInvariantError(`Operation ${inspected.value.operationId} returned an unwaited retry`), context);
|
|
1033
|
+
}
|
|
1034
|
+
async abort(context) {
|
|
1035
|
+
if (this.closedError instanceof HarnessClosed) {
|
|
1036
|
+
return Result.err(new Closed({ message: this.closedError.message }));
|
|
1037
|
+
}
|
|
1038
|
+
this.assertOpen();
|
|
1039
|
+
const operationId = await this.command((state) => ({
|
|
1040
|
+
kind: "return",
|
|
1041
|
+
result: state.operation?.meta.operationId,
|
|
1042
|
+
}), context);
|
|
1043
|
+
if (operationId === undefined) {
|
|
1044
|
+
return Result.err(new NoActiveOperation({
|
|
1045
|
+
lane: this.name,
|
|
1046
|
+
message: `Lane ${JSON.stringify(this.name)} has no active operation`,
|
|
1047
|
+
}));
|
|
1048
|
+
}
|
|
1049
|
+
const requested = await this.requestAbort(operationId, context);
|
|
1050
|
+
if (!requested.ok) {
|
|
1051
|
+
if (requested.error._tag === "Closed")
|
|
1052
|
+
return Result.err(requested.error);
|
|
1053
|
+
return Result.err(new NoActiveOperation({
|
|
1054
|
+
lane: this.name,
|
|
1055
|
+
message: `Lane ${JSON.stringify(this.name)} no longer has the inspected operation`,
|
|
1056
|
+
}));
|
|
1057
|
+
}
|
|
1058
|
+
const driven = await this.drive({ operationId }, context);
|
|
1059
|
+
if (!driven.ok && driven.error._tag === "Closed")
|
|
1060
|
+
return Result.err(driven.error);
|
|
1061
|
+
if (!driven.ok) {
|
|
1062
|
+
throw this.onFault(new SessionInvariantError(`Cancelled operation ${operationId} no longer matches its lane`), context);
|
|
1063
|
+
}
|
|
1064
|
+
return Result.ok({
|
|
1065
|
+
operationId,
|
|
1066
|
+
steer: requested.value.steer,
|
|
1067
|
+
followUp: requested.value.followUp,
|
|
1068
|
+
});
|
|
1069
|
+
}
|
|
1070
|
+
steer(message, images, context) {
|
|
1071
|
+
return this.enqueue("steer", message, images, context);
|
|
1072
|
+
}
|
|
1073
|
+
followUp(message, images, context) {
|
|
1074
|
+
return this.enqueue("followUp", message, images, context);
|
|
1075
|
+
}
|
|
1076
|
+
nextRun(message, images, context) {
|
|
1077
|
+
return this.enqueue("nextRun", message, images, context);
|
|
1078
|
+
}
|
|
1079
|
+
async enqueue(kind, input, images, context) {
|
|
1080
|
+
if (this.closedError instanceof HarnessClosed) {
|
|
1081
|
+
return Result.err(new Closed({ message: this.closedError.message }));
|
|
1082
|
+
}
|
|
1083
|
+
this.assertOpen();
|
|
1084
|
+
const at = Date.now();
|
|
1085
|
+
let message;
|
|
1086
|
+
if (typeof input === "string") {
|
|
1087
|
+
if (input.length === 0 && (images === undefined || images.length === 0)) {
|
|
1088
|
+
return Result.err(new InvalidMessage({
|
|
1089
|
+
lane: this.name,
|
|
1090
|
+
reason: "empty",
|
|
1091
|
+
message: "Queued input must contain text or an image",
|
|
1092
|
+
}));
|
|
1093
|
+
}
|
|
1094
|
+
message = {
|
|
1095
|
+
role: "user",
|
|
1096
|
+
content: [...(input.length === 0 ? [] : [{ type: "text", text: input }]), ...(images ?? [])],
|
|
1097
|
+
timestamp: at,
|
|
1098
|
+
};
|
|
1099
|
+
}
|
|
1100
|
+
else {
|
|
1101
|
+
if (input.role === "assistant" && input.stopReason === "pending") {
|
|
1102
|
+
return Result.err(new InvalidMessage({
|
|
1103
|
+
lane: this.name,
|
|
1104
|
+
reason: "pending_assistant",
|
|
1105
|
+
message: "Cannot queue a pending assistant message",
|
|
1106
|
+
}));
|
|
1107
|
+
}
|
|
1108
|
+
if (images !== undefined && images.length > 0 && input.role !== "user") {
|
|
1109
|
+
return Result.err(new InvalidMessage({
|
|
1110
|
+
lane: this.name,
|
|
1111
|
+
reason: "images_with_non_user",
|
|
1112
|
+
message: "Images can be added only to queued user messages",
|
|
1113
|
+
}));
|
|
1114
|
+
}
|
|
1115
|
+
message =
|
|
1116
|
+
images === undefined || images.length === 0 || input.role !== "user"
|
|
1117
|
+
? structuredClone(input)
|
|
1118
|
+
: {
|
|
1119
|
+
...structuredClone(input),
|
|
1120
|
+
content: [
|
|
1121
|
+
...(typeof input.content === "string"
|
|
1122
|
+
? input.content.length === 0
|
|
1123
|
+
? []
|
|
1124
|
+
: [{ type: "text", text: input.content }]
|
|
1125
|
+
: input.content),
|
|
1126
|
+
...images,
|
|
1127
|
+
],
|
|
1128
|
+
};
|
|
1129
|
+
}
|
|
1130
|
+
const entryId = this.session.idGenerator.next(at);
|
|
1131
|
+
return this.command(async (state, reader) => {
|
|
1132
|
+
const inbox = [...state.inbox, { entryId, kind }];
|
|
1133
|
+
const queues = [
|
|
1134
|
+
...(await readLaneQueues(reader, state.inbox, context)),
|
|
1135
|
+
{ entryId, kind, type: "message", message },
|
|
1136
|
+
];
|
|
1137
|
+
return {
|
|
1138
|
+
kind: "commit",
|
|
1139
|
+
writes: [
|
|
1140
|
+
setValue(pendingEntry(entryId), { type: "message", payload: message }),
|
|
1141
|
+
setValue(laneStateValue(this.name), durableLaneState(state, state.operation?.meta.operationId ?? null, inbox)),
|
|
1142
|
+
],
|
|
1143
|
+
next: { ...state, inbox },
|
|
1144
|
+
materialize: () => Result.ok({ entryId }),
|
|
1145
|
+
events: () => [{ type: "queue_update", queues, lane: this.name }],
|
|
1146
|
+
};
|
|
1147
|
+
}, context);
|
|
1148
|
+
}
|
|
1149
|
+
async cancelQueued(entryId, context) {
|
|
1150
|
+
if (this.closedError instanceof HarnessClosed) {
|
|
1151
|
+
return Result.err(new Closed({ message: this.closedError.message }));
|
|
1152
|
+
}
|
|
1153
|
+
this.assertOpen();
|
|
1154
|
+
return this.command(async (state, reader) => {
|
|
1155
|
+
const queued = state.inbox.find((item) => item.entryId === entryId);
|
|
1156
|
+
if (queued === undefined) {
|
|
1157
|
+
const consumed = (await reader.getEntries([entryId], context)).has(entryId);
|
|
1158
|
+
return {
|
|
1159
|
+
kind: "return",
|
|
1160
|
+
result: Result.ok({ kind: consumed ? "already_consumed" : "not_found" }),
|
|
1161
|
+
};
|
|
1162
|
+
}
|
|
1163
|
+
if ((await reader.getValue(pendingEntry(entryId), context)) === undefined) {
|
|
1164
|
+
throw new SessionInvariantError(`Queued ${queued.kind} entry ${entryId} is missing its payload`);
|
|
1165
|
+
}
|
|
1166
|
+
const inbox = state.inbox.filter((item) => item.entryId !== entryId);
|
|
1167
|
+
const queues = await readLaneQueues(reader, inbox, context);
|
|
1168
|
+
return {
|
|
1169
|
+
kind: "commit",
|
|
1170
|
+
writes: [
|
|
1171
|
+
deleteValue(pendingEntry(entryId)),
|
|
1172
|
+
setValue(laneStateValue(this.name), durableLaneState(state, state.operation?.meta.operationId ?? null, inbox)),
|
|
1173
|
+
],
|
|
1174
|
+
next: { ...state, inbox },
|
|
1175
|
+
materialize: () => Result.ok({ kind: "cancelled" }),
|
|
1176
|
+
events: () => [{ type: "queue_update", queues, lane: this.name }],
|
|
1177
|
+
};
|
|
1178
|
+
}, context);
|
|
1179
|
+
}
|
|
1180
|
+
async recordUsage(usage, options, context) {
|
|
1181
|
+
if (this.closedError instanceof HarnessClosed) {
|
|
1182
|
+
return Result.err(new Closed({ message: this.closedError.message }));
|
|
1183
|
+
}
|
|
1184
|
+
this.assertOpen();
|
|
1185
|
+
return this.command((state) => {
|
|
1186
|
+
const usageId = this.session.idGenerator.next();
|
|
1187
|
+
const row = {
|
|
1188
|
+
id: usageId,
|
|
1189
|
+
usage,
|
|
1190
|
+
adjustment: true,
|
|
1191
|
+
...(options?.entryId === undefined ? {} : { entryId: options.entryId }),
|
|
1192
|
+
...(options?.details === undefined ? {} : { details: options.details }),
|
|
1193
|
+
};
|
|
1194
|
+
return {
|
|
1195
|
+
kind: "commit",
|
|
1196
|
+
writes: [insertUsage(row)],
|
|
1197
|
+
next: state,
|
|
1198
|
+
materialize: () => Result.ok({ usageId }),
|
|
1199
|
+
events: (commit) => [
|
|
1200
|
+
{
|
|
1201
|
+
type: "usage",
|
|
1202
|
+
lane: this.name,
|
|
1203
|
+
row: { ...row, seq: commit.seqs[0] },
|
|
1204
|
+
totals: commit.stats.usage,
|
|
1205
|
+
},
|
|
1206
|
+
],
|
|
1207
|
+
};
|
|
1208
|
+
}, context);
|
|
1209
|
+
}
|
|
1210
|
+
async waitForIdle(context) {
|
|
1211
|
+
for (;;) {
|
|
1212
|
+
const observation = await this.command((state) => ({
|
|
1213
|
+
kind: "return",
|
|
1214
|
+
result: state.operation === null && this.activeDrive === undefined
|
|
1215
|
+
? { kind: "idle" }
|
|
1216
|
+
: { kind: "wait", drive: this.activeDrive, change: this.stateChange },
|
|
1217
|
+
}), context);
|
|
1218
|
+
if (observation.kind === "idle")
|
|
1219
|
+
return;
|
|
1220
|
+
await awaitWithContext(observation.drive === undefined ? observation.change : observation.drive.completion.then(() => undefined), context);
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
async runWhenIdle(callback, context) {
|
|
1224
|
+
let owner;
|
|
1225
|
+
let releaseOwner;
|
|
1226
|
+
for (;;) {
|
|
1227
|
+
const observation = await this.command((state) => {
|
|
1228
|
+
if (state.operation !== null || this.activeDrive !== undefined) {
|
|
1229
|
+
return {
|
|
1230
|
+
kind: "return",
|
|
1231
|
+
result: { kind: "wait", drive: this.activeDrive, change: this.stateChange },
|
|
1232
|
+
};
|
|
1233
|
+
}
|
|
1234
|
+
let release;
|
|
1235
|
+
const claimed = new Promise((resolve) => {
|
|
1236
|
+
release = resolve;
|
|
1237
|
+
});
|
|
1238
|
+
owner = claimed;
|
|
1239
|
+
releaseOwner = release;
|
|
1240
|
+
this.idleOwner = claimed;
|
|
1241
|
+
this.signalStateChange();
|
|
1242
|
+
return { kind: "return", result: { kind: "claimed" } };
|
|
1243
|
+
}, context);
|
|
1244
|
+
if (observation.kind === "claimed")
|
|
1245
|
+
break;
|
|
1246
|
+
await awaitWithContext(observation.drive === undefined ? observation.change : observation.drive.completion.then(() => undefined), context);
|
|
1247
|
+
}
|
|
1248
|
+
if (owner === undefined || releaseOwner === undefined) {
|
|
1249
|
+
throw this.onFault(new SessionInvariantError("Idle callback claim was not published"), context);
|
|
1250
|
+
}
|
|
1251
|
+
try {
|
|
1252
|
+
this.assertOpen();
|
|
1253
|
+
await callback(context);
|
|
1254
|
+
}
|
|
1255
|
+
finally {
|
|
1256
|
+
if (this.idleOwner === owner)
|
|
1257
|
+
this.idleOwner = undefined;
|
|
1258
|
+
releaseOwner();
|
|
1259
|
+
this.signalStateChange();
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
async getModel(_context) {
|
|
1263
|
+
this.assertOpen();
|
|
1264
|
+
return this.models.getModel(this.state.configuration.model.provider, this.state.configuration.model.modelId);
|
|
1265
|
+
}
|
|
1266
|
+
setModel(model, context) {
|
|
1267
|
+
return this.setConfiguration((configuration) => ({
|
|
1268
|
+
...configuration,
|
|
1269
|
+
model: { ...model },
|
|
1270
|
+
}), (previous, value) => ({
|
|
1271
|
+
type: "config_update",
|
|
1272
|
+
property: "model",
|
|
1273
|
+
previous: previous.model,
|
|
1274
|
+
value: value.model,
|
|
1275
|
+
}), context);
|
|
1276
|
+
}
|
|
1277
|
+
async getThinkingLevel(_context) {
|
|
1278
|
+
this.assertOpen();
|
|
1279
|
+
return this.state.configuration.thinkingLevel;
|
|
1280
|
+
}
|
|
1281
|
+
setThinkingLevel(thinkingLevel, context) {
|
|
1282
|
+
return this.setConfiguration((configuration) => ({ ...configuration, thinkingLevel }), (previous, value) => ({
|
|
1283
|
+
type: "config_update",
|
|
1284
|
+
property: "thinkingLevel",
|
|
1285
|
+
previous: previous.thinkingLevel,
|
|
1286
|
+
value: value.thinkingLevel,
|
|
1287
|
+
}), context);
|
|
1288
|
+
}
|
|
1289
|
+
async getActiveTools(_context) {
|
|
1290
|
+
this.assertOpen();
|
|
1291
|
+
return this.state.configuration.activeToolNames;
|
|
1292
|
+
}
|
|
1293
|
+
setActiveTools(activeToolNames, context) {
|
|
1294
|
+
return this.setConfiguration((configuration) => ({ ...configuration, activeToolNames }), (previous, value) => ({
|
|
1295
|
+
type: "config_update",
|
|
1296
|
+
property: "activeTools",
|
|
1297
|
+
previous: previous.activeToolNames,
|
|
1298
|
+
value: value.activeToolNames,
|
|
1299
|
+
}), context);
|
|
1300
|
+
}
|
|
1301
|
+
watch(context) {
|
|
1302
|
+
return this.readLane(async (state, reader) => {
|
|
1303
|
+
const watcher = this.installWatch({}, (event) => event.type === "usage" || !("lane" in event) || event.lane === this.name, context, (resnapshotContext, markBoundary) => this.readLane(async (latest, latestReader) => {
|
|
1304
|
+
const snapshot = await this.captureLaneSnapshot(latest, latestReader, resnapshotContext);
|
|
1305
|
+
markBoundary();
|
|
1306
|
+
return snapshot;
|
|
1307
|
+
}, resnapshotContext));
|
|
1308
|
+
try {
|
|
1309
|
+
watcher.snapshot = await this.captureLaneSnapshot(state, reader, context);
|
|
1310
|
+
return watcher;
|
|
1311
|
+
}
|
|
1312
|
+
catch (error) {
|
|
1313
|
+
watcher.unsubscribe();
|
|
1314
|
+
throw error;
|
|
1315
|
+
}
|
|
1316
|
+
}, context);
|
|
1317
|
+
}
|
|
1318
|
+
async captureLaneSnapshot(state, reader, context) {
|
|
1319
|
+
const captured = structuredClone(state);
|
|
1320
|
+
const transcript = captured.tipId === null
|
|
1321
|
+
? []
|
|
1322
|
+
: (await reader.scanBranch({ start: captured.tipId, stopAtType: "compaction", order: "newestFirst" }, context)).reverse();
|
|
1323
|
+
const queues = await readLaneQueues(reader, captured.inbox, context);
|
|
1324
|
+
let lastResult;
|
|
1325
|
+
if (captured.lastOperationId !== null) {
|
|
1326
|
+
const stored = await reader.getValue(operationResultValue(captured.lastOperationId), context);
|
|
1327
|
+
if (stored === undefined) {
|
|
1328
|
+
throw new SessionInvariantError(`Lane ${JSON.stringify(this.name)} is missing result ${captured.lastOperationId}`);
|
|
1329
|
+
}
|
|
1330
|
+
lastResult = stored.value;
|
|
1331
|
+
}
|
|
1332
|
+
const stats = await reader.getStats(context);
|
|
1333
|
+
const operation = captured.operation;
|
|
1334
|
+
let operationSnapshot = null;
|
|
1335
|
+
if (operation !== null) {
|
|
1336
|
+
const runningTools = [];
|
|
1337
|
+
let streamingMessage;
|
|
1338
|
+
let retry;
|
|
1339
|
+
let deferred;
|
|
1340
|
+
const readStreamingMessage = async (responseEntryId) => reduceAssistantMessageFrames(await readAssistantFrames(reader, operation.meta.operationId, responseEntryId, context));
|
|
1341
|
+
const state = operation.state;
|
|
1342
|
+
switch (state.at) {
|
|
1343
|
+
case "assistant.retry_wait":
|
|
1344
|
+
retry = {
|
|
1345
|
+
attempt: state.nextAttempt,
|
|
1346
|
+
maxAttempts: state.generationContext.retryPolicy.maxAttempts,
|
|
1347
|
+
nextAttemptAt: state.notBefore,
|
|
1348
|
+
};
|
|
1349
|
+
break;
|
|
1350
|
+
case "assistant.effect_pending":
|
|
1351
|
+
streamingMessage = await readStreamingMessage(state.responseEntryId);
|
|
1352
|
+
break;
|
|
1353
|
+
case "deferred.suspended":
|
|
1354
|
+
case "deferred.effect_pending": {
|
|
1355
|
+
const source = (await reader.getEntries([state.sourceEntryId], context)).get(state.sourceEntryId);
|
|
1356
|
+
if (source?.type !== "message" ||
|
|
1357
|
+
source.message.role !== "assistant" ||
|
|
1358
|
+
source.message.deferred === undefined) {
|
|
1359
|
+
throw new SessionInvariantError("Deferred source is missing its assistant handle");
|
|
1360
|
+
}
|
|
1361
|
+
deferred = { handle: source.message.deferred, poll: state.poll };
|
|
1362
|
+
if (state.at === "deferred.effect_pending") {
|
|
1363
|
+
streamingMessage = await readStreamingMessage(state.responseEntryId);
|
|
1364
|
+
}
|
|
1365
|
+
break;
|
|
1366
|
+
}
|
|
1367
|
+
case "tools": {
|
|
1368
|
+
const { batch } = state;
|
|
1369
|
+
const assistant = (await reader.getEntries([batch.assistantEntryId], context)).get(batch.assistantEntryId);
|
|
1370
|
+
if (assistant?.type !== "message" || assistant.message.role !== "assistant") {
|
|
1371
|
+
throw new SessionInvariantError("Tool batch assistant entry is invalid");
|
|
1372
|
+
}
|
|
1373
|
+
for (const call of batch.calls) {
|
|
1374
|
+
if (call.status === "planned" || call.status === "completed")
|
|
1375
|
+
continue;
|
|
1376
|
+
const block = assistant.message.content[call.sourceIndex];
|
|
1377
|
+
if (block?.type !== "toolCall") {
|
|
1378
|
+
throw new SessionInvariantError(`Tool call source index ${call.sourceIndex} does not name a tool-call block`);
|
|
1379
|
+
}
|
|
1380
|
+
const args = await reader.getValue(operationToolArgs(operation.meta.operationId, batch.turnId, call.sourceIndex), context);
|
|
1381
|
+
if (call.status === "effect_pending") {
|
|
1382
|
+
if (args === undefined) {
|
|
1383
|
+
throw new SessionInvariantError(`Tool call ${block.id} is missing persisted arguments`);
|
|
1384
|
+
}
|
|
1385
|
+
const checkpoint = await reader.getValue(pendingToolOutput(operation.meta.operationId, call.resultEntryId), context);
|
|
1386
|
+
runningTools.push({
|
|
1387
|
+
status: "running",
|
|
1388
|
+
toolCallId: block.id,
|
|
1389
|
+
toolName: block.name,
|
|
1390
|
+
args: args.value,
|
|
1391
|
+
...(checkpoint === undefined ? {} : { result: checkpoint.value }),
|
|
1392
|
+
});
|
|
1393
|
+
continue;
|
|
1394
|
+
}
|
|
1395
|
+
const staged = await reader.getValue(pendingEntry(call.resultEntryId), context);
|
|
1396
|
+
if (staged?.value.type !== "message" || staged.value.payload.role !== "toolResult") {
|
|
1397
|
+
throw new SessionInvariantError(`Tool call ${call.resultEntryId} is missing its staged result`);
|
|
1398
|
+
}
|
|
1399
|
+
if (staged.value.payload.toolCallId !== block.id || staged.value.payload.toolName !== block.name) {
|
|
1400
|
+
throw new SessionInvariantError(`Tool call ${call.resultEntryId} has a mismatched staged result`);
|
|
1401
|
+
}
|
|
1402
|
+
runningTools.push({
|
|
1403
|
+
status: "settled",
|
|
1404
|
+
toolCallId: block.id,
|
|
1405
|
+
toolName: block.name,
|
|
1406
|
+
args: args?.value ?? block.arguments,
|
|
1407
|
+
result: toolResultFromMessage(staged.value.payload, call.terminate),
|
|
1408
|
+
isError: staged.value.payload.isError,
|
|
1409
|
+
});
|
|
1410
|
+
}
|
|
1411
|
+
break;
|
|
1412
|
+
}
|
|
1413
|
+
case "summary.retry_wait":
|
|
1414
|
+
retry = {
|
|
1415
|
+
attempt: state.nextAttempt,
|
|
1416
|
+
maxAttempts: state.summaryContext.retryPolicy.maxAttempts,
|
|
1417
|
+
nextAttemptAt: state.notBefore,
|
|
1418
|
+
};
|
|
1419
|
+
break;
|
|
1420
|
+
default:
|
|
1421
|
+
break;
|
|
1422
|
+
}
|
|
1423
|
+
operationSnapshot = {
|
|
1424
|
+
id: operation.meta.operationId,
|
|
1425
|
+
kind: operation.meta.intent.kind,
|
|
1426
|
+
startedAt: operation.meta.startedAt,
|
|
1427
|
+
fromTipId: operation.meta.sourceTipId,
|
|
1428
|
+
status: operation.state.control.status === "cancel_requested" ? "aborting" : "open",
|
|
1429
|
+
...(retry === undefined ? {} : { retry }),
|
|
1430
|
+
...(deferred === undefined ? {} : { deferred }),
|
|
1431
|
+
...(streamingMessage === undefined ? {} : { streamingMessage }),
|
|
1432
|
+
runningTools,
|
|
1433
|
+
};
|
|
1434
|
+
}
|
|
1435
|
+
return structuredClone({
|
|
1436
|
+
lane: this.name,
|
|
1437
|
+
transcript,
|
|
1438
|
+
tipId: captured.tipId,
|
|
1439
|
+
...(lastResult === undefined ? {} : { lastResult }),
|
|
1440
|
+
configuration: captured.configuration,
|
|
1441
|
+
stats,
|
|
1442
|
+
operation: operationSnapshot,
|
|
1443
|
+
queues,
|
|
1444
|
+
faulted: this.closedError instanceof HarnessFault,
|
|
1445
|
+
});
|
|
1446
|
+
}
|
|
1447
|
+
async setConfiguration(update, event, context) {
|
|
1448
|
+
await this.command((state) => {
|
|
1449
|
+
const configuration = update(state.configuration);
|
|
1450
|
+
return {
|
|
1451
|
+
kind: "commit",
|
|
1452
|
+
writes: [setValue(laneConfig(this.name), configuration)],
|
|
1453
|
+
next: { ...state, configuration },
|
|
1454
|
+
materialize: () => undefined,
|
|
1455
|
+
events: () => [{ ...event(state.configuration, configuration), lane: this.name }],
|
|
1456
|
+
};
|
|
1457
|
+
}, context);
|
|
1458
|
+
}
|
|
1459
|
+
async findEntries(query, context) {
|
|
1460
|
+
query ??= {};
|
|
1461
|
+
this.assertOpen();
|
|
1462
|
+
const start = query.start ?? this.state.tipId;
|
|
1463
|
+
return start === null
|
|
1464
|
+
? []
|
|
1465
|
+
: this.session.scanBranch({ ...query, start, order: query.order ?? "newestFirst" }, context);
|
|
1466
|
+
}
|
|
1467
|
+
async findEntry(query, context) {
|
|
1468
|
+
query ??= {};
|
|
1469
|
+
return (await this.findEntries({ ...query, limit: query.limit === undefined ? 1 : Math.min(query.limit, 1) }, context))[0];
|
|
1470
|
+
}
|
|
1471
|
+
appendMessage(message, context) {
|
|
1472
|
+
return this.append({ type: "message", payload: message }, context);
|
|
1473
|
+
}
|
|
1474
|
+
appendCustomEntry(customType, data, context) {
|
|
1475
|
+
return this.append({ type: "custom", customType, ...(data === undefined ? {} : { payload: data }) }, context);
|
|
1476
|
+
}
|
|
1477
|
+
append(pending, context) {
|
|
1478
|
+
this.assertOpen();
|
|
1479
|
+
if (pending.type === "message" &&
|
|
1480
|
+
pending.payload.role === "assistant" &&
|
|
1481
|
+
pending.payload.stopReason === "pending") {
|
|
1482
|
+
return Promise.reject(new SessionPendingAssistantMessageError());
|
|
1483
|
+
}
|
|
1484
|
+
const id = this.session.idGenerator.next();
|
|
1485
|
+
return this.command(async (state, reader) => {
|
|
1486
|
+
if (state.operation === null) {
|
|
1487
|
+
const queued = inboxItems(state.inbox, "write");
|
|
1488
|
+
const captured = await Promise.all(queued.map(async (item) => {
|
|
1489
|
+
const stored = await reader.getValue(pendingEntry(item.entryId), context);
|
|
1490
|
+
if (stored === undefined) {
|
|
1491
|
+
throw new SessionInvariantError(`Pending write ${item.entryId} is missing its payload`);
|
|
1492
|
+
}
|
|
1493
|
+
return pendingEntryWrite(item.entryId, stored.value);
|
|
1494
|
+
}));
|
|
1495
|
+
const inbox = withoutInboxItems(state.inbox, queued);
|
|
1496
|
+
const queues = queued.length === 0 ? undefined : await readLaneQueues(reader, inbox, context);
|
|
1497
|
+
const entries = chainEntries(state.tipId, [...captured, pendingEntryWrite(id, pending)]);
|
|
1498
|
+
return {
|
|
1499
|
+
kind: "commit",
|
|
1500
|
+
writes: [
|
|
1501
|
+
...entries.map((entry) => insertEntry(entry)),
|
|
1502
|
+
...queued.map((item) => deleteValue(pendingEntry(item.entryId))),
|
|
1503
|
+
setValue(branchTip(this.name), id),
|
|
1504
|
+
setValue(laneStateValue(this.name), durableLaneState(state, null, inbox)),
|
|
1505
|
+
],
|
|
1506
|
+
next: { ...state, tipId: id, inbox },
|
|
1507
|
+
materialize: () => id,
|
|
1508
|
+
events: (commit) => [
|
|
1509
|
+
...committedEntryEvents(entries, commit, this.name),
|
|
1510
|
+
...(queues === undefined ? [] : [{ type: "queue_update", queues, lane: this.name }]),
|
|
1511
|
+
],
|
|
1512
|
+
};
|
|
1513
|
+
}
|
|
1514
|
+
const operation = state.operation;
|
|
1515
|
+
const inbox = [...state.inbox, { entryId: id, kind: "write" }];
|
|
1516
|
+
const queues = [
|
|
1517
|
+
...(await readLaneQueues(reader, state.inbox, context)),
|
|
1518
|
+
pending.type === "message"
|
|
1519
|
+
? { entryId: id, kind: "write", type: "message", message: pending.payload }
|
|
1520
|
+
: {
|
|
1521
|
+
entryId: id,
|
|
1522
|
+
kind: "write",
|
|
1523
|
+
type: "custom",
|
|
1524
|
+
customType: pending.customType,
|
|
1525
|
+
...(pending.payload === undefined ? {} : { data: pending.payload }),
|
|
1526
|
+
},
|
|
1527
|
+
];
|
|
1528
|
+
return {
|
|
1529
|
+
kind: "commit",
|
|
1530
|
+
writes: [
|
|
1531
|
+
setValue(pendingEntry(id), pending),
|
|
1532
|
+
setValue(laneStateValue(this.name), durableLaneState(state, operation.meta.operationId, inbox)),
|
|
1533
|
+
],
|
|
1534
|
+
next: { ...state, inbox },
|
|
1535
|
+
materialize: () => id,
|
|
1536
|
+
events: () => [{ type: "queue_update", queues, lane: this.name }],
|
|
1537
|
+
};
|
|
1538
|
+
}, context);
|
|
1539
|
+
}
|
|
1540
|
+
seal(error) {
|
|
1541
|
+
this.closedError ??= error;
|
|
1542
|
+
this.activeDrive?.closeGate(error);
|
|
1543
|
+
this.signalStateChange();
|
|
1544
|
+
return this.idleOwner ?? Promise.resolve();
|
|
1545
|
+
}
|
|
1546
|
+
signalStateChange() {
|
|
1547
|
+
this.resolveStateChange();
|
|
1548
|
+
let resolveStateChange;
|
|
1549
|
+
this.stateChange = new Promise((resolve) => {
|
|
1550
|
+
resolveStateChange = resolve;
|
|
1551
|
+
});
|
|
1552
|
+
this.resolveStateChange = resolveStateChange;
|
|
1553
|
+
}
|
|
1554
|
+
assertOpen() {
|
|
1555
|
+
if (this.closedError !== undefined)
|
|
1556
|
+
throw this.closedError;
|
|
1557
|
+
}
|
|
1558
|
+
}
|
|
1559
|
+
//# sourceMappingURL=lane.js.map
|