@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,363 @@
|
|
|
1
|
+
/** 唯一标识一次「飞书对话面」 */
|
|
2
|
+
export interface SessionKey {
|
|
3
|
+
chatId: string;
|
|
4
|
+
topicId?: string;
|
|
5
|
+
backendId: string;
|
|
6
|
+
cwd: string;
|
|
7
|
+
}
|
|
8
|
+
export interface LocalMediaPath {
|
|
9
|
+
path: string;
|
|
10
|
+
mimeType?: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
}
|
|
13
|
+
/** Bridge → Runner:附件以 base64 传输,Runner 落盘后再交给 Agent */
|
|
14
|
+
export interface RunAttachment {
|
|
15
|
+
name: string;
|
|
16
|
+
mimeType: string;
|
|
17
|
+
dataBase64: string;
|
|
18
|
+
}
|
|
19
|
+
export interface RunRequest {
|
|
20
|
+
runId: string;
|
|
21
|
+
sessionKey: SessionKey;
|
|
22
|
+
prompt: string;
|
|
23
|
+
attachments?: RunAttachment[];
|
|
24
|
+
resumeSessionId?: string;
|
|
25
|
+
model?: string;
|
|
26
|
+
effort?: string;
|
|
27
|
+
mode?: string;
|
|
28
|
+
claudePermissionMode?: ClaudePermissionMode;
|
|
29
|
+
additionalDirectories?: string[];
|
|
30
|
+
acpConfig?: Record<string, string | boolean>;
|
|
31
|
+
}
|
|
32
|
+
export type RunStatus = "queued" | "running" | "done" | "failed" | "stopped";
|
|
33
|
+
export type AgentMessagePhase = "commentary" | "final_answer";
|
|
34
|
+
export interface ActiveRunStatus {
|
|
35
|
+
runId: string;
|
|
36
|
+
startedAt: number;
|
|
37
|
+
lastActivityAt: number;
|
|
38
|
+
currentPhase: string;
|
|
39
|
+
lastCheckpoint?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface RunState {
|
|
42
|
+
runId: string;
|
|
43
|
+
status: RunStatus;
|
|
44
|
+
startedAt: string;
|
|
45
|
+
error?: string;
|
|
46
|
+
sessionKey?: SessionKey;
|
|
47
|
+
prompt?: string;
|
|
48
|
+
}
|
|
49
|
+
export interface AgentPlanEntry {
|
|
50
|
+
content: string;
|
|
51
|
+
priority: "high" | "medium" | "low";
|
|
52
|
+
status: "pending" | "in_progress" | "completed";
|
|
53
|
+
}
|
|
54
|
+
export interface AgentToolLocation {
|
|
55
|
+
path: string;
|
|
56
|
+
line?: number | null;
|
|
57
|
+
}
|
|
58
|
+
export interface AgentAvailableCommand {
|
|
59
|
+
name: string;
|
|
60
|
+
description: string;
|
|
61
|
+
input?: {
|
|
62
|
+
hint: string;
|
|
63
|
+
} | null;
|
|
64
|
+
}
|
|
65
|
+
export type AgentEvent = {
|
|
66
|
+
type: "text_delta";
|
|
67
|
+
text: string;
|
|
68
|
+
blockId?: string;
|
|
69
|
+
messageId?: string;
|
|
70
|
+
phase?: AgentMessagePhase;
|
|
71
|
+
} | {
|
|
72
|
+
type: "thought_delta";
|
|
73
|
+
text: string;
|
|
74
|
+
blockId?: string;
|
|
75
|
+
messageId?: string;
|
|
76
|
+
} | {
|
|
77
|
+
type: "tool_start";
|
|
78
|
+
toolCallId?: string;
|
|
79
|
+
name: string;
|
|
80
|
+
sideEffects?: boolean;
|
|
81
|
+
kind?: string;
|
|
82
|
+
status?: string;
|
|
83
|
+
input?: unknown;
|
|
84
|
+
content?: unknown[];
|
|
85
|
+
locations?: AgentToolLocation[];
|
|
86
|
+
} | {
|
|
87
|
+
type: "tool_update";
|
|
88
|
+
toolCallId: string;
|
|
89
|
+
name?: string;
|
|
90
|
+
sideEffects?: boolean;
|
|
91
|
+
status?: string;
|
|
92
|
+
content?: unknown[];
|
|
93
|
+
locations?: AgentToolLocation[];
|
|
94
|
+
output?: unknown;
|
|
95
|
+
} | {
|
|
96
|
+
type: "tool_end";
|
|
97
|
+
toolCallId?: string;
|
|
98
|
+
name?: string;
|
|
99
|
+
sideEffects?: boolean;
|
|
100
|
+
status?: string;
|
|
101
|
+
content?: unknown[];
|
|
102
|
+
locations?: AgentToolLocation[];
|
|
103
|
+
output?: unknown;
|
|
104
|
+
} | {
|
|
105
|
+
type: "plan";
|
|
106
|
+
entries: AgentPlanEntry[];
|
|
107
|
+
} | {
|
|
108
|
+
type: "plan_update";
|
|
109
|
+
plan: unknown;
|
|
110
|
+
} | {
|
|
111
|
+
type: "plan_removed";
|
|
112
|
+
planId: string;
|
|
113
|
+
} | {
|
|
114
|
+
type: "available_commands_update";
|
|
115
|
+
availableCommands: AgentAvailableCommand[];
|
|
116
|
+
} | {
|
|
117
|
+
type: "current_mode_update";
|
|
118
|
+
currentModeId: string;
|
|
119
|
+
} | {
|
|
120
|
+
type: "config_option_update";
|
|
121
|
+
configOptions: BackendConfigOption[];
|
|
122
|
+
} | {
|
|
123
|
+
type: "session_info_update";
|
|
124
|
+
title?: string | null;
|
|
125
|
+
updatedAt?: string | null;
|
|
126
|
+
} | {
|
|
127
|
+
type: "usage_update";
|
|
128
|
+
used: number;
|
|
129
|
+
size: number;
|
|
130
|
+
cost?: {
|
|
131
|
+
amount: number;
|
|
132
|
+
currency: string;
|
|
133
|
+
} | null;
|
|
134
|
+
} | {
|
|
135
|
+
type: "session";
|
|
136
|
+
sessionId: string;
|
|
137
|
+
} | {
|
|
138
|
+
type: "error";
|
|
139
|
+
message: string;
|
|
140
|
+
fatal?: boolean;
|
|
141
|
+
}
|
|
142
|
+
/** prompt_feishu 权限模式:agent 请求权限,等待用户 /approve 或 /deny */
|
|
143
|
+
| {
|
|
144
|
+
type: "permission_request";
|
|
145
|
+
requestId: string;
|
|
146
|
+
title: string;
|
|
147
|
+
} | {
|
|
148
|
+
type: "done";
|
|
149
|
+
exitCode: number;
|
|
150
|
+
}
|
|
151
|
+
/** 请求的 model 未被 ACP 适配器采纳、实际以 effective 落地(见 applySessionConfigOptions) */
|
|
152
|
+
| {
|
|
153
|
+
type: "model_resolved";
|
|
154
|
+
requested: string;
|
|
155
|
+
effective?: string;
|
|
156
|
+
effectiveName?: string;
|
|
157
|
+
};
|
|
158
|
+
export interface ChannelRuntimeApproval {
|
|
159
|
+
id: string;
|
|
160
|
+
runId: string;
|
|
161
|
+
stepId: string | null;
|
|
162
|
+
capabilityId: string | null;
|
|
163
|
+
status: "requested" | "granted" | "revoked" | "expired" | string;
|
|
164
|
+
environment: string | null;
|
|
165
|
+
targetResource: string | null;
|
|
166
|
+
expiresAt: string | null;
|
|
167
|
+
}
|
|
168
|
+
export interface ChannelSessionMessage {
|
|
169
|
+
channel: string;
|
|
170
|
+
conversationId: string;
|
|
171
|
+
message: string;
|
|
172
|
+
agentId?: string;
|
|
173
|
+
cwd?: string;
|
|
174
|
+
model?: string;
|
|
175
|
+
inputs?: Record<string, unknown>;
|
|
176
|
+
actorRef?: {
|
|
177
|
+
channel: "feishu" | "telegram";
|
|
178
|
+
id: string;
|
|
179
|
+
};
|
|
180
|
+
attachments?: RunAttachment[];
|
|
181
|
+
idempotencyKey?: string;
|
|
182
|
+
signal?: AbortSignal;
|
|
183
|
+
/** 槽位 generation(/new 递增);缺省 0 */
|
|
184
|
+
generation?: number;
|
|
185
|
+
/** 回复锚点:需要回复到的渠道消息 id */
|
|
186
|
+
replyToMessageId?: string;
|
|
187
|
+
/** 本次 Delivery 是否展示思考/工具过程;必须与 replyToMessageId 成对提供。 */
|
|
188
|
+
showThinking?: boolean;
|
|
189
|
+
}
|
|
190
|
+
export interface ChannelSlot {
|
|
191
|
+
channel: string;
|
|
192
|
+
conversationId: string;
|
|
193
|
+
agentId: string;
|
|
194
|
+
workspaceKey: string;
|
|
195
|
+
generation: number;
|
|
196
|
+
}
|
|
197
|
+
export interface ChannelSubmitReceipt {
|
|
198
|
+
sessionId: string;
|
|
199
|
+
turnId: string;
|
|
200
|
+
runId: string | null;
|
|
201
|
+
acceptance: "dispatched" | "queued";
|
|
202
|
+
queueState: "ready" | "paused";
|
|
203
|
+
eventSequence: number;
|
|
204
|
+
}
|
|
205
|
+
export interface ChannelCommandContext {
|
|
206
|
+
sessionId: string | null;
|
|
207
|
+
activeRunId: string | null;
|
|
208
|
+
/** Catalog / runtime 上当前槽位绑定的 ACP provider session;未学到则为 null。 */
|
|
209
|
+
providerSessionId: string | null;
|
|
210
|
+
/** Last activity of the bound session, read before the incoming message bumps it. */
|
|
211
|
+
lastActivityAt?: string | null;
|
|
212
|
+
/** Latest ACP usage_update for the session: context tokens in use and the model window. */
|
|
213
|
+
contextUsed?: number | null;
|
|
214
|
+
contextSize?: number | null;
|
|
215
|
+
/** First usage_update of the session: a resumed or prompt-heavy session already starts large. */
|
|
216
|
+
contextFirstUsed?: number | null;
|
|
217
|
+
queuedTurns?: number;
|
|
218
|
+
}
|
|
219
|
+
export interface ChannelSessionEvent {
|
|
220
|
+
type: string;
|
|
221
|
+
sequence: number;
|
|
222
|
+
runId: string | null;
|
|
223
|
+
executionKind: "agent" | "flow" | null;
|
|
224
|
+
occurredAt: string | null;
|
|
225
|
+
target: string | null;
|
|
226
|
+
resultRef: string | null;
|
|
227
|
+
payload: Record<string, unknown>;
|
|
228
|
+
}
|
|
229
|
+
export type ChannelDeliveryStatus = "pending" | "dispatched" | "delivering" | "completed";
|
|
230
|
+
export type ChannelRuntimeRunStatus = "queued" | "running" | "waiting" | "succeeded" | "failed" | "cancelled" | "interrupted";
|
|
231
|
+
export interface ChannelDeliveryRunSnapshot {
|
|
232
|
+
status: ChannelRuntimeRunStatus;
|
|
233
|
+
createdAt: string;
|
|
234
|
+
updatedAt: string;
|
|
235
|
+
leaseExpiresAt: string | null;
|
|
236
|
+
terminalReason: string | null;
|
|
237
|
+
sessionActiveRunId: string | null;
|
|
238
|
+
sessionQueueState: "ready" | "paused";
|
|
239
|
+
}
|
|
240
|
+
export interface ChannelDeliveryInput {
|
|
241
|
+
channel: string;
|
|
242
|
+
conversationId: string;
|
|
243
|
+
replyToMessageId: string;
|
|
244
|
+
showThinking: boolean;
|
|
245
|
+
}
|
|
246
|
+
export interface ChannelDeliveryRow {
|
|
247
|
+
turnId: string;
|
|
248
|
+
sessionId: string;
|
|
249
|
+
channel: string;
|
|
250
|
+
conversationId: string;
|
|
251
|
+
replyToMessageId: string;
|
|
252
|
+
showThinking: boolean;
|
|
253
|
+
surfaceMessageId: string | null;
|
|
254
|
+
/** Feishu CardKit instance id; distinct from the IM message id. */
|
|
255
|
+
surfaceCardId: string | null;
|
|
256
|
+
claimOwner: string | null;
|
|
257
|
+
claimExpiresAt: string | null;
|
|
258
|
+
acceptedSequence: number;
|
|
259
|
+
runId: string | null;
|
|
260
|
+
runTerminalAt: string | null;
|
|
261
|
+
status: ChannelDeliveryStatus;
|
|
262
|
+
createdAt: string;
|
|
263
|
+
updatedAt: string;
|
|
264
|
+
runSnapshot: ChannelDeliveryRunSnapshot | null;
|
|
265
|
+
}
|
|
266
|
+
export interface ChannelSessionIngress {
|
|
267
|
+
submit(message: ChannelSessionMessage): Promise<ChannelSubmitReceipt>;
|
|
268
|
+
listRuntimeApprovals?(runId: string): Promise<ChannelRuntimeApproval[]>;
|
|
269
|
+
resolveRuntimeApproval?(runId: string, approvalId: string, decision: "approve" | "reject"): Promise<ChannelRuntimeApproval>;
|
|
270
|
+
events(sessionId: string, opts: {
|
|
271
|
+
afterSequence: number;
|
|
272
|
+
signal: AbortSignal;
|
|
273
|
+
}): AsyncGenerator<ChannelSessionEvent>;
|
|
274
|
+
replayEvents?(sessionId: string, opts: {
|
|
275
|
+
afterSequence: number;
|
|
276
|
+
}): Promise<ChannelSessionEvent[]>;
|
|
277
|
+
listDeliveries(channel: string, surfaceMessageId?: string): Promise<ChannelDeliveryRow[]>;
|
|
278
|
+
claimDelivery(turnId: string, owner: string): Promise<boolean>;
|
|
279
|
+
ackDelivery(turnId: string, owner: string, surfaceMessageId: string, surfaceCardId?: string): Promise<boolean>;
|
|
280
|
+
completeDelivery(turnId: string, owner: string): Promise<boolean>;
|
|
281
|
+
getSlotCommandContext(slot: ChannelSlot): Promise<ChannelCommandContext>;
|
|
282
|
+
/** Task 10:将 Provider Session 绑定到槽位(幂等 + Lease 预检 + 原子建绑) */
|
|
283
|
+
resumeProviderSession(slot: ChannelSlot, providerSessionId: string): Promise<{
|
|
284
|
+
sessionId: string;
|
|
285
|
+
}>;
|
|
286
|
+
cancelRun(sessionId: string, runId: string): Promise<boolean>;
|
|
287
|
+
/** /steer:按 runId 向 Runner 注入补充指令(不打 orchestrator 内存表)。 */
|
|
288
|
+
steerRun(runId: string, prompt: string): Promise<{
|
|
289
|
+
ok: boolean;
|
|
290
|
+
outcome?: string;
|
|
291
|
+
error?: string;
|
|
292
|
+
}>;
|
|
293
|
+
resolvePermission(runId: string, approve: boolean): Promise<boolean>;
|
|
294
|
+
resumeQueue(sessionId: string, commandId: string): Promise<{
|
|
295
|
+
queueState: "ready" | "paused";
|
|
296
|
+
}>;
|
|
297
|
+
resetSlot(slot: ChannelSlot): Promise<boolean>;
|
|
298
|
+
}
|
|
299
|
+
export interface DoctorResult {
|
|
300
|
+
ok: boolean;
|
|
301
|
+
checks: Array<{
|
|
302
|
+
name: string;
|
|
303
|
+
ok: boolean;
|
|
304
|
+
message?: string;
|
|
305
|
+
}>;
|
|
306
|
+
}
|
|
307
|
+
export interface RunContext {
|
|
308
|
+
runId: string;
|
|
309
|
+
cwd: string;
|
|
310
|
+
prompt: string;
|
|
311
|
+
attachments?: LocalMediaPath[];
|
|
312
|
+
resumeSessionId?: string;
|
|
313
|
+
backendConfig: BackendProfile;
|
|
314
|
+
model?: string;
|
|
315
|
+
effort?: string;
|
|
316
|
+
mode?: string;
|
|
317
|
+
claudePermissionMode?: ClaudePermissionMode;
|
|
318
|
+
additionalDirectories?: string[];
|
|
319
|
+
acpConfig?: Record<string, string | boolean>;
|
|
320
|
+
mcpServers?: import("./mcp-types.js").StdioMcpServerConfig[];
|
|
321
|
+
/** 注入 Agent 子进程的额外环境变量(如 FCB_* 出站 API 凭据) */
|
|
322
|
+
extraEnv?: Record<string, string>;
|
|
323
|
+
}
|
|
324
|
+
export type ClaudePermissionMode = "acceptEdits" | "auto" | "bypassPermissions" | "default" | "dontAsk" | "plan";
|
|
325
|
+
export type AcpPermissionPolicy = "auto_allow" | "prompt_deny"
|
|
326
|
+
/** 危险操作在飞书里等 /approve;超时自动拒绝 */
|
|
327
|
+
| "prompt_feishu";
|
|
328
|
+
/** ACP 适配器 advertise 的会话配置项里的一个可选值(select 分组已展平) */
|
|
329
|
+
export interface BackendConfigOptionValue {
|
|
330
|
+
value: string;
|
|
331
|
+
name?: string;
|
|
332
|
+
description?: string;
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* ACP 适配器 advertise 的一个会话配置项(session/new 响应 configOptions 的精简形态)。
|
|
336
|
+
* category: "model" | "thought_level" | "mode" 等;/model 动态列表取 category === "model"。
|
|
337
|
+
*/
|
|
338
|
+
export interface BackendConfigOption {
|
|
339
|
+
id: string;
|
|
340
|
+
name: string;
|
|
341
|
+
type?: "select" | "boolean";
|
|
342
|
+
category?: string;
|
|
343
|
+
/** 适配器当前默认选中的值 */
|
|
344
|
+
currentValue?: string;
|
|
345
|
+
values: BackendConfigOptionValue[];
|
|
346
|
+
}
|
|
347
|
+
export interface BackendProfile {
|
|
348
|
+
type: "cursor-cli" | "claude-code" | "codex" | "generic-spawn" | "pi-sdk";
|
|
349
|
+
/** ACP spawn 命令;仅 ACP profiles 使用,pi-sdk 由 Node SDK 直接创建 */
|
|
350
|
+
acpCommand?: string;
|
|
351
|
+
acpArgs?: string[];
|
|
352
|
+
model?: string;
|
|
353
|
+
effort?: string;
|
|
354
|
+
/** Claude ACP mode 的兼容默认值;飞书非交互场景建议 bypassPermissions */
|
|
355
|
+
claudePermissionMode?: ClaudePermissionMode;
|
|
356
|
+
/** true 时,若适配器未 advertise 想要的 model,本轮直接失败而非静默用适配器默认;默认 false */
|
|
357
|
+
strictModel?: boolean;
|
|
358
|
+
}
|
|
359
|
+
export declare function serializeSessionKey(key: SessionKey): string;
|
|
360
|
+
export declare function parseSessionKey(raw: string): SessionKey;
|
|
361
|
+
export declare const DEFAULT_DATA_DIR: string;
|
|
362
|
+
export declare const VERSION: string;
|
|
363
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
export function serializeSessionKey(key) {
|
|
3
|
+
const cwd = key.cwd.replace(/\\/g, "/");
|
|
4
|
+
const topic = key.topicId ?? "";
|
|
5
|
+
return `${key.chatId}|${topic}|${key.backendId}|${cwd}`;
|
|
6
|
+
}
|
|
7
|
+
export function parseSessionKey(raw) {
|
|
8
|
+
const parts = raw.split("|");
|
|
9
|
+
if (parts.length < 4) {
|
|
10
|
+
throw new Error(`Invalid session key: ${raw}`);
|
|
11
|
+
}
|
|
12
|
+
const [chatId, topicId, backendId, ...cwdParts] = parts;
|
|
13
|
+
return {
|
|
14
|
+
chatId: chatId,
|
|
15
|
+
topicId: topicId || undefined,
|
|
16
|
+
backendId: backendId,
|
|
17
|
+
cwd: cwdParts.join("|"),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export const DEFAULT_DATA_DIR = `${process.env.HOME ?? ""}/.codebridge`;
|
|
21
|
+
export const VERSION = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8")).version;
|
|
22
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface WorkspaceKeyResult {
|
|
2
|
+
key: string;
|
|
3
|
+
diagnostic?: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* 规范化工作目录为稳定的槽位键。
|
|
7
|
+
* - 成功:realpath 解析符号链接,去尾部斜杠;
|
|
8
|
+
* - 失败(目录已删等):回退到 path.resolve 规范化绝对路径,并记录诊断,不抛错。
|
|
9
|
+
*/
|
|
10
|
+
export declare function canonicalWorkspaceKey(cwd: string): WorkspaceKeyResult;
|
|
11
|
+
//# sourceMappingURL=workspace-key.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
function stripTrailingSlashes(value) {
|
|
4
|
+
const stripped = value.replace(/[\\/]+$/, "");
|
|
5
|
+
// 保留文件系统根("/" 或 "C:\")不被剥成空串
|
|
6
|
+
return stripped === "" ? value : stripped;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* 规范化工作目录为稳定的槽位键。
|
|
10
|
+
* - 成功:realpath 解析符号链接,去尾部斜杠;
|
|
11
|
+
* - 失败(目录已删等):回退到 path.resolve 规范化绝对路径,并记录诊断,不抛错。
|
|
12
|
+
*/
|
|
13
|
+
export function canonicalWorkspaceKey(cwd) {
|
|
14
|
+
const normalized = path.resolve(cwd);
|
|
15
|
+
try {
|
|
16
|
+
return { key: stripTrailingSlashes(fs.realpathSync(normalized)) };
|
|
17
|
+
}
|
|
18
|
+
catch (error) {
|
|
19
|
+
return {
|
|
20
|
+
key: stripTrailingSlashes(normalized),
|
|
21
|
+
diagnostic: `workspace realpath failed (${error instanceof Error ? error.message : String(error)}), falling back to resolved path`,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=workspace-key.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@codebridge/core",
|
|
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
|
+
"./session-event-wire": {
|
|
13
|
+
"types": "./dist/session-event-wire.d.ts",
|
|
14
|
+
"import": "./dist/session-event-wire.js"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"yaml": "2.9.0",
|
|
20
|
+
"zod": "3.25.76"
|
|
21
|
+
}
|
|
22
|
+
}
|