@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,156 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/ui/task-pool-list.tsx
21
+ var task_pool_list_exports = {};
22
+ __export(task_pool_list_exports, {
23
+ TaskPoolList: () => TaskPoolList,
24
+ default: () => task_pool_list_default
25
+ });
26
+ module.exports = __toCommonJS(task_pool_list_exports);
27
+ var React = require("react");
28
+ var { useState } = React;
29
+ var { Flex, Typography, Icon, StatusIcon, Tag, ScrollArea, Badge, EmptyState } = require("@fw/plugin-ui-kit");
30
+ var statusToIcon = {
31
+ "pending": "pending",
32
+ "in-progress": "running",
33
+ "done": "completed",
34
+ "failed": "failed",
35
+ "blocked": "pending",
36
+ "cancelled": "failed"
37
+ };
38
+ var rowBaseStyle = {
39
+ padding: "8px 12px",
40
+ cursor: "pointer",
41
+ borderBottom: "1px solid var(--color-border-default)"
42
+ };
43
+ var indentedRowStyle = {
44
+ ...rowBaseStyle,
45
+ paddingLeft: "32px"
46
+ };
47
+ function sortTasks(tasks) {
48
+ return [...tasks].sort((a, b) => {
49
+ if (b.priority !== a.priority) return b.priority - a.priority;
50
+ return a.createdAt.localeCompare(b.createdAt);
51
+ });
52
+ }
53
+ function buildHierarchy(tasks) {
54
+ const sorted = sortTasks(tasks);
55
+ const topLevel = sorted.filter((t) => !t.parentId);
56
+ const subtasksByParent = /* @__PURE__ */ new Map();
57
+ for (const t of sorted) {
58
+ if (t.parentId) {
59
+ const existing = subtasksByParent.get(t.parentId) || [];
60
+ existing.push(t);
61
+ subtasksByParent.set(t.parentId, existing);
62
+ }
63
+ }
64
+ const result = [];
65
+ for (const parent of topLevel) {
66
+ result.push({ task: parent, indent: false });
67
+ const children = subtasksByParent.get(parent.id);
68
+ if (children) {
69
+ for (const child of children) {
70
+ result.push({ task: child, indent: true });
71
+ }
72
+ }
73
+ }
74
+ const topLevelIds = new Set(topLevel.map((t) => t.id));
75
+ for (const t of sorted) {
76
+ if (t.parentId && !topLevelIds.has(t.parentId)) {
77
+ result.push({ task: t, indent: false });
78
+ }
79
+ }
80
+ return result;
81
+ }
82
+ function TaskRowItem({ task, indent, onClick }) {
83
+ const [hovered, setHovered] = useState(false);
84
+ const style = {
85
+ ...indent ? indentedRowStyle : rowBaseStyle,
86
+ ...hovered ? { backgroundColor: "var(--color-surface-elevated)" } : void 0
87
+ };
88
+ return React.createElement(
89
+ Flex,
90
+ {
91
+ variant: "row-center-start-nowrap-8",
92
+ style,
93
+ onClick,
94
+ onMouseEnter: () => setHovered(true),
95
+ onMouseLeave: () => setHovered(false)
96
+ },
97
+ // Status icon
98
+ React.createElement(StatusIcon, {
99
+ status: statusToIcon[task.status] || "pending",
100
+ size: "sm"
101
+ }),
102
+ // Title
103
+ React.createElement(
104
+ Flex,
105
+ {
106
+ variant: "row-center-start-nowrap-0",
107
+ style: { flex: 1, minWidth: 0 }
108
+ },
109
+ React.createElement(Typography, {
110
+ variant: "caption-regular",
111
+ color: task.status === "cancelled" ? "color-text-subtle" : "color-text-high",
112
+ truncate: true,
113
+ style: task.status === "cancelled" ? { textDecoration: "line-through", opacity: 0.6 } : void 0
114
+ }, task.title)
115
+ ),
116
+ // Assigned profile as Tag
117
+ task.assignedProfile && React.createElement(Tag, {
118
+ size: "small",
119
+ color: "info"
120
+ }, task.assignedProfile),
121
+ // Priority badge (only if > 0)
122
+ task.priority > 0 && React.createElement(Badge, {
123
+ variant: task.priority >= 3 ? "warning" : "info"
124
+ }, `P${task.priority}`)
125
+ );
126
+ }
127
+ function TaskPoolList({ tasks, onTaskClick }) {
128
+ if (!tasks || tasks.length === 0) {
129
+ return React.createElement(EmptyState, {
130
+ icon: "inbox",
131
+ message: "No tasks in the pool."
132
+ });
133
+ }
134
+ const rows = buildHierarchy(tasks);
135
+ return React.createElement(
136
+ Flex,
137
+ {
138
+ variant: "column-stretch-start-nowrap-0",
139
+ style: { height: "100%", overflow: "hidden" }
140
+ },
141
+ React.createElement(
142
+ ScrollArea,
143
+ { style: { flex: 1 } },
144
+ rows.map(
145
+ ({ task, indent }) => React.createElement(TaskRowItem, {
146
+ key: task.id,
147
+ task,
148
+ indent,
149
+ onClick: () => onTaskClick(task.id)
150
+ })
151
+ )
152
+ )
153
+ );
154
+ }
155
+ var task_pool_list_default = TaskPoolList;
156
+ module.exports = TaskPoolList;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @flowWeaver workflow
3
+ * @node load orchestratorLoadState [position: 200 300]
4
+ * @node route orchestratorRoute [position: 450 300]
5
+ * @node dispatch orchestratorDispatch [position: 700 300]
6
+ * @path Start -> load -> route -> dispatch -> Exit
7
+ * @position Start 0 0
8
+ * @position Exit 1080 0
9
+ * @connect dispatch.results -> Exit.results
10
+ * @param execute [order:-1] - Execute
11
+ * @param projectDir [order:0] - ProjectDir
12
+ * @returns onSuccess [order:-1] - On Success
13
+ * @returns results [order:0] - Results
14
+ */
15
+ export declare function orchestratorWorkflow(execute: boolean, params: {
16
+ projectDir: string;
17
+ }, __abortSignal__?: AbortSignal): Promise<{
18
+ onSuccess: boolean;
19
+ results: string | null;
20
+ }>;
21
+ //# sourceMappingURL=orchestrator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../../src/workflows/orchestrator.ts"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;GAaG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,EAC9B,eAAe,CAAC,EAAE,WAAW,GAC5B,OAAO,CAAC;IAAE,SAAS,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC,CA6QzD"}
@@ -0,0 +1,281 @@
1
+ import { orchestratorLoadState } from '../node-types/orchestrator-load-state.js';
2
+ import { orchestratorRoute } from '../node-types/orchestrator-route.js';
3
+ import { orchestratorDispatch } from '../node-types/orchestrator-dispatch.js';
4
+ // @flow-weaver-runtime-start
5
+ // ============================================================================
6
+ // DO NOT EDIT - This section is auto-generated by Flow Weaver
7
+ // ============================================================================
8
+ import { GeneratedExecutionContext, CancellationError } from '@synergenius/flow-weaver/runtime';
9
+ // @flow-weaver-runtime-end
10
+ /**
11
+ * @flowWeaver workflow
12
+ * @node load orchestratorLoadState [position: 200 300]
13
+ * @node route orchestratorRoute [position: 450 300]
14
+ * @node dispatch orchestratorDispatch [position: 700 300]
15
+ * @path Start -> load -> route -> dispatch -> Exit
16
+ * @position Start 0 0
17
+ * @position Exit 1080 0
18
+ * @connect dispatch.results -> Exit.results
19
+ * @param execute [order:-1] - Execute
20
+ * @param projectDir [order:0] - ProjectDir
21
+ * @returns onSuccess [order:-1] - On Success
22
+ * @returns results [order:0] - Results
23
+ */
24
+ export async function orchestratorWorkflow(execute, params, __abortSignal__) {
25
+ // @flow-weaver-body-start
26
+ // ============================================================================
27
+ // DO NOT EDIT - This section is auto-generated by Flow Weaver
28
+ // Edit the @flowWeaver annotations above to modify workflow behavior
29
+ // ============================================================================
30
+ const __effectiveDebugger__ = typeof __flowWeaverDebugger__ !== 'undefined' ? __flowWeaverDebugger__ : undefined;
31
+ // Recursion depth protection
32
+ const __rd__ = params.__rd__ ?? 0;
33
+ if (__rd__ >= 1000) {
34
+ throw new Error('Max recursion depth exceeded (1000) in workflow "orchestratorWorkflow"');
35
+ }
36
+ const ctx = new GeneratedExecutionContext(true, __effectiveDebugger__, __abortSignal__);
37
+ // Debug controller for step-through debugging and checkpoint/resume
38
+ const __ctrl__ = (typeof globalThis !== 'undefined' && globalThis.__fw_debug_controller__
39
+ ? globalThis.__fw_debug_controller__
40
+ : { beforeNode: () => true, afterNode: () => { } });
41
+ const startIdx = ctx.addExecution('Start');
42
+ await ctx.setVariable({ id: 'Start', portName: 'execute', executionIndex: startIdx, nodeTypeName: 'Start' }, execute);
43
+ await ctx.setVariable({ id: 'Start', portName: 'projectDir', executionIndex: startIdx, nodeTypeName: 'Start' }, params.projectDir);
44
+ await ctx.sendStatusChangedEvent({
45
+ nodeTypeName: 'Start',
46
+ id: 'Start',
47
+ executionIndex: startIdx,
48
+ status: 'SUCCEEDED',
49
+ });
50
+ let loadIdx;
51
+ let routeIdx;
52
+ let dispatchIdx;
53
+ let load_success = false;
54
+ let route_success = false;
55
+ if (await __ctrl__.beforeNode('load', ctx)) {
56
+ // ── load (orchestratorLoadState) ──
57
+ ctx.checkAborted('load');
58
+ loadIdx = ctx.addExecution('load');
59
+ if (typeof globalThis !== 'undefined')
60
+ globalThis.__fw_current_node_id__ = 'load';
61
+ await ctx.sendStatusChangedEvent({
62
+ nodeTypeName: 'orchestratorLoadState',
63
+ id: 'load',
64
+ executionIndex: loadIdx,
65
+ status: 'RUNNING',
66
+ });
67
+ load_success = false;
68
+ try {
69
+ const load_execute = await ctx.getVariable({ id: 'Start', portName: 'execute', executionIndex: startIdx });
70
+ await ctx.setVariable({ id: 'load', portName: 'execute', executionIndex: loadIdx, nodeTypeName: 'orchestratorLoadState' }, load_execute);
71
+ const load_projectDir = await ctx.getVariable({ id: 'Start', portName: 'projectDir', executionIndex: startIdx });
72
+ await ctx.setVariable({ id: 'load', portName: 'projectDir', executionIndex: loadIdx, nodeTypeName: 'orchestratorLoadState' }, load_projectDir);
73
+ const loadResult = await orchestratorLoadState(load_execute, load_projectDir);
74
+ await ctx.setVariable({ id: 'load', portName: 'state', executionIndex: loadIdx, nodeTypeName: 'orchestratorLoadState' }, loadResult.state);
75
+ await ctx.setVariable({ id: 'load', portName: 'onSuccess', executionIndex: loadIdx, nodeTypeName: 'orchestratorLoadState' }, loadResult.onSuccess);
76
+ await ctx.setVariable({ id: 'load', portName: 'onFailure', executionIndex: loadIdx, nodeTypeName: 'orchestratorLoadState' }, loadResult.onFailure);
77
+ await ctx.sendStatusChangedEvent({
78
+ nodeTypeName: 'orchestratorLoadState',
79
+ id: 'load',
80
+ executionIndex: loadIdx,
81
+ status: 'SUCCEEDED',
82
+ });
83
+ await __ctrl__.afterNode('load', ctx);
84
+ load_success = loadResult.onSuccess;
85
+ }
86
+ catch (error) {
87
+ const isCancellation = CancellationError.isCancellationError(error);
88
+ await ctx.sendStatusChangedEvent({
89
+ nodeTypeName: 'orchestratorLoadState',
90
+ id: 'load',
91
+ executionIndex: loadIdx,
92
+ status: isCancellation ? 'CANCELLED' : 'FAILED',
93
+ });
94
+ if (!isCancellation) {
95
+ ctx.sendLogErrorEvent({
96
+ nodeTypeName: 'orchestratorLoadState',
97
+ id: 'load',
98
+ executionIndex: loadIdx,
99
+ error: error instanceof Error ? error.message : String(error),
100
+ });
101
+ await ctx.setVariable({ id: 'load', portName: 'onSuccess', executionIndex: loadIdx, nodeTypeName: 'orchestratorLoadState' }, false);
102
+ await ctx.setVariable({ id: 'load', portName: 'onFailure', executionIndex: loadIdx, nodeTypeName: 'orchestratorLoadState' }, true);
103
+ load_success = false;
104
+ }
105
+ throw error;
106
+ }
107
+ }
108
+ else {
109
+ loadIdx = ctx.addExecution('load');
110
+ load_success = true;
111
+ }
112
+ if (load_success) {
113
+ if (await __ctrl__.beforeNode('route', ctx)) {
114
+ // ── route (orchestratorRoute) ──
115
+ ctx.checkAborted('route');
116
+ routeIdx = ctx.addExecution('route');
117
+ if (typeof globalThis !== 'undefined')
118
+ globalThis.__fw_current_node_id__ = 'route';
119
+ await ctx.sendStatusChangedEvent({
120
+ nodeTypeName: 'orchestratorRoute',
121
+ id: 'route',
122
+ executionIndex: routeIdx,
123
+ status: 'RUNNING',
124
+ });
125
+ route_success = false;
126
+ try {
127
+ const route_execute = loadIdx !== undefined ? await ctx.getVariable({ id: 'load', portName: 'onSuccess', executionIndex: loadIdx }) : false;
128
+ await ctx.setVariable({ id: 'route', portName: 'execute', executionIndex: routeIdx, nodeTypeName: 'orchestratorRoute' }, route_execute);
129
+ const route_state = await ctx.getVariable({ id: 'load', portName: 'state', executionIndex: loadIdx });
130
+ await ctx.setVariable({ id: 'route', portName: 'state', executionIndex: routeIdx, nodeTypeName: 'orchestratorRoute' }, route_state);
131
+ const routeResult = await orchestratorRoute(route_execute, route_state);
132
+ await ctx.setVariable({ id: 'route', portName: 'decisions', executionIndex: routeIdx, nodeTypeName: 'orchestratorRoute' }, routeResult.decisions);
133
+ await ctx.setVariable({ id: 'route', portName: 'onSuccess', executionIndex: routeIdx, nodeTypeName: 'orchestratorRoute' }, routeResult.onSuccess);
134
+ await ctx.setVariable({ id: 'route', portName: 'onFailure', executionIndex: routeIdx, nodeTypeName: 'orchestratorRoute' }, routeResult.onFailure);
135
+ await ctx.sendStatusChangedEvent({
136
+ nodeTypeName: 'orchestratorRoute',
137
+ id: 'route',
138
+ executionIndex: routeIdx,
139
+ status: 'SUCCEEDED',
140
+ });
141
+ await __ctrl__.afterNode('route', ctx);
142
+ route_success = routeResult.onSuccess;
143
+ }
144
+ catch (error) {
145
+ const isCancellation = CancellationError.isCancellationError(error);
146
+ await ctx.sendStatusChangedEvent({
147
+ nodeTypeName: 'orchestratorRoute',
148
+ id: 'route',
149
+ executionIndex: routeIdx,
150
+ status: isCancellation ? 'CANCELLED' : 'FAILED',
151
+ });
152
+ if (!isCancellation) {
153
+ ctx.sendLogErrorEvent({
154
+ nodeTypeName: 'orchestratorRoute',
155
+ id: 'route',
156
+ executionIndex: routeIdx,
157
+ error: error instanceof Error ? error.message : String(error),
158
+ });
159
+ await ctx.setVariable({ id: 'route', portName: 'onSuccess', executionIndex: routeIdx, nodeTypeName: 'orchestratorRoute' }, false);
160
+ await ctx.setVariable({ id: 'route', portName: 'onFailure', executionIndex: routeIdx, nodeTypeName: 'orchestratorRoute' }, true);
161
+ route_success = false;
162
+ }
163
+ throw error;
164
+ }
165
+ }
166
+ else {
167
+ routeIdx = ctx.addExecution('route');
168
+ route_success = true;
169
+ }
170
+ }
171
+ else {
172
+ const routeIdx = ctx.addExecution('route');
173
+ await ctx.setVariable({ id: 'route', portName: 'onSuccess', executionIndex: routeIdx, nodeTypeName: 'orchestratorRoute' }, false);
174
+ await ctx.setVariable({ id: 'route', portName: 'onFailure', executionIndex: routeIdx, nodeTypeName: 'orchestratorRoute' }, false);
175
+ await ctx.sendStatusChangedEvent({
176
+ nodeTypeName: 'orchestratorRoute',
177
+ id: 'route',
178
+ executionIndex: routeIdx,
179
+ status: 'CANCELLED',
180
+ });
181
+ const dispatchIdx = ctx.addExecution('dispatch');
182
+ await ctx.setVariable({ id: 'dispatch', portName: 'onSuccess', executionIndex: dispatchIdx, nodeTypeName: 'orchestratorDispatch' }, false);
183
+ await ctx.setVariable({ id: 'dispatch', portName: 'onFailure', executionIndex: dispatchIdx, nodeTypeName: 'orchestratorDispatch' }, false);
184
+ await ctx.sendStatusChangedEvent({
185
+ nodeTypeName: 'orchestratorDispatch',
186
+ id: 'dispatch',
187
+ executionIndex: dispatchIdx,
188
+ status: 'CANCELLED',
189
+ });
190
+ }
191
+ if (load_success && route_success) {
192
+ if (await __ctrl__.beforeNode('dispatch', ctx)) {
193
+ // ── dispatch (orchestratorDispatch) ──
194
+ ctx.checkAborted('dispatch');
195
+ dispatchIdx = ctx.addExecution('dispatch');
196
+ if (typeof globalThis !== 'undefined')
197
+ globalThis.__fw_current_node_id__ = 'dispatch';
198
+ await ctx.sendStatusChangedEvent({
199
+ nodeTypeName: 'orchestratorDispatch',
200
+ id: 'dispatch',
201
+ executionIndex: dispatchIdx,
202
+ status: 'RUNNING',
203
+ });
204
+ try {
205
+ const dispatch_execute = routeIdx !== undefined ? await ctx.getVariable({ id: 'route', portName: 'onSuccess', executionIndex: routeIdx }) : false;
206
+ await ctx.setVariable({ id: 'dispatch', portName: 'execute', executionIndex: dispatchIdx, nodeTypeName: 'orchestratorDispatch' }, dispatch_execute);
207
+ const dispatch_decisions = await ctx.getVariable({ id: 'route', portName: 'decisions', executionIndex: routeIdx });
208
+ await ctx.setVariable({ id: 'dispatch', portName: 'decisions', executionIndex: dispatchIdx, nodeTypeName: 'orchestratorDispatch' }, dispatch_decisions);
209
+ const dispatch_projectDir = await ctx.getVariable({ id: 'Start', portName: 'projectDir', executionIndex: startIdx });
210
+ await ctx.setVariable({ id: 'dispatch', portName: 'projectDir', executionIndex: dispatchIdx, nodeTypeName: 'orchestratorDispatch' }, dispatch_projectDir);
211
+ const dispatchResult = await orchestratorDispatch(dispatch_execute, dispatch_decisions, dispatch_projectDir);
212
+ await ctx.setVariable({ id: 'dispatch', portName: 'results', executionIndex: dispatchIdx, nodeTypeName: 'orchestratorDispatch' }, dispatchResult.results);
213
+ await ctx.setVariable({ id: 'dispatch', portName: 'onSuccess', executionIndex: dispatchIdx, nodeTypeName: 'orchestratorDispatch' }, dispatchResult.onSuccess);
214
+ await ctx.setVariable({ id: 'dispatch', portName: 'onFailure', executionIndex: dispatchIdx, nodeTypeName: 'orchestratorDispatch' }, dispatchResult.onFailure);
215
+ await ctx.sendStatusChangedEvent({
216
+ nodeTypeName: 'orchestratorDispatch',
217
+ id: 'dispatch',
218
+ executionIndex: dispatchIdx,
219
+ status: 'SUCCEEDED',
220
+ });
221
+ await __ctrl__.afterNode('dispatch', ctx);
222
+ }
223
+ catch (error) {
224
+ const isCancellation = CancellationError.isCancellationError(error);
225
+ await ctx.sendStatusChangedEvent({
226
+ nodeTypeName: 'orchestratorDispatch',
227
+ id: 'dispatch',
228
+ executionIndex: dispatchIdx,
229
+ status: isCancellation ? 'CANCELLED' : 'FAILED',
230
+ });
231
+ if (!isCancellation) {
232
+ ctx.sendLogErrorEvent({
233
+ nodeTypeName: 'orchestratorDispatch',
234
+ id: 'dispatch',
235
+ executionIndex: dispatchIdx,
236
+ error: error instanceof Error ? error.message : String(error),
237
+ });
238
+ await ctx.setVariable({ id: 'dispatch', portName: 'onSuccess', executionIndex: dispatchIdx, nodeTypeName: 'orchestratorDispatch' }, false);
239
+ await ctx.setVariable({ id: 'dispatch', portName: 'onFailure', executionIndex: dispatchIdx, nodeTypeName: 'orchestratorDispatch' }, true);
240
+ }
241
+ throw error;
242
+ }
243
+ }
244
+ else {
245
+ dispatchIdx = ctx.addExecution('dispatch');
246
+ }
247
+ }
248
+ else {
249
+ const dispatchIdx = ctx.addExecution('dispatch');
250
+ await ctx.setVariable({ id: 'dispatch', portName: 'onSuccess', executionIndex: dispatchIdx, nodeTypeName: 'orchestratorDispatch' }, false);
251
+ await ctx.setVariable({ id: 'dispatch', portName: 'onFailure', executionIndex: dispatchIdx, nodeTypeName: 'orchestratorDispatch' }, false);
252
+ await ctx.sendStatusChangedEvent({
253
+ nodeTypeName: 'orchestratorDispatch',
254
+ id: 'dispatch',
255
+ executionIndex: dispatchIdx,
256
+ status: 'CANCELLED',
257
+ });
258
+ }
259
+ const exitIdx = ctx.addExecution('Exit');
260
+ const exit_results = dispatchIdx !== undefined ? await ctx.getVariable({ id: 'dispatch', portName: 'results', executionIndex: dispatchIdx }) : undefined;
261
+ await ctx.setVariable({ id: 'Exit', portName: 'results', executionIndex: exitIdx, nodeTypeName: 'Exit' }, exit_results);
262
+ const exit_onSuccess = dispatchIdx !== undefined ? await ctx.getVariable({ id: 'dispatch', portName: 'onSuccess', executionIndex: dispatchIdx }) : false;
263
+ await ctx.setVariable({ id: 'Exit', portName: 'onSuccess', executionIndex: exitIdx, nodeTypeName: 'Exit' }, exit_onSuccess);
264
+ await ctx.setVariable({ id: 'Exit', portName: 'onFailure', executionIndex: exitIdx, nodeTypeName: 'Exit' }, false);
265
+ const finalResult = { onFailure: false, results: exit_results, onSuccess: exit_onSuccess };
266
+ await ctx.sendStatusChangedEvent({
267
+ nodeTypeName: 'Exit',
268
+ id: 'Exit',
269
+ executionIndex: exitIdx,
270
+ status: 'SUCCEEDED',
271
+ });
272
+ ctx.sendWorkflowCompletedEvent({
273
+ executionIndex: exitIdx,
274
+ status: 'SUCCEEDED',
275
+ result: finalResult,
276
+ });
277
+ return finalResult;
278
+ // @flow-weaver-body-end
279
+ return { onSuccess: false, results: null };
280
+ }
281
+ //# sourceMappingURL=orchestrator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orchestrator.js","sourceRoot":"","sources":["../../src/workflows/orchestrator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAA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O,EAAE,IAAI,EAAE,CAAC;AAC7C,CAAC"}
@@ -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