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.
- package/dist/bridge/bridge.d.ts +34 -0
- package/dist/bridge/bridge.d.ts.map +1 -0
- package/dist/bridge/bridge.js +365 -0
- package/dist/bridge/bridge.js.map +1 -0
- package/dist/bridge/index.d.ts +3 -0
- package/dist/bridge/index.d.ts.map +1 -0
- package/dist/bridge/index.js +6 -0
- package/dist/bridge/index.js.map +1 -0
- package/dist/runtimes/copilot/copilot-adapter.d.ts +28 -0
- package/dist/runtimes/copilot/copilot-adapter.d.ts.map +1 -0
- package/dist/runtimes/copilot/copilot-adapter.js +50 -0
- package/dist/runtimes/copilot/copilot-adapter.js.map +1 -0
- package/dist/runtimes/copilot/copilot-backend.d.ts +49 -0
- package/dist/runtimes/copilot/copilot-backend.d.ts.map +1 -0
- package/dist/runtimes/copilot/copilot-backend.js +13 -0
- package/dist/runtimes/copilot/copilot-backend.js.map +1 -0
- package/dist/runtimes/copilot/index.d.ts +5 -0
- package/dist/runtimes/copilot/index.d.ts.map +1 -0
- package/dist/runtimes/copilot/index.js +11 -0
- package/dist/runtimes/copilot/index.js.map +1 -0
- package/dist/runtimes/copilot/process-killer.d.ts +13 -0
- package/dist/runtimes/copilot/process-killer.d.ts.map +1 -0
- package/dist/runtimes/copilot/process-killer.js +77 -0
- package/dist/runtimes/copilot/process-killer.js.map +1 -0
- package/dist/runtimes/copilot/subprocess-backend.d.ts +26 -0
- package/dist/runtimes/copilot/subprocess-backend.d.ts.map +1 -0
- package/dist/runtimes/copilot/subprocess-backend.js +308 -0
- package/dist/runtimes/copilot/subprocess-backend.js.map +1 -0
- package/dist/runtimes/mock/index.d.ts +3 -0
- package/dist/runtimes/mock/index.d.ts.map +1 -0
- package/dist/runtimes/mock/index.js +6 -0
- package/dist/runtimes/mock/index.js.map +1 -0
- package/dist/runtimes/mock/mock-runtime.d.ts +43 -0
- package/dist/runtimes/mock/mock-runtime.d.ts.map +1 -0
- package/dist/runtimes/mock/mock-runtime.js +153 -0
- package/dist/runtimes/mock/mock-runtime.js.map +1 -0
- package/dist/src/agent.d.ts +35 -0
- package/dist/src/agent.d.ts.map +1 -0
- package/dist/src/agent.js +257 -0
- package/dist/src/agent.js.map +1 -0
- package/dist/src/events.d.ts +153 -0
- package/dist/src/events.d.ts.map +1 -0
- package/dist/src/events.js +11 -0
- package/dist/src/events.js.map +1 -0
- package/dist/src/index.d.ts +8 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +24 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/nodes.d.ts +63 -0
- package/dist/src/nodes.d.ts.map +1 -0
- package/dist/src/nodes.js +120 -0
- package/dist/src/nodes.js.map +1 -0
- package/dist/src/scheduler.d.ts +11 -0
- package/dist/src/scheduler.d.ts.map +1 -0
- package/dist/src/scheduler.js +478 -0
- package/dist/src/scheduler.js.map +1 -0
- package/dist/src/types.d.ts +201 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +38 -0
- package/dist/src/types.js.map +1 -0
- package/dist/src/verify.d.ts +51 -0
- package/dist/src/verify.d.ts.map +1 -0
- package/dist/src/verify.js +126 -0
- package/dist/src/verify.js.map +1 -0
- package/dist/state/index.d.ts +5 -0
- package/dist/state/index.d.ts.map +1 -0
- package/dist/state/index.js +14 -0
- package/dist/state/index.js.map +1 -0
- package/dist/state/reducer.d.ts +11 -0
- package/dist/state/reducer.d.ts.map +1 -0
- package/dist/state/reducer.js +223 -0
- package/dist/state/reducer.js.map +1 -0
- package/dist/state/state-runtime.d.ts +30 -0
- package/dist/state/state-runtime.d.ts.map +1 -0
- package/dist/state/state-runtime.js +131 -0
- package/dist/state/state-runtime.js.map +1 -0
- package/dist/state/storage-memory.d.ts +24 -0
- package/dist/state/storage-memory.d.ts.map +1 -0
- package/dist/state/storage-memory.js +91 -0
- package/dist/state/storage-memory.js.map +1 -0
- package/dist/state/storage.d.ts +29 -0
- package/dist/state/storage.d.ts.map +1 -0
- package/dist/state/storage.js +175 -0
- package/dist/state/storage.js.map +1 -0
- package/dist/theme/index.d.ts +128 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +59 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/ui/ansi.d.ts +9 -0
- package/dist/ui/ansi.d.ts.map +1 -0
- package/dist/ui/ansi.js +78 -0
- package/dist/ui/ansi.js.map +1 -0
- package/dist/ui/components/FlowEdge.d.ts +5 -0
- package/dist/ui/components/FlowEdge.d.ts.map +1 -0
- package/dist/ui/components/FlowEdge.js +33 -0
- package/dist/ui/components/FlowEdge.js.map +1 -0
- package/dist/ui/components/FlowGraph.d.ts +10 -0
- package/dist/ui/components/FlowGraph.d.ts.map +1 -0
- package/dist/ui/components/FlowGraph.js +124 -0
- package/dist/ui/components/FlowGraph.js.map +1 -0
- package/dist/ui/components/FlowStatusBar.d.ts +7 -0
- package/dist/ui/components/FlowStatusBar.d.ts.map +1 -0
- package/dist/ui/components/FlowStatusBar.js +27 -0
- package/dist/ui/components/FlowStatusBar.js.map +1 -0
- package/dist/ui/components/MiniPipeline.d.ts +10 -0
- package/dist/ui/components/MiniPipeline.d.ts.map +1 -0
- package/dist/ui/components/MiniPipeline.js +155 -0
- package/dist/ui/components/MiniPipeline.js.map +1 -0
- package/dist/ui/components/NodeCard.d.ts +5 -0
- package/dist/ui/components/NodeCard.d.ts.map +1 -0
- package/dist/ui/components/NodeCard.js +39 -0
- package/dist/ui/components/NodeCard.js.map +1 -0
- package/dist/ui/components/NodeDetailPanel.d.ts +10 -0
- package/dist/ui/components/NodeDetailPanel.d.ts.map +1 -0
- package/dist/ui/components/NodeDetailPanel.js +38 -0
- package/dist/ui/components/NodeDetailPanel.js.map +1 -0
- package/dist/ui/components/node-panel/Controls.d.ts +16 -0
- package/dist/ui/components/node-panel/Controls.d.ts.map +1 -0
- package/dist/ui/components/node-panel/Controls.js +28 -0
- package/dist/ui/components/node-panel/Controls.js.map +1 -0
- package/dist/ui/components/node-panel/ErrorBar.d.ts +6 -0
- package/dist/ui/components/node-panel/ErrorBar.d.ts.map +1 -0
- package/dist/ui/components/node-panel/ErrorBar.js +14 -0
- package/dist/ui/components/node-panel/ErrorBar.js.map +1 -0
- package/dist/ui/components/node-panel/Gate.d.ts +13 -0
- package/dist/ui/components/node-panel/Gate.d.ts.map +1 -0
- package/dist/ui/components/node-panel/Gate.js +40 -0
- package/dist/ui/components/node-panel/Gate.js.map +1 -0
- package/dist/ui/components/node-panel/Header.d.ts +10 -0
- package/dist/ui/components/node-panel/Header.d.ts.map +1 -0
- package/dist/ui/components/node-panel/Header.js +19 -0
- package/dist/ui/components/node-panel/Header.js.map +1 -0
- package/dist/ui/components/node-panel/Info.d.ts +7 -0
- package/dist/ui/components/node-panel/Info.d.ts.map +1 -0
- package/dist/ui/components/node-panel/Info.js +23 -0
- package/dist/ui/components/node-panel/Info.js.map +1 -0
- package/dist/ui/components/node-panel/Output.d.ts +27 -0
- package/dist/ui/components/node-panel/Output.d.ts.map +1 -0
- package/dist/ui/components/node-panel/Output.js +66 -0
- package/dist/ui/components/node-panel/Output.js.map +1 -0
- package/dist/ui/components/node-panel/index.d.ts +47 -0
- package/dist/ui/components/node-panel/index.d.ts.map +1 -0
- package/dist/ui/components/node-panel/index.js +54 -0
- package/dist/ui/components/node-panel/index.js.map +1 -0
- package/dist/ui/components/node-panel/types.d.ts +23 -0
- package/dist/ui/components/node-panel/types.d.ts.map +1 -0
- package/dist/ui/components/node-panel/types.js +24 -0
- package/dist/ui/components/node-panel/types.js.map +1 -0
- package/dist/ui/core/components/Badge.d.ts +6 -0
- package/dist/ui/core/components/Badge.d.ts.map +1 -0
- package/dist/ui/core/components/Badge.js +11 -0
- package/dist/ui/core/components/Badge.js.map +1 -0
- package/dist/ui/core/components/Button.d.ts +9 -0
- package/dist/ui/core/components/Button.d.ts.map +1 -0
- package/dist/ui/core/components/Button.js +18 -0
- package/dist/ui/core/components/Button.js.map +1 -0
- package/dist/ui/core/components/ConfirmDialog.d.ts +11 -0
- package/dist/ui/core/components/ConfirmDialog.d.ts.map +1 -0
- package/dist/ui/core/components/ConfirmDialog.js +23 -0
- package/dist/ui/core/components/ConfirmDialog.js.map +1 -0
- package/dist/ui/core/components/ExecutionCard.d.ts +12 -0
- package/dist/ui/core/components/ExecutionCard.d.ts.map +1 -0
- package/dist/ui/core/components/ExecutionCard.js +15 -0
- package/dist/ui/core/components/ExecutionCard.js.map +1 -0
- package/dist/ui/core/components/NodeListItem.d.ts +10 -0
- package/dist/ui/core/components/NodeListItem.d.ts.map +1 -0
- package/dist/ui/core/components/NodeListItem.js +27 -0
- package/dist/ui/core/components/NodeListItem.js.map +1 -0
- package/dist/ui/core/components/PageHeader.d.ts +10 -0
- package/dist/ui/core/components/PageHeader.d.ts.map +1 -0
- package/dist/ui/core/components/PageHeader.js +9 -0
- package/dist/ui/core/components/PageHeader.js.map +1 -0
- package/dist/ui/core/components/SectionLabel.d.ts +6 -0
- package/dist/ui/core/components/SectionLabel.d.ts.map +1 -0
- package/dist/ui/core/components/SectionLabel.js +9 -0
- package/dist/ui/core/components/SectionLabel.js.map +1 -0
- package/dist/ui/core/components/Skeleton.d.ts +7 -0
- package/dist/ui/core/components/Skeleton.d.ts.map +1 -0
- package/dist/ui/core/components/Skeleton.js +26 -0
- package/dist/ui/core/components/Skeleton.js.map +1 -0
- package/dist/ui/core/components/Stat.d.ts +8 -0
- package/dist/ui/core/components/Stat.d.ts.map +1 -0
- package/dist/ui/core/components/Stat.js +9 -0
- package/dist/ui/core/components/Stat.js.map +1 -0
- package/dist/ui/core/components/Toast.d.ts +7 -0
- package/dist/ui/core/components/Toast.d.ts.map +1 -0
- package/dist/ui/core/components/Toast.js +28 -0
- package/dist/ui/core/components/Toast.js.map +1 -0
- package/dist/ui/core/components/__tests__/primitives.test.d.ts +2 -0
- package/dist/ui/core/components/__tests__/primitives.test.d.ts.map +1 -0
- package/dist/ui/core/components/__tests__/primitives.test.js +3 -0
- package/dist/ui/core/components/__tests__/primitives.test.js.map +1 -0
- package/dist/ui/core/components/index.d.ts +21 -0
- package/dist/ui/core/components/index.d.ts.map +1 -0
- package/dist/ui/core/components/index.js +24 -0
- package/dist/ui/core/components/index.js.map +1 -0
- package/dist/ui/core/index.d.ts +17 -0
- package/dist/ui/core/index.d.ts.map +1 -0
- package/dist/ui/core/index.js +56 -0
- package/dist/ui/core/index.js.map +1 -0
- package/dist/ui/core/utils.d.ts +6 -0
- package/dist/ui/core/utils.d.ts.map +1 -0
- package/dist/ui/core/utils.js +32 -0
- package/dist/ui/core/utils.js.map +1 -0
- package/dist/ui/graph/index.d.ts +4 -0
- package/dist/ui/graph/index.d.ts.map +1 -0
- package/dist/ui/graph/index.js +11 -0
- package/dist/ui/graph/index.js.map +1 -0
- package/dist/ui/hooks/useAutoSelectNode.d.ts +3 -0
- package/dist/ui/hooks/useAutoSelectNode.d.ts.map +1 -0
- package/dist/ui/hooks/useAutoSelectNode.js +36 -0
- package/dist/ui/hooks/useAutoSelectNode.js.map +1 -0
- package/dist/ui/hooks/useFlowExecution.d.ts +32 -0
- package/dist/ui/hooks/useFlowExecution.d.ts.map +1 -0
- package/dist/ui/hooks/useFlowExecution.js +113 -0
- package/dist/ui/hooks/useFlowExecution.js.map +1 -0
- package/dist/ui/hooks/useNodeNavigation.d.ts +3 -0
- package/dist/ui/hooks/useNodeNavigation.d.ts.map +1 -0
- package/dist/ui/hooks/useNodeNavigation.js +38 -0
- package/dist/ui/hooks/useNodeNavigation.js.map +1 -0
- package/dist/ui/hooks/useNodeOutput.d.ts +21 -0
- package/dist/ui/hooks/useNodeOutput.d.ts.map +1 -0
- package/dist/ui/hooks/useNodeOutput.js +75 -0
- package/dist/ui/hooks/useNodeOutput.js.map +1 -0
- package/dist/ui/index.d.ts +16 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +37 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/utils.d.ts +3 -0
- package/dist/ui/utils.d.ts.map +1 -0
- package/dist/ui/utils.js +9 -0
- package/dist/ui/utils.js.map +1 -0
- package/package.json +87 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.useFlowExecution = useFlowExecution;
|
|
5
|
+
exports.useFlowExecutions = useFlowExecutions;
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
/**
|
|
8
|
+
* Hook for a single flow execution: fetches projection + subscribes to SSE stream.
|
|
9
|
+
*
|
|
10
|
+
* Returns the current projection (updated in real-time via SSE) and status.
|
|
11
|
+
*/
|
|
12
|
+
function useFlowExecution({ executionId, baseUrl = '', pollInterval = 5000 }) {
|
|
13
|
+
const [projection, setProjection] = (0, react_1.useState)(null);
|
|
14
|
+
const [loading, setLoading] = (0, react_1.useState)(true);
|
|
15
|
+
const [error, setError] = (0, react_1.useState)(null);
|
|
16
|
+
const [sseStatus, setSseStatus] = (0, react_1.useState)('closed');
|
|
17
|
+
const sourceRef = (0, react_1.useRef)(null);
|
|
18
|
+
// Fetch the projection (initial load + fallback refresh)
|
|
19
|
+
const fetchProjection = (0, react_1.useCallback)(async () => {
|
|
20
|
+
if (!executionId)
|
|
21
|
+
return;
|
|
22
|
+
try {
|
|
23
|
+
const res = await fetch(`${baseUrl}/api/executions/${executionId}`);
|
|
24
|
+
if (!res.ok) {
|
|
25
|
+
setError(`Failed to fetch execution: ${res.status}`);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const data = (await res.json());
|
|
29
|
+
setProjection(data);
|
|
30
|
+
setError(null);
|
|
31
|
+
}
|
|
32
|
+
catch (err) {
|
|
33
|
+
setError(err instanceof Error ? err.message : 'Fetch error');
|
|
34
|
+
}
|
|
35
|
+
finally {
|
|
36
|
+
setLoading(false);
|
|
37
|
+
}
|
|
38
|
+
}, [executionId, baseUrl]);
|
|
39
|
+
// SSE subscription for real-time updates
|
|
40
|
+
(0, react_1.useEffect)(() => {
|
|
41
|
+
if (!executionId) {
|
|
42
|
+
setProjection(null);
|
|
43
|
+
setLoading(false);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
setLoading(true);
|
|
47
|
+
fetchProjection();
|
|
48
|
+
const url = `${baseUrl}/api/executions/${executionId}/stream`;
|
|
49
|
+
const source = new EventSource(url);
|
|
50
|
+
sourceRef.current = source;
|
|
51
|
+
setSseStatus('connecting');
|
|
52
|
+
source.onopen = () => setSseStatus('open');
|
|
53
|
+
source.onmessage = (event) => {
|
|
54
|
+
try {
|
|
55
|
+
const data = JSON.parse(event.data);
|
|
56
|
+
if (data.type === 'heartbeat')
|
|
57
|
+
return;
|
|
58
|
+
// Snapshot event: replace entire projection
|
|
59
|
+
if (data.type === 'snapshot' && data.projection) {
|
|
60
|
+
setProjection(data.projection);
|
|
61
|
+
setLoading(false);
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
// Live event: refetch projection to get updated state
|
|
65
|
+
fetchProjection();
|
|
66
|
+
}
|
|
67
|
+
catch {
|
|
68
|
+
// Ignore unparseable events
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
source.onerror = () => {
|
|
72
|
+
setSseStatus('error');
|
|
73
|
+
source.close();
|
|
74
|
+
sourceRef.current = null;
|
|
75
|
+
};
|
|
76
|
+
return () => {
|
|
77
|
+
source.close();
|
|
78
|
+
sourceRef.current = null;
|
|
79
|
+
setSseStatus('closed');
|
|
80
|
+
};
|
|
81
|
+
}, [executionId, baseUrl, fetchProjection]);
|
|
82
|
+
// Polling fallback when SSE is down
|
|
83
|
+
(0, react_1.useEffect)(() => {
|
|
84
|
+
if (sseStatus !== 'error' && sseStatus !== 'closed')
|
|
85
|
+
return;
|
|
86
|
+
if (!executionId)
|
|
87
|
+
return;
|
|
88
|
+
const timer = setInterval(fetchProjection, pollInterval);
|
|
89
|
+
return () => clearInterval(timer);
|
|
90
|
+
}, [sseStatus, executionId, pollInterval, fetchProjection]);
|
|
91
|
+
return { projection, loading, error, sseStatus, refetch: fetchProjection };
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Hook for the executions list.
|
|
95
|
+
*/
|
|
96
|
+
function useFlowExecutions(baseUrl = '') {
|
|
97
|
+
const [executions, setExecutions] = (0, react_1.useState)([]);
|
|
98
|
+
const [loading, setLoading] = (0, react_1.useState)(true);
|
|
99
|
+
const fetch_ = (0, react_1.useCallback)(async () => {
|
|
100
|
+
try {
|
|
101
|
+
const res = await fetch(`${baseUrl}/api/executions`);
|
|
102
|
+
if (res.ok) {
|
|
103
|
+
setExecutions((await res.json()));
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
finally {
|
|
107
|
+
setLoading(false);
|
|
108
|
+
}
|
|
109
|
+
}, [baseUrl]);
|
|
110
|
+
(0, react_1.useEffect)(() => { fetch_(); }, [fetch_]);
|
|
111
|
+
return { executions, loading, refetch: fetch_ };
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=useFlowExecution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFlowExecution.js","sourceRoot":"","sources":["../../../ui/hooks/useFlowExecution.ts"],"names":[],"mappings":";AAAA,YAAY,CAAC;;AAsBb,4CAuFC;AAKD,8CAkBC;AAlID,iCAAiE;AAejE;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,EAAE,WAAW,EAAE,OAAO,GAAG,EAAE,EAAE,YAAY,GAAG,IAAI,EAA2B;IAC1G,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,IAAA,gBAAQ,EAA6B,IAAI,CAAC,CAAC;IAC/E,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAC,IAAI,CAAC,CAAC;IAC7C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAgB,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,SAAS,EAAE,YAAY,CAA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|
+
{"version":3,"file":"useNodeNavigation.d.ts","sourceRoot":"","sources":["../../../ui/hooks/useNodeNavigation.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,cAAc,EAAE,EACvB,UAAU,EAAE,MAAM,GAAG,IAAI,EACzB,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,GACpC,IAAI,CAkCN"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.useNodeNavigation = useNodeNavigation;
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
function useNodeNavigation(nodes, selectedId, onSelect) {
|
|
7
|
+
(0, react_1.useEffect)(() => {
|
|
8
|
+
if (nodes.length === 0)
|
|
9
|
+
return;
|
|
10
|
+
function handleKeyDown(e) {
|
|
11
|
+
// Skip when focus is in an input or textarea
|
|
12
|
+
const tag = e.target?.tagName;
|
|
13
|
+
if (tag === 'INPUT' || tag === 'TEXTAREA')
|
|
14
|
+
return;
|
|
15
|
+
if (e.key === 'Escape') {
|
|
16
|
+
onSelect(null);
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
if (e.key === 'j' || e.key === 'ArrowDown') {
|
|
20
|
+
e.preventDefault();
|
|
21
|
+
const idx = selectedId ? nodes.findIndex(n => n.id === selectedId) : -1;
|
|
22
|
+
const next = (idx + 1) % nodes.length;
|
|
23
|
+
onSelect(nodes[next].id);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
if (e.key === 'k' || e.key === 'ArrowUp') {
|
|
27
|
+
e.preventDefault();
|
|
28
|
+
const idx = selectedId ? nodes.findIndex(n => n.id === selectedId) : 0;
|
|
29
|
+
const prev = (idx - 1 + nodes.length) % nodes.length;
|
|
30
|
+
onSelect(nodes[prev].id);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
35
|
+
return () => document.removeEventListener('keydown', handleKeyDown);
|
|
36
|
+
}, [nodes, selectedId, onSelect]);
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=useNodeNavigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNodeNavigation.js","sourceRoot":"","sources":["../../../ui/hooks/useNodeNavigation.ts"],"names":[],"mappings":";AAAA,YAAY,CAAC;;AAKb,8CAsCC;AAzCD,iCAAkC;AAGlC,SAAgB,iBAAiB,CAC/B,KAAuB,EACvB,UAAyB,EACzB,QAAqC;IAErC,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO;QAE/B,SAAS,aAAa,CAAC,CAAgB;YACrC,6CAA6C;YAC7C,MAAM,GAAG,GAAI,CAAC,CAAC,MAAsB,EAAE,OAAO,CAAC;YAC/C,IAAI,GAAG,KAAK,OAAO,IAAI,GAAG,KAAK,UAAU;gBAAE,OAAO;YAElD,IAAI,CAAC,CAAC,GAAG,KAAK,QAAQ,EAAE,CAAC;gBACvB,QAAQ,CAAC,IAAI,CAAC,CAAC;gBACf,OAAO;YACT,CAAC;YAED,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,GAAG,KAAK,WAAW,EAAE,CAAC;gBAC3C,CAAC,CAAC,cAAc,EAAE,CAAC;gBACnB,MAAM,GAAG,GAAG,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBACxE,MAAM,IAAI,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC;gBACtC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;gBACzB,OAAO;YACT,CAAC;YAED,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,GAAG,KAAK,SAAS,EAAE,CAAC;gBACzC,CAAC,CAAC,cAAc,EAAE,CAAC;gBACnB,MAAM,GAAG,GAAG,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBACvE,MAAM,IAAI,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC;gBACrD,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;gBACzB,OAAO;YACT,CAAC;QACH,CAAC;QAED,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;QACpD,OAAO,GAAG,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;IACtE,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
interface UseNodeOutputOptions {
|
|
2
|
+
executionId: string | null;
|
|
3
|
+
nodeId: string | null;
|
|
4
|
+
/** Base URL for API requests (default: ''). */
|
|
5
|
+
baseUrl?: string;
|
|
6
|
+
/** Whether to auto-scroll to bottom on new output (default: true) */
|
|
7
|
+
autoScroll?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Hook for per-node output streaming.
|
|
11
|
+
* Fetches initial output, then subscribes to SSE for live updates.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useNodeOutput({ executionId, nodeId, baseUrl, autoScroll }: UseNodeOutputOptions): {
|
|
14
|
+
lines: string[];
|
|
15
|
+
total: number;
|
|
16
|
+
loading: boolean;
|
|
17
|
+
scrollRef: import("react").RefObject<HTMLElement | null>;
|
|
18
|
+
refetch: () => Promise<void>;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=useNodeOutput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNodeOutput.d.ts","sourceRoot":"","sources":["../../../ui/hooks/useNodeOutput.ts"],"names":[],"mappings":"AAKA,UAAU,oBAAoB;IAC5B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qEAAqE;IACrE,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,OAAY,EAAE,UAAiB,EAAE,EAAE,oBAAoB;;;;;;EAqE3G"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.useNodeOutput = useNodeOutput;
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
/**
|
|
7
|
+
* Hook for per-node output streaming.
|
|
8
|
+
* Fetches initial output, then subscribes to SSE for live updates.
|
|
9
|
+
*/
|
|
10
|
+
function useNodeOutput({ executionId, nodeId, baseUrl = '', autoScroll = true }) {
|
|
11
|
+
const [lines, setLines] = (0, react_1.useState)([]);
|
|
12
|
+
const [loading, setLoading] = (0, react_1.useState)(false);
|
|
13
|
+
const [total, setTotal] = (0, react_1.useState)(0);
|
|
14
|
+
const sourceRef = (0, react_1.useRef)(null);
|
|
15
|
+
const scrollRef = (0, react_1.useRef)(null);
|
|
16
|
+
// Fetch initial output
|
|
17
|
+
const fetchOutput = (0, react_1.useCallback)(async () => {
|
|
18
|
+
if (!executionId || !nodeId)
|
|
19
|
+
return;
|
|
20
|
+
setLoading(true);
|
|
21
|
+
try {
|
|
22
|
+
const res = await fetch(`${baseUrl}/api/executions/${executionId}/nodes/${nodeId}/output?limit=10000`);
|
|
23
|
+
if (res.ok) {
|
|
24
|
+
const page = (await res.json());
|
|
25
|
+
setLines(page.lines);
|
|
26
|
+
setTotal(page.total);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
finally {
|
|
30
|
+
setLoading(false);
|
|
31
|
+
}
|
|
32
|
+
}, [executionId, nodeId, baseUrl]);
|
|
33
|
+
// SSE for live output
|
|
34
|
+
(0, react_1.useEffect)(() => {
|
|
35
|
+
if (!executionId || !nodeId) {
|
|
36
|
+
setLines([]);
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
fetchOutput();
|
|
40
|
+
const url = `${baseUrl}/api/executions/${executionId}/nodes/${nodeId}/stream`;
|
|
41
|
+
const source = new EventSource(url);
|
|
42
|
+
sourceRef.current = source;
|
|
43
|
+
source.onmessage = (event) => {
|
|
44
|
+
try {
|
|
45
|
+
const data = JSON.parse(event.data);
|
|
46
|
+
if (data.type === 'heartbeat')
|
|
47
|
+
return;
|
|
48
|
+
if (data.type === 'node:output' && data.content) {
|
|
49
|
+
setLines((prev) => [...prev, data.content]);
|
|
50
|
+
setTotal((prev) => prev + 1);
|
|
51
|
+
// Auto-scroll
|
|
52
|
+
if (autoScroll && scrollRef.current) {
|
|
53
|
+
requestAnimationFrame(() => {
|
|
54
|
+
scrollRef.current?.scrollTo({
|
|
55
|
+
top: scrollRef.current.scrollHeight,
|
|
56
|
+
behavior: 'smooth',
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
catch { /* ignore */ }
|
|
63
|
+
};
|
|
64
|
+
source.onerror = () => {
|
|
65
|
+
source.close();
|
|
66
|
+
sourceRef.current = null;
|
|
67
|
+
};
|
|
68
|
+
return () => {
|
|
69
|
+
source.close();
|
|
70
|
+
sourceRef.current = null;
|
|
71
|
+
};
|
|
72
|
+
}, [executionId, nodeId, baseUrl, fetchOutput, autoScroll]);
|
|
73
|
+
return { lines, total, loading, scrollRef, refetch: fetchOutput };
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=useNodeOutput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNodeOutput.js","sourceRoot":"","sources":["../../../ui/hooks/useNodeOutput.ts"],"names":[],"mappings":";AAAA,YAAY,CAAC;;AAkBb,sCAqEC;AArFD,iCAAiE;AAYjE;;;GAGG;AACH,SAAgB,aAAa,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,GAAG,EAAE,EAAE,UAAU,GAAG,IAAI,EAAwB;IAC1G,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAW,EAAE,CAAC,CAAC;IACjD,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAC9C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAC,CAAC,CAAC,CAAC;IACtC,MAAM,SAAS,GAAG,IAAA,cAAM,EAAqB,IAAI,CAAC,CAAC;IACnD,MAAM,SAAS,GAAG,IAAA,cAAM,EAAqB,IAAI,CAAC,CAAC;IAEnD,uBAAuB;IACvB,MAAM,WAAW,GAAG,IAAA,mBAAW,EAAC,KAAK,IAAI,EAAE;QACzC,IAAI,CAAC,WAAW,IAAI,CAAC,MAAM;YAAE,OAAO;QACpC,UAAU,CAAC,IAAI,CAAC,CAAC;QACjB,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,OAAO,mBAAmB,WAAW,UAAU,MAAM,qBAAqB,CAAC,CAAC;YACvG,IAAI,G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,UAAU,IAAI,SAAS,CAAC,OAAO,EAAE,CAAC;wBACpC,qBAAqB,CAAC,GAAG,EAAE;4BACzB,SAAS,CAAC,OAAO,EAAE,QAAQ,CAAC;gCAC1B,GAAG,EAAE,SAAS,CAAC,OAAO,CAAC,YAAY;gCACnC,QAAQ,EAAE,QAAQ;6BACnB,CAAC,CAAC;wBACL,CAAC,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC;YACH,CAAC;YAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC;QAC1B,CAAC,CAAC;QAEF,MAAM,CAAC,OAAO,GAAG,GAAG,EAAE;YACpB,MAAM,CAAC,KAAK,EAAE,CAAC;YACf,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC;QAC3B,CAAC,CAAC;QAEF,OAAO,GAAG,EAAE;YACV,MAAM,CAAC,KAAK,EAAE,CAAC;YACf,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC;QAC3B,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC;IAE5D,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC;AACpE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { FlowGraph } from './components/FlowGraph';
|
|
2
|
+
export { NodeCard } from './components/NodeCard';
|
|
3
|
+
export { FlowEdge } from './components/FlowEdge';
|
|
4
|
+
export { NodeDetailPanel } from './components/NodeDetailPanel';
|
|
5
|
+
export { FlowStatusBar } from './components/FlowStatusBar';
|
|
6
|
+
export { MiniPipeline } from './components/MiniPipeline';
|
|
7
|
+
export type { MiniPipelineProps } from './components/MiniPipeline';
|
|
8
|
+
export { NodePanel } from './components/node-panel/index';
|
|
9
|
+
export type { OutputRenderer } from './components/node-panel/index';
|
|
10
|
+
export { STATUS_COLORS } from './components/node-panel/types';
|
|
11
|
+
export { useFlowExecution, useFlowExecutions } from './hooks/useFlowExecution';
|
|
12
|
+
export type { FlowSSEStatus } from './hooks/useFlowExecution';
|
|
13
|
+
export { useNodeOutput } from './hooks/useNodeOutput';
|
|
14
|
+
export { ansiToHtml, stripAnsi, hasAnsi } from './ansi';
|
|
15
|
+
export { cn } from './utils';
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../ui/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAG3D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,YAAY,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAGnE,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC1D,YAAY,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAG9D,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC/E,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAGtD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAGxD,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/ui/index.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cn = exports.hasAnsi = exports.stripAnsi = exports.ansiToHtml = exports.useNodeOutput = exports.useFlowExecutions = exports.useFlowExecution = exports.STATUS_COLORS = exports.NodePanel = exports.MiniPipeline = exports.FlowStatusBar = exports.NodeDetailPanel = exports.FlowEdge = exports.NodeCard = exports.FlowGraph = void 0;
|
|
4
|
+
// Components
|
|
5
|
+
var FlowGraph_1 = require("./components/FlowGraph");
|
|
6
|
+
Object.defineProperty(exports, "FlowGraph", { enumerable: true, get: function () { return FlowGraph_1.FlowGraph; } });
|
|
7
|
+
var NodeCard_1 = require("./components/NodeCard");
|
|
8
|
+
Object.defineProperty(exports, "NodeCard", { enumerable: true, get: function () { return NodeCard_1.NodeCard; } });
|
|
9
|
+
var FlowEdge_1 = require("./components/FlowEdge");
|
|
10
|
+
Object.defineProperty(exports, "FlowEdge", { enumerable: true, get: function () { return FlowEdge_1.FlowEdge; } });
|
|
11
|
+
var NodeDetailPanel_1 = require("./components/NodeDetailPanel");
|
|
12
|
+
Object.defineProperty(exports, "NodeDetailPanel", { enumerable: true, get: function () { return NodeDetailPanel_1.NodeDetailPanel; } });
|
|
13
|
+
var FlowStatusBar_1 = require("./components/FlowStatusBar");
|
|
14
|
+
Object.defineProperty(exports, "FlowStatusBar", { enumerable: true, get: function () { return FlowStatusBar_1.FlowStatusBar; } });
|
|
15
|
+
// MiniPipeline (ADR-004)
|
|
16
|
+
var MiniPipeline_1 = require("./components/MiniPipeline");
|
|
17
|
+
Object.defineProperty(exports, "MiniPipeline", { enumerable: true, get: function () { return MiniPipeline_1.MiniPipeline; } });
|
|
18
|
+
// Compound NodePanel (ADR-003)
|
|
19
|
+
var index_1 = require("./components/node-panel/index");
|
|
20
|
+
Object.defineProperty(exports, "NodePanel", { enumerable: true, get: function () { return index_1.NodePanel; } });
|
|
21
|
+
var types_1 = require("./components/node-panel/types");
|
|
22
|
+
Object.defineProperty(exports, "STATUS_COLORS", { enumerable: true, get: function () { return types_1.STATUS_COLORS; } });
|
|
23
|
+
// Hooks
|
|
24
|
+
var useFlowExecution_1 = require("./hooks/useFlowExecution");
|
|
25
|
+
Object.defineProperty(exports, "useFlowExecution", { enumerable: true, get: function () { return useFlowExecution_1.useFlowExecution; } });
|
|
26
|
+
Object.defineProperty(exports, "useFlowExecutions", { enumerable: true, get: function () { return useFlowExecution_1.useFlowExecutions; } });
|
|
27
|
+
var useNodeOutput_1 = require("./hooks/useNodeOutput");
|
|
28
|
+
Object.defineProperty(exports, "useNodeOutput", { enumerable: true, get: function () { return useNodeOutput_1.useNodeOutput; } });
|
|
29
|
+
// ANSI terminal output utilities
|
|
30
|
+
var ansi_1 = require("./ansi");
|
|
31
|
+
Object.defineProperty(exports, "ansiToHtml", { enumerable: true, get: function () { return ansi_1.ansiToHtml; } });
|
|
32
|
+
Object.defineProperty(exports, "stripAnsi", { enumerable: true, get: function () { return ansi_1.stripAnsi; } });
|
|
33
|
+
Object.defineProperty(exports, "hasAnsi", { enumerable: true, get: function () { return ansi_1.hasAnsi; } });
|
|
34
|
+
// Utilities
|
|
35
|
+
var utils_1 = require("./utils");
|
|
36
|
+
Object.defineProperty(exports, "cn", { enumerable: true, get: function () { return utils_1.cn; } });
|
|
37
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../ui/index.ts"],"names":[],"mappings":";;;AAAA,aAAa;AACb,oDAAmD;AAA1C,sGAAA,SAAS,OAAA;AAClB,kDAAiD;AAAxC,oGAAA,QAAQ,OAAA;AACjB,kDAAiD;AAAxC,oGAAA,QAAQ,OAAA;AACjB,gEAA+D;AAAtD,kHAAA,eAAe,OAAA;AACxB,4DAA2D;AAAlD,8GAAA,aAAa,OAAA;AAEtB,yBAAyB;AACzB,0DAAyD;AAAhD,4GAAA,YAAY,OAAA;AAGrB,+BAA+B;AAC/B,uDAA0D;AAAjD,kGAAA,SAAS,OAAA;AAElB,uDAA8D;AAArD,sGAAA,aAAa,OAAA;AAEtB,QAAQ;AACR,6DAA+E;AAAtE,oHAAA,gBAAgB,OAAA;AAAE,qHAAA,iBAAiB,OAAA;AAE5C,uDAAsD;AAA7C,8GAAA,aAAa,OAAA;AAEtB,iCAAiC;AACjC,+BAAwD;AAA/C,kGAAA,UAAU,OAAA;AAAE,iGAAA,SAAS,OAAA;AAAE,+FAAA,OAAO,OAAA;AAEvC,YAAY;AACZ,iCAA6B;AAApB,2FAAA,EAAE,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../ui/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAA;AAG5C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
|
package/dist/ui/utils.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cn = cn;
|
|
4
|
+
const clsx_1 = require("clsx");
|
|
5
|
+
const tailwind_merge_1 = require("tailwind-merge");
|
|
6
|
+
function cn(...inputs) {
|
|
7
|
+
return (0, tailwind_merge_1.twMerge)((0, clsx_1.clsx)(inputs));
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../ui/utils.ts"],"names":[],"mappings":";;AAGA,gBAEC;AALD,+BAA4C;AAC5C,mDAAwC;AAExC,SAAgB,EAAE,CAAC,GAAG,MAAoB;IACxC,OAAO,IAAA,wBAAO,EAAC,IAAA,WAAI,EAAC,MAAM,CAAC,CAAC,CAAA;AAC9B,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "condukt",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Composable AI agent workflow framework — execution, state, orchestration, runtimes, UI",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/animeshkundu/condukt.git"
|
|
9
|
+
},
|
|
10
|
+
"keywords": ["pipeline", "workflow", "agent", "ai", "flow", "orchestration", "ui", "dashboard"],
|
|
11
|
+
"main": "./dist/src/index.js",
|
|
12
|
+
"types": "./dist/src/index.d.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/src/index.d.ts",
|
|
16
|
+
"default": "./dist/src/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./state": {
|
|
19
|
+
"types": "./dist/state/index.d.ts",
|
|
20
|
+
"default": "./dist/state/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./bridge": {
|
|
23
|
+
"types": "./dist/bridge/index.d.ts",
|
|
24
|
+
"default": "./dist/bridge/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./runtimes/copilot": {
|
|
27
|
+
"types": "./dist/runtimes/copilot/index.d.ts",
|
|
28
|
+
"default": "./dist/runtimes/copilot/index.js"
|
|
29
|
+
},
|
|
30
|
+
"./runtimes/mock": {
|
|
31
|
+
"types": "./dist/runtimes/mock/index.d.ts",
|
|
32
|
+
"default": "./dist/runtimes/mock/index.js"
|
|
33
|
+
},
|
|
34
|
+
"./ui": {
|
|
35
|
+
"types": "./dist/ui/index.d.ts",
|
|
36
|
+
"default": "./dist/ui/index.js"
|
|
37
|
+
},
|
|
38
|
+
"./ui/core": {
|
|
39
|
+
"types": "./dist/ui/core/index.d.ts",
|
|
40
|
+
"default": "./dist/ui/core/index.js"
|
|
41
|
+
},
|
|
42
|
+
"./ui/graph": {
|
|
43
|
+
"types": "./dist/ui/graph/index.d.ts",
|
|
44
|
+
"default": "./dist/ui/graph/index.js"
|
|
45
|
+
},
|
|
46
|
+
"./theme": {
|
|
47
|
+
"types": "./dist/theme/index.d.ts",
|
|
48
|
+
"default": "./dist/theme/index.js"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"files": [
|
|
52
|
+
"dist"
|
|
53
|
+
],
|
|
54
|
+
"scripts": {
|
|
55
|
+
"build": "tsc -p tsconfig.build.json",
|
|
56
|
+
"test": "vitest run",
|
|
57
|
+
"test:watch": "vitest",
|
|
58
|
+
"typecheck": "tsc --noEmit",
|
|
59
|
+
"clean": "rm -rf dist"
|
|
60
|
+
},
|
|
61
|
+
"peerDependencies": {
|
|
62
|
+
"@xyflow/react": ">=12",
|
|
63
|
+
"react": ">=18"
|
|
64
|
+
},
|
|
65
|
+
"peerDependenciesMeta": {
|
|
66
|
+
"react": {
|
|
67
|
+
"optional": true
|
|
68
|
+
},
|
|
69
|
+
"@xyflow/react": {
|
|
70
|
+
"optional": true
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"devDependencies": {
|
|
74
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
75
|
+
"@testing-library/react": "^16.3.2",
|
|
76
|
+
"@types/node": "^22.15.3",
|
|
77
|
+
"@types/react": "^19.1.4",
|
|
78
|
+
"@xyflow/react": "^12.10.1",
|
|
79
|
+
"clsx": "^2.1.1",
|
|
80
|
+
"jsdom": "^28.1.0",
|
|
81
|
+
"react": "^19.2.3",
|
|
82
|
+
"react-dom": "^19.2.3",
|
|
83
|
+
"tailwind-merge": "^3.5.0",
|
|
84
|
+
"typescript": "^5.9.3",
|
|
85
|
+
"vitest": "^4.0.18"
|
|
86
|
+
}
|
|
87
|
+
}
|