@ultrst-armada/floks 2.0.8 → 2.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.krusbl-release-attestation.json +3 -3
- package/package.json +2 -2
- package/packages/canvas-ui/dist/chunk-DAAI7BIG.js +625 -0
- package/packages/canvas-ui/dist/fod/FodAuthorizedRemoteNodes.test.d.ts +1 -0
- package/packages/canvas-ui/dist/fod/FodModule.authorization.test.d.ts +1 -0
- package/packages/canvas-ui/dist/fod/FodModule.d.ts +27 -1
- package/packages/canvas-ui/dist/fod/FodPassiveNavigationAdversarial.test.d.ts +1 -0
- package/packages/canvas-ui/dist/fod/FodRemoteExecution.test.d.ts +1 -0
- package/packages/canvas-ui/dist/fod/index.d.ts +3 -0
- package/packages/canvas-ui/dist/fod/index.js +25 -3
- package/packages/canvas-ui/dist/fod/remoteAuthorizationFingerprint.d.ts +10 -0
- package/packages/canvas-ui/dist/fod/remoteAuthorizationFingerprint.test.d.ts +1 -0
- package/packages/canvas-ui/dist/fod/remoteGraphConnections.d.ts +40 -0
- package/packages/canvas-ui/dist/fod/remoteGraphConnections.test.d.ts +1 -0
- package/packages/canvas-ui/dist/fod/remoteGraphContract.d.ts +37 -0
- package/packages/canvas-ui/dist/fod/remoteGraphContract.test.d.ts +1 -0
- package/packages/canvas-ui/dist/fod/remoteKloksInvocation.d.ts +29 -0
- package/packages/canvas-ui/dist/fod/remoteKloksInvocation.test.d.ts +1 -0
- package/packages/canvas-ui/dist/index.js +30 -8
- package/packages/ui/dist/chunk-5Y2HGI37.js +443 -0
- package/packages/ui/dist/{chunk-XMRSW4TL.js → chunk-6J5J56YO.js} +31 -79
- package/packages/ui/dist/{chunk-KIFQA7L6.js → chunk-CIH4FVXM.js} +22 -34
- package/packages/ui/dist/chunk-F5XUUMSI.js +14 -0
- package/packages/ui/dist/{chunk-MYXPGPI3.js → chunk-KMVDLACR.js} +25 -2
- package/packages/ui/dist/{chunk-FA6GHJKU.js → chunk-SJPSY27C.js} +163 -5
- package/packages/ui/dist/components/ai/chat/AgentChatDock.d.ts +12 -0
- package/packages/ui/dist/components/ai/chat/AgentChatPanel.d.ts +11 -0
- package/packages/ui/dist/components/ai/chat/AgentChatPanel.test.d.ts +1 -0
- package/packages/ui/dist/components/ai/chat/AgentChatTypes.d.ts +39 -0
- package/packages/ui/dist/components/ai/chat/index.d.ts +3 -0
- package/packages/ui/dist/components/ai/index.js +17 -4
- package/packages/ui/dist/components/auth/LuthOidcGate.d.ts +29 -0
- package/packages/ui/dist/components/auth/index.d.ts +1 -0
- package/packages/ui/dist/components/auth/index.js +5 -1
- package/packages/ui/dist/components/base/index.js +4 -2
- package/packages/ui/dist/components/layout/AppShell.d.ts +2 -0
- package/packages/ui/dist/components/layout/index.js +3 -1
- package/packages/ui/dist/index.js +24 -6
- package/packages/ui/package.json +1 -1
- package/packages/canvas-ui/dist/chunk-24JGPSGO.js +0 -162
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
BreadcrumbNav,
|
|
58
58
|
HeaderBar,
|
|
59
59
|
TopToolbar
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-KMVDLACR.js";
|
|
61
61
|
import {
|
|
62
62
|
AccountsSettingsSection,
|
|
63
63
|
SettingsTab,
|
|
@@ -151,7 +151,6 @@ import {
|
|
|
151
151
|
AgentExecutionCard,
|
|
152
152
|
DirectChatHeader,
|
|
153
153
|
DirectChatInput,
|
|
154
|
-
DirectChatMessageList,
|
|
155
154
|
EmailProfileCard,
|
|
156
155
|
EmailProfileRegistrationForm,
|
|
157
156
|
EmailProviderRow,
|
|
@@ -169,14 +168,24 @@ import {
|
|
|
169
168
|
SingleKeyForm,
|
|
170
169
|
TimelineScrubber,
|
|
171
170
|
getProviderIcon
|
|
172
|
-
} from "./chunk-
|
|
171
|
+
} from "./chunk-6J5J56YO.js";
|
|
173
172
|
import {
|
|
174
173
|
BaseSelect,
|
|
175
|
-
BaseTextarea,
|
|
176
174
|
BaseToggle,
|
|
177
175
|
CredentialField,
|
|
178
176
|
KNOWN_CREDENTIAL_URLS
|
|
179
|
-
} from "./chunk-
|
|
177
|
+
} from "./chunk-CIH4FVXM.js";
|
|
178
|
+
import {
|
|
179
|
+
AgentChatDock,
|
|
180
|
+
AgentChatPanel,
|
|
181
|
+
DirectChatMessageList,
|
|
182
|
+
agentChatLabel,
|
|
183
|
+
matchAgentMentions,
|
|
184
|
+
selectedAgentIsValid
|
|
185
|
+
} from "./chunk-5Y2HGI37.js";
|
|
186
|
+
import {
|
|
187
|
+
BaseTextarea
|
|
188
|
+
} from "./chunk-F5XUUMSI.js";
|
|
180
189
|
import {
|
|
181
190
|
BaseTooltip
|
|
182
191
|
} from "./chunk-GKP6KHTI.js";
|
|
@@ -195,14 +204,16 @@ import {
|
|
|
195
204
|
LuthAuthClient,
|
|
196
205
|
LuthAuthError,
|
|
197
206
|
LuthAuthPage,
|
|
207
|
+
LuthOidcGate,
|
|
198
208
|
LuthProtectedRoute,
|
|
199
209
|
authPageDefinition,
|
|
200
210
|
createLuthAuthClient,
|
|
201
211
|
createLuthAuthClientForApplication,
|
|
202
212
|
resolveLuthEnvironment,
|
|
203
213
|
resolveLuthOrigin,
|
|
214
|
+
useApplicationOidcAuth,
|
|
204
215
|
useLuthAuth
|
|
205
|
-
} from "./chunk-
|
|
216
|
+
} from "./chunk-SJPSY27C.js";
|
|
206
217
|
import {
|
|
207
218
|
frnlButton,
|
|
208
219
|
frnlButtonDefinition,
|
|
@@ -240,6 +251,8 @@ export {
|
|
|
240
251
|
AIProviderSelector,
|
|
241
252
|
AUTH_PAGE_REQUIRED_SERVICES,
|
|
242
253
|
AccountsSettingsSection,
|
|
254
|
+
AgentChatDock,
|
|
255
|
+
AgentChatPanel,
|
|
243
256
|
AgentExecutionCard,
|
|
244
257
|
ApiCallIndicator,
|
|
245
258
|
AppShell,
|
|
@@ -311,6 +324,7 @@ export {
|
|
|
311
324
|
LuthAuthClient,
|
|
312
325
|
LuthAuthError,
|
|
313
326
|
LuthAuthPage,
|
|
327
|
+
LuthOidcGate,
|
|
314
328
|
LuthProtectedRoute,
|
|
315
329
|
MIDI_MAX,
|
|
316
330
|
MIDI_MIN,
|
|
@@ -359,6 +373,7 @@ export {
|
|
|
359
373
|
WorkspaceSecondaryClonesPanel,
|
|
360
374
|
WorkspaceStorageReadonlyPanel,
|
|
361
375
|
WorkspaceTilesMenu,
|
|
376
|
+
agentChatLabel,
|
|
362
377
|
appThemeEngine,
|
|
363
378
|
applyPaletteToDocument,
|
|
364
379
|
applyThemePack,
|
|
@@ -397,15 +412,18 @@ export {
|
|
|
397
412
|
getProviderIcon,
|
|
398
413
|
getThemeEngineStatus,
|
|
399
414
|
getUIElement,
|
|
415
|
+
matchAgentMentions,
|
|
400
416
|
paletteToSkipoThemePack,
|
|
401
417
|
registerUIElement,
|
|
402
418
|
resolveLuthEnvironment,
|
|
403
419
|
resolveLuthOrigin,
|
|
404
420
|
resolveTypographyCascade,
|
|
405
421
|
safeValidateModularThemePack,
|
|
422
|
+
selectedAgentIsValid,
|
|
406
423
|
subscribeToPalette,
|
|
407
424
|
tilesMenuDefinition,
|
|
408
425
|
tokensToCssVariables,
|
|
426
|
+
useApplicationOidcAuth,
|
|
409
427
|
useBottomStrip,
|
|
410
428
|
useFloksFrnlStore,
|
|
411
429
|
useLuthAuth,
|
package/packages/ui/package.json
CHANGED
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
FrnlEditableNodeGraph
|
|
3
|
-
} from "./chunk-SRGVIYC5.js";
|
|
4
|
-
|
|
5
|
-
// src/fod/FodModule.tsx
|
|
6
|
-
import { useEffect, useMemo, useRef, useState } from "react";
|
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
function toGraphNodes(flow, nodeDefinitions) {
|
|
9
|
-
const defs = new Map(nodeDefinitions.map((def) => [def.type, def]));
|
|
10
|
-
return flow.nodes.map((node) => {
|
|
11
|
-
const def = defs.get(node.type);
|
|
12
|
-
return {
|
|
13
|
-
id: node.id,
|
|
14
|
-
type: node.type,
|
|
15
|
-
label: def?.label ?? String(node.data.label ?? node.type),
|
|
16
|
-
position: node.position,
|
|
17
|
-
data: node.data,
|
|
18
|
-
inputs: (def?.inputs ?? []).map((port) => ({ id: port.id, label: port.name, type: "input", dataType: port.dataType })),
|
|
19
|
-
outputs: (def?.outputs ?? []).map((port) => ({ id: port.id, label: port.name, type: "output", dataType: port.dataType })),
|
|
20
|
-
width: 190,
|
|
21
|
-
height: Math.max(90, 60 + Math.max(def?.inputs.length ?? 0, def?.outputs.length ?? 0) * 24)
|
|
22
|
-
};
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
function toGraphEdges(flow) {
|
|
26
|
-
return flow.edges.map((edge) => ({ id: edge.id, source: edge.source, sourceSocket: edge.sourceHandle ?? "result", target: edge.target, targetSocket: edge.targetHandle ?? "input" }));
|
|
27
|
-
}
|
|
28
|
-
function FodModule(props) {
|
|
29
|
-
return /* @__PURE__ */ jsx(WorkspaceFlows, { ...props }, props.workspaceId);
|
|
30
|
-
}
|
|
31
|
-
function WorkspaceFlows({ runtime, nodeDefinitions, workspaceId, className }) {
|
|
32
|
-
const drafts = useRef(/* @__PURE__ */ new Map());
|
|
33
|
-
const [flows, setFlows] = useState([]);
|
|
34
|
-
const [activeId, setActiveId] = useState(null);
|
|
35
|
-
const [flow, setFlow] = useState(null);
|
|
36
|
-
const [selected, setSelected] = useState(/* @__PURE__ */ new Set());
|
|
37
|
-
const [message, setMessage] = useState("");
|
|
38
|
-
const [running, setRunning] = useState(false);
|
|
39
|
-
const refresh = async () => {
|
|
40
|
-
const saved = await runtime.listFlows();
|
|
41
|
-
const merged = new Map(saved.map((item) => [item.id, item]));
|
|
42
|
-
for (const [id, draft] of drafts.current) merged.set(id, draft);
|
|
43
|
-
const next = [...merged.values()];
|
|
44
|
-
setFlows(next);
|
|
45
|
-
setActiveId((current) => current ?? next[0]?.id ?? null);
|
|
46
|
-
};
|
|
47
|
-
useEffect(() => {
|
|
48
|
-
void refresh().catch((error) => setMessage(String(error)));
|
|
49
|
-
}, [runtime]);
|
|
50
|
-
useEffect(() => {
|
|
51
|
-
let current = true;
|
|
52
|
-
const draft = activeId ? drafts.current.get(activeId) : void 0;
|
|
53
|
-
setFlow(draft ?? null);
|
|
54
|
-
if (activeId && !draft) {
|
|
55
|
-
void runtime.getFlow(activeId).then((saved) => {
|
|
56
|
-
if (current) setFlow(saved);
|
|
57
|
-
}).catch((error) => {
|
|
58
|
-
if (current) setMessage(String(error));
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
return () => {
|
|
62
|
-
current = false;
|
|
63
|
-
};
|
|
64
|
-
}, [activeId, runtime]);
|
|
65
|
-
useEffect(() => {
|
|
66
|
-
if (flow && drafts.current.has(flow.id)) drafts.current.set(flow.id, flow);
|
|
67
|
-
}, [flow]);
|
|
68
|
-
const graphNodes = useMemo(() => flow ? toGraphNodes(flow, nodeDefinitions) : [], [flow, nodeDefinitions]);
|
|
69
|
-
const graphEdges = useMemo(() => flow ? toGraphEdges(flow) : [], [flow]);
|
|
70
|
-
const updateNodes = (next) => {
|
|
71
|
-
if (!flow) return;
|
|
72
|
-
const nextFlow = { ...flow, nodes: next.map((node) => ({ ...flow.nodes.find((item) => item.id === node.id), id: node.id, type: node.type, position: node.position, data: node.data })) };
|
|
73
|
-
setFlow(nextFlow);
|
|
74
|
-
};
|
|
75
|
-
const updateEdges = (next) => {
|
|
76
|
-
if (!flow) return;
|
|
77
|
-
const nextFlow = { ...flow, edges: next.map((edge) => ({ id: edge.id, source: edge.source, sourceHandle: edge.sourceSocket, target: edge.target, targetHandle: edge.targetSocket })) };
|
|
78
|
-
setFlow(nextFlow);
|
|
79
|
-
};
|
|
80
|
-
const createFlow = () => {
|
|
81
|
-
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
82
|
-
const next = { id: `flow-${crypto.randomUUID()}`, name: "New Flow", version: 1, createdAt: now, updatedAt: now, nodes: [], edges: [], metadata: { workspaceId } };
|
|
83
|
-
drafts.current.set(next.id, next);
|
|
84
|
-
setFlows((current) => [...current, next]);
|
|
85
|
-
setActiveId(next.id);
|
|
86
|
-
setFlow(next);
|
|
87
|
-
};
|
|
88
|
-
const save = async () => {
|
|
89
|
-
if (!flow) return;
|
|
90
|
-
const saved = await runtime.saveFlow(flow);
|
|
91
|
-
drafts.current.delete(flow.id);
|
|
92
|
-
setFlow((current) => current?.id === flow.id ? saved : current);
|
|
93
|
-
await refresh();
|
|
94
|
-
setMessage("Saved");
|
|
95
|
-
};
|
|
96
|
-
const addMagneticEdge = (trace) => {
|
|
97
|
-
if (!flow) return;
|
|
98
|
-
const id = `edge-${Date.now()}-${Math.random().toString(36).slice(2, 6)}`;
|
|
99
|
-
const exists = flow.edges.some((edge) => edge.source === trace.sourceNodeId && edge.target === trace.targetNodeId && edge.sourceHandle === trace.sourceHandleId && edge.targetHandle === trace.targetHandleId);
|
|
100
|
-
if (!exists) setFlow({ ...flow, edges: [...flow.edges, { id, source: trace.sourceNodeId, sourceHandle: trace.sourceHandleId, target: trace.targetNodeId, targetHandle: trace.targetHandleId }] });
|
|
101
|
-
};
|
|
102
|
-
const solidifyGhost = (ghost) => {
|
|
103
|
-
if (!flow || !ghost?.prototypeNode) return;
|
|
104
|
-
const node = ghost.prototypeNode;
|
|
105
|
-
const exists = flow.nodes.some((item) => item.id === ghost.id);
|
|
106
|
-
let next = flow;
|
|
107
|
-
if (!exists) next = { ...next, nodes: [...next.nodes, { id: ghost.id, type: node.type, position: { x: Number(ghost.worldPosition?.[0] ?? node.position?.x ?? 0), y: Number(ghost.worldPosition?.[2] ?? node.position?.y ?? 0) }, data: node.data ?? {} }] };
|
|
108
|
-
const edge = { id: `edge-${Date.now()}-${Math.random().toString(36).slice(2, 6)}`, source: ghost.parentSocketPolarity === "input" ? ghost.id : ghost.parentNodeId, sourceHandle: ghost.parentSocketPolarity === "input" ? ghost.matchingSocketId : ghost.parentSocketId, target: ghost.parentSocketPolarity === "input" ? ghost.parentNodeId : ghost.id, targetHandle: ghost.parentSocketPolarity === "input" ? ghost.parentSocketId : ghost.matchingSocketId };
|
|
109
|
-
if (!next.edges.some((item) => item.source === edge.source && item.target === edge.target && item.sourceHandle === edge.sourceHandle && item.targetHandle === edge.targetHandle)) next = { ...next, edges: [...next.edges, edge] };
|
|
110
|
-
setFlow(next);
|
|
111
|
-
};
|
|
112
|
-
const run = async () => {
|
|
113
|
-
if (!flow) return;
|
|
114
|
-
setRunning(true);
|
|
115
|
-
try {
|
|
116
|
-
await save();
|
|
117
|
-
const result = await runtime.executeFlow(flow.id);
|
|
118
|
-
setMessage(result.success ? "Execution completed" : result.errors?.[0]?.message ?? "Execution failed");
|
|
119
|
-
} catch (error) {
|
|
120
|
-
setMessage(String(error));
|
|
121
|
-
} finally {
|
|
122
|
-
setRunning(false);
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
const grouped = useMemo(() => {
|
|
126
|
-
const groups = /* @__PURE__ */ new Map();
|
|
127
|
-
for (const node of nodeDefinitions) {
|
|
128
|
-
const group = groups.get(node.group) ?? [];
|
|
129
|
-
group.push(node);
|
|
130
|
-
groups.set(node.group, group);
|
|
131
|
-
}
|
|
132
|
-
return [...groups.entries()].sort(([a], [b]) => a.localeCompare(b));
|
|
133
|
-
}, [nodeDefinitions]);
|
|
134
|
-
return /* @__PURE__ */ jsxs("div", { className, style: { display: "grid", gridTemplateColumns: "220px 1fr", gridTemplateRows: "44px 1fr", height: "100%", minHeight: 500 }, children: [
|
|
135
|
-
/* @__PURE__ */ jsxs("div", { style: { gridColumn: "1 / -1", display: "flex", alignItems: "center", gap: 8, padding: "6px 10px", borderBottom: "1px solid var(--skipo-border,#333)", background: "var(--skipo-matte-bg,#111)" }, children: [
|
|
136
|
-
/* @__PURE__ */ jsx("strong", { children: "FOD" }),
|
|
137
|
-
/* @__PURE__ */ jsxs("select", { value: activeId ?? "", onChange: (e) => setActiveId(e.target.value || null), children: [
|
|
138
|
-
/* @__PURE__ */ jsx("option", { value: "", children: "Select flow" }),
|
|
139
|
-
flows.map((item) => /* @__PURE__ */ jsx("option", { value: item.id, children: item.name }, item.id))
|
|
140
|
-
] }),
|
|
141
|
-
/* @__PURE__ */ jsx("button", { type: "button", onClick: createFlow, children: "New flow" }),
|
|
142
|
-
flow && /* @__PURE__ */ jsx("input", { "aria-label": "Workflow name", value: flow.name, onChange: (event) => setFlow({ ...flow, name: event.target.value }) }),
|
|
143
|
-
/* @__PURE__ */ jsx("button", { type: "button", onClick: () => void save().catch((error) => setMessage(String(error))), disabled: !flow?.name.trim(), children: "Save as App Workflow" }),
|
|
144
|
-
/* @__PURE__ */ jsx("button", { type: "button", onClick: () => void run(), disabled: !flow || running, children: running ? "Running\u2026" : "Run" }),
|
|
145
|
-
/* @__PURE__ */ jsx("span", { children: message })
|
|
146
|
-
] }),
|
|
147
|
-
/* @__PURE__ */ jsx("aside", { style: { overflow: "auto", padding: 10, borderRight: "1px solid var(--skipo-border,#333)" }, children: grouped.map(([group, nodes]) => /* @__PURE__ */ jsxs("section", { children: [
|
|
148
|
-
/* @__PURE__ */ jsx("h4", { style: { margin: "8px 0" }, children: group }),
|
|
149
|
-
nodes.map((node) => /* @__PURE__ */ jsx("button", { type: "button", style: { display: "block", width: "100%", textAlign: "left", marginBottom: 4 }, onClick: () => {
|
|
150
|
-
if (!flow) return;
|
|
151
|
-
const id = `${node.type}-${Date.now()}`;
|
|
152
|
-
setFlow({ ...flow, nodes: [...flow.nodes, { id, type: node.type, position: { x: 100 + flow.nodes.length * 24, y: 100 + flow.nodes.length * 24 }, data: { endpointId: node.metadata?.endpointId, apiId: node.metadata?.apiId } }] });
|
|
153
|
-
}, children: node.label }, node.type))
|
|
154
|
-
] }, group)) }),
|
|
155
|
-
/* @__PURE__ */ jsx("main", { style: { minWidth: 0, minHeight: 0 }, children: flow ? /* @__PURE__ */ jsx(FrnlEditableNodeGraph, { nodes: graphNodes, edges: graphEdges, selectedNodeIds: selected, onSelectionChange: setSelected, onNodesChange: updateNodes, onEdgesChange: updateEdges, magneticEnabled: true, autoSolidifyEnabled: false, signalTelemetryEnabled: true, onMagneticTraceSolidify: addMagneticEdge, onPredictiveSolidify: (_id, ghost) => solidifyGhost(ghost), onPredictiveSolidifyAll: (ghosts) => ghosts?.forEach(solidifyGhost), onPredictiveSolidifyAllForNode: (_nodeId, ghosts) => ghosts?.forEach(solidifyGhost) }) : /* @__PURE__ */ jsx("div", { style: { padding: 30 }, children: "Create or select a flow." }) })
|
|
156
|
-
] });
|
|
157
|
-
}
|
|
158
|
-
FodModule.displayName = "FodModule";
|
|
159
|
-
|
|
160
|
-
export {
|
|
161
|
-
FodModule
|
|
162
|
-
};
|