@zq-silk/yui 0.12.3 → 0.13.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 (32) hide show
  1. package/dist/cli/commandCatalog.js +2 -2
  2. package/dist/cli/updatePorts.js +18 -2
  3. package/dist/cli.js +3 -6
  4. package/dist/commands/durableJobCommands.js +6 -18
  5. package/dist/commands/executionAuditCommands.js +1 -1
  6. package/dist/commands/taskActor.js +35 -61
  7. package/dist/commands/taskCommands.js +260 -200
  8. package/dist/commands/taskIntegrationCommands.js +33 -24
  9. package/dist/commands/taskIntegrationQueueCommands.js +16 -18
  10. package/dist/commands/taskPublicationCommands.js +0 -4
  11. package/dist/commands/taskWorkspaceCommands.js +1 -1
  12. package/dist/context/runContextPack.js +15 -0
  13. package/dist/controller/fileSchedulerStoreAdapter.js +17 -1
  14. package/dist/controller/jobClient.js +5 -8
  15. package/dist/controller/jobControl.js +59 -105
  16. package/dist/executor/workspacePreflightClassification.js +6 -5
  17. package/dist/integration/gitIntegrationService.js +3 -3
  18. package/dist/integration/integrationAttempt.js +13 -9
  19. package/dist/integration/integrationQueueService.js +7 -7
  20. package/dist/lifecycle/exactRunTerminalization.js +146 -6
  21. package/dist/milestone/milestone.js +9 -3
  22. package/dist/review/deltaRecheck.js +1 -1
  23. package/dist/review/reviewFinding.js +3 -3
  24. package/dist/review/reviewRound.js +11 -8
  25. package/dist/run/rejectedYieldAttempt.js +221 -0
  26. package/dist/runtime/tmuxAdapters.js +12 -3
  27. package/dist/scheduler/activeRoleRunDelivery.js +4 -0
  28. package/dist/storage/migration/productionRegistry.js +9 -0
  29. package/dist/storage/taskStore.js +9 -8
  30. package/package.json +1 -1
  31. package/skills/yui-leader/SKILL.md +4 -0
  32. package/skills/yui-operator/SKILL.md +19 -13
@@ -67,13 +67,13 @@ export const CURRENT_CONTEXT_SNAPSHOT_SCHEMA_VERSION = 1;
67
67
  export const CURRENT_TASK_ROLE_SCHEMA_VERSION = 3;
68
68
  export const CURRENT_MANAGED_WORKSPACE_SCHEMA_VERSION = 2;
69
69
  export const CURRENT_WORK_ITEM_SCHEMA_VERSION = 12;
70
- export const CURRENT_REVIEW_ROUND_SCHEMA_VERSION = 5;
70
+ export const CURRENT_REVIEW_ROUND_SCHEMA_VERSION = 6;
71
71
  export const CURRENT_CHANGE_SET_SCHEMA_VERSION = 3;
72
- export const CURRENT_INTEGRATION_ATTEMPT_SCHEMA_VERSION = 4;
72
+ export const CURRENT_INTEGRATION_ATTEMPT_SCHEMA_VERSION = 5;
73
73
  export const CURRENT_MESSAGE_SCHEMA_VERSION = 3;
74
74
  export const CURRENT_INPUT_REQUEST_SCHEMA_VERSION = 2;
75
75
  export const CURRENT_DECISION_SCHEMA_VERSION = 1;
76
- export const CURRENT_MILESTONE_SCHEMA_VERSION = 1;
76
+ export const CURRENT_MILESTONE_SCHEMA_VERSION = 2;
77
77
  export const CURRENT_EVENT_SCHEMA_VERSION = 2;
78
78
  export const CURRENT_CAPABILITY_GRANT_SCHEMA_VERSION = 1;
79
79
  export const CURRENT_RELEASE_WORKFLOW_SCHEMA_VERSION = 1;
@@ -2621,8 +2621,10 @@ function storedMilestone(value) {
2621
2621
  validateTaskRecordReference({ taskId: milestone.taskId, localId: milestone.id }, "milestone");
2622
2622
  requireNormalizedText(milestone.title, "Milestone title");
2623
2623
  requireNormalizedText(milestone.summary, "Milestone summary");
2624
- if (milestone.createdBy !== "leader") {
2625
- throw new StorageRecordError("Milestone createdBy must be leader.");
2624
+ if (milestone.createdBy !== "user"
2625
+ && milestone.createdBy !== "operator"
2626
+ && milestone.createdBy !== "leader") {
2627
+ throw new StorageRecordError("Milestone createdBy is invalid.");
2626
2628
  }
2627
2629
  requireTimestamp(milestone.createdAt, "Milestone createdAt");
2628
2630
  return milestone;
@@ -3950,9 +3952,8 @@ function validReviewRoundTransition(existing, candidate) {
3950
3952
  || !isDeepStrictEqual(existing.taskCandidate, candidate.taskCandidate)
3951
3953
  || !sameTaskFinalReviewContract(existing.taskFinalReviewContract, candidate.taskFinalReviewContract)
3952
3954
  || !compatibleExecutionGroups(existing.executionGroup, candidate.executionGroup)
3953
- // Issue 06: a Leader retry resets a failed Task-final Round to pending;
3954
- // the retry is itself a Leader request, so requestedBy may change from
3955
- // the original policy/contract value to "leader".
3955
+ // Issue 06: an explicit Task-control retry resets a failed Task-final
3956
+ // Round to pending, so requestedBy may change from the original actor.
3956
3957
  || (existing.requestedBy !== candidate.requestedBy
3957
3958
  && !(existing.status === "failed"
3958
3959
  && candidate.status === "pending"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zq-silk/yui",
3
- "version": "0.12.3",
3
+ "version": "0.13.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,
@@ -13,6 +13,10 @@ Own Task direction, decomposition, semantic decisions, acceptance, integration,
13
13
  and durable context. The Task is the bounded user outcome. A WorkItem is only
14
14
  one substantial, independently acceptable requirement with a distinct owner;
15
15
  it is not the default container for every edit, check, finding, or repair.
16
+ For Leader and Operator, this ownership is a default responsibility, not an
17
+ action-permission boundary. The global Operator has the same Task control
18
+ surface and may act directly; always read current durable state and let
19
+ transactional fences resolve races.
16
20
 
17
21
  Do not invent another execution entity or a `yui ... subagent` command.
18
22
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: yui-operator
3
- description: Route multi-project user requests into Yui Tasks, configure Yui through confirmed conversation, preserve durable intent, present progress, answer inputs, and administer lifecycle without taking over Leader decisions.
3
+ description: Route multi-project user requests into Yui Tasks, configure Yui through confirmed conversation, preserve durable intent, present progress, answer inputs, and exercise full Task control when useful.
4
4
  ---
5
5
 
6
6
  # Yui Operator
@@ -11,9 +11,11 @@ workspace.
11
11
 
12
12
  Be the task-neutral user entry point. The user should be able to discuss
13
13
  features, bugs, investigations, and questions across multiple Projects without
14
- managing Yui records. Route each request to the correct Project and Task; leave
15
- decomposition, execution-path selection, semantic decisions, acceptance, and
16
- integration to that Task's Leader.
14
+ managing Yui records. Route each request to the correct Project and Task. The
15
+ Leader is the default local coordinator, but between Operator and Leader, Role
16
+ is a responsibility hint rather than an action-permission boundary: the
17
+ Operator may perform any legal Task action when that is the clearest way to
18
+ advance or recover the outcome.
17
19
 
18
20
  ## Communicate with the user
19
21
 
@@ -142,9 +144,9 @@ yui task activate <new-task-id>
142
144
 
143
145
  Resolve all known Projects before creating repository-backed work. If Project
144
146
  identity is ambiguous, ask one targeted question. An active Task may gain
145
- another Project only when its Leader decides that the repository is required
146
- for the same bounded outcome; route that request to the Leader instead of
147
- silently changing scope. Use bare `operator submit` only for a confirmed
147
+ another Project when the Operator or Leader determines that the repository is
148
+ required for the same bounded outcome. Read the current Task state first and
149
+ record the scope change directly. Use bare `operator submit` only for a confirmed
148
150
  Gitless mission. It creates a Draft, which may remain Draft while material
149
151
  scope is unresolved; activate it once that scope is ready for execution.
150
152
  Report the Task ID, Projects,
@@ -154,7 +156,8 @@ separate Tasks merely because it spans several Projects or files. A Task may
154
156
  carry many features and rounds of WorkItems toward its shared outcome, but it is
155
157
  not a permanent backlog; genuinely independent goals become their own Tasks.
156
158
 
157
- Record Project-defined Task intent and leave execution topology to the Leader.
159
+ Record Project-defined Task intent. The Leader normally chooses execution
160
+ topology, while the Operator may choose or change it when acting on the Task.
158
161
  For software Projects, use `--type bugfix` or `--type feature`. A bugfix is
159
162
  Leader-owned; if it expands into independently owned delivery requirements,
160
163
  the Leader reclassifies it as a feature before creating WorkItems. For a
@@ -240,9 +243,10 @@ For work that does not need Git, create a Task without `--project`.
240
243
  Profiles are versioned, provider-neutral Worker behavior templates. A Task Role
241
244
  is a mutable Task-bound Worker instance with one or more Agent bindings and
242
245
  per-binding runtime configuration. A WorkItem is the only bounded work record.
243
- Do not pre-split WorkItems or decide their dependsOn, execution path,
244
- acceptance, or Integration; the Leader owns WorkItem creation, replacement,
245
- parallel dispatch, dependency and conflict resolution inside the one Task.
246
+ Avoid unnecessary WorkItems. Either Operator or Leader may create, replace,
247
+ dispatch, accept, integrate, and resolve dependencies or conflicts inside the
248
+ Task; use current durable state and the command's consistency fences to avoid
249
+ duplicate or conflicting decisions.
246
250
 
247
251
  The Leader chooses among direct execution, native subagents, and a Task Role
248
252
  AgentRun. Native subagents are created inside the Leader Session, inherit the
@@ -341,8 +345,10 @@ the workflow without claiming that version was delivered.
341
345
  such as a Run's terminal state, a committed Integration, or a runtime version,
342
346
  read the state and report it; never ask the user to confirm "continue" as a
343
347
  scheduler for machine-observable progress.
344
- - Do not decide code, semantic, requirement, acceptance, or integration
345
- conflicts on the Leader's behalf.
348
+ - Prefer the current Leader's coherent plan when it remains valid, but do not
349
+ treat it as a permission boundary. The Operator may make code, semantic,
350
+ requirement, acceptance, recovery, and integration decisions and must leave
351
+ the real actor and rationale in durable Task state.
346
352
  - Reconcile a disappeared native Session with `task reconcile`; inspect the Run
347
353
  before retrying a confirmed failure.
348
354
  - If the current Provider Conversation cannot continue, use