@ultrst-armada/floks 2.0.8 → 2.0.10

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 (41) hide show
  1. package/.krusbl-release-attestation.json +3 -3
  2. package/package.json +2 -2
  3. package/packages/canvas-ui/dist/chunk-DAAI7BIG.js +625 -0
  4. package/packages/canvas-ui/dist/fod/FodAuthorizedRemoteNodes.test.d.ts +1 -0
  5. package/packages/canvas-ui/dist/fod/FodModule.authorization.test.d.ts +1 -0
  6. package/packages/canvas-ui/dist/fod/FodModule.d.ts +27 -1
  7. package/packages/canvas-ui/dist/fod/FodPassiveNavigationAdversarial.test.d.ts +1 -0
  8. package/packages/canvas-ui/dist/fod/FodRemoteExecution.test.d.ts +1 -0
  9. package/packages/canvas-ui/dist/fod/index.d.ts +3 -0
  10. package/packages/canvas-ui/dist/fod/index.js +25 -3
  11. package/packages/canvas-ui/dist/fod/remoteAuthorizationFingerprint.d.ts +10 -0
  12. package/packages/canvas-ui/dist/fod/remoteAuthorizationFingerprint.test.d.ts +1 -0
  13. package/packages/canvas-ui/dist/fod/remoteGraphConnections.d.ts +40 -0
  14. package/packages/canvas-ui/dist/fod/remoteGraphConnections.test.d.ts +1 -0
  15. package/packages/canvas-ui/dist/fod/remoteGraphContract.d.ts +37 -0
  16. package/packages/canvas-ui/dist/fod/remoteGraphContract.test.d.ts +1 -0
  17. package/packages/canvas-ui/dist/fod/remoteKloksInvocation.d.ts +29 -0
  18. package/packages/canvas-ui/dist/fod/remoteKloksInvocation.test.d.ts +1 -0
  19. package/packages/canvas-ui/dist/index.js +37 -15
  20. package/packages/ui/dist/chunk-5Y2HGI37.js +443 -0
  21. package/packages/ui/dist/{chunk-XMRSW4TL.js → chunk-6J5J56YO.js} +31 -79
  22. package/packages/ui/dist/{chunk-KIFQA7L6.js → chunk-CIH4FVXM.js} +22 -34
  23. package/packages/ui/dist/{chunk-FA6GHJKU.js → chunk-EKPU2EZU.js} +196 -5
  24. package/packages/ui/dist/chunk-F5XUUMSI.js +14 -0
  25. package/packages/ui/dist/{chunk-MYXPGPI3.js → chunk-KMVDLACR.js} +25 -2
  26. package/packages/ui/dist/components/ai/chat/AgentChatDock.d.ts +12 -0
  27. package/packages/ui/dist/components/ai/chat/AgentChatPanel.d.ts +11 -0
  28. package/packages/ui/dist/components/ai/chat/AgentChatPanel.test.d.ts +1 -0
  29. package/packages/ui/dist/components/ai/chat/AgentChatTypes.d.ts +39 -0
  30. package/packages/ui/dist/components/ai/chat/index.d.ts +3 -0
  31. package/packages/ui/dist/components/ai/index.js +17 -4
  32. package/packages/ui/dist/components/auth/LuthOidcGate.d.ts +29 -0
  33. package/packages/ui/dist/components/auth/LuthOidcGate.presentation.test.d.ts +1 -0
  34. package/packages/ui/dist/components/auth/index.d.ts +1 -0
  35. package/packages/ui/dist/components/auth/index.js +5 -1
  36. package/packages/ui/dist/components/base/index.js +4 -2
  37. package/packages/ui/dist/components/layout/AppShell.d.ts +2 -0
  38. package/packages/ui/dist/components/layout/index.js +3 -1
  39. package/packages/ui/dist/index.js +29 -11
  40. package/packages/ui/package.json +1 -1
  41. package/packages/canvas-ui/dist/chunk-24JGPSGO.js +0 -162
@@ -1,11 +1,13 @@
1
1
  import React from 'react';
2
2
  import { type BottomStripProps } from '../bottom-strip/BottomStrip.js';
3
+ import { type AgentChatDockProps } from '../ai/chat/AgentChatDock.js';
3
4
  import '../../styles/layout.css';
4
5
  export interface AppShellProps extends React.HTMLAttributes<HTMLDivElement> {
5
6
  header?: React.ReactNode;
6
7
  sidebar?: React.ReactNode;
7
8
  footer?: React.ReactNode;
8
9
  bottomStripProps?: BottomStripProps;
10
+ agentChat?: AgentChatDockProps;
9
11
  disableBottomStrip?: boolean;
10
12
  workspaceGate?: React.ReactNode;
11
13
  }
@@ -3,7 +3,9 @@ import {
3
3
  BreadcrumbNav,
4
4
  HeaderBar,
5
5
  TopToolbar
6
- } from "../../chunk-MYXPGPI3.js";
6
+ } from "../../chunk-KMVDLACR.js";
7
+ import "../../chunk-5Y2HGI37.js";
8
+ import "../../chunk-F5XUUMSI.js";
7
9
  import "../../chunk-GKP6KHTI.js";
8
10
  import "../../chunk-C3L53YN4.js";
9
11
  import "../../chunk-62ITRDJX.js";
@@ -57,7 +57,12 @@ import {
57
57
  BreadcrumbNav,
58
58
  HeaderBar,
59
59
  TopToolbar
60
- } from "./chunk-MYXPGPI3.js";
60
+ } from "./chunk-KMVDLACR.js";
61
+ import "./chunk-2SD6BIUX.js";
62
+ import {
63
+ TilesMenu,
64
+ tilesMenuDefinition
65
+ } from "./chunk-DEKSKDSF.js";
61
66
  import {
62
67
  AccountsSettingsSection,
63
68
  SettingsTab,
@@ -66,11 +71,6 @@ import {
66
71
  import {
67
72
  CopyableLogViewer
68
73
  } from "./chunk-RLQ2ALJG.js";
69
- import "./chunk-2SD6BIUX.js";
70
- import {
71
- TilesMenu,
72
- tilesMenuDefinition
73
- } from "./chunk-DEKSKDSF.js";
74
74
  import {
75
75
  createFrnlDomMeasurementAdapter,
76
76
  frnlBadge,
@@ -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-XMRSW4TL.js";
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-KIFQA7L6.js";
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-FA6GHJKU.js";
216
+ } from "./chunk-EKPU2EZU.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,
@@ -113,7 +113,7 @@
113
113
  "zustand": "^5.0.3",
114
114
  "@xyflow/react": "^12.8.6",
115
115
  "d3-force": "^3.0.0",
116
- "@dinilmusick/gutts": "^2.2.2"
116
+ "@dinilmusick/gutts": "2.2.3"
117
117
  },
118
118
  "peerDependencies": {
119
119
  "lucide-react": ">=0.300.0",
@@ -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
- };