@xopcai/xopc 0.0.187 → 0.0.189
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/README.md +1 -1
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/demo-memory/src/index.js +1 -0
- package/dist/extensions/feishu/src/streaming/streaming-adapter.js +1 -3
- package/dist/extensions/telegram/src/adapters/streaming-adapter.js +0 -2
- package/dist/extensions/telegram/src/draft-stream.d.ts +0 -4
- package/dist/extensions/telegram/src/draft-stream.js +1 -53
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{activity-store-WlR2zEvA.js → activity-store-DTFKTPs8.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-RedDszrG.js → agent-avatar-dicebear-DqO25Qe5.js} +1 -1
- package/dist/gateway/static/root/assets/agents-BvdqdER9.js +2 -0
- package/dist/gateway/static/root/assets/{api-tVOllncq.js → api-DWeXfwVU.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-C9hKBzaF.js → app-management-settings-panel-BRpV8PXG.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-5cQvq7hd.js → appearance-settings-3ntKM9nQ.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-nKLsfy6C.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-Ct-shK4n.js → archive-plugin-Df7Ycj_7.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-CpPj3m-q.js → attachment-load-UHgfZYtj.js} +1 -1
- package/dist/gateway/static/root/assets/automations-page-Dh5bdZiN.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-BpSXZBle.js → binary-plugins-BJah99wE.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-B8hR2tXc.js → block-editor-DNlY5KqF.js} +46 -46
- package/dist/gateway/static/root/assets/browser-settings-page-CRJ_nAuh.js +8 -0
- package/dist/gateway/static/root/assets/{browser-workflow-inputs-D_LAXUrh.js → browser-workflow-inputs-vyUfdzAd.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-workflows-page-CPAs7-6s.js → browser-workflows-page-C1cKZjx-.js} +2 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-DeQR5BZt.js +7 -0
- package/dist/gateway/static/root/assets/{capability-presets-api-CKklVY2p.js → capability-presets-api-D7tkhDMv.js} +1 -1
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-D7uK3q1p.js +1 -0
- package/dist/gateway/static/root/assets/{channel-recipient-api-WWN-nbFL.js → channel-recipient-api-BGG2kpJB.js} +1 -1
- package/dist/gateway/static/root/assets/channels-settings-Bw6Dniyq.js +1 -0
- package/dist/gateway/static/root/assets/channels-status-swr-BrUTz4uU.js +1 -0
- package/dist/gateway/static/root/assets/{connector-logo-CdNkVFdB.js → connector-logo-8YU53RUT.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-k9tMiOL5.js +2 -0
- package/dist/gateway/static/root/assets/{desktop-pet-Bm_IEAf3.js → desktop-pet-BUuBEJuP.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-C0Ve04-G.js → desktop-pet-settings-BGfVIJM3.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-B2cvhvAI.js → directory-picker-path-field-DrQFfHH_.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-DNashgGu.js → extension-debug-page-CEnIFOX-.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-Bvo-5htX.js → extension-page-CCqHbexs.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-BBESdISV.js → extension-settings-page-DEZw_7zN.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-api-ClQvokMo.js → gateway-config-api-CgUE2Ii1.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-settings-Dg8qCiIp.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-CntXJF6W.js → gateway-startup-retry-DxhKNiCF.js} +1 -1
- package/dist/gateway/static/root/assets/{heartbeat-settings-CWKcZuvc.js → heartbeat-settings-27tRzDEo.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-VA511kMr.js +3 -0
- package/dist/gateway/static/root/assets/{image-generation-api-DjSAQwGy.js → image-generation-api-DCFdc-HD.js} +1 -1
- package/dist/gateway/static/root/assets/index-BvR-i-m6.js +216 -0
- package/dist/gateway/static/root/assets/index-zybP34zk.css +1 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-ahKHpjoW.js → keyboard-shortcuts-settings-Bf2VLtXW.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-CaJq4-wV.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-B6GKdgza.js → local-apps-page-Ca1RuI13.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-Bff30u5V.js → locale-store-DUW5YE3R.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-BLTCg69e.js +2 -0
- package/dist/gateway/static/root/assets/management-settings-B3Eop1zn.js +1 -0
- package/dist/gateway/static/root/assets/{markdown-split-BeNMJm_i.js → markdown-split-BGOYjgnM.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-Bdzrj_-6.js → media-plugins-CT0txyM4.js} +1 -1
- package/dist/gateway/static/root/assets/messages-CMjnbdbn.js +3 -0
- package/dist/gateway/static/root/assets/{notes-page-MYIi-9S9.js → notes-page-DfKgAe78.js} +1 -1
- package/dist/gateway/static/root/assets/notes-workbench-Bp1w9UM1.js +4 -0
- package/dist/gateway/static/root/assets/{page-tabs-3t88bbGx.js → page-tabs-DNrbCgmC.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-Cf_BWbeE.js → preview-open-alternatives-BTqViDOR.js} +1 -1
- package/dist/gateway/static/root/assets/product-delivery-tRr-7IxY.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-CKq73c98.js → product-open-page-C_2L4_Iu.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-CZmbPDQN.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-D5pzqfm5.js +1 -0
- package/dist/gateway/static/root/assets/remote-access-hub-CC-XhVGI.js +1 -0
- package/dist/gateway/static/root/assets/{schema-form-NqOm-OG1.js → schema-form-BFLfkDGG.js} +1 -1
- package/dist/gateway/static/root/assets/{schemas-C6onAggk.js → schemas-zIBW3wiV.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-B2eTLVDV.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-CRuZ_bl0.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-DYAS8p8z.js → settings-form-section-C4GXGeA4.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-loading-skeleton-DZFhxihA.js → settings-loading-skeleton-C9a-EbTZ.js} +1 -1
- package/dist/gateway/static/root/assets/settings-page-DI9qDH5x.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-layout-DfFfkdED.js → settings-page-layout-D-LWQdI5.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-CJwmPvgs.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-CYtrQaZN.js → share-preview-page-BKSMG9r5.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-YzSDS4G_.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-CwOo8zZk.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-xd1cgSGN.js +2 -0
- package/dist/gateway/static/root/assets/{skills-page.utils-BBXirAjc.js → skills-page.utils-zsz2HIlZ.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-DLf5YvFl.js → system-settings-panel-IWNDBI1O.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-DFGkuYfl.js → task-detail-page-CgtK02kP.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-y7e_tvYi.js → theme-store-BkJe7UDo.js} +1 -1
- package/dist/gateway/static/root/assets/time-picker-CstQ___Y.js +1 -0
- package/dist/gateway/static/root/assets/{typed-models-lib-DR12j_dr.js → typed-models-lib-C07LGthO.js} +1 -1
- package/dist/gateway/static/root/assets/{use-save-bar-registration-BsvcJgZl.js → use-save-bar-registration-CQYE0l6z.js} +1 -1
- package/dist/gateway/static/root/assets/user-context-page-BnQAWS_B.js +1 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-DKADXFWD.js → voice-api-key-field-Boue1D46.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-BC1nExf8.js → work-discovery-overlay-bbmvCmc8.js} +1 -1
- package/dist/gateway/static/root/assets/work-discovery-page-CAszL1y8.js +1 -0
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-C8X5W-8k.js → workflow-run-setup-panel-DlHv-GZC.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-DxGzo3-x.js +11 -0
- package/dist/gateway/static/root/index.html +9 -9
- package/dist/package.js +1 -1
- package/dist/packages/endpoint-tools-protocol/src/index.js +184 -0
- package/dist/packages/gateway-contract/src/tool-activity.js +223 -0
- package/dist/packages/realtime-client/src/index.js +199 -0
- package/dist/packages/realtime-protocol/src/index.js +83 -0
- package/dist/src/agent/agent-manager.d.ts +1 -0
- package/dist/src/agent/agent-manager.js +3 -8
- package/dist/src/agent/background-review/prompts.d.ts +1 -1
- package/dist/src/agent/background-review/prompts.js +3 -1
- package/dist/src/agent/background-review/run-background-review.d.ts +2 -0
- package/dist/src/agent/background-review/run-background-review.js +5 -2
- package/dist/src/agent/client-error-format.d.ts +1 -1
- package/dist/src/agent/client-error-format.js +1 -1
- package/dist/src/agent/code-intelligence/binary.js +1 -1
- package/dist/src/agent/embedded/run-for-session.d.ts +0 -2
- package/dist/src/agent/embedded/run-for-session.js +99 -112
- package/dist/src/agent/external-tools/composio-provider.d.ts +29 -0
- package/dist/src/agent/external-tools/composio-provider.js +307 -0
- package/dist/src/agent/external-tools/endpoint-provider.d.ts +17 -0
- package/dist/src/agent/external-tools/endpoint-provider.js +93 -0
- package/dist/src/agent/external-tools/extension-provider.d.ts +20 -0
- package/dist/src/agent/external-tools/extension-provider.js +68 -0
- package/dist/src/agent/external-tools/gateway-tools.d.ts +8 -0
- package/dist/src/agent/external-tools/gateway-tools.js +89 -0
- package/dist/src/agent/external-tools/index.d.ts +23 -0
- package/dist/src/agent/external-tools/index.js +46 -0
- package/dist/src/agent/external-tools/mcp-provider.d.ts +29 -0
- package/dist/src/agent/external-tools/mcp-provider.js +118 -0
- package/dist/src/agent/external-tools/memory-provider.d.ts +21 -0
- package/dist/src/agent/external-tools/memory-provider.js +56 -0
- package/dist/src/agent/external-tools/refs.d.ts +5 -0
- package/dist/src/agent/external-tools/refs.js +18 -0
- package/dist/src/agent/external-tools/service.d.ts +26 -0
- package/dist/src/agent/external-tools/service.js +117 -0
- package/dist/src/agent/external-tools/types.d.ts +35 -0
- package/dist/src/agent/external-tools/types.js +10 -0
- package/dist/src/agent/inbound/inbound-loop.d.ts +0 -2
- package/dist/src/agent/inbound/inbound-loop.js +4 -3
- package/dist/src/agent/inbound/turn-dispatcher.d.ts +9 -8
- package/dist/src/agent/inbound/turn-dispatcher.js +13 -11
- package/dist/src/agent/mcp/{bundle-mcp-materialize.d.ts → bundle-mcp-gateway.d.ts} +1 -19
- package/dist/src/agent/mcp/bundle-mcp-gateway.js +60 -0
- package/dist/src/agent/mcp/bundle-mcp-names.d.ts +0 -8
- package/dist/src/agent/mcp/bundle-mcp-names.js +2 -29
- package/dist/src/agent/mcp/bundle-mcp-policy.d.ts +4 -7
- package/dist/src/agent/mcp/bundle-mcp-policy.js +6 -20
- package/dist/src/agent/mcp/bundle-mcp-runtime.js +2 -2
- package/dist/src/agent/mcp/bundle-mcp-tools.d.ts +1 -2
- package/dist/src/agent/mcp/bundle-mcp-tools.js +1 -2
- package/dist/src/agent/mcp/bundle-mcp-types.d.ts +0 -5
- package/dist/src/agent/mcp/index.d.ts +0 -2
- package/dist/src/agent/mcp/index.js +2 -5
- package/dist/src/agent/mcp/mcp-stdio-transport.js +1 -1
- package/dist/src/agent/mcp/mcp-transport.js +1 -1
- package/dist/src/agent/memory/context/planner.d.ts +1 -0
- package/dist/src/agent/memory/context/planner.js +22 -7
- package/dist/src/agent/memory/manager.d.ts +4 -1
- package/dist/src/agent/memory/manager.js +5 -2
- package/dist/src/agent/memory/types.d.ts +2 -0
- package/dist/src/agent/messaging/command-handler.d.ts +2 -2
- package/dist/src/agent/messaging/command-handler.js +3 -3
- package/dist/src/agent/messaging/stream-manager.d.ts +2 -14
- package/dist/src/agent/messaging/stream-manager.js +0 -12
- package/dist/src/agent/orchestration/agent-event-handler.d.ts +1 -3
- package/dist/src/agent/orchestration/agent-event-handler.js +0 -36
- package/dist/src/agent/orchestration/agent-orchestrator.d.ts +0 -5
- package/dist/src/agent/orchestration/agent-orchestrator.js +0 -5
- package/dist/src/agent/prompt/sections/behavior.js +6 -4
- package/dist/src/agent/service/async-queue.d.ts +1 -1
- package/dist/src/agent/service/async-queue.js +1 -1
- package/dist/src/agent/service/direct-turn-helpers.d.ts +1 -1
- package/dist/src/agent/service/direct-turn-helpers.js +1 -1
- package/dist/src/agent/service/process-direct-one-shot.d.ts +3 -1
- package/dist/src/agent/service/process-direct-one-shot.js +1 -1
- package/dist/src/agent/service/process-direct-streaming.d.ts +7 -5
- package/dist/src/agent/service/process-direct-streaming.js +5 -5
- package/dist/src/agent/service.d.ts +1 -4
- package/dist/src/agent/service.js +6 -32
- package/dist/src/agent/service.types.d.ts +2 -3
- package/dist/src/agent/session/index.d.ts +1 -1
- package/dist/src/agent/session/session-context.d.ts +2 -0
- package/dist/src/agent/session/session-context.js +4 -0
- package/dist/src/agent/session/session-state-bag.d.ts +4 -4
- package/dist/src/agent/session/session-state-bag.js +1 -1
- package/dist/src/agent/skills/hub-pull.js +1 -1
- package/dist/src/agent/starter-agents.js +2 -2
- package/dist/src/agent/streaming/reasoning-visibility.d.ts +6 -0
- package/dist/src/agent/streaming/{reasoning-visibility-sse.js → reasoning-visibility.js} +3 -6
- package/dist/src/agent/tools/delegate-tool.js +5 -1
- package/dist/src/agent/tools/executor.js +1 -1
- package/dist/src/agent/tools/factory.d.ts +6 -1
- package/dist/src/agent/tools/factory.js +17 -22
- package/dist/src/agent/tools/index.d.ts +0 -1
- package/dist/src/agent/tools/index.js +1 -2
- package/dist/src/agent/workflow/workflow-child-tools.js +7 -1
- package/dist/src/automations/domain/types.d.ts +2 -1
- package/dist/src/automations/domain/validation.d.ts +1 -1
- package/dist/src/automations/service/action-executor.js +4 -1
- package/dist/src/browser/providers/cloakbrowser.js +1 -1
- package/dist/src/channels/channel-domain.d.ts +0 -4
- package/dist/src/channels/pairing/pairing-challenge.d.ts +1 -1
- package/dist/src/channels/pairing/pairing-challenge.js +1 -1
- package/dist/src/channels/plugin-types.d.ts +0 -2
- package/dist/src/cli/commands/agent/stream-renderer.js +4 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/config/rules.js +0 -5
- package/dist/src/config/schema.d.ts +3 -5
- package/dist/src/config/schema.js +0 -3
- package/dist/src/config/web-patch.js +0 -1
- package/dist/src/connectors/health.js +1 -1
- package/dist/src/endpoint-tools/auth.d.ts +20 -0
- package/dist/src/endpoint-tools/auth.js +51 -0
- package/dist/src/endpoint-tools/index.d.ts +5 -0
- package/dist/src/endpoint-tools/index.js +6 -0
- package/dist/src/endpoint-tools/invocation-service.d.ts +68 -0
- package/dist/src/endpoint-tools/invocation-service.js +190 -0
- package/dist/src/endpoint-tools/policy.d.ts +10 -0
- package/dist/src/endpoint-tools/policy.js +18 -0
- package/dist/src/endpoint-tools/registry.d.ts +45 -0
- package/dist/src/endpoint-tools/registry.js +121 -0
- package/dist/src/endpoint-tools/runtime.d.ts +23 -0
- package/dist/src/endpoint-tools/runtime.js +86 -0
- package/dist/src/endpoint-tools/upload-service.d.ts +41 -0
- package/dist/src/endpoint-tools/upload-service.js +103 -0
- package/dist/src/extensions/extension-registry-impl.d.ts +3 -1
- package/dist/src/extensions/extension-registry-impl.js +7 -1
- package/dist/src/extensions/loader.js +1 -1
- package/dist/src/extensions/types/core.d.ts +2 -1
- package/dist/src/extensions/types/hooks.d.ts +1 -1
- package/dist/src/gateway/agent-builtin-tools.d.ts +1 -1
- package/dist/src/gateway/agent-builtin-tools.js +5 -2
- package/dist/src/gateway/chat-stream/mapper.js +16 -1
- package/dist/src/gateway/chat-stream/protocol.d.ts +4 -1
- package/dist/src/gateway/clarify-bridge.d.ts +5 -4
- package/dist/src/gateway/clarify-bridge.js +3 -4
- package/dist/src/gateway/file-reference-errors.d.ts +6 -0
- package/dist/src/gateway/file-reference-errors.js +21 -0
- package/dist/src/gateway/heartbeat/service.js +5 -2
- package/dist/src/gateway/hono/app.js +1 -5
- package/dist/src/gateway/hono/index.d.ts +0 -1
- package/dist/src/gateway/hono/index.js +1 -2
- package/dist/src/gateway/hono/lib/config-payload.d.ts +1 -2
- package/dist/src/gateway/hono/lib/config-payload.js +1 -2
- package/dist/src/gateway/hono/middleware/auth.js +3 -5
- package/dist/src/gateway/hono/routes/agent-stream.js +49 -6
- package/dist/src/gateway/hono/routes/config-patch/gateway.d.ts +2 -2
- package/dist/src/gateway/hono/routes/config-patch/gateway.js +0 -19
- package/dist/src/gateway/hono/routes/config-patch/misc.js +1 -1
- package/dist/src/gateway/hono/routes/deps.d.ts +0 -2
- package/dist/src/gateway/hono/routes/endpoint-tools.d.ts +3 -0
- package/dist/src/gateway/hono/routes/endpoint-tools.js +196 -0
- package/dist/src/gateway/hono/routes/index.js +4 -0
- package/dist/src/gateway/hono/routes/logs.js +0 -4
- package/dist/src/gateway/hono/routes/mcp.js +1 -1
- package/dist/src/gateway/hono/routes/projects.js +34 -13
- package/dist/src/gateway/hono/routes/public-gateway.js +2 -2
- package/dist/src/gateway/hono/routes/realtime.d.ts +3 -0
- package/dist/src/gateway/hono/routes/realtime.js +35 -0
- package/dist/src/gateway/hono/routes/workspace.js +34 -13
- package/dist/src/gateway/hono/routes/you.d.ts +0 -9
- package/dist/src/gateway/hono/routes/you.js +81 -128
- package/dist/src/gateway/index.d.ts +1 -1
- package/dist/src/gateway/index.js +1 -2
- package/dist/src/gateway/protocol.d.ts +1 -7
- package/dist/src/gateway/security/index.js +1 -1
- package/dist/src/gateway/security/operator-scopes.js +1 -1
- package/dist/src/gateway/server.js +4 -4
- package/dist/src/gateway/service/agent-runner.d.ts +11 -9
- package/dist/src/gateway/service/agent-runner.js +18 -18
- package/dist/src/gateway/service/config-coordinator.d.ts +2 -2
- package/dist/src/gateway/service/config-coordinator.js +1 -1
- package/dist/src/gateway/service/run-gateway-agent.d.ts +4 -3
- package/dist/src/gateway/service/run-gateway-agent.js +17 -14
- package/dist/src/gateway/service/session-input-coordinator.d.ts +3 -0
- package/dist/src/gateway/service/session-input-coordinator.js +4 -2
- package/dist/src/gateway/service/types.d.ts +0 -5
- package/dist/src/gateway/service.d.ts +7 -6
- package/dist/src/gateway/service.js +39 -22
- package/dist/src/heartbeat/index.js +1 -1
- package/dist/src/mcp/channel-bridge.d.ts +6 -9
- package/dist/src/mcp/channel-bridge.js +48 -76
- package/dist/src/mcp/channel-server.js +2 -6
- package/dist/src/realtime/broker.d.ts +30 -0
- package/dist/src/realtime/broker.js +97 -0
- package/dist/src/realtime/runtime.d.ts +20 -0
- package/dist/src/realtime/runtime.js +258 -0
- package/dist/src/realtime/tickets.d.ts +15 -0
- package/dist/src/realtime/tickets.js +38 -0
- package/dist/src/realtime/writer.d.ts +15 -0
- package/dist/src/realtime/writer.js +78 -0
- package/dist/src/share/share-config.js +0 -1
- package/dist/src/share/share-zip.js +1 -1
- package/dist/src/share/site-share-config.js +0 -1
- package/dist/src/storage/sqlite/endpoint-principal-repository.d.ts +17 -0
- package/dist/src/storage/sqlite/endpoint-principal-repository.js +54 -0
- package/dist/src/storage/sqlite/endpoint-tool-invocation-repository.d.ts +25 -0
- package/dist/src/storage/sqlite/endpoint-tool-invocation-repository.js +42 -0
- package/dist/src/storage/sqlite/index.d.ts +2 -0
- package/dist/src/storage/sqlite/index.js +3 -1
- package/dist/src/storage/sqlite/memory-records-repository.js +3 -1
- package/dist/src/storage/sqlite/migrations/108_repair_user_memory_provider.sql +18 -0
- package/dist/src/storage/sqlite/migrations/109_endpoint_principals.sql +14 -0
- package/dist/src/storage/sqlite/migrations/110_session_input_origin.sql +43 -0
- package/dist/src/storage/sqlite/migrations/111_endpoint_tool_invocations.sql +18 -0
- package/dist/src/storage/sqlite/migrations/112_endpoint_instance_bindings.sql +8 -0
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +3 -3
- package/dist/src/storage/sqlite/migrations/runner.ts +1 -1
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/storage/sqlite/session-input-repository.d.ts +3 -0
- package/dist/src/storage/sqlite/session-input-repository.js +5 -3
- package/dist/src/tasks/home-query-service.d.ts +1 -1
- package/dist/src/tui/backends/embedded-backend.js +5 -2
- package/dist/src/tui/backends/{gateway-sse-backend.d.ts → gateway-realtime-backend.d.ts} +13 -10
- package/dist/src/tui/backends/{gateway-sse-backend.js → gateway-realtime-backend.js} +114 -151
- package/dist/src/tui/tool-summary.d.ts +1 -2
- package/dist/src/tui/tool-summary.js +2 -18
- package/dist/src/tui/tui-agent-events.d.ts +0 -1
- package/dist/src/tui/tui-agent-events.js +2 -15
- package/dist/src/tui/tui-backend.d.ts +4 -4
- package/dist/src/tui/tui-run-state.js +0 -4
- package/dist/src/tui/tui-types.d.ts +2 -9
- package/dist/src/tui/tui-types.js +0 -1
- package/dist/src/tui/tui.js +5 -5
- package/dist/src/tunnel/frpc-binary.js +1 -1
- package/dist/src/tunnel/gateway-lifecycle.d.ts +1 -1
- package/dist/src/tunnel/gateway-lifecycle.js +1 -1
- package/dist/src/user-context/actionableInsights.d.ts +14 -0
- package/dist/src/user-context/actionableInsights.js +34 -0
- package/dist/src/user-context/manual-understanding.js +6 -1
- package/dist/src/user-context/projection.d.ts +2 -1
- package/dist/src/user-context/projection.js +2 -1
- package/dist/src/user-context/understandingQuality.d.ts +5 -0
- package/dist/src/user-context/understandingQuality.js +44 -0
- package/dist/src/utils/logger/log-stream.d.ts +3 -10
- package/dist/src/utils/logger/log-stream.js +2 -73
- package/dist/src/utils/logger/pino-record.d.ts +1 -1
- package/dist/src/utils/logger/streams.js +1 -1
- package/dist/src/voice/local/model-files.js +1 -1
- package/dist/src/work-discovery/service.js +1 -1
- package/package.json +6 -3
- package/dist/gateway/static/root/assets/agents-Df9mTa-K.js +0 -2
- package/dist/gateway/static/root/assets/apps-page-Bd3tN-k2.js +0 -1
- package/dist/gateway/static/root/assets/automations-page-w6K9GZQ7.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-jb5Hf-hm.js +0 -8
- package/dist/gateway/static/root/assets/capabilities-settings-panel-BjUe4raq.js +0 -7
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-DiWIMYRr.js +0 -1
- package/dist/gateway/static/root/assets/channels-settings-D8IkjMuX.js +0 -1
- package/dist/gateway/static/root/assets/channels-status-swr-CySs1GQX.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-BT2ahw52.js +0 -2
- package/dist/gateway/static/root/assets/gateway-settings-CIRs2QVy.js +0 -1
- package/dist/gateway/static/root/assets/home-page-C59f8UJw.js +0 -3
- package/dist/gateway/static/root/assets/index-D-YfWVyS.css +0 -1
- package/dist/gateway/static/root/assets/index-vi5KlR5_.js +0 -222
- package/dist/gateway/static/root/assets/local-app-workbench-page-DRB4UQBE.js +0 -2
- package/dist/gateway/static/root/assets/logs-page-CNp4XiBN.js +0 -7
- package/dist/gateway/static/root/assets/messages-CPxz48hr.js +0 -3
- package/dist/gateway/static/root/assets/notes-workbench-DqSkeDXX.js +0 -4
- package/dist/gateway/static/root/assets/product-delivery-C8JbSj5Y.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-BrbHs4Wp.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-B80rtkj6.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-_Q3GEznb.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-55dJOUVg.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-CSFCZj14.js +0 -1
- package/dist/gateway/static/root/assets/settings-page-BSIiMLi-.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-q_yE6-H1.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-gYkRX9Ik.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-BoNBMKW6.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-GZHKDFSb.js +0 -2
- package/dist/gateway/static/root/assets/time-picker-5sHEZ5w5.js +0 -1
- package/dist/gateway/static/root/assets/user-context-page-q5dr8JFG.js +0 -1
- package/dist/gateway/static/root/assets/work-discovery-page-fNvSg40M.js +0 -1
- package/dist/gateway/static/root/assets/workflows-page-YJBKmPYK.js +0 -11
- package/dist/src/agent/feedback/feedback-coordinator.d.ts +0 -73
- package/dist/src/agent/feedback/feedback-coordinator.js +0 -156
- package/dist/src/agent/feedback/index.d.ts +0 -4
- package/dist/src/agent/feedback/index.js +0 -2
- package/dist/src/agent/lifecycle/progress.d.ts +0 -90
- package/dist/src/agent/lifecycle/progress.js +0 -339
- package/dist/src/agent/mcp/bundle-mcp-materialize.js +0 -183
- package/dist/src/agent/mcp/mcp-tool-meta.d.ts +0 -8
- package/dist/src/agent/mcp/mcp-tool-meta.js +0 -13
- package/dist/src/agent/mcp/resolve-embedded-mcp-tools.d.ts +0 -14
- package/dist/src/agent/mcp/resolve-embedded-mcp-tools.js +0 -48
- package/dist/src/agent/streaming/reasoning-visibility-sse.d.ts +0 -15
- package/dist/src/agent/tools/composio-tool.d.ts +0 -21
- package/dist/src/agent/tools/composio-tool.js +0 -261
- package/dist/src/gateway/agent-run-relay.d.ts +0 -19
- package/dist/src/gateway/agent-run-relay.js +0 -169
- package/dist/src/gateway/hono/sse.d.ts +0 -53
- package/dist/src/gateway/hono/sse.js +0 -207
- package/dist/src/gateway/service/sse-hub.d.ts +0 -10
- package/dist/src/gateway/service/sse-hub.js +0 -53
- package/dist/src/tui/sse-consumer.d.ts +0 -15
- package/dist/src/tui/sse-consumer.js +0 -73
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { ENDPOINT_INVOCATION_RECEIPT_TIMEOUT_MS, canonicalJson } from "../../packages/endpoint-tools-protocol/src/index.js";
|
|
2
|
+
import { EndpointToolPolicy, EndpointToolPolicyError } from "./policy.js";
|
|
3
|
+
import crypto from "node:crypto";
|
|
4
|
+
//#region src/endpoint-tools/invocation-service.ts
|
|
5
|
+
var EndpointToolExecutionError = class extends Error {
|
|
6
|
+
constructor(code, message) {
|
|
7
|
+
super(message);
|
|
8
|
+
this.code = code;
|
|
9
|
+
this.name = "EndpointToolExecutionError";
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
var EndpointInvocationService = class {
|
|
13
|
+
pending = /* @__PURE__ */ new Map();
|
|
14
|
+
policy;
|
|
15
|
+
constructor(registry, options = {}) {
|
|
16
|
+
this.registry = registry;
|
|
17
|
+
this.options = options;
|
|
18
|
+
this.policy = options.policy ?? new EndpointToolPolicy();
|
|
19
|
+
}
|
|
20
|
+
invoke(params) {
|
|
21
|
+
const endpoint = this.registry.get(params.endpointId);
|
|
22
|
+
if (!endpoint) return Promise.reject(this.error("ENDPOINT_OFFLINE", "Endpoint is offline"));
|
|
23
|
+
const tool = this.registry.getTool(params.endpointId, params.toolName);
|
|
24
|
+
if (!tool) return Promise.reject(this.error("TOOL_NOT_FOUND", "Endpoint tool is unavailable"));
|
|
25
|
+
if (tool.revision !== params.descriptorRevision) return Promise.reject(this.error("TOOL_REVISION_MISMATCH", "Endpoint tool contract changed"));
|
|
26
|
+
let confirmationRequired;
|
|
27
|
+
try {
|
|
28
|
+
confirmationRequired = this.policy.evaluate(tool.descriptor, endpoint.availability).confirmationRequired;
|
|
29
|
+
} catch (error) {
|
|
30
|
+
if (error instanceof EndpointToolPolicyError) return Promise.reject(this.error("ENDPOINT_NOT_FOREGROUND", error.message));
|
|
31
|
+
throw error;
|
|
32
|
+
}
|
|
33
|
+
if (params.signal?.aborted) return Promise.reject(this.error("TOOL_CANCELLED", "Endpoint tool call was cancelled"));
|
|
34
|
+
const endpointPending = [...this.pending.values()].filter((item) => item.endpointId === params.endpointId);
|
|
35
|
+
if (endpointPending.length >= 4) return Promise.reject(this.error("TOOL_BUSY", "Endpoint has reached its invocation limit"));
|
|
36
|
+
if (endpointPending.filter((item) => item.toolName === params.toolName).length >= tool.descriptor.maxConcurrency) return Promise.reject(this.error("TOOL_BUSY", "Endpoint tool has reached its invocation limit"));
|
|
37
|
+
const invocationId = crypto.randomUUID();
|
|
38
|
+
const startedAt = Date.now();
|
|
39
|
+
const uploadGrant = tool.descriptor.resultKinds.includes("file") ? this.options.uploads?.createGrant(invocationId, params.endpointId, startedAt) : void 0;
|
|
40
|
+
try {
|
|
41
|
+
this.options.audit?.started({
|
|
42
|
+
id: invocationId,
|
|
43
|
+
principalId: endpoint.principalId,
|
|
44
|
+
endpointId: params.endpointId,
|
|
45
|
+
toolCallId: params.toolCallId,
|
|
46
|
+
toolName: params.toolName,
|
|
47
|
+
effect: tool.descriptor.effect,
|
|
48
|
+
confirmationRequired,
|
|
49
|
+
argumentsSha256: crypto.createHash("sha256").update(canonicalJson(params.arguments)).digest("hex"),
|
|
50
|
+
startedAt
|
|
51
|
+
});
|
|
52
|
+
} catch (error) {
|
|
53
|
+
this.options.uploads?.abort(invocationId);
|
|
54
|
+
return Promise.reject(error);
|
|
55
|
+
}
|
|
56
|
+
return new Promise((resolve, reject) => {
|
|
57
|
+
const pending = {
|
|
58
|
+
id: invocationId,
|
|
59
|
+
endpointId: params.endpointId,
|
|
60
|
+
toolName: params.toolName,
|
|
61
|
+
state: "sent",
|
|
62
|
+
receiptTimer: setTimeout(() => {
|
|
63
|
+
this.fail(invocationId, this.error("TOOL_TIMEOUT", "Endpoint did not receive the invocation"));
|
|
64
|
+
}, ENDPOINT_INVOCATION_RECEIPT_TIMEOUT_MS),
|
|
65
|
+
deadlineTimer: setTimeout(() => {
|
|
66
|
+
this.cancel(invocationId, "Endpoint tool timed out", "TOOL_TIMEOUT");
|
|
67
|
+
}, tool.descriptor.timeoutMs),
|
|
68
|
+
abortSignal: params.signal,
|
|
69
|
+
onProgress: params.onProgress,
|
|
70
|
+
resolve,
|
|
71
|
+
reject
|
|
72
|
+
};
|
|
73
|
+
if (params.signal) {
|
|
74
|
+
pending.abortHandler = () => this.cancel(invocationId, "Agent cancelled the tool call", "TOOL_CANCELLED");
|
|
75
|
+
params.signal.addEventListener("abort", pending.abortHandler, { once: true });
|
|
76
|
+
}
|
|
77
|
+
this.pending.set(invocationId, pending);
|
|
78
|
+
try {
|
|
79
|
+
this.registry.send(params.endpointId, "tool.invoke", {
|
|
80
|
+
invocationId,
|
|
81
|
+
toolCallId: params.toolCallId,
|
|
82
|
+
toolName: params.toolName,
|
|
83
|
+
arguments: params.arguments,
|
|
84
|
+
descriptorRevision: params.descriptorRevision,
|
|
85
|
+
confirmationRequired,
|
|
86
|
+
deadlineAt: Date.now() + tool.descriptor.timeoutMs,
|
|
87
|
+
...uploadGrant ? { uploadGrant } : {}
|
|
88
|
+
});
|
|
89
|
+
} catch {
|
|
90
|
+
this.fail(invocationId, this.error("ENDPOINT_DISCONNECTED", "Endpoint disconnected before invocation"));
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
handleMessage(endpointId, message) {
|
|
95
|
+
const invocationId = message.payload.invocationId;
|
|
96
|
+
const pending = this.pending.get(invocationId);
|
|
97
|
+
if (!pending || pending.endpointId !== endpointId) return;
|
|
98
|
+
switch (message.type) {
|
|
99
|
+
case "tool.received":
|
|
100
|
+
if (pending.state !== "sent") return;
|
|
101
|
+
pending.state = "running";
|
|
102
|
+
clearTimeout(pending.receiptTimer);
|
|
103
|
+
return;
|
|
104
|
+
case "tool.progress":
|
|
105
|
+
if (pending.state !== "running") return;
|
|
106
|
+
pending.onProgress?.({
|
|
107
|
+
...message.payload.message === void 0 ? {} : { message: message.payload.message },
|
|
108
|
+
...message.payload.percent === void 0 ? {} : { percent: message.payload.percent }
|
|
109
|
+
});
|
|
110
|
+
return;
|
|
111
|
+
case "tool.result":
|
|
112
|
+
if (pending.state !== "running") return;
|
|
113
|
+
try {
|
|
114
|
+
this.options.uploads?.validateAndClose(invocationId, message.payload.content);
|
|
115
|
+
} catch (error) {
|
|
116
|
+
this.fail(invocationId, this.error("PROTOCOL_ERROR", error instanceof Error ? error.message : String(error)));
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
this.succeed(invocationId, {
|
|
120
|
+
content: message.payload.content,
|
|
121
|
+
...message.payload.details === void 0 ? {} : { details: message.payload.details }
|
|
122
|
+
});
|
|
123
|
+
return;
|
|
124
|
+
case "tool.error":
|
|
125
|
+
this.fail(invocationId, this.error(message.payload.code, message.payload.message));
|
|
126
|
+
return;
|
|
127
|
+
case "tool.cancelled": this.fail(invocationId, this.error("TOOL_CANCELLED", "Endpoint cancelled the tool call"));
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
failEndpoint(endpointId) {
|
|
131
|
+
for (const pending of this.pending.values()) if (pending.endpointId === endpointId) this.fail(pending.id, this.error("ENDPOINT_DISCONNECTED", "Endpoint disconnected"));
|
|
132
|
+
}
|
|
133
|
+
close() {
|
|
134
|
+
for (const pending of this.pending.values()) this.fail(pending.id, this.error("ENDPOINT_DISCONNECTED", "Endpoint runtime stopped"));
|
|
135
|
+
}
|
|
136
|
+
cancel(invocationId, reason, code) {
|
|
137
|
+
const pending = this.pending.get(invocationId);
|
|
138
|
+
if (!pending) return;
|
|
139
|
+
try {
|
|
140
|
+
this.registry.send(pending.endpointId, "tool.cancel", {
|
|
141
|
+
invocationId,
|
|
142
|
+
reason
|
|
143
|
+
});
|
|
144
|
+
} catch {}
|
|
145
|
+
this.fail(invocationId, this.error(code, reason));
|
|
146
|
+
}
|
|
147
|
+
succeed(invocationId, result) {
|
|
148
|
+
const pending = this.take(invocationId);
|
|
149
|
+
if (!pending) return;
|
|
150
|
+
try {
|
|
151
|
+
this.options.audit?.finished({
|
|
152
|
+
id: invocationId,
|
|
153
|
+
status: "succeeded",
|
|
154
|
+
completedAt: Date.now()
|
|
155
|
+
});
|
|
156
|
+
} finally {
|
|
157
|
+
pending.resolve(result);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
fail(invocationId, error) {
|
|
161
|
+
const pending = this.take(invocationId);
|
|
162
|
+
if (!pending) return;
|
|
163
|
+
try {
|
|
164
|
+
this.options.uploads?.abort(invocationId);
|
|
165
|
+
this.options.audit?.finished({
|
|
166
|
+
id: invocationId,
|
|
167
|
+
status: "failed",
|
|
168
|
+
...error instanceof EndpointToolExecutionError ? { errorCode: error.code } : {},
|
|
169
|
+
errorMessage: error.message,
|
|
170
|
+
completedAt: Date.now()
|
|
171
|
+
});
|
|
172
|
+
} finally {
|
|
173
|
+
pending.reject(error);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
take(invocationId) {
|
|
177
|
+
const pending = this.pending.get(invocationId);
|
|
178
|
+
if (!pending) return void 0;
|
|
179
|
+
this.pending.delete(invocationId);
|
|
180
|
+
clearTimeout(pending.receiptTimer);
|
|
181
|
+
clearTimeout(pending.deadlineTimer);
|
|
182
|
+
if (pending.abortSignal && pending.abortHandler) pending.abortSignal.removeEventListener("abort", pending.abortHandler);
|
|
183
|
+
return pending;
|
|
184
|
+
}
|
|
185
|
+
error(code, message) {
|
|
186
|
+
return new EndpointToolExecutionError(code, message);
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
//#endregion
|
|
190
|
+
export { EndpointInvocationService, EndpointToolExecutionError };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { EndpointAvailability, EndpointKind, EndpointToolDescriptor } from '@xopcai/endpoint-tools-protocol';
|
|
2
|
+
export interface EndpointToolPolicyDecision {
|
|
3
|
+
confirmationRequired: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare class EndpointToolPolicyError extends Error {
|
|
6
|
+
}
|
|
7
|
+
export declare class EndpointToolPolicy {
|
|
8
|
+
validateDescriptor(kind: EndpointKind, descriptor: EndpointToolDescriptor): void;
|
|
9
|
+
evaluate(descriptor: EndpointToolDescriptor, availability: EndpointAvailability): EndpointToolPolicyDecision;
|
|
10
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region src/endpoint-tools/policy.ts
|
|
2
|
+
var EndpointToolPolicyError = class extends Error {};
|
|
3
|
+
var EndpointToolPolicy = class {
|
|
4
|
+
validateDescriptor(kind, descriptor) {
|
|
5
|
+
if (!descriptor.name.startsWith(`${kind}.`)) throw new EndpointToolPolicyError(`Tool ${descriptor.name} does not belong to ${kind}`);
|
|
6
|
+
if (descriptor.effect !== "read") {
|
|
7
|
+
if (descriptor.confirmation !== "always") throw new EndpointToolPolicyError(`Mutating tool ${descriptor.name} must always require confirmation`);
|
|
8
|
+
if (!descriptor.requiresForeground) throw new EndpointToolPolicyError(`Mutating tool ${descriptor.name} must require foreground`);
|
|
9
|
+
if (descriptor.requiredPermissions.length === 0) throw new EndpointToolPolicyError(`Mutating tool ${descriptor.name} must declare a permission`);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
evaluate(descriptor, availability) {
|
|
13
|
+
if (descriptor.requiresForeground && availability !== "foreground") throw new EndpointToolPolicyError("Endpoint is not in the foreground");
|
|
14
|
+
return { confirmationRequired: descriptor.confirmation === "always" || descriptor.effect !== "read" };
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { EndpointToolPolicy, EndpointToolPolicyError };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type EndpointAvailability, type EndpointHelloPayload, type EndpointKind, type EndpointToolDescriptor } from '@xopcai/endpoint-tools-protocol';
|
|
2
|
+
import { EndpointToolPolicy } from './policy.js';
|
|
3
|
+
export interface EndpointTransport {
|
|
4
|
+
readonly readyState: number;
|
|
5
|
+
send(data: string): void;
|
|
6
|
+
close(code?: number, reason?: string): void;
|
|
7
|
+
}
|
|
8
|
+
export interface RegisteredEndpointTool {
|
|
9
|
+
descriptor: EndpointToolDescriptor;
|
|
10
|
+
revision: string;
|
|
11
|
+
}
|
|
12
|
+
export interface EndpointConnectionSnapshot {
|
|
13
|
+
principalId: string;
|
|
14
|
+
endpointId: string;
|
|
15
|
+
connectionId: string;
|
|
16
|
+
displayName: string;
|
|
17
|
+
kind: EndpointKind;
|
|
18
|
+
platform: string;
|
|
19
|
+
appVersion: string;
|
|
20
|
+
availability: EndpointAvailability;
|
|
21
|
+
lastHeartbeatAt: number;
|
|
22
|
+
tools: RegisteredEndpointTool[];
|
|
23
|
+
}
|
|
24
|
+
export interface EndpointRegistration {
|
|
25
|
+
connection: EndpointConnectionSnapshot;
|
|
26
|
+
turnToken: string;
|
|
27
|
+
}
|
|
28
|
+
export declare function endpointToolRevision(descriptor: EndpointToolDescriptor): string;
|
|
29
|
+
export declare class EndpointRegistry {
|
|
30
|
+
private readonly policy;
|
|
31
|
+
private readonly connectionByEndpointId;
|
|
32
|
+
constructor(policy?: EndpointToolPolicy);
|
|
33
|
+
register(hello: EndpointHelloPayload, connectionId: string, transport: EndpointTransport, now?: number): EndpointRegistration;
|
|
34
|
+
remove(endpointId: string, connectionId: string): boolean;
|
|
35
|
+
heartbeat(endpointId: string, connectionId: string, availability: EndpointAvailability, now?: number): void;
|
|
36
|
+
get(endpointId: string): EndpointConnectionSnapshot | undefined;
|
|
37
|
+
isCurrentConnection(endpointId: string, connectionId: string): boolean;
|
|
38
|
+
list(): EndpointConnectionSnapshot[];
|
|
39
|
+
getTool(endpointId: string, toolName: string): RegisteredEndpointTool | undefined;
|
|
40
|
+
verifyTurnClaim(endpointId: string, turnToken: string): boolean;
|
|
41
|
+
send(endpointId: string, type: 'tool.invoke' | 'tool.cancel', payload: unknown): void;
|
|
42
|
+
disconnect(endpointId: string, code?: number, reason?: string): boolean;
|
|
43
|
+
closeAll(code?: number, reason?: string): void;
|
|
44
|
+
private requireConnection;
|
|
45
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { canonicalJson } from "../../packages/endpoint-tools-protocol/src/index.js";
|
|
2
|
+
import { EndpointToolPolicy } from "./policy.js";
|
|
3
|
+
import crypto from "node:crypto";
|
|
4
|
+
//#region src/endpoint-tools/registry.ts
|
|
5
|
+
function endpointToolRevision(descriptor) {
|
|
6
|
+
return crypto.createHash("sha256").update(canonicalJson(descriptor)).digest("hex");
|
|
7
|
+
}
|
|
8
|
+
function snapshot(connection) {
|
|
9
|
+
return {
|
|
10
|
+
principalId: connection.principalId,
|
|
11
|
+
endpointId: connection.endpointId,
|
|
12
|
+
connectionId: connection.connectionId,
|
|
13
|
+
displayName: connection.displayName,
|
|
14
|
+
kind: connection.kind,
|
|
15
|
+
platform: connection.platform,
|
|
16
|
+
appVersion: connection.appVersion,
|
|
17
|
+
availability: connection.availability,
|
|
18
|
+
lastHeartbeatAt: connection.lastHeartbeatAt,
|
|
19
|
+
tools: [...connection.toolByName.values()]
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
var EndpointRegistry = class {
|
|
23
|
+
connectionByEndpointId = /* @__PURE__ */ new Map();
|
|
24
|
+
constructor(policy = new EndpointToolPolicy()) {
|
|
25
|
+
this.policy = policy;
|
|
26
|
+
}
|
|
27
|
+
register(hello, connectionId, transport, now = Date.now()) {
|
|
28
|
+
const toolByName = /* @__PURE__ */ new Map();
|
|
29
|
+
for (const descriptor of hello.tools) {
|
|
30
|
+
this.policy.validateDescriptor(hello.kind, descriptor);
|
|
31
|
+
if (toolByName.has(descriptor.name)) throw new Error(`Endpoint catalog contains duplicate tool: ${descriptor.name}`);
|
|
32
|
+
toolByName.set(descriptor.name, {
|
|
33
|
+
descriptor,
|
|
34
|
+
revision: endpointToolRevision(descriptor)
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
const previous = this.connectionByEndpointId.get(hello.endpointId);
|
|
38
|
+
if (previous && previous.principalId !== hello.principalId) throw new Error("Endpoint instance belongs to another principal");
|
|
39
|
+
if (previous) previous.transport.close(4001, "Endpoint connected elsewhere");
|
|
40
|
+
const connection = {
|
|
41
|
+
principalId: hello.principalId,
|
|
42
|
+
endpointId: hello.endpointId,
|
|
43
|
+
connectionId,
|
|
44
|
+
displayName: hello.displayName,
|
|
45
|
+
kind: hello.kind,
|
|
46
|
+
platform: hello.platform,
|
|
47
|
+
appVersion: hello.appVersion,
|
|
48
|
+
availability: hello.availability,
|
|
49
|
+
lastHeartbeatAt: now,
|
|
50
|
+
tools: [],
|
|
51
|
+
transport,
|
|
52
|
+
turnToken: crypto.randomBytes(32).toString("base64url"),
|
|
53
|
+
toolByName
|
|
54
|
+
};
|
|
55
|
+
this.connectionByEndpointId.set(connection.endpointId, connection);
|
|
56
|
+
return {
|
|
57
|
+
connection: snapshot(connection),
|
|
58
|
+
turnToken: connection.turnToken
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
remove(endpointId, connectionId) {
|
|
62
|
+
const connection = this.connectionByEndpointId.get(endpointId);
|
|
63
|
+
if (!connection || connection.connectionId !== connectionId) return false;
|
|
64
|
+
this.connectionByEndpointId.delete(endpointId);
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
heartbeat(endpointId, connectionId, availability, now = Date.now()) {
|
|
68
|
+
const connection = this.requireConnection(endpointId, connectionId);
|
|
69
|
+
connection.availability = availability;
|
|
70
|
+
connection.lastHeartbeatAt = now;
|
|
71
|
+
}
|
|
72
|
+
get(endpointId) {
|
|
73
|
+
const connection = this.connectionByEndpointId.get(endpointId);
|
|
74
|
+
return connection ? snapshot(connection) : void 0;
|
|
75
|
+
}
|
|
76
|
+
isCurrentConnection(endpointId, connectionId) {
|
|
77
|
+
return this.connectionByEndpointId.get(endpointId)?.connectionId === connectionId;
|
|
78
|
+
}
|
|
79
|
+
list() {
|
|
80
|
+
return [...this.connectionByEndpointId.values()].map(snapshot);
|
|
81
|
+
}
|
|
82
|
+
getTool(endpointId, toolName) {
|
|
83
|
+
return this.connectionByEndpointId.get(endpointId)?.toolByName.get(toolName);
|
|
84
|
+
}
|
|
85
|
+
verifyTurnClaim(endpointId, turnToken) {
|
|
86
|
+
const connection = this.connectionByEndpointId.get(endpointId);
|
|
87
|
+
if (!connection || connection.transport.readyState !== 1) return false;
|
|
88
|
+
const expected = Buffer.from(connection.turnToken);
|
|
89
|
+
const actual = Buffer.from(turnToken);
|
|
90
|
+
return expected.length === actual.length && crypto.timingSafeEqual(expected, actual);
|
|
91
|
+
}
|
|
92
|
+
send(endpointId, type, payload) {
|
|
93
|
+
const connection = this.connectionByEndpointId.get(endpointId);
|
|
94
|
+
if (!connection || connection.transport.readyState !== 1) throw new Error(`Endpoint is offline: ${endpointId}`);
|
|
95
|
+
const message = {
|
|
96
|
+
protocolVersion: 1,
|
|
97
|
+
messageId: crypto.randomUUID(),
|
|
98
|
+
type,
|
|
99
|
+
sentAt: Date.now(),
|
|
100
|
+
payload
|
|
101
|
+
};
|
|
102
|
+
connection.transport.send(JSON.stringify(message));
|
|
103
|
+
}
|
|
104
|
+
disconnect(endpointId, code = 4003, reason = "Endpoint disconnected") {
|
|
105
|
+
const connection = this.connectionByEndpointId.get(endpointId);
|
|
106
|
+
if (!connection) return false;
|
|
107
|
+
connection.transport.close(code, reason);
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
closeAll(code = 1001, reason = "Gateway stopping") {
|
|
111
|
+
for (const connection of this.connectionByEndpointId.values()) connection.transport.close(code, reason);
|
|
112
|
+
this.connectionByEndpointId.clear();
|
|
113
|
+
}
|
|
114
|
+
requireConnection(endpointId, connectionId) {
|
|
115
|
+
const connection = this.connectionByEndpointId.get(endpointId);
|
|
116
|
+
if (!connection || connection.connectionId !== connectionId) throw new Error("Endpoint connection is no longer active");
|
|
117
|
+
return connection;
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
//#endregion
|
|
121
|
+
export { EndpointRegistry, endpointToolRevision };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type ClientEndpointMessage, type EndpointHelloPayload } from '@xopcai/endpoint-tools-protocol';
|
|
2
|
+
import { type EndpointAuthenticatorDeps } from './auth.js';
|
|
3
|
+
import { EndpointInvocationService, type EndpointInvocationAuditSink } from './invocation-service.js';
|
|
4
|
+
import { EndpointRegistry, type EndpointRegistration, type EndpointTransport } from './registry.js';
|
|
5
|
+
import { EndpointUploadService } from './upload-service.js';
|
|
6
|
+
export declare class EndpointToolRuntime {
|
|
7
|
+
readonly registry: EndpointRegistry;
|
|
8
|
+
readonly invocations: EndpointInvocationService;
|
|
9
|
+
readonly uploads: EndpointUploadService;
|
|
10
|
+
private readonly authenticator;
|
|
11
|
+
private closed;
|
|
12
|
+
constructor(options?: {
|
|
13
|
+
auth?: EndpointAuthenticatorDeps;
|
|
14
|
+
audit?: EndpointInvocationAuditSink;
|
|
15
|
+
uploadRoot?: string;
|
|
16
|
+
});
|
|
17
|
+
connect(hello: EndpointHelloPayload, connectionId: string, transport: EndpointTransport): EndpointRegistration;
|
|
18
|
+
handleMessage(endpointId: string, connectionId: string, message: ClientEndpointMessage): void;
|
|
19
|
+
touch(endpointId: string, connectionId: string): void;
|
|
20
|
+
remove(endpointId: string, connectionId: string): void;
|
|
21
|
+
disconnect(endpointId: string, reason: string): void;
|
|
22
|
+
close(): void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { resolveStateDir } from "../config/paths-state.js";
|
|
2
|
+
import { createLogger } from "../utils/logger/index.js";
|
|
3
|
+
import { init_logger } from "../utils/logger.js";
|
|
4
|
+
import { bindEndpointPrincipal, getEndpointPrincipal, touchEndpointPrincipal } from "../storage/sqlite/endpoint-principal-repository.js";
|
|
5
|
+
import { finishEndpointToolInvocationAudit, startEndpointToolInvocationAudit } from "../storage/sqlite/endpoint-tool-invocation-repository.js";
|
|
6
|
+
import "../storage/sqlite/index.js";
|
|
7
|
+
import { init_paths } from "../config/paths.js";
|
|
8
|
+
import { EndpointAuthenticator } from "./auth.js";
|
|
9
|
+
import { EndpointToolPolicy } from "./policy.js";
|
|
10
|
+
import { EndpointInvocationService } from "./invocation-service.js";
|
|
11
|
+
import { EndpointRegistry } from "./registry.js";
|
|
12
|
+
import { EndpointUploadService } from "./upload-service.js";
|
|
13
|
+
import { join } from "node:path";
|
|
14
|
+
//#region src/endpoint-tools/runtime.ts
|
|
15
|
+
init_paths();
|
|
16
|
+
init_logger();
|
|
17
|
+
const log = createLogger("EndpointTools");
|
|
18
|
+
const MAX_MESSAGE_CLOCK_SKEW_MS = 6e4;
|
|
19
|
+
var EndpointToolRuntime = class {
|
|
20
|
+
registry;
|
|
21
|
+
invocations;
|
|
22
|
+
uploads;
|
|
23
|
+
authenticator;
|
|
24
|
+
closed = false;
|
|
25
|
+
constructor(options = {}) {
|
|
26
|
+
const policy = new EndpointToolPolicy();
|
|
27
|
+
this.registry = new EndpointRegistry(policy);
|
|
28
|
+
this.authenticator = new EndpointAuthenticator(options.auth ?? {
|
|
29
|
+
getPrincipal: getEndpointPrincipal,
|
|
30
|
+
bindEndpoint: bindEndpointPrincipal,
|
|
31
|
+
touchPrincipal: touchEndpointPrincipal
|
|
32
|
+
});
|
|
33
|
+
this.uploads = new EndpointUploadService(options.uploadRoot ?? join(resolveStateDir(), "endpoint-tool-files"));
|
|
34
|
+
this.invocations = new EndpointInvocationService(this.registry, {
|
|
35
|
+
audit: options.audit ?? {
|
|
36
|
+
started: startEndpointToolInvocationAudit,
|
|
37
|
+
finished: finishEndpointToolInvocationAudit
|
|
38
|
+
},
|
|
39
|
+
uploads: this.uploads,
|
|
40
|
+
policy
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
connect(hello, connectionId, transport) {
|
|
44
|
+
if (this.closed) throw new Error("Endpoint runtime is closed");
|
|
45
|
+
this.authenticator.authenticate(hello);
|
|
46
|
+
const registration = this.registry.register(hello, connectionId, transport);
|
|
47
|
+
log.info({
|
|
48
|
+
endpointId: hello.endpointId,
|
|
49
|
+
connectionId,
|
|
50
|
+
kind: hello.kind
|
|
51
|
+
}, "Endpoint connected");
|
|
52
|
+
return registration;
|
|
53
|
+
}
|
|
54
|
+
handleMessage(endpointId, connectionId, message) {
|
|
55
|
+
if (!this.registry.isCurrentConnection(endpointId, connectionId)) throw new Error("Endpoint connection is no longer active");
|
|
56
|
+
if (Math.abs(Date.now() - message.sentAt) > MAX_MESSAGE_CLOCK_SKEW_MS) throw new Error("Endpoint message timestamp is outside the allowed window");
|
|
57
|
+
if (message.type === "endpoint.availability_changed") {
|
|
58
|
+
this.registry.heartbeat(endpointId, connectionId, message.payload.availability);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
this.invocations.handleMessage(endpointId, message);
|
|
62
|
+
}
|
|
63
|
+
touch(endpointId, connectionId) {
|
|
64
|
+
const endpoint = this.registry.get(endpointId);
|
|
65
|
+
if (endpoint?.connectionId === connectionId) this.registry.heartbeat(endpointId, connectionId, endpoint.availability);
|
|
66
|
+
}
|
|
67
|
+
remove(endpointId, connectionId) {
|
|
68
|
+
if (!this.registry.remove(endpointId, connectionId)) return;
|
|
69
|
+
this.invocations.failEndpoint(endpointId);
|
|
70
|
+
log.info({
|
|
71
|
+
endpointId,
|
|
72
|
+
connectionId
|
|
73
|
+
}, "Endpoint disconnected");
|
|
74
|
+
}
|
|
75
|
+
disconnect(endpointId, reason) {
|
|
76
|
+
this.registry.disconnect(endpointId, 4003, reason);
|
|
77
|
+
}
|
|
78
|
+
close() {
|
|
79
|
+
if (this.closed) return;
|
|
80
|
+
this.closed = true;
|
|
81
|
+
this.invocations.close();
|
|
82
|
+
this.registry.closeAll();
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
//#endregion
|
|
86
|
+
export { EndpointToolRuntime };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type EndpointToolContent } from '@xopcai/endpoint-tools-protocol';
|
|
2
|
+
export declare const ENDPOINT_UPLOAD_MAX_BYTES: number;
|
|
3
|
+
export interface EndpointUploadedFile {
|
|
4
|
+
fileId: string;
|
|
5
|
+
invocationId: string;
|
|
6
|
+
name: string;
|
|
7
|
+
mimeType: string;
|
|
8
|
+
size: number;
|
|
9
|
+
sha256: string;
|
|
10
|
+
path: string;
|
|
11
|
+
}
|
|
12
|
+
export interface EndpointUploadGrant {
|
|
13
|
+
path: string;
|
|
14
|
+
token: string;
|
|
15
|
+
maxBytes: number;
|
|
16
|
+
maxFiles: number;
|
|
17
|
+
expiresAt: number;
|
|
18
|
+
}
|
|
19
|
+
export declare class EndpointUploadError extends Error {
|
|
20
|
+
}
|
|
21
|
+
export declare class EndpointUploadService {
|
|
22
|
+
private readonly rootDir;
|
|
23
|
+
private readonly grants;
|
|
24
|
+
private readonly files;
|
|
25
|
+
constructor(rootDir: string);
|
|
26
|
+
createGrant(invocationId: string, endpointId: string, now?: number): EndpointUploadGrant;
|
|
27
|
+
upload(params: {
|
|
28
|
+
invocationId: string;
|
|
29
|
+
endpointId: string;
|
|
30
|
+
token: string;
|
|
31
|
+
name: string;
|
|
32
|
+
mimeType: string;
|
|
33
|
+
bytes: Uint8Array;
|
|
34
|
+
now?: number;
|
|
35
|
+
}): EndpointUploadedFile;
|
|
36
|
+
validateAndClose(invocationId: string, content: EndpointToolContent[]): void;
|
|
37
|
+
abort(invocationId: string): void;
|
|
38
|
+
getFile(fileId: string): EndpointUploadedFile | undefined;
|
|
39
|
+
readFile(fileId: string): Uint8Array | undefined;
|
|
40
|
+
private deleteFile;
|
|
41
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { ENDPOINT_MAX_FILE_BYTES } from "../../packages/endpoint-tools-protocol/src/index.js";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
4
|
+
import crypto from "node:crypto";
|
|
5
|
+
//#region src/endpoint-tools/upload-service.ts
|
|
6
|
+
const GRANT_TTL_MS = 5 * 6e4;
|
|
7
|
+
const ENDPOINT_UPLOAD_MAX_BYTES = ENDPOINT_MAX_FILE_BYTES;
|
|
8
|
+
const DEFAULT_MAX_FILES = 8;
|
|
9
|
+
var EndpointUploadError = class extends Error {};
|
|
10
|
+
var EndpointUploadService = class {
|
|
11
|
+
grants = /* @__PURE__ */ new Map();
|
|
12
|
+
files = /* @__PURE__ */ new Map();
|
|
13
|
+
constructor(rootDir) {
|
|
14
|
+
this.rootDir = rootDir;
|
|
15
|
+
mkdirSync(rootDir, {
|
|
16
|
+
recursive: true,
|
|
17
|
+
mode: 448
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
createGrant(invocationId, endpointId, now = Date.now()) {
|
|
21
|
+
const token = crypto.randomUUID();
|
|
22
|
+
const grant = {
|
|
23
|
+
invocationId,
|
|
24
|
+
endpointId,
|
|
25
|
+
token,
|
|
26
|
+
expiresAt: now + GRANT_TTL_MS,
|
|
27
|
+
maxBytes: ENDPOINT_UPLOAD_MAX_BYTES,
|
|
28
|
+
maxFiles: DEFAULT_MAX_FILES,
|
|
29
|
+
uploadedFileIds: []
|
|
30
|
+
};
|
|
31
|
+
this.grants.set(invocationId, grant);
|
|
32
|
+
return {
|
|
33
|
+
path: `/api/endpoint-tools/invocations/${encodeURIComponent(invocationId)}/files`,
|
|
34
|
+
token,
|
|
35
|
+
maxBytes: grant.maxBytes,
|
|
36
|
+
maxFiles: grant.maxFiles,
|
|
37
|
+
expiresAt: grant.expiresAt
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
upload(params) {
|
|
41
|
+
const grant = this.grants.get(params.invocationId);
|
|
42
|
+
const now = params.now ?? Date.now();
|
|
43
|
+
const expectedToken = grant ? Buffer.from(grant.token) : void 0;
|
|
44
|
+
const receivedToken = Buffer.from(params.token);
|
|
45
|
+
if (!grant || grant.endpointId !== params.endpointId || expectedToken?.byteLength !== receivedToken.byteLength || !crypto.timingSafeEqual(expectedToken, receivedToken)) throw new EndpointUploadError("Upload grant is invalid");
|
|
46
|
+
if (grant.expiresAt <= now) throw new EndpointUploadError("Upload grant expired");
|
|
47
|
+
if (grant.uploadedFileIds.length >= grant.maxFiles) throw new EndpointUploadError("Upload grant file limit exceeded");
|
|
48
|
+
if (params.bytes.byteLength > grant.maxBytes) throw new EndpointUploadError("Uploaded file is too large");
|
|
49
|
+
if (!params.name || params.name.length > 255 || !params.mimeType || params.mimeType.length > 255) throw new EndpointUploadError("Uploaded file metadata is invalid");
|
|
50
|
+
const fileId = crypto.randomUUID();
|
|
51
|
+
const path = join(this.rootDir, fileId);
|
|
52
|
+
const sha256 = crypto.createHash("sha256").update(params.bytes).digest("hex");
|
|
53
|
+
writeFileSync(path, params.bytes, {
|
|
54
|
+
flag: "wx",
|
|
55
|
+
mode: 384
|
|
56
|
+
});
|
|
57
|
+
const file = {
|
|
58
|
+
fileId,
|
|
59
|
+
invocationId: params.invocationId,
|
|
60
|
+
name: params.name,
|
|
61
|
+
mimeType: params.mimeType,
|
|
62
|
+
size: params.bytes.byteLength,
|
|
63
|
+
sha256,
|
|
64
|
+
path
|
|
65
|
+
};
|
|
66
|
+
this.files.set(fileId, file);
|
|
67
|
+
grant.uploadedFileIds.push(fileId);
|
|
68
|
+
return file;
|
|
69
|
+
}
|
|
70
|
+
validateAndClose(invocationId, content) {
|
|
71
|
+
const grant = this.grants.get(invocationId);
|
|
72
|
+
const referenced = content.filter((item) => item.type === "file");
|
|
73
|
+
for (const item of referenced) {
|
|
74
|
+
const file = this.files.get(item.fileId);
|
|
75
|
+
if (!file || file.invocationId !== invocationId || file.name !== item.name || file.mimeType !== item.mimeType || file.size !== item.size || file.sha256 !== item.sha256) throw new EndpointUploadError(`Endpoint file is not valid for invocation: ${item.fileId}`);
|
|
76
|
+
}
|
|
77
|
+
if (grant) {
|
|
78
|
+
for (const fileId of grant.uploadedFileIds) if (!referenced.some((item) => item.fileId === fileId)) this.deleteFile(fileId);
|
|
79
|
+
this.grants.delete(invocationId);
|
|
80
|
+
} else if (referenced.length > 0) throw new EndpointUploadError("Invocation did not have an upload grant");
|
|
81
|
+
}
|
|
82
|
+
abort(invocationId) {
|
|
83
|
+
const grant = this.grants.get(invocationId);
|
|
84
|
+
if (!grant) return;
|
|
85
|
+
for (const fileId of grant.uploadedFileIds) this.deleteFile(fileId);
|
|
86
|
+
this.grants.delete(invocationId);
|
|
87
|
+
}
|
|
88
|
+
getFile(fileId) {
|
|
89
|
+
return this.files.get(fileId);
|
|
90
|
+
}
|
|
91
|
+
readFile(fileId) {
|
|
92
|
+
const file = this.files.get(fileId);
|
|
93
|
+
return file ? readFileSync(file.path) : void 0;
|
|
94
|
+
}
|
|
95
|
+
deleteFile(fileId) {
|
|
96
|
+
const file = this.files.get(fileId);
|
|
97
|
+
if (!file) return;
|
|
98
|
+
rmSync(file.path, { force: true });
|
|
99
|
+
this.files.delete(fileId);
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
//#endregion
|
|
103
|
+
export { ENDPOINT_UPLOAD_MAX_BYTES, EndpointUploadError, EndpointUploadService };
|
|
@@ -17,6 +17,7 @@ export declare class ExtensionRegistryImpl implements ExtensionRegistry {
|
|
|
17
17
|
services: Map<string, ExtensionService>;
|
|
18
18
|
gatewayMethods: Map<string, GatewayMethodHandler>;
|
|
19
19
|
tools: Map<string, AgentTool<any, any>>;
|
|
20
|
+
private toolExtensionIds;
|
|
20
21
|
channelPlugins: ChannelPlugin[];
|
|
21
22
|
private cliRegistrations;
|
|
22
23
|
private reloadRegistrations;
|
|
@@ -36,10 +37,11 @@ export declare class ExtensionRegistryImpl implements ExtensionRegistry {
|
|
|
36
37
|
getService(id: string): ExtensionService | undefined;
|
|
37
38
|
addGatewayMethod(method: string, handler: GatewayMethodHandler): void;
|
|
38
39
|
getGatewayMethod(method: string): GatewayMethodHandler | undefined;
|
|
39
|
-
addTool(tool: any): void;
|
|
40
|
+
addTool(tool: any, extensionId: string): void;
|
|
40
41
|
removeTool(name: string): void;
|
|
41
42
|
getTools(): Map<string, any>;
|
|
42
43
|
getTool(name: string): any | undefined;
|
|
44
|
+
getToolExtensionId(name: string): string | undefined;
|
|
43
45
|
getAllTools(): any[];
|
|
44
46
|
addCliRegistration(reg: ExtensionCliRegistration): void;
|
|
45
47
|
getCliRegistrations(): readonly ExtensionCliRegistration[];
|