@adhdev/daemon-core 0.9.73 → 0.9.74

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhdev/session-host-core",
3
- "version": "0.9.73",
3
+ "version": "0.9.74",
4
4
  "description": "ADHDev local session host core \u2014 session registry, protocol, buffers",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhdev/daemon-core",
3
- "version": "0.9.73",
3
+ "version": "0.9.74",
4
4
  "description": "ADHDev daemon core \u2014 CDP, IDE detection, providers, command execution",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -194,6 +194,10 @@ function summarizeSessionHostPruneResult(result: unknown): Record<string, unknow
194
194
 
195
195
  export class DaemonCommandRouter {
196
196
  private deps: CommandRouterDeps;
197
+ /** In-memory cache for cloud-originating meshes passed via inlineMesh.
198
+ * Allows the MCP server to query mesh data via get_mesh even when
199
+ * the mesh doesn't exist in the local meshes.json file. */
200
+ private inlineMeshCache = new Map<string, any>();
197
201
 
198
202
  constructor(deps: CommandRouterDeps) {
199
203
  this.deps = deps;
@@ -937,11 +941,12 @@ export class DaemonCommandRouter {
937
941
  try {
938
942
  const { getMesh } = await import('../config/mesh-config.js');
939
943
  const mesh = getMesh(meshId);
940
- if (!mesh) return { success: false, error: 'Mesh not found' };
941
- return { success: true, mesh };
942
- } catch (e: any) {
943
- return { success: false, error: e.message };
944
- }
944
+ if (mesh) return { success: true, mesh };
945
+ } catch { /* fall through to inline cache */ }
946
+ // Fallback: check in-memory cache for cloud-originating meshes
947
+ const cached = this.inlineMeshCache.get(meshId);
948
+ if (cached) return { success: true, mesh: cached };
949
+ return { success: false, error: 'Mesh not found' };
945
950
  }
946
951
 
947
952
  case 'create_mesh': {
@@ -1012,6 +1017,8 @@ export class DaemonCommandRouter {
1012
1017
  let mesh: any;
1013
1018
  if (args?.inlineMesh && typeof args.inlineMesh === 'object') {
1014
1019
  mesh = args.inlineMesh;
1020
+ // Cache cloud mesh so the MCP server can retrieve it via get_mesh
1021
+ this.inlineMeshCache.set(meshId, mesh);
1015
1022
  } else {
1016
1023
  const { getMesh } = await import('../config/mesh-config.js');
1017
1024
  mesh = getMesh(meshId);