@zq-silk/yui 0.15.12 → 0.16.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 (236) hide show
  1. package/ARCHITECTURE.md +3 -2
  2. package/ARCHITECTURE.zh-CN.md +3 -2
  3. package/dist/artifacts/artifactCommitLock.js +16 -55
  4. package/dist/artifacts/taskArtifactRepository.js +3 -3
  5. package/dist/cli/agentConfigurationPicker.js +1 -1
  6. package/dist/cli/commandCatalog.js +57 -41
  7. package/dist/cli/completion.js +18 -18
  8. package/dist/cli/completionWizard.js +1 -1
  9. package/dist/cli/dynamicCompletion.js +1 -1
  10. package/dist/cli/interactionPolicy.js +7 -3
  11. package/dist/cli/invocationAuthority.js +64 -0
  12. package/dist/cli/managedDiagnostics.js +1 -1
  13. package/dist/cli/parseRepeatable.js +35 -0
  14. package/dist/cli/updatePorts.js +26 -5
  15. package/dist/cli.js +1280 -1243
  16. package/dist/commands/agentCommands.js +4 -4
  17. package/dist/commands/capabilityCommands.js +1 -1
  18. package/dist/commands/configCommands.js +6 -57
  19. package/dist/commands/configOverview.js +2 -2
  20. package/dist/commands/durableJobCommands.js +12 -6
  21. package/dist/commands/globalRoleCommands.js +53 -29
  22. package/dist/commands/grantCommands.js +0 -3
  23. package/dist/commands/jobCommands.js +1 -4
  24. package/dist/commands/operatorCommands.js +3 -3
  25. package/dist/commands/projectCommands.js +1 -10
  26. package/dist/commands/resourcesCommands.js +10 -40
  27. package/dist/commands/roleConfiguration.js +2 -6
  28. package/dist/commands/taskActivationCommands.js +4 -8
  29. package/dist/commands/taskAgentCapabilities.js +9 -0
  30. package/dist/commands/taskCommandSupport.js +155 -0
  31. package/dist/commands/taskCommandTypes.js +1 -0
  32. package/dist/commands/taskCommands.js +271 -710
  33. package/dist/commands/taskCompletionGate.js +1 -1
  34. package/dist/commands/taskExecutionCommands.js +1 -1
  35. package/dist/commands/taskFactCommands.js +325 -0
  36. package/dist/commands/taskInputCommands.js +12 -42
  37. package/dist/commands/taskIntegrationCommands.js +17 -57
  38. package/dist/commands/taskNextActionCommand.js +7 -6
  39. package/dist/commands/taskPublicationAdoptCommand.js +3 -3
  40. package/dist/commands/taskPublicationCommands.js +1 -1
  41. package/dist/commands/taskPublicationVerifyCommand.js +1 -1
  42. package/dist/commands/taskRemoteDeliveryCommand.js +2 -94
  43. package/dist/commands/taskUpstreamCommands.js +19 -8
  44. package/dist/commands/workflowCommands.js +6 -1
  45. package/dist/completion/completionInstaller.js +26 -26
  46. package/dist/completion/completionState.js +26 -26
  47. package/dist/completion/fileCompletionManager.js +6 -11
  48. package/dist/config/configCatalog.js +0 -2
  49. package/dist/config/timeZone.js +14 -0
  50. package/dist/config/yuiConfig.js +0 -29
  51. package/dist/context/runContextPack.js +2 -3
  52. package/dist/context/taskCatalog.js +3 -5
  53. package/dist/context/taskContext.js +139 -151
  54. package/dist/context/wakeRunReferences.js +11 -0
  55. package/dist/controller/agentCapabilities.js +58 -0
  56. package/dist/controller/agentRuntimeObserver.js +6 -11
  57. package/dist/controller/clientRuntime.js +22 -14
  58. package/dist/controller/controller.js +9 -22
  59. package/dist/controller/fileSchedulerStoreAdapter.js +117 -212
  60. package/dist/controller/jobClient.js +4 -4
  61. package/dist/controller/jobControl.js +60 -25
  62. package/dist/controller/jobSupervisor.js +4 -4
  63. package/dist/controller/providerRetryDelivery.js +7 -7
  64. package/dist/controller/runtime.js +51 -44
  65. package/dist/controller/runtimeEventProcessor.js +0 -5
  66. package/dist/controller/sessionOwnerReconciliation.js +5 -0
  67. package/dist/controller/taskAgentError.js +35 -0
  68. package/dist/coordination/workMailboxQueue.js +2 -24
  69. package/dist/core/controllerClient.js +2 -2
  70. package/dist/core/fileLockOwner.js +74 -0
  71. package/dist/decision/decision.js +17 -0
  72. package/dist/doctor/doctor.js +18 -9
  73. package/dist/event/taskEvent.js +12 -0
  74. package/dist/execution/workItemExecutionProjection.js +2 -2
  75. package/dist/executor/agentCapabilityConfig.js +43 -0
  76. package/dist/executor/agentConfigurationCatalog.js +49 -11
  77. package/dist/executor/agentExecutor.js +5 -8
  78. package/dist/executor/fileRoleLaunchPlanner.js +11 -53
  79. package/dist/executor/taskAgentCapabilities.js +64 -0
  80. package/dist/integration/deliveryObligation.js +1 -69
  81. package/dist/integration/gitIntegrationService.js +60 -84
  82. package/dist/integration/integrationAttempt.js +3 -14
  83. package/dist/integration/integrationSourceApplication.js +4 -12
  84. package/dist/integration/manifestTags.js +2 -2
  85. package/dist/job/durableJob.js +4 -25
  86. package/dist/job/jobAssignmentScope.js +22 -0
  87. package/dist/job/jobOperation.js +16 -0
  88. package/dist/job/jobRunner.js +2 -1
  89. package/dist/job/stepDirectory.js +15 -0
  90. package/dist/kernel/builtinCapabilities.js +15 -11
  91. package/dist/kernel/kernelPorts.js +1 -17
  92. package/dist/lifecycle/exactRunTerminalization.js +1 -9
  93. package/dist/message/inputControlResolution.js +3 -4
  94. package/dist/message/message.js +17 -20
  95. package/dist/message/messageContinuation.js +1 -1
  96. package/dist/milestone/milestone.js +11 -0
  97. package/dist/observability/orchestrationMetrics.js +24 -1
  98. package/dist/observability/runtimeIdentity.js +1 -17
  99. package/dist/output/agentConfigurationPresentation.js +2 -0
  100. package/dist/output/timePresentation.js +1 -14
  101. package/dist/plugins/pluginService.js +12 -4
  102. package/dist/release/releaseWorkflowPorts.js +45 -96
  103. package/dist/release/runtimeRelease.js +9 -15
  104. package/dist/repository/projectMaintenanceLock.js +23 -64
  105. package/dist/repository/taskBaseFreshness.js +1 -1
  106. package/dist/repository/taskWorkspaceCoordinator.js +13 -22
  107. package/dist/repository/taskWorkspacePreparer.js +29 -25
  108. package/dist/repository/workspaceCleanupInspection.js +5 -5
  109. package/dist/resources/autoResourceGc.js +4 -77
  110. package/dist/resources/liveReferences.js +7 -54
  111. package/dist/resources/resourceDiscovery.js +5 -118
  112. package/dist/resources/resourceGc.js +233 -181
  113. package/dist/resources/resourceRegistrar.js +5 -4
  114. package/dist/resources/resourceRegistry.js +3 -37
  115. package/dist/resources/resourceRegistryStore.js +13 -36
  116. package/dist/resources/sqliteResourceRegistry.js +43 -26
  117. package/dist/review/deltaRecheck.js +1 -1
  118. package/dist/review/reviewAcceptance.js +1 -1
  119. package/dist/review/reviewDecision.js +1 -1
  120. package/dist/review/reviewRound.js +8 -7
  121. package/dist/review/taskFinalReviewContractResolution.js +1 -1
  122. package/dist/runtime/acpProtocol.js +4 -51
  123. package/dist/runtime/acpSession.js +10 -75
  124. package/dist/runtime/acpSessionConfiguration.js +1 -8
  125. package/dist/runtime/agentEndpoint.js +3 -2
  126. package/dist/runtime/agentFailureContext.js +43 -0
  127. package/dist/runtime/agentHost.js +15 -15
  128. package/dist/runtime/codexInteractiveHost.js +2 -2
  129. package/dist/runtime/index.js +0 -1
  130. package/dist/runtime/managedCaller.js +21 -1
  131. package/dist/runtime/providerErrors.js +38 -0
  132. package/dist/runtime/runtimeObservation.js +0 -5
  133. package/dist/runtime/runtimeSessionCandidate.js +2 -3
  134. package/dist/runtime/sessionOwnerIdentity.js +1 -1
  135. package/dist/runtime/structuredProviderHost.js +4 -41
  136. package/dist/runtime/tmuxAdapters.js +6 -8
  137. package/dist/scheduler/activeRoleRunDelivery.js +7 -7
  138. package/dist/scheduler/leaderWakeupProcessor.js +19 -6
  139. package/dist/scheduler/operatorEvent.js +12 -20
  140. package/dist/scheduler/operatorInputNotificationProcessor.js +1 -1
  141. package/dist/scheduler/ports.js +5 -8
  142. package/dist/scheduler/roleRunLiveness.js +4 -4
  143. package/dist/scheduler/roleRunStall.js +16 -23
  144. package/dist/scheduler/taskExecutionProjection.js +25 -33
  145. package/dist/scheduler/taskObservabilityProjection.js +0 -1
  146. package/dist/scheduler/taskWake.js +5 -10
  147. package/dist/scheduler/wakeReason.js +2 -0
  148. package/dist/scheduler/wakeupQueue.js +2 -4
  149. package/dist/setup/setupCommand.js +1 -1
  150. package/dist/storage/contextRecords.js +106 -0
  151. package/dist/storage/currentTaskStore.js +1 -1
  152. package/dist/storage/homeLayout.js +13 -17
  153. package/dist/storage/migrations/agentFailureContext.js +22 -0
  154. package/dist/storage/migrations/currentInputContract.js +86 -0
  155. package/dist/storage/migrations/currentRuntimeContract.js +228 -0
  156. package/dist/storage/migrations/historicalVerificationPlan.js +35 -0
  157. package/dist/storage/migrations/integrationContinuation.js +5 -4
  158. package/dist/storage/migrations/narrowAgentFailureContext.js +65 -0
  159. package/dist/storage/migrations/notificationOnlyWakes.js +74 -0
  160. package/dist/storage/migrations/verificationPlanV1.js +162 -0
  161. package/dist/storage/migrations/verificationPolicy.js +74 -0
  162. package/dist/storage/migrations/workItemHistory.js +46 -0
  163. package/dist/storage/persistenceWorker.js +12 -4
  164. package/dist/storage/recordValidation.js +87 -0
  165. package/dist/storage/sqliteSchema.js +142 -1
  166. package/dist/storage/sqliteStore.js +156 -162
  167. package/dist/storage/storageSchema.js +2 -14
  168. package/dist/storage/storageVersions.js +1 -1
  169. package/dist/storage/storeRpc.js +15 -7
  170. package/dist/storage/taskStore.js +3 -7
  171. package/dist/storage/upgrade/upgradeOrchestrator.js +25 -37
  172. package/dist/task/completionReadiness.js +5 -24
  173. package/dist/task/draftPlan.js +0 -53
  174. package/dist/task/nextAction.js +7 -13
  175. package/dist/task/remoteDeliveryService.js +89 -0
  176. package/dist/task/taskActivation.js +2 -25
  177. package/dist/task/taskActivationService.js +0 -2
  178. package/dist/task/taskRecordReference.js +0 -1
  179. package/dist/task/taskSubmission.js +3 -14
  180. package/dist/telemetry/sqliteTelemetryBatch.js +29 -0
  181. package/dist/telemetry/sqliteTelemetryStore.js +49 -49
  182. package/dist/telemetry/telemetryWiring.js +4 -3
  183. package/dist/tmux/tmuxManager.js +29 -20
  184. package/dist/verification/gateArtifact.js +15 -24
  185. package/dist/verification/gateArtifactStore.js +14 -7
  186. package/dist/verification/verificationGateService.js +29 -88
  187. package/dist/verification/verificationPlan.js +27 -72
  188. package/dist/web/assets/client/app.js +1 -1
  189. package/dist/web/assets/client/taskSurface.js +4 -4
  190. package/dist/web/webServer.js +4 -6
  191. package/dist/web/webSnapshot.js +3 -83
  192. package/dist/web/webTaskSurface.js +17 -46
  193. package/dist/workItem/workItem.js +1 -12
  194. package/docs/architecture/capabilities-and-resources.md +14 -2
  195. package/docs/architecture/capabilities-and-resources.zh-CN.md +11 -1
  196. package/docs/managed-turn-and-session-runtime.md +83 -10
  197. package/docs/managed-turn-and-session-runtime.zh-CN.md +65 -11
  198. package/docs/plugin-sdk.md +4 -2
  199. package/docs/provider-runtime.md +3 -1
  200. package/docs/provider-runtime.zh-CN.md +4 -2
  201. package/docs/release-workflow.md +190 -7
  202. package/docs/release-workflow.zh-CN.md +139 -5
  203. package/docs/roles-and-configuration.md +29 -0
  204. package/docs/roles-and-configuration.zh-CN.md +21 -0
  205. package/docs/sqlite-control-plane-design.md +16 -3
  206. package/docs/sqlite-control-plane-design.zh-CN.md +13 -2
  207. package/docs/task-dag-semantics.md +3 -3
  208. package/docs/task-dag-semantics.zh-CN.md +2 -2
  209. package/docs/task-delivery.md +91 -5
  210. package/docs/task-delivery.zh-CN.md +72 -4
  211. package/docs/task-discovery.md +10 -11
  212. package/docs/task-discovery.zh-CN.md +8 -9
  213. package/docs/testing/verification-levels.md +145 -9
  214. package/docs/testing/verification-levels.zh-CN.md +103 -8
  215. package/package.json +1 -1
  216. package/skills/yui-leader/SKILL.md +5 -0
  217. package/skills/yui-leader/references/integration.md +9 -5
  218. package/skills/yui-leader/references/planning.md +9 -3
  219. package/skills/yui-operator/SKILL.md +15 -10
  220. package/skills/yui-runtime/SKILL.md +6 -6
  221. package/skills/yui-runtime/references/recovery.md +47 -0
  222. package/dist/agent/agentRegistry.js +0 -10
  223. package/dist/agentRun/runIdentity.js +0 -22
  224. package/dist/commands/deliveryGuardPreflight.js +0 -30
  225. package/dist/commands/taskIntegrationQueueCommands.js +0 -226
  226. package/dist/commands/taskOverviewCommand.js +0 -377
  227. package/dist/completion/completionWizard.js +0 -125
  228. package/dist/context/dispatchContext.js +0 -110
  229. package/dist/context/wakeNotification.js +0 -144
  230. package/dist/integration/integrationCheckEvidenceReuse.js +0 -53
  231. package/dist/integration/integrationQueueEntry.js +0 -191
  232. package/dist/integration/integrationQueueService.js +0 -810
  233. package/dist/release/fakeReleasePorts.js +0 -55
  234. package/dist/runtime/sessionOwnerRegistry.js +0 -137
  235. package/dist/task/deliveryGuard.js +0 -226
  236. /package/dist/{commands/taskActor.js → task/taskAuthority.js} +0 -0
@@ -319,8 +319,7 @@ export function validateWorkItem(workItem) {
319
319
  "updatedAt",
320
320
  "endedAt",
321
321
  "acceptedCandidateId",
322
- "currentCandidateId",
323
- "historicalState"
322
+ "currentCandidateId"
324
323
  ], "WorkItem");
325
324
  if (workItem.schemaVersion !== 15)
326
325
  throw new Error("WorkItem must use schemaVersion 15.");
@@ -397,16 +396,6 @@ export function validateWorkItem(workItem) {
397
396
  if (workItem.currentCandidateId !== undefined
398
397
  && !candidateIds.has(workItem.currentCandidateId))
399
398
  throw new Error("Current Candidate is missing.");
400
- if (workItem.historicalState !== undefined) {
401
- const historical = workItem.historicalState;
402
- if (!["pending", "running", "awaiting_acceptance", "completed", "failed", "retired"].includes(historical.status)) {
403
- throw new Error("Historical Work Item status is invalid.");
404
- }
405
- if (historical.outcome !== undefined)
406
- requireText(historical.outcome, "Historical outcome");
407
- if (historical.endedAt !== undefined)
408
- requireTimestamp(historical.endedAt, "Historical endedAt");
409
- }
410
399
  if (workItem.outcome !== undefined)
411
400
  requireText(workItem.outcome, "Work item outcome");
412
401
  requireTimestamp(workItem.createdAt, "Work Item createdAt");
@@ -105,6 +105,18 @@ failure contract.
105
105
 
106
106
  ## CLI and Web
107
107
 
108
+ Ordinary Global CLI operations require the Role's current native Session;
109
+ an old Manifest is a context pointer, not continuing write authority. Historical
110
+ self-context reads and the explicit offline diagnostic/recovery routes remain
111
+ available. Home configuration and resource-GC mutations belong to the user or
112
+ current Operator, never a Task Worker. Configuration reads remain available.
113
+
114
+ Managed Task commands cannot name a different Task. Independent Brief,
115
+ Decision, Milestone, Event and Job reads share Context's readable references;
116
+ an Assignment does not gain a wider view by selecting another query command.
117
+ Job read RPCs carry an explicit caller, and the Controller enforces the scope.
118
+ Current WorkItem Jobs remain visible to their assigned Worker.
119
+
108
120
  A Surface contribution is derived from the Registry's currently authorized
109
121
  catalog; there is no second catalog or Host. A CLI contribution uses the
110
122
  capability's original name. A Web panel accepts only controlled text, an HTTP(S)
@@ -125,8 +137,8 @@ a way for an Agent or plugin to bypass those boundaries.
125
137
  Read-only dashboard, Context and query-panel projections remain separate from
126
138
  these mutations. A query panel cannot borrow the browser's user authority to
127
139
  mutate state or manage plugins. Task controls share the public CLI's domain
128
- commands; Global Role controls share the Global handler but currently lack a
129
- registered top-level CLI path. Message submission intent
140
+ commands; Global Role controls share the Global handler with
141
+ `yui role message queue/steer` and `yui role interrupt`. Message submission intent
130
142
  (`record / discuss / develop`, default `discuss`) is
131
143
  separate from [input timing](../managed-turn-and-session-runtime.md#input-timing-queue-steer-and-interrupt).
132
144
  Transport acceptance does not establish implementation or Task acceptance.
@@ -74,6 +74,16 @@ actual 可以为空,必须显式激活。原 Task 可以发现并调用新能
74
74
 
75
75
  ## CLI 与 Web
76
76
 
77
+ 普通 Global CLI 操作要求 Role 当前的原生 Session;旧 Manifest 只是 Context
78
+ 指针,不是持续写权限。历史 Session 的自身 Context 读取,以及明确的离线诊断、
79
+ 恢复入口仍可使用。Home 配置与资源 GC 修改属于用户或当前 Operator,不能由
80
+ Task Worker 执行;配置读取保持可用。
81
+
82
+ 受管 Task 命令不能指定其他 Task。独立的 Brief、Decision、Milestone、Event
83
+ 和 Job 查询复用 Context 的可读引用,不能通过换查询入口扩大 Assignment
84
+ 视图。Job 读取 RPC 必须携带调用者,由 Controller 执行范围检查;
85
+ Worker 仍可读取其当前 WorkItem 的 Job。
86
+
77
87
  Surface contribution 由 Registry 当前获授权目录派生,没有第二份目录或 Host。
78
88
  CLI contribution 使用能力原名称。Web panel 只接受受控 text、HTTP(S) link 或
79
89
  JSON query 描述,不接受作者脚本或任意 HTML。
@@ -90,7 +100,7 @@ Role 显式 `queue / steer / interrupt`。受管 Agent 的能力 RPC 仍使用
90
100
 
91
101
  只读 dashboard、Context 和查询面板投影与这些修改分开。查询面板不能借浏览器的
92
102
  用户权限修改状态或管理插件。Task 控制复用公开 CLI 领域命令;Global Role 控制复用
93
- Global 处理器,但目前缺少已注册的顶层 CLI 路径。消息提交意图
103
+ Global 处理器,与 `yui role message queue/steer` 和 `yui role interrupt` 共用入口。消息提交意图
94
104
  (`record / discuss / develop`,默认 `discuss`)与
95
105
  [输入时机](../managed-turn-and-session-runtime.zh-CN.md#输入时机queuesteer-与-interrupt)
96
106
  分开。传输接受不证明需求已实施或 Task 已验收。
@@ -98,6 +98,42 @@ candidates retain visible nondelivery reasons. Explicit handoff only targets an
98
98
  already-dispatched successor for the same work. Replicated Producer/synthesis
99
99
  lineage is not silently rewritten by a message.
100
100
 
101
+ Rejected Leader notifications retain their original input and failure diagnosis.
102
+ Deterministic startup failures do not automatically retry; only typed runtime
103
+ contention remains deferred. New messages and a Controller restart do not replay
104
+ the rejected claim. After correcting the cause, explicitly retry its exact wake:
105
+
106
+ ```sh
107
+ yui task wake show <task> <wake>
108
+ yui task wake retry <task> <wake> --reason "<what was corrected>"
109
+ ```
110
+
111
+ Retry returns the rejected batch and later queued input to the existing mailbox;
112
+ it does not rewrite the old wake as accepted or replace a Session. Current runtime
113
+ authority and readiness checks still apply. Model/effort validation rejections show the
114
+ native model options and a command to inspect the full current catalog.
115
+
116
+ Pre-Run launch failures and native Provider rejections both retain a
117
+ `runtime.agent-error` fact. Notification delivery references that original error
118
+ instead of creating a second copy of the cause. `task event show` supplies the
119
+ scoped capability-query pointer in both human and JSON output; `wake show`
120
+ links the same fact. An unavailable Leader notifies the existing Operator
121
+ channel once; Worker/Reviewer failures use the existing Leader channel. No new
122
+ recovery Agent is started, and there need not be a Run or Session to record the
123
+ failure.
124
+
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,
132
+ Review state, workspace entries or the current Session bootstrap protocol.
133
+ The three failure ingresses retain their native fencing/classification, while
134
+ record creation and deduplication share one writer and supervisor notices use
135
+ the existing event-routing boundary.
136
+
101
137
  Unknown Leader notifications preserve their wake and input window:
102
138
 
103
139
  ```sh
@@ -109,11 +145,41 @@ Resolve releases the claim after native-effect fences are clear. It neither
109
145
  replays the notification nor invents acceptance or completion. Independent
110
146
  Role work and legal local facts are not a Task-wide recovery lock.
111
147
 
148
+ Wake status records notification delivery, not Message implementation. For
149
+ ordinary Leader notifications, `consumed` means native acceptance. Native Turn
150
+ completion and Task delivery need their own runtime evidence and durable results.
151
+ A rejected wake stays `dispatched` with its claim until explicit retry or Session
152
+ replacement; an explicitly released historical wake can remain `dispatched`
153
+ without a claim. Unknown acceptance cannot use `wake retry`.
154
+ Session replacement preserves queued input for a new wake and current Context;
155
+ it does not retroactively mark an old wake accepted. Late receipts cannot settle
156
+ the successor's batch. While Session cleanup is pending, new input remains queued.
157
+ Inspect the wake, `notification.delivery` events, current mailbox and Session
158
+ together; do not require one final response per historical wake.
159
+
160
+ Current wakes are notification-only. Run completion cannot consume a wake, and
161
+ the first notification window starts at Task creation. Retired Run-linked wake
162
+ records remain in Task events with their original ID and payload, not as a
163
+ second active wake format.
164
+
112
165
  ## Input timing: queue, steer and interrupt
113
166
 
114
167
  Submission intent (`record / discuss / develop`) decides how a requirement is
115
168
  routed. Input timing decides when an already-authorized input reaches a Role;
116
169
  it does not activate a Task, expand an Assignment or upgrade planning authority.
170
+ Save-only input uses `message send --intent record`; `--wake-policy` is removed.
171
+ Unkeyed Draft Message edits preserve submission intent. `record` and `develop`
172
+ edits never start planning or create/retry activation; `discuss` edits use the
173
+ same activation/planning routing as a discussion submission. A pending or failed
174
+ activation therefore keeps the edited discussion waiting.
175
+
176
+ A Message with a submission key, queue/steer request, or interrupt-then handoff
177
+ has immutable content: submit a new Message with a new request ID to change it.
178
+ This preserves the original retry comparison and receipt without adding a
179
+ second stored representation of input. Updating to the identical body is a
180
+ no-op, with no event, queue change or Controller notification. Current stored
181
+ user/operator Messages always have an intent; changing that intent also requires
182
+ a new explicit submission.
117
183
  The [authenticated Web controls](architecture/capabilities-and-resources.md#cli-and-web)
118
184
  use the same three operations as the CLI.
119
185
 
@@ -127,13 +193,16 @@ Inspect the Session before selecting a live target:
127
193
 
128
194
  ```sh
129
195
  yui task role session inspect <task> <role>
130
- yui task message queue <task> "<continuation>" --request-id <id> --to leader
196
+ yui task message queue <task> "<continuation>" --request-id <id>
131
197
  yui task message steer <task> "<correction>" --request-id <id> --to leader --expected-target <turn>
132
198
  yui task role interrupt <task> <role> --expected-target <turn> --request-id <id> [--then-message <task/message>]
133
199
  ```
134
200
 
135
- Worker/Reviewer messages retain their existing `--work-item` or `--review-round`
136
- association. Reusing a request ID with different content or a different target
201
+ Ordinary Leader `queue` input omits `--to`. An explicit `--to <role>` (including
202
+ `leader`) addresses an existing Assignment and requires `--work-item` or
203
+ `--review-round`; a Message cannot establish that Assignment. `steer` still
204
+ requires an explicit Role and exact live target.
205
+ Reusing a request ID with different content or a different target
137
206
  is a conflict. `steer` and `interrupt` never silently retarget, replace a Session,
138
207
  kill a process or fall back to another action. No live managed Turn yields
139
208
  `NO_ACTIVE_TURN`; stale targets and unsupported control remain explicit outcomes.
@@ -147,12 +216,12 @@ uncertainty cannot.
147
216
 
148
217
  Global Roles use the same three actions with their own owner and Session,
149
218
  without inventing a Task or Run. The local-user Web surface exposes them through
150
- the shared Global Role handler. There is a current CLI availability gap:
151
- `src/cli.ts` implements `yui role message queue|steer` and `yui role interrupt`,
152
- but `src/cli/commandCatalog.ts` does not register the top-level `role` command,
153
- so public CLI routing rejects these paths as unknown. They are not usable CLI
154
- examples; report this gap rather than fabricating a Task/Run or borrowing the
155
- browser's user authority. New controlled Global Sessions use the Host console.
219
+ the shared Global Role handler. The public CLI exposes
220
+ `yui role message queue|steer <role> <text>` and `yui role interrupt <role>`.
221
+ Queue/steer require `--request-id`; steer/interrupt require `--expected-target`.
222
+ These commands retain the caller's existing Session authority; do not fabricate
223
+ a Task/Run or borrow the browser's user authority. Configuration remains under
224
+ `config role`, lifecycle under `session`. New controlled Global Sessions use the Host console.
156
225
  A live unmanaged Session is not silently adopted; an explicit Session lifecycle
157
226
  action is needed first.
158
227
 
@@ -188,7 +257,7 @@ preserve execution history; external edits notify the Leader, while its own
188
257
  planning edits do not create a self-wake.
189
258
 
190
259
  New Draft Roles use a Task-specific planning directory under
191
- `<YUI_HOME>.task-runtimes/planning`, outside the control Home and delivery trees.
260
+ `<YUI_HOME>/runtime/task-runtimes/planning`, separate from durable control data and delivery trees.
192
261
  A planning Run can use `task activation request` to persist intent and return an
193
262
  `afterPlanningRun` reference immediately. Its terminal releases the request for
194
263
  Controller admission; cancelled intent is not resurrected.
@@ -201,6 +270,10 @@ the Projects still receive managed worktrees. `scratch` selects a Task-owned
201
270
  directory. `local` requires a registered local Resource and its grant; a Project
202
271
  ID is not a local Resource ID.
203
272
 
273
+ `task activate` is foreground adoption of an existing request, not an alternative
274
+ way to create activation intent. A request-free Draft is rejected before resource
275
+ preparation; the command does not invent an environment plan or request ID.
276
+
204
277
  Resource preparation precedes the atomic adoption of Task status and workspace
205
278
  ownership. A failed adoption records a failed request and notifies the Leader
206
279
  with durable facts; it does not repeatedly prepare resources on unchanged
@@ -84,6 +84,33 @@ owner Run。当 Role 忙碌时,保存会返回而不打断它。一旦它可
84
84
  显式 handoff 只针对同一工作已派发的后继。复制的 Producer/综合血缘不会被一条消息
85
85
  静默改写。
86
86
 
87
+ 被拒绝的 Leader 通知保留原始输入和失败原因。确定性的启动错误不再自动重试,
88
+ 只有明确的运行时资源争用可以延后再试。新消息和 Controller 重启不会重放被拒绝
89
+ 的认领。修正原因后,显式重试对应的 wake:
90
+
91
+ ```sh
92
+ yui task wake show <task> <wake>
93
+ yui task wake retry <task> <wake> --reason "<已修正的原因>"
94
+ ```
95
+
96
+ retry 把被拒绝批次及后续排队输入交回现有 mailbox,不把旧 wake 改成已接受,
97
+ 也不替换 Session;当前运行权限和就绪检查仍然生效。模型/effort 校验拒绝会显示原生
98
+ 报告的模型选项,并提供查询完整当前目录的命令。
99
+
100
+ 没有 Run 的启动失败与原生 Provider 拒绝都保留规范的 `runtime.agent-error` 事实。
101
+ 通知投递引用该原始错误,而不复制第二份原因。`task event show` 的人类和 JSON 输出
102
+ 都提供有作用域的能力查询入口,`wake show` 也链接同一事实。无法接收的 Leader 将
103
+ 错误通过既有 Operator 通道通知一次;Worker/Reviewer 仍通知 Leader。不启动新的
104
+ 恢复 Agent,也不为了记录错误制造 Run 或 Session。
105
+
106
+ 存储 `35→36` 迁移保留历史错误原始 payload,并将当时未记录的启动配置标为不可用,
107
+ 不会从当前 Role 猜测过去的模型、账户或 settings 选择。
108
+
109
+ 存储 `36→37` 将该上下文收窄为原生元数据查询选项和请求的模型/effort。旧完整快照
110
+ 留在迁移审计中,不由运行时双读。查看模型选项不再校验 Task 权限、Review 状态、
111
+ 工作区条目或当前 Session 引导协议。三类错误入口保留各自的原生身份检查与分类,
112
+ 错误创建、去重统一一个写入入口,上级通知统一使用事件路由边界。
113
+
87
114
  未知的 Leader 通知保留其唤醒和输入窗口:
88
115
 
89
116
  ```sh
@@ -94,11 +121,33 @@ yui task wake resolve <task> <wake> --reason <quiescence-evidence>
94
121
  resolve 在原生效果围栏清除后释放该认领。它既不重放通知,也不编造接受或完成。独立的
95
122
  Role 工作和合法的本地事实不是一把 Task 范围的恢复锁。
96
123
 
124
+ wake 状态记录通知投递,不记录 Message 的实施结果。普通 Leader 通知的 `consumed`
125
+ 表示原生接受;原生 Turn 完成与 Task 交付应分别依据运行证据和持久结果判断。
126
+ 被拒绝的 wake 保持 `dispatched` 并保留 claim,直到显式重试或 Session 替换;
127
+ 已显式释放的历史 wake 可以保持 `dispatched` 而不占用 claim。
128
+ 接受状态未知的通知不能用 `wake retry` 重放。Session 替换把待投递输入
129
+ 保留给新 wake 与当前 Context,不会追溯把旧 wake 标成已接受;旧回执也不能结算
130
+ 新批次。Session 清理期间,新输入保持排队。检查时应结合 wake、
131
+ `notification.delivery` 事件、当前 mailbox 与 Session,不应要求每个历史 wake
132
+ 都对应一条最终回复。
133
+
134
+ 现行 wake 只表示通知,Run 完成不能消费 wake;首次通知窗口从 Task 创建时间开始。
135
+ 退役的 Run-linked wake 通过 Task 事件保留原 ID 和完整原文,不作为第二种活动 wake 格式。
136
+
97
137
  ## 输入时机:queue、steer 与 interrupt
98
138
 
99
139
  提交意图(`record / discuss / develop`)决定需求如何路由。输入时机决定一条已经
100
140
  获授权的输入何时到达 Role;它不激活 Task、不扩大 Assignment,也不提升 planning
101
- 权限。[经认证的 Web 控制](architecture/capabilities-and-resources.zh-CN.md#cli-与-web)
141
+ 权限。仅保存输入使用 `message send --intent record`,`--wake-policy` 已移除。
142
+ 未绑定请求身份的 Draft Message 仍可编辑,保留原提交意图。编辑 `record` 或
143
+ `develop` 不会启动规划、创建或重试激活;编辑 `discuss` 复用讨论提交的激活/规划
144
+ 路由,因此已有 pending 或 failed 激活时,编辑后的讨论仍等待激活处理。
145
+
146
+ 带 submission key、queue/steer 请求或 interrupt-then 交接的 Message 正文不可变;
147
+ 需要改内容时,应使用新的 request ID 提交新消息。这保留原请求的判重依据和回执,
148
+ 不新增第二套输入存储。更新为相同正文是无操作:不写事件、不改队列、不通知
149
+ Controller。现行 user/operator 消息必须存有意图;改变意图同样需要显式提交新输入。
150
+ [经认证的 Web 控制](architecture/capabilities-and-resources.zh-CN.md#cli-与-web)
102
151
  与 CLI 使用同样的三种操作。
103
152
 
104
153
  | 动作 | 效果 | 不证明什么 |
@@ -111,13 +160,15 @@ Role 工作和合法的本地事实不是一把 Task 范围的恢复锁。
111
160
 
112
161
  ```sh
113
162
  yui task role session inspect <task> <role>
114
- yui task message queue <task> "<continuation>" --request-id <id> --to leader
163
+ yui task message queue <task> "<continuation>" --request-id <id>
115
164
  yui task message steer <task> "<correction>" --request-id <id> --to leader --expected-target <turn>
116
165
  yui task role interrupt <task> <role> --expected-target <turn> --request-id <id> [--then-message <task/message>]
117
166
  ```
118
167
 
119
- Worker/Reviewer 消息保留既有的 `--work-item` 或 `--review-round` 关联。同一个
120
- request ID 若换正文或目标会产生冲突。`steer` 与 `interrupt` 不会静默改目标、
168
+ 普通 Leader `queue` 输入省略 `--to`。显式 `--to <role>`(包括 `leader`)指向既有
169
+ Assignment,必须带 `--work-item` 或 `--review-round`;Message 不能创建 Assignment。
170
+ `steer` 仍需要显式 Role 与精确实时目标。同一个 request ID 若换正文或目标会产生冲突。
171
+ `steer` 与 `interrupt` 不会静默改目标、
121
172
  替换 Session、杀进程或回退到另一动作。没有活动受管 Turn 时返回 `NO_ACTIVE_TURN`;
122
173
  陈旧目标与不受支持的控制也保持为显式结果。
123
174
 
@@ -127,11 +178,11 @@ request ID 若换正文或目标会产生冲突。`steer` 与 `interrupt` 不会
127
178
  可以显式选择新的控制;不确定性不允许重放。
128
179
 
129
180
  Global Role 使用同样的三种动作和自己的 owner、Session,不虚构 Task 或 Run。
130
- 本地用户 Web Surface 通过共享 Global Role 处理器暴露这些动作。目前 CLI 存在可用性
131
- 缺口:`src/cli.ts` 实现了 `yui role message queue|steer` 和 `yui role interrupt`,
132
- 但 `src/cli/commandCatalog.ts` 没有注册顶层 `role`,因此公开 CLI 路由会拒绝这些路径,
133
- 报告 unknown command。它们不是可用的 CLI 示例;应报告该缺口,不虚构 Task/Run 或
134
- 借用浏览器用户权限。新的受控 Global Session 使用 Host console。活动的非受管 Session
181
+ 本地用户 Web Surface 通过共享 Global Role 处理器暴露这些动作。公开 CLI 提供
182
+ `yui role message queue|steer <role> <text>` 和 `yui role interrupt <role>`。
183
+ queue/steer 要求 `--request-id`,steer/interrupt 要求 `--expected-target`。
184
+ 这些命令保留调用者现有 Session 权限,不虚构 Task/Run 或借用浏览器用户权限。
185
+ 配置仍使用 `config role`,生命周期使用 `session`。新的受控 Global Session 使用 Host console。活动的非受管 Session
135
186
  不会被静默采用,需要先执行显式的 Session 生命周期操作。
136
187
 
137
188
  ## 精确结果
@@ -158,8 +209,8 @@ Candidate 和 ReviewRound 保留来源;Core 不从散文中推导语义接受
158
209
  仍是通知。Operator 提交和直接的 Task 消息都能到达那个 Session。Draft 计划/WorkItem
159
210
  编辑保留执行历史;外部编辑通知 Leader,而它自己的规划编辑不创建自唤醒。
160
211
 
161
- 新的 Draft Role 使用位于 `<YUI_HOME>.task-runtimes/planning` 下、专属于该 Task 的规划
162
- 目录,在控制 Home 和交付树之外。一个 planning Run 可以用 `task activation request`
212
+ 新的 Draft Role 使用位于 `<YUI_HOME>/runtime/task-runtimes/planning` 下、专属于该 Task 的规划
213
+ 目录,与持久控制数据和交付树分开。一个 planning Run 可以用 `task activation request`
163
214
  持久化意图并立即返回一个 `afterPlanningRun` 引用。它的终态把该请求释放给 Controller
164
215
  准入;被取消的意图不会复活。Leader 也可以在普通讨论中请求激活而无需 AgentRun:一旦
165
216
  原生输入结算,Controller 就采用其持久意图。不需要合成 Run 或额外的用户“continue”。
@@ -168,6 +219,9 @@ Candidate 和 ReviewRound 保留来源;Core 不从散文中推导语义接受
168
219
  获得受管 worktree。`scratch` 选择一个 Task 拥有的目录。`local` 需要一个已登记的 local
169
220
  Resource 及其 grant;Project ID 不是 local Resource ID。
170
221
 
222
+ `task activate` 是对已有请求的前台采用,不是创建激活意图的另一条路径。
223
+ 没有请求的 Draft 会在资源准备前被拒绝;命令不代填环境计划或 request ID。
224
+
171
225
  资源准备先于对 Task 状态和工作区所有权的原子采用。一次失败的采用记录一个失败请求,
172
226
  并用持久事实通知 Leader;在失败未变时它不反复准备资源。Leader 选择显式重试或修正后的
173
227
  请求。成功激活同样为 Leader 留下一条交付通知。激活绝不把活动 Session 变更为交付权限。
@@ -374,8 +374,10 @@ Publication rechecks the complete contribution, dependencies and permissions
374
374
  again. A failure does not change the existing directory; a competing
375
375
  activate/disable makes a late candidate refuse to publish. After a successful
376
376
  publication, the old generation only serves existing references and is disposed
377
- once drained; a cleanup failure keeps a diagnostic Artifact and neither rolls
378
- back the new Provider nor pretends the current instance is still unpublished.
377
+ once drained. A cleanup failure is retained on that plugin's diagnostic channel
378
+ with the old generation identity, even if another replacement has already
379
+ published. It is not a Task Artifact, does not roll back the new Provider, and
380
+ does not pretend the current instance is still unpublished.
379
381
 
380
382
  ## Storage and other ingress
381
383
 
@@ -91,7 +91,9 @@ The codec must not implement another Task/Run Store or invent native Turn IDs.
91
91
  Model, effort and permission requests are compiled against the peer's offered
92
92
  configuration axes and checked after application. Setters can change other axes;
93
93
  final observed values must still satisfy the requested launch before prompt.
94
- An acknowledgement without a reported value is weaker than an observed match.
94
+ New and loaded Sessions must report `configOptions` (an empty array is valid).
95
+ Configuration uses `session/set_config_option`; mode-only peers are unsupported.
96
+ An acknowledgement without current reported values cannot satisfy a requested change.
95
97
  Unknown ACP products do not inherit a guessed bypass mode from another product.
96
98
 
97
99
  Yui distinguishes three configuration layers:
@@ -73,8 +73,10 @@ ACP 协商初始化和 Session 能力,打开或加载一个确切的 Session
73
73
  Task/Run Store,也不得编造原生 Turn ID。
74
74
 
75
75
  model、effort 和权限请求依据 peer 提供的配置轴编译,并在套用后检查。setter 可以
76
- 改变其他轴;最终观察到的值在 prompt 之前仍必须满足请求的启动。一个没有回报值的
77
- 确认弱于一次已观察的匹配。未知的 ACP 产品不从另一个产品继承猜测的旁路模式。
76
+ 改变其他轴;最终观察到的值在 prompt 之前仍必须满足请求的启动。
77
+ 新建和加载 Session 都必须回报 `configOptions`(可以为空数组),配置只使用
78
+ `session/set_config_option`,不再支持 mode-only peer。仅确认调用、没有当前回报值
79
+ 不能证明请求的配置已生效。未知的 ACP 产品不从另一个产品继承猜测的旁路模式。
78
80
 
79
81
  Yui 区分三个配置层:
80
82
 
@@ -20,12 +20,193 @@ Two task-level record families back it:
20
20
  exact source (repository + pinned commit, optionally an artifact), an
21
21
  immutable ordered step plan, and one persisted record per step.
22
22
 
23
- The engine (`src/release/releaseWorkflowEngine.ts`) is a pure library; the
23
+ The engine (`src/release/releaseWorkflowEngine.ts`) owns persisted transitions and the workflow lock; the
24
24
  `yui task workflow` and `yui task grant` commands drive it. Every external
25
25
  system sits behind `ReleaseWorkflowPorts`
26
- (`src/release/releaseWorkflowPorts.ts`), so the whole workflow is testable
27
- with deterministic fakes and no real GitHub, npm, git, Controller, or process
28
- side effect.
26
+ (`src/release/releaseWorkflowPorts.ts`). Disposable SQLite and deterministic
27
+ external ports exercise recovery without real GitHub, npm, git, Controller,
28
+ or model effects.
29
+
30
+ ## Pre-1.0 contract cleanup
31
+
32
+ Version 0.16.0 retires runtime compatibility before the final
33
+ 1.0 baseline cutover. It does not reset storage numbering.
34
+ Storage 27→28 normalizes only provable singleton Role dispatch dedupe keys;
35
+ the old migration ledger, Messages, Task results and unconfirmed effects remain
36
+ unchanged. Ordinary opens require storage 37. Existing Homes advance only through
37
+ the explicit upgrade boundary; no runtime dual-reader is added.
38
+
39
+ This is a breaking pre-1.0 change:
40
+
41
+ - `message send` uses `--intent`; `--wake-policy` is no longer accepted by the
42
+ CLI or capability API. Draft edits preserve intent.
43
+ - Internal command integrations implement `notifyMailboxChanged`; the Task-only
44
+ notification adapter has been removed with its callers updated.
45
+ - ACP peers must report `configOptions`; there is no `modes`/`set_mode` path.
46
+ - Release recovery requires a pinned Home and installation prefix. Unpinned
47
+ identities remain unknown, and incomplete handover locks remain fenced.
48
+ - Development link/unlink requires the current registry. It does not discover
49
+ or adopt older NVM registrations or reconstruct orphan links.
50
+ - GC no longer discovers retired deployment layouts or reconstructs removed
51
+ worktrees. Unsupported quarantine evidence is retained, never purged as if
52
+ it were a current move receipt.
53
+ - `task activate` consumes an existing request; no request means no resource
54
+ adoption. Request creation, deferred admission and atomic workspace adoption
55
+ remain separate, using the same current boundary.
56
+ - `task integration queue` and its state machine are removed. The Agent chooses
57
+ each WorkItem result's order and strategy and calls the atomic Integration
58
+ operations; exact checks, target CAS and completion obligations remain.
59
+
60
+ Storage 28→29 preserves every former queue payload verbatim in a Task event
61
+ `integration.queue-retired`, with its original queue ID, before dropping the
62
+ active table. Event IDs advance past both the stored counter and existing
63
+ history. This does not accept delivery, generate an Integration or replay work.
64
+ Existing Integrations and Jobs stay intact. Inspect `task event list <task>`
65
+ and the referenced WorkItem/Integration before deciding what remains to do;
66
+ retiring the queue does not settle an unfinished Integration.
67
+
68
+ Storage 29→30 retires Run-linked wakes into `wake.run-link-retired` Task events
69
+ with the complete original payload. Current notification IDs, delivery status
70
+ and references remain intact, using wake schema 2; Run termination no longer
71
+ consumes notifications. Live Runs, owned retries and unresolved claims referring
72
+ to a retiring wake block both preflight and migration. The migration does not
73
+ stop execution or fabricate acceptance. Global Session sets use an explicit
74
+ `providerBinding: null` when no controlled binding exists.
75
+
76
+ Storage 30→31 makes every Review's scope explicit. Missing/null scope in a valid
77
+ older WorkItem Review becomes `work-item`; Task-final candidate evidence and
78
+ the old ledger are unchanged. New and retried Reviews always write their scope.
79
+
80
+ Storage 31→32 removes WorkItem `historicalState` from the current record.
81
+ Before removal, the entire original payload is preserved verbatim in a
82
+ `work-item.execution-state-retired` Task event. Current status, scope, Candidates
83
+ and execution groups are unchanged; no Run or acceptance is created. Unrecognized
84
+ historical shapes fail without changing the record or advancing the ledger.
85
+
86
+ Storage 32→33 retires the Leader rollout/budget settings and VerificationPlan
87
+ rollout modes. Active plan bodies gain an explicit schema version; their checks
88
+ remain unchanged, while retired Knowledge bodies are preserved. Integration
89
+ records gain explicit `rerunChecks: false`, and shadow reuse counters are removed
90
+ from cached artifacts. Original settings remain recoverable from the explicit
91
+ upgrade backup. This is an approved behavior change, not an assertion that
92
+ `record`, `reuse` and `enforce` meant the same thing.
93
+
94
+ Admitted `running`/`validating` plan gates block preflight and migration; settle
95
+ them with the old release first. No in-flight Job is relabelled under the new
96
+ proof contract. That cutover's v3 verification-plan digest excluded older cache entries from
97
+ automatic reuse without rewriting historical Job/Integration results or deleting
98
+ their logs. Historical plan interpretation is frozen inside the migration
99
+ directory so earlier migrations keep their original semantics.
100
+
101
+ The current clean-candidate proof uses a v5 L2-only execution digest. Both local and
102
+ Job-backed verification check candidate cleanliness, branch and exact HEAD
103
+ before publishing reusable success; older cache identities cannot silently pass
104
+ this boundary. Existing records/logs remain readable and admitted Jobs are not
105
+ relabeled under a new digest. Settle old attempts with their matching contract,
106
+ or explicitly abandon them before starting another operation.
107
+
108
+ The L1 runner, selector and current plan/artifact type branches are removed.
109
+ Storage 34→35 archives the original Project plan payloads and L1 artifacts/logs
110
+ in `storage_migration_archive`, then adopts VerificationPlan schema 2 without L1.
111
+ The archive is raw audit data, not an alternate execution reader or cache.
112
+ Settled historical ChangeSet-source Integrations become full-payload Task Events;
113
+ live workspaces, unsettled Jobs and adoption references block their retirement.
114
+ The complete earlier migration ledger remains unchanged.
115
+
116
+ Session custody now has one source, SQLite. Legacy `launch-env` owner rows or
117
+ files in `runtime/session-owners` block this cutover: use the old release to
118
+ inspect and settle their exact resources, then explicitly archive obsolete
119
+ files outside the active Home. The migration does not kill, infer ownership,
120
+ repair malformed records or rewrite immutable Session Manifests.
121
+
122
+ Storage 35→36 preserves historical Agent errors and explicitly marks missing
123
+ failure configuration as unavailable. Storage 36→37 narrows recorded failure
124
+ context to native metadata-query inputs, preserving the original snapshot and
125
+ empty optional identity placeholders in migration audit. Current error readers
126
+ do not depend on the execution snapshot protocol or reconstruct missing history.
127
+ Configuration rejection preserves input without automatic retry; an authorized
128
+ Agent can inspect failure-scoped model capabilities, correct the intended
129
+ configuration, and explicitly retry the rejected notification.
130
+
131
+ `task turn` and the `yui-dev` completion identity are no longer supported.
132
+ Before rollout, replace Sessions whose old Manifest still names `task turn`,
133
+ and explicitly remove/archive old `yui-dev` completion blocks before installing
134
+ current `yui` completion. User shell files are never rewritten by storage migration.
135
+ Host control/event compatibility and updater handover safety remain unchanged.
136
+
137
+ Storage 33→34 removes Message `wakePolicy` and activation `origin` from current
138
+ records, preserving their original representations in audit Events. Historical
139
+ save-only Messages become `intent: record`; other user/operator Messages without
140
+ intent become `discuss`. Runtime readers never infer a missing stored intent.
141
+ Editing record-only context does not wake the Leader. Completion reads actual
142
+ pending message references, including an explicit handoff of previously saved context.
143
+
144
+ Draft editing also preserves request identity: messages bound to submission,
145
+ queue/steer or handoff requests cannot change body in place. Use a new Message
146
+ and request ID; identical-body updates are no-ops. Unkeyed discussion edits
147
+ honor pending/failed activation, while develop edits never start planning or
148
+ create/retry activation. These are operation-boundary fixes, not a new storage
149
+ format or a repair of previously edited historical content.
150
+
151
+ An origin-less pending immediate Draft activation blocks preflight and migration,
152
+ including on a stopped Task. Activate or cancel it explicitly with the old release
153
+ first. An admitted current request needs no second origin gate: cancellation,
154
+ planning deferral, execution state and exact Session authority remain enforced.
155
+ Old origin metadata, including settled-request history, remains in
156
+ `task.activation-origin-retired` Events; this never fabricates authorization.
157
+
158
+ New `job start` calls require `--request-id`; RPC callers supply `requestId`, and
159
+ the capability boundary supplies its invocation identity. There is no implicit
160
+ content-addressed request or anonymous Job constructor. Existing Jobs retain
161
+ their operation evidence and remain addressable by ID. Retrying the same explicit
162
+ request is idempotent, changed input conflicts, and Integration recovery still
163
+ finds its original Job across Session replacement. Choosing a new request ID is
164
+ an explicit new operation, not recovery of an uncertain earlier result.
165
+
166
+ Core Scheduler readers and persistence operations are required ports. A missing
167
+ Session/event reader cannot be interpreted as empty evidence or skipped error
168
+ persistence. Task execution and Web projections read the current store directly;
169
+ queue admission requires its Task lifecycle read. Exact dispatch settlement
170
+ remains separate and does not gain an archive gate that could lose late evidence.
171
+ Observer, config, Knowledge and workspace-cleanup Store readers are also required;
172
+ test doubles implement those contracts rather than selecting production fallbacks.
173
+
174
+ Task listing and `/api/dashboard` now expose only the bounded catalog; remove
175
+ `--view compact` from callers and use per-Task reads for detail. Scheduler
176
+ catalog projections are required internal ports, not optional full-scan adapters.
177
+ Extra `schema.json`/`state.json` files cannot override SQLite's version or be
178
+ used to reset a development Home; upgrades leave unrelated files untouched.
179
+ A missing database in a non-empty Home remains a refusal to initialize.
180
+ Unrecognized writer leases are diagnosed without adoption or deletion.
181
+
182
+ `controller status` always reports identity and retains the nonzero health exit
183
+ for contradictory storage. `YUI_STATUS_IDENTITY` no longer selects another
184
+ contract. Update-owned lifecycle capture uses the same resource collector
185
+ directly, without requiring the old Home to pass current-schema health.
186
+
187
+ Additional current boundaries:
188
+
189
+ - Project/artifact file locks and handover locks require exact process-generation
190
+ evidence. Missing/invalid owners or unreadable OS identity remain fenced;
191
+ age alone never proves a creator exited. No PID-only positive fallback remains.
192
+ - PR head lookup uses one `gh pr list --head ... --state open` query. Only an
193
+ empty, valid array proves absence. Transport errors, malformed identities and
194
+ multiple matches fail without attempting creation.
195
+ - Existing Git operations cannot be adopted without the Integration's original
196
+ progress receipt. Preserve their files and diagnose explicitly; current
197
+ receipt-backed conflict/Job continuation remains supported.
198
+
199
+ Before rollout, settle old executions and use explicit cleanup for unsupported
200
+ locks, links or quarantines. Preserve those records until their owner and
201
+ disposition are established; the runtime does not choose recovery for them.
202
+
203
+ The later baseline cutover must first establish a verified bridge/export to the
204
+ chosen current format, then replace the old initialization/migration chain with
205
+ one clean baseline. Only then remove pre-baseline migrations and their historical
206
+ fixtures. Reset the storage baseline once; do not reset it again when tagging
207
+ 1.0.0. Keep unknown-version rejection, exact process/Host identity checks and
208
+ durable audit evidence. Version tags and real migration/publication effects
209
+ require their separate release authorization.
29
210
 
30
211
  ## Authorization model
31
212
 
@@ -214,9 +395,11 @@ The key is passed to every `executeStep` call for that step, including
214
395
  retries after a confirmed-absent timeout. The port contract requires
215
396
  `executeStep` to be idempotent under the same key: a retried attempt must not
216
397
  produce a second side effect. The engine side of the contract is stricter
217
- still — it never calls `executeStep` for a step it has marked `unknown`; it
218
- re-queries by the recorded identity instead. The fakes record every key, so
219
- the test suite proves at-most-once execution directly.
398
+ still — it never blindly calls `executeStep` for an `unknown` step; it first
399
+ re-queries by the recorded identity. A deterministic core scenario checks
400
+ uncertain-effect queries, confirmed-step reuse and grant exhaustion against
401
+ real SQLite. This proves those engine boundaries, not the idempotency of real
402
+ external services or every release adapter.
220
403
 
221
404
  ## Operator guide
222
405