adhdev 0.9.76-rc.5 → 0.9.76-rc.7

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/dist/index.js CHANGED
@@ -39099,7 +39099,7 @@ function resolveAdhdevMcpServerLaunch(options) {
39099
39099
  if (!entryPath) return null;
39100
39100
  return {
39101
39101
  command: options.nodeExecutable?.trim() || process.execPath,
39102
- args: [entryPath, "--repo-mesh", options.meshId]
39102
+ args: [entryPath, "--mode", "ipc", "--repo-mesh", options.meshId]
39103
39103
  };
39104
39104
  }
39105
39105
  function resolveAdhdevMcpEntryPath(explicitPath) {
@@ -40757,7 +40757,8 @@ var init_router = __esm({
40757
40757
  };
40758
40758
  if (args?.inlineMesh) {
40759
40759
  mcpServerEntry.env = {
40760
- ADHDEV_INLINE_MESH: JSON.stringify(mesh)
40760
+ ADHDEV_INLINE_MESH: JSON.stringify(mesh),
40761
+ ADHDEV_MCP_TRANSPORT: "ipc"
40761
40762
  };
40762
40763
  }
40763
40764
  const mcpConfig = {
@@ -49352,13 +49353,14 @@ var init_server_connection = __esm({
49352
49353
  reject(new Error(`Mesh command timed out after ${timeoutMs}ms`));
49353
49354
  }, timeoutMs);
49354
49355
  const handler = (msg) => {
49355
- if (msg.payload?.requestId !== requestId) return;
49356
+ const body = msg.payload && typeof msg.payload === "object" ? { ...msg, ...msg.payload } : msg;
49357
+ if (body.requestId !== requestId) return;
49356
49358
  this.off("daemon_mesh_result", handler);
49357
49359
  clearTimeout(timer);
49358
- if (msg.payload?.success === false) {
49359
- reject(new Error(msg.payload?.error ?? "Mesh command failed"));
49360
+ if (body.success === false) {
49361
+ reject(new Error(body.error ?? "Mesh command failed"));
49360
49362
  } else {
49361
- resolve20(msg.payload?.result);
49363
+ resolve20(body.result);
49362
49364
  }
49363
49365
  };
49364
49366
  this.on("daemon_mesh_result", handler);
@@ -58870,7 +58872,9 @@ var init_daemon_mesh_manager = __esm({
58870
58872
  "read_chat",
58871
58873
  "git_status",
58872
58874
  "git_diff_summary",
58873
- "launch_cli"
58875
+ "launch_cli",
58876
+ "git_checkpoint",
58877
+ "resolve_action"
58874
58878
  ]);
58875
58879
  setRules(rules) {
58876
58880
  const valid = [];
@@ -59161,7 +59165,7 @@ var init_adhdev_daemon = __esm({
59161
59165
  init_version();
59162
59166
  init_src();
59163
59167
  init_runtime_defaults();
59164
- pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.76-rc.5" });
59168
+ pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.76-rc.7" });
59165
59169
  AdhdevDaemon = class _AdhdevDaemon {
59166
59170
  localHttpServer = null;
59167
59171
  localWss = null;
@@ -60263,7 +60267,20 @@ ${err?.stack || ""}`);
60263
60267
  return;
60264
60268
  }
60265
60269
  try {
60266
- const result = await this.components.router.execute(command, normalizedArgs, "ipc");
60270
+ let result;
60271
+ if (command === "mesh_relay_command") {
60272
+ if (!this.meshManager) throw new Error("Mesh manager is not initialized");
60273
+ const targetDaemonId = typeof normalizedArgs.targetDaemonId === "string" ? normalizedArgs.targetDaemonId : "";
60274
+ const relayedCommand = typeof normalizedArgs.command === "string" ? normalizedArgs.command : "";
60275
+ const relayedArgs = normalizedArgs.args && typeof normalizedArgs.args === "object" ? normalizedArgs.args : {};
60276
+ if (!targetDaemonId || !relayedCommand) {
60277
+ throw new Error("mesh_relay_command requires targetDaemonId and command");
60278
+ }
60279
+ const relayResult = await this.meshManager.sendCommand(targetDaemonId, relayedCommand, relayedArgs);
60280
+ result = { success: true, result: relayResult };
60281
+ } else {
60282
+ result = await this.components.router.execute(command, normalizedArgs, "ipc");
60283
+ }
60267
60284
  ws.send(JSON.stringify({
60268
60285
  type: "ext:command_result",
60269
60286
  payload: {