@zq-silk/yui 0.6.13 → 0.6.15

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 (90) hide show
  1. package/README.md +34 -5
  2. package/dist/cli/commandCatalog.js +172 -62
  3. package/dist/cli/helpRenderer.js +3 -1
  4. package/dist/cli.js +102 -11
  5. package/dist/commands/configCommands.js +521 -171
  6. package/dist/commands/deliveryGuardPreflight.js +2 -2
  7. package/dist/commands/executionAuditCommands.js +56 -3
  8. package/dist/commands/projectCommands.js +518 -55
  9. package/dist/commands/releaseCommands.js +0 -1
  10. package/dist/commands/taskActor.js +17 -0
  11. package/dist/commands/taskBaseCommands.js +29 -0
  12. package/dist/commands/taskCommands.js +577 -126
  13. package/dist/commands/taskContextCommand.js +36 -2
  14. package/dist/commands/taskNextActionCommand.js +48 -3
  15. package/dist/commands/taskPublicationCommands.js +319 -0
  16. package/dist/commands/taskRoleRuntimeStatus.js +83 -59
  17. package/dist/commands/telemetryCommands.js +14 -13
  18. package/dist/config/yuiConfig.js +161 -8
  19. package/dist/context/sessionContextBudget.js +71 -0
  20. package/dist/context/wakeNotification.js +65 -0
  21. package/dist/controller/clientRuntime.js +2 -1
  22. package/dist/controller/ephemeralResourceReaper.js +2 -1
  23. package/dist/controller/fileSchedulerStoreAdapter.js +191 -16
  24. package/dist/controller/jobSupervisor.js +5 -4
  25. package/dist/controller/resourceCleanupLinux.js +6 -6
  26. package/dist/controller/resourceInventoryLinux.js +3 -3
  27. package/dist/controller/runtime.js +88 -10
  28. package/dist/controller/updateReconciliation.js +4 -3
  29. package/dist/doctor/doctor.js +26 -7
  30. package/dist/executor/agentConfigurationCatalog.js +18 -0
  31. package/dist/executor/fileRoleLaunchPlanner.js +3 -3
  32. package/dist/lifecycle/contextBudgetRollover.js +81 -0
  33. package/dist/lifecycle/exactRunTerminalization.js +16 -2
  34. package/dist/lifecycle/providerErrorClass.js +33 -12
  35. package/dist/observability/executionAudit.js +214 -6
  36. package/dist/output/table.js +18 -0
  37. package/dist/repository/gitWorkspace.js +92 -0
  38. package/dist/repository/project.js +218 -4
  39. package/dist/repository/taskBaseFreshness.js +318 -0
  40. package/dist/repository/taskWorkspacePreparer.js +16 -2
  41. package/dist/review/deltaRecheck.js +253 -0
  42. package/dist/review/reviewConfig.js +31 -0
  43. package/dist/review/reviewFindingLedger.js +5 -1
  44. package/dist/review/reviewRound.js +156 -1
  45. package/dist/run/providerRetry.js +21 -3
  46. package/dist/run/providerRetryConfig.js +13 -60
  47. package/dist/run/recoveryProjection.js +198 -0
  48. package/dist/runtime/builtinAgentDrivers.js +3 -0
  49. package/dist/runtime/builtinTranscriptUsage.js +76 -32
  50. package/dist/runtime/continuationManager.js +17 -0
  51. package/dist/runtime/index.js +2 -0
  52. package/dist/runtime/launchDiagnostics.js +154 -0
  53. package/dist/runtime/lifecycleReservation.js +13 -0
  54. package/dist/runtime/providerContinuation.js +38 -0
  55. package/dist/runtime/providerContinuationReconciliationService.js +1 -0
  56. package/dist/runtime/providerErrorCodes.js +278 -0
  57. package/dist/runtime/runtimeHealthPolicy.js +20 -0
  58. package/dist/runtime/runtimeObservation.js +7 -1
  59. package/dist/runtime/runtimeProjection.js +115 -23
  60. package/dist/runtime/tmuxAdapters.js +242 -48
  61. package/dist/scheduler/activeRoleRunDelivery.js +139 -3
  62. package/dist/scheduler/activeTaskProgress.js +4 -3
  63. package/dist/scheduler/leaderWakeupProcessor.js +105 -15
  64. package/dist/scheduler/roleRunLiveness.js +2 -1
  65. package/dist/scheduler/roleRunStall.js +3 -2
  66. package/dist/scheduler/taskWake.js +72 -0
  67. package/dist/scheduler/wakeReason.js +64 -0
  68. package/dist/scheduler/wakeupQueue.js +2 -1
  69. package/dist/setup/setupCommand.js +1 -1
  70. package/dist/storage/migration/productionRegistry.js +325 -1
  71. package/dist/storage/sqliteSchema.js +61 -2
  72. package/dist/storage/sqliteStore.js +129 -2
  73. package/dist/storage/storeRpc.js +1 -0
  74. package/dist/storage/taskStore.js +262 -5
  75. package/dist/storage/upgrade/recordVersions.js +6 -1
  76. package/dist/storage/upgrade/sqliteStateMigration.js +22 -2
  77. package/dist/task/completionReadiness.js +289 -0
  78. package/dist/task/publicationReference.js +123 -0
  79. package/dist/task/taskRecordReference.js +3 -1
  80. package/dist/telemetry/telemetryConfig.js +23 -18
  81. package/dist/telemetry/telemetryWiring.js +8 -8
  82. package/dist/tmux/tmuxManager.js +50 -9
  83. package/dist/web/assets/client/i18n.js +4 -0
  84. package/dist/web/assets/client/view.js +18 -0
  85. package/dist/web/webSnapshot.js +100 -10
  86. package/i18n/README.zh-CN.md +5 -5
  87. package/package.json +1 -1
  88. package/skills/yui-leader/SKILL.md +49 -10
  89. package/skills/yui-operator/SKILL.md +17 -3
  90. package/skills/yui-worker/SKILL.md +8 -0
@@ -1,8 +1,8 @@
1
- import { leaderNextActionMode } from "../config/yuiConfig.js";
1
+ import { resolveLeaderNextActionMode } from "../config/yuiConfig.js";
2
2
  import { usageError } from "../errors/cliError.js";
3
3
  import { detectDeliveryDuplicates, evaluateDeliveryGuard, evaluateSemanticBudget, formatDeliveryDuplicate } from "../task/deliveryGuard.js";
4
4
  export function runDeliveryGuardPreflight(store, taskId, intent, options = {}) {
5
- const mode = leaderNextActionMode(store.getConfig().leaderNextActionMode, options.environment);
5
+ const mode = resolveLeaderNextActionMode(store.getConfig().leaderNextActionMode);
6
6
  if (mode === "display")
7
7
  return { warnings: [] };
8
8
  const facts = store.readNextActionFacts(taskId);
@@ -104,6 +104,15 @@ export function renderExecutionAudit(report, width = defaultTableWidth()) {
104
104
  { header: "Count", minWidth: 5, maxWidth: 8 }
105
105
  ], faultRows.map(([name, count]) => [name, String(count)]), width));
106
106
  }
107
+ if (runs.launchFailures.total > 0) {
108
+ const phaseRows = Object.entries(runs.launchFailures.byPhase)
109
+ .filter(([, count]) => count > 0)
110
+ .sort((left, right) => right[1] - left[1]);
111
+ const kindRows = Object.entries(runs.launchFailures.byKind)
112
+ .filter(([, count]) => count > 0)
113
+ .sort((left, right) => right[1] - left[1]);
114
+ lines.push("", `Launch failures: ${runs.launchFailures.total}`, `By phase: ${phaseRows.map(([name, count]) => `${name}=${count}`).join(" · ")}`, `By kind: ${kindRows.map(([name, count]) => `${name}=${count}`).join(" · ")}`);
115
+ }
107
116
  }
108
117
  else {
109
118
  lines.push("", ...sectionError("runs", report));
@@ -111,7 +120,10 @@ export function renderExecutionAudit(report, width = defaultTableWidth()) {
111
120
  if (report.wakes.status === "ok" && report.wakes.data !== undefined) {
112
121
  const wakes = report.wakes.data;
113
122
  lines.push("", `Leader wakes: ${wakes.leaderRuns} runs · ${wakes.withWakeReasons} with reasons · ${wakes.orphanWakes} orphan wakes (${wakes.orphanYieldOnly} yield-only)`);
114
- if (wakes.suppressedWakes.status === "unsupported") {
123
+ if (wakes.suppressedWakes.status === "ok") {
124
+ lines.push(`Suppressed wakes: ${wakes.suppressedWakes.data ?? 0} (scheduler single-flight, not failed Runs)`);
125
+ }
126
+ else if (wakes.suppressedWakes.status === "unsupported") {
115
127
  lines.push("Suppressed wakes: unsupported (no quiescence producer in this build)");
116
128
  }
117
129
  const reasonRows = Object.entries(wakes.byReason).slice(0, 8);
@@ -127,14 +139,24 @@ export function renderExecutionAudit(report, width = defaultTableWidth()) {
127
139
  }
128
140
  if (report.sessions.status === "ok" && report.sessions.data !== undefined) {
129
141
  const sessions = report.sessions.data;
130
- lines.push("", `Sessions: ${sessions.generations} generations · ${sessions.broken} broken · ${sessions.stopped} stopped · ${sessions.other} other`, `Resets: ${sessions.resets} · lifecycle events ${sessions.lifecycleEvents} · stop failures ${sessions.stopFailures}`);
142
+ lines.push("", `Sessions: ${sessions.generations} generations · ${sessions.broken} broken · ${sessions.stopped} stopped · ${sessions.other} other`, `Resets: ${sessions.resets} · lifecycle events ${sessions.lifecycleEvents} · stop failures ${sessions.stopFailures}`, `Terminal by Run relation: ${sessions.terminalByRunRelation.postRunYielded} post-run-yielded`
143
+ + ` · ${sessions.terminalByRunRelation.runFailed} run-failed`
144
+ + ` · ${sessions.terminalByRunRelation.activeRun} active-run`
145
+ + ` · ${sessions.terminalByRunRelation.noRun} no-run`);
131
146
  }
132
147
  else {
133
148
  lines.push("", ...sectionError("sessions", report));
134
149
  }
135
150
  if (report.reviews.status === "ok" && report.reviews.data !== undefined) {
136
151
  const reviews = report.reviews.data;
137
- lines.push("", `Review rounds: ${reviews.total} total · ${reviews.completed} completed · ${reviews.failed} failed`, `Execution failures: ${reviews.infraFailed} · semantic negatives: ${reviews.semanticNegative}`);
152
+ lines.push("", `Review rounds: ${reviews.total} total · ${reviews.completed} completed · ${reviews.failed} failed`, `Execution failures: ${reviews.infraFailed} · semantic negatives: ${reviews.semanticNegative}`, ...(reviews.deltaRechecks.total === 0
153
+ ? []
154
+ : [
155
+ `Delta-rechecks: ${reviews.deltaRechecks.total} total · `
156
+ + `${reviews.deltaRechecks.equivalentAndAccepted} accepted · `
157
+ + `${reviews.deltaRechecks.finding} finding · `
158
+ + `${reviews.deltaRechecks.requiresFullReview} escalated to full Review`
159
+ ]));
138
160
  }
139
161
  else {
140
162
  lines.push("", ...sectionError("reviews", report));
@@ -146,6 +168,13 @@ export function renderExecutionAudit(report, width = defaultTableWidth()) {
146
168
  else {
147
169
  lines.push("", ...sectionError("integrations", report));
148
170
  }
171
+ if (report.publications.status === "ok" && report.publications.data !== undefined) {
172
+ const publications = report.publications.data;
173
+ lines.push("", `Publication references: ${publications.total} total · ${publications.merged} merged · ${publications.verified} verified · ${publications.open} open · ${publications.closed} closed · ${publications.superseded} superseded`);
174
+ }
175
+ else {
176
+ lines.push("", ...sectionError("publications", report));
177
+ }
149
178
  if (report.events.status === "ok" && report.events.data !== undefined) {
150
179
  const events = report.events.data;
151
180
  lines.push("", `Events: ${events.total} total · ${events.progressEvents} provider-progress (${(events.progressShare * 100).toFixed(1)}%) · ${events.semanticEvents} semantic · ${events.obsoleteEvents} obsolete`, `Messages: ${events.messages}`);
@@ -153,6 +182,30 @@ export function renderExecutionAudit(report, width = defaultTableWidth()) {
153
182
  else {
154
183
  lines.push("", ...sectionError("events", report));
155
184
  }
185
+ if (report.providerRetries.status === "ok" && report.providerRetries.data !== undefined) {
186
+ const retries = report.providerRetries.data;
187
+ if (retries.total > 0) {
188
+ lines.push("", `Provider retries: ${retries.total} run(s) retried in place · ${retries.terminal} terminal`);
189
+ lines.push(renderTable("Provider retry lineages", [
190
+ { header: "Task", minWidth: 8, maxWidth: 14 },
191
+ { header: "Run", minWidth: 14, maxWidth: 24 },
192
+ { header: "Role", minWidth: 8, maxWidth: 12 },
193
+ { header: "Attempts", minWidth: 8, maxWidth: 10 },
194
+ { header: "Error class", minWidth: 14, maxWidth: 24 },
195
+ { header: "Decision", minWidth: 14, maxWidth: 26 }
196
+ ], retries.entries.map((entry) => [
197
+ entry.taskId,
198
+ entry.runId,
199
+ entry.roleName,
200
+ String(entry.attempts),
201
+ entry.errorClass,
202
+ entry.decision
203
+ ]), width));
204
+ }
205
+ }
206
+ else {
207
+ lines.push("", ...sectionError("providerRetries", report));
208
+ }
156
209
  if (report.workItems.status === "ok" && report.workItems.data !== undefined) {
157
210
  const items = report.workItems.data;
158
211
  lines.push("", `Work items: ${items.total} total · ${items.completed} completed · ${items.retired} retired`);