@feltdb/core 0.7.3 → 0.8.0

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