@adhdev/daemon-standalone 0.9.82-rc.226 → 0.9.82-rc.228
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/index.js
CHANGED
|
@@ -52418,7 +52418,7 @@ ${effect.notification.body || ""}`.trim();
|
|
|
52418
52418
|
mode: state.mode,
|
|
52419
52419
|
resume: state.resume,
|
|
52420
52420
|
activeChat,
|
|
52421
|
-
|
|
52421
|
+
activeInteractivePrompt: state.activeInteractivePrompt ?? null,
|
|
52422
52422
|
...summaryMetadata && { summaryMetadata },
|
|
52423
52423
|
...includeSessionMetadata && {
|
|
52424
52424
|
capabilities: state.mode === "terminal" ? PTY_SESSION_CAPABILITIES : CLI_CHAT_SESSION_CAPABILITIES,
|
|
@@ -52433,7 +52433,8 @@ ${effect.notification.body || ""}`.trim();
|
|
|
52433
52433
|
lastUpdated: state.lastUpdated,
|
|
52434
52434
|
settings: state.settings,
|
|
52435
52435
|
...coordinator && { coordinator },
|
|
52436
|
-
...meshQueueStats && { meshQueueStats }
|
|
52436
|
+
...meshQueueStats && { meshQueueStats },
|
|
52437
|
+
...state.settings?.spawnedSessionVisibility === "hidden" && { surfaceHidden: true }
|
|
52437
52438
|
};
|
|
52438
52439
|
}
|
|
52439
52440
|
function buildAcpSession(state, options) {
|
|
@@ -52473,7 +52474,8 @@ ${effect.notification.body || ""}`.trim();
|
|
|
52473
52474
|
lastUpdated: state.lastUpdated,
|
|
52474
52475
|
settings: state.settings,
|
|
52475
52476
|
...coordinator && { coordinator },
|
|
52476
|
-
...meshQueueStats && { meshQueueStats }
|
|
52477
|
+
...meshQueueStats && { meshQueueStats },
|
|
52478
|
+
...state.settings?.spawnedSessionVisibility === "hidden" && { surfaceHidden: true }
|
|
52477
52479
|
};
|
|
52478
52480
|
}
|
|
52479
52481
|
function buildSessionEntries(allStates, cdpManagers, options = {}) {
|
|
@@ -60830,7 +60832,7 @@ ${formatManifestValidationIssues2(validation.issues)}`,
|
|
|
60830
60832
|
const latestStatus = this.adapter.getStatus({ allowParse: false });
|
|
60831
60833
|
const latestAutoApproveActive = latestStatus.status === "waiting_approval" && this.shouldAutoApprove();
|
|
60832
60834
|
const externalNativeFinal = this.getExternalNativeFinalReconciliation(void 0, latestStatus);
|
|
60833
|
-
const latestVisibleStatus = externalNativeFinal && isCliGeneratingLikeStatus(latestStatus.status) ? "idle" : latestAutoApproveActive ? "generating" : latestStatus.status;
|
|
60835
|
+
const latestVisibleStatus = externalNativeFinal && isCliGeneratingLikeStatus(latestStatus.status) ? "idle" : latestAutoApproveActive || this.autoApproveBusy ? "generating" : latestStatus.status;
|
|
60834
60836
|
LOG2.debug("CLI", `[${this.type}] flush attempt: adapterStatus=${latestStatus.status} latestVisible=${latestVisibleStatus} externalNativeFinal=${!!externalNativeFinal} generatingStartedAt=${this.generatingStartedAt} isWaitingForResponse=${!!this.adapter?.isWaitingForResponse} hasPartial=${!!this.adapter.getPartialResponse?.()}`);
|
|
60835
60837
|
if (latestVisibleStatus !== "idle") {
|
|
60836
60838
|
LOG2.info("CLI", `[${this.type}] cancelled pending completed (resumed ${latestVisibleStatus})`);
|
|
@@ -60926,7 +60928,7 @@ ${formatManifestValidationIssues2(validation.issues)}`,
|
|
|
60926
60928
|
this.autoApproveBusy = false;
|
|
60927
60929
|
this.autoApproveBusyTimer = null;
|
|
60928
60930
|
this.lastAutoApprovalSignature = "";
|
|
60929
|
-
},
|
|
60931
|
+
}, 5e3);
|
|
60930
60932
|
this.recordAutoApproval(modal?.message, buttonLabel, now);
|
|
60931
60933
|
setTimeout(() => {
|
|
60932
60934
|
this.adapter.resolveModal(buttonIndex);
|
|
@@ -63294,6 +63296,7 @@ ${rawInput}` : rawInput;
|
|
|
63294
63296
|
transport: "pty",
|
|
63295
63297
|
adapterKey: key,
|
|
63296
63298
|
instanceKey: key,
|
|
63299
|
+
workspace: resolvedDir,
|
|
63297
63300
|
// attachExisting === true means we're restoring an already-spawned
|
|
63298
63301
|
// hosted runtime after a daemon restart, not starting a fresh PTY.
|
|
63299
63302
|
// The real spawn time is in the past and we don't have it on the
|
|
@@ -63357,7 +63360,8 @@ ${installInfo}`
|
|
|
63357
63360
|
providerType: normalizedType,
|
|
63358
63361
|
transport: "acp",
|
|
63359
63362
|
adapterKey: key,
|
|
63360
|
-
instanceKey: key
|
|
63363
|
+
instanceKey: key,
|
|
63364
|
+
workspace: resolvedDir
|
|
63361
63365
|
});
|
|
63362
63366
|
this.adapters.set(key, {
|
|
63363
63367
|
cliType: normalizedType,
|
|
@@ -73335,14 +73339,27 @@ ${tail}` : ""
|
|
|
73335
73339
|
const nodeId = typeof args?.nodeId === "string" ? args.nodeId.trim() : "";
|
|
73336
73340
|
let workspace = typeof args?.workspace === "string" ? args.workspace.trim() : "";
|
|
73337
73341
|
let submoduleIgnorePaths = Array.isArray(args?.submoduleIgnorePaths) ? args.submoduleIgnorePaths.filter((value) => typeof value === "string") : void 0;
|
|
73338
|
-
|
|
73342
|
+
let nodeDaemonId;
|
|
73343
|
+
if (meshId && nodeId) {
|
|
73339
73344
|
const meshRecord = await this.getMeshForCommand(meshId, args?.inlineMesh);
|
|
73340
73345
|
const mesh = meshRecord?.mesh;
|
|
73341
73346
|
const node = mesh?.nodes?.find((n) => n.id === nodeId || n.nodeId === nodeId);
|
|
73342
|
-
|
|
73347
|
+
if (!workspace) {
|
|
73348
|
+
workspace = typeof node?.workspace === "string" ? node.workspace.trim() : "";
|
|
73349
|
+
}
|
|
73343
73350
|
if (!submoduleIgnorePaths && Array.isArray(node?.policy?.submoduleIgnorePaths)) {
|
|
73344
73351
|
submoduleIgnorePaths = node.policy.submoduleIgnorePaths.filter((value) => typeof value === "string");
|
|
73345
73352
|
}
|
|
73353
|
+
nodeDaemonId = typeof node?.daemonId === "string" ? node.daemonId.trim() : void 0;
|
|
73354
|
+
}
|
|
73355
|
+
const selfDaemonId = this.deps.statusInstanceId;
|
|
73356
|
+
const isRemote = nodeDaemonId && selfDaemonId && nodeDaemonId !== selfDaemonId;
|
|
73357
|
+
if (isRemote && this.deps.dispatchMeshCommand) {
|
|
73358
|
+
const forwarded = await this.deps.dispatchMeshCommand(nodeDaemonId, "fast_forward_mesh_node", {
|
|
73359
|
+
...typeof args === "object" && args !== null ? args : {},
|
|
73360
|
+
workspace
|
|
73361
|
+
});
|
|
73362
|
+
return forwarded ?? { success: false, error: "no response from remote node" };
|
|
73346
73363
|
}
|
|
73347
73364
|
const result = await fastForwardMeshNode({
|
|
73348
73365
|
meshId: meshId || void 0,
|
|
@@ -73380,6 +73397,14 @@ ${tail}` : ""
|
|
|
73380
73397
|
}
|
|
73381
73398
|
let worktreeCleanup;
|
|
73382
73399
|
if (node?.isLocalWorktree) {
|
|
73400
|
+
const nodeDaemonId = typeof node.daemonId === "string" ? node.daemonId.trim() : void 0;
|
|
73401
|
+
const isRemoteWorktree = nodeDaemonId && nodeDaemonId !== this.deps.statusInstanceId && this.deps.dispatchMeshCommand;
|
|
73402
|
+
if (isRemoteWorktree) {
|
|
73403
|
+
const forwarded = await this.deps.dispatchMeshCommand(nodeDaemonId, "remove_mesh_node", {
|
|
73404
|
+
...typeof args === "object" && args !== null ? args : {}
|
|
73405
|
+
});
|
|
73406
|
+
return forwarded ?? { success: false, error: "no response from remote node" };
|
|
73407
|
+
}
|
|
73383
73408
|
const cleanupResult = await this.cleanupLocalWorktreeNode({ mesh, node, nodeId, force: args?.force === true });
|
|
73384
73409
|
if (cleanupResult.success === false) {
|
|
73385
73410
|
return {
|
|
@@ -73446,6 +73471,13 @@ ${tail}` : ""
|
|
|
73446
73471
|
if (!mesh) return { success: false, error: "Mesh not found" };
|
|
73447
73472
|
const sourceNode = mesh.nodes?.find((n) => n.id === sourceNodeId || n.nodeId === sourceNodeId);
|
|
73448
73473
|
if (!sourceNode) return { success: false, error: `Source node '${sourceNodeId}' not found in mesh` };
|
|
73474
|
+
const sourceDaemonId = typeof sourceNode.daemonId === "string" ? sourceNode.daemonId.trim() : void 0;
|
|
73475
|
+
if (sourceDaemonId && sourceDaemonId !== this.deps.statusInstanceId && this.deps.dispatchMeshCommand) {
|
|
73476
|
+
const forwarded = await this.deps.dispatchMeshCommand(sourceDaemonId, "clone_mesh_node", {
|
|
73477
|
+
...typeof args === "object" && args !== null ? args : {}
|
|
73478
|
+
});
|
|
73479
|
+
return forwarded ?? { success: false, error: "no response from remote node" };
|
|
73480
|
+
}
|
|
73449
73481
|
const repoRoot = sourceNode.repoRoot || sourceNode.workspace;
|
|
73450
73482
|
const { createWorktree: createWorktree2 } = await Promise.resolve().then(() => (init_git_worktree(), git_worktree_exports));
|
|
73451
73483
|
const result = await createWorktree2({
|
|
@@ -73678,6 +73710,13 @@ ${tail}` : ""
|
|
|
73678
73710
|
const node = mesh.nodes?.find((n) => n.id === nodeId || n.nodeId === nodeId);
|
|
73679
73711
|
if (!node) return { success: false, error: `Node '${nodeId}' not found in mesh` };
|
|
73680
73712
|
if (!node.isLocalWorktree) return { success: false, error: "Node is not a local worktree node" };
|
|
73713
|
+
const nodeDaemonId = typeof node.daemonId === "string" ? node.daemonId.trim() : void 0;
|
|
73714
|
+
if (nodeDaemonId && nodeDaemonId !== this.deps.statusInstanceId && this.deps.dispatchMeshCommand) {
|
|
73715
|
+
const forwarded = await this.deps.dispatchMeshCommand(nodeDaemonId, "retry_mesh_node_bootstrap", {
|
|
73716
|
+
...typeof args === "object" && args !== null ? args : {}
|
|
73717
|
+
});
|
|
73718
|
+
return forwarded ?? { success: false, error: "no response from remote node" };
|
|
73719
|
+
}
|
|
73681
73720
|
const currentBootstrap = node.worktreeBootstrap;
|
|
73682
73721
|
if (currentBootstrap?.status === "running") {
|
|
73683
73722
|
return { success: false, error: "Bootstrap is already running for this node" };
|