@graychennpm/codebridge 0.0.0-stage → 0.1.0
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 +14 -0
- package/LICENSE +21 -0
- package/README.md +217 -2
- package/README.zh-CN.md +222 -0
- package/apps/web/public/brand/agent-logo-carbon.svg +1 -0
- package/apps/web/public/brand/agent-logo.svg +1 -0
- package/docs/zh-CN/npm-release.md +77 -0
- package/node_modules/@codebridge/agent-registry/dist/index.d.ts +32 -0
- package/node_modules/@codebridge/agent-registry/dist/index.js +177 -0
- package/node_modules/@codebridge/agent-registry/dist/setup.d.ts +9 -0
- package/node_modules/@codebridge/agent-registry/dist/setup.js +115 -0
- package/node_modules/@codebridge/agent-registry/package.json +17 -0
- package/node_modules/@codebridge/backends/dist/acp/acp-active-session.d.ts +12 -0
- package/node_modules/@codebridge/backends/dist/acp/acp-active-session.js +57 -0
- package/node_modules/@codebridge/backends/dist/acp/acp-claude-activity.d.ts +9 -0
- package/node_modules/@codebridge/backends/dist/acp/acp-claude-activity.js +49 -0
- package/node_modules/@codebridge/backends/dist/acp/acp-config-options.d.ts +46 -0
- package/node_modules/@codebridge/backends/dist/acp/acp-config-options.js +220 -0
- package/node_modules/@codebridge/backends/dist/acp/acp-doctor.d.ts +3 -0
- package/node_modules/@codebridge/backends/dist/acp/acp-doctor.js +18 -0
- package/node_modules/@codebridge/backends/dist/acp/acp-event-mapper.d.ts +5 -0
- package/node_modules/@codebridge/backends/dist/acp/acp-event-mapper.js +136 -0
- package/node_modules/@codebridge/backends/dist/acp/acp-kill.d.ts +10 -0
- package/node_modules/@codebridge/backends/dist/acp/acp-kill.js +24 -0
- package/node_modules/@codebridge/backends/dist/acp/acp-race.d.ts +6 -0
- package/node_modules/@codebridge/backends/dist/acp/acp-race.js +29 -0
- package/node_modules/@codebridge/backends/dist/acp/acp-session-list.d.ts +32 -0
- package/node_modules/@codebridge/backends/dist/acp/acp-session-list.js +218 -0
- package/node_modules/@codebridge/backends/dist/acp/acp-session-pool.d.ts +85 -0
- package/node_modules/@codebridge/backends/dist/acp/acp-session-pool.js +165 -0
- package/node_modules/@codebridge/backends/dist/acp/acp-session-runner.d.ts +78 -0
- package/node_modules/@codebridge/backends/dist/acp/acp-session-runner.js +550 -0
- package/node_modules/@codebridge/backends/dist/acp/acp-spawn-profiles.d.ts +9 -0
- package/node_modules/@codebridge/backends/dist/acp/acp-spawn-profiles.js +28 -0
- package/node_modules/@codebridge/backends/dist/acp/headless-client.d.ts +19 -0
- package/node_modules/@codebridge/backends/dist/acp/headless-client.js +47 -0
- package/node_modules/@codebridge/backends/dist/acp/index.d.ts +9 -0
- package/node_modules/@codebridge/backends/dist/acp/index.js +9 -0
- package/node_modules/@codebridge/backends/dist/agent-setup.d.ts +60 -0
- package/node_modules/@codebridge/backends/dist/agent-setup.js +504 -0
- package/node_modules/@codebridge/backends/dist/attachment-prompt.d.ts +8 -0
- package/node_modules/@codebridge/backends/dist/attachment-prompt.js +28 -0
- package/node_modules/@codebridge/backends/dist/auth-error-hints.d.ts +8 -0
- package/node_modules/@codebridge/backends/dist/auth-error-hints.js +33 -0
- package/node_modules/@codebridge/backends/dist/codex-skill-commands.d.ts +3 -0
- package/node_modules/@codebridge/backends/dist/codex-skill-commands.js +88 -0
- package/node_modules/@codebridge/backends/dist/index.d.ts +18 -0
- package/node_modules/@codebridge/backends/dist/index.js +34 -0
- package/node_modules/@codebridge/backends/dist/pi-providers.d.ts +45 -0
- package/node_modules/@codebridge/backends/dist/pi-providers.js +148 -0
- package/node_modules/@codebridge/backends/dist/pi-session-runner.d.ts +85 -0
- package/node_modules/@codebridge/backends/dist/pi-session-runner.js +460 -0
- package/node_modules/@codebridge/backends/dist/provider-connection.d.ts +17 -0
- package/node_modules/@codebridge/backends/dist/provider-connection.js +99 -0
- package/node_modules/@codebridge/backends/dist/session-discovery.d.ts +23 -0
- package/node_modules/@codebridge/backends/dist/session-discovery.js +340 -0
- package/node_modules/@codebridge/backends/dist/skill-control-plane.d.ts +147 -0
- package/node_modules/@codebridge/backends/dist/skill-control-plane.js +832 -0
- package/node_modules/@codebridge/backends/package.json +22 -0
- package/node_modules/@codebridge/bridge/dist/alert-notification-rules.d.ts +14 -0
- package/node_modules/@codebridge/bridge/dist/alert-notification-rules.js +37 -0
- package/node_modules/@codebridge/bridge/dist/channel-config.d.ts +4 -0
- package/node_modules/@codebridge/bridge/dist/channel-config.js +9 -0
- package/node_modules/@codebridge/bridge/dist/channel-ingress.d.ts +5 -0
- package/node_modules/@codebridge/bridge/dist/channel-ingress.js +403 -0
- package/node_modules/@codebridge/bridge/dist/cli.d.ts +3 -0
- package/node_modules/@codebridge/bridge/dist/cli.js +581 -0
- package/node_modules/@codebridge/bridge/dist/deployment.d.ts +46 -0
- package/node_modules/@codebridge/bridge/dist/deployment.js +174 -0
- package/node_modules/@codebridge/bridge/dist/event-loop-lag.d.ts +19 -0
- package/node_modules/@codebridge/bridge/dist/event-loop-lag.js +33 -0
- package/node_modules/@codebridge/bridge/dist/feishu-alert-monitor.d.ts +70 -0
- package/node_modules/@codebridge/bridge/dist/feishu-alert-monitor.js +591 -0
- package/node_modules/@codebridge/bridge/dist/init-wizard.d.ts +52 -0
- package/node_modules/@codebridge/bridge/dist/init-wizard.js +571 -0
- package/node_modules/@codebridge/bridge/dist/mcp-api.d.ts +4 -0
- package/node_modules/@codebridge/bridge/dist/mcp-api.js +100 -0
- package/node_modules/@codebridge/bridge/dist/outbound-api.d.ts +31 -0
- package/node_modules/@codebridge/bridge/dist/outbound-api.js +184 -0
- package/node_modules/@codebridge/bridge/dist/outbound-publishers.d.ts +54 -0
- package/node_modules/@codebridge/bridge/dist/outbound-publishers.js +213 -0
- package/node_modules/@codebridge/bridge/dist/project-api.d.ts +4 -0
- package/node_modules/@codebridge/bridge/dist/project-api.js +161 -0
- package/node_modules/@codebridge/bridge/dist/secrets-command.d.ts +13 -0
- package/node_modules/@codebridge/bridge/dist/secrets-command.js +34 -0
- package/node_modules/@codebridge/bridge/dist/session-api.d.ts +26 -0
- package/node_modules/@codebridge/bridge/dist/session-api.js +1378 -0
- package/node_modules/@codebridge/bridge/dist/session-history-import.d.ts +24 -0
- package/node_modules/@codebridge/bridge/dist/session-history-import.js +82 -0
- package/node_modules/@codebridge/bridge/dist/session-runtime-api.d.ts +19 -0
- package/node_modules/@codebridge/bridge/dist/session-runtime-api.js +453 -0
- package/node_modules/@codebridge/bridge/dist/session-runtime-migration.d.ts +21 -0
- package/node_modules/@codebridge/bridge/dist/session-runtime-migration.js +43 -0
- package/node_modules/@codebridge/bridge/dist/session-runtime-types.d.ts +85 -0
- package/node_modules/@codebridge/bridge/dist/session-runtime-types.js +98 -0
- package/node_modules/@codebridge/bridge/dist/skill-api.d.ts +28 -0
- package/node_modules/@codebridge/bridge/dist/skill-api.js +129 -0
- package/node_modules/@codebridge/bridge/dist/startup-surfaces.d.ts +15 -0
- package/node_modules/@codebridge/bridge/dist/startup-surfaces.js +13 -0
- package/node_modules/@codebridge/bridge/dist/web-frontend.d.ts +8 -0
- package/node_modules/@codebridge/bridge/dist/web-frontend.js +76 -0
- package/node_modules/@codebridge/bridge/dist/work-item-api.d.ts +6 -0
- package/node_modules/@codebridge/bridge/dist/work-item-api.js +414 -0
- package/node_modules/@codebridge/bridge/package.json +28 -0
- package/node_modules/@codebridge/channel-feishu/dist/alert-reactions.d.ts +6 -0
- package/node_modules/@codebridge/channel-feishu/dist/alert-reactions.js +58 -0
- package/node_modules/@codebridge/channel-feishu/dist/alert-types.d.ts +35 -0
- package/node_modules/@codebridge/channel-feishu/dist/alert-types.js +2 -0
- package/node_modules/@codebridge/channel-feishu/dist/bridge.d.ts +130 -0
- package/node_modules/@codebridge/channel-feishu/dist/bridge.js +1231 -0
- package/node_modules/@codebridge/channel-feishu/dist/cardkit-writer.d.ts +48 -0
- package/node_modules/@codebridge/channel-feishu/dist/cardkit-writer.js +153 -0
- package/node_modules/@codebridge/channel-feishu/dist/chain-topics.d.ts +20 -0
- package/node_modules/@codebridge/channel-feishu/dist/chain-topics.js +35 -0
- package/node_modules/@codebridge/channel-feishu/dist/coalescing-card-writer.d.ts +12 -0
- package/node_modules/@codebridge/channel-feishu/dist/coalescing-card-writer.js +53 -0
- package/node_modules/@codebridge/channel-feishu/dist/delivery-reconciler.d.ts +19 -0
- package/node_modules/@codebridge/channel-feishu/dist/delivery-reconciler.js +53 -0
- package/node_modules/@codebridge/channel-feishu/dist/durable-markdown-card.d.ts +19 -0
- package/node_modules/@codebridge/channel-feishu/dist/durable-markdown-card.js +77 -0
- package/node_modules/@codebridge/channel-feishu/dist/feishu-extra-events.d.ts +27 -0
- package/node_modules/@codebridge/channel-feishu/dist/feishu-extra-events.js +24 -0
- package/node_modules/@codebridge/channel-feishu/dist/feishu-http.d.ts +4 -0
- package/node_modules/@codebridge/channel-feishu/dist/feishu-http.js +25 -0
- package/node_modules/@codebridge/channel-feishu/dist/feishu-inbound-context.d.ts +13 -0
- package/node_modules/@codebridge/channel-feishu/dist/feishu-inbound-context.js +45 -0
- package/node_modules/@codebridge/channel-feishu/dist/feishu-inbound-media.d.ts +22 -0
- package/node_modules/@codebridge/channel-feishu/dist/feishu-inbound-media.js +273 -0
- package/node_modules/@codebridge/channel-feishu/dist/feishu-mention-gate.d.ts +13 -0
- package/node_modules/@codebridge/channel-feishu/dist/feishu-mention-gate.js +22 -0
- package/node_modules/@codebridge/channel-feishu/dist/feishu-outbound-file.d.ts +12 -0
- package/node_modules/@codebridge/channel-feishu/dist/feishu-outbound-file.js +38 -0
- package/node_modules/@codebridge/channel-feishu/dist/feishu-quoted-message.d.ts +30 -0
- package/node_modules/@codebridge/channel-feishu/dist/feishu-quoted-message.js +183 -0
- package/node_modules/@codebridge/channel-feishu/dist/index.d.ts +7 -0
- package/node_modules/@codebridge/channel-feishu/dist/index.js +3 -0
- package/node_modules/@codebridge/channel-feishu/dist/redacting-logger.d.ts +17 -0
- package/node_modules/@codebridge/channel-feishu/dist/redacting-logger.js +41 -0
- package/node_modules/@codebridge/channel-feishu/dist/run-status.d.ts +39 -0
- package/node_modules/@codebridge/channel-feishu/dist/run-status.js +166 -0
- package/node_modules/@codebridge/channel-feishu/dist/session-watcher.d.ts +98 -0
- package/node_modules/@codebridge/channel-feishu/dist/session-watcher.js +655 -0
- package/node_modules/@codebridge/channel-feishu/package.json +19 -0
- package/node_modules/@codebridge/channel-telegram/dist/coalescing-message-writer.d.ts +14 -0
- package/node_modules/@codebridge/channel-telegram/dist/coalescing-message-writer.js +56 -0
- package/node_modules/@codebridge/channel-telegram/dist/index.d.ts +3 -0
- package/node_modules/@codebridge/channel-telegram/dist/index.js +3 -0
- package/node_modules/@codebridge/channel-telegram/dist/telegram-api.d.ts +62 -0
- package/node_modules/@codebridge/channel-telegram/dist/telegram-api.js +72 -0
- package/node_modules/@codebridge/channel-telegram/dist/telegram-bridge.d.ts +64 -0
- package/node_modules/@codebridge/channel-telegram/dist/telegram-bridge.js +469 -0
- package/node_modules/@codebridge/channel-telegram/dist/telegram-session-watcher.d.ts +41 -0
- package/node_modules/@codebridge/channel-telegram/dist/telegram-session-watcher.js +184 -0
- package/node_modules/@codebridge/channel-telegram/package.json +18 -0
- package/node_modules/@codebridge/core/dist/config-schema.d.ts +1195 -0
- package/node_modules/@codebridge/core/dist/config-schema.js +293 -0
- package/node_modules/@codebridge/core/dist/config-store.d.ts +48 -0
- package/node_modules/@codebridge/core/dist/config-store.js +207 -0
- package/node_modules/@codebridge/core/dist/index.d.ts +11 -0
- package/node_modules/@codebridge/core/dist/index.js +10 -0
- package/node_modules/@codebridge/core/dist/json-file-store.d.ts +16 -0
- package/node_modules/@codebridge/core/dist/json-file-store.js +46 -0
- package/node_modules/@codebridge/core/dist/mcp-types.d.ts +7 -0
- package/node_modules/@codebridge/core/dist/mcp-types.js +2 -0
- package/node_modules/@codebridge/core/dist/mentions.d.ts +36 -0
- package/node_modules/@codebridge/core/dist/mentions.js +138 -0
- package/node_modules/@codebridge/core/dist/secret-migration.d.ts +14 -0
- package/node_modules/@codebridge/core/dist/secret-migration.js +55 -0
- package/node_modules/@codebridge/core/dist/secret-refs.d.ts +34 -0
- package/node_modules/@codebridge/core/dist/secret-refs.js +142 -0
- package/node_modules/@codebridge/core/dist/session-event-wire.d.ts +17 -0
- package/node_modules/@codebridge/core/dist/session-event-wire.js +28 -0
- package/node_modules/@codebridge/core/dist/types.d.ts +363 -0
- package/node_modules/@codebridge/core/dist/types.js +22 -0
- package/node_modules/@codebridge/core/dist/workspace-key.d.ts +11 -0
- package/node_modules/@codebridge/core/dist/workspace-key.js +25 -0
- package/node_modules/@codebridge/core/package.json +22 -0
- package/node_modules/@codebridge/mcp-runtime/dist/.tsbuildinfo +1 -0
- package/node_modules/@codebridge/mcp-runtime/dist/index.d.ts +92 -0
- package/node_modules/@codebridge/mcp-runtime/dist/index.js +377 -0
- package/node_modules/@codebridge/mcp-runtime/package.json +19 -0
- package/node_modules/@codebridge/policy/dist/capability-runtime.d.ts +123 -0
- package/node_modules/@codebridge/policy/dist/capability-runtime.js +195 -0
- package/node_modules/@codebridge/policy/dist/demo-capabilities.d.ts +4 -0
- package/node_modules/@codebridge/policy/dist/demo-capabilities.js +134 -0
- package/node_modules/@codebridge/policy/dist/equity-capabilities.d.ts +8 -0
- package/node_modules/@codebridge/policy/dist/equity-capabilities.js +35 -0
- package/node_modules/@codebridge/policy/dist/index.d.ts +107 -0
- package/node_modules/@codebridge/policy/dist/index.js +317 -0
- package/node_modules/@codebridge/policy/package.json +17 -0
- package/node_modules/@codebridge/project-catalog/dist/index.d.ts +145 -0
- package/node_modules/@codebridge/project-catalog/dist/index.js +699 -0
- package/node_modules/@codebridge/project-catalog/package.json +18 -0
- package/node_modules/@codebridge/router/dist/channel-stream-projector.d.ts +19 -0
- package/node_modules/@codebridge/router/dist/channel-stream-projector.js +68 -0
- package/node_modules/@codebridge/router/dist/command-help.d.ts +14 -0
- package/node_modules/@codebridge/router/dist/command-help.js +151 -0
- package/node_modules/@codebridge/router/dist/feishu-stream-presenter.d.ts +18 -0
- package/node_modules/@codebridge/router/dist/feishu-stream-presenter.js +193 -0
- package/node_modules/@codebridge/router/dist/index.d.ts +9 -0
- package/node_modules/@codebridge/router/dist/index.js +9 -0
- package/node_modules/@codebridge/router/dist/model-effort.d.ts +5 -0
- package/node_modules/@codebridge/router/dist/model-effort.js +33 -0
- package/node_modules/@codebridge/router/dist/orchestrator.d.ts +56 -0
- package/node_modules/@codebridge/router/dist/orchestrator.js +290 -0
- package/node_modules/@codebridge/router/dist/session-list-format.d.ts +19 -0
- package/node_modules/@codebridge/router/dist/session-list-format.js +97 -0
- package/node_modules/@codebridge/router/dist/session-rotation.d.ts +9 -0
- package/node_modules/@codebridge/router/dist/session-rotation.js +31 -0
- package/node_modules/@codebridge/router/dist/session-router.d.ts +59 -0
- package/node_modules/@codebridge/router/dist/session-router.js +182 -0
- package/node_modules/@codebridge/router/dist/slash-commands.d.ts +78 -0
- package/node_modules/@codebridge/router/dist/slash-commands.js +874 -0
- package/node_modules/@codebridge/router/package.json +18 -0
- package/node_modules/@codebridge/run-executor/dist/agent-event-aggregator.d.ts +18 -0
- package/node_modules/@codebridge/run-executor/dist/agent-event-aggregator.js +88 -0
- package/node_modules/@codebridge/run-executor/dist/index.d.ts +55 -0
- package/node_modules/@codebridge/run-executor/dist/index.js +754 -0
- package/node_modules/@codebridge/run-executor/dist/run-heartbeat.d.ts +14 -0
- package/node_modules/@codebridge/run-executor/dist/run-heartbeat.js +24 -0
- package/node_modules/@codebridge/run-executor/package.json +20 -0
- package/node_modules/@codebridge/runner-client/dist/index.d.ts +142 -0
- package/node_modules/@codebridge/runner-client/dist/index.js +439 -0
- package/node_modules/@codebridge/runner-client/package.json +18 -0
- package/node_modules/@codebridge/runner-host/dist/cli.d.ts +3 -0
- package/node_modules/@codebridge/runner-host/dist/cli.js +58 -0
- package/node_modules/@codebridge/runner-host/dist/codex-session-ownership.d.ts +13 -0
- package/node_modules/@codebridge/runner-host/dist/codex-session-ownership.js +79 -0
- package/node_modules/@codebridge/runner-host/dist/deployment-mcp-server.d.ts +10 -0
- package/node_modules/@codebridge/runner-host/dist/deployment-mcp-server.js +54 -0
- package/node_modules/@codebridge/runner-host/dist/fcb-script.d.ts +3 -0
- package/node_modules/@codebridge/runner-host/dist/fcb-script.js +99 -0
- package/node_modules/@codebridge/runner-host/dist/index.d.ts +3 -0
- package/node_modules/@codebridge/runner-host/dist/index.js +2 -0
- package/node_modules/@codebridge/runner-host/dist/materialize-attachments.d.ts +4 -0
- package/node_modules/@codebridge/runner-host/dist/materialize-attachments.js +62 -0
- package/node_modules/@codebridge/runner-host/dist/server.d.ts +150 -0
- package/node_modules/@codebridge/runner-host/dist/server.js +1295 -0
- package/node_modules/@codebridge/runner-host/dist/session-lease.d.ts +12 -0
- package/node_modules/@codebridge/runner-host/dist/session-lease.js +146 -0
- package/node_modules/@codebridge/runner-host/package.json +26 -0
- package/node_modules/@codebridge/session-catalog/dist/index.d.ts +124 -0
- package/node_modules/@codebridge/session-catalog/dist/index.js +411 -0
- package/node_modules/@codebridge/session-catalog/package.json +17 -0
- package/node_modules/@codebridge/session-coordinator/dist/coordinator.d.ts +111 -0
- package/node_modules/@codebridge/session-coordinator/dist/coordinator.js +364 -0
- package/node_modules/@codebridge/session-coordinator/dist/index.d.ts +5 -0
- package/node_modules/@codebridge/session-coordinator/dist/index.js +5 -0
- package/node_modules/@codebridge/session-coordinator/dist/lease.d.ts +14 -0
- package/node_modules/@codebridge/session-coordinator/dist/lease.js +26 -0
- package/node_modules/@codebridge/session-coordinator/dist/queued-claim.d.ts +20 -0
- package/node_modules/@codebridge/session-coordinator/dist/queued-claim.js +45 -0
- package/node_modules/@codebridge/session-coordinator/dist/recovery.d.ts +31 -0
- package/node_modules/@codebridge/session-coordinator/dist/recovery.js +114 -0
- package/node_modules/@codebridge/session-coordinator/package.json +17 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/node_modules/@codebridge/web/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/node_modules/@codebridge/web/dist/assets/abnfDiagram-N423BO3Z-C-JdFv0U.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/arc-DsNROjzU.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/architecture-TIHT7OUA-ZEBHG2JZ.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/architectureDiagram-T3A2C74G-OsrxcwPM.js +36 -0
- package/node_modules/@codebridge/web/dist/assets/array-BifhSqXX.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/blockDiagram-VBNYF7ZC-DRgfNeNW.js +132 -0
- package/node_modules/@codebridge/web/dist/assets/c4Diagram-5PPSVZJV-BtOGKTh8.js +10 -0
- package/node_modules/@codebridge/web/dist/assets/channel-MhXyjxUS.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/chunk-2GRJ4B5K-Dy1gJ7sY.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/chunk-2Q5K7J3B-C1jixKkw.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/chunk-4I5QYGJK-1pOLR_SG.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/chunk-5RXB4S5H-CP43rgsO.js +231 -0
- package/node_modules/@codebridge/web/dist/assets/chunk-5VM5RSS4-ZNzvKenW.js +15 -0
- package/node_modules/@codebridge/web/dist/assets/chunk-6Q2QTUOP-Bi3Xrp6W.js +88 -0
- package/node_modules/@codebridge/web/dist/assets/chunk-7BUUIJ7U-Bb538aSH.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/chunk-7Z6QIM7H-CILAW2Nk.js +10 -0
- package/node_modules/@codebridge/web/dist/assets/chunk-GF5L2VYU-CAp09yhq.js +206 -0
- package/node_modules/@codebridge/web/dist/assets/chunk-I66GZJ75-B_rJXmNu.js +128 -0
- package/node_modules/@codebridge/web/dist/assets/chunk-JQJVKLGR-OVeOJFCx.js +156 -0
- package/node_modules/@codebridge/web/dist/assets/chunk-JWPE2WC7-DVXcaiue.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/chunk-KBJHAD2P-uaupp0k5.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/chunk-KEIR6QF5-BICK3FdT.js +161 -0
- package/node_modules/@codebridge/web/dist/assets/chunk-NSK5VX7P-fIHF5wwn.js +2 -0
- package/node_modules/@codebridge/web/dist/assets/chunk-QR6OTTB3-DxkJuF2b.js +62 -0
- package/node_modules/@codebridge/web/dist/assets/chunk-RYQCIY6F-CC5j3u-X.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/chunk-UBXNYLIW-DB35O-6R.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/chunk-W5SLKNZC-bkRBsbq-.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/chunk-WRU74C26-DwvEoD-1.js +70 -0
- package/node_modules/@codebridge/web/dist/assets/chunk-XXDRQBXY-DRyYA-HY.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/classDiagram-JCYQIIEL-B8r7z8ii.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/classDiagram-v2-OCEON4UE-B8r7z8ii.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/cose-bilkent-JH36ORCC-CLkwlrX7.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/cynefin-VYW2F7L2-C3_Llw02.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/cynefinDiagram-MW4NZA55-D5v7UnJy.js +62 -0
- package/node_modules/@codebridge/web/dist/assets/cytoscape.esm-B-NFISlW.js +321 -0
- package/node_modules/@codebridge/web/dist/assets/dagre-Buvkdvvj.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/dagre-VZM6K2ZE-Cr0IibwW.js +4 -0
- package/node_modules/@codebridge/web/dist/assets/defaultLocale-BFoDCU3G.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/diagram-7IWD3JNH-CpQXDIzA.js +30 -0
- package/node_modules/@codebridge/web/dist/assets/diagram-B4RE2ZJO-VaOkH0Ya.js +3 -0
- package/node_modules/@codebridge/web/dist/assets/diagram-LBJQPF4R-D0iXyNks.js +24 -0
- package/node_modules/@codebridge/web/dist/assets/diagram-Q27KOJAE-CtqYk01P.js +24 -0
- package/node_modules/@codebridge/web/dist/assets/diagram-UB23O5K3-CFnd3H1_.js +41 -0
- package/node_modules/@codebridge/web/dist/assets/dist-D2L7nRdk.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/ebnfDiagram-BXEA7PRR-B0GIbJYt.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/erDiagram-JOGREHBK-BApaLGVA.js +85 -0
- package/node_modules/@codebridge/web/dist/assets/eventmodeling-45OFAUF4-DqGGjcld.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/flowDiagram-UKHOOZJN-I_qlizLH.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/ganttDiagram-PKOTCBZU-B-QZ-J82.js +292 -0
- package/node_modules/@codebridge/web/dist/assets/gitGraph-TEB2WS4Q-DK2SJ2Ne.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/gitGraphDiagram-DS77QQ5N-B6Z-pu0D.js +106 -0
- package/node_modules/@codebridge/web/dist/assets/graphlib-DS17s2tU.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/index-8BzpyygS.js +559 -0
- package/node_modules/@codebridge/web/dist/assets/index-Bzaz89LE.css +1 -0
- package/node_modules/@codebridge/web/dist/assets/info-DKCQHKI2-CGWxt_Py.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/infoDiagram-6WML65LV-77XjrPZs.js +2 -0
- package/node_modules/@codebridge/web/dist/assets/init-C-OQMol4.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/ishikawaDiagram-WSZJBQD7-P1bZAz2x.js +70 -0
- package/node_modules/@codebridge/web/dist/assets/journeyDiagram-NVQOT4AX-C4rwMcBY.js +139 -0
- package/node_modules/@codebridge/web/dist/assets/kanban-definition-27J2QSJJ-mtw4a9bc.js +89 -0
- package/node_modules/@codebridge/web/dist/assets/line-DP4RkYqm.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/linear-DMg3PPio.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/map-BaFkSB1l.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/mermaid-parser.core-HY84kHw1.js +7 -0
- package/node_modules/@codebridge/web/dist/assets/mermaid.core-DdgCdsnM.js +42 -0
- package/node_modules/@codebridge/web/dist/assets/mindmap-definition-FAOFIHXS-Cw1EnbhZ.js +96 -0
- package/node_modules/@codebridge/web/dist/assets/ordinal-BDEzSJ7C.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/packet-7NZHBO7P-CEbrbJH3.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/path-fybaL0A-.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/pegDiagram-VL7TDLO6-CEc1Gedb.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/pie-RZYD4A2V-DPXVs-IW.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/pieDiagram-7S7Q4E2Y-hoQeGMFH.js +39 -0
- package/node_modules/@codebridge/web/dist/assets/quadrantDiagram-CIZ2JOQS-C-Nmxx0f.js +7 -0
- package/node_modules/@codebridge/web/dist/assets/radar-I7S5WNFK-BVd3X3Pd.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/railroad-3IZDKUUU-CxLxzr_v.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/railroad-abnf-AHOZXSZD-MA1zPI84.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/railroad-ebnf-EBAXGLYW-Bqug_umD.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/railroad-peg-LSFZ7HO6-DRcRFwpq.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/railroadDiagram-AXF67PYL-B007ZkL9.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/requirementDiagram-LRYGKXZP-LrTCcEi5.js +84 -0
- package/node_modules/@codebridge/web/dist/assets/rough.esm-Dy-Kn_BL.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/sankeyDiagram-W5VNT64P-Ch4mzHck.js +40 -0
- package/node_modules/@codebridge/web/dist/assets/sequenceDiagram-SI44F4Z6-CHg4OzLX.js +162 -0
- package/node_modules/@codebridge/web/dist/assets/sizeCapture-X5ZJPWSS-B0uUizjq.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/src-BrO6_odD.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/stateDiagram-OKZ733FA-7cVkr5nR.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/stateDiagram-v2-UEYNNEHI-CTy_mAXb.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/swimlanes-SLNWSIFB-BwSVF5qy.js +2 -0
- package/node_modules/@codebridge/web/dist/assets/swimlanesDiagram-ULZ7WXOC-BBQnfZ1j.js +8 -0
- package/node_modules/@codebridge/web/dist/assets/timeline-definition-Z64GVDOM-BaHEkVDV.js +120 -0
- package/node_modules/@codebridge/web/dist/assets/treeView-QDETBFTQ-CF0kLN62.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/treemap-6X3UGDF4-BB8A8uux.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/vennDiagram-T6HMQDX7-BFK12Iro.js +34 -0
- package/node_modules/@codebridge/web/dist/assets/wardley-OPB4EBWU-C_3y61zk.js +1 -0
- package/node_modules/@codebridge/web/dist/assets/wardleyDiagram-T6FBY63Y-W2oGu4WK.js +78 -0
- package/node_modules/@codebridge/web/dist/assets/xychartDiagram-ELKLHX3M-BiVRnbvz.js +7 -0
- package/node_modules/@codebridge/web/dist/brand/agent-logo-carbon.svg +1 -0
- package/node_modules/@codebridge/web/dist/brand/agent-logo.svg +1 -0
- package/node_modules/@codebridge/web/dist/brand/agnet-logo-carbon.svg +1 -0
- package/node_modules/@codebridge/web/dist/brand/agnet-logo.svg +1 -0
- package/node_modules/@codebridge/web/dist/brand/agnet-mark-carbon.svg +1 -0
- package/node_modules/@codebridge/web/dist/brand/agnet-mark.svg +1 -0
- package/node_modules/@codebridge/web/dist/fonts/CommitMono-400-Regular.otf +0 -0
- package/node_modules/@codebridge/web/dist/fonts/CommitMono-700-Regular.otf +0 -0
- package/node_modules/@codebridge/web/dist/fonts/CommitMono-OFL.txt +21 -0
- package/node_modules/@codebridge/web/dist/fonts/DepartureMono-OFL.txt +21 -0
- package/node_modules/@codebridge/web/dist/fonts/DepartureMono-Regular.woff2 +0 -0
- package/node_modules/@codebridge/web/dist/index.html +25 -0
- package/node_modules/@codebridge/web/package.json +7 -0
- package/node_modules/@codebridge/work-items/dist/index.d.ts +371 -0
- package/node_modules/@codebridge/work-items/dist/index.js +1784 -0
- package/node_modules/@codebridge/work-items/dist/session-projector.d.ts +4 -0
- package/node_modules/@codebridge/work-items/dist/session-projector.js +506 -0
- package/node_modules/@codebridge/work-items/dist/session-runtime.d.ts +274 -0
- package/node_modules/@codebridge/work-items/dist/session-runtime.js +1103 -0
- package/node_modules/@codebridge/work-items/dist/session-schema.d.ts +9 -0
- package/node_modules/@codebridge/work-items/dist/session-schema.js +292 -0
- package/node_modules/@codebridge/work-items/package.json +20 -0
- package/package.json +75 -4
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { createRequire } from "node:module";
|
|
5
|
+
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
6
|
+
import { StdioClientTransport, getDefaultEnvironment, } from "@modelcontextprotocol/sdk/client/stdio.js";
|
|
7
|
+
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
8
|
+
import { McpCapabilityAdapter, } from "@codebridge/policy";
|
|
9
|
+
const { DatabaseSync } = createRequire(import.meta.url)("node:sqlite");
|
|
10
|
+
export class SdkMcpClientFactory {
|
|
11
|
+
clientInfo;
|
|
12
|
+
constructor(clientInfo = {
|
|
13
|
+
name: "codebridge",
|
|
14
|
+
version: "0.1.0",
|
|
15
|
+
}) {
|
|
16
|
+
this.clientInfo = clientInfo;
|
|
17
|
+
}
|
|
18
|
+
async connect(server) {
|
|
19
|
+
validateServer(server);
|
|
20
|
+
const client = new Client(this.clientInfo, { capabilities: {} });
|
|
21
|
+
const transport = server.transport === "stdio"
|
|
22
|
+
? new StdioClientTransport({
|
|
23
|
+
command: server.command,
|
|
24
|
+
args: server.args,
|
|
25
|
+
env: inheritedEnvironment(server.env),
|
|
26
|
+
stderr: "pipe",
|
|
27
|
+
})
|
|
28
|
+
: new StreamableHTTPClientTransport(new URL(server.url));
|
|
29
|
+
await client.connect(transport);
|
|
30
|
+
return {
|
|
31
|
+
health: async () => { await client.ping(); },
|
|
32
|
+
listTools: async () => {
|
|
33
|
+
const tools = [];
|
|
34
|
+
let cursor;
|
|
35
|
+
do {
|
|
36
|
+
const result = await client.listTools(cursor ? { cursor } : undefined);
|
|
37
|
+
tools.push(...result.tools.map((tool) => ({
|
|
38
|
+
name: tool.name,
|
|
39
|
+
description: tool.description,
|
|
40
|
+
inputSchema: tool.inputSchema,
|
|
41
|
+
})));
|
|
42
|
+
cursor = result.nextCursor;
|
|
43
|
+
} while (cursor);
|
|
44
|
+
return tools;
|
|
45
|
+
},
|
|
46
|
+
callTool: async (tool, input, context) => client.callTool({ name: tool, arguments: input }, undefined, { signal: context.signal }),
|
|
47
|
+
close: async () => { await client.close(); },
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
export class McpServerRegistry {
|
|
52
|
+
database;
|
|
53
|
+
constructor(databasePath = ":memory:") {
|
|
54
|
+
if (databasePath !== ":memory:")
|
|
55
|
+
fs.mkdirSync(path.dirname(databasePath), { recursive: true });
|
|
56
|
+
this.database = new DatabaseSync(databasePath);
|
|
57
|
+
this.database.exec(`
|
|
58
|
+
CREATE TABLE IF NOT EXISTS mcp_servers (
|
|
59
|
+
id TEXT PRIMARY KEY,
|
|
60
|
+
transport TEXT NOT NULL,
|
|
61
|
+
command TEXT,
|
|
62
|
+
args TEXT NOT NULL DEFAULT '[]',
|
|
63
|
+
url TEXT,
|
|
64
|
+
env TEXT NOT NULL DEFAULT '[]',
|
|
65
|
+
revision TEXT,
|
|
66
|
+
enabled INTEGER NOT NULL DEFAULT 1,
|
|
67
|
+
health_status TEXT NOT NULL DEFAULT 'unknown',
|
|
68
|
+
health_checked_at TEXT,
|
|
69
|
+
health_error TEXT,
|
|
70
|
+
updated_at TEXT NOT NULL
|
|
71
|
+
);
|
|
72
|
+
CREATE TABLE IF NOT EXISTS mcp_tools (
|
|
73
|
+
server_id TEXT NOT NULL,
|
|
74
|
+
tool_name TEXT NOT NULL,
|
|
75
|
+
description TEXT,
|
|
76
|
+
input_schema TEXT NOT NULL,
|
|
77
|
+
revision TEXT NOT NULL,
|
|
78
|
+
observed_at TEXT NOT NULL,
|
|
79
|
+
PRIMARY KEY (server_id, tool_name)
|
|
80
|
+
);
|
|
81
|
+
CREATE TABLE IF NOT EXISTS mcp_capability_candidates (
|
|
82
|
+
id TEXT PRIMARY KEY,
|
|
83
|
+
server_id TEXT NOT NULL,
|
|
84
|
+
tool_name TEXT NOT NULL,
|
|
85
|
+
description TEXT,
|
|
86
|
+
input_schema TEXT NOT NULL,
|
|
87
|
+
suggested_capability_id TEXT NOT NULL,
|
|
88
|
+
adapter_id TEXT NOT NULL,
|
|
89
|
+
risk TEXT NOT NULL,
|
|
90
|
+
revision TEXT NOT NULL,
|
|
91
|
+
status TEXT NOT NULL,
|
|
92
|
+
observed_at TEXT NOT NULL,
|
|
93
|
+
reviewed_at TEXT
|
|
94
|
+
);
|
|
95
|
+
CREATE INDEX IF NOT EXISTS mcp_candidates_server_tool
|
|
96
|
+
ON mcp_capability_candidates (server_id, tool_name, status);
|
|
97
|
+
`);
|
|
98
|
+
}
|
|
99
|
+
registerServer(definition) {
|
|
100
|
+
validateServer(definition);
|
|
101
|
+
const now = new Date().toISOString();
|
|
102
|
+
this.database.prepare(`
|
|
103
|
+
INSERT INTO mcp_servers (
|
|
104
|
+
id, transport, command, args, url, env, revision, enabled,
|
|
105
|
+
health_status, health_checked_at, health_error, updated_at
|
|
106
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, 'unknown', NULL, NULL, ?)
|
|
107
|
+
ON CONFLICT(id) DO UPDATE SET transport = excluded.transport,
|
|
108
|
+
command = excluded.command, args = excluded.args, url = excluded.url,
|
|
109
|
+
env = excluded.env, revision = excluded.revision, enabled = excluded.enabled,
|
|
110
|
+
updated_at = excluded.updated_at
|
|
111
|
+
`).run(definition.id, definition.transport, definition.command ?? null, JSON.stringify(definition.args ?? []), definition.url ?? null, JSON.stringify(definition.env ?? []), definition.revision ?? null, definition.enabled === false ? 0 : 1, now);
|
|
112
|
+
return this.getServer(definition.id);
|
|
113
|
+
}
|
|
114
|
+
getServer(id) {
|
|
115
|
+
const row = this.database.prepare("SELECT * FROM mcp_servers WHERE id = ?").get(id);
|
|
116
|
+
return row ? toServer(row) : undefined;
|
|
117
|
+
}
|
|
118
|
+
listServers() {
|
|
119
|
+
return this.database.prepare("SELECT * FROM mcp_servers ORDER BY id ASC").all().map(toServer);
|
|
120
|
+
}
|
|
121
|
+
recordHealth(id, status, error = null) {
|
|
122
|
+
if (!this.getServer(id))
|
|
123
|
+
throw new Error(`MCP server not found: ${id}`);
|
|
124
|
+
this.database.prepare("UPDATE mcp_servers SET health_status = ?, health_checked_at = ?, health_error = ?, updated_at = ? WHERE id = ?").run(status, new Date().toISOString(), error, new Date().toISOString(), id);
|
|
125
|
+
return this.getServer(id);
|
|
126
|
+
}
|
|
127
|
+
recordTools(serverId, tools) {
|
|
128
|
+
if (!this.getServer(serverId))
|
|
129
|
+
throw new Error(`MCP server not found: ${serverId}`);
|
|
130
|
+
const normalized = tools.map(normalizeTool);
|
|
131
|
+
const currentNames = new Set(normalized.map((tool) => tool.name));
|
|
132
|
+
const now = new Date().toISOString();
|
|
133
|
+
this.database.exec("BEGIN IMMEDIATE");
|
|
134
|
+
try {
|
|
135
|
+
const existingTools = this.database.prepare("SELECT tool_name FROM mcp_tools WHERE server_id = ?").all(serverId);
|
|
136
|
+
for (const tool of existingTools) {
|
|
137
|
+
if (!currentNames.has(String(tool.tool_name))) {
|
|
138
|
+
this.database.prepare("UPDATE mcp_capability_candidates SET status = 'stale', reviewed_at = ? WHERE server_id = ? AND tool_name = ? AND status IN ('candidate', 'accepted')").run(now, serverId, String(tool.tool_name));
|
|
139
|
+
this.database.prepare("DELETE FROM mcp_tools WHERE server_id = ? AND tool_name = ?").run(serverId, String(tool.tool_name));
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
const server = this.getServer(serverId);
|
|
143
|
+
for (const tool of normalized) {
|
|
144
|
+
const revision = toolRevision(server, tool);
|
|
145
|
+
this.database.prepare(`
|
|
146
|
+
INSERT INTO mcp_tools (server_id, tool_name, description, input_schema, revision, observed_at)
|
|
147
|
+
VALUES (?, ?, ?, ?, ?, ?)
|
|
148
|
+
ON CONFLICT(server_id, tool_name) DO UPDATE SET description = excluded.description,
|
|
149
|
+
input_schema = excluded.input_schema, revision = excluded.revision, observed_at = excluded.observed_at
|
|
150
|
+
`).run(serverId, tool.name, tool.description ?? null, JSON.stringify(tool.inputSchema ?? {}), revision, now);
|
|
151
|
+
const existing = this.database.prepare("SELECT id, status FROM mcp_capability_candidates WHERE server_id = ? AND tool_name = ? AND revision = ?").get(serverId, tool.name, revision);
|
|
152
|
+
if (!existing) {
|
|
153
|
+
this.database.prepare(`
|
|
154
|
+
INSERT INTO mcp_capability_candidates (
|
|
155
|
+
id, server_id, tool_name, description, input_schema,
|
|
156
|
+
suggested_capability_id, adapter_id, risk, revision, status, observed_at, reviewed_at
|
|
157
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, 'read_only', ?, 'candidate', ?, NULL)
|
|
158
|
+
`).run(`mcp_candidate_${shortHash(`${serverId}:${tool.name}:${revision}`)}`, serverId, tool.name, tool.description ?? null, JSON.stringify(tool.inputSchema ?? {}), suggestedCapabilityId(serverId, tool.name), adapterId(serverId, tool.name), revision, now);
|
|
159
|
+
}
|
|
160
|
+
else if (existing.status === "stale") {
|
|
161
|
+
this.database.prepare("UPDATE mcp_capability_candidates SET status = 'candidate', reviewed_at = NULL, observed_at = ? WHERE id = ?").run(now, String(existing.id));
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
this.database.exec("COMMIT");
|
|
165
|
+
}
|
|
166
|
+
catch (error) {
|
|
167
|
+
this.database.exec("ROLLBACK");
|
|
168
|
+
throw error;
|
|
169
|
+
}
|
|
170
|
+
return this.listCandidates(serverId).filter((candidate) => currentNames.has(candidate.toolName));
|
|
171
|
+
}
|
|
172
|
+
getCandidate(id) {
|
|
173
|
+
const row = this.database.prepare("SELECT * FROM mcp_capability_candidates WHERE id = ?").get(id);
|
|
174
|
+
return row ? toCandidate(row) : undefined;
|
|
175
|
+
}
|
|
176
|
+
listCandidates(serverId) {
|
|
177
|
+
const rows = serverId
|
|
178
|
+
? this.database.prepare("SELECT * FROM mcp_capability_candidates WHERE server_id = ? ORDER BY tool_name ASC, observed_at DESC").all(serverId)
|
|
179
|
+
: this.database.prepare("SELECT * FROM mcp_capability_candidates ORDER BY observed_at DESC, id ASC").all();
|
|
180
|
+
return rows.map(toCandidate);
|
|
181
|
+
}
|
|
182
|
+
approveCandidate(id, input = {}) {
|
|
183
|
+
const candidate = this.getCandidate(id);
|
|
184
|
+
if (!candidate)
|
|
185
|
+
throw new Error(`MCP capability candidate not found: ${id}`);
|
|
186
|
+
if (candidate.status !== "candidate")
|
|
187
|
+
throw new Error(`MCP capability candidate is not reviewable: ${id}`);
|
|
188
|
+
this.database.prepare("UPDATE mcp_capability_candidates SET suggested_capability_id = ?, risk = ?, status = 'accepted', reviewed_at = ? WHERE id = ?").run(input.capabilityId ?? candidate.suggestedCapabilityId, input.risk ?? candidate.risk, new Date().toISOString(), id);
|
|
189
|
+
return this.getCandidate(id);
|
|
190
|
+
}
|
|
191
|
+
rejectCandidate(id) {
|
|
192
|
+
const candidate = this.getCandidate(id);
|
|
193
|
+
if (!candidate)
|
|
194
|
+
throw new Error(`MCP capability candidate not found: ${id}`);
|
|
195
|
+
this.database.prepare("UPDATE mcp_capability_candidates SET status = 'rejected', reviewed_at = ? WHERE id = ?").run(new Date().toISOString(), id);
|
|
196
|
+
return this.getCandidate(id);
|
|
197
|
+
}
|
|
198
|
+
close() {
|
|
199
|
+
if (this.database.isOpen)
|
|
200
|
+
this.database.close();
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
export class McpRuntime {
|
|
204
|
+
registry;
|
|
205
|
+
factory;
|
|
206
|
+
capabilities;
|
|
207
|
+
adapters;
|
|
208
|
+
clients = new Map();
|
|
209
|
+
constructor(registry, factory, capabilities, adapters) {
|
|
210
|
+
this.registry = registry;
|
|
211
|
+
this.factory = factory;
|
|
212
|
+
this.capabilities = capabilities;
|
|
213
|
+
this.adapters = adapters;
|
|
214
|
+
}
|
|
215
|
+
async discover(serverId) {
|
|
216
|
+
const client = await this.client(serverId);
|
|
217
|
+
try {
|
|
218
|
+
const tools = await client.listTools();
|
|
219
|
+
this.registry.recordHealth(serverId, "healthy");
|
|
220
|
+
return this.registry.recordTools(serverId, tools);
|
|
221
|
+
}
|
|
222
|
+
catch (error) {
|
|
223
|
+
this.registry.recordHealth(serverId, "unavailable", messageOf(error));
|
|
224
|
+
throw error;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
async refreshHealth(serverId) {
|
|
228
|
+
const client = await this.client(serverId);
|
|
229
|
+
try {
|
|
230
|
+
await client.health();
|
|
231
|
+
return this.registry.recordHealth(serverId, "healthy");
|
|
232
|
+
}
|
|
233
|
+
catch (error) {
|
|
234
|
+
this.registry.recordHealth(serverId, "unavailable", messageOf(error));
|
|
235
|
+
throw error;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
async approveCandidate(id, input = {}) {
|
|
239
|
+
const current = this.registry.getCandidate(id);
|
|
240
|
+
if (!current)
|
|
241
|
+
throw new Error(`MCP capability candidate not found: ${id}`);
|
|
242
|
+
const server = this.registry.getServer(current.serverId);
|
|
243
|
+
if (!server)
|
|
244
|
+
throw new Error(`MCP server not found: ${current.serverId}`);
|
|
245
|
+
const accepted = this.registry.approveCandidate(id, input);
|
|
246
|
+
const capabilityId = accepted.suggestedCapabilityId;
|
|
247
|
+
const adapter = accepted.adapterId;
|
|
248
|
+
this.capabilities.register({
|
|
249
|
+
id: capabilityId,
|
|
250
|
+
risk: accepted.risk,
|
|
251
|
+
adapter,
|
|
252
|
+
environments: input.environments,
|
|
253
|
+
description: accepted.description ?? undefined,
|
|
254
|
+
source: {
|
|
255
|
+
kind: "mcp",
|
|
256
|
+
ref: `${accepted.serverId}/${accepted.toolName}`,
|
|
257
|
+
version: server.revision,
|
|
258
|
+
revision: accepted.revision,
|
|
259
|
+
},
|
|
260
|
+
});
|
|
261
|
+
this.adapters.register(new McpCapabilityAdapter(adapter, accepted.toolName, async (tool, toolInput, context) => {
|
|
262
|
+
const client = await this.client(accepted.serverId);
|
|
263
|
+
return client.callTool(tool, toolInput, context);
|
|
264
|
+
}));
|
|
265
|
+
return accepted;
|
|
266
|
+
}
|
|
267
|
+
async close() {
|
|
268
|
+
const clients = [...this.clients.values()];
|
|
269
|
+
this.clients.clear();
|
|
270
|
+
await Promise.all(clients.map((client) => client.close?.()));
|
|
271
|
+
}
|
|
272
|
+
async client(serverId) {
|
|
273
|
+
const current = this.clients.get(serverId);
|
|
274
|
+
if (current)
|
|
275
|
+
return current;
|
|
276
|
+
const server = this.registry.getServer(serverId);
|
|
277
|
+
if (!server)
|
|
278
|
+
throw new Error(`MCP server not found: ${serverId}`);
|
|
279
|
+
if (server.enabled === false)
|
|
280
|
+
throw new Error(`MCP server is disabled: ${serverId}`);
|
|
281
|
+
const client = await this.factory.connect(server);
|
|
282
|
+
this.clients.set(serverId, client);
|
|
283
|
+
return client;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
function validateServer(server) {
|
|
287
|
+
if (!/^[a-z0-9][a-z0-9._-]*$/.test(server.id))
|
|
288
|
+
throw new Error("MCP server id must be lowercase and stable");
|
|
289
|
+
if (server.transport === "stdio" && !server.command?.trim())
|
|
290
|
+
throw new Error("stdio MCP server requires command");
|
|
291
|
+
if (server.transport === "http" && !server.url?.trim())
|
|
292
|
+
throw new Error("http MCP server requires url");
|
|
293
|
+
}
|
|
294
|
+
function inheritedEnvironment(names) {
|
|
295
|
+
if (!names?.length)
|
|
296
|
+
return undefined;
|
|
297
|
+
const environment = getDefaultEnvironment();
|
|
298
|
+
for (const name of names) {
|
|
299
|
+
const value = process.env[name];
|
|
300
|
+
if (value !== undefined)
|
|
301
|
+
environment[name] = value;
|
|
302
|
+
}
|
|
303
|
+
return environment;
|
|
304
|
+
}
|
|
305
|
+
function normalizeTool(tool) {
|
|
306
|
+
if (!tool.name.trim())
|
|
307
|
+
throw new Error("MCP tool name must not be empty");
|
|
308
|
+
return {
|
|
309
|
+
name: tool.name.trim(),
|
|
310
|
+
description: tool.description?.trim() || undefined,
|
|
311
|
+
inputSchema: tool.inputSchema ?? {},
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
function toolRevision(server, tool) {
|
|
315
|
+
return `sha256:${createHash("sha256").update(stableStringify({ server: server.revision ?? null, tool })).digest("hex")}`;
|
|
316
|
+
}
|
|
317
|
+
function shortHash(value) {
|
|
318
|
+
return createHash("sha256").update(value).digest("hex").slice(0, 24);
|
|
319
|
+
}
|
|
320
|
+
function suggestedCapabilityId(serverId, toolName) {
|
|
321
|
+
return `mcp.${safePart(serverId)}.${safePart(toolName)}`;
|
|
322
|
+
}
|
|
323
|
+
function adapterId(serverId, toolName) {
|
|
324
|
+
return `mcp:${serverId}/${toolName}`;
|
|
325
|
+
}
|
|
326
|
+
function safePart(value) {
|
|
327
|
+
return value.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "") || "tool";
|
|
328
|
+
}
|
|
329
|
+
function toServer(row) {
|
|
330
|
+
return {
|
|
331
|
+
id: String(row.id),
|
|
332
|
+
transport: String(row.transport),
|
|
333
|
+
command: row.command === null ? undefined : String(row.command),
|
|
334
|
+
args: JSON.parse(String(row.args ?? "[]")),
|
|
335
|
+
url: row.url === null ? undefined : String(row.url),
|
|
336
|
+
env: JSON.parse(String(row.env ?? "[]")),
|
|
337
|
+
revision: row.revision === null ? undefined : String(row.revision),
|
|
338
|
+
enabled: Number(row.enabled) === 1,
|
|
339
|
+
health: {
|
|
340
|
+
status: String(row.health_status),
|
|
341
|
+
checkedAt: row.health_checked_at === null ? null : String(row.health_checked_at),
|
|
342
|
+
error: row.health_error === null ? null : String(row.health_error),
|
|
343
|
+
},
|
|
344
|
+
updatedAt: String(row.updated_at),
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
function toCandidate(row) {
|
|
348
|
+
return {
|
|
349
|
+
id: String(row.id),
|
|
350
|
+
serverId: String(row.server_id),
|
|
351
|
+
toolName: String(row.tool_name),
|
|
352
|
+
description: row.description === null ? null : String(row.description),
|
|
353
|
+
inputSchema: JSON.parse(String(row.input_schema ?? "{}")),
|
|
354
|
+
suggestedCapabilityId: String(row.suggested_capability_id),
|
|
355
|
+
adapterId: String(row.adapter_id),
|
|
356
|
+
risk: String(row.risk),
|
|
357
|
+
revision: String(row.revision),
|
|
358
|
+
status: String(row.status),
|
|
359
|
+
observedAt: String(row.observed_at),
|
|
360
|
+
reviewedAt: row.reviewed_at === null ? null : String(row.reviewed_at),
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
function stableStringify(value) {
|
|
364
|
+
if (Array.isArray(value))
|
|
365
|
+
return `[${value.map(stableStringify).join(",")}]`;
|
|
366
|
+
if (value && typeof value === "object") {
|
|
367
|
+
return `{${Object.entries(value)
|
|
368
|
+
.sort(([left], [right]) => left.localeCompare(right))
|
|
369
|
+
.map(([key, entry]) => `${JSON.stringify(key)}:${stableStringify(entry)}`)
|
|
370
|
+
.join(",")}}`;
|
|
371
|
+
}
|
|
372
|
+
return JSON.stringify(value);
|
|
373
|
+
}
|
|
374
|
+
function messageOf(error) {
|
|
375
|
+
return error instanceof Error ? error.message : String(error);
|
|
376
|
+
}
|
|
377
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@codebridge/mcp-runtime",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.js"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@codebridge/policy": "0.1.0",
|
|
16
|
+
"@modelcontextprotocol/sdk": "1.30.0",
|
|
17
|
+
"zod": "3.25.76"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import type { ArtifactKind, VerificationStatus } from "@codebridge/work-items";
|
|
2
|
+
export type CapabilityAdapterKind = "function" | "skill" | "mcp" | "cli" | "http";
|
|
3
|
+
export interface CapabilityInvocationContext {
|
|
4
|
+
cwd?: string;
|
|
5
|
+
environment?: string;
|
|
6
|
+
runId?: string;
|
|
7
|
+
stepId?: string;
|
|
8
|
+
signal?: AbortSignal;
|
|
9
|
+
/** dry-run contract: side-effecting adapters must only validate + describe, not write. */
|
|
10
|
+
dry_run?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface CapabilityInvocation {
|
|
13
|
+
input: Record<string, unknown>;
|
|
14
|
+
context: CapabilityInvocationContext;
|
|
15
|
+
}
|
|
16
|
+
export interface CapabilityArtifact {
|
|
17
|
+
name: string;
|
|
18
|
+
content: string;
|
|
19
|
+
mimeType?: string;
|
|
20
|
+
kind?: ArtifactKind;
|
|
21
|
+
metadata?: Record<string, unknown>;
|
|
22
|
+
}
|
|
23
|
+
export interface CapabilityExecutionResult {
|
|
24
|
+
output?: unknown;
|
|
25
|
+
artifacts?: CapabilityArtifact[];
|
|
26
|
+
/** Skill instructions are context for the Agent; other adapters complete the step. */
|
|
27
|
+
forwardToAgent?: boolean;
|
|
28
|
+
retryable?: boolean;
|
|
29
|
+
metadata?: Record<string, unknown>;
|
|
30
|
+
verification?: {
|
|
31
|
+
validator: string;
|
|
32
|
+
status: VerificationStatus;
|
|
33
|
+
summary: string;
|
|
34
|
+
};
|
|
35
|
+
/** dry-run contract: side-effecting adapters return this instead of performing writes. */
|
|
36
|
+
dry_run_report?: {
|
|
37
|
+
would_do: string;
|
|
38
|
+
checks: Array<{
|
|
39
|
+
name: string;
|
|
40
|
+
passed: boolean;
|
|
41
|
+
}>;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export declare class CapabilityExecutionError extends Error {
|
|
45
|
+
readonly retryable: boolean;
|
|
46
|
+
constructor(message: string, options?: {
|
|
47
|
+
retryable?: boolean;
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
export interface CapabilityAdapter {
|
|
51
|
+
readonly id: string;
|
|
52
|
+
readonly kind: CapabilityAdapterKind;
|
|
53
|
+
execute(invocation: CapabilityInvocation): Promise<CapabilityExecutionResult>;
|
|
54
|
+
}
|
|
55
|
+
export declare class CapabilityRuntime {
|
|
56
|
+
private readonly adapters;
|
|
57
|
+
constructor(adapters?: CapabilityAdapter[]);
|
|
58
|
+
register(adapter: CapabilityAdapter): void;
|
|
59
|
+
get(id: string): CapabilityAdapter | undefined;
|
|
60
|
+
has(id: string): boolean;
|
|
61
|
+
list(): CapabilityAdapter[];
|
|
62
|
+
execute(id: string, invocation: CapabilityInvocation): Promise<CapabilityExecutionResult>;
|
|
63
|
+
}
|
|
64
|
+
export declare class FunctionCapabilityAdapter implements CapabilityAdapter {
|
|
65
|
+
readonly id: string;
|
|
66
|
+
private readonly handler;
|
|
67
|
+
readonly kind: "function";
|
|
68
|
+
constructor(id: string, handler: (invocation: CapabilityInvocation) => Promise<CapabilityExecutionResult> | CapabilityExecutionResult);
|
|
69
|
+
execute(invocation: CapabilityInvocation): Promise<CapabilityExecutionResult>;
|
|
70
|
+
}
|
|
71
|
+
export interface McpCall {
|
|
72
|
+
(tool: string, input: Record<string, unknown>, context: CapabilityInvocationContext): Promise<unknown>;
|
|
73
|
+
}
|
|
74
|
+
export declare class McpCapabilityAdapter implements CapabilityAdapter {
|
|
75
|
+
readonly id: string;
|
|
76
|
+
private readonly tool;
|
|
77
|
+
private readonly call;
|
|
78
|
+
readonly kind: "mcp";
|
|
79
|
+
constructor(id: string, tool: string, call: McpCall);
|
|
80
|
+
execute(invocation: CapabilityInvocation): Promise<CapabilityExecutionResult>;
|
|
81
|
+
}
|
|
82
|
+
export interface CliCapabilityOptions {
|
|
83
|
+
command: string;
|
|
84
|
+
args?: string[];
|
|
85
|
+
env?: Record<string, string>;
|
|
86
|
+
timeoutMs?: number;
|
|
87
|
+
}
|
|
88
|
+
export declare class CliCapabilityAdapter implements CapabilityAdapter {
|
|
89
|
+
readonly id: string;
|
|
90
|
+
private readonly options;
|
|
91
|
+
readonly kind: "cli";
|
|
92
|
+
constructor(id: string, options: CliCapabilityOptions);
|
|
93
|
+
execute(invocation: CapabilityInvocation): Promise<CapabilityExecutionResult>;
|
|
94
|
+
}
|
|
95
|
+
export interface HttpCapabilityOptions {
|
|
96
|
+
url: string;
|
|
97
|
+
method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
98
|
+
headers?: Record<string, string>;
|
|
99
|
+
timeoutMs?: number;
|
|
100
|
+
}
|
|
101
|
+
export declare class HttpCapabilityAdapter implements CapabilityAdapter {
|
|
102
|
+
readonly id: string;
|
|
103
|
+
private readonly options;
|
|
104
|
+
readonly kind: "http";
|
|
105
|
+
constructor(id: string, options: HttpCapabilityOptions);
|
|
106
|
+
execute(invocation: CapabilityInvocation): Promise<CapabilityExecutionResult>;
|
|
107
|
+
}
|
|
108
|
+
export interface SkillDocument {
|
|
109
|
+
id: string;
|
|
110
|
+
directory: string;
|
|
111
|
+
file: string;
|
|
112
|
+
content: string;
|
|
113
|
+
}
|
|
114
|
+
/** Discover standard SKILL.md files without imposing a script language or metadata format. */
|
|
115
|
+
export declare function discoverSkillDocuments(roots: string[]): SkillDocument[];
|
|
116
|
+
export declare class SkillCapabilityAdapter implements CapabilityAdapter {
|
|
117
|
+
readonly id: string;
|
|
118
|
+
private readonly document;
|
|
119
|
+
readonly kind: "skill";
|
|
120
|
+
constructor(id: string, document: SkillDocument);
|
|
121
|
+
execute(): Promise<CapabilityExecutionResult>;
|
|
122
|
+
}
|
|
123
|
+
//# sourceMappingURL=capability-runtime.d.ts.map
|