agent-bridge-service 0.2.3 → 1.0.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 +104 -140
- package/README.md +508 -35
- package/README.zh-CN.md +443 -33
- package/assets/agent-icons/agy.svg +27 -0
- package/dist/adapters/acp-auth.js +51 -0
- package/dist/adapters/acp-codebuddy.js +507 -0
- package/dist/adapters/agent-adapters.js +466 -46
- package/dist/adapters/claude-stream.js +159 -0
- package/dist/adapters/codex-app-server.js +310 -0
- package/dist/adapters/host-env.js +48 -0
- package/dist/adapters/mcp-elicitation.js +148 -0
- package/dist/adapters/mcp-host.js +70 -0
- package/dist/adapters/step-parsers.js +583 -0
- package/dist/app/bootstrap.js +163 -74
- package/dist/app/claude-resident.js +204 -0
- package/dist/app/conversation.js +639 -0
- package/dist/app/service-gate.js +1 -1
- package/dist/app/session.js +425 -14
- package/dist/app/task-dispatch.js +883 -7
- package/dist/app/task-registry.js +168 -0
- package/dist/cli/dispatch.js +4 -0
- package/dist/cli/flags.js +11 -0
- package/dist/cli/help.js +25 -7
- package/dist/cli/panel.js +334 -0
- package/dist/cli/render.js +2 -0
- package/dist/commands/approvals.js +80 -0
- package/dist/commands/connect.js +122 -4
- package/dist/commands/daemon-service.js +81 -0
- package/dist/commands/daemon.js +269 -6
- package/dist/commands/logout.js +13 -10
- package/dist/commands/serve.js +98 -12
- package/dist/commands/sessions.js +106 -0
- package/dist/core/ansi.js +5 -0
- package/dist/core/artifact-extract.js +158 -0
- package/dist/core/artifact-transfer.js +583 -0
- package/dist/core/device-identity.js +22 -0
- package/dist/core/emitter.js +50 -8
- package/dist/core/errors.js +43 -0
- package/dist/core/form-schema.js +72 -0
- package/dist/core/interaction-broker.js +440 -0
- package/dist/core/interaction-url.js +63 -0
- package/dist/core/partial-messages.js +99 -0
- package/dist/core/permission-ledger.js +146 -0
- package/dist/core/permission-policy.js +88 -0
- package/dist/core/port-fallback.js +22 -0
- package/dist/core/redact.js +13 -0
- package/dist/core/scan.js +12 -7
- package/dist/core/session-store.js +1632 -0
- package/dist/core/task-supervisor.js +955 -30
- package/dist/infra/atomic-file.js +111 -0
- package/dist/infra/audit.js +7 -0
- package/dist/infra/auth.js +143 -40
- package/dist/infra/config.js +511 -72
- package/dist/infra/device-identity-store.js +87 -0
- package/dist/infra/jwt.js +149 -0
- package/dist/infra/profile-lock.js +295 -0
- package/dist/infra/proxy-env.js +60 -0
- package/dist/infra/service-token.js +25 -4
- package/dist/protocol.js +298 -2
- package/dist/transport/a2a-mapping.js +206 -0
- package/dist/transport/acp-gateway-mapping.js +186 -0
- package/dist/transport/bridge-client.js +31 -22
- package/dist/transport/control-plane-page.js +820 -0
- package/dist/transport/control-plane-sessions-page.js +90 -0
- package/dist/transport/control-plane.js +923 -71
- package/dist/transport/gateway.js +1005 -0
- package/dist/transport/office-preview.js +154 -0
- package/package.json +6 -3
- package/assets/agent-icons/gemini.svg +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,110 @@ All notable changes to this project are documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres
|
|
6
6
|
to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.0.0](https://github.com/shaylanwu/agent-bridge/compare/v0.2.3...v1.0.0) (2026-11-26)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
* feat(ci)!: 工作流统一 Node 24,与 engines 对齐 ([037c829](https://github.com/shaylanwu/agent-bridge/commit/037c8298e4e1785ba15186649e40a41312d20a7f))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* **acp:** inherit CodeBuddy auth token from host login ([13a437b](https://github.com/shaylanwu/agent-bridge/commit/13a437b606ddd0047cef48e34012bd6dda3f525c))
|
|
17
|
+
* **adapters:** detect mcode's real ~/.minimax credential paths ([92f2a97](https://github.com/shaylanwu/agent-bridge/commit/92f2a9711652f53250ba7ed4ecaaa4e51087cafb))
|
|
18
|
+
* **adapters:** detect opencode custom provider config as credential evidence ([1c8459c](https://github.com/shaylanwu/agent-bridge/commit/1c8459cbdc3ffa97b0e8f927d12cd3fdf009e7db))
|
|
19
|
+
* **adapters:** probe kimi-code's real ~/.kimi-code credential paths ([a91b55c](https://github.com/shaylanwu/agent-bridge/commit/a91b55cc97b95f33101dfe09188b3e6d67b4bf30))
|
|
20
|
+
* **approval:** never bind an approval without a normalizable resource ([1dea052](https://github.com/shaylanwu/agent-bridge/commit/1dea05228ca59148c094da3391aff37788b032d2))
|
|
21
|
+
* **config:** ignore empty session idle env override ([2a6c9e2](https://github.com/shaylanwu/agent-bridge/commit/2a6c9e20642340ddc59640cca94715ad4d1573b9))
|
|
22
|
+
* **contracts:** register session_not_continuable and tell the truth about /v1/agents ([dc3bb04](https://github.com/shaylanwu/agent-bridge/commit/dc3bb042451603d1a51ac40f527040f12569d854))
|
|
23
|
+
* **control-plane:** keep tenant id out of task create response ([b490983](https://github.com/shaylanwu/agent-bridge/commit/b49098394a5d9629fafecad070a41d64a550e063))
|
|
24
|
+
* **conversation:** isolate stale resident close events ([03995b8](https://github.com/shaylanwu/agent-bridge/commit/03995b8a5602891b1762d6def54dd013d549d5de))
|
|
25
|
+
* **conversation:** reclaim idle claude resident processes ([04bf70a](https://github.com/shaylanwu/agent-bridge/commit/04bf70a853cf583c5f38fe54414cd94c9b9bf311))
|
|
26
|
+
* **conversation:** settle close_session before reclaiming resident ([a930fea](https://github.com/shaylanwu/agent-bridge/commit/a930fea126d73e013d3d79979f531ea982f6497e))
|
|
27
|
+
* **form:** validate schema and redact secret content ([87aec74](https://github.com/shaylanwu/agent-bridge/commit/87aec7406fd92e969b11f1efd0f3b9a7ea5098cc))
|
|
28
|
+
* **health:** report readiness from queue capacity ([4d95ccc](https://github.com/shaylanwu/agent-bridge/commit/4d95cccc12c981cffd9b3fe7edfe51bb2a53973b))
|
|
29
|
+
* **interaction-url:** distinguish expired from missing ([87a7419](https://github.com/shaylanwu/agent-bridge/commit/87a741985cbc96b02c494bc22bf780b8c794da20))
|
|
30
|
+
* **interaction-url:** opportunistically clean expired entries ([2b9f53d](https://github.com/shaylanwu/agent-bridge/commit/2b9f53d78b15a86968370db05f82fbe63c0be5d2))
|
|
31
|
+
* **log:** detect ANSI instead of always reporting true ([0b1b665](https://github.com/shaylanwu/agent-bridge/commit/0b1b665ece239078126e862074d0ab724322c1a2))
|
|
32
|
+
* **mcp:** allow per-call timeout for long elicitation ([0fa1e52](https://github.com/shaylanwu/agent-bridge/commit/0fa1e52ac92cb02d347ce89c0b4bdf32a2b179a4))
|
|
33
|
+
* **runtime:** reject duplicate connect for the same profile ([e85b959](https://github.com/shaylanwu/agent-bridge/commit/e85b959f65c467e5002d88801452ccf046226683))
|
|
34
|
+
* **session-store:** release handle when opening corrupt database fails ([b8c17a3](https://github.com/shaylanwu/agent-bridge/commit/b8c17a3e4b23e6280c6b3ffe52eadd665229db0f))
|
|
35
|
+
* **session:** do not clear idle timer before authorization ([35159c6](https://github.com/shaylanwu/agent-bridge/commit/35159c62c2a4b32de97fe58486f1bad2b482d4f9))
|
|
36
|
+
* **session:** emit terminal status when idle close ([04758a9](https://github.com/shaylanwu/agent-bridge/commit/04758a98ef3223986843ac35b8ae552c9cd82fbc))
|
|
37
|
+
* **session:** only reclaim resident after authorized close ([a2fbe3b](https://github.com/shaylanwu/agent-bridge/commit/a2fbe3b83c2ab3eee43c479c05556c8d1cd92336))
|
|
38
|
+
* **session:** reject auth-url payloads containing raw URLs ([8bc9126](https://github.com/shaylanwu/agent-bridge/commit/8bc912619f3dfddf2d0806782a0415ada0829177))
|
|
39
|
+
* **sse:** replay session events in batches after cursor ([6abe49c](https://github.com/shaylanwu/agent-bridge/commit/6abe49c7a8372c8adad051ea9f55f882753fd9cf))
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### Features
|
|
43
|
+
|
|
44
|
+
* **acp:** add Grok ACP and non-ACP integration research ([b82870b](https://github.com/shaylanwu/agent-bridge/commit/b82870b40bdda0a257eee9c715f6c65846b48629))
|
|
45
|
+
* **acp:** add guarded CodeBuddy ACP client ([cb808fa](https://github.com/shaylanwu/agent-bridge/commit/cb808fae002ee1aacc1e6296860ed790ee8af0f9))
|
|
46
|
+
* **acp:** bridge session/request_form to task interactions ([1f91549](https://github.com/shaylanwu/agent-bridge/commit/1f91549ea72155e54d35cc819500d7013a3ea1e2))
|
|
47
|
+
* **acp:** declare dsh's ACP channel and stop losing its session on resume ([4adacef](https://github.com/shaylanwu/agent-bridge/commit/4adacef5f99303b8ffa69be835f092cc2905ad2c))
|
|
48
|
+
* **acp:** support seven native ACP agent specs ([f0d0982](https://github.com/shaylanwu/agent-bridge/commit/f0d0982e640645e9c1fc6e80a4de040380201fd6))
|
|
49
|
+
* **acp:** wire CodeBuddy ACP tasks and permissions ([2bfc4fe](https://github.com/shaylanwu/agent-bridge/commit/2bfc4fe51158caf61200ec9e34449dfec4798eb1))
|
|
50
|
+
* **adapters:** rename grok display name and replace gemini with antigravity CLI ([68d7552](https://github.com/shaylanwu/agent-bridge/commit/68d7552030d84ed01d14f07ec3374d40fc1f6694))
|
|
51
|
+
* **approval:** persistent approval ledger with revoke and audit ([24cda8d](https://github.com/shaylanwu/agent-bridge/commit/24cda8de71edc048ac8e4cd2fb34ce343a852e39))
|
|
52
|
+
* **artifact:** add chunked downloads from CAS ([b8e0660](https://github.com/shaylanwu/agent-bridge/commit/b8e0660a7cd252a62c39420495b5b0c3a0049a5a))
|
|
53
|
+
* **artifact:** add inbound chunked uploads ([fa46f77](https://github.com/shaylanwu/agent-bridge/commit/fa46f779efcfbfe43dcd9b658ad5ee7a4a0f747a))
|
|
54
|
+
* **artifact:** add TTL cleanup with CAS reference counting ([18339c0](https://github.com/shaylanwu/agent-bridge/commit/18339c0d18c65cfabd78e402c02a5cbb31713e38))
|
|
55
|
+
* **artifact:** garbage-collect stale upload transfers ([f9cd84d](https://github.com/shaylanwu/agent-bridge/commit/f9cd84d60575f9b0a22dfdb53a5066d56a636162))
|
|
56
|
+
* **artifact:** persist download transfers for resume ([941fe60](https://github.com/shaylanwu/agent-bridge/commit/941fe606d0a0e75c772c1c7346e8caf5c583c168))
|
|
57
|
+
* **artifact:** persist upload transfers for resume ([948aa62](https://github.com/shaylanwu/agent-bridge/commit/948aa62cdcea050e1c6eacf2690db0506556e67b))
|
|
58
|
+
* **auth:** add dependency-free JWT/JWKS verifier ([49b121e](https://github.com/shaylanwu/agent-bridge/commit/49b121e9aeaa3bddbeba6753f670025df152594e))
|
|
59
|
+
* **auth:** refresh expired device tokens once ([8c16fa1](https://github.com/shaylanwu/agent-bridge/commit/8c16fa15ff6abd498d7d49e38be2fc64567a9ff6))
|
|
60
|
+
* **board:** scope task board by JWT tenant ([890ea7a](https://github.com/shaylanwu/agent-bridge/commit/890ea7ad727d1af2302dfd275f7e63482d3c93db))
|
|
61
|
+
* **capabilities:** declare executionModes[].continuation and stop losing history on a failed resume ([ab56aa5](https://github.com/shaylanwu/agent-bridge/commit/ab56aa5d48086c56791eae46cb9c9da1aa227364))
|
|
62
|
+
* **claude:** add opt-in stream-json execution ([3160f9d](https://github.com/shaylanwu/agent-bridge/commit/3160f9d39c5fb37f0ad4e15054aa0db32702796a))
|
|
63
|
+
* **codex:** integrate app-server turns and approvals ([bb846e5](https://github.com/shaylanwu/agent-bridge/commit/bb846e5936944180e4cd633a34f4be9cf8a05e6b))
|
|
64
|
+
* **connect:** start local web panel by default with port fallback ([6cdb318](https://github.com/shaylanwu/agent-bridge/commit/6cdb3185e773fc7cc651cded378674c0804d29ea))
|
|
65
|
+
* **control-plane:** accept JWT principals with tenant guard ([799301b](https://github.com/shaylanwu/agent-bridge/commit/799301bad1bdcfdfc763f32635dba39f32b0d93d))
|
|
66
|
+
* **control-plane:** add minimal metrics endpoint ([3ce9568](https://github.com/shaylanwu/agent-bridge/commit/3ce9568101f2d21d12862c9503c76e08f329599a))
|
|
67
|
+
* **control-plane:** answer interactions over HTTP, add session:read scope ([fc83c7c](https://github.com/shaylanwu/agent-bridge/commit/fc83c7c9c93505f453a6bc3063a989ba1f12b950))
|
|
68
|
+
* **control-plane:** expose persisted session snapshots ([1a272c4](https://github.com/shaylanwu/agent-bridge/commit/1a272c4080da14a5d15904a5d6e76824e0c58c7e))
|
|
69
|
+
* **control-plane:** scope session reads by JWT tenant ([1e66677](https://github.com/shaylanwu/agent-bridge/commit/1e6667707871af6a07df64ff92f5cf1c7c74f89d))
|
|
70
|
+
* **control-plane:** stream persisted session events ([addac0a](https://github.com/shaylanwu/agent-bridge/commit/addac0a6fd55821421bac40917a43b70fd613228))
|
|
71
|
+
* **control-plane:** tenant-scope tasks and artifacts ([e908beb](https://github.com/shaylanwu/agent-bridge/commit/e908beb96ba0c026fb986a9b9a7134cddafdcdab))
|
|
72
|
+
* **conversation:** add replay-session multi-turn messages ([698900f](https://github.com/shaylanwu/agent-bridge/commit/698900f7c1bedb8554b4674091676fcbca7245cc))
|
|
73
|
+
* **conversation:** forward steer to codex app-server turns ([ce525f8](https://github.com/shaylanwu/agent-bridge/commit/ce525f83ba620510c1f5d282deda9f6796162615))
|
|
74
|
+
* **conversation:** keep claude/qoder stream sessions resident ([91e2bff](https://github.com/shaylanwu/agent-bridge/commit/91e2bff7b9cbe10bc7cca412ddf71bcda4106706))
|
|
75
|
+
* **conversation:** multi-turn ACP session memory for gateway and WS ([9f234c0](https://github.com/shaylanwu/agent-bridge/commit/9f234c0f501c8952116344e938cb438a11c8e4a2))
|
|
76
|
+
* **conversation:** resume native CLI sessions when available ([f20d03c](https://github.com/shaylanwu/agent-bridge/commit/f20d03c6bd8eafe357c04870d19a31d6ce19976d))
|
|
77
|
+
* **core:** add protocol v1 session store foundation ([322632e](https://github.com/shaylanwu/agent-bridge/commit/322632eb0b418b0e04555938919ab335469d2c37))
|
|
78
|
+
* **core:** capture native session ids and interactive stdin ([e407874](https://github.com/shaylanwu/agent-bridge/commit/e407874919784045a782fa64109d8b1bafc1e901))
|
|
79
|
+
* **core:** persist task lifecycle in session store ([8bc4723](https://github.com/shaylanwu/agent-bridge/commit/8bc47235012a0076d66355503af3f16b5a4e2772))
|
|
80
|
+
* **core:** task execution control - bounded feed, settled guards, interactions ([5fcb849](https://github.com/shaylanwu/agent-bridge/commit/5fcb849ff7622f5ee2257be40edaa8a3960fa174))
|
|
81
|
+
* **daemon,mcp:** per-user service install and MCP host config ([1fe8194](https://github.com/shaylanwu/agent-bridge/commit/1fe8194999431fdc981cbbfda5305b5211de3af6))
|
|
82
|
+
* **daemon:** add lightweight background process control ([d27a971](https://github.com/shaylanwu/agent-bridge/commit/d27a97194db82a60248961c7a7f513c48f79140b))
|
|
83
|
+
* **dsh:** resume headless sessions by id ([d9327ca](https://github.com/shaylanwu/agent-bridge/commit/d9327caa05b5e81cf1618a8452d6374ae1be56a0))
|
|
84
|
+
* **gateway:** add A2A and ACP v1-over-HTTP external gateway on the control plane ([2959ebb](https://github.com/shaylanwu/agent-bridge/commit/2959ebb5e784c662e4b5ae3b9918bccb0cc69f49))
|
|
85
|
+
* **interaction:** add short-lived interaction URL lookup ([67fd030](https://github.com/shaylanwu/agent-bridge/commit/67fd0300937fbc8bea82cc69421ac8b22f7e0735))
|
|
86
|
+
* **interaction:** carry structured form answers; add gateway proposal ([a56d556](https://github.com/shaylanwu/agent-bridge/commit/a56d5560b48b1edd75efe0cb67dc9b59d7b9e5e3))
|
|
87
|
+
* **interaction:** persist and resolve interaction responses ([89f36ec](https://github.com/shaylanwu/agent-bridge/commit/89f36ec4a3bcdeaf2f14ea15a6fd253d239e7f61))
|
|
88
|
+
* **mcp:** add elicitation transport client ([c58d1d4](https://github.com/shaylanwu/agent-bridge/commit/c58d1d49f26623bf6394678d235344f5307ff62e))
|
|
89
|
+
* **permission:** 1.0 execution policy, interaction gate and artifact fetch ([fea2a4a](https://github.com/shaylanwu/agent-bridge/commit/fea2a4a649ad0c34b62ef72f35b0b02b0cd7ac63))
|
|
90
|
+
* **protocol:** add session close and turn cancel controls ([c853b06](https://github.com/shaylanwu/agent-bridge/commit/c853b065ca07b874d941438d7ea507fae0f34a36))
|
|
91
|
+
* **protocol:** declare elicitation-form and session-feed, document executionModes ([5d23d1c](https://github.com/shaylanwu/agent-bridge/commit/5d23d1c693eda763c4a9de92ac56bd5f38a8e980))
|
|
92
|
+
* **protocol:** expose task event sequence and snapshots ([d257bea](https://github.com/shaylanwu/agent-bridge/commit/d257beac7594364f7ab2004e87b1937d665b290c))
|
|
93
|
+
* **qoder:** resume native sessions ([0560592](https://github.com/shaylanwu/agent-bridge/commit/0560592b018cc2d99a4edc109ed3d58b856217f0))
|
|
94
|
+
* **session:** bound event history by count, add history cursors and real deletion ([5995f8c](https://github.com/shaylanwu/agent-bridge/commit/5995f8c9646a07d61c1f961d2a81391b3cb243f6)), closes [hi#water](https://github.com/hi/issues/water)
|
|
95
|
+
* **session:** close idle waiting_user sessions ([6595a37](https://github.com/shaylanwu/agent-bridge/commit/6595a37938c5fb884cf0686809fd2f7b14a0ddd0))
|
|
96
|
+
* **snapshot:** expose half-finished assistant text as partialMessages ([77c5279](https://github.com/shaylanwu/agent-bridge/commit/77c5279a82ed530627215decc082b94172ac69db))
|
|
97
|
+
* **store:** run PRAGMA quick_check when the state DB opens, and expose it on /v1/health ([693094f](https://github.com/shaylanwu/agent-bridge/commit/693094f1690ae47fb8c954ef57e1a1b51cf4d87c))
|
|
98
|
+
* **ui:** add local session console ([57c7f88](https://github.com/shaylanwu/agent-bridge/commit/57c7f88ba2c91abfa877c1f8586da10db7db9c5d))
|
|
99
|
+
* **ui:** add session artifact downloads ([b1cbcd9](https://github.com/shaylanwu/agent-bridge/commit/b1cbcd9ed13acbed9273f16e2f2474987f1e3c9d))
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
### BREAKING CHANGES
|
|
103
|
+
|
|
104
|
+
* 运行时要求从 Node `>=20` 收紧为 `>=24 <25`。这条变更在
|
|
105
|
+
engines 里已经生效(0.x 用户升级会 npm EBADENGINE / 运行在不支持的运行时),
|
|
106
|
+
但一直没有对应的 major 信号:v0.2.3 之后 101 个提交算出来只有 minor。
|
|
107
|
+
wire 协议本身自 v0.2.3 以来只增不删(11 → 42 条消息,PROTOCOL_VERSION 保持 1,
|
|
108
|
+
平台侧无需改报文),因此这里破坏的是**宿主运行时要求**而非报文契约 ——
|
|
109
|
+
1.0.0 把这批能力(Session/Turn 多轮、权限与交互闭环、A2A/ACP 网关、
|
|
110
|
+
附件传输)作为稳定面固定下来。
|
|
111
|
+
|
|
8
112
|
## [0.2.3](https://github.com/shaylanwu/agent-bridge/compare/v0.2.2...v0.2.3) (2026-10-24)
|
|
9
113
|
|
|
10
114
|
|
|
@@ -48,146 +152,6 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
48
152
|
* **scan:** 并发探测 + 扫描结果实时回传 + 官方品牌图标 ([1c07231](https://github.com/shaylanwu/agent-bridge/commit/1c072315d081d794f58ecdb6710d0fae04df62ed))
|
|
49
153
|
* **site:** 中英文档站(Astro Starlight + Scalar),API 参考由契约生成 ([a1994d4](https://github.com/shaylanwu/agent-bridge/commit/a1994d44368595d557dfdeacddd7f0ecfd9ee436))
|
|
50
154
|
|
|
51
|
-
## [Unreleased]
|
|
52
|
-
|
|
53
|
-
### Added
|
|
54
|
-
|
|
55
|
-
- **Release automation** — version numbers now come from commit messages. `.releaserc.json` +
|
|
56
|
-
`.github/workflows/release.yml` run semantic-release on every push to `main` (`feat` → minor,
|
|
57
|
-
`fix` → patch, `feat!` / `BREAKING CHANGE:` → major, everything else publishes nothing): it bumps
|
|
58
|
-
`package.json`, writes `CHANGELOG.md`, tags `v*`, opens the GitHub Release and publishes to npm.
|
|
59
|
-
Needs two repository secrets — `AGENT_BRIDGE_NPM_TOKEN` and the default `GITHUB_TOKEN` — and **takes over tagging**:
|
|
60
|
-
a hand-made `v*` tag now collides with it. `commitlint` + `husky` reject non-conventional commit
|
|
61
|
-
messages locally, and `.github/workflows/site.yml` builds and deploys the docs site to GitHub Pages on
|
|
62
|
-
the same push. The site's changelog page is now rendered from `CHANGELOG.md` at build time
|
|
63
|
-
(`site/scripts/gen-changelog.mjs`) instead of being a placeholder that said "automation pending", so the
|
|
64
|
-
two can't drift — `site-check` fails if they do. Two deviations from the stock setup, both verified
|
|
65
|
-
offline by `scripts/verify-release.mjs`: `scripts/semantic-release-changelog.mjs` replaces
|
|
66
|
-
`@semantic-release/changelog` because that plugin can only prepend to the file (which would put
|
|
67
|
-
`# Changelog` *below* the version headings), and the preset is `angular` rather than
|
|
68
|
-
`conventionalcommits` because the latter's current majors need a newer changelog writer than
|
|
69
|
-
semantic-release 25 ships.
|
|
70
|
-
|
|
71
|
-
- **CodeBuddy CLI adapter** — `kind: "codebuddy-cli"` (Tencent `@tencent-ai/codebuddy-code`, command `codebuddy`,
|
|
72
|
-
alias `cbc`). Non-interactive like Claude Code (`-p "{{prompt}}" --output-format text`); credentials detected via
|
|
73
|
-
the `~/.codebuddy` directory (interactive login, no env key). The adapter registry is now **12 tools**, and every
|
|
74
|
-
"11 adapters/agents" figure across the READMEs, `llms.txt`, `AGENTS.md`, CLI help, tests and the docs site has been
|
|
75
|
-
updated in the same pass. OpenSpec proposal: `openspec/changes/add-codebuddy-cli/`.
|
|
76
|
-
|
|
77
|
-
- **Documentation site (W1–W3)** — `site/` is a standalone Astro + Starlight workspace (never built by the
|
|
78
|
-
main package, never published to npm). English + 简体中文 content trees with a language switcher;
|
|
79
|
-
Pagefind full-text search indexes **2 locales / 28 pages**.
|
|
80
|
-
- **API reference is generated, not retyped**: `site/scripts/gen-reference.mjs` renders
|
|
81
|
-
`protocol/messages.md`, `api/reference.md` and `api/control-plane-reference.md` from the three contracts,
|
|
82
|
-
in both locales. Because those pages are static HTML, endpoint paths and field names are searchable —
|
|
83
|
-
the Scalar try-it pages (`api/`, `api/control-plane/`) render client-side and are deliberately not
|
|
84
|
-
searchable, so both exist and each does one job.
|
|
85
|
-
- `site/scripts/site-check.mjs` fails on: a CLI command with no docs page, a control-plane endpoint missing
|
|
86
|
-
from the generated pages, generated pages out of sync with contracts, or an en/zh-cn page mismatch.
|
|
87
|
-
- Contracts and `llms.txt` are copied into `site/public/` at build time — the site never keeps a second copy.
|
|
88
|
-
- **Light / dark / follow-system theming** — Starlight ships the theme picker (`auto` follows the OS by
|
|
89
|
-
default) and code blocks switch with it. The Scalar API viewer is client-rendered and would otherwise stay
|
|
90
|
-
stuck on one theme, so `ApiReference.astro` reads `document.documentElement.dataset.theme`, watches it with a
|
|
91
|
-
`MutationObserver` (covers both manual picks and OS changes under `auto`), and re-renders on change; Scalar's
|
|
92
|
-
own toggle is hidden so there is only one theme control on the page.
|
|
93
|
-
- **Site design system (v3)** — `site/src/styles/custom.css` overrides only Starlight's exposed CSS variables
|
|
94
|
-
plus a few structural rules: one accent (`#17A67F` light / `#41C398` dark) over cool grey neutrals, dark mode
|
|
95
|
-
on deep navy (`#0B1220`) rather than pure black, headings capped at weight 500 with negative tracking, the
|
|
96
|
-
sidebar's current item marked by a 2px accent bar, borderless three-column features separated by whitespace,
|
|
97
|
-
and a two-column path switch split by a 1px rule. The homepage (centered hero + outbound connection figure +
|
|
98
|
-
features + paths) lives in `site/src/components/home/`, shared by both locales with copy passed in from
|
|
99
|
-
`index.mdx`. The site has exactly one animation — a packet dot travelling the outbound link (2.4 s), disabled
|
|
100
|
-
under `prefers-reduced-motion` — plus a 2px reading-progress bar in the header. CJK copy gets 1.8 line height,
|
|
101
|
-
strict line breaking and tabular numerals.
|
|
102
|
-
- **AI-agent narrative + agent wall** — visitor-facing copy now says "AI agents" (the product story) while
|
|
103
|
-
"CLI" stays in technical contexts (CLI reference, status probing); README ×2 and the package description
|
|
104
|
-
follow the same wording. The homepage lists all 11 supported agents with their official brand-coloured
|
|
105
|
-
logos, synced from `assets/agent-icons/` at build time by `sync-contracts.mjs` — the site never keeps a
|
|
106
|
-
second copy, and `site-check` fails if the wall and `src/adapters/agent-adapters.ts` drift apart.
|
|
107
|
-
Generated reference pages are now regenerated on every build (`build.mjs` runs `gen-reference.mjs` first).
|
|
108
|
-
- **Brand mark** — a geometric logo (`site/src/assets/logo-{light,dark}.svg`): a device square, an outbound
|
|
109
|
-
line, a platform dot. Rendered in the header (per-theme variant) and as `favicon.svg`. Code blocks are dark
|
|
110
|
-
in both themes (single `starlight-dark` theme), matching the docs-page reference style.
|
|
111
|
-
|
|
112
|
-
- **Diff capture (P0-6)** — a `run_task` with `captureDiff: true` now returns the worktree diff on the terminal
|
|
113
|
-
`task_status`: `diff` (unified diff), `changedFiles` (repo-relative paths) and `diffTruncated`.
|
|
114
|
-
Non-git directories yield an empty diff instead of an error; oversized diffs are cut on a line boundary at
|
|
115
|
-
`diff_max_bytes` (default 256 KB, `AGENT_BRIDGE_DIFF_MAX_BYTES` overrides). Untracked files are `git add -N`-ed
|
|
116
|
-
only for the duration of the capture and `git reset -q`-ed afterwards, so nothing is committed and the index is
|
|
117
|
-
left exactly as it was.
|
|
118
|
-
- **Service identity / scoped service tokens (P0-8)** — `agent-bridge services issue|list|revoke|rotate` manages
|
|
119
|
-
tokens of the form `abs_<kid>_<secret>`; only the SHA-256 of the secret is stored (0600) and comparison is
|
|
120
|
-
constant-time. Scopes: `task:create`, `task:cancel`, `task:read`, `device:read` — `cancel_task` needs
|
|
121
|
-
`task:cancel`, holding `task:create` is not enough. Rotation keeps the previous token alive for a grace window
|
|
122
|
-
(`--grace-hours`, default 24).
|
|
123
|
-
- `run_task` / `cancel_task` accept `requestedBy` (≤128), `purpose` (≤64) and `serviceToken`;
|
|
124
|
-
the bridge echoes `requestedBy` on the terminal `task_status` so platforms can persist `requested_by`.
|
|
125
|
-
With no token registered and `require_service_token = false`, behaviour is unchanged; a token that is present
|
|
126
|
-
must verify.
|
|
127
|
-
- `hello.capabilities` — capability negotiation (`diff`, `service-token`, `queue`, `scan-progress`) so
|
|
128
|
-
third-party platforms degrade by feature instead of guessing from the CLI version.
|
|
129
|
-
- Audit trail at `~/.agent-bridge/audit.jsonl` (0600, one JSON per line): id / scope / purpose / action / outcome,
|
|
130
|
-
never tokens or credential contents.
|
|
131
|
-
- New config keys: `diff_default`, `diff_max_bytes`, `require_service_token`.
|
|
132
|
-
- New module map: `src/git.ts`, `src/service-token.ts`, `src/audit.ts`.
|
|
133
|
-
|
|
134
|
-
### Changed(架构通用化:第一期 + 第二期 + 第三期)
|
|
135
|
-
|
|
136
|
-
- **源码分层**:`src/core/`(领域:错误码 / 上行出口 / 任务调度 / 脱敏 / 扫描)、`src/transport/`
|
|
137
|
-
(出站 WebSocket + 补发缓冲)、`src/adapters/`(11 个 CLI 适配器 / 图标 / Windows 引号)、
|
|
138
|
-
`src/infra/`(配置 / 授权 / git / 审计 / 服务令牌)。根目录只留 `cli.ts`、`protocol.ts`
|
|
139
|
-
与 `runner.ts`(后者降级为 v1 兼容包装,新代码请引 `src/core/task-supervisor.ts`)。
|
|
140
|
-
- **本地回环控制面(可选扩展,默认关闭)**:`agent-bridge serve <platformUrl> [--port=8787]` = `connect`
|
|
141
|
-
+ 一个只绑 `127.0.0.1` 的 HTTP 控制面,服务**本机上的其它程序**(IDE 插件 / 脚本 / MCP server / CI),
|
|
142
|
-
远程平台仍走出站 WebSocket(两条通道互不干扰)。端点:`/v1/health`(免鉴权)、`/v1/capabilities`、
|
|
143
|
-
`/v1/agents`、`/v1/agents:scan`、`/v1/tasks`(`Idempotency-Key` 防重跑)、`GET /v1/tasks/{id}`、
|
|
144
|
-
`POST /v1/tasks/{id}:cancel`(幂等)、`/v1/tasks/{id}/events`(SSE)、`/v1/tasks/{id}/diff`。
|
|
145
|
-
红线:默认关闭(`[control_plane] enabled` / `--port` 才启用)、只绑回环、强制 scoped Bearer、
|
|
146
|
-
**不返回 CORS 头**、不新增运行时依赖。控制面下发的任务与平台下发的共享同一个 `TaskSupervisor`
|
|
147
|
-
(并发上限不因多开一条通道而翻倍),上行同样只经 `Emitter`。错误统一 RFC 9457 `problem+json`。
|
|
148
|
-
契约:`contracts/openapi.control-plane.yaml`。
|
|
149
|
-
- **受控错误码**:`task_status.errorCode` 取自 `src/core/errors.ts` 的受控枚举(15 个),
|
|
150
|
-
与平台侧 design §7 的错误分类表对齐;`error` 仍保留人类可读串。平台不再需要匹配文案。
|
|
151
|
-
- **唯一上行出口 `src/core/emitter.ts`**:所有上行报文只经 `Emitter.emit()`,在这里收口
|
|
152
|
-
①终态幂等(settled 后丢弃该 task 的后续事件)②日志脱敏(家目录 → `~`、≥64 位长串折叠)
|
|
153
|
-
③审计旁路 ④可选 CloudEvents 1.0 信封。横切逻辑只写一遍,不再每个能力各写一次。
|
|
154
|
-
- **任务调度可实例化**:`runner.ts` 的模块级单例状态(`runningTasks` / `queue` / `currentMaxTasks`)
|
|
155
|
-
内聚为 `class TaskSupervisor`,可注入、可单测、可多实例;状态机显式化为
|
|
156
|
-
`queued → running → settled`(settled 是吸收态)。
|
|
157
|
-
- **排队语义**:并发之上的任务排队而非失败;为保持 v1 兼容 `status` 仍是 `running`,
|
|
158
|
-
额外给出 `phase: 'queued'` 与 `queuePosition`(1 起)。老平台忽略即可,行为不变。
|
|
159
|
-
- **机器可读契约**:新增 `contracts/asyncapi-3.0.yaml`(WebSocket 通道)与
|
|
160
|
-
`contracts/openapi-3.1.yaml`(**平台需实现**的 4 个 HTTP 端点),以及 `llms.txt`。
|
|
161
|
-
`npm run contracts:check` 校验 wire 类型 / 能力清单 / 错误码 / 平台端点与代码一致,漂移即失败,
|
|
162
|
-
并已接入 `npm run gate`。
|
|
163
|
-
- **护栏同步**:`protocol-boundary-check` 的 shell / 监听白名单改按新路径(`src/core/task-supervisor.ts`、
|
|
164
|
-
`src/infra/auth.ts`),并为本地回环控制面预留了**有条件**的口子(必须只绑回环 + 默认关闭 +
|
|
165
|
-
不返回 CORS 头);`doc-contract-check` 新增能力清单记载校验与 `services` 命令;
|
|
166
|
-
`always-on.md` 新增「分层与唯一出口」红线。
|
|
167
|
-
- **入口瘦身(第四期)**:`src/cli.ts` 548 行 → 31 行,只做 `argv → dispatch()` 与顶层错误兜底。
|
|
168
|
-
新增 `src/cli/`(参数解析 / 终端渲染 / 帮助 / 命令注册表)与 `src/commands/`(一个命令一个文件),
|
|
169
|
-
并把「连接生命周期、指令路由、任务编排、服务身份校验」从入口抽出为 `src/app/`
|
|
170
|
-
(`session.ts` / `task-dispatch.ts` / `service-gate.ts` / `session-log.ts`)。
|
|
171
|
-
依赖单向:`cli.ts → cli/ → commands/ → app/ → { core, transport, adapters, infra }`;
|
|
172
|
-
⛔ `src/app/` 不得直接 `console.*`(输出走注入的 `SessionLog`)—— 这是本地控制面板能复用
|
|
173
|
-
同一段编排、且不被 stdout 绑死的前提。对外契约、报文、CLI 用法、配置键**零变化**
|
|
174
|
-
(`e2e:smoke` 10 项全 PASS 取证)。
|
|
175
|
-
- 单测 54 → 71。
|
|
176
|
-
|
|
177
|
-
### Changed(项目名称与开源许可)
|
|
178
|
-
|
|
179
|
-
- **许可证由 Apache-2.0 改为 MIT**:`LICENSE`、`package.json`、两份 README、两份契约的
|
|
180
|
-
`info.license` 同步;此后发布的版本以 MIT 授权(0.1.0 及更早的已发布版本仍按 Apache-2.0 授权)。
|
|
181
|
-
- **显示名统一为 `Agent Bridge Service`**(文档站标题、页脚版权声明、各页 description、
|
|
182
|
-
`gen-reference` 生成的 API 参考描述)。⛔ 不动的东西:npm 包名 `agent-bridge-service`、
|
|
183
|
-
CLI 命令 `agent-bridge`、配置目录 `~/.agent-bridge/`、站点 base `/agent-bridge`、
|
|
184
|
-
OAuth `client_id = "agent-bridge"` —— 这些是对外契约,改名等于破坏兼容性。
|
|
185
|
-
|
|
186
|
-
### Planned
|
|
187
|
-
|
|
188
|
-
- `daemon` mode (systemd / launchd / Windows service) with start-on-boot.
|
|
189
|
-
- Self-update from the release channel.
|
|
190
|
-
|
|
191
155
|
## [0.1.0] - 2026-10-22
|
|
192
156
|
|
|
193
157
|
### Added
|