@zq-silk/yui 2.7.1 → 2.8.1

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 (92) hide show
  1. package/dist/cli/commandCatalog.js +8 -7
  2. package/dist/cli/updateCommand.js +3 -0
  3. package/dist/cli/updatePorts.js +20 -0
  4. package/dist/commands/configCommands.js +1 -0
  5. package/dist/commands/globalRoleCommands.js +42 -35
  6. package/dist/commands/inboxCommands.js +60 -40
  7. package/dist/commands/taskCommands.js +7 -3
  8. package/dist/commands/taskRoleRuntimeStatus.js +2 -0
  9. package/dist/context/runContextPack.js +48 -3
  10. package/dist/context/taskContext.js +36 -12
  11. package/dist/controlPlaneCli.js +64 -17
  12. package/dist/controller/controller.js +5 -0
  13. package/dist/controller/fileSchedulerStoreAdapter.js +9 -4
  14. package/dist/controller/globalInputDelivery.js +17 -5
  15. package/dist/controller/globalRuntimeAttention.js +135 -5
  16. package/dist/controller/runtime.js +4 -0
  17. package/dist/controller/structuredProviderObservation.js +51 -15
  18. package/dist/controller/taskHostTerminalRecovery.js +33 -0
  19. package/dist/executor/fileRoleLaunchPlanner.js +4 -9
  20. package/dist/message/inboxReceipt.js +30 -0
  21. package/dist/message/taskInboxOwnership.js +25 -3
  22. package/dist/models/modelManagement.js +469 -0
  23. package/dist/models/modelManagementConfig.js +46 -0
  24. package/dist/models/modelManagementFiles.js +90 -0
  25. package/dist/models/modelManagementHttp.js +90 -0
  26. package/dist/models/modelManagementTypes.js +1 -0
  27. package/dist/output/boundedRead.js +43 -14
  28. package/dist/runtime/agentEndpointIdentity.js +8 -4
  29. package/dist/runtime/agentEndpointOwnership.js +5 -6
  30. package/dist/runtime/agentHost.js +62 -10
  31. package/dist/runtime/agentHostImplementation.js +18 -0
  32. package/dist/runtime/managedCaller.js +25 -1
  33. package/dist/runtime/managedIdentity.js +1 -1
  34. package/dist/runtime/providerRetry.js +19 -1
  35. package/dist/runtime/sessionCaller.js +53 -0
  36. package/dist/storage/contextRecords.js +28 -0
  37. package/dist/storage/maintenanceCaller.js +69 -0
  38. package/dist/storage/sqliteSchema.js +12 -2
  39. package/dist/storage/sqliteStore.js +9 -5
  40. package/dist/storage/storageVersions.js +1 -1
  41. package/dist/storage/taskStore.js +4 -0
  42. package/dist/task/completionReadiness.js +3 -3
  43. package/dist/web/assets/assetManifest.js +28 -2
  44. package/dist/web/assets/client/app/manage.js +6 -0
  45. package/dist/web/assets/client/app/models.js +20 -0
  46. package/dist/web/assets/client/app/settings.js +41 -9
  47. package/dist/web/assets/client/i18n/en.js +180 -2
  48. package/dist/web/assets/client/i18n/zh-CN.js +178 -2
  49. package/dist/web/assets/client/index.js +8 -0
  50. package/dist/web/assets/client/layout/manageShell.js +94 -0
  51. package/dist/web/assets/client/lib/api.js +13 -1
  52. package/dist/web/assets/client/lib/i18n.js +5 -3
  53. package/dist/web/assets/client/views/dock/conversation.js +231 -80
  54. package/dist/web/assets/client/views/models.js +777 -0
  55. package/dist/web/assets/client/views/skills.js +22 -15
  56. package/dist/web/assets/shared/icons.js +2 -0
  57. package/dist/web/assets/shared/manageNav.js +13 -0
  58. package/dist/web/assets/shell/manage.js +54 -0
  59. package/dist/web/assets/shell/models.js +7 -0
  60. package/dist/web/assets/shell/settings.js +1 -35
  61. package/dist/web/assets/shell/settingsContent.js +30 -0
  62. package/dist/web/assets/shell/sidebar.js +1 -0
  63. package/dist/web/assets/styles/index.js +6 -0
  64. package/dist/web/assets/styles/views/conversation.js +133 -0
  65. package/dist/web/assets/styles/views/manage.js +71 -0
  66. package/dist/web/assets/styles/views/models.js +129 -0
  67. package/dist/web/assets/styles/views/settings.js +28 -14
  68. package/dist/web/assets/styles/views/sidebar.js +1 -0
  69. package/dist/web/webServer.js +59 -9
  70. package/docs/cli-information-contract.md +42 -11
  71. package/docs/cli-information-contract.zh-CN.md +28 -7
  72. package/docs/managed-turn-and-session-runtime.md +47 -1
  73. package/docs/managed-turn-and-session-runtime.zh-CN.md +32 -0
  74. package/docs/release-workflow.md +80 -7
  75. package/docs/release-workflow.zh-CN.md +55 -4
  76. package/docs/storage-baseline.md +6 -1
  77. package/docs/storage-baseline.zh-CN.md +4 -1
  78. package/docs/testing/review-evaluation.md +148 -0
  79. package/docs/testing/review-evaluation.zh-CN.md +117 -0
  80. package/docs/testing/verification-levels.md +6 -2
  81. package/docs/testing/verification-levels.zh-CN.md +3 -0
  82. package/package.json +1 -1
  83. package/skills/yui-leader/VERSION +1 -1
  84. package/skills/yui-leader/references/execution.md +29 -0
  85. package/skills/yui-leader/references/replicated-execution.md +7 -0
  86. package/skills/yui-operator/SKILL.md +5 -1
  87. package/skills/yui-operator/VERSION +1 -1
  88. package/skills/yui-reviewer/SKILL.md +35 -0
  89. package/skills/yui-reviewer/VERSION +1 -1
  90. package/skills/yui-runtime/SKILL.md +53 -7
  91. package/skills/yui-runtime/VERSION +1 -1
  92. package/skills/yui-runtime/references/recovery.md +24 -5
@@ -90,6 +90,35 @@ request a follow-up Round yourself.
90
90
  Use Project Skills, Policy and Knowledge for project-specific checks. The
91
91
  Task Contract and frozen scope determine acceptance and required evidence.
92
92
 
93
+ ## Derive scenarios, then inspect the complete candidate
94
+
95
+ Read the frozen Task/WorkItem requirements, non-goals and applicable decisions
96
+ before using the author's explanation. The frozen Brief is a summary and material
97
+ index, not the contract body. Follow its relevant same-Task commit-pinned artifact
98
+ references with `task artifact read <task> <path> <commit>`; expand Context pointers
99
+ and their content pages as required. A path in prose grants no additional access.
100
+ Report missing or conflicting evidence instead of replacing it with a newer head.
101
+
102
+ Derive observable expectations from requirements and independent contracts, not
103
+ from the current implementation or its mocks. Trace the complete authorized
104
+ change and necessary callers, consumers, state and side effects. Select
105
+ complementary perspectives according to risk: user paths, producer/consumer
106
+ contracts, state/data invariants, failure and partial recovery, authorization,
107
+ and whether verification tests the actual contract. Multiple perspectives do
108
+ not require multiple Agents or every perspective on every task.
109
+
110
+ Turn applicable perspectives into concrete scenarios, expected behavior and
111
+ evidence. Challenge important assumptions with the smallest reachable
112
+ counterexample; check normal controls and non-goals too. A shared assumption
113
+ between a mock and implementation is not independent confirmation. Reuse valid
114
+ checks; do not run external-resource validation without its exact authorization.
115
+ Stop neither at the changed lines nor after finding a few defects.
116
+
117
+ For an ordinary full re-review, inspect the current complete frozen candidate
118
+ and requirements, using the repair delta, prior finding dispositions and still
119
+ applicable evidence as guidance, not a scope ceiling. An explicitly assigned
120
+ Delta Recheck retains its narrower equivalence contract above.
121
+
93
122
  Review design complexity against the current Task Contract and reachable
94
123
  operating paths. Report abstractions, state, indirection, fallback, or module
95
124
  boundaries whose complete lifecycle cost exceeds their demonstrated value.
@@ -117,6 +146,12 @@ frozen Review or its original report.
117
146
 
118
147
  A helpful default result layout is Conclusion, Material findings, Verification,
119
148
  Uncertainty, and Recommended next action. Markdown or JSON are both acceptable.
149
+ Include a short account of the perspectives/scenarios actually inspected and
150
+ material unexamined risks, not a copied checklist. Each confirmed finding should
151
+ identify its trigger, violated expectation, impact and supporting evidence;
152
+ merge one root cause without losing its affected entry points. Distinguish
153
+ uncertain reachability or missing verification from a confirmed defect. There
154
+ is no finding quota, mandatory perspective count or claim of exhaustive coverage.
120
155
  Yui preserves the original text and does not parse a verdict or reject it for
121
156
  missing headings, field names, or formatting. Follow `yui-runtime`'s optional
122
157
  `Yui-Summary:` first-line convention for attributed notification text; retain
@@ -1 +1 @@
1
- 2
1
+ 3
@@ -79,6 +79,15 @@ installation with the same protocol and storage versions. If the entry or Home
79
79
  is wrong or unavailable, report that fact and use the explicitly authorized
80
80
  entry/environment; do not guess another installation or clear Session identity.
81
81
 
82
+ Desktop commands may carry only `CODEX_THREAD_ID`. The CLI resolves that native
83
+ identity in the selected Home's current Session registry before routing Task or
84
+ Global operations. Environment and Manifest values are location hints, not
85
+ continuing grants. Conflicting, unregistered, replaced or revoked identities
86
+ do not become public-user callers; a plain user terminal has no managed/native
87
+ identity. `inbox list` reports the resolved current identity. Do not add or clear
88
+ environment fields to repair a mismatch. Without a Manifest environment pointer,
89
+ `session skills` returns current Skill paths and the Session's captured profile.
90
+
82
91
  For every explicitly dispatched managed Task AgentRun:
83
92
 
84
93
  1. Read the exact AgentRun identity from the newest Bootstrap Envelope.
@@ -93,8 +102,15 @@ For every explicitly dispatched managed Task AgentRun:
93
102
  and Adapter match the Envelope and Session Manifest. Stop and report a
94
103
  context-load failure if the pack is missing, stale, unauthorized, malformed,
95
104
  or mismatched. Never request an inline/full-prompt fallback.
96
- 4. Use the pack's `pointers` (including each pointer's summary) first. They are
97
- the single readable-ref inventory; `deltaRefs` contains only changed identities.
105
+ 4. Use the entry's `pointers` (including each pointer's summary) first. They are
106
+ a bounded window into the frozen readable-ref inventory. `pointerPage`
107
+ reports total/complete/nextCursor; discover further relevant refs with
108
+ `task run context <task>/<run> --view refs [--cursor <cursor>]`.
109
+ `deltaRefs` samples changed identities, with `deltaRefsTotal` reporting coverage.
110
+ `--view full` explicitly reads the complete pack when needed; do not load or
111
+ traverse every historical reference merely to make an entry window complete.
112
+ If `input.directiveOmitted` is true, read the complete assigned input with
113
+ `--view input` before acting; its entry summary is not the instruction body.
98
114
  Expand only an authorized ref when
99
115
  its full value is needed, selecting it by the pointer's exact `store` and
100
116
  `refId`:
@@ -173,13 +189,20 @@ TUI, with the configured Agent, permissions and workspace unchanged. A live
173
189
  unmanaged Session is not silently replaced or adopted; use an explicit Session
174
190
  lifecycle action before enabling controlled delivery.
175
191
 
176
- Context reads never consume queue entries. Global Context returns bounded
177
- `pending` and `recent` discovery pages, not Message bodies. Read a referenced
192
+ Context reads never consume queue entries. Global Context returns a bounded
193
+ `pending` discovery page, not Message bodies, Profile bodies, recent history or
194
+ accumulated retry details. The Manifest retains the exact Role profile.
195
+ Read a referenced
178
196
  original with `role message show <role> <message-id> --json`. Follow a pending
179
197
  page's `nextCursor` using `role message list <role> --pending --cursor <cursor>`
180
198
  when it is incomplete; accepted delivery does not erase the Message from the
181
199
  separate all-message list. Native/transport acceptance is not implementation, and
182
200
  `interrupt-requested` is not a stopped Turn or stopped background resources.
201
+ `role message list <role> --diagnostics` projects repeated classified failures
202
+ from original evidence with first/latest occurrence, count and recovery evidence.
203
+ `--diagnostic <key>` pages the original affected observations. Counts cover
204
+ distinct observations, not repeated polling of one identity. A recovery notice
205
+ is neither an input acknowledgement nor proof that prior effects were undone.
183
206
  Saving a Task Message or Brief is not notification delivery to Operator. A
184
207
  Task Role uses the existing Task InputRequest path for a genuinely missing
185
208
  user decision, not global Role input controls or fabricated progress questions.
@@ -238,15 +261,32 @@ Retirement preserves the original claim and records the management decision;
238
261
  it neither fabricates an acknowledgement nor proves native execution stopped.
239
262
  An unfinished claim fences its Assignment, not unrelated work of the same Role.
240
263
 
241
- In-flight, unknown, previously delivered, explicit interrupt-then and
264
+ In-flight, unknown, not-yet-delivered explicit interrupt-then and
242
265
  unsettled steer inputs retain their existing owner/receipt and report a bounded
243
266
  reason instead of being taken over. Use existing exact-receipt recovery when
244
267
  needed; do not change request IDs, clear identity, or copy input to bypass it.
245
268
  A steer with no control receipt was not submitted; it may be explicitly handled
246
269
  and acknowledged in its authorized inbox, without converting it into a queue.
247
270
  An accepted notification still follows its normal handling path, not another
248
- inbox delivery. Original Messages, wake windows and handling receipts remain
249
- readable after acknowledgement.
271
+ native delivery. Accepted Global inputs, delivered Leader windows and current
272
+ Assignment continuations remain in the inbox until explicitly handled. Claim the
273
+ received entry, inspect its originals and existing effects, then ack with a
274
+ concrete disposition (including result or effect receipt references when useful).
275
+ This claim never sends the input again. A current rightful successor may settle
276
+ an accepted Global input or Leader window while retaining the original delivery
277
+ target; it must inspect prior effects first. Pending/unknown acceptance stays
278
+ blocked and cannot use claim as a replay path.
279
+
280
+ An ack belongs to the exact original and revision: fixed windows pin
281
+ `message.updated` event identities, including same-timestamp edits. A later
282
+ revision still needs its own handling. Before Task completion, settle handled
283
+ user-input windows; native acceptance or a terminal does not settle them.
284
+ Original Messages, wake windows and handling receipts remain readable after
285
+ acknowledgement. Lost context, Session continuation and installation upgrades
286
+ do not reset receipts. If ack fails after an external effect, read back the
287
+ original claim and the external receipt before retrying the same ack; do not
288
+ repeat the effect. This is durable handling evidence, not arbitrary external
289
+ exactly-once execution.
250
290
 
251
291
  ## Read bounded information completely when required
252
292
 
@@ -259,6 +299,12 @@ family, then `task context inspect <task> --store <store> --ref <refId>
259
299
  --digest <digest>` to read its exact current value. Common Task lists use the
260
300
  same `items`, `total`, `complete`, and `nextCursor` contract. Do not treat the
261
301
  first page or a summary as complete requirements.
302
+ The 32 KiB compact-JSON read budget includes nested data, cursors and structure;
303
+ summaries are at most 512 UTF-8 bytes. Current Task Message discovery excludes
304
+ explicit acknowledgements and retirements, not uncertain delivery. Use
305
+ `--view current` for its continuation and the default all view for history.
306
+ Skill checks remain metadata-only; unusually large checks use the same explicit
307
+ document pagination. A small default window is not a request to fetch all history.
262
308
 
263
309
  Long detail reads return `contentPage` instead of the ordinary value (under
264
310
  `data.context` for Run context/expand, `data.contextDelta` for Run Context delta). Repeat the same read with
@@ -1 +1 @@
1
- 3
1
+ 6
@@ -143,11 +143,30 @@ If exact native stop or inspection fails, read the persisted diagnostic and
143
143
  resolve that resource boundary; do not kill arbitrary processes, clear unknown
144
144
  execution records, or modify managed refs, tmux Sessions or state files.
145
145
 
146
- Breaking upgrades require a clean runtime environment; Yui does not discover,
147
- convert or inherit historical Hosts and processes. Storage migration is a
148
- separate explicit operation, not proof of runtime continuity. Do not interpret
149
- missing compatibility diagnostics as permission to reuse an old process,
150
- discard pending intent or bypass exact ownership and stop confirmation.
146
+ Compatible upgrades preserve logical Sessions. Build generations and historical
147
+ Skill packages are provenance, not continuation gates. Load current stable
148
+ Skills and current authority; never change a user's model, account, native
149
+ permissions or workspace to make an upgrade work.
150
+
151
+ Within Host control/event v1, status advertises `controlCapabilities` and the
152
+ loaded `hostImplementation`, independently of `endpointImplementation`. Missing
153
+ capabilities or `eventDelivery` are unreported, not healthy. A Controller must
154
+ not repeatedly send an unsupported `reconcile-turn`; the existing raw Inbox
155
+ still permits exact event consumption without executing the input again.
156
+ Current Hosts retain unpersisted original facts during a filesystem failure;
157
+ keep that process alive until persistence recovers. Those volatile bytes cannot
158
+ be recovered after process loss merely by restarting the Controller.
159
+
160
+ Program/storage upgrade success does not mean Host replacement succeeded.
161
+ Compatible live Hosts may continue, including busy ones. A new Host may resume
162
+ the same native Session only through the existing authorized lifecycle after
163
+ exact execution, background resources and writer release are proven. An idle
164
+ status, a stopped proxy or a missing control field is insufficient. Unknown
165
+ effects preserve the original Session, input and resources; do not force-kill,
166
+ replay, hot-replace loaded modules or silently create a new Session. Existing
167
+ explicit stop/replacement authority is separate from an ordinary upgrade.
168
+ Unsupported protocols require an explicit bounded recovery plan, not arbitrary
169
+ historical Host adoption. Storage migration remains independently fenced.
151
170
 
152
171
  After repeated failure of the same bounded recovery, report the observed
153
172
  cause, impact and smallest remaining options. Do not broaden cleanup or add