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