@zq-silk/yui 0.12.4 → 0.13.1
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/dist/cli/updatePorts.js +18 -2
- package/dist/cli.js +3 -6
- package/dist/commands/durableJobCommands.js +5 -17
- package/dist/commands/executionAuditCommands.js +1 -1
- package/dist/commands/taskActor.js +17 -61
- package/dist/commands/taskCommands.js +44 -166
- package/dist/commands/taskIntegrationCommands.js +7 -9
- package/dist/commands/taskIntegrationQueueCommands.js +9 -11
- package/dist/commands/taskPublicationCommands.js +0 -4
- package/dist/commands/taskWorkspaceCommands.js +1 -1
- package/dist/controller/jobClient.js +5 -8
- package/dist/controller/jobControl.js +59 -105
- package/dist/integration/gitIntegrationService.js +3 -3
- package/dist/integration/integrationAttempt.js +13 -9
- package/dist/integration/integrationQueueService.js +7 -7
- package/dist/milestone/milestone.js +9 -3
- package/dist/review/deltaRecheck.js +1 -1
- package/dist/review/reviewFinding.js +3 -3
- package/dist/review/reviewRound.js +11 -8
- package/dist/storage/migration/productionRegistry.js +9 -0
- package/dist/storage/taskStore.js +9 -8
- package/dist/storage/upgrade/upgradeOrchestrator.js +2 -2
- package/dist/storage/upgradeCoordination.js +6 -5
- package/package.json +1 -1
- package/skills/yui-leader/SKILL.md +4 -0
- package/skills/yui-operator/SKILL.md +19 -13
|
@@ -589,7 +589,7 @@ async function executeSqliteInPlaceUpgrade(options, classification, now, callerP
|
|
|
589
589
|
finally {
|
|
590
590
|
db.close();
|
|
591
591
|
}
|
|
592
|
-
});
|
|
592
|
+
}, options.externalUpgradeFenceOwnerPid ?? callerPid);
|
|
593
593
|
}
|
|
594
594
|
catch (error) {
|
|
595
595
|
unexpected = error;
|
|
@@ -1358,7 +1358,7 @@ function executeFenced(options, classification, target, callerPid, now, switchSt
|
|
|
1358
1358
|
? {}
|
|
1359
1359
|
: { backupPath: report.switch.backupPath })
|
|
1360
1360
|
};
|
|
1361
|
-
});
|
|
1361
|
+
}, options.externalUpgradeFenceOwnerPid ?? callerPid);
|
|
1362
1362
|
}
|
|
1363
1363
|
catch (error) {
|
|
1364
1364
|
if (!(error instanceof UpgradeFenceError))
|
|
@@ -37,12 +37,13 @@ const COORDINATION_LOCK_MIN_AGE_MS = 1_000;
|
|
|
37
37
|
* A hook that passed a check before an upgrade placed its fence either owns the
|
|
38
38
|
* lock and finishes before cutover, or waits and receives an explicit
|
|
39
39
|
* UpgradeFenceError after the cutover holder releases it. There is no second
|
|
40
|
-
* scan or retry protocol hidden in this helper.
|
|
40
|
+
* scan or retry protocol hidden in this helper. A staged updater child passes
|
|
41
|
+
* its already-authenticated parent fence owner through this same boundary.
|
|
41
42
|
*/
|
|
42
|
-
export function withUpgradeCoordinationLock(home, execute) {
|
|
43
|
+
export function withUpgradeCoordinationLock(home, execute, fenceOwnerPid = process.pid) {
|
|
43
44
|
const release = acquireUpgradeCoordinationLock(home);
|
|
44
45
|
try {
|
|
45
|
-
assertUpgradeAdmission(home);
|
|
46
|
+
assertUpgradeAdmission(home, fenceOwnerPid);
|
|
46
47
|
return execute();
|
|
47
48
|
}
|
|
48
49
|
finally {
|
|
@@ -57,8 +58,8 @@ export function withUpgradeCoordinationLock(home, execute) {
|
|
|
57
58
|
* avoiding a permanent post-promote hook deadlock. A malformed marker with a
|
|
58
59
|
* missing Home still fails closed because its recovery phase cannot be trusted.
|
|
59
60
|
*/
|
|
60
|
-
export function assertUpgradeAdmission(home) {
|
|
61
|
-
assertHomeWritable(home);
|
|
61
|
+
export function assertUpgradeAdmission(home, fenceOwnerPid = process.pid) {
|
|
62
|
+
assertHomeWritable(home, fenceOwnerPid);
|
|
62
63
|
const progressPath = switchProgressPath(home);
|
|
63
64
|
if (!existsSync(progressPath))
|
|
64
65
|
return;
|
package/package.json
CHANGED
|
@@ -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
|
|
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
|
|
15
|
-
|
|
16
|
-
|
|
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
|
|
146
|
-
for the same bounded outcome
|
|
147
|
-
|
|
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
|
|
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
|
-
|
|
244
|
-
|
|
245
|
-
|
|
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
|
-
-
|
|
345
|
-
|
|
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
|