@ultrst-armada/floks 1.9.0 → 1.10.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.
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schema": 1,
3
3
  "packageName": "@ultrst-armada/floks",
4
- "version": "1.9.0",
5
- "sourceCommit": "8c1e43243f0d3ce72d863ead580343e00c7df06d",
4
+ "version": "1.10.0",
5
+ "sourceCommit": "7443a15bf0ce496cf0dbefabf1a06be2c3faaae6",
6
6
  "releaseWorkflow": "npm Release",
7
- "workflowRunId": "41026070837"
7
+ "workflowRunId": "41028751168"
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultrst-armada/floks",
3
- "version": "1.9.0",
3
+ "version": "1.10.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -4,6 +4,7 @@ interface AikoIntelligenceSpec {
4
4
  [key: string]: unknown;
5
5
  }
6
6
  interface AikoAgentDefinition {
7
+ schemaVersion?: '1.0.0' | string;
7
8
  id: string;
8
9
  name: string;
9
10
  description?: string;
@@ -13,6 +14,15 @@ interface AikoAgentDefinition {
13
14
  intelligenceSpecId?: string;
14
15
  sourceKind?: 'endpoint' | 'fod-flow' | 'gutts-api' | 'custom';
15
16
  sourceId?: string;
17
+ allowedToolIds?: string[];
18
+ custom?: boolean;
19
+ }
20
+ interface AikoCapability {
21
+ id: string;
22
+ name: string;
23
+ description?: string;
24
+ sourceKind?: 'endpoint' | 'fod-flow' | 'gutts-api' | 'custom';
25
+ sourceId?: string;
16
26
  }
17
27
  interface AikoKey {
18
28
  id: string;
@@ -39,6 +49,8 @@ interface AikoRuntimeLike {
39
49
  synced: number;
40
50
  message?: string;
41
51
  }>;
52
+ listCapabilities?(): Promise<AikoCapability[]>;
53
+ createCustomAgent?(name: string, capabilityIds: string[], specId?: string): Promise<AikoAgentDefinition>;
42
54
  }
43
55
  interface AikoModuleProps {
44
56
  runtime: AikoRuntimeLike;
@@ -50,4 +62,4 @@ declare namespace AikoModule {
50
62
  var displayName: string;
51
63
  }
52
64
 
53
- export { type AikoAgentDefinition, type AikoIntelligenceSpec, type AikoKey, AikoModule, type AikoModuleProps, type AikoRuntimeLike };
65
+ export { type AikoAgentDefinition, type AikoCapability, type AikoIntelligenceSpec, type AikoKey, AikoModule, type AikoModuleProps, type AikoRuntimeLike };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AikoModule
3
- } from "../chunk-K7L2ZD3D.js";
3
+ } from "../chunk-OHAFLB3O.js";
4
4
  export {
5
5
  AikoModule
6
6
  };
@@ -3,6 +3,7 @@ import { useEffect, useMemo, useState } from "react";
3
3
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
4
  function AikoModule({ runtime, workspaceId, className }) {
5
5
  const [agents, setAgents] = useState([]);
6
+ const [capabilities, setCapabilities] = useState([]);
6
7
  const [keys, setKeys] = useState([]);
7
8
  const [activeAgent, setActiveAgent] = useState("");
8
9
  const [input, setInput] = useState("");
@@ -13,10 +14,18 @@ function AikoModule({ runtime, workspaceId, className }) {
13
14
  const [label, setLabel] = useState("");
14
15
  const [secret, setSecret] = useState("");
15
16
  const [group, setGroup] = useState("");
17
+ const [customName, setCustomName] = useState("");
18
+ const [customCapIds, setCustomCapIds] = useState([]);
19
+ const [customSpecId, setCustomSpecId] = useState("");
16
20
  const refresh = async () => {
17
- const [nextAgents, nextKeys] = await Promise.all([runtime.listAgents(), runtime.listKeys()]);
21
+ const [nextAgents, nextKeys, nextCaps] = await Promise.all([
22
+ runtime.listAgents(),
23
+ runtime.listKeys(),
24
+ runtime.listCapabilities ? runtime.listCapabilities() : Promise.resolve([])
25
+ ]);
18
26
  setAgents(nextAgents);
19
27
  setKeys(nextKeys);
28
+ setCapabilities(nextCaps);
20
29
  if (!activeAgent && nextAgents[0]) setActiveAgent(nextAgents[0].id);
21
30
  };
22
31
  useEffect(() => {
@@ -61,7 +70,24 @@ function AikoModule({ runtime, workspaceId, className }) {
61
70
  setBusy(false);
62
71
  }
63
72
  };
64
- return /* @__PURE__ */ jsxs("div", { className, "data-aiko-module": "true", style: { display: "grid", gridTemplateColumns: "260px 1fr", gridTemplateRows: "48px 1fr", height: "100%", minHeight: 500 }, children: [
73
+ const createCustomAgent = async () => {
74
+ if (!runtime.createCustomAgent || !customName.trim() || customCapIds.length === 0) return;
75
+ setBusy(true);
76
+ try {
77
+ const created = await runtime.createCustomAgent(customName.trim(), customCapIds, customSpecId.trim() || void 0);
78
+ setCustomName("");
79
+ setCustomCapIds([]);
80
+ setCustomSpecId("");
81
+ await refresh();
82
+ setActiveAgent(created.id);
83
+ setMessage(`Created custom agent ${created.name}`);
84
+ } catch (error) {
85
+ setMessage(error instanceof Error ? error.message : String(error));
86
+ } finally {
87
+ setBusy(false);
88
+ }
89
+ };
90
+ return /* @__PURE__ */ jsxs("div", { className, "data-aiko-module": "true", style: { display: "grid", gridTemplateColumns: "280px 1fr", gridTemplateRows: "48px 1fr", height: "100%", minHeight: 500 }, children: [
65
91
  /* @__PURE__ */ jsxs("header", { style: { gridColumn: "1 / -1", display: "flex", alignItems: "center", gap: 8, padding: 8, borderBottom: "1px solid var(--skipo-border,#333)" }, children: [
66
92
  /* @__PURE__ */ jsx("strong", { children: "AIKO" }),
67
93
  /* @__PURE__ */ jsx("button", { type: "button", onClick: () => void sync(), disabled: busy, children: "Fetch from Aiko Engine" }),
@@ -69,10 +95,34 @@ function AikoModule({ runtime, workspaceId, className }) {
69
95
  ] }),
70
96
  /* @__PURE__ */ jsxs("aside", { style: { overflow: "auto", padding: 10, borderRight: "1px solid var(--skipo-border,#333)" }, children: [
71
97
  /* @__PURE__ */ jsx("h4", { children: "Agents" }),
72
- groups.map(([group2, list]) => /* @__PURE__ */ jsxs("section", { children: [
73
- /* @__PURE__ */ jsx("strong", { children: group2 }),
74
- 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))
75
- ] }, group2)),
98
+ groups.map(([groupName, list]) => /* @__PURE__ */ jsxs("section", { children: [
99
+ /* @__PURE__ */ jsx("strong", { children: groupName }),
100
+ list.map((agent) => /* @__PURE__ */ jsxs("button", { type: "button", onClick: () => setActiveAgent(agent.id), style: { display: "block", width: "100%", textAlign: "left", margin: "4px 0" }, children: [
101
+ agent.name,
102
+ " ",
103
+ agent.custom ? "(custom)" : ""
104
+ ] }, agent.id))
105
+ ] }, groupName)),
106
+ runtime.createCustomAgent && /* @__PURE__ */ jsxs("section", { style: { margin: "12px 0", padding: 8, border: "1px solid var(--skipo-border,#333)", borderRadius: 4 }, children: [
107
+ /* @__PURE__ */ jsx("h5", { children: "Create Custom Agent" }),
108
+ /* @__PURE__ */ jsx("input", { value: customName, onChange: (e) => setCustomName(e.target.value), placeholder: "Agent name", style: { width: "100%", marginBottom: 4 } }),
109
+ /* @__PURE__ */ jsx("input", { value: customSpecId, onChange: (e) => setCustomSpecId(e.target.value), placeholder: "Optional Spec ID", style: { width: "100%", marginBottom: 4 } }),
110
+ /* @__PURE__ */ jsx("div", { style: { maxHeight: 90, overflow: "auto", fontSize: 12, margin: "4px 0" }, children: capabilities.map((cap) => /* @__PURE__ */ jsxs("label", { style: { display: "block" }, children: [
111
+ /* @__PURE__ */ jsx(
112
+ "input",
113
+ {
114
+ type: "checkbox",
115
+ checked: customCapIds.includes(cap.id),
116
+ onChange: (e) => {
117
+ setCustomCapIds((prev) => e.target.checked ? [...prev, cap.id] : prev.filter((id) => id !== cap.id));
118
+ }
119
+ }
120
+ ),
121
+ " ",
122
+ cap.name
123
+ ] }, cap.id)) }),
124
+ /* @__PURE__ */ jsx("button", { type: "button", onClick: () => void createCustomAgent(), disabled: busy || !customName.trim() || customCapIds.length === 0, children: "Create Custom Agent" })
125
+ ] }),
76
126
  /* @__PURE__ */ jsx("h4", { children: "API Keys" }),
77
127
  /* @__PURE__ */ jsxs("div", { children: [
78
128
  /* @__PURE__ */ jsx("input", { value: provider, onChange: (event) => setProvider(event.target.value), placeholder: "Provider" }),
@@ -12,7 +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
+ export { AikoAgentDefinition, AikoCapability, AikoIntelligenceSpec, AikoKey, AikoModule, AikoModuleProps, AikoRuntimeLike } from './aiko/index.js';
16
16
  import '@ultrst-armada/kloks/contracts';
17
17
 
18
18
  interface MidpointWidgetsProps {
@@ -14,6 +14,12 @@ import {
14
14
  useCanvas2DCoordinates,
15
15
  useCanvas2DMagnetic
16
16
  } from "./chunk-XVAHT5WE.js";
17
+ import {
18
+ Tile,
19
+ TileCreateButton,
20
+ TileGrid,
21
+ useTileMenu
22
+ } from "./chunk-SA3JADUG.js";
17
23
  import {
18
24
  PredictiveGhostNodeCard,
19
25
  PredictiveHudToolbar,
@@ -29,15 +35,9 @@ import {
29
35
  getSocketScreenPosition,
30
36
  renderSpriteIcon
31
37
  } from "./chunk-U2SC3RMJ.js";
32
- import {
33
- Tile,
34
- TileCreateButton,
35
- TileGrid,
36
- useTileMenu
37
- } from "./chunk-SA3JADUG.js";
38
38
  import {
39
39
  AikoModule
40
- } from "./chunk-K7L2ZD3D.js";
40
+ } from "./chunk-OHAFLB3O.js";
41
41
  import {
42
42
  UiAuthoringBindingEditor,
43
43
  UiAuthoringInspector,
@@ -60,11 +60,6 @@ import {
60
60
  DockItem,
61
61
  useDock
62
62
  } from "./chunk-6VB74RCH.js";
63
- import {
64
- MonacoEditor,
65
- skipoDarkTheme,
66
- useMonaco
67
- } from "./chunk-ZJXRL74D.js";
68
63
  import {
69
64
  FodModule
70
65
  } from "./chunk-7CYX3B6O.js";
@@ -80,6 +75,11 @@ import {
80
75
  import {
81
76
  usePredictiveGraph2D
82
77
  } from "./chunk-QRYNQ36L.js";
78
+ import {
79
+ MonacoEditor,
80
+ skipoDarkTheme,
81
+ useMonaco
82
+ } from "./chunk-ZJXRL74D.js";
83
83
 
84
84
  // src/node-graph-ui/widgets/MidpointWidgets.tsx
85
85
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -64,6 +64,18 @@ import {
64
64
  TilesMenu,
65
65
  tilesMenuDefinition
66
66
  } from "./chunk-PH4NEHWR.js";
67
+ import {
68
+ frnlBadge,
69
+ frnlBottomBar,
70
+ frnlPage,
71
+ frnlSelect,
72
+ frnlSelectDefinition,
73
+ frnlSlider,
74
+ frnlTabWindow,
75
+ frnlToggle,
76
+ frnlToggleDefinition,
77
+ frnlTopBar
78
+ } from "./chunk-DGZBP3ND.js";
67
79
  import {
68
80
  ActionButton,
69
81
  Badge,
@@ -91,18 +103,6 @@ import {
91
103
  ToolbarPanel,
92
104
  UIParent
93
105
  } from "./chunk-SXRIBCJX.js";
94
- import {
95
- frnlBadge,
96
- frnlBottomBar,
97
- frnlPage,
98
- frnlSelect,
99
- frnlSelectDefinition,
100
- frnlSlider,
101
- frnlTabWindow,
102
- frnlToggle,
103
- frnlToggleDefinition,
104
- frnlTopBar
105
- } from "./chunk-DGZBP3ND.js";
106
106
  import "./chunk-SLJBDDSN.js";
107
107
  import {
108
108
  DEFAULT_PALETTE_ID,