@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,472 @@
|
|
|
1
|
+
import { RemoteServiceError } from "./errors.js";
|
|
2
|
+
import { serviceDeliveryContext } from "./state.js";
|
|
3
|
+
import { getReplicatedStateInternals } from "./state-internals.js";
|
|
4
|
+
import { decodeServiceControlCall } from "./wire.js";
|
|
5
|
+
export class RemoteServiceProvider {
|
|
6
|
+
#catalogue;
|
|
7
|
+
#registrations = new Map();
|
|
8
|
+
#disposed = false;
|
|
9
|
+
constructor(entries) {
|
|
10
|
+
const definitions = entries.map((entry) => ("service" in entry ? entry : { service: entry, mode: "singleton" }));
|
|
11
|
+
for (const { service } of definitions) {
|
|
12
|
+
if ("local" in service && service.local === true) {
|
|
13
|
+
throw new TypeError(`Local service ${service.id} cannot be published remotely`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
const ids = definitions.map(({ service }) => service.id);
|
|
17
|
+
if (new Set(ids).size !== ids.length)
|
|
18
|
+
throw new TypeError("Remote service catalogue contains duplicate IDs");
|
|
19
|
+
this.#catalogue = Object.freeze(definitions.map(({ service, mode }) => Object.freeze({ serviceId: service.id, mode })));
|
|
20
|
+
for (const { service, mode } of definitions) {
|
|
21
|
+
this.#registrations.set(service.id, {
|
|
22
|
+
serviceId: service.id,
|
|
23
|
+
mode,
|
|
24
|
+
instances: new Map(),
|
|
25
|
+
generations: new Map(),
|
|
26
|
+
subscribers: new Set(),
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
get catalogue() {
|
|
31
|
+
return this.#catalogue;
|
|
32
|
+
}
|
|
33
|
+
provide(service, implementation) {
|
|
34
|
+
this.#assertActive();
|
|
35
|
+
this.#assertRemotable(service);
|
|
36
|
+
this.#assertAllowed(service.id);
|
|
37
|
+
const registration = this.#registration(service.id, "singleton");
|
|
38
|
+
if (registration.singleton !== undefined) {
|
|
39
|
+
throw new RemoteServiceError("service_mode_mismatch", `Remote service ${service.id} already has a provider`);
|
|
40
|
+
}
|
|
41
|
+
const classified = classifyRemoteServiceImplementation(registration.serviceId, implementation);
|
|
42
|
+
const shape = serviceMemberShape(classified.members);
|
|
43
|
+
this.#assertSingletonShape(registration, shape);
|
|
44
|
+
registration.singleton = this.#createInstance(registration, classified, undefined);
|
|
45
|
+
registration.singletonShape = shape;
|
|
46
|
+
}
|
|
47
|
+
/** Disconnect one singleton while preserving active subscriptions and remote facades. */
|
|
48
|
+
withdraw(service) {
|
|
49
|
+
this.#assertActive();
|
|
50
|
+
this.#assertRemotable(service);
|
|
51
|
+
this.#assertAllowed(service.id);
|
|
52
|
+
const registration = this.#registration(service.id, "singleton");
|
|
53
|
+
const previous = registration.singleton;
|
|
54
|
+
if (previous === undefined)
|
|
55
|
+
return;
|
|
56
|
+
previous.active = false;
|
|
57
|
+
for (const remove of previous.removeMemberListeners)
|
|
58
|
+
remove();
|
|
59
|
+
delete registration.singleton;
|
|
60
|
+
this.#emit(registration, { type: "unavailable" });
|
|
61
|
+
}
|
|
62
|
+
/** Check a singleton replacement without changing the active provider. */
|
|
63
|
+
validateReplacement(service, implementation) {
|
|
64
|
+
this.#assertActive();
|
|
65
|
+
this.#assertRemotable(service);
|
|
66
|
+
this.#assertAllowed(service.id);
|
|
67
|
+
const registration = this.#registration(service.id, "singleton");
|
|
68
|
+
const classified = classifyRemoteServiceImplementation(registration.serviceId, implementation);
|
|
69
|
+
this.#assertSingletonShape(registration, serviceMemberShape(classified.members));
|
|
70
|
+
}
|
|
71
|
+
/** Replace one singleton without making its stable remote facade unavailable. */
|
|
72
|
+
replace(service, implementation) {
|
|
73
|
+
this.#assertActive();
|
|
74
|
+
this.#assertRemotable(service);
|
|
75
|
+
this.#assertAllowed(service.id);
|
|
76
|
+
const registration = this.#registration(service.id, "singleton");
|
|
77
|
+
const classified = classifyRemoteServiceImplementation(registration.serviceId, implementation);
|
|
78
|
+
const shape = serviceMemberShape(classified.members);
|
|
79
|
+
this.#assertSingletonShape(registration, shape);
|
|
80
|
+
const replacement = this.#createInstance(registration, classified, undefined);
|
|
81
|
+
const previous = registration.singleton;
|
|
82
|
+
if (previous !== undefined) {
|
|
83
|
+
previous.active = false;
|
|
84
|
+
for (const remove of previous.removeMemberListeners)
|
|
85
|
+
remove();
|
|
86
|
+
}
|
|
87
|
+
registration.singleton = replacement;
|
|
88
|
+
registration.singletonShape = shape;
|
|
89
|
+
this.#emit(registration, { type: "replaced", snapshot: this.#snapshotInstance(replacement) });
|
|
90
|
+
}
|
|
91
|
+
use(service) {
|
|
92
|
+
this.#assertActive();
|
|
93
|
+
this.#assertRemotable(service);
|
|
94
|
+
this.#assertAllowed(service.id);
|
|
95
|
+
const registration = this.#registrations.get(service.id);
|
|
96
|
+
if (registration?.mode !== "singleton" || registration.singleton === undefined) {
|
|
97
|
+
throw new RemoteServiceError("service_not_found", `Remote service ${service.id} has no local provider`);
|
|
98
|
+
}
|
|
99
|
+
return registration.singleton.implementation;
|
|
100
|
+
}
|
|
101
|
+
spawn(service, key, implementation) {
|
|
102
|
+
this.#assertActive();
|
|
103
|
+
this.#assertRemotable(service);
|
|
104
|
+
this.#assertAllowed(service.id);
|
|
105
|
+
if (key.length === 0)
|
|
106
|
+
throw new TypeError("Remote service instance key must not be empty");
|
|
107
|
+
const registration = this.#registration(service.id, "keyed");
|
|
108
|
+
if (registration.instances.has(key)) {
|
|
109
|
+
throw new RemoteServiceError("service_mode_mismatch", `Remote service ${service.id} already has a live instance with key ${key}`);
|
|
110
|
+
}
|
|
111
|
+
const generation = (registration.generations.get(key) ?? 0) + 1;
|
|
112
|
+
registration.generations.set(key, generation);
|
|
113
|
+
const address = { key, generation };
|
|
114
|
+
const classified = classifyRemoteServiceImplementation(registration.serviceId, implementation);
|
|
115
|
+
const instance = this.#createInstance(registration, classified, address);
|
|
116
|
+
registration.instances.set(key, instance);
|
|
117
|
+
this.#emit(registration, { type: "spawned", instance: this.#snapshotInstance(instance) });
|
|
118
|
+
let closed = false;
|
|
119
|
+
return () => {
|
|
120
|
+
if (closed)
|
|
121
|
+
return;
|
|
122
|
+
closed = true;
|
|
123
|
+
if (registration.instances.get(key) !== instance)
|
|
124
|
+
return;
|
|
125
|
+
instance.active = false;
|
|
126
|
+
for (const remove of instance.removeMemberListeners)
|
|
127
|
+
remove();
|
|
128
|
+
registration.instances.delete(key);
|
|
129
|
+
this.#emit(registration, { type: "closed", instance: address });
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
async invoke(call, context) {
|
|
133
|
+
this.#assertActive();
|
|
134
|
+
this.#assertAllowed(call.serviceId);
|
|
135
|
+
const registration = this.#registrations.get(call.serviceId);
|
|
136
|
+
if (registration === undefined) {
|
|
137
|
+
throw new RemoteServiceError("service_not_found", `Unknown remote service ${call.serviceId}`);
|
|
138
|
+
}
|
|
139
|
+
const instance = this.#resolveInstance(registration, call.instance);
|
|
140
|
+
const member = instance.members.get(call.member);
|
|
141
|
+
if (member === undefined) {
|
|
142
|
+
throw new RemoteServiceError("service_member_not_found", `Unknown remote service member ${call.serviceId}.${call.member}`);
|
|
143
|
+
}
|
|
144
|
+
if (member.kind !== "method") {
|
|
145
|
+
throw new RemoteServiceError("service_member_mismatch", `Remote service member ${call.serviceId}.${call.member} is not a method`);
|
|
146
|
+
}
|
|
147
|
+
const result = await Reflect.apply(member.method, instance.implementation, [...call.args, context]);
|
|
148
|
+
return result;
|
|
149
|
+
}
|
|
150
|
+
subscribe(serviceId, mode, listener) {
|
|
151
|
+
this.#assertActive();
|
|
152
|
+
this.#assertAllowed(serviceId);
|
|
153
|
+
const registration = this.#registration(serviceId, mode);
|
|
154
|
+
if (registration.mode === "singleton" && registration.singleton === undefined) {
|
|
155
|
+
throw new RemoteServiceError("service_not_found", `Remote service ${serviceId} has no provider`);
|
|
156
|
+
}
|
|
157
|
+
const subscriber = {
|
|
158
|
+
listener,
|
|
159
|
+
buffer: [],
|
|
160
|
+
active: false,
|
|
161
|
+
terminated: false,
|
|
162
|
+
closed: false,
|
|
163
|
+
};
|
|
164
|
+
this.#publishPending(registration);
|
|
165
|
+
registration.subscribers.add(subscriber);
|
|
166
|
+
const snapshot = this.#snapshot(registration);
|
|
167
|
+
return {
|
|
168
|
+
snapshot,
|
|
169
|
+
activate: () => {
|
|
170
|
+
if (subscriber.closed || subscriber.active)
|
|
171
|
+
return;
|
|
172
|
+
subscriber.active = true;
|
|
173
|
+
const errors = [];
|
|
174
|
+
try {
|
|
175
|
+
for (const entry of subscriber.buffer.splice(0)) {
|
|
176
|
+
try {
|
|
177
|
+
listener(entry.update, entry.context);
|
|
178
|
+
}
|
|
179
|
+
catch (error) {
|
|
180
|
+
errors.push(error);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
finally {
|
|
185
|
+
if (subscriber.terminated)
|
|
186
|
+
subscriber.closed = true;
|
|
187
|
+
}
|
|
188
|
+
throwCollectedErrors(errors, "Failed to activate remote service subscription");
|
|
189
|
+
},
|
|
190
|
+
close: () => {
|
|
191
|
+
if (subscriber.closed)
|
|
192
|
+
return;
|
|
193
|
+
subscriber.closed = true;
|
|
194
|
+
subscriber.buffer.length = 0;
|
|
195
|
+
registration.subscribers.delete(subscriber);
|
|
196
|
+
},
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
dispose() {
|
|
200
|
+
if (this.#disposed)
|
|
201
|
+
return;
|
|
202
|
+
this.#disposed = true;
|
|
203
|
+
const errors = [];
|
|
204
|
+
for (const registration of this.#registrations.values()) {
|
|
205
|
+
const singleton = registration.singleton;
|
|
206
|
+
if (singleton !== undefined) {
|
|
207
|
+
singleton.active = false;
|
|
208
|
+
for (const remove of singleton.removeMemberListeners)
|
|
209
|
+
remove();
|
|
210
|
+
delete registration.singleton;
|
|
211
|
+
try {
|
|
212
|
+
this.#emit(registration, { type: "unavailable" });
|
|
213
|
+
}
|
|
214
|
+
catch (error) {
|
|
215
|
+
errors.push(error);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
for (const [key, instance] of [...registration.instances]) {
|
|
219
|
+
instance.active = false;
|
|
220
|
+
for (const remove of instance.removeMemberListeners)
|
|
221
|
+
remove();
|
|
222
|
+
registration.instances.delete(key);
|
|
223
|
+
try {
|
|
224
|
+
this.#emit(registration, { type: "closed", instance: instance.address });
|
|
225
|
+
}
|
|
226
|
+
catch (error) {
|
|
227
|
+
errors.push(error);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
for (const subscriber of registration.subscribers) {
|
|
231
|
+
if (subscriber.active) {
|
|
232
|
+
subscriber.closed = true;
|
|
233
|
+
subscriber.buffer.length = 0;
|
|
234
|
+
}
|
|
235
|
+
else {
|
|
236
|
+
subscriber.terminated = true;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
registration.subscribers.clear();
|
|
240
|
+
}
|
|
241
|
+
this.#registrations.clear();
|
|
242
|
+
if (errors.length === 1)
|
|
243
|
+
throw errors[0];
|
|
244
|
+
if (errors.length > 1)
|
|
245
|
+
throw new AggregateError(errors, "Failed to dispose remote service provider");
|
|
246
|
+
}
|
|
247
|
+
#registration(serviceId, mode) {
|
|
248
|
+
const registration = this.#registrations.get(serviceId);
|
|
249
|
+
if (registration === undefined) {
|
|
250
|
+
throw new RemoteServiceError("service_not_found", `Unknown remote service ${serviceId}`);
|
|
251
|
+
}
|
|
252
|
+
if (registration.mode !== mode) {
|
|
253
|
+
throw new RemoteServiceError("service_mode_mismatch", `Remote service ${serviceId} is ${registration.mode}, not ${mode}`);
|
|
254
|
+
}
|
|
255
|
+
return registration;
|
|
256
|
+
}
|
|
257
|
+
#createInstance(registration, classified, address) {
|
|
258
|
+
const removeMemberListeners = [];
|
|
259
|
+
const instance = {
|
|
260
|
+
...(address === undefined ? {} : { address }),
|
|
261
|
+
implementation: classified.implementation,
|
|
262
|
+
members: classified.members,
|
|
263
|
+
removeMemberListeners,
|
|
264
|
+
active: true,
|
|
265
|
+
};
|
|
266
|
+
for (const [name, member] of classified.members) {
|
|
267
|
+
if (member.kind !== "state")
|
|
268
|
+
continue;
|
|
269
|
+
removeMemberListeners.push(member.state.subscribe((ops, sequence, context) => {
|
|
270
|
+
if (!instance.active)
|
|
271
|
+
return;
|
|
272
|
+
this.#emit(registration, {
|
|
273
|
+
type: "state",
|
|
274
|
+
...(address === undefined ? {} : { instance: address }),
|
|
275
|
+
member: name,
|
|
276
|
+
sequence,
|
|
277
|
+
ops,
|
|
278
|
+
}, context);
|
|
279
|
+
}));
|
|
280
|
+
}
|
|
281
|
+
return instance;
|
|
282
|
+
}
|
|
283
|
+
#assertSingletonShape(registration, replacement) {
|
|
284
|
+
const current = registration.singletonShape;
|
|
285
|
+
if (current === undefined || sameServiceMemberShape(current, replacement))
|
|
286
|
+
return;
|
|
287
|
+
throw new RemoteServiceError("service_member_mismatch", `Remote service ${registration.serviceId} replacement must preserve its member shape`);
|
|
288
|
+
}
|
|
289
|
+
#resolveInstance(registration, address) {
|
|
290
|
+
if (registration.mode === "singleton") {
|
|
291
|
+
if (address !== undefined) {
|
|
292
|
+
throw new RemoteServiceError("service_mode_mismatch", `Remote service ${registration.serviceId} is singleton`);
|
|
293
|
+
}
|
|
294
|
+
if (registration.singleton === undefined) {
|
|
295
|
+
throw new RemoteServiceError("service_not_found", `Remote service ${registration.serviceId} has no provider`);
|
|
296
|
+
}
|
|
297
|
+
return registration.singleton;
|
|
298
|
+
}
|
|
299
|
+
if (address === undefined) {
|
|
300
|
+
throw new RemoteServiceError("service_mode_mismatch", `Remote service ${registration.serviceId} is keyed`);
|
|
301
|
+
}
|
|
302
|
+
const instance = registration.instances.get(address.key);
|
|
303
|
+
if (instance === undefined) {
|
|
304
|
+
throw new RemoteServiceError("service_instance_not_found", `Remote service ${registration.serviceId} has no instance ${address.key}`);
|
|
305
|
+
}
|
|
306
|
+
if (instance.address?.generation !== address.generation) {
|
|
307
|
+
throw new RemoteServiceError("service_stale_instance", `Remote service ${registration.serviceId} instance ${address.key} is stale`);
|
|
308
|
+
}
|
|
309
|
+
return instance;
|
|
310
|
+
}
|
|
311
|
+
#publishPending(registration) {
|
|
312
|
+
const context = serviceDeliveryContext();
|
|
313
|
+
const instances = registration.mode === "singleton"
|
|
314
|
+
? registration.singleton === undefined
|
|
315
|
+
? []
|
|
316
|
+
: [registration.singleton]
|
|
317
|
+
: registration.instances.values();
|
|
318
|
+
for (const instance of instances) {
|
|
319
|
+
for (const member of instance.members.values()) {
|
|
320
|
+
if (member.kind === "state")
|
|
321
|
+
member.state.publish(context);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
#snapshot(registration) {
|
|
326
|
+
const instances = registration.mode === "singleton"
|
|
327
|
+
? registration.singleton
|
|
328
|
+
? [this.#snapshotInstance(registration.singleton)]
|
|
329
|
+
: []
|
|
330
|
+
: [...registration.instances.values()]
|
|
331
|
+
.sort((left, right) => left.address.key.localeCompare(right.address.key))
|
|
332
|
+
.map((instance) => this.#snapshotInstance(instance));
|
|
333
|
+
return { serviceId: registration.serviceId, mode: registration.mode, instances };
|
|
334
|
+
}
|
|
335
|
+
#snapshotInstance(instance) {
|
|
336
|
+
const members = [];
|
|
337
|
+
for (const [name, member] of instance.members) {
|
|
338
|
+
if (member.kind === "method") {
|
|
339
|
+
members.push({ name, kind: "method" });
|
|
340
|
+
}
|
|
341
|
+
else {
|
|
342
|
+
members.push({
|
|
343
|
+
name,
|
|
344
|
+
kind: "state",
|
|
345
|
+
sequence: member.state.sequence,
|
|
346
|
+
ops: [["r", member.state.value]],
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
return {
|
|
351
|
+
...(instance.address === undefined ? {} : { instance: instance.address }),
|
|
352
|
+
members,
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
#emit(registration, update, context) {
|
|
356
|
+
if (registration.subscribers.size === 0)
|
|
357
|
+
return;
|
|
358
|
+
const deliveryContext = context ?? serviceDeliveryContext();
|
|
359
|
+
const errors = [];
|
|
360
|
+
for (const subscriber of registration.subscribers) {
|
|
361
|
+
if (subscriber.closed)
|
|
362
|
+
continue;
|
|
363
|
+
const entry = { update, context: deliveryContext };
|
|
364
|
+
if (!subscriber.active) {
|
|
365
|
+
subscriber.buffer.push(entry);
|
|
366
|
+
continue;
|
|
367
|
+
}
|
|
368
|
+
try {
|
|
369
|
+
subscriber.listener(entry.update, entry.context);
|
|
370
|
+
}
|
|
371
|
+
catch (error) {
|
|
372
|
+
errors.push(error);
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
throwCollectedErrors(errors, `Failed to publish remote service ${registration.serviceId} update`);
|
|
376
|
+
}
|
|
377
|
+
#assertRemotable(service) {
|
|
378
|
+
if (service.local)
|
|
379
|
+
throw new RemoteServiceError("service_not_allowed", `Service ${service.id} is process-local`);
|
|
380
|
+
}
|
|
381
|
+
#assertAllowed(serviceId) {
|
|
382
|
+
if (!this.#registrations.has(serviceId)) {
|
|
383
|
+
throw new RemoteServiceError("service_not_allowed", `Remote service ${serviceId} is not allowlisted`);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
#assertActive() {
|
|
387
|
+
if (this.#disposed)
|
|
388
|
+
throw new Error("Remote service provider is disposed");
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
export function createRemoteServiceEndpoint(provider) {
|
|
392
|
+
const subscriptions = new Map();
|
|
393
|
+
let disposed = false;
|
|
394
|
+
return {
|
|
395
|
+
async invoke(call, publish, context) {
|
|
396
|
+
if (disposed)
|
|
397
|
+
throw new Error("Remote service endpoint is disposed");
|
|
398
|
+
const control = decodeServiceControlCall(call);
|
|
399
|
+
if (control?.type === "catalogue")
|
|
400
|
+
return provider.catalogue;
|
|
401
|
+
if (control?.type === "subscribe") {
|
|
402
|
+
if (subscriptions.has(control.subscriptionId)) {
|
|
403
|
+
throw new Error("Service subscription ID is already active");
|
|
404
|
+
}
|
|
405
|
+
const subscription = provider.subscribe(control.serviceId, control.mode, (update, updateContext) => {
|
|
406
|
+
void Promise.resolve(publish(control.subscriptionId, update, updateContext)).catch(() => { });
|
|
407
|
+
});
|
|
408
|
+
subscriptions.set(control.subscriptionId, subscription);
|
|
409
|
+
subscription.activate();
|
|
410
|
+
return subscription.snapshot;
|
|
411
|
+
}
|
|
412
|
+
if (control?.type === "unsubscribe") {
|
|
413
|
+
const subscription = subscriptions.get(control.subscriptionId);
|
|
414
|
+
if (subscription === undefined)
|
|
415
|
+
throw new Error("Service subscription was not found");
|
|
416
|
+
subscription.close();
|
|
417
|
+
subscriptions.delete(control.subscriptionId);
|
|
418
|
+
return undefined;
|
|
419
|
+
}
|
|
420
|
+
return provider.invoke(call, context);
|
|
421
|
+
},
|
|
422
|
+
dispose() {
|
|
423
|
+
if (disposed)
|
|
424
|
+
return;
|
|
425
|
+
disposed = true;
|
|
426
|
+
for (const subscription of subscriptions.values())
|
|
427
|
+
subscription.close();
|
|
428
|
+
subscriptions.clear();
|
|
429
|
+
},
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
export function validateRemoteServiceImplementation(serviceId, implementation) {
|
|
433
|
+
void classifyRemoteServiceImplementation(serviceId, implementation);
|
|
434
|
+
}
|
|
435
|
+
function classifyRemoteServiceImplementation(serviceId, implementation) {
|
|
436
|
+
if (typeof implementation !== "object" || implementation === null || Array.isArray(implementation)) {
|
|
437
|
+
throw new TypeError(`Remote service ${serviceId} implementation must be an object`);
|
|
438
|
+
}
|
|
439
|
+
const members = new Map();
|
|
440
|
+
for (const name of Object.keys(implementation).sort()) {
|
|
441
|
+
const descriptor = Object.getOwnPropertyDescriptor(implementation, name);
|
|
442
|
+
if (descriptor === undefined || !("value" in descriptor)) {
|
|
443
|
+
throw new TypeError(`Remote service member ${serviceId}.${name} must be a data property`);
|
|
444
|
+
}
|
|
445
|
+
if (typeof descriptor.value === "function") {
|
|
446
|
+
members.set(name, { kind: "method", method: descriptor.value });
|
|
447
|
+
continue;
|
|
448
|
+
}
|
|
449
|
+
const state = getReplicatedStateInternals(descriptor.value);
|
|
450
|
+
if (state !== undefined) {
|
|
451
|
+
members.set(name, { kind: "state", state });
|
|
452
|
+
continue;
|
|
453
|
+
}
|
|
454
|
+
throw new TypeError(`Remote service member ${serviceId}.${name} is not remotely exposable`);
|
|
455
|
+
}
|
|
456
|
+
if (members.size === 0)
|
|
457
|
+
throw new TypeError(`Remote service ${serviceId} has no members`);
|
|
458
|
+
return { implementation, members };
|
|
459
|
+
}
|
|
460
|
+
function throwCollectedErrors(errors, message) {
|
|
461
|
+
if (errors.length === 1)
|
|
462
|
+
throw errors[0];
|
|
463
|
+
if (errors.length > 1)
|
|
464
|
+
throw new AggregateError(errors, message);
|
|
465
|
+
}
|
|
466
|
+
function serviceMemberShape(members) {
|
|
467
|
+
return new Map([...members].map(([name, member]) => [name, member.kind]));
|
|
468
|
+
}
|
|
469
|
+
function sameServiceMemberShape(left, right) {
|
|
470
|
+
return left.size === right.size && [...left].every(([name, kind]) => right.get(name) === kind);
|
|
471
|
+
}
|
|
472
|
+
//# sourceMappingURL=provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../src/services/provider.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,2BAA2B,EAAiC,MAAM,sBAAsB,CAAC;AAClG,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AA0DrD,MAAM,OAAO,qBAAqB;IACxB,UAAU,CAAmC;IAC7C,cAAc,GAAG,IAAI,GAAG,EAA+B,CAAC;IACjE,SAAS,GAAG,KAAK,CAAC;IAElB,YAAY,OAAyE;QACpF,MAAM,WAAW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I,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC3E,CAAC;AAED,SAAS,sBAAsB,CAC9B,IAA4C,EAC5C,KAA6C;IAE7C,OAAO,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;AAChG,CAAC","sourcesContent":["import type {\n\tContext,\n\tJsonValue,\n\tRemoteServiceContract,\n\tService,\n\tServiceCall,\n\tServiceCatalogueEntry,\n\tServiceInstanceAddress,\n\tServiceInstanceSnapshot,\n\tServiceMemberSnapshot,\n\tServiceMode,\n\tServiceProviderUpdate,\n\tServiceSubscription,\n\tServiceSubscriptionSnapshot,\n} from \"../types.ts\";\nimport { RemoteServiceError } from \"./errors.ts\";\nimport { serviceDeliveryContext } from \"./state.ts\";\nimport { getReplicatedStateInternals, type ReplicatedStateInternals } from \"./state-internals.ts\";\nimport { decodeServiceControlCall } from \"./wire.ts\";\n\ntype RemoteMethod = (...args: unknown[]) => unknown;\n\ntype InstanceMember =\n\t| { readonly kind: \"method\"; readonly method: RemoteMethod }\n\t| { readonly kind: \"state\"; readonly state: ReplicatedStateInternals };\n\ntype ServiceMemberKind = InstanceMember[\"kind\"];\n\ninterface ClassifiedRemoteServiceImplementation {\n\treadonly implementation: object;\n\treadonly members: Map<string, InstanceMember>;\n}\n\ninterface ProviderInstance {\n\treadonly address?: ServiceInstanceAddress;\n\treadonly implementation: object;\n\treadonly members: ReadonlyMap<string, InstanceMember>;\n\treadonly removeMemberListeners: readonly (() => void)[];\n\tactive: boolean;\n}\n\ninterface ProviderSubscriber {\n\treadonly listener: (update: ServiceProviderUpdate, context: Context) => void;\n\treadonly buffer: { readonly update: ServiceProviderUpdate; readonly context: Context }[];\n\tactive: boolean;\n\tterminated: boolean;\n\tclosed: boolean;\n}\n\ninterface ServiceProviderDefinition {\n\treadonly service: { readonly id: string; readonly local?: boolean };\n\treadonly mode: ServiceMode;\n}\n\ninterface ServiceRegistration {\n\treadonly serviceId: string;\n\treadonly mode: ServiceMode;\n\tsingleton?: ProviderInstance;\n\tsingletonShape?: ReadonlyMap<string, ServiceMemberKind>;\n\treadonly instances: Map<string, ProviderInstance>;\n\treadonly generations: Map<string, number>;\n\treadonly subscribers: Set<ProviderSubscriber>;\n}\n\nexport type ServiceUpdatePublisher = (\n\tsubscriptionId: string,\n\tupdate: ServiceProviderUpdate,\n\tcontext: Context,\n) => void | Promise<void>;\n\n/** Hosts one provider for one remote consumer and owns that consumer's subscriptions. */\nexport interface RemoteServiceEndpoint {\n\tinvoke(call: ServiceCall, publish: ServiceUpdatePublisher, context: Context): Promise<JsonValue | undefined>;\n\tdispose(): void;\n}\n\nexport class RemoteServiceProvider {\n\treadonly #catalogue: readonly ServiceCatalogueEntry[];\n\treadonly #registrations = new Map<string, ServiceRegistration>();\n\t#disposed = false;\n\n\tconstructor(entries: readonly (ServiceProviderDefinition | { readonly id: string })[]) {\n\t\tconst definitions = entries.map(\n\t\t\t(entry): ServiceProviderDefinition => (\"service\" in entry ? entry : { service: entry, mode: \"singleton\" }),\n\t\t);\n\t\tfor (const { service } of definitions) {\n\t\t\tif (\"local\" in service && service.local === true) {\n\t\t\t\tthrow new TypeError(`Local service ${service.id} cannot be published remotely`);\n\t\t\t}\n\t\t}\n\t\tconst ids = definitions.map(({ service }) => service.id);\n\t\tif (new Set(ids).size !== ids.length) throw new TypeError(\"Remote service catalogue contains duplicate IDs\");\n\t\tthis.#catalogue = Object.freeze(\n\t\t\tdefinitions.map(({ service, mode }) => Object.freeze({ serviceId: service.id, mode })),\n\t\t);\n\t\tfor (const { service, mode } of definitions) {\n\t\t\tthis.#registrations.set(service.id, {\n\t\t\t\tserviceId: service.id,\n\t\t\t\tmode,\n\t\t\t\tinstances: new Map(),\n\t\t\t\tgenerations: new Map(),\n\t\t\t\tsubscribers: new Set(),\n\t\t\t});\n\t\t}\n\t}\n\n\tget catalogue(): readonly ServiceCatalogueEntry[] {\n\t\treturn this.#catalogue;\n\t}\n\n\tprovide<T>(service: Service<T>, implementation: NoInfer<RemoteServiceContract<T>>): void {\n\t\tthis.#assertActive();\n\t\tthis.#assertRemotable(service);\n\t\tthis.#assertAllowed(service.id);\n\t\tconst registration = this.#registration(service.id, \"singleton\");\n\t\tif (registration.singleton !== undefined) {\n\t\t\tthrow new RemoteServiceError(\"service_mode_mismatch\", `Remote service ${service.id} already has a provider`);\n\t\t}\n\t\tconst classified = classifyRemoteServiceImplementation(registration.serviceId, implementation);\n\t\tconst shape = serviceMemberShape(classified.members);\n\t\tthis.#assertSingletonShape(registration, shape);\n\t\tregistration.singleton = this.#createInstance(registration, classified, undefined);\n\t\tregistration.singletonShape = shape;\n\t}\n\n\t/** Disconnect one singleton while preserving active subscriptions and remote facades. */\n\twithdraw<T>(service: Service<T>): void {\n\t\tthis.#assertActive();\n\t\tthis.#assertRemotable(service);\n\t\tthis.#assertAllowed(service.id);\n\t\tconst registration = this.#registration(service.id, \"singleton\");\n\t\tconst previous = registration.singleton;\n\t\tif (previous === undefined) return;\n\t\tprevious.active = false;\n\t\tfor (const remove of previous.removeMemberListeners) remove();\n\t\tdelete registration.singleton;\n\t\tthis.#emit(registration, { type: \"unavailable\" });\n\t}\n\n\t/** Check a singleton replacement without changing the active provider. */\n\tvalidateReplacement<T>(service: Service<T>, implementation: NoInfer<RemoteServiceContract<T>>): void {\n\t\tthis.#assertActive();\n\t\tthis.#assertRemotable(service);\n\t\tthis.#assertAllowed(service.id);\n\t\tconst registration = this.#registration(service.id, \"singleton\");\n\t\tconst classified = classifyRemoteServiceImplementation(registration.serviceId, implementation);\n\t\tthis.#assertSingletonShape(registration, serviceMemberShape(classified.members));\n\t}\n\n\t/** Replace one singleton without making its stable remote facade unavailable. */\n\treplace<T>(service: Service<T>, implementation: NoInfer<RemoteServiceContract<T>>): void {\n\t\tthis.#assertActive();\n\t\tthis.#assertRemotable(service);\n\t\tthis.#assertAllowed(service.id);\n\t\tconst registration = this.#registration(service.id, \"singleton\");\n\t\tconst classified = classifyRemoteServiceImplementation(registration.serviceId, implementation);\n\t\tconst shape = serviceMemberShape(classified.members);\n\t\tthis.#assertSingletonShape(registration, shape);\n\t\tconst replacement = this.#createInstance(registration, classified, undefined);\n\t\tconst previous = registration.singleton;\n\t\tif (previous !== undefined) {\n\t\t\tprevious.active = false;\n\t\t\tfor (const remove of previous.removeMemberListeners) remove();\n\t\t}\n\t\tregistration.singleton = replacement;\n\t\tregistration.singletonShape = shape;\n\t\tthis.#emit(registration, { type: \"replaced\", snapshot: this.#snapshotInstance(replacement) });\n\t}\n\n\tuse<T>(service: Service<T>): T {\n\t\tthis.#assertActive();\n\t\tthis.#assertRemotable(service);\n\t\tthis.#assertAllowed(service.id);\n\t\tconst registration = this.#registrations.get(service.id);\n\t\tif (registration?.mode !== \"singleton\" || registration.singleton === undefined) {\n\t\t\tthrow new RemoteServiceError(\"service_not_found\", `Remote service ${service.id} has no local provider`);\n\t\t}\n\t\treturn registration.singleton.implementation as T;\n\t}\n\n\tspawn<T>(service: Service<T>, key: string, implementation: NoInfer<RemoteServiceContract<T>>): () => void {\n\t\tthis.#assertActive();\n\t\tthis.#assertRemotable(service);\n\t\tthis.#assertAllowed(service.id);\n\t\tif (key.length === 0) throw new TypeError(\"Remote service instance key must not be empty\");\n\t\tconst registration = this.#registration(service.id, \"keyed\");\n\t\tif (registration.instances.has(key)) {\n\t\t\tthrow new RemoteServiceError(\n\t\t\t\t\"service_mode_mismatch\",\n\t\t\t\t`Remote service ${service.id} already has a live instance with key ${key}`,\n\t\t\t);\n\t\t}\n\t\tconst generation = (registration.generations.get(key) ?? 0) + 1;\n\t\tregistration.generations.set(key, generation);\n\t\tconst address = { key, generation } satisfies ServiceInstanceAddress;\n\t\tconst classified = classifyRemoteServiceImplementation(registration.serviceId, implementation);\n\t\tconst instance = this.#createInstance(registration, classified, address);\n\t\tregistration.instances.set(key, instance);\n\t\tthis.#emit(registration, { type: \"spawned\", instance: this.#snapshotInstance(instance) });\n\t\tlet closed = false;\n\t\treturn () => {\n\t\t\tif (closed) return;\n\t\t\tclosed = true;\n\t\t\tif (registration.instances.get(key) !== instance) return;\n\t\t\tinstance.active = false;\n\t\t\tfor (const remove of instance.removeMemberListeners) remove();\n\t\t\tregistration.instances.delete(key);\n\t\t\tthis.#emit(registration, { type: \"closed\", instance: address });\n\t\t};\n\t}\n\n\tasync invoke(call: ServiceCall, context: Context): Promise<JsonValue | undefined> {\n\t\tthis.#assertActive();\n\t\tthis.#assertAllowed(call.serviceId);\n\t\tconst registration = this.#registrations.get(call.serviceId);\n\t\tif (registration === undefined) {\n\t\t\tthrow new RemoteServiceError(\"service_not_found\", `Unknown remote service ${call.serviceId}`);\n\t\t}\n\t\tconst instance = this.#resolveInstance(registration, call.instance);\n\t\tconst member = instance.members.get(call.member);\n\t\tif (member === undefined) {\n\t\t\tthrow new RemoteServiceError(\n\t\t\t\t\"service_member_not_found\",\n\t\t\t\t`Unknown remote service member ${call.serviceId}.${call.member}`,\n\t\t\t);\n\t\t}\n\t\tif (member.kind !== \"method\") {\n\t\t\tthrow new RemoteServiceError(\n\t\t\t\t\"service_member_mismatch\",\n\t\t\t\t`Remote service member ${call.serviceId}.${call.member} is not a method`,\n\t\t\t);\n\t\t}\n\t\tconst result: unknown = await Reflect.apply(member.method, instance.implementation, [...call.args, context]);\n\t\treturn result as JsonValue | undefined;\n\t}\n\n\tsubscribe(\n\t\tserviceId: string,\n\t\tmode: ServiceMode,\n\t\tlistener: (update: ServiceProviderUpdate, context: Context) => void,\n\t): ServiceSubscription {\n\t\tthis.#assertActive();\n\t\tthis.#assertAllowed(serviceId);\n\t\tconst registration = this.#registration(serviceId, mode);\n\t\tif (registration.mode === \"singleton\" && registration.singleton === undefined) {\n\t\t\tthrow new RemoteServiceError(\"service_not_found\", `Remote service ${serviceId} has no provider`);\n\t\t}\n\t\tconst subscriber: ProviderSubscriber = {\n\t\t\tlistener,\n\t\t\tbuffer: [],\n\t\t\tactive: false,\n\t\t\tterminated: false,\n\t\t\tclosed: false,\n\t\t};\n\t\tthis.#publishPending(registration);\n\t\tregistration.subscribers.add(subscriber);\n\t\tconst snapshot = this.#snapshot(registration);\n\t\treturn {\n\t\t\tsnapshot,\n\t\t\tactivate: () => {\n\t\t\t\tif (subscriber.closed || subscriber.active) return;\n\t\t\t\tsubscriber.active = true;\n\t\t\t\tconst errors: unknown[] = [];\n\t\t\t\ttry {\n\t\t\t\t\tfor (const entry of subscriber.buffer.splice(0)) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tlistener(entry.update, entry.context);\n\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\terrors.push(error);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tif (subscriber.terminated) subscriber.closed = true;\n\t\t\t\t}\n\t\t\t\tthrowCollectedErrors(errors, \"Failed to activate remote service subscription\");\n\t\t\t},\n\t\t\tclose: () => {\n\t\t\t\tif (subscriber.closed) return;\n\t\t\t\tsubscriber.closed = true;\n\t\t\t\tsubscriber.buffer.length = 0;\n\t\t\t\tregistration.subscribers.delete(subscriber);\n\t\t\t},\n\t\t};\n\t}\n\n\tdispose(): void {\n\t\tif (this.#disposed) return;\n\t\tthis.#disposed = true;\n\t\tconst errors: unknown[] = [];\n\t\tfor (const registration of this.#registrations.values()) {\n\t\t\tconst singleton = registration.singleton;\n\t\t\tif (singleton !== undefined) {\n\t\t\t\tsingleton.active = false;\n\t\t\t\tfor (const remove of singleton.removeMemberListeners) remove();\n\t\t\t\tdelete registration.singleton;\n\t\t\t\ttry {\n\t\t\t\t\tthis.#emit(registration, { type: \"unavailable\" });\n\t\t\t\t} catch (error) {\n\t\t\t\t\terrors.push(error);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (const [key, instance] of [...registration.instances]) {\n\t\t\t\tinstance.active = false;\n\t\t\t\tfor (const remove of instance.removeMemberListeners) remove();\n\t\t\t\tregistration.instances.delete(key);\n\t\t\t\ttry {\n\t\t\t\t\tthis.#emit(registration, { type: \"closed\", instance: instance.address! });\n\t\t\t\t} catch (error) {\n\t\t\t\t\terrors.push(error);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (const subscriber of registration.subscribers) {\n\t\t\t\tif (subscriber.active) {\n\t\t\t\t\tsubscriber.closed = true;\n\t\t\t\t\tsubscriber.buffer.length = 0;\n\t\t\t\t} else {\n\t\t\t\t\tsubscriber.terminated = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tregistration.subscribers.clear();\n\t\t}\n\t\tthis.#registrations.clear();\n\t\tif (errors.length === 1) throw errors[0];\n\t\tif (errors.length > 1) throw new AggregateError(errors, \"Failed to dispose remote service provider\");\n\t}\n\n\t#registration(serviceId: string, mode: ServiceMode): ServiceRegistration {\n\t\tconst registration = this.#registrations.get(serviceId);\n\t\tif (registration === undefined) {\n\t\t\tthrow new RemoteServiceError(\"service_not_found\", `Unknown remote service ${serviceId}`);\n\t\t}\n\t\tif (registration.mode !== mode) {\n\t\t\tthrow new RemoteServiceError(\n\t\t\t\t\"service_mode_mismatch\",\n\t\t\t\t`Remote service ${serviceId} is ${registration.mode}, not ${mode}`,\n\t\t\t);\n\t\t}\n\t\treturn registration;\n\t}\n\n\t#createInstance(\n\t\tregistration: ServiceRegistration,\n\t\tclassified: ClassifiedRemoteServiceImplementation,\n\t\taddress: ServiceInstanceAddress | undefined,\n\t): ProviderInstance {\n\t\tconst removeMemberListeners: (() => void)[] = [];\n\t\tconst instance: ProviderInstance = {\n\t\t\t...(address === undefined ? {} : { address }),\n\t\t\timplementation: classified.implementation,\n\t\t\tmembers: classified.members,\n\t\t\tremoveMemberListeners,\n\t\t\tactive: true,\n\t\t};\n\t\tfor (const [name, member] of classified.members) {\n\t\t\tif (member.kind !== \"state\") continue;\n\t\t\tremoveMemberListeners.push(\n\t\t\t\tmember.state.subscribe((ops, sequence, context) => {\n\t\t\t\t\tif (!instance.active) return;\n\t\t\t\t\tthis.#emit(\n\t\t\t\t\t\tregistration,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"state\",\n\t\t\t\t\t\t\t...(address === undefined ? {} : { instance: address }),\n\t\t\t\t\t\t\tmember: name,\n\t\t\t\t\t\t\tsequence,\n\t\t\t\t\t\t\tops,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t);\n\t\t\t\t}),\n\t\t\t);\n\t\t}\n\t\treturn instance;\n\t}\n\n\t#assertSingletonShape(registration: ServiceRegistration, replacement: ReadonlyMap<string, ServiceMemberKind>): void {\n\t\tconst current = registration.singletonShape;\n\t\tif (current === undefined || sameServiceMemberShape(current, replacement)) return;\n\t\tthrow new RemoteServiceError(\n\t\t\t\"service_member_mismatch\",\n\t\t\t`Remote service ${registration.serviceId} replacement must preserve its member shape`,\n\t\t);\n\t}\n\n\t#resolveInstance(registration: ServiceRegistration, address: ServiceInstanceAddress | undefined): ProviderInstance {\n\t\tif (registration.mode === \"singleton\") {\n\t\t\tif (address !== undefined) {\n\t\t\t\tthrow new RemoteServiceError(\n\t\t\t\t\t\"service_mode_mismatch\",\n\t\t\t\t\t`Remote service ${registration.serviceId} is singleton`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (registration.singleton === undefined) {\n\t\t\t\tthrow new RemoteServiceError(\n\t\t\t\t\t\"service_not_found\",\n\t\t\t\t\t`Remote service ${registration.serviceId} has no provider`,\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn registration.singleton;\n\t\t}\n\t\tif (address === undefined) {\n\t\t\tthrow new RemoteServiceError(\"service_mode_mismatch\", `Remote service ${registration.serviceId} is keyed`);\n\t\t}\n\t\tconst instance = registration.instances.get(address.key);\n\t\tif (instance === undefined) {\n\t\t\tthrow new RemoteServiceError(\n\t\t\t\t\"service_instance_not_found\",\n\t\t\t\t`Remote service ${registration.serviceId} has no instance ${address.key}`,\n\t\t\t);\n\t\t}\n\t\tif (instance.address?.generation !== address.generation) {\n\t\t\tthrow new RemoteServiceError(\n\t\t\t\t\"service_stale_instance\",\n\t\t\t\t`Remote service ${registration.serviceId} instance ${address.key} is stale`,\n\t\t\t);\n\t\t}\n\t\treturn instance;\n\t}\n\n\t#publishPending(registration: ServiceRegistration): void {\n\t\tconst context = serviceDeliveryContext();\n\t\tconst instances =\n\t\t\tregistration.mode === \"singleton\"\n\t\t\t\t? registration.singleton === undefined\n\t\t\t\t\t? []\n\t\t\t\t\t: [registration.singleton]\n\t\t\t\t: registration.instances.values();\n\t\tfor (const instance of instances) {\n\t\t\tfor (const member of instance.members.values()) {\n\t\t\t\tif (member.kind === \"state\") member.state.publish(context);\n\t\t\t}\n\t\t}\n\t}\n\n\t#snapshot(registration: ServiceRegistration): ServiceSubscriptionSnapshot {\n\t\tconst instances =\n\t\t\tregistration.mode === \"singleton\"\n\t\t\t\t? registration.singleton\n\t\t\t\t\t? [this.#snapshotInstance(registration.singleton)]\n\t\t\t\t\t: []\n\t\t\t\t: [...registration.instances.values()]\n\t\t\t\t\t\t.sort((left, right) => left.address!.key.localeCompare(right.address!.key))\n\t\t\t\t\t\t.map((instance) => this.#snapshotInstance(instance));\n\t\treturn { serviceId: registration.serviceId, mode: registration.mode, instances };\n\t}\n\n\t#snapshotInstance(instance: ProviderInstance): ServiceInstanceSnapshot {\n\t\tconst members: ServiceMemberSnapshot[] = [];\n\t\tfor (const [name, member] of instance.members) {\n\t\t\tif (member.kind === \"method\") {\n\t\t\t\tmembers.push({ name, kind: \"method\" });\n\t\t\t} else {\n\t\t\t\tmembers.push({\n\t\t\t\t\tname,\n\t\t\t\t\tkind: \"state\",\n\t\t\t\t\tsequence: member.state.sequence,\n\t\t\t\t\tops: [[\"r\", member.state.value as JsonValue]],\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\t...(instance.address === undefined ? {} : { instance: instance.address }),\n\t\t\tmembers,\n\t\t};\n\t}\n\n\t#emit(registration: ServiceRegistration, update: ServiceProviderUpdate, context?: Context): void {\n\t\tif (registration.subscribers.size === 0) return;\n\t\tconst deliveryContext = context ?? serviceDeliveryContext();\n\t\tconst errors: unknown[] = [];\n\t\tfor (const subscriber of registration.subscribers) {\n\t\t\tif (subscriber.closed) continue;\n\t\t\tconst entry = { update, context: deliveryContext };\n\t\t\tif (!subscriber.active) {\n\t\t\t\tsubscriber.buffer.push(entry);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tsubscriber.listener(entry.update, entry.context);\n\t\t\t} catch (error) {\n\t\t\t\terrors.push(error);\n\t\t\t}\n\t\t}\n\t\tthrowCollectedErrors(errors, `Failed to publish remote service ${registration.serviceId} update`);\n\t}\n\n\t#assertRemotable(service: { readonly id: string; readonly local: boolean }): void {\n\t\tif (service.local) throw new RemoteServiceError(\"service_not_allowed\", `Service ${service.id} is process-local`);\n\t}\n\n\t#assertAllowed(serviceId: string): void {\n\t\tif (!this.#registrations.has(serviceId)) {\n\t\t\tthrow new RemoteServiceError(\"service_not_allowed\", `Remote service ${serviceId} is not allowlisted`);\n\t\t}\n\t}\n\n\t#assertActive(): void {\n\t\tif (this.#disposed) throw new Error(\"Remote service provider is disposed\");\n\t}\n}\n\nexport function createRemoteServiceEndpoint(provider: RemoteServiceProvider): RemoteServiceEndpoint {\n\tconst subscriptions = new Map<string, ServiceSubscription>();\n\tlet disposed = false;\n\n\treturn {\n\t\tasync invoke(call, publish, context) {\n\t\t\tif (disposed) throw new Error(\"Remote service endpoint is disposed\");\n\t\t\tconst control = decodeServiceControlCall(call);\n\t\t\tif (control?.type === \"catalogue\") return provider.catalogue as unknown as JsonValue;\n\t\t\tif (control?.type === \"subscribe\") {\n\t\t\t\tif (subscriptions.has(control.subscriptionId)) {\n\t\t\t\t\tthrow new Error(\"Service subscription ID is already active\");\n\t\t\t\t}\n\t\t\t\tconst subscription = provider.subscribe(control.serviceId, control.mode, (update, updateContext) => {\n\t\t\t\t\tvoid Promise.resolve(publish(control.subscriptionId, update, updateContext)).catch(() => {});\n\t\t\t\t});\n\t\t\t\tsubscriptions.set(control.subscriptionId, subscription);\n\t\t\t\tsubscription.activate();\n\t\t\t\treturn subscription.snapshot as unknown as JsonValue;\n\t\t\t}\n\t\t\tif (control?.type === \"unsubscribe\") {\n\t\t\t\tconst subscription = subscriptions.get(control.subscriptionId);\n\t\t\t\tif (subscription === undefined) throw new Error(\"Service subscription was not found\");\n\t\t\t\tsubscription.close();\n\t\t\t\tsubscriptions.delete(control.subscriptionId);\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\treturn provider.invoke(call, context);\n\t\t},\n\t\tdispose() {\n\t\t\tif (disposed) return;\n\t\t\tdisposed = true;\n\t\t\tfor (const subscription of subscriptions.values()) subscription.close();\n\t\t\tsubscriptions.clear();\n\t\t},\n\t};\n}\n\nexport function validateRemoteServiceImplementation(serviceId: string, implementation: unknown): void {\n\tvoid classifyRemoteServiceImplementation(serviceId, implementation);\n}\n\nfunction classifyRemoteServiceImplementation(\n\tserviceId: string,\n\timplementation: unknown,\n): ClassifiedRemoteServiceImplementation {\n\tif (typeof implementation !== \"object\" || implementation === null || Array.isArray(implementation)) {\n\t\tthrow new TypeError(`Remote service ${serviceId} implementation must be an object`);\n\t}\n\tconst members = new Map<string, InstanceMember>();\n\tfor (const name of Object.keys(implementation).sort()) {\n\t\tconst descriptor = Object.getOwnPropertyDescriptor(implementation, name);\n\t\tif (descriptor === undefined || !(\"value\" in descriptor)) {\n\t\t\tthrow new TypeError(`Remote service member ${serviceId}.${name} must be a data property`);\n\t\t}\n\t\tif (typeof descriptor.value === \"function\") {\n\t\t\tmembers.set(name, { kind: \"method\", method: descriptor.value as RemoteMethod });\n\t\t\tcontinue;\n\t\t}\n\t\tconst state = getReplicatedStateInternals(descriptor.value);\n\t\tif (state !== undefined) {\n\t\t\tmembers.set(name, { kind: \"state\", state });\n\t\t\tcontinue;\n\t\t}\n\t\tthrow new TypeError(`Remote service member ${serviceId}.${name} is not remotely exposable`);\n\t}\n\tif (members.size === 0) throw new TypeError(`Remote service ${serviceId} has no members`);\n\treturn { implementation, members };\n}\n\nfunction throwCollectedErrors(errors: readonly unknown[], message: string): void {\n\tif (errors.length === 1) throw errors[0];\n\tif (errors.length > 1) throw new AggregateError(errors, message);\n}\n\nfunction serviceMemberShape(members: ReadonlyMap<string, InstanceMember>): ReadonlyMap<string, ServiceMemberKind> {\n\treturn new Map([...members].map(([name, member]) => [name, member.kind]));\n}\n\nfunction sameServiceMemberShape(\n\tleft: ReadonlyMap<string, ServiceMemberKind>,\n\tright: ReadonlyMap<string, ServiceMemberKind>,\n): boolean {\n\treturn left.size === right.size && [...left].every(([name, kind]) => right.get(name) === kind);\n}\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ServiceProviderUpdate, ServiceSubscriptionSnapshot } from "../types.ts";
|
|
2
|
+
import type { WireServiceProviderUpdate, WireServiceSubscriptionSnapshot } from "./wire.ts";
|
|
3
|
+
/** Stateful operation encoders for every replicated state in one service subscription. */
|
|
4
|
+
export interface ServiceStateEncoder {
|
|
5
|
+
encodeSnapshot(snapshot: ServiceSubscriptionSnapshot): WireServiceSubscriptionSnapshot;
|
|
6
|
+
encodeUpdate(update: ServiceProviderUpdate): WireServiceProviderUpdate;
|
|
7
|
+
}
|
|
8
|
+
/** Stateful operation decoders for every replicated state in one service subscription. */
|
|
9
|
+
export interface ServiceStateDecoder {
|
|
10
|
+
decodeSnapshot(snapshot: WireServiceSubscriptionSnapshot): ServiceSubscriptionSnapshot;
|
|
11
|
+
decodeUpdate(update: WireServiceProviderUpdate): ServiceProviderUpdate;
|
|
12
|
+
}
|
|
13
|
+
export declare function createServiceStateEncoder(): ServiceStateEncoder;
|
|
14
|
+
export declare function createServiceStateDecoder(): ServiceStateDecoder;
|
|
15
|
+
//# sourceMappingURL=state-codec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state-codec.d.ts","sourceRoot":"","sources":["../../src/services/state-codec.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGX,qBAAqB,EACrB,2BAA2B,EAC3B,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,yBAAyB,EAAE,+BAA+B,EAAE,MAAM,WAAW,CAAC;AAE5F,0FAA0F;AAC1F,MAAM,WAAW,mBAAmB;IACnC,cAAc,CAAC,QAAQ,EAAE,2BAA2B,GAAG,+BAA+B,CAAC;IACvF,YAAY,CAAC,MAAM,EAAE,qBAAqB,GAAG,yBAAyB,CAAC;CACvE;AAED,0FAA0F;AAC1F,MAAM,WAAW,mBAAmB;IACnC,cAAc,CAAC,QAAQ,EAAE,+BAA+B,GAAG,2BAA2B,CAAC;IACvF,YAAY,CAAC,MAAM,EAAE,yBAAyB,GAAG,qBAAqB,CAAC;CACvE;AAwCD,wBAAgB,yBAAyB,IAAI,mBAAmB,CA4B/D;AAED,wBAAgB,yBAAyB,IAAI,mBAAmB,CA4B/D"}
|