@adhdev/daemon-core 0.9.82-rc.225 → 0.9.82-rc.226
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/package.json
CHANGED
|
@@ -388,6 +388,7 @@ function buildRulesSection(coordinatorCliType?: string): string {
|
|
|
388
388
|
- **Refinery is config-driven.** \`mesh_refine_node\` must run validation from \`.adhdev/refine.{json,yaml,yml}\` or \`repo-mesh.refine.*\`. Heuristics are scaffolding only.
|
|
389
389
|
- **Submodule reachability = publish-needed.** \`submodule_reachability_failed\` → classify as \`blocked_review\`, request user approval to push to submodule main, then rerun \`mesh_refine_node\`.
|
|
390
390
|
- **Honor per-node instructions.** When a node carries a 📌 Node instruction in the nodes section, include the relevant parts of that instruction in the task message you send to that node. Don't paraphrase the instruction into your own words — quote it verbatim so the worker agent sees exactly what the user wrote.
|
|
391
|
+
- **Mission status does not update itself.** When a mission's tasks are all done or the work is abandoned, explicitly call \`mesh_mission_upsert\` to set status \`completed\` or \`abandoned\`. Never leave a finished mission in \`active\`. All-cancelled tasks with no further work → \`abandoned\`.
|
|
391
392
|
- **Never fabricate tool results.** Always call the actual tool.
|
|
392
393
|
- **Keep the user informed.** One or two sentences after each delegation round.${coordinatorNote}`;
|
|
393
394
|
}
|
|
@@ -282,6 +282,17 @@ export function tryAssignQueueTask(
|
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
|
|
285
|
+
// Stamp mesh context onto the session so completion events route correctly
|
|
286
|
+
// via setupMeshEventForwarding. Without this, manually-opened idle sessions
|
|
287
|
+
// (mesh_launch_session without auto-launch) lack meshNodeFor/meshNodeId and
|
|
288
|
+
// agent:generating_completed is silently dropped as isMeshDelegate=false.
|
|
289
|
+
try {
|
|
290
|
+
const inst = components.instanceManager.getInstance(sessionId);
|
|
291
|
+
if (inst && typeof inst.updateSettings === 'function') {
|
|
292
|
+
inst.updateSettings({ meshNodeFor: meshId, meshNodeId: nodeId, launchedByCoordinator: true });
|
|
293
|
+
}
|
|
294
|
+
} catch { /* best-effort — dispatch still proceeds */ }
|
|
295
|
+
|
|
285
296
|
const delivery = createSessionDelivery({
|
|
286
297
|
meshId,
|
|
287
298
|
nodeId,
|
|
@@ -595,9 +595,10 @@ export class CliProviderInstance implements ProviderInstance {
|
|
|
595
595
|
typeof adapterStatus?.providerSessionId === 'string' ? adapterStatus.providerSessionId : '',
|
|
596
596
|
);
|
|
597
597
|
const autoApproveActive = this.maybeAutoApproveStatus(adapterStatus, Date.now());
|
|
598
|
+
const autoApproveHoldIdle = this.autoApproveBusy && adapterStatus.status === 'idle';
|
|
598
599
|
let visibleStatus = parseErrorMessage || parsedStatus?.status === 'error'
|
|
599
600
|
? 'error'
|
|
600
|
-
: (autoApproveActive ? 'generating' : adapterStatus.status);
|
|
601
|
+
: (autoApproveActive || autoApproveHoldIdle ? 'generating' : adapterStatus.status);
|
|
601
602
|
const externalNativeFinal = this.getExternalNativeFinalReconciliation(parsedStatus?.messages, adapterStatus);
|
|
602
603
|
if (externalNativeFinal && isCliGeneratingLikeStatus(visibleStatus)) {
|
|
603
604
|
visibleStatus = 'idle';
|
|
@@ -718,7 +719,7 @@ export class CliProviderInstance implements ProviderInstance {
|
|
|
718
719
|
});
|
|
719
720
|
const activeChatStatus = parseErrorMessage
|
|
720
721
|
? 'error'
|
|
721
|
-
: autoApproveActive && parsedStatus?.status === 'waiting_approval'
|
|
722
|
+
: (autoApproveActive && parsedStatus?.status === 'waiting_approval') || autoApproveHoldIdle
|
|
722
723
|
? 'generating'
|
|
723
724
|
: (adapterStatus.status !== 'idle'
|
|
724
725
|
? visibleStatus
|
|
@@ -743,7 +744,7 @@ export class CliProviderInstance implements ProviderInstance {
|
|
|
743
744
|
title: parsedStatus?.title || dirName,
|
|
744
745
|
status: finalChatStatus,
|
|
745
746
|
messages: statusMessages,
|
|
746
|
-
activeModal: autoApproveActive ? null : (parsedStatus?.activeModal ?? adapterStatus.activeModal),
|
|
747
|
+
activeModal: (autoApproveActive || autoApproveHoldIdle) ? null : (parsedStatus?.activeModal ?? adapterStatus.activeModal),
|
|
747
748
|
activeInteractivePrompt: this.activeInteractivePrompt,
|
|
748
749
|
inputContent: '',
|
|
749
750
|
},
|
|
@@ -788,7 +789,8 @@ export class CliProviderInstance implements ProviderInstance {
|
|
|
788
789
|
getHotChatSessionState(): HotChatSessionState {
|
|
789
790
|
const adapterStatus = this.adapter.getStatus({ allowParse: false });
|
|
790
791
|
const autoApproveActive = adapterStatus.status === 'waiting_approval' && this.shouldAutoApprove();
|
|
791
|
-
const
|
|
792
|
+
const autoApproveHoldIdle = this.autoApproveBusy && adapterStatus.status === 'idle';
|
|
793
|
+
const visibleStatus = autoApproveActive || autoApproveHoldIdle ? 'generating' : adapterStatus.status;
|
|
792
794
|
const runtime = this.adapter.getRuntimeMetadata();
|
|
793
795
|
return {
|
|
794
796
|
id: this.instanceId,
|
|
@@ -803,7 +805,8 @@ export class CliProviderInstance implements ProviderInstance {
|
|
|
803
805
|
getSessionModalState(sessionId?: string): SessionModalState {
|
|
804
806
|
const adapterStatus = this.adapter.getStatus({ allowParse: true });
|
|
805
807
|
const autoApproveActive = adapterStatus.status === 'waiting_approval' && this.shouldAutoApprove();
|
|
806
|
-
const
|
|
808
|
+
const autoApproveHoldIdle = this.autoApproveBusy && adapterStatus.status === 'idle';
|
|
809
|
+
const visibleStatus = autoApproveActive || autoApproveHoldIdle ? 'generating' : adapterStatus.status;
|
|
807
810
|
const dirName = this.workingDir.split('/').filter(Boolean).pop() || 'session';
|
|
808
811
|
return {
|
|
809
812
|
// Honor the caller-supplied sessionId — InstanceMgr rejects the
|
|
@@ -813,7 +816,7 @@ export class CliProviderInstance implements ProviderInstance {
|
|
|
813
816
|
id: sessionId ?? this.instanceId,
|
|
814
817
|
status: visibleStatus,
|
|
815
818
|
title: dirName,
|
|
816
|
-
activeModal: autoApproveActive ? null : adapterStatus.activeModal,
|
|
819
|
+
activeModal: (autoApproveActive || autoApproveHoldIdle) ? null : adapterStatus.activeModal,
|
|
817
820
|
};
|
|
818
821
|
}
|
|
819
822
|
|