condukt 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (233) hide show
  1. package/dist/bridge/bridge.d.ts +34 -0
  2. package/dist/bridge/bridge.d.ts.map +1 -0
  3. package/dist/bridge/bridge.js +365 -0
  4. package/dist/bridge/bridge.js.map +1 -0
  5. package/dist/bridge/index.d.ts +3 -0
  6. package/dist/bridge/index.d.ts.map +1 -0
  7. package/dist/bridge/index.js +6 -0
  8. package/dist/bridge/index.js.map +1 -0
  9. package/dist/runtimes/copilot/copilot-adapter.d.ts +28 -0
  10. package/dist/runtimes/copilot/copilot-adapter.d.ts.map +1 -0
  11. package/dist/runtimes/copilot/copilot-adapter.js +50 -0
  12. package/dist/runtimes/copilot/copilot-adapter.js.map +1 -0
  13. package/dist/runtimes/copilot/copilot-backend.d.ts +49 -0
  14. package/dist/runtimes/copilot/copilot-backend.d.ts.map +1 -0
  15. package/dist/runtimes/copilot/copilot-backend.js +13 -0
  16. package/dist/runtimes/copilot/copilot-backend.js.map +1 -0
  17. package/dist/runtimes/copilot/index.d.ts +5 -0
  18. package/dist/runtimes/copilot/index.d.ts.map +1 -0
  19. package/dist/runtimes/copilot/index.js +11 -0
  20. package/dist/runtimes/copilot/index.js.map +1 -0
  21. package/dist/runtimes/copilot/process-killer.d.ts +13 -0
  22. package/dist/runtimes/copilot/process-killer.d.ts.map +1 -0
  23. package/dist/runtimes/copilot/process-killer.js +77 -0
  24. package/dist/runtimes/copilot/process-killer.js.map +1 -0
  25. package/dist/runtimes/copilot/subprocess-backend.d.ts +26 -0
  26. package/dist/runtimes/copilot/subprocess-backend.d.ts.map +1 -0
  27. package/dist/runtimes/copilot/subprocess-backend.js +308 -0
  28. package/dist/runtimes/copilot/subprocess-backend.js.map +1 -0
  29. package/dist/runtimes/mock/index.d.ts +3 -0
  30. package/dist/runtimes/mock/index.d.ts.map +1 -0
  31. package/dist/runtimes/mock/index.js +6 -0
  32. package/dist/runtimes/mock/index.js.map +1 -0
  33. package/dist/runtimes/mock/mock-runtime.d.ts +43 -0
  34. package/dist/runtimes/mock/mock-runtime.d.ts.map +1 -0
  35. package/dist/runtimes/mock/mock-runtime.js +153 -0
  36. package/dist/runtimes/mock/mock-runtime.js.map +1 -0
  37. package/dist/src/agent.d.ts +35 -0
  38. package/dist/src/agent.d.ts.map +1 -0
  39. package/dist/src/agent.js +257 -0
  40. package/dist/src/agent.js.map +1 -0
  41. package/dist/src/events.d.ts +153 -0
  42. package/dist/src/events.d.ts.map +1 -0
  43. package/dist/src/events.js +11 -0
  44. package/dist/src/events.js.map +1 -0
  45. package/dist/src/index.d.ts +8 -0
  46. package/dist/src/index.d.ts.map +1 -0
  47. package/dist/src/index.js +24 -0
  48. package/dist/src/index.js.map +1 -0
  49. package/dist/src/nodes.d.ts +63 -0
  50. package/dist/src/nodes.d.ts.map +1 -0
  51. package/dist/src/nodes.js +120 -0
  52. package/dist/src/nodes.js.map +1 -0
  53. package/dist/src/scheduler.d.ts +11 -0
  54. package/dist/src/scheduler.d.ts.map +1 -0
  55. package/dist/src/scheduler.js +478 -0
  56. package/dist/src/scheduler.js.map +1 -0
  57. package/dist/src/types.d.ts +201 -0
  58. package/dist/src/types.d.ts.map +1 -0
  59. package/dist/src/types.js +38 -0
  60. package/dist/src/types.js.map +1 -0
  61. package/dist/src/verify.d.ts +51 -0
  62. package/dist/src/verify.d.ts.map +1 -0
  63. package/dist/src/verify.js +126 -0
  64. package/dist/src/verify.js.map +1 -0
  65. package/dist/state/index.d.ts +5 -0
  66. package/dist/state/index.d.ts.map +1 -0
  67. package/dist/state/index.js +14 -0
  68. package/dist/state/index.js.map +1 -0
  69. package/dist/state/reducer.d.ts +11 -0
  70. package/dist/state/reducer.d.ts.map +1 -0
  71. package/dist/state/reducer.js +223 -0
  72. package/dist/state/reducer.js.map +1 -0
  73. package/dist/state/state-runtime.d.ts +30 -0
  74. package/dist/state/state-runtime.d.ts.map +1 -0
  75. package/dist/state/state-runtime.js +131 -0
  76. package/dist/state/state-runtime.js.map +1 -0
  77. package/dist/state/storage-memory.d.ts +24 -0
  78. package/dist/state/storage-memory.d.ts.map +1 -0
  79. package/dist/state/storage-memory.js +91 -0
  80. package/dist/state/storage-memory.js.map +1 -0
  81. package/dist/state/storage.d.ts +29 -0
  82. package/dist/state/storage.d.ts.map +1 -0
  83. package/dist/state/storage.js +175 -0
  84. package/dist/state/storage.js.map +1 -0
  85. package/dist/theme/index.d.ts +128 -0
  86. package/dist/theme/index.d.ts.map +1 -0
  87. package/dist/theme/index.js +59 -0
  88. package/dist/theme/index.js.map +1 -0
  89. package/dist/ui/ansi.d.ts +9 -0
  90. package/dist/ui/ansi.d.ts.map +1 -0
  91. package/dist/ui/ansi.js +78 -0
  92. package/dist/ui/ansi.js.map +1 -0
  93. package/dist/ui/components/FlowEdge.d.ts +5 -0
  94. package/dist/ui/components/FlowEdge.d.ts.map +1 -0
  95. package/dist/ui/components/FlowEdge.js +33 -0
  96. package/dist/ui/components/FlowEdge.js.map +1 -0
  97. package/dist/ui/components/FlowGraph.d.ts +10 -0
  98. package/dist/ui/components/FlowGraph.d.ts.map +1 -0
  99. package/dist/ui/components/FlowGraph.js +124 -0
  100. package/dist/ui/components/FlowGraph.js.map +1 -0
  101. package/dist/ui/components/FlowStatusBar.d.ts +7 -0
  102. package/dist/ui/components/FlowStatusBar.d.ts.map +1 -0
  103. package/dist/ui/components/FlowStatusBar.js +27 -0
  104. package/dist/ui/components/FlowStatusBar.js.map +1 -0
  105. package/dist/ui/components/MiniPipeline.d.ts +10 -0
  106. package/dist/ui/components/MiniPipeline.d.ts.map +1 -0
  107. package/dist/ui/components/MiniPipeline.js +155 -0
  108. package/dist/ui/components/MiniPipeline.js.map +1 -0
  109. package/dist/ui/components/NodeCard.d.ts +5 -0
  110. package/dist/ui/components/NodeCard.d.ts.map +1 -0
  111. package/dist/ui/components/NodeCard.js +39 -0
  112. package/dist/ui/components/NodeCard.js.map +1 -0
  113. package/dist/ui/components/NodeDetailPanel.d.ts +10 -0
  114. package/dist/ui/components/NodeDetailPanel.d.ts.map +1 -0
  115. package/dist/ui/components/NodeDetailPanel.js +38 -0
  116. package/dist/ui/components/NodeDetailPanel.js.map +1 -0
  117. package/dist/ui/components/node-panel/Controls.d.ts +16 -0
  118. package/dist/ui/components/node-panel/Controls.d.ts.map +1 -0
  119. package/dist/ui/components/node-panel/Controls.js +28 -0
  120. package/dist/ui/components/node-panel/Controls.js.map +1 -0
  121. package/dist/ui/components/node-panel/ErrorBar.d.ts +6 -0
  122. package/dist/ui/components/node-panel/ErrorBar.d.ts.map +1 -0
  123. package/dist/ui/components/node-panel/ErrorBar.js +14 -0
  124. package/dist/ui/components/node-panel/ErrorBar.js.map +1 -0
  125. package/dist/ui/components/node-panel/Gate.d.ts +13 -0
  126. package/dist/ui/components/node-panel/Gate.d.ts.map +1 -0
  127. package/dist/ui/components/node-panel/Gate.js +40 -0
  128. package/dist/ui/components/node-panel/Gate.js.map +1 -0
  129. package/dist/ui/components/node-panel/Header.d.ts +10 -0
  130. package/dist/ui/components/node-panel/Header.d.ts.map +1 -0
  131. package/dist/ui/components/node-panel/Header.js +19 -0
  132. package/dist/ui/components/node-panel/Header.js.map +1 -0
  133. package/dist/ui/components/node-panel/Info.d.ts +7 -0
  134. package/dist/ui/components/node-panel/Info.d.ts.map +1 -0
  135. package/dist/ui/components/node-panel/Info.js +23 -0
  136. package/dist/ui/components/node-panel/Info.js.map +1 -0
  137. package/dist/ui/components/node-panel/Output.d.ts +27 -0
  138. package/dist/ui/components/node-panel/Output.d.ts.map +1 -0
  139. package/dist/ui/components/node-panel/Output.js +66 -0
  140. package/dist/ui/components/node-panel/Output.js.map +1 -0
  141. package/dist/ui/components/node-panel/index.d.ts +47 -0
  142. package/dist/ui/components/node-panel/index.d.ts.map +1 -0
  143. package/dist/ui/components/node-panel/index.js +54 -0
  144. package/dist/ui/components/node-panel/index.js.map +1 -0
  145. package/dist/ui/components/node-panel/types.d.ts +23 -0
  146. package/dist/ui/components/node-panel/types.d.ts.map +1 -0
  147. package/dist/ui/components/node-panel/types.js +24 -0
  148. package/dist/ui/components/node-panel/types.js.map +1 -0
  149. package/dist/ui/core/components/Badge.d.ts +6 -0
  150. package/dist/ui/core/components/Badge.d.ts.map +1 -0
  151. package/dist/ui/core/components/Badge.js +11 -0
  152. package/dist/ui/core/components/Badge.js.map +1 -0
  153. package/dist/ui/core/components/Button.d.ts +9 -0
  154. package/dist/ui/core/components/Button.d.ts.map +1 -0
  155. package/dist/ui/core/components/Button.js +18 -0
  156. package/dist/ui/core/components/Button.js.map +1 -0
  157. package/dist/ui/core/components/ConfirmDialog.d.ts +11 -0
  158. package/dist/ui/core/components/ConfirmDialog.d.ts.map +1 -0
  159. package/dist/ui/core/components/ConfirmDialog.js +23 -0
  160. package/dist/ui/core/components/ConfirmDialog.js.map +1 -0
  161. package/dist/ui/core/components/ExecutionCard.d.ts +12 -0
  162. package/dist/ui/core/components/ExecutionCard.d.ts.map +1 -0
  163. package/dist/ui/core/components/ExecutionCard.js +15 -0
  164. package/dist/ui/core/components/ExecutionCard.js.map +1 -0
  165. package/dist/ui/core/components/NodeListItem.d.ts +10 -0
  166. package/dist/ui/core/components/NodeListItem.d.ts.map +1 -0
  167. package/dist/ui/core/components/NodeListItem.js +27 -0
  168. package/dist/ui/core/components/NodeListItem.js.map +1 -0
  169. package/dist/ui/core/components/PageHeader.d.ts +10 -0
  170. package/dist/ui/core/components/PageHeader.d.ts.map +1 -0
  171. package/dist/ui/core/components/PageHeader.js +9 -0
  172. package/dist/ui/core/components/PageHeader.js.map +1 -0
  173. package/dist/ui/core/components/SectionLabel.d.ts +6 -0
  174. package/dist/ui/core/components/SectionLabel.d.ts.map +1 -0
  175. package/dist/ui/core/components/SectionLabel.js +9 -0
  176. package/dist/ui/core/components/SectionLabel.js.map +1 -0
  177. package/dist/ui/core/components/Skeleton.d.ts +7 -0
  178. package/dist/ui/core/components/Skeleton.d.ts.map +1 -0
  179. package/dist/ui/core/components/Skeleton.js +26 -0
  180. package/dist/ui/core/components/Skeleton.js.map +1 -0
  181. package/dist/ui/core/components/Stat.d.ts +8 -0
  182. package/dist/ui/core/components/Stat.d.ts.map +1 -0
  183. package/dist/ui/core/components/Stat.js +9 -0
  184. package/dist/ui/core/components/Stat.js.map +1 -0
  185. package/dist/ui/core/components/Toast.d.ts +7 -0
  186. package/dist/ui/core/components/Toast.d.ts.map +1 -0
  187. package/dist/ui/core/components/Toast.js +28 -0
  188. package/dist/ui/core/components/Toast.js.map +1 -0
  189. package/dist/ui/core/components/__tests__/primitives.test.d.ts +2 -0
  190. package/dist/ui/core/components/__tests__/primitives.test.d.ts.map +1 -0
  191. package/dist/ui/core/components/__tests__/primitives.test.js +3 -0
  192. package/dist/ui/core/components/__tests__/primitives.test.js.map +1 -0
  193. package/dist/ui/core/components/index.d.ts +21 -0
  194. package/dist/ui/core/components/index.d.ts.map +1 -0
  195. package/dist/ui/core/components/index.js +24 -0
  196. package/dist/ui/core/components/index.js.map +1 -0
  197. package/dist/ui/core/index.d.ts +17 -0
  198. package/dist/ui/core/index.d.ts.map +1 -0
  199. package/dist/ui/core/index.js +56 -0
  200. package/dist/ui/core/index.js.map +1 -0
  201. package/dist/ui/core/utils.d.ts +6 -0
  202. package/dist/ui/core/utils.d.ts.map +1 -0
  203. package/dist/ui/core/utils.js +32 -0
  204. package/dist/ui/core/utils.js.map +1 -0
  205. package/dist/ui/graph/index.d.ts +4 -0
  206. package/dist/ui/graph/index.d.ts.map +1 -0
  207. package/dist/ui/graph/index.js +11 -0
  208. package/dist/ui/graph/index.js.map +1 -0
  209. package/dist/ui/hooks/useAutoSelectNode.d.ts +3 -0
  210. package/dist/ui/hooks/useAutoSelectNode.d.ts.map +1 -0
  211. package/dist/ui/hooks/useAutoSelectNode.js +36 -0
  212. package/dist/ui/hooks/useAutoSelectNode.js.map +1 -0
  213. package/dist/ui/hooks/useFlowExecution.d.ts +32 -0
  214. package/dist/ui/hooks/useFlowExecution.d.ts.map +1 -0
  215. package/dist/ui/hooks/useFlowExecution.js +113 -0
  216. package/dist/ui/hooks/useFlowExecution.js.map +1 -0
  217. package/dist/ui/hooks/useNodeNavigation.d.ts +3 -0
  218. package/dist/ui/hooks/useNodeNavigation.d.ts.map +1 -0
  219. package/dist/ui/hooks/useNodeNavigation.js +38 -0
  220. package/dist/ui/hooks/useNodeNavigation.js.map +1 -0
  221. package/dist/ui/hooks/useNodeOutput.d.ts +21 -0
  222. package/dist/ui/hooks/useNodeOutput.d.ts.map +1 -0
  223. package/dist/ui/hooks/useNodeOutput.js +75 -0
  224. package/dist/ui/hooks/useNodeOutput.js.map +1 -0
  225. package/dist/ui/index.d.ts +16 -0
  226. package/dist/ui/index.d.ts.map +1 -0
  227. package/dist/ui/index.js +37 -0
  228. package/dist/ui/index.js.map +1 -0
  229. package/dist/ui/utils.d.ts +3 -0
  230. package/dist/ui/utils.d.ts.map +1 -0
  231. package/dist/ui/utils.js +9 -0
  232. package/dist/ui/utils.js.map +1 -0
  233. package/package.json +87 -0
@@ -0,0 +1,175 @@
1
+ "use strict";
2
+ /**
3
+ * File-based StorageEngine — JSONL event logs, atomic projection writes,
4
+ * per-node output files, flat artifact files.
5
+ *
6
+ * Directory structure:
7
+ * {rootDir}/{execId}/events.jsonl
8
+ * {rootDir}/{execId}/projection.json
9
+ * {rootDir}/{execId}/artifacts/{nodeId}/{name}
10
+ * {rootDir}/{execId}/output/{nodeId}.log
11
+ */
12
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ var desc = Object.getOwnPropertyDescriptor(m, k);
15
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
16
+ desc = { enumerable: true, get: function() { return m[k]; } };
17
+ }
18
+ Object.defineProperty(o, k2, desc);
19
+ }) : (function(o, m, k, k2) {
20
+ if (k2 === undefined) k2 = k;
21
+ o[k2] = m[k];
22
+ }));
23
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
24
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
25
+ }) : function(o, v) {
26
+ o["default"] = v;
27
+ });
28
+ var __importStar = (this && this.__importStar) || (function () {
29
+ var ownKeys = function(o) {
30
+ ownKeys = Object.getOwnPropertyNames || function (o) {
31
+ var ar = [];
32
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
33
+ return ar;
34
+ };
35
+ return ownKeys(o);
36
+ };
37
+ return function (mod) {
38
+ if (mod && mod.__esModule) return mod;
39
+ var result = {};
40
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
41
+ __setModuleDefault(result, mod);
42
+ return result;
43
+ };
44
+ })();
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.FileStorage = void 0;
47
+ const fs = __importStar(require("fs"));
48
+ const path = __importStar(require("path"));
49
+ // ---------------------------------------------------------------------------
50
+ // Path safety
51
+ // ---------------------------------------------------------------------------
52
+ function safePath(base, ...segments) {
53
+ const joined = path.resolve(base, ...segments);
54
+ const normalizedBase = path.resolve(base);
55
+ if (!joined.startsWith(normalizedBase + path.sep) && joined !== normalizedBase) {
56
+ throw new Error(`Path traversal attempt: ${segments.join('/')} escapes ${base}`);
57
+ }
58
+ return joined;
59
+ }
60
+ // ---------------------------------------------------------------------------
61
+ // FileStorage
62
+ // ---------------------------------------------------------------------------
63
+ class FileStorage {
64
+ rootDir;
65
+ constructor(rootDir) {
66
+ this.rootDir = rootDir;
67
+ }
68
+ execDir(execId) {
69
+ return safePath(this.rootDir, execId);
70
+ }
71
+ appendEvent(execId, event) {
72
+ const dir = this.execDir(execId);
73
+ fs.mkdirSync(dir, { recursive: true });
74
+ const file = path.join(dir, 'events.jsonl');
75
+ fs.appendFileSync(file, JSON.stringify(event) + '\n', 'utf-8');
76
+ }
77
+ readEvents(execId) {
78
+ const file = path.join(this.execDir(execId), 'events.jsonl');
79
+ if (!fs.existsSync(file))
80
+ return [];
81
+ const content = fs.readFileSync(file, 'utf-8');
82
+ const events = [];
83
+ for (const line of content.split('\n')) {
84
+ const trimmed = line.trim();
85
+ if (!trimmed)
86
+ continue;
87
+ try {
88
+ events.push(JSON.parse(trimmed));
89
+ }
90
+ catch {
91
+ // Skip malformed lines (crash safety — truncated writes)
92
+ }
93
+ }
94
+ return events;
95
+ }
96
+ writeProjection(execId, projection) {
97
+ const dir = this.execDir(execId);
98
+ fs.mkdirSync(dir, { recursive: true });
99
+ const target = path.join(dir, 'projection.json');
100
+ const tmp = path.join(dir, `projection.json.tmp.${process.pid}`);
101
+ fs.writeFileSync(tmp, JSON.stringify(projection, null, 2), 'utf-8');
102
+ fs.renameSync(tmp, target);
103
+ }
104
+ readProjection(execId) {
105
+ const file = path.join(this.execDir(execId), 'projection.json');
106
+ if (!fs.existsSync(file))
107
+ return null;
108
+ try {
109
+ const content = fs.readFileSync(file, 'utf-8');
110
+ return JSON.parse(content);
111
+ }
112
+ catch {
113
+ return null;
114
+ }
115
+ }
116
+ writeArtifact(execId, nodeId, name, content) {
117
+ const dir = safePath(this.execDir(execId), 'artifacts', nodeId);
118
+ fs.mkdirSync(dir, { recursive: true });
119
+ const file = safePath(dir, name);
120
+ fs.writeFileSync(file, content, 'utf-8');
121
+ }
122
+ readArtifact(execId, nodeId, name) {
123
+ const file = safePath(this.execDir(execId), 'artifacts', nodeId, name);
124
+ if (!fs.existsSync(file))
125
+ return null;
126
+ return fs.readFileSync(file, 'utf-8');
127
+ }
128
+ appendOutput(execId, nodeId, line) {
129
+ const dir = safePath(this.execDir(execId), 'output');
130
+ fs.mkdirSync(dir, { recursive: true });
131
+ const file = safePath(dir, `${nodeId}.log`);
132
+ fs.appendFileSync(file, line + '\n', 'utf-8');
133
+ }
134
+ readOutput(execId, nodeId, offset, limit) {
135
+ const file = safePath(this.execDir(execId), 'output', `${nodeId}.log`);
136
+ if (!fs.existsSync(file)) {
137
+ return { lines: [], offset: offset ?? 0, total: 0, hasMore: false };
138
+ }
139
+ const content = fs.readFileSync(file, 'utf-8');
140
+ // Split and drop trailing empty line from final newline
141
+ const all = content.split('\n');
142
+ if (all.length > 0 && all[all.length - 1] === '') {
143
+ all.pop();
144
+ }
145
+ const start = offset ?? 0;
146
+ const end = limit != null ? start + limit : all.length;
147
+ const lines = all.slice(start, end);
148
+ return {
149
+ lines,
150
+ offset: start,
151
+ total: all.length,
152
+ hasMore: end < all.length,
153
+ };
154
+ }
155
+ closeOutput(_execId, _nodeId) {
156
+ // No-op for file storage — we use appendFileSync, no streams to close
157
+ }
158
+ delete(execId) {
159
+ const dir = this.execDir(execId);
160
+ if (!fs.existsSync(dir))
161
+ return false;
162
+ fs.rmSync(dir, { recursive: true, force: true });
163
+ return true;
164
+ }
165
+ listExecutionIds() {
166
+ if (!fs.existsSync(this.rootDir))
167
+ return [];
168
+ return fs
169
+ .readdirSync(this.rootDir, { withFileTypes: true })
170
+ .filter((d) => d.isDirectory())
171
+ .map((d) => d.name);
172
+ }
173
+ }
174
+ exports.FileStorage = FileStorage;
175
+ //# sourceMappingURL=storage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.js","sourceRoot":"","sources":["../../state/storage.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,2CAA6B;AAQ7B,8EAA8E;AAC9E,cAAc;AACd,8EAA8E;AAE9E,SAAS,QAAQ,CAAC,IAAY,EAAE,GAAG,QAAkB;IACnD,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,QAAQ,CAAC,CAAC;IAC/C,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,cAAc,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,MAAM,KAAK,cAAc,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,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC;YAAE,OAAO,KAAK,CAAC;QACtC,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QACjD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,gBAAgB;QACd,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC;YAAE,OAAO,EAAE,CAAC;QAC5C,OAAO,EAAE;aACN,WAAW,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;aAClD,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;aAC9B,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;CACF;AA/GD,kCA+GC"}
@@ -0,0 +1,128 @@
1
+ /**
2
+ * Shared design tokens as a Tailwind CSS preset.
3
+ * Compositions extend this via `presets: [flowFrameworkPreset]`.
4
+ */
5
+ export declare const flowFrameworkPreset: {
6
+ theme: {
7
+ extend: {
8
+ colors: {
9
+ bg: {
10
+ base: string;
11
+ raised: string;
12
+ surface: string;
13
+ overlay: string;
14
+ };
15
+ border: {
16
+ subtle: string;
17
+ DEFAULT: string;
18
+ strong: string;
19
+ active: string;
20
+ };
21
+ text: {
22
+ primary: string;
23
+ secondary: string;
24
+ tertiary: string;
25
+ muted: string;
26
+ };
27
+ status: {
28
+ blue: string;
29
+ 'blue-bg': string;
30
+ green: string;
31
+ 'green-bg': string;
32
+ red: string;
33
+ 'red-bg': string;
34
+ amber: string;
35
+ 'amber-bg': string;
36
+ purple: string;
37
+ 'purple-bg': string;
38
+ orange: string;
39
+ 'orange-bg': string;
40
+ };
41
+ };
42
+ fontFamily: {
43
+ mono: string[];
44
+ };
45
+ fontSize: {
46
+ '2xs': string;
47
+ };
48
+ boxShadow: {
49
+ card: string;
50
+ 'card-hover': string;
51
+ dialog: string;
52
+ 'glow-blue': string;
53
+ 'glow-green': string;
54
+ 'glow-red': string;
55
+ };
56
+ borderRadius: {
57
+ sm: string;
58
+ DEFAULT: string;
59
+ lg: string;
60
+ xl: string;
61
+ '2xl': string;
62
+ };
63
+ animation: {
64
+ 'pulse-status': string;
65
+ 'blink-cursor': string;
66
+ shimmer: string;
67
+ 'fade-in': string;
68
+ 'slide-up': string;
69
+ 'card-enter': string;
70
+ };
71
+ keyframes: {
72
+ 'pulse-status': {
73
+ '0%, 100%': {
74
+ opacity: string;
75
+ };
76
+ '50%': {
77
+ opacity: string;
78
+ };
79
+ };
80
+ 'blink-cursor': {
81
+ '0%, 100%': {
82
+ opacity: string;
83
+ };
84
+ '50%': {
85
+ opacity: string;
86
+ };
87
+ };
88
+ shimmer: {
89
+ '0%': {
90
+ backgroundPosition: string;
91
+ };
92
+ '100%': {
93
+ backgroundPosition: string;
94
+ };
95
+ };
96
+ 'fade-in': {
97
+ from: {
98
+ opacity: string;
99
+ };
100
+ to: {
101
+ opacity: string;
102
+ };
103
+ };
104
+ 'slide-up': {
105
+ from: {
106
+ transform: string;
107
+ opacity: string;
108
+ };
109
+ to: {
110
+ transform: string;
111
+ opacity: string;
112
+ };
113
+ };
114
+ cardEnter: {
115
+ from: {
116
+ opacity: string;
117
+ transform: string;
118
+ };
119
+ to: {
120
+ opacity: string;
121
+ transform: string;
122
+ };
123
+ };
124
+ };
125
+ };
126
+ };
127
+ };
128
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../theme/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkD/B,CAAC"}
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.flowFrameworkPreset = void 0;
4
+ /**
5
+ * Shared design tokens as a Tailwind CSS preset.
6
+ * Compositions extend this via `presets: [flowFrameworkPreset]`.
7
+ */
8
+ exports.flowFrameworkPreset = {
9
+ theme: {
10
+ extend: {
11
+ colors: {
12
+ bg: { base: '#1a1815', raised: '#201d18', surface: '#2b2a27', overlay: '#343230' },
13
+ border: { subtle: '#302e2b', DEFAULT: '#3d3a36', strong: '#4a4742', active: '#5a5650' },
14
+ text: { primary: '#e8e6e3', secondary: '#b1ada1', tertiary: '#8a8578', muted: '#8a8578' },
15
+ status: {
16
+ blue: '#60a5fa', 'blue-bg': '#1a2a40',
17
+ green: '#4ade80', 'green-bg': '#1a3528',
18
+ red: '#f87171', 'red-bg': '#3a1a1a',
19
+ amber: '#fbbf24', 'amber-bg': '#352a15',
20
+ purple: '#c084fc', 'purple-bg': '#2a1845',
21
+ orange: '#fb923c', 'orange-bg': '#3a2515',
22
+ },
23
+ },
24
+ fontFamily: {
25
+ mono: ['"JetBrains Mono"', '"Cascadia Code"', '"Fira Code"', 'monospace'],
26
+ },
27
+ fontSize: { '2xs': '0.6875rem' },
28
+ boxShadow: {
29
+ card: '0 1px 3px rgba(0,0,0,0.2), 0 4px 12px rgba(0,0,0,0.15)',
30
+ 'card-hover': '0 2px 8px rgba(0,0,0,0.2), 0 12px 28px rgba(0,0,0,0.18)',
31
+ dialog: '0 8px 40px rgba(0,0,0,0.4), 0 0 1px rgba(255,255,255,0.03)',
32
+ 'glow-blue': '0 0 20px rgba(59,130,246,0.15), 0 0 40px rgba(59,130,246,0.05)',
33
+ 'glow-green': '0 0 20px rgba(74,222,128,0.15)',
34
+ 'glow-red': '0 0 20px rgba(248,113,113,0.15)',
35
+ },
36
+ borderRadius: { sm: '6px', DEFAULT: '8px', lg: '12px', xl: '16px', '2xl': '20px' },
37
+ animation: {
38
+ 'pulse-status': 'pulse-status 1.5s ease-in-out infinite',
39
+ 'blink-cursor': 'blink-cursor 1s step-end infinite',
40
+ shimmer: 'shimmer 2s linear infinite',
41
+ 'fade-in': 'fade-in 200ms ease',
42
+ 'slide-up': 'slide-up 200ms ease',
43
+ 'card-enter': 'cardEnter 300ms cubic-bezier(0.16,1,0.3,1) both',
44
+ },
45
+ keyframes: {
46
+ 'pulse-status': { '0%, 100%': { opacity: '1' }, '50%': { opacity: '0.3' } },
47
+ 'blink-cursor': { '0%, 100%': { opacity: '1' }, '50%': { opacity: '0' } },
48
+ shimmer: { '0%': { backgroundPosition: '-200% 0' }, '100%': { backgroundPosition: '200% 0' } },
49
+ 'fade-in': { from: { opacity: '0' }, to: { opacity: '1' } },
50
+ 'slide-up': { from: { transform: 'translateY(4px)', opacity: '0' }, to: { transform: 'translateY(0)', opacity: '1' } },
51
+ cardEnter: {
52
+ from: { opacity: '0', transform: 'translateY(8px) scale(0.98)' },
53
+ to: { opacity: '1', transform: 'translateY(0) scale(1)' },
54
+ },
55
+ },
56
+ },
57
+ },
58
+ };
59
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../theme/index.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACU,QAAA,mBAAmB,GAAG;IACjC,KAAK,EAAE;QACL,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE;gBAClF,MAAM,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE;gBACvF,IAAI,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,KAA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AAE,KAAK,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE;gBACzE,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,kBAAkB,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,EAAE,kBAAkB,EAAE,QAAQ,EAAE,EAAE;gBAC9F,SAAS,EAAE,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE;gBAC3D,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,iBAAiB,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE;gBACtH,SAAS,EAAE;oBACT,IAAI,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,6BAA6B,EAAE;oBAChE,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,wBAAwB,EAAE;iBAC1D;aACF;SACF;KACF;CACF,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * ANSI escape code handling for copilot CLI output.
3
+ * Ported from geneva-dashboard — handles SGR codes for colors, bold, dim.
4
+ */
5
+ /** Returns true if the text contains any ANSI escape sequences. */
6
+ export declare function hasAnsi(text: string): boolean;
7
+ export declare function ansiToHtml(text: string): string;
8
+ export declare function stripAnsi(text: string): string;
9
+ //# sourceMappingURL=ansi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ansi.d.ts","sourceRoot":"","sources":["../../ui/ansi.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,mEAAmE;AACnE,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE7C;AAoCD,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAe/C;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9C"}
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ /**
3
+ * ANSI escape code handling for copilot CLI output.
4
+ * Ported from geneva-dashboard — handles SGR codes for colors, bold, dim.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.hasAnsi = hasAnsi;
8
+ exports.ansiToHtml = ansiToHtml;
9
+ exports.stripAnsi = stripAnsi;
10
+ /** Returns true if the text contains any ANSI escape sequences. */
11
+ function hasAnsi(text) {
12
+ return text.includes('\x1b');
13
+ }
14
+ const SGR_COLORS = {
15
+ 30: '#3a3a3a', 31: '#ef4444', 32: '#22c55e', 33: '#eab308',
16
+ 34: '#3b82f6', 35: '#a855f7', 36: '#06b6d4', 37: '#d4d4d8',
17
+ 90: '#71717a', 91: '#f87171', 92: '#4ade80', 93: '#facc15',
18
+ 94: '#60a5fa', 95: '#c084fc', 96: '#22d3ee', 97: '#fafafa',
19
+ };
20
+ function applySgr(state, params) {
21
+ const codes = params === '' ? [0] : params.split(';').map(Number);
22
+ for (const code of codes) {
23
+ if (code === 0) {
24
+ state.color = null;
25
+ state.bold = false;
26
+ state.dim = false;
27
+ }
28
+ else if (code === 1)
29
+ state.bold = true;
30
+ else if (code === 2)
31
+ state.dim = true;
32
+ else if (code === 22) {
33
+ state.bold = false;
34
+ state.dim = false;
35
+ }
36
+ else if (code === 39)
37
+ state.color = null;
38
+ else if (SGR_COLORS[code])
39
+ state.color = SGR_COLORS[code];
40
+ }
41
+ }
42
+ function escapeHtml(text) {
43
+ return text.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;')
44
+ .replace(/"/g, '&quot;').replace(/'/g, '&#x27;');
45
+ }
46
+ function spanWrap(text, state) {
47
+ const styles = [];
48
+ if (state.color)
49
+ styles.push(`color:${state.color}`);
50
+ if (state.bold)
51
+ styles.push('font-weight:bold');
52
+ if (state.dim)
53
+ styles.push('opacity:0.6');
54
+ return styles.length === 0 ? text : `<span style="${styles.join(';')}">${text}</span>`;
55
+ }
56
+ function ansiToHtml(text) {
57
+ const state = { color: null, bold: false, dim: false };
58
+ let result = '';
59
+ let lastIndex = 0;
60
+ const pattern = /\x1b\[([0-9;]*)([A-Za-z])|\x1b\][^\x07]*(?:\x07|\x1b\\)|\x1b[A-Z]/g;
61
+ let match;
62
+ while ((match = pattern.exec(text)) !== null) {
63
+ const before = text.slice(lastIndex, match.index);
64
+ if (before)
65
+ result += spanWrap(escapeHtml(before), state);
66
+ lastIndex = match.index + match[0].length;
67
+ if (match[2] === 'm' && match[1] !== undefined)
68
+ applySgr(state, match[1]);
69
+ }
70
+ const remaining = text.slice(lastIndex);
71
+ if (remaining)
72
+ result += spanWrap(escapeHtml(remaining), state);
73
+ return result;
74
+ }
75
+ function stripAnsi(text) {
76
+ return text.replace(/\x1b\[[0-9;]*[A-Za-z]|\x1b\][^\x07]*(?:\x07|\x1b\\)|\x1b[A-Z]/g, '');
77
+ }
78
+ //# sourceMappingURL=ansi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ansi.js","sourceRoot":"","sources":["../../ui/ansi.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAGH,0BAEC;AAoCD,gCAeC;AAED,8BAEC;AA1DD,mEAAmE;AACnE,SAAgB,OAAO,CAAC,IAAY;IAClC,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC/B,CAAC;AAED,MAAM,UAAU,GAA2B;IACzC,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS;IAC1D,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS;IAC1D,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS;IAC1D,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE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KAAK,CAAC,CAAC,CAAC,KAAK,SAAS;YAAE,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5E,CAAC;IACD,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACxC,IAAI,SAAS;QAAE,MAAM,IAAI,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,KAAK,CAAC,CAAC;IAChE,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAgB,SAAS,CAAC,IAAY;IACpC,OAAO,IAAI,CAAC,OAAO,CAAC,gEAAgE,EAAE,EAAE,CAAC,CAAC;AAC5F,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { type EdgeProps } from '@xyflow/react';
2
+ declare function FlowEdgeInner(props: EdgeProps): import("react/jsx-runtime").JSX.Element;
3
+ export declare const FlowEdge: import("react").MemoExoticComponent<typeof FlowEdgeInner>;
4
+ export {};
5
+ //# sourceMappingURL=FlowEdge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FlowEdge.d.ts","sourceRoot":"","sources":["../../../ui/components/FlowEdge.tsx"],"names":[],"mappings":"AAGA,OAAO,EAA2B,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAQxE,iBAAS,aAAa,CAAC,KAAK,EAAE,SAAS,2CA0CtC;AAED,eAAO,MAAM,QAAQ,2DAAsB,CAAC"}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ 'use client';
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.FlowEdge = void 0;
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ const react_1 = require("react");
7
+ const react_2 = require("@xyflow/react");
8
+ const STATE_STYLES = {
9
+ default: { stroke: 'hsl(0 0% 30%)', strokeWidth: 1.5 },
10
+ taken: { stroke: 'hsl(142 76% 36%)', strokeWidth: 2 },
11
+ not_taken: { stroke: 'hsl(0 0% 25%)', strokeWidth: 1, dashArray: '4 4' },
12
+ };
13
+ function FlowEdgeInner(props) {
14
+ const { sourceX, sourceY, sourcePosition, targetX, targetY, targetPosition, data } = props;
15
+ const state = data?.state ?? 'default';
16
+ const action = data?.action;
17
+ const style = STATE_STYLES[state] ?? STATE_STYLES.default;
18
+ const [edgePath, labelX, labelY] = (0, react_2.getBezierPath)({
19
+ sourceX,
20
+ sourceY,
21
+ sourcePosition,
22
+ targetX,
23
+ targetY,
24
+ targetPosition,
25
+ });
26
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_2.BaseEdge, { path: edgePath, style: {
27
+ stroke: style.stroke,
28
+ strokeWidth: style.strokeWidth,
29
+ strokeDasharray: style.dashArray,
30
+ } }), action && action !== 'default' && ((0, jsx_runtime_1.jsx)("foreignObject", { x: labelX - 20, y: labelY - 10, width: 40, height: 20, className: "pointer-events-none", children: (0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-center", children: (0, jsx_runtime_1.jsx)("span", { className: "text-[9px] px-1 py-0.5 rounded bg-background/80 text-muted-foreground border border-border/50", children: action }) }) }))] }));
31
+ }
32
+ exports.FlowEdge = (0, react_1.memo)(FlowEdgeInner);
33
+ //# sourceMappingURL=FlowEdge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FlowEdge.js","sourceRoot":"","sources":["../../../ui/components/FlowEdge.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;AAEb,iCAA6B;AAC7B,yCAAwE;AAExE,MAAM,YAAY,GAAgF;IAChG,OAAO,EAAI,EAAE,MAAM,EAAE,eAAe,EAAE,WAAW,EAAE,GAAG,EAAE;IACxD,KAAK,EAAM,EAAE,MAAM,EAAE,kBAAkB,EAAE,WAAW,EAAE,CAAC,EAAE;IACzD,SAAS,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE;CACzE,CAAC;AAEF,SAAS,aAAa,CAAC,KAAgB;IACrC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IAC3F,MAAM,KAAK,GAAI,IAA2B,EAAE,KAAK,IAAI,SAAS,CAAC;IAC/D,MAAM,MAAM,GAAI,IAA4B,EAAE,MAAM,CAAC;IACrD,MAAM,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC,IAAI,YAAY,CAAC,OAAO,CAAC;IAE1D,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,IAAA,qBAAa,EAAC;QAC/C,OAAO;QACP,OAAO;QACP,cAAc;QACd,OAAO;QACP,OAAO;QACP,cAAc;KACf,CAAC,CAAC;IAEH,OAAO,CACL,6DACE,uBAAC,gBAAQ,IACP,IAAI,EAAE,QAAQ,EACd,KAAK,EAAE;oBACL,MAAM,EAAE,KAAK,CAAC,MAAM;oBACpB,WAAW,EAAE,KAAK,CAAC,WAAW;oBAC9B,eAAe,EAAE,KAAK,CAAC,SAAS;iBACjC,GACD,EACD,MAAM,IAAI,MAAM,KAAK,SAAS,IAAI,CACjC,0CACE,CAAC,EAAE,MAAM,GAAG,EAAE,EACd,CAAC,EAAE,MAAM,GAAG,EAAE,EACd,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,EACV,SAAS,EAAC,qBAAqB,YAE/B,gCAAK,SAAS,EAAC,kCAAkC,YAC/C,iCAAM,SAAS,EAAC,+FAA+F,YAC5G,MAAM,GACF,GACH,GACQ,CACjB,IACA,CACJ,CAAC;AACJ,CAAC;AAEY,QAAA,QAAQ,GAAG,IAAA,YAAI,EAAC,aAAa,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import '@xyflow/react/dist/style.css';
2
+ import type { ExecutionProjection } from '../../src/types';
3
+ interface FlowGraphProps {
4
+ projection: ExecutionProjection;
5
+ selectedNodeId: string | null;
6
+ onNodeSelect: (nodeId: string) => void;
7
+ }
8
+ export declare function FlowGraph({ projection, selectedNodeId, onNodeSelect }: FlowGraphProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
10
+ //# sourceMappingURL=FlowGraph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FlowGraph.d.ts","sourceRoot":"","sources":["../../../ui/components/FlowGraph.tsx"],"names":[],"mappings":"AAgBA,OAAO,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,mBAAmB,EAAkC,MAAM,iBAAiB,CAAC;AAkH3F,UAAU,cAAc;IACtB,UAAU,EAAE,mBAAmB,CAAC;IAChC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAED,wBAAgB,SAAS,CAAC,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,EAAE,EAAE,cAAc,2CAyDrF"}