@feltdb/core 0.12.0 → 0.12.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.
Files changed (54) hide show
  1. package/dist/agent-state.d.ts +489 -0
  2. package/dist/agent-state.d.ts.map +1 -0
  3. package/dist/agent-state.js +993 -0
  4. package/dist/build-identity.json +19 -0
  5. package/dist/create/build-identity.json +19 -0
  6. package/dist/create/package-versions.js +1 -1
  7. package/dist/create/server-source/crates/feltdb/src/lib.rs +11 -0
  8. package/dist/create/server-source/crates/feltdb/src/query_performance.rs +4 -1
  9. package/dist/create/server-source/crates/feltdb/src/state_model.rs +854 -155
  10. package/dist/create/server-source/crates/feltdb/tests/generalized_version_control_substrate_completion.rs +31 -13
  11. package/dist/create/server-source/crates/feltdb/tests/state_ref_authority.rs +918 -0
  12. package/dist/create/server-source/crates/feltdb/tests/workload_envelope_contract.rs +15 -2
  13. package/dist/create/server-source/crates/feltdb-server/Cargo.toml +4 -0
  14. package/dist/create/server-source/crates/feltdb-server/benches/query_shape_observer.rs +136 -0
  15. package/dist/create/server-source/crates/feltdb-server/src/app_state.rs +3 -0
  16. package/dist/create/server-source/crates/feltdb-server/src/lib.rs +1 -0
  17. package/dist/create/server-source/crates/feltdb-server/src/main.rs +74 -5
  18. package/dist/create/server-source/crates/feltdb-server/src/query_shape.rs +1137 -0
  19. package/dist/create/server-source/crates/feltdb-server/tests/fixtures/query-shape-trace.expected.json +300 -0
  20. package/dist/create/server-source/crates/feltdb-server/tests/fixtures/query-shape-trace.json +25 -0
  21. package/dist/create/server-source/crates/feltdb-server/tests/query_shape_trace.rs +128 -0
  22. package/dist/index-core.d.ts +1 -0
  23. package/dist/index-core.d.ts.map +1 -1
  24. package/dist/index-core.js +1 -0
  25. package/dist/studio/app.d.ts.map +1 -1
  26. package/dist/studio/components/GlobalSearch.d.ts.map +1 -1
  27. package/dist/studio/components/index.js +1 -1
  28. package/dist/studio/{components-BHTKlUgT.js → components-Bivm2lX6.js} +2 -1
  29. package/dist/studio/control-plane/Agents.d.ts.map +1 -1
  30. package/dist/studio/control-plane/Data.d.ts.map +1 -1
  31. package/dist/studio/control-plane/Operations.d.ts.map +1 -1
  32. package/dist/studio/control-plane/Overview.d.ts.map +1 -1
  33. package/dist/studio/control-plane/Schema.d.ts.map +1 -1
  34. package/dist/studio/control-plane/State.d.ts +11 -0
  35. package/dist/studio/control-plane/State.d.ts.map +1 -1
  36. package/dist/studio/control-plane/index.d.ts +1 -1
  37. package/dist/studio/control-plane/index.d.ts.map +1 -1
  38. package/dist/studio/control-plane/index.js +2 -2
  39. package/dist/studio/control-plane/primitives.d.ts +14 -2
  40. package/dist/studio/control-plane/primitives.d.ts.map +1 -1
  41. package/dist/studio/control-plane-CLm69XwX.js +4121 -0
  42. package/dist/studio/index.js +266 -235
  43. package/dist/studio/studio.css +1 -1
  44. package/dist/studio-app/assets/{feltdb_wasm-DYfWAV0E.js → feltdb_wasm-DACcD-zs.js} +1 -1
  45. package/dist/studio-app/assets/feltdb_wasm_bg-BejThWID.wasm +0 -0
  46. package/dist/studio-app/assets/index-CiC8VY-a.css +1 -0
  47. package/dist/studio-app/assets/index-CoZaxnlm.js +30 -0
  48. package/dist/studio-app/index.html +2 -2
  49. package/dist/wasm/feltdb_wasm_bg.wasm +0 -0
  50. package/package.json +2 -2
  51. package/dist/studio/control-plane-DP8ljTDO.js +0 -3207
  52. package/dist/studio-app/assets/feltdb_wasm_bg-DHiOUhoQ.wasm +0 -0
  53. package/dist/studio-app/assets/index-6f6KVx5R.js +0 -30
  54. package/dist/studio-app/assets/index-BrsF-kWL.css +0 -1
@@ -1,18 +1,44 @@
1
- import { C as e, E as t, S as n, T as r, _ as i, a, b as ee, c as o, d as s, f as c, g as l, h as u, i as d, l as f, m as p, n as m, o as h, p as te, r as g, s as _, t as v, u as y, v as b, w as x, x as S, y as C } from "./components-BHTKlUgT.js";
2
- import { ServiceApiError as w, StudioServiceApi as T, isSecretField as E, resolveStudioApplicationId as D, safeDisplayValue as O, serviceApiErrorMessage as k } from "./utils/service-api.js";
3
- import { StudioProposalApi as A, proposalErrorMessage as j, proposalSections as M } from "./utils/proposal-api.js";
4
- import { t as N } from "./KeyManagementPanel-DZuSeWBK.js";
5
- import { CapabilitySet as P, ControlPlaneApi as F, ControlPlaneError as ne, controlPlaneErrorMessage as re, formatStatePath as ie } from "./utils/control-plane-api.js";
6
- import { A as I, C as ae, D as oe, E as se, M as ce, O as le, S as ue, T as de, _ as fe, a as pe, b as me, c as L, d as R, f as z, g as he, h as B, i as V, j as ge, k as _e, l as ve, m as H, n as U, o as W, p as G, r as K, s as ye, t as q, u as be, v as xe, w as Se, x as Ce, y as we } from "./control-plane-DP8ljTDO.js";
7
- import { ManagedInstanceUtil as Te } from "./utils/managed-instance.js";
8
- import { ManagedInstancePanel as Ee } from "./components/ManagedInstancePanel.js";
9
- import { capitalize as De, fetchDashboardStats as Oe, fetchDiagnostics as ke, fetchPeers as Ae, fetchProvenance as je, formatBytes as Me, formatReference as Ne, formatRelativeTime as Pe, formatTime as Fe, searchReferences as Ie } from "./utils/index.js";
10
- import { useEffect as J, useState as Y } from "react";
11
- import { BrowserRouter as Le, Link as X, Route as Z, Routes as Re } from "react-router-dom";
12
- import { Fragment as ze, jsx as Q, jsxs as $ } from "react/jsx-runtime";
13
- import { parseFlowSpec as Be } from "@feltdb/core";
1
+ import { A as e, C as t, D as n, E as r, F as i, I as a, L as o, M as s, N as c, O as l, P as u, S as d, T as f, _ as p, a as m, b as h, c as g, d as _, f as v, g as y, h as b, i as x, j as S, k as C, l as w, m as T, n as E, o as D, p as O, r as ee, s as k, t as A, u as j, v as M, w as N, x as P, y as te } from "./control-plane-CLm69XwX.js";
2
+ import { C as F, E as ne, S as re, T as ie, _ as I, a as ae, b as L, c as oe, d as se, f as R, g as z, h as B, i as ce, l as V, m as H, n as le, o as ue, p as U, r as de, s as fe, t as pe, u as W, v as G, w as me, x as he, y as K } from "./components-Bivm2lX6.js";
3
+ import { ServiceApiError as ge, StudioServiceApi as _e, isSecretField as ve, resolveStudioApplicationId as ye, safeDisplayValue as be, serviceApiErrorMessage as xe } from "./utils/service-api.js";
4
+ import { StudioProposalApi as Se, proposalErrorMessage as Ce, proposalSections as we } from "./utils/proposal-api.js";
5
+ import { t as q } from "./KeyManagementPanel-DZuSeWBK.js";
6
+ import { CapabilitySet as Te, ControlPlaneApi as Ee, ControlPlaneError as De, controlPlaneErrorMessage as Oe, formatStatePath as ke } from "./utils/control-plane-api.js";
7
+ import { ManagedInstanceUtil as Ae } from "./utils/managed-instance.js";
8
+ import { ManagedInstancePanel as je } from "./components/ManagedInstancePanel.js";
9
+ import { capitalize as Me, fetchDashboardStats as Ne, fetchDiagnostics as Pe, fetchPeers as Fe, fetchProvenance as Ie, formatBytes as Le, formatReference as Re, formatRelativeTime as ze, formatTime as Be, searchReferences as Ve } from "./utils/index.js";
10
+ import { useEffect as J, useRef as He, useState as Y } from "react";
11
+ import { BrowserRouter as Ue, Route as X, Routes as We, useLocation as Ge, useNavigate as Ke } from "react-router-dom";
12
+ import { Fragment as qe, jsx as Z, jsxs as Q } from "react/jsx-runtime";
13
+ import { parseFlowSpec as Je } from "@feltdb/core";
14
+ //#region vendor/stack-ui/core/src/dom.js
15
+ function $(e, t) {
16
+ let n = t || document;
17
+ if (e == null || e === !1 || e === !0) return n.createDocumentFragment();
18
+ if (typeof e == "string" || typeof e == "number") return n.createTextNode(String(e));
19
+ if (Array.isArray(e)) {
20
+ let t = n.createDocumentFragment();
21
+ for (let r of e) t.appendChild($(r, n));
22
+ return t;
23
+ }
24
+ if (o(e)) {
25
+ let t = n.createElement(e.t);
26
+ for (let [n, r] of Object.entries(e.a)) r != null && r !== !1 && t.setAttribute(n, r === !0 ? "" : String(r));
27
+ for (let [n, r] of Object.entries(e.on || {})) t.addEventListener(n, r);
28
+ for (let r of e.c) t.appendChild($(r, n));
29
+ return t;
30
+ }
31
+ if (e && typeof e.nodeType == "number") return e;
32
+ throw TypeError("toDom: unsupported child");
33
+ }
34
+ function Ye(e, t) {
35
+ let n = (t || document).getElementById(String(e || "stack-main").replace(/[^A-Za-z0-9_-]/g, "-"));
36
+ n && typeof n.focus == "function" && n.focus({ preventScroll: !0 });
37
+ }
38
+ Object.freeze(Object.fromEntries(Object.entries(a).map(([e, t]) => [e, (e, n) => $(t(e || {}), n)])));
39
+ //#endregion
14
40
  //#region src/app.tsx
15
- function Ve(e) {
41
+ function Xe(e) {
16
42
  return e.explicitAuthority ? {
17
43
  source: "explicit-authority",
18
44
  authorityUrl: e.explicitAuthority
@@ -27,13 +53,13 @@ function Ve(e) {
27
53
  authorityUrl: ""
28
54
  };
29
55
  }
30
- function He({ registration: e }) {
31
- return /* @__PURE__ */ $("div", {
56
+ function Ze({ registration: e }) {
57
+ return /* @__PURE__ */ Q("div", {
32
58
  className: "runtime-notice",
33
59
  children: ["Application connection: ", e ? `Connected ✓${e.namespace ? ` (namespace ${e.namespace})` : ""}` : "Not connected"]
34
60
  });
35
61
  }
36
- var Ue = [
62
+ var Qe = [
37
63
  {
38
64
  path: "/overview",
39
65
  label: "Overview"
@@ -79,285 +105,204 @@ var Ue = [
79
105
  label: "Developer"
80
106
  }
81
107
  ];
82
- function We({ db: t, remoteUrl: n = "", token: r = "", namespace: a = "default", deploymentRuntime: o = "browser", applicationUrl: s = "", applicationId: d = "", environment: m = "production", developmentSession: h, managedPublish: g, sourceSync: _, onConnect: v }) {
83
- let [x, S] = Y(null), w = e(t || null, a), [T, E] = Y([]), [D, O] = Y([]), [k, A] = Y(0), [j, M] = Y(), P = (e) => ({
84
- pathname: e,
85
- search: window.location.search
86
- });
108
+ function $e({ db: e, remoteUrl: t = "", token: n = "", namespace: r = "default", deploymentRuntime: i = "browser", applicationUrl: a = "", applicationId: o = "", environment: c = "production", developmentSession: l, managedPublish: u, sourceSync: d, onConnect: f }) {
109
+ let [m, h] = Y(null), _ = F(e || null, r), [v, S] = Y([]), [C, w] = Y([]), [k, j] = Y(0), [M, N] = Y();
87
110
  J(() => {
88
- let e = !0;
89
- return fetch("/_feltdb/project", { cache: "no-store" }).then(async (t) => {
90
- if (!t.ok) throw Error("No project model endpoint");
91
- let n = await t.json();
92
- e && S(Be(n.source));
111
+ let t = !0;
112
+ return fetch("/_feltdb/project", { cache: "no-store" }).then(async (e) => {
113
+ if (!e.ok) throw Error("No project model endpoint");
114
+ let n = await e.json();
115
+ t && h(Je(n.source));
93
116
  }).catch(async () => {
94
- let n = t ? await t.collection("_flow_apps").all() : [];
95
- e && n[0]?.spec && S(n[0].spec);
117
+ let n = e ? await e.collection("_flow_apps").all() : [];
118
+ t && n[0]?.spec && h(n[0].spec);
96
119
  }), () => {
97
- e = !1;
120
+ t = !1;
98
121
  };
99
- }, [t]), J(() => {
100
- if (!h?.sessionId) return;
122
+ }, [e]), J(() => {
123
+ if (!l?.sessionId) return;
101
124
  let e = !0, t = () => void fetch("/_feltdb/runtime", { cache: "no-store" }).then((e) => e.ok ? e.json() : { runtimes: [] }).then((t) => {
102
- e && E(t.runtimes || []);
125
+ e && S(t.runtimes || []);
103
126
  }).catch(() => {
104
- e && E([]);
127
+ e && S([]);
105
128
  });
106
129
  t();
107
130
  let n = window.setInterval(t, 2e3);
108
131
  return () => {
109
132
  e = !1, window.clearInterval(n);
110
133
  };
111
- }, [h?.sessionId]), J(() => {
112
- let e = T[0]?.runtimeInstanceId;
134
+ }, [l?.sessionId]), J(() => {
135
+ let e = v[0]?.runtimeInstanceId;
113
136
  if (!e) {
114
- O([]);
137
+ w([]);
115
138
  return;
116
139
  }
117
140
  let t = !0, n = 0, r = () => void fetch(`/_feltdb/observations?runtimeInstanceId=${encodeURIComponent(e)}&cursor=${n}&limit=100`, { cache: "no-store" }).then((e) => e.ok ? e.json() : { observations: [] }).then((e) => {
118
- t && (n = e.nextCursor ?? n, A(e.dropped || 0), O((t) => [...t, ...e.observations || []].slice(-200)));
141
+ t && (n = e.nextCursor ?? n, j(e.dropped || 0), w((t) => [...t, ...e.observations || []].slice(-200)));
119
142
  }).catch(() => void 0);
120
143
  r();
121
144
  let i = window.setInterval(r, 1e3);
122
145
  return () => {
123
146
  t = !1, window.clearInterval(i);
124
147
  };
125
- }, [T[0]?.runtimeInstanceId]);
126
- let F = (e, t) => {
127
- M({
148
+ }, [v[0]?.runtimeInstanceId]);
149
+ let P = (e, t) => {
150
+ N({
128
151
  collection: e,
129
152
  id: t
130
153
  });
131
154
  let n = window.location.search;
132
155
  window.history.pushState({}, "", `/data${n}`), window.dispatchEvent(new PopStateEvent("popstate"));
133
156
  };
134
- return /* @__PURE__ */ Q(I, {
157
+ return /* @__PURE__ */ Z(s, {
135
158
  options: {
136
- baseUrl: n,
137
- token: r,
138
- applicationId: d,
139
- environment: m
159
+ baseUrl: t,
160
+ token: n,
161
+ applicationId: o,
162
+ environment: c
140
163
  },
141
- children: /* @__PURE__ */ Q(Le, { children: /* @__PURE__ */ $("div", {
142
- className: "studio-app",
143
- children: [/* @__PURE__ */ $("nav", {
144
- className: "studio-nav",
145
- children: [
146
- /* @__PURE__ */ $("div", {
147
- className: "nav-header",
148
- children: [/* @__PURE__ */ Q("h1", { children: "FeltDB Studio" }), w && /* @__PURE__ */ Q("div", {
149
- className: "instance-info",
150
- children: w.namespace
151
- })]
152
- }),
153
- /* @__PURE__ */ Q("div", {
154
- className: "nav-search",
155
- children: /* @__PURE__ */ Q(l, {
156
- db: t,
157
- model: x
158
- })
159
- }),
160
- /* @__PURE__ */ $("ul", {
161
- className: "nav-menu",
162
- children: [
163
- /* @__PURE__ */ Q("li", {
164
- className: "nav-section",
165
- children: "Operate"
166
- }),
167
- Ue.map((e) => /* @__PURE__ */ Q("li", { children: /* @__PURE__ */ Q(X, {
168
- to: P(e.path),
169
- children: e.label
170
- }) }, e.path)),
171
- /* @__PURE__ */ Q("li", {
172
- className: "nav-section",
173
- children: "Design"
174
- }),
175
- /* @__PURE__ */ Q("li", { children: /* @__PURE__ */ Q(X, {
176
- to: P("/"),
177
- children: "Application"
178
- }) }),
179
- /* @__PURE__ */ Q("li", { children: /* @__PURE__ */ Q(X, {
180
- to: P("/capabilities"),
181
- children: "Capabilities"
182
- }) }),
183
- /* @__PURE__ */ Q("li", { children: /* @__PURE__ */ Q(X, {
184
- to: P("/contract"),
185
- children: "Contract"
186
- }) }),
187
- /* @__PURE__ */ Q("li", { children: /* @__PURE__ */ Q(X, {
188
- to: P("/policies"),
189
- children: "Policies"
190
- }) }),
191
- /* @__PURE__ */ Q("li", { children: /* @__PURE__ */ Q(X, {
192
- to: P("/workflows"),
193
- children: "Workflows"
194
- }) }),
195
- /* @__PURE__ */ Q("li", { children: /* @__PURE__ */ Q(X, {
196
- to: P("/agent-definitions"),
197
- children: "Agent definitions"
198
- }) }),
199
- /* @__PURE__ */ Q("li", { children: /* @__PURE__ */ Q(X, {
200
- to: P("/modules"),
201
- children: "Modules"
202
- }) }),
203
- /* @__PURE__ */ Q("li", { children: /* @__PURE__ */ Q(X, {
204
- to: P("/proposals"),
205
- children: "Proposals"
206
- }) }),
207
- h?.sessionId && /* @__PURE__ */ Q("li", { children: /* @__PURE__ */ Q(X, {
208
- to: P("/activity"),
209
- children: "Live Activity"
210
- }) }),
211
- /* @__PURE__ */ Q("li", { children: /* @__PURE__ */ Q(X, {
212
- to: P("/executions"),
213
- children: "Executions"
214
- }) }),
215
- /* @__PURE__ */ Q("li", { children: /* @__PURE__ */ Q(X, {
216
- to: P("/connection"),
217
- children: "Connection"
218
- }) }),
219
- /* @__PURE__ */ Q("li", { children: /* @__PURE__ */ Q(X, {
220
- to: P("/api-keys"),
221
- children: "API Keys"
222
- }) })
223
- ]
224
- })
225
- ]
226
- }), /* @__PURE__ */ $("main", {
164
+ children: /* @__PURE__ */ Z(Ue, { children: /* @__PURE__ */ Z(tt, {
165
+ namespace: _?.namespace,
166
+ liveActivity: !!l?.sessionId,
167
+ search: /* @__PURE__ */ Z(z, {
168
+ db: e,
169
+ model: m
170
+ }),
171
+ children: /* @__PURE__ */ Q("div", {
227
172
  className: "studio-content",
228
- children: [h?.sessionId && /* @__PURE__ */ Q(He, { registration: T[0] }), /* @__PURE__ */ $(Re, { children: [
229
- /* @__PURE__ */ Q(Z, {
173
+ children: [l?.sessionId && /* @__PURE__ */ Z(Ze, { registration: v[0] }), /* @__PURE__ */ Q(We, { children: [
174
+ /* @__PURE__ */ Z(X, {
230
175
  path: "/overview",
231
- element: /* @__PURE__ */ Q(B, {})
176
+ element: /* @__PURE__ */ Z(p, {})
232
177
  }),
233
- /* @__PURE__ */ Q(Z, {
178
+ /* @__PURE__ */ Z(X, {
234
179
  path: "/data",
235
- element: /* @__PURE__ */ Q(H, {
236
- focus: j,
237
- onFocusHandled: () => M(void 0)
180
+ element: /* @__PURE__ */ Z(y, {
181
+ focus: M,
182
+ onFocusHandled: () => N(void 0)
238
183
  })
239
184
  }),
240
- /* @__PURE__ */ Q(Z, {
185
+ /* @__PURE__ */ Z(X, {
241
186
  path: "/schema",
242
- element: /* @__PURE__ */ Q(G, {})
187
+ element: /* @__PURE__ */ Z(b, {})
243
188
  }),
244
- /* @__PURE__ */ Q(Z, {
189
+ /* @__PURE__ */ Z(X, {
245
190
  path: "/agents",
246
- element: /* @__PURE__ */ Q(z, { onOpenRecord: F })
191
+ element: /* @__PURE__ */ Z(T, { onOpenRecord: P })
247
192
  }),
248
- /* @__PURE__ */ Q(Z, {
193
+ /* @__PURE__ */ Z(X, {
249
194
  path: "/state",
250
- element: /* @__PURE__ */ Q(R, {})
195
+ element: /* @__PURE__ */ Z(O, {})
251
196
  }),
252
- /* @__PURE__ */ Q(Z, {
197
+ /* @__PURE__ */ Z(X, {
253
198
  path: "/operations",
254
- element: /* @__PURE__ */ Q(L, { onOpenRecord: F })
199
+ element: /* @__PURE__ */ Z(g, { onOpenRecord: P })
255
200
  }),
256
- /* @__PURE__ */ Q(Z, {
201
+ /* @__PURE__ */ Z(X, {
257
202
  path: "/replication",
258
- element: /* @__PURE__ */ Q(V, {})
203
+ element: /* @__PURE__ */ Z(x, {})
259
204
  }),
260
- /* @__PURE__ */ Q(Z, {
205
+ /* @__PURE__ */ Z(X, {
261
206
  path: "/applications",
262
- element: /* @__PURE__ */ Q(q, {})
207
+ element: /* @__PURE__ */ Z(A, {})
263
208
  }),
264
- /* @__PURE__ */ Q(Z, {
209
+ /* @__PURE__ */ Z(X, {
265
210
  path: "/monitoring",
266
- element: /* @__PURE__ */ Q(K, {})
211
+ element: /* @__PURE__ */ Z(ee, {})
267
212
  }),
268
- /* @__PURE__ */ Q(Z, {
213
+ /* @__PURE__ */ Z(X, {
269
214
  path: "/settings",
270
- element: /* @__PURE__ */ Q(W, {})
215
+ element: /* @__PURE__ */ Z(D, {})
271
216
  }),
272
- /* @__PURE__ */ Q(Z, {
217
+ /* @__PURE__ */ Z(X, {
273
218
  path: "/developer",
274
- element: /* @__PURE__ */ Q(U, {})
219
+ element: /* @__PURE__ */ Z(E, {})
275
220
  }),
276
- /* @__PURE__ */ Q(Z, {
221
+ /* @__PURE__ */ Z(X, {
277
222
  path: "/",
278
- element: /* @__PURE__ */ $(ze, { children: [/* @__PURE__ */ Q(p, {
279
- configuration: _,
223
+ element: /* @__PURE__ */ Q(qe, { children: [/* @__PURE__ */ Z(H, {
224
+ configuration: d,
280
225
  onApplied: () => window.location.reload()
281
- }), /* @__PURE__ */ Q(u, {
282
- db: t,
283
- namespace: a,
284
- projectSpec: x,
285
- managedPublish: g,
286
- onSpecChange: S
226
+ }), /* @__PURE__ */ Z(B, {
227
+ db: e,
228
+ namespace: r,
229
+ projectSpec: m,
230
+ managedPublish: u,
231
+ onSpecChange: h
287
232
  })] })
288
233
  }),
289
- /* @__PURE__ */ Q(Z, {
234
+ /* @__PURE__ */ Z(X, {
290
235
  path: "/capabilities",
291
- element: /* @__PURE__ */ Q(f, {
292
- db: t,
293
- model: x
236
+ element: /* @__PURE__ */ Z(V, {
237
+ db: e,
238
+ model: m
294
239
  })
295
240
  }),
296
- /* @__PURE__ */ Q(Z, {
241
+ /* @__PURE__ */ Z(X, {
297
242
  path: "/contract",
298
- element: /* @__PURE__ */ Q(y, {
299
- model: x,
243
+ element: /* @__PURE__ */ Z(W, {
244
+ model: m,
300
245
  section: "schema"
301
246
  })
302
247
  }),
303
- /* @__PURE__ */ Q(Z, {
248
+ /* @__PURE__ */ Z(X, {
304
249
  path: "/policies",
305
- element: /* @__PURE__ */ Q(y, {
306
- model: x,
250
+ element: /* @__PURE__ */ Z(W, {
251
+ model: m,
307
252
  section: "policies"
308
253
  })
309
254
  }),
310
- /* @__PURE__ */ Q(Z, {
255
+ /* @__PURE__ */ Z(X, {
311
256
  path: "/workflows",
312
- element: /* @__PURE__ */ Q(C, {
313
- db: t,
314
- model: x
257
+ element: /* @__PURE__ */ Z(K, {
258
+ db: e,
259
+ model: m
315
260
  })
316
261
  }),
317
- /* @__PURE__ */ Q(Z, {
262
+ /* @__PURE__ */ Z(X, {
318
263
  path: "/agent-definitions",
319
- element: /* @__PURE__ */ Q(b, {
320
- db: t,
321
- model: x
264
+ element: /* @__PURE__ */ Z(G, {
265
+ db: e,
266
+ model: m
322
267
  })
323
268
  }),
324
- /* @__PURE__ */ Q(Z, {
269
+ /* @__PURE__ */ Z(X, {
325
270
  path: "/modules",
326
- element: /* @__PURE__ */ Q(c, { model: x })
271
+ element: /* @__PURE__ */ Z(R, { model: m })
327
272
  }),
328
- /* @__PURE__ */ Q(Z, {
273
+ /* @__PURE__ */ Z(X, {
329
274
  path: "/executions",
330
- element: /* @__PURE__ */ Q(ee, {
331
- db: t,
332
- model: x
275
+ element: /* @__PURE__ */ Z(L, {
276
+ db: e,
277
+ model: m
333
278
  })
334
279
  }),
335
- /* @__PURE__ */ Q(Z, {
280
+ /* @__PURE__ */ Z(X, {
336
281
  path: "/proposals",
337
- element: d ? /* @__PURE__ */ Q(te, {
338
- serviceUrl: n,
339
- token: r,
340
- applicationId: d,
341
- environment: m,
342
- applicationName: x?.app,
343
- sourceSync: _
344
- }) : /* @__PURE__ */ Q("div", {
282
+ element: o ? /* @__PURE__ */ Z(U, {
283
+ serviceUrl: t,
284
+ token: n,
285
+ applicationId: o,
286
+ environment: c,
287
+ applicationName: m?.app,
288
+ sourceSync: d
289
+ }) : /* @__PURE__ */ Z("div", {
345
290
  className: "model-empty",
346
291
  children: "No active application is selected."
347
292
  })
348
293
  }),
349
- /* @__PURE__ */ Q(Z, {
294
+ /* @__PURE__ */ Z(X, {
350
295
  path: "/activity",
351
- element: /* @__PURE__ */ $("div", {
296
+ element: /* @__PURE__ */ Q("div", {
352
297
  className: "runtime-activity",
353
298
  children: [
354
- /* @__PURE__ */ Q("h1", { children: "Live Activity" }),
355
- /* @__PURE__ */ $("p", { children: [
356
- D.some((e) => Date.now() - e.timestamp < 5e3) ? "Active" : "Idle",
299
+ /* @__PURE__ */ Z("h1", { children: "Live Activity" }),
300
+ /* @__PURE__ */ Q("p", { children: [
301
+ C.some((e) => Date.now() - e.timestamp < 5e3) ? "Active" : "Idle",
357
302
  " · FeltDB client instance ",
358
- T[0]?.runtimeInstanceId || "not connected"
303
+ v[0]?.runtimeInstanceId || "not connected"
359
304
  ] }),
360
- k > 0 && /* @__PURE__ */ $("p", {
305
+ k > 0 && /* @__PURE__ */ Q("p", {
361
306
  className: "runtime-notice",
362
307
  children: [
363
308
  "Observation is incomplete: ",
@@ -365,50 +310,136 @@ function We({ db: t, remoteUrl: n = "", token: r = "", namespace: a = "default",
365
310
  " events dropped."
366
311
  ]
367
312
  }),
368
- /* @__PURE__ */ $("table", { children: [/* @__PURE__ */ Q("thead", { children: /* @__PURE__ */ $("tr", { children: [
369
- /* @__PURE__ */ Q("th", { children: "Time" }),
370
- /* @__PURE__ */ Q("th", { children: "Operation" }),
371
- /* @__PURE__ */ Q("th", { children: "Collection" }),
372
- /* @__PURE__ */ Q("th", { children: "Status" }),
373
- /* @__PURE__ */ Q("th", { children: "Duration" })
374
- ] }) }), /* @__PURE__ */ Q("tbody", { children: [...D].reverse().map((e) => /* @__PURE__ */ $("tr", { children: [
375
- /* @__PURE__ */ Q("td", { children: new Date(e.timestamp).toLocaleTimeString() }),
376
- /* @__PURE__ */ Q("td", { children: e.operation?.type }),
377
- /* @__PURE__ */ Q("td", { children: e.operation?.collection || "—" }),
378
- /* @__PURE__ */ Q("td", { children: e.status }),
379
- /* @__PURE__ */ Q("td", { children: e.durationMs === void 0 ? "—" : `${e.durationMs} ms` })
313
+ /* @__PURE__ */ Q("table", { children: [/* @__PURE__ */ Z("thead", { children: /* @__PURE__ */ Q("tr", { children: [
314
+ /* @__PURE__ */ Z("th", { children: "Time" }),
315
+ /* @__PURE__ */ Z("th", { children: "Operation" }),
316
+ /* @__PURE__ */ Z("th", { children: "Collection" }),
317
+ /* @__PURE__ */ Z("th", { children: "Status" }),
318
+ /* @__PURE__ */ Z("th", { children: "Duration" })
319
+ ] }) }), /* @__PURE__ */ Z("tbody", { children: [...C].reverse().map((e) => /* @__PURE__ */ Q("tr", { children: [
320
+ /* @__PURE__ */ Z("td", { children: new Date(e.timestamp).toLocaleTimeString() }),
321
+ /* @__PURE__ */ Z("td", { children: e.operation?.type }),
322
+ /* @__PURE__ */ Z("td", { children: e.operation?.collection || "—" }),
323
+ /* @__PURE__ */ Z("td", { children: e.status }),
324
+ /* @__PURE__ */ Z("td", { children: e.durationMs === void 0 ? "—" : `${e.durationMs} ms` })
380
325
  ] }, e.cursor || e.eventId)) })] })
381
326
  ]
382
327
  })
383
328
  }),
384
- /* @__PURE__ */ Q(Z, {
329
+ /* @__PURE__ */ Z(X, {
385
330
  path: "/connection",
386
- element: /* @__PURE__ */ Q(i, {
387
- db: t,
388
- remoteUrl: n,
389
- token: r,
390
- applicationUrl: s,
391
- feltDBRuntime: o,
392
- authorityUrl: h?.authorityUrl || n,
393
- onConnect: v
331
+ element: /* @__PURE__ */ Z(I, {
332
+ db: e,
333
+ remoteUrl: t,
334
+ token: n,
335
+ applicationUrl: a,
336
+ feltDBRuntime: i,
337
+ authorityUrl: l?.authorityUrl || t,
338
+ onConnect: f
394
339
  })
395
340
  }),
396
- /* @__PURE__ */ Q(Z, {
341
+ /* @__PURE__ */ Z(X, {
397
342
  path: "/api-keys",
398
- element: /* @__PURE__ */ $("div", {
343
+ element: /* @__PURE__ */ Q("div", {
399
344
  style: { padding: "2rem" },
400
- children: [/* @__PURE__ */ Q("h1", { children: "API Key Management" }), /* @__PURE__ */ Q(N, {
401
- apiUrl: n,
402
- token: r,
403
- namespace: a,
345
+ children: [/* @__PURE__ */ Z("h1", { children: "API Key Management" }), /* @__PURE__ */ Z(q, {
346
+ apiUrl: t,
347
+ token: n,
348
+ namespace: r,
404
349
  onConfigure: () => window.location.assign("/connection")
405
350
  })]
406
351
  })
407
352
  })
408
353
  ] })]
409
- })]
354
+ })
410
355
  }) })
411
356
  });
412
357
  }
358
+ var et = [
359
+ {
360
+ path: "/",
361
+ label: "Application"
362
+ },
363
+ {
364
+ path: "/capabilities",
365
+ label: "Capabilities"
366
+ },
367
+ {
368
+ path: "/contract",
369
+ label: "Contract"
370
+ },
371
+ {
372
+ path: "/policies",
373
+ label: "Policies"
374
+ },
375
+ {
376
+ path: "/workflows",
377
+ label: "Workflows"
378
+ },
379
+ {
380
+ path: "/agent-definitions",
381
+ label: "Agent definitions"
382
+ },
383
+ {
384
+ path: "/modules",
385
+ label: "Modules"
386
+ },
387
+ {
388
+ path: "/proposals",
389
+ label: "Proposals"
390
+ },
391
+ {
392
+ path: "/activity",
393
+ label: "Live Activity",
394
+ live: !0
395
+ },
396
+ {
397
+ path: "/executions",
398
+ label: "Executions"
399
+ },
400
+ {
401
+ path: "/connection",
402
+ label: "Connection"
403
+ },
404
+ {
405
+ path: "/api-keys",
406
+ label: "API Keys"
407
+ }
408
+ ];
409
+ function tt({ namespace: e, liveActivity: t, search: n, children: r }) {
410
+ let a = Ge(), o = Ke(), s = He(!0);
411
+ J(() => {
412
+ if (s.current) {
413
+ s.current = !1;
414
+ return;
415
+ }
416
+ Ye("studio-main");
417
+ }, [a.pathname]);
418
+ let c = (e) => (t, n) => ({
419
+ id: t.path,
420
+ label: t.label,
421
+ href: `${t.path}${a.search}`,
422
+ group: e,
423
+ order: n,
424
+ current: a.pathname === t.path
425
+ });
426
+ return /* @__PURE__ */ Z(i, {
427
+ product: {
428
+ name: "FeltDB Studio",
429
+ homeHref: `/overview${a.search}`,
430
+ mark: "F"
431
+ },
432
+ mainId: "studio-main",
433
+ context: e ? /* @__PURE__ */ Z("span", {
434
+ className: "instance-info",
435
+ title: "Namespace",
436
+ children: e
437
+ }) : void 0,
438
+ search: n,
439
+ navigation: [...Qe.map(c("Operate")), ...et.filter((e) => !e.live || t).map(c("Design"))],
440
+ onNavigate: (e) => o(e),
441
+ children: r
442
+ });
443
+ }
413
444
  //#endregion
414
- export { b as AgentExplorer, z as Agents, He as ApplicationConnectionNotice, u as ApplicationDesigner, q as Applications, p as AskFeltDB, f as CapabilityExplorer, P as CapabilitySet, he as Capable, g as ConflictExplorer, y as ContractInspector, F as ControlPlaneApi, ne as ControlPlaneError, I as ControlPlaneProvider, H as DataBrowser, U as Developer, fe as Empty, ee as ExecutionViewer, xe as Failure, l as GlobalSearch, v as HealthCenter, we as Identity, B as InstanceOverview, me as Json, N as KeyManagementPanel, Ce as Loading, Ee as ManagedInstancePanel, Te as ManagedInstanceUtil, c as ModuleExplorer, K as Monitoring, L as OperationsConsole, a as OperationsExplorer, o as OverviewDashboard, ue as Page, ae as PartialNotice, Se as Path, d as PeerMap, te as ProposalBrowser, m as ProvenanceViewer, h as ReferenceExplorer, V as Replication, pe as ReplicationHealthUnavailable, G as SchemaExplorer, w as ServiceApiError, W as Settings, i as SettingsPanel, de as Stat, _ as StateExplorer, R as StateWorkbench, se as StatusPill, We as StudioApp, A as StudioProposalApi, T as StudioServiceApi, oe as Tabs, le as Timestamp, ve as TransactionObservabilityUnavailable, _e as Unavailable, C as WorkflowVisualizer, De as capitalize, re as controlPlaneErrorMessage, s as dataCollectionLocation, Oe as fetchDashboardStats, ke as fetchDiagnostics, Ae as fetchPeers, je as fetchProvenance, Me as formatBytes, Ne as formatReference, Pe as formatRelativeTime, ie as formatStatePath, Fe as formatTime, E as isSecretField, be as operationsAvailability, j as proposalErrorMessage, M as proposalSections, ye as replicationAvailability, D as resolveStudioApplicationId, Ve as resolveStudioConnection, O as safeDisplayValue, Ie as searchReferences, k as serviceApiErrorMessage, S as useCollection, ge as useControlPlane, ce as useControlPlaneResource, n as useDashboardStats, e as useFeltDB, x as usePeers, r as useProvenance, t as useRuntimeDiagnostics };
445
+ export { G as AgentExplorer, T as Agents, Ze as ApplicationConnectionNotice, B as ApplicationDesigner, A as Applications, H as AskFeltDB, V as CapabilityExplorer, Te as CapabilitySet, M as Capable, _ as CommittedRevision, de as ConflictExplorer, W as ContractInspector, Ee as ControlPlaneApi, De as ControlPlaneError, s as ControlPlaneProvider, y as DataBrowser, E as Developer, te as Empty, L as ExecutionViewer, h as Failure, z as GlobalSearch, pe as HealthCenter, v as INTEGRITY_CHECK, P as Identity, p as InstanceOverview, d as Json, q as KeyManagementPanel, t as Loading, je as ManagedInstancePanel, Ae as ManagedInstanceUtil, R as ModuleExplorer, ee as Monitoring, g as OperationsConsole, ae as OperationsExplorer, oe as OverviewDashboard, N as Page, f as PartialNotice, r as Path, ce as PeerMap, U as ProposalBrowser, le as ProvenanceViewer, ue as ReferenceExplorer, x as Replication, m as ReplicationHealthUnavailable, b as SchemaExplorer, ge as ServiceApiError, D as Settings, I as SettingsPanel, n as Stat, fe as StateExplorer, O as StateWorkbench, l as StatusPill, $e as StudioApp, Se as StudioProposalApi, _e as StudioServiceApi, C as Tabs, e as Timestamp, w as TransactionObservabilityUnavailable, S as Unavailable, K as WorkflowVisualizer, Me as capitalize, Oe as controlPlaneErrorMessage, se as dataCollectionLocation, Ne as fetchDashboardStats, Pe as fetchDiagnostics, Fe as fetchPeers, Ie as fetchProvenance, Le as formatBytes, Re as formatReference, ze as formatRelativeTime, ke as formatStatePath, Be as formatTime, ve as isSecretField, j as operationsAvailability, Ce as proposalErrorMessage, we as proposalSections, k as replicationAvailability, ye as resolveStudioApplicationId, Xe as resolveStudioConnection, be as safeDisplayValue, Ve as searchReferences, xe as serviceApiErrorMessage, he as useCollection, c as useControlPlane, u as useControlPlaneResource, re as useDashboardStats, F as useFeltDB, me as usePeers, ie as useProvenance, ne as useRuntimeDiagnostics };