@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
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0 — 2026-10-10
|
|
4
|
+
|
|
5
|
+
First npm distribution release.
|
|
6
|
+
|
|
7
|
+
- Ships the Bridge, host Runner, internal modules and Workbench static assets in one installable package.
|
|
8
|
+
- Adds interactive initialization with credential verification, Telegram allowlists, keychain references and safe cancellation.
|
|
9
|
+
- Generates a private config with a random Runner token for non-interactive setup, without replacing an existing file.
|
|
10
|
+
- Preserves secret references during config updates and redacts credentials from Feishu SDK logs.
|
|
11
|
+
- Adds configurable context/idle session rotation and scopes deployment instructions to CodeBridge maintenance tasks.
|
|
12
|
+
- Provides a shared package-derived version, version consistency checks and isolated package-install verification.
|
|
13
|
+
|
|
14
|
+
Runtime requirements: Node.js 22.19 or newer. macOS is the supported host setup; this candidate does not add Linux service management. Agent CLI installation and provider authentication remain separate setup steps.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 CodeBridge contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,218 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="apps/web/public/brand/agent-logo-carbon.svg" />
|
|
4
|
+
<img alt="AGENT · CodeBridge" src="apps/web/public/brand/agent-logo.svg" width="320" />
|
|
5
|
+
</picture>
|
|
6
|
+
</p>
|
|
2
7
|
|
|
3
|
-
|
|
8
|
+
# CodeBridge
|
|
9
|
+
|
|
10
|
+
Self-hosted, multi-channel [Agent Client Protocol (ACP)](https://agentclientprotocol.com) gateway for coding agents.
|
|
11
|
+
|
|
12
|
+
Control local **Cursor**, **Claude Code**, **Codex**, and optionally **Pi** from Feishu or Telegram while your source code, Git credentials, MCP tools, and agent sessions stay on your own Mac/Linux host.
|
|
13
|
+
|
|
14
|
+
[简体中文](README.zh-CN.md)
|
|
15
|
+
|
|
16
|
+
## What it does
|
|
17
|
+
|
|
18
|
+
```text
|
|
19
|
+
Feishu WebSocket ─┐
|
|
20
|
+
├─ Bridge ── authenticated HTTP/SSE + token ── Runner ── ACP agents ── local files
|
|
21
|
+
Telegram polling ─┘
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
| Component | Responsibility |
|
|
25
|
+
|-----------|----------------|
|
|
26
|
+
| **Bridge** | Channel connections, access policy, slash commands, session routing, and reply presentation |
|
|
27
|
+
| **Runner** | Host-side ACP sessions, agent processes, file/Git access, and permission handling |
|
|
28
|
+
| **Agent adapters** | Cursor, Claude Code, and Codex ACP adapters plus the native Pi Node SDK adapter |
|
|
29
|
+
|
|
30
|
+
The Bridge and Runner are intentionally separate: the Bridge can be remote or containerized, but the Runner stays next to the CLIs and files it needs to access.
|
|
31
|
+
|
|
32
|
+
## Install with npm
|
|
33
|
+
|
|
34
|
+
Requires Node.js 22.19 or newer. Install with `npm install -g @graychennpm/codebridge@0.1.0`, then run `codebridge init`. Start `codebridge-runner` and `codebridge start` in separate terminals. The package includes the Bridge, host Runner and Workbench assets; no source build is needed.
|
|
35
|
+
|
|
36
|
+
You can also run `npx @graychennpm/codebridge@0.1.0 init`. For local distribution, `pnpm package:release` produces a tarball in `dist/`; `pnpm test:package` verifies a clean installation. See the [release guide](docs/zh-CN/npm-release.md).
|
|
37
|
+
|
|
38
|
+
## Highlights
|
|
39
|
+
|
|
40
|
+
- Feishu long connection with streaming cards and optional custom menu
|
|
41
|
+
- Telegram Bot API long polling, including a native command menu
|
|
42
|
+
- Scoped native mentions on Feishu and Telegram for the requester or participants explicitly mentioned in a task
|
|
43
|
+
- One ACP path for `cursor`, `claude`, and `codex`; the legacy direct-CLI transport is gone
|
|
44
|
+
- Resume local sessions with `/resume`, `/resume last`, or `/resume all`
|
|
45
|
+
- Live adapter capabilities through `/model`, `/effort`, `/permission`, and `/config`
|
|
46
|
+
- Named workspaces, additional directories, `/clone`, `/pull`, and file delivery
|
|
47
|
+
- macOS TCC-aware `/root add` flow with an immediate “waiting for system permission” status
|
|
48
|
+
- launchd KeepAlive on macOS, or the built-in watchdog for manual background mode
|
|
49
|
+
|
|
50
|
+
## Quick start
|
|
51
|
+
|
|
52
|
+
### Requirements
|
|
53
|
+
|
|
54
|
+
- macOS or Linux
|
|
55
|
+
- Node.js ≥ 22.19, pnpm, and curl. The WorkItem Event Store uses Node's built-in `node:sqlite`; the optional Pi SDK adapter follows Pi's Node runtime requirement.
|
|
56
|
+
- At least one local agent CLI: `cursor-agent`, `claude`, or `codex`
|
|
57
|
+
- A Feishu custom app with a bot, or a Telegram bot token
|
|
58
|
+
|
|
59
|
+
### Install and start
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
git clone https://github.com/Chenkeliang/CodeBridge.git
|
|
63
|
+
cd CodeBridge
|
|
64
|
+
|
|
65
|
+
# Installs dependencies, builds, creates config, and checks local CLIs.
|
|
66
|
+
./scripts/start.sh setup
|
|
67
|
+
|
|
68
|
+
# If setup did not start the service, start Runner + Bridge in the background.
|
|
69
|
+
./scripts/start.sh start
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
The setup wizard (also available as `codebridge init`) writes `~/.codebridge/config.yaml`. It verifies Feishu / Telegram credentials on the spot, generates a Runner token, and picks the project root and default agent. Secrets go to the OS keychain; the file only holds `keychain:` references. Existing settings and comments are preserved unless explicitly changed in the wizard; YAML formatting may change. Telegram requires a user or chat allowlist. Automatic user detection uses a one-time code sent to the bot in a private chat.
|
|
73
|
+
|
|
74
|
+
With `codebridge init --defaults` or no TTY, only a missing config is created. A random Runner token is stored in plaintext in a mode-600 file (or as an environment reference when `RUNNER_TOKEN` is set). This path does not access the keychain or verify channel credentials. Run `codebridge secrets migrate` afterward to move plaintext secrets to the keychain.
|
|
75
|
+
|
|
76
|
+
Verify the installation:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
./scripts/start.sh status
|
|
80
|
+
./scripts/start.sh doctor
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
On macOS, use launchd for boot-time startup and KeepAlive. Choose one process manager; do not mix launchd with manual `start.sh` mode:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
./scripts/start.sh install-launchd all
|
|
87
|
+
./scripts/start.sh restart
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
When upgrading from the former `feishu-code-bridge` name, `restart` or `install-launchd` migrates the default data directory from `~/.feishu-code-bridge` to `~/.codebridge` and replaces the old launchd jobs. Existing files in `~/.codebridge` are never overwritten, and an explicitly configured `DATA_DIR` is never moved. If you used the former `Feishu Code Runner.app`, run `./scripts/start.sh install-macos-runner` and approve protected folders again: macOS does not transfer TCC grants to the new Bundle ID.
|
|
91
|
+
|
|
92
|
+
Useful lifecycle commands:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
./scripts/start.sh status
|
|
96
|
+
./scripts/start.sh restart
|
|
97
|
+
./scripts/start.sh stop
|
|
98
|
+
./scripts/start.sh fg # foreground Bridge debugging
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Configure a channel
|
|
102
|
+
|
|
103
|
+
For Feishu, create an enterprise custom app, enable the bot, and subscribe to the long-connection events described in [Feishu app setup](docs/zh-CN/feishu-app-setup.md).
|
|
104
|
+
|
|
105
|
+
Telegram is optional. It can run alongside Feishu or in Telegram-only mode:
|
|
106
|
+
|
|
107
|
+
```yaml
|
|
108
|
+
telegram:
|
|
109
|
+
botToken: "123456:replace-with-bot-token"
|
|
110
|
+
allowedUsers: ["123456789"] # optional allowlist
|
|
111
|
+
allowedChats: ["-1001234567890"] # optional allowlist
|
|
112
|
+
pollingTimeoutSec: 25
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
See [examples/config.full.yaml](examples/config.full.yaml) for the complete configuration shape.
|
|
116
|
+
|
|
117
|
+
## Phone-first commands
|
|
118
|
+
|
|
119
|
+
`/menu` and `/help` intentionally return a short list for small screens. Use `/help full` for the grouped reference.
|
|
120
|
+
|
|
121
|
+
| Command | Use |
|
|
122
|
+
|---------|-----|
|
|
123
|
+
| `/status` | Check backend, project directory, model, permission, and active-task state |
|
|
124
|
+
| `/resume last` | Continue the most recent local session in the current directory |
|
|
125
|
+
| `/new` | Start a clean ACP session |
|
|
126
|
+
| `/stop` | Stop the current task and clear queued Feishu prompts |
|
|
127
|
+
| `/backend claude` | Switch the current chat to Cursor, Claude, or Codex |
|
|
128
|
+
| `/model` | List live models; `/model <name>` switches one |
|
|
129
|
+
| `/permission` | List live modes; `/permission <mode>` switches one |
|
|
130
|
+
| `/ws list` | Show saved workspaces |
|
|
131
|
+
|
|
132
|
+
Other useful commands:
|
|
133
|
+
|
|
134
|
+
```text
|
|
135
|
+
/resume [N|last|all]
|
|
136
|
+
/effort [list|level|default]
|
|
137
|
+
/config [id value|default]
|
|
138
|
+
/root add|remove|rm /absolute/path
|
|
139
|
+
/send /absolute/path/to/file
|
|
140
|
+
/clone <git-url> [directory-name]
|
|
141
|
+
/pull
|
|
142
|
+
/approve /deny /steer <instruction>
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
The exact model, effort, permission, and boolean config values come from the connected ACP adapter, so `/model list`, `/effort list`, `/permission list`, and `/config` are the source of truth.
|
|
146
|
+
|
|
147
|
+
To request a real channel notification, say “mention me when it finishes” or explicitly mention a participant in the task. The Agent uses `fcb mention` internally; ordinary replies do not create extra notifications.
|
|
148
|
+
|
|
149
|
+
## Sessions, directories, and permissions
|
|
150
|
+
|
|
151
|
+
- Session bindings are isolated by channel chat, topic, backend, and working directory; session metadata is persisted under the configured data directory.
|
|
152
|
+
- `/cd` changes the current project. `/ws save|use` gives frequently used directories short names.
|
|
153
|
+
- `/root add /absolute/path` adds an ACP `additionalDirectories` entry. On macOS, Runner touches the directory first so the normal TCC prompt can appear. The chat reports that it is waiting for system authorization, but the command does not silently grant macOS access.
|
|
154
|
+
- `runnerHost.acpPermissionPolicy` controls agent permission requests:
|
|
155
|
+
|
|
156
|
+
| Policy | Behavior |
|
|
157
|
+
|--------|----------|
|
|
158
|
+
| `auto_allow` | Runner approves ACP permission requests automatically (default for trusted local use) |
|
|
159
|
+
| `prompt_feishu` | Pause and wait for `/approve` or `/deny` in the chat; timeout rejects |
|
|
160
|
+
| `prompt_deny` | Reject permission requests automatically |
|
|
161
|
+
|
|
162
|
+
- On macOS, `./scripts/start.sh install-macos-runner` creates the optional fixed-identity helper. Ad-hoc signing is free and local; TCC still requires the user’s approval.
|
|
163
|
+
|
|
164
|
+
Read [SECURITY.md](SECURITY.md) before exposing anything beyond localhost.
|
|
165
|
+
|
|
166
|
+
## Concurrency and known boundaries
|
|
167
|
+
|
|
168
|
+
- Different chats can run in parallel up to `runnerHost.maxConcurrentRuns` (default `4`).
|
|
169
|
+
- A Feishu `chatId + topic` has one active task. Later messages queue up to five; `/stop` cancels the task and clears that queue.
|
|
170
|
+
- A group shares one backend, directory, model, and session binding. Use separate chats for independent projects or agents.
|
|
171
|
+
- Agent notifications are limited to the current sender and participants explicitly mentioned in the current task. CodeBridge does not search the organization directory, mention everyone, or accept arbitrary user IDs from the Agent.
|
|
172
|
+
- `/transport` remains only as a compatibility response; ACP is the only transport.
|
|
173
|
+
|
|
174
|
+
## ACP backends
|
|
175
|
+
|
|
176
|
+
| Backend | ACP command |
|
|
177
|
+
|---------|-------------|
|
|
178
|
+
| Cursor | `cursor-agent acp` |
|
|
179
|
+
| Claude Code | `npx -y @agentclientprotocol/claude-agent-acp@0.81.1` |
|
|
180
|
+
| Codex | `npx -y @agentclientprotocol/codex-acp@1.13.1` |
|
|
181
|
+
|
|
182
|
+
Resume semantics depend on the adapter: Claude/Codex use `session/resume`; Cursor uses `session/load`.
|
|
183
|
+
|
|
184
|
+
Probe adapters without starting the Bridge:
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
node scripts/acp-probe.mjs
|
|
188
|
+
node scripts/acp-probe.mjs --backend codex
|
|
189
|
+
RUNNER_TOKEN=... node scripts/test-acp-live.mjs --backend cursor
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
## Documentation
|
|
193
|
+
|
|
194
|
+
| Topic | Link |
|
|
195
|
+
|-------|------|
|
|
196
|
+
| Feishu app and permissions | [docs/zh-CN/feishu-app-setup.md](docs/zh-CN/feishu-app-setup.md) |
|
|
197
|
+
| Feishu custom menu | [docs/zh-CN/feishu-bot-menu.md](docs/zh-CN/feishu-bot-menu.md) |
|
|
198
|
+
| Manual / Docker quick start | [docs/zh-CN/quickstart.md](docs/zh-CN/quickstart.md) |
|
|
199
|
+
| Model, effort, and permission | [docs/zh-CN/model-effort.md](docs/zh-CN/model-effort.md) |
|
|
200
|
+
| Docker Bridge + host Runner | [docs/zh-CN/deploy/docker-host-runner.md](docs/zh-CN/deploy/docker-host-runner.md) |
|
|
201
|
+
| Multi-project Agent workbench baseline | [docs/orchestration/README.md](docs/orchestration/README.md) |
|
|
202
|
+
| Full config example | [examples/config.full.yaml](examples/config.full.yaml) |
|
|
203
|
+
| Security policy | [SECURITY.md](SECURITY.md) |
|
|
204
|
+
|
|
205
|
+
## Development
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
pnpm install
|
|
209
|
+
pnpm run lint
|
|
210
|
+
pnpm run build
|
|
211
|
+
pnpm test
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
The monorepo contains `core`, `backends`, `work-items`, `policy`, `run-executor`, `project-catalog`, `runner-host`, `runner-client`, `router`, `channel-feishu`, `channel-telegram`, and `apps/bridge`.
|
|
215
|
+
|
|
216
|
+
## License
|
|
217
|
+
|
|
218
|
+
[MIT](LICENSE)
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="apps/web/public/brand/agent-logo-carbon.svg" />
|
|
4
|
+
<img alt="AGENT · CodeBridge" src="apps/web/public/brand/agent-logo.svg" width="320" />
|
|
5
|
+
</picture>
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
# CodeBridge(码桥)
|
|
9
|
+
|
|
10
|
+
一个自托管的多通道 [Agent Client Protocol(ACP)](https://agentclientprotocol.com) 网关。
|
|
11
|
+
|
|
12
|
+
通过飞书或 Telegram 远程驱动本机 **Cursor、Claude Code、Codex**,代码、Git 凭据、MCP 工具和 Agent session 都留在自己的 Mac/Linux 上。
|
|
13
|
+
|
|
14
|
+
[English README](README.md)
|
|
15
|
+
|
|
16
|
+
## 它解决什么问题
|
|
17
|
+
|
|
18
|
+
你不需要把项目复制到云端,也不需要重新配置本机的 Git、SSH、MCP 和开发环境;在手机聊天里发任务,码桥让本机 Agent 执行并把结果带回聊天。
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
飞书 WebSocket ─┐
|
|
22
|
+
├─ Bridge ── 带 token 的 HTTP/SSE ── Runner ── ACP Agent ── 本地文件
|
|
23
|
+
Telegram 长轮询 ─┘
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
| 组件 | 职责 |
|
|
27
|
+
|------|------|
|
|
28
|
+
| **Bridge** | 连接聊天通道、访问策略、斜杠命令、session 路由和消息展示 |
|
|
29
|
+
| **Runner** | 在宿主机启动 ACP session/Agent,访问本地文件和 Git,并处理权限请求 |
|
|
30
|
+
| **ACP adapter** | Cursor、Claude Code、Codex 的协议适配 |
|
|
31
|
+
|
|
32
|
+
Bridge 与 Runner 分开设计:Bridge 可以放在 Docker 或远程机器,Runner 必须靠近 CLI、代码和凭据所在的宿主机。
|
|
33
|
+
|
|
34
|
+
## npm 安装
|
|
35
|
+
|
|
36
|
+
需要 Node.js 22.19 或更高版本。运行 `npm install -g @graychennpm/codebridge@0.1.0` 安装,然后运行 `codebridge init` 完成初始化。在两个终端分别运行 `codebridge-runner` 和 `codebridge start`。安装包包含 Bridge、宿主机 Runner 和 Web 静态资源,无需构建源码。
|
|
37
|
+
|
|
38
|
+
也可以使用 `npx @graychennpm/codebridge@0.1.0 init`。源码仓库仍支持 `pnpm package:release` 生成本地 tarball,安装、隔离验收和维护步骤见 [npm 交付说明](docs/zh-CN/npm-release.md)。
|
|
39
|
+
|
|
40
|
+
## 主要能力
|
|
41
|
+
|
|
42
|
+
- 飞书长连接流式卡片,可配置机器人自定义菜单
|
|
43
|
+
- Telegram Bot API 长轮询,并自动注册原生命令菜单
|
|
44
|
+
- 飞书和 Telegram 原生 @ 通知,可提醒当前发送者或任务中明确 @ 的参与者
|
|
45
|
+
- 统一 ACP 通道:`cursor`、`claude`、`codex`;旧版直接 CLI transport 已移除
|
|
46
|
+
- `/resume`、`/resume last`、`/resume all` 恢复本机会话
|
|
47
|
+
- `/model`、`/effort`、`/permission`、`/config` 实时读取当前 adapter 能力
|
|
48
|
+
- 命名工作区、ACP 附加目录、`/clone`、`/pull`、文件发送
|
|
49
|
+
- `/root add` 感知 macOS TCC 授权,并即时提示“正在等待系统权限”
|
|
50
|
+
- macOS launchd KeepAlive,或手动后台模式 watchdog
|
|
51
|
+
|
|
52
|
+
## 快速开始
|
|
53
|
+
|
|
54
|
+
### 环境要求
|
|
55
|
+
|
|
56
|
+
- macOS 或 Linux
|
|
57
|
+
- Node.js ≥ 22.5、pnpm、curl。WorkItem Event Store 使用 Node 内置的 `node:sqlite`。
|
|
58
|
+
- 本机至少安装一个 CLI:`cursor-agent`、`claude` 或 `codex`
|
|
59
|
+
- 一个已开启机器人的飞书企业自建应用,或一个 Telegram Bot token
|
|
60
|
+
|
|
61
|
+
### 安装与启动
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
git clone https://github.com/Chenkeliang/CodeBridge.git
|
|
65
|
+
cd CodeBridge
|
|
66
|
+
|
|
67
|
+
# 安装依赖、构建、生成配置、检查本机 CLI
|
|
68
|
+
./scripts/start.sh setup
|
|
69
|
+
|
|
70
|
+
# 如果引导时没有启动服务,再手动启动
|
|
71
|
+
./scripts/start.sh start
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
引导配置保存在 `~/.codebridge/config.yaml`。初始化向导(也可单独运行 `codebridge init`)会当场校验飞书 / Telegram 凭据、生成 Runner token、选择项目目录和默认 Agent;密钥存入系统钥匙串,配置文件里只写 `keychain:` 引用。已有设置和注释保留,只修改向导中确认的项目;YAML 排版可能调整。Telegram 必须有用户或聊天白名单,自动识别用户时需私聊机器人发送一次性验证码。
|
|
75
|
+
|
|
76
|
+
`codebridge init --defaults` 或无终端运行时,仅新建不存在的配置;随机 Runner token 以明文写入权限 `600` 的文件(已有 `RUNNER_TOKEN` 环境变量时保存引用),不访问钥匙串、不校验通道凭据。之后可运行 `codebridge secrets migrate` 迁入钥匙串。
|
|
77
|
+
|
|
78
|
+
检查状态:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
./scripts/start.sh status
|
|
82
|
+
./scripts/start.sh doctor
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
macOS 开机自启推荐使用 launchd。手动后台模式和 launchd 二选一,不要混用:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
./scripts/start.sh install-launchd all
|
|
89
|
+
./scripts/start.sh restart
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
从旧名称 `feishu-code-bridge` 升级时,执行 `restart` 或 `install-launchd` 会把默认数据目录从 `~/.feishu-code-bridge` 迁移到 `~/.codebridge`,并替换旧 launchd 任务;已存在于 `~/.codebridge` 的文件不会被覆盖,显式设置的 `DATA_DIR` 也不会被移动。如果以前安装过 `Feishu Code Runner.app`,请执行 `./scripts/start.sh install-macos-runner` 并重新授权受保护目录;macOS 不会把 TCC 权限迁移到新的 Bundle ID。
|
|
93
|
+
|
|
94
|
+
常用生命周期命令:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
./scripts/start.sh status
|
|
98
|
+
./scripts/start.sh restart
|
|
99
|
+
./scripts/start.sh stop
|
|
100
|
+
./scripts/start.sh fg # 前台调试 Bridge
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### 配置通道
|
|
104
|
+
|
|
105
|
+
飞书需要创建企业自建应用、开启机器人,并按[飞书应用配置指南](docs/zh-CN/feishu-app-setup.md)订阅长连接事件。
|
|
106
|
+
|
|
107
|
+
Telegram 可与飞书同时启用,也可以只配置 Telegram:
|
|
108
|
+
|
|
109
|
+
```yaml
|
|
110
|
+
telegram:
|
|
111
|
+
botToken: "123456:replace-with-bot-token"
|
|
112
|
+
allowedUsers: ["123456789"] # 可选白名单
|
|
113
|
+
allowedChats: ["-1001234567890"] # 可选白名单
|
|
114
|
+
pollingTimeoutSec: 25
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
完整配置见 [examples/config.full.yaml](examples/config.full.yaml)。
|
|
118
|
+
|
|
119
|
+
### Web Workbench
|
|
120
|
+
|
|
121
|
+
Bridge 启动后可在本机打开 `http://127.0.0.1:19790/workbench/`。它和飞书、Telegram 共用 WorkItem、Run 和事件流:像普通 Agent 工作台一样直接输入目标,输入框周边的 Agent、模式和工作空间用于配置当前会话,任务由选定 Agent 处理。页面只绑定本地 Bridge,不把代码或凭据上传到云端。
|
|
122
|
+
|
|
123
|
+
## 手机优先的命令
|
|
124
|
+
|
|
125
|
+
`/menu` 和 `/help` 默认只返回短菜单,适合手机;发送 `/help full` 查看分组完整帮助。
|
|
126
|
+
|
|
127
|
+
| 命令 | 用途 |
|
|
128
|
+
|------|------|
|
|
129
|
+
| `/status` | 查看 backend、目录、模型、权限和任务状态 |
|
|
130
|
+
| `/resume last` | 继续当前目录最近一次本机会话 |
|
|
131
|
+
| `/new` | 新建 ACP session |
|
|
132
|
+
| `/stop` | 停止当前任务,并清空飞书排队消息 |
|
|
133
|
+
| `/backend claude` | 在 Cursor、Claude、Codex 之间切换 |
|
|
134
|
+
| `/model` | 拉取实时模型;`/model <名称>` 切换 |
|
|
135
|
+
| `/permission` | 拉取实时权限模式;`/permission <模式>` 切换 |
|
|
136
|
+
| `/ws list` | 查看已保存工作区 |
|
|
137
|
+
|
|
138
|
+
其他常用命令:
|
|
139
|
+
|
|
140
|
+
```text
|
|
141
|
+
/resume [N|last|all]
|
|
142
|
+
/effort [list|级别|default]
|
|
143
|
+
/config [id value|default]
|
|
144
|
+
/root add|remove|rm /absolute/path
|
|
145
|
+
/send /absolute/path/to/file
|
|
146
|
+
/clone <git-url> [目录名]
|
|
147
|
+
/pull
|
|
148
|
+
/approve /deny /steer <指令>
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
模型、effort、permission 和 boolean config 的准确选项以当前 ACP adapter 为准;可用 `/model list`、`/effort list`、`/permission list`、`/config` 查看。
|
|
152
|
+
|
|
153
|
+
需要真实通知时,可以在任务里说“完成后 @ 我”,或者直接 @ 需要通知的参与者。Agent 会在确有必要时调用内部的 `fcb mention`;普通回复不会额外提醒。
|
|
154
|
+
|
|
155
|
+
## Session、目录与权限
|
|
156
|
+
|
|
157
|
+
- session 绑定按聊天、话题、backend 和工作目录隔离,元数据持久化在数据目录。
|
|
158
|
+
- `/cd` 切换项目;`/ws save|use` 给常用目录起短名称。
|
|
159
|
+
- `/root add /absolute/path` 添加 ACP `additionalDirectories`。macOS 上 Runner 会先实际访问目录,触发正常 TCC 弹窗;聊天会即时提示正在等待系统授权,但不会静默获得系统权限。
|
|
160
|
+
- `runnerHost.acpPermissionPolicy`:
|
|
161
|
+
|
|
162
|
+
| 策略 | 行为 |
|
|
163
|
+
|------|------|
|
|
164
|
+
| `auto_allow` | 自动批准 ACP 权限请求(默认,适合可信本机) |
|
|
165
|
+
| `prompt_feishu` | 在聊天等待 `/approve` 或 `/deny`,超时自动拒绝 |
|
|
166
|
+
| `prompt_deny` | 自动拒绝权限请求 |
|
|
167
|
+
|
|
168
|
+
- macOS 可执行 `./scripts/start.sh install-macos-runner` 安装固定身份 helper。默认 ad-hoc 签名免费且只适合本机;TCC 仍需用户确认。
|
|
169
|
+
|
|
170
|
+
安全边界详见 [SECURITY.md](SECURITY.md)。
|
|
171
|
+
|
|
172
|
+
## 并发与限制
|
|
173
|
+
|
|
174
|
+
- 不同聊天可并行运行,默认上限为 `runnerHost.maxConcurrentRuns: 4`。
|
|
175
|
+
- 飞书同一 `chatId + topic` 同时只有一个任务;后续消息最多排队 5 条,`/stop` 会取消任务并清空队列。
|
|
176
|
+
- 同一个群共享 backend、目录、模型和 session 绑定;要并行处理不同项目,请使用不同聊天。
|
|
177
|
+
- Agent 只能通知本轮发送者和本轮任务中明确 @ 的参与者;不会扫描组织通讯录、@ 所有人,也不能自行构造任意用户 ID。
|
|
178
|
+
- `/transport` 仅保留兼容回复,实际只支持 ACP。
|
|
179
|
+
|
|
180
|
+
## ACP 后端
|
|
181
|
+
|
|
182
|
+
| Backend | ACP 启动命令 |
|
|
183
|
+
|---------|--------------|
|
|
184
|
+
| Cursor | `cursor-agent acp` |
|
|
185
|
+
| Claude Code | `npx -y @agentclientprotocol/claude-agent-acp@0.78.0` |
|
|
186
|
+
| Codex | `npx -y @agentclientprotocol/codex-acp@1.12.0` |
|
|
187
|
+
|
|
188
|
+
续聊语义取决于 adapter:Claude/Codex 使用 `session/resume`,Cursor 使用 `session/load`。
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
node scripts/acp-probe.mjs
|
|
192
|
+
node scripts/acp-probe.mjs --backend codex
|
|
193
|
+
RUNNER_TOKEN=... node scripts/test-acp-live.mjs --backend cursor
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## 文档
|
|
197
|
+
|
|
198
|
+
| 主题 | 文档 |
|
|
199
|
+
|------|------|
|
|
200
|
+
| 飞书应用与权限 | [docs/zh-CN/feishu-app-setup.md](docs/zh-CN/feishu-app-setup.md) |
|
|
201
|
+
| 飞书机器人自定义菜单 | [docs/zh-CN/feishu-bot-menu.md](docs/zh-CN/feishu-bot-menu.md) |
|
|
202
|
+
| 手动 / Docker 快速开始 | [docs/zh-CN/quickstart.md](docs/zh-CN/quickstart.md) |
|
|
203
|
+
| Model、Effort、Permission | [docs/zh-CN/model-effort.md](docs/zh-CN/model-effort.md) |
|
|
204
|
+
| Docker Bridge + 宿主机 Runner | [docs/zh-CN/deploy/docker-host-runner.md](docs/zh-CN/deploy/docker-host-runner.md) |
|
|
205
|
+
| 多项目 Agent 工作台设计基线 | [docs/orchestration/README.md](docs/orchestration/README.md) |
|
|
206
|
+
| 完整配置 | [examples/config.full.yaml](examples/config.full.yaml) |
|
|
207
|
+
| 安全策略 | [SECURITY.md](SECURITY.md) |
|
|
208
|
+
|
|
209
|
+
## 开发
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
pnpm install
|
|
213
|
+
pnpm run lint
|
|
214
|
+
pnpm run build
|
|
215
|
+
pnpm test
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
这是一个 pnpm monorepo,包含 `core`、`backends`、`work-items`、`policy`、`run-executor`、`project-catalog`、`runner-host`、`runner-client`、`router`、`channel-feishu`、`channel-telegram` 和 `apps/bridge`。
|
|
219
|
+
|
|
220
|
+
## License
|
|
221
|
+
|
|
222
|
+
[MIT](LICENSE)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2440 700" role="img" aria-label="AGENT"><g transform="translate(0 75)"><path fill="#FF683D" d="M0 0h550v550H0z"/><path fill="#211610" d="M68.75 68.75h412.5v412.5H68.75z"/><path fill="#FF683D" d="M275 137.5h68.75v68.75H275zM275 206.25h137.5v68.75H275zM275 275h137.5v68.75H275zM275 343.75h68.75v68.75H275z"/></g><g fill="#F1F2EA"><path transform="translate(690 550) scale(1 -1)" d="M50 300V0H100V150H250V0H300V300H250V200H100V300ZM150 400V350H200V400ZM100 350V300H150V350ZM200 350V300H250V350Z"/><path transform="translate(1040 550) scale(1 -1)" d="M50 350V50H100V350ZM100 50V0H250V50ZM250 150V50H300V200H200V150ZM100 400V350H250V400ZM250 350V300H300V350Z"/><path transform="translate(1390 550) scale(1 -1)" d="M50 400V0H300V50H100V200H250V250H100V350H300V400Z"/><path transform="translate(1740 550) scale(1 -1)" d="M50 400V0H100V250H150V300H100V400ZM250 150V0H300V400H250V200H200V150ZM200 200V250H150V200Z"/><path transform="translate(2090 550) scale(1 -1)" d="M50 400V350H150V0H200V350H300V400Z"/></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2440 700" role="img" aria-label="AGENT"><g transform="translate(0 75)"><path fill="#CCFF00" d="M0 0h550v550H0z"/><path fill="#171A11" d="M68.75 68.75h412.5v412.5H68.75z"/><path fill="#CCFF00" d="M275 137.5h68.75v68.75H275zM275 206.25h137.5v68.75H275zM275 275h137.5v68.75H275zM275 343.75h68.75v68.75H275z"/></g><g fill="#171A11"><path transform="translate(690 550) scale(1 -1)" d="M50 300V0H100V150H250V0H300V300H250V200H100V300ZM150 400V350H200V400ZM100 350V300H150V350ZM200 350V300H250V350Z"/><path transform="translate(1040 550) scale(1 -1)" d="M50 350V50H100V350ZM100 50V0H250V50ZM250 150V50H300V200H200V150ZM100 400V350H250V400ZM250 350V300H300V350Z"/><path transform="translate(1390 550) scale(1 -1)" d="M50 400V0H300V50H100V200H250V250H100V350H300V400Z"/><path transform="translate(1740 550) scale(1 -1)" d="M50 400V0H100V250H150V300H100V400ZM250 150V0H300V400H250V200H200V150ZM200 200V250H150V200Z"/><path transform="translate(2090 550) scale(1 -1)" d="M50 400V350H150V0H200V350H300V400Z"/></g></svg>
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# npm 安装与发布
|
|
2
|
+
|
|
3
|
+
发行版本为 `@graychennpm/codebridge@0.1.0`,可从 npm 安装,也可使用本地 tarball。macOS 是本阶段支持的宿主机;不新增 Linux 服务管理。
|
|
4
|
+
|
|
5
|
+
## 安装
|
|
6
|
+
|
|
7
|
+
需要 Node.js 22.19 或更高版本,无需源码、TypeScript 或 pnpm:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g @graychennpm/codebridge@0.1.0
|
|
11
|
+
codebridge --version
|
|
12
|
+
codebridge-runner --version
|
|
13
|
+
codebridge init
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
也可以使用 `npm install -g /absolute/path/graychennpm-codebridge-0.1.0.tgz` 安装已下载的 tarball。
|
|
17
|
+
|
|
18
|
+
完成向导后,在两个终端分别执行:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
codebridge-runner
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
codebridge start
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
检查连接:`codebridge doctor`。需要 Web 工作台时,设置配置中的 `web.enabled: true`,然后访问启动日志中的 `/workbench/` 地址。Agent CLI 的安装、登录和模型提供方认证仍需按各工具要求完成;安装此 npm 包不会替你创建外部账号或发送消息。
|
|
29
|
+
|
|
30
|
+
`codebridge init --defaults` 只生成权限 `600` 的默认配置和随机 Runner token,不校验通道;非交互初始化行为与源码安装一致。首次交互向导优先存入系统钥匙串。npm 安装不包含源码仓库的 `scripts/start.sh` 或宿主机部署器,因此源码安装的后台管理和受控部署流程保持独立;此安装方式提供前台 CLI 运行方式。
|
|
31
|
+
|
|
32
|
+
## 构建与安装验收
|
|
33
|
+
|
|
34
|
+
在源码仓库运行:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
pnpm install --frozen-lockfile
|
|
38
|
+
pnpm version:check
|
|
39
|
+
pnpm package:release
|
|
40
|
+
pnpm test:package
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
输出位于 `dist/graychennpm-codebridge-0.1.0.tgz`。`package:release` 先完整构建,再调用 npm 原生 `pack`。脚本仅暂存内部包的编译输出和 Web 静态资源,去掉测试、源码映射、开发脚本及开发依赖;不复制用户配置、凭据、源代码或工具目录。
|
|
44
|
+
|
|
45
|
+
17 个内部包通过 `bundleDependencies` 随 tarball 分发,不需要单独发布 `@codebridge/*`。第三方依赖同时声明在发行包顶层,并固定为源码工作区本次安装实际解析到的版本;发现同一依赖在工作区有不同解析版本时拒绝打包,要求先核对 lockfile。第三方依赖的安装仍需要 npm 网络访问,tarball 并非完整离线安装包。
|
|
46
|
+
|
|
47
|
+
`test:package` 在临时目录安装 tarball,使用临时 HOME / DATA_DIR 和本地空闲端口:检查两个 bin 的版本和帮助、初始化权限与幂等、内部模块导入、Runner 鉴权与健康版本、Workbench 页面和 JavaScript 静态资源。测试不连接真实机器人,不提交 Agent 任务,最后只关闭自己创建的进程并删除临时目录。
|
|
48
|
+
|
|
49
|
+
## 版本与变更记录
|
|
50
|
+
|
|
51
|
+
根 `package.json` 是版本源;内部 workspace 包通过同步脚本保持一致。运行时 `VERSION` 从 core 包自己的 `package.json` 读取,CLI 和 Runner `/health` 不再各自维护版本字符串。
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npm version patch --no-git-tag-version
|
|
55
|
+
pnpm version:check
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
`npm version` 的 version 生命周期调用同步脚本,更新所有 workspace 元数据,不自动创建提交或 tag。若手动改根版本,运行 `pnpm version:sync`。同步后更新 `CHANGELOG.md`,重新构建并跑全部检查。
|
|
59
|
+
|
|
60
|
+
## 公开发布门槛
|
|
61
|
+
|
|
62
|
+
1. 审查最终 diff,完成 build、lint、全量测试和 `test:package`。
|
|
63
|
+
2. 核实 npm 包名及账号权限。正式包名为 `@graychennpm/codebridge`;npm 拒绝无前缀名称 `codebridge`,因为它与已有包 `homebridge` 太相似。若以后改名,需先修改根包名并重新打包验收。
|
|
64
|
+
3. 取得对具体包名、版本及外部发布动作的授权。发布凭据由发布者保管,本地构建无需读取 token。
|
|
65
|
+
4. 发布者运行下列命令。仅对已验收的 tarball 发布,源码仓库仍保留 `private: true`,防止误把整个仓库上传。
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
npm publish /absolute/path/graychennpm-codebridge-0.1.0.tgz --access public
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Git tag、GitHub Release、推送和本机线上部署是独立动作,不能因为本地打包通过就视为已完成或已授权。每次发布后都应核对 registry 版本和 tarball 完整性,再更新 README 的安装版本。
|
|
72
|
+
|
|
73
|
+
## 验收状态
|
|
74
|
+
|
|
75
|
+
见 `docs/plans/2026-10-10-npm-delivery.md` 的 Surface Matrix 与本次交付记录。安装包验收覆盖本地安装与隔离启动;真实通道、真实 Agent 任务、全局安装及后台常驻部署均未在本次测试中操作。
|
|
76
|
+
|
|
77
|
+
依据:[npm bundleDependencies](https://docs.npmjs.com/cli/v11/configuring-npm/package-json/#bundledependencies)。
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { AgentProfile, AgentSetupState } from "@codebridge/session-catalog";
|
|
2
|
+
export type AgentAdapter = {
|
|
3
|
+
agentId: string;
|
|
4
|
+
kind: AgentProfile["adapter"];
|
|
5
|
+
health(): Promise<AgentSetupState["runtime"]> | AgentSetupState["runtime"];
|
|
6
|
+
};
|
|
7
|
+
export interface AgentHealthRecord {
|
|
8
|
+
agentId: string;
|
|
9
|
+
status: AgentProfile["status"];
|
|
10
|
+
checkedAt: string | null;
|
|
11
|
+
error: string | null;
|
|
12
|
+
}
|
|
13
|
+
export interface AgentRegistryOptions {
|
|
14
|
+
databasePath?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare class AgentRegistry {
|
|
17
|
+
private readonly profiles;
|
|
18
|
+
private readonly database;
|
|
19
|
+
constructor(options?: AgentRegistryOptions);
|
|
20
|
+
register(profile: AgentProfile): AgentProfile;
|
|
21
|
+
refresh(adapter: AgentAdapter): Promise<AgentProfile | undefined>;
|
|
22
|
+
updateSetup(agentId: string, setup: Omit<AgentSetupState, "canSelectDefault" | "canCreateSession">): AgentProfile | undefined;
|
|
23
|
+
getHealth(agentId: string): AgentHealthRecord | undefined;
|
|
24
|
+
startHealthChecks(adapters: AgentAdapter[], intervalMs?: number): () => void;
|
|
25
|
+
get(agentId: string): AgentProfile | undefined;
|
|
26
|
+
list(): AgentProfile[];
|
|
27
|
+
close(): void;
|
|
28
|
+
private persistHealth;
|
|
29
|
+
}
|
|
30
|
+
export { cloneSetupManifest, cloneSetupState, getSupportedAgentSetupManifest, projectAgentStatus, projectSetupState, supportedAgentSetupManifestMap, supportedAgentSetupManifests, } from "./setup.js";
|
|
31
|
+
export type { AgentDiagnostic, AgentInstallStrategy, AgentSetupConfiguration, AgentSetupInstallation, AgentSetupManifest, AgentSetupRuntime, AgentSetupStage, AgentSetupState, } from "@codebridge/session-catalog";
|
|
32
|
+
//# sourceMappingURL=index.d.ts.map
|