@ultrst-armada/floks 1.8.1 → 1.9.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.8.1",
5
- "sourceCommit": "cc26728887521251261425d6cfd9d35a95078721",
4
+ "version": "1.9.0",
5
+ "sourceCommit": "8c1e43243f0d3ce72d863ead580343e00c7df06d",
6
6
  "releaseWorkflow": "npm Release",
7
- "workflowRunId": "41013413417"
7
+ "workflowRunId": "41026070837"
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultrst-armada/floks",
3
- "version": "1.8.1",
3
+ "version": "1.9.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -29,6 +29,12 @@ interface AikoRuntimeLike {
29
29
  listKeys(): Promise<AikoKey[]>;
30
30
  getActiveKey(providerId: string): Promise<AikoKey | null>;
31
31
  rotateKey(providerId: string): Promise<AikoKey | null>;
32
+ addKey?(input: {
33
+ providerId: string;
34
+ label: string;
35
+ key: string;
36
+ emailGroup?: string;
37
+ }): Promise<unknown>;
32
38
  syncFromAikoEngine(): Promise<{
33
39
  synced: number;
34
40
  message?: string;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AikoModule
3
- } from "../chunk-2WMWGF5G.js";
3
+ } from "../chunk-K7L2ZD3D.js";
4
4
  export {
5
5
  AikoModule
6
6
  };
@@ -9,6 +9,10 @@ function AikoModule({ runtime, workspaceId, className }) {
9
9
  const [result, setResult] = useState("");
10
10
  const [busy, setBusy] = useState(false);
11
11
  const [message, setMessage] = useState("");
12
+ const [provider, setProvider] = useState("");
13
+ const [label, setLabel] = useState("");
14
+ const [secret, setSecret] = useState("");
15
+ const [group, setGroup] = useState("");
12
16
  const refresh = async () => {
13
17
  const [nextAgents, nextKeys] = await Promise.all([runtime.listAgents(), runtime.listKeys()]);
14
18
  setAgents(nextAgents);
@@ -39,6 +43,12 @@ function AikoModule({ runtime, workspaceId, className }) {
39
43
  setBusy(false);
40
44
  }
41
45
  };
46
+ const addKey = async () => {
47
+ if (!runtime.addKey || !provider || !label || !secret) return;
48
+ await runtime.addKey({ providerId: provider, label, key: secret, emailGroup: group || void 0 });
49
+ setSecret("");
50
+ await refresh();
51
+ };
42
52
  const sync = async () => {
43
53
  setBusy(true);
44
54
  try {
@@ -59,21 +69,31 @@ function AikoModule({ runtime, workspaceId, className }) {
59
69
  ] }),
60
70
  /* @__PURE__ */ jsxs("aside", { style: { overflow: "auto", padding: 10, borderRight: "1px solid var(--skipo-border,#333)" }, children: [
61
71
  /* @__PURE__ */ jsx("h4", { children: "Agents" }),
62
- groups.map(([group, list]) => /* @__PURE__ */ jsxs("section", { children: [
63
- /* @__PURE__ */ jsx("strong", { children: group }),
72
+ groups.map(([group2, list]) => /* @__PURE__ */ jsxs("section", { children: [
73
+ /* @__PURE__ */ jsx("strong", { children: group2 }),
64
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))
65
- ] }, group)),
75
+ ] }, group2)),
66
76
  /* @__PURE__ */ jsx("h4", { children: "API Keys" }),
77
+ /* @__PURE__ */ jsxs("div", { children: [
78
+ /* @__PURE__ */ jsx("input", { value: provider, onChange: (event) => setProvider(event.target.value), placeholder: "Provider" }),
79
+ /* @__PURE__ */ jsx("input", { value: label, onChange: (event) => setLabel(event.target.value), placeholder: "Label" }),
80
+ /* @__PURE__ */ jsx("input", { value: group, onChange: (event) => setGroup(event.target.value), placeholder: "Email group" }),
81
+ /* @__PURE__ */ jsx("input", { value: secret, onChange: (event) => setSecret(event.target.value), placeholder: "API key", type: "password" }),
82
+ /* @__PURE__ */ jsx("button", { type: "button", onClick: () => void addKey(), children: "Add key" })
83
+ ] }),
67
84
  keys.map((key) => /* @__PURE__ */ jsxs("div", { children: [
68
85
  key.providerId,
69
86
  ": ",
70
87
  key.label,
71
88
  " ",
72
- key.isActive ? "(active)" : ""
89
+ key.isActive ? "(active)" : "",
90
+ " ",
91
+ /* @__PURE__ */ jsx("button", { type: "button", onClick: () => void runtime.rotateKey(key.providerId), children: "Rotate" })
73
92
  ] }, key.id))
74
93
  ] }),
75
94
  /* @__PURE__ */ jsx("main", { style: { padding: 16, overflow: "auto" }, children: activeAgent ? /* @__PURE__ */ jsxs(Fragment, { children: [
76
95
  /* @__PURE__ */ jsx("h3", { children: agents.find((agent) => agent.id === activeAgent)?.name }),
96
+ /* @__PURE__ */ jsx("pre", { children: JSON.stringify(agents.find((agent) => agent.id === activeAgent)?.intelligenceSpec, null, 2) }),
77
97
  /* @__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
98
  /* @__PURE__ */ jsx("button", { type: "button", onClick: () => void execute(), disabled: busy || !input.trim(), children: "Execute" }),
79
99
  /* @__PURE__ */ jsx("pre", { style: { whiteSpace: "pre-wrap" }, children: result })
@@ -37,7 +37,7 @@ import {
37
37
  } from "./chunk-SA3JADUG.js";
38
38
  import {
39
39
  AikoModule
40
- } from "./chunk-2WMWGF5G.js";
40
+ } from "./chunk-K7L2ZD3D.js";
41
41
  import {
42
42
  UiAuthoringBindingEditor,
43
43
  UiAuthoringInspector,
@@ -60,6 +60,11 @@ 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";
63
68
  import {
64
69
  FodModule
65
70
  } from "./chunk-7CYX3B6O.js";
@@ -75,11 +80,6 @@ import {
75
80
  import {
76
81
  usePredictiveGraph2D
77
82
  } 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";
@@ -63,6 +63,18 @@
63
63
  "requiredServices": [
64
64
  "fod"
65
65
  ]
66
+ },
67
+ {
68
+ "id": "AikoModule",
69
+ "name": "Aiko Application Module",
70
+ "export": "AikoModule",
71
+ "subpath": "aiko",
72
+ "targetTypes": [
73
+ "Main.tabs.aiko"
74
+ ],
75
+ "requiredServices": [
76
+ "aiko"
77
+ ]
66
78
  }
67
79
  ]
68
80
  }
@@ -70,7 +70,8 @@
70
70
  }
71
71
  },
72
72
  "scripts": {
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"
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",
74
+ "typecheck": "tsc --noEmit"
74
75
  },
75
76
  "dependencies": {
76
77
  "@floks/ui": "workspace:*",
@@ -64,18 +64,6 @@ 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";
79
67
  import {
80
68
  ActionButton,
81
69
  Badge,
@@ -103,6 +91,18 @@ import {
103
91
  ToolbarPanel,
104
92
  UIParent
105
93
  } 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,