@adhdev/daemon-core 0.9.76-rc.28 → 0.9.76-rc.29

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.
@@ -53,6 +53,7 @@ export interface RepoMeshNodePolicy {
53
53
  readOnly?: boolean;
54
54
  canPush?: boolean;
55
55
  maxConcurrentSessions?: number;
56
+ /** Ordered provider preference used when mesh_launch_session omits an explicit type. */
56
57
  providerPriority?: string[];
57
58
  }
58
59
  export declare const DEFAULT_MESH_POLICY: RepoMeshPolicy;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhdev/daemon-core",
3
- "version": "0.9.76-rc.28",
3
+ "version": "0.9.76-rc.29",
4
4
  "description": "ADHDev daemon core — CDP, IDE detection, providers, command execution",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -303,14 +303,15 @@ export class DaemonCommandHandler implements CommandHelpers {
303
303
  const sessionLookupFailed = !!targetSessionId && !session;
304
304
 
305
305
  const managerKey = this.extractIdeType(args, sessionLookupFailed);
306
- let providerType: string | undefined;
306
+ let providerType: string | undefined = args?.agentType || args?.providerType;
307
307
 
308
308
  if (!sessionLookupFailed) {
309
309
  providerType =
310
310
  session?.providerType
311
- || args?.agentType
312
- || args?.providerType
311
+ || providerType
313
312
  || this.inferProviderType(managerKey);
313
+ } else if (!providerType) {
314
+ providerType = this.inferProviderType(managerKey);
314
315
  }
315
316
 
316
317
  return { session, managerKey, providerType, sessionLookupFailed };
@@ -407,7 +408,15 @@ export class DaemonCommandHandler implements CommandHelpers {
407
408
  'invoke_provider_script',
408
409
  ]);
409
410
 
410
- if (this._currentRoute.sessionLookupFailed && sessionScopedCommands.has(cmd)) {
411
+ const allowsInactiveReadChatFallback =
412
+ cmd === 'read_chat'
413
+ && !!this._currentRoute.providerType
414
+ && (
415
+ (typeof args?.providerSessionId === 'string' && args.providerSessionId.trim().length > 0)
416
+ || (typeof args?.historySessionId === 'string' && args.historySessionId.trim().length > 0)
417
+ );
418
+
419
+ if (this._currentRoute.sessionLookupFailed && sessionScopedCommands.has(cmd) && !allowsInactiveReadChatFallback) {
411
420
  const result = {
412
421
  success: false,
413
422
  error: `Live session not found for targetSessionId: ${String(args?.targetSessionId || '').trim() || 'unknown'}`,
@@ -69,6 +69,7 @@ export interface RepoMeshNodePolicy {
69
69
  readOnly?: boolean;
70
70
  canPush?: boolean;
71
71
  maxConcurrentSessions?: number;
72
+ /** Ordered provider preference used when mesh_launch_session omits an explicit type. */
72
73
  providerPriority?: string[];
73
74
  }
74
75