@zq-silk/yui 0.13.9 → 0.14.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.
- package/ARCHITECTURE.md +69 -428
- package/README.md +108 -298
- package/dist/agent/managedRuntimeEnvironment.js +2 -2
- package/dist/cli/commandCatalog.js +39 -77
- package/dist/cli/interactionCandidates.js +4 -4
- package/dist/cli/interactionPolicy.js +7 -10
- package/dist/cli/invocationRouter.js +1 -1
- package/dist/cli/updateCommand.js +6 -27
- package/dist/cli/updateOrchestrator.js +63 -484
- package/dist/cli/updatePorts.js +15 -333
- package/dist/cli/upgradeCommand.js +8 -65
- package/dist/cli.js +57 -242
- package/dist/commands/configCommands.js +11 -62
- package/dist/commands/executionAuditCommands.js +23 -23
- package/dist/commands/globalRoleCommands.js +2 -7
- package/dist/commands/jobCommands.js +1 -4
- package/dist/commands/projectCommands.js +5 -5
- package/dist/commands/releaseCommands.js +3 -10
- package/dist/commands/resourcesCommands.js +2 -2
- package/dist/commands/sessionCommands.js +2 -2
- package/dist/commands/taskActor.js +31 -39
- package/dist/commands/taskChangeSetCommands.js +5 -12
- package/dist/commands/taskCommands.js +464 -1249
- package/dist/commands/taskContextCommand.js +35 -36
- package/dist/commands/taskExecutionCommands.js +33 -46
- package/dist/commands/taskInputCommands.js +20 -42
- package/dist/commands/taskNextActionCommand.js +9 -9
- package/dist/commands/taskOverviewCommand.js +56 -95
- package/dist/commands/taskRoleRuntimeStatus.js +77 -107
- package/dist/commands/taskUpstreamCommands.js +3 -3
- package/dist/commands/taskWorkspaceCommands.js +7 -79
- package/dist/commands/telemetryCommands.js +32 -124
- package/dist/commands/workflowCommands.js +3 -3
- package/dist/completion/fileCompletionManager.js +1 -1
- package/dist/config/configCatalog.js +4 -6
- package/dist/config/yuiConfig.js +6 -43
- package/dist/context/dispatchContext.js +14 -30
- package/dist/context/roleSessionContext.js +2 -2
- package/dist/context/sessionBootstrapManifest.js +2 -2
- package/dist/context/{runContextPack.js → turnContextPack.js} +58 -73
- package/dist/context/turnInputContract.js +204 -0
- package/dist/context/wakeNotification.js +2 -2
- package/dist/controller/agentRuntimeObserver.js +18 -18
- package/dist/controller/clientRuntime.js +13 -20
- package/dist/controller/controller.js +89 -116
- package/dist/controller/fileSchedulerStoreAdapter.js +511 -742
- package/dist/controller/jobControl.js +17 -17
- package/dist/controller/resourceInventory.js +6 -6
- package/dist/controller/resourceInventoryLinux.js +38 -59
- package/dist/controller/resourceInventoryRpc.js +3 -3
- package/dist/controller/resourceInventoryWorker.js +1 -1
- package/dist/controller/runtime.js +46 -53
- package/dist/controller/runtimeEventInbox.js +23 -31
- package/dist/controller/runtimeEventProcessor.js +15 -15
- package/dist/controller/{runtimeHookRunFence.js → runtimeHookTurnFence.js} +87 -81
- package/dist/controller/runtimeLaunchCoordinator.js +3 -3
- package/dist/controller/runtimeObservationHook.js +11 -8
- package/dist/controller/sessionNotify.js +11 -11
- package/dist/controller/structuredProviderObservation.js +89 -16
- package/dist/coordination/workMailbox.js +309 -579
- package/dist/coordination/workMailboxQueue.js +5 -6
- package/dist/core/controllerClient.js +1 -91
- package/dist/core/controllerServer.js +3 -6
- package/dist/doctor/doctor.js +51 -314
- package/dist/execution/candidateConvergence.js +3 -3
- package/dist/execution/executionGroup.js +32 -33
- package/dist/execution/executionHealth.js +36 -38
- package/dist/execution/resourceBroker.js +12 -12
- package/dist/executor/agentExecutor.js +30 -265
- package/dist/executor/effectiveLaunch.js +9 -19
- package/dist/executor/executorRegistry.js +43 -17
- package/dist/executor/fileRoleLaunchPlanner.js +56 -56
- package/dist/executor/launchPlan.js +3 -3
- package/dist/executor/workspacePreflightClassification.js +16 -16
- package/dist/grant/capabilityGrant.js +20 -25
- package/dist/input/inputRequest.js +12 -12
- package/dist/integration/changeSet.js +9 -13
- package/dist/integration/changeSetManifest.js +1 -1
- package/dist/integration/gitIntegrationService.js +2 -2
- package/dist/integration/integrationQueueService.js +5 -21
- package/dist/integration/overlapDiagnostics.js +2 -2
- package/dist/interaction/operatorPresentation.js +1 -1
- package/dist/job/jobRunner.js +1 -1
- package/dist/lifecycle/canonicalLifecycleEvent.js +25 -25
- package/dist/lifecycle/{exactRunTerminalization.js → exactTurnTerminalization.js} +116 -232
- package/dist/message/message.js +6 -6
- package/dist/observability/executionAudit.js +74 -86
- package/dist/observability/faultClassification.js +7 -24
- package/dist/observability/orchestrationMetrics.js +5 -5
- package/dist/observability/runtimeIdentity.js +34 -101
- package/dist/profile/agentProfile.js +1 -1
- package/dist/release/cliHomeReleaseFence.js +3 -3
- package/dist/release/releaseWorkflowEngine.js +6 -10
- package/dist/release/releaseWorkflowPorts.js +2 -2
- package/dist/release/workflowFileLock.js +1 -1
- package/dist/repository/checkoutSwap.js +1 -1
- package/dist/repository/gitWorkspace.js +0 -13
- package/dist/repository/project.js +1 -1
- package/dist/repository/projectMaintenanceLock.js +1 -2
- package/dist/repository/taskBaseFreshness.js +13 -13
- package/dist/repository/taskWorkspaceCoordinator.js +21 -25
- package/dist/repository/taskWorkspaceIdentity.js +8 -21
- package/dist/repository/taskWorkspacePreparer.js +63 -620
- package/dist/resources/autoResourceGc.js +3 -3
- package/dist/resources/liveReferences.js +1 -1
- package/dist/resources/resourceGc.js +1 -1
- package/dist/resources/sqliteResourceRegistry.js +1 -1
- package/dist/review/reviewDecision.js +7 -7
- package/dist/review/reviewFindingLedger.js +1 -1
- package/dist/review/reviewOutcomeClassifier.js +35 -50
- package/dist/review/reviewRound.js +14 -25
- package/dist/review/reviewerAvailability.js +4 -4
- package/dist/review/taskFinalReviewContractResolution.js +41 -0
- package/dist/role/role.js +6 -3
- package/dist/runtime/agentDriver.js +4 -0
- package/dist/runtime/agentHost.js +151 -36
- package/dist/runtime/builtinAgentDrivers.js +79 -2
- package/dist/runtime/codexAppServerRuntime.js +122 -0
- package/dist/runtime/continuationManager.js +3 -5
- package/dist/runtime/exactControlPlane.js +17 -42
- package/dist/runtime/firstProgressAdvisory.js +1 -1
- package/dist/runtime/index.js +2 -2
- package/dist/runtime/launchDiagnostics.js +2 -2
- package/dist/runtime/lifecycleReservation.js +4 -4
- package/dist/runtime/processExitObservation.js +1 -1
- package/dist/runtime/processExitOutbox.js +0 -32
- package/dist/runtime/promptEnvelope.js +9 -9
- package/dist/runtime/providerContinuation.js +2 -2
- package/dist/runtime/providerContinuationReconciliationService.js +2 -2
- package/dist/runtime/providerRuntimeIdentity.js +76 -24
- package/dist/runtime/recentTurnIds.js +38 -0
- package/dist/runtime/runtimeContinuationProjection.js +2 -2
- package/dist/runtime/runtimeHealthPolicy.js +1 -1
- package/dist/runtime/runtimeObservation.js +58 -21
- package/dist/runtime/runtimeProjection.js +19 -27
- package/dist/runtime/sessionLaunchRequest.js +2 -2
- package/dist/runtime/structuredProviderHost.js +177 -12
- package/dist/runtime/tmuxAdapters.js +46 -11
- package/dist/scheduler/activeRoleTurnDelivery.js +245 -0
- package/dist/scheduler/leaderWakeupProcessor.js +147 -445
- package/dist/scheduler/operatorEvent.js +4 -6
- package/dist/scheduler/resourceQueueProjection.js +71 -0
- package/dist/scheduler/{roleRunLiveness.js → roleTurnLiveness.js} +24 -28
- package/dist/scheduler/{roleRunStall.js → roleTurnStall.js} +162 -247
- package/dist/scheduler/taskExecutionProjection.js +99 -99
- package/dist/scheduler/taskObservabilityProjection.js +10 -10
- package/dist/scheduler/taskWake.js +4 -4
- package/dist/scheduler/wakeReason.js +6 -10
- package/dist/scheduler/wakeupQueue.js +0 -9
- package/dist/setup/setupCommand.js +2 -2
- package/dist/storage/currentTaskStore.js +46 -0
- package/dist/storage/persistenceWorker.js +1 -1
- package/dist/storage/sqliteSchema.js +81 -485
- package/dist/storage/sqliteStore.js +206 -365
- package/dist/storage/storageSchema.js +1 -15
- package/dist/storage/storageVersions.js +8 -9
- package/dist/storage/storeRpc.js +10 -34
- package/dist/storage/taskStore.js +63 -3415
- package/dist/storage/upgrade/recordVersions.js +55 -149
- package/dist/storage/upgrade/upgradeOrchestrator.js +89 -1752
- package/dist/task/completionReadiness.js +5 -5
- package/dist/task/deliveryGuard.js +10 -10
- package/dist/task/nextAction.js +74 -77
- package/dist/task/task.js +2 -4
- package/dist/task/taskRecordReference.js +3 -3
- package/dist/task/taskRecordRetirement.js +1 -1
- package/dist/telemetry/sqliteTelemetryStore.js +53 -53
- package/dist/telemetry/telemetryConfig.js +14 -14
- package/dist/telemetry/telemetryWiring.js +8 -14
- package/dist/turn/turn.js +356 -0
- package/dist/{run/runIdentity.js → turn/turnIdentity.js} +4 -4
- package/dist/verification/gateArtifactStore.js +2 -2
- package/dist/web/assets/client/app.js +1 -1
- package/dist/web/assets/client/components.js +29 -54
- package/dist/web/assets/client/i18n.js +17 -37
- package/dist/web/assets/client/view.js +37 -37
- package/dist/web/assets/shell.js +1 -1
- package/dist/web/assets/styles/cards.js +5 -5
- package/dist/web/assets/styles/widgets.js +1 -2
- package/dist/web/webSnapshot.js +65 -60
- package/dist/workItem/workItem.js +11 -11
- package/dist/workspace/workItemChangeSetManager.js +1 -1
- package/docs/task-local-identity.md +5 -5
- package/i18n/README.zh-CN.md +41 -54
- package/package.json +1 -1
- package/skills/yui-leader/SKILL.md +85 -83
- package/skills/yui-operator/SKILL.md +16 -16
- package/skills/yui-reviewer/SKILL.md +10 -10
- package/skills/yui-runtime/SKILL.md +17 -18
- package/skills/yui-worker/SKILL.md +16 -18
- package/dist/context/runContextContract.js +0 -162
- package/dist/executor/turnCompletion.js +0 -126
- package/dist/review/taskFinalReviewContractEvent.js +0 -1
- package/dist/review/taskFinalReviewContractRebind.js +0 -367
- package/dist/run/agentRun.js +0 -356
- package/dist/run/rejectedYieldAttempt.js +0 -221
- package/dist/run/runControlRequest.js +0 -50
- package/dist/run/yieldReceipt.js +0 -65
- package/dist/runtime/turnCompletion.js +0 -3
- package/dist/scheduler/actionability.js +0 -323
- package/dist/scheduler/activeRoleRunDelivery.js +0 -868
- package/dist/scheduler/activeTaskProgress.js +0 -126
- package/dist/storage/compatibleTaskStore.js +0 -248
- package/dist/storage/migration/baseline.js +0 -78
- package/dist/storage/migration/classifier.js +0 -51
- package/dist/storage/migration/compatibleCodec.js +0 -53
- package/dist/storage/migration/engine.js +0 -147
- package/dist/storage/migration/index.js +0 -33
- package/dist/storage/migration/planner.js +0 -154
- package/dist/storage/migration/productionRegistry.js +0 -3931
- package/dist/storage/migration/registry.js +0 -169
- package/dist/storage/migration/report.js +0 -54
- package/dist/storage/migration/types.js +0 -31
- package/dist/storage/upgrade/homeClassification.js +0 -353
- package/dist/storage/upgrade/homeMigrationTarget.js +0 -595
- package/dist/storage/upgrade/migrationReceipt.js +0 -67
- package/dist/storage/upgrade/offlineUpgradeInventory.js +0 -453
- package/dist/storage/upgrade/productionMigrationRegistry.js +0 -6
- package/dist/storage/upgrade/pseudoLayoutRepair.js +0 -241
- package/dist/storage/upgrade/recordVersionScan.js +0 -176
- package/dist/storage/upgrade/sqliteFileSet.js +0 -50
- package/dist/storage/upgrade/sqliteMigrationTarget.js +0 -375
- package/dist/storage/upgrade/sqliteRecordMigrationTarget.js +0 -305
- package/dist/storage/upgrade/sqliteStateMigration.js +0 -918
- package/dist/storage/upgrade/switchProgress.js +0 -80
- package/dist/storage/upgrade/upgradeReceipt.js +0 -161
- package/dist/storage/upgradeCoordination.js +0 -187
- package/dist/storage/upgradeFence.js +0 -366
- package/dist/telemetry/telemetryCompaction.js +0 -252
|
@@ -28,9 +28,9 @@ export function completeWorkExecution(store, target, executionRef) {
|
|
|
28
28
|
/**
|
|
29
29
|
* Completes a mailbox execution or fails the surrounding transaction.
|
|
30
30
|
*
|
|
31
|
-
* A terminal
|
|
31
|
+
* A terminal Turn and its processing mailbox batch are one consistency
|
|
32
32
|
* boundary. Silently accepting a missing or mismatched batch would leave
|
|
33
|
-
* durable work stuck in `processing` after the
|
|
33
|
+
* durable work stuck in `processing` after the Turn has already ended.
|
|
34
34
|
*/
|
|
35
35
|
export function requireCompleteWorkExecution(store, target, executionRef) {
|
|
36
36
|
const mailbox = store.getWorkMailbox(target);
|
|
@@ -49,7 +49,7 @@ export function requireCompleteWorkExecution(store, target, executionRef) {
|
|
|
49
49
|
+ `${executionRef.type}/${executionRef.id}.`);
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
|
-
* Settles the exact
|
|
52
|
+
* Settles the exact Turn delivery boundary, including the short window before
|
|
53
53
|
* the scheduler has claimed its single pending dispatch. A merged pending
|
|
54
54
|
* batch is never discarded because its signal-to-ref mapping is no longer
|
|
55
55
|
* recoverable.
|
|
@@ -68,10 +68,9 @@ export function settleExactWorkExecution(store, target, executionRef) {
|
|
|
68
68
|
+ `${executionRef.type}/${executionRef.id}.`);
|
|
69
69
|
}
|
|
70
70
|
const pending = matching[0];
|
|
71
|
-
|
|
72
|
-
if (mailbox.pending[pendingKey] !== pending)
|
|
71
|
+
if (mailbox.pending !== pending)
|
|
73
72
|
return "absent";
|
|
74
|
-
store.saveWorkMailbox(consumePendingBatch(mailbox
|
|
73
|
+
store.saveWorkMailbox(consumePendingBatch(mailbox));
|
|
75
74
|
return "pending";
|
|
76
75
|
}
|
|
77
76
|
function timestamp(value) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
2
|
import { lstat, readFile } from "node:fs/promises";
|
|
3
3
|
import { createConnection } from "node:net";
|
|
4
|
-
import {
|
|
4
|
+
import { join } from "node:path";
|
|
5
5
|
import { CONTROLLER_DISCOVERY_PATH, FILE_TASK_CONTROLLER_PROTOCOL_VERSION, MAX_CONTROLLER_MESSAGE_BYTES, ControllerProtocolError, encodeControllerRequest, parseControllerDiscovery, parseControllerResponse } from "./protocol.js";
|
|
6
6
|
import { isControllerSocketPathForHome } from "./controllerEndpoint.js";
|
|
7
7
|
import { readHomeFilesystemId } from "./homeFilesystemIdentity.js";
|
|
@@ -91,36 +91,6 @@ export async function callController(home, method, params = {}, options = {}) {
|
|
|
91
91
|
}
|
|
92
92
|
return exchange(discovery.socketPath, requestLine, id, timeoutMs);
|
|
93
93
|
}
|
|
94
|
-
/**
|
|
95
|
-
* One-generation transition used only by the documented `controller restart`
|
|
96
|
-
* upgrade path from the last released protocol (v3). Ordinary calls never
|
|
97
|
-
* accept or dispatch through this legacy shape.
|
|
98
|
-
*/
|
|
99
|
-
export async function stopPreviousFileTaskController(home, timeoutMs) {
|
|
100
|
-
if (!Number.isSafeInteger(timeoutMs) || timeoutMs < 1) {
|
|
101
|
-
throw new TypeError("Controller timeout must be a positive integer.");
|
|
102
|
-
}
|
|
103
|
-
const discovery = await readPreviousControllerDiscovery(home);
|
|
104
|
-
const homeFilesystemId = readHomeFilesystemId(home);
|
|
105
|
-
if (inspectLiveControllerProcess(discovery.pid, homeFilesystemId, discovery.processStartIdentity) === undefined)
|
|
106
|
-
throw invalidDiscovery();
|
|
107
|
-
const id = randomUUID();
|
|
108
|
-
const requestLine = `${JSON.stringify({
|
|
109
|
-
id,
|
|
110
|
-
token: discovery.token,
|
|
111
|
-
method: "controller.stop",
|
|
112
|
-
params: { expectedPid: discovery.pid }
|
|
113
|
-
})}\n`;
|
|
114
|
-
const deadline = Date.now() + timeoutMs;
|
|
115
|
-
await exchange(discovery.socketPath, requestLine, id, timeoutMs);
|
|
116
|
-
while (inspectLiveControllerProcess(discovery.pid, homeFilesystemId, discovery.processStartIdentity) !== undefined) {
|
|
117
|
-
if (Date.now() >= deadline) {
|
|
118
|
-
throw new ControllerClientError("CONTROLLER_TIMEOUT", `Previous Controller did not stop within ${timeoutMs} ms.`);
|
|
119
|
-
}
|
|
120
|
-
await new Promise((resolve) => setTimeout(resolve, 20));
|
|
121
|
-
}
|
|
122
|
-
return Object.freeze({ pid: discovery.pid });
|
|
123
|
-
}
|
|
124
94
|
/**
|
|
125
95
|
* Explicit restart recovery for an exact Controller whose discovery record
|
|
126
96
|
* was lost. The signal is fenced by same UID, controller entrypoint, physical
|
|
@@ -154,66 +124,6 @@ export async function stopOrphanedFileTaskController(home, timeoutMs) {
|
|
|
154
124
|
}
|
|
155
125
|
return Object.freeze({ pid: candidate.pid });
|
|
156
126
|
}
|
|
157
|
-
async function readPreviousControllerDiscovery(home) {
|
|
158
|
-
const discoveryPath = join(home, CONTROLLER_DISCOVERY_PATH);
|
|
159
|
-
try {
|
|
160
|
-
const metadata = await lstat(discoveryPath);
|
|
161
|
-
const uid = typeof process.getuid === "function" ? process.getuid() : undefined;
|
|
162
|
-
if (!metadata.isFile()
|
|
163
|
-
|| (metadata.mode & 0o077) !== 0
|
|
164
|
-
|| metadata.size > 4_096
|
|
165
|
-
|| (uid !== undefined && metadata.uid !== uid))
|
|
166
|
-
throw invalidDiscovery();
|
|
167
|
-
const value = JSON.parse(await readFile(discoveryPath, "utf8"));
|
|
168
|
-
if (typeof value !== "object"
|
|
169
|
-
|| value === null
|
|
170
|
-
|| Array.isArray(value)
|
|
171
|
-
|| !hasExactStringKeys(value, [
|
|
172
|
-
"pid",
|
|
173
|
-
"processStartIdentity",
|
|
174
|
-
"socketPath",
|
|
175
|
-
"token"
|
|
176
|
-
]))
|
|
177
|
-
throw invalidDiscovery();
|
|
178
|
-
const record = value;
|
|
179
|
-
if (!Number.isSafeInteger(record.pid)
|
|
180
|
-
|| record.pid < 1
|
|
181
|
-
|| typeof record.processStartIdentity !== "string"
|
|
182
|
-
|| !/^[0-9]{1,32}$/u.test(record.processStartIdentity)
|
|
183
|
-
|| typeof record.socketPath !== "string"
|
|
184
|
-
|| !isPreviousControllerSocketPath(record.socketPath)
|
|
185
|
-
|| typeof record.token !== "string"
|
|
186
|
-
|| !/^[a-f0-9]{64}$/u.test(record.token))
|
|
187
|
-
throw invalidDiscovery();
|
|
188
|
-
return Object.freeze({
|
|
189
|
-
pid: record.pid,
|
|
190
|
-
processStartIdentity: record.processStartIdentity,
|
|
191
|
-
socketPath: record.socketPath,
|
|
192
|
-
token: record.token
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
catch (error) {
|
|
196
|
-
if (error instanceof ControllerClientError)
|
|
197
|
-
throw error;
|
|
198
|
-
if (isNodeError(error) && error.code === "ENOENT") {
|
|
199
|
-
throw new ControllerClientError("CONTROLLER_NOT_RUNNING", "Controller is not running.");
|
|
200
|
-
}
|
|
201
|
-
throw invalidDiscovery();
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
function hasExactStringKeys(value, expected) {
|
|
205
|
-
const keys = Reflect.ownKeys(value);
|
|
206
|
-
return keys.length === expected.length
|
|
207
|
-
&& keys.every((key) => typeof key === "string")
|
|
208
|
-
&& expected.every((key) => Object.hasOwn(value, key));
|
|
209
|
-
}
|
|
210
|
-
function isPreviousControllerSocketPath(candidate) {
|
|
211
|
-
if (!isAbsolute(candidate) || resolve(candidate) !== candidate)
|
|
212
|
-
return false;
|
|
213
|
-
const uid = typeof process.getuid === "function" ? process.getuid() : 0;
|
|
214
|
-
return basename(dirname(candidate)) === `yui-${uid}`
|
|
215
|
-
&& /^[a-f0-9]{24}\.sock$/u.test(basename(candidate));
|
|
216
|
-
}
|
|
217
127
|
function exchange(socketPath, requestLine, expectedId, timeoutMs) {
|
|
218
128
|
return new Promise((resolve, reject) => {
|
|
219
129
|
const socket = createConnection(socketPath);
|
|
@@ -9,7 +9,7 @@ import { controllerSocketPath } from "./controllerEndpoint.js";
|
|
|
9
9
|
import { readHomeFilesystemId } from "./homeFilesystemIdentity.js";
|
|
10
10
|
import { findLiveControllerProcessForHome } from "./controllerProcessIdentity.js";
|
|
11
11
|
import { validateHomeId } from "../repository/homeIdentity.js";
|
|
12
|
-
import {
|
|
12
|
+
import { readCurrentHomeIdentity } from "../storage/currentTaskStore.js";
|
|
13
13
|
import { YUI_VERSION, yuiVersionIdentity } from "../version.js";
|
|
14
14
|
import { resolveStoreWorkerEnabledForHome } from "../storage/storeRpc.js";
|
|
15
15
|
import { resolveTaskStoreBackendForHome } from "../storage/sqliteStore.js";
|
|
@@ -36,7 +36,7 @@ export async function startControllerServer(home, dispatcher, beforeDiscoveryRem
|
|
|
36
36
|
}
|
|
37
37
|
async function startControllerServerLocked(home, dispatcher, beforeDiscoveryRemoval, options = {}) {
|
|
38
38
|
const discoveryPath = join(home, CONTROLLER_DISCOVERY_PATH);
|
|
39
|
-
const homeId = validateHomeId(
|
|
39
|
+
const homeId = validateHomeId(readCurrentHomeIdentity(home).homeId);
|
|
40
40
|
const homeFilesystemId = readHomeFilesystemId(home);
|
|
41
41
|
await assertExistingDiscoveryReplaceable(discoveryPath);
|
|
42
42
|
if (findLiveControllerProcessForHome(homeFilesystemId) !== undefined) {
|
|
@@ -62,10 +62,7 @@ async function startControllerServerLocked(home, dispatcher, beforeDiscoveryRemo
|
|
|
62
62
|
const release = options.release === undefined
|
|
63
63
|
? detectRunningRelease(fileURLToPath(import.meta.url))
|
|
64
64
|
: options.release;
|
|
65
|
-
//
|
|
66
|
-
// Home-decided backend (SQLite for a layout-7 Home with yui.db, file store
|
|
67
|
-
// for older layouts) instead of deriving it from YUI_STORE_BACKEND, which is
|
|
68
|
-
// reserved for tests and explicit recovery commands.
|
|
65
|
+
// The receipt reports the one current SQLite backend.
|
|
69
66
|
const storageBackend = options.storageBackend
|
|
70
67
|
?? resolveTaskStoreBackendForHome(home, process.env);
|
|
71
68
|
const workerEnabled = options.workerEnabled
|