@ashx-j/lunr 0.2.25 → 0.2.27
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 +31 -1
- package/LICENSE +22 -0
- package/dist/builtin-extensions/ashxj-thinking.d.ts +1 -1
- package/dist/builtin-extensions/ashxj-thinking.d.ts.map +1 -1
- package/dist/builtin-extensions/ashxj-thinking.js +1 -1
- package/dist/builtin-extensions/ashxj-thinking.js.map +1 -1
- package/dist/builtin-extensions/ashxj-tui.d.ts +11 -1
- package/dist/builtin-extensions/ashxj-tui.d.ts.map +1 -1
- package/dist/builtin-extensions/ashxj-tui.js +6 -10
- package/dist/builtin-extensions/ashxj-tui.js.map +1 -1
- package/dist/builtin-extensions/index.d.ts.map +1 -1
- package/dist/builtin-extensions/index.js +1 -0
- package/dist/builtin-extensions/index.js.map +1 -1
- package/dist/builtin-extensions/lunr-computer-use.d.ts +3 -0
- package/dist/builtin-extensions/lunr-computer-use.d.ts.map +1 -0
- package/dist/builtin-extensions/lunr-computer-use.js +179 -0
- package/dist/builtin-extensions/lunr-computer-use.js.map +1 -0
- package/dist/builtin-extensions/lunr-cron.d.ts +4 -5
- package/dist/builtin-extensions/lunr-cron.d.ts.map +1 -1
- package/dist/builtin-extensions/lunr-cron.js +94 -108
- package/dist/builtin-extensions/lunr-cron.js.map +1 -1
- package/dist/builtin-extensions/lunr-local-providers/local-servers.d.ts.map +1 -1
- package/dist/builtin-extensions/lunr-local-providers/local-servers.js +3 -1
- package/dist/builtin-extensions/lunr-local-providers/local-servers.js.map +1 -1
- package/dist/builtin-extensions/narumiruna-pi-goal/src/commands.d.ts.map +1 -1
- package/dist/builtin-extensions/narumiruna-pi-goal/src/commands.js +2 -2
- package/dist/builtin-extensions/narumiruna-pi-goal/src/commands.js.map +1 -1
- package/dist/builtin-extensions/narumiruna-pi-goal/src/goal.d.ts.map +1 -1
- package/dist/builtin-extensions/narumiruna-pi-goal/src/goal.js +1 -1
- package/dist/builtin-extensions/narumiruna-pi-goal/src/goal.js.map +1 -1
- package/dist/builtin-extensions/narumiruna-pi-goal/src/runtime.d.ts.map +1 -1
- package/dist/builtin-extensions/narumiruna-pi-goal/src/runtime.js +1 -1
- package/dist/builtin-extensions/narumiruna-pi-goal/src/runtime.js.map +1 -1
- package/dist/builtin-extensions/pi-intercom/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-intercom/index.js +2 -2
- package/dist/builtin-extensions/pi-intercom/index.js.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/bemol-extension/index.d.ts +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/bemol-extension/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/bemol-extension/index.js +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/bemol-extension/index.js.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/index.js +1 -15
- package/dist/builtin-extensions/pi-lsp-extension/src/index.js.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/lsp-client.d.ts +6 -0
- package/dist/builtin-extensions/pi-lsp-extension/src/lsp-client.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/lsp-client.js +187 -132
- package/dist/builtin-extensions/pi-lsp-extension/src/lsp-client.js.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/lsp-manager.d.ts +8 -0
- package/dist/builtin-extensions/pi-lsp-extension/src/lsp-manager.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/lsp-manager.js +142 -112
- package/dist/builtin-extensions/pi-lsp-extension/src/lsp-manager.js.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/tools/code-rewrite.d.ts +12 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/tools/code-rewrite.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/tools/code-rewrite.js +14 -7
- package/dist/builtin-extensions/pi-lsp-extension/src/tools/code-rewrite.js.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/tree-sitter/rewrite-engine.d.ts +11 -3
- package/dist/builtin-extensions/pi-lsp-extension/src/tree-sitter/rewrite-engine.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/tree-sitter/rewrite-engine.js +67 -41
- package/dist/builtin-extensions/pi-lsp-extension/src/tree-sitter/rewrite-engine.js.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/tree-sitter/search-engine.d.ts +4 -2
- package/dist/builtin-extensions/pi-lsp-extension/src/tree-sitter/search-engine.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/tree-sitter/search-engine.js +3 -0
- package/dist/builtin-extensions/pi-lsp-extension/src/tree-sitter/search-engine.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/commands.d.ts +2 -1
- package/dist/builtin-extensions/pi-mcp-adapter/commands.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/commands.js +6 -6
- package/dist/builtin-extensions/pi-mcp-adapter/commands.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/config.d.ts +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/config.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/config.js +11 -5
- package/dist/builtin-extensions/pi-mcp-adapter/config.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tool-executor.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tool-executor.js +2 -2
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tool-executor.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/host-html-template.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/host-html-template.js +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/host-html-template.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/index.js +48 -40
- package/dist/builtin-extensions/pi-mcp-adapter/index.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/init.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/init.js +3 -1
- package/dist/builtin-extensions/pi-mcp-adapter/init.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/mcp-auth-flow.d.ts +12 -40
- package/dist/builtin-extensions/pi-mcp-adapter/mcp-auth-flow.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/mcp-auth-flow.js +166 -235
- package/dist/builtin-extensions/pi-mcp-adapter/mcp-auth-flow.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/mcp-callback-server.d.ts +5 -0
- package/dist/builtin-extensions/pi-mcp-adapter/mcp-callback-server.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/mcp-callback-server.js +43 -13
- package/dist/builtin-extensions/pi-mcp-adapter/mcp-callback-server.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/mcp-oauth-provider.d.ts +14 -3
- package/dist/builtin-extensions/pi-mcp-adapter/mcp-oauth-provider.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/mcp-oauth-provider.js +73 -21
- package/dist/builtin-extensions/pi-mcp-adapter/mcp-oauth-provider.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/proxy-modes.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/proxy-modes.js +4 -4
- package/dist/builtin-extensions/pi-mcp-adapter/proxy-modes.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/server-manager.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/server-manager.js +2 -2
- package/dist/builtin-extensions/pi-mcp-adapter/server-manager.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/state.d.ts +2 -0
- package/dist/builtin-extensions/pi-mcp-adapter/state.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/state.js.map +1 -1
- package/dist/builtin-extensions/pi-ollama-cloud/index.d.ts +1 -1
- package/dist/builtin-extensions/pi-ollama-cloud/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-ollama-cloud/index.js +1 -1
- package/dist/builtin-extensions/pi-ollama-cloud/index.js.map +1 -1
- package/dist/builtin-extensions/pi-ollama-cloud/models.d.ts +11 -5
- package/dist/builtin-extensions/pi-ollama-cloud/models.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-ollama-cloud/models.js +12 -32
- package/dist/builtin-extensions/pi-ollama-cloud/models.js.map +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/index.js +5 -3
- package/dist/builtin-extensions/pi-prompt-template-model/index.js.map +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/prompt-loader.d.ts +2 -1
- package/dist/builtin-extensions/pi-prompt-template-model/prompt-loader.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/prompt-loader.js +21 -12
- package/dist/builtin-extensions/pi-prompt-template-model/prompt-loader.js.map +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/tool-manager.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/tool-manager.js +7 -24
- package/dist/builtin-extensions/pi-prompt-template-model/tool-manager.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js +39 -77
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.d.ts +4 -4
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.js +8 -5
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/notify.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/notify.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/notify.js +15 -31
- package/dist/builtin-extensions/pi-subagents/src/runs/background/notify.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/result-watcher.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/result-watcher.js +7 -2
- package/dist/builtin-extensions/pi-subagents/src/runs/background/result-watcher.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.d.ts +1 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.js +21 -4
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.js +11 -4
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.js +121 -25
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js +25 -5
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/chain-outputs.d.ts +1 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/chain-outputs.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/chain-outputs.js +5 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/chain-outputs.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.js +2 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/model-fallback.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/model-fallback.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/model-fallback.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/model-fallback.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.d.ts +7 -8
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.js +60 -32
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/utils.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/utils.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/utils.js +15 -5
- package/dist/builtin-extensions/pi-subagents/src/shared/utils.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.js +4 -3
- package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/communication.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/communication.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/communication.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts +2 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/render.js +22 -11
- package/dist/builtin-extensions/pi-subagents/src/tui/render.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/watchdog/review.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/watchdog/review.js +3 -3
- package/dist/builtin-extensions/pi-subagents/src/watchdog/review.js.map +1 -1
- package/dist/builtin-extensions/pi-tps.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-tps.js +20 -17
- package/dist/builtin-extensions/pi-tps.js.map +1 -1
- package/dist/builtin-extensions/pi-web-access/activity.d.ts +1 -0
- package/dist/builtin-extensions/pi-web-access/activity.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-web-access/activity.js +27 -5
- package/dist/builtin-extensions/pi-web-access/activity.js.map +1 -1
- package/dist/builtin-extensions/pi-web-access/bounded-body.d.ts +3 -0
- package/dist/builtin-extensions/pi-web-access/bounded-body.d.ts.map +1 -0
- package/dist/builtin-extensions/pi-web-access/bounded-body.js +43 -0
- package/dist/builtin-extensions/pi-web-access/bounded-body.js.map +1 -0
- package/dist/builtin-extensions/pi-web-access/content-page.d.ts +24 -0
- package/dist/builtin-extensions/pi-web-access/content-page.d.ts.map +1 -0
- package/dist/builtin-extensions/pi-web-access/content-page.js +57 -0
- package/dist/builtin-extensions/pi-web-access/content-page.js.map +1 -0
- package/dist/builtin-extensions/pi-web-access/extract.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-web-access/extract.js +7 -2
- package/dist/builtin-extensions/pi-web-access/extract.js.map +1 -1
- package/dist/builtin-extensions/pi-web-access/github-extract.d.ts +0 -1
- package/dist/builtin-extensions/pi-web-access/github-extract.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-web-access/github-extract.js +147 -36
- package/dist/builtin-extensions/pi-web-access/github-extract.js.map +1 -1
- package/dist/builtin-extensions/pi-web-access/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-web-access/index.js +48 -73
- package/dist/builtin-extensions/pi-web-access/index.js.map +1 -1
- package/dist/builtin-extensions/pi-web-access/session-cleanup.d.ts +12 -4
- package/dist/builtin-extensions/pi-web-access/session-cleanup.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-web-access/session-cleanup.js +35 -12
- package/dist/builtin-extensions/pi-web-access/session-cleanup.js.map +1 -1
- package/dist/builtin-extensions/pi-web-access/storage.d.ts +9 -6
- package/dist/builtin-extensions/pi-web-access/storage.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-web-access/storage.js +36 -24
- package/dist/builtin-extensions/pi-web-access/storage.js.map +1 -1
- package/dist/builtin-extensions/simple-pi-memory.d.ts +1 -1
- package/dist/builtin-extensions/simple-pi-memory.d.ts.map +1 -1
- package/dist/builtin-extensions/simple-pi-memory.js +1 -1
- package/dist/builtin-extensions/simple-pi-memory.js.map +1 -1
- package/dist/cli/install-cli.d.ts.map +1 -1
- package/dist/cli/install-cli.js +38 -30
- package/dist/cli/install-cli.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts +13 -0
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +75 -11
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +1 -0
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +1 -0
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +40 -6
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +309 -76
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/browser/runtime.d.ts +2 -0
- package/dist/core/browser/runtime.d.ts.map +1 -1
- package/dist/core/browser/runtime.js +80 -45
- package/dist/core/browser/runtime.js.map +1 -1
- package/dist/core/browser/setup.d.ts.map +1 -1
- package/dist/core/browser/setup.js +12 -1
- package/dist/core/browser/setup.js.map +1 -1
- package/dist/core/computer-use/adapter.d.ts +28 -0
- package/dist/core/computer-use/adapter.d.ts.map +1 -0
- package/dist/core/computer-use/adapter.js +138 -0
- package/dist/core/computer-use/adapter.js.map +1 -0
- package/dist/core/computer-use/image.d.ts +27 -0
- package/dist/core/computer-use/image.d.ts.map +1 -0
- package/dist/core/computer-use/image.js +84 -0
- package/dist/core/computer-use/image.js.map +1 -0
- package/dist/core/computer-use/lease.d.ts +18 -0
- package/dist/core/computer-use/lease.d.ts.map +1 -0
- package/dist/core/computer-use/lease.js +129 -0
- package/dist/core/computer-use/lease.js.map +1 -0
- package/dist/core/computer-use/macos-runtime.d.ts +14 -0
- package/dist/core/computer-use/macos-runtime.d.ts.map +1 -0
- package/dist/core/computer-use/macos-runtime.js +148 -0
- package/dist/core/computer-use/macos-runtime.js.map +1 -0
- package/dist/core/computer-use/policy.d.ts +19 -0
- package/dist/core/computer-use/policy.d.ts.map +1 -0
- package/dist/core/computer-use/policy.js +67 -0
- package/dist/core/computer-use/policy.js.map +1 -0
- package/dist/core/computer-use/release.generated.d.ts +31 -0
- package/dist/core/computer-use/release.generated.d.ts.map +1 -0
- package/dist/core/computer-use/release.generated.js +36 -0
- package/dist/core/computer-use/release.generated.js.map +1 -0
- package/dist/core/computer-use/runtime.d.ts +13 -0
- package/dist/core/computer-use/runtime.d.ts.map +1 -0
- package/dist/core/computer-use/runtime.js +158 -0
- package/dist/core/computer-use/runtime.js.map +1 -0
- package/dist/core/computer-use/schemas.d.ts +100 -0
- package/dist/core/computer-use/schemas.d.ts.map +1 -0
- package/dist/core/computer-use/schemas.js +96 -0
- package/dist/core/computer-use/schemas.js.map +1 -0
- package/dist/core/computer-use/windows-desktop.d.ts +3 -0
- package/dist/core/computer-use/windows-desktop.d.ts.map +1 -0
- package/dist/core/computer-use/windows-desktop.js +48 -0
- package/dist/core/computer-use/windows-desktop.js.map +1 -0
- package/dist/core/computer-use/workflow.d.ts +38 -0
- package/dist/core/computer-use/workflow.d.ts.map +1 -0
- package/dist/core/computer-use/workflow.js +900 -0
- package/dist/core/computer-use/workflow.js.map +1 -0
- package/dist/core/cron/jobs.d.ts +26 -8
- package/dist/core/cron/jobs.d.ts.map +1 -1
- package/dist/core/cron/jobs.js +357 -232
- package/dist/core/cron/jobs.js.map +1 -1
- package/dist/core/cron/origin-context.d.ts +1 -0
- package/dist/core/cron/origin-context.d.ts.map +1 -1
- package/dist/core/cron/origin-context.js.map +1 -1
- package/dist/core/cron/scheduler.d.ts +22 -17
- package/dist/core/cron/scheduler.d.ts.map +1 -1
- package/dist/core/cron/scheduler.js +153 -73
- package/dist/core/cron/scheduler.js.map +1 -1
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +4 -0
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +1 -0
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +8 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +8 -0
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts +4 -0
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +22 -1
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/large-subagent-launch.d.ts +1 -1
- package/dist/core/large-subagent-launch.d.ts.map +1 -1
- package/dist/core/large-subagent-launch.js +7 -7
- package/dist/core/large-subagent-launch.js.map +1 -1
- package/dist/core/model-registry.d.ts +2 -0
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +5 -0
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-runtime.d.ts +4 -1
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +40 -4
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/permissions.d.ts +4 -4
- package/dist/core/permissions.d.ts.map +1 -1
- package/dist/core/permissions.js +25 -38
- package/dist/core/permissions.js.map +1 -1
- package/dist/core/plan-mode.d.ts +5 -13
- package/dist/core/plan-mode.d.ts.map +1 -1
- package/dist/core/plan-mode.js +135 -116
- package/dist/core/plan-mode.js.map +1 -1
- package/dist/core/project-trust.d.ts.map +1 -1
- package/dist/core/project-trust.js +1 -1
- package/dist/core/project-trust.js.map +1 -1
- package/dist/core/prompt-resource-bridge.d.ts +12 -0
- package/dist/core/prompt-resource-bridge.d.ts.map +1 -0
- package/dist/core/prompt-resource-bridge.js +9 -0
- package/dist/core/prompt-resource-bridge.js.map +1 -0
- package/dist/core/protected-targets.d.ts +6 -0
- package/dist/core/protected-targets.d.ts.map +1 -0
- package/dist/core/protected-targets.js +45 -0
- package/dist/core/protected-targets.js.map +1 -0
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +7 -0
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/rollback.d.ts +19 -3
- package/dist/core/rollback.d.ts.map +1 -1
- package/dist/core/rollback.js +172 -56
- package/dist/core/rollback.js.map +1 -1
- package/dist/core/runtime-credentials.d.ts +3 -0
- package/dist/core/runtime-credentials.d.ts.map +1 -1
- package/dist/core/runtime-credentials.js +14 -1
- package/dist/core/runtime-credentials.js.map +1 -1
- package/dist/core/sdk.d.ts +3 -0
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +1 -0
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager.d.ts +6 -0
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +95 -32
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/session-ownership.d.ts.map +1 -1
- package/dist/core/session-ownership.js +8 -3
- package/dist/core/session-ownership.js.map +1 -1
- package/dist/core/session-retention.d.ts.map +1 -1
- package/dist/core/session-retention.js +18 -7
- package/dist/core/session-retention.js.map +1 -1
- package/dist/core/session-startup-settings.d.ts +10 -0
- package/dist/core/session-startup-settings.d.ts.map +1 -0
- package/dist/core/session-startup-settings.js +70 -0
- package/dist/core/session-startup-settings.js.map +1 -0
- package/dist/core/settings-manager.d.ts +6 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +19 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/subagent-event-transport.d.ts +3 -0
- package/dist/core/subagent-event-transport.d.ts.map +1 -0
- package/dist/core/subagent-event-transport.js +61 -0
- package/dist/core/subagent-event-transport.js.map +1 -0
- package/dist/core/subscriptions.d.ts +16 -7
- package/dist/core/subscriptions.d.ts.map +1 -1
- package/dist/core/subscriptions.js +96 -55
- package/dist/core/subscriptions.js.map +1 -1
- package/dist/core/trust-manager.d.ts +2 -1
- package/dist/core/trust-manager.d.ts.map +1 -1
- package/dist/core/trust-manager.js +6 -1
- package/dist/core/trust-manager.js.map +1 -1
- package/dist/core/update-check.d.ts.map +1 -1
- package/dist/core/update-check.js.map +1 -1
- package/dist/core/usage-adapters/kimi-coding.d.ts +2 -2
- package/dist/core/usage-adapters/kimi-coding.d.ts.map +1 -1
- package/dist/core/usage-adapters/kimi-coding.js +2 -2
- package/dist/core/usage-adapters/kimi-coding.js.map +1 -1
- package/dist/core/usage-adapters/openai-codex.d.ts +3 -2
- package/dist/core/usage-adapters/openai-codex.d.ts.map +1 -1
- package/dist/core/usage-adapters/openai-codex.js +3 -3
- package/dist/core/usage-adapters/openai-codex.js.map +1 -1
- package/dist/core/usage-adapters/xai.d.ts +2 -2
- package/dist/core/usage-adapters/xai.d.ts.map +1 -1
- package/dist/core/usage-adapters/xai.js +3 -3
- package/dist/core/usage-adapters/xai.js.map +1 -1
- package/dist/core/usage-adapters/zai.d.ts +2 -2
- package/dist/core/usage-adapters/zai.d.ts.map +1 -1
- package/dist/core/usage-adapters/zai.js +2 -2
- package/dist/core/usage-adapters/zai.js.map +1 -1
- package/dist/core/usage-service.d.ts +9 -2
- package/dist/core/usage-service.d.ts.map +1 -1
- package/dist/core/usage-service.js +95 -50
- package/dist/core/usage-service.js.map +1 -1
- package/dist/gateway/adapters/discord.d.ts.map +1 -1
- package/dist/gateway/adapters/discord.js +2 -2
- package/dist/gateway/adapters/discord.js.map +1 -1
- package/dist/gateway/agent-bridge.d.ts +9 -1
- package/dist/gateway/agent-bridge.d.ts.map +1 -1
- package/dist/gateway/agent-bridge.js +91 -37
- package/dist/gateway/agent-bridge.js.map +1 -1
- package/dist/gateway/approval.d.ts.map +1 -1
- package/dist/gateway/approval.js +3 -3
- package/dist/gateway/approval.js.map +1 -1
- package/dist/gateway/authz.d.ts +4 -4
- package/dist/gateway/authz.d.ts.map +1 -1
- package/dist/gateway/authz.js +8 -12
- package/dist/gateway/authz.js.map +1 -1
- package/dist/gateway/buttons.d.ts +8 -1
- package/dist/gateway/buttons.d.ts.map +1 -1
- package/dist/gateway/buttons.js +76 -18
- package/dist/gateway/buttons.js.map +1 -1
- package/dist/gateway/commands.d.ts +1 -0
- package/dist/gateway/commands.d.ts.map +1 -1
- package/dist/gateway/commands.js +12 -10
- package/dist/gateway/commands.js.map +1 -1
- package/dist/gateway/cron.d.ts +12 -11
- package/dist/gateway/cron.d.ts.map +1 -1
- package/dist/gateway/cron.js +85 -62
- package/dist/gateway/cron.js.map +1 -1
- package/dist/gateway/index.d.ts.map +1 -1
- package/dist/gateway/index.js +5 -4
- package/dist/gateway/index.js.map +1 -1
- package/dist/gateway/mobile-commands.d.ts +1 -0
- package/dist/gateway/mobile-commands.d.ts.map +1 -1
- package/dist/gateway/mobile-commands.js +64 -22
- package/dist/gateway/mobile-commands.js.map +1 -1
- package/dist/gateway/presenter.d.ts +12 -2
- package/dist/gateway/presenter.d.ts.map +1 -1
- package/dist/gateway/presenter.js +74 -39
- package/dist/gateway/presenter.js.map +1 -1
- package/dist/gateway/router.d.ts +2 -2
- package/dist/gateway/router.d.ts.map +1 -1
- package/dist/gateway/router.js +22 -9
- package/dist/gateway/router.js.map +1 -1
- package/dist/gateway/service.d.ts +2 -0
- package/dist/gateway/service.d.ts.map +1 -1
- package/dist/gateway/service.js +153 -0
- package/dist/gateway/service.js.map +1 -1
- package/dist/gateway/setup.d.ts.map +1 -1
- package/dist/gateway/setup.js +6 -4
- package/dist/gateway/setup.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +86 -33
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +6 -4
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/copyable-text.d.ts.map +1 -1
- package/dist/modes/interactive/components/copyable-text.js +3 -2
- package/dist/modes/interactive/components/copyable-text.js.map +1 -1
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-editor.js +1 -1
- package/dist/modes/interactive/components/extension-editor.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +4 -0
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +20 -0
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +2 -2
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +104 -109
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/smooth-streaming.d.ts.map +1 -1
- package/dist/modes/interactive/smooth-streaming.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +9 -1
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +2 -1
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/node-runtime/adapter-247RTYLS.js +16 -0
- package/dist/node-runtime/agent-session-services-KDMSPQDY.js +53 -0
- package/dist/node-runtime/{brave-UWDA3I22.js → brave-2AFFAXNN.js} +1 -1
- package/dist/node-runtime/{builtin-extensions-ZLAX7TUH.js → builtin-extensions-OX6KELNX.js} +9 -7
- package/dist/node-runtime/{chunk-QH6YL7VK.js → chunk-252ZVPPF.js} +3 -3
- package/dist/node-runtime/{chunk-PCEW76PM.js → chunk-2OIPYKLZ.js} +6 -6
- package/dist/node-runtime/{chunk-XBWPBZBN.js → chunk-2SWW7KMW.js} +1 -1
- package/dist/node-runtime/{chunk-UQUCFAJ3.js → chunk-2VIW3IMF.js} +40 -7
- package/dist/node-runtime/{chunk-UOEDI7RP.js → chunk-4KNKQGHM.js} +2 -2
- package/dist/node-runtime/{chunk-FQMM2EZ2.js → chunk-64XTQNLA.js} +29 -7
- package/dist/node-runtime/{chunk-NRKGMJYU.js → chunk-6O3IW3IA.js} +2 -2
- package/dist/node-runtime/{chunk-5ZQXRPMC.js → chunk-6ZZHGUSA.js} +2 -2
- package/dist/node-runtime/chunk-A2WO6WIN.js +1197 -0
- package/dist/node-runtime/{chunk-ZXSGTGJ6.js → chunk-APVM5NEU.js} +169 -148
- package/dist/node-runtime/{chunk-RC7DMV45.js → chunk-AYHH7YSD.js} +205 -144
- package/dist/node-runtime/{chunk-LWYIVUGV.js → chunk-B2IBAXNX.js} +48 -31
- package/dist/node-runtime/{chunk-M3LZLQW2.js → chunk-BDRGN3L2.js} +1 -0
- package/dist/node-runtime/{chunk-GJ2RDBRL.js → chunk-BYC6RKCN.js} +4 -2
- package/dist/node-runtime/{chunk-KWIYUUZK.js → chunk-C3P6Q3B2.js} +469 -283
- package/dist/node-runtime/{chunk-YCUZEGJG.js → chunk-DQSCFU7R.js} +17 -8
- package/dist/node-runtime/chunk-EBLAZVSA.js +4170 -0
- package/dist/node-runtime/{chunk-2KIPT4HJ.js → chunk-EPR2F3GU.js} +68 -20
- package/dist/node-runtime/{chunk-CSFI6YXL.js → chunk-ES6PBSIE.js} +1 -1
- package/dist/node-runtime/{chunk-IF24A3FH.js → chunk-EVM653DD.js} +4 -4
- package/dist/node-runtime/{chunk-HTFRRDSF.js → chunk-F2SMQ6ES.js} +3 -2
- package/dist/node-runtime/chunk-F2V2F4ZG.js +114 -0
- package/dist/node-runtime/chunk-FE3WZI7F.js +290 -0
- package/dist/node-runtime/{chunk-GYIXXQAO.js → chunk-FIRA54AC.js} +2 -5
- package/dist/node-runtime/{chunk-6VYZ5UFP.js → chunk-FLGEEH27.js} +1 -1
- package/dist/node-runtime/{chunk-5EFIU3OM.js → chunk-FTKEZL27.js} +1 -1
- package/dist/node-runtime/chunk-FY4A63RK.js +73 -0
- package/dist/node-runtime/chunk-FYIFPFXE.js +98 -0
- package/dist/node-runtime/{chunk-HMBGROQK.js → chunk-GLDXBBL6.js} +3 -3
- package/dist/node-runtime/{chunk-KWA4OC2J.js → chunk-H6YBCWKG.js} +1 -1
- package/dist/node-runtime/{chunk-2MI5OPMN.js → chunk-HNNHHJAB.js} +68 -50
- package/dist/node-runtime/{chunk-6XL67VVY.js → chunk-HUD2RFJW.js} +17 -2
- package/dist/node-runtime/{chunk-I54LGHWM.js → chunk-I2H5QMWW.js} +3 -3
- package/dist/node-runtime/chunk-IAZSK7KK.js +108 -0
- package/dist/node-runtime/{chunk-2HHLJWGD.js → chunk-IHHTWSXN.js} +9 -9
- package/dist/node-runtime/{chunk-DAPBPCBP.js → chunk-IPP5BIV5.js} +25 -3
- package/dist/node-runtime/{chunk-QFWG2RVL.js → chunk-IXG6F4NT.js} +11 -0
- package/dist/node-runtime/{chunk-RDDAZOMU.js → chunk-JL4HYQXK.js} +1 -1
- package/dist/node-runtime/{chunk-CDVHZOOK.js → chunk-JQYNHAKX.js} +1 -1
- package/dist/node-runtime/{chunk-WF7PGWRZ.js → chunk-JWEVT363.js} +37 -28
- package/dist/node-runtime/{chunk-2HMIRK7W.js → chunk-LHV3V67B.js} +5 -5
- package/dist/node-runtime/{chunk-UAEOTO52.js → chunk-MNQXDFPV.js} +6 -2
- package/dist/node-runtime/{chunk-IJIFHRTB.js → chunk-MQPKUHRN.js} +165 -85
- package/dist/node-runtime/{chunk-MPKSOJBT.js → chunk-NHATCSOI.js} +4 -7
- package/dist/node-runtime/{chunk-RMQZU2YU.js → chunk-NNNR3QIY.js} +1 -1
- package/dist/node-runtime/{chunk-RWTKOC3B.js → chunk-QBTJG3UM.js} +1 -1
- package/dist/node-runtime/{chunk-E4D3IGP2.js → chunk-QNVMKNNN.js} +20 -17
- package/dist/node-runtime/{chunk-GS42T6MX.js → chunk-QW3AAHWN.js} +1 -1
- package/dist/node-runtime/{chunk-7S3T6YEA.js → chunk-R4WSB2MQ.js} +5 -5
- package/dist/node-runtime/{chunk-B4HP6ZWM.js → chunk-RHCGYWO7.js} +1 -1
- package/dist/node-runtime/{chunk-3XPLBUEM.js → chunk-RLGY2QIL.js} +49 -59
- package/dist/node-runtime/{chunk-KKUTQQV7.js → chunk-RYRGL7P4.js} +1 -1
- package/dist/node-runtime/{chunk-AD6VXAO7.js → chunk-TCT6PCUR.js} +47 -115
- package/dist/node-runtime/chunk-U5F4IC7R.js +53 -0
- package/dist/node-runtime/{chunk-OCVIXVTZ.js → chunk-UBWW2PID.js} +13 -2
- package/dist/node-runtime/{chunk-HFVZUPFJ.js → chunk-UNUZICC4.js} +3 -3
- package/dist/node-runtime/{chunk-LQP3RB67.js → chunk-UYRKUKFE.js} +1 -1
- package/dist/node-runtime/{chunk-DSIKTUPW.js → chunk-VSUEAI7O.js} +2993 -3820
- package/dist/node-runtime/{chunk-NAY6UUQZ.js → chunk-WDIVLMOH.js} +1 -1
- package/dist/node-runtime/{chunk-E24EO34J.js → chunk-WPXUR3HE.js} +1 -1
- package/dist/node-runtime/{chunk-SLVOAQOY.js → chunk-WXYNALHD.js} +113 -1
- package/dist/node-runtime/{chunk-KJ6DWS3K.js → chunk-XEOCUEUJ.js} +121 -60
- package/dist/node-runtime/chunk-YD3IZAZ7.js +47 -0
- package/dist/node-runtime/chunk-YSB6URMT.js +41 -0
- package/dist/node-runtime/{chunk-VQFSUJJG.js → chunk-ZDJUR45D.js} +430 -129
- package/dist/node-runtime/{chunk-YDO2F2IA.js → chunk-ZEVFBFNF.js} +95 -142
- package/dist/node-runtime/chunk-ZIQUS5QO.js +180 -0
- package/dist/node-runtime/cli-runtime.js +4 -4
- package/dist/node-runtime/{command-6WDOYKS6.js → command-3HMSY6W2.js} +5 -5
- package/dist/node-runtime/{commands-NZLSOHPE.js → commands-D6A6H4TS.js} +11 -16
- package/dist/node-runtime/commands-OCSSEEWJ.js +37 -0
- package/dist/node-runtime/{config-QDD5PUE2.js → config-CU7M7BTK.js} +1 -1
- package/dist/node-runtime/{config-D4QUPAHX.js → config-DS7XLMEM.js} +2 -2
- package/dist/node-runtime/{direct-tool-executor-77GW4F5P.js → direct-tool-executor-2QJXVQD2.js} +8 -10
- package/dist/node-runtime/{exa-LL64QZR2.js → exa-6VBZNPGE.js} +1 -1
- package/dist/node-runtime/{export-html-VM4J2MNR.js → export-html-BRWF5AHI.js} +4 -4
- package/dist/node-runtime/{extension-input-E7BJZ35H.js → extension-input-VBBMX7YV.js} +5 -5
- package/dist/node-runtime/{extension-selector-WU42XDTU.js → extension-selector-T5AOG5XB.js} +5 -5
- package/dist/node-runtime/{extract-EQJE7FZZ.js → extract-BFX2N35A.js} +3 -3
- package/dist/node-runtime/{gateway-INAYBF4Q.js → gateway-6623C2U3.js} +61 -53
- package/dist/node-runtime/{gemini-search-35OCRFLN.js → gemini-search-C66QHDT6.js} +2 -2
- package/dist/node-runtime/{gemini-url-context-UQY3PHHW.js → gemini-url-context-T7DEK73R.js} +3 -3
- package/dist/node-runtime/{github-extract-F64RZOEA.js → github-extract-HOGE3D6F.js} +107 -38
- package/dist/node-runtime/{goal-NJEE5CTU.js → goal-AIHEDUYA.js} +5 -5
- package/dist/node-runtime/index.js +54 -48
- package/dist/node-runtime/{init-HS6NQXSK.js → init-JBQJIPYI.js} +3 -4
- package/dist/node-runtime/{install-cli-KL4UDDAD.js → install-cli-INGHIVBY.js} +30 -25
- package/dist/node-runtime/interactive-mode-FM5DNUSW.js +74 -0
- package/dist/node-runtime/{interactive-view-NGFAMHPW.js → interactive-view-K33PM4OS.js} +8 -8
- package/dist/node-runtime/{lsp-manager-3ASUSO4T.js → lsp-manager-S554V5HR.js} +240 -155
- package/dist/node-runtime/{lunr-browser-IR7TL3J7.js → lunr-browser-H4FDOR3C.js} +7 -7
- package/dist/node-runtime/lunr-computer-use-VDP2QNRQ.js +158 -0
- package/dist/node-runtime/{lunr-cron-LWIZJM2N.js → lunr-cron-LKVA5CZZ.js} +94 -79
- package/dist/node-runtime/main.js +42 -39
- package/dist/node-runtime/{mobile-commands-J7OJEKFO.js → mobile-commands-XT3NQXLD.js} +13 -12
- package/dist/node-runtime/{model-runtime-OO5HFLWE.js → model-runtime-MZ2JMDV4.js} +4 -4
- package/dist/node-runtime/{openai-search-B3MSNCQA.js → openai-search-K72LJDYN.js} +1 -1
- package/dist/node-runtime/{package-manager-cli-VYZM5WHN.js → package-manager-cli-CYM262SI.js} +20 -19
- package/dist/node-runtime/{parallel-AI2MNSCU.js → parallel-X724NCNU.js} +1 -1
- package/dist/node-runtime/{perplexity-QVJW3I35.js → perplexity-RDHQHVMK.js} +2 -2
- package/dist/node-runtime/{pi-intercom-QM53RLTS.js → pi-intercom-NHHEPBMI.js} +2 -2
- package/dist/node-runtime/{pi-mcp-adapter-5UKBZP44.js → pi-mcp-adapter-PP3GQJQ2.js} +98 -94
- package/dist/node-runtime/{pi-ollama-cloud-2F3Y2QNM.js → pi-ollama-cloud-4MNWIMFN.js} +11 -24
- package/dist/node-runtime/{pi-prompt-template-model-QWTCGLJU.js → pi-prompt-template-model-FTGELLS5.js} +32 -36
- package/dist/node-runtime/{pi-subagents-DNY7EAIG.js → pi-subagents-LT3CTO4E.js} +114 -116
- package/dist/node-runtime/{pi-web-access-WTGMNZ32.js → pi-web-access-Z3LP246C.js} +144 -108
- package/dist/node-runtime/{print-mode-XSFM26EL.js → print-mode-2XHN5SUA.js} +4 -3
- package/dist/node-runtime/{process-registry-4FAKZQOL.js → process-registry-Q4QWIU33.js} +3 -3
- package/dist/node-runtime/{proxy-modes-LGEUYD7R.js → proxy-modes-VEGC6QG5.js} +9 -13
- package/dist/node-runtime/rpc-entry.js +42 -39
- package/dist/node-runtime/{rpc-mode-O3XV4SID.js → rpc-mode-32DHJPEJ.js} +4 -4
- package/dist/node-runtime/{runtime-4VA6JKNF.js → runtime-EDUUGAQD.js} +56 -46
- package/dist/node-runtime/runtime-UGXM4NPQ.js +21 -0
- package/dist/node-runtime/{runtime-bridges-VRDDR73P.js → runtime-bridges-DNKMNJCF.js} +8 -7
- package/dist/node-runtime/{service-MDQIPQ26.js → service-IHLGFLBT.js} +6 -4
- package/dist/node-runtime/{session-handoff-GWARVEWT.js → session-handoff-LNSPDTKY.js} +4 -4
- package/dist/node-runtime/{session-manager-JB5J6XBN.js → session-manager-YIFIAVGC.js} +3 -3
- package/dist/node-runtime/{session-selector-GIM4DHQ2.js → session-selector-I73U3EIO.js} +7 -7
- package/dist/node-runtime/{settings-manager-J4SPQPDJ.js → settings-manager-P2TKGYTR.js} +6 -5
- package/dist/node-runtime/{setup-JBKOLJ6F.js → setup-H7CCELIL.js} +15 -1
- package/dist/node-runtime/{setup-CQ2NLVK5.js → setup-OLQ4GXWS.js} +22 -21
- package/dist/node-runtime/{src-IVPNZ2BX.js → src-6RV4PXKJ.js} +64 -36
- package/dist/node-runtime/{subagent-executor-KZZQGAKV.js → subagent-executor-Q5F7DBVM.js} +141 -62
- package/dist/node-runtime/{tavily-WEZFVFP7.js → tavily-KZBFYQB6.js} +1 -1
- package/dist/node-runtime/{theme-UOO5RVFN.js → theme-YLVZKKZD.js} +2 -2
- package/dist/node-runtime/{trust-manager-MMISNCYO.js → trust-manager-ZCU76D23.js} +2 -2
- package/dist/node-runtime/{update-cli-GTFJC7XK.js → update-cli-F3XXJANQ.js} +7 -6
- package/dist/node-runtime/{usage-service-LFB2SWYV.js → usage-service-CPAGBED5.js} +1 -1
- package/dist/node-runtime/{video-extract-OOZHR7SU.js → video-extract-UPKYIBW3.js} +3 -3
- package/dist/node-runtime/workflow-ICDI4N3J.js +767 -0
- package/dist/node-runtime/{youtube-extract-FNPAUNHU.js → youtube-extract-77NT7FWH.js} +4 -4
- package/dist/utils/clipboard-image.d.ts.map +1 -1
- package/dist/utils/clipboard-image.js.map +1 -1
- package/dist/utils/exif-orientation.d.ts.map +1 -1
- package/dist/utils/exif-orientation.js +25 -10
- package/dist/utils/exif-orientation.js.map +1 -1
- package/dist/utils/image-resize-core.d.ts +2 -0
- package/dist/utils/image-resize-core.d.ts.map +1 -1
- package/dist/utils/image-resize-core.js +12 -0
- package/dist/utils/image-resize-core.js.map +1 -1
- package/dist/utils/paths.d.ts +4 -0
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +33 -2
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/sanitize-terminal-text.d.ts +7 -0
- package/dist/utils/sanitize-terminal-text.d.ts.map +1 -0
- package/dist/utils/sanitize-terminal-text.js +67 -0
- package/dist/utils/sanitize-terminal-text.js.map +1 -0
- package/docs/browser.md +1 -1
- package/docs/computer-use.md +362 -0
- package/docs/custom-provider.md +3 -3
- package/docs/extensions.md +8 -4
- package/docs/features.md +22 -12
- package/docs/keybindings.md +1 -1
- package/docs/models.md +5 -5
- package/docs/packages.md +1 -1
- package/docs/providers.md +2 -2
- package/docs/rpc.md +7 -7
- package/docs/security.md +10 -5
- package/docs/sessions.md +2 -2
- package/docs/skills.md +1 -1
- package/docs/terminal-setup.md +7 -7
- package/docs/themes.md +1 -1
- package/docs/usage.md +1 -1
- package/examples/extensions/auto-commit-on-exit.ts +1 -1
- package/examples/extensions/bash-spawn-hook.ts +1 -1
- package/examples/extensions/built-in-tool-renderer.ts +1 -1
- package/examples/extensions/claude-rules.ts +1 -1
- package/examples/extensions/commands.ts +1 -1
- package/examples/extensions/custom-compaction.ts +1 -1
- package/examples/extensions/custom-provider-anthropic/index.ts +3 -3
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/index.ts +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/doom-overlay/index.ts +1 -1
- package/examples/extensions/git-merge-and-resolve.ts +2 -2
- package/examples/extensions/gondolin/index.ts +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/hidden-thinking-label.ts +1 -1
- package/examples/extensions/inline-bash.ts +2 -2
- package/examples/extensions/input-transform-streaming.ts +2 -2
- package/examples/extensions/input-transform.ts +2 -2
- package/examples/extensions/interactive-shell.ts +1 -1
- package/examples/extensions/kimi-deferred-tools.ts +1 -1
- package/examples/extensions/mac-system-theme.ts +1 -1
- package/examples/extensions/minimal-mode.ts +1 -1
- package/examples/extensions/modal-editor.ts +1 -1
- package/examples/extensions/model-status.ts +1 -1
- package/examples/extensions/notify.ts +3 -3
- package/examples/extensions/overlay-qa-tests.ts +1 -1
- package/examples/extensions/overlay-test.ts +1 -1
- package/examples/extensions/pirate.ts +1 -1
- package/examples/extensions/preset.ts +3 -3
- package/examples/extensions/project-trust.ts +4 -4
- package/examples/extensions/prompt-customizer.ts +1 -1
- package/examples/extensions/rainbow-editor.ts +1 -1
- package/examples/extensions/rpc-demo.ts +1 -1
- package/examples/extensions/sandbox/index.ts +7 -7
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/shutdown-command.ts +5 -5
- package/examples/extensions/ssh.ts +2 -2
- package/examples/extensions/subagent/README.md +3 -3
- package/examples/extensions/subagent/index.ts +2 -2
- package/examples/extensions/titlebar-spinner.ts +1 -1
- package/examples/extensions/tool-override.ts +1 -1
- package/examples/extensions/tools.ts +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/extensions/working-indicator.ts +1 -1
- package/examples/extensions/working-message-test.ts +1 -1
- package/examples/sdk/01-minimal.ts +1 -1
- package/examples/sdk/03-custom-prompt.ts +1 -1
- package/examples/sdk/04-skills.ts +1 -1
- package/examples/sdk/06-extensions.ts +2 -2
- package/examples/sdk/08-prompt-templates.ts +1 -1
- package/install-lock/package-lock.json +3841 -0
- package/install-lock/package.json +18 -0
- package/native/computer-use/LICENSE.md +21 -0
- package/npm-shrinkwrap.json +3858 -0
- package/package.json +15 -9
- package/dist/modes/interactive/components/exit-card.d.ts +0 -22
- package/dist/modes/interactive/components/exit-card.d.ts.map +0 -1
- package/dist/modes/interactive/components/exit-card.js +0 -69
- package/dist/modes/interactive/components/exit-card.js.map +0 -1
- package/dist/node-runtime/agent-session-services-YXXFCP5J.js +0 -49
- package/dist/node-runtime/chunk-4HXHDDCF.js +0 -16
- package/dist/node-runtime/chunk-4TLO4PO2.js +0 -3427
- package/dist/node-runtime/chunk-AUXVGBO4.js +0 -19
- package/dist/node-runtime/chunk-OVX6X377.js +0 -50
- package/dist/node-runtime/chunk-QTU6AKNJ.js +0 -773
- package/dist/node-runtime/chunk-TORR5XBV.js +0 -356
- package/dist/node-runtime/commands-QC6VUZJQ.js +0 -36
- package/dist/node-runtime/interactive-mode-Z5M7WYYZ.js +0 -72
- package/dist/node-runtime/mcp-auth-flow-QIXHW6QN.js +0 -32
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
getAgentDir
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-64XTQNLA.js";
|
|
5
5
|
|
|
6
6
|
// packages/coding-agent/dist/core/keybindings.js
|
|
7
7
|
import { TUI_KEYBINDINGS, KeybindingsManager as TuiKeybindingsManager } from "@ashx-j/lunr-tui";
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// packages/coding-agent/dist/core/computer-use/policy.js
|
|
4
|
+
var settingsListeners = /* @__PURE__ */ new Set();
|
|
5
|
+
function computerSettingsChanged(settings) {
|
|
6
|
+
for (let listener of settingsListeners)
|
|
7
|
+
listener(settings);
|
|
8
|
+
}
|
|
9
|
+
function onComputerSettingsChanged(listener) {
|
|
10
|
+
return settingsListeners.add(listener), () => {
|
|
11
|
+
settingsListeners.delete(listener);
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
var COMPUTER_TOOLS = [
|
|
15
|
+
"computer_load",
|
|
16
|
+
"computer_apps",
|
|
17
|
+
"computer_observe",
|
|
18
|
+
"computer_click",
|
|
19
|
+
"computer_hover",
|
|
20
|
+
"computer_drag",
|
|
21
|
+
"computer_key",
|
|
22
|
+
"computer_text",
|
|
23
|
+
"computer_window",
|
|
24
|
+
"computer_launch",
|
|
25
|
+
"computer_scroll",
|
|
26
|
+
"computer_end"
|
|
27
|
+
];
|
|
28
|
+
function computerPolicy(name, input) {
|
|
29
|
+
if (name.startsWith("computer_"))
|
|
30
|
+
switch (name) {
|
|
31
|
+
case "computer_load":
|
|
32
|
+
case "computer_apps":
|
|
33
|
+
case "computer_observe":
|
|
34
|
+
case "computer_end":
|
|
35
|
+
return { observation: !0, foreground: !1 };
|
|
36
|
+
case "computer_click":
|
|
37
|
+
case "computer_hover":
|
|
38
|
+
case "computer_drag":
|
|
39
|
+
case "computer_key":
|
|
40
|
+
case "computer_text":
|
|
41
|
+
case "computer_scroll":
|
|
42
|
+
return {
|
|
43
|
+
observation: !1,
|
|
44
|
+
foreground: name === "computer_hover" || input.foreground === !0 || input.desktop === !0
|
|
45
|
+
};
|
|
46
|
+
case "computer_window":
|
|
47
|
+
case "computer_launch":
|
|
48
|
+
return { observation: !1, foreground: !0 };
|
|
49
|
+
default:
|
|
50
|
+
throw new Error(`Unknown computer operation: ${name}`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function computerRefusal(name, input, policy) {
|
|
54
|
+
let operation = computerPolicy(name, input);
|
|
55
|
+
if (!operation)
|
|
56
|
+
return "Unknown computer operation.";
|
|
57
|
+
if (policy.child)
|
|
58
|
+
return "Computer tools are available only to main agents.";
|
|
59
|
+
if (!policy.enabled)
|
|
60
|
+
return "Computer use is disabled in settings.";
|
|
61
|
+
if (operation.foreground && !policy.foreground)
|
|
62
|
+
return "Foreground control is disabled. Use background operations.";
|
|
63
|
+
if (!policy.vision && name !== "computer_end")
|
|
64
|
+
return "Image-only computer use requires an image-capable model. Select one before loading computer tools.";
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export {
|
|
68
|
+
computerSettingsChanged,
|
|
69
|
+
onComputerSettingsChanged,
|
|
70
|
+
COMPUTER_TOOLS,
|
|
71
|
+
computerPolicy,
|
|
72
|
+
computerRefusal
|
|
73
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
typebox_exports
|
|
4
|
+
} from "./chunk-PL6JKXWI.js";
|
|
5
|
+
|
|
6
|
+
// packages/coding-agent/dist/core/computer-use/schemas.js
|
|
7
|
+
var target = {
|
|
8
|
+
pid: typebox_exports.Integer({ minimum: 1 }),
|
|
9
|
+
window_id: typebox_exports.Integer({ minimum: 1 })
|
|
10
|
+
}, observation = typebox_exports.String({
|
|
11
|
+
description: "Copy the latest image token exactly for this target. Single action, expires after 30 seconds. Failed actions consume it; capture again before acting."
|
|
12
|
+
}), grounded = {
|
|
13
|
+
pid: typebox_exports.Optional(target.pid),
|
|
14
|
+
window_id: typebox_exports.Optional(target.window_id),
|
|
15
|
+
desktop: typebox_exports.Optional(typebox_exports.Boolean({ description: "Primary desktop instead of a window; requires foreground=true." })),
|
|
16
|
+
observation,
|
|
17
|
+
foreground: typebox_exports.Optional(typebox_exports.Boolean({
|
|
18
|
+
description: "Window focus escalation after verified background failure. Settings may forbid it."
|
|
19
|
+
}))
|
|
20
|
+
}, coordinate = typebox_exports.Number({ minimum: 0 }), pixels = { x: coordinate, y: coordinate }, optionalPixels = { x: typebox_exports.Optional(coordinate), y: typebox_exports.Optional(coordinate) }, computerSchemas = {
|
|
21
|
+
computer_load: typebox_exports.Object({}, { additionalProperties: !1 }),
|
|
22
|
+
computer_apps: typebox_exports.Object({
|
|
23
|
+
pid: typebox_exports.Optional(target.pid),
|
|
24
|
+
query: typebox_exports.Optional(typebox_exports.String({
|
|
25
|
+
minLength: 1,
|
|
26
|
+
maxLength: 240,
|
|
27
|
+
description: "Case-insensitive literal substring in the requested app or window collection before pagination. Omit to list all. Required with include_windows."
|
|
28
|
+
})),
|
|
29
|
+
include_windows: typebox_exports.Optional(typebox_exports.Boolean({
|
|
30
|
+
description: "With a named app query and no pid, include windows for matching running PIDs (at most 5 PIDs and 50 window rows). Narrow the query or use pid if more match."
|
|
31
|
+
})),
|
|
32
|
+
offset: typebox_exports.Optional(typebox_exports.Integer({
|
|
33
|
+
minimum: 0,
|
|
34
|
+
maximum: Number.MAX_SAFE_INTEGER,
|
|
35
|
+
description: "Zero-based row offset, default 0. Pass the result's next_offset to retrieve the next 50 apps or windows."
|
|
36
|
+
}))
|
|
37
|
+
}, { additionalProperties: !1 }),
|
|
38
|
+
computer_observe: typebox_exports.Object({
|
|
39
|
+
pid: typebox_exports.Optional(target.pid),
|
|
40
|
+
window_id: typebox_exports.Optional(target.window_id),
|
|
41
|
+
desktop: typebox_exports.Optional(typebox_exports.Boolean({ description: "Capture the primary desktop instead of a window." })),
|
|
42
|
+
observation: typebox_exports.Optional(observation),
|
|
43
|
+
crop: typebox_exports.Optional(typebox_exports.Object({
|
|
44
|
+
x: coordinate,
|
|
45
|
+
y: coordinate,
|
|
46
|
+
width: typebox_exports.Number({ exclusiveMinimum: 0 }),
|
|
47
|
+
height: typebox_exports.Number({ exclusiveMinimum: 0 })
|
|
48
|
+
}, {
|
|
49
|
+
additionalProperties: !1,
|
|
50
|
+
description: "Region in the latest returned image's pixels; requires its observation token. Captures fresh pixels. Omit for full target."
|
|
51
|
+
}))
|
|
52
|
+
}, { additionalProperties: !1 }),
|
|
53
|
+
computer_click: typebox_exports.Object({
|
|
54
|
+
...grounded,
|
|
55
|
+
...pixels,
|
|
56
|
+
button: typebox_exports.Optional(typebox_exports.Union([typebox_exports.Literal("left"), typebox_exports.Literal("right")])),
|
|
57
|
+
count: typebox_exports.Optional(typebox_exports.Integer({ minimum: 1, maximum: 2 })),
|
|
58
|
+
modifier: typebox_exports.Optional(typebox_exports.Array(typebox_exports.String({ minLength: 1 }), { maxItems: 4 }))
|
|
59
|
+
}, { additionalProperties: !1 }),
|
|
60
|
+
computer_hover: typebox_exports.Object({
|
|
61
|
+
desktop: typebox_exports.Literal(!0, { description: "Primary desktop only; no window/PID hover." }),
|
|
62
|
+
foreground: typebox_exports.Literal(!0, {
|
|
63
|
+
description: "Moves the real pointer to the visible desktop target; foreground control must be allowed."
|
|
64
|
+
}),
|
|
65
|
+
observation,
|
|
66
|
+
...pixels
|
|
67
|
+
}, { additionalProperties: !1 }),
|
|
68
|
+
computer_drag: typebox_exports.Object({ ...grounded, from_x: coordinate, from_y: coordinate, to_x: coordinate, to_y: coordinate }, { additionalProperties: !1 }),
|
|
69
|
+
computer_key: typebox_exports.Object({
|
|
70
|
+
...grounded,
|
|
71
|
+
...optionalPixels,
|
|
72
|
+
key: typebox_exports.Optional(typebox_exports.String({ minLength: 1, maxLength: 100 })),
|
|
73
|
+
keys: typebox_exports.Optional(typebox_exports.Array(typebox_exports.String({ minLength: 1, maxLength: 100 }), { minItems: 2, maxItems: 5 }))
|
|
74
|
+
}, { additionalProperties: !1 }),
|
|
75
|
+
computer_text: typebox_exports.Object({ ...grounded, ...optionalPixels, text: typebox_exports.String({ maxLength: 2e4 }) }, { additionalProperties: !1 }),
|
|
76
|
+
computer_window: typebox_exports.Object({
|
|
77
|
+
...target,
|
|
78
|
+
observation,
|
|
79
|
+
action: typebox_exports.Union([typebox_exports.Literal("frame"), typebox_exports.Literal("focus")]),
|
|
80
|
+
x: typebox_exports.Optional(typebox_exports.Number()),
|
|
81
|
+
y: typebox_exports.Optional(typebox_exports.Number()),
|
|
82
|
+
width: typebox_exports.Optional(typebox_exports.Integer({ minimum: 1 })),
|
|
83
|
+
height: typebox_exports.Optional(typebox_exports.Integer({ minimum: 1 }))
|
|
84
|
+
}, { additionalProperties: !1 }),
|
|
85
|
+
computer_launch: typebox_exports.Object({ name: typebox_exports.String({ minLength: 1, maxLength: 500 }) }, { additionalProperties: !1 }),
|
|
86
|
+
computer_scroll: typebox_exports.Object({
|
|
87
|
+
...grounded,
|
|
88
|
+
...pixels,
|
|
89
|
+
direction: typebox_exports.Union([typebox_exports.Literal("up"), typebox_exports.Literal("down"), typebox_exports.Literal("left"), typebox_exports.Literal("right")]),
|
|
90
|
+
amount: typebox_exports.Integer({ minimum: 1, maximum: 50 }),
|
|
91
|
+
by: typebox_exports.Union([typebox_exports.Literal("line"), typebox_exports.Literal("page")])
|
|
92
|
+
}, { additionalProperties: !1 }),
|
|
93
|
+
computer_end: typebox_exports.Object({}, { additionalProperties: !1 })
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export {
|
|
97
|
+
computerSchemas
|
|
98
|
+
};
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
} from "./chunk-I6R76AG7.js";
|
|
5
5
|
import {
|
|
6
6
|
DynamicBorder
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-FLGEEH27.js";
|
|
8
8
|
import {
|
|
9
9
|
keyHint
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QW3AAHWN.js";
|
|
11
11
|
import {
|
|
12
12
|
theme
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-JL4HYQXK.js";
|
|
14
14
|
|
|
15
15
|
// packages/coding-agent/dist/modes/interactive/components/extension-input.js
|
|
16
16
|
import { Container, getKeybindings, Input, Spacer, Text } from "@ashx-j/lunr-tui";
|
|
@@ -3,6 +3,9 @@ import {
|
|
|
3
3
|
runtimeScope
|
|
4
4
|
} from "./chunk-IMLCWLPI.js";
|
|
5
5
|
|
|
6
|
+
// packages/coding-agent/dist/core/usage-service.js
|
|
7
|
+
import { createHash } from "node:crypto";
|
|
8
|
+
|
|
6
9
|
// packages/coding-agent/dist/core/usage-adapters/shared.js
|
|
7
10
|
async function fetchWithTimeout(url, init, timeoutMs = 1e4) {
|
|
8
11
|
let controller = new AbortController(), timeout = setTimeout(() => controller.abort(), timeoutMs);
|
|
@@ -84,8 +87,8 @@ function detailWindow(label, detail) {
|
|
|
84
87
|
if (usedPercent !== void 0)
|
|
85
88
|
return { label, usedPercent, resetsAt: toEpochMs(object.resetTime) };
|
|
86
89
|
}
|
|
87
|
-
async function fetchKimiPlanUsage(runtime) {
|
|
88
|
-
let apiKey = (await runtime.getAuth(KIMI_PROVIDER_ID))?.auth.apiKey;
|
|
90
|
+
async function fetchKimiPlanUsage(runtime, auth) {
|
|
91
|
+
let apiKey = (auth ? auth.resolution : await runtime.getAuth(KIMI_PROVIDER_ID))?.auth.apiKey;
|
|
89
92
|
if (!apiKey)
|
|
90
93
|
return;
|
|
91
94
|
let response = await fetchWithTimeout(KIMI_USAGE_URL, {
|
|
@@ -218,8 +221,8 @@ function toPlanUsage(report) {
|
|
|
218
221
|
];
|
|
219
222
|
});
|
|
220
223
|
}
|
|
221
|
-
async function fetchCodexPlanUsage(runtime) {
|
|
222
|
-
let headers = await resolveCodexHeaders(runtime);
|
|
224
|
+
async function fetchCodexPlanUsage(runtime, auth) {
|
|
225
|
+
let headers = auth ? auth.codexHeaders : await resolveCodexHeaders(runtime);
|
|
223
226
|
if (!headers)
|
|
224
227
|
return;
|
|
225
228
|
let response = await fetchWithTimeout(CODEX_USAGE_URL, { headers }), text = await response.text();
|
|
@@ -244,10 +247,10 @@ function weeklyWindow(config) {
|
|
|
244
247
|
resetsAt: toEpochMs(period?.end)
|
|
245
248
|
};
|
|
246
249
|
}
|
|
247
|
-
async function fetchXaiPlanUsage(runtime) {
|
|
248
|
-
if (!runtime.isUsingOAuth(XAI_PROVIDER_ID))
|
|
250
|
+
async function fetchXaiPlanUsage(runtime, auth) {
|
|
251
|
+
if (!(auth?.oauth ?? runtime.isUsingOAuth(XAI_PROVIDER_ID)))
|
|
249
252
|
return;
|
|
250
|
-
let accessToken = (await runtime.getAuth(XAI_PROVIDER_ID))?.auth.apiKey;
|
|
253
|
+
let accessToken = (auth ? auth.resolution : await runtime.getAuth(XAI_PROVIDER_ID))?.auth.apiKey;
|
|
251
254
|
if (!accessToken)
|
|
252
255
|
return;
|
|
253
256
|
let response = await fetchWithTimeout(XAI_BILLING_URL, {
|
|
@@ -292,8 +295,8 @@ function limitLabel(limit) {
|
|
|
292
295
|
let unit = asNumber(limit.unit), number = asNumber(limit.number);
|
|
293
296
|
return unit === 1 && number !== void 0 ? `${number}d` : unit === 3 && number !== void 0 ? `${number}h` : unit === 5 && number !== void 0 ? `${number}m` : unit === 6 ? "Weekly" : "Limit";
|
|
294
297
|
}
|
|
295
|
-
async function fetchZaiPlanUsage(runtime) {
|
|
296
|
-
let apiKey = (await runtime.getAuth(ZAI_PROVIDER_ID))?.auth.apiKey;
|
|
298
|
+
async function fetchZaiPlanUsage(runtime, auth) {
|
|
299
|
+
let apiKey = (auth ? auth.resolution : await runtime.getAuth(ZAI_PROVIDER_ID))?.auth.apiKey;
|
|
297
300
|
if (!apiKey)
|
|
298
301
|
return;
|
|
299
302
|
let response = await fetchWithTimeout(ZAI_QUOTA_URL, {
|
|
@@ -361,7 +364,11 @@ function pickPlanWindow(usage, preferred) {
|
|
|
361
364
|
function footerPlanLabel(window) {
|
|
362
365
|
return isFiveHourPlanWindow(window) ? "5h" : isWeeklyPlanWindow(window) ? "wk" : window.label.length <= 4 ? window.label : window.label.slice(0, 4);
|
|
363
366
|
}
|
|
364
|
-
var
|
|
367
|
+
var generation = 0, states = /* @__PURE__ */ new WeakMap();
|
|
368
|
+
function stateFor(runtime) {
|
|
369
|
+
let state = states.get(runtime);
|
|
370
|
+
return state || (state = { accounts: /* @__PURE__ */ new Map(), authReads: /* @__PURE__ */ new Map(), cache: /* @__PURE__ */ new Map(), inflight: /* @__PURE__ */ new Map() }, states.set(runtime, state)), state;
|
|
371
|
+
}
|
|
365
372
|
function hasPlanUsageAdapter(providerId) {
|
|
366
373
|
return providerId in ADAPTERS;
|
|
367
374
|
}
|
|
@@ -372,24 +379,38 @@ async function getPlanUsageResult(providerId, runtime) {
|
|
|
372
379
|
let adapter = ADAPTERS[providerId];
|
|
373
380
|
if (!adapter)
|
|
374
381
|
return {};
|
|
375
|
-
let
|
|
376
|
-
|
|
382
|
+
let state = stateFor(runtime), requestGeneration = generation, reads = state.authReads.get(providerId) ?? { started: 0, settled: 0 };
|
|
383
|
+
state.authReads.set(providerId, reads);
|
|
384
|
+
let authRead = ++reads.started, auth;
|
|
385
|
+
try {
|
|
386
|
+
auth = providerId === "openai-codex" ? { codexHeaders: await resolveCodexHeaders(runtime), oauth: runtime.isUsingOAuth(providerId) } : { resolution: await runtime.getAuth(providerId), oauth: runtime.isUsingOAuth(providerId) };
|
|
387
|
+
} catch (error) {
|
|
388
|
+
return reads.settled <= authRead && (reads.settled = authRead, state.accounts.delete(providerId), state.cache.delete(providerId), state.inflight.delete(providerId)), { error: planUsageAuthError(error) };
|
|
389
|
+
}
|
|
390
|
+
if (generation !== requestGeneration || states.get(runtime) !== state)
|
|
391
|
+
return {};
|
|
392
|
+
let account = createHash("sha256").update(JSON.stringify(auth)).digest("hex"), previous = state.accounts.get(providerId);
|
|
393
|
+
if (reads.settled > authRead && previous !== account)
|
|
394
|
+
return {};
|
|
395
|
+
reads.settled = Math.max(reads.settled, authRead), previous !== account && (state.cache.delete(providerId), state.inflight.delete(providerId), state.accounts.set(providerId, account));
|
|
396
|
+
let cached = state.cache.get(providerId);
|
|
397
|
+
if (cached && cached.expiresAt > Date.now())
|
|
377
398
|
return { usage: cached.value[0], usages: cached.value };
|
|
378
|
-
let pending = inflight.get(providerId);
|
|
399
|
+
let pending = state.inflight.get(providerId);
|
|
379
400
|
if (pending)
|
|
380
401
|
return pending;
|
|
381
|
-
let task = (async () => {
|
|
402
|
+
let isCurrent = () => generation === requestGeneration && states.get(runtime) === state && state.accounts.get(providerId) === account && state.inflight.get(providerId) === task, task = (async () => {
|
|
382
403
|
try {
|
|
383
|
-
let value = await adapter(runtime), usages = value === void 0 ? [] : Array.isArray(value) ? value : [value];
|
|
384
|
-
return cache.set(providerId, { expiresAt: Date.now() + PLAN_USAGE_CACHE_TTL_MS, value: usages }), { usage: usages[0], usages };
|
|
404
|
+
let value = await adapter(runtime, auth), usages = value === void 0 ? [] : Array.isArray(value) ? value : [value];
|
|
405
|
+
return isCurrent() && state.cache.set(providerId, { expiresAt: Date.now() + PLAN_USAGE_CACHE_TTL_MS, value: usages }), { usage: usages[0], usages };
|
|
385
406
|
} catch (error) {
|
|
386
407
|
let authError = planUsageAuthError(error);
|
|
387
|
-
return authError ? { error: authError } : (cache.set(providerId, { expiresAt: Date.now() + PLAN_USAGE_CACHE_TTL_MS, value: [] }), {});
|
|
408
|
+
return authError ? { error: authError } : (isCurrent() && state.cache.set(providerId, { expiresAt: Date.now() + PLAN_USAGE_CACHE_TTL_MS, value: [] }), {});
|
|
388
409
|
} finally {
|
|
389
|
-
inflight.delete(providerId);
|
|
410
|
+
isCurrent() && state.inflight.delete(providerId);
|
|
390
411
|
}
|
|
391
412
|
})();
|
|
392
|
-
return inflight.set(providerId, task), task;
|
|
413
|
+
return state.inflight.set(providerId, task), task;
|
|
393
414
|
}
|
|
394
415
|
async function getAllPlanUsageResults(currentProvider, runtime) {
|
|
395
416
|
let stored = new Set((await runtime.listCredentials()).map((credential) => credential.providerId)), providers = Object.keys(ADAPTERS).filter((providerId) => stored.has(providerId) || providerId === currentProvider), results = await Promise.all(providers.map((providerId) => getPlanUsageResult(providerId, runtime)));
|
|
@@ -398,41 +419,38 @@ async function getAllPlanUsageResults(currentProvider, runtime) {
|
|
|
398
419
|
errors: results.flatMap((result) => result.error ? [`${result.error}`] : [])
|
|
399
420
|
};
|
|
400
421
|
}
|
|
401
|
-
function peekPlanUsage(providerId) {
|
|
402
|
-
return cache.get(providerId)?.value[0];
|
|
422
|
+
function peekPlanUsage(providerId, runtime) {
|
|
423
|
+
return states.get(runtime)?.cache.get(providerId)?.value[0];
|
|
403
424
|
}
|
|
404
425
|
function clearPlanUsageCache() {
|
|
405
|
-
|
|
406
|
-
}
|
|
407
|
-
var USAGE_SERVICE_BRIDGE_SYMBOL = /* @__PURE__ */ Symbol.for("@lunr/usage-service"),
|
|
408
|
-
function preferredWindow() {
|
|
409
|
-
return (runtimeScope.getStore()?.settingsManager ?? activeUsageSettings)?.getPlanUsageWindow() ?? "weekly";
|
|
410
|
-
}
|
|
411
|
-
var usageBridge = {
|
|
412
|
-
peek(providerId) {
|
|
413
|
-
return peekPlanUsage(providerId);
|
|
414
|
-
},
|
|
415
|
-
prefetch(providerId) {
|
|
416
|
-
let runtime = runtimeScope.getStore()?.modelRuntime ?? activeRuntime;
|
|
417
|
-
!runtime || !hasPlanUsageAdapter(providerId) || getPlanUsage(providerId, runtime).then(() => onUsageUpdate?.());
|
|
418
|
-
},
|
|
419
|
-
setOnUpdate(fn) {
|
|
420
|
-
onUsageUpdate = fn;
|
|
421
|
-
},
|
|
422
|
-
getPreferredWindow() {
|
|
423
|
-
return preferredWindow();
|
|
424
|
-
},
|
|
425
|
-
pickForFooter(providerId) {
|
|
426
|
-
let window = pickPlanWindow(peekPlanUsage(providerId), preferredWindow());
|
|
427
|
-
if (window)
|
|
428
|
-
return { label: footerPlanLabel(window), usedPercent: window.usedPercent };
|
|
429
|
-
}
|
|
430
|
-
};
|
|
426
|
+
generation++, states = /* @__PURE__ */ new WeakMap();
|
|
427
|
+
}
|
|
428
|
+
var USAGE_SERVICE_BRIDGE_SYMBOL = /* @__PURE__ */ Symbol.for("@lunr/usage-service"), bridges = /* @__PURE__ */ new WeakMap();
|
|
431
429
|
function registerUsageServiceBridge(runtime, settingsManager) {
|
|
432
|
-
|
|
430
|
+
let onUpdate, bridge = {
|
|
431
|
+
peek: (providerId) => peekPlanUsage(providerId, runtime),
|
|
432
|
+
prefetch(providerId) {
|
|
433
|
+
hasPlanUsageAdapter(providerId) && getPlanUsage(providerId, runtime).then(() => onUpdate?.());
|
|
434
|
+
},
|
|
435
|
+
setOnUpdate(fn) {
|
|
436
|
+
onUpdate = fn;
|
|
437
|
+
},
|
|
438
|
+
getPreferredWindow: () => settingsManager.getPlanUsageWindow(),
|
|
439
|
+
pickForFooter(providerId) {
|
|
440
|
+
let window = pickPlanWindow(peekPlanUsage(providerId, runtime), settingsManager.getPlanUsageWindow());
|
|
441
|
+
return window ? { label: footerPlanLabel(window), usedPercent: window.usedPercent } : void 0;
|
|
442
|
+
}
|
|
443
|
+
};
|
|
444
|
+
bridges.set(runtime, bridge), globalThis[USAGE_SERVICE_BRIDGE_SYMBOL] = {
|
|
445
|
+
peek: (providerId) => getUsageServiceBridge()?.peek(providerId),
|
|
446
|
+
prefetch: (providerId) => getUsageServiceBridge()?.prefetch(providerId),
|
|
447
|
+
pickForFooter: (providerId) => getUsageServiceBridge()?.pickForFooter(providerId),
|
|
448
|
+
getPreferredWindow: () => getUsageServiceBridge()?.getPreferredWindow() ?? "weekly",
|
|
449
|
+
setOnUpdate: (fn) => getUsageServiceBridge()?.setOnUpdate(fn)
|
|
450
|
+
};
|
|
433
451
|
}
|
|
434
|
-
function getUsageServiceBridge() {
|
|
435
|
-
return
|
|
452
|
+
function getUsageServiceBridge(runtime = runtimeScope.getStore()?.modelRuntime) {
|
|
453
|
+
return runtime ? bridges.get(runtime) : void 0;
|
|
436
454
|
}
|
|
437
455
|
|
|
438
456
|
export {
|
|
@@ -2,10 +2,13 @@ import { createRequire as __lunrRequire } from "node:module"; const require = __
|
|
|
2
2
|
import {
|
|
3
3
|
browserEnabledDefault,
|
|
4
4
|
notifyBrowserEnabledChange
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-4KNKQGHM.js";
|
|
6
6
|
import {
|
|
7
7
|
require_proper_lockfile
|
|
8
8
|
} from "./chunk-URD2SLIT.js";
|
|
9
|
+
import {
|
|
10
|
+
computerSettingsChanged
|
|
11
|
+
} from "./chunk-FY4A63RK.js";
|
|
9
12
|
import {
|
|
10
13
|
MEMORY_CHAR_CAP_DEFAULT,
|
|
11
14
|
MEMORY_CHAR_CAP_MAX,
|
|
@@ -16,7 +19,7 @@ import {
|
|
|
16
19
|
getAgentDir,
|
|
17
20
|
normalizePath,
|
|
18
21
|
resolvePath
|
|
19
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-64XTQNLA.js";
|
|
20
23
|
import {
|
|
21
24
|
__commonJS,
|
|
22
25
|
__require,
|
|
@@ -18867,6 +18870,18 @@ var FileSettingsStorage = class {
|
|
|
18867
18870
|
let value = this.settings.memoryCharCap;
|
|
18868
18871
|
return typeof value == "number" && Number.isFinite(value) ? Math.min(MEMORY_CHAR_CAP_MAX, Math.max(MEMORY_CHAR_CAP_MIN, Math.floor(value))) : MEMORY_CHAR_CAP_DEFAULT;
|
|
18869
18872
|
}
|
|
18873
|
+
getComputerUse() {
|
|
18874
|
+
return this.globalSettings.computerUse ?? !0;
|
|
18875
|
+
}
|
|
18876
|
+
setComputerUse(enabled) {
|
|
18877
|
+
this.globalSettings.computerUse = enabled, this.markModified("computerUse"), this.save(), computerSettingsChanged({ enabled, foreground: this.getComputerForeground() });
|
|
18878
|
+
}
|
|
18879
|
+
getComputerForeground() {
|
|
18880
|
+
return this.globalSettings.computerForeground ?? !0;
|
|
18881
|
+
}
|
|
18882
|
+
setComputerForeground(enabled) {
|
|
18883
|
+
this.globalSettings.computerForeground = enabled, this.markModified("computerForeground"), this.save(), computerSettingsChanged({ enabled: this.getComputerUse(), foreground: enabled });
|
|
18884
|
+
}
|
|
18870
18885
|
getBrowserEnabled() {
|
|
18871
18886
|
return this.globalSettings.browserEnabled ?? browserEnabledDefault();
|
|
18872
18887
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
SessionManager
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-EPR2F3GU.js";
|
|
5
5
|
import {
|
|
6
6
|
SessionOwnership,
|
|
7
7
|
canonicalSessionPath,
|
|
8
8
|
isSessionOwnerDead,
|
|
9
9
|
readSessionOwner,
|
|
10
10
|
writeSessionJson
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-MNQXDFPV.js";
|
|
12
12
|
import {
|
|
13
13
|
getAgentDir
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-64XTQNLA.js";
|
|
15
15
|
|
|
16
16
|
// packages/coding-agent/dist/core/session-handoff.js
|
|
17
17
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
applyExifOrientation,
|
|
4
|
+
formatDimensionNote,
|
|
5
|
+
resizeImage
|
|
6
|
+
} from "./chunk-TCT6PCUR.js";
|
|
7
|
+
import {
|
|
8
|
+
loadPhoton
|
|
9
|
+
} from "./chunk-RQ2Q5IYR.js";
|
|
10
|
+
|
|
11
|
+
// packages/coding-agent/dist/utils/image-convert.js
|
|
12
|
+
async function convertImageBytesToPng(bytes) {
|
|
13
|
+
let photon = await loadPhoton();
|
|
14
|
+
if (!photon)
|
|
15
|
+
return null;
|
|
16
|
+
try {
|
|
17
|
+
let rawImage = photon.PhotonImage.new_from_byteslice(bytes), image = applyExifOrientation(photon, rawImage, bytes);
|
|
18
|
+
image !== rawImage && rawImage.free();
|
|
19
|
+
try {
|
|
20
|
+
return new Uint8Array(image.get_bytes());
|
|
21
|
+
} finally {
|
|
22
|
+
image.free();
|
|
23
|
+
}
|
|
24
|
+
} catch {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
async function convertToPng(base64Data, mimeType) {
|
|
29
|
+
if (mimeType === "image/png")
|
|
30
|
+
return { data: base64Data, mimeType };
|
|
31
|
+
let bytes = new Uint8Array(Buffer.from(base64Data, "base64")), pngBytes = await convertImageBytesToPng(bytes);
|
|
32
|
+
return pngBytes ? {
|
|
33
|
+
data: Buffer.from(pngBytes).toString("base64"),
|
|
34
|
+
mimeType: "image/png"
|
|
35
|
+
} : null;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// packages/coding-agent/dist/utils/image-process.js
|
|
39
|
+
function baseMimeType(mimeType) {
|
|
40
|
+
return mimeType.split(";")[0]?.trim().toLowerCase() ?? mimeType.toLowerCase();
|
|
41
|
+
}
|
|
42
|
+
function normalizeSupportedImageMimeType(mimeType) {
|
|
43
|
+
switch (baseMimeType(mimeType)) {
|
|
44
|
+
case "image/png":
|
|
45
|
+
return "image/png";
|
|
46
|
+
case "image/jpeg":
|
|
47
|
+
case "image/jpg":
|
|
48
|
+
return "image/jpeg";
|
|
49
|
+
case "image/gif":
|
|
50
|
+
return "image/gif";
|
|
51
|
+
case "image/webp":
|
|
52
|
+
return "image/webp";
|
|
53
|
+
default:
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
async function normalizeImage(bytes, mimeType) {
|
|
58
|
+
let normalizedMimeType = normalizeSupportedImageMimeType(mimeType);
|
|
59
|
+
if (normalizedMimeType)
|
|
60
|
+
return { bytes, mimeType: normalizedMimeType };
|
|
61
|
+
let pngBytes = await convertImageBytesToPng(bytes);
|
|
62
|
+
return pngBytes ? {
|
|
63
|
+
bytes: pngBytes,
|
|
64
|
+
mimeType: "image/png",
|
|
65
|
+
convertedFrom: baseMimeType(mimeType)
|
|
66
|
+
} : null;
|
|
67
|
+
}
|
|
68
|
+
function conversionHint(from, to) {
|
|
69
|
+
if (!(!from || from === to))
|
|
70
|
+
return `[Image converted from ${from} to ${to}.]`;
|
|
71
|
+
}
|
|
72
|
+
async function processImage(bytes, mimeType, options) {
|
|
73
|
+
let autoResizeImages = options?.autoResizeImages ?? !0, normalized = await normalizeImage(bytes, mimeType);
|
|
74
|
+
if (!normalized)
|
|
75
|
+
return {
|
|
76
|
+
ok: !1,
|
|
77
|
+
message: "[Image omitted: could not be converted to a supported inline image format.]"
|
|
78
|
+
};
|
|
79
|
+
if (autoResizeImages) {
|
|
80
|
+
let resized = await resizeImage(normalized.bytes, normalized.mimeType, options?.resizeOptions);
|
|
81
|
+
if (!resized)
|
|
82
|
+
return {
|
|
83
|
+
ok: !1,
|
|
84
|
+
message: "[Image omitted: could not be resized below the inline image size limit.]"
|
|
85
|
+
};
|
|
86
|
+
let hints2 = [], convertedHint2 = conversionHint(normalized.convertedFrom, resized.mimeType);
|
|
87
|
+
convertedHint2 && hints2.push(convertedHint2);
|
|
88
|
+
let dimensionNote = formatDimensionNote(resized);
|
|
89
|
+
return dimensionNote && hints2.push(dimensionNote), {
|
|
90
|
+
ok: !0,
|
|
91
|
+
data: resized.data,
|
|
92
|
+
mimeType: resized.mimeType,
|
|
93
|
+
hints: hints2
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
let hints = [], convertedHint = conversionHint(normalized.convertedFrom, normalized.mimeType);
|
|
97
|
+
return convertedHint && hints.push(convertedHint), {
|
|
98
|
+
ok: !0,
|
|
99
|
+
data: Buffer.from(normalized.bytes).toString("base64"),
|
|
100
|
+
mimeType: normalized.mimeType,
|
|
101
|
+
hints
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export {
|
|
106
|
+
convertToPng,
|
|
107
|
+
processImage
|
|
108
|
+
};
|
|
@@ -4,26 +4,26 @@ import {
|
|
|
4
4
|
} from "./chunk-YPHAIRZT.js";
|
|
5
5
|
import {
|
|
6
6
|
DefaultPackageManager
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-UYRKUKFE.js";
|
|
8
8
|
import {
|
|
9
9
|
SettingsManager
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HUD2RFJW.js";
|
|
11
11
|
import {
|
|
12
12
|
KeybindingsManager
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-FTKEZL27.js";
|
|
14
14
|
import {
|
|
15
15
|
ExtensionSelectorComponent
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-252ZVPPF.js";
|
|
17
17
|
import {
|
|
18
18
|
ExtensionInputComponent
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-GLDXBBL6.js";
|
|
20
20
|
import {
|
|
21
21
|
DynamicBorder
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-FLGEEH27.js";
|
|
23
23
|
import {
|
|
24
24
|
keyHint,
|
|
25
25
|
rawKeyHint
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-QW3AAHWN.js";
|
|
27
27
|
import {
|
|
28
28
|
detectTerminalBackgroundFromEnv,
|
|
29
29
|
detectTerminalThemeForAuto,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
setRegisteredThemes,
|
|
35
35
|
setTheme,
|
|
36
36
|
theme
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-JL4HYQXK.js";
|
|
38
38
|
import {
|
|
39
39
|
APP_NAME,
|
|
40
40
|
CONFIG_DIR_NAME,
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
PACKAGE_NAME,
|
|
43
43
|
getAgentDir,
|
|
44
44
|
getSettingsPath
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-64XTQNLA.js";
|
|
46
46
|
|
|
47
47
|
// packages/coding-agent/dist/cli/startup-ui.js
|
|
48
48
|
import { ProcessTerminal, setKeybindings, TUI } from "@ashx-j/lunr-tui";
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
2
|
|
|
3
3
|
// packages/coding-agent/dist/builtin-extensions/pi-web-access/activity.js
|
|
4
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
5
|
var ActivityMonitor = class {
|
|
5
6
|
entries = [];
|
|
6
7
|
maxEntries = 10;
|
|
7
8
|
listeners = /* @__PURE__ */ new Set();
|
|
8
|
-
rateLimitInfo = {
|
|
9
|
+
rateLimitInfo = {
|
|
10
|
+
used: 0,
|
|
11
|
+
max: 10,
|
|
12
|
+
oldestTimestamp: null,
|
|
13
|
+
windowMs: 6e4
|
|
14
|
+
};
|
|
9
15
|
nextId = 1;
|
|
10
16
|
logStart(partial) {
|
|
11
17
|
let id = `act-${this.nextId++}`, entry = {
|
|
@@ -37,7 +43,12 @@ var ActivityMonitor = class {
|
|
|
37
43
|
return this.listeners.add(callback), () => this.listeners.delete(callback);
|
|
38
44
|
}
|
|
39
45
|
clear() {
|
|
40
|
-
this.entries = [], this.rateLimitInfo = {
|
|
46
|
+
this.entries = [], this.rateLimitInfo = {
|
|
47
|
+
used: 0,
|
|
48
|
+
max: 10,
|
|
49
|
+
oldestTimestamp: null,
|
|
50
|
+
windowMs: 6e4
|
|
51
|
+
}, this.notify();
|
|
41
52
|
}
|
|
42
53
|
notify() {
|
|
43
54
|
for (let cb of this.listeners)
|
|
@@ -46,8 +57,19 @@ var ActivityMonitor = class {
|
|
|
46
57
|
} catch {
|
|
47
58
|
}
|
|
48
59
|
}
|
|
49
|
-
},
|
|
60
|
+
}, activityScope = new AsyncLocalStorage(), standaloneActivity = new ActivityMonitor();
|
|
61
|
+
function runWithActivity(monitor, fn) {
|
|
62
|
+
return activityScope.run(monitor, fn);
|
|
63
|
+
}
|
|
64
|
+
var activityMonitor = new Proxy(standaloneActivity, {
|
|
65
|
+
get(_target, key) {
|
|
66
|
+
let monitor = activityScope.getStore() ?? standaloneActivity, value = monitor[key];
|
|
67
|
+
return typeof value == "function" ? value.bind(monitor) : value;
|
|
68
|
+
}
|
|
69
|
+
});
|
|
50
70
|
|
|
51
71
|
export {
|
|
72
|
+
ActivityMonitor,
|
|
73
|
+
runWithActivity,
|
|
52
74
|
activityMonitor
|
|
53
75
|
};
|