@coda-console/plugin-check 0.8.10 → 0.8.11

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
@@ -23,7 +23,7 @@ plugins/network-log/ 网络记录:默认关闭,按需开启建连等待
23
23
  plugins/review/ PR 生命流程:会话开的 PR 先跑项目的检查、再交叉评审,你批准后合并、部署与发布;也是写 PR 流程的样例
24
24
  plugins/desktop-pet/ 桌面宠物:Coda 娘待在 Mac 桌面上,Agent 在跑时打字,有事等你时举卡片叫你(Coda 的浮窗)
25
25
  plugins/testbed/ 测试机:长插在 Mac 上的 iPhone、iPad 只经 use-testbed 使用,排到后装 App、交给会话操作、用完切黑屏;依赖宿主资源
26
- plugins/composer/ 输入框模式与开发流程:开工、监督开发(一个需求一条泳道,主 Agent 用泳道 PR 合进泳道,用户批准一次)与需求交付;Ultra 名单引用 composer.templates
26
+ plugins/composer/ 输入框模式与开发流程:监督开发(一个需求一条泳道,主 Agent 用泳道 PR 合进泳道,用户批准一次)与需求交付;Ultra 名单引用 composer.templates
27
27
  templates/agent/ 最小的 Agent 插件:手写 ACP 的回声 Agent,演示会话指令、插话、Agent 活动与自主轮次
28
28
  templates/resource/ 最小的资源插件:一个资源、两个读数、一个按钮
29
29
  bin/、check/ 契约检查(仓库根的 package.json 就是它,@coda-console/plugin-check);check/coda/ 是 Coda 同步来的规则副本,不要手改
@@ -1351,7 +1351,7 @@
1351
1351
  "id": "composer",
1352
1352
  "displayName": "输入框模式",
1353
1353
  "description": "交接、子会话、! 命令、Ultra 与循环",
1354
- "version": "7.0.0",
1354
+ "version": "8.0.0",
1355
1355
  "category": "工作流程",
1356
1356
  "icon": {
1357
1357
  "symbol": "character.cursor.ibeam",
@@ -1362,8 +1362,8 @@
1362
1362
  "kind": "builtin",
1363
1363
  "package": "@coda-console/composer",
1364
1364
  "tag": "latest",
1365
- "version": "7.0.0",
1366
- "integrity": "sha512-8z9L4EUKYJW8765d+PuQxR7ijgI2av0xWoJzKjffYvTBd+k57i9E5SPc1Y3RWFejKgmKq47uxXLPmrzQ8qAEkw==",
1365
+ "version": "8.0.0",
1366
+ "integrity": "sha512-SBThmyzC1SkOrYPP0Lr3f/qAoN0QyjzAfsD+k3FS7k6Ltnt8S8eoIxubr01AA01nKUSOuwCPe0/5AHVq+nmUjw==",
1367
1367
  "repo": "https://github.com/coda-console/coda-plugins.git",
1368
1368
  "path": "plugins/composer"
1369
1369
  },
@@ -1407,12 +1407,11 @@
1407
1407
  "workflows": [
1408
1408
  "deliver",
1409
1409
  "develop",
1410
- "kickoff",
1411
1410
  "lane-pr"
1412
1411
  ],
1413
1412
  "services": [],
1414
1413
  "agents": [],
1415
- "instructions": "要把改动合进默认分支时,一个需求开一次 kickoff(给 title、goal、建议的 way、要不要设备验收;开在别的目录或要指定分支时给 branch),用户在开工卡上选定后流程把下一步交给你,不要先改完再补开。需求是用户想一起验收、一起上线的一件事,只有必须先上线才能往下做时才拆成几个;小修走简易开发;需求里的每一块用 lane-pr 提。",
1414
+ "instructions": "要把改动合进默认分支时,一个需求用 workflow_run 带 confirm: true 把开发流程(develop 或 simple)填好交用户确认,需求写在 message,develop 另给 title;用户开工后第一张任务随需求消息交给你,不要先改完再补开。需求是用户想一起验收、一起上线的一件事,只有必须先上线才能往下做时才拆成几个;小修走简易开发;每一块用 lane-pr 提。",
1416
1415
  "commands": [],
1417
1416
  "capabilities": [],
1418
1417
  "groups": [],
@@ -1942,7 +1941,7 @@
1942
1941
  "id": "review",
1943
1942
  "displayName": "PR 生命流程",
1944
1943
  "description": "PR 从检查、评审到批准合并;简易开发",
1945
- "version": "2.17.0",
1944
+ "version": "2.17.1",
1946
1945
  "category": "工作流程",
1947
1946
  "icon": {
1948
1947
  "symbol": "checkmark.bubble.fill",
@@ -1953,8 +1952,8 @@
1953
1952
  "kind": "builtin",
1954
1953
  "package": "@coda-console/review",
1955
1954
  "tag": "latest",
1956
- "version": "2.17.0",
1957
- "integrity": "sha512-IM+a04CzSJQoU06VNGYnXDOxpIUVLwjgZeSkDmSwqKPSLSTcU6x9FjTL2NK2O5VTBnAPJuiwxzD2aagWVbmJdQ==",
1955
+ "version": "2.17.1",
1956
+ "integrity": "sha512-xHMDaJrG2nFaXiwB+L8ans+x2DQYS6oLVuiCgeZRmc0pprHZNRu9xcWjHE1nLNVMjL+S0HIQ9fMcNKC99BXN2A==",
1958
1957
  "repo": "https://github.com/coda-console/coda-plugins.git",
1959
1958
  "path": "plugins/review"
1960
1959
  },
@@ -15,6 +15,7 @@ import { fileURLToPath } from 'node:url';
15
15
  import { requireCondition as check, ContractError } from '../../domain/errors.mjs';
16
16
  import { isDuration } from '../../domain/duration.mjs';
17
17
  import { AGENT_ID } from '../../domain/values.mjs';
18
+ import { THREAD_ENV, TOKEN_ENV } from '../../domain/session-env.mjs';
18
19
  import { iconFiles } from './plugin-icons.mjs';
19
20
  import { checkCatalog, extensionsFor } from './plugin-extensions.mjs';
20
21
  import { contributionProblem, manifestProblem, TYPES } from '@coda-console/protocol/validate';
@@ -283,7 +284,9 @@ export function pluginEnv({ catalog, installed, id, stateDir = () => null, setti
283
284
  ...(arbiter ? { CODA_ARBITER: '1' } : {}) };
284
285
  }
285
286
  // What such a process inherits, cleared of what Coda gives it as a plugin's: it never takes another plugin's for its own.
286
- export const cleared = base => Object.fromEntries(Object.entries(base).filter(([name]) => !PLUGIN_VARIABLES.includes(name)));
287
+ // Nor the session it was started from (THREAD_ENV) or that session's or the step's token (TOKEN_ENV), which are only ever the
288
+ // process's own.
289
+ export const cleared = base => Object.fromEntries(Object.entries(base).filter(([name]) => !PLUGIN_VARIABLES.includes(name) && name !== THREAD_ENV && name !== TOKEN_ENV));
287
290
 
288
291
  // ---- Values ----
289
292
  // `coda-agent-match`: `*` for every session, else agent, model and effort from the left, joined by `|`; each level is
@@ -1,5 +1,5 @@
1
1
  {
2
- "commit": "b6d92217b3578ccab253246b699ecff16d19ea30",
2
+ "commit": "53af4bd374eb9e899b29dde8311adbb0543743fe",
3
3
  "packages": {
4
4
  "@0dep/piso": "5.2.0",
5
5
  "@agentclientprotocol/sdk": "2.6.0",
@@ -20,7 +20,7 @@
20
20
  "check/coda/components/plugins/model-contributions.mjs": "018a7157954b2326887ba1a780b37d3beb33338e41a28936b313562c2939d563",
21
21
  "check/coda/components/plugins/plugin-extensions.mjs": "4d7963185195ba6d21a4e49a66987613d5892210b1eb1dc02cffb7b816407776",
22
22
  "check/coda/components/plugins/plugin-icons.mjs": "ec29cadce4948ecacabfe911a2ceb45414b96e28971358acbc4e952bedc78e1a",
23
- "check/coda/components/plugins/plugin-rules.mjs": "adff4147c5a9635699fb7446ad1d9adb7f64a473ce946277ba91c40c38c3db09",
23
+ "check/coda/components/plugins/plugin-rules.mjs": "843b2dd428ff7ce813829bdeffb37092415c7ff74a223325e5f117a3d7a25508",
24
24
  "check/coda/components/plugins/plugin-source-rules.mjs": "1b6c0fb1868481627f09b7227bc64ef07fe669dcc344dad353e6743adf6c9c5d",
25
25
  "check/coda/components/plugins/skill-document.mjs": "153ad3c096c7c9b7774bcf7dcc0ba603c962ee1ac8697c8a71e3f2c9ba9c92e6",
26
26
  "check/coda/components/prompt-recovery/prompt-recovery.mjs": "f43f21d24c19a58113d3304f9248225b12080ab00ed15eab74bf7b94642732de",
@@ -32,12 +32,13 @@
32
32
  "check/coda/domain/errors.mjs": "8319c6759c5b16b692f5e0a6208d066e43882c571da1075bff8698761020daef",
33
33
  "check/coda/domain/resource-admission.mjs": "775b1d7067f9d8487a3504d737f3f4bea31adf77af3357ed42e313805e5188e7",
34
34
  "check/coda/domain/plugin-services.mjs": "940a72a14da980188a32c790c7f341d3ec0062a6e87ef1ebc9ef051798ea0a75",
35
+ "check/coda/domain/session-env.mjs": "0bdd420e6ce74fc08796d83ab9ee3c5314f57830405b8607a36df45c1a9d07b1",
35
36
  "check/coda/domain/values.mjs": "afb8bf30e374bed27fe41ee4b6d8c3c0b4dbe1dcfb6b62dad9d3d53b966706a1",
36
37
  "check/coda/kernel/agent-failures.mjs": "cbc215e2403d86f0acc765c2077197e0b529fc01e213db465c388361238ea8ce",
37
38
  "check/coda/resources/plugins/resources/panels/command.mjs": "606f28bf87f87dded9df2db892bc7624c770d795ffab88f2409998346920ae42",
38
39
  "check/coda/resources/plugins/resources/panels/panels.mjs": "452860c6b1b39dd9a67a8dadf4dac8f7773741b3608274494a8ac518a01f5b33",
39
40
  "check/coda/resources/plugins/resources/panels/rules.mjs": "80da2709985c3866fff1698ea4d1c1afdf59cac2cc955605d3ec6c35f181eec6",
40
41
  "check/coda/resources/plugins/resources/panels/sign-in.mjs": "1271a24e33b1b882a1fb9bee03b8e240db8b9bee1b5208f0e1c84499cfb1be7e",
41
- "check/coda/builtin.json": "204b9d94b1b9841ab919e17e4d4755c4739ecc078ec7587e92c946436e8fe3a5"
42
+ "check/coda/builtin.json": "1f8e6dbf434862f012a87c9b850b1f88cf1ebf8690f38439ec3cca1d69fe204c"
42
43
  }
43
44
  }
@@ -0,0 +1,7 @@
1
+ // Every command a session's agent runs inherits which session it belongs to, so that a tool such as `coda-run` knows who
2
+ // is asking without being told (docs/workflows.md「从命令行调用」); a process Coda runs for no session is started without it.
3
+ export const THREAD_ENV = 'CODA_THREAD_ID';
4
+ // With it, the token the backend issued to the process doing the session's or the step's work (kernel/records/tokens.mjs):
5
+ // what the process brings back beside the session it names. A plugin's process takes its environment through `cleared`
6
+ // (components/plugins/plugin-rules.mjs), which leaves out both.
7
+ export const TOKEN_ENV = 'CODA_TOKEN';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coda-console/plugin-check",
3
- "version": "0.8.10",
3
+ "version": "0.8.11",
4
4
  "description": "Coda 插件的契约检查:扮演 Coda 读清单、启动 Agent 讲 ACP 与 _coda/wait、读资源类型(与旧的面板)。",
5
5
  "license": "MIT",
6
6
  "repository": {