@runfusion/fusion 0.1.2 → 0.2.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 (69) hide show
  1. package/README.md +2 -0
  2. package/dist/bin.js +4055 -1755
  3. package/dist/client/assets/AgentDetailView-CDZED6Dy.css +1 -0
  4. package/dist/client/assets/AgentDetailView-zycSdnO8.js +28 -0
  5. package/dist/client/assets/AgentsView-DoQkkDLf.css +1 -0
  6. package/dist/client/assets/AgentsView-pO7WiBS5.js +522 -0
  7. package/dist/client/assets/ChatView-BOd-sxbT.js +1 -0
  8. package/dist/client/assets/DevServerView-09GQf34f.js +11 -0
  9. package/dist/client/assets/DevServerView-ZeBGQkLI.css +1 -0
  10. package/dist/client/assets/DirectoryPicker-CcdN1Zs7.js +1 -0
  11. package/dist/client/assets/DocumentsView-CS8aiwtz.js +1 -0
  12. package/dist/client/assets/DocumentsView-Co9to4Zp.css +1 -0
  13. package/dist/client/assets/InsightsView-Bu9Cv8Ol.js +11 -0
  14. package/dist/client/assets/InsightsView-Egu71gmh.css +1 -0
  15. package/dist/client/assets/MemoryView-CtqgDtV9.js +2 -0
  16. package/dist/client/assets/MemoryView-DhinauGs.css +1 -0
  17. package/dist/client/assets/NodesView-BInPcedy.js +14 -0
  18. package/dist/client/assets/NodesView-DlQZHGXA.css +1 -0
  19. package/dist/client/assets/PiExtensionsManager-COxkYM2m.js +11 -0
  20. package/dist/client/assets/PiExtensionsManager-CPgmJgDk.css +1 -0
  21. package/dist/client/assets/PluginManager-CXUWZBOc.js +1 -0
  22. package/dist/client/assets/PluginManager-D64RIzmL.css +1 -0
  23. package/dist/client/assets/RoadmapsView-BOYnyMCh.css +1 -0
  24. package/dist/client/assets/RoadmapsView-BbCexaoi.js +6 -0
  25. package/dist/client/assets/SetupWizardModal-Cakxqkad.js +1 -0
  26. package/dist/client/assets/SkillsView-Cytf009Z.css +1 -0
  27. package/dist/client/assets/SkillsView-D3iqYCVf.js +1 -0
  28. package/dist/client/assets/folder-open-kO5Hsk66.js +6 -0
  29. package/dist/client/assets/index-BiSuUXCa.css +1 -0
  30. package/dist/client/assets/index-y194HxzU.js +644 -0
  31. package/dist/client/assets/upload-DHBQat92.js +6 -0
  32. package/dist/client/index.html +2 -2
  33. package/dist/client/sw.js +45 -1
  34. package/dist/client/theme-data.css +109 -0
  35. package/dist/extension.js +969 -408
  36. package/dist/pi-claude-cli/index.ts +131 -0
  37. package/dist/pi-claude-cli/package.json +39 -0
  38. package/dist/pi-claude-cli/src/__tests__/control-handler.test.ts +191 -0
  39. package/dist/pi-claude-cli/src/__tests__/event-bridge.test.ts +1244 -0
  40. package/dist/pi-claude-cli/src/__tests__/mcp-config.test.ts +272 -0
  41. package/dist/pi-claude-cli/src/__tests__/process-manager.test.ts +619 -0
  42. package/dist/pi-claude-cli/src/__tests__/prompt-builder.test.ts +1067 -0
  43. package/dist/pi-claude-cli/src/__tests__/provider.test.ts +1902 -0
  44. package/dist/pi-claude-cli/src/__tests__/stream-parser.test.ts +188 -0
  45. package/dist/pi-claude-cli/src/__tests__/thinking-config.test.ts +141 -0
  46. package/dist/pi-claude-cli/src/__tests__/tool-mapping.test.ts +252 -0
  47. package/dist/pi-claude-cli/src/control-handler.ts +68 -0
  48. package/dist/pi-claude-cli/src/event-bridge.ts +386 -0
  49. package/dist/pi-claude-cli/src/mcp-config.ts +111 -0
  50. package/dist/pi-claude-cli/src/mcp-schema-server.cjs +49 -0
  51. package/dist/pi-claude-cli/src/process-manager.ts +218 -0
  52. package/dist/pi-claude-cli/src/prompt-builder.ts +536 -0
  53. package/dist/pi-claude-cli/src/provider.ts +354 -0
  54. package/dist/pi-claude-cli/src/stream-parser.ts +37 -0
  55. package/dist/pi-claude-cli/src/thinking-config.ts +83 -0
  56. package/dist/pi-claude-cli/src/tool-mapping.ts +147 -0
  57. package/dist/pi-claude-cli/src/types.ts +87 -0
  58. package/package.json +11 -4
  59. package/skill/fusion/SKILL.md +5 -3
  60. package/skill/fusion/references/cli-commands.md +22 -22
  61. package/skill/fusion/references/extension-tools.md +3 -1
  62. package/skill/fusion/references/fusion-capabilities.md +28 -35
  63. package/skill/fusion/references/task-structure.md +4 -4
  64. package/skill/fusion/workflows/dashboard-cli.md +6 -6
  65. package/skill/fusion/workflows/specifications.md +5 -3
  66. package/skill/fusion/workflows/task-lifecycle.md +1 -1
  67. package/skill/fusion/workflows/task-management.md +3 -1
  68. package/dist/client/assets/index-Djv5vKo0.css +0 -1
  69. package/dist/client/assets/index-zfXYuUXG.js +0 -1241
@@ -0,0 +1,6 @@
1
+ import{c as a}from"./index-y194HxzU.js";/**
2
+ * @license lucide-react v1.7.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const o=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],t=a("upload",o);export{t as U};
@@ -78,11 +78,11 @@
78
78
  }
79
79
  })();
80
80
  </script>
81
- <script type="module" crossorigin src="/assets/index-zfXYuUXG.js"></script>
81
+ <script type="module" crossorigin src="/assets/index-y194HxzU.js"></script>
82
82
  <link rel="modulepreload" crossorigin href="/assets/vendor-react-K0fH_qHe.js">
83
83
  <link rel="modulepreload" crossorigin href="/assets/vendor-xterm-DzcZoU0P.js">
84
84
  <link rel="stylesheet" crossorigin href="/assets/vendor-xterm-LZoznX6r.css">
85
- <link rel="stylesheet" crossorigin href="/assets/index-Djv5vKo0.css">
85
+ <link rel="stylesheet" crossorigin href="/assets/index-BiSuUXCa.css">
86
86
  </head>
87
87
  <body>
88
88
  <div id="root"></div>
package/dist/client/sw.js CHANGED
@@ -1,4 +1,4 @@
1
- const CACHE_NAME = "fusion-cache-v1";
1
+ const CACHE_NAME = "fusion-cache-v2";
2
2
  const APP_SHELL_URLS = [
3
3
  "/",
4
4
  "/index.html",
@@ -13,6 +13,7 @@ self.addEventListener("install", (event) => {
13
13
  try {
14
14
  const cache = await caches.open(CACHE_NAME);
15
15
  await cache.addAll(APP_SHELL_URLS);
16
+ await self.skipWaiting();
16
17
  } catch (error) {
17
18
  console.warn("[sw] install cache warmup failed", error);
18
19
  }
@@ -43,7 +44,50 @@ self.addEventListener("fetch", (event) => {
43
44
  }
44
45
 
45
46
  const url = new URL(request.url);
47
+ const accept = request.headers.get("accept") ?? "";
46
48
  const isApiRequest = url.pathname.startsWith("/api/");
49
+ const isEventStreamRequest =
50
+ accept.includes("text/event-stream") ||
51
+ url.pathname === "/api/events" ||
52
+ url.pathname.startsWith("/api/events/");
53
+ const isNavigationRequest =
54
+ request.mode === "navigate" ||
55
+ request.destination === "document" ||
56
+ url.pathname === "/" ||
57
+ url.pathname === "/index.html";
58
+
59
+ // EventSource requests stay open indefinitely. Waiting on cache.put() for an
60
+ // infinite response body prevents the browser from ever receiving the stream
61
+ // and leaks the underlying connection across reloads. Let SSE bypass the
62
+ // service worker entirely so the browser talks to the network directly.
63
+ if (isEventStreamRequest) {
64
+ return;
65
+ }
66
+
67
+ // Always revalidate the HTML shell so navigation picks up the latest hashed
68
+ // asset names instead of getting stuck on a cached index.html that points at
69
+ // a stale bundle.
70
+ if (isNavigationRequest) {
71
+ event.respondWith((async () => {
72
+ try {
73
+ const networkResponse = await fetch(request);
74
+ try {
75
+ const cache = await caches.open(CACHE_NAME);
76
+ await cache.put(request, networkResponse.clone());
77
+ } catch (cacheError) {
78
+ console.warn("[sw] navigation cache put failed", cacheError);
79
+ }
80
+ return networkResponse;
81
+ } catch (networkError) {
82
+ const fallback = await caches.match(request);
83
+ if (fallback) {
84
+ return fallback;
85
+ }
86
+ throw networkError;
87
+ }
88
+ })());
89
+ return;
90
+ }
47
91
 
48
92
  if (isApiRequest) {
49
93
  event.respondWith((async () => {