@feltdb/core 0.8.8 → 0.9.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 (73) hide show
  1. package/dist/authority-scope.d.ts +16 -0
  2. package/dist/authority-scope.d.ts.map +1 -0
  3. package/dist/authority-scope.js +39 -0
  4. package/dist/create/package-versions.js +1 -1
  5. package/dist/create/server-source/crates/feltdb/src/lib.rs +343 -1
  6. package/dist/create/server-source/crates/feltdb/src/state_model.rs +15 -2
  7. package/dist/create/server-source/crates/feltdb-server/src/control_plane.rs +845 -0
  8. package/dist/create/server-source/crates/feltdb-server/src/lib.rs +1 -0
  9. package/dist/create/server-source/crates/feltdb-server/src/main.rs +1381 -5
  10. package/dist/create/server-source/crates/feltdb-server/src/principals.rs +37 -0
  11. package/dist/db.d.ts +16 -1
  12. package/dist/db.d.ts.map +1 -1
  13. package/dist/db.js +76 -4
  14. package/dist/deployment.d.ts +2 -0
  15. package/dist/deployment.d.ts.map +1 -1
  16. package/dist/error-codes.d.ts +7 -1
  17. package/dist/error-codes.d.ts.map +1 -1
  18. package/dist/error-codes.js +20 -4
  19. package/dist/file-db.d.ts.map +1 -1
  20. package/dist/file-db.js +5 -1
  21. package/dist/http-db.d.ts +3 -0
  22. package/dist/http-db.d.ts.map +1 -1
  23. package/dist/http-db.js +10 -3
  24. package/dist/index-core.d.ts +1 -0
  25. package/dist/index-core.d.ts.map +1 -1
  26. package/dist/index-core.js +1 -0
  27. package/dist/operation-admission.d.ts +7 -0
  28. package/dist/operation-admission.d.ts.map +1 -1
  29. package/dist/operation-admission.js +0 -7
  30. package/dist/studio/app.d.ts.map +1 -1
  31. package/dist/studio/components/index.js +2 -2
  32. package/dist/studio/{components-Duq2xQWt.js → components-CehkcX_k.js} +2355 -2355
  33. package/dist/studio/control-plane/Agents.d.ts +6 -0
  34. package/dist/studio/control-plane/Agents.d.ts.map +1 -0
  35. package/dist/studio/control-plane/Data.d.ts +10 -0
  36. package/dist/studio/control-plane/Data.d.ts.map +1 -0
  37. package/dist/studio/control-plane/Instance.d.ts +7 -0
  38. package/dist/studio/control-plane/Instance.d.ts.map +1 -0
  39. package/dist/studio/control-plane/Operations.d.ts +6 -0
  40. package/dist/studio/control-plane/Operations.d.ts.map +1 -0
  41. package/dist/studio/control-plane/Overview.d.ts +4 -0
  42. package/dist/studio/control-plane/Overview.d.ts.map +1 -0
  43. package/dist/studio/control-plane/Schema.d.ts +4 -0
  44. package/dist/studio/control-plane/Schema.d.ts.map +1 -0
  45. package/dist/studio/control-plane/State.d.ts +4 -0
  46. package/dist/studio/control-plane/State.d.ts.map +1 -0
  47. package/dist/studio/control-plane/context.d.ts +42 -0
  48. package/dist/studio/control-plane/context.d.ts.map +1 -0
  49. package/dist/studio/control-plane/index.d.ts +18 -0
  50. package/dist/studio/control-plane/index.d.ts.map +1 -0
  51. package/dist/studio/control-plane/index.js +2 -0
  52. package/dist/studio/control-plane/primitives.d.ts +70 -0
  53. package/dist/studio/control-plane/primitives.d.ts.map +1 -0
  54. package/dist/studio/control-plane-D6TT2fCQ.js +3064 -0
  55. package/dist/studio/index.d.ts +2 -0
  56. package/dist/studio/index.d.ts.map +1 -1
  57. package/dist/studio/index.js +326 -323
  58. package/dist/studio/studio.css +1 -1
  59. package/dist/studio/utils/control-plane-api.d.ts +442 -0
  60. package/dist/studio/utils/control-plane-api.d.ts.map +1 -0
  61. package/dist/studio/utils/control-plane-api.js +204 -0
  62. package/dist/studio/utils/index.d.ts +1 -0
  63. package/dist/studio/utils/index.d.ts.map +1 -1
  64. package/dist/studio/utils/index.js +13 -12
  65. package/dist/studio-app/assets/{feltdb_wasm-C1VhI-U5.js → feltdb_wasm-DksXDnLa.js} +1 -1
  66. package/dist/studio-app/assets/feltdb_wasm_bg-Yy4QRHJT.wasm +0 -0
  67. package/dist/studio-app/assets/{index-Cd_NPw14.css → index-BrsF-kWL.css} +1 -1
  68. package/dist/studio-app/assets/index-CZ55nLgp.js +30 -0
  69. package/dist/studio-app/index.html +2 -2
  70. package/dist/wasm/feltdb_wasm_bg.wasm +0 -0
  71. package/package.json +1 -1
  72. package/dist/studio-app/assets/feltdb_wasm_bg-C8HXbAXb.wasm +0 -0
  73. package/dist/studio-app/assets/index-ByHX4xDq.js +0 -29
@@ -1,390 +1,393 @@
1
- import { C as e, S as t, T as n, _ as r, a as i, b as a, 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 g, r as _, s as v, t as y, u as b, v as x, w as S, x as ee, y as C } from "./components-Duq2xQWt.js";
2
- import { ServiceApiError as w, StudioServiceApi as T, isSecretField as E, safeDisplayValue as te, serviceApiErrorMessage as D } from "./utils/service-api.js";
1
+ import { C as e, S as t, T as n, _ as r, a as i, b as a, c as ee, d as o, f as s, g as c, h as l, i as te, l as u, m as d, n as f, o as p, p as m, r as h, s as g, t as _, u as v, v as y, w as b, x, y as S } from "./components-CehkcX_k.js";
2
+ import { ServiceApiError as C, StudioServiceApi as w, isSecretField as T, safeDisplayValue as E, serviceApiErrorMessage as D } from "./utils/service-api.js";
3
3
  import { StudioProposalApi as O, proposalErrorMessage as k, proposalSections as A } from "./utils/proposal-api.js";
4
4
  import { t as j } from "./KeyManagementPanel-DZuSeWBK.js";
5
- import { ManagedInstanceUtil as M } from "./utils/managed-instance.js";
6
- import { ManagedInstancePanel as N } from "./components/ManagedInstancePanel.js";
7
- import { capitalize as P, fetchDashboardStats as F, fetchDiagnostics as I, fetchPeers as L, fetchProvenance as R, formatBytes as z, formatReference as B, formatRelativeTime as ne, formatTime as V, searchReferences as H } from "./utils/index.js";
8
- import { useEffect as U, useState as W } from "react";
9
- import { BrowserRouter as re, Link as G, Route as K, Routes as ie } from "react-router-dom";
10
- import { Fragment as ae, jsx as q, jsxs as J } from "react/jsx-runtime";
11
- import { parseFlowSpec as oe } from "@feltdb/core";
5
+ import { CapabilitySet as M, ControlPlaneApi as N, ControlPlaneError as P, controlPlaneErrorMessage as F, formatStatePath as ne } from "./utils/control-plane-api.js";
6
+ import { C as re, D as ie, E as I, O as ae, S as oe, T as se, _ as ce, a as L, b as le, c as R, d as z, f as ue, g as de, h as fe, i as B, l as V, m as pe, n as H, o as U, p as me, r as W, s as G, t as K, u as q, v as he, w as ge, x as _e, y as ve } from "./control-plane-D6TT2fCQ.js";
7
+ import { ManagedInstanceUtil as ye } from "./utils/managed-instance.js";
8
+ import { ManagedInstancePanel as be } from "./components/ManagedInstancePanel.js";
9
+ import { capitalize as xe, fetchDashboardStats as Se, fetchDiagnostics as Ce, fetchPeers as we, fetchProvenance as Te, formatBytes as Ee, formatReference as De, formatRelativeTime as Oe, formatTime as ke, searchReferences as Ae } from "./utils/index.js";
10
+ import { useEffect as J, useState as Y } from "react";
11
+ import { BrowserRouter as je, Link as X, Route as Z, Routes as Me } from "react-router-dom";
12
+ import { Fragment as Ne, jsx as Q, jsxs as $ } from "react/jsx-runtime";
13
+ import { parseFlowSpec as Pe } from "@feltdb/core";
12
14
  //#region src/app.tsx
13
- function Y({ db: p, remoteUrl: x = "", token: w = "", namespace: T = "default", deploymentRuntime: E = "browser", applicationUrl: te = "", applicationId: D = "", environment: O = "production", developmentSession: k, managedPublish: A, sourceSync: M, onConnect: N }) {
14
- let [P, F] = W(null), I = l(p || null, T), L = u(p || null, P, T), { diagnostics: R } = C(p || null), z = r(p || null), [B, ne] = W(), V = E !== "browser" || !!x, [H, Y] = W([]), [X, Z] = W([]), [Q, se] = W(0), $ = (e) => ({
15
+ var Fe = [
16
+ {
17
+ path: "/overview",
18
+ label: "Overview"
19
+ },
20
+ {
21
+ path: "/data",
22
+ label: "Data"
23
+ },
24
+ {
25
+ path: "/schema",
26
+ label: "Schema"
27
+ },
28
+ {
29
+ path: "/agents",
30
+ label: "Agents"
31
+ },
32
+ {
33
+ path: "/state",
34
+ label: "State"
35
+ },
36
+ {
37
+ path: "/operations",
38
+ label: "Operations"
39
+ },
40
+ {
41
+ path: "/replication",
42
+ label: "Replication"
43
+ },
44
+ {
45
+ path: "/applications",
46
+ label: "Applications"
47
+ },
48
+ {
49
+ path: "/monitoring",
50
+ label: "Monitoring"
51
+ },
52
+ {
53
+ path: "/settings",
54
+ label: "Settings"
55
+ },
56
+ {
57
+ path: "/developer",
58
+ label: "Developer"
59
+ }
60
+ ];
61
+ function Ie({ db: e, remoteUrl: n = "", token: i = "", namespace: a = "default", deploymentRuntime: ee = "browser", applicationUrl: te = "", applicationId: f = "", environment: p = "production", developmentSession: h, managedPublish: g, sourceSync: _, onConnect: b }) {
62
+ let [x, C] = Y(null), w = t(e || null, a), [T, E] = Y([]), [D, O] = Y([]), [k, A] = Y(0), [M, N] = Y(), P = (e) => ({
15
63
  pathname: e,
16
64
  search: window.location.search
17
65
  });
18
- return U(() => {
19
- let e = !0;
20
- return fetch("/_feltdb/project", { cache: "no-store" }).then(async (t) => {
21
- if (!t.ok) throw Error("No project model endpoint");
22
- let n = await t.json();
23
- e && F(oe(n.source));
66
+ J(() => {
67
+ let t = !0;
68
+ return fetch("/_feltdb/project", { cache: "no-store" }).then(async (e) => {
69
+ if (!e.ok) throw Error("No project model endpoint");
70
+ let n = await e.json();
71
+ t && C(Pe(n.source));
24
72
  }).catch(async () => {
25
- let t = p ? await p.collection("_flow_apps").all() : [];
26
- e && t[0]?.spec && F(t[0].spec);
73
+ let n = e ? await e.collection("_flow_apps").all() : [];
74
+ t && n[0]?.spec && C(n[0].spec);
27
75
  }), () => {
28
- e = !1;
76
+ t = !1;
29
77
  };
30
- }, [p]), U(() => {
31
- if (!k?.sessionId) return;
78
+ }, [e]), J(() => {
79
+ if (!h?.sessionId) return;
32
80
  let e = !0, t = () => void fetch("/_feltdb/runtime", { cache: "no-store" }).then((e) => e.ok ? e.json() : { runtimes: [] }).then((t) => {
33
- e && Y(t.runtimes || []);
81
+ e && E(t.runtimes || []);
34
82
  }).catch(() => {
35
- e && Y([]);
83
+ e && E([]);
36
84
  });
37
85
  t();
38
86
  let n = window.setInterval(t, 2e3);
39
87
  return () => {
40
88
  e = !1, window.clearInterval(n);
41
89
  };
42
- }, [k?.sessionId]), U(() => {
43
- let e = H[0]?.runtimeInstanceId;
90
+ }, [h?.sessionId]), J(() => {
91
+ let e = T[0]?.runtimeInstanceId;
44
92
  if (!e) {
45
- Z([]);
93
+ O([]);
46
94
  return;
47
95
  }
48
96
  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) => {
49
- t && (n = e.nextCursor ?? n, se(e.dropped || 0), Z((t) => [...t, ...e.observations || []].slice(-200)));
97
+ t && (n = e.nextCursor ?? n, A(e.dropped || 0), O((t) => [...t, ...e.observations || []].slice(-200)));
50
98
  }).catch(() => void 0);
51
99
  r();
52
100
  let i = window.setInterval(r, 1e3);
53
101
  return () => {
54
102
  t = !1, window.clearInterval(i);
55
103
  };
56
- }, [H[0]?.runtimeInstanceId]), /* @__PURE__ */ q(re, { children: /* @__PURE__ */ J("div", {
57
- className: "studio-app",
58
- children: [/* @__PURE__ */ J("nav", {
59
- className: "studio-nav",
60
- children: [
61
- /* @__PURE__ */ J("div", {
62
- className: "nav-header",
63
- children: [/* @__PURE__ */ q("h1", { children: "FeltDB Studio" }), I && /* @__PURE__ */ q("div", {
64
- className: "instance-info",
65
- children: I.namespace
66
- })]
67
- }),
68
- /* @__PURE__ */ q("div", {
69
- className: "nav-search",
70
- children: /* @__PURE__ */ q(h, {
71
- db: p,
72
- model: P
104
+ }, [T[0]?.runtimeInstanceId]);
105
+ let F = (e, t) => {
106
+ N({
107
+ collection: e,
108
+ id: t
109
+ });
110
+ let n = window.location.search;
111
+ window.history.pushState({}, "", `/data${n}`), window.dispatchEvent(new PopStateEvent("popstate"));
112
+ };
113
+ return /* @__PURE__ */ Q(I, {
114
+ options: {
115
+ baseUrl: n,
116
+ token: i,
117
+ applicationId: f,
118
+ environment: p
119
+ },
120
+ children: /* @__PURE__ */ Q(je, { children: /* @__PURE__ */ $("div", {
121
+ className: "studio-app",
122
+ children: [/* @__PURE__ */ $("nav", {
123
+ className: "studio-nav",
124
+ children: [
125
+ /* @__PURE__ */ $("div", {
126
+ className: "nav-header",
127
+ children: [/* @__PURE__ */ Q("h1", { children: "FeltDB Studio" }), w && /* @__PURE__ */ Q("div", {
128
+ className: "instance-info",
129
+ children: w.namespace
130
+ })]
131
+ }),
132
+ /* @__PURE__ */ Q("div", {
133
+ className: "nav-search",
134
+ children: /* @__PURE__ */ Q(l, {
135
+ db: e,
136
+ model: x
137
+ })
138
+ }),
139
+ /* @__PURE__ */ $("ul", {
140
+ className: "nav-menu",
141
+ children: [
142
+ /* @__PURE__ */ Q("li", {
143
+ className: "nav-section",
144
+ children: "Operate"
145
+ }),
146
+ Fe.map((e) => /* @__PURE__ */ Q("li", { children: /* @__PURE__ */ Q(X, {
147
+ to: P(e.path),
148
+ children: e.label
149
+ }) }, e.path)),
150
+ /* @__PURE__ */ Q("li", {
151
+ className: "nav-section",
152
+ children: "Design"
153
+ }),
154
+ /* @__PURE__ */ Q("li", { children: /* @__PURE__ */ Q(X, {
155
+ to: P("/"),
156
+ children: "Application"
157
+ }) }),
158
+ /* @__PURE__ */ Q("li", { children: /* @__PURE__ */ Q(X, {
159
+ to: P("/capabilities"),
160
+ children: "Capabilities"
161
+ }) }),
162
+ /* @__PURE__ */ Q("li", { children: /* @__PURE__ */ Q(X, {
163
+ to: P("/contract"),
164
+ children: "Contract"
165
+ }) }),
166
+ /* @__PURE__ */ Q("li", { children: /* @__PURE__ */ Q(X, {
167
+ to: P("/policies"),
168
+ children: "Policies"
169
+ }) }),
170
+ /* @__PURE__ */ Q("li", { children: /* @__PURE__ */ Q(X, {
171
+ to: P("/workflows"),
172
+ children: "Workflows"
173
+ }) }),
174
+ /* @__PURE__ */ Q("li", { children: /* @__PURE__ */ Q(X, {
175
+ to: P("/agent-definitions"),
176
+ children: "Agent definitions"
177
+ }) }),
178
+ /* @__PURE__ */ Q("li", { children: /* @__PURE__ */ Q(X, {
179
+ to: P("/modules"),
180
+ children: "Modules"
181
+ }) }),
182
+ /* @__PURE__ */ Q("li", { children: /* @__PURE__ */ Q(X, {
183
+ to: P("/proposals"),
184
+ children: "Proposals"
185
+ }) }),
186
+ h?.sessionId && /* @__PURE__ */ Q("li", { children: /* @__PURE__ */ Q(X, {
187
+ to: P("/activity"),
188
+ children: "Live Activity"
189
+ }) }),
190
+ /* @__PURE__ */ Q("li", { children: /* @__PURE__ */ Q(X, {
191
+ to: P("/executions"),
192
+ children: "Executions"
193
+ }) }),
194
+ /* @__PURE__ */ Q("li", { children: /* @__PURE__ */ Q(X, {
195
+ to: P("/connection"),
196
+ children: "Connection"
197
+ }) }),
198
+ /* @__PURE__ */ Q("li", { children: /* @__PURE__ */ Q(X, {
199
+ to: P("/api-keys"),
200
+ children: "API Keys"
201
+ }) })
202
+ ]
73
203
  })
74
- }),
75
- /* @__PURE__ */ J("ul", {
76
- className: "nav-menu",
77
- children: [
78
- /* @__PURE__ */ q("li", {
79
- className: "nav-section",
80
- children: "Design"
81
- }),
82
- /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
83
- to: $("/"),
84
- children: "Application"
85
- }) }),
86
- /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
87
- to: $("/capabilities"),
88
- children: "Capabilities"
89
- }) }),
90
- /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
91
- to: $("/schema"),
92
- children: "Schema"
93
- }) }),
94
- /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
95
- to: $("/policies"),
96
- children: "Policies"
97
- }) }),
98
- /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
99
- to: $("/workflows"),
100
- children: "Workflows"
101
- }) }),
102
- /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
103
- to: $("/agents"),
104
- children: "Agents"
105
- }) }),
106
- /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
107
- to: $("/modules"),
108
- children: "Modules"
109
- }) }),
110
- /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
111
- to: $("/proposals"),
112
- children: "Proposals"
113
- }) }),
114
- /* @__PURE__ */ q("li", {
115
- className: "nav-section",
116
- children: "Observe"
117
- }),
118
- k?.sessionId && /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
119
- to: $("/activity"),
120
- children: "Live Activity"
121
- }) }),
122
- V && /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
123
- to: $("/overview"),
124
- children: "Overview"
125
- }) }),
126
- /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
127
- to: $("/data"),
128
- children: "Data"
129
- }) }),
130
- V && /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
131
- to: $("/references"),
132
- children: "References"
133
- }) }),
134
- V && /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
135
- to: $("/operations"),
136
- children: "Operations"
137
- }) }),
138
- V && /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
139
- to: $("/executions"),
140
- children: "Executions"
141
- }) }),
142
- V && /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
143
- to: $("/peers"),
144
- children: "Peers"
145
- }) }),
146
- V && /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
147
- to: $("/provenance"),
148
- children: "Provenance"
149
- }) }),
150
- V && /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
151
- to: $("/conflicts"),
152
- children: "Conflicts"
153
- }) }),
154
- V && /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
155
- to: $("/health"),
156
- children: "Health"
157
- }) }),
158
- /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
159
- to: $("/settings"),
160
- children: "Settings"
161
- }) }),
162
- V && /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
163
- to: $("/api-keys"),
164
- children: "API Keys"
165
- }) })
166
- ]
167
- })
168
- ]
169
- }), /* @__PURE__ */ J("main", {
170
- className: "studio-content",
171
- children: [
172
- k?.sessionId && /* @__PURE__ */ J("div", {
173
- className: "runtime-notice",
174
- children: ["Application runtime: ", H.length ? `Connected ✓ (${H[0].runtime}, ${H[0].namespace})` : "Not connected"]
175
- }),
176
- !V && /* @__PURE__ */ q("div", {
204
+ ]
205
+ }), /* @__PURE__ */ $("main", {
206
+ className: "studio-content",
207
+ children: [h?.sessionId && /* @__PURE__ */ $("div", {
177
208
  className: "runtime-notice",
178
- children: "Browser data is read live from the generated application origin through the local Studio bridge."
179
- }),
180
- /* @__PURE__ */ J(ie, { children: [
181
- /* @__PURE__ */ q(K, {
182
- path: "/",
183
- element: /* @__PURE__ */ J(ae, { children: [/* @__PURE__ */ q(d, {
184
- configuration: M,
185
- onApplied: () => window.location.reload()
186
- }), /* @__PURE__ */ q(i, {
187
- db: p,
188
- namespace: T,
189
- projectSpec: P,
190
- managedPublish: A,
191
- onSpecChange: F
192
- })] })
193
- }),
194
- /* @__PURE__ */ q(K, {
209
+ children: ["Application runtime: ", T.length ? `Connected (${T[0].runtime}, ${T[0].namespace})` : "Not connected"]
210
+ }), /* @__PURE__ */ $(Me, { children: [
211
+ /* @__PURE__ */ Q(Z, {
195
212
  path: "/overview",
196
- element: /* @__PURE__ */ q(n, { stats: L })
213
+ element: /* @__PURE__ */ Q(z, {})
197
214
  }),
198
- /* @__PURE__ */ q(K, {
199
- path: "/activity",
200
- element: /* @__PURE__ */ J("div", {
201
- className: "runtime-activity",
202
- children: [
203
- /* @__PURE__ */ q("h1", { children: "Live Activity" }),
204
- /* @__PURE__ */ J("p", { children: [
205
- X.some((e) => Date.now() - e.timestamp < 5e3) ? "Active" : "Idle",
206
- " · Runtime ",
207
- H[0]?.runtimeInstanceId || "not connected"
208
- ] }),
209
- Q > 0 && /* @__PURE__ */ J("p", {
210
- className: "runtime-notice",
211
- children: [
212
- "Observation is incomplete: ",
213
- Q,
214
- " events dropped."
215
- ]
216
- }),
217
- /* @__PURE__ */ J("table", { children: [/* @__PURE__ */ q("thead", { children: /* @__PURE__ */ J("tr", { children: [
218
- /* @__PURE__ */ q("th", { children: "Time" }),
219
- /* @__PURE__ */ q("th", { children: "Operation" }),
220
- /* @__PURE__ */ q("th", { children: "Collection" }),
221
- /* @__PURE__ */ q("th", { children: "Status" }),
222
- /* @__PURE__ */ q("th", { children: "Duration" })
223
- ] }) }), /* @__PURE__ */ q("tbody", { children: [...X].reverse().map((e) => /* @__PURE__ */ J("tr", { children: [
224
- /* @__PURE__ */ q("td", { children: new Date(e.timestamp).toLocaleTimeString() }),
225
- /* @__PURE__ */ q("td", { children: e.operation?.type }),
226
- /* @__PURE__ */ q("td", { children: e.operation?.collection || "—" }),
227
- /* @__PURE__ */ q("td", { children: e.status }),
228
- /* @__PURE__ */ q("td", { children: e.durationMs === void 0 ? "—" : `${e.durationMs} ms` })
229
- ] }, e.cursor || e.eventId)) })] })
230
- ]
231
- })
232
- }),
233
- /* @__PURE__ */ q(K, {
215
+ /* @__PURE__ */ Q(Z, {
234
216
  path: "/data",
235
- element: D ? /* @__PURE__ */ q(S, {
236
- serviceUrl: x,
237
- token: w,
238
- applicationId: D,
239
- environment: O
240
- }) : /* @__PURE__ */ q("div", {
241
- className: "model-empty",
242
- children: "No active application is selected. Open Studio from a FeltDB application environment."
217
+ element: /* @__PURE__ */ Q(q, {
218
+ focus: M,
219
+ onFocusHandled: () => N(void 0)
243
220
  })
244
221
  }),
245
- /* @__PURE__ */ q(K, {
246
- path: "/state",
247
- element: D ? /* @__PURE__ */ q(S, {
248
- serviceUrl: x,
249
- token: w,
250
- applicationId: D,
251
- environment: O
252
- }) : /* @__PURE__ */ q("div", {
253
- className: "model-empty",
254
- children: "No active application is selected. Open Studio from a FeltDB application environment."
255
- })
222
+ /* @__PURE__ */ Q(Z, {
223
+ path: "/schema",
224
+ element: /* @__PURE__ */ Q(V, {})
256
225
  }),
257
- /* @__PURE__ */ q(K, {
258
- path: "/references",
259
- element: /* @__PURE__ */ q(e, {
260
- db: p,
261
- model: P,
262
- namespace: T
263
- })
226
+ /* @__PURE__ */ Q(Z, {
227
+ path: "/agents",
228
+ element: /* @__PURE__ */ Q(R, { onOpenRecord: F })
264
229
  }),
265
- /* @__PURE__ */ q(K, {
230
+ /* @__PURE__ */ Q(Z, {
231
+ path: "/state",
232
+ element: /* @__PURE__ */ Q(G, {})
233
+ }),
234
+ /* @__PURE__ */ Q(Z, {
266
235
  path: "/operations",
267
- element: /* @__PURE__ */ q(t, {
268
- db: p,
269
- model: P,
270
- namespace: T
271
- })
236
+ element: /* @__PURE__ */ Q(U, { onOpenRecord: F })
272
237
  }),
273
- /* @__PURE__ */ q(K, {
274
- path: "/peers",
275
- element: /* @__PURE__ */ q(ee, {
276
- peers: z,
277
- localInstance: I?.instanceId
278
- })
238
+ /* @__PURE__ */ Q(Z, {
239
+ path: "/replication",
240
+ element: /* @__PURE__ */ Q(B, {})
279
241
  }),
280
- /* @__PURE__ */ q(K, {
281
- path: "/capabilities",
282
- element: /* @__PURE__ */ q(a, {
283
- db: p,
284
- model: P
285
- })
242
+ /* @__PURE__ */ Q(Z, {
243
+ path: "/applications",
244
+ element: /* @__PURE__ */ Q(K, {})
286
245
  }),
287
- /* @__PURE__ */ q(K, {
288
- path: "/executions",
289
- element: /* @__PURE__ */ q(g, {
290
- db: p,
291
- model: P
292
- })
246
+ /* @__PURE__ */ Q(Z, {
247
+ path: "/monitoring",
248
+ element: /* @__PURE__ */ Q(W, {})
293
249
  }),
294
- /* @__PURE__ */ q(K, {
295
- path: "/workflows",
296
- element: /* @__PURE__ */ q(s, {
297
- db: p,
298
- model: P
299
- })
250
+ /* @__PURE__ */ Q(Z, {
251
+ path: "/settings",
252
+ element: /* @__PURE__ */ Q(L, {})
300
253
  }),
301
- /* @__PURE__ */ q(K, {
302
- path: "/agents",
303
- element: /* @__PURE__ */ q(b, {
304
- db: p,
305
- model: P
306
- })
254
+ /* @__PURE__ */ Q(Z, {
255
+ path: "/developer",
256
+ element: /* @__PURE__ */ Q(H, {})
307
257
  }),
308
- /* @__PURE__ */ q(K, {
309
- path: "/proposals",
310
- element: D ? /* @__PURE__ */ q(_, {
311
- serviceUrl: x,
312
- token: w,
313
- applicationId: D,
314
- environment: O,
315
- applicationName: P?.app,
316
- sourceSync: M
317
- }) : /* @__PURE__ */ q("div", {
318
- className: "model-empty",
319
- children: "No active application is selected."
320
- })
258
+ /* @__PURE__ */ Q(Z, {
259
+ path: "/",
260
+ element: /* @__PURE__ */ $(Ne, { children: [/* @__PURE__ */ Q(m, {
261
+ configuration: _,
262
+ onApplied: () => window.location.reload()
263
+ }), /* @__PURE__ */ Q(d, {
264
+ db: e,
265
+ namespace: a,
266
+ projectSpec: x,
267
+ managedPublish: g,
268
+ onSpecChange: C
269
+ })] })
321
270
  }),
322
- /* @__PURE__ */ q(K, {
323
- path: "/modules",
324
- element: /* @__PURE__ */ q(m, { model: P })
271
+ /* @__PURE__ */ Q(Z, {
272
+ path: "/capabilities",
273
+ element: /* @__PURE__ */ Q(u, {
274
+ db: e,
275
+ model: x
276
+ })
325
277
  }),
326
- /* @__PURE__ */ q(K, {
327
- path: "/schema",
328
- element: /* @__PURE__ */ q(y, {
329
- model: P,
278
+ /* @__PURE__ */ Q(Z, {
279
+ path: "/contract",
280
+ element: /* @__PURE__ */ Q(v, {
281
+ model: x,
330
282
  section: "schema"
331
283
  })
332
284
  }),
333
- /* @__PURE__ */ q(K, {
285
+ /* @__PURE__ */ Q(Z, {
334
286
  path: "/policies",
335
- element: /* @__PURE__ */ q(y, {
336
- model: P,
287
+ element: /* @__PURE__ */ Q(v, {
288
+ model: x,
337
289
  section: "policies"
338
290
  })
339
291
  }),
340
- /* @__PURE__ */ q(K, {
341
- path: "/provenance",
342
- element: /* @__PURE__ */ q(f, {
343
- db: p,
344
- model: P,
345
- namespace: T,
346
- reference: B
292
+ /* @__PURE__ */ Q(Z, {
293
+ path: "/workflows",
294
+ element: /* @__PURE__ */ Q(y, {
295
+ db: e,
296
+ model: x
347
297
  })
348
298
  }),
349
- /* @__PURE__ */ q(K, {
350
- path: "/conflicts",
351
- element: /* @__PURE__ */ q(c, {
352
- db: p,
353
- diagnostics: R
299
+ /* @__PURE__ */ Q(Z, {
300
+ path: "/agent-definitions",
301
+ element: /* @__PURE__ */ Q(r, {
302
+ db: e,
303
+ model: x
354
304
  })
355
305
  }),
356
- /* @__PURE__ */ q(K, {
357
- path: "/health",
358
- element: /* @__PURE__ */ q(o, {
359
- diagnostics: R,
360
- model: P
306
+ /* @__PURE__ */ Q(Z, {
307
+ path: "/modules",
308
+ element: /* @__PURE__ */ Q(o, { model: x })
309
+ }),
310
+ /* @__PURE__ */ Q(Z, {
311
+ path: "/executions",
312
+ element: /* @__PURE__ */ Q(S, {
313
+ db: e,
314
+ model: x
361
315
  })
362
316
  }),
363
- /* @__PURE__ */ q(K, {
364
- path: "/settings",
365
- element: /* @__PURE__ */ q(v, {
366
- db: p,
367
- remoteUrl: x,
368
- token: w,
369
- onConnect: N
317
+ /* @__PURE__ */ Q(Z, {
318
+ path: "/proposals",
319
+ element: f ? /* @__PURE__ */ Q(s, {
320
+ serviceUrl: n,
321
+ token: i,
322
+ applicationId: f,
323
+ environment: p,
324
+ applicationName: x?.app,
325
+ sourceSync: _
326
+ }) : /* @__PURE__ */ Q("div", {
327
+ className: "model-empty",
328
+ children: "No active application is selected."
329
+ })
330
+ }),
331
+ /* @__PURE__ */ Q(Z, {
332
+ path: "/activity",
333
+ element: /* @__PURE__ */ $("div", {
334
+ className: "runtime-activity",
335
+ children: [
336
+ /* @__PURE__ */ Q("h1", { children: "Live Activity" }),
337
+ /* @__PURE__ */ $("p", { children: [
338
+ D.some((e) => Date.now() - e.timestamp < 5e3) ? "Active" : "Idle",
339
+ " · Runtime ",
340
+ T[0]?.runtimeInstanceId || "not connected"
341
+ ] }),
342
+ k > 0 && /* @__PURE__ */ $("p", {
343
+ className: "runtime-notice",
344
+ children: [
345
+ "Observation is incomplete: ",
346
+ k,
347
+ " events dropped."
348
+ ]
349
+ }),
350
+ /* @__PURE__ */ $("table", { children: [/* @__PURE__ */ Q("thead", { children: /* @__PURE__ */ $("tr", { children: [
351
+ /* @__PURE__ */ Q("th", { children: "Time" }),
352
+ /* @__PURE__ */ Q("th", { children: "Operation" }),
353
+ /* @__PURE__ */ Q("th", { children: "Collection" }),
354
+ /* @__PURE__ */ Q("th", { children: "Status" }),
355
+ /* @__PURE__ */ Q("th", { children: "Duration" })
356
+ ] }) }), /* @__PURE__ */ Q("tbody", { children: [...D].reverse().map((e) => /* @__PURE__ */ $("tr", { children: [
357
+ /* @__PURE__ */ Q("td", { children: new Date(e.timestamp).toLocaleTimeString() }),
358
+ /* @__PURE__ */ Q("td", { children: e.operation?.type }),
359
+ /* @__PURE__ */ Q("td", { children: e.operation?.collection || "—" }),
360
+ /* @__PURE__ */ Q("td", { children: e.status }),
361
+ /* @__PURE__ */ Q("td", { children: e.durationMs === void 0 ? "—" : `${e.durationMs} ms` })
362
+ ] }, e.cursor || e.eventId)) })] })
363
+ ]
370
364
  })
371
365
  }),
372
- /* @__PURE__ */ q(K, {
366
+ /* @__PURE__ */ Q(Z, {
367
+ path: "/connection",
368
+ element: /* @__PURE__ */ Q(c, {
369
+ db: e,
370
+ remoteUrl: n,
371
+ token: i,
372
+ onConnect: b
373
+ })
374
+ }),
375
+ /* @__PURE__ */ Q(Z, {
373
376
  path: "/api-keys",
374
- element: /* @__PURE__ */ J("div", {
377
+ element: /* @__PURE__ */ $("div", {
375
378
  style: { padding: "2rem" },
376
- children: [/* @__PURE__ */ q("h1", { children: "API Key Management" }), /* @__PURE__ */ q(j, {
377
- apiUrl: x,
378
- token: w,
379
- namespace: T,
380
- onConfigure: () => window.location.assign("/settings")
379
+ children: [/* @__PURE__ */ Q("h1", { children: "API Key Management" }), /* @__PURE__ */ Q(j, {
380
+ apiUrl: n,
381
+ token: i,
382
+ namespace: a,
383
+ onConfigure: () => window.location.assign("/connection")
381
384
  })]
382
385
  })
383
386
  })
384
- ] })
385
- ]
386
- })]
387
- }) });
387
+ ] })]
388
+ })]
389
+ }) })
390
+ });
388
391
  }
389
392
  //#endregion
390
- export { b as AgentExplorer, i as ApplicationDesigner, d as AskFeltDB, a as CapabilityExplorer, c as ConflictExplorer, y as ContractInspector, g as ExecutionViewer, h as GlobalSearch, o as HealthCenter, j as KeyManagementPanel, N as ManagedInstancePanel, M as ManagedInstanceUtil, m as ModuleExplorer, t as OperationsExplorer, n as OverviewDashboard, ee as PeerMap, _ as ProposalBrowser, f as ProvenanceViewer, e as ReferenceExplorer, w as ServiceApiError, v as SettingsPanel, S as StateExplorer, Y as StudioApp, O as StudioProposalApi, T as StudioServiceApi, s as WorkflowVisualizer, P as capitalize, F as fetchDashboardStats, I as fetchDiagnostics, L as fetchPeers, R as fetchProvenance, z as formatBytes, B as formatReference, ne as formatRelativeTime, V as formatTime, E as isSecretField, k as proposalErrorMessage, A as proposalSections, te as safeDisplayValue, H as searchReferences, D as serviceApiErrorMessage, p as useCollection, u as useDashboardStats, l as useFeltDB, r as usePeers, x as useProvenance, C as useRuntimeDiagnostics };
393
+ export { r as AgentExplorer, R as Agents, d as ApplicationDesigner, K as Applications, m as AskFeltDB, u as CapabilityExplorer, M as CapabilitySet, ue as Capable, h as ConflictExplorer, v as ContractInspector, N as ControlPlaneApi, P as ControlPlaneError, I as ControlPlaneProvider, q as DataBrowser, H as Developer, me as Empty, S as ExecutionViewer, pe as Failure, l as GlobalSearch, _ as HealthCenter, fe as Identity, z as InstanceOverview, de as Json, j as KeyManagementPanel, ce as Loading, be as ManagedInstancePanel, ye as ManagedInstanceUtil, o as ModuleExplorer, W as Monitoring, U as OperationsConsole, i as OperationsExplorer, ee as OverviewDashboard, he as Page, ve as PartialNotice, le as Path, te as PeerMap, s as ProposalBrowser, f as ProvenanceViewer, p as ReferenceExplorer, B as Replication, V as SchemaExplorer, C as ServiceApiError, L as Settings, c as SettingsPanel, _e as Stat, g as StateExplorer, G as StateWorkbench, oe as StatusPill, Ie as StudioApp, O as StudioProposalApi, w as StudioServiceApi, re as Tabs, ge as Timestamp, se as Unavailable, y as WorkflowVisualizer, xe as capitalize, F as controlPlaneErrorMessage, Se as fetchDashboardStats, Ce as fetchDiagnostics, we as fetchPeers, Te as fetchProvenance, Ee as formatBytes, De as formatReference, Oe as formatRelativeTime, ne as formatStatePath, ke as formatTime, T as isSecretField, k as proposalErrorMessage, A as proposalSections, E as safeDisplayValue, Ae as searchReferences, D as serviceApiErrorMessage, a as useCollection, ie as useControlPlane, ae as useControlPlaneResource, x as useDashboardStats, t as useFeltDB, e as usePeers, b as useProvenance, n as useRuntimeDiagnostics };