agentic-orchestrator 0.2.1 → 0.2.2
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,7 +1,7 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
2
|
import { existsSync } from 'node:fs';
|
|
3
3
|
import path from 'node:path';
|
|
4
|
-
import { pathToFileURL } from 'node:url';
|
|
4
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
5
5
|
import { getAopRoot } from '@/lib/aop-client.js';
|
|
6
6
|
import {
|
|
7
7
|
submitDashboardRuntimeCommand,
|
|
@@ -348,16 +348,23 @@ function resolveControlPlaneModulePath(): string {
|
|
|
348
348
|
return fromAopRoot;
|
|
349
349
|
}
|
|
350
350
|
|
|
351
|
-
// Strategy 3:
|
|
351
|
+
// Strategy 3: Walk up from this file's compiled location (handles .next chunks
|
|
352
|
+
// within the installed package tree, e.g. packages/web-dashboard/.next/dev/...)
|
|
352
353
|
try {
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
354
|
+
let dir = path.dirname(fileURLToPath(import.meta.url));
|
|
355
|
+
for (let i = 0; i < 10; i++) {
|
|
356
|
+
const candidate = path.join(dir, distRelative);
|
|
357
|
+
if (existsSync(candidate)) {
|
|
358
|
+
return candidate;
|
|
359
|
+
}
|
|
360
|
+
const parent = path.dirname(dir);
|
|
361
|
+
if (parent === dir) {
|
|
362
|
+
break;
|
|
363
|
+
}
|
|
364
|
+
dir = parent;
|
|
358
365
|
}
|
|
359
366
|
} catch {
|
|
360
|
-
//
|
|
367
|
+
// import.meta.url may not resolve to a file path in all bundler contexts
|
|
361
368
|
}
|
|
362
369
|
|
|
363
370
|
// Fallback: return the AOP_ROOT-based path (will fail at import time with a clear error)
|