forge-openclaw-plugin 0.2.112 → 0.2.113

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.
@@ -6,7 +6,6 @@ import { fileURLToPath } from "node:url";
6
6
  import { logForgeDebug } from "../debug.js";
7
7
  import { getEffectiveDataRoot } from "../db.js";
8
8
  const projectRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..", "..", "..");
9
- const companionIrohManifestPath = path.join(projectRoot, "companion-iroh", "Cargo.toml");
10
9
  const DEFAULT_IROH_START_TIMEOUT_MS = 25_000;
11
10
  const COMPANION_IROH_ALPN = "forge-companion/1";
12
11
  const FORGE_IROH_AGENT = "forge";
@@ -295,21 +294,29 @@ function resolveIrohHostCommand(input) {
295
294
  function candidateIrohBinaries() {
296
295
  const binaryName = process.platform === "win32" ? "forge-companion-iroh.exe" : "forge-companion-iroh";
297
296
  const platformKey = `${process.platform}-${process.arch}`;
298
- return [
299
- path.join(projectRoot, "companion-iroh", "target", "release", binaryName),
300
- path.join(projectRoot, "companion-iroh", "target", "debug", binaryName),
301
- path.join(projectRoot, "openclaw-plugin", "dist", "companion-iroh", platformKey, binaryName),
302
- path.join(projectRoot, "companion-iroh", platformKey, binaryName),
303
- path.join(projectRoot, "companion-iroh", binaryName)
304
- ];
297
+ return candidateIrohAssetRoots().flatMap((root) => [
298
+ path.join(root, "companion-iroh", "target", "release", binaryName),
299
+ path.join(root, "companion-iroh", "target", "debug", binaryName),
300
+ path.join(root, "openclaw-plugin", "dist", "companion-iroh", platformKey, binaryName),
301
+ path.join(root, "companion-iroh", platformKey, binaryName),
302
+ path.join(root, "companion-iroh", binaryName)
303
+ ]);
305
304
  }
306
305
  function resolveCompanionIrohManifestPath() {
307
- const candidates = [
308
- companionIrohManifestPath,
309
- path.join(projectRoot, "companion-iroh-src", "Cargo.toml")
310
- ];
306
+ const candidates = candidateIrohAssetRoots().flatMap((root) => [
307
+ path.join(root, "companion-iroh", "Cargo.toml"),
308
+ path.join(root, "companion-iroh-src", "Cargo.toml")
309
+ ]);
311
310
  return candidates.find((candidate) => existsSync(candidate)) ?? null;
312
311
  }
312
+ function candidateIrohAssetRoots() {
313
+ const roots = [
314
+ projectRoot,
315
+ path.resolve(projectRoot, ".."),
316
+ path.resolve(projectRoot, "..", "..")
317
+ ];
318
+ return [...new Set(roots)];
319
+ }
313
320
  function shouldAutoStartIrohHost() {
314
321
  if (process.env.FORGE_COMPANION_IROH_DISABLED === "1") {
315
322
  return false;
@@ -2,7 +2,7 @@
2
2
  "id": "forge-openclaw-plugin",
3
3
  "name": "Forge",
4
4
  "description": "Curated OpenClaw adapter for the Forge collaboration API, UI entrypoint, and localhost auto-start runtime.",
5
- "version": "0.2.112",
5
+ "version": "0.2.113",
6
6
  "activation": {
7
7
  "onStartup": true,
8
8
  "onCapabilities": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "forge-openclaw-plugin",
3
- "version": "0.2.112",
3
+ "version": "0.2.113",
4
4
  "description": "Curated OpenClaw adapter for the Forge collaboration API, UI entrypoint, and localhost auto-start runtime.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",