@zq-silk/yui 0.16.1 → 1.0.0-alpha

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 (193) hide show
  1. package/ARCHITECTURE.md +12 -0
  2. package/ARCHITECTURE.zh-CN.md +8 -0
  3. package/README.md +9 -4
  4. package/dist/agent/agent.js +4 -9
  5. package/dist/agent/executionComponents.js +4 -4
  6. package/dist/agent/managedRuntimeEnvironment.js +0 -4
  7. package/dist/agentRun/agentRun.js +13 -23
  8. package/dist/artifacts/managedGit.js +3 -56
  9. package/dist/brief/taskBrief.js +3 -3
  10. package/dist/cli/agentConfigurationPicker.js +24 -21
  11. package/dist/cli/commandCatalog.js +18 -10
  12. package/dist/cli/roleWizard.js +41 -30
  13. package/dist/cli/updateCommand.js +35 -13
  14. package/dist/cli/updateOrchestrator.js +73 -44
  15. package/dist/cli/updatePorts.js +76 -86
  16. package/dist/cli/upgradeCommand.js +4 -8
  17. package/dist/cli.js +39 -33
  18. package/dist/commands/controllerCommands.js +2 -2
  19. package/dist/commands/executionAuditCommands.js +2 -2
  20. package/dist/commands/projectCommands.js +1 -1
  21. package/dist/commands/releaseCommands.js +9 -38
  22. package/dist/commands/taskCommands.js +91 -81
  23. package/dist/commands/taskCompletionGate.js +0 -117
  24. package/dist/commands/taskRoleRuntimeStatus.js +2 -2
  25. package/dist/commands/taskUpstreamCommands.js +93 -54
  26. package/dist/context/runContextPack.js +30 -54
  27. package/dist/context/runInputContract.js +9 -0
  28. package/dist/context/sessionBootstrapManifest.js +11 -19
  29. package/dist/controller/agentHostObservation.js +4 -2
  30. package/dist/controller/agentRuntimeObserver.js +4 -4
  31. package/dist/controller/clientRuntime.js +19 -44
  32. package/dist/controller/controller.js +24 -10
  33. package/dist/controller/fileSchedulerStoreAdapter.js +91 -24
  34. package/dist/controller/globalInputDelivery.js +31 -8
  35. package/dist/controller/globalRuntimeAttention.js +34 -0
  36. package/dist/controller/jobSupervisor.js +3 -3
  37. package/dist/controller/operatorNotification.js +31 -0
  38. package/dist/controller/providerRetryAdmission.js +3 -1
  39. package/dist/controller/providerRetryDelivery.js +136 -119
  40. package/dist/controller/runtime.js +2 -28
  41. package/dist/controller/sessionOwnerReconciliation.js +42 -24
  42. package/dist/controller/structuredProviderObservation.js +28 -1
  43. package/dist/controller/updateReconciliation.js +72 -20
  44. package/dist/coordination/workMailbox.js +4 -4
  45. package/dist/core/controllerIdentity.js +25 -0
  46. package/dist/core/controllerProcessIdentity.js +2 -2
  47. package/dist/core/controllerServer.js +4 -2
  48. package/dist/core/protocol.js +1 -1
  49. package/dist/doctor/doctor.js +2 -1
  50. package/dist/domain/validation.js +6 -0
  51. package/dist/event/taskEvent.js +3 -3
  52. package/dist/execution/workItemExecution.js +2 -2
  53. package/dist/executor/agentAdapter.js +28 -96
  54. package/dist/executor/agentConfigurationCatalog.js +13 -68
  55. package/dist/executor/agentConfigurationFields.js +120 -0
  56. package/dist/executor/agentConfigurationProbe.js +55 -80
  57. package/dist/executor/agentExecutor.js +11 -8
  58. package/dist/executor/effectiveLaunch.js +3 -3
  59. package/dist/executor/executorRegistry.js +0 -9
  60. package/dist/executor/fileRoleLaunchPlanner.js +12 -11
  61. package/dist/grant/capabilityGrant.js +2 -2
  62. package/dist/input/inputRequest.js +4 -4
  63. package/dist/integration/changeSet.js +3 -3
  64. package/dist/integration/integrationAttempt.js +3 -3
  65. package/dist/integration/integrationSourceApplication.js +1 -1
  66. package/dist/interaction/operatorPresentation.js +2 -1
  67. package/dist/job/durableJob.js +1 -1
  68. package/dist/job/jobRunner.js +2 -2
  69. package/dist/message/message.js +8 -6
  70. package/dist/message/messageContinuation.js +8 -9
  71. package/dist/milestone/milestone.js +3 -3
  72. package/dist/observability/executionAudit.js +1 -10
  73. package/dist/observability/runtimeIdentity.js +0 -23
  74. package/dist/output/agentConfigurationPresentation.js +4 -2
  75. package/dist/profile/agentProfile.js +3 -3
  76. package/dist/release/releaseHandover.js +2 -2
  77. package/dist/release/releaseIdempotencyStore.js +0 -23
  78. package/dist/release/releaseWorkflowPorts.js +8 -4
  79. package/dist/release/runtimeRelease.js +9 -7
  80. package/dist/repository/gitWorkspace.js +66 -19
  81. package/dist/repository/project.js +3 -3
  82. package/dist/repository/taskWorkspacePreparer.js +75 -68
  83. package/dist/resources/liveReferences.js +1 -1
  84. package/dist/resources/resourceRegistry.js +90 -44
  85. package/dist/resources/sqliteResourceRegistry.js +5 -7
  86. package/dist/review/reviewRound.js +5 -5
  87. package/dist/role/role.js +7 -8
  88. package/dist/runtime/acpProtocol.js +2 -3
  89. package/dist/runtime/acpSession.js +21 -5
  90. package/dist/runtime/agentDriverObservation.js +1 -1
  91. package/dist/runtime/agentEndpoint.js +4 -1
  92. package/dist/runtime/agentHost.js +25 -65
  93. package/dist/runtime/agentHostCleanup.js +85 -0
  94. package/dist/runtime/agentHostProtocol.js +3 -3
  95. package/dist/runtime/builtinAgentDrivers.js +46 -119
  96. package/dist/runtime/builtinTranscriptObserver.js +10 -6
  97. package/dist/runtime/codexAppServerRuntime.js +55 -89
  98. package/dist/runtime/codexInteractiveHost.js +1 -1
  99. package/dist/runtime/jsonLineChannel.js +35 -7
  100. package/dist/runtime/launchBroker.js +1 -1
  101. package/dist/runtime/processExitObservation.js +1 -1
  102. package/dist/runtime/providerContinuationReconciliationService.js +86 -38
  103. package/dist/runtime/providerRetry.js +15 -0
  104. package/dist/runtime/providerRuntimeIdentity.js +3 -3
  105. package/dist/runtime/providerRuntimeReconciler.js +12 -2
  106. package/dist/runtime/runtimeCoherence.js +7 -3
  107. package/dist/runtime/runtimeObservation.js +3 -3
  108. package/dist/runtime/sessionOwnerIdentity.js +1 -1
  109. package/dist/runtime/structuredProviderHost.js +106 -81
  110. package/dist/runtime/taskRuntimeIsolation.js +3 -3
  111. package/dist/runtime/tmuxAdapters.js +3 -3
  112. package/dist/scheduler/activeRoleRunDelivery.js +5 -1
  113. package/dist/scheduler/operatorInputNotificationProcessor.js +7 -17
  114. package/dist/scheduler/taskWake.js +1 -1
  115. package/dist/storage/baselineSchema.js +606 -0
  116. package/dist/storage/homeLayout.js +5 -16
  117. package/dist/storage/recordValidation.js +16 -4
  118. package/dist/storage/sqliteSchema.js +106 -1741
  119. package/dist/storage/sqliteStore.js +16 -14
  120. package/dist/storage/storageSchema.js +8 -7
  121. package/dist/storage/storageVersions.js +23 -16
  122. package/dist/storage/taskStore.js +3 -29
  123. package/dist/storage/upgrade/upgradeOrchestrator.js +14 -112
  124. package/dist/task/nextAction.js +33 -23
  125. package/dist/task/task.js +17 -8
  126. package/dist/task/taskActivation.js +5 -4
  127. package/dist/telemetry/sqliteTelemetryStore.js +2 -2
  128. package/dist/verification/gateArtifact.js +5 -3
  129. package/dist/verification/verificationPlan.js +6 -7
  130. package/dist/web/assets/assetManifest.js +2 -0
  131. package/dist/web/assets/client/app.js +72 -3
  132. package/dist/web/assets/client/components.js +2 -1
  133. package/dist/web/assets/client/i18n.js +2 -0
  134. package/dist/web/assets/client/taskSummary.js +345 -0
  135. package/dist/web/assets/client/taskSurface.js +44 -26
  136. package/dist/web/assets/client/view.js +33 -0
  137. package/dist/web/assets/shell.js +1 -0
  138. package/dist/web/assets/styles/cards.js +21 -0
  139. package/dist/web/webServer.js +39 -5
  140. package/dist/web/webSessions.js +165 -0
  141. package/dist/web/webSnapshot.js +23 -0
  142. package/dist/web/webTaskSurface.js +23 -0
  143. package/dist/workItem/workItem.js +6 -6
  144. package/dist/workspace/cleanupInspection.js +1 -9
  145. package/dist/worktree/managedWorkspace.js +3 -3
  146. package/docs/managed-turn-and-session-runtime.md +50 -7
  147. package/docs/managed-turn-and-session-runtime.zh-CN.md +36 -5
  148. package/docs/observability/README.md +47 -0
  149. package/docs/observability/README.zh-CN.md +37 -0
  150. package/docs/project-refresh.md +9 -0
  151. package/docs/project-refresh.zh-CN.md +8 -0
  152. package/docs/provider-retry.md +35 -0
  153. package/docs/release-workflow.md +70 -214
  154. package/docs/release-workflow.zh-CN.md +53 -157
  155. package/docs/roles-and-configuration.md +30 -0
  156. package/docs/roles-and-configuration.zh-CN.md +20 -0
  157. package/docs/sqlite-control-plane-design.md +48 -289
  158. package/docs/sqlite-control-plane-design.zh-CN.md +37 -53
  159. package/docs/storage-baseline.md +132 -0
  160. package/docs/storage-baseline.zh-CN.md +106 -0
  161. package/docs/task-delivery.md +110 -2
  162. package/docs/task-delivery.zh-CN.md +82 -2
  163. package/docs/task-discovery.md +9 -0
  164. package/docs/task-discovery.zh-CN.md +6 -0
  165. package/docs/testing/verification-levels.md +42 -164
  166. package/docs/testing/verification-levels.zh-CN.md +29 -115
  167. package/i18n/README.zh-CN.md +7 -4
  168. package/package.json +1 -1
  169. package/skills/yui-leader/SKILL.md +11 -0
  170. package/skills/yui-leader/references/execution.md +22 -0
  171. package/skills/yui-leader/references/planning.md +6 -2
  172. package/skills/yui-operator/SKILL.md +45 -13
  173. package/skills/yui-operator/references/task-delivery.md +99 -0
  174. package/skills/yui-runtime/SKILL.md +5 -3
  175. package/skills/yui-runtime/references/publication.md +56 -5
  176. package/skills/yui-runtime/references/recovery.md +12 -2
  177. package/dist/runtime/agentHostCompatibility.js +0 -127
  178. package/dist/storage/migrations/agentFailureContext.js +0 -22
  179. package/dist/storage/migrations/agentRunContract.js +0 -159
  180. package/dist/storage/migrations/artifactsToGit.js +0 -338
  181. package/dist/storage/migrations/collapseWorktreeLayout.js +0 -963
  182. package/dist/storage/migrations/currentInputContract.js +0 -86
  183. package/dist/storage/migrations/currentRuntimeContract.js +0 -228
  184. package/dist/storage/migrations/historicalVerificationPlan.js +0 -35
  185. package/dist/storage/migrations/integrationContinuation.js +0 -105
  186. package/dist/storage/migrations/narrowAgentFailureContext.js +0 -65
  187. package/dist/storage/migrations/notificationOnlyWakes.js +0 -74
  188. package/dist/storage/migrations/removeRuntimeGeneration.js +0 -207
  189. package/dist/storage/migrations/submitIntent.js +0 -126
  190. package/dist/storage/migrations/unifyHomeLayout.js +0 -925
  191. package/dist/storage/migrations/verificationPlanV1.js +0 -162
  192. package/dist/storage/migrations/verificationPolicy.js +0 -74
  193. package/dist/storage/migrations/workItemHistory.js +0 -46
@@ -36,10 +36,7 @@ export function cleanupFailure(reason, detail, expected, observed, status = "blo
36
36
  throw new CleanupInspectionError([{ resource: "git-workspace", reason, status,
37
37
  detail, expected, observed, sources: [], actions: [] }]);
38
38
  }
39
- /** Describe exact differences without disclosing paths outside this Task.
40
- * Legacy locations are displayed only for this Task's exact branch identity;
41
- * displaying a historical location is not accepting it as migration proof.
42
- */
39
+ /** Describe exact differences without disclosing paths outside this Task. */
43
40
  export function workspacePathValue(workspace, path) {
44
41
  const inside = (root) => {
45
42
  const value = relative(root, path);
@@ -52,11 +49,6 @@ export function workspacePathValue(workspace, path) {
52
49
  const taskPath = inside(join(home, "workspaces", "tasks", workspace.owner.taskId));
53
50
  if (taskPath !== undefined)
54
51
  return `<task>/${taskPath}`;
55
- const legacyPath = inside(join(home, "workspaces", "worktree"));
56
- const parts = legacyPath?.split("/");
57
- const taskSegment = workspace.entries.find(e => e.access === "write")?.branch.split("/")[1];
58
- if (parts?.length === 3 && parts[1] === taskSegment)
59
- return `<legacy-worktree>/${legacyPath}`;
60
52
  }
61
53
  const local = inside(workspace.root);
62
54
  return local === undefined ? "[outside authorized Task paths]" : `<owner>/${local}`;
@@ -34,7 +34,7 @@ export function isTaskOwnedWorkspace(workspace, taskId, taskRoot, bindings) {
34
34
  export function createManagedWorkspace(input, now) {
35
35
  const timestamp = now.toISOString();
36
36
  return validateManagedWorkspace({
37
- schemaVersion: 2,
37
+ schemaVersion: 1,
38
38
  owner: validateOwner(input.owner),
39
39
  root: resolve(requireText(input.root, "Managed workspace root")),
40
40
  entries: normalizeEntries(input.entries),
@@ -43,8 +43,8 @@ export function createManagedWorkspace(input, now) {
43
43
  });
44
44
  }
45
45
  export function validateManagedWorkspace(workspace) {
46
- if (workspace.schemaVersion !== 2) {
47
- throw new Error("Managed workspace must use schemaVersion 2.");
46
+ if (workspace.schemaVersion !== 1) {
47
+ throw new Error("Managed workspace must use schemaVersion 1.");
48
48
  }
49
49
  validateOwner(workspace.owner);
50
50
  if (resolve(requireText(workspace.root, "Managed workspace root")) !==
@@ -2,6 +2,15 @@
2
2
 
3
3
  # Session, AgentRun and notifications
4
4
 
5
+ Global Session stop/replacement uses the same exact native-execution quiescence
6
+ boundary as Task Sessions. A departed Host or archived Session alone is not
7
+ proof that an accepted input ended: its retained Provider binding is inspected
8
+ and stopped before settling occupancy. Global stop evidence is retained as a
9
+ record-only system Message, without submitting another native input. Pending
10
+ notifications cannot restart an explicitly stopped Session; normal Host detach
11
+ preserves an active Session and remains reconnectable. A switch after a partial
12
+ failure still settles the retained input before selecting a new conversation.
13
+
5
14
  ## Authority
6
15
 
7
16
  Task, WorkItem, Message, Decision, Artifact and Project Knowledge preserve
@@ -28,6 +37,7 @@ yui task context <task> --json
28
37
  yui task context delta <task> --after <coreCursor>
29
38
  yui task context inspect <task> --store <store> --ref <id>
30
39
  yui task run context <task/run> --json
40
+ yui task run context expand <task/run> <ref-id> --store <store> --mode full --json
31
41
  ```
32
42
 
33
43
  Task Context is a bounded authorized working set with a current core cursor.
@@ -43,6 +53,37 @@ Run Pack is a reference directory: read the relevant requirement and message
43
53
  bodies before acting, rather than treating a successful load as the deliverable.
44
54
  Planning Packs expose no Project write scope or Task-completion permission.
45
55
 
56
+ Every new Run, including planning, Review and continuation, binds an explicit
57
+ frozen Snapshot before dispatch. Context reads validate its full identity and
58
+ content digest, then read its stored values without rebuilding current Task
59
+ records. Synthesis reads the selected Producer results from that Snapshot.
60
+ Writable Projects come from the Run's captured effective authority; live
61
+ activity is a separate observation, not part of the frozen contract.
62
+ Expansion always requires both `store` and `refId`, even for a unique id.
63
+
64
+ New Task execution requires an initial Snapshot. Missing evidence does not make
65
+ a retained Run unreadable: inspection, failure settlement and explicit retirement
66
+ remain available to Leader/Operator, and unrelated work can proceed. Submission
67
+ and exact frozen-context reads fail locally when that evidence is absent or has
68
+ drifted. An explicit ordinary retry creates a new Run and Snapshot from current
69
+ authorized facts, without reconstructing the old snapshot; Review and synthesis
70
+ reuse still require exact frozen evidence. Subsequent observed/steered input may
71
+ omit its own Snapshot because it does not establish a new Assignment.
72
+ Storage uses the 1.0 baseline; the independent converter preserves these records
73
+ without making missing optional execution evidence a Home-wide blocker.
74
+
75
+ Operational failures are scoped to their owner, not treated as proof that the
76
+ whole Controller must stop. Optional resource reaping and continuation metadata
77
+ checks report failures without blocking normal scheduling. Provider retry
78
+ admission is isolated per Session; continuation observation is isolated per Task.
79
+ Job and Global input errors identify their Task/Job or Role and retain the
80
+ original cause. Committed observations stay committed; failed observations do
81
+ not acknowledge input, imply quiescence, or authorize another send or deletion.
82
+ Use the existing status, stop/cancel, retire, acknowledge and explicit retry
83
+ operations for the affected owner. Structural storage corruption, authority
84
+ failure and unconfirmed external effects still require diagnosis at their
85
+ respective boundaries, not a catch-all default or synthetic successful result.
86
+
46
87
  Current Task reads also expose untargeted user/Operator messages to the Task's
47
88
  current Worker and Reviewer Sessions, including requirements added after their
48
89
  Run snapshot was frozen. Use `task message list/show` or Task Context inspect
@@ -122,13 +163,10 @@ channel once; Worker/Reviewer failures use the existing Leader channel. No new
122
163
  recovery Agent is started, and there need not be a Run or Session to record the
123
164
  failure.
124
165
 
125
- Storage 35→36 archives original historical error payloads and marks their
126
- unrecorded launch configuration as unavailable. It never reconstructs old model,
127
- account or settings choices from current Roles.
128
-
129
- Storage 36→37 narrows that context to native metadata selectors and the requested
130
- model/effort. Full old snapshots remain in migration audit, not in the active
131
- reader. Reading a failure's model options does not validate Task permissions,
166
+ Failure context records native metadata selectors and the requested model/effort.
167
+ Unrecorded configuration stays unavailable; it is never reconstructed from current
168
+ Roles. Opaque audit bytes are not read as current configuration.
169
+ Reading a failure's model options does not validate Task permissions,
132
170
  Review state, workspace entries or the current Session bootstrap protocol.
133
171
  The three failure ingresses retain their native fencing/classification, while
134
172
  record creation and deduplication share one writer and supervisor notices use
@@ -294,6 +332,11 @@ yui task execution start <task>
294
332
  yui task execution stop <task> --force --reason <reason>
295
333
  ```
296
334
 
335
+ `task run retire` accepts only `--expected-progress-at` for its progress fence;
336
+ the former `--progress-at` alias is removed. Retiring an active Run still requires
337
+ its exact progress, Agent/Adapter and, when bound, native Session identity;
338
+ the renamed entry does not relax quiescence or retirement authority.
339
+
297
340
  Task execution start/stop controls Task admission, not Task acceptance.
298
341
  Stop first fences new Yui work, then interrupts each exact owned native input
299
342
  and confirms its terminal before removing the attachment. This also covers
@@ -2,6 +2,12 @@
2
2
 
3
3
  # Session、AgentRun 与通知
4
4
 
5
+ Global Session 停止/替换与 Task Session 共用精确的原生执行静止确认边界。
6
+ Host 消失或 Session 已入历史不代表已接受输入结束:须先检查并停止保留的
7
+ Provider binding,再结算执行占用。Global 停止证据保存为仅记录的 system Message,
8
+ 不触发新的原生输入。待投递通知不能重启已明确停止的 Session;普通 Host 脱离仍
9
+ 保留 active Session,可正常重连。部分切换失败后,仍须先结算旧输入再选择新会话。
10
+
5
11
  ## 权威
6
12
 
7
13
  Task、WorkItem、Message、Decision、Artifact 和 Project Knowledge 保存持久工作。
@@ -25,6 +31,7 @@ yui task context <task> --json
25
31
  yui task context delta <task> --after <coreCursor>
26
32
  yui task context inspect <task> --store <store> --ref <id>
27
33
  yui task run context <task/run> --json
34
+ yui task run context expand <task/run> <ref-id> --store <store> --mode full --json
28
35
  ```
29
36
 
30
37
  Task Context 是一个有界的、获授权的工作集,带有当前 core 游标。delta 在一个固定
@@ -37,6 +44,28 @@ Run Context 冻结 Assignment、来源引用、生效配置和工作区边界。
37
44
  和消息正文,而不是把加载成功当成交付物。规划 Pack 不暴露 Project 写范围或 Task 完成
38
45
  权限。
39
46
 
47
+ 新 Run(包括规划、Review 和消息续接)必须在派发前绑定明确冻结的 Snapshot。
48
+ Context 读取校验完整身份与内容 digest,然后直接读取已保存的值,不重新收集当前
49
+ Task 记录。聚合执行从该 Snapshot 读取已选择的 Producer 结果;可写 Project 来自
50
+ Run 捕获的生效授权。当前活动状态仍是独立观察,不属于冻结合同。
51
+ 展开引用必须同时指定 `store` 与 `refId`,即使 id 唯一也不能省略 store。
52
+
53
+ 新的 Task 执行需要首个 Snapshot。保留的 Run 缺失执行证据时,仍可供
54
+ Leader/Operator 查看、结算失败或显式废弃,无关工作继续推进。提交执行和读取
55
+ 确切冻结上下文在证据缺失、漂移时局部失败。显式普通重试根据当前授权事实创建
56
+ 新的 Run 和 Snapshot,不补造旧快照;Review/结果汇总的确切复用仍需冻结证据。
57
+ 后续原生输入或 steer 可以没有独立 Snapshot,因为它们不建立新的 Assignment。
58
+ 存储采用 1.0 基线;独立转换器保留这些记录,不把可选执行证据缺失扩大为
59
+ 整个 Home 的转换阻塞。
60
+
61
+ 运行异常按所属对象限制影响,不等同于整个 Controller 必须停摆。可选的资源回收
62
+ 和 continuation 元数据检查失败会报告诊断,不阻断正常调度;Provider 重试准入
63
+ 按 Session 隔离,continuation 观察按 Task 隔离。Job 和全局输入错误包含
64
+ Task/Job 或 Role 身份,并保留原始原因。已提交的观察仍然有效,失败的观察不代表
65
+ 输入已确认、进程已停止,也不授权再次发送或删除。对受影响对象使用既有的查看、
66
+ 停止/取消、废弃、确认和显式重试入口。存储结构损坏、权限失败及未知外部效果,
67
+ 仍在各自边界明确诊断,不用统一兜底值或伪造成功绕过。
68
+
40
69
  当前 Task 读取也会把无定向目标的 user/Operator 消息暴露给该 Task 当前的 Worker 和
41
70
  Reviewer Session,包括在它们 Run 快照冻结之后新增的需求。用 `task message list/show`
42
71
  或 Task Context inspect 来读取那些原始记录。这不改写冻结的 Assignment,也不授予投递
@@ -103,11 +132,9 @@ retry 把被拒绝批次及后续排队输入交回现有 mailbox,不把旧 wa
103
132
  错误通过既有 Operator 通道通知一次;Worker/Reviewer 仍通知 Leader。不启动新的
104
133
  恢复 Agent,也不为了记录错误制造 Run 或 Session。
105
134
 
106
- 存储 `35→36` 迁移保留历史错误原始 payload,并将当时未记录的启动配置标为不可用,
107
- 不会从当前 Role 猜测过去的模型、账户或 settings 选择。
108
-
109
- 存储 `36→37` 将该上下文收窄为原生元数据查询选项和请求的模型/effort。旧完整快照
110
- 留在迁移审计中,不由运行时双读。查看模型选项不再校验 Task 权限、Review 状态、
135
+ 错误上下文记录原生元数据查询选项和请求的模型/effort。未记录的配置保持不可用,
136
+ 不会从当前 Role 猜测过去的选择,也不会把不透明审计字节当作当前配置读取。
137
+ 查看模型选项不校验 Task 权限、Review 状态、
111
138
  工作区条目或当前 Session 引导协议。三类错误入口保留各自的原生身份检查与分类,
112
139
  错误创建、去重统一一个写入入口,上级通知统一使用事件路由边界。
113
140
 
@@ -239,6 +266,10 @@ yui task execution start <task>
239
266
  yui task execution stop <task> --force --reason <reason>
240
267
  ```
241
268
 
269
+ `task run retire` 的进度围栏只接受 `--expected-progress-at`,移除旧的
270
+ `--progress-at` 别名。退役活动 Run 仍要求精确进度、Agent/Adapter 及已绑定的
271
+ 原生 Session 身份,不放宽静止性检查或退役权限。
272
+
242
273
  Task execution start/stop 控制 Task 准入,而不是 Task 验收。stop 先围住新的 Yui 工作,
243
274
  然后中断每一条被拥有的确切原生输入,并在移除 attachment 之前确认其终态。这也覆盖没有
244
275
  Run 的普通 Leader 通知。未知的原生状态阻塞清理;仅停止一个代理绝不证明一个共享 Turn
@@ -56,6 +56,53 @@ Claude execution process dying closes its exact input and marks its Session
56
56
  failed, even while the supervising Host remains alive. A deliberately stopped
57
57
  Session with settled native input is idle rather than a false runtime failure.
58
58
 
59
+ ## Web attention and progress
60
+
61
+ Task detail prioritizes **needs your input**, **Session activity**, **Task progress**
62
+ and **key conclusions**. InputRequests retain their original answer controls and
63
+ bounded Context counts; a partial read is not an empty inbox. Technical attention
64
+ names the owner from the existing execution projection. An assigned owner does
65
+ not imply work started, and a diagnostic hint is not new user authorization.
66
+
67
+ Session observations include direct chat and notifications without an AgentRun.
68
+ The selected native identity is counted once; foreground activity must match its
69
+ exact current input. Earlier Turns and replaced Sessions cannot supply its
70
+ activity. Waiting, quiet, diagnostic-needed, unknown, stopped, ended and unsettled
71
+ background work remain distinct. An operation without a terminal is not an
72
+ everlasting heartbeat. Quiet/diagnostic windows come from the existing runtime
73
+ policy; the read time is not a new activity timestamp. This is a recorded selected
74
+ Session view, not a live process probe or an inventory of historical resources.
75
+ Controller-owned bounded Provider retry waits remain waiting, not stopped or
76
+ waiting for user approval. A successor's activity uses its own exact input.
77
+
78
+ Progress comes from the original Brief and completion record, with source time;
79
+ activity and tokens do not create a percentage, ETA or semantic checkpoint.
80
+ Current Decisions show their rationale/source; superseded ones remain in history.
81
+ Reports and recommendations are not relabelled as user approval. Core Context
82
+ remains readable when its independent observation fails.
83
+
84
+ **Results and evidence** reads files only on request. A selected commit-pinned
85
+ text survives refresh and newer file listings; switching versions is explicit.
86
+ A missing revision fails visibly, never substitutes HEAD. HTML/scripts stay
87
+ text, never an executing preview. Copying a source sends nothing; discussion
88
+ uses the original Message form, explicit intent and receipt. Unsent inputs remain
89
+ protected across automatic refresh.
90
+
91
+ Delivery reuses Publication coverage, including adoption, and keeps
92
+ reported/verified, missing/stale/head-unavailable distinct. On-demand evidence
93
+ shows original Integration checks, fixed Review candidates and original Reviewer
94
+ reports. Review completion is not semantic approval; skipped/missing checks are
95
+ not passes. Workspace ownership does not prove cleanup safety: the existing
96
+ read-only `task archive-preflight` is referenced, not automatically run. There
97
+ are no new accept, publish or archive buttons. Usage retains known/partial/unknown.
98
+
99
+ All routes use the local Web token and Task boundary.
100
+ `GET /api/tasks/<id>/artifacts` lists a fixed repository revision;
101
+ `?path=<relative-path>&commit=<full-commit>` reads its exact text file.
102
+ `GET /api/tasks/<id>/evidence` reads original check/Review/workspace records.
103
+ These reads do not start a runtime, fetch a remote, write business state, require
104
+ a migration, or introduce a new persistent protocol.
105
+
59
106
  ## Execution audit
60
107
 
61
108
  `execution audit` aggregates existing Task, Run, wake, Session, Review,
@@ -49,6 +49,43 @@ AgentRun,Role 状态也包含其原生准入/活动;当某个 WorkItem 处
49
49
  监督它的 Host 仍存活。一个已被有意停止、且原生输入已结算的 Session 是空闲状态,
50
50
  而不是虚假的运行时失败。
51
51
 
52
+ ## Web 用户关注与进展
53
+
54
+ Task 详情优先展示「需要你处理」「会话活动」「任务进展」「关键结论」。
55
+ InputRequest 保留原回答入口和有界 Context 计数;部分读取不等于空待办。
56
+ 技术关注从既有执行投影取得负责人;有负责人不代表已开始处理,诊断提示
57
+ 也不自动成为新的用户授权。
58
+
59
+ 会话观察包含没有 AgentRun 的直聊与通知。选用的原生身份只计一次,前台活动
60
+ 必须匹配当前精确输入;旧 Turn、旧 Session 的活动不能借给新输入。
61
+ 等待、安静、需诊断、未知、停止、该轮结束和后台未结清保持区分;
62
+ 没有终态的操作不是永久心跳。时间窗复用既有 runtime policy,读取时间不冒充
63
+ 活动时间。这是已记录选用会话的视图,不是实时进程探测或历史资源盘点。
64
+ Controller 已负责的有界 Provider 重试显示为等待,不误称停止或等待用户审批;
65
+ 后继输入的活动仍须匹配它自己的精确身份。
66
+
67
+ 进度来自原 Brief 和完成记录,标注来源时间;活动、token 不产生百分比、
68
+ ETA 或实质检查点。当前 Decision 展示理由与来源,已替代决定留在历史;
69
+ 报告与建议不改称用户批准。独立观察失败时,核心 Context 仍可读取。
70
+
71
+ 「成果与证据」仅按需读文件。固定提交的文本阅读在刷新和读取新列表后仍保留,
72
+ 切换版本必须显式选择;固定版本缺失就报错,不回退 HEAD。
73
+ HTML/脚本只作为文本,不执行预览。复制来源不发送内容,讨论仍走原 Message
74
+ 表单、显式意图及回执;自动刷新保留未提交输入。
75
+
76
+ 交付复用 Publication 覆盖及采用记录,区分 reported/verified 和
77
+ missing/stale/head-unavailable。按需证据展示原 Integration 检查、
78
+ 固定 Review 候选及原始 Reviewer 报告;Review completed 不等于语义通过,
79
+ skipped/缺失检查不算通过。工作区所有权不证明可清理;既有只读
80
+ `task archive-preflight` 仅作为操作指引,不自动运行。没有新增验收、发布、
81
+ 归档按钮,用量仍保留 known/partial/unknown。
82
+
83
+ 所有入口沿用本地 Web token 与 Task 边界。
84
+ `GET /api/tasks/<id>/artifacts` 列出固定仓库版本;
85
+ `?path=<relative-path>&commit=<full-commit>` 读取该版本文本;
86
+ `GET /api/tasks/<id>/evidence` 读取原检查/Review/工作区记录。
87
+ 读取不启动运行时、不访问远端、不写业务状态、不引入迁移或新持久协议。
88
+
52
89
  ## 执行审计
53
90
 
54
91
  `execution audit` 汇总既有的 Task、Run、wake、Session、Review、Integration、
@@ -7,6 +7,15 @@ the Project's configured remote and stable branch. Stable and development
7
7
  branches must match. The per-Project maintenance fence covers the operation;
8
8
  Task workspaces and their recorded bases are not refreshed by this command.
9
9
 
10
+ ## Project ownership
11
+
12
+ `yui project clone <name> <remote>` creates a Home-managed checkout by default.
13
+ Add `--external` to clone into `<configured defaultWorkspace>/<name>` and retain
14
+ external ownership. This is a supported public option in help and completion;
15
+ it does not remove the existing confirmation, branch verification or workspace
16
+ isolation boundaries. `project add` can bind an existing external checkout;
17
+ `project migrate` explicitly moves one into Home-managed storage.
18
+
10
19
  ## Two separate facts
11
20
 
12
21
  The checkout HEAD and a local remote-tracking ref are distinct observations.
@@ -6,6 +6,14 @@
6
6
  规范 checkout。stable 与 development branch 必须一致。操作全程持有 per-Project
7
7
  maintenance fence;不会刷新 Task 工作区或改写其记录的基线。
8
8
 
9
+ ## Project 所有权
10
+
11
+ `yui project clone <name> <remote>` 默认创建 Home 管理的 checkout。
12
+ 添加 `--external` 会克隆到 `<已配置的 defaultWorkspace>/<name>`,保留 external
13
+ 所有权。这是帮助和补全中公开支持的选项,不绕过现有确认、分支校验或工作区隔离
14
+ 边界。`project add` 可绑定已有 external checkout;`project migrate` 可明确将其
15
+ 迁入 Home 管理的存储。
16
+
9
17
  ## 两个独立事实
10
18
 
11
19
  checkout HEAD 与本地 remote-tracking ref 是不同的观察。refresh 将精确分支获取到
@@ -48,6 +48,41 @@ panel. `cancel` withdraws this recovery chain; `disable` also disables future
48
48
  chains on the current Provider binding. Neither interrupts an admitted Turn.
49
49
  `enable` does not replay historical failures. Existing Task/Role authority applies.
50
50
 
51
+ ## Failure evidence and Agent handoff
52
+
53
+ The retry projection includes the original input reference (never copied console
54
+ text), exact Session/attempt identities, the preserved error, the latest Turn
55
+ failure and earlier chain references. A changed error that still satisfies the
56
+ same safe retry rule continues within the original budget. Loss of that rule,
57
+ authority or budget stops automatic submission.
58
+
59
+ Task errors retain their original `runtime.agent-error` evidence and notify the
60
+ Leader, or the Operator when the affected Role is the Leader. Global failures
61
+ retain record-only Messages in their own Role inbox, including intermediate
62
+ failed attempts; these are evidence, not new input that cancels recovery.
63
+ When Global recovery stops or its effect is unknown, a deduplicated system
64
+ Message carries the facts to the existing Operator. If the Operator itself
65
+ failed, or no Operator is configured, the notice remains visible for the user
66
+ or successor without submitting a self-recovery prompt.
67
+
68
+ Malformed JSON frames and failing protocol listeners close the affected channel
69
+ with the original cause. Unrelated valid protocol notifications remain ignorable.
70
+ The existing Host Inbox carries the diagnostic to Task/Global consumers without
71
+ inventing a native terminal, clearing a writer fence or replaying input.
72
+
73
+ Endpoint cleanup preserves stop/close errors, the exact implementation and client
74
+ identities, last observed drain facts and pending effects. A failed inspection is
75
+ not an empty resource list. Later owned cleanup steps, including control-socket
76
+ closure, still run; cleanup failures retain their causes and produce a failing
77
+ Host exit rather than silent success. Timeout reports never claim quiescence.
78
+
79
+ The optional detached-child metadata reconciler retains its existing bounded
80
+ query, backoff and circuit pause. Unavailable observations preserve writer
81
+ ownership and expose their original error, exact targets and sampling count.
82
+ The first failure and circuit-limit crossing use existing deduplicated error
83
+ events; metadata sampling does not start model work or declare a parent result.
84
+ No new default metadata collector, retry worker or durable state schema is added.
85
+
51
86
  ## Supported boundary and adoption
52
87
 
53
88
  Current controlled Codex Hosts advertise exact recovery support. The native