@synergenius/flow-weaver-pack-weaver 0.9.59 → 0.9.77

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 (217) hide show
  1. package/dist/ai-chat-provider.d.ts +12 -0
  2. package/dist/ai-chat-provider.d.ts.map +1 -1
  3. package/dist/ai-chat-provider.js +351 -335
  4. package/dist/ai-chat-provider.js.map +1 -1
  5. package/dist/bot/agent-loop.d.ts +20 -0
  6. package/dist/bot/agent-loop.d.ts.map +1 -0
  7. package/dist/bot/agent-loop.js +331 -0
  8. package/dist/bot/agent-loop.js.map +1 -0
  9. package/dist/bot/ai-router.d.ts +19 -0
  10. package/dist/bot/ai-router.d.ts.map +1 -0
  11. package/dist/bot/ai-router.js +104 -0
  12. package/dist/bot/ai-router.js.map +1 -0
  13. package/dist/bot/assistant-tools.d.ts.map +1 -1
  14. package/dist/bot/assistant-tools.js +49 -33
  15. package/dist/bot/assistant-tools.js.map +1 -1
  16. package/dist/bot/async-mutex.d.ts +13 -0
  17. package/dist/bot/async-mutex.d.ts.map +1 -0
  18. package/dist/bot/async-mutex.js +37 -0
  19. package/dist/bot/async-mutex.js.map +1 -0
  20. package/dist/bot/bot-manager.d.ts +2 -2
  21. package/dist/bot/bot-manager.d.ts.map +1 -1
  22. package/dist/bot/bot-manager.js +3 -3
  23. package/dist/bot/bot-manager.js.map +1 -1
  24. package/dist/bot/bot-registry.js +2 -2
  25. package/dist/bot/bot-registry.js.map +1 -1
  26. package/dist/bot/conversation-store.d.ts +1 -0
  27. package/dist/bot/conversation-store.d.ts.map +1 -1
  28. package/dist/bot/conversation-store.js.map +1 -1
  29. package/dist/bot/dashboard.d.ts.map +1 -1
  30. package/dist/bot/dashboard.js +17 -8
  31. package/dist/bot/dashboard.js.map +1 -1
  32. package/dist/bot/improve-loop.js.map +1 -1
  33. package/dist/bot/index.d.ts +2 -4
  34. package/dist/bot/index.d.ts.map +1 -1
  35. package/dist/bot/index.js +1 -2
  36. package/dist/bot/index.js.map +1 -1
  37. package/dist/bot/instance-manager.d.ts +31 -0
  38. package/dist/bot/instance-manager.d.ts.map +1 -0
  39. package/dist/bot/instance-manager.js +115 -0
  40. package/dist/bot/instance-manager.js.map +1 -0
  41. package/dist/bot/orchestrator.d.ts +36 -0
  42. package/dist/bot/orchestrator.d.ts.map +1 -0
  43. package/dist/bot/orchestrator.js +176 -0
  44. package/dist/bot/orchestrator.js.map +1 -0
  45. package/dist/bot/profile-store.d.ts +36 -0
  46. package/dist/bot/profile-store.d.ts.map +1 -0
  47. package/dist/bot/profile-store.js +208 -0
  48. package/dist/bot/profile-store.js.map +1 -0
  49. package/dist/bot/profile-types.d.ts +126 -0
  50. package/dist/bot/profile-types.d.ts.map +1 -0
  51. package/dist/bot/profile-types.js +7 -0
  52. package/dist/bot/profile-types.js.map +1 -0
  53. package/dist/bot/run-store.d.ts.map +1 -1
  54. package/dist/bot/run-store.js +8 -0
  55. package/dist/bot/run-store.js.map +1 -1
  56. package/dist/bot/runner.d.ts +4 -0
  57. package/dist/bot/runner.d.ts.map +1 -1
  58. package/dist/bot/runner.js +5 -1
  59. package/dist/bot/runner.js.map +1 -1
  60. package/dist/bot/swarm-controller.d.ts +109 -0
  61. package/dist/bot/swarm-controller.d.ts.map +1 -0
  62. package/dist/bot/swarm-controller.js +640 -0
  63. package/dist/bot/swarm-controller.js.map +1 -0
  64. package/dist/bot/swarm-event-log.d.ts +28 -0
  65. package/dist/bot/swarm-event-log.d.ts.map +1 -0
  66. package/dist/bot/swarm-event-log.js +54 -0
  67. package/dist/bot/swarm-event-log.js.map +1 -0
  68. package/dist/bot/task-prompt-builder.d.ts +22 -0
  69. package/dist/bot/task-prompt-builder.d.ts.map +1 -0
  70. package/dist/bot/task-prompt-builder.js +240 -0
  71. package/dist/bot/task-prompt-builder.js.map +1 -0
  72. package/dist/bot/task-store.d.ts +21 -0
  73. package/dist/bot/task-store.d.ts.map +1 -0
  74. package/dist/bot/task-store.js +364 -0
  75. package/dist/bot/task-store.js.map +1 -0
  76. package/dist/bot/task-types.d.ts +79 -0
  77. package/dist/bot/task-types.d.ts.map +1 -0
  78. package/dist/bot/task-types.js +6 -0
  79. package/dist/bot/task-types.js.map +1 -0
  80. package/dist/bot/types.d.ts +8 -0
  81. package/dist/bot/types.d.ts.map +1 -1
  82. package/dist/cli-handlers.d.ts.map +1 -1
  83. package/dist/cli-handlers.js +79 -54
  84. package/dist/cli-handlers.js.map +1 -1
  85. package/dist/cli.d.ts +3 -0
  86. package/dist/cli.d.ts.map +1 -0
  87. package/dist/cli.js +749 -0
  88. package/dist/cli.js.map +1 -0
  89. package/dist/docs/docs/weaver-bot-usage.md +35 -18
  90. package/dist/docs/docs/weaver-config.md +20 -0
  91. package/dist/docs/docs/weaver-task-queue.md +31 -19
  92. package/dist/docs/weaver-config.md +15 -9
  93. package/dist/index.d.ts +2 -2
  94. package/dist/index.d.ts.map +1 -1
  95. package/dist/index.js +1 -1
  96. package/dist/index.js.map +1 -1
  97. package/dist/mcp-tools.d.ts +17 -0
  98. package/dist/mcp-tools.d.ts.map +1 -1
  99. package/dist/mcp-tools.js +98 -279
  100. package/dist/mcp-tools.js.map +1 -1
  101. package/dist/node-types/bot-report.d.ts.map +1 -1
  102. package/dist/node-types/bot-report.js +6 -24
  103. package/dist/node-types/bot-report.js.map +1 -1
  104. package/dist/node-types/orchestrator-dispatch.d.ts +17 -0
  105. package/dist/node-types/orchestrator-dispatch.d.ts.map +1 -0
  106. package/dist/node-types/orchestrator-dispatch.js +63 -0
  107. package/dist/node-types/orchestrator-dispatch.js.map +1 -0
  108. package/dist/node-types/orchestrator-load-state.d.ts +16 -0
  109. package/dist/node-types/orchestrator-load-state.d.ts.map +1 -0
  110. package/dist/node-types/orchestrator-load-state.js +60 -0
  111. package/dist/node-types/orchestrator-load-state.js.map +1 -0
  112. package/dist/node-types/orchestrator-route.d.ts +16 -0
  113. package/dist/node-types/orchestrator-route.d.ts.map +1 -0
  114. package/dist/node-types/orchestrator-route.js +28 -0
  115. package/dist/node-types/orchestrator-route.js.map +1 -0
  116. package/dist/node-types/receive-task.d.ts +2 -3
  117. package/dist/node-types/receive-task.d.ts.map +1 -1
  118. package/dist/node-types/receive-task.js +3 -48
  119. package/dist/node-types/receive-task.js.map +1 -1
  120. package/dist/templates/weaver-template.d.ts +11 -0
  121. package/dist/templates/weaver-template.d.ts.map +1 -0
  122. package/dist/templates/weaver-template.js +53 -0
  123. package/dist/templates/weaver-template.js.map +1 -0
  124. package/dist/ui/bot-activity.js +2 -2
  125. package/dist/ui/bot-constants.d.ts +14 -0
  126. package/dist/ui/bot-constants.d.ts.map +1 -0
  127. package/dist/ui/bot-constants.js +189 -0
  128. package/dist/ui/bot-constants.js.map +1 -0
  129. package/dist/ui/bot-panel.js +207 -245
  130. package/dist/ui/bot-slot-card.js +141 -0
  131. package/dist/ui/budget-bar.js +59 -0
  132. package/dist/ui/chat-task-result.js +178 -0
  133. package/dist/ui/decision-log.js +136 -0
  134. package/dist/ui/profile-card.js +158 -0
  135. package/dist/ui/profile-editor.js +597 -0
  136. package/dist/ui/swarm-controls.js +245 -0
  137. package/dist/ui/swarm-dashboard.js +3012 -0
  138. package/dist/ui/task-create-form.js +98 -0
  139. package/dist/ui/task-detail-view.js +1044 -0
  140. package/dist/ui/task-pool-list.js +156 -0
  141. package/dist/workflows/orchestrator.d.ts +21 -0
  142. package/dist/workflows/orchestrator.d.ts.map +1 -0
  143. package/dist/workflows/orchestrator.js +281 -0
  144. package/dist/workflows/orchestrator.js.map +1 -0
  145. package/dist/workflows/weaver-bot-session.d.ts +65 -0
  146. package/dist/workflows/weaver-bot-session.d.ts.map +1 -0
  147. package/dist/workflows/weaver-bot-session.js +68 -0
  148. package/dist/workflows/weaver-bot-session.js.map +1 -0
  149. package/dist/workflows/weaver.d.ts +24 -0
  150. package/dist/workflows/weaver.d.ts.map +1 -0
  151. package/dist/workflows/weaver.js +28 -0
  152. package/dist/workflows/weaver.js.map +1 -0
  153. package/flowweaver.manifest.json +547 -133
  154. package/package.json +1 -1
  155. package/src/ai-chat-provider.ts +378 -371
  156. package/src/bot/ai-router.ts +132 -0
  157. package/src/bot/assistant-tools.ts +47 -29
  158. package/src/bot/async-mutex.ts +37 -0
  159. package/src/bot/bot-manager.ts +3 -3
  160. package/src/bot/bot-registry.ts +2 -2
  161. package/src/bot/conversation-store.ts +2 -1
  162. package/src/bot/dashboard.ts +17 -8
  163. package/src/bot/improve-loop.ts +6 -6
  164. package/src/bot/index.ts +2 -4
  165. package/src/bot/instance-manager.ts +128 -0
  166. package/src/bot/orchestrator.ts +244 -0
  167. package/src/bot/profile-store.ts +225 -0
  168. package/src/bot/profile-types.ts +141 -0
  169. package/src/bot/run-store.ts +8 -0
  170. package/src/bot/runner.ts +9 -1
  171. package/src/bot/swarm-controller.ts +780 -0
  172. package/src/bot/swarm-event-log.ts +57 -0
  173. package/src/bot/task-prompt-builder.ts +309 -0
  174. package/src/bot/task-store.ts +407 -0
  175. package/src/bot/task-types.ts +100 -0
  176. package/src/bot/types.ts +8 -0
  177. package/src/cli-handlers.ts +78 -53
  178. package/src/docs/weaver-bot-usage.md +35 -18
  179. package/src/docs/weaver-config.md +20 -0
  180. package/src/docs/weaver-task-queue.md +31 -19
  181. package/src/index.ts +5 -4
  182. package/src/mcp-tools.ts +129 -372
  183. package/src/node-types/bot-report.ts +6 -24
  184. package/src/node-types/orchestrator-dispatch.ts +71 -0
  185. package/src/node-types/orchestrator-load-state.ts +66 -0
  186. package/src/node-types/orchestrator-route.ts +33 -0
  187. package/src/node-types/receive-task.ts +3 -57
  188. package/src/ui/bot-activity.tsx +2 -2
  189. package/src/ui/bot-constants.ts +192 -0
  190. package/src/ui/bot-panel.tsx +213 -247
  191. package/src/ui/bot-slot-card.tsx +139 -0
  192. package/src/ui/budget-bar.tsx +30 -0
  193. package/src/ui/chat-task-result.tsx +236 -0
  194. package/src/ui/decision-log.tsx +148 -0
  195. package/src/ui/profile-card.tsx +157 -0
  196. package/src/ui/profile-editor.tsx +384 -0
  197. package/src/ui/swarm-controls.tsx +260 -0
  198. package/src/ui/swarm-dashboard.tsx +647 -0
  199. package/src/ui/task-create-form.tsx +87 -0
  200. package/src/ui/task-detail-view.tsx +841 -0
  201. package/src/ui/task-pool-list.tsx +187 -0
  202. package/src/workflows/orchestrator.ts +302 -0
  203. package/dist/docs/weaver-bot-usage.md +0 -34
  204. package/dist/docs/weaver-genesis.md +0 -32
  205. package/dist/docs/weaver-task-queue.md +0 -34
  206. package/dist/ui/bot-workspace.js +0 -1015
  207. package/dist/ui/chat-bot-result.js +0 -71
  208. package/dist/ui/queue-input.js +0 -82
  209. package/dist/ui/session-bar.js +0 -174
  210. package/src/bot/error-guide.ts +0 -4
  211. package/src/bot/retry-utils.ts +0 -4
  212. package/src/bot/session-state.ts +0 -116
  213. package/src/bot/task-queue.ts +0 -262
  214. package/src/ui/bot-workspace.tsx +0 -442
  215. package/src/ui/chat-bot-result.tsx +0 -81
  216. package/src/ui/queue-input.tsx +0 -56
  217. package/src/ui/session-bar.tsx +0 -157
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Loads the current swarm state for the orchestrator to make routing decisions.
3
+ *
4
+ * @flowWeaver nodeType
5
+ * @label Load Swarm State
6
+ * @input projectDir [order:0] - Project directory path
7
+ * @output state [order:0] - JSON OrchestratorInput snapshot
8
+ * @output onSuccess [order:-2] - Loaded successfully
9
+ * @output onFailure [order:-1] [hidden] - Load failed
10
+ */
11
+ export async function orchestratorLoadState(execute, projectDir) {
12
+ if (!execute) {
13
+ return { onSuccess: true, onFailure: false, state: '{"pendingTasks":[],"profiles":[],"instances":[],"budgetRemaining":{"tokens":0,"cost":0}}' };
14
+ }
15
+ try {
16
+ const { SwarmController } = await import('../bot/swarm-controller.js');
17
+ const controller = SwarmController.getInstance(projectDir);
18
+ const profileStore = controller.getProfileStore();
19
+ const instanceManager = controller.getInstanceManager();
20
+ const swarmStatus = controller.getStatus();
21
+ // Load profiles
22
+ const profiles = profileStore.list();
23
+ // Load instances
24
+ const instances = instanceManager.listAll();
25
+ // Calculate budget remaining from swarm state
26
+ const { workspace, session } = swarmStatus.budgets;
27
+ const remainingTokens = [];
28
+ const remainingCost = [];
29
+ if (session.limitTokens > 0)
30
+ remainingTokens.push(session.limitTokens - session.usedTokens);
31
+ if (workspace.limitTokens > 0)
32
+ remainingTokens.push(workspace.limitTokens - workspace.usedTokens);
33
+ if (session.limitCost > 0)
34
+ remainingCost.push(session.limitCost - session.usedCost);
35
+ if (workspace.limitCost > 0)
36
+ remainingCost.push(workspace.limitCost - workspace.usedCost);
37
+ const budgetRemaining = {
38
+ tokens: remainingTokens.length > 0 ? Math.min(...remainingTokens) : Infinity,
39
+ cost: remainingCost.length > 0 ? Math.min(...remainingCost) : Infinity,
40
+ };
41
+ // Note: pending tasks are not loaded here — the node only loads
42
+ // profiles, instances, and budget. Task loading requires TaskStore
43
+ // access which is internal to SwarmController's dispatch loop.
44
+ // The caller should provide tasks via the workflow or the dispatch loop
45
+ // builds the full OrchestratorInput itself.
46
+ const input = {
47
+ pendingTasks: [],
48
+ profiles,
49
+ instances,
50
+ budgetRemaining,
51
+ };
52
+ return { onSuccess: true, onFailure: false, state: JSON.stringify(input) };
53
+ }
54
+ catch (err) {
55
+ const msg = err instanceof Error ? err.message : String(err);
56
+ console.error(`\x1b[31m→ Load swarm state failed: ${msg}\x1b[0m`);
57
+ return { onSuccess: false, onFailure: true, state: null };
58
+ }
59
+ }
60
+ //# sourceMappingURL=orchestrator-load-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orchestrator-load-state.js","sourceRoot":"","sources":["../../src/node-types/orchestrator-load-state.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,OAAgB,EAChB,UAAkB;IAElB,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,0FAA0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,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,QAAQ;YAC5E,IAAI,EAAE,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC,QAAQ;SACvE,CAAC;QAEF,gEAAgE;QAChE,mEAAmE;QACnE,+DAA+D;QAC/D,wEAAwE;QACxE,4CAA4C;QAC5C,MAAM,KAAK,GAAsB;YAC/B,YAAY,EAAE,EAAE;YAChB,QAAQ;YACR,SAAS;YACT,eAAe;SAChB,CAAC;QAEF,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;IAC7E,CAAC;IAAC,OAAO,GAAY,EAAE,CAAC;QACtB,MAAM,GAAG,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC7D,OAAO,CAAC,KAAK,CAAC,sCAAsC,GAAG,SAAS,CAAC,CAAC;QAClE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IAC5D,CAAC;AACH,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Routes pending tasks to appropriate bot profiles using the orchestrator brain.
3
+ *
4
+ * @flowWeaver nodeType
5
+ * @label Route Tasks
6
+ * @input state [order:0] - JSON OrchestratorInput
7
+ * @output decisions [order:0] - JSON OrchestratorOutput
8
+ * @output onSuccess [order:-2] - Routing complete
9
+ * @output onFailure [order:-1] [hidden] - Routing failed
10
+ */
11
+ export declare function orchestratorRoute(execute: boolean, state: string): Promise<{
12
+ onSuccess: boolean;
13
+ onFailure: boolean;
14
+ decisions: string | null;
15
+ }>;
16
+ //# sourceMappingURL=orchestrator-route.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orchestrator-route.d.ts","sourceRoot":"","sources":["../../src/node-types/orchestrator-route.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC;IAAE,SAAS,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC,CAgB/E"}
@@ -0,0 +1,28 @@
1
+ import { Orchestrator } from '../bot/orchestrator.js';
2
+ /**
3
+ * Routes pending tasks to appropriate bot profiles using the orchestrator brain.
4
+ *
5
+ * @flowWeaver nodeType
6
+ * @label Route Tasks
7
+ * @input state [order:0] - JSON OrchestratorInput
8
+ * @output decisions [order:0] - JSON OrchestratorOutput
9
+ * @output onSuccess [order:-2] - Routing complete
10
+ * @output onFailure [order:-1] [hidden] - Routing failed
11
+ */
12
+ export async function orchestratorRoute(execute, state) {
13
+ if (!execute) {
14
+ return { onSuccess: true, onFailure: false, decisions: '{"assignments":[],"scaleActions":[],"skippedTasks":[]}' };
15
+ }
16
+ try {
17
+ const input = JSON.parse(state);
18
+ const orchestrator = new Orchestrator();
19
+ const output = await orchestrator.route(input);
20
+ return { onSuccess: true, onFailure: false, decisions: JSON.stringify(output) };
21
+ }
22
+ catch (err) {
23
+ const msg = err instanceof Error ? err.message : String(err);
24
+ console.error(`\x1b[31m→ Route tasks failed: ${msg}\x1b[0m`);
25
+ return { onSuccess: false, onFailure: true, decisions: null };
26
+ }
27
+ }
28
+ //# sourceMappingURL=orchestrator-route.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orchestrator-route.js","sourceRoot":"","sources":["../../src/node-types/orchestrator-route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAGtD;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,OAAgB,EAChB,KAAa;IAEb,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,wDAAwD,EAAE,CAAC;IACpH,CAAC;IAED,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAsB,CAAC;QACrD,MAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;QACxC,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAE/C,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;IAClF,CAAC;IAAC,OAAO,GAAY,EAAE,CAAC;QACtB,MAAM,GAAG,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC7D,OAAO,CAAC,KAAK,CAAC,iCAAiC,GAAG,SAAS,CAAC,CAAC;QAC7D,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;IAChE,CAAC;AACH,CAAC"}
@@ -1,8 +1,7 @@
1
1
  import type { WeaverEnv } from '../bot/types.js';
2
2
  /**
3
- * Receives a task from CLI args, MCP tool call, or the task queue.
4
- * Parses the instruction into a structured BotTask. Creates the
5
- * WeaverContext that threads through the bot pipeline.
3
+ * Receives a pre-supplied task and creates the WeaverContext that
4
+ * threads through the bot pipeline.
6
5
  *
7
6
  * @flowWeaver nodeType
8
7
  * @label Receive Task
@@ -1 +1 @@
1
- {"version":3,"file":"receive-task.d.ts","sourceRoot":"","sources":["../../src/node-types/receive-task.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAiB,MAAM,iBAAiB,CAAC;AAchE;;;;;;;;;;;;GAYG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,SAAS,EACd,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC;IACT,SAAS,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC;IACvC,GAAG,EAAE,MAAM,CAAC;CACb,CAAC,CA2DD"}
1
+ {"version":3,"file":"receive-task.d.ts","sourceRoot":"","sources":["../../src/node-types/receive-task.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAiB,MAAM,iBAAiB,CAAC;AAEhE;;;;;;;;;;;GAWG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,SAAS,EACd,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC;IACT,SAAS,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC;IACvC,GAAG,EAAE,MAAM,CAAC;CACb,CAAC,CAqBD"}
@@ -1,11 +1,6 @@
1
- import * as fs from 'node:fs';
2
- import * as path from 'node:path';
3
- import * as os from 'node:os';
4
- import { withFileLock } from '../bot/file-lock.js';
5
1
  /**
6
- * Receives a task from CLI args, MCP tool call, or the task queue.
7
- * Parses the instruction into a structured BotTask. Creates the
8
- * WeaverContext that threads through the bot pipeline.
2
+ * Receives a pre-supplied task and creates the WeaverContext that
3
+ * threads through the bot pipeline.
9
4
  *
10
5
  * @flowWeaver nodeType
11
6
  * @label Receive Task
@@ -20,7 +15,6 @@ export async function weaverReceiveTask(execute, env, taskJson) {
20
15
  if (!execute) {
21
16
  return { onSuccess: true, onFailure: false, ctx: JSON.stringify(context) };
22
17
  }
23
- // If taskJson is pre-supplied, use it directly
24
18
  if (taskJson) {
25
19
  try {
26
20
  const parsed = JSON.parse(taskJson);
@@ -31,46 +25,7 @@ export async function weaverReceiveTask(execute, env, taskJson) {
31
25
  return { onSuccess: true, onFailure: false, ctx: JSON.stringify(context) };
32
26
  }
33
27
  }
34
- catch { /* fall through to queue check */ }
35
- }
36
- // Check task queue (with file locking to prevent race conditions)
37
- const queuePath = path.join(os.homedir(), '.weaver', 'task-queue.ndjson');
38
- try {
39
- const claimed = await withFileLock(queuePath, () => {
40
- if (!fs.existsSync(queuePath))
41
- return null;
42
- const content = fs.readFileSync(queuePath, 'utf-8').trim();
43
- if (!content)
44
- return null;
45
- const tasks = content.split('\n').filter(Boolean).map(l => JSON.parse(l));
46
- const pending = tasks
47
- .filter(t => t.status === 'pending')
48
- .sort((a, b) => b.priority - a.priority || a.addedAt - b.addedAt);
49
- if (pending.length === 0)
50
- return null;
51
- const task = pending[0];
52
- // Atomically mark as running inside the lock
53
- const updated = tasks.map(t => t.id === task.id ? { ...t, status: 'running' } : t);
54
- fs.writeFileSync(queuePath, updated.map(t => JSON.stringify(t)).join('\n') + '\n', 'utf-8');
55
- return task;
56
- });
57
- if (claimed) {
58
- const botTask = {
59
- instruction: claimed.instruction,
60
- mode: claimed.mode ?? 'create',
61
- targets: claimed.targets,
62
- options: claimed.options,
63
- queueId: claimed.id,
64
- };
65
- console.log(`\x1b[36m→ Task from queue [${claimed.id}]: ${claimed.instruction.slice(0, 80)}\x1b[0m`);
66
- context.taskJson = JSON.stringify(botTask);
67
- context.hasTask = true;
68
- return { onSuccess: true, onFailure: false, ctx: JSON.stringify(context) };
69
- }
70
- }
71
- catch (err) {
72
- if (process.env.WEAVER_VERBOSE)
73
- console.error('[receive-task] queue error:', err);
28
+ catch { /* invalid JSON no task */ }
74
29
  }
75
30
  console.log('\x1b[33m→ No task found\x1b[0m');
76
31
  return { onSuccess: false, onFailure: true, ctx: JSON.stringify(context) };
@@ -1 +1 @@
1
- {"version":3,"file":"receive-task.js","sourceRoot":"","sources":["../../src/node-types/receive-task.ts"],"names":[],"mappings":"AAAA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+ description: string;
5
+ category: string;
6
+ generate: (opts: {
7
+ projectDir?: string;
8
+ }) => string;
9
+ }
10
+ export declare const weaverTemplate: WorkflowTemplate;
11
+ //# sourceMappingURL=weaver-template.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"weaver-template.d.ts","sourceRoot":"","sources":["../../src/templates/weaver-template.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,CAAC,IAAI,EAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,MAAM,CAAC;CACrD;AAED,eAAO,MAAM,cAAc,EAAE,gBAmD5B,CAAC"}
@@ -0,0 +1,53 @@
1
+ export const weaverTemplate = {
2
+ id: 'weaver',
3
+ name: 'Weaver: Autonomous workflow runner',
4
+ description: 'AI-powered runner that executes any Flow Weaver workflow autonomously, with auto-detected providers and notification support',
5
+ category: 'automation',
6
+ generate: (_opts) => {
7
+ return `// Generated by flowweaver-pack-weaver. Compile before running:
8
+ // flow-weaver compile weaver.ts
9
+ // flow-weaver run weaver.ts
10
+ // Or use the CLI directly: npx weaver weaver.ts
11
+ //
12
+ // Node types are provided by @synergenius/flowweaver-pack-weaver.
13
+ // Install it: npm install @synergenius/flowweaver-pack-weaver
14
+
15
+ import { weaverLoadConfig } from '@synergenius/flowweaver-pack-weaver/node-types';
16
+ import { weaverDetectProvider } from '@synergenius/flowweaver-pack-weaver/node-types';
17
+ import { weaverResolveTarget } from '@synergenius/flowweaver-pack-weaver/node-types';
18
+ import { weaverExecuteTarget } from '@synergenius/flowweaver-pack-weaver/node-types';
19
+ import { weaverSendNotify } from '@synergenius/flowweaver-pack-weaver/node-types';
20
+ import { weaverReport } from '@synergenius/flowweaver-pack-weaver/node-types';
21
+
22
+ /**
23
+ * @flowWeaver workflow
24
+ * @node cfg weaverLoadConfig [color: "teal"] [icon: "settings"] [position: 100 0]
25
+ * @node detect weaverDetectProvider [color: "cyan"] [icon: "search"] [position: 250 0]
26
+ * @node target weaverResolveTarget [color: "blue"] [icon: "code"] [position: 400 0]
27
+ * @node exec weaverExecuteTarget [color: "purple"] [icon: "psychology"] [position: 550 0]
28
+ * @node notify weaverSendNotify [color: "yellow"] [icon: "notifications"] [position: 700 0]
29
+ * @node rep weaverReport [color: "green"] [icon: "description"] [position: 850 0]
30
+ * @path Start -> cfg -> detect -> target -> exec -> notify -> rep -> Exit
31
+ * @position Start 0 0
32
+ * @position Exit 1000 0
33
+ * @connect rep.summary -> Exit.summary
34
+ * @param execute [order:-1] - Execute
35
+ * @param params [order:0] - Params
36
+ * @returns onSuccess [order:-2] - On Success
37
+ * @returns onFailure [order:-1] - On Failure
38
+ * @returns summary [order:0] - Summary text
39
+ */
40
+ export async function weaver(
41
+ execute: boolean,
42
+ params: Record<string, never> = {},
43
+ __abortSignal__?: AbortSignal,
44
+ ): Promise<{ onSuccess: boolean; onFailure: boolean; summary: string | null }> {
45
+ // @flow-weaver-body-start
46
+ // (auto-generated by compiler)
47
+ // @flow-weaver-body-end
48
+ return { onSuccess: false, onFailure: true, summary: null };
49
+ }
50
+ `;
51
+ },
52
+ };
53
+ //# sourceMappingURL=weaver-template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"weaver-template.js","sourceRoot":"","sources":["../../src/templates/weaver-template.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,MAAM,cAAc,GAAqB;IAC9C,EAAE,EAAE,QAAQ;IACZ,IAAI,EAAE,oCAAoC;IAC1C,WAAW,EAAE,8HAA8H;IAC3I,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;QAClB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2CV,CAAC;IACA,CAAC;CACF,CAAC"}
@@ -138,7 +138,7 @@ function BotActivity({ packName, botId }) {
138
138
  const fetchAll = useCallback(async () => {
139
139
  const [hist, q, ins, st] = await Promise.allSettled([
140
140
  callTool("fw_weaver_history", { limit: 15 }),
141
- callTool("fw_weaver_queue", { action: "list" }),
141
+ callTool("fw_weaver_task_list", { status: "pending" }),
142
142
  callTool("fw_weaver_insights"),
143
143
  callTool("fw_weaver_status")
144
144
  ]);
@@ -164,7 +164,7 @@ function BotActivity({ packName, botId }) {
164
164
  }));
165
165
  }, [botId]);
166
166
  const handleRemoveQueueItem = useCallback(async (id) => {
167
- await callTool("fw_weaver_queue", { action: "remove", id });
167
+ await callTool("fw_weaver_task_cancel", { id });
168
168
  setQueue((prev) => prev.filter((q) => q.id !== id));
169
169
  }, []);
170
170
  const handlePause = useCallback(async (e) => {
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Shared constants for bot panel components: icon catalog, colors, helpers.
3
+ */
4
+ export declare const ICON_CATALOG: {
5
+ category: string;
6
+ icons: string[];
7
+ }[];
8
+ export declare const BOT_COLORS: {
9
+ label: string;
10
+ token: string;
11
+ }[];
12
+ /** Convert camelCase icon name to searchable words: "cloudSync" -> "cloud sync" */
13
+ export declare function iconToWords(name: string): string;
14
+ //# sourceMappingURL=bot-constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bot-constants.d.ts","sourceRoot":"","sources":["../../src/ui/bot-constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,eAAO,MAAM,YAAY,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,EAuK/D,CAAC;AAEF,eAAO,MAAM,UAAU;;;GAWtB,CAAC;AAEF,mFAAmF;AACnF,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEhD"}
@@ -0,0 +1,189 @@
1
+ /**
2
+ * Shared constants for bot panel components: icon catalog, colors, helpers.
3
+ */
4
+ /* ── Categorised icon catalog ──────────────────────────────────────── */
5
+ export const ICON_CATALOG = [
6
+ {
7
+ category: 'Actions',
8
+ icons: [
9
+ 'playArrow',
10
+ 'stop',
11
+ 'pause',
12
+ 'restart',
13
+ 'send',
14
+ 'check',
15
+ 'edit',
16
+ 'copy',
17
+ 'add',
18
+ 'reset',
19
+ 'resume',
20
+ ],
21
+ },
22
+ {
23
+ category: 'AI & Science',
24
+ icons: ['smartToy', 'psychology', 'autoAwesome', 'modelTraining', 'biotech', 'science', 'ai'],
25
+ },
26
+ {
27
+ category: 'Data & Storage',
28
+ icons: ['database', 'dataObject', 'dataArray', 'tableChart', 'token', 'dns', 'cloudStorage'],
29
+ },
30
+ {
31
+ category: 'Logic & Flow',
32
+ icons: [
33
+ 'altRoute',
34
+ 'callSplit',
35
+ 'callMerge',
36
+ 'rule',
37
+ 'filterAlt',
38
+ 'sort',
39
+ 'loop',
40
+ 'repeat',
41
+ 'compareArrows',
42
+ 'swapHoriz',
43
+ 'syncAlt',
44
+ 'changeCircle',
45
+ 'allInclusive',
46
+ ],
47
+ },
48
+ {
49
+ category: 'Cloud & Network',
50
+ icons: [
51
+ 'cloudSync',
52
+ 'cloudUpload',
53
+ 'cloudDownload',
54
+ 'cloudDone',
55
+ 'api',
56
+ 'webhook',
57
+ 'public',
58
+ 'router',
59
+ ],
60
+ },
61
+ {
62
+ category: 'Communication',
63
+ icons: ['email', 'chat', 'forum', 'notifications', 'campaign', 'rssFeed', 'sms'],
64
+ },
65
+ {
66
+ category: 'Security',
67
+ icons: [
68
+ 'key',
69
+ 'shield',
70
+ 'security',
71
+ 'vpnKey',
72
+ 'adminPanel',
73
+ 'policy',
74
+ 'verified',
75
+ 'lockClosed',
76
+ 'lockOpened',
77
+ ],
78
+ },
79
+ {
80
+ category: 'Time',
81
+ icons: [
82
+ 'timer',
83
+ 'alarm',
84
+ 'hourglassEmpty',
85
+ 'pendingActions',
86
+ 'update',
87
+ 'watchLater',
88
+ 'scheduled',
89
+ ],
90
+ },
91
+ {
92
+ category: 'Tasks & Workflow',
93
+ icons: [
94
+ 'task',
95
+ 'taskAlt',
96
+ 'checklist',
97
+ 'assignment',
98
+ 'publish',
99
+ 'build',
100
+ 'construction',
101
+ 'engineering',
102
+ ],
103
+ },
104
+ {
105
+ category: 'Analytics',
106
+ icons: [
107
+ 'analytics',
108
+ 'insights',
109
+ 'barChart',
110
+ 'pieChart',
111
+ 'trendingUp',
112
+ 'showChart',
113
+ 'leaderboard',
114
+ 'monitoring',
115
+ ],
116
+ },
117
+ {
118
+ category: 'Flow Nodes',
119
+ icons: [
120
+ 'schema',
121
+ 'hub',
122
+ 'deviceHub',
123
+ 'source',
124
+ 'trigger',
125
+ 'pulse',
126
+ 'step',
127
+ 'event',
128
+ 'outlinedFlow',
129
+ ],
130
+ },
131
+ {
132
+ category: 'Files & Documents',
133
+ icons: [
134
+ 'file',
135
+ 'filePresent',
136
+ 'fileCopy',
137
+ 'textSnippet',
138
+ 'attachFile',
139
+ 'uploadFile',
140
+ 'save',
141
+ 'upload',
142
+ 'download',
143
+ ],
144
+ },
145
+ {
146
+ category: 'General',
147
+ icons: [
148
+ 'rocketLaunch',
149
+ 'code',
150
+ 'terminal',
151
+ 'logs',
152
+ 'info',
153
+ 'help',
154
+ 'list',
155
+ 'category',
156
+ 'hash',
157
+ 'calendar',
158
+ 'history',
159
+ 'integration',
160
+ 'layers',
161
+ 'link',
162
+ 'search',
163
+ 'outlinedSettings',
164
+ 'outlinedBug',
165
+ 'collaboration',
166
+ 'person',
167
+ 'people',
168
+ 'backup',
169
+ 'healthAndSafety',
170
+ ],
171
+ },
172
+ ];
173
+ export const BOT_COLORS = [
174
+ { label: 'Blue', token: 'color-node-blue-icon' },
175
+ { label: 'Purple', token: 'color-node-purple-icon' },
176
+ { label: 'Cyan', token: 'color-node-cyan-icon' },
177
+ { label: 'Orange', token: 'color-node-orange-icon' },
178
+ { label: 'Pink', token: 'color-node-pink-icon' },
179
+ { label: 'Green', token: 'color-node-green-icon' },
180
+ { label: 'Brand', token: 'color-brand-main' },
181
+ { label: 'Accent', token: 'color-brand-alt' },
182
+ { label: 'Positive', token: 'color-status-positive' },
183
+ { label: 'Info', token: 'color-status-info' },
184
+ ];
185
+ /** Convert camelCase icon name to searchable words: "cloudSync" -> "cloud sync" */
186
+ export function iconToWords(name) {
187
+ return name.replace(/([A-Z])/g, ' $1').toLowerCase();
188
+ }
189
+ //# sourceMappingURL=bot-constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bot-constants.js","sourceRoot":"","sources":["../../src/ui/bot-constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,0EAA0E;AAE1E,MAAM,CAAC,MAAM,YAAY,GAA4C;IACnE;QACE,QAAQ,EAAE,SAAS;QACnB,KAAK,EAAE;YACL,WAAW;YACX,MAAM;YACN,OAAO;YACP,SAAS;YACT,MAAM;YACN,OAAO;YACP,MAAM;YACN,MAAM;YACN,KAAK;YACL,OAAO;YACP,QAAQ;SACT;KACF;IACD;QACE,QAAQ,EAAE,cAAc;QACxB,KAAK,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC;KAC9F;IACD;QACE,QAAQ,EAAE,gBAAgB;QAC1B,KAAK,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,cAAc,CAAC;KAC7F;IACD;QACE,QAAQ,EAAE,cAAc;QACxB,KAAK,EAAE;YACL,UAAU;YACV,WAAW;YACX,WAAW;YACX,MAAM;YACN,WAAW;YACX,MAAM;YACN,MAAM;YACN,QAAQ;YACR,eAAe;YACf,WAAW;YACX,SAAS;YACT,cAAc;YACd,cAAc;SACf;KACF;IACD;QACE,QAAQ,EAAE,iBAAiB;QAC3B,KAAK,EAAE;YACL,WAAW;YACX,aAAa;YACb,eAAe;YACf,WAAW;YACX,KAAK;YACL,SAAS;YACT,QAAQ;YACR,QAAQ;SACT;K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