@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,411 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { createRequire } from "node:module";
|
|
4
|
+
import { randomUUID } from "node:crypto";
|
|
5
|
+
import { canonicalWorkspaceKey } from "@codebridge/core";
|
|
6
|
+
const { DatabaseSync } = createRequire(import.meta.url)("node:sqlite");
|
|
7
|
+
export class SessionCatalogStore {
|
|
8
|
+
database;
|
|
9
|
+
constructor(databasePath, options = {}) {
|
|
10
|
+
if (databasePath !== ":memory:") {
|
|
11
|
+
fs.mkdirSync(path.dirname(databasePath), { recursive: true });
|
|
12
|
+
}
|
|
13
|
+
this.database = new DatabaseSync(databasePath);
|
|
14
|
+
this.database.exec(`
|
|
15
|
+
PRAGMA foreign_keys = ON;
|
|
16
|
+
CREATE TABLE IF NOT EXISTS agent_sessions (
|
|
17
|
+
id TEXT PRIMARY KEY,
|
|
18
|
+
schema_version INTEGER NOT NULL,
|
|
19
|
+
agent_id TEXT NOT NULL,
|
|
20
|
+
provider_session_id TEXT,
|
|
21
|
+
task_record_id TEXT,
|
|
22
|
+
flow_id TEXT,
|
|
23
|
+
flow_definition_revision TEXT,
|
|
24
|
+
model TEXT,
|
|
25
|
+
effort TEXT,
|
|
26
|
+
config_overrides TEXT NOT NULL,
|
|
27
|
+
permission_mode TEXT,
|
|
28
|
+
folder_id TEXT,
|
|
29
|
+
cwd TEXT,
|
|
30
|
+
additional_directories TEXT NOT NULL,
|
|
31
|
+
title TEXT,
|
|
32
|
+
status TEXT NOT NULL,
|
|
33
|
+
pinned_at TEXT,
|
|
34
|
+
archived_at TEXT,
|
|
35
|
+
created_at TEXT NOT NULL,
|
|
36
|
+
updated_at TEXT NOT NULL
|
|
37
|
+
);
|
|
38
|
+
CREATE INDEX IF NOT EXISTS agent_sessions_agent_updated
|
|
39
|
+
ON agent_sessions (agent_id, updated_at DESC);
|
|
40
|
+
CREATE TABLE IF NOT EXISTS channel_session_bindings (
|
|
41
|
+
channel TEXT NOT NULL,
|
|
42
|
+
conversation_id TEXT NOT NULL,
|
|
43
|
+
agent_id TEXT NOT NULL,
|
|
44
|
+
workspace_key TEXT NOT NULL,
|
|
45
|
+
generation INTEGER NOT NULL DEFAULT 0,
|
|
46
|
+
session_id TEXT NOT NULL,
|
|
47
|
+
created_at TEXT NOT NULL,
|
|
48
|
+
updated_at TEXT NOT NULL,
|
|
49
|
+
PRIMARY KEY (channel, conversation_id, agent_id, workspace_key, generation),
|
|
50
|
+
FOREIGN KEY (session_id) REFERENCES agent_sessions(id) ON DELETE CASCADE
|
|
51
|
+
);
|
|
52
|
+
`);
|
|
53
|
+
try {
|
|
54
|
+
this.database.exec("ALTER TABLE agent_sessions ADD COLUMN task_record_id TEXT");
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
// Existing databases already contain the compatibility column.
|
|
58
|
+
}
|
|
59
|
+
try {
|
|
60
|
+
this.database.exec("ALTER TABLE agent_sessions ADD COLUMN flow_id TEXT");
|
|
61
|
+
}
|
|
62
|
+
catch {
|
|
63
|
+
// Existing databases already contain the Flow binding column.
|
|
64
|
+
}
|
|
65
|
+
try {
|
|
66
|
+
this.database.exec("ALTER TABLE agent_sessions ADD COLUMN flow_definition_revision TEXT");
|
|
67
|
+
}
|
|
68
|
+
catch {
|
|
69
|
+
// Existing databases already contain the legacy column.
|
|
70
|
+
}
|
|
71
|
+
try {
|
|
72
|
+
this.database.exec("ALTER TABLE agent_sessions ADD COLUMN model TEXT");
|
|
73
|
+
}
|
|
74
|
+
catch {
|
|
75
|
+
// Existing databases already contain the model override column.
|
|
76
|
+
}
|
|
77
|
+
try {
|
|
78
|
+
this.database.exec("ALTER TABLE agent_sessions ADD COLUMN permission_mode TEXT");
|
|
79
|
+
}
|
|
80
|
+
catch {
|
|
81
|
+
// Existing databases already contain the Agent permission override column.
|
|
82
|
+
}
|
|
83
|
+
try {
|
|
84
|
+
this.database.exec("ALTER TABLE agent_sessions ADD COLUMN effort TEXT");
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
// Existing databases already contain the reasoning effort override column.
|
|
88
|
+
}
|
|
89
|
+
try {
|
|
90
|
+
this.database.exec("ALTER TABLE agent_sessions ADD COLUMN config_overrides TEXT NOT NULL DEFAULT '{}'");
|
|
91
|
+
}
|
|
92
|
+
catch {
|
|
93
|
+
// Existing databases already contain the Agent config override column.
|
|
94
|
+
}
|
|
95
|
+
try {
|
|
96
|
+
this.database.exec("ALTER TABLE agent_sessions ADD COLUMN pinned_at TEXT");
|
|
97
|
+
}
|
|
98
|
+
catch {
|
|
99
|
+
// Existing databases already contain the pin metadata column.
|
|
100
|
+
}
|
|
101
|
+
try {
|
|
102
|
+
this.database.exec("ALTER TABLE agent_sessions ADD COLUMN archived_at TEXT");
|
|
103
|
+
}
|
|
104
|
+
catch {
|
|
105
|
+
// Existing databases already contain the archive metadata column.
|
|
106
|
+
}
|
|
107
|
+
const legacy = this.database
|
|
108
|
+
.prepare("SELECT COUNT(*) AS n FROM pragma_table_info('channel_session_bindings') WHERE name = 'agent_id'")
|
|
109
|
+
.get();
|
|
110
|
+
if (Number(legacy?.n ?? 0) === 0) {
|
|
111
|
+
this.migrateLegacyChannelBindings(options.defaultCwd);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
migrateLegacyChannelBindings(defaultCwd) {
|
|
115
|
+
const orphans = [];
|
|
116
|
+
this.database.exec("BEGIN IMMEDIATE;");
|
|
117
|
+
try {
|
|
118
|
+
this.database.exec(`
|
|
119
|
+
CREATE TABLE channel_session_bindings_new (
|
|
120
|
+
channel TEXT NOT NULL,
|
|
121
|
+
conversation_id TEXT NOT NULL,
|
|
122
|
+
agent_id TEXT NOT NULL,
|
|
123
|
+
workspace_key TEXT NOT NULL,
|
|
124
|
+
generation INTEGER NOT NULL DEFAULT 0,
|
|
125
|
+
session_id TEXT NOT NULL,
|
|
126
|
+
created_at TEXT NOT NULL,
|
|
127
|
+
updated_at TEXT NOT NULL,
|
|
128
|
+
PRIMARY KEY (channel, conversation_id, agent_id, workspace_key, generation),
|
|
129
|
+
FOREIGN KEY (session_id) REFERENCES agent_sessions(id) ON DELETE CASCADE
|
|
130
|
+
);
|
|
131
|
+
`);
|
|
132
|
+
const rows = this.database
|
|
133
|
+
.prepare(`SELECT b.channel, b.conversation_id, b.session_id, b.created_at, b.updated_at,
|
|
134
|
+
s.agent_id, s.cwd
|
|
135
|
+
FROM channel_session_bindings b
|
|
136
|
+
LEFT JOIN agent_sessions s ON s.id = b.session_id`)
|
|
137
|
+
.all();
|
|
138
|
+
const insert = this.database.prepare(`INSERT INTO channel_session_bindings_new (
|
|
139
|
+
channel, conversation_id, agent_id, workspace_key, generation,
|
|
140
|
+
session_id, created_at, updated_at
|
|
141
|
+
) VALUES (?, ?, ?, ?, 0, ?, ?, ?)`);
|
|
142
|
+
for (const row of rows) {
|
|
143
|
+
if (row.agent_id === null) {
|
|
144
|
+
orphans.push(String(row.session_id ?? "<unknown>"));
|
|
145
|
+
continue;
|
|
146
|
+
}
|
|
147
|
+
insert.run(String(row.channel), String(row.conversation_id), String(row.agent_id), canonicalWorkspaceKey(String(row.cwd ?? defaultCwd ?? "")).key, String(row.session_id), String(row.created_at), String(row.updated_at));
|
|
148
|
+
}
|
|
149
|
+
this.database.exec("DROP TABLE channel_session_bindings;");
|
|
150
|
+
this.database.exec("ALTER TABLE channel_session_bindings_new RENAME TO channel_session_bindings;");
|
|
151
|
+
this.database.exec(`
|
|
152
|
+
CREATE INDEX IF NOT EXISTS channel_bindings_lookup
|
|
153
|
+
ON channel_session_bindings (channel, conversation_id, agent_id, workspace_key, generation);
|
|
154
|
+
`);
|
|
155
|
+
this.database.exec("COMMIT;");
|
|
156
|
+
}
|
|
157
|
+
catch (error) {
|
|
158
|
+
this.database.exec("ROLLBACK;");
|
|
159
|
+
throw error;
|
|
160
|
+
}
|
|
161
|
+
if (orphans.length) {
|
|
162
|
+
console.warn(`[session-catalog] skipped ${orphans.length} orphan channel bindings`);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
createSession(input) {
|
|
166
|
+
const now = new Date().toISOString();
|
|
167
|
+
const session = {
|
|
168
|
+
schemaVersion: 1,
|
|
169
|
+
id: input.id ?? `sess_${randomUUID().replaceAll("-", "")}`,
|
|
170
|
+
agentId: input.agentId,
|
|
171
|
+
providerSessionId: input.providerSessionId ?? null,
|
|
172
|
+
taskRecordId: input.taskRecordId ?? null,
|
|
173
|
+
model: input.model ?? null,
|
|
174
|
+
effort: input.effort ?? null,
|
|
175
|
+
configOverrides: { ...(input.configOverrides ?? {}) },
|
|
176
|
+
permissionMode: input.permissionMode ?? null,
|
|
177
|
+
folderId: input.folderId ?? null,
|
|
178
|
+
cwd: input.cwd ?? null,
|
|
179
|
+
additionalDirectories: [...(input.additionalDirectories ?? [])],
|
|
180
|
+
title: input.title ?? null,
|
|
181
|
+
status: "idle",
|
|
182
|
+
pinnedAt: null,
|
|
183
|
+
archivedAt: null,
|
|
184
|
+
createdAt: now,
|
|
185
|
+
updatedAt: input.updatedAt ?? now,
|
|
186
|
+
};
|
|
187
|
+
this.database
|
|
188
|
+
.prepare(`INSERT INTO agent_sessions (
|
|
189
|
+
id, schema_version, agent_id, provider_session_id, task_record_id, model, effort, config_overrides, permission_mode, folder_id, cwd,
|
|
190
|
+
additional_directories, title, status, pinned_at, archived_at, created_at, updated_at
|
|
191
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`)
|
|
192
|
+
.run(session.id, session.schemaVersion, session.agentId, session.providerSessionId, session.taskRecordId, session.model, session.effort, JSON.stringify(session.configOverrides), session.permissionMode, session.folderId, session.cwd, JSON.stringify(session.additionalDirectories), session.title, session.status, session.pinnedAt, session.archivedAt, session.createdAt, session.updatedAt);
|
|
193
|
+
return session;
|
|
194
|
+
}
|
|
195
|
+
getSession(id) {
|
|
196
|
+
const row = this.database
|
|
197
|
+
.prepare("SELECT * FROM agent_sessions WHERE id = ?")
|
|
198
|
+
.get(id);
|
|
199
|
+
return row ? toSession(row) : undefined;
|
|
200
|
+
}
|
|
201
|
+
getByProviderSession(agentId, providerSessionId) {
|
|
202
|
+
const row = this.database
|
|
203
|
+
.prepare("SELECT * FROM agent_sessions WHERE agent_id = ? AND provider_session_id = ?")
|
|
204
|
+
.get(agentId, providerSessionId);
|
|
205
|
+
return row ? toSession(row) : undefined;
|
|
206
|
+
}
|
|
207
|
+
listSessions(agentId, options = {}) {
|
|
208
|
+
const archiveFilter = options.includeArchived ? "" : agentId ? " AND archived_at IS NULL" : " WHERE archived_at IS NULL";
|
|
209
|
+
const order = " ORDER BY pinned_at IS NULL ASC, pinned_at DESC, updated_at DESC";
|
|
210
|
+
const rows = agentId
|
|
211
|
+
? this.database
|
|
212
|
+
.prepare(`SELECT * FROM agent_sessions WHERE agent_id = ?${archiveFilter}${order}`)
|
|
213
|
+
.all(agentId)
|
|
214
|
+
: this.database
|
|
215
|
+
.prepare(`SELECT * FROM agent_sessions${archiveFilter}${order}`)
|
|
216
|
+
.all();
|
|
217
|
+
return rows.map(toSession);
|
|
218
|
+
}
|
|
219
|
+
bindChannelConversation(slot, sessionId) {
|
|
220
|
+
if (!this.getSession(sessionId))
|
|
221
|
+
throw new Error(`Session not found: ${sessionId}`);
|
|
222
|
+
const existing = this.getChannelBinding(slot);
|
|
223
|
+
if (existing)
|
|
224
|
+
return existing;
|
|
225
|
+
const now = new Date().toISOString();
|
|
226
|
+
const binding = {
|
|
227
|
+
...slot,
|
|
228
|
+
sessionId,
|
|
229
|
+
createdAt: now,
|
|
230
|
+
updatedAt: now,
|
|
231
|
+
};
|
|
232
|
+
this.database
|
|
233
|
+
.prepare(`INSERT INTO channel_session_bindings (
|
|
234
|
+
channel, conversation_id, agent_id, workspace_key, generation,
|
|
235
|
+
session_id, created_at, updated_at
|
|
236
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?)`)
|
|
237
|
+
.run(binding.channel, binding.conversationId, binding.agentId, binding.workspaceKey, binding.generation, binding.sessionId, binding.createdAt, binding.updatedAt);
|
|
238
|
+
return binding;
|
|
239
|
+
}
|
|
240
|
+
bindHistoricalSession(slot, sessionId) {
|
|
241
|
+
if (!this.getSession(sessionId))
|
|
242
|
+
throw new Error(`Session not found: ${sessionId}`);
|
|
243
|
+
const existing = this.getChannelBinding(slot);
|
|
244
|
+
if (existing) {
|
|
245
|
+
if (existing.sessionId === sessionId)
|
|
246
|
+
return existing;
|
|
247
|
+
throw new Error("slot_already_bound");
|
|
248
|
+
}
|
|
249
|
+
const now = new Date().toISOString();
|
|
250
|
+
const binding = {
|
|
251
|
+
...slot,
|
|
252
|
+
sessionId,
|
|
253
|
+
createdAt: now,
|
|
254
|
+
updatedAt: now,
|
|
255
|
+
};
|
|
256
|
+
this.database
|
|
257
|
+
.prepare(`INSERT INTO channel_session_bindings (
|
|
258
|
+
channel, conversation_id, agent_id, workspace_key, generation,
|
|
259
|
+
session_id, created_at, updated_at
|
|
260
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?)`)
|
|
261
|
+
.run(binding.channel, binding.conversationId, binding.agentId, binding.workspaceKey, binding.generation, binding.sessionId, binding.createdAt, binding.updatedAt);
|
|
262
|
+
return binding;
|
|
263
|
+
}
|
|
264
|
+
getChannelBinding(slot) {
|
|
265
|
+
const row = this.database
|
|
266
|
+
.prepare(`SELECT * FROM channel_session_bindings
|
|
267
|
+
WHERE channel = ? AND conversation_id = ? AND agent_id = ?
|
|
268
|
+
AND workspace_key = ? AND generation = ?`)
|
|
269
|
+
.get(slot.channel, slot.conversationId, slot.agentId, slot.workspaceKey, slot.generation);
|
|
270
|
+
return row ? toChannelBinding(row) : undefined;
|
|
271
|
+
}
|
|
272
|
+
getChannelSession(slot) {
|
|
273
|
+
const binding = this.getChannelBinding(slot);
|
|
274
|
+
return binding ? this.getSession(binding.sessionId) : undefined;
|
|
275
|
+
}
|
|
276
|
+
listChannelBindings(channel, conversationId) {
|
|
277
|
+
const rows = this.database
|
|
278
|
+
.prepare(`SELECT * FROM channel_session_bindings
|
|
279
|
+
WHERE channel = ? AND conversation_id = ?`)
|
|
280
|
+
.all(channel, conversationId);
|
|
281
|
+
return rows.map(toChannelBinding);
|
|
282
|
+
}
|
|
283
|
+
unbindChannelConversation(slot) {
|
|
284
|
+
const result = this.database
|
|
285
|
+
.prepare(`DELETE FROM channel_session_bindings
|
|
286
|
+
WHERE channel = ? AND conversation_id = ? AND agent_id = ?
|
|
287
|
+
AND workspace_key = ? AND generation = ?`)
|
|
288
|
+
.run(slot.channel, slot.conversationId, slot.agentId, slot.workspaceKey, slot.generation);
|
|
289
|
+
return Number(result.changes) > 0;
|
|
290
|
+
}
|
|
291
|
+
getOrCreateBoundSession(slot, input) {
|
|
292
|
+
const existing = this.getChannelSession(slot);
|
|
293
|
+
if (existing)
|
|
294
|
+
return existing;
|
|
295
|
+
this.database.exec("BEGIN IMMEDIATE;");
|
|
296
|
+
try {
|
|
297
|
+
const recheck = this.getChannelSession(slot);
|
|
298
|
+
if (recheck) {
|
|
299
|
+
this.database.exec("COMMIT;");
|
|
300
|
+
return recheck;
|
|
301
|
+
}
|
|
302
|
+
const session = this.createSession(input);
|
|
303
|
+
this.bindChannelConversation(slot, session.id);
|
|
304
|
+
this.database.exec("COMMIT;");
|
|
305
|
+
return session;
|
|
306
|
+
}
|
|
307
|
+
catch (error) {
|
|
308
|
+
this.database.exec("ROLLBACK;");
|
|
309
|
+
throw error;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
createAndBindHistoricalSession(slot, providerSessionId) {
|
|
313
|
+
this.database.exec("BEGIN IMMEDIATE;");
|
|
314
|
+
try {
|
|
315
|
+
const existing = this.getChannelSession(slot);
|
|
316
|
+
if (existing && existing.providerSessionId === providerSessionId) {
|
|
317
|
+
this.database.exec("COMMIT;");
|
|
318
|
+
return existing;
|
|
319
|
+
}
|
|
320
|
+
const session = this.createSession({
|
|
321
|
+
agentId: slot.agentId,
|
|
322
|
+
providerSessionId,
|
|
323
|
+
cwd: slot.workspaceKey || null,
|
|
324
|
+
});
|
|
325
|
+
this.bindHistoricalSession(slot, session.id);
|
|
326
|
+
this.database.exec("COMMIT;");
|
|
327
|
+
return session;
|
|
328
|
+
}
|
|
329
|
+
catch (error) {
|
|
330
|
+
this.database.exec("ROLLBACK;");
|
|
331
|
+
throw error;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
updateSession(id, input) {
|
|
335
|
+
const existing = this.getSession(id);
|
|
336
|
+
if (!existing)
|
|
337
|
+
return undefined;
|
|
338
|
+
const now = new Date().toISOString();
|
|
339
|
+
const archivedAt = input.archived === undefined
|
|
340
|
+
? existing.archivedAt
|
|
341
|
+
: input.archived ? now : null;
|
|
342
|
+
const pinnedAt = input.archived
|
|
343
|
+
? null
|
|
344
|
+
: input.pinned === undefined ? existing.pinnedAt : input.pinned ? now : null;
|
|
345
|
+
const next = {
|
|
346
|
+
...existing,
|
|
347
|
+
providerSessionId: input.providerSessionId ?? existing.providerSessionId,
|
|
348
|
+
taskRecordId: input.taskRecordId ?? existing.taskRecordId,
|
|
349
|
+
model: input.model !== undefined ? input.model : existing.model,
|
|
350
|
+
effort: input.effort !== undefined ? input.effort : existing.effort,
|
|
351
|
+
configOverrides: input.configOverrides !== undefined ? { ...input.configOverrides } : existing.configOverrides,
|
|
352
|
+
permissionMode: input.permissionMode !== undefined ? input.permissionMode : existing.permissionMode,
|
|
353
|
+
folderId: input.folderId ?? existing.folderId,
|
|
354
|
+
cwd: input.cwd ?? existing.cwd,
|
|
355
|
+
additionalDirectories: input.additionalDirectories ?? existing.additionalDirectories,
|
|
356
|
+
title: input.title ?? existing.title,
|
|
357
|
+
status: input.status ?? existing.status,
|
|
358
|
+
pinnedAt,
|
|
359
|
+
archivedAt,
|
|
360
|
+
updatedAt: input.updatedAt ?? now,
|
|
361
|
+
};
|
|
362
|
+
this.database
|
|
363
|
+
.prepare(`UPDATE agent_sessions SET provider_session_id = ?, task_record_id = ?, model = ?, effort = ?, config_overrides = ?, permission_mode = ?, folder_id = ?, cwd = ?,
|
|
364
|
+
additional_directories = ?, title = ?, status = ?, pinned_at = ?, archived_at = ?, updated_at = ? WHERE id = ?`)
|
|
365
|
+
.run(next.providerSessionId, next.taskRecordId, next.model, next.effort, JSON.stringify(next.configOverrides), next.permissionMode, next.folderId, next.cwd, JSON.stringify(next.additionalDirectories), next.title, next.status, next.pinnedAt, next.archivedAt, next.updatedAt, id);
|
|
366
|
+
return next;
|
|
367
|
+
}
|
|
368
|
+
deleteSession(id) {
|
|
369
|
+
const result = this.database.prepare("DELETE FROM agent_sessions WHERE id = ?").run(id);
|
|
370
|
+
return Number(result.changes) > 0;
|
|
371
|
+
}
|
|
372
|
+
close() {
|
|
373
|
+
if (this.database.isOpen)
|
|
374
|
+
this.database.close();
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
function toSession(row) {
|
|
378
|
+
return {
|
|
379
|
+
schemaVersion: Number(row.schema_version),
|
|
380
|
+
id: String(row.id),
|
|
381
|
+
agentId: String(row.agent_id),
|
|
382
|
+
providerSessionId: row.provider_session_id === null ? null : String(row.provider_session_id),
|
|
383
|
+
taskRecordId: row.task_record_id === null ? null : String(row.task_record_id),
|
|
384
|
+
model: row.model === null || row.model === undefined ? null : String(row.model),
|
|
385
|
+
effort: row.effort === null || row.effort === undefined ? null : String(row.effort),
|
|
386
|
+
configOverrides: JSON.parse(String(row.config_overrides ?? "{}")),
|
|
387
|
+
permissionMode: row.permission_mode === null || row.permission_mode === undefined ? null : String(row.permission_mode),
|
|
388
|
+
folderId: row.folder_id === null ? null : String(row.folder_id),
|
|
389
|
+
cwd: row.cwd === null ? null : String(row.cwd),
|
|
390
|
+
additionalDirectories: JSON.parse(String(row.additional_directories)),
|
|
391
|
+
title: row.title === null ? null : String(row.title),
|
|
392
|
+
status: String(row.status),
|
|
393
|
+
pinnedAt: row.pinned_at === null || row.pinned_at === undefined ? null : String(row.pinned_at),
|
|
394
|
+
archivedAt: row.archived_at === null || row.archived_at === undefined ? null : String(row.archived_at),
|
|
395
|
+
createdAt: String(row.created_at),
|
|
396
|
+
updatedAt: String(row.updated_at),
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
function toChannelBinding(row) {
|
|
400
|
+
return {
|
|
401
|
+
channel: String(row.channel),
|
|
402
|
+
conversationId: String(row.conversation_id),
|
|
403
|
+
agentId: String(row.agent_id),
|
|
404
|
+
workspaceKey: String(row.workspace_key),
|
|
405
|
+
generation: Number(row.generation),
|
|
406
|
+
sessionId: String(row.session_id),
|
|
407
|
+
createdAt: String(row.created_at),
|
|
408
|
+
updatedAt: String(row.updated_at),
|
|
409
|
+
};
|
|
410
|
+
}
|
|
411
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@codebridge/session-catalog",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.js"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@codebridge/core": "0.1.0"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import type { ChannelDeliveryInput, QueuePauseReason, Run, SessionRuntime, SessionRuntimeTransaction, SessionRuntimeWorkItemInput, SessionTurn, SessionTurnMessage, SqliteEventStore } from "@codebridge/work-items";
|
|
2
|
+
export declare class SessionCommandError extends Error {
|
|
3
|
+
readonly code: "queue_full" | "turn_not_found" | "turn_not_queued" | "turn_version_conflict" | "runtime_version_conflict" | "active_run_mismatch";
|
|
4
|
+
readonly status: 404 | 409 | 422;
|
|
5
|
+
constructor(code: "queue_full" | "turn_not_found" | "turn_not_queued" | "turn_version_conflict" | "runtime_version_conflict" | "active_run_mismatch", status: 404 | 409 | 422);
|
|
6
|
+
}
|
|
7
|
+
export interface SubmitTurnInput {
|
|
8
|
+
sessionId: string;
|
|
9
|
+
idempotencyKey: string;
|
|
10
|
+
message: SessionTurnMessage;
|
|
11
|
+
workItem: SessionRuntimeWorkItemInput;
|
|
12
|
+
attachments?: Array<{
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
mimeType: string;
|
|
16
|
+
dataBase64: string;
|
|
17
|
+
}>;
|
|
18
|
+
delivery?: ChannelDeliveryInput;
|
|
19
|
+
}
|
|
20
|
+
export interface SubmitTurnResult {
|
|
21
|
+
acceptance: "queued" | "dispatched";
|
|
22
|
+
turn: SessionTurn;
|
|
23
|
+
run: Run | null;
|
|
24
|
+
runtime: SessionRuntime;
|
|
25
|
+
workItemId: string;
|
|
26
|
+
}
|
|
27
|
+
export interface SessionCoordinatorOptions {
|
|
28
|
+
maxQueuedTurns: number;
|
|
29
|
+
now?: () => Date;
|
|
30
|
+
}
|
|
31
|
+
export declare class SessionCoordinator {
|
|
32
|
+
protected readonly store: SqliteEventStore;
|
|
33
|
+
protected readonly options: SessionCoordinatorOptions;
|
|
34
|
+
protected readonly now: () => Date;
|
|
35
|
+
constructor(store: SqliteEventStore, options: SessionCoordinatorOptions);
|
|
36
|
+
submitTurn(input: SubmitTurnInput): SubmitTurnResult;
|
|
37
|
+
finishRun(input: {
|
|
38
|
+
sessionId: string;
|
|
39
|
+
runId: string;
|
|
40
|
+
status: "succeeded" | "failed" | "cancelled" | "interrupted";
|
|
41
|
+
reason?: string;
|
|
42
|
+
}): {
|
|
43
|
+
runtime: SessionRuntime;
|
|
44
|
+
run: Run;
|
|
45
|
+
dispatched: {
|
|
46
|
+
turn: SessionTurn;
|
|
47
|
+
run: Run;
|
|
48
|
+
} | null;
|
|
49
|
+
};
|
|
50
|
+
cancelQueuedTurn(input: {
|
|
51
|
+
sessionId: string;
|
|
52
|
+
turnId: string;
|
|
53
|
+
expectedVersion: number;
|
|
54
|
+
idempotencyKey: string;
|
|
55
|
+
}): {
|
|
56
|
+
turn: SessionTurn;
|
|
57
|
+
runtime: SessionRuntime;
|
|
58
|
+
};
|
|
59
|
+
resumeQueue(input: {
|
|
60
|
+
sessionId: string;
|
|
61
|
+
expectedRuntimeVersion: number;
|
|
62
|
+
idempotencyKey: string;
|
|
63
|
+
}): {
|
|
64
|
+
runtime: SessionRuntime;
|
|
65
|
+
dispatched: {
|
|
66
|
+
turn: SessionTurn;
|
|
67
|
+
run: Run;
|
|
68
|
+
} | null;
|
|
69
|
+
};
|
|
70
|
+
requestRunCancellation(input: {
|
|
71
|
+
sessionId: string;
|
|
72
|
+
runId: string;
|
|
73
|
+
expectedRuntimeVersion: number;
|
|
74
|
+
idempotencyKey: string;
|
|
75
|
+
}): {
|
|
76
|
+
disposition: "cancelled" | "interrupting" | "already_terminal";
|
|
77
|
+
run: Run;
|
|
78
|
+
runtime: SessionRuntime;
|
|
79
|
+
};
|
|
80
|
+
repairRunFromTerminalEvidence(input: {
|
|
81
|
+
sessionId: string;
|
|
82
|
+
runId: string;
|
|
83
|
+
status: "succeeded" | "failed" | "cancelled" | "interrupted";
|
|
84
|
+
}): {
|
|
85
|
+
runtime: SessionRuntime;
|
|
86
|
+
run: Run;
|
|
87
|
+
dispatched: {
|
|
88
|
+
turn: SessionTurn;
|
|
89
|
+
run: Run;
|
|
90
|
+
} | null;
|
|
91
|
+
};
|
|
92
|
+
pauseQueue(input: {
|
|
93
|
+
sessionId: string;
|
|
94
|
+
reason: Exclude<QueuePauseReason, null>;
|
|
95
|
+
}): SessionRuntime;
|
|
96
|
+
protected finishRunInTransaction(tx: SessionRuntimeTransaction, input: {
|
|
97
|
+
sessionId: string;
|
|
98
|
+
runId: string;
|
|
99
|
+
status: "succeeded" | "failed" | "cancelled" | "interrupted";
|
|
100
|
+
reason?: string;
|
|
101
|
+
}): {
|
|
102
|
+
runtime: SessionRuntime;
|
|
103
|
+
run: Run;
|
|
104
|
+
dispatched: {
|
|
105
|
+
turn: SessionTurn;
|
|
106
|
+
run: Run;
|
|
107
|
+
} | null;
|
|
108
|
+
};
|
|
109
|
+
private advanceQueueAfterSuccess;
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=coordinator.d.ts.map
|