@adhdev/daemon-core 0.9.82-rc.229 → 0.9.82-rc.230
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 +9 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -4
- package/dist/index.mjs.map +1 -1
- package/dist/providers/cli-provider-instance.d.ts +1 -0
- package/dist/providers/provider-instance-manager.d.ts +1 -0
- package/package.json +1 -1
- package/src/commands/chat-commands.ts +8 -1
- package/src/commands/cli-manager.ts +1 -0
- package/src/providers/cli-provider-instance.ts +2 -1
- package/src/providers/provider-instance-manager.ts +2 -2
|
@@ -111,6 +111,7 @@ export declare class CliProviderInstance implements ProviderInstance {
|
|
|
111
111
|
meshId: string;
|
|
112
112
|
nodeId?: string;
|
|
113
113
|
taskId?: string;
|
|
114
|
+
coordinatorDaemonId?: string;
|
|
114
115
|
}): void;
|
|
115
116
|
/**
|
|
116
117
|
* Clear a previously-attached mesh assignment after the task reaches a
|
|
@@ -90,6 +90,7 @@ export declare class ProviderInstanceManager {
|
|
|
90
90
|
meshId: string;
|
|
91
91
|
nodeId?: string;
|
|
92
92
|
taskId?: string;
|
|
93
|
+
coordinatorDaemonId?: string;
|
|
93
94
|
}): boolean;
|
|
94
95
|
/** Clear a mesh assignment after the dispatched task reaches a terminal
|
|
95
96
|
* state (generating_completed / stopped / failed). */
|
package/package.json
CHANGED
|
@@ -2160,11 +2160,18 @@ export async function handleReadChat(h: CommandHelpers, args: any): Promise<Comm
|
|
|
2160
2160
|
let selectedTranscriptAuthority = transcriptAuthority;
|
|
2161
2161
|
let selectedCoverage = coverage;
|
|
2162
2162
|
let selectedStatus = returnedStatus;
|
|
2163
|
-
const
|
|
2163
|
+
const _targetSidForWs = typeof args?.targetSessionId === 'string' ? args.targetSessionId.trim() : '';
|
|
2164
|
+
const _registryWs = _targetSidForWs
|
|
2165
|
+
? (h.ctx?.sessionRegistry?.get?.(_targetSidForWs) as any)?.workspace
|
|
2166
|
+
: undefined;
|
|
2167
|
+
const _currentSessionWs = typeof (h.currentSession as any)?.workspace === 'string'
|
|
2164
2168
|
? (h.currentSession as any).workspace
|
|
2165
2169
|
: typeof adapter.workingDir === 'string'
|
|
2166
2170
|
? adapter.workingDir
|
|
2167
2171
|
: undefined;
|
|
2172
|
+
const sessionWorkspace = _targetSidForWs
|
|
2173
|
+
? (typeof _registryWs === 'string' ? _registryWs : (typeof args?.workspace === 'string' ? args.workspace : undefined) ?? _currentSessionWs)
|
|
2174
|
+
: _currentSessionWs;
|
|
2168
2175
|
const intendedWorkspace = typeof args?.workspace === 'string' ? args.workspace : undefined;
|
|
2169
2176
|
// ───────────────────────────────────────────────────────────
|
|
2170
2177
|
// Chat source decision via ChatSourceMachine (A2 big-bang).
|
|
@@ -1325,6 +1325,7 @@ export class DaemonCliManager {
|
|
|
1325
1325
|
meshId: meshContext.meshId,
|
|
1326
1326
|
...(typeof meshContext.nodeId === 'string' && meshContext.nodeId ? { nodeId: meshContext.nodeId } : {}),
|
|
1327
1327
|
...(typeof meshContext.taskId === 'string' && meshContext.taskId ? { taskId: meshContext.taskId } : {}),
|
|
1328
|
+
...(typeof meshContext.coordinatorDaemonId === 'string' && meshContext.coordinatorDaemonId ? { coordinatorDaemonId: meshContext.coordinatorDaemonId } : {}),
|
|
1328
1329
|
});
|
|
1329
1330
|
} catch { /* best-effort */ }
|
|
1330
1331
|
}
|
|
@@ -853,13 +853,14 @@ export class CliProviderInstance implements ProviderInstance {
|
|
|
853
853
|
* completion events silently drop because the forwarder has nothing to
|
|
854
854
|
* match against.
|
|
855
855
|
*/
|
|
856
|
-
attachMeshAssignment(assignment: { meshId: string; nodeId?: string; taskId?: string }): void {
|
|
856
|
+
attachMeshAssignment(assignment: { meshId: string; nodeId?: string; taskId?: string; coordinatorDaemonId?: string }): void {
|
|
857
857
|
if (!assignment?.meshId) return;
|
|
858
858
|
this.settings = {
|
|
859
859
|
...this.settings,
|
|
860
860
|
meshNodeFor: assignment.meshId,
|
|
861
861
|
...(assignment.nodeId ? { meshNodeId: assignment.nodeId } : {}),
|
|
862
862
|
...(assignment.taskId ? { meshActiveTaskId: assignment.taskId } : {}),
|
|
863
|
+
...(assignment.coordinatorDaemonId ? { meshCoordinatorDaemonId: assignment.coordinatorDaemonId } : {}),
|
|
863
864
|
};
|
|
864
865
|
this.adapter.updateRuntimeSettings?.(this.settings);
|
|
865
866
|
}
|
|
@@ -310,7 +310,7 @@ export class ProviderInstanceManager {
|
|
|
310
310
|
* --direct so the worker's completion event has a coordinator routing
|
|
311
311
|
* marker in state.settings). Returns true if the instance existed and
|
|
312
312
|
* the stamp was applied. */
|
|
313
|
-
attachMeshAssignmentToInstance(instanceId: string, assignment: { meshId: string; nodeId?: string; taskId?: string }): boolean {
|
|
313
|
+
attachMeshAssignmentToInstance(instanceId: string, assignment: { meshId: string; nodeId?: string; taskId?: string; coordinatorDaemonId?: string }): boolean {
|
|
314
314
|
const inst = this.instances.get(instanceId);
|
|
315
315
|
if (!inst || typeof inst.attachMeshAssignment !== 'function') {
|
|
316
316
|
try {
|
|
@@ -322,7 +322,7 @@ export class ProviderInstanceManager {
|
|
|
322
322
|
inst.attachMeshAssignment(assignment);
|
|
323
323
|
try {
|
|
324
324
|
const { LOG } = require('../logging/logger.js');
|
|
325
|
-
LOG.info?.('MeshDispatch', `stamped mesh assignment on ${instanceId}: mesh=${assignment.meshId} node=${assignment.nodeId || ''} task=${assignment.taskId || ''}`);
|
|
325
|
+
LOG.info?.('MeshDispatch', `stamped mesh assignment on ${instanceId}: mesh=${assignment.meshId} node=${assignment.nodeId || ''} task=${assignment.taskId || ''} coordinator=${assignment.coordinatorDaemonId || ''}`);
|
|
326
326
|
} catch { /* noop */ }
|
|
327
327
|
return true;
|
|
328
328
|
}
|