@runfusion/fusion 0.24.0 → 0.25.0

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.
Files changed (106) hide show
  1. package/dist/bin.js +2254 -1349
  2. package/dist/client/assets/AgentDetailView-ZbHEbYRT.js +18 -0
  3. package/dist/client/assets/{AgentsView-BkB9FiMT.js → AgentsView-B3jYk8Kt.js} +3 -3
  4. package/dist/client/assets/ChatView-DhPkiEGs.js +1 -0
  5. package/dist/client/assets/{DevServerView-BkvtjZBa.js → DevServerView-DyGDEiBP.js} +1 -1
  6. package/dist/client/assets/{DirectoryPicker-BK-KbnhP.js → DirectoryPicker-D5UIeIl6.js} +1 -1
  7. package/dist/client/assets/{DocumentsView-BEg1CQAk.js → DocumentsView-DNHu1T8K.js} +1 -1
  8. package/dist/client/assets/{EvalsView-Berf9bQm.js → EvalsView-CpRobtDi.js} +1 -1
  9. package/dist/client/assets/{ExperimentalAgentOnboardingModal-jcInE50G.js → ExperimentalAgentOnboardingModal-DOY_oZi7.js} +1 -1
  10. package/dist/client/assets/{InsightsView-BX5bSF1J.js → InsightsView-vp0RE8Mg.js} +1 -1
  11. package/dist/client/assets/MemoryView-PSc5lGJt.js +2 -0
  12. package/dist/client/assets/MemoryView-zaXewZzi.css +1 -0
  13. package/dist/client/assets/{NodesView-DLUOBLf6.js → NodesView-DMj6HGeC.js} +1 -1
  14. package/dist/client/assets/{PiExtensionsManager-COlJf0Kx.js → PiExtensionsManager-DL_QcN56.js} +2 -2
  15. package/dist/client/assets/PluginManager-BtYKm8IT.js +1 -0
  16. package/dist/client/assets/{ResearchView-B256Lr8I.js → ResearchView-BhWqfdV0.js} +1 -1
  17. package/dist/client/assets/{SettingsModal-BeA_nQtW.js → SettingsModal-BAgB4_AR.js} +4 -4
  18. package/dist/client/assets/{SettingsModal-yRqM4DV8.js → SettingsModal-CUCyaAyE.js} +1 -1
  19. package/dist/client/assets/{SetupWizardModal-uUZk3TKT.js → SetupWizardModal-BKscasuh.js} +1 -1
  20. package/dist/client/assets/{SkillsView-CP8JX0P_.js → SkillsView-BdELqTy7.js} +1 -1
  21. package/dist/client/assets/{TodoView-DCRIkDZ-.js → TodoView-DFNGBDNV.js} +1 -1
  22. package/dist/client/assets/{folder-open-DHjELt8-.js → folder-open-k1xmUMyr.js} +1 -1
  23. package/dist/client/assets/index-Qq2JOOWx.css +1 -0
  24. package/dist/client/assets/{index-CQyVRLOb.js → index-TFYXEVpn.js} +160 -160
  25. package/dist/client/assets/{star-DYesq1AV.js → star-ne32r3Y4.js} +1 -1
  26. package/dist/client/assets/{upload-DTWF3Db5.js → upload-MS-2Gx53.js} +1 -1
  27. package/dist/client/assets/{users--syrel4l.js → users-C519GSjH.js} +1 -1
  28. package/dist/client/index.html +2 -2
  29. package/dist/client/version.json +1 -1
  30. package/dist/droid-cli/package.json +1 -1
  31. package/dist/extension.js +1370 -629
  32. package/dist/pi-claude-cli/package.json +1 -1
  33. package/dist/plugins/fusion-plugin-cursor-runtime/bundled.js +9 -11
  34. package/dist/plugins/fusion-plugin-cursor-runtime/package.json +1 -1
  35. package/dist/plugins/fusion-plugin-dependency-graph/bundled.js +30 -0
  36. package/dist/plugins/fusion-plugin-dependency-graph/package.json +3 -28
  37. package/dist/plugins/fusion-plugin-droid-runtime/bundled.js +899 -895
  38. package/dist/plugins/fusion-plugin-droid-runtime/package.json +1 -1
  39. package/dist/plugins/fusion-plugin-hermes-runtime/bundled.js +68 -71
  40. package/dist/plugins/fusion-plugin-hermes-runtime/package.json +1 -1
  41. package/dist/plugins/fusion-plugin-openclaw-runtime/bundled.js +47 -50
  42. package/dist/plugins/fusion-plugin-openclaw-runtime/package.json +1 -1
  43. package/dist/plugins/fusion-plugin-paperclip-runtime/bundled.js +155 -109
  44. package/dist/plugins/fusion-plugin-paperclip-runtime/package.json +1 -1
  45. package/dist/plugins/fusion-plugin-reports/package.json +1 -1
  46. package/dist/plugins/fusion-plugin-reports/src/index.ts +49 -3
  47. package/dist/plugins/fusion-plugin-reports/src/report-schema.ts +38 -0
  48. package/dist/plugins/fusion-plugin-reports/src/store/__tests__/report-schema.test.ts +66 -0
  49. package/dist/plugins/fusion-plugin-reports/src/store/__tests__/report-store.test.ts +177 -0
  50. package/dist/plugins/fusion-plugin-reports/src/store/report-store.ts +341 -0
  51. package/dist/plugins/fusion-plugin-reports/src/store/report-types.ts +77 -0
  52. package/dist/plugins/fusion-plugin-roadmap/package.json +1 -1
  53. package/dist/plugins/fusion-plugin-whatsapp-chat/package.json +1 -1
  54. package/package.json +1 -1
  55. package/dist/client/assets/AgentDetailView-gy_5SUj2.js +0 -18
  56. package/dist/client/assets/ChatView-B_-B8fqu.js +0 -1
  57. package/dist/client/assets/MemoryView-CKElJY_3.js +0 -2
  58. package/dist/client/assets/MemoryView-DiajLXby.css +0 -1
  59. package/dist/client/assets/PluginManager-CfW55BF4.js +0 -1
  60. package/dist/client/assets/createLucideIcon-BazL2hk5.js +0 -21
  61. package/dist/client/assets/dashboard-view-BkTMSZYn.css +0 -1
  62. package/dist/client/assets/dashboard-view-CyWN-d02.js +0 -63
  63. package/dist/client/assets/dashboard-view-DdGlfuu-.css +0 -1
  64. package/dist/client/assets/dashboard-view-lR7YYmSC.js +0 -21
  65. package/dist/client/assets/index-CxA2Nn0_.css +0 -1
  66. package/dist/plugins/fusion-plugin-dependency-graph/src/DependencyGraph.css +0 -58
  67. package/dist/plugins/fusion-plugin-dependency-graph/src/DependencyGraph.tsx +0 -301
  68. package/dist/plugins/fusion-plugin-dependency-graph/src/GraphHighlight.css +0 -27
  69. package/dist/plugins/fusion-plugin-dependency-graph/src/GraphTaskNode.css +0 -157
  70. package/dist/plugins/fusion-plugin-dependency-graph/src/GraphTaskNode.tsx +0 -126
  71. package/dist/plugins/fusion-plugin-dependency-graph/src/GraphToolbar.css +0 -35
  72. package/dist/plugins/fusion-plugin-dependency-graph/src/GraphToolbar.tsx +0 -36
  73. package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/DependencyGraph.highlighting.test.tsx +0 -112
  74. package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/DependencyGraph.persistence.test.tsx +0 -115
  75. package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/DependencyGraph.test.tsx +0 -128
  76. package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/GraphTaskNode.drag.test.tsx +0 -82
  77. package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/GraphTaskNode.test.tsx +0 -307
  78. package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/GraphToolbar.test.tsx +0 -60
  79. package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/edges.test.tsx +0 -75
  80. package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/filtering.test.tsx +0 -62
  81. package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/filters.test.ts +0 -78
  82. package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/graphPositionStorage.test.ts +0 -95
  83. package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/host-integration.test.ts +0 -74
  84. package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/index.test.ts +0 -58
  85. package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/interactions.test.tsx +0 -121
  86. package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/layout.test.ts +0 -70
  87. package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/persistence.test.tsx +0 -89
  88. package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/useGraphData.test.ts +0 -86
  89. package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/useGraphInteraction.test.ts +0 -167
  90. package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/useGraphPositions.test.ts +0 -66
  91. package/dist/plugins/fusion-plugin-dependency-graph/src/__tests__/useNodeDrag.test.ts +0 -81
  92. package/dist/plugins/fusion-plugin-dependency-graph/src/dashboard-interop.d.ts +0 -35
  93. package/dist/plugins/fusion-plugin-dependency-graph/src/dashboard-view.tsx +0 -19
  94. package/dist/plugins/fusion-plugin-dependency-graph/src/edges.tsx +0 -70
  95. package/dist/plugins/fusion-plugin-dependency-graph/src/filters.ts +0 -8
  96. package/dist/plugins/fusion-plugin-dependency-graph/src/hooks/__tests__/useDependencyChain.test.ts +0 -53
  97. package/dist/plugins/fusion-plugin-dependency-graph/src/hooks/useDependencyChain.ts +0 -60
  98. package/dist/plugins/fusion-plugin-dependency-graph/src/hooks/useGraphPositions.ts +0 -45
  99. package/dist/plugins/fusion-plugin-dependency-graph/src/hooks/useNodeDrag.ts +0 -114
  100. package/dist/plugins/fusion-plugin-dependency-graph/src/index.ts +0 -24
  101. package/dist/plugins/fusion-plugin-dependency-graph/src/layout.ts +0 -91
  102. package/dist/plugins/fusion-plugin-dependency-graph/src/styles/drag.css +0 -15
  103. package/dist/plugins/fusion-plugin-dependency-graph/src/types.ts +0 -21
  104. package/dist/plugins/fusion-plugin-dependency-graph/src/useGraphData.ts +0 -17
  105. package/dist/plugins/fusion-plugin-dependency-graph/src/useGraphInteraction.ts +0 -292
  106. package/dist/plugins/fusion-plugin-dependency-graph/src/utils/graphPositionStorage.ts +0 -65
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion-plugin-examples/droid-runtime",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,22 +1,20 @@
1
- // ../plugin-sdk/dist/index.js
1
+ // ../plugin-sdk/src/index.ts
2
2
  function definePlugin(plugin2) {
3
3
  return plugin2;
4
4
  }
5
5
 
6
- // ../../plugins/fusion-plugin-hermes-runtime/dist/cli-spawn.js
6
+ // ../../plugins/fusion-plugin-hermes-runtime/src/cli-spawn.ts
7
7
  import { spawn, spawnSync } from "node:child_process";
8
8
  import os from "node:os";
9
9
  import path, { sep as PATH_SEP } from "node:path";
10
10
  var resolvedBinaryCache = /* @__PURE__ */ new Map();
11
11
  function resolveBinaryForSpawn(binary) {
12
- if (process.platform !== "win32")
13
- return binary;
12
+ if (process.platform !== "win32") return binary;
14
13
  if (binary.includes(PATH_SEP) || binary.includes("/") || /\.[a-z]{2,4}$/i.test(binary)) {
15
14
  return binary;
16
15
  }
17
16
  const cached = resolvedBinaryCache.get(binary);
18
- if (cached)
19
- return cached;
17
+ if (cached) return cached;
20
18
  try {
21
19
  const result = spawnSync("where", [binary], { encoding: "utf-8" });
22
20
  if (result.status === 0) {
@@ -50,19 +48,15 @@ function parseProfileListOutput(raw) {
50
48
  const lines = raw.replace(ANSI_RE, "").replace(/\r\n/g, "\n").replace(/\r/g, "\n").split("\n");
51
49
  const profiles = [];
52
50
  for (const line of lines) {
53
- if (line.trim() === "")
54
- continue;
55
- if (/^\s*Profile\b/.test(line))
56
- continue;
57
- if (PROFILE_RULE_RE.test(line))
58
- continue;
51
+ if (line.trim() === "") continue;
52
+ if (/^\s*Profile\b/.test(line)) continue;
53
+ if (PROFILE_RULE_RE.test(line)) continue;
59
54
  const stripped = line.replace(/^\s+/, "");
60
55
  const columns = stripped.split(/\s{2,}/);
61
56
  const rawName = columns[0] ?? "";
62
57
  const isDefault = rawName.startsWith("\u25C6");
63
58
  const name = rawName.replace(/^◆/, "").trim();
64
- if (!name)
65
- continue;
59
+ if (!name) continue;
66
60
  const toUndef = (v) => v === void 0 || v.trim() === "" || v.trim() === EM_DASH ? void 0 : v.trim();
67
61
  profiles.push({
68
62
  name,
@@ -76,8 +70,7 @@ function parseProfileListOutput(raw) {
76
70
  }
77
71
  function hermesProfileHome(profileName) {
78
72
  const base = process.env.HERMES_HOME ?? path.join(os.homedir(), ".hermes");
79
- if (profileName === "default" || profileName === "")
80
- return base;
73
+ if (profileName === "default" || profileName === "") return base;
81
74
  return path.join(base, "profiles", profileName);
82
75
  }
83
76
  async function listHermesProfiles(opts) {
@@ -90,8 +83,7 @@ async function listHermesProfiles(opts) {
90
83
  env: { ...process.env }
91
84
  });
92
85
  const timer = setTimeout(() => {
93
- if (settled)
94
- return;
86
+ if (settled) return;
95
87
  settled = true;
96
88
  try {
97
89
  child.kill("SIGKILL");
@@ -108,16 +100,18 @@ async function listHermesProfiles(opts) {
108
100
  stderr += chunk.toString("utf-8");
109
101
  });
110
102
  child.on("error", (err) => {
111
- if (settled)
112
- return;
103
+ if (settled) return;
113
104
  settled = true;
114
105
  clearTimeout(timer);
115
106
  const isNotFound = err.code === "ENOENT";
116
- reject(new Error(isNotFound ? `hermes profile list failed: binary not found at "${opts?.binaryPath ?? "hermes"}"` : `hermes profile list failed: ${err.message}`));
107
+ reject(
108
+ new Error(
109
+ isNotFound ? `hermes profile list failed: binary not found at "${opts?.binaryPath ?? "hermes"}"` : `hermes profile list failed: ${err.message}`
110
+ )
111
+ );
117
112
  });
118
113
  child.on("close", (code) => {
119
- if (settled)
120
- return;
114
+ if (settled) return;
121
115
  settled = true;
122
116
  clearTimeout(timer);
123
117
  if (code !== 0) {
@@ -133,22 +127,18 @@ ${combined}`));
133
127
  function resolveCliSettings(settings) {
134
128
  const str = (v) => typeof v === "string" && v.trim().length > 0 ? v.trim() : void 0;
135
129
  const num = (v, envKey, fallback) => {
136
- if (typeof v === "number" && Number.isFinite(v) && v > 0)
137
- return v;
130
+ if (typeof v === "number" && Number.isFinite(v) && v > 0) return v;
138
131
  const raw = str(v) ?? str(process.env[envKey]);
139
132
  if (raw !== void 0) {
140
133
  const parsed = Number(raw);
141
- if (Number.isFinite(parsed) && parsed > 0)
142
- return parsed;
134
+ if (Number.isFinite(parsed) && parsed > 0) return parsed;
143
135
  }
144
136
  return fallback;
145
137
  };
146
138
  const bool = (v, envKey, fallback) => {
147
- if (typeof v === "boolean")
148
- return v;
139
+ if (typeof v === "boolean") return v;
149
140
  const raw = str(v) ?? str(process.env[envKey]);
150
- if (raw !== void 0)
151
- return raw === "1" || raw.toLowerCase() === "true";
141
+ if (raw !== void 0) return raw === "1" || raw.toLowerCase() === "true";
152
142
  return fallback;
153
143
  };
154
144
  return {
@@ -214,8 +204,7 @@ async function invokeHermesCli(prompt, settings, resumeSessionId, signal) {
214
204
  env: spawnEnv
215
205
  });
216
206
  const hardKillTimer = setTimeout(() => {
217
- if (settled)
218
- return;
207
+ if (settled) return;
219
208
  settled = true;
220
209
  try {
221
210
  child.kill("SIGKILL");
@@ -224,8 +213,7 @@ async function invokeHermesCli(prompt, settings, resumeSessionId, signal) {
224
213
  reject(new Error(`hermes: process timed out after ${settings.cliTimeoutMs}ms`));
225
214
  }, settings.cliTimeoutMs);
226
215
  const onAbort = () => {
227
- if (settled)
228
- return;
216
+ if (settled) return;
229
217
  settled = true;
230
218
  clearTimeout(hardKillTimer);
231
219
  try {
@@ -250,17 +238,19 @@ async function invokeHermesCli(prompt, settings, resumeSessionId, signal) {
250
238
  stderr += chunk.toString("utf-8");
251
239
  });
252
240
  child.on("error", (err) => {
253
- if (settled)
254
- return;
241
+ if (settled) return;
255
242
  settled = true;
256
243
  clearTimeout(hardKillTimer);
257
244
  signal?.removeEventListener("abort", onAbort);
258
245
  const isNotFound = err.code === "ENOENT";
259
- reject(new Error(isNotFound ? `hermes: binary not found at "${settings.binaryPath}". Install hermes or set binaryPath/HERMES_BIN.` : `hermes: spawn error \u2014 ${err.message}`));
246
+ reject(
247
+ new Error(
248
+ isNotFound ? `hermes: binary not found at "${settings.binaryPath}". Install hermes or set binaryPath/HERMES_BIN.` : `hermes: spawn error \u2014 ${err.message}`
249
+ )
250
+ );
260
251
  });
261
252
  child.on("close", (code) => {
262
- if (settled)
263
- return;
253
+ if (settled) return;
264
254
  settled = true;
265
255
  clearTimeout(hardKillTimer);
266
256
  signal?.removeEventListener("abort", onAbort);
@@ -279,16 +269,25 @@ ${combined}`));
279
269
  });
280
270
  }
281
271
 
282
- // ../../plugins/fusion-plugin-hermes-runtime/dist/fusion-skill-install.js
283
- import { cpSync, existsSync, lstatSync, mkdirSync, readFileSync, readlinkSync, rmSync, symlinkSync, unlinkSync } from "node:fs";
272
+ // ../../plugins/fusion-plugin-hermes-runtime/src/fusion-skill-install.ts
273
+ import {
274
+ cpSync,
275
+ existsSync,
276
+ lstatSync,
277
+ mkdirSync,
278
+ readFileSync,
279
+ readlinkSync,
280
+ rmSync,
281
+ symlinkSync,
282
+ unlinkSync
283
+ } from "node:fs";
284
284
  import { homedir } from "node:os";
285
285
  import { basename, dirname, join, resolve } from "node:path";
286
286
  import { fileURLToPath } from "node:url";
287
287
  var FUSION_SKILL_NAME = "fusion";
288
288
  function resolveHermesHome(profile) {
289
289
  const base = process.env.HERMES_HOME ?? join(homedir(), ".hermes");
290
- if (!profile || profile === "default")
291
- return base;
290
+ if (!profile || profile === "default") return base;
292
291
  return join(base, "profiles", profile);
293
292
  }
294
293
  function getFusionSkillSourceCandidates(moduleUrl = import.meta.url) {
@@ -304,8 +303,7 @@ function getFusionSkillSourceCandidates(moduleUrl = import.meta.url) {
304
303
  function resolveBundledFusionSkillSource() {
305
304
  const candidates = getFusionSkillSourceCandidates();
306
305
  for (const candidate of candidates) {
307
- if (existsSync(join(candidate, "SKILL.md")))
308
- return candidate;
306
+ if (existsSync(join(candidate, "SKILL.md"))) return candidate;
309
307
  }
310
308
  return null;
311
309
  }
@@ -401,8 +399,7 @@ function isBrokenSymlink(path2) {
401
399
  }
402
400
  function looksLikePriorFusionInstall(path2) {
403
401
  const skillMd = join(path2, "SKILL.md");
404
- if (!existsSync(skillMd))
405
- return false;
402
+ if (!existsSync(skillMd)) return false;
406
403
  try {
407
404
  const body = readFileSync(skillMd, "utf-8");
408
405
  return /\bfusion\b/i.test(body) && /\bskill\b/i.test(body);
@@ -411,14 +408,12 @@ function looksLikePriorFusionInstall(path2) {
411
408
  }
412
409
  }
413
410
  function looksLikeFusionSkillTarget(path2) {
414
- if (!path2)
415
- return false;
416
- if (basename(path2).toLowerCase() === FUSION_SKILL_NAME)
417
- return true;
411
+ if (!path2) return false;
412
+ if (basename(path2).toLowerCase() === FUSION_SKILL_NAME) return true;
418
413
  return existsSync(join(path2, "SKILL.md"));
419
414
  }
420
415
 
421
- // ../../plugins/fusion-plugin-hermes-runtime/dist/runtime-adapter.js
416
+ // ../../plugins/fusion-plugin-hermes-runtime/src/runtime-adapter.ts
422
417
  function buildRuntimeContextSection(options) {
423
418
  const skillNames = Array.isArray(options.skills) ? options.skills.filter((value) => typeof value === "string" && value.trim().length > 0) : [];
424
419
  const skillSelection = options.skillSelection;
@@ -439,7 +434,9 @@ var HermesRuntimeAdapter = class {
439
434
  name = "Hermes Runtime";
440
435
  settings;
441
436
  constructor(settings) {
442
- this.settings = resolveCliSettings(settings);
437
+ this.settings = resolveCliSettings(
438
+ settings
439
+ );
443
440
  }
444
441
  async createSession(options) {
445
442
  const session = {
@@ -483,17 +480,14 @@ ${prompt}`;
483
480
  describeFromSettings() {
484
481
  const provider = this.settings.provider;
485
482
  const model = this.settings.model;
486
- if (provider && model)
487
- return `hermes/${provider}/${model}`;
488
- if (model)
489
- return `hermes/${model}`;
490
- if (provider)
491
- return `hermes/${provider}`;
483
+ if (provider && model) return `hermes/${provider}/${model}`;
484
+ if (model) return `hermes/${model}`;
485
+ if (provider) return `hermes/${provider}`;
492
486
  return "hermes";
493
487
  }
494
488
  };
495
489
 
496
- // ../../plugins/fusion-plugin-hermes-runtime/dist/probe.js
490
+ // ../../plugins/fusion-plugin-hermes-runtime/src/probe.ts
497
491
  import { spawn as spawn2 } from "node:child_process";
498
492
  var DEFAULT_PROBE_TIMEOUT_MS = 2e3;
499
493
  async function probeHermesBinary(opts) {
@@ -510,8 +504,7 @@ async function probeHermesBinary(opts) {
510
504
  stdio: ["ignore", "pipe", "pipe"]
511
505
  });
512
506
  const timer = setTimeout(() => {
513
- if (settled)
514
- return;
507
+ if (settled) return;
515
508
  settled = true;
516
509
  try {
517
510
  child.kill("SIGKILL");
@@ -532,8 +525,7 @@ async function probeHermesBinary(opts) {
532
525
  stderr += chunk.toString("utf-8");
533
526
  });
534
527
  child.on("error", (err) => {
535
- if (settled)
536
- return;
528
+ if (settled) return;
537
529
  settled = true;
538
530
  clearTimeout(timer);
539
531
  const isNotFound = err.code === "ENOENT";
@@ -544,8 +536,7 @@ async function probeHermesBinary(opts) {
544
536
  });
545
537
  });
546
538
  child.on("close", (code) => {
547
- if (settled)
548
- return;
539
+ if (settled) return;
549
540
  settled = true;
550
541
  clearTimeout(timer);
551
542
  if (code === 0) {
@@ -584,7 +575,7 @@ async function tryResolveBinaryPath(binary) {
584
575
  });
585
576
  }
586
577
 
587
- // ../../plugins/fusion-plugin-hermes-runtime/dist/index.js
578
+ // ../../plugins/fusion-plugin-hermes-runtime/src/index.ts
588
579
  var HERMES_RUNTIME_ID = "hermes";
589
580
  var HERMES_RUNTIME_VERSION = "0.2.0";
590
581
  var hermesRuntimeMetadata = {
@@ -612,11 +603,17 @@ var plugin = definePlugin({
612
603
  const settings = resolveCliSettings(ctx.settings);
613
604
  const skillInstall = installFusionSkillIntoHermesHome({ profile: settings.profile });
614
605
  if (skillInstall.outcome === "warning") {
615
- ctx.logger.warn(`Hermes Runtime Plugin: Fusion skill auto-install warning: ${skillInstall.reason ?? "unknown"}`);
606
+ ctx.logger.warn(
607
+ `Hermes Runtime Plugin: Fusion skill auto-install warning: ${skillInstall.reason ?? "unknown"}`
608
+ );
616
609
  } else if (skillInstall.outcome === "skipped") {
617
- ctx.logger.warn(`Hermes Runtime Plugin: Fusion skill auto-install skipped: ${skillInstall.reason ?? "unknown"}`);
610
+ ctx.logger.warn(
611
+ `Hermes Runtime Plugin: Fusion skill auto-install skipped: ${skillInstall.reason ?? "unknown"}`
612
+ );
618
613
  }
619
- ctx.logger.info(`Hermes Runtime Plugin loaded \u2014 binary=${settings.binaryPath} model=${settings.model ?? "(default)"} fusionSkill=${skillInstall.outcome}`);
614
+ ctx.logger.info(
615
+ `Hermes Runtime Plugin loaded \u2014 binary=${settings.binaryPath} model=${settings.model ?? "(default)"} fusionSkill=${skillInstall.outcome}`
616
+ );
620
617
  ctx.emitEvent("hermes-runtime:loaded", {
621
618
  runtimeId: HERMES_RUNTIME_ID,
622
619
  version: HERMES_RUNTIME_VERSION
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion-plugin-examples/hermes-runtime",
3
- "version": "0.2.32",
3
+ "version": "0.2.33",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,9 +1,9 @@
1
- // ../plugin-sdk/dist/index.js
1
+ // ../plugin-sdk/src/index.ts
2
2
  function definePlugin(plugin2) {
3
3
  return plugin2;
4
4
  }
5
5
 
6
- // ../../plugins/fusion-plugin-openclaw-runtime/dist/pi-module.js
6
+ // ../../plugins/fusion-plugin-openclaw-runtime/src/pi-module.ts
7
7
  import { spawn } from "node:child_process";
8
8
  import { randomUUID } from "node:crypto";
9
9
  import { readFile } from "node:fs/promises";
@@ -17,20 +17,16 @@ function asString(v) {
17
17
  return typeof v === "string" && v.trim() !== "" ? v.trim() : void 0;
18
18
  }
19
19
  function asNumber(v) {
20
- if (typeof v === "number" && Number.isFinite(v))
21
- return v;
20
+ if (typeof v === "number" && Number.isFinite(v)) return v;
22
21
  const s = asString(v);
23
- if (s === void 0)
24
- return void 0;
22
+ if (s === void 0) return void 0;
25
23
  const n = Number(s);
26
24
  return Number.isFinite(n) ? n : void 0;
27
25
  }
28
26
  function asBool(v) {
29
- if (typeof v === "boolean")
30
- return v;
27
+ if (typeof v === "boolean") return v;
31
28
  const s = asString(v);
32
- if (s === void 0)
33
- return void 0;
29
+ if (s === void 0) return void 0;
34
30
  return s === "1" || s.toLowerCase() === "true";
35
31
  }
36
32
  function stripAnsi(text) {
@@ -53,8 +49,7 @@ function buildOpenClawArgs(config, session, message) {
53
49
  args.push("--profile", session.mcpProfile);
54
50
  }
55
51
  args.push("agent");
56
- if (!config.useGateway)
57
- args.push("--local");
52
+ if (!config.useGateway) args.push("--local");
58
53
  args.push("--json");
59
54
  args.push("--session-id", session.sessionId);
60
55
  args.push("--message", message);
@@ -68,8 +63,7 @@ function buildOpenClawArgs(config, session, message) {
68
63
  }
69
64
  function extractStderrError(stderr, stdout) {
70
65
  const tryExtract = (raw) => {
71
- if (!raw)
72
- return void 0;
66
+ if (!raw) return void 0;
73
67
  const lines = stripAnsi(raw).split("\n").map((line) => line.trim()).filter((line) => line.length > 0);
74
68
  return lines.length > 0 ? lines[lines.length - 1] : void 0;
75
69
  };
@@ -118,18 +112,20 @@ async function promptCli(session, message, config, callbacks, signal) {
118
112
  stdio: ["ignore", "pipe", "pipe"]
119
113
  });
120
114
  const hardKill = setTimeout(() => {
121
- if (settled)
122
- return;
115
+ if (settled) return;
123
116
  settled = true;
124
117
  try {
125
118
  child.kill("SIGKILL");
126
119
  } catch {
127
120
  }
128
- reject(new Error(`openclaw: process timed out after ${config.cliTimeoutMs}ms`));
121
+ reject(
122
+ new Error(
123
+ `openclaw: process timed out after ${config.cliTimeoutMs}ms`
124
+ )
125
+ );
129
126
  }, config.cliTimeoutMs);
130
127
  const onAbort = () => {
131
- if (settled)
132
- return;
128
+ if (settled) return;
133
129
  try {
134
130
  child.kill("SIGTERM");
135
131
  } catch {
@@ -151,17 +147,19 @@ async function promptCli(session, message, config, callbacks, signal) {
151
147
  stderr += chunk.toString("utf-8");
152
148
  });
153
149
  child.on("error", (err) => {
154
- if (settled)
155
- return;
150
+ if (settled) return;
156
151
  settled = true;
157
152
  clearTimeout(hardKill);
158
153
  signal?.removeEventListener("abort", onAbort);
159
154
  const isNotFound = err.code === "ENOENT";
160
- reject(new Error(isNotFound ? `openclaw: binary not found at "${config.binaryPath}". Install OpenClaw (npm i -g openclaw) or set binaryPath/OPENCLAW_BIN.` : `openclaw: spawn error \u2014 ${err.message}`));
155
+ reject(
156
+ new Error(
157
+ isNotFound ? `openclaw: binary not found at "${config.binaryPath}". Install OpenClaw (npm i -g openclaw) or set binaryPath/OPENCLAW_BIN.` : `openclaw: spawn error \u2014 ${err.message}`
158
+ )
159
+ );
161
160
  });
162
161
  child.on("close", (code) => {
163
- if (settled)
164
- return;
162
+ if (settled) return;
165
163
  settled = true;
166
164
  clearTimeout(hardKill);
167
165
  signal?.removeEventListener("abort", onAbort);
@@ -182,29 +180,30 @@ async function promptCli(session, message, config, callbacks, signal) {
182
180
  const reasoningText = payloads.filter((p) => p.isReasoning).map((p) => p.text ?? "").filter((t) => t.length > 0).join("\n");
183
181
  const errorText = payloads.filter((p) => p.isError).map((p) => p.text ?? "").filter((t) => t.length > 0);
184
182
  const finalText = visibleText || parsed.meta?.finalAssistantVisibleText || "";
185
- if (finalText)
186
- cb.onText?.(finalText);
187
- if (reasoningText)
188
- cb.onThinking?.(reasoningText);
183
+ if (finalText) cb.onText?.(finalText);
184
+ if (reasoningText) cb.onThinking?.(reasoningText);
189
185
  session.messages.push({ role: "user", content: message });
190
186
  if (finalText) {
191
187
  session.messages.push({ role: "assistant", content: finalText });
192
188
  }
193
189
  const agentMeta = parsed.meta?.agentMeta;
194
- if (agentMeta?.usage)
195
- session.lastUsage = agentMeta.usage;
190
+ if (agentMeta?.usage) session.lastUsage = agentMeta.usage;
196
191
  if (agentMeta?.provider && agentMeta.model) {
197
192
  session.lastModelDescription = `openclaw/${session.agentId}/${agentMeta.provider}/${agentMeta.model}`;
198
193
  }
199
194
  const metaError = parsed.meta?.error;
200
195
  const isError = !!metaError;
201
- cb.onToolEnd?.("openclaw.agent", isError, {
202
- usage: agentMeta?.usage,
203
- provider: agentMeta?.provider,
204
- model: agentMeta?.model,
205
- ...metaError ? { error: metaError } : {},
206
- ...errorText.length > 0 ? { toolErrors: errorText } : {}
207
- });
196
+ cb.onToolEnd?.(
197
+ "openclaw.agent",
198
+ isError,
199
+ {
200
+ usage: agentMeta?.usage,
201
+ provider: agentMeta?.provider,
202
+ model: agentMeta?.model,
203
+ ...metaError ? { error: metaError } : {},
204
+ ...errorText.length > 0 ? { toolErrors: errorText } : {}
205
+ }
206
+ );
208
207
  resolve();
209
208
  });
210
209
  });
@@ -213,7 +212,7 @@ function describeCliModel(session) {
213
212
  return session.lastModelDescription || `openclaw/${session.agentId}`;
214
213
  }
215
214
 
216
- // ../../plugins/fusion-plugin-openclaw-runtime/dist/mcp-config.js
215
+ // ../../plugins/fusion-plugin-openclaw-runtime/src/mcp-config.ts
217
216
  import { writeFileSync } from "node:fs";
218
217
  import { tmpdir } from "node:os";
219
218
  import { join } from "node:path";
@@ -221,8 +220,7 @@ import { fileURLToPath } from "node:url";
221
220
  import { dirname } from "node:path";
222
221
  var BUILT_IN_TOOL_NAMES = /* @__PURE__ */ new Set(["read", "write", "edit", "bash", "grep", "find"]);
223
222
  function toolsToMcpToolDefs(tools) {
224
- if (!Array.isArray(tools))
225
- return [];
223
+ if (!Array.isArray(tools)) return [];
226
224
  return tools.filter((tool) => tool && typeof tool.name === "string" && !BUILT_IN_TOOL_NAMES.has(tool.name)).map((tool) => ({
227
225
  name: tool.name,
228
226
  description: typeof tool.description === "string" ? tool.description : "",
@@ -249,7 +247,7 @@ function writeOpenClawMcpBridgeFiles(toolDefs, cacheKey) {
249
247
  };
250
248
  }
251
249
 
252
- // ../../plugins/fusion-plugin-openclaw-runtime/dist/runtime-adapter.js
250
+ // ../../plugins/fusion-plugin-openclaw-runtime/src/runtime-adapter.ts
253
251
  import { randomUUID as randomUUID2 } from "node:crypto";
254
252
  var OpenClawRuntimeAdapter = class {
255
253
  id = "openclaw";
@@ -302,7 +300,7 @@ var OpenClawRuntimeAdapter = class {
302
300
  }
303
301
  };
304
302
 
305
- // ../../plugins/fusion-plugin-openclaw-runtime/dist/probe.js
303
+ // ../../plugins/fusion-plugin-openclaw-runtime/src/probe.ts
306
304
  import { spawn as spawn2 } from "node:child_process";
307
305
  var DEFAULT_PROBE_TIMEOUT_MS = 2e3;
308
306
  async function probeOpenClawBinary(opts = {}) {
@@ -319,8 +317,7 @@ async function probeOpenClawBinary(opts = {}) {
319
317
  stdio: ["ignore", "pipe", "pipe"]
320
318
  });
321
319
  const timer = setTimeout(() => {
322
- if (settled)
323
- return;
320
+ if (settled) return;
324
321
  settled = true;
325
322
  try {
326
323
  child.kill("SIGKILL");
@@ -341,8 +338,7 @@ async function probeOpenClawBinary(opts = {}) {
341
338
  stderr += chunk.toString("utf-8");
342
339
  });
343
340
  child.on("error", (err) => {
344
- if (settled)
345
- return;
341
+ if (settled) return;
346
342
  settled = true;
347
343
  clearTimeout(timer);
348
344
  const isNotFound = err.code === "ENOENT";
@@ -353,8 +349,7 @@ async function probeOpenClawBinary(opts = {}) {
353
349
  });
354
350
  });
355
351
  child.on("close", (code) => {
356
- if (settled)
357
- return;
352
+ if (settled) return;
358
353
  settled = true;
359
354
  clearTimeout(timer);
360
355
  if (code === 0) {
@@ -393,7 +388,7 @@ async function tryResolveBinaryPath(binary) {
393
388
  });
394
389
  }
395
390
 
396
- // ../../plugins/fusion-plugin-openclaw-runtime/dist/index.js
391
+ // ../../plugins/fusion-plugin-openclaw-runtime/src/index.ts
397
392
  var OPENCLAW_RUNTIME_ID = "openclaw";
398
393
  var OPENCLAW_RUNTIME_VERSION = "0.2.0";
399
394
  var openclawRuntimeMetadata = {
@@ -420,7 +415,9 @@ var plugin = definePlugin({
420
415
  onLoad: async (ctx) => {
421
416
  const config = resolveCliConfig(ctx.settings);
422
417
  const probe = await probeOpenClawBinary({ binaryPath: config.binaryPath });
423
- ctx.logger.info(probe.available ? `OpenClaw Runtime Plugin loaded \u2014 binary=${config.binaryPath}${probe.version ? ` (${probe.version})` : ""}` : `OpenClaw Runtime Plugin loaded but binary not detected: ${probe.reason ?? "unknown"}`);
418
+ ctx.logger.info(
419
+ probe.available ? `OpenClaw Runtime Plugin loaded \u2014 binary=${config.binaryPath}${probe.version ? ` (${probe.version})` : ""}` : `OpenClaw Runtime Plugin loaded but binary not detected: ${probe.reason ?? "unknown"}`
420
+ );
424
421
  ctx.emitEvent("openclaw-runtime:loaded", {
425
422
  runtimeId: OPENCLAW_RUNTIME_ID,
426
423
  version: OPENCLAW_RUNTIME_VERSION,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion-plugin-examples/openclaw-runtime",
3
- "version": "0.2.32",
3
+ "version": "0.2.33",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {