aws-runtime-bridge 1.9.175 → 1.9.180
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 +223 -0
- package/README.md +61 -2
- package/dist/adapter/AcodeSdkAdapter.d.ts +382 -0
- 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 +201 -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/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 +1988 -625
- 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 +11 -0
- 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 +143 -0
- 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/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 +4 -0
- package/dist/routes/terminal.d.ts +131 -0
- package/dist/routes/terminal.js +25 -25
- 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 +37 -0
- package/dist/services/agent-startup-memory.d.ts +34 -0
- package/dist/services/agent-startup-memory.js +1 -1
- 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 +29 -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 +33 -0
- package/dist/services/gitignore.d.ts +9 -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/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 +22 -0
- package/dist/services/open-doc-registry.d.ts +35 -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/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/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 +23 -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 +12 -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 +57 -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 +1 -1
- 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 +10 -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 +45 -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 +354 -0
- 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 +53 -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 +824 -9
- package/package/acode/dist/runtime.js +22 -22
- 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 +17 -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 +194 -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/agent-client.d.ts +277 -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 +606 -1
- package/package/aws-client-agent-mcp/dist/mcp-server.js +4 -4
- 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 +81 -0
- package/package/aws-client-agent-mcp/dist/memory-tools.d.ts +18 -0
- 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 +4 -0
- 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 +123 -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
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { ToolPermissionPolicy } from "@agentswork/acode";
|
|
2
2
|
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
3
6
|
export type FeatureState = "disabled" | "collapsed" | "expanded";
|
|
4
7
|
|
|
5
8
|
export declare function normalizeFeatureState(raw: unknown): FeatureState | undefined;
|
|
@@ -8,52 +11,164 @@ export declare const DESKTOP_FEATURE_KEY = "desktop";
|
|
|
8
11
|
|
|
9
12
|
export declare const BROWSER_FEATURE_KEY = "browser";
|
|
10
13
|
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
11
19
|
export declare const LAUNCH_ITEM_FEATURE_KEY = "agentSys.launchItem";
|
|
12
20
|
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
13
27
|
export declare const HIRE_FEATURE_KEY = "agentSys.hire";
|
|
14
28
|
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
15
39
|
export declare const SKILL_INSTALL_FEATURE_KEY = "agentSys.skillInstall";
|
|
16
40
|
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
17
52
|
export declare const ABILITY_DEV_FEATURE_KEY = "agentSys.abilityDev";
|
|
18
53
|
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
19
60
|
export declare const PENCIL_FEATURE_KEY = "pencil";
|
|
20
61
|
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
21
68
|
export declare const DRAW_FEATURE_KEY = "draw";
|
|
22
69
|
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
23
77
|
export declare const OFFICE_FEATURE_KEY = "office";
|
|
24
78
|
|
|
25
79
|
export declare const COLLABORATION_FEATURE_KEY = "collaboration";
|
|
26
80
|
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
27
84
|
export declare const COLLABORATION_TASK_FEATURE_KEY = "collaboration.task";
|
|
28
85
|
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
29
89
|
export declare const COLLABORATION_MEETING_FEATURE_KEY = "collaboration.meeting";
|
|
30
90
|
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
31
94
|
export declare const COLLABORATION_DEBUG_FEATURE_KEY = "collaboration.debug";
|
|
32
95
|
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
33
99
|
export declare const COLLABORATION_FILE_HISTORY_FEATURE_KEY = "collaboration.fileHistory";
|
|
34
100
|
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
35
108
|
export declare const EMAIL_FEATURE_KEY = "email";
|
|
36
109
|
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
37
118
|
export declare const GROUP_KEY_TO_FEATURE: ReadonlyMap<string, string>;
|
|
38
119
|
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
39
124
|
export declare function resolveGroupFeatureKey(key: string): string;
|
|
40
125
|
|
|
41
126
|
export declare function setAgentFeatures(agentId: string, features: unknown): void;
|
|
42
127
|
|
|
43
128
|
export declare function getAgentFeatures(agentId: string): Record<string, FeatureState>;
|
|
44
129
|
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
45
134
|
export declare function setAgentInheritedFeatures(agentId: string, features: unknown): void;
|
|
46
135
|
|
|
47
136
|
export declare function getAgentInheritedFeatures(agentId: string): Record<string, FeatureState>;
|
|
48
137
|
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
49
152
|
export declare function getFeatureState(agentId: string, key: string): FeatureState;
|
|
50
153
|
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
51
158
|
export declare function isFeatureEnabled(agentId: string, key: string): boolean;
|
|
52
159
|
|
|
53
160
|
export declare function clearAgentFeatures(agentId: string): void;
|
|
54
161
|
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
55
165
|
export declare function getAgentToolPermissions(agentId: string): ToolPermissionPolicy | null;
|
|
56
166
|
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
57
172
|
export declare function resolveAgentToolPermissions(agentId: string): ToolPermissionPolicy;
|
|
58
173
|
|
|
59
174
|
export interface AgentCapabilities {
|
|
@@ -79,6 +194,18 @@ export declare function getAgentCapabilitiesInherited(agentId: string): AgentCap
|
|
|
79
194
|
|
|
80
195
|
export declare function getAgentPluginSources(agentId: string): Record<string, AgentPluginSource> | null;
|
|
81
196
|
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
|
82
209
|
export declare function isCapabilityEnabled(agentId: string, type: CapabilityType, name: string): boolean;
|
|
83
210
|
|
|
84
211
|
export declare function instanceFeaturesCacheSize(): number;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{getEffective as
|
|
1
|
+
import{getAgentOwner as P}from"./agent-ownership.js";import{getEffective as N,hasAnyDefault as D}from"./capability-config.js";const j=new Set(["disabled","collapsed","expanded"]);function v(e){if(e===!0)return"expanded";if(e===!1)return"disabled";if(typeof e=="string"&&j.has(e))return e}const b={},se="desktop",I="browser",S="agentSys.launchItem",x="agentSys.hire",O="agentSys.skillInstall",R="agentSys.abilityDev",z="pencil",G="draw",H="office",k="collaboration",h="collaboration.task",m="collaboration.meeting",L="collaboration.debug",U="collaboration.fileHistory",J="email",V=new Set,W=new Set([I,z,G,H,S,x,O,R,h,m,L,U,J]),X=[["agentSys","agentSys."],[k,"collaboration."]],q=new Map([["task",h],["meeting",m],["debug",L],["fileHistory",U],["launch",S],["hire",x],["abilityMarket",O],["abilityDev",R]]);function le(e){return q.get(e)??e}function w(e){for(const[t,n]of X)if(e.startsWith(n))return t}const Q=new Set,y=new Map,_=new Map,a=new Map,Z=["fileReadOutside","commandExecution","fileModification","fileModificationOutside"],$=new Set(["allow","ask","deny"]);function ee(e){if(typeof e!="object"||e===null||Array.isArray(e))return null;const t=e,n={};let o=!1;for(const r of Z){const i=t[r];typeof i=="string"&&$.has(i)?(n[r]=i,o=!0):n[r]="allow"}return o?n:null}function K(e){if(e==null)return{...b};let t=e;if(typeof e=="string")try{t=JSON.parse(e)}catch{t=null}if(typeof t!="object"||t===null||Array.isArray(t))return{...b};const n={};for(const[o,r]of Object.entries(t)){if(Q.has(o))continue;const i=v(r);i!==void 0&&(n[o]=i)}return n}function ue(e,t){if(!e)return;y.set(e,K(t));let n=t;if(typeof t=="string")try{n=JSON.parse(t)}catch{n=null}if(typeof n=="object"&&n!==null&&!Array.isArray(n)){const o=ee(n.toolPermissions);o?a.set(e,o):a.delete(e)}else a.delete(e)}function te(e){return y.get(e)??{...b}}function ce(e,t){if(!e)return;if(t==null){_.delete(e);return}const n=K(t);if(Object.keys(n).length===0){_.delete(e);return}_.set(e,n)}function ne(e){return _.get(e)??{}}function oe(e,t){const n=te(e),o=ne(e),r=w(t);if(r&&(n[r]??o[r])==="disabled")return"disabled";const i=n[t]??o[t];return i!==void 0?i:V.has(t)?"expanded":W.has(t)?"collapsed":"disabled"}function fe(e,t){return oe(e,t)!=="disabled"}function ae(e){y.delete(e),a.delete(e),f.delete(e),T.delete(e)}function pe(e){return a.get(e)??null}function Ee(e){return a.get(e)??{fileReadOutside:"allow",commandExecution:"allow",fileModification:"allow",fileModificationOutside:"allow"}}const M=["skills","mcp","plugins"],f=new Map,T=new Map;function Y(e){if(typeof e!="object"||e===null||Array.isArray(e))return;const t={};for(const[n,o]of Object.entries(e))n.trim()&&typeof o=="boolean"&&(t[n.trim()]=o);return t}function Ae(e,t){if(!e)return;if(t==null){f.delete(e);return}let n=t;if(typeof t=="string")try{n=JSON.parse(t)}catch{n=null}if(typeof n!="object"||n===null||Array.isArray(n)){f.delete(e);return}const o=n,r={};let i=!1;for(const A of M){const l=Y(o[A]);l&&(r[A]=l,i=!0)}i?f.set(e,r):f.delete(e);const s=o.plugins,u={};let E=!1;if(typeof s=="object"&&s!==null&&!Array.isArray(s))for(const[A,l]of Object.entries(s)){const d=A.trim();if(d){if(typeof l=="boolean"){const c=r.plugins??{};c[d]=l,r.plugins=c,i=!0;continue}if(l!==null&&typeof l=="object"&&!Array.isArray(l)){const c=l,B=c.enabled!==!1,g=typeof c.url=="string"?c.url:void 0,C=typeof c.sha256=="string"?c.sha256:void 0,F=r.plugins??{};F[d]=B,r.plugins=F,i=!0,g&&(u[d]={url:g,sha256:C},E=!0)}}}E?T.set(e,u):T.delete(e)}function de(e){return f.get(e)??null}const p=new Map;function ye(e,t){if(!e)return;if(t==null){p.delete(e);return}let n=t;if(typeof t=="string")try{n=JSON.parse(t)}catch{n=null}if(typeof n!="object"||n===null||Array.isArray(n)){p.delete(e);return}const o=n,r={};let i=!1;for(const s of M){const u=Y(o[s]);u&&(r[s]=u,i=!0)}i?p.set(e,r):p.delete(e)}function _e(e){return p.get(e)??null}function Te(e){return T.get(e)??null}function be(e,t,n){const o=P(e);if(D(o,t))return N(o,e,t,n);const i=p.get(e)?.[t]?.[n];if(i!==void 0)return i;const s=f.get(e);if(!s)return!0;const u=s[t];if(!u)return!0;const E=u[n];return E===void 0?!0:E}function ge(){return y.size}export{R as ABILITY_DEV_FEATURE_KEY,I as BROWSER_FEATURE_KEY,M as CAPABILITY_TYPES,L as COLLABORATION_DEBUG_FEATURE_KEY,k as COLLABORATION_FEATURE_KEY,U as COLLABORATION_FILE_HISTORY_FEATURE_KEY,m as COLLABORATION_MEETING_FEATURE_KEY,h as COLLABORATION_TASK_FEATURE_KEY,se as DESKTOP_FEATURE_KEY,G as DRAW_FEATURE_KEY,J as EMAIL_FEATURE_KEY,q as GROUP_KEY_TO_FEATURE,x as HIRE_FEATURE_KEY,S as LAUNCH_ITEM_FEATURE_KEY,H as OFFICE_FEATURE_KEY,z as PENCIL_FEATURE_KEY,O as SKILL_INSTALL_FEATURE_KEY,ae as clearAgentFeatures,de as getAgentCapabilities,_e as getAgentCapabilitiesInherited,te as getAgentFeatures,ne as getAgentInheritedFeatures,Te as getAgentPluginSources,pe as getAgentToolPermissions,oe as getFeatureState,ge as instanceFeaturesCacheSize,be as isCapabilityEnabled,fe as isFeatureEnabled,v as normalizeFeatureState,Ee as resolveAgentToolPermissions,le as resolveGroupFeatureKey,Ae as setAgentCapabilities,ye as setAgentCapabilitiesInherited,ue as setAgentFeatures,ce as setAgentInheritedFeatures};
|
|
2
2
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { InitLogEntry, LegacyMcpStateItem, LegacySkillStateItem, McpPayload, PluginPackage, SkillPackage } from '../types.js';
|
|
2
|
+
import type { UserScope } from './user-scope.js';
|
|
2
3
|
export declare function initInstance(agentId: string, workspacePath: string, options: {
|
|
3
4
|
skillEnabled?: boolean;
|
|
4
5
|
mcpEnabled?: boolean;
|
|
@@ -7,6 +8,8 @@ export declare function initInstance(agentId: string, workspacePath: string, opt
|
|
|
7
8
|
skillPackages?: SkillPackage[];
|
|
8
9
|
pluginPackages?: PluginPackage[];
|
|
9
10
|
mcpServers?: McpPayload[];
|
|
11
|
+
|
|
12
|
+
scope?: UserScope;
|
|
10
13
|
}): Promise<{
|
|
11
14
|
ok: boolean;
|
|
12
15
|
agentId: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{promises as
|
|
1
|
+
import{promises as y}from"node:fs";import M from"node:path";import{downloadPluginZip as $,downloadSkillZip as O,ensureDir as v}from"../utils/file-utils.js";import{createLogger as z}from"../utils/logger.js";import{normalizeMcpPayload as B}from"../utils/mcp-utils.js";import{ensureEnabledTools as j,parseBoolean as T}from"../utils/validation.js";import{buildBuiltinAwsMcpDeploySpec as _,BUILTIN_AWS_MCP_SERVER_NAME as E}from"./aws-client-agent-mcp.js";import{setDefault as F}from"./capability-config.js";import{getAgentInitRoot as R,loadInstanceState as U,saveInstanceState as L}from"./instance-state.js";import{McpDeployManager as W,reconcileMcpDefaultsFromDeployed as Z}from"./mcp-deploy.js";import{isBuiltinMcpName as q}from"./mcp-env-injector.js";import{reconcilePluginsDefaultsFromDeployed as x,pluginManager as V}from"./plugin-manager.js";import{reconcileSkillsDefaultsFromDeployed as G,SkillManager as H}from"./skill-manager.js";import{detectToolStatuses as J}from"./tool-installer.js";const K=z("instance-init");function Q(p,c){const n=new Set(Object.values(c).filter(t=>t.installed).map(t=>t.tool));return p.filter(t=>n.has(t))}async function X(p,c,n){try{const t=await O(c,n);if(!t)return null;const m=await y.readFile(t.outputPath),b=c.defaultEnabled!==!1,i=String(c.skillName||"").trim()||void 0,r=await H.forScope(p).saveSharedSkill(m,t.fileName,b,c.sha256,i);return!r.ok||!r.skillName?null:{id:r.skillName,name:r.skillName,fileName:t.fileName,filePath:"",bytes:t.bytes,installedAt:new Date().toISOString()}}catch(t){return K.warn("\u6280\u80FD\u5305\u90E8\u7F72\u5230 bridge \u5931\u8D25\uFF08\u6309\u8DF3\u8FC7\u5904\u7406\uFF09: %s. %s",c.skillName||c.fileName||"(\u672A\u547D\u540D)",t instanceof Error?t.message:String(t)),null}}async function me(p,c,n){const t=M.resolve(c),m=R(p),b=[],i=n.scope??null,r=i?W.forScope(i):null;function l(s,d,e,a){b.push({step:s,status:d,message:e,timestamp:new Date().toISOString(),details:a})}l("prepare","running","\u5F00\u59CB\u521D\u59CB\u5316\u5B9E\u4F8B",{agentId:String(p),workspacePath:t}),await v(m),l("prepare","success","\u521D\u59CB\u5316\u76EE\u5F55\u5DF2\u5C31\u7EEA",{initRoot:m});const f=j(n.ccSwitchEnabledTools);l("detect-tools","running","\u5F00\u59CB\u68C0\u6D4B\u5DE5\u5177\u5B89\u88C5\u72B6\u6001",{tools:f});const g=await J(f);l("detect-tools","success","\u5DE5\u5177\u5B89\u88C5\u72B6\u6001\u68C0\u6D4B\u5B8C\u6210",{installedTools:Object.values(g).filter(s=>s.installed).map(s=>s.tool),missingTools:Object.values(g).filter(s=>!s.installed).map(s=>s.tool)});const I=Q(f,g),w=Object.values(g).filter(s=>!s.installed),o={ok:!0,agentId:String(p),workspacePath:t,initRoot:m,enabledTools:f,toolStatus:g,logs:b,skill:{enabled:T(n.skillEnabled,!0),packagePresent:!1},mcp:{enabled:T(n.mcpEnabled,!0),configPath:null}},k=await U(p);if(w.length>0&&l("skip-uninstalled-tools","skipped","\u5DF2\u8DF3\u8FC7\u672A\u5B89\u88C5\u5DE5\u5177",{skippedTools:w.map(s=>({tool:s.tool,error:s.error}))}),l("select-installed-tools","success","\u5DF2\u9009\u62E9\u53EF\u521D\u59CB\u5316\u5DE5\u5177",{enabledTools:f,installedTools:I}),l("load-sdk","running","\u5F00\u59CB\u90E8\u7F72\u6280\u80FD/MCP \u6A21\u677F\u5230\u672C bridge"),l("load-sdk","success","\u6280\u80FD/MCP \u6A21\u677F\u90E8\u7F72\u51C6\u5907\u5B8C\u6210",{tools:f}),o.skill.enabled){l("install-skills","running","\u5F00\u59CB\u90E8\u7F72\u6280\u80FD\u5305",{count:Array.isArray(n.skillPackages)?n.skillPackages.length:n.skillPackage?1:0});const s=await v(M.join(m,"skills")),d=Array.isArray(n.skillPackages)&&n.skillPackages.length>0?n.skillPackages:n.skillPackage?[n.skillPackage]:[],e=[];for(const a of d){const h=await X(i??{tenantId:"_legacy",userId:"_legacy"},a,s);h&&e.push(h)}e.length>0?(o.skill.packagePresent=!0,o.skill.installedCount=e.length,o.skill.installed=e,l("install-skills","success","\u6280\u80FD\u5305\u90E8\u7F72\u5B8C\u6210",{installedCount:e.length,skills:e.map(a=>a.name)})):l("install-skills","skipped","\u6CA1\u6709\u53EF\u90E8\u7F72\u7684\u6280\u80FD\u5305")}else l("install-skills","skipped","\u5DF2\u8DF3\u8FC7\u6280\u80FD\u5305\u90E8\u7F72\uFF08skillEnabled=false\uFF09");const P=Array.isArray(n.pluginPackages)?n.pluginPackages:[];if(P.length>0){l("install-plugins","running","\u5F00\u59CB\u90E8\u7F72\u63D2\u4EF6\u6A21\u677F\u5305",{count:P.length});const s=await v(M.join(m,"plugins-tmp"));let d=0;for(const e of P)if(!(!e||!String(e.downloadUrl||"").trim()))try{const a=await $(e,s);if(!a)continue;const h=await y.readFile(a.outputPath),D=e.defaultEnabled!==!1,u=await V.saveSharedPlugin(h,a.fileName,D,e.sha256,i??void 0);u.ok?(d++,l("install-plugins","success",`\u63D2\u4EF6 ${u.pluginName||a.fileName} \u5DF2\u90E8\u7F72\u5230\u672C bridge`)):l("install-plugins","error",`\u63D2\u4EF6 ${a.fileName} \u90E8\u7F72\u5931\u8D25: ${u.error||"\u672A\u77E5\u9519\u8BEF"}`)}catch(a){l("install-plugins","error",`\u63D2\u4EF6 ${e.fileName||"(\u672A\u547D\u540D)"} \u90E8\u7F72\u5931\u8D25: ${a instanceof Error?a.message:String(a)}`)}o.plugin={enabled:!0,packagePresent:P.length>0,installedCount:d},d>0?l("install-plugins","success","\u63D2\u4EF6\u6A21\u677F\u5305\u90E8\u7F72\u5B8C\u6210",{installedCount:d}):l("install-plugins","skipped","\u6CA1\u6709\u53EF\u90E8\u7F72\u7684\u63D2\u4EF6\u5305"),await y.rm(s,{recursive:!0,force:!0}).catch(()=>{})}const S=[];if(o.mcp.enabled){l("install-mcp","running","\u5F00\u59CB\u90E8\u7F72 MCP \u6A21\u677F",{count:(Array.isArray(n.mcpServers)?n.mcpServers.length:0)+1});let s;try{const e=_();if(!r)throw new Error("initInstance: \u7F3A\u5C11\u7528\u6237\u4F5C\u7528\u57DF\uFF0C\u65E0\u6CD5\u90E8\u7F72 MCP");s=r.saveMcp(E,e,!0),s.ok&&(i&&F(i,"mcp",E,!0),S.push({id:"",name:E,transport:"stdio",command:e.command||"",url:e.url||"",args:e.args||[],env:e.env||{},enabled:!0,installedAt:new Date().toISOString()}))}catch(e){s={ok:!1,error:e instanceof Error?e.message:String(e)}}s.ok||l("install-mcp","error",`\u5185\u7F6E\u901A\u8BAF MCP \u90E8\u7F72\u5931\u8D25: ${s.error||"\u672A\u77E5\u9519\u8BEF"}`);const d=(Array.isArray(n.mcpServers)?n.mcpServers:[]).map(e=>B(e)).filter(e=>e!==null);for(const e of d){if(q(e.name))continue;const a=String(e.packageUrl||"").trim();if(a)try{if(!r)throw new Error("\u7F3A\u5C11\u7528\u6237\u4F5C\u7528\u57DF");const u=await r.ensureMcpPackage(e.name,{packageUrl:a,packageSha256:e.packageSha256,fileName:`${e.name}.zip`});u.ok||l("install-mcp","error",`MCP \u5305 ${e.name} \u90E8\u7F72\u5931\u8D25: ${u.error||"\u672A\u77E5\u9519\u8BEF"}`)}catch(u){l("install-mcp","error",`MCP \u5305 ${e.name} \u90E8\u7F72\u5931\u8D25: ${u instanceof Error?u.message:String(u)}`)}const h={type:e.transport||"stdio",command:e.command||void 0,url:e.url||void 0,args:e.args||void 0,env:e.env||void 0,headers:e.headers||void 0,collapsed:e.collapsed===!0,description:e.description||void 0};if(!r)continue;r.saveMcp(e.name,h,e.enabled!==!1,e.packageSha256).ok&&S.push({id:e.id||"",name:e.name,transport:e.transport||"stdio",command:e.command||"",url:e.url||"",args:e.args||[],env:e.env||{},enabled:e.enabled!==!1,installedAt:new Date().toISOString()})}o.mcp.installedCount=S.length,l("install-mcp","success","MCP \u6A21\u677F\u90E8\u7F72\u5B8C\u6210",{installedCount:S.length,mcpServers:S.map(e=>e.name)})}else l("install-mcp","skipped","\u5DF2\u8DF3\u8FC7 MCP \u6A21\u677F\uFF08mcpEnabled=false\uFF09");l("persist-state","running","\u5F00\u59CB\u4FDD\u5B58\u5B9E\u4F8B\u72B6\u6001"),k.initialized=!0,k.enabledTools=f,k.toolStatus=g,k.skillEnabled=o.skill.enabled,k.mcpEnabled=o.mcp.enabled,await L(p,k),l("persist-state","success","\u5B9E\u4F8B\u72B6\u6001\u4FDD\u5B58\u5B8C\u6210");const C=i?G(i):0,N=i?Z(i):0,A=i?x(i):0;return(C||N||A)&&l("sync-state","success","\u80FD\u529B\u9ED8\u8BA4\u5F00\u5173\u5DF2\u5BF9\u8D26\uFF08\u65B0\u589E\u9879\u9ED8\u8BA4\u5173\u95ED\uFF09",{reconciledSkills:C,reconciledMcp:N,reconciledPlugins:A}),l("sync-state","success","\u6280\u80FD/MCP \u6A21\u677F\u90E8\u7F72\u72B6\u6001\u5DF2\u5C31\u7EEA"),l("complete","success",w.length>0?"\u5B9E\u4F8B\u521D\u59CB\u5316\u5B8C\u6210\uFF0C\u672A\u5B89\u88C5\u5DE5\u5177\u5DF2\u8DF3\u8FC7":"\u5B9E\u4F8B\u521D\u59CB\u5316\u5B8C\u6210"),{...o,installed:{skills:o.skill.installed||[],mcpServers:S}}}export{me as initInstance};
|
|
2
2
|
|
|
@@ -1,10 +1,33 @@
|
|
|
1
1
|
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
2
6
|
import type { InstanceState } from "../types.js";
|
|
3
7
|
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
4
11
|
export declare function getInstanceStateFile(agentId: string): string;
|
|
5
12
|
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
6
18
|
export declare function loadInstanceState(agentId: string): Promise<InstanceState>;
|
|
7
19
|
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
8
26
|
export declare function saveInstanceState(agentId: string, state: Partial<InstanceState>): Promise<InstanceState>;
|
|
9
27
|
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
10
33
|
export declare function getAgentInitRoot(agentId: string): string;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
2
7
|
export interface JdkInfo {
|
|
3
8
|
id: string;
|
|
4
9
|
|
|
@@ -11,10 +16,20 @@ export interface JdkInfo {
|
|
|
11
16
|
source: "scan" | "manual";
|
|
12
17
|
}
|
|
13
18
|
|
|
19
|
+
|
|
20
|
+
|
|
14
21
|
export declare function scanInstalledJdks(): Promise<JdkInfo[]>;
|
|
15
22
|
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
16
26
|
export declare function listJdks(): Promise<JdkInfo[]>;
|
|
17
27
|
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
18
31
|
export declare function addManualJdk(jdkPath: string): Promise<JdkInfo>;
|
|
19
32
|
|
|
33
|
+
|
|
34
|
+
|
|
20
35
|
export declare function removeManualJdk(jdkId: string): Promise<boolean>;
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
2
10
|
import { type LaunchHistoryEntry, type LaunchHistorySample, type LaunchMetricSample } from "./launch-metrics.js";
|
|
3
11
|
import { type RingBufferSlice } from "./ring-buffer.js";
|
|
4
12
|
export type LaunchRunState = "running" | "exited" | "stopped";
|
|
@@ -58,6 +66,14 @@ export interface LaunchLogsResult {
|
|
|
58
66
|
oldestIndex: number;
|
|
59
67
|
}
|
|
60
68
|
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
61
77
|
export interface LaunchStartupWaitResult {
|
|
62
78
|
outcome: "ready" | "exited" | "stopped" | "timeout";
|
|
63
79
|
|
|
@@ -72,12 +88,22 @@ export interface LaunchStartupWaitResult {
|
|
|
72
88
|
logTail: LaunchLogEntry[];
|
|
73
89
|
}
|
|
74
90
|
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
75
96
|
export declare class LaunchAlreadyRunningError extends Error {
|
|
76
97
|
|
|
77
98
|
readonly existing: LaunchRun;
|
|
78
99
|
constructor(existing: LaunchRun);
|
|
79
100
|
}
|
|
80
101
|
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
81
107
|
export interface LaunchBatchItemResult {
|
|
82
108
|
configId: string;
|
|
83
109
|
ok: boolean;
|
|
@@ -105,12 +131,24 @@ export interface LaunchBatchResult {
|
|
|
105
131
|
};
|
|
106
132
|
}
|
|
107
133
|
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
108
137
|
export declare function resolvePlaceholders(command: string, ctx: {
|
|
109
138
|
workspacePath?: string;
|
|
110
139
|
jdkPath?: string;
|
|
111
140
|
env?: Record<string, string>;
|
|
112
141
|
}): string;
|
|
113
142
|
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
114
152
|
export declare class StreamDecoder {
|
|
115
153
|
private readonly utf8Probe;
|
|
116
154
|
private readonly utf8;
|
|
@@ -121,6 +159,10 @@ export declare class StreamDecoder {
|
|
|
121
159
|
private bufferedSize;
|
|
122
160
|
private flushTimer;
|
|
123
161
|
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
124
166
|
constructor(onFlush?: (text: string) => void);
|
|
125
167
|
|
|
126
168
|
decode(chunk: Buffer): string;
|
|
@@ -129,6 +171,8 @@ export declare class StreamDecoder {
|
|
|
129
171
|
private commit;
|
|
130
172
|
}
|
|
131
173
|
|
|
174
|
+
|
|
175
|
+
|
|
132
176
|
export declare class LaunchManager {
|
|
133
177
|
private static instance;
|
|
134
178
|
|
|
@@ -136,8 +180,16 @@ export declare class LaunchManager {
|
|
|
136
180
|
|
|
137
181
|
private readonly logs;
|
|
138
182
|
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
139
187
|
private readonly startupWaiters;
|
|
140
188
|
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
141
193
|
private readonly readinessMatchers;
|
|
142
194
|
|
|
143
195
|
private readonly logListeners;
|
|
@@ -152,50 +204,136 @@ export declare class LaunchManager {
|
|
|
152
204
|
|
|
153
205
|
private runningRefs;
|
|
154
206
|
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
|
155
212
|
start(req: LaunchStartRequest): Promise<LaunchRun>;
|
|
156
213
|
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
157
219
|
stop(configId: string, reason?: "manual" | "shutdown", actor?: string): Promise<{
|
|
158
220
|
success: boolean;
|
|
159
221
|
message: string;
|
|
160
222
|
pid?: number;
|
|
161
223
|
}>;
|
|
162
224
|
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
163
230
|
restart(req: LaunchStartRequest): Promise<LaunchRun>;
|
|
164
231
|
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
165
238
|
startBatch(items: LaunchStartRequest[], waitTimeoutMs: number): Promise<LaunchBatchResult>;
|
|
166
239
|
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
|
|
167
245
|
stopAll(): Promise<{
|
|
168
246
|
running: number;
|
|
169
247
|
stopped: number;
|
|
170
248
|
}>;
|
|
171
249
|
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
172
262
|
waitStartupResult(configId: string, timeoutMs: number): Promise<LaunchStartupWaitResult>;
|
|
173
263
|
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
|
|
174
267
|
private scanReadinessMatch;
|
|
175
268
|
|
|
176
269
|
private resolveStartupWaiters;
|
|
177
270
|
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
|
|
178
280
|
listRuns(options?: {
|
|
179
281
|
withPorts?: boolean;
|
|
180
282
|
}): Promise<LaunchRunSummary[]>;
|
|
181
283
|
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
|
|
182
288
|
private probePorts;
|
|
183
289
|
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
|
|
184
296
|
publishRunningPorts(): Promise<void>;
|
|
185
297
|
|
|
298
|
+
|
|
299
|
+
|
|
186
300
|
getLogs(configId: string, sinceIndex: number): Promise<LaunchLogsResult | null>;
|
|
187
301
|
|
|
302
|
+
|
|
303
|
+
|
|
188
304
|
getRun(configId: string): LaunchRun | undefined;
|
|
189
305
|
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
|
|
190
309
|
getMetrics(configId: string, limit?: number): LaunchHistorySample[];
|
|
191
310
|
|
|
311
|
+
|
|
312
|
+
|
|
192
313
|
getMetricsSince(configId: string, sinceIndex: number, limit?: number): LaunchHistoryEntry[];
|
|
193
314
|
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
|
|
194
322
|
private ensureRestored;
|
|
195
323
|
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
196
330
|
private publishRunStatus;
|
|
197
331
|
|
|
332
|
+
|
|
333
|
+
|
|
198
334
|
private persist;
|
|
199
335
|
}
|
|
200
336
|
|
|
337
|
+
|
|
338
|
+
|
|
201
339
|
export declare function getLaunchManager(): LaunchManager;
|
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
3
21
|
export declare const METRICS_SAMPLE_INTERVAL_MS = 5000;
|
|
4
22
|
|
|
5
23
|
export declare const METRICS_HISTORY_CAPACITY = 900;
|
|
@@ -39,10 +57,19 @@ export interface RunningRunRef {
|
|
|
39
57
|
pid: number;
|
|
40
58
|
}
|
|
41
59
|
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
42
63
|
export declare function parseWindowsProcessTable(output: string): ProcessEntry[];
|
|
43
64
|
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
44
68
|
export declare function parsePsCpuTime(value: string): number;
|
|
45
69
|
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
46
73
|
export declare function parseUnixProcessTable(output: string, threadsColumn: boolean): ProcessEntry[];
|
|
47
74
|
|
|
48
75
|
export interface ProcessTreeAggregate {
|
|
@@ -53,8 +80,14 @@ export interface ProcessTreeAggregate {
|
|
|
53
80
|
found: boolean;
|
|
54
81
|
}
|
|
55
82
|
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
56
86
|
export declare function aggregateProcessTree(entries: ProcessEntry[], rootPid: number): ProcessTreeAggregate;
|
|
57
87
|
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
58
91
|
export declare function computeCpuPercent(previous: {
|
|
59
92
|
at: number;
|
|
60
93
|
totalCpuMs: number;
|
|
@@ -63,6 +96,12 @@ export declare function computeCpuPercent(previous: {
|
|
|
63
96
|
totalCpuMs: number;
|
|
64
97
|
}): number;
|
|
65
98
|
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
66
105
|
export declare class LaunchMetricsMonitor {
|
|
67
106
|
private readonly getRuns;
|
|
68
107
|
|
|
@@ -74,6 +113,9 @@ export declare class LaunchMetricsMonitor {
|
|
|
74
113
|
private ticking;
|
|
75
114
|
constructor(getRuns: () => RunningRunRef[]);
|
|
76
115
|
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
77
119
|
ensureRunning(): void;
|
|
78
120
|
|
|
79
121
|
stop(): void;
|