@zq-silk/yui 0.14.0 → 0.14.2
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 +64 -35
- package/README.md +258 -125
- package/dist/agent/argumentPolicy.js +2 -1
- package/dist/agent/managedRuntimeEnvironment.js +5 -8
- package/dist/cli/commandCatalog.js +74 -109
- package/dist/cli/helpRenderer.js +1 -2
- package/dist/cli/interactionCandidates.js +10 -0
- package/dist/cli/interactionPolicy.js +76 -37
- package/dist/cli/roleWizard.js +5 -6
- package/dist/cli/updateOrchestrator.js +10 -8
- package/dist/cli/updatePorts.js +17 -13
- package/dist/cli/upgradeCommand.js +2 -5
- package/dist/cli.js +268 -231
- package/dist/commands/agentCommands.js +13 -0
- package/dist/commands/configCommands.js +7 -19
- package/dist/commands/configOverview.js +3 -2
- package/dist/commands/durableJobCommands.js +1 -1
- package/dist/commands/executionAuditCommands.js +4 -9
- package/dist/commands/globalRoleCommands.js +17 -0
- package/dist/commands/profileCommands.js +200 -30
- package/dist/commands/sessionCommands.js +1 -1
- package/dist/commands/taskActor.js +29 -127
- package/dist/commands/taskChangeSetCommands.js +1 -3
- package/dist/commands/taskCommands.js +1771 -2107
- package/dist/commands/taskCompletionGate.js +27 -103
- package/dist/commands/taskContextCommand.js +47 -80
- package/dist/commands/taskExecutionCommands.js +9 -27
- package/dist/commands/taskInputCommands.js +10 -10
- package/dist/commands/taskIntegrationCommands.js +69 -61
- package/dist/commands/taskIntegrationQueueCommands.js +1 -1
- package/dist/commands/taskNextActionCommand.js +8 -29
- package/dist/commands/taskOverviewCommand.js +25 -3
- package/dist/commands/taskPublicationCommands.js +151 -85
- package/dist/commands/taskPublicationVerifyCommand.js +181 -0
- package/dist/commands/taskRemoteDeliveryCommand.js +134 -0
- package/dist/commands/taskRoleRuntimeStatus.js +5 -6
- package/dist/commands/taskUpstreamCommands.js +79 -95
- package/dist/config/configCatalog.js +1 -1
- package/dist/context/contextSnapshot.js +17 -2
- package/dist/context/sessionBootstrapManifest.js +18 -1
- package/dist/context/sourceTurnContext.js +30 -0
- package/dist/context/turnContextPack.js +107 -48
- package/dist/context/turnInputContract.js +11 -4
- package/dist/context/wakeNotification.js +84 -22
- package/dist/controller/agentRuntimeObserver.js +9 -12
- package/dist/controller/clientRuntime.js +13 -13
- package/dist/controller/controller.js +11 -11
- package/dist/controller/fileSchedulerStoreAdapter.js +262 -219
- package/dist/controller/jobControl.js +11 -10
- package/dist/controller/resourceInventory.js +6 -6
- package/dist/controller/resourceInventoryLinux.js +2 -2
- package/dist/controller/runtime.js +18 -61
- package/dist/controller/runtimeEventInbox.js +57 -34
- package/dist/controller/runtimeEventProcessor.js +36 -96
- package/dist/controller/runtimeHookTurnFence.js +33 -57
- package/dist/controller/runtimeLaunchCoordinator.js +44 -40
- package/dist/controller/runtimeObservationHook.js +18 -12
- package/dist/controller/sessionNotify.js +43 -28
- package/dist/controller/sessionOwnerReconciliation.js +21 -21
- package/dist/controller/structuredProviderObservation.js +13 -16
- package/dist/coordination/workMailboxQueue.js +132 -0
- package/dist/core/controllerServer.js +1 -0
- package/dist/domain/agentResultTransport.js +60 -0
- package/dist/execution/executionHealth.js +111 -118
- package/dist/execution/reviewMainTurn.js +161 -0
- package/dist/execution/workItemExecution.js +454 -0
- package/dist/execution/workItemExecutionProjection.js +309 -0
- package/dist/execution/workItemMainTurn.js +164 -0
- package/dist/executor/agentExecutor.js +19 -19
- package/dist/executor/executorRegistry.js +7 -28
- package/dist/executor/fileRoleLaunchPlanner.js +51 -83
- package/dist/external/githubPublicationVerifier.js +114 -0
- package/dist/external/gitlabPublicationVerifier.js +158 -0
- package/dist/external/pinnedCommandRunner.js +73 -0
- package/dist/integration/changeSetManifest.js +0 -3
- package/dist/integration/deliveryObligation.js +43 -6
- package/dist/integration/gitIntegrationService.js +284 -101
- package/dist/integration/integrationAttempt.js +64 -14
- package/dist/integration/integrationQueueEntry.js +5 -35
- package/dist/integration/integrationQueueService.js +65 -194
- package/dist/lifecycle/canonicalLifecycleEvent.js +16 -15
- package/dist/lifecycle/exactTurnTerminalization.js +100 -97
- package/dist/message/message.js +16 -0
- package/dist/observability/executionAudit.js +4 -25
- package/dist/observability/faultClassification.js +58 -70
- package/dist/observability/orchestrationMetrics.js +8 -50
- package/dist/profile/agentProfile.js +60 -15
- package/dist/profile/agentProfileRuntime.js +100 -0
- package/dist/release/releaseWorkflowPorts.js +5 -68
- package/dist/repository/executionLaneGitSnapshot.js +80 -0
- package/dist/repository/gitWorkspace.js +9 -67
- package/dist/repository/taskBaseFreshness.js +3 -1
- package/dist/repository/taskWorkspaceCoordinator.js +32 -4
- package/dist/repository/taskWorkspacePreparer.js +252 -411
- package/dist/resources/liveReferences.js +6 -55
- package/dist/resources/resourceDiscovery.js +1 -30
- package/dist/resources/resourceRegistrar.js +0 -23
- package/dist/review/deltaRecheck.js +8 -65
- package/dist/review/reviewAcceptance.js +22 -19
- package/dist/review/reviewConfig.js +0 -10
- package/dist/review/reviewDecision.js +2 -2
- package/dist/review/reviewRound.js +147 -273
- package/dist/review/reviewerAvailability.js +13 -23
- package/dist/role/role.js +3 -0
- package/dist/runtime/agentDriverObservation.js +1 -1
- package/dist/runtime/agentHost.js +51 -51
- package/dist/runtime/builtinAgentDrivers.js +9 -2
- package/dist/runtime/codexAppServerRuntime.js +23 -5
- package/dist/runtime/exactControlPlane.js +2 -267
- package/dist/runtime/firstProgressAdvisory.js +1 -1
- package/dist/runtime/index.js +1 -1
- package/dist/runtime/launchBroker.js +11 -11
- package/dist/runtime/lifecycleReservation.js +2 -2
- package/dist/runtime/managedCaller.js +111 -0
- package/dist/runtime/ports.js +16 -3
- package/dist/runtime/preallocatedNativeSession.js +2 -2
- package/dist/runtime/processExitObservation.js +3 -2
- package/dist/runtime/providerContinuationReconciliationService.js +1 -1
- package/dist/runtime/runtimeBinding.js +1 -1
- package/dist/runtime/runtimeObservation.js +33 -16
- package/dist/runtime/runtimeSessionCandidate.js +2 -2
- package/dist/runtime/runtimeStopReceipt.js +11 -11
- package/dist/runtime/sessionLaunchRequest.js +2 -2
- package/dist/runtime/sessionOwnerIdentity.js +9 -9
- package/dist/runtime/sessionOwnerRegistry.js +13 -13
- package/dist/runtime/sessionReconciliation.js +4 -4
- package/dist/runtime/sessionTerminationGuard.js +9 -9
- package/dist/runtime/sessionTokenMetrics.js +5 -7
- package/dist/runtime/structuredProviderHost.js +5 -5
- package/dist/runtime/taskRuntimeIsolation.js +24 -24
- package/dist/runtime/tmuxAdapters.js +32 -30
- package/dist/scheduler/activeRoleTurnDelivery.js +37 -15
- package/dist/scheduler/leaderWakeupProcessor.js +78 -55
- package/dist/scheduler/roleTurnLiveness.js +6 -6
- package/dist/scheduler/roleTurnStall.js +8 -9
- package/dist/scheduler/taskExecutionProjection.js +19 -41
- package/dist/scheduler/taskObservabilityProjection.js +75 -122
- package/dist/storage/sqliteSchema.js +1 -21
- package/dist/storage/sqliteStore.js +62 -47
- package/dist/storage/storageSchema.js +1 -8
- package/dist/storage/storageVersions.js +7 -4
- package/dist/storage/taskStore.js +8 -8
- package/dist/storage/upgrade/upgradeOrchestrator.js +112 -83
- package/dist/task/completionReadiness.js +17 -98
- package/dist/task/deliveryGuard.js +9 -11
- package/dist/task/draftPlan.js +142 -0
- package/dist/task/nextAction.js +179 -477
- package/dist/task/publicationVerification.js +1 -0
- package/dist/task/remoteDelivery.js +233 -0
- package/dist/task/task.js +108 -4
- package/dist/task/taskRecordReference.js +0 -1
- package/dist/turn/turn.js +109 -16
- package/dist/verification/verificationGateService.js +0 -26
- package/dist/web/assets/client/components.js +99 -121
- package/dist/web/assets/client/i18n.js +136 -58
- package/dist/web/assets/client/view.js +44 -0
- package/dist/web/assets/styles/cards.js +3 -15
- package/dist/web/assets/styles/widgets.js +4 -0
- package/dist/web/webSnapshot.js +29 -14
- package/dist/workItem/dependencyGate.js +34 -0
- package/dist/workItem/workItem.js +99 -266
- package/dist/workspace/workItemChangeSetManager.js +15 -59
- package/docs/task-local-identity.md +1 -1
- package/i18n/README.zh-CN.md +165 -59
- package/package.json +1 -1
- package/skills/yui-leader/SKILL.md +272 -782
- package/skills/yui-operator/SKILL.md +190 -365
- package/skills/yui-reviewer/SKILL.md +40 -33
- package/skills/yui-runtime/SKILL.md +27 -6
- package/skills/yui-worker/SKILL.md +19 -6
- package/dist/execution/candidateConvergence.js +0 -623
- package/dist/execution/executionGroup.js +0 -854
- package/dist/execution/resourceBroker.js +0 -426
- package/dist/executor/launchPlan.js +0 -16
- package/dist/review/reviewFinding.js +0 -240
- package/dist/review/reviewFindingLedger.js +0 -550
- package/dist/review/reviewOutcomeClassifier.js +0 -255
- package/dist/scheduler/resourceQueueProjection.js +0 -71
- package/dist/task/repairWave.js +0 -150
package/ARCHITECTURE.md
CHANGED
|
@@ -33,8 +33,9 @@ decomposition, execution choice, review, integration, and completion.
|
|
|
33
33
|
|
|
34
34
|
`Task` is the bounded user outcome. Its optional `type` describes intent, not
|
|
35
35
|
execution topology; software Projects normally use `feature` or `bugfix`, while
|
|
36
|
-
other Projects may define their own types. Yui does not store a
|
|
37
|
-
integrated delivery mode.
|
|
36
|
+
other Projects may define their own types. Yui does not store a Task-level
|
|
37
|
+
direct versus integrated delivery mode. The `direct` and `replicated` labels
|
|
38
|
+
below describe only the execution shape of one WorkItem.
|
|
38
39
|
|
|
39
40
|
A software bugfix is Leader-owned: the Leader implements and verifies it in the
|
|
40
41
|
managed Task main without manufacturing a WorkItem. If the scope proves to need
|
|
@@ -60,11 +61,29 @@ implementation steps, test runs, review findings, and local fixes remain Turn,
|
|
|
60
61
|
Event, report, or commit evidence under the existing Task or WorkItem; they are
|
|
61
62
|
not new WorkItems.
|
|
62
63
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
Native subagents may help an Agent investigate or critique inside its current
|
|
65
|
+
conversation, but they are not a second Yui WorkItem execution model and do
|
|
66
|
+
not create child-session records. A Yui-managed WorkItem dispatch has one
|
|
67
|
+
logical main executor: the current Session for `WorkItem.assignee`. A Turn is
|
|
68
|
+
an execution attempt, not a requirement, and repeated Turns may continue the
|
|
69
|
+
same compatible Role Session.
|
|
70
|
+
|
|
71
|
+
Without `--lane-role`, dispatch is `direct`: Yui creates only the main Turn and
|
|
72
|
+
does not persist an ExecutionGroup or Lane. With at least two distinct
|
|
73
|
+
non-assignee roles, dispatch is `replicated`: one ExecutionGroup freezes a
|
|
74
|
+
canonical Assignment and every Lane independently executes that exact same
|
|
75
|
+
Assignment. One Lane role is invalid, and Lane roles cannot introduce their
|
|
76
|
+
own objective, directive, acceptance criteria, context, or write scope.
|
|
77
|
+
|
|
78
|
+
A Lane is a recoverable logical slot whose durable disposition is `open`,
|
|
79
|
+
`succeeded`, or `failed`. Failed Turns leave the Lane open for an exact
|
|
80
|
+
`task turn retry`; `task turn settle` records the Leader's decision to stop
|
|
81
|
+
recovering that Lane. Yui waits until every Lane is settled. At least two
|
|
82
|
+
successful Lanes make synthesis eligible and create or wake one idempotent
|
|
83
|
+
main Turn with every successful Producer result in stable Lane order. Fewer
|
|
84
|
+
than two successes fail that Group attempt without degrading to a single
|
|
85
|
+
result. Retrying the main Turn keeps the same Group and does not rerun a
|
|
86
|
+
successful Lane.
|
|
68
87
|
|
|
69
88
|
## Profiles, Roles, and Agents
|
|
70
89
|
|
|
@@ -83,11 +102,17 @@ Session.
|
|
|
83
102
|
context, and source desired revision. A native Role Session stores the same snapshot; running processes
|
|
84
103
|
are never hot-mutated by later Role edits.
|
|
85
104
|
- A `WorkItemCandidate` is the explicit result currently awaiting Leader
|
|
86
|
-
acceptance.
|
|
87
|
-
|
|
105
|
+
acceptance. A dispatched WorkItem Candidate can reference only a successful
|
|
106
|
+
main Turn; the complete replicated provenance is derived through Main Turn
|
|
107
|
+
-> ExecutionGroup -> Lane -> successful Producer Turn. A roleless delivery
|
|
108
|
+
unit managed directly by the Leader may instead use the existing direct
|
|
109
|
+
source. Lanes never become Candidates or enter Review or Integration.
|
|
88
110
|
- `ReviewRound` records one semantic judgment. A WorkItem Review references
|
|
89
111
|
that WorkItem's immutable Candidate. A Task-final Review references the
|
|
90
112
|
frozen Task heads directly and has no synthetic WorkItem/Candidate anchor.
|
|
113
|
+
Either scope executes directly through one main Reviewer Turn or, when the
|
|
114
|
+
Leader explicitly supplies at least two Producer Roles, through one frozen
|
|
115
|
+
replicated Assignment followed by one authoritative main synthesis Turn.
|
|
91
116
|
It is never another WorkItem.
|
|
92
117
|
|
|
93
118
|
Adding another Agent requires an explicit adapter implementation. Profiles do
|
|
@@ -97,27 +122,28 @@ For a native subagent, the Leader must choose and read an explicit
|
|
|
97
122
|
WorkerProfile, using `worker` when no specialist fits. The Leader includes the
|
|
98
123
|
Profile instructions, Skills, behavior intent, workspace boundary, validation expectations, and
|
|
99
124
|
supported model/effort hints in the child brief. Task Role Agent bindings are
|
|
100
|
-
ignored because the child inherits the Leader Agent.
|
|
101
|
-
|
|
102
|
-
|
|
125
|
+
ignored because the child inherits the Leader Agent. Its output remains
|
|
126
|
+
session-local collaboration evidence: it does not create a Yui Lane, Candidate,
|
|
127
|
+
ReviewRound, or Integration source. When that evidence affects delivery, the
|
|
128
|
+
main executor incorporates it into the WorkItem's authoritative result.
|
|
103
129
|
|
|
104
130
|
## Lifecycle and acceptance
|
|
105
131
|
|
|
106
|
-
|
|
132
|
+
WorkItem delivery has one Leader-owned acceptance path regardless of execution
|
|
133
|
+
shape:
|
|
107
134
|
|
|
108
135
|
```text
|
|
109
|
-
todo -> running ->
|
|
110
|
-
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
Task Role work follows:
|
|
114
|
-
|
|
115
|
-
```text
|
|
116
|
-
todo -> running -> awaiting Leader review
|
|
117
|
-
| accept -> done
|
|
136
|
+
todo -> running -> awaiting_acceptance
|
|
137
|
+
| accept -> completed
|
|
118
138
|
| reject -> failed -> redispatch -> running
|
|
119
139
|
```
|
|
120
140
|
|
|
141
|
+
For `direct`, the assignee's successful main Turn supplies the result. For
|
|
142
|
+
`replicated`, Lane Turns supply immutable Producer results and only the
|
|
143
|
+
successful synthesis main Turn supplies the Candidate. Roleless WorkItems are
|
|
144
|
+
advanced directly by the Leader but enter the same Candidate, ChangeSet,
|
|
145
|
+
Integration, and acceptance boundary.
|
|
146
|
+
|
|
121
147
|
The Provider's native Turn terminal ends its associated Turn and stores the
|
|
122
148
|
final response as immutable Turn evidence. It never accepts the WorkItem. The
|
|
123
149
|
Leader checks semantics, evidence, and Git state, then resolves the execution
|
|
@@ -127,8 +153,9 @@ WorkItem keeps its workspace so the next Turn can repair the same result.
|
|
|
127
153
|
An optional global review rule names one existing Global Role and chooses
|
|
128
154
|
`always`, `leader`, or `final`. Candidate rules remain live defaults; each
|
|
129
155
|
WorkItem Candidate snapshots the effective review rule when submitted.
|
|
130
|
-
Every result is stored first on its exact Turn
|
|
131
|
-
when the Leader resolves the execution
|
|
156
|
+
Every managed execution result is stored first on its exact Turn. A Candidate
|
|
157
|
+
is created only from the main result when the Leader resolves the execution
|
|
158
|
+
output for acceptance.
|
|
132
159
|
`always` dispatches a review Turn for every candidate, whether it comes
|
|
133
160
|
from a completed execution Turn or a Leader-managed direct result; `leader`
|
|
134
161
|
leaves every candidate for the Leader to accept directly or review explicitly.
|
|
@@ -142,10 +169,12 @@ Task, so normal delivery does not pay for a complete review of every WorkItem.
|
|
|
142
169
|
Review Turns complete only their exact ReviewRound, leave the WorkItem awaiting
|
|
143
170
|
acceptance, and never trigger another review or append a Candidate. Successful
|
|
144
171
|
and failed review attempts both wake the Leader and remain evidence for
|
|
145
|
-
judgment, not a machine verdict. The ReviewRound stores
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
172
|
+
judgment, not a machine verdict. The ReviewRound stores only Core-owned
|
|
173
|
+
identity, frozen Candidate, workspace provenance, execution topology, main
|
|
174
|
+
Reviewer Turn reference, lifecycle, and failure diagnostics. The complete
|
|
175
|
+
free-form Reviewer result lives only on that exact Turn. The Leader may route
|
|
176
|
+
that result to the original Worker, but Yui never parses or merges it
|
|
177
|
+
automatically.
|
|
149
178
|
|
|
150
179
|
Roles describe Agent capability, but they do not own repository workspaces. A
|
|
151
180
|
`ManagedWorkspace` is keyed by its durable owner (`Task`, `WorkItem`,
|
|
@@ -211,7 +240,7 @@ An isolated result is handled in this order:
|
|
|
211
240
|
1. the Worker Provider Turn ends and its Turn result is recorded;
|
|
212
241
|
2. the Leader reviews semantics and evidence;
|
|
213
242
|
3. Yui captures each writable Project HEAD as an immutable Project ChangeSet;
|
|
214
|
-
4. each Project integration applies
|
|
243
|
+
4. each Project integration applies the governing Candidate's ChangeSet in a candidate worktree;
|
|
215
244
|
5. configured checks run;
|
|
216
245
|
6. compare-and-swap advances the target only if its HEAD is unchanged;
|
|
217
246
|
7. the Leader accepts the WorkItem;
|
|
@@ -225,14 +254,14 @@ project-specific engineering rules; and the Task Contract owns the requested
|
|
|
225
254
|
outcome. Yui injects only its own generic Role Skills. It never scans or copies
|
|
226
255
|
Project Skills into managed context; the selected Agent discovers them through
|
|
227
256
|
its native project mechanism. Execution and review select their generic Skill
|
|
228
|
-
by durable Turn purpose. A Reviewer
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
257
|
+
by durable Turn purpose. A Reviewer result returns as the exact source Turn
|
|
258
|
+
text. The Leader decides whether to send feedback to the existing Worker,
|
|
259
|
+
accept, review again, handle a local or Integration issue, or create genuinely
|
|
260
|
+
independent follow-up work. Core neither parses findings nor creates repair
|
|
261
|
+
topology from Reviewer prose.
|
|
233
262
|
|
|
234
263
|
Capture at the same HEAD reuses the existing ChangeSet. A repaired HEAD creates
|
|
235
|
-
a new candidate; only the latest
|
|
264
|
+
a new candidate; only the latest governing candidate may satisfy acceptance.
|
|
236
265
|
An isolated WorkItem cannot be accepted, or a Task with WorkItems completed,
|
|
237
266
|
while any writable Project's latest result is uncaptured or unintegrated.
|
|
238
267
|
Leader-owned completion instead requires a clean committed exact Task-main snapshot.
|