@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.mjs
CHANGED
|
@@ -7686,7 +7686,9 @@ var init_mesh_events_coordinator = __esm({
|
|
|
7686
7686
|
"monitor:long_generating",
|
|
7687
7687
|
"refine:accepted",
|
|
7688
7688
|
"refine:completed",
|
|
7689
|
-
"refine:failed"
|
|
7689
|
+
"refine:failed",
|
|
7690
|
+
"worktree_bootstrap_complete",
|
|
7691
|
+
"worktree_bootstrap_failed"
|
|
7690
7692
|
]);
|
|
7691
7693
|
EVENT_TO_LEDGER_KIND = {
|
|
7692
7694
|
"agent:generating_completed": "task_completed",
|
|
@@ -31009,7 +31011,8 @@ var CliProviderInstance = class {
|
|
|
31009
31011
|
const rawStatus = adapterStatus.status;
|
|
31010
31012
|
const autoApproveActive = this.maybeAutoApproveStatus(adapterStatus, now);
|
|
31011
31013
|
const externalNativeFinal = this.getExternalNativeFinalReconciliation(void 0, adapterStatus);
|
|
31012
|
-
const
|
|
31014
|
+
const autoApproveHoldIdle = this.autoApproveBusy && rawStatus === "idle";
|
|
31015
|
+
const newStatus = externalNativeFinal && isCliGeneratingLikeStatus(rawStatus) ? "idle" : autoApproveActive || autoApproveHoldIdle ? "generating" : rawStatus;
|
|
31013
31016
|
const dirName = this.workingDir.split("/").filter(Boolean).pop() || "session";
|
|
31014
31017
|
const chatTitle = `${this.provider.name} \xB7 ${dirName}`;
|
|
31015
31018
|
const partial = this.adapter.getPartialResponse();
|
|
@@ -43704,26 +43707,34 @@ ${tail}` : ""
|
|
|
43704
43707
|
const emitBootstrapEvent = (eventStatus2, bootstrapState2, startedAtMs, extraPayload) => {
|
|
43705
43708
|
try {
|
|
43706
43709
|
const durationMs = Date.now() - startedAtMs;
|
|
43707
|
-
const
|
|
43708
|
-
|
|
43710
|
+
const event = `worktree_${eventStatus2}`;
|
|
43711
|
+
const metadataEvent = {
|
|
43712
|
+
source: "clone_mesh_node_bootstrap",
|
|
43713
|
+
nodeId: node.id,
|
|
43714
|
+
status: eventStatus2,
|
|
43715
|
+
worktreePath: result.worktreePath,
|
|
43716
|
+
durationMs,
|
|
43717
|
+
bootstrapStatus: bootstrapState2.status,
|
|
43718
|
+
...bootstrapState2.error ? { error: bootstrapState2.error } : {},
|
|
43719
|
+
...bootstrapState2.exitCode !== void 0 ? { exitCode: bootstrapState2.exitCode } : {},
|
|
43720
|
+
...extraPayload || {}
|
|
43721
|
+
};
|
|
43722
|
+
if (typeof this.deps.instanceManager?.getByCategory === "function") {
|
|
43723
|
+
const forwarded = handleMeshForwardEvent(
|
|
43724
|
+
{ instanceManager: this.deps.instanceManager },
|
|
43725
|
+
{ event, meshId, nodeId: node.id, workspace: result.worktreePath, metadataEvent }
|
|
43726
|
+
);
|
|
43727
|
+
if (forwarded?.success === true) return;
|
|
43728
|
+
}
|
|
43729
|
+
queuePendingMeshCoordinatorEvent({
|
|
43730
|
+
event,
|
|
43709
43731
|
meshId,
|
|
43710
43732
|
nodeLabel: node.id,
|
|
43711
43733
|
nodeId: node.id,
|
|
43712
43734
|
workspace: result.worktreePath,
|
|
43713
|
-
metadataEvent
|
|
43714
|
-
source: "clone_mesh_node_bootstrap",
|
|
43715
|
-
nodeId: node.id,
|
|
43716
|
-
status: eventStatus2,
|
|
43717
|
-
worktreePath: result.worktreePath,
|
|
43718
|
-
durationMs,
|
|
43719
|
-
bootstrapStatus: bootstrapState2.status,
|
|
43720
|
-
...bootstrapState2.error ? { error: bootstrapState2.error } : {},
|
|
43721
|
-
...bootstrapState2.exitCode !== void 0 ? { exitCode: bootstrapState2.exitCode } : {},
|
|
43722
|
-
...extraPayload || {}
|
|
43723
|
-
},
|
|
43735
|
+
metadataEvent,
|
|
43724
43736
|
queuedAt: Date.now()
|
|
43725
|
-
};
|
|
43726
|
-
queuePendingMeshCoordinatorEvent(eventPayload);
|
|
43737
|
+
});
|
|
43727
43738
|
} catch {
|
|
43728
43739
|
}
|
|
43729
43740
|
};
|