@zq-silk/yui 0.8.3 → 0.8.7
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.
- package/ARCHITECTURE.md +40 -22
- package/README.md +66 -19
- package/dist/cli/commandCatalog.js +43 -14
- package/dist/cli/operatorWizard.js +10 -20
- package/dist/cli/updatePorts.js +6 -0
- package/dist/cli.js +252 -37
- package/dist/commands/executionAuditCommands.js +30 -0
- package/dist/commands/globalRoleCommands.js +8 -4
- package/dist/commands/operatorCommands.js +42 -1
- package/dist/commands/taskCommands.js +527 -147
- package/dist/commands/taskCompletionGate.js +36 -24
- package/dist/commands/taskContextCommand.js +11 -4
- package/dist/commands/taskInputCommands.js +48 -10
- package/dist/commands/taskNextActionCommand.js +38 -3
- package/dist/commands/taskOverviewCommand.js +2 -1
- package/dist/commands/taskRoleRuntimeStatus.js +2 -1
- package/dist/context/runContextPack.js +9 -5
- package/dist/context/sessionBootstrapManifest.js +158 -11
- package/dist/context/wakeNotification.js +5 -3
- package/dist/controller/clientRuntime.js +15 -15
- package/dist/controller/controller.js +16 -8
- package/dist/controller/fileSchedulerStoreAdapter.js +67 -7
- package/dist/controller/handoverCandidate.js +10 -3
- package/dist/controller/sessionNotify.js +4 -22
- package/dist/executor/agentAdapter.js +2 -2
- package/dist/executor/agentExecutor.js +29 -9
- package/dist/executor/fileRoleLaunchPlanner.js +37 -45
- package/dist/integration/gitIntegrationService.js +50 -2
- package/dist/integration/integrationCheckEvidenceReuse.js +53 -0
- package/dist/observability/executionAudit.js +47 -1
- package/dist/observability/faultClassification.js +6 -4
- package/dist/observability/orchestrationMetrics.js +196 -0
- package/dist/operator/operatorSessionHistory.js +36 -0
- package/dist/release/releaseHandover.js +7 -5
- package/dist/release/runtimeRelease.js +15 -0
- package/dist/repository/taskWorkspaceCoordinator.js +13 -10
- package/dist/review/deltaRecheck.js +3 -2
- package/dist/review/reviewFindingLedger.js +5 -4
- package/dist/review/reviewOutcomeClassifier.js +263 -54
- package/dist/review/taskFinalReviewContractEvent.js +1 -0
- package/dist/review/taskFinalReviewContractRebind.js +367 -0
- package/dist/run/runIdentity.js +10 -70
- package/dist/runtime/agentHost.js +3 -4
- package/dist/runtime/codexAppServerRuntime.js +6 -0
- package/dist/runtime/exactControlPlane.js +47 -37
- package/dist/runtime/firstProgressStopLoss.js +54 -0
- package/dist/runtime/launchBroker.js +10 -2
- package/dist/runtime/runtimeDeadlines.js +14 -0
- package/dist/runtime/sessionTitle.js +24 -12
- package/dist/runtime/structuredProviderHost.js +7 -1
- package/dist/runtime/tmuxAdapters.js +10 -3
- package/dist/scheduler/actionability.js +4 -2
- package/dist/scheduler/activeRoleRunDelivery.js +20 -18
- package/dist/scheduler/activeTaskProgress.js +2 -1
- package/dist/scheduler/leaderWakeupProcessor.js +33 -2
- package/dist/scheduler/taskExecutionProjection.js +13 -4
- package/dist/scheduler/wakeReason.js +1 -0
- package/dist/storage/sqliteStore.js +18 -3
- package/dist/storage/taskStore.js +14 -3
- package/dist/task/completionReadiness.js +48 -19
- package/dist/task/deliveryGuard.js +3 -1
- package/dist/task/nextAction.js +153 -55
- package/dist/task/repairWave.js +14 -1
- package/dist/task/task.js +10 -0
- package/dist/task/taskRecordRetirement.js +72 -0
- package/dist/web/webSnapshot.js +7 -1
- package/dist/workItem/workItem.js +6 -4
- package/i18n/README.zh-CN.md +48 -9
- package/package.json +1 -1
- package/skills/yui-leader/SKILL.md +73 -31
- package/skills/yui-operator/SKILL.md +58 -10
- package/skills/yui-reviewer/SKILL.md +23 -0
- package/skills/yui-runtime/SKILL.md +6 -6
package/ARCHITECTURE.md
CHANGED
|
@@ -5,13 +5,20 @@ runtimes. The user talks to one Operator. The Operator routes each request to
|
|
|
5
5
|
the right Project and Task; that Task's Leader owns decomposition, execution
|
|
6
6
|
choice, review, integration, and completion.
|
|
7
7
|
|
|
8
|
-
## One
|
|
8
|
+
## One outcome model, two delivery paths
|
|
9
9
|
|
|
10
|
-
`
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
`Task` is the bounded user outcome. Its delivery path is derived from existing
|
|
11
|
+
fields rather than stored as another state machine: no Project bindings means
|
|
12
|
+
`no-project`; a Project-backed Task without `requireIntegration` is `direct`;
|
|
13
|
+
and `requireIntegration=true` is `integrated`.
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
Direct delivery lets the Leader implement and verify a low-risk result in the
|
|
16
|
+
managed Task main without creating a WorkItem. Integrated delivery uses
|
|
17
|
+
`WorkItem` as its only bounded execution unit; it holds the objective,
|
|
18
|
+
acceptance criteria, dependencies, assigned Task Role when applicable,
|
|
19
|
+
lifecycle, and compact reviewed result.
|
|
20
|
+
|
|
21
|
+
For each integrated WorkItem, a Leader chooses one of three execution paths:
|
|
15
22
|
|
|
16
23
|
1. **Direct**: the Leader executes a roleless WorkItem.
|
|
17
24
|
2. **Native subagent**: the Leader creates a child through its current Agent
|
|
@@ -19,8 +26,9 @@ A Leader chooses one of three execution paths for each WorkItem:
|
|
|
19
26
|
3. **Task Role AgentRun**: Yui dispatches a Role-bound WorkItem to a
|
|
20
27
|
Task-managed native Agent Session.
|
|
21
28
|
|
|
22
|
-
There is no Yui subagent launcher
|
|
23
|
-
|
|
29
|
+
There is no Yui subagent launcher or child-session record. A native child on
|
|
30
|
+
direct delivery remains inside the Leader Session and Task-main boundary; a
|
|
31
|
+
native child implementing integrated work uses the WorkItem lifecycle. Managed
|
|
24
32
|
independent execution additionally records an AgentRun.
|
|
25
33
|
|
|
26
34
|
## Profiles, Roles, and Agents
|
|
@@ -57,7 +65,7 @@ effort, round, result, and checks.
|
|
|
57
65
|
|
|
58
66
|
## Lifecycle and acceptance
|
|
59
67
|
|
|
60
|
-
|
|
68
|
+
Integrated Leader-direct and native-subagent WorkItem execution follows:
|
|
61
69
|
|
|
62
70
|
```text
|
|
63
71
|
todo -> running -> done | failed
|
|
@@ -78,16 +86,22 @@ then accepts or rejects with bounded feedback. A rejected isolated WorkItem
|
|
|
78
86
|
keeps its workspace so the next Run can repair the same result.
|
|
79
87
|
|
|
80
88
|
An optional global review rule names one existing Global Role and chooses
|
|
81
|
-
`always`, `leader`, or `final`.
|
|
89
|
+
`always`, `leader`, or `final`. Candidate rules remain live defaults; each
|
|
82
90
|
WorkItem Candidate snapshots the effective legacy rule when submitted.
|
|
83
91
|
Every result awaiting acceptance is stored as an explicit WorkItem candidate.
|
|
84
92
|
`always` dispatches a review AgentRun for every candidate, whether it comes
|
|
85
93
|
from a yielded execution Run or a Leader-managed direct result; `leader`
|
|
86
94
|
leaves every candidate for the Leader to accept directly or review explicitly.
|
|
87
|
-
`final`
|
|
88
|
-
|
|
89
|
-
heads of every bound Project.
|
|
90
|
-
|
|
95
|
+
`final` applies automatically only to integrated delivery: it keeps WorkItem
|
|
96
|
+
acceptance and Integration independent, then `task complete` queues one fresh
|
|
97
|
+
Task-scoped ReviewRound over the frozen committed heads of every bound Project.
|
|
98
|
+
A direct Task may use a bounded native review. When a managed final Review is
|
|
99
|
+
required, it must be promoted before Task main advances; promotion fails after
|
|
100
|
+
a commit or delivery evidence exists so earlier work cannot lose ChangeSet
|
|
101
|
+
provenance.
|
|
102
|
+
Any established immutable Task-final contract or Round remains an obligation.
|
|
103
|
+
A changed integrated head queues a new round; the previous report remains
|
|
104
|
+
evidence. This final Reviewer evaluates the whole
|
|
91
105
|
Task, so normal delivery does not pay for a complete review of every WorkItem.
|
|
92
106
|
Review Runs complete only their exact ReviewRound, leave the WorkItem awaiting
|
|
93
107
|
acceptance, and never trigger another review or append a Candidate. Successful
|
|
@@ -133,8 +147,9 @@ Projects and Task-main context for the rest. The managed dispatch and
|
|
|
133
147
|
writable set. Provider permission is binding configuration: every managed Role
|
|
134
148
|
defaults to `bypass`, while `default` and `configured` preserve provider-native
|
|
135
149
|
behavior. Provider permission and Profile access intent do not grant Project
|
|
136
|
-
writes. A
|
|
137
|
-
|
|
150
|
+
writes. A direct source write requires the exact Leader Task-main owner. An
|
|
151
|
+
integrated source write requires an exact WorkItem write scope and matching
|
|
152
|
+
managed workspace; a review write instead
|
|
138
153
|
requires an exact ReviewRound owner and frozen Candidate base. Profiles and
|
|
139
154
|
Skills constrain behavior even when provider prompts are bypassed. Provider
|
|
140
155
|
permissions remain Session-wide rather than Project-specific, so the durable
|
|
@@ -152,8 +167,8 @@ An isolated result is handled in this order:
|
|
|
152
167
|
5. configured checks run;
|
|
153
168
|
6. compare-and-swap advances the target only if its HEAD is unchanged;
|
|
154
169
|
7. the Leader accepts the WorkItem;
|
|
155
|
-
8.
|
|
156
|
-
removed.
|
|
170
|
+
8. terminal Integration, ReviewRound, and WorkItem resources become cleanup
|
|
171
|
+
advisories and are explicitly removed before archive.
|
|
157
172
|
|
|
158
173
|
The context contract is layered: Yui Core owns durable identity, lifecycle,
|
|
159
174
|
access, and workspace safety; generic role Skills own portable orchestration;
|
|
@@ -162,15 +177,18 @@ project-specific engineering rules; and the Task Contract owns the requested
|
|
|
162
177
|
outcome. Yui injects only its own generic Role Skills. It never scans or copies
|
|
163
178
|
Project Skills into managed context; the selected Agent discovers them through
|
|
164
179
|
its native project mechanism. Execution and review select their generic Skill
|
|
165
|
-
by durable Run purpose. A Reviewer finding routes to the original
|
|
166
|
-
|
|
180
|
+
by durable Run purpose. A Reviewer finding routes to the original Worker while
|
|
181
|
+
open, one consolidated Repair WorkItem when closed, Leader/Integration for
|
|
167
182
|
merge or local fixes, and an architecture WorkItem only for a genuinely
|
|
168
|
-
cross-cutting design change.
|
|
183
|
+
cross-cutting design change. Parallel repair is explicit and requires
|
|
184
|
+
independently acceptable ownership.
|
|
169
185
|
|
|
170
186
|
Capture at the same HEAD reuses the existing ChangeSet. A repaired HEAD creates
|
|
171
187
|
a new candidate; only the latest reviewed candidate may satisfy acceptance.
|
|
172
|
-
An isolated WorkItem cannot be accepted or
|
|
173
|
-
Project's latest result is uncaptured or unintegrated.
|
|
188
|
+
An isolated WorkItem cannot be accepted, or an integrated Task completed, while
|
|
189
|
+
any writable Project's latest result is uncaptured or unintegrated. Direct
|
|
190
|
+
completion instead requires a clean committed exact Task-main snapshot.
|
|
191
|
+
Workspace roots are
|
|
174
192
|
multi-Project; ChangeSets and Integration Attempts remain single-Project Git
|
|
175
193
|
boundaries.
|
|
176
194
|
|
package/README.md
CHANGED
|
@@ -250,7 +250,8 @@ yui project update app --alias app-cli
|
|
|
250
250
|
yui project refresh app
|
|
251
251
|
yui project list
|
|
252
252
|
|
|
253
|
-
yui task create "
|
|
253
|
+
yui task create "Fix CSV escaping" --project app --delivery direct
|
|
254
|
+
yui task create "Ship CSV export" --project app --delivery integrated
|
|
254
255
|
yui task update <task-id> --priority high --tags release,csv --due-at 2026-08-01T00:00:00Z
|
|
255
256
|
yui task update <task-id> --clear-priority --clear-tags --clear-due-at
|
|
256
257
|
yui task show <task-id>
|
|
@@ -258,6 +259,19 @@ yui task context <task-id>
|
|
|
258
259
|
yui task activate <task-id>
|
|
259
260
|
```
|
|
260
261
|
|
|
262
|
+
Project delivery is explicit but uses the existing Task schema. `direct` means
|
|
263
|
+
the Leader implements and verifies one low-risk result on clean committed Task
|
|
264
|
+
main; it needs no WorkItem, IntegrationAttempt, or policy-created final
|
|
265
|
+
ReviewRound. `integrated` requires WorkItem, ChangeSet, and committed Integration
|
|
266
|
+
evidence and remains the path for guarded, cross-Project, migration,
|
|
267
|
+
authorization, concurrency/recovery, destructive, and release changes. Global
|
|
268
|
+
final-review policy applies automatically only to integrated delivery. A direct
|
|
269
|
+
Task can use a bounded native review. If an independently managed final Review
|
|
270
|
+
is required, promote before Task main advances; promotion fails closed after a
|
|
271
|
+
commit or delivery evidence exists so earlier work cannot lose ChangeSet
|
|
272
|
+
provenance. Legacy `--require-integration` is an alias for
|
|
273
|
+
`--delivery integrated`, and integrated delivery cannot be downgraded.
|
|
274
|
+
|
|
261
275
|
`project refresh` is the explicit network operation for a stable Project checkout. It fetches the
|
|
262
276
|
configured stable branch directly from the Project remote URL and advances only through a clean,
|
|
263
277
|
verified fast-forward. Refresh requires matching stable and development branches, treats untracked
|
|
@@ -370,7 +384,8 @@ expands:
|
|
|
370
384
|
```sh
|
|
371
385
|
yui task create "Update authentication" \
|
|
372
386
|
--project backend --project frontend \
|
|
373
|
-
--base backend=develop --base frontend=main
|
|
387
|
+
--base backend=develop --base frontend=main \
|
|
388
|
+
--delivery integrated
|
|
374
389
|
yui task project add <task-id> shared-sdk --base main
|
|
375
390
|
```
|
|
376
391
|
|
|
@@ -444,6 +459,7 @@ Submit information through Operator:
|
|
|
444
459
|
```sh
|
|
445
460
|
yui operator submit "Compare CSV and JSON compatibility" --task <task-id>
|
|
446
461
|
yui operator submit "Investigate a smaller cache design"
|
|
462
|
+
yui operator status
|
|
447
463
|
yui operator list
|
|
448
464
|
yui operator resume
|
|
449
465
|
yui operator resume --last
|
|
@@ -472,13 +488,15 @@ bounded outcome stay in that Task even when they involve multiple Projects.
|
|
|
472
488
|
A distinct outcome, ownership boundary, or lifecycle creates a separate Task.
|
|
473
489
|
Features, bugs, and questions use the same
|
|
474
490
|
Task/WorkItem model rather than separate workflow types.
|
|
475
|
-
`operator
|
|
491
|
+
`operator status` shows exactly one GlobalRole-selected writer separately from
|
|
492
|
+
retained historical conversations. `operator list` shows recent conversations in fixed most-recently-updated order using
|
|
476
493
|
their Agent and readable title or preview; native provider session IDs remain
|
|
477
494
|
internal. Until an adapter supplies that metadata, Yui shows the provider plus
|
|
478
495
|
a stable short Yui reference so untitled conversations remain distinguishable.
|
|
479
|
-
`operator resume` opens the
|
|
480
|
-
|
|
481
|
-
|
|
496
|
+
`operator resume` opens the lightweight numbered history list, while `--last`
|
|
497
|
+
resumes the newest entry directly. Starting a conversation is never a resume
|
|
498
|
+
choice: the explicit `operator new` command starts a clean conversation and
|
|
499
|
+
preserves the previous one in history.
|
|
482
500
|
|
|
483
501
|
Create a Task-bound Worker instance from the configured global Worker, apply a
|
|
484
502
|
Profile, and dispatch a WorkItem:
|
|
@@ -547,8 +565,10 @@ bounded next options. Yield records immutable Run/Candidate or Review evidence
|
|
|
547
565
|
only; it does not imply acceptance, WorkItem completion, ChangeSet capture,
|
|
548
566
|
Integration, or Task completion.
|
|
549
567
|
|
|
550
|
-
For bounded work, the Leader owns
|
|
551
|
-
directly or create a native subagent through the current Agent
|
|
568
|
+
For integrated bounded work, the Leader owns one roleless WorkItem and may
|
|
569
|
+
execute it directly or create a native subagent through the current Agent
|
|
570
|
+
conversation. Direct delivery operates on Task main without creating this
|
|
571
|
+
WorkItem:
|
|
552
572
|
|
|
553
573
|
```sh
|
|
554
574
|
yui task work create <task-id> "Review the implementation" \
|
|
@@ -613,6 +633,21 @@ and `task work retire <task>/<work> --summary "..."` to retire obsolete work,
|
|
|
613
633
|
optionally naming a replacement. WorkItem and Integration
|
|
614
634
|
worktrees and check logs remain available as evidence until explicit cleanup.
|
|
615
635
|
|
|
636
|
+
Incorrect historical directives and execution attempts can be removed from
|
|
637
|
+
operational projections without deleting their audit records:
|
|
638
|
+
|
|
639
|
+
```sh
|
|
640
|
+
yui task message retire <task>/<message> --reason "Superseded instruction"
|
|
641
|
+
yui task run retire <task>/<agent-run> --reason "Invalid launch record"
|
|
642
|
+
```
|
|
643
|
+
|
|
644
|
+
These commands append a retirement fact. Lists and audit views retain the
|
|
645
|
+
original Message, WorkItem, or AgentRun and mark it retired; managed Run context,
|
|
646
|
+
actionability, recovery, review evidence, and scheduling ignore it. Retiring
|
|
647
|
+
an active AgentRun first terminalizes that exact Run, and retirement is
|
|
648
|
+
idempotent. Only the user or global Operator may retire Messages or AgentRuns;
|
|
649
|
+
WorkItems may also be retired by their Task Leader.
|
|
650
|
+
|
|
616
651
|
For long-running Tasks, the Leader keeps Yui—not a native transcript—as the
|
|
617
652
|
recovery authority. The Task Brief owns the overall technical approach,
|
|
618
653
|
including how coordinated Project changes fit together. WorkItems own the
|
|
@@ -660,9 +695,8 @@ yui task reopen <task-id>
|
|
|
660
695
|
```
|
|
661
696
|
|
|
662
697
|
When a verified squash-merge Publication records a remote commit that is
|
|
663
|
-
ancestry-divergent from the unchanged
|
|
664
|
-
|
|
665
|
-
tree:
|
|
698
|
+
ancestry-divergent from the unchanged local Task head, a user or global Operator
|
|
699
|
+
may explicitly authorize completion against its identical Git tree:
|
|
666
700
|
|
|
667
701
|
```sh
|
|
668
702
|
yui task complete <task-id> --summary-file delivery.txt \
|
|
@@ -671,17 +705,28 @@ yui task complete <task-id> --summary-file delivery.txt \
|
|
|
671
705
|
|
|
672
706
|
This does not weaken normal freshness checks. Yui requires the current,
|
|
673
707
|
unsuperseded Publication to be merged and verified, its local commit to equal
|
|
674
|
-
the
|
|
675
|
-
|
|
708
|
+
the physical Task head, its remote commit to be ancestry-divergent, and both
|
|
709
|
+
commits to resolve to the same exact tree. Integrated delivery also requires
|
|
710
|
+
the latest completed Task-final Review; direct delivery does not invent one.
|
|
711
|
+
`--refresh-remote` fetches
|
|
676
712
|
the remote object graph before resolving that Publication commit. For a Task
|
|
677
713
|
governed by a durable exact final-review contract, the user/Operator command
|
|
678
714
|
persists the exact authorization tuple and wakes the Task Leader; only that
|
|
679
715
|
contract-capable Leader may consume it and complete the Task. Tasks without
|
|
680
716
|
that contract retain the one-step explicit completion path. The Task event
|
|
681
717
|
audit records the authorization and, on completion, the accepted Project,
|
|
682
|
-
Publication, ReviewRound, both commits, and tree.
|
|
683
|
-
|
|
684
|
-
Completed Tasks reject messages, dispatch, Provider authority changes, retry,
|
|
718
|
+
Publication, optional ReviewRound, both commits, and tree.
|
|
719
|
+
|
|
720
|
+
Completed Tasks reject messages, dispatch, Provider authority changes, retry,
|
|
721
|
+
and late yields until explicitly reopened, while retaining Task main for
|
|
722
|
+
inspection or integration. Terminal WorkItem, Review, Integration, and Lane
|
|
723
|
+
worktrees are non-blocking completion advisories, but they must be settled
|
|
724
|
+
before archive. Every isolated WorkItem worktree is explicitly cleaned as
|
|
725
|
+
integrated or abandoned; that cleanup also removes its managed branch. Archive
|
|
726
|
+
requires `--integrated` or `--abandon` to state the Task main outcome and is
|
|
727
|
+
allowed only after Task main is clean. It removes managed worktrees but retains
|
|
728
|
+
Task and WorkItem records. The Task main branch is retained as a recovery
|
|
729
|
+
artifact instead of being silently deleted.
|
|
685
730
|
Task lifecycle completion/selection only suggests valid source states: Draft for activate, active for complete, and completed for reopen.
|
|
686
731
|
|
|
687
732
|
## Sessions and tmux
|
|
@@ -736,9 +781,11 @@ running AgentRun and its native Session continue under their immutable
|
|
|
736
781
|
effective snapshot even if the Role is edited or switched. Resume is allowed
|
|
737
782
|
only when the complete effective snapshot and workspace remain compatible;
|
|
738
783
|
otherwise Yui starts a new Session after the old process has stopped and keeps
|
|
739
|
-
the terminal Session's immutable effective snapshot in history.
|
|
740
|
-
|
|
741
|
-
|
|
784
|
+
the terminal Session's immutable effective snapshot in history. Managed
|
|
785
|
+
Sessions invoke the ordinary `yui` command; their Manifest and durable
|
|
786
|
+
Role/Run fences authenticate scope while protocol and storage compatibility
|
|
787
|
+
allow a CLI package or Controller upgrade in place. Exact internal callbacks
|
|
788
|
+
remain fenced to their originating runtime snapshot.
|
|
742
789
|
|
|
743
790
|
Use `yui config role unbind <global-role> <agent-id>` or `yui task role unbind <task-id> <role> <agent-id>` to retire a dormant binding. The active binding and any non-stopped native session are rejected; a stopped session record is removed atomically with the binding.
|
|
744
791
|
|
|
@@ -241,8 +241,9 @@ const taskChildren = [
|
|
|
241
241
|
{
|
|
242
242
|
name: "create",
|
|
243
243
|
summary: "Create a Draft Task.",
|
|
244
|
-
usage: "yui task create <title> [--project <project> ...] [--base <project>=<ref> ...] [--require-integration]",
|
|
245
|
-
options: ["--project", "--base", "--require-integration"]
|
|
244
|
+
usage: "yui task create <title> [--project <project> ...] [--base <project>=<ref> ...] [--delivery <direct|integrated>] [--require-integration]",
|
|
245
|
+
options: ["--project", "--base", "--delivery", "--require-integration"],
|
|
246
|
+
optionValues: { "--delivery": ["direct", "integrated"] }
|
|
246
247
|
},
|
|
247
248
|
{
|
|
248
249
|
name: "project",
|
|
@@ -265,13 +266,16 @@ const taskChildren = [
|
|
|
265
266
|
{
|
|
266
267
|
name: "update",
|
|
267
268
|
summary: "Update Task metadata.",
|
|
268
|
-
usage: "yui task update <id> [--title <text>] [--description <text>|--clear-description] [--priority <low|medium|high|urgent>|--clear-priority] [--tags <comma-separated>|--clear-tags] [--due-at <RFC3339>|--clear-due-at] [--require-integration]",
|
|
269
|
+
usage: "yui task update <id> [--title <text>] [--description <text>|--clear-description] [--priority <low|medium|high|urgent>|--clear-priority] [--tags <comma-separated>|--clear-tags] [--due-at <RFC3339>|--clear-due-at] [--delivery <direct|integrated>] [--require-integration]",
|
|
269
270
|
options: [
|
|
270
271
|
"--title", "--description", "--priority", "--tags", "--due-at",
|
|
271
272
|
"--clear-description", "--clear-priority", "--clear-tags", "--clear-due-at",
|
|
272
|
-
"--require-integration"
|
|
273
|
+
"--delivery", "--require-integration"
|
|
273
274
|
],
|
|
274
|
-
optionValues: {
|
|
275
|
+
optionValues: {
|
|
276
|
+
"--priority": ["low", "medium", "high", "urgent"],
|
|
277
|
+
"--delivery": ["direct", "integrated"]
|
|
278
|
+
}
|
|
275
279
|
},
|
|
276
280
|
{ name: "activate", summary: "Activate a Draft Task.", usage: "yui task activate <id>" },
|
|
277
281
|
{
|
|
@@ -359,7 +363,7 @@ const taskChildren = [
|
|
|
359
363
|
{
|
|
360
364
|
name: "message",
|
|
361
365
|
summary: "Manage durable Task messages.",
|
|
362
|
-
sections: [{ id: "manage", title: "Commands", entries: ["send", "list"] }],
|
|
366
|
+
sections: [{ id: "manage", title: "Commands", entries: ["send", "list", "retire"] }],
|
|
363
367
|
children: [
|
|
364
368
|
{
|
|
365
369
|
name: "send",
|
|
@@ -377,6 +381,12 @@ const taskChildren = [
|
|
|
377
381
|
summary: "List Task messages.",
|
|
378
382
|
usage: "yui task message list <id> [--after <timestamp>] [--limit <n>]",
|
|
379
383
|
options: ["--after", "--limit"]
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
name: "retire",
|
|
387
|
+
summary: "Retire an incorrect historical Task Message without deleting its audit record.",
|
|
388
|
+
usage: "yui task message retire <task>/<message> --reason <text>",
|
|
389
|
+
options: ["--reason"]
|
|
380
390
|
}
|
|
381
391
|
]
|
|
382
392
|
},
|
|
@@ -685,7 +695,7 @@ const taskChildren = [
|
|
|
685
695
|
{
|
|
686
696
|
name: "run",
|
|
687
697
|
summary: "Inspect and control Task Role Agent Runs.",
|
|
688
|
-
sections: [{ id: "manage", title: "Commands", entries: ["list", "show", "retry", "settle", "recover", "yield", "context", "checkpoint"] }],
|
|
698
|
+
sections: [{ id: "manage", title: "Commands", entries: ["list", "show", "retry", "settle", "recover", "yield", "context", "checkpoint", "retire"] }],
|
|
689
699
|
children: [
|
|
690
700
|
{ name: "list", summary: "List Runs for a work item.", usage: "yui task run list <task>/<work>" },
|
|
691
701
|
{
|
|
@@ -745,13 +755,19 @@ const taskChildren = [
|
|
|
745
755
|
options: ["--note", "--note-file"],
|
|
746
756
|
fileOptions: ["--note-file"],
|
|
747
757
|
hidden: true
|
|
758
|
+
},
|
|
759
|
+
{
|
|
760
|
+
name: "retire",
|
|
761
|
+
summary: "Retire an incorrect historical Agent Run without deleting its audit record.",
|
|
762
|
+
usage: "yui task run retire <task>/<run> --reason <text>",
|
|
763
|
+
options: ["--reason"]
|
|
748
764
|
}
|
|
749
765
|
]
|
|
750
766
|
},
|
|
751
767
|
{
|
|
752
768
|
name: "review",
|
|
753
769
|
summary: "Control Task-final ReviewRounds.",
|
|
754
|
-
sections: [{ id: "manage", title: "Commands", entries: ["request", "force-fresh", "group", "retry", "finding"] }],
|
|
770
|
+
sections: [{ id: "manage", title: "Commands", entries: ["request", "rebind", "force-fresh", "group", "retry", "finding"] }],
|
|
755
771
|
children: [
|
|
756
772
|
{
|
|
757
773
|
name: "request",
|
|
@@ -759,9 +775,15 @@ const taskChildren = [
|
|
|
759
775
|
usage: "yui task review request <task> --role <global-role> [--strategy fixed:<count>|adaptive:<max>] [--lane-role <role> ...] [--delta-recheck]",
|
|
760
776
|
options: ["--role", "--strategy", "--lane-role", "--delta-recheck"]
|
|
761
777
|
},
|
|
778
|
+
{
|
|
779
|
+
name: "rebind",
|
|
780
|
+
summary: "Explicitly rebind a frozen Task-final contract after a verified immutable release handover.",
|
|
781
|
+
usage: "yui task review rebind <task> --from-control <digest> --to-control <digest> --from-release <release-id> --to-release <release-id>",
|
|
782
|
+
options: ["--from-control", "--to-control", "--from-release", "--to-release"]
|
|
783
|
+
},
|
|
762
784
|
{
|
|
763
785
|
name: "force-fresh",
|
|
764
|
-
summary: "Replace one exact non-semantic
|
|
786
|
+
summary: "Replace one exact terminal non-semantic Task-final Review with a distinct full Round.",
|
|
765
787
|
usage: "yui task review force-fresh <task>/<review-round>"
|
|
766
788
|
},
|
|
767
789
|
{
|
|
@@ -804,9 +826,10 @@ const taskChildren = [
|
|
|
804
826
|
},
|
|
805
827
|
{
|
|
806
828
|
name: "repair-wave",
|
|
807
|
-
summary: "
|
|
808
|
-
usage: "yui task review finding repair-wave <task> [--create]",
|
|
809
|
-
options: ["--create"]
|
|
829
|
+
summary: "Consolidate open P1/P2 findings, or explicitly plan parallel repair groups.",
|
|
830
|
+
usage: "yui task review finding repair-wave <task> [--strategy <consolidated|parallel>] [--create]",
|
|
831
|
+
options: ["--strategy", "--create"],
|
|
832
|
+
optionValues: { "--strategy": ["consolidated", "parallel"] }
|
|
810
833
|
},
|
|
811
834
|
{
|
|
812
835
|
name: "extract",
|
|
@@ -1185,10 +1208,11 @@ export const ROOT_COMMAND = buildNode({
|
|
|
1185
1208
|
sections: [{
|
|
1186
1209
|
id: "workflow",
|
|
1187
1210
|
title: "Commands",
|
|
1188
|
-
entries: ["enter", "new", "list", "resume", "submit"]
|
|
1211
|
+
entries: ["enter", "status", "new", "list", "resume", "submit"]
|
|
1189
1212
|
}],
|
|
1190
1213
|
children: [
|
|
1191
1214
|
{ name: "enter", summary: "Enter the Operator's native session." },
|
|
1215
|
+
{ name: "status", summary: "Show the unique active writer and retained conversation history." },
|
|
1192
1216
|
{
|
|
1193
1217
|
name: "new",
|
|
1194
1218
|
summary: "Start a new Operator session.",
|
|
@@ -1393,7 +1417,7 @@ export const ROOT_COMMAND = buildNode({
|
|
|
1393
1417
|
sections: [{
|
|
1394
1418
|
id: "callbacks",
|
|
1395
1419
|
title: "Callbacks",
|
|
1396
|
-
entries: ["session-notify", "runtime-hook", "agent-host"]
|
|
1420
|
+
entries: ["session-notify", "runtime-hook", "agent-host", "session-cli-refresh"]
|
|
1397
1421
|
}],
|
|
1398
1422
|
children: [
|
|
1399
1423
|
{
|
|
@@ -1410,6 +1434,11 @@ export const ROOT_COMMAND = buildNode({
|
|
|
1410
1434
|
name: "runtime-hook",
|
|
1411
1435
|
summary: "Record a managed Agent Driver observation from stdin.",
|
|
1412
1436
|
usage: "yui internal runtime-hook"
|
|
1437
|
+
},
|
|
1438
|
+
{
|
|
1439
|
+
name: "session-cli-refresh",
|
|
1440
|
+
summary: "Refresh legacy managed Session CLI wrappers after an update.",
|
|
1441
|
+
usage: "yui internal session-cli-refresh"
|
|
1413
1442
|
}
|
|
1414
1443
|
]
|
|
1415
1444
|
}
|
|
@@ -28,30 +28,20 @@ export async function resolveOperatorWizardArguments(commandArgs, role, sessions
|
|
|
28
28
|
: { kind: "resolved", args: [...args, "--agent", selected] };
|
|
29
29
|
}
|
|
30
30
|
if (args[1] === "resume" && args.length === 2) {
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
]
|
|
41
|
-
})),
|
|
42
|
-
{
|
|
43
|
-
value: newSession,
|
|
44
|
-
cells: ["", "", "Start a new session", "new"]
|
|
45
|
-
}
|
|
46
|
-
], [
|
|
31
|
+
const selected = await choose("Resume an Operator session", sessions.map((session) => ({
|
|
32
|
+
value: session.ref,
|
|
33
|
+
cells: [
|
|
34
|
+
formatRelativeTimestamp(session.updatedAt, now),
|
|
35
|
+
adapterLabel(session.adapterId),
|
|
36
|
+
session.displayTitle,
|
|
37
|
+
session.state
|
|
38
|
+
]
|
|
39
|
+
})), [
|
|
47
40
|
{ header: "Updated", minWidth: 7, maxWidth: 12 },
|
|
48
41
|
{ header: "Agent", minWidth: 6, maxWidth: 12 },
|
|
49
42
|
{ header: "Conversation", minWidth: 20, maxWidth: 64 },
|
|
50
43
|
{ header: "State", minWidth: 7, maxWidth: 10 }
|
|
51
|
-
], io, sessions[0]?.ref
|
|
52
|
-
if (selected === newSession) {
|
|
53
|
-
return resolveOperatorWizardArguments(["operator", "new"], role, sessions, io, now);
|
|
54
|
-
}
|
|
44
|
+
], io, sessions[0]?.ref, "session");
|
|
55
45
|
return selected === undefined
|
|
56
46
|
? { kind: "cancelled", args }
|
|
57
47
|
: { kind: "resolved", args: [...args, selected] };
|
package/dist/cli/updatePorts.js
CHANGED
|
@@ -199,6 +199,12 @@ export function createUpdatePorts(environment, spawn = spawnSync, stagingRoot =
|
|
|
199
199
|
+ `but the staged/verified artifact was ${staged.version}. Refusing to trust a `
|
|
200
200
|
+ "different build than the one that passed preflight.");
|
|
201
201
|
}
|
|
202
|
+
// Existing managed Sessions may have been created by a release that
|
|
203
|
+
// embedded an exact CLI path/version in its wrapper. Convert those
|
|
204
|
+
// authenticated, Manifest-referenced wrappers before the replacement
|
|
205
|
+
// Controller starts so the update cannot strand a live Session.
|
|
206
|
+
const sessionCliRefresh = run(activeBinary, ["--json", "internal", "session-cli-refresh"], { cwd: process.cwd(), env: { ...environment, YUI_HOME: home }, shell: false });
|
|
207
|
+
assertSpawnOk(sessionCliRefresh, "refresh managed Session CLI wrappers");
|
|
202
208
|
// Retain the exact path used by both doctor and version verification. The
|
|
203
209
|
// replacement start must not resolve UPDATE_CLI_PATH or npm again.
|
|
204
210
|
verifiedActivatedBinary = activeBinary;
|