@adhdev/daemon-core 0.9.82-rc.224 → 0.9.82-rc.225
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 +28 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/commands/router.ts +23 -15
- package/src/mesh/mesh-events-coordinator.ts +2 -0
- package/src/providers/cli-provider-instance.ts +6 -1
package/dist/index.js
CHANGED
|
@@ -7693,7 +7693,9 @@ var init_mesh_events_coordinator = __esm({
|
|
|
7693
7693
|
"monitor:long_generating",
|
|
7694
7694
|
"refine:accepted",
|
|
7695
7695
|
"refine:completed",
|
|
7696
|
-
"refine:failed"
|
|
7696
|
+
"refine:failed",
|
|
7697
|
+
"worktree_bootstrap_complete",
|
|
7698
|
+
"worktree_bootstrap_failed"
|
|
7697
7699
|
]);
|
|
7698
7700
|
EVENT_TO_LEDGER_KIND = {
|
|
7699
7701
|
"agent:generating_completed": "task_completed",
|
|
@@ -31341,7 +31343,8 @@ var CliProviderInstance = class {
|
|
|
31341
31343
|
const rawStatus = adapterStatus.status;
|
|
31342
31344
|
const autoApproveActive = this.maybeAutoApproveStatus(adapterStatus, now);
|
|
31343
31345
|
const externalNativeFinal = this.getExternalNativeFinalReconciliation(void 0, adapterStatus);
|
|
31344
|
-
const
|
|
31346
|
+
const autoApproveHoldIdle = this.autoApproveBusy && rawStatus === "idle";
|
|
31347
|
+
const newStatus = externalNativeFinal && isCliGeneratingLikeStatus(rawStatus) ? "idle" : autoApproveActive || autoApproveHoldIdle ? "generating" : rawStatus;
|
|
31345
31348
|
const dirName = this.workingDir.split("/").filter(Boolean).pop() || "session";
|
|
31346
31349
|
const chatTitle = `${this.provider.name} \xB7 ${dirName}`;
|
|
31347
31350
|
const partial = this.adapter.getPartialResponse();
|
|
@@ -44031,26 +44034,34 @@ ${tail}` : ""
|
|
|
44031
44034
|
const emitBootstrapEvent = (eventStatus2, bootstrapState2, startedAtMs, extraPayload) => {
|
|
44032
44035
|
try {
|
|
44033
44036
|
const durationMs = Date.now() - startedAtMs;
|
|
44034
|
-
const
|
|
44035
|
-
|
|
44037
|
+
const event = `worktree_${eventStatus2}`;
|
|
44038
|
+
const metadataEvent = {
|
|
44039
|
+
source: "clone_mesh_node_bootstrap",
|
|
44040
|
+
nodeId: node.id,
|
|
44041
|
+
status: eventStatus2,
|
|
44042
|
+
worktreePath: result.worktreePath,
|
|
44043
|
+
durationMs,
|
|
44044
|
+
bootstrapStatus: bootstrapState2.status,
|
|
44045
|
+
...bootstrapState2.error ? { error: bootstrapState2.error } : {},
|
|
44046
|
+
...bootstrapState2.exitCode !== void 0 ? { exitCode: bootstrapState2.exitCode } : {},
|
|
44047
|
+
...extraPayload || {}
|
|
44048
|
+
};
|
|
44049
|
+
if (typeof this.deps.instanceManager?.getByCategory === "function") {
|
|
44050
|
+
const forwarded = handleMeshForwardEvent(
|
|
44051
|
+
{ instanceManager: this.deps.instanceManager },
|
|
44052
|
+
{ event, meshId, nodeId: node.id, workspace: result.worktreePath, metadataEvent }
|
|
44053
|
+
);
|
|
44054
|
+
if (forwarded?.success === true) return;
|
|
44055
|
+
}
|
|
44056
|
+
queuePendingMeshCoordinatorEvent({
|
|
44057
|
+
event,
|
|
44036
44058
|
meshId,
|
|
44037
44059
|
nodeLabel: node.id,
|
|
44038
44060
|
nodeId: node.id,
|
|
44039
44061
|
workspace: result.worktreePath,
|
|
44040
|
-
metadataEvent
|
|
44041
|
-
source: "clone_mesh_node_bootstrap",
|
|
44042
|
-
nodeId: node.id,
|
|
44043
|
-
status: eventStatus2,
|
|
44044
|
-
worktreePath: result.worktreePath,
|
|
44045
|
-
durationMs,
|
|
44046
|
-
bootstrapStatus: bootstrapState2.status,
|
|
44047
|
-
...bootstrapState2.error ? { error: bootstrapState2.error } : {},
|
|
44048
|
-
...bootstrapState2.exitCode !== void 0 ? { exitCode: bootstrapState2.exitCode } : {},
|
|
44049
|
-
...extraPayload || {}
|
|
44050
|
-
},
|
|
44062
|
+
metadataEvent,
|
|
44051
44063
|
queuedAt: Date.now()
|
|
44052
|
-
};
|
|
44053
|
-
queuePendingMeshCoordinatorEvent(eventPayload);
|
|
44064
|
+
});
|
|
44054
44065
|
} catch {
|
|
44055
44066
|
}
|
|
44056
44067
|
};
|