@zq-silk/yui 2.23.0 → 2.25.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.
Files changed (51) hide show
  1. package/README.md +9 -4
  2. package/dist/artifacts/artifactCapability.js +6 -6
  3. package/dist/artifacts/gitArtifactRef.js +10 -10
  4. package/dist/artifacts/jobArtifact.js +5 -5
  5. package/dist/artifacts/managedGit.js +15 -12
  6. package/dist/artifacts/taskArtifactRepository.js +35 -33
  7. package/dist/cli.js +9 -2
  8. package/dist/commands/configCommands.js +64 -1
  9. package/dist/commands/projectCommands.js +9 -9
  10. package/dist/commands/taskCompletionGate.js +1 -1
  11. package/dist/commands/taskIntegrationCommands.js +1 -1
  12. package/dist/commands/taskPublicationAdoptCommand.js +1 -1
  13. package/dist/commands/taskUpstreamCommands.js +1 -1
  14. package/dist/config/configCatalog.js +3 -0
  15. package/dist/config/gitConfig.js +20 -0
  16. package/dist/config/yuiConfig.js +1 -0
  17. package/dist/controlPlaneCli.js +4 -4
  18. package/dist/controller/jobArtifactControl.js +3 -3
  19. package/dist/controller/jobDefinitionControl.js +1 -1
  20. package/dist/integration/gitIntegrationService.js +1 -1
  21. package/dist/kernel/builtinCapabilities.js +3 -3
  22. package/dist/repository/gitCommand.js +153 -0
  23. package/dist/repository/gitCompatibility.js +3 -2
  24. package/dist/repository/gitWorkspace.js +579 -563
  25. package/dist/repository/gitWorktreeInventory.js +15 -19
  26. package/dist/repository/projectRefresh.js +1 -1
  27. package/dist/repository/taskBaseFreshness.js +1 -4
  28. package/dist/repository/taskWorkspacePreparer.js +1 -1
  29. package/dist/runtime/nativeExecutable.js +5 -2
  30. package/dist/runtime/platform.js +11 -0
  31. package/dist/storage/sqliteSchema.js +10 -0
  32. package/dist/storage/storageVersions.js +1 -1
  33. package/dist/storage/taskStore.js +7 -1
  34. package/dist/web/webConversation.js +2 -2
  35. package/dist/web/webMaterials.js +19 -19
  36. package/dist/web/webTaskSurface.js +3 -3
  37. package/dist/workspace/workItemChangeSetManager.js +3 -3
  38. package/docs/project-refresh.md +3 -2
  39. package/docs/project-refresh.zh-CN.md +2 -1
  40. package/docs/release-workflow.md +58 -2
  41. package/docs/release-workflow.zh-CN.md +45 -1
  42. package/docs/roles-and-configuration.md +34 -0
  43. package/docs/roles-and-configuration.zh-CN.md +27 -0
  44. package/docs/storage-baseline.md +5 -1
  45. package/docs/storage-baseline.zh-CN.md +3 -1
  46. package/docs/testing/verification-levels.md +7 -7
  47. package/docs/testing/verification-levels.zh-CN.md +6 -6
  48. package/i18n/README.zh-CN.md +8 -4
  49. package/package.json +1 -1
  50. package/dist/runtime/native/darwin-x64/claude-process-owner +0 -0
  51. package/dist/runtime/native/darwin-x64/process-identity +0 -0
@@ -15,6 +15,33 @@ Task Role 是 Task 局部的;global Role 提供已配置的默认值和全局
15
15
  的 global Role。只有当请求的 Task Role 不存在时,global Role 才作为创建模板。
16
16
  可用性、producer 分离和冻结的审查候选仍然适用。
17
17
 
18
+ ## Git 操作预算
19
+
20
+ 三项 Git 超时均有正式配置。本地命令(包括本地 ref 复制和产物仓库)使用总耗时上限;
21
+ clone、远程 fetch 和需要连接远端的 `ls-remote` 使用独立的无进展超时与总耗时上限:
22
+
23
+ ```sh
24
+ yui config tools show
25
+ yui config tools set git-local-timeout-seconds 30
26
+ yui config tools set git-remote-inactivity-timeout-seconds 120
27
+ yui config tools set git-remote-timeout-seconds 1800
28
+ yui config tools clear git-local-timeout-seconds
29
+ yui config tools clear git-remote-inactivity-timeout-seconds
30
+ yui config tools clear git-remote-timeout-seconds
31
+ ```
32
+
33
+ 三项都接受 1–86400 的整数秒,默认分别为单条本地命令总耗时 30 秒、
34
+ 无 stdout/stderr 输出 120 秒、单条远程命令总耗时 1800 秒。
35
+ 保存后下一条命令生效,包括 Controller 的 Project refresh 和 Task
36
+ 准备;无需重启,已启动命令保持原预算。clone/fetch 即使没有终端也显式请求进度输出。
37
+ 每次输出只重置静默计时,不延长总上限;输出仅证明活动,不证明传输在推进。
38
+ 远程 stderr 只保留末尾 64 KiB,避免长时间进度输出耗尽缓冲;stdout 和本地命令输出
39
+ 保留原缓冲上限。
40
+
41
+ 任一预算耗尽时终止该次调用自己的进程组(含传输 helper),等待进程与管道关闭。
42
+ 错误保留超时类型和预算、实际耗时、可用的退出码、信号及 stderr;不会自动重试,
43
+ 失败也不等于已回滚。存储 1.28 → 1.29 声明三项可选配置,不重写旧配置或持久化默认值。
44
+
18
45
  ## 可选实例码与会话标题
19
46
 
20
47
  每个 Role 独立配置仅用于展示的实例码。例如只设置 Operator,其他角色留空:
@@ -2,7 +2,11 @@
2
2
 
3
3
  # Storage baseline 1.0
4
4
 
5
- Current storage is 1.28. The 1.27 → 1.28 transition admits exact-identity native
5
+ Current storage is 1.29. The 1.28 → 1.29 transition admits optional local Git
6
+ total and remote Git inactivity/total timeout settings. Existing configuration payloads remain
7
+ byte-for-byte unchanged; absent fields use runtime defaults.
8
+
9
+ The 1.27 → 1.28 transition admits exact-identity native
6
10
  title effect receipts under `runtime/native-titles`. It does not infer historical
7
11
  title ownership, rename conversations, or change existing database payloads.
8
12
  Unconfirmed naming intents remain non-replayable across Host replacement.
@@ -2,7 +2,9 @@
2
2
 
3
3
  # 存储基线 1.0
4
4
 
5
- 当前存储为 1.28。1.27 → 1.28 声明 `runtime/native-titles` 下绑定精确会话身份的原生标题意图与回执;迁移不认领历史标题、不改名、不改写既有数据库 payload。未确认改名意图在 Host 替换后也不得重放。
5
+ 当前存储为 1.29。1.28 → 1.29 声明本地 Git 总耗时、远程 Git 无进展超时和总耗时上限三项可选配置;既有配置 payload 逐字节保留,缺失字段使用运行时默认值。
6
+
7
+ 1.27 → 1.28 声明 `runtime/native-titles` 下绑定精确会话身份的原生标题意图与回执;迁移不认领历史标题、不改名、不改写既有数据库 payload。未确认改名意图在 Host 替换后也不得重放。
6
8
 
7
9
  1.26 → 1.27 允许现有 role-runtime mailbox 保存版本化 Host 升级信号,不新增表、不推断历史升级请求、不改写既有 payload。排空回执先于 Host 退出持久化;Controller 重启继续精确升级请求,不重放业务输入。
8
10
 
@@ -53,12 +53,12 @@ is required.
53
53
  Both include `test/core` and `test/platform`. For an already built checkout,
54
54
  `npm run test:business` runs only `test/core` and `npm run test:platform` runs
55
55
  only `test/platform`; neither rebuilds. CI owns one explicit build per job.
56
- The stable suite owns current storage 1.28 and its declared 1.0 through 1.27 minor
56
+ The stable suite owns current storage 1.29 and its declared 1.0 through 1.28 minor
57
57
  transition. It contains no undeclared historical format compatibility path.
58
58
 
59
59
  Current coverage includes:
60
60
 
61
- 1. Fresh storage 1.28, exact schema/record validation, no initialization over
61
+ 1. Fresh storage 1.29, exact schema/record validation, no initialization over
62
62
  unknown data, and rejection of old integer formats without mutation.
63
63
  2. Exact-version staging, mismatched-target refusal, same-major contiguous
64
64
  minor preflight, explicit maintenance-owner identity across handover, and
@@ -160,17 +160,17 @@ adjudication aggregation are deterministic; they do not run or measure a model.
160
160
 
161
161
  `ci.yml` runs on PRs and master. Business contracts and full package business
162
162
  wiring run once on Linux x64/Node 24. Platform tests run on Linux Node 24/26
163
- and Mac Intel/Apple Silicon Node 24. Every job builds exactly once, without
163
+ and macOS Apple Silicon Node 24. Every job builds exactly once, without
164
164
  another lint or implicit pretest build. Keep the existing job names for branch
165
165
  checks; the complete workflow must pass for the exact master commit.
166
166
 
167
167
  | Evidence | PR/master | Exact release tarball |
168
168
  | --- | --- | --- |
169
169
  | Business/state/authority contracts (`test/core`) | Linux 24 once | Reuse exact-SHA successful Core CI |
170
- | OS/helper/PTY/Git/SQLite boundaries (`test/platform`) | Linux 24/26, both Macs 24 | Real SQLite SQL/GC on all 12 installs; other installed boundaries below |
170
+ | OS/helper/PTY/Git/SQLite boundaries (`test/platform`) | Linux 24/26, Apple Silicon Mac 24 | Real SQLite SQL/GC on all 8 installs; other installed boundaries below |
171
171
  | `full` smoke: business Jobs/Schedules + lifecycle + compatibility | Linux 24 once | Reuse exact-SHA business evidence |
172
- | `lifecycle` smoke: restart, Session/Host handoff, archive + compatibility | Both Macs 24 (Linux included in full) | Node 24 on each of the 3 platforms |
173
- | `compatibility` smoke: setup, CLI/bin, helpers, Doctor/PTY/SQLite | Linux 26 (included in other profiles) | All 3 platforms × Node 20/22/24/26 (included in lifecycle on 24) |
172
+ | `lifecycle` smoke: restart, Session/Host handoff, archive + compatibility | Apple Silicon Mac 24 (Linux included in full) | Node 24 on each of the 2 platforms |
173
+ | `compatibility` smoke: setup, CLI/bin, helpers, Doctor/PTY/SQLite | Linux 26 (included in other profiles) | Both platforms × Node 20/22/24/26 (included in lifecycle on 24) |
174
174
 
175
175
  `node scripts/smoke-runtime-package.mjs --assembled .release-stage` exercises
176
176
  the actual CLI/Controller/Host/SQLite and isolated tmux, replacing only the
@@ -224,7 +224,7 @@ It starts empty on each smoke invocation and is removed with the fixture.
224
224
  No cache is restored across jobs, packages or Node versions, and no production
225
225
  default changes. Keep it out of V8 coverage runs, where it can reduce precision.
226
226
 
227
- `publish.yml` builds one archive containing all three native targets and runs
227
+ `publish.yml` builds one archive containing both supported native targets and runs
228
228
  the profiles above against that exact freshly installed package through
229
229
  `YUI_INSTALLED_ROOT`, adding actual npm-bin, dependency, supported Node version,
230
230
  artifact and provenance boundaries. This validates runtime integration, not
@@ -39,12 +39,12 @@ Yui 是一个单用户本地产品。永久验证保护关键的 happy path 和
39
39
  两者均包含 `test/core` 和 `test/platform`。已构建的 checkout 可分别运行
40
40
  `npm run test:business` 与 `npm run test:platform`,它们不会再次构建。
41
41
  CI 每个作业只显式构建一次。
42
- 稳定套件维护当前存储 1.28 和明确声明的 1.0 至 1.27 连续小版本迁移,
42
+ 稳定套件维护当前存储 1.29 和明确声明的 1.0 至 1.28 连续小版本迁移,
43
43
  不包含未声明的历史格式兼容路径。
44
44
 
45
45
  当前覆盖包括:
46
46
 
47
- 1. 新建存储 1.28、精确结构与记录校验、禁止覆盖未知数据库、无修改拒绝旧整数格式。
47
+ 1. 新建存储 1.29、精确结构与记录校验、禁止覆盖未知数据库、无修改拒绝旧整数格式。
48
48
  2. 精确版本暂存、目标不匹配拒绝、同主版本连续小版本预检、交接锁显式所有者,
49
49
  以及恢复时核对捕获的协议和存储身份,不接受缺失字段。
50
50
  3. 持久 Task/Message/Decision 上下文、Draft 激活权威、mailbox 认领、
@@ -101,17 +101,17 @@ package-start 检查跟随已安装树中的本地 Skill 引用,包括跨 Role
101
101
  ## CI 与发布
102
102
 
103
103
  `ci.yml` 在 PR 和 master 上执行。业务契约与完整业务链路仅在 Linux x64/Node 24
104
- 运行一次;平台测试在 Linux Node 24/26、Intel/Apple Silicon Mac Node 24 上运行。
104
+ 运行一次;平台测试在 Linux Node 24/26、Apple Silicon Mac Node 24 上运行。
105
105
  每个作业只构建一次,不重复 lint 或隐含 pretest 构建。保留现有作业名称;发布仍要求
106
106
  精确 master SHA 的整个 Core CI 成功,不复用另一源码的结果。
107
107
 
108
108
  | 证据 | PR/master | 精确发布 tarball |
109
109
  | --- | --- | --- |
110
110
  | 业务、状态、授权契约(`test/core`) | Linux 24 一次 | 复用精确 SHA 的成功 Core CI |
111
- | OS/helper/PTY/Git/SQLite(`test/platform`) | Linux 24/26、双 Mac 24 | 12 组真实 SQL/GC;其余安装边界见下 |
111
+ | OS/helper/PTY/Git/SQLite(`test/platform`) | Linux 24/26、Apple Silicon Mac 24 | 8 组真实 SQL/GC;其余安装边界见下 |
112
112
  | `full`:Jobs/Schedules 业务链路 + lifecycle + compatibility | Linux 24 一次 | 复用精确 SHA 业务证据 |
113
- | `lifecycle`:重启、Session/Host 交接、归档 + compatibility | 双 Mac 24,Linux 已在 full 内 | 三平台 Node 24 |
114
- | `compatibility`:setup、CLI/bin、helper、Doctor/PTY/SQLite | Linux 26,其余已包含 | 三平台 × Node 20/22/24/26,24 已包含在 lifecycle 内 |
113
+ | `lifecycle`:重启、Session/Host 交接、归档 + compatibility | Apple Silicon Mac 24,Linux 已在 full 内 | 两平台 Node 24 |
114
+ | `compatibility`:setup、CLI/bin、helper、Doctor/PTY/SQLite | Linux 26,其余已包含 | 两平台 × Node 20/22/24/26,24 已包含在 lifecycle 内 |
115
115
 
116
116
  `node scripts/smoke-runtime-package.mjs --assembled .release-stage` 经过真实
117
117
  CLI/Controller/Host/SQLite 与隔离 tmux,仅用确定性夹具替换外部 Provider。它验证
@@ -5,7 +5,7 @@
5
5
  [![Core CI](https://github.com/zhangqian-silk/yui/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/zhangqian-silk/yui/actions/workflows/ci.yml)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](../LICENSE)
7
7
  ![Node](https://img.shields.io/badge/node-20%20%7C%2022%20%7C%2024-brightgreen.svg)
8
- ![Platform](https://img.shields.io/badge/platform-Linux%20x64%20%28glibc%29%20%7C%20macOS%20x64%2Farm64-blue.svg)
8
+ ![Platform](https://img.shields.io/badge/platform-Linux%20x64%20%28glibc%29%20%7C%20macOS%20arm64-blue.svg)
9
9
  [![PRs welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](#参与开发)
10
10
 
11
11
  让 Agent 持续推进你的任务,而不只是回答一轮对话。
@@ -37,10 +37,14 @@ Yui 是面向编程 Agent 的本地控制面。你只需用自然语言把目标
37
37
 
38
38
  ## 快速开始
39
39
 
40
- npm 包包含 Linux x64、Mac Intel 和 Apple Silicon 的 Yui 预编译程序。
41
- 同一份包在三个平台验证后发布,运行时只选择对应平台的程序。
40
+ npm 包包含 Linux x64 和 macOS Apple Silicon 的 Yui 预编译程序。
41
+ 同一份包在两个平台验证后发布,运行时只选择对应平台的程序。
42
+ 从 2.25.0 开始不再支持 macOS Intel,也不支持通过 Rosetta 运行的 x64 Node.js。
43
+ Intel Mac 用户须停留在 2.23.0;Apple Silicon 用户须使用原生 arm64 Node.js。
44
+ npm 的 OS/CPU 字段不能表达这种平台配对,因此不支持的组合仍可能安装成功,
45
+ 但 Yui 会在加载任一 CLI 产品或打开 Home 前明确拒绝,不新增安装脚本。
42
46
 
43
- 需要 Linux x64 / glibc 或 macOS(x64 或 Apple Silicon)、Git 2.29.0 或更新版本、tmux,以及
47
+ 需要 Linux x64 / glibc 或 macOS Apple Silicon(使用原生 arm64 Node.js)、Git 2.29.0 或更新版本、tmux,以及
44
48
  Node.js `^20.17.0`、`^22.9.0`、`^24.0.0` 或 `^26.0.0`。macOS 上可用
45
49
  `brew install tmux` 安装 tmux。最简单的方式是先安装 Codex CLI 或 Claude
46
50
  Code CLI,并确保它已经可以使用你自己的账号正常工作。Yui 负责协调 Agent,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zq-silk/yui",
3
- "version": "2.23.0",
3
+ "version": "2.25.0",
4
4
  "description": "Local control plane for long-running native agent CLI sessions backed by tmux.",
5
5
  "license": "MIT",
6
6
  "private": false,