@coda-console/plugin-check 0.5.23 → 0.5.25

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/README.md CHANGED
@@ -21,7 +21,8 @@ plugins/magpie/ Magpie:把本机的 Magpie 网关作为模型服务
21
21
  plugins/network-log/ 网络记录:默认关闭,按需开启建连等待与定时探测采集;关闭后仍可查看历史
22
22
  plugins/review/ PR 生命流程:会话开的 PR 先跑项目的检查、再交叉评审,你批准后合并、部署与发布;也是写 PR 流程的样例
23
23
  plugins/testbed/ 测试机:长插在 Mac 上的 iPhone、iPad 只经 use-testbed 使用,排到后装 App、交给会话操作、用完切黑屏;依赖宿主资源
24
- plugins/ultra/ Ultra:输入框的协调模式,主 Agent 负责拆解、调度和验收,子会话负责实现、排查和测试;名单与模板在模式参数和设置里
24
+ plugins/composer/ 输入框模式:交接到新会话、子会话、! 执行命令、Ultra 与 /loop 循环;Ultra 模板设置为 composer.templates
25
+ plugins/ultra/ Ultra(已并入 @coda-console/composer,暂时保留旧包):输入框的协调模式,主 Agent 负责拆解、调度和验收,子会话负责实现、排查和测试;名单与模板在模式参数和设置里
25
26
  templates/agent/ 最小的 Agent 插件:手写 ACP 的回声 Agent,演示会话指令、插话、Agent 活动与自主轮次
26
27
  templates/panel/ 最小的面板插件:一张卡片、一条进度条、一个按钮
27
28
  bin/、check/ 契约检查(仓库根的 package.json 就是它,@coda-console/plugin-check);check/coda/ 是 Coda 同步来的规则副本,不要手改
@@ -185,6 +186,12 @@ Claude、Codex 与 OpenCode 各有一项设置「模型服务」(`claude.model
185
186
  覆盖三种接口的请求、服务与原生模型切换、进程重启后恢复,服务模型的变量模板、用户 JSONC 和 Provider 对象模板配置,以及主会话与子 Agent 里长短两种 `Retry-After`;
186
187
  原生子会话另覆盖过程与工具、审批归属、后台完成、独立停止和嵌套父子关系。模型服务全由本地 HTTP fixture 提供。
187
188
 
189
+ ### Claude 会话来源与订阅额度
190
+
191
+ Claude 插件启动 SDK 时固定传入 `CLAUDE_CODE_ENTRYPOINT=coda`,覆盖父进程继承的同名变量;新建、恢复会话及切换模型服务后的 SDK 进程都沿用这一标记。
192
+ 这是针对上游 [SDK 入口消耗更多 5 小时订阅额度](https://github.com/anthropics/claude-code/issues/97074)的临时处理,额度仍以上游报告为准,不承诺固定节省比例。
193
+ 该变量还参与 Claude Code 的功能分类;升级 SDK 时须复核审批、子 Agent 与后台任务的行为。更新插件后,新启动的会话进程才使用新标记。
194
+
188
195
  ### Claude 缓存过期前压缩
189
196
 
190
197
  Claude 的设置「缓存过期前压缩」(`claude.idleCompaction`,默认关):会话停下后还要接着用时,在主线程的一小时提示词缓存过期前压缩一次上下文,
@@ -899,14 +899,14 @@
899
899
  "id": "claude",
900
900
  "displayName": "Claude",
901
901
  "description": "Claude SDK Agent:Coda 基于 Claude Agent SDK 写的 ACP 入口,一个进程一个 SDK 会话;资源页的「Claude」面板显示会话报告的额度,可从 Coda 登录。",
902
- "version": "1.7.6",
902
+ "version": "1.7.7",
903
903
  "category": "Agent",
904
904
  "source": {
905
905
  "kind": "builtin",
906
906
  "package": "@coda-console/claude",
907
907
  "tag": "latest",
908
- "version": "1.7.6",
909
- "integrity": "sha512-Gz0U1s8aWTahr+IcJAPtUZu9LLySQWmKgVrgk3qorolZycNG+gez7SbKfu24sgJq6TY89SgupH/xRj8d+VBgLg==",
908
+ "version": "1.7.7",
909
+ "integrity": "sha512-iaxeneTsRDPDNSo36hHptm2dDCQt+BtV2f3s5q8MeiDZiYMpbcW00G3CrTuARGJLLvDsrHIPHEWzrVZRzt3GGQ==",
910
910
  "repo": "https://github.com/coda-console/coda-plugins.git",
911
911
  "path": "plugins/claude"
912
912
  },
@@ -87,7 +87,9 @@ export function firstMessage(value) {
87
87
  return { threadId: value.threadId, extensionParent: { caller: text(p.caller, '调用方', 200), threadId: text(p.threadId, '父会话', 100),
88
88
  title: typeof p.title === 'string' ? p.title.slice(0, 200) : '', ...(typeof p.location === 'string' && p.location ? { location: p.location.slice(0, 200) } : {}) } };
89
89
  })();
90
- check(value.threadId === undefined || value.extensionParent !== undefined, 'invalid_input', '只有扩展发起的子会话可以指定会话标识');
90
+ check(value.threadId === undefined || value.extensionParent !== undefined || value.initiatedBy !== undefined,
91
+ 'invalid_input', '只有 Agent 发起的会话可以指定会话标识');
92
+ if (value.threadId !== undefined) check(UUID.test(value.threadId), 'invalid_input', '会话标识须为 UUID');
91
93
  const checkout = object(value.checkout, '工作位置');
92
94
  keys(checkout, ['kind', 'baseRef']);
93
95
  check(['original', 'worktree', 'handoff'].includes(checkout.kind), 'invalid_input', '工作位置无效');
@@ -105,6 +107,7 @@ export function firstMessage(value) {
105
107
  ...parent,
106
108
  ...reply,
107
109
  ...outside,
110
+ ...(value.threadId === undefined ? {} : { threadId: value.threadId }),
108
111
  requestId: text(value.requestId, '请求标识', 100),
109
112
  projectId: text(value.projectId, '目录标识', 100),
110
113
  title: text(value.title ?? message.trim().slice(0, 80), '会话标题'),
@@ -1,5 +1,5 @@
1
1
  {
2
- "commit": "b4280e88dedb17190fd84e3d0678bd5b838214c2",
2
+ "commit": "760ae7f18c9fe92d3cf58cf897f8adfa9b5edc66",
3
3
  "packages": {
4
4
  "@0dep/piso": "5.2.0",
5
5
  "@agentclientprotocol/sdk": "1.4.0",
@@ -13,7 +13,7 @@
13
13
  "check/coda/components/plugins/plugin-source-rules.mjs": "d894d55a3272df5ef3b108b68820c64aefdf6b69346404b58954f2a3503cb4a5",
14
14
  "check/coda/components/plugins/skill-document.mjs": "c5b5e815c42cd836572f7b60e22a46af6ac607fd9df0170fa36f955825636ce6",
15
15
  "check/coda/components/prompt-recovery/prompt-recovery.mjs": "f43f21d24c19a58113d3304f9248225b12080ab00ed15eab74bf7b94642732de",
16
- "check/coda/components/session-config/commands.mjs": "5d6139f1e5814422dab5f9d69f0b31967bf08f49c51c40ff91d9282dfc642dd9",
16
+ "check/coda/components/session-config/commands.mjs": "9114c880704253dce4f6b049ab10b2265067db4224916605a3209ff8d347fcac",
17
17
  "check/coda/components/workflows/executor-labels.mjs": "dceca6ae60c0a4f3c3cc72a6c84f1489831790774c93caab96e4ddb493bc89e1",
18
18
  "check/coda/domain/agent-protocol.mjs": "769cc10dc21b3cef7718f94272aaef2d17d4882d42617b408cb47357abfc3bcb",
19
19
  "check/coda/domain/duration.mjs": "15dd64ef9b02342ad521c66e5968a569432a89dc7568d11afd3e6f3fe37e104b",
@@ -24,6 +24,6 @@
24
24
  "check/coda/resources/plugins/resources/panels/panels.mjs": "9e25cfbc16ed9f68101fc7bfc34b8056c13a29d2368c5561e65e333233eb921e",
25
25
  "check/coda/resources/plugins/resources/panels/rules.mjs": "8418ed83b796f18047c154d8dea8dca7d98244af8ddfe3ddf188520c59324ee8",
26
26
  "check/coda/resources/plugins/resources/panels/sign-in.mjs": "1271a24e33b1b882a1fb9bee03b8e240db8b9bee1b5208f0e1c84499cfb1be7e",
27
- "check/coda/builtin.json": "98d28f8cc5e242b2e25c987d252dd2d9f594b3ef83b627781842af35faa2d851"
27
+ "check/coda/builtin.json": "c91e08ebce661797d1a1960f453167267f11672428e7078ab273a45f6c18905e"
28
28
  }
29
29
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coda-console/plugin-check",
3
- "version": "0.5.23",
3
+ "version": "0.5.25",
4
4
  "description": "Coda 插件的契约检查:扮演 Coda 读清单、启动 Agent 讲 ACP 与 _coda/wait、读面板。",
5
5
  "license": "MIT",
6
6
  "repository": {