@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,85 @@
|
|
|
1
|
+
import type { AgentSession } from "@codebridge/session-catalog";
|
|
2
|
+
import type { SessionEventWire } from "@codebridge/core/session-event-wire";
|
|
3
|
+
import type { DomainEvent, Run, SessionTimelineTurn, SessionTurn } from "@codebridge/work-items";
|
|
4
|
+
export declare function toApiSessionEvent(event: DomainEvent): SessionEventWire;
|
|
5
|
+
export declare function toApiSession(session: AgentSession): {
|
|
6
|
+
schema_version: 1;
|
|
7
|
+
session_id: string;
|
|
8
|
+
agent_id: string;
|
|
9
|
+
provider_session_id: string | null;
|
|
10
|
+
task_record_id: string | null;
|
|
11
|
+
model: string | null;
|
|
12
|
+
effort: string | null;
|
|
13
|
+
config_overrides: import("@codebridge/session-catalog").SessionConfigOverrides;
|
|
14
|
+
permission_mode: string | null;
|
|
15
|
+
folder_id: string | null;
|
|
16
|
+
cwd: string | null;
|
|
17
|
+
additional_directories: string[];
|
|
18
|
+
title: string | null;
|
|
19
|
+
status: import("@codebridge/session-catalog").SessionStatus;
|
|
20
|
+
pinned_at: string | null;
|
|
21
|
+
archived_at: string | null;
|
|
22
|
+
created_at: string;
|
|
23
|
+
updated_at: string;
|
|
24
|
+
};
|
|
25
|
+
export declare function toApiRun(run: Run, sessionId: string): {
|
|
26
|
+
schema_version: 1;
|
|
27
|
+
run_id: string;
|
|
28
|
+
session_id: string;
|
|
29
|
+
work_item_id: string;
|
|
30
|
+
turn_id: string | null;
|
|
31
|
+
execution_kind: import("@codebridge/work-items").ExecutionKind;
|
|
32
|
+
agent_id: string | null;
|
|
33
|
+
plan_id: string | null;
|
|
34
|
+
workflow_revision: string | null;
|
|
35
|
+
mode: import("@codebridge/work-items").WorkItemMode;
|
|
36
|
+
status: import("@codebridge/work-items").RunStatus;
|
|
37
|
+
terminal_reason: string | null;
|
|
38
|
+
created_at: string;
|
|
39
|
+
updated_at: string;
|
|
40
|
+
};
|
|
41
|
+
export declare function toApiSessionTurn(turn: SessionTurn): {
|
|
42
|
+
turn_id: string;
|
|
43
|
+
queue_position: number;
|
|
44
|
+
status: import("@codebridge/work-items").SessionTurnStatus;
|
|
45
|
+
version: number;
|
|
46
|
+
message: {
|
|
47
|
+
text: string;
|
|
48
|
+
attachment_ids: string[];
|
|
49
|
+
};
|
|
50
|
+
created_at: string;
|
|
51
|
+
};
|
|
52
|
+
export declare function toApiTimeline(input: {
|
|
53
|
+
turns: SessionTimelineTurn[];
|
|
54
|
+
previousCursor: number | null;
|
|
55
|
+
truncatedBlockIds: string[];
|
|
56
|
+
}): {
|
|
57
|
+
turns: {
|
|
58
|
+
timeline_index: number;
|
|
59
|
+
turn_id: string;
|
|
60
|
+
run_id: string;
|
|
61
|
+
status: import("@codebridge/work-items").TimelineTurnStatus;
|
|
62
|
+
blocks: {
|
|
63
|
+
block_id: string;
|
|
64
|
+
block_index: number;
|
|
65
|
+
kind: string;
|
|
66
|
+
status: string;
|
|
67
|
+
metadata: Record<string, unknown>;
|
|
68
|
+
segments: {
|
|
69
|
+
segment_id: string;
|
|
70
|
+
segment_index: number;
|
|
71
|
+
content: string;
|
|
72
|
+
byte_length: number;
|
|
73
|
+
sealed: boolean;
|
|
74
|
+
}[];
|
|
75
|
+
next_segment_cursor: number | null;
|
|
76
|
+
}[];
|
|
77
|
+
}[];
|
|
78
|
+
previous_cursor: number | null;
|
|
79
|
+
truncated_block_ids: string[];
|
|
80
|
+
};
|
|
81
|
+
export type ApiSession = ReturnType<typeof toApiSession>;
|
|
82
|
+
export type ApiRun = ReturnType<typeof toApiRun>;
|
|
83
|
+
export type ApiSessionTurn = ReturnType<typeof toApiSessionTurn>;
|
|
84
|
+
export type ApiTimeline = ReturnType<typeof toApiTimeline>;
|
|
85
|
+
//# sourceMappingURL=session-runtime-types.d.ts.map
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
export function toApiSessionEvent(event) {
|
|
2
|
+
return {
|
|
3
|
+
schema_version: event.schemaVersion,
|
|
4
|
+
event_id: event.eventId,
|
|
5
|
+
sequence: event.sequence,
|
|
6
|
+
work_item_id: event.workItemId,
|
|
7
|
+
run_id: event.runId,
|
|
8
|
+
execution_kind: event.executionKind,
|
|
9
|
+
type: event.type,
|
|
10
|
+
occurred_at: event.occurredAt,
|
|
11
|
+
actor: event.actor,
|
|
12
|
+
target: event.target,
|
|
13
|
+
input_hash: event.inputHash,
|
|
14
|
+
result_ref: event.resultRef,
|
|
15
|
+
payload: event.payload,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export function toApiSession(session) {
|
|
19
|
+
return {
|
|
20
|
+
schema_version: session.schemaVersion,
|
|
21
|
+
session_id: session.id,
|
|
22
|
+
agent_id: session.agentId,
|
|
23
|
+
provider_session_id: session.providerSessionId,
|
|
24
|
+
task_record_id: session.taskRecordId,
|
|
25
|
+
model: session.model,
|
|
26
|
+
effort: session.effort,
|
|
27
|
+
config_overrides: session.configOverrides,
|
|
28
|
+
permission_mode: session.permissionMode,
|
|
29
|
+
folder_id: session.folderId,
|
|
30
|
+
cwd: session.cwd,
|
|
31
|
+
additional_directories: session.additionalDirectories,
|
|
32
|
+
title: session.title,
|
|
33
|
+
status: session.status,
|
|
34
|
+
pinned_at: session.pinnedAt,
|
|
35
|
+
archived_at: session.archivedAt,
|
|
36
|
+
created_at: session.createdAt,
|
|
37
|
+
updated_at: session.updatedAt,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export function toApiRun(run, sessionId) {
|
|
41
|
+
return {
|
|
42
|
+
schema_version: run.schemaVersion,
|
|
43
|
+
run_id: run.id,
|
|
44
|
+
session_id: sessionId,
|
|
45
|
+
work_item_id: run.workItemId,
|
|
46
|
+
turn_id: run.turnId,
|
|
47
|
+
execution_kind: run.executionKind,
|
|
48
|
+
agent_id: run.agentId,
|
|
49
|
+
plan_id: run.planId,
|
|
50
|
+
workflow_revision: run.workflowRevision,
|
|
51
|
+
mode: run.mode,
|
|
52
|
+
status: run.status,
|
|
53
|
+
terminal_reason: run.terminalReason,
|
|
54
|
+
created_at: run.createdAt,
|
|
55
|
+
updated_at: run.updatedAt,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export function toApiSessionTurn(turn) {
|
|
59
|
+
return {
|
|
60
|
+
turn_id: turn.turnId,
|
|
61
|
+
queue_position: turn.queuePosition,
|
|
62
|
+
status: turn.status,
|
|
63
|
+
version: turn.version,
|
|
64
|
+
message: {
|
|
65
|
+
text: turn.message.text,
|
|
66
|
+
attachment_ids: turn.message.attachmentIds,
|
|
67
|
+
},
|
|
68
|
+
created_at: turn.createdAt,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
export function toApiTimeline(input) {
|
|
72
|
+
return {
|
|
73
|
+
turns: input.turns.map((turn) => ({
|
|
74
|
+
timeline_index: turn.timelineIndex,
|
|
75
|
+
turn_id: turn.turnId,
|
|
76
|
+
run_id: turn.runId,
|
|
77
|
+
status: turn.status,
|
|
78
|
+
blocks: turn.blocks.map((block) => ({
|
|
79
|
+
block_id: block.blockId,
|
|
80
|
+
block_index: block.blockIndex,
|
|
81
|
+
kind: block.kind,
|
|
82
|
+
status: block.status,
|
|
83
|
+
metadata: block.metadata,
|
|
84
|
+
segments: block.segments.map((segment) => ({
|
|
85
|
+
segment_id: segment.segmentId,
|
|
86
|
+
segment_index: segment.segmentIndex,
|
|
87
|
+
content: segment.content,
|
|
88
|
+
byte_length: segment.byteLength,
|
|
89
|
+
sealed: segment.sealed,
|
|
90
|
+
})),
|
|
91
|
+
next_segment_cursor: block.nextSegmentCursor,
|
|
92
|
+
})),
|
|
93
|
+
})),
|
|
94
|
+
previous_cursor: input.previousCursor,
|
|
95
|
+
truncated_block_ids: input.truncatedBlockIds,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=session-runtime-types.js.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Hono } from "hono";
|
|
2
|
+
import type { SkillAgentId, SkillCatalogSnapshot, SkillMutationPlan, SkillMutationResult } from "@codebridge/runner-client";
|
|
3
|
+
export interface SkillRunner {
|
|
4
|
+
listSkills(): Promise<SkillCatalogSnapshot>;
|
|
5
|
+
addSkillSource(sourcePath: string): Promise<SkillCatalogSnapshot>;
|
|
6
|
+
previewSkillAdopt(skillId: string, actorId: string): Promise<SkillMutationPlan>;
|
|
7
|
+
previewSkillAssignment(input: {
|
|
8
|
+
skill_id: string;
|
|
9
|
+
agent_id: SkillAgentId;
|
|
10
|
+
enabled: boolean;
|
|
11
|
+
actor_id: string;
|
|
12
|
+
}): Promise<SkillMutationPlan>;
|
|
13
|
+
previewSkillGlobalState(input: {
|
|
14
|
+
skill_id: string;
|
|
15
|
+
enabled: boolean;
|
|
16
|
+
actor_id: string;
|
|
17
|
+
}): Promise<SkillMutationPlan>;
|
|
18
|
+
previewSkillUnmanage(skillId: string, actorId: string): Promise<SkillMutationPlan>;
|
|
19
|
+
applySkillPlan(kind: "adopt" | "global-state" | "assignment" | "unmanage", planId: string, actorId: string): Promise<SkillMutationResult>;
|
|
20
|
+
pickDirectory(): Promise<{
|
|
21
|
+
ok: boolean;
|
|
22
|
+
path?: string;
|
|
23
|
+
cancelled?: boolean;
|
|
24
|
+
error?: string;
|
|
25
|
+
}>;
|
|
26
|
+
}
|
|
27
|
+
export declare function createSkillApp(runner: SkillRunner, token: string): Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
|
|
28
|
+
//# sourceMappingURL=skill-api.d.ts.map
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { Hono } from "hono";
|
|
2
|
+
const SKILL_AGENT_IDS = new Set(["codex", "claude", "cursor", "opencode", "pi"]);
|
|
3
|
+
const LOCAL_SKILL_ACTOR = "local:web";
|
|
4
|
+
export function createSkillApp(runner, token) {
|
|
5
|
+
const app = new Hono();
|
|
6
|
+
app.use("/v1/*", async (c, next) => {
|
|
7
|
+
if (c.req.header("authorization") !== `Bearer ${token}`) {
|
|
8
|
+
return c.json({ error: "unauthorized" }, 401);
|
|
9
|
+
}
|
|
10
|
+
await next();
|
|
11
|
+
});
|
|
12
|
+
app.get("/v1/skills", async (c) => {
|
|
13
|
+
try {
|
|
14
|
+
return c.json(await runner.listSkills());
|
|
15
|
+
}
|
|
16
|
+
catch (error) {
|
|
17
|
+
return runnerErrorResponse(c, error);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
app.post("/v1/skills/sources", async (c) => {
|
|
21
|
+
const body = await c.req.json().catch(() => null);
|
|
22
|
+
if (!body || typeof body.path !== "string" || !body.path.trim()) {
|
|
23
|
+
return c.json({ error: "invalid_skill_source", message: "path is required" }, 400);
|
|
24
|
+
}
|
|
25
|
+
try {
|
|
26
|
+
return c.json(await runner.addSkillSource(body.path.trim()));
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
return runnerErrorResponse(c, error);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
app.post("/v1/skills/sources/pick", async (c) => {
|
|
33
|
+
try {
|
|
34
|
+
const picked = await runner.pickDirectory();
|
|
35
|
+
if (picked.cancelled)
|
|
36
|
+
return c.json({ cancelled: true });
|
|
37
|
+
if (!picked.ok || !picked.path) {
|
|
38
|
+
return c.json({
|
|
39
|
+
error: "directory_picker_failed",
|
|
40
|
+
message: picked.error ?? "目录选择失败",
|
|
41
|
+
}, 503);
|
|
42
|
+
}
|
|
43
|
+
return c.json(await runner.addSkillSource(picked.path));
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
return runnerErrorResponse(c, error);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
app.post("/v1/skills/:skillId/adopt/preview", async (c) => {
|
|
50
|
+
try {
|
|
51
|
+
return c.json(await runner.previewSkillAdopt(c.req.param("skillId"), LOCAL_SKILL_ACTOR));
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
return runnerErrorResponse(c, error);
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
app.post("/v1/skills/:skillId/global-state/preview", async (c) => {
|
|
58
|
+
const body = await c.req.json().catch(() => null);
|
|
59
|
+
if (!body || typeof body.enabled !== "boolean") {
|
|
60
|
+
return c.json({ error: "invalid_skill_global_state" }, 400);
|
|
61
|
+
}
|
|
62
|
+
try {
|
|
63
|
+
return c.json(await runner.previewSkillGlobalState({
|
|
64
|
+
skill_id: c.req.param("skillId"),
|
|
65
|
+
enabled: body.enabled,
|
|
66
|
+
actor_id: LOCAL_SKILL_ACTOR,
|
|
67
|
+
}));
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
return runnerErrorResponse(c, error);
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
app.post("/v1/skills/assignments/preview", async (c) => {
|
|
74
|
+
const input = await readAssignment(c);
|
|
75
|
+
if (!input)
|
|
76
|
+
return c.json({ error: "invalid_skill_assignment" }, 400);
|
|
77
|
+
try {
|
|
78
|
+
return c.json(await runner.previewSkillAssignment({ ...input, actor_id: LOCAL_SKILL_ACTOR }));
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
return runnerErrorResponse(c, error);
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
app.post("/v1/skills/:skillId/unmanage/preview", async (c) => {
|
|
85
|
+
try {
|
|
86
|
+
return c.json(await runner.previewSkillUnmanage(c.req.param("skillId"), LOCAL_SKILL_ACTOR));
|
|
87
|
+
}
|
|
88
|
+
catch (error) {
|
|
89
|
+
return runnerErrorResponse(c, error);
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
for (const kind of ["adopt", "global-state", "assignment", "unmanage"]) {
|
|
93
|
+
app.post(`/v1/skills/${kind}-plans/:planId/apply`, async (c) => {
|
|
94
|
+
try {
|
|
95
|
+
return c.json(await runner.applySkillPlan(kind, c.req.param("planId"), LOCAL_SKILL_ACTOR));
|
|
96
|
+
}
|
|
97
|
+
catch (error) {
|
|
98
|
+
return runnerErrorResponse(c, error);
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
return app;
|
|
103
|
+
}
|
|
104
|
+
async function readAssignment(c) {
|
|
105
|
+
const body = await c.req.json().catch(() => null);
|
|
106
|
+
if (!body
|
|
107
|
+
|| typeof body.skill_id !== "string"
|
|
108
|
+
|| !body.skill_id.trim()
|
|
109
|
+
|| typeof body.agent_id !== "string"
|
|
110
|
+
|| !SKILL_AGENT_IDS.has(body.agent_id)
|
|
111
|
+
|| typeof body.enabled !== "boolean") {
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
return {
|
|
115
|
+
skill_id: body.skill_id.trim(),
|
|
116
|
+
agent_id: body.agent_id,
|
|
117
|
+
enabled: body.enabled,
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
function runnerErrorResponse(c, error) {
|
|
121
|
+
const value = error;
|
|
122
|
+
const status = value?.status === 400 || value?.status === 404 || value?.status === 409 || value?.status === 422
|
|
123
|
+
? value.status
|
|
124
|
+
: 503;
|
|
125
|
+
const code = typeof value?.code === "string" ? value.code : "runner_unavailable";
|
|
126
|
+
const message = typeof value?.message === "string" ? value.message : String(error);
|
|
127
|
+
return c.json({ error: code, message }, status);
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=skill-api.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { AppConfig } from "@codebridge/core";
|
|
2
|
+
export interface StartupSurfaces {
|
|
3
|
+
web: boolean;
|
|
4
|
+
feishu: boolean;
|
|
5
|
+
telegram: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface StartupOverrides {
|
|
8
|
+
web?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Entrances are independent. The Core API may run with no channel and Web is
|
|
12
|
+
* opt-in so a headless install does not open a browser surface accidentally.
|
|
13
|
+
*/
|
|
14
|
+
export declare function resolveStartupSurfaces(config: AppConfig, overrides?: StartupOverrides): StartupSurfaces;
|
|
15
|
+
//# sourceMappingURL=startup-surfaces.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { hasFeishuCredentials, hasTelegramCredentials } from "./channel-config.js";
|
|
2
|
+
/**
|
|
3
|
+
* Entrances are independent. The Core API may run with no channel and Web is
|
|
4
|
+
* opt-in so a headless install does not open a browser surface accidentally.
|
|
5
|
+
*/
|
|
6
|
+
export function resolveStartupSurfaces(config, overrides = {}) {
|
|
7
|
+
return {
|
|
8
|
+
web: overrides.web ?? config.web.enabled,
|
|
9
|
+
feishu: hasFeishuCredentials(config),
|
|
10
|
+
telegram: hasTelegramCredentials(config),
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=startup-surfaces.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Hono } from "hono";
|
|
2
|
+
export interface WebFrontendOptions {
|
|
3
|
+
staticDirectory: string;
|
|
4
|
+
token?: string;
|
|
5
|
+
}
|
|
6
|
+
/** Serves the optional Vite build without adding a second backend contract. */
|
|
7
|
+
export declare function createWebFrontendApp(options: WebFrontendOptions): Hono;
|
|
8
|
+
//# sourceMappingURL=web-frontend.d.ts.map
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import fs from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { Hono } from "hono";
|
|
4
|
+
const MIME_TYPES = {
|
|
5
|
+
".css": "text/css; charset=UTF-8",
|
|
6
|
+
".gif": "image/gif",
|
|
7
|
+
".html": "text/html; charset=UTF-8",
|
|
8
|
+
".ico": "image/x-icon",
|
|
9
|
+
".jpeg": "image/jpeg",
|
|
10
|
+
".jpg": "image/jpeg",
|
|
11
|
+
".js": "text/javascript; charset=UTF-8",
|
|
12
|
+
".json": "application/json; charset=UTF-8",
|
|
13
|
+
".map": "application/json; charset=UTF-8",
|
|
14
|
+
".png": "image/png",
|
|
15
|
+
".svg": "image/svg+xml",
|
|
16
|
+
".webp": "image/webp",
|
|
17
|
+
".woff": "font/woff",
|
|
18
|
+
".woff2": "font/woff2",
|
|
19
|
+
};
|
|
20
|
+
/** Serves the optional Vite build without adding a second backend contract. */
|
|
21
|
+
export function createWebFrontendApp(options) {
|
|
22
|
+
const app = new Hono();
|
|
23
|
+
app.get("/config.json", (c) => {
|
|
24
|
+
return c.json({ token: options.token ?? "" }, 200, {
|
|
25
|
+
"cache-control": "no-store",
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
app.get("*", async (c) => {
|
|
29
|
+
const requestedPath = decodeURIComponent(new URL(c.req.url).pathname);
|
|
30
|
+
const pathname = requestedPath === "/workbench"
|
|
31
|
+
? "/"
|
|
32
|
+
: requestedPath.startsWith("/workbench/")
|
|
33
|
+
? requestedPath.slice("/workbench".length)
|
|
34
|
+
: requestedPath;
|
|
35
|
+
const relative = pathname === "/" ? "index.html" : pathname.replace(/^\/+/, "");
|
|
36
|
+
if (relative === "config.json" || relative.includes("..")) {
|
|
37
|
+
return c.notFound();
|
|
38
|
+
}
|
|
39
|
+
const direct = await readFile(options.staticDirectory, relative);
|
|
40
|
+
if (direct)
|
|
41
|
+
return directResponse(direct, relative);
|
|
42
|
+
// Client-side routes are rendered by the same React entry point.
|
|
43
|
+
if (!path.extname(relative)) {
|
|
44
|
+
const fallback = await readFile(options.staticDirectory, "index.html");
|
|
45
|
+
if (fallback)
|
|
46
|
+
return directResponse(fallback, "index.html");
|
|
47
|
+
}
|
|
48
|
+
return c.notFound();
|
|
49
|
+
});
|
|
50
|
+
return app;
|
|
51
|
+
}
|
|
52
|
+
async function readFile(root, relative) {
|
|
53
|
+
const target = path.resolve(root, relative);
|
|
54
|
+
const rootPath = path.resolve(root);
|
|
55
|
+
if (target !== rootPath && !target.startsWith(`${rootPath}${path.sep}`))
|
|
56
|
+
return undefined;
|
|
57
|
+
try {
|
|
58
|
+
const stat = await fs.stat(target);
|
|
59
|
+
if (!stat.isFile())
|
|
60
|
+
return undefined;
|
|
61
|
+
return await fs.readFile(target);
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
return undefined;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function directResponse(content, relative) {
|
|
68
|
+
const extension = path.extname(relative).toLowerCase();
|
|
69
|
+
return new Response(content, {
|
|
70
|
+
headers: {
|
|
71
|
+
"cache-control": relative === "index.html" ? "no-cache" : "public, max-age=31536000, immutable",
|
|
72
|
+
"content-type": MIME_TYPES[extension] ?? "application/octet-stream",
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=web-frontend.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ApprovalService } from "@codebridge/policy";
|
|
2
|
+
import type { RunExecutor } from "@codebridge/run-executor";
|
|
3
|
+
import { SqliteEventStore } from "@codebridge/work-items";
|
|
4
|
+
import { Hono } from "hono";
|
|
5
|
+
export declare function createWorkItemApp(store: SqliteEventStore, token: string, approvals?: ApprovalService, executor?: RunExecutor): Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
|
|
6
|
+
//# sourceMappingURL=work-item-api.d.ts.map
|