@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.
@@ -76,6 +76,10 @@ export interface CommandRouterResult {
76
76
  }
77
77
  export declare class DaemonCommandRouter {
78
78
  private deps;
79
+ /** In-memory cache for cloud-originating meshes passed via inlineMesh.
80
+ * Allows the MCP server to query mesh data via get_mesh even when
81
+ * the mesh doesn't exist in the local meshes.json file. */
82
+ private inlineMeshCache;
79
83
  constructor(deps: CommandRouterDeps);
80
84
  private traceSessionHostAction;
81
85
  /**
package/dist/index.js CHANGED
@@ -20860,6 +20860,10 @@ function summarizeSessionHostPruneResult(result) {
20860
20860
  }
20861
20861
  var DaemonCommandRouter = class {
20862
20862
  deps;
20863
+ /** In-memory cache for cloud-originating meshes passed via inlineMesh.
20864
+ * Allows the MCP server to query mesh data via get_mesh even when
20865
+ * the mesh doesn't exist in the local meshes.json file. */
20866
+ inlineMeshCache = /* @__PURE__ */ new Map();
20863
20867
  constructor(deps) {
20864
20868
  this.deps = deps;
20865
20869
  }
@@ -21508,11 +21512,12 @@ var DaemonCommandRouter = class {
21508
21512
  try {
21509
21513
  const { getMesh: getMesh3 } = await Promise.resolve().then(() => (init_mesh_config(), mesh_config_exports));
21510
21514
  const mesh = getMesh3(meshId);
21511
- if (!mesh) return { success: false, error: "Mesh not found" };
21512
- return { success: true, mesh };
21513
- } catch (e) {
21514
- return { success: false, error: e.message };
21515
+ if (mesh) return { success: true, mesh };
21516
+ } catch {
21515
21517
  }
21518
+ const cached = this.inlineMeshCache.get(meshId);
21519
+ if (cached) return { success: true, mesh: cached };
21520
+ return { success: false, error: "Mesh not found" };
21516
21521
  }
21517
21522
  case "create_mesh": {
21518
21523
  const name = typeof args?.name === "string" ? args.name.trim() : "";
@@ -21575,6 +21580,7 @@ var DaemonCommandRouter = class {
21575
21580
  let mesh;
21576
21581
  if (args?.inlineMesh && typeof args.inlineMesh === "object") {
21577
21582
  mesh = args.inlineMesh;
21583
+ this.inlineMeshCache.set(meshId, mesh);
21578
21584
  } else {
21579
21585
  const { getMesh: getMesh3 } = await Promise.resolve().then(() => (init_mesh_config(), mesh_config_exports));
21580
21586
  mesh = getMesh3(meshId);