@adhdev/daemon-core 0.9.76-rc.23 → 0.9.76-rc.25

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
+ providerPriority?: string[];
56
57
  }
57
58
  export declare const DEFAULT_MESH_POLICY: RepoMeshPolicy;
58
59
  export interface RepoMeshNodeCapabilities {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhdev/daemon-core",
3
- "version": "0.9.76-rc.23",
3
+ "version": "0.9.76-rc.25",
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",
@@ -758,7 +758,7 @@ export async function handleChatHistory(h: CommandHelpers, args: any): Promise<C
758
758
  }
759
759
 
760
760
  export async function handleReadChat(h: CommandHelpers, args: any): Promise<CommandResult> {
761
- const provider = h.getProvider(args?.agentType);
761
+ const provider = h.getProvider(args?.agentType || args?.providerType);
762
762
  const transport = getTargetTransport(h, provider);
763
763
  const historySessionId = getHistorySessionId(h, args);
764
764
 
@@ -1069,7 +1069,15 @@ export class DaemonCommandRouter {
1069
1069
  if (!workspace) return { success: false, error: 'workspace required' };
1070
1070
  try {
1071
1071
  const { addNode } = await import('../config/mesh-config.js');
1072
- const node = addNode(meshId, { workspace });
1072
+ const providerPriority = Array.isArray(args?.providerPriority)
1073
+ ? args.providerPriority.map((type: any) => typeof type === 'string' ? type.trim() : '').filter(Boolean)
1074
+ : [];
1075
+ const readOnly = args?.readOnly === true;
1076
+ const policy = {
1077
+ ...(readOnly ? { readOnly: true } : {}),
1078
+ ...(providerPriority.length ? { providerPriority } : {}),
1079
+ };
1080
+ const node = addNode(meshId, { workspace, ...(policy ? { policy } : {}) });
1073
1081
  if (!node) return { success: false, error: 'Mesh not found' };
1074
1082
  return { success: true, node };
1075
1083
  } catch (e: any) {
@@ -69,6 +69,7 @@ export interface RepoMeshNodePolicy {
69
69
  readOnly?: boolean;
70
70
  canPush?: boolean;
71
71
  maxConcurrentSessions?: number;
72
+ providerPriority?: string[];
72
73
  }
73
74
 
74
75
  export const DEFAULT_MESH_POLICY: RepoMeshPolicy = {