@zq-silk/yui 2.21.0 → 2.23.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 (145) hide show
  1. package/README.md +5 -0
  2. package/dist/cli/commandCatalog.js +87 -27
  3. package/dist/cli/dynamicCompletion.js +4 -1
  4. package/dist/cli/helpRenderer.js +12 -1
  5. package/dist/cli/interactionPolicy.js +2 -0
  6. package/dist/cli/invocationRouter.js +5 -5
  7. package/dist/cli/roleWizard.js +5 -1
  8. package/dist/cli/updateCommand.js +20 -3
  9. package/dist/cli/updateOrchestrator.js +13 -0
  10. package/dist/cli/updatePorts.js +27 -0
  11. package/dist/commands/globalRoleCommands.js +33 -8
  12. package/dist/commands/inboxCommands.js +39 -12
  13. package/dist/commands/operatorCommands.js +2 -5
  14. package/dist/commands/releaseCommands.js +16 -2
  15. package/dist/commands/roleConfiguration.js +25 -2
  16. package/dist/commands/sessionCommands.js +5 -2
  17. package/dist/commands/taskCommands.js +217 -64
  18. package/dist/commands/taskContextCommand.js +26 -4
  19. package/dist/commands/taskFactCommands.js +15 -2
  20. package/dist/commands/taskIntegrationCommands.js +3 -3
  21. package/dist/commands/taskRoleRuntimeStatus.js +19 -5
  22. package/dist/commands/textInput.js +2 -2
  23. package/dist/context/contextFamilies.js +10 -0
  24. package/dist/context/currentSkills.js +37 -4
  25. package/dist/context/runContextPack.js +44 -5
  26. package/dist/context/runInputContract.js +1 -1
  27. package/dist/context/sessionBootstrapManifest.js +21 -6
  28. package/dist/context/sessionSkillNotice.js +74 -0
  29. package/dist/context/taskContext.js +100 -16
  30. package/dist/controlPlaneCli.js +17 -7
  31. package/dist/controller/agentRuntimeObserver.js +57 -12
  32. package/dist/controller/clientRuntime.js +66 -18
  33. package/dist/controller/controller.js +19 -2
  34. package/dist/controller/diagnosticJournal.js +10 -2
  35. package/dist/controller/fileSchedulerStoreAdapter.js +74 -24
  36. package/dist/controller/hostLifecycle.js +153 -0
  37. package/dist/controller/hostLifecycleChecks.js +27 -0
  38. package/dist/controller/hostUpgrade.js +344 -0
  39. package/dist/controller/messageHealth.js +4 -3
  40. package/dist/controller/providerRetryAdmission.js +15 -1
  41. package/dist/controller/providerRetryDelivery.js +18 -2
  42. package/dist/controller/runtime.js +82 -21
  43. package/dist/controller/runtimeEventInbox.js +107 -13
  44. package/dist/controller/runtimeEventProcessor.js +3 -3
  45. package/dist/controller/sessionNotify.js +5 -46
  46. package/dist/controller/taskRunRecovery.js +153 -0
  47. package/dist/core/controllerClient.js +16 -2
  48. package/dist/core/controllerServer.js +14 -5
  49. package/dist/core/controllerTelemetry.js +51 -5
  50. package/dist/errors/cliFailure.js +14 -5
  51. package/dist/execution/codexThreadNaming.js +54 -43
  52. package/dist/executor/agentAdapter.js +32 -4
  53. package/dist/executor/agentConfigurationFields.js +2 -0
  54. package/dist/executor/fileRoleLaunchPlanner.js +18 -3
  55. package/dist/integration/gitIntegrationService.js +3 -2
  56. package/dist/integration/integrationSourceApplication.js +12 -1
  57. package/dist/interaction/notificationPresentation.js +11 -16
  58. package/dist/interaction/operatorPresentation.js +1 -1
  59. package/dist/message/messageContinuation.js +3 -1
  60. package/dist/output/boundedRead.js +36 -7
  61. package/dist/output/rolePresentation.js +3 -1
  62. package/dist/runtime/agentEndpoint.js +11 -1
  63. package/dist/runtime/agentEndpointIdentity.js +2 -0
  64. package/dist/runtime/agentHost.js +174 -40
  65. package/dist/runtime/agentHostImplementation.js +3 -1
  66. package/dist/runtime/codexAppServerRuntime.js +113 -24
  67. package/dist/runtime/codexInteractiveHost.js +102 -11
  68. package/dist/runtime/codexNativeAccess.js +1 -1
  69. package/dist/runtime/contextRecovery.js +15 -0
  70. package/dist/runtime/hostSessionLifecycle.js +83 -0
  71. package/dist/runtime/hostUpgradeGate.js +43 -0
  72. package/dist/runtime/lifecycleChecks.js +47 -0
  73. package/dist/runtime/lifecycleReservation.js +9 -1
  74. package/dist/runtime/nativeTitleReceipt.js +31 -0
  75. package/dist/runtime/nativeTitleSync.js +192 -0
  76. package/dist/runtime/providerRetry.js +9 -6
  77. package/dist/runtime/providerRuntimeIdentity.js +1 -1
  78. package/dist/runtime/structuredProviderHost.js +65 -35
  79. package/dist/scheduler/wakeupQueue.js +10 -4
  80. package/dist/storage/sqliteSchema.js +29 -0
  81. package/dist/storage/storageVersions.js +1 -1
  82. package/dist/tmux/tmuxManager.js +4 -2
  83. package/dist/web/webSettings.js +2 -0
  84. package/docs/authorization.md +18 -3
  85. package/docs/cli-information-contract.md +228 -6
  86. package/docs/cli-information-contract.zh-CN.md +95 -5
  87. package/docs/managed-turn-and-session-runtime.md +177 -21
  88. package/docs/managed-turn-and-session-runtime.zh-CN.md +126 -14
  89. package/docs/provider-retry.md +11 -0
  90. package/docs/release-workflow.md +65 -0
  91. package/docs/release-workflow.zh-CN.md +48 -0
  92. package/docs/roles-and-configuration.md +28 -0
  93. package/docs/roles-and-configuration.zh-CN.md +21 -0
  94. package/docs/storage-baseline.md +13 -1
  95. package/docs/storage-baseline.zh-CN.md +5 -1
  96. package/docs/task-delivery.md +7 -0
  97. package/docs/task-delivery.zh-CN.md +5 -0
  98. package/docs/testing/review-evaluation.md +7 -7
  99. package/docs/testing/review-evaluation.zh-CN.md +7 -7
  100. package/docs/testing/verification-levels.md +45 -2
  101. package/docs/testing/verification-levels.zh-CN.md +21 -2
  102. package/i18n/README.zh-CN.md +6 -0
  103. package/package.json +1 -1
  104. package/skills/yui-leader/SKILL.md +98 -193
  105. package/skills/yui-leader/VERSION +1 -1
  106. package/skills/yui-leader/references/artifacts.md +41 -0
  107. package/skills/yui-leader/references/assignment-execution.md +140 -0
  108. package/skills/yui-leader/references/completion.md +79 -0
  109. package/skills/yui-leader/references/delivery-scope.md +26 -0
  110. package/skills/yui-leader/references/execution.md +16 -487
  111. package/skills/yui-leader/references/implementation.md +81 -0
  112. package/skills/yui-leader/references/planning.md +7 -45
  113. package/skills/yui-leader/references/review.md +90 -0
  114. package/skills/yui-leader/references/task-progress.md +23 -0
  115. package/skills/yui-leader/references/work-allocation.md +118 -0
  116. package/skills/yui-operator/SKILL.md +77 -333
  117. package/skills/yui-operator/VERSION +1 -1
  118. package/skills/yui-operator/references/body-transport.md +62 -0
  119. package/skills/yui-operator/references/configuration.md +47 -0
  120. package/skills/yui-operator/references/lifecycle.md +41 -0
  121. package/skills/yui-operator/references/progress.md +39 -0
  122. package/skills/yui-operator/references/routing.md +57 -0
  123. package/skills/yui-operator/references/submission.md +56 -0
  124. package/skills/yui-operator/references/task-delivery.md +1 -1
  125. package/skills/yui-operator/references/web-lifecycle.md +19 -0
  126. package/skills/yui-operator/scripts/verify-submission.mjs +37 -0
  127. package/skills/yui-runtime/SKILL.md +182 -531
  128. package/skills/yui-runtime/VERSION +1 -1
  129. package/skills/yui-runtime/references/archive.md +51 -0
  130. package/skills/yui-runtime/references/command-discovery.md +41 -0
  131. package/skills/yui-runtime/references/completed-followup.md +65 -0
  132. package/skills/yui-runtime/references/context-ordering.md +3 -34
  133. package/skills/yui-runtime/references/context-reads.md +61 -0
  134. package/skills/yui-runtime/references/dispatched-run.md +61 -0
  135. package/skills/yui-runtime/references/execution-failure.md +105 -0
  136. package/skills/yui-runtime/references/global-context.md +18 -0
  137. package/skills/yui-runtime/references/global-input-controls.md +44 -0
  138. package/skills/yui-runtime/references/host-custody.md +30 -0
  139. package/skills/yui-runtime/references/inbox-recovery.md +77 -0
  140. package/skills/yui-runtime/references/incremental-context.md +40 -0
  141. package/skills/yui-runtime/references/publication.md +4 -111
  142. package/skills/yui-runtime/references/recovery.md +32 -192
  143. package/skills/yui-runtime/references/session-identity.md +18 -0
  144. package/skills/yui-runtime/references/session-replacement.md +45 -0
  145. package/skills/yui-runtime/references/uncertain-execution.md +29 -0
@@ -155,6 +155,23 @@ different contracts. Provider bypass does not grant writes to another Project.
155
155
  Managed workspace owner, exact Assignment and resource grants enforce Yui
156
156
  operations; broad native permissions are not an OS sandbox.
157
157
 
158
+ Codex configured permissions can explicitly exclude automatic writable temp roots:
159
+ `--sandbox workspace-write --exclude-tmpdir-env-var true --exclude-slash-tmp true`.
160
+ Each exclusion accepts `true` or `false`; `--clear-exclude-tmpdir-env-var` and
161
+ `--clear-exclude-slash-tmp` remove the respective override. Omission preserves
162
+ native defaults, not an implicit exclusion. Both fields require an explicit
163
+ `workspace-write` sandbox and reject other adapters or conflicting strategies.
164
+ Managed launches compile them into per-thread `sandbox_workspace_write`
165
+ configuration on start/resume, never shared-daemon defaults or account files.
166
+ Ordinary interactive launches use equivalent invocation-local structured options.
167
+ The mapping follows the native
168
+ [configuration reference](https://learn.chatgpt.com/docs/config-file/config-reference).
169
+ These exclude automatic `$TMPDIR` and `/tmp` grants, not explicitly authorized
170
+ writable roots within those paths. They do not establish read isolation or
171
+ prevent effects through an authorized Controller RPC. Inspect the actual native
172
+ receipt and validate enforcement in a separately authorized disposable fixture;
173
+ accepting the configuration does not prove OS sandbox enforcement.
174
+
158
175
  A write-intent delivery Leader launched in its own Task-owned main workspace
159
176
  captures that workspace's bound writable Projects without needing an open
160
177
  WorkItem. Accepted results do not remove this direct-delivery scope. An explicit
@@ -236,12 +253,23 @@ yui config role show <global-role>
236
253
  yui config profile show <profile>
237
254
  yui task role add <task> <role> --profile <profile>
238
255
  yui task role show <task> <role>
256
+ yui task role show <task> <role> --view full
239
257
  yui task role update <task> <role> --environment <preparation-id>
240
258
  yui task role update <task> <role> --managed-environment
241
259
  yui task role session inspect <task> <role>
242
260
  yui task role session new <task> <role> --reason "<why a fresh Session is useful>"
243
261
  ```
244
262
 
263
+ `task role show` defaults to the complete desired Role configuration and its
264
+ current recorded Session configuration, not historical Run snapshots. Recorded
265
+ configuration and a retained control target are not live-state or stop evidence;
266
+ use the returned status/session inspection commands for those questions.
267
+ `--view full` retains the previous complete `role`, `sessions`, and `runs`
268
+ document with bounded pagination. JSON consumers needing those historical
269
+ fields must now request that view and retain it on cursor continuations.
270
+ This changes the CLI default JSON view, not storage or the `task.role.show`
271
+ configuration RPC used by the interactive wizard.
272
+
245
273
  The global query uses the calling process's default native context. Task-scoped
246
274
  queries use the Controller's native account environment and the selected Role
247
275
  configuration; they never forward the caller's credentials to another Provider.
@@ -125,6 +125,18 @@ Provider 权限策略、Profile 访问意图和 Project 写范围是不同的合
125
125
  不授予对另一个 Project 的写入。受管工作区 owner、精确 Assignment 和资源 grant
126
126
  落实 Yui 操作;宽泛的原生权限不是 OS 沙箱。
127
127
 
128
+ Codex configured 权限可显式排除自动加入的可写临时目录:
129
+ `--sandbox workspace-write --exclude-tmpdir-env-var true --exclude-slash-tmp true`。
130
+ 两项均接受 `true`/`false`;`--clear-exclude-tmpdir-env-var` 和
131
+ `--clear-exclude-slash-tmp` 分别清除覆盖。省略时保留原生默认语义,不默认排除。
132
+ 两项都要求显式 `workspace-write`,其他 adapter 或冲突策略会被拒绝。
133
+ 受管 start/resume 编译到该 Thread 的 `sandbox_workspace_write`,不修改共享 daemon
134
+ 默认值或账户文件;普通交互启动使用等价的单次调用结构化选项。
135
+ 映射依据[原生配置参考](https://learn.chatgpt.com/docs/config-file/config-reference)。
136
+ 这只排除自动 `$TMPDIR`、`/tmp` 写授权,不排除位于其中且被显式授权的 writable root;
137
+ 也不证明读隔离或阻止合法 Controller RPC 的副作用。配置被接受不是 OS 沙箱生效证明;
138
+ 应检查原生回执,并在另行授权的可丢弃 fixture 内验证实际执行边界。
139
+
128
140
  以 write 意图在自己 Task-owned main 工作区启动的 delivery Leader,从该工作区
129
141
  捕获已绑定 Project 的写域,不要求存在 open WorkItem;已接受结果也不会移除这个
130
142
  直接交付写域。显式 Assignment(包括空写域)仍决定受派发执行的范围。
@@ -189,12 +201,21 @@ yui config role show <global-role>
189
201
  yui config profile show <profile>
190
202
  yui task role add <task> <role> --profile <profile>
191
203
  yui task role show <task> <role>
204
+ yui task role show <task> <role> --view full
192
205
  yui task role update <task> <role> --environment <preparation-id>
193
206
  yui task role update <task> <role> --managed-environment
194
207
  yui task role session inspect <task> <role>
195
208
  yui task role session new <task> <role> --reason "<why a fresh Session is useful>"
196
209
  ```
197
210
 
211
+ `task role show` 默认返回完整的期望 Role 配置及当前记录的 Session 配置,
212
+ 不再附带历史 Run 配置副本。记录配置和保留的控制目标不等于实时状态或停止
213
+ 证明;需要这些事实时使用返回的 status/session 检查入口。`--view full`
214
+ 保留原来的完整 `role`、`sessions`、`runs` 文档及有界分页。依赖这些历史
215
+ 字段的 JSON 消费者须显式选择 full,并在后续游标读取中保持同一视图。
216
+ 这是 CLI 默认 JSON 视图变更,不改变存储,也不改变交互配置向导使用的
217
+ `task.role.show` 配置 RPC。
218
+
198
219
  全局查询使用调用进程的默认原生环境;Task 查询使用 Controller 的原生账户环境及
199
220
  所选 Role 配置,不把调用方的凭据转交给其他 Provider。省略 `--error` 查看当前期望
200
221
  配置;指定错误记录时,使用失败时保存的模型、工作区、profile/settings 选项,不受
@@ -2,7 +2,19 @@
2
2
 
3
3
  # Storage baseline 1.0
4
4
 
5
- Current storage is 1.25. The 1.24 → 1.25 transition admits optional Role
5
+ Current storage is 1.28. The 1.27 → 1.28 transition admits exact-identity native
6
+ title effect receipts under `runtime/native-titles`. It does not infer historical
7
+ title ownership, rename conversations, or change existing database payloads.
8
+ Unconfirmed naming intents remain non-replayable across Host replacement.
9
+
10
+ The 1.26 → 1.27 transition admits versioned Host-upgrade
11
+ signals in the existing role-runtime mailbox. It adds no table, infers no past
12
+ upgrade request, and preserves existing payloads. Drain receipts precede Host
13
+ exit; a Controller restart resumes the exact request, not business input.
14
+ The 1.25 → 1.26 transition admits optional Codex
15
+ workspace-write temporary-directory exclusions without changing historical
16
+ permission payloads. The published 1.24 → 1.25 transition remains unchanged
17
+ and admits optional Role
6
18
  `instanceCode` and Session `generatedTitle` presentation fields without rewriting
7
19
  existing records. Untagged historical titles remain user-owned; no code or
8
20
  title provenance is inferred. The 1.23 → 1.24 transition adds transaction-maintained
@@ -2,7 +2,11 @@
2
2
 
3
3
  # 存储基线 1.0
4
4
 
5
- 当前存储为 1.25。1.24 → 1.25 增加可选 Role `instanceCode` 和 Session `generatedTitle` 展示字段,不回填历史标题来源或实例码,不改写既有记录。1.23 → 1.24 为调度器的九类来源表增加事务维护的 Task 读取缓存修订号。插入、更新和删除只使对应 Task 的缓存失效,回滚同时回滚修订号。该值仅是派生缓存标识,不是 Task 权限或 Home revision CAS 的替代。历史 payload 不变,旧 Task 在首次修改前使用隐含的零修订号。
5
+ 当前存储为 1.28。1.27 → 1.28 声明 `runtime/native-titles` 下绑定精确会话身份的原生标题意图与回执;迁移不认领历史标题、不改名、不改写既有数据库 payload。未确认改名意图在 Host 替换后也不得重放。
6
+
7
+ 1.26 → 1.27 允许现有 role-runtime mailbox 保存版本化 Host 升级信号,不新增表、不推断历史升级请求、不改写既有 payload。排空回执先于 Host 退出持久化;Controller 重启继续精确升级请求,不重放业务输入。
8
+
9
+ 1.25 → 1.26 增加 Codex workspace-write 可选临时目录排除字段,不改写历史权限 payload。已发布的 1.24 → 1.25 定义保持不变:增加可选 Role `instanceCode` 和 Session `generatedTitle` 展示字段,不回填历史标题来源或实例码,不改写既有记录。1.23 → 1.24 为调度器的九类来源表增加事务维护的 Task 读取缓存修订号。插入、更新和删除只使对应 Task 的缓存失效,回滚同时回滚修订号。该值仅是派生缓存标识,不是 Task 权限或 Home revision CAS 的替代。历史 payload 不变,旧 Task 在首次修改前使用隐含的零修订号。
6
10
  同时增加两个局部索引,支持按精确运行观测身份查找,不再扫描或反序列化历史观测集合。
7
11
 
8
12
  1.22 → 1.23 新增全局 Shell Job、版本化脚本文件及每次运行的配置快照,不改写已有 Job、计划和历史记录。
@@ -73,6 +73,13 @@ An existing merge/rebase/cherry-pick without the attempt's own progress receipt
73
73
  is not adopted from Git markers. Preserve the scene and choose explicit recovery;
74
74
  normal continuation uses the original receipt and never replays a completed step.
75
75
 
76
+ If Git stopped but persisting the conflict failed, explicit `task integration
77
+ continue` can resume that same operation when the original progress receipt,
78
+ workspace, branch, source and Git metadata all match. This recovery requires a
79
+ nonempty staged resolution with no unresolved, unstaged or untracked files.
80
+ Ordinary re-entry does not authorize it; missing evidence still refuses recovery.
81
+ It does not invent a conflict record, restart the source command or bypass checks.
82
+
76
83
  When checks are a DurableJob, the Integration retains that exact jobId while
77
84
  running. Once the Job settles, `task integration continue <task>/<integration>`
78
85
  consumes its result and performs the guarded finalization. Existing unsettled
@@ -58,6 +58,11 @@ Integration 在候选 worktree 中套用固定来源提交,运行已配置的
58
58
  已有 merge/rebase/cherry-pick 若缺少原尝试的进度回执,不根据 Git 标记接管。
59
59
  保留现场并选择显式恢复;正常续作使用原回执,不重放已完成步骤。
60
60
 
61
+ 若 Git 已停止而保存冲突的事务失败,显式 `task integration continue` 可以继续
62
+ 同一次操作,但原进度回执、工作区、分支、来源和 Git 元数据必须全部匹配。
63
+ 此恢复要求非空且全部暂存的解决结果,无未解决、未暂存或未跟踪文件。
64
+ 普通重入不授权恢复;缺少证据仍拒绝。不伪造冲突记录、不重新发起来源命令,也不跳过检查。
65
+
61
66
  当检查是一个 DurableJob 时,Integration 在运行期间保留那个确切的 jobId。Job 结算
62
67
  后,`task integration continue <task>/<integration>` 消费其结果并执行带守卫的收尾。
63
68
  未结算的 Integration(包括冲突)仍阻止完成,不依赖 Agent 采用了什么执行顺序。
@@ -48,8 +48,8 @@ outside this example's contract. The index is a navigation hint, not a finding
48
48
  or a claim that all paths were inspected.
49
49
 
50
50
  Keep evidence roles separate: that contract is the expectation;
51
- `scripts/review-eval/verify.mjs`'s E03 probes are executable references;
52
- only an actual `node scripts/review-eval/evaluate.mjs verify` invocation plus its
51
+ `scripts/eval/review/verify.mjs`'s E03 probes are executable references;
52
+ only an actual `node scripts/eval/review/evaluate.mjs verify` invocation plus its
53
53
  candidate commit, environment and output establishes a result. The probes use
54
54
  the two supplied modules for the counterexample, a one-page normal control,
55
55
  and a controlled wait followed by rejection to check pending/failure behavior.
@@ -65,7 +65,7 @@ inspection still covers the complete frozen candidate, not just these hints.
65
65
 
66
66
  ## Small development corpus
67
67
 
68
- `scripts/review-eval/` is an offline file tool, not a scheduler, model adapter or
68
+ `scripts/eval/review/` is an offline file tool, not a scheduler, model adapter or
69
69
  new Core store. It never calls a provider. No historical Task cases or results
70
70
  are inputs. All eight examples are newly constructed from explicit contracts.
71
71
 
@@ -86,8 +86,8 @@ prove exhaustive correctness, independent authorship verification or Agent
86
86
  effectiveness. Additional valid findings require adjudication.
87
87
 
88
88
  ```sh
89
- node scripts/review-eval/evaluate.mjs verify
90
- node scripts/review-eval/evaluate.mjs export E03 basic /absolute/new-participant-directory
89
+ node scripts/eval/review/evaluate.mjs verify
90
+ node scripts/eval/review/evaluate.mjs export E03 basic /absolute/new-participant-directory
91
91
  ```
92
92
 
93
93
  Export uses an explicit projection of candidate source and requirements; indexed
@@ -112,8 +112,8 @@ does not fabricate a holdout or claim one has been evaluated.
112
112
  ## Freeze a comparison before running it
113
113
 
114
114
  ```sh
115
- node scripts/review-eval/evaluate.mjs plan protocol.json
116
- node scripts/review-eval/evaluate.mjs score plan.json records.json
115
+ node scripts/eval/review/evaluate.mjs plan protocol.json
116
+ node scripts/eval/review/evaluate.mjs score plan.json records.json
117
117
  ```
118
118
 
119
119
  Capture stdout as separate files using your normal artifact workflow. The
@@ -36,8 +36,8 @@ E03 的契约要求原样传递不透明游标并按顺序返回条目。实际
36
36
  已累计条目不会作为成功结果返回。重试/并发修改不属于此例契约。
37
37
  索引只是定位提示,不是缺陷结论,也不声称已检查所有路径。
38
38
 
39
- 分清证据身份:上述契约是预期;`scripts/review-eval/verify.mjs` 的 E03
40
- 探针是可执行引用;只有实际运行 `node scripts/review-eval/evaluate.mjs verify`
39
+ 分清证据身份:上述契约是预期;`scripts/eval/review/verify.mjs` 的 E03
40
+ 探针是可执行引用;只有实际运行 `node scripts/eval/review/evaluate.mjs verify`
41
41
  并保留候选提交、环境和输出才构成结果。探针用给定的两个模块验证反例,
42
42
  提供单页正常对照,以及可控等待后拒绝的未完成/失败行为检查;
43
43
  不覆盖真实服务、崩溃恢复或 Reviewer 行为。
@@ -49,7 +49,7 @@ E03 的契约要求原样传递不透明游标并按顺序返回条目。实际
49
49
 
50
50
  ## 小型开发集
51
51
 
52
- `scripts/review-eval/` 是离线文件工具,不是调度器、模型适配器或新增 Core 存储。
52
+ `scripts/eval/review/` 是离线文件工具,不是调度器、模型适配器或新增 Core 存储。
53
53
  它不调用 Provider,不以任何历史 Task 案例或结果为输入。八个题目均由明确契约新构造。
54
54
 
55
55
  | 案例 | 能力 | 形态 |
@@ -66,8 +66,8 @@ E03 的契约要求原样传递不透明游标并按顺序返回条目。实际
66
66
  这不证明穷尽正确性、独立出题核实或 Agent 效果。额外有效发现需要裁定。
67
67
 
68
68
  ```sh
69
- node scripts/review-eval/evaluate.mjs verify
70
- node scripts/review-eval/evaluate.mjs export E03 basic /absolute/new-participant-directory
69
+ node scripts/eval/review/evaluate.mjs verify
70
+ node scripts/eval/review/evaluate.mjs export E03 basic /absolute/new-participant-directory
71
71
  ```
72
72
 
73
73
  导出仅投影候选源码与要求;indexed 材料只增加导航索引。两组的必要契约与源码完全相同。
@@ -85,8 +85,8 @@ node scripts/review-eval/evaluate.mjs export E03 basic /absolute/new-participant
85
85
  ## 运行前固定比较协议
86
86
 
87
87
  ```sh
88
- node scripts/review-eval/evaluate.mjs plan protocol.json
89
- node scripts/review-eval/evaluate.mjs score plan.json records.json
88
+ node scripts/eval/review/evaluate.mjs plan protocol.json
89
+ node scripts/eval/review/evaluate.mjs score plan.json records.json
90
90
  ```
91
91
 
92
92
  按正常工件流程将 stdout 保存为单独文件。协议 JSON 包括非空
@@ -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.25 and its declared 1.0 through 1.24 minor
56
+ The stable suite owns current storage 1.28 and its declared 1.0 through 1.27 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.25, exact schema/record validation, no initialization over
61
+ 1. Fresh storage 1.28, 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
@@ -90,6 +90,49 @@ stable suite. Real-model or real-Home checks require explicit authorization.
90
90
  Current envelope checks reject arbitrary unknown fields, rather than maintaining
91
91
  a blacklist of retired field names.
92
92
 
93
+ ## Context evaluation checks
94
+
95
+ Evaluation code is organized by topic under [scripts/eval](../../scripts/eval/README.md).
96
+ Core evidence utilities and provider usage adapters are separate from the Yui
97
+ context scenarios below and the independent review-material evaluation.
98
+
99
+ The framework produces engineering measurements and objective check evidence;
100
+ the executing Agent interprets actual trajectories, semantic quality, model
101
+ variation and optimization benefit. Assemble related changes before a bounded
102
+ representative experiment. Wording-only or small byte reductions normally need
103
+ deterministic checks, not their own full A/B and model-review chains. Record the
104
+ decision question and spending bounds in the experiment plan; independent model
105
+ review is optional for material disputes, never automatic. This does not grant
106
+ real-resource authorization.
107
+
108
+ New runs freeze `decisionPolicy: agent-analysis`: process exit describes complete
109
+ collection and released cleanup, not quality acceptance. Original check failures
110
+ and unknowns remain in reports. Only bounded non-recovery business reading/load
111
+ findings cease to censor later safe inputs; authority, effects, handling, identity,
112
+ native execution and recovery fences remain. Historical exits and seals are not
113
+ rewritten. See the framework README for exact boundaries and Agent handoff.
114
+
115
+ `npm run eval:check` checks evaluation contracts without starting a Home.
116
+ The explicit `npm run eval:context:wiring -- --product <absolute-checkout> --out <new-dir>`
117
+ uses the [maintained framework](../../scripts/eval/context/README.md)
118
+ for multi-input CLI/Controller/Host/fake-Provider chains and bounded fault checks.
119
+ It remains outside `npm test` and the platform matrix: package smoke continues
120
+ to own package/OS wiring. Fake success is not a real-model, native-compaction or
121
+ lossless-observation claim. Historical performance ledgers are not reset by
122
+ framework validation; live resources require a separately authorized freeze.
123
+ The fake-only `native-normal` scenario verifies completed native tool evidence
124
+ through the real adapter without participant files. Read/load checks are bound
125
+ to Role/Thread/context epoch and decision time; unsupported evidence stays
126
+ unknown. Current observation cannot yield an unqualified valid-pass.
127
+ Proxy checks exercise both managed and identity-free detached control clients;
128
+ detached transport cannot supply subject read/load evidence.
129
+ The opt-in wiring `--profile recovery` checks a scheduled retained-claim
130
+ Session replacement using the same native evidence adapter as real mode:
131
+ exact predecessor stop, fresh successor ownership/read/load, preserved effect
132
+ and successor ACK; a native background-inspection rejection fences replacement.
133
+ It is deterministic CLI/Host wiring, not live model recovery or native
134
+ compaction. Real `session-recovery` requires its own exact authorized freeze.
135
+
93
136
  ## Skill and instruction changes
94
137
 
95
138
  Review the shared Runtime contract and affected Role/Project Skills together.
@@ -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.25 和明确声明的 1.0 至 1.24 连续小版本迁移,
42
+ 稳定套件维护当前存储 1.28 和明确声明的 1.0 至 1.27 连续小版本迁移,
43
43
  不包含未声明的历史格式兼容路径。
44
44
 
45
45
  当前覆盖包括:
46
46
 
47
- 1. 新建存储 1.24、精确结构与记录校验、禁止覆盖未知数据库、无修改拒绝旧整数格式。
47
+ 1. 新建存储 1.28、精确结构与记录校验、禁止覆盖未知数据库、无修改拒绝旧整数格式。
48
48
  2. 精确版本暂存、目标不匹配拒绝、同主版本连续小版本预检、交接锁显式所有者,
49
49
  以及恢复时核对捕获的协议和存储身份,不接受缺失字段。
50
50
  3. 持久 Task/Message/Decision 上下文、Draft 激活权威、mailbox 认领、
@@ -66,6 +66,25 @@ CI 每个作业只显式构建一次。
66
66
  真实模型或真实 Home 检查需要显式授权。
67
67
  当前记录按声明的字段集合拒绝未知字段,不维护退役字段名称黑名单。
68
68
 
69
+ ## 上下文评测检查
70
+
71
+ 评测代码按专题组织在 [scripts/eval](../../scripts/eval/README.md):
72
+ 通用证据工具、Provider统计适配与下述Yui上下文场景分开;代码审查材料评测
73
+ 也是独立专题,不继承上下文场景的义务判定。
74
+
75
+ `npm run eval:check` 不启动 Home,只检查评测契约。
76
+ `npm run eval:context:wiring -- --product <绝对路径> --out <全新目录>` 显式运行
77
+ [维护框架](../../scripts/eval/context/README.md)的多输入
78
+ CLI/Controller/Host/fake Provider 闭环和有限故障验证。它不加入默认 `npm test`
79
+ 或平台矩阵;安装包与 OS wiring 仍由现有 package smoke 负责。
80
+ fake 通过不证明真实模型、原生压缩或无损观测;框架验证不重置历史性能账本,
81
+ 真实资源需另行明确授权和冻结。
82
+ fake 专用 `native-normal` 场景不写 participant 文件,经真实适配分支检查完成的
83
+ native 工具证据;读取/加载限定 Role、Thread、上下文代次与决策时间。
84
+ 不支持的证据仍为 unknown;当前观测条件不能产生无保留 valid-pass。
85
+ 代理检查同时覆盖 managed 和无管理身份的 detached control;
86
+ 后者仅保留控制传输记录,不能提供主体原文/加载证据。
87
+
69
88
  ## Skill 与指令变更
70
89
 
71
90
  一并审阅共享的 Runtime 合同和受影响的 Role/Project Skill。用几个相关场景检查指令
@@ -392,6 +392,12 @@ Yui 默认将控制面数据保存在 `~/.yui`,通过 `YUI_HOME` 选择另一
392
392
  状态命令前执行该 launcher 的 `setup`。开发工具不管理全局安装,
393
393
  不要用全局 `yui` 验证本地修改。真实模型、付费或共享资源测试需要用户明确请求这些资源。
394
394
 
395
+ 按专题划分的评测及通用证据工具见[评测入口](../scripts/eval/README.md):
396
+ `npm run eval:check` 做快速离线契约检查;
397
+ `npm run eval:context:wiring -- --product <产品绝对路径> --out <全新输出目录>`
398
+ 显式执行隔离 fake Provider 的 CLI/Controller/Host 完整链。它不默认加入核心测试,
399
+ 不证明真实模型效果;真实资源仍需另行精确授权,历史条件不重置。
400
+
395
401
  ## 社区与支持
396
402
 
397
403
  - 问题、缺陷与功能建议:提交
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zq-silk/yui",
3
- "version": "2.21.0",
3
+ "version": "2.23.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,