@ultrst-armada/floks 1.7.2 → 1.8.1
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 +8 -3
- package/packages/canvas-ui/dist/aiko/index.d.ts +47 -0
- package/packages/canvas-ui/dist/aiko/index.js +6 -0
- package/packages/canvas-ui/dist/chunk-2WMWGF5G.js +87 -0
- package/packages/canvas-ui/dist/index.d.ts +1 -0
- package/packages/canvas-ui/dist/index.js +40 -36
- package/packages/canvas-ui/package.json +7 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": 1,
|
|
3
3
|
"packageName": "@ultrst-armada/floks",
|
|
4
|
-
"version": "1.
|
|
5
|
-
"sourceCommit": "
|
|
4
|
+
"version": "1.8.1",
|
|
5
|
+
"sourceCommit": "cc26728887521251261425d6cfd9d35a95078721",
|
|
6
6
|
"releaseWorkflow": "npm Release",
|
|
7
|
-
"workflowRunId": "
|
|
7
|
+
"workflowRunId": "41013413417"
|
|
8
8
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultrst-armada/floks",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -59,6 +59,11 @@
|
|
|
59
59
|
"types": "./packages/canvas-ui/dist/fod/index.d.ts",
|
|
60
60
|
"import": "./packages/canvas-ui/dist/fod/index.js",
|
|
61
61
|
"default": "./packages/canvas-ui/dist/fod/index.js"
|
|
62
|
+
},
|
|
63
|
+
"./canvas-ui/aiko": {
|
|
64
|
+
"types": "./packages/canvas-ui/dist/aiko/index.d.ts",
|
|
65
|
+
"import": "./packages/canvas-ui/dist/aiko/index.js",
|
|
66
|
+
"default": "./packages/canvas-ui/dist/aiko/index.js"
|
|
62
67
|
}
|
|
63
68
|
},
|
|
64
69
|
"scripts": {
|
|
@@ -74,7 +79,7 @@
|
|
|
74
79
|
"d3-force": "^3.0.0",
|
|
75
80
|
"zod": "^3.24.1",
|
|
76
81
|
"zustand": "^5.0.3",
|
|
77
|
-
"@dinilmusick/gutts": "^1.
|
|
82
|
+
"@dinilmusick/gutts": "^1.1.0"
|
|
78
83
|
},
|
|
79
84
|
"peerDependencies": {
|
|
80
85
|
"@ultrst-armada/kloks": "^1.17.0",
|
|
@@ -88,7 +93,7 @@
|
|
|
88
93
|
"@types/node": "^22.0.0",
|
|
89
94
|
"@types/react": "^19.0.0",
|
|
90
95
|
"@types/react-dom": "^19.0.0",
|
|
91
|
-
"@ultrst-armada/kloks": "^1.
|
|
96
|
+
"@ultrst-armada/kloks": "^1.19.0",
|
|
92
97
|
"@ultrst-armada/frnlts": "^0.2.7",
|
|
93
98
|
"happy-dom": "^21.0.3",
|
|
94
99
|
"lucide-react": "^1.55.0",
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
interface AikoIntelligenceSpec {
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
}
|
|
6
|
+
interface AikoAgentDefinition {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
agentType: 'TOOL' | 'ENDPOINT' | 'AIKO';
|
|
11
|
+
tool?: Record<string, unknown>;
|
|
12
|
+
intelligenceSpec?: AikoIntelligenceSpec;
|
|
13
|
+
intelligenceSpecId?: string;
|
|
14
|
+
sourceKind?: 'endpoint' | 'fod-flow' | 'gutts-api' | 'custom';
|
|
15
|
+
sourceId?: string;
|
|
16
|
+
}
|
|
17
|
+
interface AikoKey {
|
|
18
|
+
id: string;
|
|
19
|
+
providerId: string;
|
|
20
|
+
label: string;
|
|
21
|
+
status?: string;
|
|
22
|
+
isActive?: boolean;
|
|
23
|
+
emailGroup?: string;
|
|
24
|
+
expiresAt?: string | null;
|
|
25
|
+
}
|
|
26
|
+
interface AikoRuntimeLike {
|
|
27
|
+
listAgents(): Promise<AikoAgentDefinition[]>;
|
|
28
|
+
executeAgent(agentId: string, input: string): Promise<unknown>;
|
|
29
|
+
listKeys(): Promise<AikoKey[]>;
|
|
30
|
+
getActiveKey(providerId: string): Promise<AikoKey | null>;
|
|
31
|
+
rotateKey(providerId: string): Promise<AikoKey | null>;
|
|
32
|
+
syncFromAikoEngine(): Promise<{
|
|
33
|
+
synced: number;
|
|
34
|
+
message?: string;
|
|
35
|
+
}>;
|
|
36
|
+
}
|
|
37
|
+
interface AikoModuleProps {
|
|
38
|
+
runtime: AikoRuntimeLike;
|
|
39
|
+
workspaceId: string;
|
|
40
|
+
className?: string;
|
|
41
|
+
}
|
|
42
|
+
declare function AikoModule({ runtime, workspaceId, className }: AikoModuleProps): React__default.JSX.Element;
|
|
43
|
+
declare namespace AikoModule {
|
|
44
|
+
var displayName: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export { type AikoAgentDefinition, type AikoIntelligenceSpec, type AikoKey, AikoModule, type AikoModuleProps, type AikoRuntimeLike };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
// src/aiko/AikoModule.tsx
|
|
2
|
+
import { useEffect, useMemo, useState } from "react";
|
|
3
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
function AikoModule({ runtime, workspaceId, className }) {
|
|
5
|
+
const [agents, setAgents] = useState([]);
|
|
6
|
+
const [keys, setKeys] = useState([]);
|
|
7
|
+
const [activeAgent, setActiveAgent] = useState("");
|
|
8
|
+
const [input, setInput] = useState("");
|
|
9
|
+
const [result, setResult] = useState("");
|
|
10
|
+
const [busy, setBusy] = useState(false);
|
|
11
|
+
const [message, setMessage] = useState("");
|
|
12
|
+
const refresh = async () => {
|
|
13
|
+
const [nextAgents, nextKeys] = await Promise.all([runtime.listAgents(), runtime.listKeys()]);
|
|
14
|
+
setAgents(nextAgents);
|
|
15
|
+
setKeys(nextKeys);
|
|
16
|
+
if (!activeAgent && nextAgents[0]) setActiveAgent(nextAgents[0].id);
|
|
17
|
+
};
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
void refresh();
|
|
20
|
+
}, [workspaceId]);
|
|
21
|
+
const groups = useMemo(() => {
|
|
22
|
+
const map = /* @__PURE__ */ new Map();
|
|
23
|
+
for (const agent of agents) {
|
|
24
|
+
const key = agent.sourceKind ?? "custom";
|
|
25
|
+
const list = map.get(key) ?? [];
|
|
26
|
+
list.push(agent);
|
|
27
|
+
map.set(key, list);
|
|
28
|
+
}
|
|
29
|
+
return [...map.entries()];
|
|
30
|
+
}, [agents]);
|
|
31
|
+
const execute = async () => {
|
|
32
|
+
if (!activeAgent || !input.trim()) return;
|
|
33
|
+
setBusy(true);
|
|
34
|
+
try {
|
|
35
|
+
setResult(JSON.stringify(await runtime.executeAgent(activeAgent, input), null, 2));
|
|
36
|
+
} catch (error) {
|
|
37
|
+
setResult(error instanceof Error ? error.message : String(error));
|
|
38
|
+
} finally {
|
|
39
|
+
setBusy(false);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
const sync = async () => {
|
|
43
|
+
setBusy(true);
|
|
44
|
+
try {
|
|
45
|
+
const response = await runtime.syncFromAikoEngine();
|
|
46
|
+
setMessage(response.message ?? "Synced " + response.synced + " keys");
|
|
47
|
+
await refresh();
|
|
48
|
+
} catch (error) {
|
|
49
|
+
setMessage(error instanceof Error ? error.message : String(error));
|
|
50
|
+
} finally {
|
|
51
|
+
setBusy(false);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
return /* @__PURE__ */ jsxs("div", { className, "data-aiko-module": "true", style: { display: "grid", gridTemplateColumns: "260px 1fr", gridTemplateRows: "48px 1fr", height: "100%", minHeight: 500 }, children: [
|
|
55
|
+
/* @__PURE__ */ jsxs("header", { style: { gridColumn: "1 / -1", display: "flex", alignItems: "center", gap: 8, padding: 8, borderBottom: "1px solid var(--skipo-border,#333)" }, children: [
|
|
56
|
+
/* @__PURE__ */ jsx("strong", { children: "AIKO" }),
|
|
57
|
+
/* @__PURE__ */ jsx("button", { type: "button", onClick: () => void sync(), disabled: busy, children: "Fetch from Aiko Engine" }),
|
|
58
|
+
/* @__PURE__ */ jsx("span", { children: message })
|
|
59
|
+
] }),
|
|
60
|
+
/* @__PURE__ */ jsxs("aside", { style: { overflow: "auto", padding: 10, borderRight: "1px solid var(--skipo-border,#333)" }, children: [
|
|
61
|
+
/* @__PURE__ */ jsx("h4", { children: "Agents" }),
|
|
62
|
+
groups.map(([group, list]) => /* @__PURE__ */ jsxs("section", { children: [
|
|
63
|
+
/* @__PURE__ */ jsx("strong", { children: group }),
|
|
64
|
+
list.map((agent) => /* @__PURE__ */ jsx("button", { type: "button", onClick: () => setActiveAgent(agent.id), style: { display: "block", width: "100%", textAlign: "left", margin: "4px 0" }, children: agent.name }, agent.id))
|
|
65
|
+
] }, group)),
|
|
66
|
+
/* @__PURE__ */ jsx("h4", { children: "API Keys" }),
|
|
67
|
+
keys.map((key) => /* @__PURE__ */ jsxs("div", { children: [
|
|
68
|
+
key.providerId,
|
|
69
|
+
": ",
|
|
70
|
+
key.label,
|
|
71
|
+
" ",
|
|
72
|
+
key.isActive ? "(active)" : ""
|
|
73
|
+
] }, key.id))
|
|
74
|
+
] }),
|
|
75
|
+
/* @__PURE__ */ jsx("main", { style: { padding: 16, overflow: "auto" }, children: activeAgent ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
76
|
+
/* @__PURE__ */ jsx("h3", { children: agents.find((agent) => agent.id === activeAgent)?.name }),
|
|
77
|
+
/* @__PURE__ */ jsx("textarea", { value: input, onChange: (event) => setInput(event.target.value), placeholder: "Describe what you want the agent to do", rows: 5, style: { width: "100%" } }),
|
|
78
|
+
/* @__PURE__ */ jsx("button", { type: "button", onClick: () => void execute(), disabled: busy || !input.trim(), children: "Execute" }),
|
|
79
|
+
/* @__PURE__ */ jsx("pre", { style: { whiteSpace: "pre-wrap" }, children: result })
|
|
80
|
+
] }) : /* @__PURE__ */ jsx("p", { children: "No Aiko agent selected." }) })
|
|
81
|
+
] });
|
|
82
|
+
}
|
|
83
|
+
AikoModule.displayName = "AikoModule";
|
|
84
|
+
|
|
85
|
+
export {
|
|
86
|
+
AikoModule
|
|
87
|
+
};
|
|
@@ -12,6 +12,7 @@ export { CanvasBackground2D, CanvasErrorBoundary, ContainerNode2D, EffectNode2D,
|
|
|
12
12
|
export { PredictiveGhostNodeCard, PredictiveGhostNodeCardProps, PredictiveHudToolbar, PredictiveLayer2D, PredictiveLayer2DProps, UsePredictiveGraph2DProps, UseViewer2DPredictiveProps, usePredictiveGraph2D } from './predictive/index.js';
|
|
13
13
|
export { AuthoringAssetRef, UIAuthoringContext, UIAuthoringNode, UIAuthoringNodeKind, UIAuthoringSession, UiAuthoringBindingEditor, UiAuthoringComponentRenderer, UiAuthoringInspector, UiAuthoringPreview, UiAuthoringTree, UiAuthoringValidationPanel, UiAuthoringWorkspace, getAuthoringChildren, getAuthoringDepth, getAuthoringSubtreeIds } from './authoring/index.js';
|
|
14
14
|
export { FodModule, FodModuleProps, FodRuntimeLike } from './fod/index.js';
|
|
15
|
+
export { AikoAgentDefinition, AikoIntelligenceSpec, AikoKey, AikoModule, AikoModuleProps, AikoRuntimeLike } from './aiko/index.js';
|
|
15
16
|
import '@ultrst-armada/kloks/contracts';
|
|
16
17
|
|
|
17
18
|
interface MidpointWidgetsProps {
|
|
@@ -1,8 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BIOME_CONFIGS,
|
|
3
|
+
COORD_SCALE,
|
|
4
|
+
CanvasBackground2D,
|
|
5
|
+
CanvasErrorBoundary,
|
|
6
|
+
ContainerNode2D,
|
|
7
|
+
EffectNode2D,
|
|
8
|
+
MagneticTraces2D,
|
|
9
|
+
ModuleNode2D,
|
|
10
|
+
NodeRenderer2D,
|
|
11
|
+
RotaryKnob,
|
|
12
|
+
TriggerNode2D,
|
|
13
|
+
Wire2D,
|
|
14
|
+
useCanvas2DCoordinates,
|
|
15
|
+
useCanvas2DMagnetic
|
|
16
|
+
} from "./chunk-XVAHT5WE.js";
|
|
1
17
|
import {
|
|
2
18
|
PredictiveGhostNodeCard,
|
|
3
19
|
PredictiveHudToolbar,
|
|
4
20
|
PredictiveLayer2D
|
|
5
21
|
} from "./chunk-RH5NINIT.js";
|
|
22
|
+
import {
|
|
23
|
+
NODE_CARD_WIDTH,
|
|
24
|
+
Node2DBase,
|
|
25
|
+
RecorderWaveformDisplay,
|
|
26
|
+
SOCKET_ROW_HEIGHT,
|
|
27
|
+
Socket2D,
|
|
28
|
+
getSocketLocalOffset,
|
|
29
|
+
getSocketScreenPosition,
|
|
30
|
+
renderSpriteIcon
|
|
31
|
+
} from "./chunk-U2SC3RMJ.js";
|
|
6
32
|
import {
|
|
7
33
|
Tile,
|
|
8
34
|
TileCreateButton,
|
|
@@ -10,11 +36,8 @@ import {
|
|
|
10
36
|
useTileMenu
|
|
11
37
|
} from "./chunk-SA3JADUG.js";
|
|
12
38
|
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
MiniMap,
|
|
16
|
-
useCanvas
|
|
17
|
-
} from "./chunk-34YRDZPJ.js";
|
|
39
|
+
AikoModule
|
|
40
|
+
} from "./chunk-2WMWGF5G.js";
|
|
18
41
|
import {
|
|
19
42
|
UiAuthoringBindingEditor,
|
|
20
43
|
UiAuthoringInspector,
|
|
@@ -26,45 +49,20 @@ import {
|
|
|
26
49
|
getAuthoringDepth,
|
|
27
50
|
getAuthoringSubtreeIds
|
|
28
51
|
} from "./chunk-TS7P3WWH.js";
|
|
52
|
+
import {
|
|
53
|
+
CanvasViewport,
|
|
54
|
+
InfiniteCanvas,
|
|
55
|
+
MiniMap,
|
|
56
|
+
useCanvas
|
|
57
|
+
} from "./chunk-34YRDZPJ.js";
|
|
29
58
|
import {
|
|
30
59
|
DockBar,
|
|
31
60
|
DockItem,
|
|
32
61
|
useDock
|
|
33
62
|
} from "./chunk-6VB74RCH.js";
|
|
34
|
-
import {
|
|
35
|
-
MonacoEditor,
|
|
36
|
-
skipoDarkTheme,
|
|
37
|
-
useMonaco
|
|
38
|
-
} from "./chunk-ZJXRL74D.js";
|
|
39
63
|
import {
|
|
40
64
|
FodModule
|
|
41
65
|
} from "./chunk-7CYX3B6O.js";
|
|
42
|
-
import {
|
|
43
|
-
BIOME_CONFIGS,
|
|
44
|
-
COORD_SCALE,
|
|
45
|
-
CanvasBackground2D,
|
|
46
|
-
CanvasErrorBoundary,
|
|
47
|
-
ContainerNode2D,
|
|
48
|
-
EffectNode2D,
|
|
49
|
-
MagneticTraces2D,
|
|
50
|
-
ModuleNode2D,
|
|
51
|
-
NodeRenderer2D,
|
|
52
|
-
RotaryKnob,
|
|
53
|
-
TriggerNode2D,
|
|
54
|
-
Wire2D,
|
|
55
|
-
useCanvas2DCoordinates,
|
|
56
|
-
useCanvas2DMagnetic
|
|
57
|
-
} from "./chunk-XVAHT5WE.js";
|
|
58
|
-
import {
|
|
59
|
-
NODE_CARD_WIDTH,
|
|
60
|
-
Node2DBase,
|
|
61
|
-
RecorderWaveformDisplay,
|
|
62
|
-
SOCKET_ROW_HEIGHT,
|
|
63
|
-
Socket2D,
|
|
64
|
-
getSocketLocalOffset,
|
|
65
|
-
getSocketScreenPosition,
|
|
66
|
-
renderSpriteIcon
|
|
67
|
-
} from "./chunk-U2SC3RMJ.js";
|
|
68
66
|
import {
|
|
69
67
|
CanvasContextMenu,
|
|
70
68
|
CompatibleNodePicker,
|
|
@@ -77,6 +75,11 @@ import {
|
|
|
77
75
|
import {
|
|
78
76
|
usePredictiveGraph2D
|
|
79
77
|
} from "./chunk-QRYNQ36L.js";
|
|
78
|
+
import {
|
|
79
|
+
MonacoEditor,
|
|
80
|
+
skipoDarkTheme,
|
|
81
|
+
useMonaco
|
|
82
|
+
} from "./chunk-ZJXRL74D.js";
|
|
80
83
|
|
|
81
84
|
// src/node-graph-ui/widgets/MidpointWidgets.tsx
|
|
82
85
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -707,6 +710,7 @@ function MovableSocketHandle({
|
|
|
707
710
|
);
|
|
708
711
|
}
|
|
709
712
|
export {
|
|
713
|
+
AikoModule,
|
|
710
714
|
BIOME_CONFIGS,
|
|
711
715
|
COORD_SCALE,
|
|
712
716
|
CanvasBackground2D,
|
|
@@ -62,15 +62,20 @@
|
|
|
62
62
|
"import": "./dist/fod/index.js",
|
|
63
63
|
"types": "./dist/fod/index.d.ts",
|
|
64
64
|
"default": "./dist/fod/index.js"
|
|
65
|
+
},
|
|
66
|
+
"./aiko": {
|
|
67
|
+
"import": "./dist/aiko/index.js",
|
|
68
|
+
"types": "./dist/aiko/index.d.ts",
|
|
69
|
+
"default": "./dist/aiko/index.js"
|
|
65
70
|
}
|
|
66
71
|
},
|
|
67
72
|
"scripts": {
|
|
68
|
-
"build": "tsup src/index.ts src/canvas/index.ts src/dock/index.ts src/tile-menu/index.ts src/editor/index.ts src/authoring/index.ts src/graph-2d/index.ts src/predictive/index.ts src/frnl-editable-node-graph/index.ts src/fod/index.ts --format esm --dts --clean --external react --external react-dom --external lucide-react --external @floks/ui --external @ultrst-armada/frnlts --external @kloks/state-graph --external @kloks/audio-midi --external monaco-editor --external @dnd-kit/core --external @dnd-kit/sortable --external @dnd-kit/utilities"
|
|
73
|
+
"build": "tsup src/index.ts src/canvas/index.ts src/dock/index.ts src/tile-menu/index.ts src/editor/index.ts src/authoring/index.ts src/graph-2d/index.ts src/predictive/index.ts src/frnl-editable-node-graph/index.ts src/fod/index.ts src/aiko/index.ts --format esm --dts --clean --external react --external react-dom --external lucide-react --external @floks/ui --external @ultrst-armada/frnlts --external @kloks/state-graph --external @kloks/audio-midi --external monaco-editor --external @dnd-kit/core --external @dnd-kit/sortable --external @dnd-kit/utilities"
|
|
69
74
|
},
|
|
70
75
|
"dependencies": {
|
|
71
76
|
"@floks/ui": "workspace:*",
|
|
72
77
|
"@ultrst-armada/frnlts": "^0.2.7",
|
|
73
|
-
"@ultrst-armada/kloks": "^1.
|
|
78
|
+
"@ultrst-armada/kloks": "^1.19.0"
|
|
74
79
|
},
|
|
75
80
|
"peerDependencies": {
|
|
76
81
|
"@dnd-kit/core": "^6.0.0",
|