aws-runtime-bridge 1.9.172 → 1.9.179
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 +314 -0
- package/README.md +61 -2
- package/dist/adapter/AcodeSdkAdapter.d.ts +374 -1
- package/dist/adapter/AcodeSdkAdapter.js +3 -3
- package/dist/adapter/AdapterRegistry.d.ts +28 -0
- package/dist/adapter/ClaudeSdkAdapter.d.ts +71 -0
- package/dist/adapter/CodexSdkAdapter.d.ts +14 -0
- package/dist/adapter/OpencodeSdkAdapter.d.ts +44 -0
- package/dist/adapter/acode-tool-names.d.ts +9 -0
- package/dist/adapter/idle-poll-loop.d.ts +20 -0
- package/dist/adapter/index.d.ts +3 -0
- package/dist/adapter/instance-ai-config-resolver.d.ts +20 -0
- package/dist/adapter/prompts.d.ts +12 -0
- package/dist/adapter/types.d.ts +184 -0
- package/dist/browser/browser-bootstrap.d.ts +15 -0
- package/dist/browser/browser-connect-token.d.ts +11 -0
- package/dist/browser/browser-frame-encode.d.ts +32 -0
- package/dist/browser/browser-pool.d.ts +129 -0
- package/dist/browser/browser-profile-store.d.ts +41 -0
- package/dist/browser/browser-ws-bridge.d.ts +20 -0
- package/dist/browser/built-in-browser-tools.d.ts +44 -0
- package/dist/browser/element-locator.d.ts +25 -0
- package/dist/browser/element-picker.d.ts +30 -0
- package/dist/browser/frame-encode.d.ts +19 -0
- package/dist/browser/input-dispatcher.d.ts +35 -0
- package/dist/browser/listener-store.d.ts +44 -0
- package/dist/browser/page-listener-manager.d.ts +88 -0
- package/dist/browser/page-listener-types.d.ts +38 -0
- package/dist/browser/screencast-differ.d.ts +10 -0
- package/dist/browser/screencast-manager.d.ts +94 -0
- package/dist/browser/snapshot-serializer.d.ts +56 -0
- package/dist/browser/ssrf-guard.d.ts +44 -0
- package/dist/browser/stealth.d.ts +21 -0
- package/dist/browser/step-archive.d.ts +13 -0
- package/dist/browser/types.d.ts +100 -0
- package/dist/browser/ws-server.d.ts +54 -0
- package/dist/config.d.ts +138 -2
- package/dist/config.js +2 -2
- package/dist/desktop/built-in-desktop-tools.d.ts +68 -0
- package/dist/desktop/built-in-desktop-tools.js +2 -1
- package/dist/desktop/desktop-control.d.ts +142 -0
- package/dist/desktop/desktop-control.js +2 -0
- package/dist/desktop/desktop-mcp-client.d.ts +28 -0
- package/dist/desktop/desktop-staleness.d.ts +66 -0
- package/dist/desktop/desktop-staleness.js +2 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1 -1
- package/dist/middleware/auth.d.ts +26 -0
- package/dist/middleware/auth.js +1 -1
- package/dist/remote-desktop/computer-control.d.ts +3 -0
- package/dist/remote-desktop/coords.d.ts +6 -0
- package/dist/remote-desktop/frame-backpressure.d.ts +10 -0
- package/dist/remote-desktop/frame-encode.d.ts +3 -0
- package/dist/remote-desktop/index.js +2 -2
- package/dist/remote-desktop/input-dispatcher.d.ts +4 -0
- package/dist/remote-desktop/permission-manager.d.ts +3 -0
- package/dist/remote-desktop/screen-capture.d.ts +91 -0
- package/dist/remote-desktop/session-manager.d.ts +47 -0
- package/dist/remote-desktop/session-manager.js +1 -1
- package/dist/remote-desktop/system-backend.d.ts +64 -0
- package/dist/remote-desktop/types.d.ts +25 -0
- package/dist/remote-desktop/ui-automation.d.ts +11 -0
- package/dist/remote-desktop/win32-api.d.ts +10 -0
- package/dist/routes/acode-todos.d.ts +13 -0
- package/dist/routes/agent-state.d.ts +15 -0
- package/dist/routes/ai-sources.js +1 -1
- package/dist/routes/background-tasks.d.ts +18 -0
- package/dist/routes/background-tasks.js +2 -2
- package/dist/routes/bridge-temp-files.d.ts +1 -0
- package/dist/routes/bridge-temp-files.js +2 -0
- package/dist/routes/browser-listeners.d.ts +17 -0
- package/dist/routes/browser-sessions.d.ts +10 -0
- package/dist/routes/capabilities.js +1 -1
- package/dist/routes/dashboard-icon.d.ts +9 -0
- package/dist/routes/dashboard-icon.js +2 -0
- package/dist/routes/dashboard-theme.d.ts +24 -0
- package/dist/routes/dashboard-theme.js +157 -0
- package/dist/routes/dashboard.d.ts +9 -0
- package/dist/routes/dashboard.js +2021 -628
- package/dist/routes/debug-mount.d.ts +16 -0
- package/dist/routes/desktop-control.d.ts +15 -0
- package/dist/routes/desktop-control.js +2 -0
- package/dist/routes/events.d.ts +4 -0
- package/dist/routes/file-browser.d.ts +15 -10
- package/dist/routes/file-browser.js +1 -1
- package/dist/routes/file-change-diff.d.ts +25 -0
- package/dist/routes/file-diff-rollback.d.ts +28 -0
- package/dist/routes/file-snapshot.d.ts +7 -0
- package/dist/routes/git.d.ts +185 -0
- package/dist/routes/git.js +34 -34
- package/dist/routes/instance-tool-status.d.ts +5 -0
- package/dist/routes/instance.d.ts +8 -0
- package/dist/routes/instance.js +1 -1
- package/dist/routes/jdks.d.ts +4 -0
- package/dist/routes/launch.d.ts +5 -0
- package/dist/routes/lsp-providers.d.ts +11 -0
- package/dist/routes/lsp-providers.js +2 -0
- package/dist/routes/lsp.d.ts +41 -0
- package/dist/routes/lsp.js +4 -2
- package/dist/routes/mcp-extra.d.ts +15 -0
- package/dist/routes/mcp.d.ts +16 -0
- package/dist/routes/mcp.js +1 -1
- package/dist/routes/plugins.d.ts +19 -0
- package/dist/routes/plugins.js +1 -1
- package/dist/routes/processes.d.ts +4 -0
- package/dist/routes/properties.d.ts +4 -0
- package/dist/routes/pty.d.ts +29 -0
- package/dist/routes/runtime-binding.d.ts +3 -0
- package/dist/routes/sessions.d.ts +22 -0
- package/dist/routes/sessions.js +1 -1
- package/dist/routes/skills.d.ts +15 -0
- package/dist/routes/skills.js +1 -1
- package/dist/routes/sub-agents.d.ts +11 -0
- package/dist/routes/sub-agents.js +1 -1
- package/dist/routes/task-context.d.ts +5 -0
- package/dist/routes/tech-stack.d.ts +6 -0
- package/dist/routes/tech-stack.js +2 -0
- package/dist/routes/terminal.d.ts +122 -0
- package/dist/routes/terminal.js +22 -22
- package/dist/routes/workspace-index.d.ts +12 -0
- package/dist/routes/workspace-index.js +2 -0
- package/dist/routes/yml.d.ts +4 -0
- package/dist/scripts/migrate-user-scopes.d.ts +26 -0
- package/dist/scripts/migrate-user-scopes.js +2 -0
- package/dist/services/access-control.d.ts +21 -0
- package/dist/services/acode-bg-manager.d.ts +21 -0
- package/dist/services/acode-package.d.ts +10 -0
- package/dist/services/acode-package.js +1 -1
- package/dist/services/agent-capability-sync.d.ts +26 -0
- package/dist/services/agent-capability-sync.js +1 -1
- package/dist/services/agent-event-store.d.ts +20 -0
- package/dist/services/agent-ownership.d.ts +58 -0
- package/dist/services/agent-ownership.js +3 -0
- package/dist/services/agent-process-manager.d.ts +154 -0
- package/dist/services/agent-pty-manager.d.ts +39 -0
- package/dist/services/agent-pty-manager.js +5 -4
- package/dist/services/agent-startup-memory.d.ts +34 -0
- package/dist/services/agent-startup-memory.js +4 -4
- package/dist/services/ai-config-service.d.ts +26 -52
- package/dist/services/ai-config-service.js +1 -3
- package/dist/services/ai-source-apply.d.ts +7 -15
- package/dist/services/ai-source-apply.js +1 -1
- package/dist/services/auto-register.d.ts +165 -1
- package/dist/services/auto-register.js +1 -1
- package/dist/services/aws-client-agent-mcp.d.ts +14 -0
- package/dist/services/aws-client-agent-mcp.js +2 -2
- package/dist/services/bridge-package-publish-hooks.d.ts +14 -0
- package/dist/services/bridge-pairing.d.ts +82 -0
- package/dist/services/bridge-pairing.js +2 -0
- package/dist/services/bridge-temp-files.d.ts +65 -0
- package/dist/services/bridge-temp-files.js +2 -0
- package/dist/services/browser-session-manager.d.ts +71 -0
- package/dist/services/capability-config.d.ts +60 -15
- package/dist/services/capability-config.js +2 -2
- package/dist/services/change-cache-retention.d.ts +9 -0
- package/dist/services/changelog.d.ts +9 -0
- package/dist/services/cli-commands.d.ts +82 -0
- package/dist/services/cli-commands.js +6 -6
- package/dist/services/connection-key-rotation.d.ts +27 -0
- package/dist/services/connection-key-rotation.js +2 -0
- package/dist/services/debug-mount.d.ts +49 -0
- package/dist/services/desktop-mcp-manager.d.ts +103 -1
- package/dist/services/desktop-mcp-manager.js +1 -1
- package/dist/services/event-delta-pusher.d.ts +15 -0
- package/dist/services/fileSnapshotStore.d.ts +42 -0
- package/dist/services/fileSnapshotStore.js +1 -1
- package/dist/services/gitignore.d.ts +21 -0
- package/dist/services/gitignore.js +2 -0
- package/dist/services/instance-ai-config-service.d.ts +9 -0
- package/dist/services/instance-ai-config-service.js +1 -1
- package/dist/services/instance-features.d.ts +127 -0
- package/dist/services/instance-features.js +1 -1
- package/dist/services/instance-init-service.d.ts +3 -0
- package/dist/services/instance-init-service.js +1 -1
- package/dist/services/instance-state.d.ts +23 -0
- package/dist/services/jdk-scanner.d.ts +15 -0
- package/dist/services/launch-manager.d.ts +138 -0
- package/dist/services/launch-metrics.d.ts +42 -0
- package/dist/services/launch-streams.d.ts +19 -0
- package/dist/services/lifecycle-state.d.ts +5 -0
- package/dist/services/log-retention.d.ts +38 -0
- package/dist/services/log-retention.js +1 -1
- package/dist/services/lsp/install-manager.d.ts +55 -0
- package/dist/services/lsp/install-manager.js +2 -0
- package/dist/services/lsp/provider-registry.d.ts +108 -0
- package/dist/services/lsp/provider-registry.js +2 -0
- package/dist/services/lsp/uri-rewrite.d.ts +44 -0
- package/dist/services/lsp/uri-rewrite.js +2 -0
- package/dist/services/lsp-stdio-bridge.d.ts +41 -4
- package/dist/services/lsp-stdio-bridge.js +3 -3
- package/dist/services/mcp-deploy.d.ts +45 -4
- package/dist/services/mcp-deploy.js +4 -4
- package/dist/services/mcp-env-injector.d.ts +52 -0
- package/dist/services/mcp-launch-binding-queue.d.ts +12 -0
- package/dist/services/mcp-package.d.ts +22 -0
- package/dist/services/mcp-package.js +1 -1
- package/dist/services/mcp-probe-client.d.ts +19 -0
- package/dist/services/mcp-probe-client.js +1 -1
- package/dist/services/open-doc-events.d.ts +43 -0
- package/dist/services/open-doc-events.js +2 -0
- package/dist/services/open-doc-registry.d.ts +59 -0
- package/dist/services/open-doc-registry.js +2 -0
- package/dist/services/orphan-monitor.d.ts +43 -0
- package/dist/services/panel-auth.d.ts +24 -0
- package/dist/services/panel-env.d.ts +28 -0
- package/dist/services/plugin-deployment.d.ts +34 -1
- package/dist/services/plugin-deployment.js +2 -2
- package/dist/services/plugin-event-buffer.d.ts +21 -0
- package/dist/services/plugin-fs.d.ts +11 -0
- package/dist/services/plugin-handler-adapter.d.ts +13 -0
- package/dist/services/plugin-listener-runner.d.ts +10 -0
- package/dist/services/plugin-loader.d.ts +15 -0
- package/dist/services/plugin-manager.d.ts +95 -9
- package/dist/services/plugin-manager.js +4 -4
- package/dist/services/plugin-manifest.d.ts +14 -0
- package/dist/services/plugin-package.d.ts +13 -0
- package/dist/services/plugin-runtime.d.ts +15 -0
- package/dist/services/port-detector.d.ts +15 -0
- package/dist/services/process-detail.d.ts +3 -0
- package/dist/services/process-detector.d.ts +132 -0
- package/dist/services/process-registry.d.ts +120 -0
- package/dist/services/process-top.d.ts +6 -0
- package/dist/services/request-identity.d.ts +77 -0
- package/dist/services/request-identity.js +2 -0
- package/dist/services/request-invalid-dump.d.ts +4 -0
- package/dist/services/request-invalid-dump.js +1 -1
- package/dist/services/ring-buffer.d.ts +33 -0
- package/dist/services/runtime-binding.d.ts +56 -4
- package/dist/services/runtime-binding.js +4 -4
- package/dist/services/runtime-lifecycle-policy.d.ts +17 -0
- package/dist/services/runtime-resources-snapshot.d.ts +26 -0
- package/dist/services/runtime-resources-snapshot.js +2 -2
- package/dist/services/sdk-tool-file-change-recorder.d.ts +9 -0
- package/dist/services/session-output.d.ts +63 -0
- package/dist/services/session-output.js +3 -3
- package/dist/services/skill-manager.d.ts +42 -5
- package/dist/services/skill-manager.js +3 -3
- package/dist/services/snapshot-retention.d.ts +30 -0
- package/dist/services/snapshot-retention.js +2 -0
- package/dist/services/startup-config-wizard.d.ts +7 -1
- package/dist/services/startup-config-wizard.js +10 -10
- package/dist/services/system-metrics.d.ts +3 -0
- package/dist/services/tech-stack-scanner.d.ts +43 -0
- package/dist/services/tech-stack-scanner.js +2 -0
- package/dist/services/terminal-persistence.d.ts +43 -0
- package/dist/services/tool-installer.d.ts +12 -0
- package/dist/services/tunnel-client.d.ts +99 -2
- package/dist/services/tunnel-client.js +1 -1
- package/dist/services/update-log.d.ts +6 -0
- package/dist/services/update-notifier.d.ts +17 -0
- package/dist/services/update-notifier.js +2 -2
- package/dist/services/user-scope.d.ts +115 -0
- package/dist/services/user-scope.js +2 -0
- package/dist/services/windows-service-manager.d.ts +12 -0
- package/dist/services/workspace-files.d.ts +64 -0
- package/dist/services/workspace-index/index-manager.d.ts +46 -0
- package/dist/services/workspace-index/index-manager.js +2 -0
- package/dist/services/workspace-index/indexer.d.ts +15 -0
- package/dist/services/workspace-index/indexer.js +2 -0
- package/dist/services/workspace-index/query.d.ts +74 -0
- package/dist/services/workspace-index/query.js +5 -0
- package/dist/services/workspace-index/resolver.d.ts +26 -0
- package/dist/services/workspace-index/resolver.js +2 -0
- package/dist/services/workspace-index/types.d.ts +89 -0
- package/dist/services/workspace-index/types.js +2 -0
- package/dist/services/workspace-watch.d.ts +4 -0
- package/dist/services/workspaceTaskChangeWatcher.d.ts +49 -0
- package/dist/services/workspaceTaskChangeWatcher.js +2 -2
- package/dist/types.d.ts +9 -0
- package/dist/utils/config-write-queue.d.ts +11 -0
- package/dist/utils/env-safety.d.ts +21 -0
- package/dist/utils/file-utils.d.ts +15 -0
- package/dist/utils/instance-ai-config-debug-logger.d.ts +15 -0
- package/dist/utils/lifecycle-log.d.ts +5 -0
- package/dist/utils/logger.d.ts +13 -0
- package/dist/utils/logger.js +2 -1
- package/dist/utils/npm-version.d.ts +10 -0
- package/dist/utils/path-utils.d.ts +12 -0
- package/dist/utils/scheduler-url.d.ts +18 -0
- package/dist/utils/scheduler-url.js +2 -0
- package/dist/utils/sdk-package-loader.d.ts +13 -0
- package/dist/utils/sdk-package-loader.js +1 -1
- package/dist/utils/target-identity.d.ts +31 -0
- package/dist/utils/target-identity.js +2 -0
- package/dist/utils/validation.d.ts +17 -0
- package/dist/utils/yaml-utils.d.ts +48 -0
- package/package/acode/dist/__tests__/summary-request-helper.d.ts +12 -0
- package/package/acode/dist/__tests__/summary-request-helper.js +2 -0
- package/package/acode/dist/ask-user-question-tool.d.ts +17 -0
- package/package/acode/dist/await-complete-tool.d.ts +12 -0
- package/package/acode/dist/background-command-manager.d.ts +105 -0
- package/package/acode/dist/background-command-store.d.ts +27 -0
- package/package/acode/dist/background-command-tools.d.ts +8 -0
- package/package/acode/dist/background-output-ringbuffer.d.ts +15 -0
- package/package/acode/dist/built-in-file-tools.d.ts +65 -0
- package/package/acode/dist/built-in-symbols-tool.d.ts +3 -0
- package/package/acode/dist/builtins/commandArtifacts.d.ts +3 -0
- package/package/acode/dist/builtins/shellCommandPreparation.d.ts +17 -0
- package/package/acode/dist/builtins/shellCommandRunner.d.ts +4 -0
- package/package/acode/dist/builtins/shellOutputDecoder.d.ts +15 -0
- package/package/acode/dist/cache-control.d.ts +71 -0
- package/package/acode/dist/cache-control.js +2 -0
- package/package/acode/dist/commands/commandLoader.d.ts +3 -0
- package/package/acode/dist/commands/commandParser.d.ts +3 -0
- package/package/acode/dist/commands/commandRegistry.d.ts +3 -0
- package/package/acode/dist/compaction.d.ts +388 -4
- package/package/acode/dist/compaction.js +19 -17
- package/package/acode/dist/config.d.ts +3 -0
- package/package/acode/dist/context-overflow.d.ts +32 -0
- package/package/acode/dist/fs-utils.d.ts +18 -0
- package/package/acode/dist/hooks/hookBus.d.ts +3 -0
- package/package/acode/dist/image-utils.d.ts +35 -0
- package/package/acode/dist/index.d.ts +1 -0
- package/package/acode/dist/index.js +1 -1
- package/package/acode/dist/mcpToolNames.d.ts +32 -0
- package/package/acode/dist/microcompact.d.ts +110 -0
- package/package/acode/dist/microcompact.js +2 -0
- package/package/acode/dist/parsers/ast-cache.d.ts +41 -0
- package/package/acode/dist/parsers/file-index.d.ts +83 -0
- package/package/acode/dist/parsers/file-index.js +4 -0
- package/package/acode/dist/parsers/language-detector.d.ts +4 -0
- package/package/acode/dist/parsers/tree-sitter-loader.d.ts +12 -0
- package/package/acode/dist/parsers/types.d.ts +11 -0
- package/package/acode/dist/paths.d.ts +14 -0
- package/package/acode/dist/plugin-types.d.ts +34 -0
- package/package/acode/dist/read-file-state.d.ts +15 -0
- package/package/acode/dist/runtime-environment.d.ts +16 -0
- package/package/acode/dist/runtime.d.ts +828 -9
- package/package/acode/dist/runtime.js +40 -33
- package/package/acode/dist/skill-tool.d.ts +20 -0
- package/package/acode/dist/sub-agent-manager.d.ts +169 -0
- package/package/acode/dist/sub-agent-manager.js +1 -1
- package/package/acode/dist/sub-agent-store.d.ts +50 -0
- package/package/acode/dist/sub-agent-tools.d.ts +15 -0
- package/package/acode/dist/sub-agent-types.d.ts +13 -0
- package/package/acode/dist/terminal-tool.d.ts +15 -0
- package/package/acode/dist/terminal-types.d.ts +10 -0
- package/package/acode/dist/todo-store.d.ts +15 -0
- package/package/acode/dist/token-estimator.d.ts +32 -0
- package/package/acode/dist/token-estimator.js +2 -0
- package/package/acode/dist/tool-allocation.d.ts +113 -0
- package/package/acode/dist/tool-concurrency/index.d.ts +8 -0
- package/package/acode/dist/tool-concurrency/observability.d.ts +32 -0
- package/package/acode/dist/tool-concurrency/resource-lock.d.ts +30 -0
- package/package/acode/dist/tool-concurrency/scheduler.d.ts +19 -0
- package/package/acode/dist/tool-concurrency/types.d.ts +57 -0
- package/package/acode/dist/tool-group-manager.d.ts +195 -0
- package/package/acode/dist/tool-group-manager.js +4 -4
- package/package/acode/dist/types.d.ts +192 -0
- package/package/aws-client-agent-mcp/README.md +130 -215
- package/package/aws-client-agent-mcp/dist/ability-market-tools.d.ts +57 -0
- package/package/aws-client-agent-mcp/dist/ability-market-tools.js +1 -1
- package/package/aws-client-agent-mcp/dist/agent-client.d.ts +290 -3
- package/package/aws-client-agent-mcp/dist/agent-client.js +1 -1
- package/package/aws-client-agent-mcp/dist/config.d.ts +18 -0
- package/package/aws-client-agent-mcp/dist/constants.d.ts +2 -0
- package/package/aws-client-agent-mcp/dist/context-manager.d.ts +70 -0
- package/package/aws-client-agent-mcp/dist/http-client.d.ts +61 -0
- package/package/aws-client-agent-mcp/dist/index.d.ts +10 -0
- package/package/aws-client-agent-mcp/dist/logger.d.ts +24 -0
- package/package/aws-client-agent-mcp/dist/mcp-server.d.ts +610 -0
- package/package/aws-client-agent-mcp/dist/mcp-server.js +25 -23
- package/package/aws-client-agent-mcp/dist/mcp-tools.d.ts +158 -0
- package/package/aws-client-agent-mcp/dist/mcp-tools.js +38 -22
- package/package/aws-client-agent-mcp/dist/memory-store.d.ts +102 -2
- package/package/aws-client-agent-mcp/dist/memory-store.js +27 -2
- package/package/aws-client-agent-mcp/dist/memory-tools.d.ts +18 -0
- package/package/aws-client-agent-mcp/dist/memory-tools.js +13 -9
- package/package/aws-client-agent-mcp/dist/message-buffer.d.ts +86 -0
- package/package/aws-client-agent-mcp/dist/messageContent.d.ts +24 -0
- package/package/aws-client-agent-mcp/dist/office/office-equation.d.ts +19 -0
- package/package/aws-client-agent-mcp/dist/office/office-image.d.ts +18 -0
- package/package/aws-client-agent-mcp/dist/office/office-workspace.d.ts +29 -0
- package/package/aws-client-agent-mcp/dist/parent-lifecycle.d.ts +18 -0
- package/package/aws-client-agent-mcp/dist/runtime-launch-binding.d.ts +6 -0
- package/package/aws-client-agent-mcp/dist/server-memory-store.d.ts +5 -1
- package/package/aws-client-agent-mcp/dist/server-memory-store.js +1 -1
- package/package/aws-client-agent-mcp/dist/status-reporter.d.ts +41 -0
- package/package/aws-client-agent-mcp/dist/tool-groups.d.ts +136 -0
- package/package/aws-client-agent-mcp/dist/types.d.ts +174 -0
- package/package/aws-client-agent-mcp/dist/watchdog.d.ts +7 -0
- package/package/aws-client-agent-mcp/dist/websocket-client.d.ts +108 -0
- package/package.json +1 -1
package/dist/utils/logger.js
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
const
|
|
1
|
+
const m=500,s=[];let u=!0;function f(t,e,r){u&&(s.push({level:t,timestamp:new Date().toISOString(),prefix:e,message:r}),s.length>500&&s.splice(0,s.length-500))}function g(t=200,e){let r=s;if(e){const o=["debug","info","warn","error"],h=o.indexOf(e);r=r.filter(p=>o.indexOf(p.level)>=h)}return r.slice(-t).reverse()}function d(t){u=t}function L(){s.length=0}const c={debug:0,info:1,warn:2,error:3};function a(){return new Date().toISOString()}function n(t){return t.map(e=>{if(e instanceof Error){const r=e.code,o=`${e.name||"Error"}${r?` [${r}]`:""}: ${e.message}`;return e.stack?`${o}
|
|
2
|
+
${e.stack}`:o}if(typeof e=="object"&&e!==null)try{return JSON.stringify(e,null,2)}catch{return String(e)}return String(e)}).join(" ")}class l{constructor(e={level:"info"}){this.level=e.level,this.prefix=e.prefix||"",this.timestamp=e.timestamp??!0}shouldLog(e){return c[e]>=c[this.level]}formatMessage(e,r){const o=[];return this.timestamp&&o.push(`[${a()}]`),o.push(`[${e.toUpperCase()}]`),this.prefix&&o.push(`[${this.prefix}]`),o.push(n(r)),o.join(" ")}debug(...e){if(this.shouldLog("debug")){const r=this.formatMessage("debug",e);console.debug(r),f("debug",this.prefix,n(e))}}info(...e){if(this.shouldLog("info")){const r=this.formatMessage("info",e);console.info(r),f("info",this.prefix,n(e))}}warn(...e){if(this.shouldLog("warn")){const r=this.formatMessage("warn",e);console.warn(r),f("warn",this.prefix,n(e))}}error(...e){if(this.shouldLog("error")){const r=this.formatMessage("error",e);console.error(r),f("error",this.prefix,n(e))}}child(e){return new l({level:this.level,prefix:this.prefix?`${this.prefix}:${e}`:e,timestamp:this.timestamp})}}const i=new l({level:process.env.LOG_LEVEL||"info"}),x={debug:(...t)=>i.debug(...t),info:(...t)=>i.info(...t),warn:(...t)=>i.warn(...t),error:(...t)=>i.error(...t),child:t=>i.child(t)};function E(t,e){return new l({level:e?.level||process.env.LOG_LEVEL||"info",prefix:t,timestamp:e?.timestamp})}export{l as Logger,L as clearLogBuffer,E as createLogger,g as getRecentLogs,x as logger,f as pushLog,d as setLogBufferEnabled};
|
|
2
3
|
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
2
6
|
export declare function compareVersions(a: string, b: string): number;
|
|
3
7
|
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
4
11
|
export declare function fetchLatestNpmVersion(): Promise<string>;
|
|
5
12
|
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
6
16
|
export declare function checkBridgeUpdate(): Promise<{
|
|
7
17
|
ok: boolean;
|
|
8
18
|
hasUpdate: boolean;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
3
9
|
export interface PropertiesPathResult {
|
|
4
10
|
normalizedWorkspace: string;
|
|
5
11
|
resolvedTarget: string;
|
|
@@ -8,4 +14,10 @@ export declare function resolveWorkspaceRoot(workspacePath: string | unknown): s
|
|
|
8
14
|
export declare function ensureInsideWorkspace(workspaceRoot: string, targetPath: string): string;
|
|
9
15
|
export declare function resolveWorkspaceFilePath(workspacePath: string | unknown, relativeOrAbsolutePath: string | unknown, defaultRelativePath: string): PropertiesPathResult;
|
|
10
16
|
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
11
23
|
export declare function resolvePropertiesTargetPath(workspacePath: string | unknown, relativeOrAbsolutePath: string | unknown): PropertiesPathResult;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function n(t){return t.replace(/^((?:https?|wss?):\/\/(?:\[[^\]]+\]|[^/:?#]+):\d+):\d+(?=\/|$)/i,"$1")}function c(t){const r=t.toLowerCase();return r==="localhost"||r==="::1"||r==="[::1]"?"127.0.0.1":r}function i(t){const r=String(t??"").trim();if(!r)return;const e=n(r);try{const o=new URL(e);return o.protocol==="ws:"?o.protocol="http:":o.protocol==="wss:"?o.protocol="https:":o.protocol=o.protocol.toLowerCase(),o.hostname=c(o.hostname),o.origin}catch{return e.replace(/\/+$/,"")}}export{i as normalizeSchedulerUrl};
|
|
2
|
+
|
|
@@ -1,5 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
1
8
|
export declare const BRIDGE_PACKAGE_ROOT: string;
|
|
2
9
|
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
3
13
|
export declare function resolveBridgePackageEntryPath(packageName: string, packageRoot?: string): Promise<string>;
|
|
4
14
|
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
5
18
|
export declare function importBridgeSdkPackage<TModule>(packageName: string): Promise<TModule>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{access as p,readFile as m}from"node:fs/promises";import
|
|
1
|
+
import{access as p,readFile as m}from"node:fs/promises";import o from"node:path";import{fileURLToPath as l,pathToFileURL as y}from"node:url";const d=(()=>{const r=String(process.env.AWS_BRIDGE_PACKAGE_ROOT||"").trim();return r?o.resolve(r):o.resolve(o.dirname(l(import.meta.url)),"..","..")})();function c(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function E(r,t){return o.join(t,"node_modules",...r.split("/"))}function e(r){if(typeof r=="string")return r;if(!c(r))return null;for(const t of["import","module","default","node"]){const n=e(r[t]);if(n)return n}return null}function g(r){return typeof r=="string"?r:c(r)?e(r["."])??e(r):null}function P(r){const t=g(r.exports);return t||(typeof r.module=="string"?r.module:typeof r.main=="string"?r.main:"index.js")}async function h(r,t=d){const n=E(r,t),a=o.join(n,"package.json"),s=await m(a,"utf8"),f=JSON.parse(s),u=P(f),i=o.resolve(n,u);return await p(i),i}async function A(r){try{const t=await h(r);return await import(y(t).href)}catch(t){if(t instanceof Error&&"code"in t&&t.code==="ENOENT")return await import(r);throw t}}export{d as BRIDGE_PACKAGE_ROOT,A as importBridgeSdkPackage,h as resolveBridgePackageEntryPath};
|
|
2
2
|
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
export declare const ANON_USER_KEY_FINGERPRINT = "anon";
|
|
21
|
+
|
|
22
|
+
export declare function normalizeTargetServerUrl(value: unknown): string;
|
|
23
|
+
|
|
24
|
+
export declare function fingerprintUserKey(userKey: unknown): string;
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
export declare function buildTargetKey(serverUrl: unknown, userKey: unknown): string;
|
|
30
|
+
|
|
31
|
+
export declare function serverUrlOfTargetKey(targetKey: unknown): string;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import n from"node:crypto";import{normalizeSchedulerUrl as i}from"./scheduler-url.js";const o="anon";function c(r){return i(r)||String(r||"").trim()}function a(r){const t=String(r||"").trim();return t?n.createHash("sha256").update(t,"utf8").digest("hex").slice(0,8):o}function f(r,t){return`${c(r)}#${a(t)}`}function p(r){const t=String(r||""),e=t.lastIndexOf("#");return e>0?t.slice(0,e):t}export{o as ANON_USER_KEY_FINGERPRINT,f as buildTargetKey,a as fingerprintUserKey,c as normalizeTargetServerUrl,p as serverUrlOfTargetKey};
|
|
2
|
+
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
3
9
|
export interface YmlLoadResult {
|
|
4
10
|
content: string | null;
|
|
5
11
|
resolvedPath: string;
|
|
@@ -7,18 +13,60 @@ export interface YmlLoadResult {
|
|
|
7
13
|
matchedAgentPath: string | null;
|
|
8
14
|
}
|
|
9
15
|
|
|
16
|
+
|
|
17
|
+
|
|
10
18
|
export interface AgentConfigResult {
|
|
11
19
|
content: string;
|
|
12
20
|
isTemplate: boolean;
|
|
13
21
|
projectFromSibling: string | null;
|
|
14
22
|
}
|
|
15
23
|
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
16
31
|
export declare function hasMatchingAgentPath(yamlContent: string, targetRelativePath: string): string | null;
|
|
17
32
|
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
18
39
|
export declare function extractAgentConfigOrTemplate(yamlContent: string, targetRelativePath: string): AgentConfigResult;
|
|
19
40
|
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
20
47
|
export declare function generateEmptyTemplate(_targetRelativePath: string): string;
|
|
21
48
|
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
22
56
|
export declare function autoFillPathInYml(ymlContent: string, workspaceRelativePath: string): string;
|
|
23
57
|
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
24
72
|
export declare function loadYmlWithUpwardSearch(workspacePath: string, relativePath: string): Promise<YmlLoadResult>;
|
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
import { type ACodeBuiltInTool } from "./built-in-file-tools.js";
|
|
2
2
|
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
3
7
|
export interface AcodeAskUserQuestionDeps {
|
|
4
8
|
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
5
12
|
onQuestion(toolCallId: string, questions: AcodeQuestionItem[]): void;
|
|
6
13
|
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
7
17
|
waitForAnswer(toolCallId: string, contextVersion: number): Promise<AcodeQuestionAnswerOutcome>;
|
|
8
18
|
}
|
|
9
19
|
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
10
24
|
export type AcodeQuestionAnswerOutcome = {
|
|
11
25
|
answers: Record<string, string>;
|
|
12
26
|
cancelled?: false;
|
|
@@ -36,6 +50,9 @@ export interface AcodeAskUserQuestionResult {
|
|
|
36
50
|
|
|
37
51
|
export declare const ASK_USER_QUESTION_TOOL_NAME = "ask_user_question";
|
|
38
52
|
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
39
56
|
export declare function createAskUserQuestionTool(deps: AcodeAskUserQuestionDeps, contextVersionProvider: () => number): ACodeBuiltInTool;
|
|
40
57
|
|
|
41
58
|
export declare function isAskUserQuestionResult(value: unknown): value is AcodeAskUserQuestionResult;
|
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
2
25
|
import { type BackgroundTaskStatus } from "./background-command-store.js";
|
|
3
26
|
export type { BackgroundTaskRecord, BackgroundTaskStatus } from "./background-command-store.js";
|
|
4
27
|
|
|
@@ -121,6 +144,9 @@ export interface ReadOutputArgs {
|
|
|
121
144
|
task_id: string;
|
|
122
145
|
mode?: "lines" | "grep" | "tail";
|
|
123
146
|
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
124
150
|
line_size?: number;
|
|
125
151
|
|
|
126
152
|
start_line?: number;
|
|
@@ -169,6 +195,12 @@ export declare class BackgroundCommandManager {
|
|
|
169
195
|
|
|
170
196
|
private globalCount;
|
|
171
197
|
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
172
204
|
startCommand(input: StartCommandInput): {
|
|
173
205
|
taskId: string;
|
|
174
206
|
completion: Promise<BackgroundCommandResult>;
|
|
@@ -177,9 +209,16 @@ export declare class BackgroundCommandManager {
|
|
|
177
209
|
|
|
178
210
|
disableInactivityTimeout(agentId: string, taskId: string): boolean;
|
|
179
211
|
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
180
216
|
markBackgrounded(agentId: string, taskId: string): Promise<boolean>;
|
|
181
217
|
private onOutput;
|
|
182
218
|
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
183
222
|
private scheduleInactivity;
|
|
184
223
|
private appendToFile;
|
|
185
224
|
private finalizeTask;
|
|
@@ -188,33 +227,95 @@ export declare class BackgroundCommandManager {
|
|
|
188
227
|
listTasks(agentId: string, statusFilter?: string): TaskSummary[];
|
|
189
228
|
private toSummary;
|
|
190
229
|
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
191
233
|
getTaskOutputSnapshot(agentId: string, taskId: string, tailLines?: number): TaskOutputSnapshot | null;
|
|
192
234
|
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
193
241
|
subscribeTaskOutput(agentId: string, taskId: string, subscriber: TaskOutputSubscriber): (() => void) | null;
|
|
194
242
|
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
195
250
|
readOutput(agentId: string, args: ReadOutputArgs): Promise<ReadOutputResult>;
|
|
196
251
|
|
|
197
252
|
private _emptyResult;
|
|
198
253
|
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
199
258
|
private readFromFile;
|
|
200
259
|
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
|
|
201
269
|
awaitCompletion(agentId: string, taskIds: string[], timeoutMs?: number): Promise<Array<AwaitBgCommandResult | null>>;
|
|
202
270
|
private awaitOne;
|
|
203
271
|
private taskToAwaitResult;
|
|
204
272
|
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
|
|
205
277
|
interruptAwaits(agentId: string, taskIds: Iterable<string>): void;
|
|
206
278
|
killTask(agentId: string, taskId: string): Promise<KillResult>;
|
|
207
279
|
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
|
|
208
284
|
private killProcessGroup;
|
|
209
285
|
|
|
210
286
|
disposeAgent(agentId: string): Promise<void>;
|
|
211
287
|
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
|
|
212
292
|
disposeAll(): Promise<void>;
|
|
213
293
|
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
|
|
214
304
|
reconcileDiskRunning(agentId: string): Promise<number>;
|
|
215
305
|
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
|
|
216
313
|
listTasksWithReconcile(agentId: string, statusFilter?: string): Promise<TaskSummary[]>;
|
|
217
314
|
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
|
|
218
319
|
reconcileAllAgents(): Promise<number>;
|
|
219
320
|
|
|
220
321
|
reconcileOrphans(agentId: string): Promise<void>;
|
|
@@ -227,6 +328,10 @@ export declare class BackgroundCommandManager {
|
|
|
227
328
|
private generateTaskId;
|
|
228
329
|
private persistTask;
|
|
229
330
|
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
|
|
230
335
|
private persistTaskSafe;
|
|
231
336
|
}
|
|
232
337
|
|
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
2
18
|
export type BackgroundTaskStatus = "running" | "completed" | "failed" | "killed";
|
|
3
19
|
|
|
4
20
|
export interface BackgroundTaskRecord {
|
|
@@ -22,10 +38,15 @@ export interface BackgroundTaskRecord {
|
|
|
22
38
|
|
|
23
39
|
killedReason?: string | null;
|
|
24
40
|
|
|
41
|
+
|
|
25
42
|
ownerBootId?: string;
|
|
26
43
|
|
|
27
44
|
lastPulseAt?: number;
|
|
28
45
|
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
29
50
|
backgrounded?: boolean;
|
|
30
51
|
}
|
|
31
52
|
export interface BackgroundSessionState {
|
|
@@ -43,6 +64,12 @@ export declare class BackgroundCommandStore {
|
|
|
43
64
|
|
|
44
65
|
persistSession(agentId: string, tasks: BackgroundTaskRecord[]): Promise<void>;
|
|
45
66
|
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
46
73
|
updateSession(agentId: string, mutator: (state: BackgroundSessionState) => BackgroundTaskRecord[] | null | undefined): Promise<BackgroundSessionState | null>;
|
|
47
74
|
|
|
48
75
|
markNotified(agentId: string, taskIds: string[]): Promise<void>;
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
2
10
|
import type { ACodeBuiltInTool, BackgroundToolDeps } from "./built-in-file-tools.js";
|
|
3
11
|
export declare function createListBackgroundCommandsTool(agentId: string, deps: BackgroundToolDeps): ACodeBuiltInTool;
|
|
4
12
|
export declare function createKillBackgroundCommandTool(agentId: string, deps: BackgroundToolDeps): ACodeBuiltInTool;
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
2
13
|
export declare class BackgroundOutputRingBuffer {
|
|
3
14
|
private lines;
|
|
4
15
|
private bytes;
|
|
@@ -15,6 +26,10 @@ export declare class BackgroundOutputRingBuffer {
|
|
|
15
26
|
|
|
16
27
|
tail(n: number): string[];
|
|
17
28
|
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
18
33
|
offset(globalStart: number, limit: number): string[];
|
|
19
34
|
|
|
20
35
|
firstLineIndex(): number;
|
|
@@ -21,14 +21,47 @@ export interface ACodeBuiltInTool {
|
|
|
21
21
|
description: string;
|
|
22
22
|
inputSchema: JsonObject;
|
|
23
23
|
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
24
28
|
category?: string;
|
|
25
29
|
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
26
34
|
group?: string;
|
|
27
35
|
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
28
47
|
concurrencyMode?: ToolConcurrencyMode;
|
|
29
48
|
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
30
58
|
resourceKeys?: (args: JsonObject) => ResourceClaim[];
|
|
31
59
|
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
32
65
|
resourceScope?: ResourceScope;
|
|
33
66
|
execute(args: JsonObject, context?: ACodeBuiltInToolExecutionContext): Promise<unknown>;
|
|
34
67
|
}
|
|
@@ -37,11 +70,21 @@ export interface ACodeBuiltInToolExecutionContext {
|
|
|
37
70
|
|
|
38
71
|
readonly toolCallId?: string;
|
|
39
72
|
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
40
77
|
readonly settleSignal?: Promise<void>;
|
|
41
78
|
}
|
|
42
79
|
|
|
43
80
|
export type ToolPermissionLevel = "allow" | "ask" | "deny";
|
|
44
81
|
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
45
88
|
export type ToolPermissionCapability = "fileReadOutside" | "commandExecution" | "fileModification" | "fileModificationOutside";
|
|
46
89
|
export type ToolPermissionPolicy = Record<ToolPermissionCapability, ToolPermissionLevel>;
|
|
47
90
|
|
|
@@ -58,6 +101,9 @@ export interface ToolPermissionRequestDetail {
|
|
|
58
101
|
operation?: "write" | "edit" | "delete";
|
|
59
102
|
}
|
|
60
103
|
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
61
107
|
export interface ToolPermissionController {
|
|
62
108
|
getLevel(capability: ToolPermissionCapability): ToolPermissionLevel;
|
|
63
109
|
|
|
@@ -78,14 +124,30 @@ export interface ResolvedWorkspaceTarget {
|
|
|
78
124
|
requestedPath: string;
|
|
79
125
|
targetPath: string;
|
|
80
126
|
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
81
132
|
outsideWorkspace?: boolean;
|
|
82
133
|
}
|
|
83
134
|
export declare function ensureInsideWorkspace(workspaceRoot: string, targetPath: string): string;
|
|
84
135
|
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
85
144
|
export declare function buildFileResourceKey(workingDirectory: string, rawFilePath: string): string;
|
|
86
145
|
|
|
87
146
|
export declare function fileResourceClaim(workingDirectory: string, rawFilePath: string, access: "read" | "write"): ResourceClaim;
|
|
88
147
|
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
89
151
|
export declare function resolveWorkspaceTarget(workingDirectory: string, rawFilePath: string): Promise<ResolvedWorkspaceTarget>;
|
|
90
152
|
|
|
91
153
|
export declare const EDIT_FAILURE_SNAPSHOT_MAX_BYTES: number;
|
|
@@ -99,5 +161,8 @@ export interface EditFailureSnapshot {
|
|
|
99
161
|
content: string;
|
|
100
162
|
}
|
|
101
163
|
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
102
167
|
export declare function getEditFailureSnapshot(error: unknown): EditFailureSnapshot | undefined;
|
|
103
168
|
export declare function createBuiltInFileTools(workingDirectory: string, agentId?: string, onFileChange?: OnAgentFileChange, backgroundDeps?: BackgroundToolDeps, permissionController?: ToolPermissionController, staleGuard?: StaleFileGuardDeps): ACodeBuiltInTool[];
|