@zq-silk/yui 2.3.0 → 2.4.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 (183) hide show
  1. package/README.md +15 -1
  2. package/dist/artifacts/artifactCapability.js +39 -10
  3. package/dist/artifacts/imageMetadata.js +120 -0
  4. package/dist/artifacts/managedGit.js +7 -4
  5. package/dist/artifacts/taskArtifactRepository.js +6 -0
  6. package/dist/cli/commandCatalog.js +17 -8
  7. package/dist/cli/invocationAuthority.js +1 -1
  8. package/dist/commands/executionAuditCommands.js +5 -0
  9. package/dist/commands/globalRoleCommands.js +41 -3
  10. package/dist/commands/projectCommands.js +89 -94
  11. package/dist/commands/roleSkillValidation.js +4 -8
  12. package/dist/commands/taskCommands.js +25 -2
  13. package/dist/commands/taskUsageCommand.js +38 -0
  14. package/dist/context/roleSessionContext.js +18 -2
  15. package/dist/context/runContextPack.js +5 -1
  16. package/dist/context/sessionBootstrapManifest.js +10 -1
  17. package/dist/context/skillCatalog.js +108 -0
  18. package/dist/context/skillPackage.js +161 -0
  19. package/dist/context/taskContext.js +3 -2
  20. package/dist/context/taskSearch.js +127 -0
  21. package/dist/controlPlaneCli.js +25 -20
  22. package/dist/controller/fileSchedulerStoreAdapter.js +32 -6
  23. package/dist/controller/jobControl.js +2 -0
  24. package/dist/controller/nativeHostInput.js +37 -0
  25. package/dist/controller/runtime.js +93 -2
  26. package/dist/controller/runtimeEventInbox.js +2 -2
  27. package/dist/controller/runtimeEventProcessor.js +3 -3
  28. package/dist/doctor/doctor.js +10 -0
  29. package/dist/execution/reviewMainRun.js +1 -0
  30. package/dist/execution/workItemMainRun.js +1 -0
  31. package/dist/executor/codexConfigConflict.js +6 -4
  32. package/dist/executor/effectiveLaunch.js +24 -1
  33. package/dist/executor/fileRoleLaunchPlanner.js +13 -5
  34. package/dist/integration/gitIntegrationService.js +7 -12
  35. package/dist/integration/integrationSourceApplication.js +4 -2
  36. package/dist/job/httpPreview.js +61 -0
  37. package/dist/job/jobRunner.js +12 -2
  38. package/dist/kernel/builtinCapabilities.js +3 -1
  39. package/dist/message/message.js +15 -1
  40. package/dist/output/rolePresentation.js +4 -1
  41. package/dist/repository/executionLaneGitSnapshot.js +2 -1
  42. package/dist/repository/gitCompatibility.js +62 -0
  43. package/dist/repository/gitWorkspace.js +48 -71
  44. package/dist/repository/gitWorktreeInventory.js +121 -0
  45. package/dist/repository/project.js +74 -25
  46. package/dist/resources/resourceDiscovery.js +2 -2
  47. package/dist/resources/resourceGc.js +7 -4
  48. package/dist/resources/resourceRegistrar.js +2 -1
  49. package/dist/runtime/agentEndpoint.js +8 -0
  50. package/dist/runtime/agentHost.js +170 -3
  51. package/dist/runtime/codexAppServerRuntime.js +1 -1
  52. package/dist/runtime/codexNativeAccess.js +175 -0
  53. package/dist/runtime/controlledCodexTui.js +116 -0
  54. package/dist/runtime/publicReply.js +23 -0
  55. package/dist/runtime/runtimeObservation.js +48 -0
  56. package/dist/runtime/structuredProviderHost.js +16 -7
  57. package/dist/runtime/taskCostMetrics.js +133 -0
  58. package/dist/runtime/taskUsageMetrics.js +11 -2
  59. package/dist/runtime/taskUsageQuery.js +38 -0
  60. package/dist/scheduler/taskExecutionProjection.js +2 -0
  61. package/dist/scheduler/taskObservabilityProjection.js +9 -1
  62. package/dist/storage/homeLayout.js +13 -0
  63. package/dist/storage/sqliteSchema.js +44 -0
  64. package/dist/storage/sqliteStore.js +53 -0
  65. package/dist/storage/storageVersions.js +1 -1
  66. package/dist/storage/storeRpc.js +2 -0
  67. package/dist/storage/taskSearch.js +35 -0
  68. package/dist/storage/upgrade/projectKnowledgeMigration.js +52 -0
  69. package/dist/task/ordinaryArchive.js +42 -0
  70. package/dist/tmux/tmuxManager.js +8 -8
  71. package/dist/web/assets/assetManifest.js +11 -51
  72. package/dist/web/assets/client/app/catalog.js +215 -0
  73. package/dist/web/assets/client/app/main.js +148 -0
  74. package/dist/web/assets/client/app/selection.js +139 -0
  75. package/dist/web/assets/client/app/settings.js +326 -0
  76. package/dist/web/assets/client/app/taskView.js +280 -0
  77. package/dist/web/assets/client/domain/context.js +96 -0
  78. package/dist/web/assets/client/domain/records.js +126 -0
  79. package/dist/web/assets/client/domain/runs.js +119 -0
  80. package/dist/web/assets/client/domain/taskForms.js +197 -0
  81. package/dist/web/assets/client/domain/vocab.js +69 -0
  82. package/dist/web/assets/client/domain/work.js +116 -0
  83. package/dist/web/assets/client/i18n/en.js +900 -0
  84. package/dist/web/assets/client/i18n/zh-CN.js +898 -0
  85. package/dist/web/assets/client/index.js +114 -0
  86. package/dist/web/assets/client/layout/resizer.js +37 -0
  87. package/dist/web/assets/client/layout/router.js +35 -0
  88. package/dist/web/assets/client/layout/shortcuts.js +45 -0
  89. package/dist/web/assets/client/layout/sizing.js +95 -0
  90. package/dist/web/assets/client/layout/workspace.js +247 -0
  91. package/dist/web/assets/client/{api.js → lib/api.js} +20 -4
  92. package/dist/web/assets/client/{dom.js → lib/dom.js} +24 -12
  93. package/dist/web/assets/client/{format.js → lib/format.js} +7 -0
  94. package/dist/web/assets/client/lib/i18n.js +54 -0
  95. package/dist/web/assets/client/lib/markdown.js +167 -0
  96. package/dist/web/assets/client/lib/prefs.js +28 -0
  97. package/dist/web/assets/client/lib/theme.js +68 -0
  98. package/dist/web/assets/client/ui/containers.js +101 -0
  99. package/dist/web/assets/client/ui/controls.js +51 -0
  100. package/dist/web/assets/client/ui/forms.js +48 -0
  101. package/dist/web/assets/client/ui/metrics.js +137 -0
  102. package/dist/web/assets/client/ui/primitives.js +92 -0
  103. package/dist/web/assets/client/ui/text.js +33 -0
  104. package/dist/web/assets/client/ui/toast.js +12 -0
  105. package/dist/web/assets/client/views/bodySearch.js +172 -0
  106. package/dist/web/assets/client/views/createTask.js +85 -0
  107. package/dist/web/assets/client/views/dock/conversation.js +612 -0
  108. package/dist/web/assets/client/views/dock/discussion.js +173 -0
  109. package/dist/web/assets/client/views/dock/preview.js +129 -0
  110. package/dist/web/assets/client/views/dock/terminal.js +199 -0
  111. package/dist/web/assets/client/views/globalInput.js +67 -0
  112. package/dist/web/assets/client/{overview.js → views/overview.js} +61 -51
  113. package/dist/web/assets/client/{sidebar.js → views/sidebar.js} +56 -62
  114. package/dist/web/assets/client/views/skills.js +152 -0
  115. package/dist/web/assets/client/views/task/actions.js +36 -0
  116. package/dist/web/assets/client/views/task/delivery.js +185 -0
  117. package/dist/web/assets/client/views/task/deliveryResults.js +159 -0
  118. package/dist/web/assets/client/views/task/files.js +272 -0
  119. package/dist/web/assets/client/views/task/observation.js +153 -0
  120. package/dist/web/assets/client/views/task/overview.js +161 -0
  121. package/dist/web/assets/client/views/task/page.js +131 -0
  122. package/dist/web/assets/client/views/task/records.js +163 -0
  123. package/dist/web/assets/client/views/task/runtime.js +130 -0
  124. package/dist/web/assets/client/views/task/timeline.js +190 -0
  125. package/dist/web/assets/shared/geometry.js +19 -0
  126. package/dist/web/assets/shared/taskTabs.js +8 -0
  127. package/dist/web/assets/shared/themes.js +93 -0
  128. package/dist/web/assets/shell/dialogs.js +63 -0
  129. package/dist/web/assets/shell/dock.js +40 -0
  130. package/dist/web/assets/shell/index.js +40 -0
  131. package/dist/web/assets/shell/settings.js +34 -0
  132. package/dist/web/assets/shell/sidebar.js +45 -0
  133. package/dist/web/assets/styles/index.js +41 -0
  134. package/dist/web/assets/styles/{responsive.js → layout/responsive.js} +10 -10
  135. package/dist/web/assets/styles/{layout.js → layout/workspace.js} +17 -24
  136. package/dist/web/assets/styles/markdown.js +22 -3
  137. package/dist/web/assets/styles/tokens.js +10 -63
  138. package/dist/web/assets/styles/ui/controls.js +76 -0
  139. package/dist/web/assets/styles/ui/forms.js +46 -0
  140. package/dist/web/assets/styles/ui/surfaces.js +122 -0
  141. package/dist/web/assets/styles/views/delivery.js +29 -0
  142. package/dist/web/assets/styles/views/dock.js +71 -0
  143. package/dist/web/assets/styles/views/page.js +32 -0
  144. package/dist/web/assets/styles/views/records.js +70 -0
  145. package/dist/web/assets/styles/views/settings.js +26 -0
  146. package/dist/web/assets/styles/views/sidebar.js +74 -0
  147. package/dist/web/assets/styles/views/task.js +80 -0
  148. package/dist/web/assets/styles/views/terminal.js +38 -0
  149. package/dist/web/taskPreviews.js +205 -0
  150. package/dist/web/tmuxWebTerminal.js +16 -9
  151. package/dist/web/webConversation.js +373 -0
  152. package/dist/web/webMaterials.js +155 -0
  153. package/dist/web/webServer.js +295 -18
  154. package/dist/web/webSettings.js +331 -0
  155. package/dist/web/webSkills.js +86 -0
  156. package/dist/web/webSnapshot.js +40 -8
  157. package/dist/web/webTaskSurface.js +106 -8
  158. package/dist/workspace/gitChangeSetCapture.js +3 -1
  159. package/docs/managed-turn-and-session-runtime.md +9 -0
  160. package/docs/managed-turn-and-session-runtime.zh-CN.md +7 -0
  161. package/docs/release-workflow.md +28 -0
  162. package/docs/release-workflow.zh-CN.md +21 -0
  163. package/docs/storage-baseline.md +38 -1
  164. package/docs/storage-baseline.zh-CN.md +22 -0
  165. package/docs/task-discovery.md +28 -0
  166. package/docs/testing/verification-levels.md +2 -2
  167. package/i18n/README.zh-CN.md +1 -1
  168. package/package.json +1 -1
  169. package/dist/web/assets/client/app.js +0 -808
  170. package/dist/web/assets/client/components.js +0 -477
  171. package/dist/web/assets/client/detail.js +0 -379
  172. package/dist/web/assets/client/dock.js +0 -309
  173. package/dist/web/assets/client/evidence.js +0 -364
  174. package/dist/web/assets/client/forms.js +0 -230
  175. package/dist/web/assets/client/i18n.js +0 -1277
  176. package/dist/web/assets/client/markdown.js +0 -114
  177. package/dist/web/assets/client/records.js +0 -198
  178. package/dist/web/assets/client/sections.js +0 -349
  179. package/dist/web/assets/client/theme.js +0 -71
  180. package/dist/web/assets/shell.js +0 -161
  181. package/dist/web/assets/styles/components.js +0 -216
  182. package/dist/web/assets/styles/views.js +0 -309
  183. /package/dist/web/assets/{icons.js → shared/icons.js} +0 -0
@@ -1,7 +1,9 @@
1
- import { readArtifactCapability } from "../artifacts/artifactCapability.js";
2
1
  import { openTaskArtifactRepository } from "../artifacts/taskArtifactRepository.js";
2
+ import { compareTextArtifacts, readArtifactPreview } from "./webMaterials.js";
3
+ import { readTaskSearchSource } from "../context/taskSearch.js";
3
4
  import { applyGlobalInputControl } from "../commands/globalRoleCommands.js";
4
- import { applyTaskInputControl, sendTaskMessageCommand, updateTaskMetadataCommand } from "../commands/taskCommands.js";
5
+ import { applyTaskInputControl, runTaskCommand, sendTaskMessageCommand, updateTaskMetadataCommand } from "../commands/taskCommands.js";
6
+ import { runTaskActivationCommand } from "../commands/taskActivationCommands.js";
5
7
  import { runTaskInputCommand } from "../commands/taskInputCommands.js";
6
8
  import { inspectTaskContext, listTaskContext, readTaskContext, readTaskContextDelta, withContextObservations } from "../context/taskContext.js";
7
9
  import { BUILTIN_CAPABILITIES } from "../kernel/builtinCapabilities.js";
@@ -9,6 +11,7 @@ import { capabilitySchemaError } from "../kernel/capabilitySchema.js";
9
11
  import { recordGlobalInterruptResult, recordGlobalSteerResult } from "../message/globalInterrupt.js";
10
12
  import { recordTaskInterruptResult } from "../message/taskInterrupt.js";
11
13
  import { AGENT_HOST_CONTROL_PROTOCOL, foldInterruptLiveReceipt, foldSteerLiveReceipt, sendAgentHostCancelControl, sendAgentHostSteerControl } from "../runtime/agentHost.js";
14
+ import { validateOrdinaryTaskArchive } from "../task/ordinaryArchive.js";
12
15
  import { webLocalMutation, WebRequestRejected } from "./webMutation.js";
13
16
  const DEFAULT_WEB_HOST_CONTROL = {
14
17
  steer: sendAgentHostSteerControl,
@@ -29,7 +32,7 @@ function controlTarget(taskId, input) {
29
32
  * its token before using this port; input never supplies a caller or Role.
30
33
  * Managed capability RPC keeps its own Session authentication unchanged.
31
34
  */
32
- export function createWebTaskSurface(store, options = {}, observations = [], hostControl = DEFAULT_WEB_HOST_CONTROL) {
35
+ export function createWebTaskSurface(store, options = {}, observations = [], hostControl = DEFAULT_WEB_HOST_CONTROL, lifecycle) {
33
36
  const environment = {};
34
37
  const commandOptions = { ...options, environment, runtime: undefined };
35
38
  // Notifications are after the outer transaction. Their failure must not be
@@ -39,26 +42,120 @@ export function createWebTaskSurface(store, options = {}, observations = [], hos
39
42
  ? { kind: "role", taskId, roleName: "leader" } : { kind: "task", taskId });
40
43
  };
41
44
  return {
45
+ workbench: (taskId) => store.transaction(tx => {
46
+ const task = tx.getTask(taskId);
47
+ if (!task)
48
+ throw new WebRequestRejected("Task not found.");
49
+ const brief = tx.getTaskBrief(taskId);
50
+ const clip = (value) => value === undefined ? undefined
51
+ : value.length > 1200 ? value.slice(0, 1200) + "…" : value;
52
+ return {
53
+ core: readTaskContext(tx, taskId, environment),
54
+ task: {
55
+ id: task.id, title: clip(task.title), status: task.status, updatedAt: task.updatedAt,
56
+ executionGate: task.executionGate, priority: task.priority, tags: task.tags?.slice(0, 16).map(value => clip(value)),
57
+ projectBindings: task.projectBindings.slice(0, 32),
58
+ description: clip(task.description), completionSummary: clip(task.completionSummary),
59
+ retirementSummary: clip(task.retirementSummary), archiveSummary: clip(task.archiveSummary),
60
+ archiveReason: clip(task.archiveReason),
61
+ activationRequest: task.activationRequest && {
62
+ disposition: task.activationRequest.disposition,
63
+ outcome: clip(task.activationRequest.outcome),
64
+ operation: { requestId: task.activationRequest.operation.requestId }
65
+ }
66
+ },
67
+ evidence: {
68
+ reviews: tx.listReviewRounds(taskId).sort((a, b) => b.createdAt.localeCompare(a.createdAt)).slice(0, 3)
69
+ .map(round => ({
70
+ id: round.id, status: round.status, runId: round.reviewerRunId,
71
+ excerpt: round.reviewerRunId ? clip(tx.getRun(taskId, round.reviewerRunId)?.result?.output) : undefined
72
+ })),
73
+ integrations: tx.listIntegrationAttempts(taskId).sort((a, b) => b.createdAt.localeCompare(a.createdAt)).slice(0, 3)
74
+ .map(attempt => ({
75
+ id: attempt.id, status: attempt.status, summary: clip(attempt.summary),
76
+ checks: attempt.checks?.slice(0, 8).map(check => ({ name: clip(check.name), outcome: check.outcome }))
77
+ }))
78
+ },
79
+ brief: brief && {
80
+ objective: clip(brief.objective), currentFocus: clip(brief.currentFocus),
81
+ leaderSummary: clip(brief.leaderSummary), technicalApproach: clip(brief.technicalApproach),
82
+ boundaries: brief.boundaries?.slice(0, 8).map(value => clip(value)),
83
+ updatedAt: brief.updatedAt
84
+ }
85
+ };
86
+ }),
87
+ projects: (after) => {
88
+ const projects = store.listProjects().filter(project => project.status === "active")
89
+ .sort((a, b) => a.id.localeCompare(b.id));
90
+ const remaining = projects.filter(project => after === undefined || project.id.localeCompare(after) > 0);
91
+ const page = remaining.slice(0, 40);
92
+ return { projects: page.map(({ id, name }) => ({ id, name: name.slice(0, 200) })),
93
+ total: projects.length, nextCursor: remaining.length > page.length ? page.at(-1).id : null };
94
+ },
95
+ create: (input) => {
96
+ const result = webLocalMutation(store, tx => {
97
+ // A lost response must be reconciled, never create another Task.
98
+ if (tx.listTasks().some(task => tx.listMessages(task.id)
99
+ .some(message => message.submissionKey === input.requestId))) {
100
+ throw new Error("This creation request was already saved; inspect the Task catalog before continuing.");
101
+ }
102
+ const created = runTaskCommand(["create", input.title,
103
+ ...input.projectIds.flatMap(id => ["--project", id])], tx, commandOptions);
104
+ if (created.kind !== "output")
105
+ throw new Error("Unexpected Task creation result.");
106
+ const taskId = created.data.task.id;
107
+ updateTaskMetadataCommand(tx, taskId, { description: input.requirements }, commandOptions);
108
+ const submitted = sendTaskMessageCommand(tx, taskId, input.requirements, commandOptions, undefined, input.plan ? "discuss" : "record", input.requestId);
109
+ return { task: submitted.task, submission: submitted.feedback, messageId: submitted.message.id };
110
+ });
111
+ notify(result.task.id, input.plan);
112
+ return result;
113
+ },
114
+ activate: (taskId, requestId) => {
115
+ const result = webLocalMutation(store, tx => runTaskActivationCommand([
116
+ "request", taskId, "--request-id", requestId, "--environment", "empty"
117
+ ], tx, commandOptions));
118
+ notify(taskId);
119
+ return result.kind === "output" ? result.data : result;
120
+ },
121
+ archive: async (taskId) => {
122
+ if (!lifecycle)
123
+ throw new WebRequestRejected("Ordinary archive is unavailable.");
124
+ // Preflight rejection precedes any physical effects; later errors remain
125
+ // unknown and must be reconciled from the Task and archive diagnostics.
126
+ webLocalMutation(store, tx => validateOrdinaryTaskArchive(tx, taskId, commandOptions));
127
+ return lifecycle.archive(taskId);
128
+ },
42
129
  evidence: (taskId) => store.transaction(reader => {
43
130
  if (reader.getTask(taskId) === null)
44
131
  throw new WebRequestRejected("Task not found.");
45
132
  return { taskId, integrations: reader.listIntegrationAttempts(taskId),
46
133
  reviews: reader.listReviewRounds(taskId), workspaces: reader.listManagedWorkspaces(taskId) };
47
134
  }),
48
- artifacts: async (taskId) => {
135
+ artifacts: async (taskId, selectedCommit, offset = 0) => {
49
136
  if (store.getTask(taskId) === null)
50
137
  throw new WebRequestRejected("Task not found.");
51
138
  const repo = openTaskArtifactRepository(store.rootDirectory(), taskId);
52
- const commit = await repo.head();
139
+ if (selectedCommit !== undefined && !repo.exists())
140
+ throw new WebRequestRejected("Artifact revision unavailable.");
141
+ const commit = selectedCommit ?? await repo.head();
53
142
  const entries = commit === null ? [] : await repo.list(commit);
54
- return { taskId, commit, entries };
143
+ if (!Number.isSafeInteger(offset) || offset < 0 || offset > entries.length)
144
+ throw new WebRequestRejected("Invalid artifact offset.");
145
+ return { taskId, commit, entries: entries.slice(offset, offset + 40), total: entries.length,
146
+ nextOffset: offset + 40 < entries.length ? offset + 40 : null };
55
147
  },
56
- artifact: async (taskId, relativePath, commit) => {
148
+ artifact: async (taskId, relativePath, commit, offset = 0) => {
57
149
  if (store.getTask(taskId) === null)
58
150
  throw new WebRequestRejected("Task not found.");
59
151
  // The browser always names a fixed revision. Never substitute HEAD after
60
152
  // a missing object, and never execute/render artifact HTML as an app.
61
- return readArtifactCapability(store.rootDirectory(), taskId, { relativePath, commit });
153
+ return readArtifactPreview(store.rootDirectory(), taskId, { taskId, relativePath, commit }, offset);
154
+ },
155
+ artifactDiff: async (taskId, relativePath, commit, beforeCommit, offset = 0) => {
156
+ if (store.getTask(taskId) === null)
157
+ throw new WebRequestRejected("Task not found.");
158
+ return compareTextArtifacts(store.rootDirectory(), taskId, { taskId, relativePath, commit: beforeCommit }, { taskId, relativePath, commit }, offset);
62
159
  },
63
160
  globalState: (roleName) => {
64
161
  const role = store.getGlobalRole(roleName);
@@ -247,6 +344,7 @@ export function createWebTaskSurface(store, options = {}, observations = [], hos
247
344
  },
248
345
  read: async (taskId) => withContextObservations(readTaskContext(store, taskId, environment), observations),
249
346
  delta: (taskId, input) => readTaskContextDelta(store, taskId, input, environment),
347
+ searchSource: (taskId, input) => readTaskSearchSource(store, taskId, input, environment),
250
348
  inspect: (taskId, input) => inspectTaskContext(store, taskId, input, environment),
251
349
  // The same paged family discovery as `task context list`: summaries and
252
350
  // exact references, never bodies; continuations keep their filters.
@@ -1,5 +1,6 @@
1
1
  import { execFile } from "node:child_process";
2
2
  import { promisify } from "node:util";
3
+ import { supportedGit } from "../repository/gitCompatibility.js";
3
4
  const executeFile = promisify(execFile);
4
5
  export async function captureManagedGitChanges(input) {
5
6
  await assertManagedHead(input);
@@ -61,8 +62,9 @@ async function assertManagedHead(input) {
61
62
  return headCommit;
62
63
  }
63
64
  async function git(args) {
65
+ const program = supportedGit();
64
66
  try {
65
- const result = await executeFile("git", [...args], {
67
+ const result = await executeFile(program.path, [...args], {
66
68
  encoding: "utf8",
67
69
  maxBuffer: 16 * 1024 * 1024,
68
70
  timeout: 120_000
@@ -276,6 +276,15 @@ Queue/steer require `--request-id`; steer/interrupt require `--expected-target`.
276
276
  These commands retain the caller's existing Session authority; do not fabricate
277
277
  a Task/Run or borrow the browser's user authority. Configuration remains under
278
278
  `config role`, lifecycle under `session`. New controlled Global Sessions use the Host console.
279
+ The current controlled Codex Operator and Task Leader can also open a native
280
+ TUI view from Web Terminal. Its authenticated loopback relay attaches to the
281
+ Host's existing App Server connection and exact Thread. Complete text prompts,
282
+ steer and interrupt reuse Host admission and settlement; native server requests
283
+ retain their original request/Thread/Turn identity. Configuration overrides and
284
+ new/forked Threads are rejected. Web uses the existing terminal writer lease;
285
+ other browser windows remain read-only until the writer detaches. Closing this
286
+ view does not stop the Host or Provider. Conversation and native history remain
287
+ views of the same Provider facts, not a second Task message store.
279
288
  A live unmanaged Session is not silently adopted; an explicit Session lifecycle
280
289
  action is needed first.
281
290
 
@@ -223,6 +223,13 @@ queue/steer 要求 `--request-id`,steer/interrupt 要求 `--expected-target`
223
223
  配置仍使用 `config role`,生命周期使用 `session`。新的受控 Global Session 使用 Host console。活动的非受管 Session
224
224
  不会被静默采用,需要先执行显式的 Session 生命周期操作。
225
225
 
226
+ 当前受控 Codex Operator 与 Task Leader 也可从 Web Terminal 打开原生 TUI 视图。
227
+ 经过认证的本地 relay 连接 Host 现有 App Server 连接中的精确 Thread;完整文本、
228
+ steer 和 interrupt 复用 Host 准入与回执,原生问题/审批保留原 request/Thread/Turn
229
+ 身份。配置覆盖和新建/派生 Thread 被拒绝。Web 复用已有终端 writer lease,
230
+ 其他窗口在 writer 脱离前保持只读。关闭视图不会停止 Host 或 Provider。会话与
231
+ 原生历史仍来自同一 Provider 事实,不建立另一份 Task 消息存储。
232
+
226
233
  ## 精确结果
227
234
 
228
235
  原生终态只结算相匹配的那次执行。已知的原生 Turn ID 必须匹配;串行流可以使用已证明的
@@ -51,6 +51,34 @@ merely to avoid a version decision. Package versions remain distinct from protoc
51
51
  and persistent-storage contracts: their compatibility checks and required migrations
52
52
  are unchanged, and the storage rules below do not authorize a package release.
53
53
 
54
+ ### 2.4.0 compatibility and migration notes
55
+
56
+ This minor ships the unified Web Task/Operator conversations and same-thread
57
+ Codex terminal access, Task workbench, settings, text materials, pinned
58
+ Markdown/image previews, bounded search and exact selection references,
59
+ Task-owned HTTP previews, current-Session model/Slash controls, Skill browsing
60
+ and explicit bindings. Knowledge applicability, complete frozen Skill packages,
61
+ and sourced usage/cost evidence are included. Git 2.29+ compatibility and the
62
+ Task109 model-validation, terminal-reader isolation and unknown-send recovery
63
+ fixes are included; Task110's unmerged work is not part of this release.
64
+
65
+ Storage is now **1.6**. Use the supported centralized, contiguous same-major
66
+ upgrade path for older supported Homes; do not edit stored records manually.
67
+ Historical missing cost remains unknown. Old Skill provenance is not rebuilt
68
+ from today's files: if restoring an old Session reports missing frozen-package
69
+ evidence, follow its new-Session guidance while preserving the old history.
70
+ Current model adoption is connection-local and does not change future defaults;
71
+ exit the Host-owned native TUI before changing its model (closing a viewer only
72
+ detaches it). Unknown sends must be inspected by their original request ID,
73
+ not replayed from a fresh tab. These are explicit behavioral boundaries, not
74
+ a general backward-compatibility promise.
75
+
76
+ The [Task109 report](testing/web-coverage-final.md) records Linux browser and
77
+ real-model evidence with its original platform and sandbox limitations.
78
+ Official CI/package smoke is separate evidence, not macOS browser/live-model
79
+ coverage. Real-model checks remain opt-in. Publishing this package does not
80
+ upgrade the global CLI, migrate a user's Home or restart their Controller.
81
+
54
82
  ### 2.3.0 compatibility and migration notes
55
83
 
56
84
  This minor release separates Task acceptance and verified remote delivery from
@@ -36,6 +36,27 @@ Agent 选择一个预先声明的计划,设施从持久状态驱动该计划
36
36
  不能将不兼容冒称为兼容,也不为回避版本选择新增历史兼容机制。包版本与协议、
37
37
  持久存储契约仍然独立:兼容性检查和必要迁移要求不变,下文存储规则不授予发版权限。
38
38
 
39
+ ### 2.4.0 兼容性及迁移说明
40
+
41
+ 本 minor 发布统一 Web Task/Operator 对话及同 Thread Codex 终端、任务工作台、
42
+ 设置、文本材料、固定版本 Markdown/图片预览、有界检索与精确选区引用、
43
+ Task-owned HTTP 预览、当前 Session 模型/Slash 操作,以及 Skill 浏览和显式绑定。
44
+ 同时包含 Knowledge 适用范围、完整冻结 Skill 包、具来源的用量/费用证据、
45
+ Git 2.29+ 支持,以及 Task109 的模型校验、终端读者隔离和未知发送恢复修复。
46
+ Task110 尚未合入的工作不属于本版本。
47
+
48
+ 存储版本现为 **1.6**。旧的受支持 Home 应走集中、连续的同主版本升级路径,
49
+ 不要手工修改存储记录。历史缺失费用仍为未知;旧 Skill 来源不会从今天的文件
50
+ 补造。恢复旧 Session 若提示缺少冻结包证据,应保留旧历史并按提示建立新 Session。
51
+ 当前模型操作只作用于本次连接,不修改未来默认值;切换模型前须退出 Host 持有的
52
+ 原生 TUI,关闭浏览器查看器仅断开查看。未知发送必须查询原 request-id,
53
+ 不能通过新标签页重放。这些是明确的行为边界,不是一般向后兼容承诺。
54
+
55
+ [Task109 报告](testing/web-coverage-final.md) 保留 Linux 浏览器和真实模型证据,
56
+ 以及原平台/沙箱限制。正式 CI/安装包冒烟是独立证据,不代表 macOS 浏览器或
57
+ 真实模型覆盖。真实模型测试保持 opt-in。发布本包不会升级全局 CLI、迁移用户
58
+ Home 或重启其 Controller。
59
+
39
60
  ### 2.3.0 兼容性及迁移说明
40
61
 
41
62
  本次 minor 将 Task 验收与已核验的远端交付、不可变 Integration 历史、
@@ -2,11 +2,48 @@
2
2
 
3
3
  # Storage baseline 1.0
4
4
 
5
- Current storage is 1.2. The declared 1.1 → 1.2 transition adds optional
5
+ Current storage is 1.6. The declared 1.5 → 1.6 transition adds optional
6
+ source-attributed monetary evidence to canonical runtime observations. Existing
7
+ observations remain unchanged: absent amounts and prices stay unknown. The SQL
8
+ layout is unchanged.
9
+
10
+ The declared 1.3 → 1.4 transition gives Project
11
+ Knowledge applicability and exact version history, and updates proposal
12
+ fingerprints to include applicability and replacement intent. It restores
13
+ `scope`/`expiresWhen` only from an exact matching accepted proposal. Migrated
14
+ knowledge starts at version 1 of the observed head; older proposals remain
15
+ available, but missing historical edits are not invented. Frozen Context
16
+ snapshots and their digests are unchanged. The SQL layout is unchanged.
17
+
18
+ The declared 1.2 → 1.3 transition adds optional exact Session fences to
19
+ structured inputs and permits their explicit nondelivery reason without an
20
+ Assignment. Existing Role-addressed inputs remain unchanged.
21
+
22
+ The declared 1.1 → 1.2 transition adds optional
6
23
  CapabilityGrant authorization-source evidence and native-human input/archive
7
24
  audit records. Existing valid Operator grants remain unchanged; migration does
8
25
  not infer or invent past user authority. The SQL layout is unchanged.
9
26
 
27
+ The 1.4 → 1.5 transition introduces complete Skill package references in
28
+ effective launch snapshots and Session Manifests. Historical records and their
29
+ digests are preserved byte-for-byte; missing package metadata explicitly means
30
+ legacy entrypoint-only/unrecorded evidence. Migration cannot recover resources
31
+ that were never captured. Existing running Hosts keep their original inputs;
32
+ restoring a legacy Session requires explicitly selecting a new Session. No
33
+ ordinary reader backfills historical versions from mutable sources.
34
+
35
+ New launches snapshot raw resources under `runtime/skill-packages/<digest>`.
36
+ The version covers sorted relative paths, SHA-256 byte digests, sizes and
37
+ executable flags. Builtin Skills share a complete sibling tree to preserve
38
+ cross-Role references; configured Skills are bounded to their own directory.
39
+ Symlinks and special files are rejected, as are packages exceeding 2,048 files,
40
+ 8 MiB per file, 32 MiB total or 32 directory levels. Scripts are retained,
41
+ never run on import. Sources must be readable and physically rooted.
42
+ Sessions and AgentRuns retain the compact source/version/inventory pointers;
43
+ file bodies stay in the package. Changing a source affects a new Session only.
44
+ Lost or corrupted packages fail closed rather than being rebuilt from current
45
+ sources.
46
+
10
47
  Yui 1.0.0 starts from one clean persistent contract. The package version,
11
48
  storage schema, record envelopes and Controller protocol are separate
12
49
  identities; none is inferred from another.
@@ -2,6 +2,28 @@
2
2
 
3
3
  # 存储基线 1.0
4
4
 
5
+ 当前存储为 1.5。已声明的 1.3 → 1.4 迁移为正式项目知识增加适用信息和精确版本历史,
6
+ 并将提案指纹扩展到适用范围、失效条件及替代意图。仅从精确匹配的已接受提案恢复
7
+ `scope`/`expiresWhen`;存量知识以已观察到的当前内容建立版本 1,不臆造缺失的修改历史。
8
+ 已有提案的身份、审批和来源保留,冻结的 Context 快照及摘要不改写。物理 SQL 结构不变。
9
+
10
+ 既有 1.2 → 1.3 迁移为结构化输入增加可选的精确 Session 限定和无 Assignment
11
+ 时的明确未投递原因;既有按 Role 寻址的输入保持原样,不推断历史 Session 选择。
12
+
13
+ 1.4 → 1.5 在现有 effective launch 和 Session
14
+ Manifest 中新增完整 Skill 包引用,不改 SQL 布局。历史记录与摘要原样保留;
15
+ 缺少包元数据明确表示旧版只记录入口正文或没有装载证据,不能拿当前源目录
16
+ 补造历史版本。运行中的旧 Host 保留原输入;恢复缺少包快照的旧 Session 时
17
+ 会给出需要显式创建新 Session 的诊断,不在普通读取中迁移或回填。
18
+
19
+ 新 Session 将资源保存到 `runtime/skill-packages/<digest>`,摘要覆盖排序后的
20
+ 相对路径、原始文件字节摘要、大小与可执行标志。内置 Skills 共享完整兄弟目录,
21
+ 保留跨 Role 相对引用;自定义 Skill 限于其自身目录。拒绝符号链接、特殊文件,
22
+ 以及超过 2,048 个文件、单文件 8 MiB、总计 32 MiB 或 32 层目录的包。
23
+ 脚本只保存,不因装载而执行。Session、AgentRun、CLI 和 Web 复用精简来源、
24
+ 版本与资源清单引用,不复制大文件正文。源更新只影响新 Session;快照丢失或
25
+ 损坏明确报错,不从当前源目录重建。
26
+
5
27
  Yui 1.0.0 从唯一、纯净的持久化契约开始。软件包版本、存储结构、记录封装和
6
28
  Controller 协议是相互独立的身份,不能从其中一个推断另一个。
7
29
 
@@ -25,6 +25,34 @@ and semantic progress.
25
25
 
26
26
  ## Query and page contract
27
27
 
28
+ ### Project knowledge
29
+
30
+ Current Task and Run Context select active knowledge only from the bound
31
+ projects. `scope` and `expiresWhen` are free text: the Agent reads the original
32
+ and decides whether it applies to the actual task. Engineering does not infer
33
+ semantic expiry or execute knowledge content. Explicit Operator retirement
34
+ removes an entry from future current Context; frozen Run evidence is unchanged.
35
+ Context pointers expose applicability and version, with complete source and
36
+ prior versions available through the exact detail read.
37
+
38
+ `project knowledge list` and `project knowledge proposals list` return compact
39
+ `items/total/complete/nextCursor` pages (`--limit`, `--cursor`); `--all` includes
40
+ retired knowledge or decided proposals respectively. `show` returns the exact
41
+ knowledge/proposal, or `contentPage` for a long record: continue with its cursor
42
+ and concatenate `text` in offset order before parsing. Mutation receipts contain
43
+ identities, not the entire Project. Web’s Task Records → Project knowledge uses
44
+ the same paged discovery and exact source reader.
45
+
46
+ Proposal identity includes project, source Task/Decision/Milestone/commit,
47
+ title, body, scope, expiry condition and superseded knowledge ID. Only outer
48
+ whitespace is trimmed; internal whitespace, case and Unicode remain significant.
49
+ An omitted condition differs from a supplied one; omit a condition in a
50
+ replacement proposal to clear it upon `accept --update`. A repeated identical
51
+ proposal reuses its existing pending/accepted identity. Changed applicability
52
+ still requires the existing Operator approval, including explicit `--update`
53
+ for a same-title replacement. Each effective update or retirement increments
54
+ the formal version and preserves its exact prior content and provenance.
55
+
28
56
  ```sh
29
57
  yui task list --project project-1 --status active --limit 20 --json
30
58
  yui task list --attention openInputs --json
@@ -50,12 +50,12 @@ is required.
50
50
  ## Permanent core smoke
51
51
 
52
52
  `npm test` and `npm run test:core` build the checkout and run the maintained suite.
53
- The stable suite owns current storage 1.2 and its declared 1.0/1.1 minor
53
+ The stable suite owns current storage 1.6 and its declared 1.0/1.1/1.2/1.3/1.4/1.5 minor
54
54
  transition. It contains no undeclared historical format compatibility path.
55
55
 
56
56
  Current coverage includes:
57
57
 
58
- 1. Fresh storage 1.2, exact schema/record validation, no initialization over
58
+ 1. Fresh storage 1.6, exact schema/record validation, no initialization over
59
59
  unknown data, and rejection of old integer formats without mutation.
60
60
  2. Exact-version staging, mismatched-target refusal, same-major contiguous
61
61
  minor preflight, explicit maintenance-owner identity across handover, and
@@ -40,7 +40,7 @@ Yui 是面向编程 Agent 的本地控制面。你只需用自然语言把目标
40
40
  npm 包包含 Linux x64、Mac Intel 和 Apple Silicon 的 Yui 预编译程序。
41
41
  同一份包在三个平台验证后发布,运行时只选择对应平台的程序。
42
42
 
43
- 需要 Linux x64 / glibc 或 macOS(x64 或 Apple Silicon)、Git、tmux,以及
43
+ 需要 Linux x64 / glibc 或 macOS(x64 或 Apple Silicon)、Git 2.29.0 或更新版本、tmux,以及
44
44
  Node.js `^20.17.0`、`^22.9.0`、`^24.0.0` 或 `^26.0.0`。macOS 上可用
45
45
  `brew install tmux` 安装 tmux。最简单的方式是先安装 Codex CLI 或 Claude
46
46
  Code CLI,并确保它已经可以使用你自己的账号正常工作。Yui 负责协调 Agent,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zq-silk/yui",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "description": "Local control plane for long-running native agent CLI sessions backed by tmux.",
5
5
  "license": "MIT",
6
6
  "private": false,