@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,427 @@
|
|
|
1
|
+
import { parseStreamingJson } from "./json-parse.js";
|
|
2
|
+
function cloneTextContent(content) {
|
|
3
|
+
return {
|
|
4
|
+
type: "text",
|
|
5
|
+
text: content.text,
|
|
6
|
+
...(content.textSignature === undefined ? {} : { textSignature: content.textSignature }),
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
function cloneThinkingContent(content) {
|
|
10
|
+
return {
|
|
11
|
+
type: "thinking",
|
|
12
|
+
thinking: content.thinking,
|
|
13
|
+
...(content.thinkingSignature === undefined ? {} : { thinkingSignature: content.thinkingSignature }),
|
|
14
|
+
...(content.redacted === undefined ? {} : { redacted: content.redacted }),
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
function cloneToolCall(toolCall) {
|
|
18
|
+
return {
|
|
19
|
+
type: "toolCall",
|
|
20
|
+
id: toolCall.id,
|
|
21
|
+
name: toolCall.name,
|
|
22
|
+
arguments: structuredClone(toolCall.arguments),
|
|
23
|
+
...(toolCall.thoughtSignature === undefined ? {} : { thoughtSignature: toolCall.thoughtSignature }),
|
|
24
|
+
...(toolCall.namespace === undefined ? {} : { namespace: toolCall.namespace }),
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function cloneStartMessage(message) {
|
|
28
|
+
return {
|
|
29
|
+
role: "assistant",
|
|
30
|
+
content: [],
|
|
31
|
+
api: message.api,
|
|
32
|
+
provider: message.provider,
|
|
33
|
+
model: message.model,
|
|
34
|
+
...(message.responseModel === undefined ? {} : { responseModel: message.responseModel }),
|
|
35
|
+
...(message.responseId === undefined ? {} : { responseId: message.responseId }),
|
|
36
|
+
...(message.providerThinkingLevel === undefined ? {} : { providerThinkingLevel: message.providerThinkingLevel }),
|
|
37
|
+
...(message.diagnostics === undefined ? {} : { diagnostics: structuredClone(message.diagnostics) }),
|
|
38
|
+
usage: structuredClone(message.usage),
|
|
39
|
+
stopReason: "pending",
|
|
40
|
+
timestamp: message.timestamp,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function assertContentIndex(contentIndex) {
|
|
44
|
+
if (!Number.isSafeInteger(contentIndex) || contentIndex < 0) {
|
|
45
|
+
throw new Error(`Invalid assistant message frame contentIndex: ${contentIndex}`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function eventBlock(event) {
|
|
49
|
+
assertContentIndex(event.contentIndex);
|
|
50
|
+
const block = event.partial.content[event.contentIndex];
|
|
51
|
+
if (!block) {
|
|
52
|
+
throw new Error(`${event.type} event has no content block at index ${event.contentIndex}`);
|
|
53
|
+
}
|
|
54
|
+
return block;
|
|
55
|
+
}
|
|
56
|
+
function serializedArguments(argumentsValue) {
|
|
57
|
+
const serialized = JSON.stringify(argumentsValue);
|
|
58
|
+
if (serialized === undefined)
|
|
59
|
+
throw new Error("Tool-call arguments are not JSON-serializable");
|
|
60
|
+
return serialized;
|
|
61
|
+
}
|
|
62
|
+
const EMPTY_PARSED_TOOL_ARGUMENTS = serializedArguments(parseStreamingJson(""));
|
|
63
|
+
function isJsonPrefix(snapshot, current) {
|
|
64
|
+
if (typeof snapshot === "string")
|
|
65
|
+
return typeof current === "string" && current.startsWith(snapshot);
|
|
66
|
+
if (Array.isArray(snapshot)) {
|
|
67
|
+
return (Array.isArray(current) &&
|
|
68
|
+
snapshot.length <= current.length &&
|
|
69
|
+
snapshot.every((value, index) => isJsonPrefix(value, current[index])));
|
|
70
|
+
}
|
|
71
|
+
if (typeof snapshot !== "object" || snapshot === null)
|
|
72
|
+
return Object.is(snapshot, current);
|
|
73
|
+
if (typeof current !== "object" || current === null || Array.isArray(current))
|
|
74
|
+
return false;
|
|
75
|
+
const currentRecord = current;
|
|
76
|
+
return Object.entries(snapshot).every(([key, value]) => Object.hasOwn(currentRecord, key) && isJsonPrefix(value, currentRecord[key]));
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Encodes one assistant stream. `partial` remains a shared live accumulator;
|
|
80
|
+
* the encoder uses per-block offsets to avoid replaying deltas already visible
|
|
81
|
+
* when an older queued event is consumed.
|
|
82
|
+
*/
|
|
83
|
+
export class AssistantMessageFrameEncoder {
|
|
84
|
+
constructor() {
|
|
85
|
+
this.started = false;
|
|
86
|
+
this.terminal = false;
|
|
87
|
+
this.blocks = new Map();
|
|
88
|
+
}
|
|
89
|
+
encode(event) {
|
|
90
|
+
if (this.terminal)
|
|
91
|
+
throw new Error(`Assistant message event ${event.type} follows a terminal event`);
|
|
92
|
+
switch (event.type) {
|
|
93
|
+
case "start":
|
|
94
|
+
if (this.started)
|
|
95
|
+
throw new Error("Assistant message stream contains more than one start event");
|
|
96
|
+
this.started = true;
|
|
97
|
+
return { type: "start", partial: cloneStartMessage(event.partial) };
|
|
98
|
+
case "done":
|
|
99
|
+
if (!this.started)
|
|
100
|
+
throw new Error("Assistant message done event appears before start");
|
|
101
|
+
this.terminal = true;
|
|
102
|
+
return undefined;
|
|
103
|
+
case "error":
|
|
104
|
+
this.terminal = true;
|
|
105
|
+
return undefined;
|
|
106
|
+
}
|
|
107
|
+
if (!this.started)
|
|
108
|
+
throw new Error(`Assistant message ${event.type} event appears before start`);
|
|
109
|
+
switch (event.type) {
|
|
110
|
+
case "text_start": {
|
|
111
|
+
const content = eventBlock(event);
|
|
112
|
+
if (content.type !== "text") {
|
|
113
|
+
throw new Error(`text_start event points to ${content.type} block at index ${event.contentIndex}`);
|
|
114
|
+
}
|
|
115
|
+
this.startBlock(event.contentIndex, {
|
|
116
|
+
kind: "text",
|
|
117
|
+
coveredChars: content.text.length,
|
|
118
|
+
deltaChars: 0,
|
|
119
|
+
});
|
|
120
|
+
return { type: "text_start", contentIndex: event.contentIndex, content: cloneTextContent(content) };
|
|
121
|
+
}
|
|
122
|
+
case "text_delta":
|
|
123
|
+
return this.encodeTextDelta(event.contentIndex, event.delta, "text");
|
|
124
|
+
case "text_end": {
|
|
125
|
+
const content = eventBlock(event);
|
|
126
|
+
if (content.type !== "text") {
|
|
127
|
+
throw new Error(`text_end event points to ${content.type} block at index ${event.contentIndex}`);
|
|
128
|
+
}
|
|
129
|
+
this.endBlock(event.contentIndex, "text");
|
|
130
|
+
return {
|
|
131
|
+
type: "text_end",
|
|
132
|
+
contentIndex: event.contentIndex,
|
|
133
|
+
content: event.content,
|
|
134
|
+
...(content.textSignature === undefined ? {} : { textSignature: content.textSignature }),
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
case "thinking_start": {
|
|
138
|
+
const content = eventBlock(event);
|
|
139
|
+
if (content.type !== "thinking") {
|
|
140
|
+
throw new Error(`thinking_start event points to ${content.type} block at index ${event.contentIndex}`);
|
|
141
|
+
}
|
|
142
|
+
this.startBlock(event.contentIndex, {
|
|
143
|
+
kind: "thinking",
|
|
144
|
+
coveredChars: content.thinking.length,
|
|
145
|
+
deltaChars: 0,
|
|
146
|
+
});
|
|
147
|
+
return {
|
|
148
|
+
type: "thinking_start",
|
|
149
|
+
contentIndex: event.contentIndex,
|
|
150
|
+
content: cloneThinkingContent(content),
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
case "thinking_delta":
|
|
154
|
+
return this.encodeTextDelta(event.contentIndex, event.delta, "thinking");
|
|
155
|
+
case "thinking_end": {
|
|
156
|
+
const content = eventBlock(event);
|
|
157
|
+
if (content.type !== "thinking") {
|
|
158
|
+
throw new Error(`thinking_end event points to ${content.type} block at index ${event.contentIndex}`);
|
|
159
|
+
}
|
|
160
|
+
this.endBlock(event.contentIndex, "thinking");
|
|
161
|
+
return {
|
|
162
|
+
type: "thinking_end",
|
|
163
|
+
contentIndex: event.contentIndex,
|
|
164
|
+
content: event.content,
|
|
165
|
+
...(content.thinkingSignature === undefined ? {} : { thinkingSignature: content.thinkingSignature }),
|
|
166
|
+
...(content.redacted === undefined ? {} : { redacted: content.redacted }),
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
case "toolcall_start": {
|
|
170
|
+
const content = eventBlock(event);
|
|
171
|
+
if (content.type !== "toolCall") {
|
|
172
|
+
throw new Error(`toolcall_start event points to ${content.type} block at index ${event.contentIndex}`);
|
|
173
|
+
}
|
|
174
|
+
const snapshotArguments = serializedArguments(content.arguments);
|
|
175
|
+
const caughtUp = snapshotArguments === EMPTY_PARSED_TOOL_ARGUMENTS;
|
|
176
|
+
this.startBlock(event.contentIndex, {
|
|
177
|
+
kind: "toolCall",
|
|
178
|
+
caughtUp,
|
|
179
|
+
catchupJson: "",
|
|
180
|
+
snapshotArguments: caughtUp ? "" : snapshotArguments,
|
|
181
|
+
});
|
|
182
|
+
return { type: "toolcall_start", contentIndex: event.contentIndex, toolCall: cloneToolCall(content) };
|
|
183
|
+
}
|
|
184
|
+
case "toolcall_delta": {
|
|
185
|
+
const state = this.block(event.contentIndex, "toolCall");
|
|
186
|
+
if (state.kind !== "toolCall")
|
|
187
|
+
throw new Error("Unreachable tool-call encoder state");
|
|
188
|
+
if (state.caughtUp) {
|
|
189
|
+
return event.delta.length === 0
|
|
190
|
+
? undefined
|
|
191
|
+
: { type: "toolcall_delta", contentIndex: event.contentIndex, delta: event.delta };
|
|
192
|
+
}
|
|
193
|
+
state.catchupJson += event.delta;
|
|
194
|
+
const argumentsValue = parseStreamingJson(state.catchupJson);
|
|
195
|
+
if (serializedArguments(argumentsValue) !== state.snapshotArguments) {
|
|
196
|
+
// Legacy grammar calls include the initial input in toolcall_start, but their
|
|
197
|
+
// JSON delta stream still begins at an empty input. Its parsed arguments can
|
|
198
|
+
// therefore extend, rather than exactly reproduce, the start snapshot.
|
|
199
|
+
const snapshotArguments = parseStreamingJson(state.snapshotArguments);
|
|
200
|
+
if (!isJsonPrefix(snapshotArguments, argumentsValue))
|
|
201
|
+
return undefined;
|
|
202
|
+
}
|
|
203
|
+
state.caughtUp = true;
|
|
204
|
+
state.snapshotArguments = "";
|
|
205
|
+
const json = state.catchupJson;
|
|
206
|
+
state.catchupJson = "";
|
|
207
|
+
return json.length === 0
|
|
208
|
+
? undefined
|
|
209
|
+
: { type: "toolcall_checkpoint", contentIndex: event.contentIndex, json };
|
|
210
|
+
}
|
|
211
|
+
case "toolcall_end": {
|
|
212
|
+
const content = eventBlock(event);
|
|
213
|
+
if (content.type !== "toolCall") {
|
|
214
|
+
throw new Error(`toolcall_end event points to ${content.type} block at index ${event.contentIndex}`);
|
|
215
|
+
}
|
|
216
|
+
if (event.toolCall.type !== "toolCall") {
|
|
217
|
+
throw new Error(`toolcall_end event has invalid tool call at index ${event.contentIndex}`);
|
|
218
|
+
}
|
|
219
|
+
this.endBlock(event.contentIndex, "toolCall");
|
|
220
|
+
return {
|
|
221
|
+
type: "toolcall_end",
|
|
222
|
+
contentIndex: event.contentIndex,
|
|
223
|
+
id: event.toolCall.id,
|
|
224
|
+
name: event.toolCall.name,
|
|
225
|
+
arguments: structuredClone(event.toolCall.arguments),
|
|
226
|
+
...(event.toolCall.thoughtSignature === undefined
|
|
227
|
+
? {}
|
|
228
|
+
: { thoughtSignature: event.toolCall.thoughtSignature }),
|
|
229
|
+
...(event.toolCall.namespace === undefined ? {} : { namespace: event.toolCall.namespace }),
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
startBlock(contentIndex, state) {
|
|
235
|
+
assertContentIndex(contentIndex);
|
|
236
|
+
if (this.blocks.has(contentIndex)) {
|
|
237
|
+
throw new Error(`Assistant message block ${contentIndex} starts more than once`);
|
|
238
|
+
}
|
|
239
|
+
this.blocks.set(contentIndex, state);
|
|
240
|
+
}
|
|
241
|
+
block(contentIndex, kind) {
|
|
242
|
+
assertContentIndex(contentIndex);
|
|
243
|
+
const state = this.blocks.get(contentIndex);
|
|
244
|
+
if (state === undefined)
|
|
245
|
+
throw new Error(`Assistant message ${kind} block ${contentIndex} has not started`);
|
|
246
|
+
if (state.kind !== kind) {
|
|
247
|
+
throw new Error(`Assistant message block ${contentIndex} is ${state.kind}, not ${kind}`);
|
|
248
|
+
}
|
|
249
|
+
return state;
|
|
250
|
+
}
|
|
251
|
+
endBlock(contentIndex, kind) {
|
|
252
|
+
this.block(contentIndex, kind);
|
|
253
|
+
this.blocks.delete(contentIndex);
|
|
254
|
+
}
|
|
255
|
+
encodeTextDelta(contentIndex, delta, kind) {
|
|
256
|
+
const state = this.block(contentIndex, kind);
|
|
257
|
+
if (state.kind === "toolCall")
|
|
258
|
+
throw new Error("Unreachable text encoder state");
|
|
259
|
+
const deltaStart = state.deltaChars;
|
|
260
|
+
state.deltaChars += delta.length;
|
|
261
|
+
const covered = Math.max(0, state.coveredChars - deltaStart);
|
|
262
|
+
if (covered >= delta.length)
|
|
263
|
+
return undefined;
|
|
264
|
+
const uncovered = covered === 0 ? delta : delta.slice(covered);
|
|
265
|
+
return kind === "text"
|
|
266
|
+
? { type: "text_delta", contentIndex, delta: uncovered }
|
|
267
|
+
: { type: "thinking_delta", contentIndex, delta: uncovered };
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
function appendBlock(message, states, contentIndex, block, state) {
|
|
271
|
+
assertContentIndex(contentIndex);
|
|
272
|
+
if (contentIndex !== message.content.length) {
|
|
273
|
+
const reason = contentIndex < message.content.length ? "already exists" : "would leave a gap";
|
|
274
|
+
throw new Error(`Cannot start assistant message block at index ${contentIndex}: ${reason}`);
|
|
275
|
+
}
|
|
276
|
+
message.content.push(structuredClone(block));
|
|
277
|
+
states.set(contentIndex, state);
|
|
278
|
+
}
|
|
279
|
+
function activeBlock(message, states, contentIndex, expectedKind, frameType) {
|
|
280
|
+
assertContentIndex(contentIndex);
|
|
281
|
+
const state = states.get(contentIndex);
|
|
282
|
+
const block = message.content[contentIndex];
|
|
283
|
+
if (!state || !block) {
|
|
284
|
+
throw new Error(`${frameType} frame has no started block at index ${contentIndex}`);
|
|
285
|
+
}
|
|
286
|
+
if (state.kind !== expectedKind || block.type !== expectedKind) {
|
|
287
|
+
throw new Error(`${frameType} frame expected ${expectedKind} block at index ${contentIndex}, found ${block.type}`);
|
|
288
|
+
}
|
|
289
|
+
if (state.ended) {
|
|
290
|
+
throw new Error(`${frameType} frame follows the end of block at index ${contentIndex}`);
|
|
291
|
+
}
|
|
292
|
+
return { block, state };
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Replay compact frames without mutating them. Returns `undefined` when the
|
|
296
|
+
* iterable contains no start frame.
|
|
297
|
+
*/
|
|
298
|
+
export function reduceAssistantMessageFrames(frames) {
|
|
299
|
+
let message;
|
|
300
|
+
let frameBeforeStart;
|
|
301
|
+
const states = new Map();
|
|
302
|
+
for (const frame of frames) {
|
|
303
|
+
if (frame.type === "start") {
|
|
304
|
+
if (message)
|
|
305
|
+
throw new Error("Assistant message frame sequence contains more than one start frame");
|
|
306
|
+
if (frameBeforeStart !== undefined)
|
|
307
|
+
throw new Error(`${frameBeforeStart} frame appears before the start frame`);
|
|
308
|
+
message = structuredClone(frame.partial);
|
|
309
|
+
continue;
|
|
310
|
+
}
|
|
311
|
+
if (!message) {
|
|
312
|
+
frameBeforeStart ??= frame.type;
|
|
313
|
+
continue;
|
|
314
|
+
}
|
|
315
|
+
switch (frame.type) {
|
|
316
|
+
case "text_start":
|
|
317
|
+
if (frame.content.type !== "text") {
|
|
318
|
+
throw new Error(`text_start frame contains ${frame.content.type} content`);
|
|
319
|
+
}
|
|
320
|
+
appendBlock(message, states, frame.contentIndex, frame.content, { kind: "text", ended: false });
|
|
321
|
+
break;
|
|
322
|
+
case "text_delta": {
|
|
323
|
+
const { block } = activeBlock(message, states, frame.contentIndex, "text", frame.type);
|
|
324
|
+
if (block.type !== "text")
|
|
325
|
+
throw new Error("Unreachable text frame state");
|
|
326
|
+
block.text += frame.delta;
|
|
327
|
+
break;
|
|
328
|
+
}
|
|
329
|
+
case "text_end": {
|
|
330
|
+
const { block, state } = activeBlock(message, states, frame.contentIndex, "text", frame.type);
|
|
331
|
+
if (block.type !== "text")
|
|
332
|
+
throw new Error("Unreachable text frame state");
|
|
333
|
+
block.text = frame.content;
|
|
334
|
+
delete block.textSignature;
|
|
335
|
+
if (frame.textSignature !== undefined)
|
|
336
|
+
block.textSignature = frame.textSignature;
|
|
337
|
+
state.ended = true;
|
|
338
|
+
break;
|
|
339
|
+
}
|
|
340
|
+
case "thinking_start":
|
|
341
|
+
if (frame.content.type !== "thinking") {
|
|
342
|
+
throw new Error(`thinking_start frame contains ${frame.content.type} content`);
|
|
343
|
+
}
|
|
344
|
+
appendBlock(message, states, frame.contentIndex, frame.content, {
|
|
345
|
+
kind: "thinking",
|
|
346
|
+
ended: false,
|
|
347
|
+
});
|
|
348
|
+
break;
|
|
349
|
+
case "thinking_delta": {
|
|
350
|
+
const { block } = activeBlock(message, states, frame.contentIndex, "thinking", frame.type);
|
|
351
|
+
if (block.type !== "thinking")
|
|
352
|
+
throw new Error("Unreachable thinking frame state");
|
|
353
|
+
block.thinking += frame.delta;
|
|
354
|
+
break;
|
|
355
|
+
}
|
|
356
|
+
case "thinking_end": {
|
|
357
|
+
const { block, state } = activeBlock(message, states, frame.contentIndex, "thinking", frame.type);
|
|
358
|
+
if (block.type !== "thinking")
|
|
359
|
+
throw new Error("Unreachable thinking frame state");
|
|
360
|
+
block.thinking = frame.content;
|
|
361
|
+
delete block.thinkingSignature;
|
|
362
|
+
delete block.redacted;
|
|
363
|
+
if (frame.thinkingSignature !== undefined)
|
|
364
|
+
block.thinkingSignature = frame.thinkingSignature;
|
|
365
|
+
if (frame.redacted !== undefined)
|
|
366
|
+
block.redacted = frame.redacted;
|
|
367
|
+
state.ended = true;
|
|
368
|
+
break;
|
|
369
|
+
}
|
|
370
|
+
case "toolcall_start":
|
|
371
|
+
if (frame.toolCall.type !== "toolCall") {
|
|
372
|
+
throw new Error(`toolcall_start frame contains ${frame.toolCall.type} content`);
|
|
373
|
+
}
|
|
374
|
+
appendBlock(message, states, frame.contentIndex, frame.toolCall, {
|
|
375
|
+
kind: "toolCall",
|
|
376
|
+
ended: false,
|
|
377
|
+
json: "",
|
|
378
|
+
});
|
|
379
|
+
break;
|
|
380
|
+
case "toolcall_checkpoint": {
|
|
381
|
+
const { block, state } = activeBlock(message, states, frame.contentIndex, "toolCall", frame.type);
|
|
382
|
+
if (block.type !== "toolCall" || state.kind !== "toolCall") {
|
|
383
|
+
throw new Error("Unreachable tool-call checkpoint state");
|
|
384
|
+
}
|
|
385
|
+
state.json = frame.json;
|
|
386
|
+
block.arguments = parseStreamingJson(frame.json);
|
|
387
|
+
break;
|
|
388
|
+
}
|
|
389
|
+
case "toolcall_delta": {
|
|
390
|
+
const { block, state } = activeBlock(message, states, frame.contentIndex, "toolCall", frame.type);
|
|
391
|
+
if (block.type !== "toolCall" || state.kind !== "toolCall") {
|
|
392
|
+
throw new Error("Unreachable tool-call frame state");
|
|
393
|
+
}
|
|
394
|
+
state.json += frame.delta;
|
|
395
|
+
break;
|
|
396
|
+
}
|
|
397
|
+
case "toolcall_end": {
|
|
398
|
+
const { block, state } = activeBlock(message, states, frame.contentIndex, "toolCall", frame.type);
|
|
399
|
+
if (block.type !== "toolCall")
|
|
400
|
+
throw new Error("Unreachable tool-call frame state");
|
|
401
|
+
block.id = frame.id;
|
|
402
|
+
block.name = frame.name;
|
|
403
|
+
block.arguments = structuredClone(frame.arguments);
|
|
404
|
+
delete block.thoughtSignature;
|
|
405
|
+
delete block.namespace;
|
|
406
|
+
if (frame.thoughtSignature !== undefined)
|
|
407
|
+
block.thoughtSignature = frame.thoughtSignature;
|
|
408
|
+
if (frame.namespace !== undefined)
|
|
409
|
+
block.namespace = frame.namespace;
|
|
410
|
+
state.ended = true;
|
|
411
|
+
break;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
if (!message)
|
|
416
|
+
return undefined;
|
|
417
|
+
for (const [contentIndex, state] of states) {
|
|
418
|
+
if (state.kind !== "toolCall" || state.ended || state.json.length === 0)
|
|
419
|
+
continue;
|
|
420
|
+
const block = message.content[contentIndex];
|
|
421
|
+
if (block?.type !== "toolCall")
|
|
422
|
+
throw new Error("Unreachable tool-call frame state");
|
|
423
|
+
block.arguments = parseStreamingJson(state.json);
|
|
424
|
+
}
|
|
425
|
+
return message;
|
|
426
|
+
}
|
|
427
|
+
//# sourceMappingURL=assistant-message-frame.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assistant-message-frame.js","sourceRoot":"","sources":["../../src/utils/assistant-message-frame.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AA+CrD,SAAS,gBAAgB,CAAC,OAAoB;IAC7C,OAAO;QACN,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,GAAG,CAAC,OAAO,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,OAAO,CAAC,aAAa,EAAE,CAAC;KACxF,CAAC;AACH,CAAC;AAED,SAAS,oBAAoB,CAAC,OAAwB;IACrD,OAAO;QACN,IAAI,EAAE,UAAU;QAChB,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,GAAG,CAAC,OAAO,CAAC,iBAAiB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,OAAO,CAAC,iBAAiB,EAAE,CAAC;QACpG,GAAG,CAAC,OAAO,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC;KACzE,CAAC;AACH,CAAC;AAED,SAAS,aAAa,CAAC,QAAkB;IACxC,OAAO;QACN,IAAI,EAAE,UAAU;QAChB,EAAE,EAAE,QAAQ,CAAC,EAAE;QAC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AAE,KAAK,CAAC,gBAAgB,GAAG,KAAK,CAAC,gBAAgB,CAAC;gBAC1F,IAAI,KAAK,CAAC,SAAS,KAAK,SAAS;oBAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;gBACrE,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC;gBACnB,MAAM;YACP,CAAC;QACF,CAAC;IACF,CAAC;IAED,IAAI,CAAC,OAAO;QAAE,OAAO,SAAS,CAAC;IAC/B,KAAK,MAAM,CAAC,YAAY,EAAE,KAAK,CAAC,IAAI,MAAM,EAAE,CAAC;QAC5C,IAAI,KAAK,CAAC,IAAI,KAAK,UAAU,IAAI,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC;YAAE,SAAS;QAClF,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAC5C,IAAI,KAAK,EAAE,IAAI,KAAK,UAAU;YAAE,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;QACrF,KAAK,CAAC,SAAS,GAAG,kBAAkB,CAAwB,KAAK,CAAC,IAAI,CAAC,CAAC;IACzE,CAAC;IAED,OAAO,OAAO,CAAC;AAChB,CAAC","sourcesContent":["import type { AssistantMessage, AssistantMessageEvent, TextContent, ThinkingContent, ToolCall } from \"../types.ts\";\nimport { parseStreamingJson } from \"./json-parse.ts\";\n\n/**\n * Compact, replayable assistant-message progress. Terminal settlement is\n * intentionally excluded and must be persisted separately.\n */\nexport type AssistantMessageFrame =\n\t| { type: \"start\"; partial: AssistantMessage }\n\t| { type: \"text_start\"; contentIndex: number; content: TextContent }\n\t| { type: \"text_delta\"; contentIndex: number; delta: string }\n\t| { type: \"text_end\"; contentIndex: number; content: string; textSignature?: string }\n\t| { type: \"thinking_start\"; contentIndex: number; content: ThinkingContent }\n\t| { type: \"thinking_delta\"; contentIndex: number; delta: string }\n\t| {\n\t\t\ttype: \"thinking_end\";\n\t\t\tcontentIndex: number;\n\t\t\tcontent: string;\n\t\t\tthinkingSignature?: string;\n\t\t\tredacted?: boolean;\n\t }\n\t| { type: \"toolcall_start\"; contentIndex: number; toolCall: ToolCall }\n\t| { type: \"toolcall_checkpoint\"; contentIndex: number; json: string }\n\t| { type: \"toolcall_delta\"; contentIndex: number; delta: string }\n\t| {\n\t\t\ttype: \"toolcall_end\";\n\t\t\tcontentIndex: number;\n\t\t\tid: string;\n\t\t\tname: string;\n\t\t\targuments: ToolCall[\"arguments\"];\n\t\t\tthoughtSignature?: string;\n\t\t\tnamespace?: string;\n\t };\n\ntype EncoderBlockState =\n\t| { kind: \"text\" | \"thinking\"; coveredChars: number; deltaChars: number }\n\t| {\n\t\t\tkind: \"toolCall\";\n\t\t\tcaughtUp: boolean;\n\t\t\tcatchupJson: string;\n\t\t\tsnapshotArguments: string;\n\t };\n\ntype ReducerBlockState =\n\t| { kind: \"text\"; ended: boolean }\n\t| { kind: \"thinking\"; ended: boolean }\n\t| { kind: \"toolCall\"; ended: boolean; json: string };\n\nfunction cloneTextContent(content: TextContent): TextContent {\n\treturn {\n\t\ttype: \"text\",\n\t\ttext: content.text,\n\t\t...(content.textSignature === undefined ? {} : { textSignature: content.textSignature }),\n\t};\n}\n\nfunction cloneThinkingContent(content: ThinkingContent): ThinkingContent {\n\treturn {\n\t\ttype: \"thinking\",\n\t\tthinking: content.thinking,\n\t\t...(content.thinkingSignature === undefined ? {} : { thinkingSignature: content.thinkingSignature }),\n\t\t...(content.redacted === undefined ? {} : { redacted: content.redacted }),\n\t};\n}\n\nfunction cloneToolCall(toolCall: ToolCall): ToolCall {\n\treturn {\n\t\ttype: \"toolCall\",\n\t\tid: toolCall.id,\n\t\tname: toolCall.name,\n\t\targuments: structuredClone(toolCall.arguments),\n\t\t...(toolCall.thoughtSignature === undefined ? {} : { thoughtSignature: toolCall.thoughtSignature }),\n\t\t...(toolCall.namespace === undefined ? {} : { namespace: toolCall.namespace }),\n\t};\n}\n\nfunction cloneStartMessage(message: AssistantMessage): AssistantMessage {\n\treturn {\n\t\trole: \"assistant\",\n\t\tcontent: [],\n\t\tapi: message.api,\n\t\tprovider: message.provider,\n\t\tmodel: message.model,\n\t\t...(message.responseModel === undefined ? {} : { responseModel: message.responseModel }),\n\t\t...(message.responseId === undefined ? {} : { responseId: message.responseId }),\n\t\t...(message.providerThinkingLevel === undefined ? {} : { providerThinkingLevel: message.providerThinkingLevel }),\n\t\t...(message.diagnostics === undefined ? {} : { diagnostics: structuredClone(message.diagnostics) }),\n\t\tusage: structuredClone(message.usage),\n\t\tstopReason: \"pending\",\n\t\ttimestamp: message.timestamp,\n\t};\n}\n\nfunction assertContentIndex(contentIndex: number): void {\n\tif (!Number.isSafeInteger(contentIndex) || contentIndex < 0) {\n\t\tthrow new Error(`Invalid assistant message frame contentIndex: ${contentIndex}`);\n\t}\n}\n\nfunction eventBlock(event: Exclude<AssistantMessageEvent, { type: \"start\" | \"done\" | \"error\" }>) {\n\tassertContentIndex(event.contentIndex);\n\tconst block = event.partial.content[event.contentIndex];\n\tif (!block) {\n\t\tthrow new Error(`${event.type} event has no content block at index ${event.contentIndex}`);\n\t}\n\treturn block;\n}\n\nfunction serializedArguments(argumentsValue: ToolCall[\"arguments\"]): string {\n\tconst serialized = JSON.stringify(argumentsValue);\n\tif (serialized === undefined) throw new Error(\"Tool-call arguments are not JSON-serializable\");\n\treturn serialized;\n}\n\nconst EMPTY_PARSED_TOOL_ARGUMENTS = serializedArguments(parseStreamingJson<ToolCall[\"arguments\"]>(\"\"));\n\nfunction isJsonPrefix(snapshot: unknown, current: unknown): boolean {\n\tif (typeof snapshot === \"string\") return typeof current === \"string\" && current.startsWith(snapshot);\n\tif (Array.isArray(snapshot)) {\n\t\treturn (\n\t\t\tArray.isArray(current) &&\n\t\t\tsnapshot.length <= current.length &&\n\t\t\tsnapshot.every((value, index) => isJsonPrefix(value, current[index]))\n\t\t);\n\t}\n\tif (typeof snapshot !== \"object\" || snapshot === null) return Object.is(snapshot, current);\n\tif (typeof current !== \"object\" || current === null || Array.isArray(current)) return false;\n\tconst currentRecord = current as Record<string, unknown>;\n\treturn Object.entries(snapshot).every(\n\t\t([key, value]) => Object.hasOwn(currentRecord, key) && isJsonPrefix(value, currentRecord[key]),\n\t);\n}\n\n/**\n * Encodes one assistant stream. `partial` remains a shared live accumulator;\n * the encoder uses per-block offsets to avoid replaying deltas already visible\n * when an older queued event is consumed.\n */\nexport class AssistantMessageFrameEncoder {\n\tprivate started = false;\n\tprivate terminal = false;\n\tprivate readonly blocks = new Map<number, EncoderBlockState>();\n\n\tencode(event: AssistantMessageEvent): AssistantMessageFrame | undefined {\n\t\tif (this.terminal) throw new Error(`Assistant message event ${event.type} follows a terminal event`);\n\n\t\tswitch (event.type) {\n\t\t\tcase \"start\":\n\t\t\t\tif (this.started) throw new Error(\"Assistant message stream contains more than one start event\");\n\t\t\t\tthis.started = true;\n\t\t\t\treturn { type: \"start\", partial: cloneStartMessage(event.partial) };\n\t\t\tcase \"done\":\n\t\t\t\tif (!this.started) throw new Error(\"Assistant message done event appears before start\");\n\t\t\t\tthis.terminal = true;\n\t\t\t\treturn undefined;\n\t\t\tcase \"error\":\n\t\t\t\tthis.terminal = true;\n\t\t\t\treturn undefined;\n\t\t}\n\n\t\tif (!this.started) throw new Error(`Assistant message ${event.type} event appears before start`);\n\n\t\tswitch (event.type) {\n\t\t\tcase \"text_start\": {\n\t\t\t\tconst content = eventBlock(event);\n\t\t\t\tif (content.type !== \"text\") {\n\t\t\t\t\tthrow new Error(`text_start event points to ${content.type} block at index ${event.contentIndex}`);\n\t\t\t\t}\n\t\t\t\tthis.startBlock(event.contentIndex, {\n\t\t\t\t\tkind: \"text\",\n\t\t\t\t\tcoveredChars: content.text.length,\n\t\t\t\t\tdeltaChars: 0,\n\t\t\t\t});\n\t\t\t\treturn { type: \"text_start\", contentIndex: event.contentIndex, content: cloneTextContent(content) };\n\t\t\t}\n\t\t\tcase \"text_delta\":\n\t\t\t\treturn this.encodeTextDelta(event.contentIndex, event.delta, \"text\");\n\t\t\tcase \"text_end\": {\n\t\t\t\tconst content = eventBlock(event);\n\t\t\t\tif (content.type !== \"text\") {\n\t\t\t\t\tthrow new Error(`text_end event points to ${content.type} block at index ${event.contentIndex}`);\n\t\t\t\t}\n\t\t\t\tthis.endBlock(event.contentIndex, \"text\");\n\t\t\t\treturn {\n\t\t\t\t\ttype: \"text_end\",\n\t\t\t\t\tcontentIndex: event.contentIndex,\n\t\t\t\t\tcontent: event.content,\n\t\t\t\t\t...(content.textSignature === undefined ? {} : { textSignature: content.textSignature }),\n\t\t\t\t};\n\t\t\t}\n\t\t\tcase \"thinking_start\": {\n\t\t\t\tconst content = eventBlock(event);\n\t\t\t\tif (content.type !== \"thinking\") {\n\t\t\t\t\tthrow new Error(`thinking_start event points to ${content.type} block at index ${event.contentIndex}`);\n\t\t\t\t}\n\t\t\t\tthis.startBlock(event.contentIndex, {\n\t\t\t\t\tkind: \"thinking\",\n\t\t\t\t\tcoveredChars: content.thinking.length,\n\t\t\t\t\tdeltaChars: 0,\n\t\t\t\t});\n\t\t\t\treturn {\n\t\t\t\t\ttype: \"thinking_start\",\n\t\t\t\t\tcontentIndex: event.contentIndex,\n\t\t\t\t\tcontent: cloneThinkingContent(content),\n\t\t\t\t};\n\t\t\t}\n\t\t\tcase \"thinking_delta\":\n\t\t\t\treturn this.encodeTextDelta(event.contentIndex, event.delta, \"thinking\");\n\t\t\tcase \"thinking_end\": {\n\t\t\t\tconst content = eventBlock(event);\n\t\t\t\tif (content.type !== \"thinking\") {\n\t\t\t\t\tthrow new Error(`thinking_end event points to ${content.type} block at index ${event.contentIndex}`);\n\t\t\t\t}\n\t\t\t\tthis.endBlock(event.contentIndex, \"thinking\");\n\t\t\t\treturn {\n\t\t\t\t\ttype: \"thinking_end\",\n\t\t\t\t\tcontentIndex: event.contentIndex,\n\t\t\t\t\tcontent: event.content,\n\t\t\t\t\t...(content.thinkingSignature === undefined ? {} : { thinkingSignature: content.thinkingSignature }),\n\t\t\t\t\t...(content.redacted === undefined ? {} : { redacted: content.redacted }),\n\t\t\t\t};\n\t\t\t}\n\t\t\tcase \"toolcall_start\": {\n\t\t\t\tconst content = eventBlock(event);\n\t\t\t\tif (content.type !== \"toolCall\") {\n\t\t\t\t\tthrow new Error(`toolcall_start event points to ${content.type} block at index ${event.contentIndex}`);\n\t\t\t\t}\n\t\t\t\tconst snapshotArguments = serializedArguments(content.arguments);\n\t\t\t\tconst caughtUp = snapshotArguments === EMPTY_PARSED_TOOL_ARGUMENTS;\n\t\t\t\tthis.startBlock(event.contentIndex, {\n\t\t\t\t\tkind: \"toolCall\",\n\t\t\t\t\tcaughtUp,\n\t\t\t\t\tcatchupJson: \"\",\n\t\t\t\t\tsnapshotArguments: caughtUp ? \"\" : snapshotArguments,\n\t\t\t\t});\n\t\t\t\treturn { type: \"toolcall_start\", contentIndex: event.contentIndex, toolCall: cloneToolCall(content) };\n\t\t\t}\n\t\t\tcase \"toolcall_delta\": {\n\t\t\t\tconst state = this.block(event.contentIndex, \"toolCall\");\n\t\t\t\tif (state.kind !== \"toolCall\") throw new Error(\"Unreachable tool-call encoder state\");\n\t\t\t\tif (state.caughtUp) {\n\t\t\t\t\treturn event.delta.length === 0\n\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t: { type: \"toolcall_delta\", contentIndex: event.contentIndex, delta: event.delta };\n\t\t\t\t}\n\t\t\t\tstate.catchupJson += event.delta;\n\t\t\t\tconst argumentsValue = parseStreamingJson<ToolCall[\"arguments\"]>(state.catchupJson);\n\t\t\t\tif (serializedArguments(argumentsValue) !== state.snapshotArguments) {\n\t\t\t\t\t// Legacy grammar calls include the initial input in toolcall_start, but their\n\t\t\t\t\t// JSON delta stream still begins at an empty input. Its parsed arguments can\n\t\t\t\t\t// therefore extend, rather than exactly reproduce, the start snapshot.\n\t\t\t\t\tconst snapshotArguments = parseStreamingJson<ToolCall[\"arguments\"]>(state.snapshotArguments);\n\t\t\t\t\tif (!isJsonPrefix(snapshotArguments, argumentsValue)) return undefined;\n\t\t\t\t}\n\t\t\t\tstate.caughtUp = true;\n\t\t\t\tstate.snapshotArguments = \"\";\n\t\t\t\tconst json = state.catchupJson;\n\t\t\t\tstate.catchupJson = \"\";\n\t\t\t\treturn json.length === 0\n\t\t\t\t\t? undefined\n\t\t\t\t\t: { type: \"toolcall_checkpoint\", contentIndex: event.contentIndex, json };\n\t\t\t}\n\t\t\tcase \"toolcall_end\": {\n\t\t\t\tconst content = eventBlock(event);\n\t\t\t\tif (content.type !== \"toolCall\") {\n\t\t\t\t\tthrow new Error(`toolcall_end event points to ${content.type} block at index ${event.contentIndex}`);\n\t\t\t\t}\n\t\t\t\tif (event.toolCall.type !== \"toolCall\") {\n\t\t\t\t\tthrow new Error(`toolcall_end event has invalid tool call at index ${event.contentIndex}`);\n\t\t\t\t}\n\t\t\t\tthis.endBlock(event.contentIndex, \"toolCall\");\n\t\t\t\treturn {\n\t\t\t\t\ttype: \"toolcall_end\",\n\t\t\t\t\tcontentIndex: event.contentIndex,\n\t\t\t\t\tid: event.toolCall.id,\n\t\t\t\t\tname: event.toolCall.name,\n\t\t\t\t\targuments: structuredClone(event.toolCall.arguments),\n\t\t\t\t\t...(event.toolCall.thoughtSignature === undefined\n\t\t\t\t\t\t? {}\n\t\t\t\t\t\t: { thoughtSignature: event.toolCall.thoughtSignature }),\n\t\t\t\t\t...(event.toolCall.namespace === undefined ? {} : { namespace: event.toolCall.namespace }),\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate startBlock(contentIndex: number, state: EncoderBlockState): void {\n\t\tassertContentIndex(contentIndex);\n\t\tif (this.blocks.has(contentIndex)) {\n\t\t\tthrow new Error(`Assistant message block ${contentIndex} starts more than once`);\n\t\t}\n\t\tthis.blocks.set(contentIndex, state);\n\t}\n\n\tprivate block(contentIndex: number, kind: EncoderBlockState[\"kind\"]): EncoderBlockState {\n\t\tassertContentIndex(contentIndex);\n\t\tconst state = this.blocks.get(contentIndex);\n\t\tif (state === undefined) throw new Error(`Assistant message ${kind} block ${contentIndex} has not started`);\n\t\tif (state.kind !== kind) {\n\t\t\tthrow new Error(`Assistant message block ${contentIndex} is ${state.kind}, not ${kind}`);\n\t\t}\n\t\treturn state;\n\t}\n\n\tprivate endBlock(contentIndex: number, kind: EncoderBlockState[\"kind\"]): void {\n\t\tthis.block(contentIndex, kind);\n\t\tthis.blocks.delete(contentIndex);\n\t}\n\n\tprivate encodeTextDelta(\n\t\tcontentIndex: number,\n\t\tdelta: string,\n\t\tkind: \"text\" | \"thinking\",\n\t): AssistantMessageFrame | undefined {\n\t\tconst state = this.block(contentIndex, kind);\n\t\tif (state.kind === \"toolCall\") throw new Error(\"Unreachable text encoder state\");\n\t\tconst deltaStart = state.deltaChars;\n\t\tstate.deltaChars += delta.length;\n\t\tconst covered = Math.max(0, state.coveredChars - deltaStart);\n\t\tif (covered >= delta.length) return undefined;\n\t\tconst uncovered = covered === 0 ? delta : delta.slice(covered);\n\t\treturn kind === \"text\"\n\t\t\t? { type: \"text_delta\", contentIndex, delta: uncovered }\n\t\t\t: { type: \"thinking_delta\", contentIndex, delta: uncovered };\n\t}\n}\n\nfunction appendBlock(\n\tmessage: AssistantMessage,\n\tstates: Map<number, ReducerBlockState>,\n\tcontentIndex: number,\n\tblock: TextContent | ThinkingContent | ToolCall,\n\tstate: ReducerBlockState,\n): void {\n\tassertContentIndex(contentIndex);\n\tif (contentIndex !== message.content.length) {\n\t\tconst reason = contentIndex < message.content.length ? \"already exists\" : \"would leave a gap\";\n\t\tthrow new Error(`Cannot start assistant message block at index ${contentIndex}: ${reason}`);\n\t}\n\tmessage.content.push(structuredClone(block));\n\tstates.set(contentIndex, state);\n}\n\nfunction activeBlock(\n\tmessage: AssistantMessage,\n\tstates: Map<number, ReducerBlockState>,\n\tcontentIndex: number,\n\texpectedKind: ReducerBlockState[\"kind\"],\n\tframeType: AssistantMessageFrame[\"type\"],\n): { block: TextContent | ThinkingContent | ToolCall; state: ReducerBlockState } {\n\tassertContentIndex(contentIndex);\n\tconst state = states.get(contentIndex);\n\tconst block = message.content[contentIndex];\n\tif (!state || !block) {\n\t\tthrow new Error(`${frameType} frame has no started block at index ${contentIndex}`);\n\t}\n\tif (state.kind !== expectedKind || block.type !== expectedKind) {\n\t\tthrow new Error(\n\t\t\t`${frameType} frame expected ${expectedKind} block at index ${contentIndex}, found ${block.type}`,\n\t\t);\n\t}\n\tif (state.ended) {\n\t\tthrow new Error(`${frameType} frame follows the end of block at index ${contentIndex}`);\n\t}\n\treturn { block, state };\n}\n\n/**\n * Replay compact frames without mutating them. Returns `undefined` when the\n * iterable contains no start frame.\n */\nexport function reduceAssistantMessageFrames(frames: Iterable<AssistantMessageFrame>): AssistantMessage | undefined {\n\tlet message: AssistantMessage | undefined;\n\tlet frameBeforeStart: AssistantMessageFrame[\"type\"] | undefined;\n\tconst states = new Map<number, ReducerBlockState>();\n\n\tfor (const frame of frames) {\n\t\tif (frame.type === \"start\") {\n\t\t\tif (message) throw new Error(\"Assistant message frame sequence contains more than one start frame\");\n\t\t\tif (frameBeforeStart !== undefined)\n\t\t\t\tthrow new Error(`${frameBeforeStart} frame appears before the start frame`);\n\t\t\tmessage = structuredClone(frame.partial);\n\t\t\tcontinue;\n\t\t}\n\t\tif (!message) {\n\t\t\tframeBeforeStart ??= frame.type;\n\t\t\tcontinue;\n\t\t}\n\n\t\tswitch (frame.type) {\n\t\t\tcase \"text_start\":\n\t\t\t\tif (frame.content.type !== \"text\") {\n\t\t\t\t\tthrow new Error(`text_start frame contains ${frame.content.type} content`);\n\t\t\t\t}\n\t\t\t\tappendBlock(message, states, frame.contentIndex, frame.content, { kind: \"text\", ended: false });\n\t\t\t\tbreak;\n\t\t\tcase \"text_delta\": {\n\t\t\t\tconst { block } = activeBlock(message, states, frame.contentIndex, \"text\", frame.type);\n\t\t\t\tif (block.type !== \"text\") throw new Error(\"Unreachable text frame state\");\n\t\t\t\tblock.text += frame.delta;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"text_end\": {\n\t\t\t\tconst { block, state } = activeBlock(message, states, frame.contentIndex, \"text\", frame.type);\n\t\t\t\tif (block.type !== \"text\") throw new Error(\"Unreachable text frame state\");\n\t\t\t\tblock.text = frame.content;\n\t\t\t\tdelete block.textSignature;\n\t\t\t\tif (frame.textSignature !== undefined) block.textSignature = frame.textSignature;\n\t\t\t\tstate.ended = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"thinking_start\":\n\t\t\t\tif (frame.content.type !== \"thinking\") {\n\t\t\t\t\tthrow new Error(`thinking_start frame contains ${frame.content.type} content`);\n\t\t\t\t}\n\t\t\t\tappendBlock(message, states, frame.contentIndex, frame.content, {\n\t\t\t\t\tkind: \"thinking\",\n\t\t\t\t\tended: false,\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase \"thinking_delta\": {\n\t\t\t\tconst { block } = activeBlock(message, states, frame.contentIndex, \"thinking\", frame.type);\n\t\t\t\tif (block.type !== \"thinking\") throw new Error(\"Unreachable thinking frame state\");\n\t\t\t\tblock.thinking += frame.delta;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"thinking_end\": {\n\t\t\t\tconst { block, state } = activeBlock(message, states, frame.contentIndex, \"thinking\", frame.type);\n\t\t\t\tif (block.type !== \"thinking\") throw new Error(\"Unreachable thinking frame state\");\n\t\t\t\tblock.thinking = frame.content;\n\t\t\t\tdelete block.thinkingSignature;\n\t\t\t\tdelete block.redacted;\n\t\t\t\tif (frame.thinkingSignature !== undefined) block.thinkingSignature = frame.thinkingSignature;\n\t\t\t\tif (frame.redacted !== undefined) block.redacted = frame.redacted;\n\t\t\t\tstate.ended = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"toolcall_start\":\n\t\t\t\tif (frame.toolCall.type !== \"toolCall\") {\n\t\t\t\t\tthrow new Error(`toolcall_start frame contains ${frame.toolCall.type} content`);\n\t\t\t\t}\n\t\t\t\tappendBlock(message, states, frame.contentIndex, frame.toolCall, {\n\t\t\t\t\tkind: \"toolCall\",\n\t\t\t\t\tended: false,\n\t\t\t\t\tjson: \"\",\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase \"toolcall_checkpoint\": {\n\t\t\t\tconst { block, state } = activeBlock(message, states, frame.contentIndex, \"toolCall\", frame.type);\n\t\t\t\tif (block.type !== \"toolCall\" || state.kind !== \"toolCall\") {\n\t\t\t\t\tthrow new Error(\"Unreachable tool-call checkpoint state\");\n\t\t\t\t}\n\t\t\t\tstate.json = frame.json;\n\t\t\t\tblock.arguments = parseStreamingJson<ToolCall[\"arguments\"]>(frame.json);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"toolcall_delta\": {\n\t\t\t\tconst { block, state } = activeBlock(message, states, frame.contentIndex, \"toolCall\", frame.type);\n\t\t\t\tif (block.type !== \"toolCall\" || state.kind !== \"toolCall\") {\n\t\t\t\t\tthrow new Error(\"Unreachable tool-call frame state\");\n\t\t\t\t}\n\t\t\t\tstate.json += frame.delta;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"toolcall_end\": {\n\t\t\t\tconst { block, state } = activeBlock(message, states, frame.contentIndex, \"toolCall\", frame.type);\n\t\t\t\tif (block.type !== \"toolCall\") throw new Error(\"Unreachable tool-call frame state\");\n\t\t\t\tblock.id = frame.id;\n\t\t\t\tblock.name = frame.name;\n\t\t\t\tblock.arguments = structuredClone(frame.arguments);\n\t\t\t\tdelete block.thoughtSignature;\n\t\t\t\tdelete block.namespace;\n\t\t\t\tif (frame.thoughtSignature !== undefined) block.thoughtSignature = frame.thoughtSignature;\n\t\t\t\tif (frame.namespace !== undefined) block.namespace = frame.namespace;\n\t\t\t\tstate.ended = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (!message) return undefined;\n\tfor (const [contentIndex, state] of states) {\n\t\tif (state.kind !== \"toolCall\" || state.ended || state.json.length === 0) continue;\n\t\tconst block = message.content[contentIndex];\n\t\tif (block?.type !== \"toolCall\") throw new Error(\"Unreachable tool-call frame state\");\n\t\tblock.arguments = parseStreamingJson<ToolCall[\"arguments\"]>(state.json);\n\t}\n\n\treturn message;\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Same resolution as the conversation rotation store: an explicit override
|
|
3
|
+
* first, then the agent directory the host configured, then the default one.
|
|
4
|
+
*/
|
|
5
|
+
export declare function resolveCursorContextLimitStorePath(env?: NodeJS.ProcessEnv): string;
|
|
6
|
+
/** Records the ceiling Cursor reported for `modelId`; ignores non-positive values. */
|
|
7
|
+
export declare function recordCursorContextLimit(modelId: string, maxTokens: number | undefined): void;
|
|
8
|
+
export declare function getCursorContextLimit(modelId: string): number | undefined;
|
|
9
|
+
/** The window to trust for `modelId`: what the server reported, else the catalog. */
|
|
10
|
+
export declare function resolveCursorContextWindow(modelId: string, catalogWindow: number): number;
|
|
11
|
+
export declare function resetCursorContextLimitStoreForTest(): void;
|
|
12
|
+
//# sourceMappingURL=cursor-context-limit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor-context-limit.d.ts","sourceRoot":"","sources":["../../src/utils/cursor-context-limit.ts"],"names":[],"mappings":"AAqBA;;;GAGG;AACH,wBAAgB,kCAAkC,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAO/F;AAgDD,sFAAsF;AACtF,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAG7F;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAGzE;AAED,qFAAqF;AACrF,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CAGzF;AAED,wBAAgB,mCAAmC,IAAI,IAAI,CAG1D"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Node entry point for the observed Cursor context limits.
|
|
3
|
+
*
|
|
4
|
+
* The store itself (`cursor/context-limit-store.ts`) is browser-safe because the
|
|
5
|
+
* catalog builders that read it are bundled for the browser. Persistence needs
|
|
6
|
+
* `node:fs`, so it lives here and is installed on first use rather than as an
|
|
7
|
+
* import side effect, which a bundler is free to drop for a package declared
|
|
8
|
+
* side-effect-free. Node callers - the `cursor-agent` stream and the coding
|
|
9
|
+
* agent - use this module; browser-facing code uses the store directly.
|
|
10
|
+
*/
|
|
11
|
+
import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
12
|
+
import { dirname } from "node:path";
|
|
13
|
+
import { installCursorContextLimitPersistence, getCursorContextLimit as readObservedLimit, recordCursorContextLimit as recordObservedLimit, resetCursorContextLimitStoreForTest as resetObservedLimits, resolveCursorContextWindow as resolveObservedWindow, } from "../cursor/context-limit-store.js";
|
|
14
|
+
/**
|
|
15
|
+
* Same resolution as the conversation rotation store: an explicit override
|
|
16
|
+
* first, then the agent directory the host configured, then the default one.
|
|
17
|
+
*/
|
|
18
|
+
export function resolveCursorContextLimitStorePath(env = process.env) {
|
|
19
|
+
if (env.CURSOR_CONTEXT_LIMIT_STORE) {
|
|
20
|
+
return env.CURSOR_CONTEXT_LIMIT_STORE;
|
|
21
|
+
}
|
|
22
|
+
const agentDir = env.SENPI_CODING_AGENT_DIR ?? env.CODING_AGENT_DIR ?? `${(env.HOME ?? ".").replace(/\/$/, "")}/.senpi/agent`;
|
|
23
|
+
return `${agentDir.replace(/\/$/, "")}/cursor-context-limits.json`;
|
|
24
|
+
}
|
|
25
|
+
let savingEnabled = true;
|
|
26
|
+
const filePersistence = {
|
|
27
|
+
load: () => {
|
|
28
|
+
const limits = new Map();
|
|
29
|
+
let parsed;
|
|
30
|
+
try {
|
|
31
|
+
parsed = JSON.parse(readFileSync(resolveCursorContextLimitStorePath(), "utf8"));
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
// No file on first run, and a truncated or hand-edited one is the same
|
|
35
|
+
// situation for a cache: the catalog window is the documented fallback.
|
|
36
|
+
if (error instanceof Error)
|
|
37
|
+
return limits;
|
|
38
|
+
throw error;
|
|
39
|
+
}
|
|
40
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed))
|
|
41
|
+
return limits;
|
|
42
|
+
for (const [modelId, maxTokens] of Object.entries(parsed)) {
|
|
43
|
+
if (typeof maxTokens === "number" && Number.isFinite(maxTokens) && maxTokens > 0) {
|
|
44
|
+
limits.set(modelId, maxTokens);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return limits;
|
|
48
|
+
},
|
|
49
|
+
save: (limits) => {
|
|
50
|
+
if (!savingEnabled)
|
|
51
|
+
return;
|
|
52
|
+
const path = resolveCursorContextLimitStorePath();
|
|
53
|
+
const record = {};
|
|
54
|
+
for (const [modelId, maxTokens] of limits)
|
|
55
|
+
record[modelId] = maxTokens;
|
|
56
|
+
try {
|
|
57
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
58
|
+
const temporaryPath = `${path}.${process.pid}.tmp`;
|
|
59
|
+
writeFileSync(temporaryPath, `${JSON.stringify(record, null, 2)}\n`);
|
|
60
|
+
renameSync(temporaryPath, path);
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
// This file is a cache for the next process. A read-only agent directory
|
|
64
|
+
// must not fail the live turn that observed the limit, and one failure
|
|
65
|
+
// disables saving so a broken path cannot cost a write per checkpoint.
|
|
66
|
+
if (!(error instanceof Error))
|
|
67
|
+
throw error;
|
|
68
|
+
savingEnabled = false;
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
function ensurePersistenceInstalled() {
|
|
73
|
+
installCursorContextLimitPersistence(filePersistence);
|
|
74
|
+
}
|
|
75
|
+
/** Records the ceiling Cursor reported for `modelId`; ignores non-positive values. */
|
|
76
|
+
export function recordCursorContextLimit(modelId, maxTokens) {
|
|
77
|
+
ensurePersistenceInstalled();
|
|
78
|
+
recordObservedLimit(modelId, maxTokens);
|
|
79
|
+
}
|
|
80
|
+
export function getCursorContextLimit(modelId) {
|
|
81
|
+
ensurePersistenceInstalled();
|
|
82
|
+
return readObservedLimit(modelId);
|
|
83
|
+
}
|
|
84
|
+
/** The window to trust for `modelId`: what the server reported, else the catalog. */
|
|
85
|
+
export function resolveCursorContextWindow(modelId, catalogWindow) {
|
|
86
|
+
ensurePersistenceInstalled();
|
|
87
|
+
return resolveObservedWindow(modelId, catalogWindow);
|
|
88
|
+
}
|
|
89
|
+
export function resetCursorContextLimitStoreForTest() {
|
|
90
|
+
savingEnabled = true;
|
|
91
|
+
resetObservedLimits();
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=cursor-context-limit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor-context-limit.js","sourceRoot":"","sources":["../../src/utils/cursor-context-limit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAEN,oCAAoC,EACpC,qBAAqB,IAAI,iBAAiB,EAC1C,wBAAwB,IAAI,mBAAmB,EAC/C,mCAAmC,IAAI,mBAAmB,EAC1D,0BAA0B,IAAI,qBAAqB,GACnD,MAAM,kCAAkC,CAAC;AAE1C;;;GAGG;AACH,MAAM,UAAU,kCAAkC,CAAC,GAAG,GAAsB,OAAO,CAAC,GAAG;IACtF,IAAI,GAAG,CAAC,0BAA0B,EAAE,CAAC;QACpC,OAAO,GAAG,CAAC,0BAA0B,CAAC;IACvC,CAAC;IACD,MAAM,QAAQ,GACb,GAAG,CAAC,sBAAsB,IAAI,GAAG,CAAC,gBAAgB,IAAI,GAAG,CAAC,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC,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E,CAAC;AACvB,CAAC","sourcesContent":["/**\n * Node entry point for the observed Cursor context limits.\n *\n * The store itself (`cursor/context-limit-store.ts`) is browser-safe because the\n * catalog builders that read it are bundled for the browser. Persistence needs\n * `node:fs`, so it lives here and is installed on first use rather than as an\n * import side effect, which a bundler is free to drop for a package declared\n * side-effect-free. Node callers - the `cursor-agent` stream and the coding\n * agent - use this module; browser-facing code uses the store directly.\n */\nimport { mkdirSync, readFileSync, renameSync, writeFileSync } from \"node:fs\";\nimport { dirname } from \"node:path\";\nimport {\n\ttype CursorContextLimitPersistence,\n\tinstallCursorContextLimitPersistence,\n\tgetCursorContextLimit as readObservedLimit,\n\trecordCursorContextLimit as recordObservedLimit,\n\tresetCursorContextLimitStoreForTest as resetObservedLimits,\n\tresolveCursorContextWindow as resolveObservedWindow,\n} from \"../cursor/context-limit-store.ts\";\n\n/**\n * Same resolution as the conversation rotation store: an explicit override\n * first, then the agent directory the host configured, then the default one.\n */\nexport function resolveCursorContextLimitStorePath(env: NodeJS.ProcessEnv = process.env): string {\n\tif (env.CURSOR_CONTEXT_LIMIT_STORE) {\n\t\treturn env.CURSOR_CONTEXT_LIMIT_STORE;\n\t}\n\tconst agentDir =\n\t\tenv.SENPI_CODING_AGENT_DIR ?? env.CODING_AGENT_DIR ?? `${(env.HOME ?? \".\").replace(/\\/$/, \"\")}/.senpi/agent`;\n\treturn `${agentDir.replace(/\\/$/, \"\")}/cursor-context-limits.json`;\n}\n\nlet savingEnabled = true;\n\nconst filePersistence: CursorContextLimitPersistence = {\n\tload: () => {\n\t\tconst limits = new Map<string, number>();\n\t\tlet parsed: unknown;\n\t\ttry {\n\t\t\tparsed = JSON.parse(readFileSync(resolveCursorContextLimitStorePath(), \"utf8\"));\n\t\t} catch (error) {\n\t\t\t// No file on first run, and a truncated or hand-edited one is the same\n\t\t\t// situation for a cache: the catalog window is the documented fallback.\n\t\t\tif (error instanceof Error) return limits;\n\t\t\tthrow error;\n\t\t}\n\t\tif (!parsed || typeof parsed !== \"object\" || Array.isArray(parsed)) return limits;\n\t\tfor (const [modelId, maxTokens] of Object.entries(parsed)) {\n\t\t\tif (typeof maxTokens === \"number\" && Number.isFinite(maxTokens) && maxTokens > 0) {\n\t\t\t\tlimits.set(modelId, maxTokens);\n\t\t\t}\n\t\t}\n\t\treturn limits;\n\t},\n\tsave: (limits) => {\n\t\tif (!savingEnabled) return;\n\t\tconst path = resolveCursorContextLimitStorePath();\n\t\tconst record: Record<string, number> = {};\n\t\tfor (const [modelId, maxTokens] of limits) record[modelId] = maxTokens;\n\t\ttry {\n\t\t\tmkdirSync(dirname(path), { recursive: true });\n\t\t\tconst temporaryPath = `${path}.${process.pid}.tmp`;\n\t\t\twriteFileSync(temporaryPath, `${JSON.stringify(record, null, 2)}\\n`);\n\t\t\trenameSync(temporaryPath, path);\n\t\t} catch (error) {\n\t\t\t// This file is a cache for the next process. A read-only agent directory\n\t\t\t// must not fail the live turn that observed the limit, and one failure\n\t\t\t// disables saving so a broken path cannot cost a write per checkpoint.\n\t\t\tif (!(error instanceof Error)) throw error;\n\t\t\tsavingEnabled = false;\n\t\t}\n\t},\n};\n\nfunction ensurePersistenceInstalled(): void {\n\tinstallCursorContextLimitPersistence(filePersistence);\n}\n\n/** Records the ceiling Cursor reported for `modelId`; ignores non-positive values. */\nexport function recordCursorContextLimit(modelId: string, maxTokens: number | undefined): void {\n\tensurePersistenceInstalled();\n\trecordObservedLimit(modelId, maxTokens);\n}\n\nexport function getCursorContextLimit(modelId: string): number | undefined {\n\tensurePersistenceInstalled();\n\treturn readObservedLimit(modelId);\n}\n\n/** The window to trust for `modelId`: what the server reported, else the catalog. */\nexport function resolveCursorContextWindow(modelId: string, catalogWindow: number): number {\n\tensurePersistenceInstalled();\n\treturn resolveObservedWindow(modelId, catalogWindow);\n}\n\nexport function resetCursorContextLimitStoreForTest(): void {\n\tsavingEnabled = true;\n\tresetObservedLimits();\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-stream.d.ts","sourceRoot":"","sources":["../../src/utils/event-stream.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"event-stream.d.ts","sourceRoot":"","sources":["../../src/utils/event-stream.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAyB3E,qBAAa,WAAW,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAE,YAAW,aAAa,CAAC,CAAC,CAAC;;IAG7D,OAAO,CAAC,OAAO,CAAsG;IACrH,OAAO,CAAC,IAAI,CAAS;IAIrB,OAAO,CAAC,kBAAkB,CAAa;IACvC,OAAO,CAAC,kBAAkB,CAAuB;IACjD,OAAO,CAAC,iBAAiB,CAA4B;IACrD,OAAO,CAAC,UAAU,CAAwB;IAC1C,OAAO,CAAC,aAAa,CAAkB;IAEvC,YAAY,UAAU,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,EAAE,aAAa,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EAQ5E;IAED,IAAI,KAAK,IAAI,CAAC,EAAE,CAEf;IAmBD,IAAI,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,CAenB;IAED,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,IAAI,CAUpB;IAED,IAAI,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAUzB;IAED,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC,CAezC;IAED,MAAM,IAAI,OAAO,CAAC,CAAC,CAAC,CAEnB;IAED;;;;;;OAMG;IACG,cAAc,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,CAOhE;IAED,2EAA2E;IAC3E,mBAAmB,IAAI,OAAO,CAE7B;CACD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