@feltdb/core 0.7.4 → 0.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.
Files changed (127) hide show
  1. package/README.md +25 -0
  2. package/dist/application-development.d.ts +10 -3
  3. package/dist/application-development.d.ts.map +1 -1
  4. package/dist/application-development.js +11 -1
  5. package/dist/application-manifest.d.ts +2 -0
  6. package/dist/application-manifest.d.ts.map +1 -1
  7. package/dist/application-manifest.js +1 -1
  8. package/dist/application-understanding.d.ts +76 -0
  9. package/dist/application-understanding.d.ts.map +1 -0
  10. package/dist/application-understanding.js +282 -0
  11. package/dist/canonical-application.d.ts +1 -0
  12. package/dist/canonical-application.d.ts.map +1 -1
  13. package/dist/canonical-application.js +3 -2
  14. package/dist/cli/ai-model-config.js +3 -3
  15. package/dist/cli/cli.js +1 -1
  16. package/dist/cli/commands.js +321 -45
  17. package/dist/cli/index.js +1 -1
  18. package/dist/cli/managed-environment.js +6 -0
  19. package/dist/cli/managed-project.js +6 -0
  20. package/dist/cli/proposal-client.js +16 -3
  21. package/dist/cli/publish-engine.js +8 -5
  22. package/dist/cli/repository-evidence.js +55 -0
  23. package/dist/cli/source-sync.js +220 -61
  24. package/dist/convergence.d.ts +55 -0
  25. package/dist/convergence.d.ts.map +1 -0
  26. package/dist/convergence.js +63 -0
  27. package/dist/create/cli.js +10 -1
  28. package/dist/create/create.js +10 -12
  29. package/dist/create/managed-account.js +72 -7
  30. package/dist/create/package-versions.js +1 -1
  31. package/dist/create/server-source/crates/feltdb/src/application.rs +14 -0
  32. package/dist/create/server-source/crates/feltdb/src/lib.rs +20 -2
  33. package/dist/create/server-source/crates/feltdb-server/src/app_state.rs +12 -24
  34. package/dist/create/server-source/crates/feltdb-server/src/application_contract.rs +11 -3
  35. package/dist/create/server-source/crates/feltdb-server/src/authenticated_principal.rs +0 -1
  36. package/dist/create/server-source/crates/feltdb-server/src/certification_harness.rs +23 -22
  37. package/dist/create/server-source/crates/feltdb-server/src/connections.rs +14 -0
  38. package/dist/create/server-source/crates/feltdb-server/src/delegation_token.rs +5 -15
  39. package/dist/create/server-source/crates/feltdb-server/src/durable_operations.rs +13 -28
  40. package/dist/create/server-source/crates/feltdb-server/src/identity.rs +79 -14
  41. package/dist/create/server-source/crates/feltdb-server/src/key_management.rs +28 -7
  42. package/dist/create/server-source/crates/feltdb-server/src/lib.rs +5 -5
  43. package/dist/create/server-source/crates/feltdb-server/src/main.rs +1929 -261
  44. package/dist/create/server-source/crates/feltdb-server/src/managed_diagnostics.rs +10 -30
  45. package/dist/create/server-source/crates/feltdb-server/src/membership_policy.rs +12 -4
  46. package/dist/create/server-source/crates/feltdb-server/src/request_telemetry.rs +8 -6
  47. package/dist/create/server-source/crates/feltdb-server/src/snapshot_cursor.rs +10 -14
  48. package/dist/create/server-source/crates/feltdb-server/src/tenancy.rs +191 -22
  49. package/dist/create/server-source/crates/feltdb-server/src/tenant_policies.rs +9 -21
  50. package/dist/create/server-source/crates/feltdb-server/src/transaction_idempotency.rs +5 -3
  51. package/dist/create/server-source/crates/feltdb-server/src/transaction_recovery.rs +9 -8
  52. package/dist/create/server-source/crates/feltdb-server/tests/revision_recovery_integration_test.rs +1 -4
  53. package/dist/create/template/default-project/feltdb.flow +5 -0
  54. package/dist/create/template/default-project/src/context/AuthContext.tsx +9 -1
  55. package/dist/create/template/default-project/src/pages/SignUp.tsx +1 -1
  56. package/dist/flowspec.d.ts +1 -0
  57. package/dist/flowspec.d.ts.map +1 -1
  58. package/dist/flowspec.js +51 -12
  59. package/dist/http-client.d.ts +166 -14
  60. package/dist/http-client.d.ts.map +1 -1
  61. package/dist/http-client.js +91 -31
  62. package/dist/http-db.d.ts +3 -0
  63. package/dist/http-db.d.ts.map +1 -1
  64. package/dist/http-db.js +28 -3
  65. package/dist/index-core.d.ts +5 -0
  66. package/dist/index-core.d.ts.map +1 -1
  67. package/dist/index-core.js +5 -0
  68. package/dist/intent.d.ts +98 -0
  69. package/dist/intent.d.ts.map +1 -0
  70. package/dist/intent.js +343 -0
  71. package/dist/module-intent.d.ts +51 -0
  72. package/dist/module-intent.d.ts.map +1 -0
  73. package/dist/module-intent.js +230 -0
  74. package/dist/module.d.ts +105 -0
  75. package/dist/module.d.ts.map +1 -0
  76. package/dist/module.js +566 -0
  77. package/dist/proposal.d.ts +92 -4
  78. package/dist/proposal.d.ts.map +1 -1
  79. package/dist/proposal.js +150 -6
  80. package/dist/studio/app.d.ts +3 -1
  81. package/dist/studio/app.d.ts.map +1 -1
  82. package/dist/studio/components/AskFeltDB.d.ts +2 -1
  83. package/dist/studio/components/AskFeltDB.d.ts.map +1 -1
  84. package/dist/studio/components/ContractInspector.d.ts +7 -0
  85. package/dist/studio/components/ContractInspector.d.ts.map +1 -0
  86. package/dist/studio/components/ManagedInstancePanel.d.ts.map +1 -1
  87. package/dist/studio/components/ManagedInstancePanel.js +1 -5
  88. package/dist/studio/components/ModuleExplorer.d.ts +6 -0
  89. package/dist/studio/components/ModuleExplorer.d.ts.map +1 -0
  90. package/dist/studio/components/ProposalBrowser.d.ts +10 -1
  91. package/dist/studio/components/ProposalBrowser.d.ts.map +1 -1
  92. package/dist/studio/components/StateExplorer.d.ts +6 -7
  93. package/dist/studio/components/StateExplorer.d.ts.map +1 -1
  94. package/dist/studio/components/index.d.ts +2 -0
  95. package/dist/studio/components/index.d.ts.map +1 -1
  96. package/dist/studio/components/index.js +4 -4
  97. package/dist/studio/components-Duq2xQWt.js +2845 -0
  98. package/dist/studio/index.js +193 -147
  99. package/dist/studio/studio.css +1 -1
  100. package/dist/studio/utils/index.d.ts +2 -0
  101. package/dist/studio/utils/index.d.ts.map +1 -1
  102. package/dist/studio/utils/index.js +14 -12
  103. package/dist/studio/utils/managed-instance.d.ts +0 -4
  104. package/dist/studio/utils/managed-instance.d.ts.map +1 -1
  105. package/dist/studio/utils/managed-instance.js +0 -4
  106. package/dist/studio/utils/proposal-api.d.ts +56 -0
  107. package/dist/studio/utils/proposal-api.d.ts.map +1 -0
  108. package/dist/studio/utils/proposal-api.js +94 -0
  109. package/dist/studio/utils/service-api.d.ts +81 -0
  110. package/dist/studio/utils/service-api.d.ts.map +1 -0
  111. package/dist/studio/utils/service-api.js +51 -0
  112. package/dist/studio-app/assets/{feltdb_wasm-B-Ccgccb.js → feltdb_wasm-bIqcRzAr.js} +1 -1
  113. package/dist/studio-app/assets/feltdb_wasm_bg-BE79okwX.wasm +0 -0
  114. package/dist/studio-app/assets/{index-BRrmvaKw.css → index-Cd_NPw14.css} +1 -1
  115. package/dist/studio-app/assets/index-XGYdlElN.js +29 -0
  116. package/dist/studio-app/index.html +2 -2
  117. package/dist/wasm/feltdb_wasm_bg.wasm +0 -0
  118. package/dist/workspace/local-development-authority.d.ts +2 -0
  119. package/dist/workspace/local-development-authority.d.ts.map +1 -1
  120. package/dist/workspace/local-development-authority.js +128 -4
  121. package/package.json +1 -1
  122. package/dist/studio/components-Bm4sjhcX.js +0 -2162
  123. package/dist/studio-app/assets/dist-DA1MYSzp.js +0 -1
  124. package/dist/studio-app/assets/feltdb_wasm_bg-wH3enJIA.wasm +0 -0
  125. package/dist/studio-app/assets/index-CEIqowCh.js +0 -42
  126. package/dist/studio-app/assets/lib-B2_7fcn7.js +0 -69
  127. package/dist/studio-app/assets/worker-CARZ5g7K.js +0 -69
@@ -1,32 +1,34 @@
1
- import { C as e, S as t, _ as n, a as r, b as i, c as a, d as o, f as s, g as c, h as l, i as u, l as d, m as f, n as p, o as m, p as h, r as g, s as _, t as v, u as y, v as b, x, y as S } from "./components-Bm4sjhcX.js";
2
- import { t as C } from "./KeyManagementPanel-DZuSeWBK.js";
3
- import { ManagedInstanceUtil as w } from "./utils/managed-instance.js";
4
- import { ManagedInstancePanel as T } from "./components/ManagedInstancePanel.js";
5
- import { capitalize as E, fetchDashboardStats as D, fetchDiagnostics as O, fetchPeers as k, fetchProvenance as A, formatBytes as j, formatReference as M, formatRelativeTime as N, formatTime as P, searchReferences as F } from "./utils/index.js";
6
- import { useEffect as I, useState as L } from "react";
7
- import { BrowserRouter as R, Link as z, Route as B, Routes as V } from "react-router-dom";
8
- import { Fragment as H, jsx as U, jsxs as W } from "react/jsx-runtime";
9
- import { parseFlowSpec as G } from "@feltdb/core";
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";
3
+ import { StudioProposalApi as O, proposalErrorMessage as k, proposalSections as A } from "./utils/proposal-api.js";
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";
10
12
  //#region src/app.tsx
11
- function K({ db: n, remoteUrl: x = "", token: w = "", namespace: T = "default", deploymentRuntime: E = "browser", applicationUrl: D = "", developmentSession: O, managedPublish: k, sourceSync: A, onConnect: j }) {
12
- let [M, N] = L(null), P = S(n || null, T), F = b(n || null, M, T), { diagnostics: K } = t(n || null), ee = i(n || null), [te, ne] = L(), q = E !== "browser" || !!x, [J, Y] = L([]), [X, Z] = L([]), [Q, re] = L(0), $ = (e) => ({
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) => ({
13
15
  pathname: e,
14
16
  search: window.location.search
15
17
  });
16
- return I(() => {
18
+ return U(() => {
17
19
  let e = !0;
18
20
  return fetch("/_feltdb/project", { cache: "no-store" }).then(async (t) => {
19
21
  if (!t.ok) throw Error("No project model endpoint");
20
22
  let n = await t.json();
21
- e && N(G(n.source));
23
+ e && F(oe(n.source));
22
24
  }).catch(async () => {
23
- let t = n ? await n.collection("_flow_apps").all() : [];
24
- e && t[0]?.spec && N(t[0].spec);
25
+ let t = p ? await p.collection("_flow_apps").all() : [];
26
+ e && t[0]?.spec && F(t[0].spec);
25
27
  }), () => {
26
28
  e = !1;
27
29
  };
28
- }, [n]), I(() => {
29
- if (!O?.sessionId) return;
30
+ }, [p]), U(() => {
31
+ if (!k?.sessionId) return;
30
32
  let e = !0, t = () => void fetch("/_feltdb/runtime", { cache: "no-store" }).then((e) => e.ok ? e.json() : { runtimes: [] }).then((t) => {
31
33
  e && Y(t.runtimes || []);
32
34
  }).catch(() => {
@@ -37,162 +39,174 @@ function K({ db: n, remoteUrl: x = "", token: w = "", namespace: T = "default",
37
39
  return () => {
38
40
  e = !1, window.clearInterval(n);
39
41
  };
40
- }, [O?.sessionId]), I(() => {
41
- let e = J[0]?.runtimeInstanceId;
42
+ }, [k?.sessionId]), U(() => {
43
+ let e = H[0]?.runtimeInstanceId;
42
44
  if (!e) {
43
45
  Z([]);
44
46
  return;
45
47
  }
46
48
  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) => {
47
- t && (n = e.nextCursor ?? n, re(e.dropped || 0), Z((t) => [...t, ...e.observations || []].slice(-200)));
49
+ t && (n = e.nextCursor ?? n, se(e.dropped || 0), Z((t) => [...t, ...e.observations || []].slice(-200)));
48
50
  }).catch(() => void 0);
49
51
  r();
50
52
  let i = window.setInterval(r, 1e3);
51
53
  return () => {
52
54
  t = !1, window.clearInterval(i);
53
55
  };
54
- }, [J[0]?.runtimeInstanceId]), /* @__PURE__ */ U(R, { children: /* @__PURE__ */ W("div", {
56
+ }, [H[0]?.runtimeInstanceId]), /* @__PURE__ */ q(re, { children: /* @__PURE__ */ J("div", {
55
57
  className: "studio-app",
56
- children: [/* @__PURE__ */ W("nav", {
58
+ children: [/* @__PURE__ */ J("nav", {
57
59
  className: "studio-nav",
58
60
  children: [
59
- /* @__PURE__ */ W("div", {
61
+ /* @__PURE__ */ J("div", {
60
62
  className: "nav-header",
61
- children: [/* @__PURE__ */ U("h1", { children: "FeltDB Studio" }), P && /* @__PURE__ */ U("div", {
63
+ children: [/* @__PURE__ */ q("h1", { children: "FeltDB Studio" }), I && /* @__PURE__ */ q("div", {
62
64
  className: "instance-info",
63
- children: P.namespace
65
+ children: I.namespace
64
66
  })]
65
67
  }),
66
- /* @__PURE__ */ U("div", {
68
+ /* @__PURE__ */ q("div", {
67
69
  className: "nav-search",
68
- children: /* @__PURE__ */ U(u, {
69
- db: n,
70
- model: M
70
+ children: /* @__PURE__ */ q(h, {
71
+ db: p,
72
+ model: P
71
73
  })
72
74
  }),
73
- /* @__PURE__ */ W("ul", {
75
+ /* @__PURE__ */ J("ul", {
74
76
  className: "nav-menu",
75
77
  children: [
76
- /* @__PURE__ */ U("li", {
78
+ /* @__PURE__ */ q("li", {
77
79
  className: "nav-section",
78
80
  children: "Design"
79
81
  }),
80
- /* @__PURE__ */ U("li", { children: /* @__PURE__ */ U(z, {
82
+ /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
81
83
  to: $("/"),
82
84
  children: "Application"
83
85
  }) }),
84
- /* @__PURE__ */ U("li", { children: /* @__PURE__ */ U(z, {
86
+ /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
85
87
  to: $("/capabilities"),
86
88
  children: "Capabilities"
87
89
  }) }),
88
- /* @__PURE__ */ U("li", { children: /* @__PURE__ */ U(z, {
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, {
89
99
  to: $("/workflows"),
90
100
  children: "Workflows"
91
101
  }) }),
92
- /* @__PURE__ */ U("li", { children: /* @__PURE__ */ U(z, {
102
+ /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
93
103
  to: $("/agents"),
94
104
  children: "Agents"
95
105
  }) }),
96
- /* @__PURE__ */ U("li", { children: /* @__PURE__ */ U(z, {
106
+ /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
107
+ to: $("/modules"),
108
+ children: "Modules"
109
+ }) }),
110
+ /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
97
111
  to: $("/proposals"),
98
112
  children: "Proposals"
99
113
  }) }),
100
- /* @__PURE__ */ U("li", {
114
+ /* @__PURE__ */ q("li", {
101
115
  className: "nav-section",
102
116
  children: "Observe"
103
117
  }),
104
- O?.sessionId && /* @__PURE__ */ U("li", { children: /* @__PURE__ */ U(z, {
118
+ k?.sessionId && /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
105
119
  to: $("/activity"),
106
120
  children: "Live Activity"
107
121
  }) }),
108
- q && /* @__PURE__ */ U("li", { children: /* @__PURE__ */ U(z, {
122
+ V && /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
109
123
  to: $("/overview"),
110
124
  children: "Overview"
111
125
  }) }),
112
- /* @__PURE__ */ U("li", { children: /* @__PURE__ */ U(z, {
126
+ /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
113
127
  to: $("/data"),
114
128
  children: "Data"
115
129
  }) }),
116
- q && /* @__PURE__ */ U("li", { children: /* @__PURE__ */ U(z, {
130
+ V && /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
117
131
  to: $("/references"),
118
132
  children: "References"
119
133
  }) }),
120
- q && /* @__PURE__ */ U("li", { children: /* @__PURE__ */ U(z, {
134
+ V && /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
121
135
  to: $("/operations"),
122
136
  children: "Operations"
123
137
  }) }),
124
- q && /* @__PURE__ */ U("li", { children: /* @__PURE__ */ U(z, {
138
+ V && /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
125
139
  to: $("/executions"),
126
140
  children: "Executions"
127
141
  }) }),
128
- q && /* @__PURE__ */ U("li", { children: /* @__PURE__ */ U(z, {
142
+ V && /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
129
143
  to: $("/peers"),
130
144
  children: "Peers"
131
145
  }) }),
132
- q && /* @__PURE__ */ U("li", { children: /* @__PURE__ */ U(z, {
146
+ V && /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
133
147
  to: $("/provenance"),
134
148
  children: "Provenance"
135
149
  }) }),
136
- q && /* @__PURE__ */ U("li", { children: /* @__PURE__ */ U(z, {
150
+ V && /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
137
151
  to: $("/conflicts"),
138
152
  children: "Conflicts"
139
153
  }) }),
140
- q && /* @__PURE__ */ U("li", { children: /* @__PURE__ */ U(z, {
154
+ V && /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
141
155
  to: $("/health"),
142
156
  children: "Health"
143
157
  }) }),
144
- /* @__PURE__ */ U("li", { children: /* @__PURE__ */ U(z, {
158
+ /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
145
159
  to: $("/settings"),
146
160
  children: "Settings"
147
161
  }) }),
148
- q && /* @__PURE__ */ U("li", { children: /* @__PURE__ */ U(z, {
162
+ V && /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q(G, {
149
163
  to: $("/api-keys"),
150
164
  children: "API Keys"
151
165
  }) })
152
166
  ]
153
167
  })
154
168
  ]
155
- }), /* @__PURE__ */ W("main", {
169
+ }), /* @__PURE__ */ J("main", {
156
170
  className: "studio-content",
157
171
  children: [
158
- O?.sessionId && /* @__PURE__ */ W("div", {
172
+ k?.sessionId && /* @__PURE__ */ J("div", {
159
173
  className: "runtime-notice",
160
- children: ["Application runtime: ", J.length ? `Connected ✓ (${J[0].runtime}, ${J[0].namespace})` : "Not connected"]
174
+ children: ["Application runtime: ", H.length ? `Connected ✓ (${H[0].runtime}, ${H[0].namespace})` : "Not connected"]
161
175
  }),
162
- !q && /* @__PURE__ */ U("div", {
176
+ !V && /* @__PURE__ */ q("div", {
163
177
  className: "runtime-notice",
164
178
  children: "Browser data is read live from the generated application origin through the local Studio bridge."
165
179
  }),
166
- /* @__PURE__ */ W(V, { children: [
167
- /* @__PURE__ */ U(B, {
180
+ /* @__PURE__ */ J(ie, { children: [
181
+ /* @__PURE__ */ q(K, {
168
182
  path: "/",
169
- element: /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(p, {
170
- configuration: A,
183
+ element: /* @__PURE__ */ J(ae, { children: [/* @__PURE__ */ q(d, {
184
+ configuration: M,
171
185
  onApplied: () => window.location.reload()
172
- }), /* @__PURE__ */ U(g, {
173
- db: n,
186
+ }), /* @__PURE__ */ q(i, {
187
+ db: p,
174
188
  namespace: T,
175
- projectSpec: M,
176
- managedPublish: k,
177
- onSpecChange: N
189
+ projectSpec: P,
190
+ managedPublish: A,
191
+ onSpecChange: F
178
192
  })] })
179
193
  }),
180
- /* @__PURE__ */ U(B, {
194
+ /* @__PURE__ */ q(K, {
181
195
  path: "/overview",
182
- element: /* @__PURE__ */ U(e, { stats: F })
196
+ element: /* @__PURE__ */ q(n, { stats: L })
183
197
  }),
184
- /* @__PURE__ */ U(B, {
198
+ /* @__PURE__ */ q(K, {
185
199
  path: "/activity",
186
- element: /* @__PURE__ */ W("div", {
200
+ element: /* @__PURE__ */ J("div", {
187
201
  className: "runtime-activity",
188
202
  children: [
189
- /* @__PURE__ */ U("h1", { children: "Live Activity" }),
190
- /* @__PURE__ */ W("p", { children: [
203
+ /* @__PURE__ */ q("h1", { children: "Live Activity" }),
204
+ /* @__PURE__ */ J("p", { children: [
191
205
  X.some((e) => Date.now() - e.timestamp < 5e3) ? "Active" : "Idle",
192
206
  " · Runtime ",
193
- J[0]?.runtimeInstanceId || "not connected"
207
+ H[0]?.runtimeInstanceId || "not connected"
194
208
  ] }),
195
- Q > 0 && /* @__PURE__ */ W("p", {
209
+ Q > 0 && /* @__PURE__ */ J("p", {
196
210
  className: "runtime-notice",
197
211
  children: [
198
212
  "Observation is incomplete: ",
@@ -200,134 +214,166 @@ function K({ db: n, remoteUrl: x = "", token: w = "", namespace: T = "default",
200
214
  " events dropped."
201
215
  ]
202
216
  }),
203
- /* @__PURE__ */ W("table", { children: [/* @__PURE__ */ U("thead", { children: /* @__PURE__ */ W("tr", { children: [
204
- /* @__PURE__ */ U("th", { children: "Time" }),
205
- /* @__PURE__ */ U("th", { children: "Operation" }),
206
- /* @__PURE__ */ U("th", { children: "Collection" }),
207
- /* @__PURE__ */ U("th", { children: "Status" }),
208
- /* @__PURE__ */ U("th", { children: "Duration" })
209
- ] }) }), /* @__PURE__ */ U("tbody", { children: [...X].reverse().map((e) => /* @__PURE__ */ W("tr", { children: [
210
- /* @__PURE__ */ U("td", { children: new Date(e.timestamp).toLocaleTimeString() }),
211
- /* @__PURE__ */ U("td", { children: e.operation?.type }),
212
- /* @__PURE__ */ U("td", { children: e.operation?.collection || "—" }),
213
- /* @__PURE__ */ U("td", { children: e.status }),
214
- /* @__PURE__ */ U("td", { children: e.durationMs === void 0 ? "—" : `${e.durationMs} ms` })
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` })
215
229
  ] }, e.cursor || e.eventId)) })] })
216
230
  ]
217
231
  })
218
232
  }),
219
- /* @__PURE__ */ U(B, {
233
+ /* @__PURE__ */ q(K, {
220
234
  path: "/data",
221
- element: /* @__PURE__ */ U(c, {
222
- db: n,
223
- model: M,
224
- namespace: T,
225
- applicationUrl: E === "browser" ? D : "",
226
- developmentSession: O
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."
227
243
  })
228
244
  }),
229
- /* @__PURE__ */ U(B, {
245
+ /* @__PURE__ */ q(K, {
230
246
  path: "/state",
231
- element: /* @__PURE__ */ U(c, {
232
- db: n,
233
- model: M,
234
- namespace: T,
235
- applicationUrl: E === "browser" ? D : "",
236
- developmentSession: O
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."
237
255
  })
238
256
  }),
239
- /* @__PURE__ */ U(B, {
257
+ /* @__PURE__ */ q(K, {
240
258
  path: "/references",
241
- element: /* @__PURE__ */ U(l, {
242
- db: n,
243
- model: M,
259
+ element: /* @__PURE__ */ q(e, {
260
+ db: p,
261
+ model: P,
244
262
  namespace: T
245
263
  })
246
264
  }),
247
- /* @__PURE__ */ U(B, {
265
+ /* @__PURE__ */ q(K, {
248
266
  path: "/operations",
249
- element: /* @__PURE__ */ U(f, {
250
- db: n,
251
- model: M,
267
+ element: /* @__PURE__ */ q(t, {
268
+ db: p,
269
+ model: P,
252
270
  namespace: T
253
271
  })
254
272
  }),
255
- /* @__PURE__ */ U(B, {
273
+ /* @__PURE__ */ q(K, {
256
274
  path: "/peers",
257
- element: /* @__PURE__ */ U(h, {
258
- peers: ee,
259
- localInstance: P?.instanceId
275
+ element: /* @__PURE__ */ q(ee, {
276
+ peers: z,
277
+ localInstance: I?.instanceId
260
278
  })
261
279
  }),
262
- /* @__PURE__ */ U(B, {
280
+ /* @__PURE__ */ q(K, {
263
281
  path: "/capabilities",
264
- element: /* @__PURE__ */ U(s, {
265
- db: n,
266
- model: M
282
+ element: /* @__PURE__ */ q(a, {
283
+ db: p,
284
+ model: P
267
285
  })
268
286
  }),
269
- /* @__PURE__ */ U(B, {
287
+ /* @__PURE__ */ q(K, {
270
288
  path: "/executions",
271
- element: /* @__PURE__ */ U(o, {
272
- db: n,
273
- model: M
289
+ element: /* @__PURE__ */ q(g, {
290
+ db: p,
291
+ model: P
274
292
  })
275
293
  }),
276
- /* @__PURE__ */ U(B, {
294
+ /* @__PURE__ */ q(K, {
277
295
  path: "/workflows",
278
- element: /* @__PURE__ */ U(d, {
279
- db: n,
280
- model: M
296
+ element: /* @__PURE__ */ q(s, {
297
+ db: p,
298
+ model: P
281
299
  })
282
300
  }),
283
- /* @__PURE__ */ U(B, {
301
+ /* @__PURE__ */ q(K, {
284
302
  path: "/agents",
285
- element: /* @__PURE__ */ U(a, {
286
- db: n,
287
- model: M
303
+ element: /* @__PURE__ */ q(b, {
304
+ db: p,
305
+ model: P
288
306
  })
289
307
  }),
290
- /* @__PURE__ */ U(B, {
308
+ /* @__PURE__ */ q(K, {
291
309
  path: "/proposals",
292
- element: /* @__PURE__ */ U(v, {})
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
+ })
321
+ }),
322
+ /* @__PURE__ */ q(K, {
323
+ path: "/modules",
324
+ element: /* @__PURE__ */ q(m, { model: P })
325
+ }),
326
+ /* @__PURE__ */ q(K, {
327
+ path: "/schema",
328
+ element: /* @__PURE__ */ q(y, {
329
+ model: P,
330
+ section: "schema"
331
+ })
332
+ }),
333
+ /* @__PURE__ */ q(K, {
334
+ path: "/policies",
335
+ element: /* @__PURE__ */ q(y, {
336
+ model: P,
337
+ section: "policies"
338
+ })
293
339
  }),
294
- /* @__PURE__ */ U(B, {
340
+ /* @__PURE__ */ q(K, {
295
341
  path: "/provenance",
296
- element: /* @__PURE__ */ U(_, {
297
- db: n,
298
- model: M,
342
+ element: /* @__PURE__ */ q(f, {
343
+ db: p,
344
+ model: P,
299
345
  namespace: T,
300
- reference: te
346
+ reference: B
301
347
  })
302
348
  }),
303
- /* @__PURE__ */ U(B, {
349
+ /* @__PURE__ */ q(K, {
304
350
  path: "/conflicts",
305
- element: /* @__PURE__ */ U(y, {
306
- db: n,
307
- diagnostics: K
351
+ element: /* @__PURE__ */ q(c, {
352
+ db: p,
353
+ diagnostics: R
308
354
  })
309
355
  }),
310
- /* @__PURE__ */ U(B, {
356
+ /* @__PURE__ */ q(K, {
311
357
  path: "/health",
312
- element: /* @__PURE__ */ U(m, {
313
- diagnostics: K,
314
- model: M
358
+ element: /* @__PURE__ */ q(o, {
359
+ diagnostics: R,
360
+ model: P
315
361
  })
316
362
  }),
317
- /* @__PURE__ */ U(B, {
363
+ /* @__PURE__ */ q(K, {
318
364
  path: "/settings",
319
- element: /* @__PURE__ */ U(r, {
320
- db: n,
365
+ element: /* @__PURE__ */ q(v, {
366
+ db: p,
321
367
  remoteUrl: x,
322
368
  token: w,
323
- onConnect: j
369
+ onConnect: N
324
370
  })
325
371
  }),
326
- /* @__PURE__ */ U(B, {
372
+ /* @__PURE__ */ q(K, {
327
373
  path: "/api-keys",
328
- element: /* @__PURE__ */ W("div", {
374
+ element: /* @__PURE__ */ J("div", {
329
375
  style: { padding: "2rem" },
330
- children: [/* @__PURE__ */ U("h1", { children: "API Key Management" }), /* @__PURE__ */ U(C, {
376
+ children: [/* @__PURE__ */ q("h1", { children: "API Key Management" }), /* @__PURE__ */ q(j, {
331
377
  apiUrl: x,
332
378
  token: w,
333
379
  namespace: T,
@@ -341,4 +387,4 @@ function K({ db: n, remoteUrl: x = "", token: w = "", namespace: T = "default",
341
387
  }) });
342
388
  }
343
389
  //#endregion
344
- export { a as AgentExplorer, g as ApplicationDesigner, p as AskFeltDB, s as CapabilityExplorer, y as ConflictExplorer, o as ExecutionViewer, u as GlobalSearch, m as HealthCenter, C as KeyManagementPanel, T as ManagedInstancePanel, w as ManagedInstanceUtil, f as OperationsExplorer, e as OverviewDashboard, h as PeerMap, v as ProposalBrowser, _ as ProvenanceViewer, l as ReferenceExplorer, r as SettingsPanel, c as StateExplorer, K as StudioApp, d as WorkflowVisualizer, E as capitalize, D as fetchDashboardStats, O as fetchDiagnostics, k as fetchPeers, A as fetchProvenance, j as formatBytes, M as formatReference, N as formatRelativeTime, P as formatTime, F as searchReferences, n as useCollection, b as useDashboardStats, S as useFeltDB, i as usePeers, x as useProvenance, t as useRuntimeDiagnostics };
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 };