@adhdev/daemon-core 0.9.82-rc.231 → 0.9.82-rc.232

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhdev/daemon-core",
3
- "version": "0.9.82-rc.231",
3
+ "version": "0.9.82-rc.232",
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",
@@ -5866,12 +5866,15 @@ export class DaemonCommandRouter {
5866
5866
  nodeDaemonId = typeof node?.daemonId === 'string' ? node.daemonId.trim() : undefined;
5867
5867
  }
5868
5868
  // If the target node belongs to a remote daemon, forward the command there.
5869
+ // _meshDirectDispatch prevents re-forwarding (and P2P self-dial) when the stored
5870
+ // daemonId uses a legacy format that doesn't match the receiving daemon's identity.
5869
5871
  const selfDaemonId = this.deps.statusInstanceId;
5870
5872
  const isRemote = nodeDaemonId && selfDaemonId && nodeDaemonId !== selfDaemonId;
5871
- if (isRemote && this.deps.dispatchMeshCommand) {
5873
+ if (isRemote && this.deps.dispatchMeshCommand && !args?._meshDirectDispatch) {
5872
5874
  const forwarded = await this.deps.dispatchMeshCommand(nodeDaemonId!, 'fast_forward_mesh_node', {
5873
5875
  ...(typeof args === 'object' && args !== null ? args as Record<string, unknown> : {}),
5874
5876
  workspace,
5877
+ _meshDirectDispatch: true,
5875
5878
  });
5876
5879
  return (forwarded ?? { success: false, error: 'no response from remote node' }) as CommandRouterResult;
5877
5880
  }