@synergenius/flow-weaver-pack-weaver 0.9.7 → 0.9.9

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 (224) hide show
  1. package/dist/bot/agent-loop.d.ts +20 -0
  2. package/dist/bot/agent-loop.d.ts.map +1 -0
  3. package/dist/bot/agent-loop.js +331 -0
  4. package/dist/bot/agent-loop.js.map +1 -0
  5. package/dist/bot/agent-provider.d.ts.map +1 -1
  6. package/dist/bot/agent-provider.js +3 -2
  7. package/dist/bot/agent-provider.js.map +1 -1
  8. package/dist/bot/approvals.js +17 -8
  9. package/dist/bot/approvals.js.map +1 -1
  10. package/dist/bot/assistant-core.d.ts +17 -0
  11. package/dist/bot/assistant-core.d.ts.map +1 -1
  12. package/dist/bot/assistant-core.js +418 -60
  13. package/dist/bot/assistant-core.js.map +1 -1
  14. package/dist/bot/assistant-tools.d.ts +1 -1
  15. package/dist/bot/assistant-tools.d.ts.map +1 -1
  16. package/dist/bot/assistant-tools.js +283 -9
  17. package/dist/bot/assistant-tools.js.map +1 -1
  18. package/dist/bot/bot-agent-channel.d.ts.map +1 -1
  19. package/dist/bot/bot-agent-channel.js +2 -0
  20. package/dist/bot/bot-agent-channel.js.map +1 -1
  21. package/dist/bot/bot-manager.d.ts +4 -0
  22. package/dist/bot/bot-manager.d.ts.map +1 -1
  23. package/dist/bot/bot-manager.js +72 -27
  24. package/dist/bot/bot-manager.js.map +1 -1
  25. package/dist/bot/conversation-store.d.ts +6 -5
  26. package/dist/bot/conversation-store.d.ts.map +1 -1
  27. package/dist/bot/conversation-store.js +98 -42
  28. package/dist/bot/conversation-store.js.map +1 -1
  29. package/dist/bot/cost-store.d.ts +3 -0
  30. package/dist/bot/cost-store.d.ts.map +1 -1
  31. package/dist/bot/cost-store.js +21 -10
  32. package/dist/bot/cost-store.js.map +1 -1
  33. package/dist/bot/cost-tracker.d.ts.map +1 -1
  34. package/dist/bot/cost-tracker.js +14 -1
  35. package/dist/bot/cost-tracker.js.map +1 -1
  36. package/dist/bot/cron-parser.d.ts.map +1 -1
  37. package/dist/bot/cron-parser.js +2 -0
  38. package/dist/bot/cron-parser.js.map +1 -1
  39. package/dist/bot/cron-scheduler.d.ts.map +1 -1
  40. package/dist/bot/cron-scheduler.js +1 -0
  41. package/dist/bot/cron-scheduler.js.map +1 -1
  42. package/dist/bot/device-connection.d.ts +13 -0
  43. package/dist/bot/device-connection.d.ts.map +1 -0
  44. package/dist/bot/device-connection.js +102 -0
  45. package/dist/bot/device-connection.js.map +1 -0
  46. package/dist/bot/error-classifier.d.ts.map +1 -1
  47. package/dist/bot/error-classifier.js +5 -0
  48. package/dist/bot/error-classifier.js.map +1 -1
  49. package/dist/bot/file-lock.d.ts.map +1 -1
  50. package/dist/bot/file-lock.js +13 -3
  51. package/dist/bot/file-lock.js.map +1 -1
  52. package/dist/bot/file-watcher.d.ts.map +1 -1
  53. package/dist/bot/file-watcher.js +1 -0
  54. package/dist/bot/file-watcher.js.map +1 -1
  55. package/dist/bot/genesis-prompt-context.d.ts +5 -0
  56. package/dist/bot/genesis-prompt-context.d.ts.map +1 -1
  57. package/dist/bot/genesis-prompt-context.js +55 -0
  58. package/dist/bot/genesis-prompt-context.js.map +1 -1
  59. package/dist/bot/genesis-store.d.ts +4 -0
  60. package/dist/bot/genesis-store.d.ts.map +1 -1
  61. package/dist/bot/genesis-store.js +79 -12
  62. package/dist/bot/genesis-store.js.map +1 -1
  63. package/dist/bot/improve-loop.d.ts +46 -0
  64. package/dist/bot/improve-loop.d.ts.map +1 -0
  65. package/dist/bot/improve-loop.js +592 -0
  66. package/dist/bot/improve-loop.js.map +1 -0
  67. package/dist/bot/insight-engine.d.ts +12 -0
  68. package/dist/bot/insight-engine.d.ts.map +1 -0
  69. package/dist/bot/insight-engine.js +256 -0
  70. package/dist/bot/insight-engine.js.map +1 -0
  71. package/dist/bot/knowledge-store.d.ts.map +1 -1
  72. package/dist/bot/knowledge-store.js +4 -1
  73. package/dist/bot/knowledge-store.js.map +1 -1
  74. package/dist/bot/pipeline-runner.d.ts.map +1 -1
  75. package/dist/bot/pipeline-runner.js +12 -4
  76. package/dist/bot/pipeline-runner.js.map +1 -1
  77. package/dist/bot/project-model.d.ts +25 -0
  78. package/dist/bot/project-model.d.ts.map +1 -0
  79. package/dist/bot/project-model.js +372 -0
  80. package/dist/bot/project-model.js.map +1 -0
  81. package/dist/bot/response-formatter.js +2 -3
  82. package/dist/bot/response-formatter.js.map +1 -1
  83. package/dist/bot/run-store.d.ts.map +1 -1
  84. package/dist/bot/run-store.js +10 -2
  85. package/dist/bot/run-store.js.map +1 -1
  86. package/dist/bot/safe-path.d.ts +1 -1
  87. package/dist/bot/safe-path.d.ts.map +1 -1
  88. package/dist/bot/safe-path.js +20 -1
  89. package/dist/bot/safe-path.js.map +1 -1
  90. package/dist/bot/safety.d.ts +10 -2
  91. package/dist/bot/safety.d.ts.map +1 -1
  92. package/dist/bot/safety.js +45 -2
  93. package/dist/bot/safety.js.map +1 -1
  94. package/dist/bot/session-state.d.ts +4 -0
  95. package/dist/bot/session-state.d.ts.map +1 -1
  96. package/dist/bot/session-state.js +52 -9
  97. package/dist/bot/session-state.js.map +1 -1
  98. package/dist/bot/slash-commands.d.ts.map +1 -1
  99. package/dist/bot/slash-commands.js +109 -3
  100. package/dist/bot/slash-commands.js.map +1 -1
  101. package/dist/bot/steering-engine.d.ts +67 -0
  102. package/dist/bot/steering-engine.d.ts.map +1 -0
  103. package/dist/bot/steering-engine.js +198 -0
  104. package/dist/bot/steering-engine.js.map +1 -0
  105. package/dist/bot/step-executor.d.ts.map +1 -1
  106. package/dist/bot/step-executor.js +62 -25
  107. package/dist/bot/step-executor.js.map +1 -1
  108. package/dist/bot/system-prompt.d.ts.map +1 -1
  109. package/dist/bot/system-prompt.js +5 -2
  110. package/dist/bot/system-prompt.js.map +1 -1
  111. package/dist/bot/task-queue.d.ts +6 -1
  112. package/dist/bot/task-queue.d.ts.map +1 -1
  113. package/dist/bot/task-queue.js +43 -4
  114. package/dist/bot/task-queue.js.map +1 -1
  115. package/dist/bot/tool-registry.d.ts +1 -1
  116. package/dist/bot/tool-registry.d.ts.map +1 -1
  117. package/dist/bot/tool-registry.js +65 -4
  118. package/dist/bot/tool-registry.js.map +1 -1
  119. package/dist/bot/trust-calculator.d.ts +34 -0
  120. package/dist/bot/trust-calculator.d.ts.map +1 -0
  121. package/dist/bot/trust-calculator.js +67 -0
  122. package/dist/bot/trust-calculator.js.map +1 -0
  123. package/dist/bot/types.d.ts +97 -0
  124. package/dist/bot/types.d.ts.map +1 -1
  125. package/dist/bot/update-checker.d.ts +21 -0
  126. package/dist/bot/update-checker.d.ts.map +1 -0
  127. package/dist/bot/update-checker.js +129 -0
  128. package/dist/bot/update-checker.js.map +1 -0
  129. package/dist/bot/weaver-tools.d.ts.map +1 -1
  130. package/dist/bot/weaver-tools.js +11 -4
  131. package/dist/bot/weaver-tools.js.map +1 -1
  132. package/dist/cli-bridge.d.ts +2 -0
  133. package/dist/cli-bridge.d.ts.map +1 -1
  134. package/dist/cli-bridge.js +3 -1
  135. package/dist/cli-bridge.js.map +1 -1
  136. package/dist/cli-handlers.d.ts +10 -1
  137. package/dist/cli-handlers.d.ts.map +1 -1
  138. package/dist/cli-handlers.js +141 -24
  139. package/dist/cli-handlers.js.map +1 -1
  140. package/dist/cli.d.ts +3 -0
  141. package/dist/cli.d.ts.map +1 -0
  142. package/dist/cli.js +749 -0
  143. package/dist/cli.js.map +1 -0
  144. package/dist/docs/weaver-config.md +15 -9
  145. package/dist/handlers/on-execution-completed.d.ts +11 -0
  146. package/dist/handlers/on-execution-completed.d.ts.map +1 -0
  147. package/dist/handlers/on-execution-completed.js +25 -0
  148. package/dist/handlers/on-execution-completed.js.map +1 -0
  149. package/dist/mcp-tools.d.ts.map +1 -1
  150. package/dist/mcp-tools.js +33 -0
  151. package/dist/mcp-tools.js.map +1 -1
  152. package/dist/node-types/genesis-approve.d.ts.map +1 -1
  153. package/dist/node-types/genesis-approve.js +28 -3
  154. package/dist/node-types/genesis-approve.js.map +1 -1
  155. package/dist/node-types/genesis-observe.d.ts.map +1 -1
  156. package/dist/node-types/genesis-observe.js +23 -13
  157. package/dist/node-types/genesis-observe.js.map +1 -1
  158. package/dist/node-types/genesis-propose.d.ts.map +1 -1
  159. package/dist/node-types/genesis-propose.js +8 -0
  160. package/dist/node-types/genesis-propose.js.map +1 -1
  161. package/dist/node-types/genesis-update-history.d.ts.map +1 -1
  162. package/dist/node-types/genesis-update-history.js +13 -0
  163. package/dist/node-types/genesis-update-history.js.map +1 -1
  164. package/dist/templates/weaver-template.d.ts +11 -0
  165. package/dist/templates/weaver-template.d.ts.map +1 -0
  166. package/dist/templates/weaver-template.js +53 -0
  167. package/dist/templates/weaver-template.js.map +1 -0
  168. package/dist/workflows/weaver-bot-session.d.ts +65 -0
  169. package/dist/workflows/weaver-bot-session.d.ts.map +1 -0
  170. package/dist/workflows/weaver-bot-session.js +68 -0
  171. package/dist/workflows/weaver-bot-session.js.map +1 -0
  172. package/dist/workflows/weaver.d.ts +24 -0
  173. package/dist/workflows/weaver.d.ts.map +1 -0
  174. package/dist/workflows/weaver.js +28 -0
  175. package/dist/workflows/weaver.js.map +1 -0
  176. package/flowweaver.manifest.json +28 -1
  177. package/package.json +6 -3
  178. package/src/bot/agent-provider.ts +3 -2
  179. package/src/bot/approvals.ts +16 -8
  180. package/src/bot/assistant-core.ts +420 -63
  181. package/src/bot/assistant-tools.ts +291 -9
  182. package/src/bot/bot-agent-channel.ts +2 -0
  183. package/src/bot/bot-manager.ts +70 -29
  184. package/src/bot/conversation-store.ts +87 -42
  185. package/src/bot/cost-store.ts +20 -9
  186. package/src/bot/cost-tracker.ts +13 -1
  187. package/src/bot/cron-parser.ts +1 -0
  188. package/src/bot/cron-scheduler.ts +1 -0
  189. package/src/bot/device-connection.ts +102 -0
  190. package/src/bot/error-classifier.ts +5 -0
  191. package/src/bot/file-lock.ts +12 -2
  192. package/src/bot/file-watcher.ts +1 -0
  193. package/src/bot/genesis-prompt-context.ts +61 -0
  194. package/src/bot/genesis-store.ts +68 -16
  195. package/src/bot/improve-loop.ts +651 -0
  196. package/src/bot/insight-engine.ts +273 -0
  197. package/src/bot/knowledge-store.ts +4 -1
  198. package/src/bot/pipeline-runner.ts +11 -6
  199. package/src/bot/project-model.ts +404 -0
  200. package/src/bot/response-formatter.ts +2 -3
  201. package/src/bot/run-store.ts +5 -2
  202. package/src/bot/safe-path.ts +20 -1
  203. package/src/bot/safety.ts +57 -3
  204. package/src/bot/session-state.ts +47 -7
  205. package/src/bot/slash-commands.ts +111 -3
  206. package/src/bot/steering-engine.ts +233 -0
  207. package/src/bot/step-executor.ts +66 -26
  208. package/src/bot/system-prompt.ts +5 -2
  209. package/src/bot/task-queue.ts +40 -4
  210. package/src/bot/tool-registry.ts +67 -5
  211. package/src/bot/trust-calculator.ts +87 -0
  212. package/src/bot/types.ts +104 -0
  213. package/src/bot/update-checker.ts +138 -0
  214. package/src/bot/weaver-tools.ts +10 -4
  215. package/src/cli-bridge.ts +4 -1
  216. package/src/cli-handlers.ts +150 -29
  217. package/src/handlers/on-execution-completed.ts +30 -0
  218. package/src/mcp-tools.ts +38 -0
  219. package/src/node-types/genesis-approve.ts +28 -3
  220. package/src/node-types/genesis-observe.ts +23 -12
  221. package/src/node-types/genesis-propose.ts +8 -0
  222. package/src/node-types/genesis-update-history.ts +12 -0
  223. package/src/ui/evolution-panel.tsx +96 -0
  224. package/src/ui/insights-widget.tsx +77 -0
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Session mode bot. Continuously polls the task queue and processes
3
+ * tasks through the full bot pipeline.
4
+ *
5
+ * @flowWeaver workflow
6
+ *
7
+ * @node cfg weaverLoadConfig [color: "teal"] [icon: "settings"] [position: 80 200]
8
+ * @node detect weaverDetectProvider [color: "cyan"] [icon: "search"] [position: 230 200]
9
+ * @node receive weaverReceiveTask [color: "blue"] [icon: "send"] [position: 400 200]
10
+ * @node route weaverRouteTask [color: "purple"] [icon: "flow"] [position: 570 200]
11
+ * @node readWf weaverReadWorkflow [color: "cyan"] [icon: "description"] [position: 740 450]
12
+ * @node context weaverBuildContext [color: "teal"] [icon: "code"] [position: 740 200]
13
+ * @node plan weaverPlanTask [color: "blue"] [icon: "psychology"] [position: 910 200]
14
+ * @node approve weaverApprovalGate [color: "orange"] [icon: "send"] [position: 1080 200]
15
+ * @node abort weaverAbortTask [color: "red"] [icon: "code"] [position: 1250 450]
16
+ * @node execRetry weaverExecValidateRetry [color: "purple"] [icon: "code"] [position: 1250 200]
17
+ * @node gitOps weaverGitOps [color: "green"] [icon: "code"] [position: 1420 100]
18
+ * @node notify weaverSendNotify [color: "yellow"] [icon: "send"] [position: 1420 300]
19
+ * @node report weaverBotReport [color: "green"] [icon: "description"] [position: 1600 200]
20
+ *
21
+ * @path Start -> cfg -> detect -> receive -> route -> context -> plan -> approve -> execRetry -> gitOps -> report -> Exit
22
+ * @path execRetry -> notify
23
+ * @path route:fail -> readWf
24
+ * @path approve:fail -> abort
25
+ *
26
+ * @connect readWf.onSuccess -> report.execute
27
+ * @connect abort.onSuccess -> report.execute
28
+ * @connect notify.onSuccess -> report.execute
29
+ *
30
+ * @connect route.taskJson -> readWf.taskJson
31
+ * @connect route.projectDir -> readWf.projectDir
32
+ * @connect readWf.resultJson -> report.readResult
33
+ *
34
+ * @connect context.contextBundle -> plan.contextBundle
35
+ *
36
+ * @connect approve.rejectionReason -> abort.rejectionReason
37
+ * @connect approve.taskJson -> abort.taskJson
38
+ * @connect approve.projectDir -> abort.projectDir
39
+ * @connect abort.resultJson -> report.abortResult
40
+ *
41
+ * @connect execRetry.resultJson -> notify.resultJson
42
+ * @connect execRetry.projectDir -> notify.targetPath
43
+ *
44
+ * @connect execRetry.resultJson -> report.mainResult
45
+ * @connect execRetry.filesModified -> report.filesModified
46
+ * @connect gitOps.gitResultJson -> report.gitResultJson
47
+ *
48
+ * @connect report.summary -> Exit.summary
49
+ *
50
+ * @position Start 0 200
51
+ * @position Exit 1750 200
52
+ *
53
+ * @param execute [order:-1] - Execute
54
+ * @param taskJson [order:0] [optional] - Task instruction (JSON)
55
+ * @param projectDir [order:1] [optional] - Project directory
56
+ * @returns onSuccess [order:-2] - On Success
57
+ * @returns onFailure [order:-1] - On Failure
58
+ * @returns summary [order:0] - Summary text
59
+ */
60
+ export declare function weaverBotSession(execute: boolean, taskJson?: string, projectDir?: string, __abortSignal__?: AbortSignal): Promise<{
61
+ onSuccess: boolean;
62
+ onFailure: boolean;
63
+ summary: string | null;
64
+ }>;
65
+ //# sourceMappingURL=weaver-bot-session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"weaver-bot-session.d.ts","sourceRoot":"","sources":["../../src/workflows/weaver-bot-session.ts"],"names":[],"mappings":"AAiBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,OAAO,EAChB,QAAQ,CAAC,EAAE,MAAM,EACjB,UAAU,CAAC,EAAE,MAAM,EACnB,eAAe,CAAC,EAAE,WAAW,GAC5B,OAAO,CAAC;IAAE,SAAS,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC,CAK7E"}
@@ -0,0 +1,68 @@
1
+ // Managed weaver bot session workflow - continuously processes task queue.
2
+ // Run `weaver eject` to customize.
3
+ /**
4
+ * Session mode bot. Continuously polls the task queue and processes
5
+ * tasks through the full bot pipeline.
6
+ *
7
+ * @flowWeaver workflow
8
+ *
9
+ * @node cfg weaverLoadConfig [color: "teal"] [icon: "settings"] [position: 80 200]
10
+ * @node detect weaverDetectProvider [color: "cyan"] [icon: "search"] [position: 230 200]
11
+ * @node receive weaverReceiveTask [color: "blue"] [icon: "send"] [position: 400 200]
12
+ * @node route weaverRouteTask [color: "purple"] [icon: "flow"] [position: 570 200]
13
+ * @node readWf weaverReadWorkflow [color: "cyan"] [icon: "description"] [position: 740 450]
14
+ * @node context weaverBuildContext [color: "teal"] [icon: "code"] [position: 740 200]
15
+ * @node plan weaverPlanTask [color: "blue"] [icon: "psychology"] [position: 910 200]
16
+ * @node approve weaverApprovalGate [color: "orange"] [icon: "send"] [position: 1080 200]
17
+ * @node abort weaverAbortTask [color: "red"] [icon: "code"] [position: 1250 450]
18
+ * @node execRetry weaverExecValidateRetry [color: "purple"] [icon: "code"] [position: 1250 200]
19
+ * @node gitOps weaverGitOps [color: "green"] [icon: "code"] [position: 1420 100]
20
+ * @node notify weaverSendNotify [color: "yellow"] [icon: "send"] [position: 1420 300]
21
+ * @node report weaverBotReport [color: "green"] [icon: "description"] [position: 1600 200]
22
+ *
23
+ * @path Start -> cfg -> detect -> receive -> route -> context -> plan -> approve -> execRetry -> gitOps -> report -> Exit
24
+ * @path execRetry -> notify
25
+ * @path route:fail -> readWf
26
+ * @path approve:fail -> abort
27
+ *
28
+ * @connect readWf.onSuccess -> report.execute
29
+ * @connect abort.onSuccess -> report.execute
30
+ * @connect notify.onSuccess -> report.execute
31
+ *
32
+ * @connect route.taskJson -> readWf.taskJson
33
+ * @connect route.projectDir -> readWf.projectDir
34
+ * @connect readWf.resultJson -> report.readResult
35
+ *
36
+ * @connect context.contextBundle -> plan.contextBundle
37
+ *
38
+ * @connect approve.rejectionReason -> abort.rejectionReason
39
+ * @connect approve.taskJson -> abort.taskJson
40
+ * @connect approve.projectDir -> abort.projectDir
41
+ * @connect abort.resultJson -> report.abortResult
42
+ *
43
+ * @connect execRetry.resultJson -> notify.resultJson
44
+ * @connect execRetry.projectDir -> notify.targetPath
45
+ *
46
+ * @connect execRetry.resultJson -> report.mainResult
47
+ * @connect execRetry.filesModified -> report.filesModified
48
+ * @connect gitOps.gitResultJson -> report.gitResultJson
49
+ *
50
+ * @connect report.summary -> Exit.summary
51
+ *
52
+ * @position Start 0 200
53
+ * @position Exit 1750 200
54
+ *
55
+ * @param execute [order:-1] - Execute
56
+ * @param taskJson [order:0] [optional] - Task instruction (JSON)
57
+ * @param projectDir [order:1] [optional] - Project directory
58
+ * @returns onSuccess [order:-2] - On Success
59
+ * @returns onFailure [order:-1] - On Failure
60
+ * @returns summary [order:0] - Summary text
61
+ */
62
+ export async function weaverBotSession(execute, taskJson, projectDir, __abortSignal__) {
63
+ // @flow-weaver-body-start
64
+ // (auto-generated by compiler)
65
+ // @flow-weaver-body-end
66
+ return { onSuccess: false, onFailure: true, summary: null };
67
+ }
68
+ //# sourceMappingURL=weaver-bot-session.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"weaver-bot-session.js","sourceRoot":"","sources":["../../src/workflows/weaver-bot-session.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,mCAAmC;AAgBnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,OAAgB,EAChB,QAAiB,EACjB,UAAmB,EACnB,eAA6B;IAE7B,0BAA0B;IAC1B,+BAA+B;IAC/B,wBAAwB;IACxB,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAC9D,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @flowWeaver workflow
3
+ * @node cfg weaverLoadConfig [color: "teal"] [icon: "settings"] [position: 200 0]
4
+ * @node detect weaverDetectProvider [color: "cyan"] [icon: "search"] [position: 400 0]
5
+ * @node target weaverResolveTarget [color: "blue"] [icon: "code"] [position: 600 0]
6
+ * @node exec weaverExecuteTarget [color: "purple"] [icon: "psychology"] [position: 800 0]
7
+ * @node notify weaverSendNotify [color: "yellow"] [icon: "notifications"] [position: 1000 0]
8
+ * @node rep weaverReport [color: "green"] [icon: "description"] [position: 1200 0]
9
+ * @path Start -> cfg -> detect -> target -> exec -> notify -> rep -> Exit
10
+ * @position Start 0 0
11
+ * @position Exit 1400 0
12
+ * @connect rep.summary -> Exit.summary
13
+ * @param execute [order:-1] - Execute
14
+ * @param params [order:0] [hidden] - Params
15
+ * @returns onSuccess [order:-2] - On Success
16
+ * @returns onFailure [order:-1] [hidden] - On Failure
17
+ * @returns summary [order:0] - Summary text
18
+ */
19
+ export declare function weaver(execute: boolean, params?: Record<string, never>, __abortSignal__?: AbortSignal): Promise<{
20
+ onSuccess: boolean;
21
+ onFailure: boolean;
22
+ summary: string | null;
23
+ }>;
24
+ //# sourceMappingURL=weaver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"weaver.d.ts","sourceRoot":"","sources":["../../src/workflows/weaver.ts"],"names":[],"mappings":"AAWA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,MAAM,CAC1B,OAAO,EAAE,OAAO,EAChB,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAM,EAClC,eAAe,CAAC,EAAE,WAAW,GAC5B,OAAO,CAAC;IAAE,SAAS,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC,CAK7E"}
@@ -0,0 +1,28 @@
1
+ // Managed weaver workflow - shipped with the pack.
2
+ // Users on managed mode use this automatically.
3
+ // Run `weaver eject` to customize.
4
+ /**
5
+ * @flowWeaver workflow
6
+ * @node cfg weaverLoadConfig [color: "teal"] [icon: "settings"] [position: 200 0]
7
+ * @node detect weaverDetectProvider [color: "cyan"] [icon: "search"] [position: 400 0]
8
+ * @node target weaverResolveTarget [color: "blue"] [icon: "code"] [position: 600 0]
9
+ * @node exec weaverExecuteTarget [color: "purple"] [icon: "psychology"] [position: 800 0]
10
+ * @node notify weaverSendNotify [color: "yellow"] [icon: "notifications"] [position: 1000 0]
11
+ * @node rep weaverReport [color: "green"] [icon: "description"] [position: 1200 0]
12
+ * @path Start -> cfg -> detect -> target -> exec -> notify -> rep -> Exit
13
+ * @position Start 0 0
14
+ * @position Exit 1400 0
15
+ * @connect rep.summary -> Exit.summary
16
+ * @param execute [order:-1] - Execute
17
+ * @param params [order:0] [hidden] - Params
18
+ * @returns onSuccess [order:-2] - On Success
19
+ * @returns onFailure [order:-1] [hidden] - On Failure
20
+ * @returns summary [order:0] - Summary text
21
+ */
22
+ export async function weaver(execute, params = {}, __abortSignal__) {
23
+ // @flow-weaver-body-start
24
+ // (auto-generated by compiler)
25
+ // @flow-weaver-body-end
26
+ return { onSuccess: false, onFailure: true, summary: null };
27
+ }
28
+ //# sourceMappingURL=weaver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"weaver.js","sourceRoot":"","sources":["../../src/workflows/weaver.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,gDAAgD;AAChD,mCAAmC;AASnC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,KAAK,UAAU,MAAM,CAC1B,OAAgB,EAChB,SAAgC,EAAE,EAClC,eAA6B;IAE7B,0BAA0B;IAC1B,+BAA+B;IAC/B,wBAAwB;IACxB,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAC9D,CAAC"}
@@ -3,7 +3,7 @@
3
3
  "name": "@synergenius/flow-weaver-pack-weaver",
4
4
  "version": "0.9.7",
5
5
  "description": "AI bot for Flow Weaver. Execute tasks, run workflows, evolve autonomously.",
6
- "engineVersion": ">=0.19.4",
6
+ "engineVersion": ">=0.22.10",
7
7
  "categories": [
8
8
  "automation",
9
9
  "ai"
@@ -946,6 +946,10 @@
946
946
  "name": "doctor",
947
947
  "description": "Validate setup and check connectivity"
948
948
  },
949
+ {
950
+ "name": "improve",
951
+ "description": "Autonomous codebase improvement — finds issues, fixes with tests, commits or rolls back"
952
+ },
949
953
  {
950
954
  "name": "status",
951
955
  "description": "Get bot session status"
@@ -992,6 +996,10 @@
992
996
  {
993
997
  "name": "fw_weaver_genesis",
994
998
  "description": "Run bot self-evolution cycle on a target workflow"
999
+ },
1000
+ {
1001
+ "name": "fw_weaver_insights",
1002
+ "description": "Get project health, insights, trust level, and cost summary"
995
1003
  }
996
1004
  ],
997
1005
  "eventSubscriptions": [
@@ -1021,6 +1029,11 @@
1021
1029
  "capabilities": [
1022
1030
  "events:emit"
1023
1031
  ]
1032
+ },
1033
+ {
1034
+ "event": "execution.completed",
1035
+ "handler": "dist/handlers/on-execution-completed.js",
1036
+ "functionName": "onExecutionCompleted"
1024
1037
  }
1025
1038
  ],
1026
1039
  "webhooks": [
@@ -1073,6 +1086,20 @@
1073
1086
  "name": "Weaver Report View",
1074
1087
  "component": "dist/ui/report-renderer.js",
1075
1088
  "mimeType": "application/x-weaver-report"
1089
+ },
1090
+ {
1091
+ "type": "dashboard-widget",
1092
+ "id": "weaver-insights",
1093
+ "name": "Project Insights",
1094
+ "component": "dist/ui/insights-widget.js",
1095
+ "area": "dashboard",
1096
+ "size": "large"
1097
+ },
1098
+ {
1099
+ "type": "panel",
1100
+ "id": "weaver-evolution",
1101
+ "name": "Evolution History",
1102
+ "component": "dist/ui/evolution-panel.js"
1076
1103
  }
1077
1104
  ],
1078
1105
  "sandboxCapabilities": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synergenius/flow-weaver-pack-weaver",
3
- "version": "0.9.7",
3
+ "version": "0.9.9",
4
4
  "description": "AI bot for Flow Weaver. Execute tasks, run workflows, evolve autonomously.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "peerDependencies": {
40
40
  "@anthropic-ai/sdk": ">=0.30.0",
41
- "@synergenius/flow-weaver": ">=0.21.0",
41
+ "@synergenius/flow-weaver": ">=0.22.10",
42
42
  "zod": ">=3.22.0"
43
43
  },
44
44
  "peerDependenciesMeta": {
@@ -67,7 +67,7 @@
67
67
  "dev:install": "npm run dev && node -e \"const p=process.argv[1]; if(!p){console.error('Usage: npm run dev:install -- /path/to/project');process.exit(1)} require('child_process').execSync('npm install --no-save /tmp/synergenius-flow-weaver-pack-weaver-'+require('./package.json').version+'.tgz',{cwd:p,stdio:'inherit'}); require('child_process').execSync('find '+p+' -name fw-exec-\\* -type f -delete',{stdio:'pipe'}); console.log('✓ Installed in '+p+' (cache cleaned)')\" --"
68
68
  },
69
69
  "devDependencies": {
70
- "@synergenius/flow-weaver": "^0.22.10",
70
+ "@synergenius/flow-weaver": "^0.23.1",
71
71
  "@types/node": "^25.3.5",
72
72
  "tsx": "^4.0.0",
73
73
  "typescript": "^5.0.0",
@@ -77,5 +77,8 @@
77
77
  "repository": {
78
78
  "type": "git",
79
79
  "url": "https://github.com/synergenius-fw/flow-weaver-pack-weaver"
80
+ },
81
+ "dependencies": {
82
+ "@synergenius/flow-weaver-pack-weaver": "^0.9.8"
80
83
  }
81
84
  }
@@ -53,8 +53,9 @@ export async function createProvider(
53
53
  maxTokens: config.maxTokens,
54
54
  options: config.options,
55
55
  });
56
- } catch {
57
- // Try next candidate
56
+ } catch (err) {
57
+ const msg = err instanceof Error ? err.message : String(err);
58
+ console.warn(`Failed to load provider candidate "${candidate}": ${msg}`);
58
59
  }
59
60
  }
60
61
 
@@ -213,7 +213,9 @@ class WebhookApproval implements ApprovalHandler {
213
213
  approved: body.approved ?? true,
214
214
  reason: body.reason ?? (body.approved ? 'approved via webhook' : 'rejected via webhook'),
215
215
  };
216
- } catch {
216
+ } catch (pollErr: unknown) {
217
+ const pollMsg = pollErr instanceof Error ? pollErr.message : String(pollErr);
218
+ console.warn(`[weaver] Webhook poll error: ${pollMsg}, will retry`);
217
219
  continue;
218
220
  }
219
221
  }
@@ -260,13 +262,19 @@ class LazyWebApproval implements ApprovalHandler {
260
262
  event: NotificationEvent,
261
263
  ): Promise<ApprovalResult> {
262
264
  if (!this.inner) {
263
- const { WebApprovalHandler } = await import('./web-approval.js');
264
- this.inner = new WebApprovalHandler({
265
- timeoutSeconds: this.options.timeoutSeconds,
266
- open: this.options.webOpen ?? true,
267
- notifier: this.options.notifier,
268
- dashboardServer: this.options.dashboardServer,
269
- });
265
+ try {
266
+ const { WebApprovalHandler } = await import('./web-approval.js');
267
+ this.inner = new WebApprovalHandler({
268
+ timeoutSeconds: this.options.timeoutSeconds,
269
+ open: this.options.webOpen ?? true,
270
+ notifier: this.options.notifier,
271
+ dashboardServer: this.options.dashboardServer,
272
+ });
273
+ } catch (importErr: unknown) {
274
+ const msg = importErr instanceof Error ? importErr.message : String(importErr);
275
+ console.warn(`[weaver] Failed to load web-approval module: ${msg}`);
276
+ throw new Error(`Web approval unavailable: ${msg}`);
277
+ }
270
278
  }
271
279
  return this.inner.handle(request, event);
272
280
  }