@runfusion/fusion 0.43.1 → 0.44.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 (168) hide show
  1. package/dist/automation-store-EKXXEE2S.js +10 -0
  2. package/dist/automation-store-PLNG3X72.js +10 -0
  3. package/dist/automation-store-RDDYZFUJ.js +10 -0
  4. package/dist/bin.js +8097 -1796
  5. package/dist/chunk-2JI3F6MG.js +948 -0
  6. package/dist/chunk-4L6CLWJC.js +8345 -0
  7. package/dist/chunk-4VNS5WPM.js +42 -0
  8. package/dist/chunk-5RGECGQL.js +1139 -0
  9. package/dist/chunk-6JDLN7IL.js +409 -0
  10. package/dist/chunk-AICJATVW.js +948 -0
  11. package/dist/chunk-AWKNRUOR.js +1148 -0
  12. package/dist/chunk-BHM3UYWS.js +4651 -0
  13. package/dist/chunk-BMUXDSBF.js +4647 -0
  14. package/dist/chunk-GETECT6V.js +353 -0
  15. package/dist/chunk-GUV4QQT3.js +1143 -0
  16. package/dist/chunk-JKQO7YYZ.js +8369 -0
  17. package/dist/chunk-LYZVU6UV.js +409 -0
  18. package/dist/chunk-MAN4WYHO.js +353 -0
  19. package/dist/chunk-MCUG2Z7M.js +4651 -0
  20. package/dist/chunk-PSDYB45U.js +948 -0
  21. package/dist/chunk-RR2HM46R.js +8345 -0
  22. package/dist/chunk-RXMQ5OMY.js +9226 -0
  23. package/dist/chunk-S2EVJUY3.js +353 -0
  24. package/dist/chunk-UXR5XZFZ.js +409 -0
  25. package/dist/client/.vite/manifest.json +272 -261
  26. package/dist/client/assets/{AgentDetailView-BGN03dyz.css → AgentDetailView-CanIeYHg.css} +1 -1
  27. package/dist/client/assets/{AgentDetailView-DKMz3r04.js → AgentDetailView-DxV8pFHX.js} +3 -3
  28. package/dist/client/assets/{AgentPermissionPolicyEditor-BiY1a4KR.js → AgentPermissionPolicyEditor--YS4iMUY.js} +2 -2
  29. package/dist/client/assets/AgentsView-BVILQjdS.css +1 -0
  30. package/dist/client/assets/{AgentsView-Co-k4vjh.js → AgentsView-CTzbcvhK.js} +3 -3
  31. package/dist/client/assets/ChatView-COygcnyk.js +6 -0
  32. package/dist/client/assets/CommandCenter-CTaopaC0.css +1 -0
  33. package/dist/client/assets/CommandCenter-DoKX2HWm.js +56 -0
  34. package/dist/client/assets/DevServerView-Cyevyvqx.js +1 -0
  35. package/dist/client/assets/{DirectoryPicker-DTKtd8L2.css → DirectoryPicker-0rspvcMz.css} +1 -1
  36. package/dist/client/assets/{DirectoryPicker-CkcGjyv0.js → DirectoryPicker-DBdyXEhR.js} +1 -1
  37. package/dist/client/assets/DocumentsView-BzSMyrns.js +1 -0
  38. package/dist/client/assets/{EvalsView-CUfyj5GW.js → EvalsView-ikz00o9g.js} +1 -1
  39. package/dist/client/assets/ExperimentalAgentOnboardingModal-CZ_jbgep.css +1 -0
  40. package/dist/client/assets/{ExperimentalAgentOnboardingModal-Dau9RTU_.js → ExperimentalAgentOnboardingModal-D-rzCCET.js} +10 -10
  41. package/dist/client/assets/GoalsView-Bfu1Oy2-.js +2 -0
  42. package/dist/client/assets/GoalsView-rg9VSIza.css +1 -0
  43. package/dist/client/assets/{InsightsView-BQPxHxKI.js → InsightsView-Cgmf5nES.js} +1 -1
  44. package/dist/client/assets/InsightsView-LMv1M1dU.css +1 -0
  45. package/dist/client/assets/MemoryView-DkEuDKQs.js +2 -0
  46. package/dist/client/assets/{NodesView-CSMvGwDU.js → NodesView-B_KYfS4o.js} +3 -3
  47. package/dist/client/assets/{PiExtensionsManager-BtqXF3fl.js → PiExtensionsManager-Dz69kkKs.js} +2 -2
  48. package/dist/client/assets/PluginManager-DSiHizRD.css +1 -0
  49. package/dist/client/assets/{PluginManager-CSSDb3VO.js → PluginManager-LHCVcduP.js} +1 -1
  50. package/dist/client/assets/PullRequestView-3AdbS2a1.css +1 -0
  51. package/dist/client/assets/{PullRequestView-Bjyfffdu.js → PullRequestView-DBJutLLl.js} +2 -2
  52. package/dist/client/assets/{ResearchView-CRU_NPho.js → ResearchView-gpn1XcVy.js} +1 -1
  53. package/dist/client/assets/{SecretsView-Bs8ySyC5.js → SecretsView-B7YqIowt.js} +1 -1
  54. package/dist/client/assets/SessionTerminal-9l4bdKcn.js +2 -0
  55. package/dist/client/assets/SessionTerminal-BNgtmXb3.css +1 -0
  56. package/dist/client/assets/SettingsModal-BGEK9_9A.js +31 -0
  57. package/dist/client/assets/{SettingsModal-DpAxDq6M.css → SettingsModal-CKv0TJfM.css} +1 -1
  58. package/dist/client/assets/SettingsModal-CXogw-Er.css +1 -0
  59. package/dist/client/assets/{SettingsModal-Nw5cTKAK.js → SettingsModal-DIIoHGUH.js} +1 -1
  60. package/dist/client/assets/{SetupWizardModal-CE79myEy.js → SetupWizardModal-BcVeMxeX.js} +1 -1
  61. package/dist/client/assets/{SkillsView-Dc8YskAX.js → SkillsView-BxSJ4PHL.js} +1 -1
  62. package/dist/client/assets/{StashRecoveryView-CqKOFiXT.js → StashRecoveryView-BhFQ2FsP.js} +1 -1
  63. package/dist/client/assets/{TodoView-BqIRwcZw.js → TodoView-BZpewjy0.js} +2 -2
  64. package/dist/client/assets/WorkflowNodeEditor-Yn1FRF2v.css +1 -0
  65. package/dist/client/assets/WorkflowNodeEditor-tWsgCdVt.js +8 -0
  66. package/dist/client/assets/{addon-fit-B4jkcKk4.js → addon-fit-SnYDEvGm.js} +1 -1
  67. package/dist/client/assets/{addon-unicode11-Cdne2Sj4.js → addon-unicode11-s5GoZCpi.js} +1 -1
  68. package/dist/client/assets/{addon-web-links-CRNLzj7m.js → addon-web-links-jjt2f_oV.js} +1 -1
  69. package/dist/client/assets/{addon-webgl-CeCSULF1.js → addon-webgl-Icn-RnEx.js} +1 -1
  70. package/dist/client/assets/{app-sEkTyT-w.js → app-BmGA0Hiz.js} +3 -3
  71. package/dist/client/assets/{app-BffGU_HQ.js → app-CEVYlVuJ.js} +3 -3
  72. package/dist/client/assets/{app-C8AHhs5N.js → app-CbBFax2C.js} +3 -3
  73. package/dist/client/assets/{app-B2ZxMfJT.js → app-DORKrGAz.js} +3 -3
  74. package/dist/client/assets/{app-Ri9Te2Dv.js → app-DQibuQ9z.js} +3 -3
  75. package/dist/client/assets/app-k76GrQP0.js +13 -0
  76. package/dist/client/assets/{createLucideIcon-BYvOGRiO.js → createLucideIcon-DmVITl5d.js} +1 -1
  77. package/dist/client/assets/{dashboard-view-C3SsjXo1.js → dashboard-view-B4LXCv5H.js} +4 -4
  78. package/dist/client/assets/{dashboard-view-DlKsVySD.js → dashboard-view-BFoyhTYF.js} +1 -1
  79. package/dist/client/assets/{dashboard-view-BhbN8LPh.js → dashboard-view-Cxzm_eqc.js} +1 -1
  80. package/dist/client/assets/dashboard-view-_8yfNwju.css +1 -0
  81. package/dist/client/assets/{folder-open-Bw1mxVfa.js → folder-open-33WGVnbp.js} +1 -1
  82. package/dist/client/assets/index-Bglw05rM.js +791 -0
  83. package/dist/client/assets/index-FYgnflWD.css +1 -0
  84. package/dist/client/assets/shield-alert-CqeGWBUK.js +6 -0
  85. package/dist/client/assets/{upload-BCmd-1I0.js → upload-C11J2diI.js} +1 -1
  86. package/dist/client/assets/{users-DO_t3V1p.js → users-a-ELbyyZ.js} +1 -1
  87. package/dist/client/assets/{vendor-i18n-CV0mwX_-.js → vendor-i18n-DYlSUfot.js} +1 -1
  88. package/dist/client/assets/vendor-react-BTgM5bbZ.js +49 -0
  89. package/dist/client/assets/{vendor-reactflow-CRZcPCXF.js → vendor-reactflow-ZasuEfF9.js} +3 -3
  90. package/dist/client/assets/{vendor-xterm-tcedd2Jt.js → vendor-xterm-ea7-K05z.js} +1 -1
  91. package/dist/client/assets/{x-CqNX_9E2.js → x-PItWc-wQ.js} +1 -1
  92. package/dist/client/assets/{zoom-out-CSTHbJgD.js → zoom-out-CzlHv0Kj.js} +1 -1
  93. package/dist/client/icons/icon-192.png +0 -0
  94. package/dist/client/icons/icon-512.png +0 -0
  95. package/dist/client/index.html +6 -6
  96. package/dist/client/sw.js +1 -1
  97. package/dist/client/theme-data.css +288 -285
  98. package/dist/client/version.json +1 -1
  99. package/dist/droid-cli/package.json +1 -1
  100. package/dist/droid-cli/src/__tests__/execsync-guard.test.ts +17 -0
  101. package/dist/droid-cli/src/__tests__/process-manager.test.ts +1 -45
  102. package/dist/extension.js +4780 -793
  103. package/dist/extract-zip-WL55Z3AU.js +2497 -0
  104. package/dist/index.min-CHQ3ABYJ.js +2926 -0
  105. package/dist/memory-dreams-7USISKVE.js +32 -0
  106. package/dist/memory-dreams-PBPISUDD.js +32 -0
  107. package/dist/memory-dreams-XNO2B2QF.js +32 -0
  108. package/dist/migration-EH2YOCYQ.js +15 -0
  109. package/dist/migration-PLGTTKL5.js +15 -0
  110. package/dist/migration-WZEZK22R.js +15 -0
  111. package/dist/pi-claude-cli/index.ts +47 -8
  112. package/dist/pi-claude-cli/package.json +4 -1
  113. package/dist/pi-claude-cli/src/__tests__/acp-dispatch.test.ts +80 -0
  114. package/dist/pi-claude-cli/src/__tests__/acp-driver.test.ts +423 -0
  115. package/dist/pi-claude-cli/src/__tests__/execsync-guard.test.ts +14 -0
  116. package/dist/pi-claude-cli/src/__tests__/process-manager.test.ts +1 -45
  117. package/dist/pi-claude-cli/src/__tests__/provider.test.ts +0 -1
  118. package/dist/pi-claude-cli/src/acp-driver.ts +585 -0
  119. package/dist/pi-claude-cli/src/event-bridge.ts +7 -0
  120. package/dist/pi-claude-cli/src/mcp-config.ts +29 -0
  121. package/dist/pi-claude-cli/src/process-manager.ts +6 -38
  122. package/dist/plugin-sdk/index.d.ts +5179 -5144
  123. package/dist/plugins/fusion-plugin-acp-runtime/bundled.js +263 -19
  124. package/dist/plugins/fusion-plugin-acp-runtime/package.json +1 -1
  125. package/dist/plugins/fusion-plugin-cli-printing-press/package.json +1 -1
  126. package/dist/plugins/fusion-plugin-compound-engineering/bundled.js +37 -7
  127. package/dist/plugins/fusion-plugin-compound-engineering/manifest.json +4 -4
  128. package/dist/plugins/fusion-plugin-compound-engineering/package.json +1 -1
  129. package/dist/plugins/fusion-plugin-cursor-runtime/package.json +1 -1
  130. package/dist/plugins/fusion-plugin-dependency-graph/package.json +1 -1
  131. package/dist/plugins/fusion-plugin-droid-runtime/bundled.js +1 -1
  132. package/dist/plugins/fusion-plugin-droid-runtime/package.json +1 -1
  133. package/dist/plugins/fusion-plugin-hermes-runtime/package.json +1 -1
  134. package/dist/plugins/fusion-plugin-openclaw-runtime/package.json +1 -1
  135. package/dist/plugins/fusion-plugin-paperclip-runtime/package.json +1 -1
  136. package/dist/plugins/fusion-plugin-reports/package.json +1 -1
  137. package/dist/plugins/fusion-plugin-roadmap/package.json +1 -1
  138. package/dist/plugins/fusion-plugin-whatsapp-chat/package.json +1 -1
  139. package/dist/plugins/fusion-plugin-whatsapp-chat/src/__tests__/index.test.ts +5 -1
  140. package/dist/routine-store-GIJ6MXWY.js +10 -0
  141. package/dist/routine-store-HTVC2PUQ.js +10 -0
  142. package/dist/routine-store-KGHZBPDF.js +10 -0
  143. package/package.json +1 -1
  144. package/skill/fusion/references/engine-tools.md +6 -4
  145. package/dist/client/assets/AgentsView-DfznJDek.css +0 -1
  146. package/dist/client/assets/ChatView-BkAG99bj.js +0 -6
  147. package/dist/client/assets/DevServerView-C6DC0URX.js +0 -1
  148. package/dist/client/assets/DocumentsView-OCK1Vsw_.js +0 -1
  149. package/dist/client/assets/ExperimentalAgentOnboardingModal-BNpveCEk.css +0 -1
  150. package/dist/client/assets/GoalsView-CNLTn0rX.js +0 -2
  151. package/dist/client/assets/GoalsView-DI66UsjT.css +0 -1
  152. package/dist/client/assets/InsightsView-C9-mqVvf.css +0 -1
  153. package/dist/client/assets/MemoryView-D3xQIFjj.js +0 -2
  154. package/dist/client/assets/PluginManager-UHVLvWWl.css +0 -1
  155. package/dist/client/assets/PullRequestView-WQIS0zUC.css +0 -1
  156. package/dist/client/assets/ReliabilityView-QKMUDebT.js +0 -1
  157. package/dist/client/assets/ReliabilityView-eoKBhBc4.css +0 -1
  158. package/dist/client/assets/SessionTerminal-BiigPP2l.css +0 -1
  159. package/dist/client/assets/SessionTerminal-Dk1NgmN2.js +0 -2
  160. package/dist/client/assets/SettingsModal-JCaNvdAb.js +0 -31
  161. package/dist/client/assets/SettingsModal-nF_GaeeK.css +0 -1
  162. package/dist/client/assets/WorkflowNodeEditor-2jDuk2FR.js +0 -8
  163. package/dist/client/assets/WorkflowNodeEditor-BokhW3de.css +0 -1
  164. package/dist/client/assets/app-CUu1sm3x.js +0 -13
  165. package/dist/client/assets/dashboard-view-Du53JbmQ.css +0 -1
  166. package/dist/client/assets/index-CpTBp1RG.js +0 -793
  167. package/dist/client/assets/index-DqhCiU35.css +0 -1
  168. package/dist/client/assets/vendor-react-D37HfzIf.js +0 -49
@@ -15,6 +15,10 @@ function definePlugin(plugin2) {
15
15
  }
16
16
 
17
17
  // ../../plugins/fusion-plugin-acp-runtime/src/cli-spawn.ts
18
+ import { existsSync } from "node:fs";
19
+ import { dirname, isAbsolute, join, resolve } from "node:path";
20
+ import { fileURLToPath } from "node:url";
21
+ var CLAUDE_CODE_CLI_ACP_BINARY = "claude-code-cli-acp";
18
22
  function asTrimmedString(value) {
19
23
  return typeof value === "string" && value.trim().length > 0 ? value.trim() : void 0;
20
24
  }
@@ -26,15 +30,74 @@ function asStringArray(value) {
26
30
  function asBool(value) {
27
31
  return value === true;
28
32
  }
33
+ function pluginRootDir() {
34
+ return resolve(dirname(fileURLToPath(import.meta.url)), "..");
35
+ }
36
+ function bundledClaudeBridgeBinPath(pluginRoot = pluginRootDir()) {
37
+ const extension = process.platform === "win32" ? ".cmd" : "";
38
+ return join(pluginRoot, "node_modules", ".bin", `${CLAUDE_CODE_CLI_ACP_BINARY}${extension}`);
39
+ }
40
+ function resolveBundledClaudeBridgeBinary(options = {}) {
41
+ const root = options.pluginRoot ?? pluginRootDir();
42
+ const exists = options.exists ?? existsSync;
43
+ const candidate = bundledClaudeBridgeBinPath(root);
44
+ if (!exists(candidate)) {
45
+ return {
46
+ kind: "not_resolved",
47
+ requested: CLAUDE_CODE_CLI_ACP_BINARY,
48
+ path: candidate,
49
+ reason: `Bundled ${CLAUDE_CODE_CLI_ACP_BINARY} binary was not found at ${candidate}`
50
+ };
51
+ }
52
+ if (!isAbsolute(candidate)) {
53
+ return {
54
+ kind: "not_resolved",
55
+ requested: CLAUDE_CODE_CLI_ACP_BINARY,
56
+ path: candidate,
57
+ reason: `Bundled ${CLAUDE_CODE_CLI_ACP_BINARY} path is not absolute`
58
+ };
59
+ }
60
+ return { kind: "resolved", requested: CLAUDE_CODE_CLI_ACP_BINARY, path: candidate };
61
+ }
29
62
  function resolveCliSettings(settings) {
30
- const binaryPath = asTrimmedString(settings?.acpBinaryPath) ?? "acp-agent";
63
+ const requestedBinaryPath = asTrimmedString(settings?.acpBinaryPath);
64
+ let binaryPath = requestedBinaryPath ?? "acp-agent";
65
+ let binaryResolution;
66
+ if (requestedBinaryPath === CLAUDE_CODE_CLI_ACP_BINARY) {
67
+ binaryResolution = resolveBundledClaudeBridgeBinary();
68
+ if (binaryResolution.kind === "resolved" && binaryResolution.path) {
69
+ binaryPath = binaryResolution.path;
70
+ }
71
+ }
31
72
  const args = asStringArray(settings?.acpArgs) ?? [];
32
73
  const model = asTrimmedString(settings?.acpModel);
33
74
  const fsRead = asBool(settings?.acpFsRead);
34
75
  const fsWrite = asBool(settings?.acpFsWrite);
35
76
  const envAllowList = asStringArray(settings?.acpEnvAllowList) ?? [];
36
77
  const allowUnrestricted = asBool(settings?.acpAllowUnrestricted);
37
- return { binaryPath, args, model, fsRead, fsWrite, envAllowList, allowUnrestricted };
78
+ return {
79
+ binaryPath,
80
+ args,
81
+ model,
82
+ fsRead,
83
+ fsWrite,
84
+ envAllowList,
85
+ requiredEnv: [],
86
+ allowUnrestricted,
87
+ binaryResolution
88
+ };
89
+ }
90
+ function resolveClaudeBridgeAskSettings(settings) {
91
+ const resolved = resolveCliSettings({
92
+ ...settings,
93
+ acpBinaryPath: CLAUDE_CODE_CLI_ACP_BINARY,
94
+ acpArgs: [],
95
+ acpFsRead: false,
96
+ acpFsWrite: false,
97
+ acpEnvAllowList: ["HOME", "PATH"],
98
+ acpAllowUnrestricted: false
99
+ });
100
+ return { ...resolved, requiredEnv: ["HOME"] };
38
101
  }
39
102
 
40
103
  // ../../plugins/fusion-plugin-acp-runtime/src/provider.ts
@@ -15982,8 +16045,8 @@ var Connection = class {
15982
16045
  this.requestHandler = requestHandler;
15983
16046
  this.notificationHandler = notificationHandler;
15984
16047
  this.stream = stream;
15985
- this.closedPromise = new Promise((resolve2) => {
15986
- this.abortController.signal.addEventListener("abort", () => resolve2());
16048
+ this.closedPromise = new Promise((resolve4) => {
16049
+ this.abortController.signal.addEventListener("abort", () => resolve4());
15987
16050
  });
15988
16051
  void this.receive();
15989
16052
  }
@@ -16153,11 +16216,11 @@ var Connection = class {
16153
16216
  return rejectedPromise(this.closedReason());
16154
16217
  }
16155
16218
  const id = this.nextRequestId++;
16156
- const responsePromise = new Promise((resolve2, reject) => {
16219
+ const responsePromise = new Promise((resolve4, reject) => {
16157
16220
  this.pendingResponses.set(id, {
16158
16221
  resolve: (response) => {
16159
16222
  try {
16160
- resolve2(mapResponse ? mapResponse(response) : response);
16223
+ resolve4(mapResponse ? mapResponse(response) : response);
16161
16224
  } catch (error48) {
16162
16225
  reject(error48);
16163
16226
  }
@@ -16292,12 +16355,25 @@ function killAllProcesses() {
16292
16355
  }
16293
16356
  activeProcesses.clear();
16294
16357
  }
16295
- function buildSpawnEnv(allowList) {
16358
+ var MissingAcpEnvError = class extends Error {
16359
+ constructor(missingKeys) {
16360
+ super(`Missing required ACP environment variable(s): ${missingKeys.join(", ")}`);
16361
+ this.missingKeys = missingKeys;
16362
+ this.name = "MissingAcpEnvError";
16363
+ }
16364
+ code = "ACP_MISSING_ENV";
16365
+ };
16366
+ function buildSpawnEnv(allowList, options = {}) {
16367
+ const sourceEnv = options.sourceEnv ?? process.env;
16296
16368
  const env = {};
16297
16369
  for (const key of allowList) {
16298
- const value = process.env[key];
16370
+ const value = sourceEnv[key];
16299
16371
  if (typeof value === "string") env[key] = value;
16300
16372
  }
16373
+ const missing = (options.required ?? []).filter((key) => typeof env[key] !== "string");
16374
+ if (missing.length > 0) {
16375
+ throw new MissingAcpEnvError(missing);
16376
+ }
16301
16377
  return env;
16302
16378
  }
16303
16379
  function spawnAgent(options) {
@@ -17001,13 +17077,13 @@ function createBridgingClientHandler(callbacks, gate, fsOpts, permissionOpts) {
17001
17077
  },
17002
17078
  async requestPermission(params) {
17003
17079
  if (cancelled) return cancelledResponse;
17004
- return await new Promise((resolve2) => {
17080
+ return await new Promise((resolve4) => {
17005
17081
  let settled = false;
17006
17082
  const finish = (response) => {
17007
17083
  if (settled) return;
17008
17084
  settled = true;
17009
17085
  pending.delete(drain);
17010
- resolve2(response);
17086
+ resolve4(response);
17011
17087
  };
17012
17088
  const drain = (response) => finish(response);
17013
17089
  pending.add(drain);
@@ -17024,13 +17100,13 @@ function createBridgingClientHandler(callbacks, gate, fsOpts, permissionOpts) {
17024
17100
  return { handler, cancelPending, resetTurn: () => bridge.reset() };
17025
17101
  }
17026
17102
  function withTimeout(promise2, ms, onTimeout) {
17027
- return new Promise((resolve2, reject) => {
17103
+ return new Promise((resolve4, reject) => {
17028
17104
  const timer = setTimeout(() => reject(onTimeout()), ms);
17029
17105
  timer.unref?.();
17030
17106
  promise2.then(
17031
17107
  (value) => {
17032
17108
  clearTimeout(timer);
17033
- resolve2(value);
17109
+ resolve4(value);
17034
17110
  },
17035
17111
  (err) => {
17036
17112
  clearTimeout(timer);
@@ -17107,7 +17183,10 @@ async function connect(opts) {
17107
17183
  };
17108
17184
  }
17109
17185
  async function newAcpSession(connection, opts) {
17110
- const res = await connection.conn.newSession({ cwd: opts.cwd, mcpServers: [] });
17186
+ const res = await connection.conn.newSession({
17187
+ cwd: opts.cwd,
17188
+ mcpServers: opts.mcpServers ?? []
17189
+ });
17111
17190
  return { sessionId: boundIdentifier(res.sessionId), modes: res.modes ?? void 0 };
17112
17191
  }
17113
17192
  async function promptAcpSession(connection, sessionId, blocks) {
@@ -17119,8 +17198,8 @@ async function cancelAcpSession(connection, sessionId) {
17119
17198
  try {
17120
17199
  await Promise.race([
17121
17200
  connection.conn.cancel({ sessionId }),
17122
- new Promise((resolve2) => {
17123
- const timer = setTimeout(resolve2, CANCEL_TIMEOUT_MS);
17201
+ new Promise((resolve4) => {
17202
+ const timer = setTimeout(resolve4, CANCEL_TIMEOUT_MS);
17124
17203
  timer.unref?.();
17125
17204
  })
17126
17205
  ]);
@@ -17179,13 +17258,16 @@ var AcpRuntimeAdapter = class {
17179
17258
  binaryPath: this.settings.binaryPath,
17180
17259
  args: this.settings.args,
17181
17260
  cwd: options.cwd,
17182
- env: buildSpawnEnv(this.settings.envAllowList),
17261
+ env: buildSpawnEnv(this.settings.envAllowList, { required: this.settings.requiredEnv }),
17183
17262
  advertiseFs: { read: this.settings.fsRead, write: this.settings.fsWrite },
17184
17263
  clientHandler
17185
17264
  });
17186
17265
  let sessionId;
17187
17266
  try {
17188
- const opened = await newAcpSession(connection, { cwd: options.cwd });
17267
+ const opened = await newAcpSession(connection, {
17268
+ cwd: options.cwd,
17269
+ mcpServers: options.mcpServers
17270
+ });
17189
17271
  sessionId = opened.sessionId;
17190
17272
  } catch (err) {
17191
17273
  connection.dispose();
@@ -17222,7 +17304,8 @@ var AcpRuntimeAdapter = class {
17222
17304
  }
17223
17305
  acp.resetTurn?.();
17224
17306
  const blocks = buildPromptBlocks(prompt);
17225
- await promptAcpSession(acp.connection, acp.sessionId, blocks);
17307
+ const stopReason = await promptAcpSession(acp.connection, acp.sessionId, blocks);
17308
+ return { stopReason };
17226
17309
  }
17227
17310
  describeModel(session) {
17228
17311
  return session.lastModelDescription || "acp";
@@ -17236,6 +17319,144 @@ var AcpRuntimeAdapter = class {
17236
17319
  }
17237
17320
  };
17238
17321
 
17322
+ // ../../plugins/fusion-plugin-acp-runtime/src/setup.ts
17323
+ import { dirname as dirname3, relative, resolve as resolve3, sep as sep2 } from "node:path";
17324
+ import { fileURLToPath as fileURLToPath2 } from "node:url";
17325
+
17326
+ // ../../plugins/fusion-plugin-acp-runtime/src/probe.ts
17327
+ function isMissingBinary(err) {
17328
+ const code = err?.code;
17329
+ return code === "ENOENT";
17330
+ }
17331
+ async function probeAcpReadiness(opts) {
17332
+ const timeoutMs = opts.timeoutMs ?? DEFAULT_INITIALIZE_TIMEOUT_MS;
17333
+ let connection;
17334
+ try {
17335
+ connection = await connect({
17336
+ binaryPath: opts.binaryPath,
17337
+ args: opts.args,
17338
+ cwd: opts.cwd,
17339
+ env: opts.env,
17340
+ // Probe with fs capabilities OFF — readiness must not advertise anything
17341
+ // the real session might not (KTD6).
17342
+ advertiseFs: { read: false, write: false },
17343
+ initializeTimeoutMs: timeoutMs
17344
+ });
17345
+ const authRequired = connection.authMethods.length > 0;
17346
+ return {
17347
+ ok: true,
17348
+ reason: "ok",
17349
+ authRequired
17350
+ };
17351
+ } catch (err) {
17352
+ if (err instanceof HandshakeTimeoutError) {
17353
+ return { ok: false, reason: "handshake_timeout", detail: err.message };
17354
+ }
17355
+ if (err instanceof IncompatibleProtocolError) {
17356
+ return {
17357
+ ok: false,
17358
+ reason: "incompatible_protocol",
17359
+ detail: err.message,
17360
+ protocolVersion: err.agentProtocolVersion
17361
+ };
17362
+ }
17363
+ if (isMissingBinary(err)) {
17364
+ return {
17365
+ ok: false,
17366
+ reason: "missing_binary",
17367
+ detail: `ACP agent binary not found: ${opts.binaryPath}`
17368
+ };
17369
+ }
17370
+ return {
17371
+ ok: false,
17372
+ reason: "spawn_error",
17373
+ detail: err instanceof Error ? err.message : String(err)
17374
+ };
17375
+ } finally {
17376
+ connection?.dispose();
17377
+ }
17378
+ }
17379
+
17380
+ // ../../plugins/fusion-plugin-acp-runtime/src/setup.ts
17381
+ var setupManifest = {
17382
+ binaryName: CLAUDE_CODE_CLI_ACP_BINARY,
17383
+ description: "Claude Code ACP bridge used by Fusion's read-only ask path",
17384
+ channel: "beta",
17385
+ defaultTimeoutMs: 3e4
17386
+ };
17387
+ var MAX_PROBE_TIMEOUT_MS = 3e4;
17388
+ function isInside(parent, child) {
17389
+ const rel = relative(resolve3(parent), resolve3(child));
17390
+ return rel === "" || !rel.startsWith("..") && !rel.includes(`..${sep2}`);
17391
+ }
17392
+ function defaultPluginRoot() {
17393
+ return resolve3(dirname3(fileURLToPath2(import.meta.url)), "..");
17394
+ }
17395
+ function validateBundledBridgeIdentity(binaryPath, pluginRoot = defaultPluginRoot()) {
17396
+ const expectedBin = resolve3(bundledClaudeBridgeBinPath(pluginRoot));
17397
+ const expectedNodeModules = resolve3(pluginRoot, "node_modules");
17398
+ if (resolve3(binaryPath) !== expectedBin && !isInside(expectedNodeModules, binaryPath)) {
17399
+ return `Resolved ${CLAUDE_CODE_CLI_ACP_BINARY} must come from this plugin's node_modules, got ${binaryPath}`;
17400
+ }
17401
+ return void 0;
17402
+ }
17403
+ function statusFromProbe(probe, binaryPath) {
17404
+ if (probe.ok) {
17405
+ if (probe.authRequired) {
17406
+ return {
17407
+ status: "error",
17408
+ binaryPath,
17409
+ error: "Claude authentication required: run `claude` once to authenticate before using the ACP bridge."
17410
+ };
17411
+ }
17412
+ return { status: "installed", binaryPath };
17413
+ }
17414
+ if (probe.reason === "missing_binary") {
17415
+ return {
17416
+ status: "not-installed",
17417
+ error: `Install bundled dependency ${CLAUDE_CODE_CLI_ACP_BINARY}@0.1.1 and run pnpm install for this plugin.`
17418
+ };
17419
+ }
17420
+ if (probe.reason === "unauthenticated") {
17421
+ return {
17422
+ status: "error",
17423
+ binaryPath,
17424
+ error: "Claude authentication required: run `claude` once to authenticate before using the ACP bridge."
17425
+ };
17426
+ }
17427
+ return { status: "error", binaryPath, error: probe.detail ?? `ACP readiness failed: ${probe.reason}` };
17428
+ }
17429
+ async function checkSetup(ctx, deps = {}) {
17430
+ const settings = resolveClaudeBridgeAskSettings(ctx.settings);
17431
+ if (settings.binaryResolution?.kind === "not_resolved") {
17432
+ return {
17433
+ status: "not-installed",
17434
+ error: settings.binaryResolution.reason ?? `Install ${CLAUDE_CODE_CLI_ACP_BINARY}@0.1.1`
17435
+ };
17436
+ }
17437
+ const identityError = validateBundledBridgeIdentity(settings.binaryPath, deps.pluginRoot);
17438
+ if (identityError) {
17439
+ return { status: "error", error: identityError, binaryPath: settings.binaryPath };
17440
+ }
17441
+ let env;
17442
+ try {
17443
+ env = buildSpawnEnv(settings.envAllowList, { required: settings.requiredEnv });
17444
+ } catch (err) {
17445
+ return { status: "error", binaryPath: settings.binaryPath, error: err instanceof Error ? err.message : String(err) };
17446
+ }
17447
+ const probe = await (deps.probe ?? probeAcpReadiness)({
17448
+ binaryPath: settings.binaryPath,
17449
+ args: settings.args,
17450
+ cwd: process.cwd(),
17451
+ env,
17452
+ timeoutMs: MAX_PROBE_TIMEOUT_MS
17453
+ });
17454
+ return statusFromProbe(probe, settings.binaryPath);
17455
+ }
17456
+ var setupHooks = {
17457
+ checkSetup
17458
+ };
17459
+
17239
17460
  // ../../plugins/fusion-plugin-acp-runtime/src/index.ts
17240
17461
  process.on("exit", killAllProcesses);
17241
17462
  var ACP_RUNTIME_ID = "acp";
@@ -17268,19 +17489,42 @@ var plugin = definePlugin({
17268
17489
  "ACP Runtime: acpAllowUnrestricted is set \u2014 sensitive tool calls from the untrusted agent will be auto-approved under an allow-all policy. Prefer an approval-required policy."
17269
17490
  );
17270
17491
  }
17492
+ if (!process.env.FUSION_CLAUDE_ACP_BRIDGE) {
17493
+ const resolved = resolveBundledClaudeBridgeBinary();
17494
+ if (resolved.kind === "resolved") {
17495
+ process.env.FUSION_CLAUDE_ACP_BRIDGE = resolved.path;
17496
+ ctx.logger.info(
17497
+ "ACP Runtime: published bundled Claude bridge path for Route A (transport stays off until FUSION_CLAUDE_ACP=1)."
17498
+ );
17499
+ } else {
17500
+ ctx.logger.info(`ACP Runtime: bundled Claude bridge not resolved (${resolved.reason}); Route A unavailable.`);
17501
+ }
17502
+ }
17271
17503
  }
17272
17504
  },
17273
17505
  runtime: {
17274
17506
  metadata: acpRuntimeMetadata,
17275
17507
  factory: acpRuntimeFactory
17508
+ },
17509
+ setup: {
17510
+ manifest: setupManifest,
17511
+ hooks: setupHooks
17276
17512
  }
17277
17513
  });
17278
17514
  var index_default = plugin;
17279
17515
  export {
17280
17516
  ACP_RUNTIME_ID,
17281
17517
  AcpRuntimeAdapter,
17518
+ CLAUDE_CODE_CLI_ACP_BINARY,
17282
17519
  acpRuntimeFactory,
17283
17520
  acpRuntimeMetadata,
17521
+ bundledClaudeBridgeBinPath,
17522
+ checkSetup,
17284
17523
  index_default as default,
17285
- resolveCliSettings
17524
+ resolveBundledClaudeBridgeBinary,
17525
+ resolveClaudeBridgeAskSettings,
17526
+ resolveCliSettings,
17527
+ setupHooks,
17528
+ setupManifest,
17529
+ validateBundledBridgeIdentity
17286
17530
  };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion-plugin-examples/acp-runtime",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion-plugin-examples/cli-printing-press",
3
- "version": "0.1.23",
3
+ "version": "0.1.24",
4
4
  "type": "module",
5
5
  "description": "CLI Printing Press plugin package for Fusion",
6
6
  "private": true,
@@ -58,6 +58,18 @@ var COMPOUND_ENGINEERING_SKILLS = [
58
58
  enabled: true,
59
59
  triggerPatterns: ["code review", "review this change", "review before PR"]
60
60
  },
61
+ {
62
+ /*
63
+ * FNXC:CompoundEngineering 2026-06-16-19:40:
64
+ * ce-debug is bundled beside the other pinned CE skills so bug-shaped investigation sessions install from the plugin-local snapshot and never depend on an operator's global skill cache.
65
+ */
66
+ skillId: "ce-debug",
67
+ name: "ce-debug",
68
+ description: "Investigate bug-shaped work by reproducing failures, testing hypotheses, isolating root cause, and producing findings before implementation.",
69
+ skillFiles: ["skills/ce-debug/SKILL.md"],
70
+ enabled: true,
71
+ triggerPatterns: ["debug", "investigate a bug", "root cause", "regression", "broken behavior", "error message"]
72
+ },
61
73
  {
62
74
  skillId: "ce-compound",
63
75
  name: "ce-compound",
@@ -546,6 +558,19 @@ var STAGE_DEFINITIONS = [
546
558
  icon: "Hammer",
547
559
  label: "Work",
548
560
  artifactGlob: "docs/work/**/*.md"
561
+ },
562
+ {
563
+ /*
564
+ * FNXC:CompoundEngineering 2026-06-16-19:40:
565
+ * debug is an operator-launchable investigation session appended after work so the existing strategy→ideate→brainstorm→plan→work auto-advance chain remains unchanged.
566
+ */
567
+ stageId: "debug",
568
+ order: 600,
569
+ skillId: "ce-debug",
570
+ artifactLocation: "docs/debug/",
571
+ icon: "Bug",
572
+ label: "Debug",
573
+ artifactGlob: "docs/debug/**/*.md"
549
574
  }
550
575
  ];
551
576
  var REGISTRY = new Map(STAGE_DEFINITIONS.map((s) => [s.stageId, s]));
@@ -562,7 +587,7 @@ function registerStage(def) {
562
587
  // ../../plugins/fusion-plugin-compound-engineering/src/settings.ts
563
588
  var DEFAULT_PROVIDER = "";
564
589
  var DEFAULT_MODEL_ID = "";
565
- var DEFAULT_ENABLED_STAGES = listStages().map((s) => s.stageId);
590
+ var DEFAULT_DISABLED_STAGES = [];
566
591
  var DEFAULT_RECONCILE_ON_HOOKS = true;
567
592
  var DEFAULT_RECONCILE_INTERVAL_MINUTES = 15;
568
593
  var settingsSchema = {
@@ -580,13 +605,13 @@ var settingsSchema = {
580
605
  group: "Sessions",
581
606
  defaultValue: DEFAULT_MODEL_ID
582
607
  },
583
- enabledStages: {
608
+ disabledStages: {
584
609
  type: "array",
585
610
  itemType: "string",
586
- label: "Enabled Stages",
587
- description: "Stage IDs that may be launched from the Compound Engineering view (for example strategy, ideate, brainstorm, plan, work).",
611
+ label: "Disabled Stages",
612
+ description: "Stage IDs hidden from launch in the Compound Engineering view. Empty means all registered stages are launchable.",
588
613
  group: "Sessions",
589
- defaultValue: DEFAULT_ENABLED_STAGES
614
+ defaultValue: DEFAULT_DISABLED_STAGES
590
615
  },
591
616
  reconcileOnHooks: {
592
617
  type: "boolean",
@@ -627,8 +652,12 @@ function getDefaultProvider(settings) {
627
652
  function getDefaultModelId(settings) {
628
653
  return asString(settings, "defaultModelId");
629
654
  }
655
+ function getDisabledStages(settings) {
656
+ return asStringArray(settings, "disabledStages", DEFAULT_DISABLED_STAGES);
657
+ }
630
658
  function getEnabledStages(settings) {
631
- return asStringArray(settings, "enabledStages", listStages().map((s) => s.stageId));
659
+ const disabled = new Set(getDisabledStages(settings));
660
+ return listStages().map((s) => s.stageId).filter((stageId) => !disabled.has(stageId));
632
661
  }
633
662
  function getReconcileOnHooks(settings) {
634
663
  return asBoolean(settings, "reconcileOnHooks", DEFAULT_RECONCILE_ON_HOOKS);
@@ -1046,7 +1075,7 @@ var CeOrchestrator = class {
1046
1075
  async start(stageId, opts) {
1047
1076
  const stage = getStage(stageId);
1048
1077
  if (!stage) throw new Error(`Unknown CE stage: ${stageId}`);
1049
- if (!getEnabledStages(this.ctx.settings).includes(stageId)) {
1078
+ if (getDisabledStages(this.ctx.settings).includes(stageId)) {
1050
1079
  throw new Error(`CE stage is not enabled: ${stageId}`);
1051
1080
  }
1052
1081
  if (!this.factory) {
@@ -2175,6 +2204,7 @@ export {
2175
2204
  getCeSessionStore,
2176
2205
  getDefaultModelId,
2177
2206
  getDefaultProvider,
2207
+ getDisabledStages,
2178
2208
  getEnabledStages,
2179
2209
  getReconcileIntervalMinutes,
2180
2210
  getReconcileOnHooks,
@@ -30,13 +30,13 @@
30
30
  "group": "Sessions",
31
31
  "defaultValue": ""
32
32
  },
33
- "enabledStages": {
33
+ "disabledStages": {
34
34
  "type": "array",
35
35
  "itemType": "string",
36
- "label": "Enabled Stages",
37
- "description": "Stage IDs that may be launched from the Compound Engineering view (for example strategy, ideate, brainstorm, plan, work).",
36
+ "label": "Disabled Stages",
37
+ "description": "Stage IDs hidden from launch in the Compound Engineering view. Empty means all registered stages are launchable.",
38
38
  "group": "Sessions",
39
- "defaultValue": ["strategy", "ideate", "brainstorm", "plan", "work"]
39
+ "defaultValue": []
40
40
  },
41
41
  "reconcileOnHooks": {
42
42
  "type": "boolean",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion-plugin-examples/compound-engineering",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion-plugin-examples/cursor-runtime",
3
- "version": "0.1.25",
3
+ "version": "0.1.26",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion-plugin-examples/dependency-graph",
3
- "version": "0.1.37",
3
+ "version": "0.1.38",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -136878,7 +136878,7 @@ function sanitizeAgentsContent(content) {
136878
136878
  }
136879
136879
 
136880
136880
  // ../../plugins/fusion-plugin-droid-runtime/src/process-manager.ts
136881
- import { execSync, spawn } from "node:child_process";
136881
+ import { spawn } from "node:child_process";
136882
136882
  import { writeFileSync, unlinkSync } from "node:fs";
136883
136883
  import { join as join2 } from "node:path";
136884
136884
  import { tmpdir } from "node:os";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion-plugin-examples/droid-runtime",
3
- "version": "0.1.32",
3
+ "version": "0.1.33",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion-plugin-examples/hermes-runtime",
3
- "version": "0.2.56",
3
+ "version": "0.2.57",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion-plugin-examples/openclaw-runtime",
3
- "version": "0.2.56",
3
+ "version": "0.2.57",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion-plugin-examples/paperclip-runtime",
3
- "version": "0.2.56",
3
+ "version": "0.2.57",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion-plugin-examples/reports",
3
- "version": "0.1.25",
3
+ "version": "0.1.26",
4
4
  "type": "module",
5
5
  "description": "Reports plugin for Fusion",
6
6
  "private": true,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion-plugin-examples/roadmap",
3
- "version": "0.1.25",
3
+ "version": "0.1.26",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion-plugin-examples/whatsapp-chat",
3
- "version": "0.1.25",
3
+ "version": "0.1.26",
4
4
  "type": "module",
5
5
  "description": "WhatsApp Web (Baileys) chat bridge for Fusion agents",
6
6
  "keywords": [
@@ -9,8 +9,12 @@ const connectionInstances: Array<{
9
9
  logout: ReturnType<typeof vi.fn>;
10
10
  }> = [];
11
11
 
12
+ /**
13
+ * FNXC:WhatsAppPluginTest 2026-06-17-10:07:
14
+ * Vitest 4 requires vi.fn() mocks used with new to use a function or class implementation; an arrow-backed mock makes new WhatsAppConnection(...) throw TypeError because the implementation is not constructable.
15
+ */
12
16
  vi.mock("../connection.js", () => {
13
- const ctor = vi.fn((ctx: PluginContext) => {
17
+ const ctor = vi.fn(function WhatsAppConnectionMock(ctx: PluginContext) {
14
18
  const root = ctx.taskStore.getRootDir();
15
19
  const instance = {
16
20
  start: vi.fn(async () => {}),
@@ -0,0 +1,10 @@
1
+ import {
2
+ RoutineStore
3
+ } from "./chunk-LYZVU6UV.js";
4
+ import "./chunk-RXMQ5OMY.js";
5
+ import "./chunk-BHM3UYWS.js";
6
+ import "./chunk-AWKNRUOR.js";
7
+ import "./chunk-4VNS5WPM.js";
8
+ export {
9
+ RoutineStore
10
+ };