@adhdev/daemon-standalone 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.
package/public/index.html CHANGED
@@ -7,7 +7,7 @@
7
7
  <meta name="description" content="ADHDev self-hosted dashboard for controlling AI agents" />
8
8
  <link rel="icon" href="/otter-logo.png" />
9
9
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap" rel="stylesheet" />
10
- <script type="module" crossorigin src="/assets/index-DehOXawT.js"></script>
10
+ <script type="module" crossorigin src="/assets/index-Bu3OpXMi.js"></script>
11
11
  <link rel="modulepreload" crossorigin href="/assets/vendor-CLec0455.js">
12
12
  <link rel="stylesheet" crossorigin href="/assets/index-CVquu5qt.css">
13
13
  </head>
@@ -47512,6 +47512,10 @@ Run 'adhdev doctor' for detailed diagnostics.`
47512
47512
  READ_DEBUG_ENABLED2 = process.argv.includes("--dev") || process.env.ADHDEV_READ_DEBUG === "1";
47513
47513
  DaemonCommandRouter = class {
47514
47514
  deps;
47515
+ /** In-memory cache for cloud-originating meshes passed via inlineMesh.
47516
+ * Allows the MCP server to query mesh data via get_mesh even when
47517
+ * the mesh doesn't exist in the local meshes.json file. */
47518
+ inlineMeshCache = /* @__PURE__ */ new Map();
47515
47519
  constructor(deps) {
47516
47520
  this.deps = deps;
47517
47521
  }
@@ -48160,11 +48164,12 @@ Run 'adhdev doctor' for detailed diagnostics.`
48160
48164
  try {
48161
48165
  const { getMesh: getMesh3 } = await Promise.resolve().then(() => (init_mesh_config(), mesh_config_exports));
48162
48166
  const mesh = getMesh3(meshId);
48163
- if (!mesh) return { success: false, error: "Mesh not found" };
48164
- return { success: true, mesh };
48165
- } catch (e) {
48166
- return { success: false, error: e.message };
48167
+ if (mesh) return { success: true, mesh };
48168
+ } catch {
48167
48169
  }
48170
+ const cached2 = this.inlineMeshCache.get(meshId);
48171
+ if (cached2) return { success: true, mesh: cached2 };
48172
+ return { success: false, error: "Mesh not found" };
48168
48173
  }
48169
48174
  case "create_mesh": {
48170
48175
  const name = typeof args?.name === "string" ? args.name.trim() : "";
@@ -48227,6 +48232,7 @@ Run 'adhdev doctor' for detailed diagnostics.`
48227
48232
  let mesh;
48228
48233
  if (args?.inlineMesh && typeof args.inlineMesh === "object") {
48229
48234
  mesh = args.inlineMesh;
48235
+ this.inlineMeshCache.set(meshId, mesh);
48230
48236
  } else {
48231
48237
  const { getMesh: getMesh3 } = await Promise.resolve().then(() => (init_mesh_config(), mesh_config_exports));
48232
48238
  mesh = getMesh3(meshId);
@@ -53418,9 +53424,21 @@ async function startMcpServer(opts) {
53418
53424
  const { getMesh: getMesh2 } = await Promise.resolve().then(() => (init_dist2(), dist_exports));
53419
53425
  mesh = getMesh2(opts.meshId);
53420
53426
  } catch (e) {
53421
- process.stderr.write(`[adhdev-mcp] Failed to load mesh config: ${e.message}
53427
+ process.stderr.write(`[adhdev-mcp] Local meshes.json lookup failed: ${e.message}
53428
+ `);
53429
+ }
53430
+ }
53431
+ if (!mesh && transport instanceof LocalTransport) {
53432
+ try {
53433
+ const result = await transport.command("get_mesh", { meshId: opts.meshId });
53434
+ if (result?.success && result.mesh) {
53435
+ mesh = result.mesh;
53436
+ process.stderr.write(`[adhdev-mcp] Loaded mesh config from daemon
53437
+ `);
53438
+ }
53439
+ } catch (e) {
53440
+ process.stderr.write(`[adhdev-mcp] Daemon mesh query failed: ${e.message}
53422
53441
  `);
53423
- process.exit(1);
53424
53442
  }
53425
53443
  }
53426
53444
  if (!mesh) {
@@ -53437,7 +53455,7 @@ async function startMcpServer(opts) {
53437
53455
  coordinatorPrompt = `You are a Repo Mesh Coordinator for "${mesh.name}" (${mesh.repoIdentity}). Use mesh_* tools to orchestrate work.`;
53438
53456
  }
53439
53457
  const server2 = new import_server.Server(
53440
- { name: "adhdev-mcp-server", version: "0.9.73" },
53458
+ { name: "adhdev-mcp-server", version: "0.9.74" },
53441
53459
  { capabilities: { tools: {}, resources: {} } }
53442
53460
  );
53443
53461
  const { ListResourcesRequestSchema, ReadResourceRequestSchema } = await import("@modelcontextprotocol/sdk/types.js");