@feltdb/core 0.12.2 → 0.15.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.
- package/dist/agent-runtime.d.ts +64 -2
- package/dist/agent-runtime.d.ts.map +1 -1
- package/dist/agent-runtime.js +121 -11
- package/dist/agent-state.d.ts +48 -0
- package/dist/agent-state.d.ts.map +1 -1
- package/dist/agent-state.js +174 -12
- package/dist/agent.d.ts +10 -1
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +10 -1
- package/dist/build-identity.json +4 -4
- package/dist/cli/commands.js +34 -7
- package/dist/cli/workspace-integration.js +8 -0
- package/dist/collection.d.ts +3 -1
- package/dist/collection.d.ts.map +1 -1
- package/dist/collection.js +30 -8
- package/dist/create/build-identity.json +4 -4
- package/dist/create/cli.js +47 -38
- package/dist/create/create.js +21 -8
- package/dist/create/package-versions.js +1 -1
- package/dist/create/server-source/Cargo.lock +6 -6
- package/dist/create/server-source/Cargo.toml +1 -1
- package/dist/create/server-source/crates/feltdb/src/lib.rs +126 -35
- package/dist/create/server-source/crates/feltdb/src/state_contract.rs +162 -53
- package/dist/create/server-source/crates/feltdb/src/worker_mesh.rs +341 -2
- package/dist/create/server-source/crates/feltdb/src/workload.rs +2094 -126
- package/dist/create/server-source/crates/feltdb/tests/production_readiness_contract.rs +18 -12
- package/dist/create/server-source/crates/feltdb/tests/workload_envelope_contract.rs +17 -5
- package/dist/create/server-source/crates/feltdb-client/Cargo.toml +1 -1
- package/dist/create/server-source/crates/feltdb-server/Cargo.toml +1 -1
- package/dist/create/server-source/crates/feltdb-server/README.md +6 -1
- package/dist/create/server-source/crates/feltdb-server/src/agent_execution.rs +511 -0
- package/dist/create/server-source/crates/feltdb-server/src/app_state.rs +9 -1
- package/dist/create/server-source/crates/feltdb-server/src/auth.rs +113 -25
- package/dist/create/server-source/crates/feltdb-server/src/backup.rs +4 -0
- package/dist/create/server-source/crates/feltdb-server/src/console_accounts.rs +1009 -0
- package/dist/create/server-source/crates/feltdb-server/src/control_authorization.rs +441 -0
- package/dist/create/server-source/crates/feltdb-server/src/identity.rs +68 -6
- package/dist/create/server-source/crates/feltdb-server/src/key_management.rs +355 -23
- package/dist/create/server-source/crates/feltdb-server/src/lib.rs +4 -0
- package/dist/create/server-source/crates/feltdb-server/src/main.rs +1740 -236
- package/dist/create/server-source/crates/feltdb-server/src/redaction.rs +208 -0
- package/dist/create/server-source/crates/feltdb-server/src/tenancy.rs +198 -19
- package/dist/create/server-source/crates/feltdb-server/tests/transaction_precondition_contract.rs +403 -0
- package/dist/create/setup-summary.js +40 -0
- package/dist/db.d.ts +91 -10
- package/dist/db.d.ts.map +1 -1
- package/dist/db.js +170 -31
- package/dist/deployment.d.ts +19 -0
- package/dist/deployment.d.ts.map +1 -1
- package/dist/deployment.js +38 -2
- package/dist/development-runtime-bridge.d.ts +20 -0
- package/dist/development-runtime-bridge.d.ts.map +1 -1
- package/dist/development-runtime-bridge.js +61 -12
- package/dist/embedded-query.d.ts.map +1 -1
- package/dist/embedded-query.js +5 -4
- package/dist/embedded-transaction.d.ts +8 -4
- package/dist/embedded-transaction.d.ts.map +1 -1
- package/dist/embedded-transaction.js +55 -19
- package/dist/error-codes.d.ts +31 -2
- package/dist/error-codes.d.ts.map +1 -1
- package/dist/error-codes.js +41 -2
- package/dist/feltdb.d.ts +7 -0
- package/dist/feltdb.d.ts.map +1 -1
- package/dist/file-db.d.ts +27 -0
- package/dist/file-db.d.ts.map +1 -1
- package/dist/file-db.js +145 -7
- package/dist/http-client.d.ts +11 -3
- package/dist/http-client.d.ts.map +1 -1
- package/dist/http-client.js +27 -14
- package/dist/http-db.d.ts +40 -1
- package/dist/http-db.d.ts.map +1 -1
- package/dist/http-db.js +285 -58
- package/dist/index.js +1 -1
- package/dist/local-state-lock.d.ts +34 -0
- package/dist/local-state-lock.d.ts.map +1 -0
- package/dist/local-state-lock.js +225 -0
- package/dist/reactive-graph.d.ts +0 -3
- package/dist/reactive-graph.d.ts.map +1 -1
- package/dist/reactive-graph.js +11 -1
- package/dist/runtime-registry.d.ts +7 -2
- package/dist/runtime-registry.d.ts.map +1 -1
- package/dist/runtime-registry.js +2 -2
- package/dist/studio/{KeyManagementPanel-D5FMvvU9.js → KeyManagementPanel-skUNnKRw.js} +36 -29
- package/dist/studio/app.d.ts +8 -1
- package/dist/studio/app.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/index.js +2 -2
- package/dist/studio/{components-B4eKIUN5.js → components-CJmzntBi.js} +8 -7
- package/dist/studio/control-plane/Data.d.ts.map +1 -1
- package/dist/studio/control-plane/Instance.d.ts +4 -1
- package/dist/studio/control-plane/Instance.d.ts.map +1 -1
- package/dist/studio/control-plane/Operations.d.ts +4 -1
- package/dist/studio/control-plane/Operations.d.ts.map +1 -1
- package/dist/studio/control-plane/index.js +2 -2
- package/dist/studio/control-plane/primitives.d.ts +16 -0
- package/dist/studio/control-plane/primitives.d.ts.map +1 -1
- package/dist/studio/{control-plane-fxMcJn74.js → control-plane-CaBA7Rgv.js} +448 -424
- package/dist/studio/index.d.ts +1 -0
- package/dist/studio/index.d.ts.map +1 -1
- package/dist/studio/index.js +384 -247
- package/dist/studio/navigation.d.ts +57 -0
- package/dist/studio/navigation.d.ts.map +1 -0
- package/dist/studio/studio.css +1 -1
- package/dist/studio/utils/control-plane-api.d.ts +2 -0
- package/dist/studio/utils/control-plane-api.d.ts.map +1 -1
- package/dist/studio/utils/control-plane-api.js +5 -1
- package/dist/studio-app/assets/{feltdb_wasm-BatwwogY.js → feltdb_wasm-BjM1ylL3.js} +1 -1
- package/dist/studio-app/assets/feltdb_wasm_bg-TseJn2Ax.wasm +0 -0
- package/dist/studio-app/assets/index-1wd0uKua.js +30 -0
- package/dist/studio-app/assets/{index-CiC8VY-a.css → index-vi21oEQa.css} +1 -1
- package/dist/studio-app/index.html +2 -2
- package/dist/transaction.d.ts +27 -11
- package/dist/transaction.d.ts.map +1 -1
- package/dist/transaction.js +20 -14
- package/dist/wasm/feltdb_wasm_bg.wasm +0 -0
- package/dist/wasm/package.json +1 -1
- package/dist/workload.d.ts +31 -3
- package/dist/workload.d.ts.map +1 -1
- package/dist/workload.js +28 -3
- package/dist/workspace/local-development-authority.d.ts +19 -0
- package/dist/workspace/local-development-authority.d.ts.map +1 -1
- package/dist/workspace/local-development-authority.js +335 -15
- package/package.json +1 -1
- package/dist/studio-app/assets/feltdb_wasm_bg-BX0newOr.wasm +0 -0
- package/dist/studio-app/assets/index-DoVvbIay.js +0 -30
|
@@ -510,12 +510,12 @@ function Ae(e) {
|
|
|
510
510
|
else return;
|
|
511
511
|
e.preventDefault(), n[s].focus();
|
|
512
512
|
}
|
|
513
|
-
var
|
|
513
|
+
var z = (e) => String(e).replace(/[^A-Za-z0-9_-]/g, "-"), je = (e) => (t) => {
|
|
514
514
|
let n = t.currentTarget.ownerDocument.getElementById(e);
|
|
515
515
|
n && (t.preventDefault(), n.focus(), typeof n.scrollIntoView == "function" && n.scrollIntoView());
|
|
516
516
|
};
|
|
517
|
-
function
|
|
518
|
-
let t =
|
|
517
|
+
function Me(e) {
|
|
518
|
+
let t = z(e.idPrefix || "stack-tabs"), n = e.tabs || [], r = n.some((t) => t.id === e.active && !t.disabled) ? e.active : null;
|
|
519
519
|
return M("div", {
|
|
520
520
|
class: N("stack-tabs", e.className),
|
|
521
521
|
role: "tablist",
|
|
@@ -527,7 +527,7 @@ function Ne(e) {
|
|
|
527
527
|
class: N("stack-tabs__tab", a ? "stack-tabs__tab--selected" : null, n.className),
|
|
528
528
|
type: "button",
|
|
529
529
|
role: "tab",
|
|
530
|
-
id: `${t}-tab-${
|
|
530
|
+
id: `${t}-tab-${z(n.id)}`,
|
|
531
531
|
"aria-selected": a ? "true" : "false",
|
|
532
532
|
...P(e.panelId) ? { "aria-controls": e.panelId } : {},
|
|
533
533
|
tabindex: o ? "0" : "-1",
|
|
@@ -539,24 +539,24 @@ function Ne(e) {
|
|
|
539
539
|
}, [n.label, P(n.badge) ? M("span", { class: "stack-tabs__badge" }, n.badge) : null], e.onSelect && !n.disabled ? { click: () => e.onSelect(n.id) } : void 0);
|
|
540
540
|
}), { keydown: Ae });
|
|
541
541
|
}
|
|
542
|
-
function
|
|
543
|
-
let t =
|
|
542
|
+
function Ne(e) {
|
|
543
|
+
let t = z(e.idPrefix || "stack-tabs");
|
|
544
544
|
return M("div", {
|
|
545
545
|
class: N("stack-tabpanel", e.className),
|
|
546
546
|
role: "tabpanel",
|
|
547
547
|
id: e.id,
|
|
548
|
-
...P(e.active) ? { "aria-labelledby": `${t}-tab-${
|
|
548
|
+
...P(e.active) ? { "aria-labelledby": `${t}-tab-${z(e.active)}` } : {},
|
|
549
549
|
tabindex: "0",
|
|
550
550
|
...F(e.attrs)
|
|
551
551
|
}, e.children || null);
|
|
552
552
|
}
|
|
553
|
-
var
|
|
553
|
+
var Pe = {
|
|
554
554
|
ascending: "▲",
|
|
555
555
|
descending: "▼"
|
|
556
|
-
},
|
|
556
|
+
}, Fe = (e) => (t) => {
|
|
557
557
|
t.target === t.currentTarget && (t.key === "Enter" || t.key === " ") && (t.preventDefault(), e());
|
|
558
558
|
};
|
|
559
|
-
function
|
|
559
|
+
function Ie(e) {
|
|
560
560
|
let t = e.columns || [], n = e.rows || [], r = P(e.label) ? e.label : "Table";
|
|
561
561
|
if (e.error) return L({
|
|
562
562
|
title: e.error.title || `${r} could not be read`,
|
|
@@ -585,13 +585,13 @@ function Le(e) {
|
|
|
585
585
|
});
|
|
586
586
|
}
|
|
587
587
|
let i = e.sort || {}, a = M("thead", {}, M("tr", {}, t.map((t) => {
|
|
588
|
-
let n = i.column === t.id &&
|
|
588
|
+
let n = i.column === t.id && Pe[i.direction] ? i.direction : null, r = t.sortable && e.onSort ? M("button", {
|
|
589
589
|
class: "stack-table__sort",
|
|
590
590
|
type: "button"
|
|
591
591
|
}, [t.header, M("span", {
|
|
592
592
|
class: "stack-table__sort-indicator",
|
|
593
593
|
"aria-hidden": "true"
|
|
594
|
-
}, n ?
|
|
594
|
+
}, n ? Pe[n] : "↕")], { click: () => e.onSort(t.id) }) : t.header;
|
|
595
595
|
return M("th", {
|
|
596
596
|
class: N("stack-table__header", t.align === "end" ? "stack-table__cell--end" : null),
|
|
597
597
|
scope: "col",
|
|
@@ -612,7 +612,7 @@ function Le(e) {
|
|
|
612
612
|
}, r ? "—" : n);
|
|
613
613
|
}), n ? {
|
|
614
614
|
click: e.onSelect,
|
|
615
|
-
keydown:
|
|
615
|
+
keydown: Fe(e.onSelect)
|
|
616
616
|
} : void 0, e.key);
|
|
617
617
|
}));
|
|
618
618
|
return M("div", {
|
|
@@ -628,8 +628,8 @@ function Le(e) {
|
|
|
628
628
|
o
|
|
629
629
|
]));
|
|
630
630
|
}
|
|
631
|
-
function
|
|
632
|
-
let r = `${t}-${
|
|
631
|
+
function Le(e, t, n) {
|
|
632
|
+
let r = `${t}-${z(e.id)}`, i = P(e.value) ? String(e.value) : "", a = n ? (t) => n(e.id, t.target.value) : null, o = e.type === "select" ? M("select", {
|
|
633
633
|
class: "stack-filter__control",
|
|
634
634
|
id: r,
|
|
635
635
|
name: e.id
|
|
@@ -652,14 +652,14 @@ function Re(e, t, n) {
|
|
|
652
652
|
for: r
|
|
653
653
|
}, e.label), o]);
|
|
654
654
|
}
|
|
655
|
-
function
|
|
656
|
-
let t =
|
|
655
|
+
function Re(e) {
|
|
656
|
+
let t = z(e.idPrefix || "stack-filter"), n = Number(e.applied) || 0;
|
|
657
657
|
return M("form", {
|
|
658
658
|
class: N("stack-filter", e.className),
|
|
659
659
|
role: "search",
|
|
660
660
|
"aria-label": e.label || "Filters",
|
|
661
661
|
...F(e.attrs)
|
|
662
|
-
}, [M("div", { class: "stack-filter__controls" }, [(e.filters || []).map((n) =>
|
|
662
|
+
}, [M("div", { class: "stack-filter__controls" }, [(e.filters || []).map((n) => Le(n, t, e.onChange)), M("div", { class: "stack-filter__actions" }, [Oe({
|
|
663
663
|
label: e.applyLabel || "Apply",
|
|
664
664
|
type: "submit",
|
|
665
665
|
variant: "secondary"
|
|
@@ -675,7 +675,7 @@ function ze(e) {
|
|
|
675
675
|
t.preventDefault(), e.onSubmit();
|
|
676
676
|
} } : void 0);
|
|
677
677
|
}
|
|
678
|
-
function
|
|
678
|
+
function ze(e) {
|
|
679
679
|
return M("nav", {
|
|
680
680
|
class: N("stack-pagination", e.className),
|
|
681
681
|
"aria-label": e.label || "Pagination",
|
|
@@ -694,7 +694,7 @@ function Be(e) {
|
|
|
694
694
|
attrs: { "data-page": "next" }
|
|
695
695
|
})])]);
|
|
696
696
|
}
|
|
697
|
-
var
|
|
697
|
+
var Be = Object.freeze([
|
|
698
698
|
{
|
|
699
699
|
value: "system",
|
|
700
700
|
label: "System theme"
|
|
@@ -708,10 +708,10 @@ var Ve = Object.freeze([
|
|
|
708
708
|
label: "Dark theme"
|
|
709
709
|
}
|
|
710
710
|
]);
|
|
711
|
-
function
|
|
711
|
+
function Ve(e) {
|
|
712
712
|
let t = e.product || {}, n = (t) => e.onNavigate ? { click: (n) => {
|
|
713
713
|
n.defaultPrevented || n.button !== 0 || n.metaKey || n.ctrlKey || n.shiftKey || n.altKey || (n.preventDefault(), e.onNavigate(t));
|
|
714
|
-
} } : void 0, r =
|
|
714
|
+
} } : void 0, r = z(e.mainId || "stack-main"), i = [];
|
|
715
715
|
for (let t of e.navigation || []) {
|
|
716
716
|
let e = t.group || "", n = i.find((t) => t.name === e);
|
|
717
717
|
n || i.push(n = {
|
|
@@ -733,7 +733,7 @@ function He(e) {
|
|
|
733
733
|
M("a", {
|
|
734
734
|
class: "stack-shell__skip",
|
|
735
735
|
href: `#${r}`
|
|
736
|
-
}, e.skipLabel || "Skip to content", { click:
|
|
736
|
+
}, e.skipLabel || "Skip to content", { click: je(r) }),
|
|
737
737
|
M("header", { class: "stack-shell__bar" }, [
|
|
738
738
|
M("a", {
|
|
739
739
|
class: "stack-shell__product",
|
|
@@ -750,7 +750,7 @@ function He(e) {
|
|
|
750
750
|
}, "Theme"), M("select", {
|
|
751
751
|
class: "stack-shell__theme",
|
|
752
752
|
id: s
|
|
753
|
-
},
|
|
753
|
+
}, Be.map((e) => M("option", {
|
|
754
754
|
value: e.value,
|
|
755
755
|
...e.value === (o.preference || "system") ? { selected: !0 } : {}
|
|
756
756
|
}, e.label)), o.onChange ? { change: (e) => o.onChange(e.target.value) } : void 0)]) : null, e.account ? M("div", { class: "stack-shell__account" }, e.account) : null])
|
|
@@ -777,14 +777,14 @@ function He(e) {
|
|
|
777
777
|
}, e.children || null)])
|
|
778
778
|
]);
|
|
779
779
|
}
|
|
780
|
-
var
|
|
780
|
+
var He = Object.freeze({
|
|
781
781
|
Breadcrumbs: ke,
|
|
782
|
-
Tabs:
|
|
783
|
-
TabPanel:
|
|
784
|
-
DataTable:
|
|
785
|
-
FilterBar:
|
|
786
|
-
Pagination:
|
|
787
|
-
Shell:
|
|
782
|
+
Tabs: Me,
|
|
783
|
+
TabPanel: Ne,
|
|
784
|
+
DataTable: Ie,
|
|
785
|
+
FilterBar: Re,
|
|
786
|
+
Pagination: ze,
|
|
787
|
+
Shell: Ve,
|
|
788
788
|
StatusIndicator: he,
|
|
789
789
|
VerificationBadge: _e,
|
|
790
790
|
FreshnessLabel: be,
|
|
@@ -796,30 +796,30 @@ var Ue = Object.freeze({
|
|
|
796
796
|
ResourceIdentity: Te,
|
|
797
797
|
PageHeader: R,
|
|
798
798
|
Button: Oe
|
|
799
|
-
}),
|
|
799
|
+
}), Ue = {
|
|
800
800
|
class: "className",
|
|
801
801
|
for: "htmlFor",
|
|
802
802
|
datetime: "dateTime",
|
|
803
803
|
tabindex: "tabIndex"
|
|
804
|
-
},
|
|
804
|
+
}, We = {
|
|
805
805
|
click: "onClick",
|
|
806
806
|
change: "onChange",
|
|
807
807
|
input: "onInput",
|
|
808
808
|
submit: "onSubmit",
|
|
809
809
|
keydown: "onKeyDown"
|
|
810
810
|
};
|
|
811
|
-
function
|
|
811
|
+
function Ge(e, t) {
|
|
812
812
|
if (e == null || e === !1 || e === !0) return null;
|
|
813
813
|
if (typeof e == "string" || typeof e == "number") return e;
|
|
814
|
-
if (Array.isArray(e)) return d(l, t === void 0 ? null : { key: t }, ...e.map((e, t) =>
|
|
814
|
+
if (Array.isArray(e)) return d(l, t === void 0 ? null : { key: t }, ...e.map((e, t) => Ge(e, t)));
|
|
815
815
|
if (f(e)) return t === void 0 ? e : d(l, { key: t }, e);
|
|
816
816
|
if (fe(e)) {
|
|
817
817
|
let n = e.k === void 0 ? t : e.k, r = n === void 0 ? {} : { key: n };
|
|
818
|
-
for (let [t, n] of Object.entries(e.a)) n != null && n !== !1 && (r[
|
|
818
|
+
for (let [t, n] of Object.entries(e.a)) n != null && n !== !1 && (r[Ue[t] || t] = n);
|
|
819
819
|
let i = e.t === "input" || e.t === "select" || e.t === "textarea";
|
|
820
820
|
for (let [t, n] of Object.entries(e.on || {})) {
|
|
821
|
-
if (!
|
|
822
|
-
r[i && (t === "input" || t === "change") ? "onChange" :
|
|
821
|
+
if (!We[t]) throw Error(`toReact: unsupported event ${t}`);
|
|
822
|
+
r[i && (t === "input" || t === "change") ? "onChange" : We[t]] = n;
|
|
823
823
|
}
|
|
824
824
|
let a = e.c;
|
|
825
825
|
if (e.t === "select") {
|
|
@@ -833,24 +833,24 @@ function Ke(e, t) {
|
|
|
833
833
|
} : e), e && (r.value = e.a.value);
|
|
834
834
|
}
|
|
835
835
|
i && "value" in r && !r.onChange && (r.defaultValue = r.value, delete r.value);
|
|
836
|
-
let o = a.map((e, t) =>
|
|
836
|
+
let o = a.map((e, t) => Ge(e, t));
|
|
837
837
|
return d(e.t, r, ...o);
|
|
838
838
|
}
|
|
839
839
|
throw TypeError("toReact: unsupported child");
|
|
840
840
|
}
|
|
841
|
-
var
|
|
842
|
-
let t =
|
|
841
|
+
var B = (e) => {
|
|
842
|
+
let t = He[e], n = (e) => Ge(t(e || {}));
|
|
843
843
|
return n.displayName = `Stack${e}`, n;
|
|
844
|
-
},
|
|
845
|
-
|
|
846
|
-
var
|
|
847
|
-
|
|
848
|
-
var
|
|
849
|
-
|
|
850
|
-
var
|
|
851
|
-
|
|
852
|
-
var
|
|
853
|
-
function
|
|
844
|
+
}, Ke = B("StatusIndicator"), qe = B("VerificationBadge");
|
|
845
|
+
B("FreshnessLabel");
|
|
846
|
+
var Je = B("Unavailable"), Ye = B("Loading");
|
|
847
|
+
B("EmptyState");
|
|
848
|
+
var Xe = B("ErrorPanel"), Ze = B("MetadataList");
|
|
849
|
+
B("ResourceIdentity");
|
|
850
|
+
var Qe = B("PageHeader");
|
|
851
|
+
B("Button"), B("Breadcrumbs");
|
|
852
|
+
var $e = B("Tabs"), et = B("TabPanel"), tt = B("DataTable"), nt = B("FilterBar"), rt = B("Pagination"), it = B("Shell"), at = u(null);
|
|
853
|
+
function ot({ options: e, runtime: t = "", children: n }) {
|
|
854
854
|
let { baseUrl: r = "", token: o = "", applicationId: s = "", environment: c = "production" } = e, l = g(() => new a({
|
|
855
855
|
baseUrl: r,
|
|
856
856
|
token: o,
|
|
@@ -896,18 +896,18 @@ function st({ options: e, runtime: t = "", children: n }) {
|
|
|
896
896
|
r,
|
|
897
897
|
o
|
|
898
898
|
]);
|
|
899
|
-
return /* @__PURE__ */ S(
|
|
899
|
+
return /* @__PURE__ */ S(at.Provider, {
|
|
900
900
|
value: x,
|
|
901
901
|
children: n
|
|
902
902
|
});
|
|
903
903
|
}
|
|
904
|
-
function
|
|
905
|
-
let e = p(
|
|
904
|
+
function V() {
|
|
905
|
+
let e = p(at);
|
|
906
906
|
if (!e) throw Error("useControlPlane requires a ControlPlaneProvider");
|
|
907
907
|
return e;
|
|
908
908
|
}
|
|
909
|
-
function
|
|
910
|
-
let { api: r } =
|
|
909
|
+
function H(e, t, n = {}) {
|
|
910
|
+
let { api: r } = V(), i = n.enabled !== !1, [a, s] = v(), [c, l] = v(i), [u, d] = v(""), [f, p] = v(0);
|
|
911
911
|
return m(() => {
|
|
912
912
|
if (!i) {
|
|
913
913
|
l(!1);
|
|
@@ -943,58 +943,82 @@ function V(e, t, n = {}) {
|
|
|
943
943
|
}
|
|
944
944
|
//#endregion
|
|
945
945
|
//#region src/control-plane/primitives.tsx
|
|
946
|
-
function
|
|
946
|
+
function U({ status: e }) {
|
|
947
947
|
return /* @__PURE__ */ S("span", {
|
|
948
948
|
className: `cp-pill cp-pill-${e}`,
|
|
949
949
|
children: e.replace(/[-_]/g, " ")
|
|
950
950
|
});
|
|
951
951
|
}
|
|
952
|
-
function
|
|
953
|
-
let { capabilities: n } =
|
|
954
|
-
return /* @__PURE__ */ S(
|
|
952
|
+
function W({ capability: e, title: t }) {
|
|
953
|
+
let { capabilities: n } = V(), r = n.get(e), i = n.status(e);
|
|
954
|
+
return /* @__PURE__ */ S(Je, {
|
|
955
955
|
status: i === "partial" ? "partial" : "unsupported",
|
|
956
956
|
capability: e,
|
|
957
|
-
title: t || r?.title || "Not
|
|
957
|
+
title: t || r?.title || "Not part of this instance",
|
|
958
958
|
headingLevel: 3,
|
|
959
959
|
reason: n.note(e),
|
|
960
|
-
children: /* @__PURE__ */ C("p", {
|
|
960
|
+
children: r ? /* @__PURE__ */ C("p", {
|
|
961
961
|
className: "cp-unavailable-id",
|
|
962
962
|
children: [
|
|
963
963
|
"Capability ",
|
|
964
964
|
/* @__PURE__ */ S("code", { children: e }),
|
|
965
965
|
" · declared ",
|
|
966
|
-
/* @__PURE__ */ S(
|
|
966
|
+
/* @__PURE__ */ S(U, { status: i })
|
|
967
|
+
]
|
|
968
|
+
}) : /* @__PURE__ */ C("p", {
|
|
969
|
+
className: "cp-unavailable-id",
|
|
970
|
+
children: [
|
|
971
|
+
"Capability ",
|
|
972
|
+
/* @__PURE__ */ S("code", { children: e }),
|
|
973
|
+
" · not declared by this instance"
|
|
967
974
|
]
|
|
968
975
|
})
|
|
969
976
|
});
|
|
970
977
|
}
|
|
971
|
-
function
|
|
972
|
-
|
|
973
|
-
|
|
978
|
+
function st({ message: e, onRetry: t }) {
|
|
979
|
+
return /* @__PURE__ */ S(Xe, {
|
|
980
|
+
title: "Studio could not reach this FeltDB instance",
|
|
981
|
+
onRetry: t,
|
|
982
|
+
message: /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S("p", { children: e }), /* @__PURE__ */ C("p", { children: [
|
|
983
|
+
"Check that the authority Studio is connected to is running (for a development session, that ",
|
|
984
|
+
/* @__PURE__ */ S("code", { children: "feltdb dev" }),
|
|
985
|
+
" is still running), then retry."
|
|
986
|
+
] })] })
|
|
987
|
+
});
|
|
988
|
+
}
|
|
989
|
+
function G({ capability: e, requireFull: t, children: n }) {
|
|
990
|
+
let { capabilities: r, loading: i, error: a, reload: o } = V();
|
|
991
|
+
if (i && !r.loaded) return /* @__PURE__ */ S(K, { what: "what this instance offers" });
|
|
992
|
+
if (a && !r.loaded) return /* @__PURE__ */ S(st, {
|
|
993
|
+
message: a,
|
|
994
|
+
onRetry: o
|
|
995
|
+
});
|
|
996
|
+
let s = r.status(e);
|
|
997
|
+
return s === "unsupported" || t && s !== "available" ? /* @__PURE__ */ S(W, { capability: e }) : /* @__PURE__ */ S(x, { children: n });
|
|
974
998
|
}
|
|
975
999
|
function ct({ capability: e }) {
|
|
976
|
-
let { capabilities: t } =
|
|
1000
|
+
let { capabilities: t } = V();
|
|
977
1001
|
return t.status(e) === "partial" ? /* @__PURE__ */ S("p", {
|
|
978
1002
|
className: "cp-notice",
|
|
979
1003
|
children: t.note(e)
|
|
980
1004
|
}) : null;
|
|
981
1005
|
}
|
|
982
|
-
function
|
|
983
|
-
return /* @__PURE__ */ S(
|
|
1006
|
+
function K({ what: e }) {
|
|
1007
|
+
return /* @__PURE__ */ S(Ye, { what: e });
|
|
984
1008
|
}
|
|
985
|
-
function
|
|
986
|
-
return e ? /* @__PURE__ */ S(
|
|
1009
|
+
function q({ message: e, onRetry: t }) {
|
|
1010
|
+
return e ? /* @__PURE__ */ S(Xe, {
|
|
987
1011
|
title: e,
|
|
988
1012
|
onRetry: t
|
|
989
1013
|
}) : null;
|
|
990
1014
|
}
|
|
991
|
-
function
|
|
1015
|
+
function J({ children: e }) {
|
|
992
1016
|
return /* @__PURE__ */ S("p", {
|
|
993
1017
|
className: "cp-empty",
|
|
994
1018
|
children: e
|
|
995
1019
|
});
|
|
996
1020
|
}
|
|
997
|
-
function
|
|
1021
|
+
function Y({ label: e, value: t, hint: n }) {
|
|
998
1022
|
let r = t == null ? "—" : typeof t == "number" ? t.toLocaleString() : String(t);
|
|
999
1023
|
return /* @__PURE__ */ C("div", {
|
|
1000
1024
|
className: "cp-stat",
|
|
@@ -1004,7 +1028,7 @@ function J({ label: e, value: t, hint: n }) {
|
|
|
1004
1028
|
})]
|
|
1005
1029
|
});
|
|
1006
1030
|
}
|
|
1007
|
-
function
|
|
1031
|
+
function X({ value: e }) {
|
|
1008
1032
|
return /* @__PURE__ */ S("pre", {
|
|
1009
1033
|
className: "cp-json",
|
|
1010
1034
|
children: JSON.stringify(e, null, 2)
|
|
@@ -1016,7 +1040,7 @@ function lt({ path: e }) {
|
|
|
1016
1040
|
children: s(e)
|
|
1017
1041
|
});
|
|
1018
1042
|
}
|
|
1019
|
-
function
|
|
1043
|
+
function Z({ ms: e }) {
|
|
1020
1044
|
if (!e) return /* @__PURE__ */ S("span", {
|
|
1021
1045
|
className: "cp-muted",
|
|
1022
1046
|
children: "—"
|
|
@@ -1028,7 +1052,7 @@ function X({ ms: e }) {
|
|
|
1028
1052
|
children: t.toLocaleString()
|
|
1029
1053
|
});
|
|
1030
1054
|
}
|
|
1031
|
-
function
|
|
1055
|
+
function Q({ value: e, length: t = 12 }) {
|
|
1032
1056
|
return e ? /* @__PURE__ */ S("code", {
|
|
1033
1057
|
className: "cp-identity",
|
|
1034
1058
|
title: e,
|
|
@@ -1038,9 +1062,9 @@ function Z({ value: e, length: t = 12 }) {
|
|
|
1038
1062
|
children: "—"
|
|
1039
1063
|
});
|
|
1040
1064
|
}
|
|
1041
|
-
function
|
|
1065
|
+
function ut({ tabs: e, active: t, onSelect: n, label: r, children: i }) {
|
|
1042
1066
|
let a = `cp-tabs${h()}`, o = `${a}-panel`;
|
|
1043
|
-
return /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(
|
|
1067
|
+
return /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S($e, {
|
|
1044
1068
|
className: "cp-tabs",
|
|
1045
1069
|
idPrefix: a,
|
|
1046
1070
|
panelId: o,
|
|
@@ -1048,7 +1072,7 @@ function Q({ tabs: e, active: t, onSelect: n, label: r, children: i }) {
|
|
|
1048
1072
|
tabs: e,
|
|
1049
1073
|
active: t,
|
|
1050
1074
|
onSelect: (e) => n(e)
|
|
1051
|
-
}), /* @__PURE__ */ S(
|
|
1075
|
+
}), /* @__PURE__ */ S(et, {
|
|
1052
1076
|
id: o,
|
|
1053
1077
|
idPrefix: a,
|
|
1054
1078
|
active: t,
|
|
@@ -1059,15 +1083,15 @@ function Q({ tabs: e, active: t, onSelect: n, label: r, children: i }) {
|
|
|
1059
1083
|
function $({ eyebrow: e, title: t, description: n, children: r }) {
|
|
1060
1084
|
return /* @__PURE__ */ C("div", {
|
|
1061
1085
|
className: "cp-page",
|
|
1062
|
-
children: [/* @__PURE__ */ S(
|
|
1086
|
+
children: [/* @__PURE__ */ S(Qe, {
|
|
1063
1087
|
eyebrow: e,
|
|
1064
1088
|
title: t,
|
|
1065
1089
|
description: n
|
|
1066
1090
|
}), r]
|
|
1067
1091
|
});
|
|
1068
1092
|
}
|
|
1069
|
-
function
|
|
1070
|
-
let { runtime: e } =
|
|
1093
|
+
function dt() {
|
|
1094
|
+
let { runtime: e } = V();
|
|
1071
1095
|
return e === "browser" ? /* @__PURE__ */ S("p", {
|
|
1072
1096
|
className: "cp-notice",
|
|
1073
1097
|
role: "note",
|
|
@@ -1077,23 +1101,23 @@ function ut() {
|
|
|
1077
1101
|
}
|
|
1078
1102
|
//#endregion
|
|
1079
1103
|
//#region src/control-plane/Overview.tsx
|
|
1080
|
-
function
|
|
1104
|
+
function ft(e) {
|
|
1081
1105
|
return e == null ? null : typeof e == "number" ? e.toLocaleString() : String(e);
|
|
1082
1106
|
}
|
|
1083
|
-
var
|
|
1107
|
+
var pt = (e) => e.map((e) => ({
|
|
1084
1108
|
label: e.label,
|
|
1085
|
-
value:
|
|
1109
|
+
value: ft(e.value),
|
|
1086
1110
|
hint: e.hint
|
|
1087
1111
|
}));
|
|
1088
|
-
function
|
|
1089
|
-
let { value: e, loading: t, error: n, refresh: r } =
|
|
1112
|
+
function mt() {
|
|
1113
|
+
let { value: e, loading: t, error: n, refresh: r } = H((e) => e.overview(), [], {
|
|
1090
1114
|
refreshMs: 1e4,
|
|
1091
1115
|
subject: "the instance overview"
|
|
1092
|
-
}), { capabilities: i } =
|
|
1116
|
+
}), { capabilities: i } = V(), { value: a } = H((e) => e.replication(), [], {
|
|
1093
1117
|
enabled: i.usable("replication.health"),
|
|
1094
1118
|
refreshMs: 15e3,
|
|
1095
1119
|
subject: "replication health"
|
|
1096
|
-
}), { value: o } =
|
|
1120
|
+
}), { value: o } = H((e) => e.transactions({ limit: 8 }), [], {
|
|
1097
1121
|
enabled: i.usable("provenance.transactions"),
|
|
1098
1122
|
refreshMs: 1e4,
|
|
1099
1123
|
subject: "recent commits"
|
|
@@ -1101,12 +1125,12 @@ function pt() {
|
|
|
1101
1125
|
if (t && !e) return /* @__PURE__ */ S($, {
|
|
1102
1126
|
eyebrow: "Instance",
|
|
1103
1127
|
title: "Overview",
|
|
1104
|
-
children: /* @__PURE__ */ S(
|
|
1128
|
+
children: /* @__PURE__ */ S(K, { what: "the instance" })
|
|
1105
1129
|
});
|
|
1106
1130
|
if (!e) return /* @__PURE__ */ S($, {
|
|
1107
1131
|
eyebrow: "Instance",
|
|
1108
1132
|
title: "Overview",
|
|
1109
|
-
children: /* @__PURE__ */ S(
|
|
1133
|
+
children: /* @__PURE__ */ S(q, {
|
|
1110
1134
|
message: n,
|
|
1111
1135
|
onRetry: r
|
|
1112
1136
|
})
|
|
@@ -1116,17 +1140,17 @@ function pt() {
|
|
|
1116
1140
|
eyebrow: "Instance",
|
|
1117
1141
|
title: "Overview",
|
|
1118
1142
|
description: [e.instance?.namespace, e.instance?.instance_id].filter(Boolean).join(" · ") || void 0,
|
|
1119
|
-
children: /* @__PURE__ */ C(
|
|
1143
|
+
children: /* @__PURE__ */ C(G, {
|
|
1120
1144
|
capability: "overview.instance",
|
|
1121
1145
|
children: [
|
|
1122
|
-
/* @__PURE__ */ S(
|
|
1123
|
-
/* @__PURE__ */ S(
|
|
1146
|
+
/* @__PURE__ */ S(dt, {}),
|
|
1147
|
+
/* @__PURE__ */ S(q, {
|
|
1124
1148
|
message: n,
|
|
1125
1149
|
onRetry: r
|
|
1126
1150
|
}),
|
|
1127
1151
|
/* @__PURE__ */ S("section", {
|
|
1128
1152
|
"aria-label": "Instance status",
|
|
1129
|
-
children: /* @__PURE__ */ S(
|
|
1153
|
+
children: /* @__PURE__ */ S(Ze, { items: pt([
|
|
1130
1154
|
{
|
|
1131
1155
|
label: "Engine",
|
|
1132
1156
|
value: e.instance?.engine_version
|
|
@@ -1155,7 +1179,7 @@ function pt() {
|
|
|
1155
1179
|
className: "card-kind",
|
|
1156
1180
|
children: "Authority"
|
|
1157
1181
|
}),
|
|
1158
|
-
/* @__PURE__ */ S(
|
|
1182
|
+
/* @__PURE__ */ S(Ze, { items: [...pt([{
|
|
1159
1183
|
label: "Authority revision",
|
|
1160
1184
|
value: e.authority?.authority_revision,
|
|
1161
1185
|
hint: "Monotonic commit order. One transaction advances it once."
|
|
@@ -1164,7 +1188,7 @@ function pt() {
|
|
|
1164
1188
|
value: e.authority?.state_version
|
|
1165
1189
|
}]), {
|
|
1166
1190
|
label: "Lease clock",
|
|
1167
|
-
value: typeof e.authority?.lease_clock_healthy == "boolean" ? /* @__PURE__ */ S(
|
|
1191
|
+
value: typeof e.authority?.lease_clock_healthy == "boolean" ? /* @__PURE__ */ S(Ke, {
|
|
1168
1192
|
field: "feltdb.authority.lease_clock_healthy",
|
|
1169
1193
|
value: e.authority?.lease_clock_healthy,
|
|
1170
1194
|
attrs: { "data-overview": "lease-clock" }
|
|
@@ -1183,7 +1207,7 @@ function pt() {
|
|
|
1183
1207
|
className: "card-kind",
|
|
1184
1208
|
children: "Storage and durability"
|
|
1185
1209
|
}),
|
|
1186
|
-
/* @__PURE__ */ S(
|
|
1210
|
+
/* @__PURE__ */ S(Ze, { items: pt([
|
|
1187
1211
|
{
|
|
1188
1212
|
label: "Records",
|
|
1189
1213
|
value: e.storage?.records
|
|
@@ -1208,7 +1232,7 @@ function pt() {
|
|
|
1208
1232
|
children: [/* @__PURE__ */ S("span", {
|
|
1209
1233
|
className: "card-kind",
|
|
1210
1234
|
children: "FeltDB runtime"
|
|
1211
|
-
}), /* @__PURE__ */ S(
|
|
1235
|
+
}), /* @__PURE__ */ S(Ze, { items: pt([
|
|
1212
1236
|
{
|
|
1213
1237
|
label: "Autonomous worker",
|
|
1214
1238
|
value: l(e.runtime?.worker_enabled, "Running", "Off")
|
|
@@ -1228,7 +1252,7 @@ function pt() {
|
|
|
1228
1252
|
children: [/* @__PURE__ */ S("span", {
|
|
1229
1253
|
className: "card-kind",
|
|
1230
1254
|
children: "Replication"
|
|
1231
|
-
}), /* @__PURE__ */ S(
|
|
1255
|
+
}), /* @__PURE__ */ S(Ze, { items: pt([
|
|
1232
1256
|
{
|
|
1233
1257
|
label: "Peers",
|
|
1234
1258
|
value: a ? u.length : void 0
|
|
@@ -1252,7 +1276,7 @@ function pt() {
|
|
|
1252
1276
|
className: "card-kind",
|
|
1253
1277
|
children: "Activity"
|
|
1254
1278
|
}),
|
|
1255
|
-
/* @__PURE__ */ S(
|
|
1279
|
+
/* @__PURE__ */ S(Ze, { items: pt([
|
|
1256
1280
|
{
|
|
1257
1281
|
label: "Requests",
|
|
1258
1282
|
value: e.activity?.requests
|
|
@@ -1287,7 +1311,7 @@ function pt() {
|
|
|
1287
1311
|
" by ",
|
|
1288
1312
|
/* @__PURE__ */ S("strong", { children: d.subject || "an unnamed actor" }),
|
|
1289
1313
|
" · ",
|
|
1290
|
-
/* @__PURE__ */ S(
|
|
1314
|
+
/* @__PURE__ */ S(Z, { ms: d.unix_ms })
|
|
1291
1315
|
]
|
|
1292
1316
|
}) : /* @__PURE__ */ S("p", {
|
|
1293
1317
|
className: "cp-muted",
|
|
@@ -1300,7 +1324,7 @@ function pt() {
|
|
|
1300
1324
|
children: [/* @__PURE__ */ S("span", {
|
|
1301
1325
|
className: "card-kind",
|
|
1302
1326
|
children: "Collections"
|
|
1303
|
-
}), c ? c.length === 0 ? /* @__PURE__ */ S(
|
|
1327
|
+
}), c ? c.length === 0 ? /* @__PURE__ */ S(J, { children: "This instance holds no application collections yet." }) : /* @__PURE__ */ S(tt, {
|
|
1304
1328
|
label: "Application collections",
|
|
1305
1329
|
columns: [
|
|
1306
1330
|
{
|
|
@@ -1325,11 +1349,11 @@ function pt() {
|
|
|
1325
1349
|
records: Number(e.records).toLocaleString()
|
|
1326
1350
|
}
|
|
1327
1351
|
}))
|
|
1328
|
-
}) : /* @__PURE__ */ S(
|
|
1352
|
+
}) : /* @__PURE__ */ S(J, { children: "This instance did not report its collections." })]
|
|
1329
1353
|
}),
|
|
1330
1354
|
/* @__PURE__ */ C("details", {
|
|
1331
1355
|
className: "cp-raw",
|
|
1332
|
-
children: [/* @__PURE__ */ S("summary", { children: "Raw overview document" }), /* @__PURE__ */ S(
|
|
1356
|
+
children: [/* @__PURE__ */ S("summary", { children: "Raw overview document" }), /* @__PURE__ */ S(X, { value: e })]
|
|
1333
1357
|
})
|
|
1334
1358
|
]
|
|
1335
1359
|
})
|
|
@@ -1337,7 +1361,7 @@ function pt() {
|
|
|
1337
1361
|
}
|
|
1338
1362
|
//#endregion
|
|
1339
1363
|
//#region src/control-plane/Data.tsx
|
|
1340
|
-
function
|
|
1364
|
+
function ht({ field: e, value: t }) {
|
|
1341
1365
|
let n = r(e, t);
|
|
1342
1366
|
return n == null ? /* @__PURE__ */ S("span", {
|
|
1343
1367
|
className: "data-null",
|
|
@@ -1347,7 +1371,7 @@ function mt({ field: e, value: t }) {
|
|
|
1347
1371
|
children: n ? "True" : "False"
|
|
1348
1372
|
}) : typeof n == "object" ? /* @__PURE__ */ C("details", { children: [/* @__PURE__ */ S("summary", { children: Array.isArray(n) ? `${n.length} items` : "Object" }), /* @__PURE__ */ S("pre", { children: JSON.stringify(n, null, 2) })] }) : /* @__PURE__ */ S(x, { children: String(n) });
|
|
1349
1373
|
}
|
|
1350
|
-
function
|
|
1374
|
+
function gt({ action: e, fields: n, initial: r, onSubmit: i, onCancel: a }) {
|
|
1351
1375
|
let [s, c] = v(() => {
|
|
1352
1376
|
let t = { id: r?.id === void 0 ? "" : String(r.id) };
|
|
1353
1377
|
for (let n of e.input_fields) {
|
|
@@ -1434,7 +1458,7 @@ function ht({ action: e, fields: n, initial: r, onSubmit: i, onCancel: a }) {
|
|
|
1434
1458
|
}))
|
|
1435
1459
|
})
|
|
1436
1460
|
] }, e)),
|
|
1437
|
-
/* @__PURE__ */ S(
|
|
1461
|
+
/* @__PURE__ */ S(q, { message: d }),
|
|
1438
1462
|
/* @__PURE__ */ C("div", {
|
|
1439
1463
|
className: "cp-actions",
|
|
1440
1464
|
children: [/* @__PURE__ */ S("button", {
|
|
@@ -1451,10 +1475,10 @@ function ht({ action: e, fields: n, initial: r, onSubmit: i, onCancel: a }) {
|
|
|
1451
1475
|
]
|
|
1452
1476
|
});
|
|
1453
1477
|
}
|
|
1454
|
-
function
|
|
1455
|
-
let { value: n, loading: r, error: i, refresh: a } =
|
|
1456
|
-
if (r && !n) return /* @__PURE__ */ S(
|
|
1457
|
-
if (!n) return /* @__PURE__ */ S(
|
|
1478
|
+
function _t({ collection: e, id: t }) {
|
|
1479
|
+
let { value: n, loading: r, error: i, refresh: a } = H((n) => n.provenance(e, t), [e, t], { subject: "this record’s provenance" });
|
|
1480
|
+
if (r && !n) return /* @__PURE__ */ S(K, { what: "provenance" });
|
|
1481
|
+
if (!n) return /* @__PURE__ */ S(q, {
|
|
1458
1482
|
message: i,
|
|
1459
1483
|
onRetry: a
|
|
1460
1484
|
});
|
|
@@ -1466,26 +1490,26 @@ function gt({ collection: e, id: t }) {
|
|
|
1466
1490
|
o ? /* @__PURE__ */ C(x, { children: ["Last changed by ", /* @__PURE__ */ S("strong", { children: o })] }) : /* @__PURE__ */ S(x, { children: "No actor is recorded for the last change" }),
|
|
1467
1491
|
n.attribution.authority && /* @__PURE__ */ C(x, { children: [" on authority ", /* @__PURE__ */ S("code", { children: n.attribution.authority })] }),
|
|
1468
1492
|
" · ",
|
|
1469
|
-
/* @__PURE__ */ S(
|
|
1493
|
+
/* @__PURE__ */ S(Z, { ms: n.updated_ms })
|
|
1470
1494
|
]
|
|
1471
1495
|
}),
|
|
1472
1496
|
/* @__PURE__ */ C("div", {
|
|
1473
1497
|
className: "cp-stats",
|
|
1474
1498
|
children: [
|
|
1475
|
-
/* @__PURE__ */ S(
|
|
1499
|
+
/* @__PURE__ */ S(Y, {
|
|
1476
1500
|
label: "Attribution source",
|
|
1477
1501
|
value: n.attribution.source,
|
|
1478
1502
|
hint: "transaction: an actor's commit named this record. authority: only the writing instance is known."
|
|
1479
1503
|
}),
|
|
1480
|
-
/* @__PURE__ */ S(
|
|
1504
|
+
/* @__PURE__ */ S(Y, {
|
|
1481
1505
|
label: "Content hash",
|
|
1482
1506
|
value: n.content_hash ? `${n.content_hash.slice(0, 12)}…` : void 0
|
|
1483
1507
|
}),
|
|
1484
|
-
/* @__PURE__ */ S(
|
|
1508
|
+
/* @__PURE__ */ S(Y, {
|
|
1485
1509
|
label: "Commits held",
|
|
1486
1510
|
value: n.transactions.length
|
|
1487
1511
|
}),
|
|
1488
|
-
/* @__PURE__ */ S(
|
|
1512
|
+
/* @__PURE__ */ S(Y, {
|
|
1489
1513
|
label: "State revisions",
|
|
1490
1514
|
value: n.revisions.length
|
|
1491
1515
|
})
|
|
@@ -1493,7 +1517,7 @@ function gt({ collection: e, id: t }) {
|
|
|
1493
1517
|
}),
|
|
1494
1518
|
/* @__PURE__ */ S("h3", { children: "Commits that named this record" }),
|
|
1495
1519
|
/* @__PURE__ */ S(ct, { capability: "provenance.transactions" }),
|
|
1496
|
-
n.transactions.length === 0 ? /* @__PURE__ */ S(
|
|
1520
|
+
n.transactions.length === 0 ? /* @__PURE__ */ S(J, { children: "No commit inside the attribution window named this record." }) : /* @__PURE__ */ S("div", {
|
|
1497
1521
|
className: "table-shell",
|
|
1498
1522
|
children: /* @__PURE__ */ C("table", { children: [/* @__PURE__ */ S("thead", { children: /* @__PURE__ */ C("tr", { children: [
|
|
1499
1523
|
/* @__PURE__ */ S("th", { children: "When" }),
|
|
@@ -1502,12 +1526,12 @@ function gt({ collection: e, id: t }) {
|
|
|
1502
1526
|
/* @__PURE__ */ S("th", { children: "Records" }),
|
|
1503
1527
|
/* @__PURE__ */ S("th", { children: "Revision" })
|
|
1504
1528
|
] }) }), /* @__PURE__ */ S("tbody", { children: n.transactions.map((e) => /* @__PURE__ */ C("tr", { children: [
|
|
1505
|
-
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(
|
|
1529
|
+
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(Z, { ms: e.unix_ms }) }),
|
|
1506
1530
|
/* @__PURE__ */ S("td", { children: e.subject || /* @__PURE__ */ S("span", {
|
|
1507
1531
|
className: "cp-muted",
|
|
1508
1532
|
children: "unnamed"
|
|
1509
1533
|
}) }),
|
|
1510
|
-
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(
|
|
1534
|
+
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(Q, {
|
|
1511
1535
|
value: e.transaction_id,
|
|
1512
1536
|
length: 16
|
|
1513
1537
|
}) }),
|
|
@@ -1520,7 +1544,7 @@ function gt({ collection: e, id: t }) {
|
|
|
1520
1544
|
] }, e.transaction_id)) })] })
|
|
1521
1545
|
}),
|
|
1522
1546
|
/* @__PURE__ */ S("h3", { children: "State revisions" }),
|
|
1523
|
-
n.revisions.length === 0 ? /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(ct, { capability: "data.records.history" }), /* @__PURE__ */ S(
|
|
1547
|
+
n.revisions.length === 0 ? /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(ct, { capability: "data.records.history" }), /* @__PURE__ */ S(J, { children: "This record has no state revisions. Its write path advances the authority revision without minting one." })] }) : /* @__PURE__ */ S("div", {
|
|
1524
1548
|
className: "table-shell",
|
|
1525
1549
|
children: /* @__PURE__ */ C("table", { children: [/* @__PURE__ */ S("thead", { children: /* @__PURE__ */ C("tr", { children: [
|
|
1526
1550
|
/* @__PURE__ */ S("th", { children: "#" }),
|
|
@@ -1530,19 +1554,19 @@ function gt({ collection: e, id: t }) {
|
|
|
1530
1554
|
/* @__PURE__ */ S("th", { children: "When" })
|
|
1531
1555
|
] }) }), /* @__PURE__ */ S("tbody", { children: n.revisions.map((e) => /* @__PURE__ */ C("tr", { children: [
|
|
1532
1556
|
/* @__PURE__ */ S("td", { children: e.sequence }),
|
|
1533
|
-
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(
|
|
1534
|
-
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(
|
|
1557
|
+
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(Q, { value: e.state_id }) }),
|
|
1558
|
+
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(Q, { value: e.parent_id }) }),
|
|
1535
1559
|
/* @__PURE__ */ S("td", { children: e.authority }),
|
|
1536
|
-
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(
|
|
1560
|
+
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(Z, { ms: e.timestamp_ms }) })
|
|
1537
1561
|
] }, e.state_id)) })] })
|
|
1538
1562
|
}),
|
|
1539
1563
|
/* @__PURE__ */ C("details", {
|
|
1540
1564
|
className: "cp-raw",
|
|
1541
|
-
children: [/* @__PURE__ */ S("summary", { children: "Raw operation record" }), /* @__PURE__ */ S(
|
|
1565
|
+
children: [/* @__PURE__ */ S("summary", { children: "Raw operation record" }), /* @__PURE__ */ S(X, { value: n.operation })]
|
|
1542
1566
|
})
|
|
1543
1567
|
] });
|
|
1544
1568
|
}
|
|
1545
|
-
function
|
|
1569
|
+
function vt({ schema: e }) {
|
|
1546
1570
|
return /* @__PURE__ */ S("div", {
|
|
1547
1571
|
className: "table-shell",
|
|
1548
1572
|
children: /* @__PURE__ */ C("table", { children: [/* @__PURE__ */ S("thead", { children: /* @__PURE__ */ C("tr", { children: [
|
|
@@ -1564,13 +1588,13 @@ function _t({ schema: e }) {
|
|
|
1564
1588
|
] }, e.name)) })] })
|
|
1565
1589
|
});
|
|
1566
1590
|
}
|
|
1567
|
-
function
|
|
1568
|
-
let { capabilities: r } =
|
|
1569
|
-
if (!t) return /* @__PURE__ */ S(
|
|
1591
|
+
function yt({ collection: e, report: t, onRebuild: n }) {
|
|
1592
|
+
let { capabilities: r } = V();
|
|
1593
|
+
if (!t) return /* @__PURE__ */ S(K, { what: "indexes" });
|
|
1570
1594
|
let i = t.declared.filter((t) => t.collection === e), a = t.access_paths.find((t) => t.collection === e);
|
|
1571
1595
|
return /* @__PURE__ */ C(x, { children: [
|
|
1572
1596
|
/* @__PURE__ */ S("h3", { children: "Declared indexes" }),
|
|
1573
|
-
i.length === 0 ? /* @__PURE__ */ C(
|
|
1597
|
+
i.length === 0 ? /* @__PURE__ */ C(J, { children: [
|
|
1574
1598
|
"The application contract declares no index on ",
|
|
1575
1599
|
e,
|
|
1576
1600
|
"."
|
|
@@ -1590,7 +1614,7 @@ function vt({ collection: e, report: t, onRebuild: n }) {
|
|
|
1590
1614
|
}, e.field)) }),
|
|
1591
1615
|
/* @__PURE__ */ S("td", { children: e.unique ? "unique" : "non-unique" }),
|
|
1592
1616
|
/* @__PURE__ */ C("td", { children: [
|
|
1593
|
-
/* @__PURE__ */ S(
|
|
1617
|
+
/* @__PURE__ */ S(U, { status: e.state === "backed" ? "available" : "partial" }),
|
|
1594
1618
|
" ",
|
|
1595
1619
|
e.state
|
|
1596
1620
|
] }),
|
|
@@ -1609,15 +1633,15 @@ function vt({ collection: e, report: t, onRebuild: n }) {
|
|
|
1609
1633
|
/* @__PURE__ */ S("div", {
|
|
1610
1634
|
className: "table-shell",
|
|
1611
1635
|
children: /* @__PURE__ */ C("table", { children: [/* @__PURE__ */ S("thead", { children: /* @__PURE__ */ C("tr", { children: [/* @__PURE__ */ S("th", { children: "Field" }), /* @__PURE__ */ S("th", { children: "Access method" })] }) }), /* @__PURE__ */ S("tbody", { children: (a?.fields || []).map((e) => /* @__PURE__ */ C("tr", { children: [/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S("code", { children: e.field }) }), /* @__PURE__ */ C("td", { children: [
|
|
1612
|
-
/* @__PURE__ */ S(
|
|
1636
|
+
/* @__PURE__ */ S(U, { status: e.access_method === "index" ? "available" : "partial" }),
|
|
1613
1637
|
" ",
|
|
1614
1638
|
e.access_method === "index" ? "index" : "full scan"
|
|
1615
1639
|
] })] }, e.field)) })] })
|
|
1616
1640
|
})
|
|
1617
1641
|
] });
|
|
1618
1642
|
}
|
|
1619
|
-
function
|
|
1620
|
-
let { api: i, applicationId: a, environment: s, capabilities: l, baseUrl: u, token: d } =
|
|
1643
|
+
function bt({ focus: t, onFocusHandled: r }) {
|
|
1644
|
+
let { api: i, applicationId: a, environment: s, capabilities: l, baseUrl: u, token: d } = V(), [f, p] = b(), m = f.get("collection") || "", h = g(() => new e({
|
|
1621
1645
|
baseUrl: u,
|
|
1622
1646
|
token: d,
|
|
1623
1647
|
applicationId: a,
|
|
@@ -1627,14 +1651,14 @@ function yt({ focus: t, onFocusHandled: r }) {
|
|
|
1627
1651
|
d,
|
|
1628
1652
|
a,
|
|
1629
1653
|
s
|
|
1630
|
-
]), [_, y] = v(""), [w, ee] = v("browse"), [T, E] = v(""), [D, O] = v("data"), [k, A] = v(""), [j, te] = v(""), [ne, re] = v({}), [ie, ae] = v(), [oe, se] = v([]), [ce, le] = v(null), [ue, de] = v(""), { value: M, loading: fe, error: N, refresh: P } =
|
|
1654
|
+
]), [_, y] = v(""), [w, ee] = v("browse"), [T, E] = v(""), [D, O] = v("data"), [k, A] = v(""), [j, te] = v(""), [ne, re] = v({}), [ie, ae] = v(), [oe, se] = v([]), [ce, le] = v(null), [ue, de] = v(""), { value: M, loading: fe, error: N, refresh: P } = H(() => h.schema(), [h], { subject: "the application schema" }), { value: F } = H((e) => e.actions(), [], {
|
|
1631
1655
|
enabled: [
|
|
1632
1656
|
"data.records.create",
|
|
1633
1657
|
"data.records.update",
|
|
1634
1658
|
"data.records.delete"
|
|
1635
1659
|
].some((e) => l.usable(e)),
|
|
1636
1660
|
subject: "declared actions"
|
|
1637
|
-
}), { value: pe, refresh: me } =
|
|
1661
|
+
}), { value: pe, refresh: me } = H((e) => e.indexes(), [], {
|
|
1638
1662
|
enabled: l.usable("data.indexes.inspect"),
|
|
1639
1663
|
subject: "indexes"
|
|
1640
1664
|
}), he = n(a, M), ge = g(() => new e({
|
|
@@ -1657,13 +1681,13 @@ function yt({ focus: t, onFocusHandled: r }) {
|
|
|
1657
1681
|
_,
|
|
1658
1682
|
ie ?? null,
|
|
1659
1683
|
ne
|
|
1660
|
-
]), { value: ve, loading: ye, error: be, refresh: xe } =
|
|
1684
|
+
]), { value: ve, loading: ye, error: be, refresh: xe } = H(() => ge.records(_, ie, ne).then((e) => ({
|
|
1661
1685
|
...e,
|
|
1662
1686
|
request: _e
|
|
1663
1687
|
})), [ge, _e], {
|
|
1664
1688
|
enabled: !!_,
|
|
1665
1689
|
subject: _
|
|
1666
|
-
}), { value: Se, error: Ce } =
|
|
1690
|
+
}), { value: Se, error: Ce } = H(() => ge.record(_, T), [
|
|
1667
1691
|
ge,
|
|
1668
1692
|
_,
|
|
1669
1693
|
T
|
|
@@ -1686,7 +1710,7 @@ function yt({ focus: t, onFocusHandled: r }) {
|
|
|
1686
1710
|
if (fe && !M) return /* @__PURE__ */ S($, {
|
|
1687
1711
|
eyebrow: "Data",
|
|
1688
1712
|
title: "Data",
|
|
1689
|
-
children: /* @__PURE__ */ S(
|
|
1713
|
+
children: /* @__PURE__ */ S(K, { what: "application data" })
|
|
1690
1714
|
});
|
|
1691
1715
|
if (!M) {
|
|
1692
1716
|
let e = !!(a || u || d);
|
|
@@ -1716,10 +1740,10 @@ function yt({ focus: t, onFocusHandled: r }) {
|
|
|
1716
1740
|
eyebrow: "Data",
|
|
1717
1741
|
title: "Data",
|
|
1718
1742
|
description: "Records as FeltDB holds them, authorized and redacted by the Service API.",
|
|
1719
|
-
children: [/* @__PURE__ */ S(
|
|
1743
|
+
children: [/* @__PURE__ */ S(dt, {}), /* @__PURE__ */ C(G, {
|
|
1720
1744
|
capability: "data.collections.list",
|
|
1721
1745
|
children: [
|
|
1722
|
-
/* @__PURE__ */ S(
|
|
1746
|
+
/* @__PURE__ */ S(q, { message: N }),
|
|
1723
1747
|
ue && /* @__PURE__ */ S("p", {
|
|
1724
1748
|
className: "cp-notice",
|
|
1725
1749
|
children: ue
|
|
@@ -1734,19 +1758,18 @@ function yt({ focus: t, onFocusHandled: r }) {
|
|
|
1734
1758
|
children: "Collections"
|
|
1735
1759
|
}),
|
|
1736
1760
|
(M?.collections || []).map((e) => {
|
|
1737
|
-
let t = pe
|
|
1761
|
+
let t = pe ? pe.declared.filter((t) => t.collection === e.collection).length : void 0;
|
|
1738
1762
|
return /* @__PURE__ */ C("button", {
|
|
1739
1763
|
className: e.collection === _ ? "active" : "",
|
|
1740
1764
|
onClick: () => Te(e.collection),
|
|
1741
1765
|
children: [e.collection, /* @__PURE__ */ C("small", { children: [
|
|
1742
1766
|
e.fields.length,
|
|
1743
|
-
" fields
|
|
1744
|
-
t
|
|
1745
|
-
" indexes"
|
|
1767
|
+
" fields",
|
|
1768
|
+
t === void 0 ? "" : ` · ${t} indexes`
|
|
1746
1769
|
] })]
|
|
1747
1770
|
}, e.collection);
|
|
1748
1771
|
}),
|
|
1749
|
-
!M?.collections.length && /* @__PURE__ */ S(
|
|
1772
|
+
!M?.collections.length && /* @__PURE__ */ S(J, { children: "No collections in this contract." })
|
|
1750
1773
|
]
|
|
1751
1774
|
}), /* @__PURE__ */ C("section", {
|
|
1752
1775
|
className: "data-browser",
|
|
@@ -1762,12 +1785,12 @@ function yt({ focus: t, onFocusHandled: r }) {
|
|
|
1762
1785
|
}), !R("create") && _ && /* @__PURE__ */ C("span", {
|
|
1763
1786
|
className: "cp-muted",
|
|
1764
1787
|
children: [
|
|
1765
|
-
"
|
|
1788
|
+
"Studio has no declared action to create ",
|
|
1766
1789
|
_,
|
|
1767
|
-
"
|
|
1790
|
+
" records; the application creates them."
|
|
1768
1791
|
]
|
|
1769
1792
|
})]
|
|
1770
|
-
})] }), /* @__PURE__ */ C(
|
|
1793
|
+
})] }), /* @__PURE__ */ C(ut, {
|
|
1771
1794
|
label: `${_ || "Collection"} sections`,
|
|
1772
1795
|
active: w,
|
|
1773
1796
|
onSelect: ee,
|
|
@@ -1786,19 +1809,19 @@ function yt({ focus: t, onFocusHandled: r }) {
|
|
|
1786
1809
|
}
|
|
1787
1810
|
],
|
|
1788
1811
|
children: [
|
|
1789
|
-
w === "schema" && I && /* @__PURE__ */ S(
|
|
1790
|
-
w === "indexes" && /* @__PURE__ */ S(
|
|
1812
|
+
w === "schema" && I && /* @__PURE__ */ S(vt, { schema: I }),
|
|
1813
|
+
w === "indexes" && /* @__PURE__ */ S(G, {
|
|
1791
1814
|
capability: "data.indexes.inspect",
|
|
1792
|
-
children: /* @__PURE__ */ S(
|
|
1815
|
+
children: /* @__PURE__ */ S(yt, {
|
|
1793
1816
|
collection: _,
|
|
1794
1817
|
report: pe,
|
|
1795
1818
|
onRebuild: (e) => void De(e)
|
|
1796
1819
|
})
|
|
1797
1820
|
}),
|
|
1798
|
-
w === "browse" && /* @__PURE__ */ C(
|
|
1821
|
+
w === "browse" && /* @__PURE__ */ C(G, {
|
|
1799
1822
|
capability: "data.records.browse",
|
|
1800
1823
|
children: [
|
|
1801
|
-
I && /* @__PURE__ */ S(
|
|
1824
|
+
I && /* @__PURE__ */ S(nt, {
|
|
1802
1825
|
label: `Filter ${_}`,
|
|
1803
1826
|
idPrefix: "data-filter",
|
|
1804
1827
|
filters: [{
|
|
@@ -1836,7 +1859,7 @@ function yt({ focus: t, onFocusHandled: r }) {
|
|
|
1836
1859
|
className: "cp-muted",
|
|
1837
1860
|
children: ["Listed in record-key order. ", l.note("data.records.sort")]
|
|
1838
1861
|
}),
|
|
1839
|
-
I && /* @__PURE__ */ S(
|
|
1862
|
+
I && /* @__PURE__ */ S(tt, {
|
|
1840
1863
|
label: `${_} records`,
|
|
1841
1864
|
loading: !be && (ye || !L),
|
|
1842
1865
|
loadingWhat: _,
|
|
@@ -1860,7 +1883,7 @@ function yt({ focus: t, onFocusHandled: r }) {
|
|
|
1860
1883
|
attrs: { "data-record": String(e.id) },
|
|
1861
1884
|
cells: {
|
|
1862
1885
|
id: /* @__PURE__ */ S("code", { children: String(e.id) }),
|
|
1863
|
-
...Object.fromEntries(I.fields.map((t) => [`field:${t.name}`, /* @__PURE__ */ S(
|
|
1886
|
+
...Object.fromEntries(I.fields.map((t) => [`field:${t.name}`, /* @__PURE__ */ S(ht, {
|
|
1864
1887
|
field: t,
|
|
1865
1888
|
value: e[t.name]
|
|
1866
1889
|
})]))
|
|
@@ -1871,7 +1894,7 @@ function yt({ focus: t, onFocusHandled: r }) {
|
|
|
1871
1894
|
noMatchBody: "Change or clear the filter.",
|
|
1872
1895
|
emptyTitle: "No records yet"
|
|
1873
1896
|
}),
|
|
1874
|
-
/* @__PURE__ */ S(
|
|
1897
|
+
/* @__PURE__ */ S(rt, {
|
|
1875
1898
|
label: `${_} pages`,
|
|
1876
1899
|
summary: L ? `${L.records.length} shown · state version ${L.state_version}` : void 0,
|
|
1877
1900
|
hasPrevious: oe.length > 0,
|
|
@@ -1890,7 +1913,7 @@ function yt({ focus: t, onFocusHandled: r }) {
|
|
|
1890
1913
|
})]
|
|
1891
1914
|
})]
|
|
1892
1915
|
}),
|
|
1893
|
-
ce && I && /* @__PURE__ */ S(
|
|
1916
|
+
ce && I && /* @__PURE__ */ S(gt, {
|
|
1894
1917
|
action: ce.action,
|
|
1895
1918
|
fields: I.fields,
|
|
1896
1919
|
initial: ce.initial,
|
|
@@ -1941,7 +1964,7 @@ function yt({ focus: t, onFocusHandled: r }) {
|
|
|
1941
1964
|
className: "cp-muted",
|
|
1942
1965
|
children: "This collection declares no update or delete action, so nothing — Studio, an application, or an agent — can change these records in place."
|
|
1943
1966
|
}),
|
|
1944
|
-
/* @__PURE__ */ C(
|
|
1967
|
+
/* @__PURE__ */ C(ut, {
|
|
1945
1968
|
label: "Record sections",
|
|
1946
1969
|
active: D,
|
|
1947
1970
|
onSelect: O,
|
|
@@ -1953,21 +1976,21 @@ function yt({ focus: t, onFocusHandled: r }) {
|
|
|
1953
1976
|
label: "Provenance"
|
|
1954
1977
|
}],
|
|
1955
1978
|
children: [
|
|
1956
|
-
/* @__PURE__ */ S(
|
|
1979
|
+
/* @__PURE__ */ S(q, { message: Ce }),
|
|
1957
1980
|
D === "data" && Se && I && /* @__PURE__ */ C("dl", {
|
|
1958
1981
|
className: "cp-record",
|
|
1959
1982
|
children: [
|
|
1960
1983
|
/* @__PURE__ */ S("dt", { children: "id" }),
|
|
1961
1984
|
/* @__PURE__ */ S("dd", { children: /* @__PURE__ */ S("code", { children: String(Se.record.id) }) }),
|
|
1962
|
-
I.fields.map((e) => /* @__PURE__ */ C(c.Fragment, { children: [/* @__PURE__ */ C("dt", { children: [e.name, /* @__PURE__ */ C("small", { children: [e.type, e.required ? " · required" : ""] })] }), /* @__PURE__ */ S("dd", { children: /* @__PURE__ */ S(
|
|
1985
|
+
I.fields.map((e) => /* @__PURE__ */ C(c.Fragment, { children: [/* @__PURE__ */ C("dt", { children: [e.name, /* @__PURE__ */ C("small", { children: [e.type, e.required ? " · required" : ""] })] }), /* @__PURE__ */ S("dd", { children: /* @__PURE__ */ S(ht, {
|
|
1963
1986
|
field: e,
|
|
1964
1987
|
value: Se.record[e.name]
|
|
1965
1988
|
}) })] }, e.name))
|
|
1966
1989
|
]
|
|
1967
1990
|
}),
|
|
1968
|
-
D === "provenance" && /* @__PURE__ */ S(
|
|
1991
|
+
D === "provenance" && /* @__PURE__ */ S(G, {
|
|
1969
1992
|
capability: "provenance.record",
|
|
1970
|
-
children: /* @__PURE__ */ S(
|
|
1993
|
+
children: /* @__PURE__ */ S(_t, {
|
|
1971
1994
|
collection: _,
|
|
1972
1995
|
id: T
|
|
1973
1996
|
})
|
|
@@ -1982,8 +2005,8 @@ function yt({ focus: t, onFocusHandled: r }) {
|
|
|
1982
2005
|
}
|
|
1983
2006
|
//#endregion
|
|
1984
2007
|
//#region src/control-plane/Schema.tsx
|
|
1985
|
-
function
|
|
1986
|
-
let { applicationId: t, environment: n, baseUrl: r, token: i, capabilities: a } =
|
|
2008
|
+
function xt() {
|
|
2009
|
+
let { applicationId: t, environment: n, baseUrl: r, token: i, capabilities: a } = V(), [o, s] = v("declared"), c = g(() => new e({
|
|
1987
2010
|
baseUrl: r,
|
|
1988
2011
|
token: i,
|
|
1989
2012
|
applicationId: t,
|
|
@@ -1993,10 +2016,10 @@ function bt() {
|
|
|
1993
2016
|
i,
|
|
1994
2017
|
t,
|
|
1995
2018
|
n
|
|
1996
|
-
]), { value: l, loading: u, error: d, refresh: f } =
|
|
2019
|
+
]), { value: l, loading: u, error: d, refresh: f } = H(() => c.schema(), [c], { subject: "the application schema" }), { value: p } = H(() => c.application(), [c], {
|
|
1997
2020
|
enabled: !!t,
|
|
1998
2021
|
subject: "the application"
|
|
1999
|
-
}), { value: m } =
|
|
2022
|
+
}), { value: m } = H((e) => e.indexes(), [], {
|
|
2000
2023
|
enabled: a.usable("data.indexes.inspect"),
|
|
2001
2024
|
subject: "indexes"
|
|
2002
2025
|
}), [h, _] = v({}), [y, b] = v(!1), [w, ee] = v(""), T = async () => {
|
|
@@ -2025,39 +2048,39 @@ function bt() {
|
|
|
2025
2048
|
}
|
|
2026
2049
|
};
|
|
2027
2050
|
return /* @__PURE__ */ S($, {
|
|
2028
|
-
eyebrow: "
|
|
2029
|
-
title: "
|
|
2051
|
+
eyebrow: "Operate",
|
|
2052
|
+
title: "Instance schema",
|
|
2030
2053
|
description: p ? `${p.application_name || p.application_id} · contract v${p.version}` : void 0,
|
|
2031
|
-
children: /* @__PURE__ */ C(
|
|
2054
|
+
children: /* @__PURE__ */ C(G, {
|
|
2032
2055
|
capability: "data.schema.inspect",
|
|
2033
2056
|
children: [
|
|
2034
|
-
/* @__PURE__ */ S(
|
|
2057
|
+
/* @__PURE__ */ S(q, {
|
|
2035
2058
|
message: d,
|
|
2036
2059
|
onRetry: f
|
|
2037
2060
|
}),
|
|
2038
|
-
u && !l && /* @__PURE__ */ S(
|
|
2061
|
+
u && !l && /* @__PURE__ */ S(K, { what: "the schema" }),
|
|
2039
2062
|
p && /* @__PURE__ */ C("section", {
|
|
2040
2063
|
className: "cp-stats",
|
|
2041
2064
|
children: [
|
|
2042
|
-
/* @__PURE__ */ S(
|
|
2065
|
+
/* @__PURE__ */ S(Y, {
|
|
2043
2066
|
label: "Contract version",
|
|
2044
2067
|
value: p.version
|
|
2045
2068
|
}),
|
|
2046
|
-
/* @__PURE__ */ S(
|
|
2069
|
+
/* @__PURE__ */ S(Y, {
|
|
2047
2070
|
label: "Contract hash",
|
|
2048
2071
|
value: p.contract_hash ? `${p.contract_hash.slice(0, 12)}…` : void 0
|
|
2049
2072
|
}),
|
|
2050
|
-
/* @__PURE__ */ S(
|
|
2073
|
+
/* @__PURE__ */ S(Y, {
|
|
2051
2074
|
label: "Flow hash",
|
|
2052
2075
|
value: p.flow_hash ? `${p.flow_hash.slice(0, 12)}…` : "not recorded"
|
|
2053
2076
|
}),
|
|
2054
|
-
/* @__PURE__ */ S(
|
|
2077
|
+
/* @__PURE__ */ S(Y, {
|
|
2055
2078
|
label: "Collections",
|
|
2056
2079
|
value: l?.collections.length
|
|
2057
2080
|
})
|
|
2058
2081
|
]
|
|
2059
2082
|
}),
|
|
2060
|
-
/* @__PURE__ */ C(
|
|
2083
|
+
/* @__PURE__ */ C(ut, {
|
|
2061
2084
|
label: "Schema views",
|
|
2062
2085
|
active: o,
|
|
2063
2086
|
onSelect: s,
|
|
@@ -2100,7 +2123,7 @@ function bt() {
|
|
|
2100
2123
|
className: "cp-muted",
|
|
2101
2124
|
children: "—"
|
|
2102
2125
|
}) }),
|
|
2103
|
-
/* @__PURE__ */ S("td", { children: n ? /* @__PURE__ */ S(
|
|
2126
|
+
/* @__PURE__ */ S("td", { children: n ? /* @__PURE__ */ S(U, { status: n === "index" ? "available" : "partial" }) : /* @__PURE__ */ S("span", {
|
|
2104
2127
|
className: "cp-muted",
|
|
2105
2128
|
children: "—"
|
|
2106
2129
|
}) })
|
|
@@ -2132,8 +2155,8 @@ function bt() {
|
|
|
2132
2155
|
children: y ? "Sampling…" : "Sample records"
|
|
2133
2156
|
})
|
|
2134
2157
|
}),
|
|
2135
|
-
/* @__PURE__ */ S(
|
|
2136
|
-
Object.keys(h).length === 0 ? /* @__PURE__ */ S(
|
|
2158
|
+
/* @__PURE__ */ S(q, { message: w }),
|
|
2159
|
+
Object.keys(h).length === 0 ? /* @__PURE__ */ S(J, { children: "No sample taken yet." }) : Object.entries(h).map(([e, t]) => {
|
|
2137
2160
|
let n = new Set((l?.collections.find((t) => t.collection === e)?.fields || []).map((e) => e.name));
|
|
2138
2161
|
return /* @__PURE__ */ C("section", {
|
|
2139
2162
|
className: "studio-card",
|
|
@@ -2147,7 +2170,7 @@ function bt() {
|
|
|
2147
2170
|
" ",
|
|
2148
2171
|
/* @__PURE__ */ C("small", { children: [t.sampled, " records sampled"] })
|
|
2149
2172
|
] }),
|
|
2150
|
-
Object.keys(t.fields).length === 0 ? /* @__PURE__ */ S(
|
|
2173
|
+
Object.keys(t.fields).length === 0 ? /* @__PURE__ */ S(J, { children: "No records to observe." }) : /* @__PURE__ */ S("div", {
|
|
2151
2174
|
className: "table-shell",
|
|
2152
2175
|
children: /* @__PURE__ */ C("table", { children: [/* @__PURE__ */ S("thead", { children: /* @__PURE__ */ C("tr", { children: [
|
|
2153
2176
|
/* @__PURE__ */ S("th", { children: "Field" }),
|
|
@@ -2156,7 +2179,7 @@ function bt() {
|
|
|
2156
2179
|
] }) }), /* @__PURE__ */ S("tbody", { children: Object.entries(t.fields).map(([e, t]) => /* @__PURE__ */ C("tr", { children: [
|
|
2157
2180
|
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S("code", { children: e }) }),
|
|
2158
2181
|
/* @__PURE__ */ S("td", { children: [...t].join(", ") }),
|
|
2159
|
-
/* @__PURE__ */ S("td", { children: e === "id" || n.has(e) ? "declared" : /* @__PURE__ */ S(
|
|
2182
|
+
/* @__PURE__ */ S("td", { children: e === "id" || n.has(e) ? "declared" : /* @__PURE__ */ S(U, { status: "partial" }) })
|
|
2160
2183
|
] }, e)) })] })
|
|
2161
2184
|
})
|
|
2162
2185
|
]
|
|
@@ -2165,7 +2188,7 @@ function bt() {
|
|
|
2165
2188
|
] }),
|
|
2166
2189
|
o === "declared" && l && /* @__PURE__ */ C("details", {
|
|
2167
2190
|
className: "cp-raw",
|
|
2168
|
-
children: [/* @__PURE__ */ S("summary", { children: "Raw contract schema" }), /* @__PURE__ */ S(
|
|
2191
|
+
children: [/* @__PURE__ */ S("summary", { children: "Raw contract schema" }), /* @__PURE__ */ S(X, { value: l })]
|
|
2169
2192
|
})
|
|
2170
2193
|
]
|
|
2171
2194
|
})
|
|
@@ -2175,7 +2198,7 @@ function bt() {
|
|
|
2175
2198
|
}
|
|
2176
2199
|
//#endregion
|
|
2177
2200
|
//#region src/control-plane/Agents.tsx
|
|
2178
|
-
function
|
|
2201
|
+
function St({ agent: e, onOpenRecord: t }) {
|
|
2179
2202
|
let n = e.did.transactions;
|
|
2180
2203
|
return n.length ? /* @__PURE__ */ S("div", {
|
|
2181
2204
|
className: "table-shell",
|
|
@@ -2186,8 +2209,8 @@ function xt({ agent: e, onOpenRecord: t }) {
|
|
|
2186
2209
|
/* @__PURE__ */ S("th", { children: "Revision" }),
|
|
2187
2210
|
/* @__PURE__ */ S("th", { children: "Touched" })
|
|
2188
2211
|
] }) }), /* @__PURE__ */ S("tbody", { children: n.map((e) => /* @__PURE__ */ C("tr", { children: [
|
|
2189
|
-
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(
|
|
2190
|
-
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(
|
|
2212
|
+
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(Z, { ms: e.unix_ms }) }),
|
|
2213
|
+
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(Q, {
|
|
2191
2214
|
value: e.transaction_id,
|
|
2192
2215
|
length: 16
|
|
2193
2216
|
}) }),
|
|
@@ -2220,9 +2243,9 @@ function xt({ agent: e, onOpenRecord: t }) {
|
|
|
2220
2243
|
})]
|
|
2221
2244
|
})
|
|
2222
2245
|
] }, e.transaction_id)) })] })
|
|
2223
|
-
}) : /* @__PURE__ */ S(
|
|
2246
|
+
}) : /* @__PURE__ */ S(J, { children: "This agent has made no commit inside the instance's attribution window. That is not proof it has never written — it means nothing it wrote is still in the window." });
|
|
2224
2247
|
}
|
|
2225
|
-
function
|
|
2248
|
+
function Ct({ agent: e }) {
|
|
2226
2249
|
return /* @__PURE__ */ C(x, { children: [
|
|
2227
2250
|
/* @__PURE__ */ S("p", {
|
|
2228
2251
|
className: "cp-muted",
|
|
@@ -2263,11 +2286,11 @@ function St({ agent: e }) {
|
|
|
2263
2286
|
})
|
|
2264
2287
|
] });
|
|
2265
2288
|
}
|
|
2266
|
-
function
|
|
2267
|
-
let { capabilities: t } =
|
|
2289
|
+
function wt({ agent: e }) {
|
|
2290
|
+
let { capabilities: t } = V();
|
|
2268
2291
|
return /* @__PURE__ */ C(x, { children: [
|
|
2269
2292
|
/* @__PURE__ */ S("h3", { children: "Sessions" }),
|
|
2270
|
-
e.doing.sessions.length === 0 ? /* @__PURE__ */ S(
|
|
2293
|
+
e.doing.sessions.length === 0 ? /* @__PURE__ */ S(J, { children: "No session has been opened for this agent." }) : /* @__PURE__ */ S("div", {
|
|
2271
2294
|
className: "table-shell",
|
|
2272
2295
|
children: /* @__PURE__ */ C("table", { children: [/* @__PURE__ */ S("thead", { children: /* @__PURE__ */ C("tr", { children: [
|
|
2273
2296
|
/* @__PURE__ */ S("th", { children: "Session" }),
|
|
@@ -2276,22 +2299,22 @@ function Ct({ agent: e }) {
|
|
|
2276
2299
|
/* @__PURE__ */ S("th", { children: "Started" }),
|
|
2277
2300
|
/* @__PURE__ */ S("th", { children: "Capabilities" })
|
|
2278
2301
|
] }) }), /* @__PURE__ */ S("tbody", { children: e.doing.sessions.map((e) => /* @__PURE__ */ C("tr", { children: [
|
|
2279
|
-
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(
|
|
2302
|
+
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(Q, {
|
|
2280
2303
|
value: e.session_id,
|
|
2281
2304
|
length: 18
|
|
2282
2305
|
}) }),
|
|
2283
|
-
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(
|
|
2284
|
-
/* @__PURE__ */ S("td", { children: e.worker_id ? /* @__PURE__ */ S(
|
|
2306
|
+
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(U, { status: String(e.status) }) }),
|
|
2307
|
+
/* @__PURE__ */ S("td", { children: e.worker_id ? /* @__PURE__ */ S(Q, { value: e.worker_id }) : /* @__PURE__ */ S("span", {
|
|
2285
2308
|
className: "cp-muted",
|
|
2286
2309
|
children: "unassigned"
|
|
2287
2310
|
}) }),
|
|
2288
|
-
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(
|
|
2311
|
+
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(Z, { ms: e.started_at ? e.started_at * 1e3 : null }) }),
|
|
2289
2312
|
/* @__PURE__ */ S("td", { children: e.capabilities.length })
|
|
2290
2313
|
] }, e.session_id)) })] })
|
|
2291
2314
|
}),
|
|
2292
2315
|
/* @__PURE__ */ S("h3", { children: "Durable work" }),
|
|
2293
|
-
t.usable("agents.work") ? /* @__PURE__ */ S(ct, { capability: "agents.task_context" }) : /* @__PURE__ */ S(
|
|
2294
|
-
e.doing.work.length === 0 ? /* @__PURE__ */ S(
|
|
2316
|
+
t.usable("agents.work") ? /* @__PURE__ */ S(ct, { capability: "agents.task_context" }) : /* @__PURE__ */ S(W, { capability: "agents.work" }),
|
|
2317
|
+
e.doing.work.length === 0 ? /* @__PURE__ */ S(J, { children: "No durable workload names this agent." }) : /* @__PURE__ */ S("div", {
|
|
2295
2318
|
className: "table-shell",
|
|
2296
2319
|
children: /* @__PURE__ */ C("table", { children: [/* @__PURE__ */ S("thead", { children: /* @__PURE__ */ C("tr", { children: [
|
|
2297
2320
|
/* @__PURE__ */ S("th", { children: "Workload" }),
|
|
@@ -2300,12 +2323,12 @@ function Ct({ agent: e }) {
|
|
|
2300
2323
|
/* @__PURE__ */ S("th", { children: "Attempts" }),
|
|
2301
2324
|
/* @__PURE__ */ S("th", { children: "Last failure" })
|
|
2302
2325
|
] }) }), /* @__PURE__ */ S("tbody", { children: e.doing.work.map((e) => /* @__PURE__ */ C("tr", { children: [
|
|
2303
|
-
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(
|
|
2326
|
+
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(Q, {
|
|
2304
2327
|
value: String(e.workload_id),
|
|
2305
2328
|
length: 18
|
|
2306
2329
|
}) }),
|
|
2307
2330
|
/* @__PURE__ */ S("td", { children: String(e.definition_id) }),
|
|
2308
|
-
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(
|
|
2331
|
+
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(U, { status: String(e.state) }) }),
|
|
2309
2332
|
/* @__PURE__ */ S("td", { children: String(e.attempts) }),
|
|
2310
2333
|
/* @__PURE__ */ S("td", { children: e.last_failure ? String(e.last_failure) : /* @__PURE__ */ S("span", {
|
|
2311
2334
|
className: "cp-muted",
|
|
@@ -2314,18 +2337,18 @@ function Ct({ agent: e }) {
|
|
|
2314
2337
|
] }, String(e.workload_id))) })] })
|
|
2315
2338
|
}),
|
|
2316
2339
|
/* @__PURE__ */ S("h3", { children: "Working with this agent" }),
|
|
2317
|
-
/* @__PURE__ */ S(
|
|
2340
|
+
/* @__PURE__ */ S(W, {
|
|
2318
2341
|
capability: "agents.work.review_gate",
|
|
2319
2342
|
title: "Reviewing an agent's changes before they apply"
|
|
2320
2343
|
})
|
|
2321
2344
|
] });
|
|
2322
2345
|
}
|
|
2323
|
-
function
|
|
2324
|
-
let [r, i] = v("access"), { capabilities: a } =
|
|
2346
|
+
function Tt({ agentId: e, onBack: t, onOpenRecord: n }) {
|
|
2347
|
+
let [r, i] = v("access"), { capabilities: a } = V(), { value: o, loading: s, error: c, refresh: l } = H((t) => t.agent(e), [e], {
|
|
2325
2348
|
refreshMs: 15e3,
|
|
2326
2349
|
subject: "this agent"
|
|
2327
2350
|
});
|
|
2328
|
-
return s && !o ? /* @__PURE__ */ S(
|
|
2351
|
+
return s && !o ? /* @__PURE__ */ S(K, { what: "the agent" }) : o ? /* @__PURE__ */ S(G, {
|
|
2329
2352
|
capability: "agents.identity",
|
|
2330
2353
|
children: /* @__PURE__ */ C("section", {
|
|
2331
2354
|
className: "cp-detail studio-card",
|
|
@@ -2341,18 +2364,18 @@ function wt({ agentId: e, onBack: t, onOpenRecord: n }) {
|
|
|
2341
2364
|
/* @__PURE__ */ C("p", {
|
|
2342
2365
|
className: "cp-muted",
|
|
2343
2366
|
children: [
|
|
2344
|
-
/* @__PURE__ */ S(
|
|
2367
|
+
/* @__PURE__ */ S(Q, {
|
|
2345
2368
|
value: o.identity.agent_id,
|
|
2346
2369
|
length: 24
|
|
2347
2370
|
}),
|
|
2348
2371
|
" · ",
|
|
2349
|
-
/* @__PURE__ */ S(
|
|
2372
|
+
/* @__PURE__ */ S(U, { status: String(o.identity.status) }),
|
|
2350
2373
|
" ·",
|
|
2351
2374
|
" ",
|
|
2352
2375
|
"registered by ",
|
|
2353
2376
|
o.identity.created_by,
|
|
2354
2377
|
" ",
|
|
2355
|
-
/* @__PURE__ */ S(
|
|
2378
|
+
/* @__PURE__ */ S(Z, { ms: o.identity.created_at * 1e3 })
|
|
2356
2379
|
]
|
|
2357
2380
|
}),
|
|
2358
2381
|
/* @__PURE__ */ C("p", {
|
|
@@ -2365,7 +2388,7 @@ function wt({ agentId: e, onBack: t, onOpenRecord: n }) {
|
|
|
2365
2388
|
" ·",
|
|
2366
2389
|
" ",
|
|
2367
2390
|
"contract ",
|
|
2368
|
-
/* @__PURE__ */ S(
|
|
2391
|
+
/* @__PURE__ */ S(Q, { value: o.identity.application_revision })
|
|
2369
2392
|
]
|
|
2370
2393
|
})
|
|
2371
2394
|
] }), /* @__PURE__ */ S("button", {
|
|
@@ -2377,25 +2400,25 @@ function wt({ agentId: e, onBack: t, onOpenRecord: n }) {
|
|
|
2377
2400
|
/* @__PURE__ */ C("div", {
|
|
2378
2401
|
className: "cp-stats",
|
|
2379
2402
|
children: [
|
|
2380
|
-
/* @__PURE__ */ S(
|
|
2403
|
+
/* @__PURE__ */ S(Y, {
|
|
2381
2404
|
label: "Recent commits",
|
|
2382
2405
|
value: o.did.transactions.length
|
|
2383
2406
|
}),
|
|
2384
|
-
/* @__PURE__ */ S(
|
|
2407
|
+
/* @__PURE__ */ S(Y, {
|
|
2385
2408
|
label: "Records changed",
|
|
2386
2409
|
value: o.did.records_changed
|
|
2387
2410
|
}),
|
|
2388
|
-
/* @__PURE__ */ S(
|
|
2411
|
+
/* @__PURE__ */ S(Y, {
|
|
2389
2412
|
label: "Sessions",
|
|
2390
2413
|
value: o.doing.sessions.length
|
|
2391
2414
|
}),
|
|
2392
|
-
/* @__PURE__ */ S(
|
|
2415
|
+
/* @__PURE__ */ S(Y, {
|
|
2393
2416
|
label: "Last activity",
|
|
2394
2417
|
value: o.did.last_activity_ms ? new Date(o.did.last_activity_ms).toLocaleString() : void 0
|
|
2395
2418
|
})
|
|
2396
2419
|
]
|
|
2397
2420
|
}),
|
|
2398
|
-
/* @__PURE__ */ C(
|
|
2421
|
+
/* @__PURE__ */ C(ut, {
|
|
2399
2422
|
label: "Agent sections",
|
|
2400
2423
|
active: r,
|
|
2401
2424
|
onSelect: i,
|
|
@@ -2418,16 +2441,16 @@ function wt({ agentId: e, onBack: t, onOpenRecord: n }) {
|
|
|
2418
2441
|
}
|
|
2419
2442
|
],
|
|
2420
2443
|
children: [
|
|
2421
|
-
r === "access" && /* @__PURE__ */ S(
|
|
2422
|
-
r === "did" && /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(ct, { capability: "provenance.transactions" }), /* @__PURE__ */ S(
|
|
2444
|
+
r === "access" && /* @__PURE__ */ S(Ct, { agent: o }),
|
|
2445
|
+
r === "did" && /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(ct, { capability: "provenance.transactions" }), /* @__PURE__ */ S(St, {
|
|
2423
2446
|
agent: o,
|
|
2424
2447
|
onOpenRecord: n
|
|
2425
2448
|
})] }),
|
|
2426
|
-
r === "doing" && /* @__PURE__ */ S(
|
|
2449
|
+
r === "doing" && /* @__PURE__ */ S(G, {
|
|
2427
2450
|
capability: "agents.sessions",
|
|
2428
|
-
children: /* @__PURE__ */ S(
|
|
2451
|
+
children: /* @__PURE__ */ S(wt, { agent: o })
|
|
2429
2452
|
}),
|
|
2430
|
-
r === "decisions" && (a.usable("agents.authorization_decisions") ? o.authorization_decisions.length === 0 ? /* @__PURE__ */ S(
|
|
2453
|
+
r === "decisions" && (a.usable("agents.authorization_decisions") ? o.authorization_decisions.length === 0 ? /* @__PURE__ */ S(J, { children: "No authorization decision has been recorded for this agent." }) : /* @__PURE__ */ S("div", {
|
|
2431
2454
|
className: "table-shell",
|
|
2432
2455
|
children: /* @__PURE__ */ C("table", { children: [/* @__PURE__ */ S("thead", { children: /* @__PURE__ */ C("tr", { children: [
|
|
2433
2456
|
/* @__PURE__ */ S("th", { children: "When" }),
|
|
@@ -2436,7 +2459,7 @@ function wt({ agentId: e, onBack: t, onOpenRecord: n }) {
|
|
|
2436
2459
|
/* @__PURE__ */ S("th", { children: "Capability" }),
|
|
2437
2460
|
/* @__PURE__ */ S("th", { children: "Decision" })
|
|
2438
2461
|
] }) }), /* @__PURE__ */ S("tbody", { children: o.authorization_decisions.map((e, t) => /* @__PURE__ */ C("tr", { children: [
|
|
2439
|
-
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(
|
|
2462
|
+
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(Z, { ms: e.at * 1e3 }) }),
|
|
2440
2463
|
/* @__PURE__ */ S("td", { children: e.event }),
|
|
2441
2464
|
/* @__PURE__ */ S("td", { children: e.actor }),
|
|
2442
2465
|
/* @__PURE__ */ S("td", { children: e.capability ? /* @__PURE__ */ S("code", { children: e.capability }) : /* @__PURE__ */ S("span", {
|
|
@@ -2446,27 +2469,27 @@ function wt({ agentId: e, onBack: t, onOpenRecord: n }) {
|
|
|
2446
2469
|
/* @__PURE__ */ S("td", { children: e.decision === null ? /* @__PURE__ */ S("span", {
|
|
2447
2470
|
className: "cp-muted",
|
|
2448
2471
|
children: "—"
|
|
2449
|
-
}) : /* @__PURE__ */ S(
|
|
2472
|
+
}) : /* @__PURE__ */ S(U, { status: e.decision ? "available" : "unsupported" }) })
|
|
2450
2473
|
] }, `${e.event}-${e.at}-${t}`)) })] })
|
|
2451
|
-
}) : /* @__PURE__ */ S(
|
|
2474
|
+
}) : /* @__PURE__ */ S(W, { capability: "agents.authorization_decisions" }))
|
|
2452
2475
|
]
|
|
2453
2476
|
})
|
|
2454
2477
|
]
|
|
2455
2478
|
})
|
|
2456
|
-
}) : /* @__PURE__ */ S(
|
|
2479
|
+
}) : /* @__PURE__ */ S(q, {
|
|
2457
2480
|
message: c,
|
|
2458
2481
|
onRetry: l
|
|
2459
2482
|
});
|
|
2460
2483
|
}
|
|
2461
|
-
function
|
|
2462
|
-
let { api: t, capabilities: n } =
|
|
2484
|
+
function Et({ onConnected: e }) {
|
|
2485
|
+
let { api: t, capabilities: n } = V(), [r, i] = v(""), [a, s] = v([]), [c, l] = v(!1), [u, d] = v(""), [f, p] = v(null), m = [
|
|
2463
2486
|
"state:read",
|
|
2464
2487
|
"state:write",
|
|
2465
2488
|
"events:read",
|
|
2466
2489
|
"workloads:execute",
|
|
2467
2490
|
"applications:read"
|
|
2468
2491
|
];
|
|
2469
|
-
if (!n.usable("agents.register")) return /* @__PURE__ */ S(
|
|
2492
|
+
if (!n.usable("agents.register")) return /* @__PURE__ */ S(W, { capability: "agents.register" });
|
|
2470
2493
|
let h = async () => {
|
|
2471
2494
|
l(!0), d("");
|
|
2472
2495
|
try {
|
|
@@ -2506,7 +2529,7 @@ function Tt({ onConnected: e }) {
|
|
|
2506
2529
|
onChange: (t) => s((n) => t.target.checked ? [...n, e] : n.filter((t) => t !== e))
|
|
2507
2530
|
}), /* @__PURE__ */ S("code", { children: e })]
|
|
2508
2531
|
}, e))] }),
|
|
2509
|
-
/* @__PURE__ */ S(
|
|
2532
|
+
/* @__PURE__ */ S(q, { message: u }),
|
|
2510
2533
|
/* @__PURE__ */ S("div", {
|
|
2511
2534
|
className: "cp-actions",
|
|
2512
2535
|
children: /* @__PURE__ */ S("button", {
|
|
@@ -2531,28 +2554,28 @@ function Tt({ onConnected: e }) {
|
|
|
2531
2554
|
]
|
|
2532
2555
|
});
|
|
2533
2556
|
}
|
|
2534
|
-
function
|
|
2535
|
-
let { capabilities: t } =
|
|
2557
|
+
function Dt({ onOpenRecord: e }) {
|
|
2558
|
+
let { capabilities: t } = V(), [n, r] = v(""), i = t.usable("agents.list"), { value: a, loading: o, error: s, refresh: c } = H((e) => e.agents(), [], {
|
|
2536
2559
|
enabled: i,
|
|
2537
2560
|
refreshMs: 2e4,
|
|
2538
2561
|
subject: "agents"
|
|
2539
2562
|
});
|
|
2540
2563
|
return /* @__PURE__ */ C($, {
|
|
2541
|
-
eyebrow: "
|
|
2542
|
-
title: "
|
|
2543
|
-
description: "
|
|
2544
|
-
children: [/* @__PURE__ */ C(
|
|
2564
|
+
eyebrow: "Operate",
|
|
2565
|
+
title: "Agent principals",
|
|
2566
|
+
description: "The agents this instance has registered as principals: what each may do, what it has done, and what it is doing — read from the same durable state every other writer produces.",
|
|
2567
|
+
children: [/* @__PURE__ */ C(G, {
|
|
2545
2568
|
capability: "agents.list",
|
|
2546
|
-
children: [/* @__PURE__ */ S(
|
|
2569
|
+
children: [/* @__PURE__ */ S(q, {
|
|
2547
2570
|
message: s,
|
|
2548
2571
|
onRetry: c
|
|
2549
|
-
}), n ? /* @__PURE__ */ S(
|
|
2572
|
+
}), n ? /* @__PURE__ */ S(Tt, {
|
|
2550
2573
|
agentId: n,
|
|
2551
2574
|
onBack: () => r(""),
|
|
2552
2575
|
onOpenRecord: e
|
|
2553
2576
|
}) : /* @__PURE__ */ C(x, { children: [
|
|
2554
|
-
o && !a && /* @__PURE__ */ S(
|
|
2555
|
-
a && (a.agents.length === 0 ? /* @__PURE__ */ S(
|
|
2577
|
+
o && !a && /* @__PURE__ */ S(K, { what: "agents" }),
|
|
2578
|
+
a && (a.agents.length === 0 ? /* @__PURE__ */ S(J, { children: "No agent is registered against this application yet." }) : /* @__PURE__ */ S("div", {
|
|
2556
2579
|
className: "cp-cards",
|
|
2557
2580
|
children: a.agents.map((e) => /* @__PURE__ */ C("button", {
|
|
2558
2581
|
className: "studio-card cp-agent-card",
|
|
@@ -2566,26 +2589,26 @@ function Et({ onOpenRecord: e }) {
|
|
|
2566
2589
|
/* @__PURE__ */ C("p", {
|
|
2567
2590
|
className: "cp-muted",
|
|
2568
2591
|
children: [
|
|
2569
|
-
/* @__PURE__ */ S(
|
|
2592
|
+
/* @__PURE__ */ S(Q, {
|
|
2570
2593
|
value: e.agent_id,
|
|
2571
2594
|
length: 20
|
|
2572
2595
|
}),
|
|
2573
2596
|
" · ",
|
|
2574
|
-
/* @__PURE__ */ S(
|
|
2597
|
+
/* @__PURE__ */ S(U, { status: String(e.status) })
|
|
2575
2598
|
]
|
|
2576
2599
|
}),
|
|
2577
2600
|
/* @__PURE__ */ C("div", {
|
|
2578
2601
|
className: "cp-stats",
|
|
2579
2602
|
children: [
|
|
2580
|
-
/* @__PURE__ */ S(
|
|
2603
|
+
/* @__PURE__ */ S(Y, {
|
|
2581
2604
|
label: "Sessions running",
|
|
2582
2605
|
value: e.sessions.running
|
|
2583
2606
|
}),
|
|
2584
|
-
/* @__PURE__ */ S(
|
|
2607
|
+
/* @__PURE__ */ S(Y, {
|
|
2585
2608
|
label: "Recent commits",
|
|
2586
2609
|
value: e.activity.recent_transactions
|
|
2587
2610
|
}),
|
|
2588
|
-
/* @__PURE__ */ S(
|
|
2611
|
+
/* @__PURE__ */ S(Y, {
|
|
2589
2612
|
label: "Records changed",
|
|
2590
2613
|
value: e.activity.records_changed
|
|
2591
2614
|
})
|
|
@@ -2600,12 +2623,12 @@ function Et({ onOpenRecord: e }) {
|
|
|
2600
2623
|
}),
|
|
2601
2624
|
/* @__PURE__ */ C("p", {
|
|
2602
2625
|
className: "cp-muted",
|
|
2603
|
-
children: ["Last activity ", /* @__PURE__ */ S(
|
|
2626
|
+
children: ["Last activity ", /* @__PURE__ */ S(Z, { ms: e.activity.last_activity_ms })]
|
|
2604
2627
|
})
|
|
2605
2628
|
]
|
|
2606
2629
|
}, e.agent_id))
|
|
2607
2630
|
})),
|
|
2608
|
-
/* @__PURE__ */ S(
|
|
2631
|
+
/* @__PURE__ */ S(Et, { onConnected: c })
|
|
2609
2632
|
] })]
|
|
2610
2633
|
}), !i && /* @__PURE__ */ C("p", {
|
|
2611
2634
|
className: "cp-muted",
|
|
@@ -2634,14 +2657,14 @@ function Et({ onOpenRecord: e }) {
|
|
|
2634
2657
|
}
|
|
2635
2658
|
//#endregion
|
|
2636
2659
|
//#region src/control-plane/State.tsx
|
|
2637
|
-
function
|
|
2638
|
-
let { value: e, loading: t, refresh: n } =
|
|
2660
|
+
function Ot() {
|
|
2661
|
+
let { value: e, loading: t, refresh: n } = H((e) => e.overview().then((e) => e.authority_state), [], {
|
|
2639
2662
|
refreshMs: 1e4,
|
|
2640
2663
|
subject: "the authority state summary"
|
|
2641
2664
|
});
|
|
2642
2665
|
return t && !e ? /* @__PURE__ */ S("section", {
|
|
2643
2666
|
className: "studio-card",
|
|
2644
|
-
children: /* @__PURE__ */ S(
|
|
2667
|
+
children: /* @__PURE__ */ S(K, { what: "state" })
|
|
2645
2668
|
}) : e ? /* @__PURE__ */ C("section", {
|
|
2646
2669
|
className: "studio-card",
|
|
2647
2670
|
"aria-label": "Authority state summary",
|
|
@@ -2653,19 +2676,19 @@ function Dt() {
|
|
|
2653
2676
|
/* @__PURE__ */ C("div", {
|
|
2654
2677
|
className: "cp-stats",
|
|
2655
2678
|
children: [
|
|
2656
|
-
/* @__PURE__ */ S(
|
|
2679
|
+
/* @__PURE__ */ S(Y, {
|
|
2657
2680
|
label: "Current sequence",
|
|
2658
2681
|
value: e.current_sequence
|
|
2659
2682
|
}),
|
|
2660
|
-
/* @__PURE__ */ S(
|
|
2683
|
+
/* @__PURE__ */ S(Y, {
|
|
2661
2684
|
label: "Records",
|
|
2662
2685
|
value: e.records
|
|
2663
2686
|
}),
|
|
2664
|
-
/* @__PURE__ */ S(
|
|
2687
|
+
/* @__PURE__ */ S(Y, {
|
|
2665
2688
|
label: "Events",
|
|
2666
2689
|
value: e.events
|
|
2667
2690
|
}),
|
|
2668
|
-
/* @__PURE__ */ S(
|
|
2691
|
+
/* @__PURE__ */ S(Y, {
|
|
2669
2692
|
label: "Collections with state",
|
|
2670
2693
|
value: e.collections.length
|
|
2671
2694
|
})
|
|
@@ -2694,7 +2717,7 @@ function Dt() {
|
|
|
2694
2717
|
]
|
|
2695
2718
|
});
|
|
2696
2719
|
}
|
|
2697
|
-
function
|
|
2720
|
+
function kt({ revisions: e, selected: t, onToggle: n }) {
|
|
2698
2721
|
return /* @__PURE__ */ S("div", {
|
|
2699
2722
|
className: "table-shell",
|
|
2700
2723
|
children: /* @__PURE__ */ C("table", { children: [/* @__PURE__ */ S("thead", { children: /* @__PURE__ */ C("tr", { children: [
|
|
@@ -2714,21 +2737,21 @@ function Ot({ revisions: e, selected: t, onToggle: n }) {
|
|
|
2714
2737
|
onChange: () => n(e.state_id)
|
|
2715
2738
|
}) }),
|
|
2716
2739
|
/* @__PURE__ */ S("td", { children: e.sequence }),
|
|
2717
|
-
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(
|
|
2740
|
+
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(Q, {
|
|
2718
2741
|
value: e.state_id,
|
|
2719
2742
|
length: 16
|
|
2720
2743
|
}) }),
|
|
2721
|
-
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(
|
|
2744
|
+
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(Q, {
|
|
2722
2745
|
value: e.parent_id,
|
|
2723
2746
|
length: 16
|
|
2724
2747
|
}) }),
|
|
2725
2748
|
/* @__PURE__ */ S("td", { children: e.authority }),
|
|
2726
|
-
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(
|
|
2749
|
+
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(Z, { ms: e.timestamp_ms }) })
|
|
2727
2750
|
]
|
|
2728
2751
|
}, e.state_id)) })] })
|
|
2729
2752
|
});
|
|
2730
2753
|
}
|
|
2731
|
-
function
|
|
2754
|
+
function At({ diff: e }) {
|
|
2732
2755
|
return /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C("p", {
|
|
2733
2756
|
className: "cp-muted",
|
|
2734
2757
|
children: [
|
|
@@ -2738,7 +2761,7 @@ function kt({ diff: e }) {
|
|
|
2738
2761
|
" · ",
|
|
2739
2762
|
e.relationship === "parent" ? "one step in this resource’s history" : e.relationship === "same-resource" ? "two points in one resource’s history" : "two different resources"
|
|
2740
2763
|
]
|
|
2741
|
-
}), e.changes.length === 0 ? /* @__PURE__ */ S(
|
|
2764
|
+
}), e.changes.length === 0 ? /* @__PURE__ */ S(J, { children: "These two revisions hold the same content." }) : /* @__PURE__ */ S("div", {
|
|
2742
2765
|
className: "table-shell",
|
|
2743
2766
|
children: /* @__PURE__ */ C("table", { children: [/* @__PURE__ */ S("thead", { children: /* @__PURE__ */ C("tr", { children: [
|
|
2744
2767
|
/* @__PURE__ */ S("th", { children: "Path" }),
|
|
@@ -2747,7 +2770,7 @@ function kt({ diff: e }) {
|
|
|
2747
2770
|
/* @__PURE__ */ S("th", { children: "To" })
|
|
2748
2771
|
] }) }), /* @__PURE__ */ S("tbody", { children: e.changes.map((e) => /* @__PURE__ */ C("tr", { children: [
|
|
2749
2772
|
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(lt, { path: e.path }) }),
|
|
2750
|
-
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(
|
|
2773
|
+
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(U, { status: e.kind }) }),
|
|
2751
2774
|
/* @__PURE__ */ S("td", {
|
|
2752
2775
|
className: "cp-value-old",
|
|
2753
2776
|
children: e.old_value === void 0 || e.old_value === null ? /* @__PURE__ */ S("span", {
|
|
@@ -2765,12 +2788,12 @@ function kt({ diff: e }) {
|
|
|
2765
2788
|
] }, s(e.path))) })] })
|
|
2766
2789
|
})] });
|
|
2767
2790
|
}
|
|
2768
|
-
function
|
|
2791
|
+
function jt({ classification: e }) {
|
|
2769
2792
|
return /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C("p", {
|
|
2770
2793
|
className: "cp-attribution",
|
|
2771
2794
|
children: [
|
|
2772
2795
|
"Overall: ",
|
|
2773
|
-
/* @__PURE__ */ S(
|
|
2796
|
+
/* @__PURE__ */ S(U, { status: e.overall }),
|
|
2774
2797
|
e.overall === "independent" && " — both branches’ changes can be applied without either overwriting the other.",
|
|
2775
2798
|
e.overall === "convergent" && " — the branches reached the same result.",
|
|
2776
2799
|
e.overall === "conflict" && " — at least one path cannot take both branches. Reconciliation needs an explicit decision there."
|
|
@@ -2787,7 +2810,7 @@ function At({ classification: e }) {
|
|
|
2787
2810
|
className: e.classification === "conflict" ? "cp-row-conflict" : "",
|
|
2788
2811
|
children: [
|
|
2789
2812
|
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(lt, { path: e.path }) }),
|
|
2790
|
-
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(
|
|
2813
|
+
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(U, { status: e.classification }) }),
|
|
2791
2814
|
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S("code", { children: JSON.stringify(e.base_value ?? null) }) }),
|
|
2792
2815
|
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S("code", { children: JSON.stringify(e.left_value ?? null) }) }),
|
|
2793
2816
|
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S("code", { children: JSON.stringify(e.right_value ?? null) }) })
|
|
@@ -2795,9 +2818,9 @@ function At({ classification: e }) {
|
|
|
2795
2818
|
}, s(e.path))) })] })
|
|
2796
2819
|
})] });
|
|
2797
2820
|
}
|
|
2798
|
-
var
|
|
2799
|
-
function
|
|
2800
|
-
let t = ue("feltdb.revision.integrity_verified", e.integrity_verified, [
|
|
2821
|
+
var Mt = "Content matches revision id";
|
|
2822
|
+
function Nt({ revision: e }) {
|
|
2823
|
+
let t = ue("feltdb.revision.integrity_verified", e.integrity_verified, [Mt]);
|
|
2801
2824
|
return /* @__PURE__ */ C("div", {
|
|
2802
2825
|
className: "studio-card cp-committed",
|
|
2803
2826
|
"data-committed-revision": String(e.state_id),
|
|
@@ -2808,7 +2831,7 @@ function Mt({ revision: e }) {
|
|
|
2808
2831
|
}),
|
|
2809
2832
|
/* @__PURE__ */ C("p", { children: [
|
|
2810
2833
|
"Revision ",
|
|
2811
|
-
/* @__PURE__ */ S(
|
|
2834
|
+
/* @__PURE__ */ S(Q, {
|
|
2812
2835
|
value: String(e.state_id),
|
|
2813
2836
|
length: 20
|
|
2814
2837
|
}),
|
|
@@ -2817,10 +2840,10 @@ function Mt({ revision: e }) {
|
|
|
2817
2840
|
", authored by ",
|
|
2818
2841
|
/* @__PURE__ */ S("strong", { children: String(e.authority) }),
|
|
2819
2842
|
", parent ",
|
|
2820
|
-
/* @__PURE__ */ S(
|
|
2843
|
+
/* @__PURE__ */ S(Q, { value: String(e.parent_id) }),
|
|
2821
2844
|
"."
|
|
2822
2845
|
] }),
|
|
2823
|
-
/* @__PURE__ */ S(
|
|
2846
|
+
/* @__PURE__ */ S(qe, {
|
|
2824
2847
|
state: t.state,
|
|
2825
2848
|
checks: t.checks,
|
|
2826
2849
|
attrs: { "data-integrity": t.state }
|
|
@@ -2828,8 +2851,8 @@ function Mt({ revision: e }) {
|
|
|
2828
2851
|
]
|
|
2829
2852
|
});
|
|
2830
2853
|
}
|
|
2831
|
-
function
|
|
2832
|
-
let { api: i } =
|
|
2854
|
+
function Pt({ base: e, left: t, right: n, onCommitted: r }) {
|
|
2855
|
+
let { api: i } = V(), [a, c] = v("left"), [l, u] = v([]), [d, f] = v(null), [p, m] = v(null), [h, g] = v(""), [_, y] = v(!1), b = () => ({
|
|
2833
2856
|
base: e,
|
|
2834
2857
|
left: t,
|
|
2835
2858
|
right: n,
|
|
@@ -2897,7 +2920,7 @@ function Nt({ base: e, left: t, right: n, onCommitted: r }) {
|
|
|
2897
2920
|
"Start from ",
|
|
2898
2921
|
/* @__PURE__ */ S("strong", { children: e }),
|
|
2899
2922
|
" ",
|
|
2900
|
-
/* @__PURE__ */ S(
|
|
2923
|
+
/* @__PURE__ */ S(Q, { value: e === "left" ? t : n })
|
|
2901
2924
|
]
|
|
2902
2925
|
}, e))
|
|
2903
2926
|
}),
|
|
@@ -2912,7 +2935,7 @@ function Nt({ base: e, left: t, right: n, onCommitted: r }) {
|
|
|
2912
2935
|
} : n))
|
|
2913
2936
|
})] }, s(e.path)))]
|
|
2914
2937
|
}),
|
|
2915
|
-
/* @__PURE__ */ S(
|
|
2938
|
+
/* @__PURE__ */ S(q, { message: h }),
|
|
2916
2939
|
/* @__PURE__ */ C("div", {
|
|
2917
2940
|
className: "cp-actions",
|
|
2918
2941
|
children: [/* @__PURE__ */ S("button", {
|
|
@@ -2937,15 +2960,15 @@ function Nt({ base: e, left: t, right: n, onCommitted: r }) {
|
|
|
2937
2960
|
/* @__PURE__ */ C("div", {
|
|
2938
2961
|
className: "cp-stats",
|
|
2939
2962
|
children: [
|
|
2940
|
-
/* @__PURE__ */ S(
|
|
2963
|
+
/* @__PURE__ */ S(Y, {
|
|
2941
2964
|
label: "Content identity",
|
|
2942
2965
|
value: `${d.preview.content_id.slice(0, 12)}…`
|
|
2943
2966
|
}),
|
|
2944
|
-
/* @__PURE__ */ S(
|
|
2967
|
+
/* @__PURE__ */ S(Y, {
|
|
2945
2968
|
label: "Parent",
|
|
2946
2969
|
value: `#${d.preview.parent.sequence}`
|
|
2947
2970
|
}),
|
|
2948
|
-
/* @__PURE__ */ S(
|
|
2971
|
+
/* @__PURE__ */ S(Y, {
|
|
2949
2972
|
label: "Undecided conflicts",
|
|
2950
2973
|
value: d.unresolved.length
|
|
2951
2974
|
})
|
|
@@ -2963,21 +2986,21 @@ function Nt({ base: e, left: t, right: n, onCommitted: r }) {
|
|
|
2963
2986
|
". Committing now takes the chosen branch\\u2019s value there."
|
|
2964
2987
|
]
|
|
2965
2988
|
}),
|
|
2966
|
-
/* @__PURE__ */ S(
|
|
2989
|
+
/* @__PURE__ */ S(X, { value: d.preview.content })
|
|
2967
2990
|
]
|
|
2968
2991
|
}),
|
|
2969
|
-
p && /* @__PURE__ */ S(
|
|
2992
|
+
p && /* @__PURE__ */ S(Nt, { revision: p })
|
|
2970
2993
|
]
|
|
2971
2994
|
});
|
|
2972
2995
|
}
|
|
2973
|
-
function
|
|
2974
|
-
let { api: e, capabilities: t } =
|
|
2996
|
+
function Ft() {
|
|
2997
|
+
let { api: e, capabilities: t } = V(), [n, r] = v(""), [i, a] = v(""), [s, c] = v([]), [l, u] = v("history"), [d, f] = v(null), [p, m] = v(null), [h, g] = v(""), [_, y] = v(0), { value: b, loading: w, error: ee, refresh: T } = H((e) => e.stateResources({
|
|
2975
2998
|
prefix: n,
|
|
2976
2999
|
limit: 200
|
|
2977
3000
|
}), [n, _], {
|
|
2978
3001
|
enabled: t.usable("state.resources.list"),
|
|
2979
3002
|
subject: "state resources"
|
|
2980
|
-
}), { value: E, loading: D, refresh: O } =
|
|
3003
|
+
}), { value: E, loading: D, refresh: O } = H((e) => e.stateHistory(i), [i, _], {
|
|
2981
3004
|
enabled: !!i,
|
|
2982
3005
|
subject: "this resource’s history"
|
|
2983
3006
|
}), k = (e) => c((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e].slice(-3)), A = async () => {
|
|
@@ -2999,7 +3022,7 @@ function Pt() {
|
|
|
2999
3022
|
eyebrow: "State",
|
|
3000
3023
|
title: "State",
|
|
3001
3024
|
description: "What changed, who changed it, what state it came from, why two states conflict, and what reconciliation would do.",
|
|
3002
|
-
children: [/* @__PURE__ */ S(
|
|
3025
|
+
children: [/* @__PURE__ */ S(Ot, {}), /* @__PURE__ */ S(G, {
|
|
3003
3026
|
capability: "state.history",
|
|
3004
3027
|
children: /* @__PURE__ */ C("div", {
|
|
3005
3028
|
className: "data-layout",
|
|
@@ -3008,7 +3031,7 @@ function Pt() {
|
|
|
3008
3031
|
children: [/* @__PURE__ */ S("span", {
|
|
3009
3032
|
className: "card-kind",
|
|
3010
3033
|
children: "Resources"
|
|
3011
|
-
}), /* @__PURE__ */ C(
|
|
3034
|
+
}), /* @__PURE__ */ C(G, {
|
|
3012
3035
|
capability: "state.resources.list",
|
|
3013
3036
|
children: [
|
|
3014
3037
|
/* @__PURE__ */ S("input", {
|
|
@@ -3017,8 +3040,8 @@ function Pt() {
|
|
|
3017
3040
|
onChange: (e) => r(e.target.value),
|
|
3018
3041
|
placeholder: "Filter by prefix…"
|
|
3019
3042
|
}),
|
|
3020
|
-
w && !b && /* @__PURE__ */ S(
|
|
3021
|
-
b && (b.resources.length === 0 ? /* @__PURE__ */ C(
|
|
3043
|
+
w && !b && /* @__PURE__ */ S(K, { what: "resources" }),
|
|
3044
|
+
b && (b.resources.length === 0 ? /* @__PURE__ */ C(J, { children: [
|
|
3022
3045
|
"No resource in this instance has revision history",
|
|
3023
3046
|
n ? ` under “${n}”` : "",
|
|
3024
3047
|
"."
|
|
@@ -3033,7 +3056,7 @@ function Pt() {
|
|
|
3033
3056
|
e.head ? ` · head #${e.head.sequence}` : ""
|
|
3034
3057
|
] })]
|
|
3035
3058
|
}, e.resource))),
|
|
3036
|
-
/* @__PURE__ */ S(
|
|
3059
|
+
/* @__PURE__ */ S(q, {
|
|
3037
3060
|
message: ee,
|
|
3038
3061
|
onRetry: T
|
|
3039
3062
|
})
|
|
@@ -3085,8 +3108,8 @@ function Pt() {
|
|
|
3085
3108
|
className: "cp-muted",
|
|
3086
3109
|
children: "Select two revisions to diff them, or three — base, left, right, in selection order — to classify how two branches interact and to reconcile them."
|
|
3087
3110
|
}),
|
|
3088
|
-
/* @__PURE__ */ S(
|
|
3089
|
-
/* @__PURE__ */ C(
|
|
3111
|
+
/* @__PURE__ */ S(q, { message: h }),
|
|
3112
|
+
/* @__PURE__ */ C(ut, {
|
|
3090
3113
|
label: "History views",
|
|
3091
3114
|
active: l,
|
|
3092
3115
|
onSelect: u,
|
|
@@ -3109,25 +3132,25 @@ function Pt() {
|
|
|
3109
3132
|
}
|
|
3110
3133
|
],
|
|
3111
3134
|
children: [
|
|
3112
|
-
l === "history" && t.status("state.branch.heads") === "unsupported" && /* @__PURE__ */ S(
|
|
3113
|
-
l === "history" && (D && !E ? /* @__PURE__ */ S(
|
|
3135
|
+
l === "history" && t.status("state.branch.heads") === "unsupported" && /* @__PURE__ */ S(W, { capability: "state.branch.heads" }),
|
|
3136
|
+
l === "history" && (D && !E ? /* @__PURE__ */ S(K, { what: "history" }) : E && /* @__PURE__ */ S(kt, {
|
|
3114
3137
|
revisions: E.revisions,
|
|
3115
3138
|
selected: s,
|
|
3116
3139
|
onToggle: k
|
|
3117
3140
|
})),
|
|
3118
|
-
l === "diff" && /* @__PURE__ */ S(
|
|
3141
|
+
l === "diff" && /* @__PURE__ */ S(G, {
|
|
3119
3142
|
capability: "state.diff.semantic",
|
|
3120
|
-
children: d ? /* @__PURE__ */ S(
|
|
3143
|
+
children: d ? /* @__PURE__ */ S(At, { diff: d }) : /* @__PURE__ */ S(J, { children: "Select two revisions and press “Diff 2 selected”." })
|
|
3121
3144
|
}),
|
|
3122
|
-
l === "conflicts" && /* @__PURE__ */ S(
|
|
3145
|
+
l === "conflicts" && /* @__PURE__ */ S(G, {
|
|
3123
3146
|
capability: "state.conflict.classify",
|
|
3124
|
-
children: p ? /* @__PURE__ */ S(
|
|
3147
|
+
children: p ? /* @__PURE__ */ S(jt, { classification: p }) : /* @__PURE__ */ S(J, { children: "Select three revisions — base, left, right — and press “Classify 3 selected”." })
|
|
3125
3148
|
}),
|
|
3126
|
-
l === "reconcile" && /* @__PURE__ */ S(
|
|
3149
|
+
l === "reconcile" && /* @__PURE__ */ S(G, {
|
|
3127
3150
|
capability: "state.reconciliation.execute",
|
|
3128
|
-
children: s.length === 3 ? /* @__PURE__ */ S(
|
|
3151
|
+
children: s.length === 3 ? /* @__PURE__ */ S(G, {
|
|
3129
3152
|
capability: "state.reconciliation.plan",
|
|
3130
|
-
children: /* @__PURE__ */ S(
|
|
3153
|
+
children: /* @__PURE__ */ S(Pt, {
|
|
3131
3154
|
base: s[0],
|
|
3132
3155
|
left: s[1],
|
|
3133
3156
|
right: s[2],
|
|
@@ -3135,11 +3158,11 @@ function Pt() {
|
|
|
3135
3158
|
y((e) => e + 1), O();
|
|
3136
3159
|
}
|
|
3137
3160
|
})
|
|
3138
|
-
}) : /* @__PURE__ */ S(
|
|
3161
|
+
}) : /* @__PURE__ */ S(J, { children: "Reconciliation needs three revisions: a common ancestor and the two branches to reconcile." })
|
|
3139
3162
|
})
|
|
3140
3163
|
]
|
|
3141
3164
|
})
|
|
3142
|
-
] }) : /* @__PURE__ */ S(
|
|
3165
|
+
] }) : /* @__PURE__ */ S(J, { children: "Select a resource to see its history." })
|
|
3143
3166
|
})]
|
|
3144
3167
|
})
|
|
3145
3168
|
})]
|
|
@@ -3147,22 +3170,23 @@ function Pt() {
|
|
|
3147
3170
|
}
|
|
3148
3171
|
//#endregion
|
|
3149
3172
|
//#region src/control-plane/Operations.tsx
|
|
3150
|
-
function
|
|
3173
|
+
function It(e, t, n) {
|
|
3151
3174
|
return e ? "loading" : t ? "connection-failure" : n === "unsupported" ? "unsupported" : "supported";
|
|
3152
3175
|
}
|
|
3153
|
-
function
|
|
3176
|
+
function Lt({ reason: e } = {}) {
|
|
3154
3177
|
return /* @__PURE__ */ C("section", {
|
|
3155
3178
|
className: "cp-unavailable",
|
|
3156
3179
|
role: "note",
|
|
3157
3180
|
children: [
|
|
3158
3181
|
/* @__PURE__ */ S("h3", { children: "Not available" }),
|
|
3159
3182
|
/* @__PURE__ */ S("p", { children: "Transaction observability isn't available from this FeltDB runtime." }),
|
|
3183
|
+
e && /* @__PURE__ */ S("p", { children: e }),
|
|
3160
3184
|
/* @__PURE__ */ S("p", { children: "This does not affect the application's ability to run." })
|
|
3161
3185
|
]
|
|
3162
3186
|
});
|
|
3163
3187
|
}
|
|
3164
|
-
function
|
|
3165
|
-
let { value: n, loading: r, error: i, refresh: a } =
|
|
3188
|
+
function Rt({ transactionId: e, onClose: t }) {
|
|
3189
|
+
let { value: n, loading: r, error: i, refresh: a } = H((t) => t.transaction(e), [e], { subject: "this transaction" });
|
|
3166
3190
|
return /* @__PURE__ */ C("section", {
|
|
3167
3191
|
className: "cp-detail studio-card",
|
|
3168
3192
|
children: [
|
|
@@ -3171,7 +3195,7 @@ function Lt({ transactionId: e, onClose: t }) {
|
|
|
3171
3195
|
children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("span", {
|
|
3172
3196
|
className: "card-kind",
|
|
3173
3197
|
children: "transaction"
|
|
3174
|
-
}), /* @__PURE__ */ S("h2", { children: /* @__PURE__ */ S(
|
|
3198
|
+
}), /* @__PURE__ */ S("h2", { children: /* @__PURE__ */ S(Q, {
|
|
3175
3199
|
value: e,
|
|
3176
3200
|
length: 32
|
|
3177
3201
|
}) })] }), /* @__PURE__ */ S("button", {
|
|
@@ -3181,8 +3205,8 @@ function Lt({ transactionId: e, onClose: t }) {
|
|
|
3181
3205
|
children: "×"
|
|
3182
3206
|
})]
|
|
3183
3207
|
}),
|
|
3184
|
-
r && !n && /* @__PURE__ */ S(
|
|
3185
|
-
/* @__PURE__ */ S(
|
|
3208
|
+
r && !n && /* @__PURE__ */ S(K, { what: "the transaction" }),
|
|
3209
|
+
/* @__PURE__ */ S(q, {
|
|
3186
3210
|
message: i,
|
|
3187
3211
|
onRetry: a
|
|
3188
3212
|
}),
|
|
@@ -3190,20 +3214,20 @@ function Lt({ transactionId: e, onClose: t }) {
|
|
|
3190
3214
|
/* @__PURE__ */ C("div", {
|
|
3191
3215
|
className: "cp-stats",
|
|
3192
3216
|
children: [
|
|
3193
|
-
/* @__PURE__ */ S(
|
|
3217
|
+
/* @__PURE__ */ S(Y, {
|
|
3194
3218
|
label: "Applied",
|
|
3195
3219
|
value: n.applied ? "Yes" : "No"
|
|
3196
3220
|
}),
|
|
3197
|
-
/* @__PURE__ */ S(
|
|
3221
|
+
/* @__PURE__ */ S(Y, {
|
|
3198
3222
|
label: "Attribution held",
|
|
3199
3223
|
value: n.attribution_available ? "Yes" : "No",
|
|
3200
3224
|
hint: "Whether this commit is still inside the instance's bounded attribution window."
|
|
3201
3225
|
}),
|
|
3202
|
-
/* @__PURE__ */ S(
|
|
3226
|
+
/* @__PURE__ */ S(Y, {
|
|
3203
3227
|
label: "Actor",
|
|
3204
3228
|
value: n.attribution?.subject ?? void 0
|
|
3205
3229
|
}),
|
|
3206
|
-
/* @__PURE__ */ S(
|
|
3230
|
+
/* @__PURE__ */ S(Y, {
|
|
3207
3231
|
label: "Records",
|
|
3208
3232
|
value: n.attribution?.operations
|
|
3209
3233
|
})
|
|
@@ -3221,14 +3245,14 @@ function Lt({ transactionId: e, onClose: t }) {
|
|
|
3221
3245
|
]
|
|
3222
3246
|
});
|
|
3223
3247
|
}
|
|
3224
|
-
function
|
|
3225
|
-
let { capabilities: t } =
|
|
3248
|
+
function zt({ onOpenRecord: e }) {
|
|
3249
|
+
let { capabilities: t } = V(), [n, r] = v(""), [i, a] = v({
|
|
3226
3250
|
subject: "",
|
|
3227
3251
|
collection: ""
|
|
3228
3252
|
}), [{ subject: o, collection: s }, c] = v({
|
|
3229
3253
|
subject: "",
|
|
3230
3254
|
collection: ""
|
|
3231
|
-
}), l = JSON.stringify([o, s]), { value: u, loading: d, error: f, refresh: p } =
|
|
3255
|
+
}), l = JSON.stringify([o, s]), { value: u, loading: d, error: f, refresh: p } = H((e) => e.transactions({
|
|
3232
3256
|
subject: o || void 0,
|
|
3233
3257
|
collection: s || void 0,
|
|
3234
3258
|
limit: 100
|
|
@@ -3240,7 +3264,7 @@ function Rt({ onOpenRecord: e }) {
|
|
|
3240
3264
|
subject: "recent commits"
|
|
3241
3265
|
}), m = u?.request === l ? u : void 0;
|
|
3242
3266
|
return /* @__PURE__ */ C(x, { children: [
|
|
3243
|
-
/* @__PURE__ */ S(
|
|
3267
|
+
/* @__PURE__ */ S(nt, {
|
|
3244
3268
|
label: "Filter commits",
|
|
3245
3269
|
idPrefix: "commit-filter",
|
|
3246
3270
|
filters: [{
|
|
@@ -3293,7 +3317,7 @@ function Rt({ onOpenRecord: e }) {
|
|
|
3293
3317
|
"."
|
|
3294
3318
|
]
|
|
3295
3319
|
}),
|
|
3296
|
-
/* @__PURE__ */ S(
|
|
3320
|
+
/* @__PURE__ */ S(tt, {
|
|
3297
3321
|
label: "Recent commits",
|
|
3298
3322
|
loading: !f && (d || !m),
|
|
3299
3323
|
loadingWhat: "commits",
|
|
@@ -3337,7 +3361,7 @@ function Rt({ onOpenRecord: e }) {
|
|
|
3337
3361
|
selected: t.transaction_id === n,
|
|
3338
3362
|
attrs: { "data-transaction": t.transaction_id },
|
|
3339
3363
|
cells: {
|
|
3340
|
-
when: /* @__PURE__ */ S(
|
|
3364
|
+
when: /* @__PURE__ */ S(Z, { ms: t.unix_ms }),
|
|
3341
3365
|
actor: t.subject ? /* @__PURE__ */ S("strong", { children: t.subject }) : /* @__PURE__ */ S("span", {
|
|
3342
3366
|
className: "cp-muted",
|
|
3343
3367
|
children: "unnamed"
|
|
@@ -3346,7 +3370,7 @@ function Rt({ onOpenRecord: e }) {
|
|
|
3346
3370
|
transaction: /* @__PURE__ */ S("button", {
|
|
3347
3371
|
className: "record-link",
|
|
3348
3372
|
onClick: () => r(t.transaction_id),
|
|
3349
|
-
children: /* @__PURE__ */ S(
|
|
3373
|
+
children: /* @__PURE__ */ S(Q, {
|
|
3350
3374
|
value: t.transaction_id,
|
|
3351
3375
|
length: 16
|
|
3352
3376
|
})
|
|
@@ -3386,14 +3410,14 @@ function Rt({ onOpenRecord: e }) {
|
|
|
3386
3410
|
className: "cp-muted",
|
|
3387
3411
|
children: t.note("operations.correlation_id")
|
|
3388
3412
|
}),
|
|
3389
|
-
n && t.usable("operations.transaction_status") && /* @__PURE__ */ S(
|
|
3413
|
+
n && t.usable("operations.transaction_status") && /* @__PURE__ */ S(Rt, {
|
|
3390
3414
|
transactionId: n,
|
|
3391
3415
|
onClose: () => r("")
|
|
3392
3416
|
})
|
|
3393
3417
|
] });
|
|
3394
3418
|
}
|
|
3395
|
-
function
|
|
3396
|
-
let [e, t] = v(""), [n, r] = v(""), { value: i, loading: a, error: o, refresh: s } =
|
|
3419
|
+
function Bt() {
|
|
3420
|
+
let [e, t] = v(""), [n, r] = v(""), { value: i, loading: a, error: o, refresh: s } = H((t) => t.operations({
|
|
3397
3421
|
collection: e || void 0,
|
|
3398
3422
|
kind: n || void 0,
|
|
3399
3423
|
limit: 100
|
|
@@ -3446,12 +3470,12 @@ function zt() {
|
|
|
3446
3470
|
className: "cp-muted",
|
|
3447
3471
|
children: i.retained.note
|
|
3448
3472
|
}),
|
|
3449
|
-
/* @__PURE__ */ S(
|
|
3473
|
+
/* @__PURE__ */ S(q, {
|
|
3450
3474
|
message: o,
|
|
3451
3475
|
onRetry: s
|
|
3452
3476
|
}),
|
|
3453
|
-
a && !i && /* @__PURE__ */ S(
|
|
3454
|
-
i && (i.operations.length === 0 ? /* @__PURE__ */ S(
|
|
3477
|
+
a && !i && /* @__PURE__ */ S(K, { what: "operations" }),
|
|
3478
|
+
i && (i.operations.length === 0 ? /* @__PURE__ */ S(J, { children: "No operation in the retained log matches." }) : /* @__PURE__ */ S("div", {
|
|
3455
3479
|
className: "table-shell",
|
|
3456
3480
|
children: /* @__PURE__ */ C("table", { children: [/* @__PURE__ */ S("thead", { children: /* @__PURE__ */ C("tr", { children: [
|
|
3457
3481
|
/* @__PURE__ */ S("th", { children: "When" }),
|
|
@@ -3462,19 +3486,19 @@ function zt() {
|
|
|
3462
3486
|
/* @__PURE__ */ S("th", { children: "Sequence" }),
|
|
3463
3487
|
/* @__PURE__ */ S("th", { children: "Revision" })
|
|
3464
3488
|
] }) }), /* @__PURE__ */ S("tbody", { children: i.operations.map((e) => /* @__PURE__ */ C("tr", { children: [
|
|
3465
|
-
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(
|
|
3466
|
-
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(
|
|
3489
|
+
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(Z, { ms: e.timestamp_ms }) }),
|
|
3490
|
+
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(U, { status: e.type }) }),
|
|
3467
3491
|
/* @__PURE__ */ S("td", { children: e.collection }),
|
|
3468
3492
|
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S("code", { children: e.key }) }),
|
|
3469
|
-
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(
|
|
3493
|
+
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(Q, { value: e.instance_id }) }),
|
|
3470
3494
|
/* @__PURE__ */ S("td", { children: e.sequence }),
|
|
3471
|
-
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(
|
|
3495
|
+
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(Q, { value: e.state_id }) })
|
|
3472
3496
|
] }, `${e.instance_id}-${e.operation_id}-${e.sequence}`)) })] })
|
|
3473
3497
|
}))
|
|
3474
3498
|
] });
|
|
3475
3499
|
}
|
|
3476
|
-
function
|
|
3477
|
-
let { baseUrl: e, capabilities: t } =
|
|
3500
|
+
function Vt() {
|
|
3501
|
+
let { baseUrl: e, capabilities: t } = V(), [n, r] = v([]), [i, a] = v(!1), [o, s] = v(""), [c, l] = v(""), u = _(null);
|
|
3478
3502
|
m(() => {
|
|
3479
3503
|
if (!t.usable("operations.events")) return;
|
|
3480
3504
|
let n = `${e.replace(/\/$/, "")}/v1/events`, i;
|
|
@@ -3516,8 +3540,8 @@ function Bt() {
|
|
|
3516
3540
|
placeholder: "Search resource, actor, id…"
|
|
3517
3541
|
})
|
|
3518
3542
|
}),
|
|
3519
|
-
/* @__PURE__ */ S(
|
|
3520
|
-
d.length === 0 ? /* @__PURE__ */ S(
|
|
3543
|
+
/* @__PURE__ */ S(q, { message: o }),
|
|
3544
|
+
d.length === 0 ? /* @__PURE__ */ S(J, { children: i ? "No change has been observed since this page opened." : "No events." }) : /* @__PURE__ */ S("div", {
|
|
3521
3545
|
className: "table-shell",
|
|
3522
3546
|
children: /* @__PURE__ */ C("table", { children: [/* @__PURE__ */ S("thead", { children: /* @__PURE__ */ C("tr", { children: [
|
|
3523
3547
|
/* @__PURE__ */ S("th", { children: "When" }),
|
|
@@ -3526,7 +3550,7 @@ function Bt() {
|
|
|
3526
3550
|
/* @__PURE__ */ S("th", { children: "Id" }),
|
|
3527
3551
|
/* @__PURE__ */ S("th", { children: "Actor" })
|
|
3528
3552
|
] }) }), /* @__PURE__ */ S("tbody", { children: d.map((e) => /* @__PURE__ */ C("tr", { children: [
|
|
3529
|
-
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(
|
|
3553
|
+
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(Z, { ms: Number(e.timestamp) * 1e3 }) }),
|
|
3530
3554
|
/* @__PURE__ */ S("td", { children: String(e.type) }),
|
|
3531
3555
|
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S("code", { children: String(e.resource) }) }),
|
|
3532
3556
|
/* @__PURE__ */ S("td", { children: String(e.resource_id) }),
|
|
@@ -3535,17 +3559,17 @@ function Bt() {
|
|
|
3535
3559
|
})
|
|
3536
3560
|
] });
|
|
3537
3561
|
}
|
|
3538
|
-
function
|
|
3539
|
-
let [t, n] = v("transactions"), { capabilities: r, loading: i, error: a, reload: o } =
|
|
3562
|
+
function Ht({ onOpenRecord: e }) {
|
|
3563
|
+
let [t, n] = v("transactions"), { capabilities: r, loading: i, error: a, reload: o } = V(), s = It(i, a, r.status("provenance.transactions"));
|
|
3540
3564
|
return s === "loading" ? /* @__PURE__ */ S($, {
|
|
3541
3565
|
eyebrow: "Operations",
|
|
3542
3566
|
title: "Operations",
|
|
3543
|
-
children: /* @__PURE__ */ S(
|
|
3567
|
+
children: /* @__PURE__ */ S(K, { what: "runtime capabilities" })
|
|
3544
3568
|
}) : s === "connection-failure" ? /* @__PURE__ */ S($, {
|
|
3545
3569
|
eyebrow: "Operations",
|
|
3546
3570
|
title: "Operations unavailable",
|
|
3547
3571
|
description: "Studio could not connect to the FeltDB authority.",
|
|
3548
|
-
children: /* @__PURE__ */ S(
|
|
3572
|
+
children: /* @__PURE__ */ S(q, {
|
|
3549
3573
|
message: a,
|
|
3550
3574
|
onRetry: o
|
|
3551
3575
|
})
|
|
@@ -3553,7 +3577,7 @@ function Vt({ onOpenRecord: e }) {
|
|
|
3553
3577
|
eyebrow: "Operations",
|
|
3554
3578
|
title: "Operations",
|
|
3555
3579
|
description: "What was asked for, what the engine did, and what is happening right now.",
|
|
3556
|
-
children: /* @__PURE__ */ C(
|
|
3580
|
+
children: /* @__PURE__ */ C(ut, {
|
|
3557
3581
|
label: "Operations views",
|
|
3558
3582
|
active: t,
|
|
3559
3583
|
onSelect: n,
|
|
@@ -3572,14 +3596,14 @@ function Vt({ onOpenRecord: e }) {
|
|
|
3572
3596
|
}
|
|
3573
3597
|
],
|
|
3574
3598
|
children: [
|
|
3575
|
-
t === "transactions" && (s === "unsupported" ? /* @__PURE__ */ S(
|
|
3576
|
-
t === "operations" && /* @__PURE__ */ S(
|
|
3599
|
+
t === "transactions" && (s === "unsupported" ? /* @__PURE__ */ S(Lt, { reason: r.get("provenance.transactions")?.note }) : /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(ct, { capability: "operations.rejections" }), /* @__PURE__ */ S(zt, { onOpenRecord: e })] })),
|
|
3600
|
+
t === "operations" && /* @__PURE__ */ S(G, {
|
|
3577
3601
|
capability: "operations.recent",
|
|
3578
|
-
children: /* @__PURE__ */ S(
|
|
3602
|
+
children: /* @__PURE__ */ S(Bt, {})
|
|
3579
3603
|
}),
|
|
3580
|
-
t === "events" && /* @__PURE__ */ C(
|
|
3604
|
+
t === "events" && /* @__PURE__ */ C(G, {
|
|
3581
3605
|
capability: "operations.events",
|
|
3582
|
-
children: [/* @__PURE__ */ S(
|
|
3606
|
+
children: [/* @__PURE__ */ S(Vt, {}), /* @__PURE__ */ S(W, {
|
|
3583
3607
|
capability: "operations.audit_log",
|
|
3584
3608
|
title: "Searching past events"
|
|
3585
3609
|
})]
|
|
@@ -3590,26 +3614,26 @@ function Vt({ onOpenRecord: e }) {
|
|
|
3590
3614
|
}
|
|
3591
3615
|
//#endregion
|
|
3592
3616
|
//#region src/control-plane/Instance.tsx
|
|
3593
|
-
function
|
|
3617
|
+
function Ut(e) {
|
|
3594
3618
|
return e.capabilityLoading ? "loading" : e.capabilityError ? "discovery-failure" : e.capabilityStatus === "unsupported" ? "unsupported" : e.healthLoading || !e.hasHealth && !e.healthError ? "loading" : e.healthError ? "health-failure" : "supported";
|
|
3595
3619
|
}
|
|
3596
|
-
function
|
|
3620
|
+
function Wt({ reason: e } = {}) {
|
|
3597
3621
|
return /* @__PURE__ */ C("section", {
|
|
3598
3622
|
className: "cp-unavailable",
|
|
3599
3623
|
role: "note",
|
|
3600
3624
|
children: [
|
|
3601
3625
|
/* @__PURE__ */ S("h3", { children: "Replication health" }),
|
|
3602
3626
|
/* @__PURE__ */ S("p", { children: /* @__PURE__ */ S("strong", { children: "Not available from this runtime" }) }),
|
|
3603
|
-
/* @__PURE__ */ S("p", { children: "No replication health data is exposed by this FeltDB runtime." })
|
|
3627
|
+
/* @__PURE__ */ S("p", { children: e || "No replication health data is exposed by this FeltDB runtime." })
|
|
3604
3628
|
]
|
|
3605
3629
|
});
|
|
3606
3630
|
}
|
|
3607
|
-
function
|
|
3608
|
-
let { capabilities: e, loading: t, error: n, reload: r } =
|
|
3631
|
+
function Gt() {
|
|
3632
|
+
let { capabilities: e, loading: t, error: n, reload: r } = V(), i = e.status("replication.health"), { value: a, loading: o, error: s, refresh: c } = H((e) => e.replication(), [], {
|
|
3609
3633
|
enabled: !t && !n && i !== "unsupported",
|
|
3610
3634
|
refreshMs: 1e4,
|
|
3611
3635
|
subject: "replication"
|
|
3612
|
-
}), l =
|
|
3636
|
+
}), l = Ut({
|
|
3613
3637
|
capabilityLoading: t,
|
|
3614
3638
|
capabilityError: n,
|
|
3615
3639
|
capabilityStatus: i,
|
|
@@ -3620,13 +3644,13 @@ function Wt() {
|
|
|
3620
3644
|
if (l === "loading") return /* @__PURE__ */ S($, {
|
|
3621
3645
|
eyebrow: "Distributed state",
|
|
3622
3646
|
title: "Replication",
|
|
3623
|
-
children: /* @__PURE__ */ S(
|
|
3647
|
+
children: /* @__PURE__ */ S(K, { what: "replication status" })
|
|
3624
3648
|
});
|
|
3625
3649
|
if (l === "discovery-failure") return /* @__PURE__ */ S($, {
|
|
3626
3650
|
eyebrow: "Distributed state",
|
|
3627
3651
|
title: "Replication unavailable",
|
|
3628
3652
|
description: "Studio could not determine replication status from the connected FeltDB authority.",
|
|
3629
|
-
children: /* @__PURE__ */ S(
|
|
3653
|
+
children: /* @__PURE__ */ S(q, {
|
|
3630
3654
|
message: n,
|
|
3631
3655
|
onRetry: r
|
|
3632
3656
|
})
|
|
@@ -3634,13 +3658,13 @@ function Wt() {
|
|
|
3634
3658
|
if (l === "unsupported") return /* @__PURE__ */ S($, {
|
|
3635
3659
|
eyebrow: "Distributed state",
|
|
3636
3660
|
title: "Replication",
|
|
3637
|
-
children: /* @__PURE__ */ S(
|
|
3661
|
+
children: /* @__PURE__ */ S(Wt, { reason: e.get("replication.health")?.note })
|
|
3638
3662
|
});
|
|
3639
3663
|
if (l === "health-failure" || !a) return /* @__PURE__ */ S($, {
|
|
3640
3664
|
eyebrow: "Distributed state",
|
|
3641
3665
|
title: "Replication unavailable",
|
|
3642
3666
|
description: "Studio could not determine replication status from the connected FeltDB authority.",
|
|
3643
|
-
children: /* @__PURE__ */ S(
|
|
3667
|
+
children: /* @__PURE__ */ S(q, {
|
|
3644
3668
|
message: s,
|
|
3645
3669
|
onRetry: c
|
|
3646
3670
|
})
|
|
@@ -3654,31 +3678,31 @@ function Wt() {
|
|
|
3654
3678
|
/* @__PURE__ */ C("section", {
|
|
3655
3679
|
className: "cp-stats",
|
|
3656
3680
|
children: [
|
|
3657
|
-
/* @__PURE__ */ S(
|
|
3681
|
+
/* @__PURE__ */ S(Y, {
|
|
3658
3682
|
label: "Local authority",
|
|
3659
3683
|
value: a.local?.instance_id
|
|
3660
3684
|
}),
|
|
3661
|
-
/* @__PURE__ */ S(
|
|
3685
|
+
/* @__PURE__ */ S(Y, {
|
|
3662
3686
|
label: "Peers",
|
|
3663
3687
|
value: u.length
|
|
3664
3688
|
}),
|
|
3665
|
-
/* @__PURE__ */ S(
|
|
3689
|
+
/* @__PURE__ */ S(Y, {
|
|
3666
3690
|
label: "Sync successes",
|
|
3667
3691
|
value: a.health?.peer_sync_successes
|
|
3668
3692
|
}),
|
|
3669
|
-
/* @__PURE__ */ S(
|
|
3693
|
+
/* @__PURE__ */ S(Y, {
|
|
3670
3694
|
label: "Sync failures",
|
|
3671
3695
|
value: a.health?.peer_sync_failures
|
|
3672
3696
|
}),
|
|
3673
|
-
/* @__PURE__ */ S(
|
|
3697
|
+
/* @__PURE__ */ S(Y, {
|
|
3674
3698
|
label: "Operations sent",
|
|
3675
3699
|
value: a.health?.operations_sent
|
|
3676
3700
|
}),
|
|
3677
|
-
/* @__PURE__ */ S(
|
|
3701
|
+
/* @__PURE__ */ S(Y, {
|
|
3678
3702
|
label: "Operations received",
|
|
3679
3703
|
value: a.health?.operations_received
|
|
3680
3704
|
}),
|
|
3681
|
-
/* @__PURE__ */ S(
|
|
3705
|
+
/* @__PURE__ */ S(Y, {
|
|
3682
3706
|
label: "Operations compacted",
|
|
3683
3707
|
value: a.health?.operations_compacted
|
|
3684
3708
|
})
|
|
@@ -3695,14 +3719,14 @@ function Wt() {
|
|
|
3695
3719
|
className: "cp-muted",
|
|
3696
3720
|
children: "The highest operation sequence this instance holds from each origin, and the lowest it still retains. An origin whose floor has risen above a peer's position is a peer that can no longer catch up incrementally."
|
|
3697
3721
|
}),
|
|
3698
|
-
Object.keys(d).length === 0 ? /* @__PURE__ */ S(
|
|
3722
|
+
Object.keys(d).length === 0 ? /* @__PURE__ */ S(J, { children: "No origin has produced an operation this instance holds." }) : /* @__PURE__ */ S("div", {
|
|
3699
3723
|
className: "table-shell",
|
|
3700
3724
|
children: /* @__PURE__ */ C("table", { children: [/* @__PURE__ */ S("thead", { children: /* @__PURE__ */ C("tr", { children: [
|
|
3701
3725
|
/* @__PURE__ */ S("th", { children: "Origin" }),
|
|
3702
3726
|
/* @__PURE__ */ S("th", { children: "Highest held" }),
|
|
3703
3727
|
/* @__PURE__ */ S("th", { children: "Retained from" })
|
|
3704
3728
|
] }) }), /* @__PURE__ */ S("tbody", { children: Object.entries(d).map(([e, t]) => /* @__PURE__ */ C("tr", { children: [
|
|
3705
|
-
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(
|
|
3729
|
+
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(Q, {
|
|
3706
3730
|
value: e,
|
|
3707
3731
|
length: 20
|
|
3708
3732
|
}) }),
|
|
@@ -3720,17 +3744,17 @@ function Wt() {
|
|
|
3720
3744
|
children: [/* @__PURE__ */ S("span", {
|
|
3721
3745
|
className: "card-kind",
|
|
3722
3746
|
children: "Peers"
|
|
3723
|
-
}), u.length === 0 ? /* @__PURE__ */ S(
|
|
3747
|
+
}), u.length === 0 ? /* @__PURE__ */ S(J, { children: "This instance has no peers. It is a single authority." }) : /* @__PURE__ */ S(X, { value: u })]
|
|
3724
3748
|
}),
|
|
3725
3749
|
/* @__PURE__ */ C("details", {
|
|
3726
3750
|
className: "cp-raw",
|
|
3727
|
-
children: [/* @__PURE__ */ S("summary", { children: "Membership" }), /* @__PURE__ */ S(
|
|
3751
|
+
children: [/* @__PURE__ */ S("summary", { children: "Membership" }), /* @__PURE__ */ S(X, { value: a.membership })]
|
|
3728
3752
|
})
|
|
3729
3753
|
]
|
|
3730
3754
|
});
|
|
3731
3755
|
}
|
|
3732
|
-
function
|
|
3733
|
-
let { capabilities: e } =
|
|
3756
|
+
function Kt() {
|
|
3757
|
+
let { capabilities: e } = V(), { value: t, loading: n, error: r, refresh: i } = H((e) => e.applications(), [], {
|
|
3734
3758
|
enabled: e.usable("applications.list"),
|
|
3735
3759
|
refreshMs: 2e4,
|
|
3736
3760
|
subject: "applications"
|
|
@@ -3739,15 +3763,15 @@ function Gt() {
|
|
|
3739
3763
|
eyebrow: "Runtimes",
|
|
3740
3764
|
title: "Applications",
|
|
3741
3765
|
description: "Applications on this instance and the FeltDB runtimes serving them.",
|
|
3742
|
-
children: /* @__PURE__ */ C(
|
|
3766
|
+
children: /* @__PURE__ */ C(G, {
|
|
3743
3767
|
capability: "applications.list",
|
|
3744
3768
|
children: [
|
|
3745
|
-
/* @__PURE__ */ S(
|
|
3769
|
+
/* @__PURE__ */ S(q, {
|
|
3746
3770
|
message: r,
|
|
3747
3771
|
onRetry: i
|
|
3748
3772
|
}),
|
|
3749
|
-
n && !t && /* @__PURE__ */ S(
|
|
3750
|
-
t && (t.applications.length === 0 ? /* @__PURE__ */ S(
|
|
3773
|
+
n && !t && /* @__PURE__ */ S(K, { what: "applications" }),
|
|
3774
|
+
t && (t.applications.length === 0 ? /* @__PURE__ */ S(J, { children: "No application is visible to you on this instance." }) : /* @__PURE__ */ S("div", {
|
|
3751
3775
|
className: "cp-cards",
|
|
3752
3776
|
children: t.applications.map((e) => /* @__PURE__ */ C("article", {
|
|
3753
3777
|
className: "studio-card",
|
|
@@ -3760,7 +3784,7 @@ function Gt() {
|
|
|
3760
3784
|
/* @__PURE__ */ C("p", {
|
|
3761
3785
|
className: "cp-muted",
|
|
3762
3786
|
children: [
|
|
3763
|
-
/* @__PURE__ */ S(
|
|
3787
|
+
/* @__PURE__ */ S(Q, {
|
|
3764
3788
|
value: String(e.application_id),
|
|
3765
3789
|
length: 22
|
|
3766
3790
|
}),
|
|
@@ -3768,7 +3792,7 @@ function Gt() {
|
|
|
3768
3792
|
String(e.tenant_name),
|
|
3769
3793
|
" ·",
|
|
3770
3794
|
" ",
|
|
3771
|
-
/* @__PURE__ */ S(
|
|
3795
|
+
/* @__PURE__ */ S(U, { status: String(e.status) })
|
|
3772
3796
|
]
|
|
3773
3797
|
}),
|
|
3774
3798
|
/* @__PURE__ */ S("div", {
|
|
@@ -3780,12 +3804,12 @@ function Gt() {
|
|
|
3780
3804
|
/* @__PURE__ */ S("th", { children: "Started" })
|
|
3781
3805
|
] }) }), /* @__PURE__ */ S("tbody", { children: (e.environments || []).map((e) => /* @__PURE__ */ C("tr", { children: [
|
|
3782
3806
|
/* @__PURE__ */ S("td", { children: String(e.environment) }),
|
|
3783
|
-
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(
|
|
3784
|
-
/* @__PURE__ */ S("td", { children: e.runtime ? /* @__PURE__ */ S(
|
|
3807
|
+
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(Q, { value: String(e.revision_id) }) }),
|
|
3808
|
+
/* @__PURE__ */ S("td", { children: e.runtime ? /* @__PURE__ */ S(U, { status: String(e.runtime.status) }) : /* @__PURE__ */ S("span", {
|
|
3785
3809
|
className: "cp-muted",
|
|
3786
3810
|
children: "not running"
|
|
3787
3811
|
}) }),
|
|
3788
|
-
/* @__PURE__ */ S("td", { children: e.runtime ? /* @__PURE__ */ S(
|
|
3812
|
+
/* @__PURE__ */ S("td", { children: e.runtime ? /* @__PURE__ */ S(Z, { ms: Number(e.runtime.started_at) * 1e3 }) : /* @__PURE__ */ S("span", {
|
|
3789
3813
|
className: "cp-muted",
|
|
3790
3814
|
children: "—"
|
|
3791
3815
|
}) })
|
|
@@ -3798,11 +3822,11 @@ function Gt() {
|
|
|
3798
3822
|
})
|
|
3799
3823
|
});
|
|
3800
3824
|
}
|
|
3801
|
-
function
|
|
3802
|
-
let { capabilities: e } =
|
|
3825
|
+
function qt() {
|
|
3826
|
+
let { capabilities: e } = V(), { value: t, loading: n, error: r, refresh: i } = H((e) => e.overview(), [], {
|
|
3803
3827
|
refreshMs: 5e3,
|
|
3804
3828
|
subject: "instance activity"
|
|
3805
|
-
}), { value: a } =
|
|
3829
|
+
}), { value: a } = H((e) => e.replication(), [], {
|
|
3806
3830
|
enabled: e.usable("replication.health"),
|
|
3807
3831
|
refreshMs: 1e4,
|
|
3808
3832
|
subject: "replication health"
|
|
@@ -3810,12 +3834,12 @@ function Kt() {
|
|
|
3810
3834
|
if (n && !t) return /* @__PURE__ */ S($, {
|
|
3811
3835
|
eyebrow: "Health",
|
|
3812
3836
|
title: "Monitoring",
|
|
3813
|
-
children: /* @__PURE__ */ S(
|
|
3837
|
+
children: /* @__PURE__ */ S(K, { what: "activity" })
|
|
3814
3838
|
});
|
|
3815
3839
|
if (!t) return /* @__PURE__ */ S($, {
|
|
3816
3840
|
eyebrow: "Health",
|
|
3817
3841
|
title: "Monitoring",
|
|
3818
|
-
children: /* @__PURE__ */ S(
|
|
3842
|
+
children: /* @__PURE__ */ S(q, {
|
|
3819
3843
|
message: r,
|
|
3820
3844
|
onRetry: i
|
|
3821
3845
|
})
|
|
@@ -3825,25 +3849,25 @@ function Kt() {
|
|
|
3825
3849
|
eyebrow: "Health",
|
|
3826
3850
|
title: "Monitoring",
|
|
3827
3851
|
description: "What this instance counts. Refreshed every five seconds.",
|
|
3828
|
-
children: [/* @__PURE__ */ C(
|
|
3852
|
+
children: [/* @__PURE__ */ C(G, {
|
|
3829
3853
|
capability: "monitoring.metrics",
|
|
3830
3854
|
children: [
|
|
3831
3855
|
/* @__PURE__ */ C("section", {
|
|
3832
3856
|
className: "cp-stats",
|
|
3833
3857
|
children: [
|
|
3834
|
-
/* @__PURE__ */ S(
|
|
3858
|
+
/* @__PURE__ */ S(Y, {
|
|
3835
3859
|
label: "Requests",
|
|
3836
3860
|
value: o.requests
|
|
3837
3861
|
}),
|
|
3838
|
-
/* @__PURE__ */ S(
|
|
3862
|
+
/* @__PURE__ */ S(Y, {
|
|
3839
3863
|
label: "State reads",
|
|
3840
3864
|
value: o.state_reads
|
|
3841
3865
|
}),
|
|
3842
|
-
/* @__PURE__ */ S(
|
|
3866
|
+
/* @__PURE__ */ S(Y, {
|
|
3843
3867
|
label: "State mutations",
|
|
3844
3868
|
value: o.state_mutations
|
|
3845
3869
|
}),
|
|
3846
|
-
/* @__PURE__ */ S(
|
|
3870
|
+
/* @__PURE__ */ S(Y, {
|
|
3847
3871
|
label: "Event connections",
|
|
3848
3872
|
value: o.event_connections
|
|
3849
3873
|
})
|
|
@@ -3852,20 +3876,20 @@ function Kt() {
|
|
|
3852
3876
|
/* @__PURE__ */ C("section", {
|
|
3853
3877
|
className: "cp-stats",
|
|
3854
3878
|
children: [
|
|
3855
|
-
/* @__PURE__ */ S(
|
|
3879
|
+
/* @__PURE__ */ S(Y, {
|
|
3856
3880
|
label: "Requests shed",
|
|
3857
3881
|
value: o.requests_shed,
|
|
3858
3882
|
hint: "Refused at the door because the in-flight limit was reached."
|
|
3859
3883
|
}),
|
|
3860
|
-
/* @__PURE__ */ S(
|
|
3884
|
+
/* @__PURE__ */ S(Y, {
|
|
3861
3885
|
label: "Deadlines exceeded",
|
|
3862
3886
|
value: o.request_deadlines_exceeded
|
|
3863
3887
|
}),
|
|
3864
|
-
/* @__PURE__ */ S(
|
|
3888
|
+
/* @__PURE__ */ S(Y, {
|
|
3865
3889
|
label: "Authentication failures",
|
|
3866
3890
|
value: o.authentication_failures
|
|
3867
3891
|
}),
|
|
3868
|
-
/* @__PURE__ */ S(
|
|
3892
|
+
/* @__PURE__ */ S(Y, {
|
|
3869
3893
|
label: "Admission slots free",
|
|
3870
3894
|
value: t.runtime?.admission_permits_available
|
|
3871
3895
|
})
|
|
@@ -3874,19 +3898,19 @@ function Kt() {
|
|
|
3874
3898
|
/* @__PURE__ */ C("section", {
|
|
3875
3899
|
className: "cp-stats",
|
|
3876
3900
|
children: [
|
|
3877
|
-
/* @__PURE__ */ S(
|
|
3901
|
+
/* @__PURE__ */ S(Y, {
|
|
3878
3902
|
label: "Records",
|
|
3879
3903
|
value: t.storage?.records
|
|
3880
3904
|
}),
|
|
3881
|
-
/* @__PURE__ */ S(
|
|
3905
|
+
/* @__PURE__ */ S(Y, {
|
|
3882
3906
|
label: "State revisions",
|
|
3883
3907
|
value: t.storage?.state_revisions
|
|
3884
3908
|
}),
|
|
3885
|
-
/* @__PURE__ */ S(
|
|
3909
|
+
/* @__PURE__ */ S(Y, {
|
|
3886
3910
|
label: "Authority revision",
|
|
3887
3911
|
value: t.authority?.authority_revision
|
|
3888
3912
|
}),
|
|
3889
|
-
/* @__PURE__ */ S(
|
|
3913
|
+
/* @__PURE__ */ S(Y, {
|
|
3890
3914
|
label: "Replication backlog sent",
|
|
3891
3915
|
value: a?.health?.operations_sent
|
|
3892
3916
|
})
|
|
@@ -3897,30 +3921,30 @@ function Kt() {
|
|
|
3897
3921
|
children: [/* @__PURE__ */ S("span", {
|
|
3898
3922
|
className: "card-kind",
|
|
3899
3923
|
children: "Audit writer"
|
|
3900
|
-
}), /* @__PURE__ */ S(
|
|
3924
|
+
}), /* @__PURE__ */ S(X, { value: t.storage?.audit })]
|
|
3901
3925
|
})
|
|
3902
3926
|
]
|
|
3903
|
-
}), /* @__PURE__ */ S(
|
|
3927
|
+
}), /* @__PURE__ */ S(W, { capability: "monitoring.latency" })]
|
|
3904
3928
|
});
|
|
3905
3929
|
}
|
|
3906
|
-
function
|
|
3907
|
-
let { capabilities: e } =
|
|
3930
|
+
function Jt() {
|
|
3931
|
+
let { capabilities: e } = V(), { value: t, loading: n, error: r, refresh: i } = H((e) => e.overview(), [], { subject: "instance settings" }), { value: a } = H((e) => e.diagnostics(), [], {
|
|
3908
3932
|
enabled: e.usable("settings.instance"),
|
|
3909
3933
|
subject: "instance diagnostics"
|
|
3910
3934
|
}), o = e.declaration;
|
|
3911
3935
|
return /* @__PURE__ */ C($, {
|
|
3912
|
-
eyebrow: "
|
|
3913
|
-
title: "
|
|
3936
|
+
eyebrow: "Settings",
|
|
3937
|
+
title: "Instance",
|
|
3914
3938
|
description: "What this instance is configured as, and what it can do.",
|
|
3915
3939
|
children: [
|
|
3916
|
-
/* @__PURE__ */ C(
|
|
3940
|
+
/* @__PURE__ */ C(G, {
|
|
3917
3941
|
capability: "settings.instance",
|
|
3918
3942
|
children: [
|
|
3919
|
-
/* @__PURE__ */ S(
|
|
3943
|
+
/* @__PURE__ */ S(q, {
|
|
3920
3944
|
message: r,
|
|
3921
3945
|
onRetry: i
|
|
3922
3946
|
}),
|
|
3923
|
-
n && !t && /* @__PURE__ */ S(
|
|
3947
|
+
n && !t && /* @__PURE__ */ S(K, { what: "settings" }),
|
|
3924
3948
|
t && /* @__PURE__ */ C(x, { children: [
|
|
3925
3949
|
/* @__PURE__ */ C("section", {
|
|
3926
3950
|
className: "studio-card",
|
|
@@ -3930,19 +3954,19 @@ function qt() {
|
|
|
3930
3954
|
}), /* @__PURE__ */ C("div", {
|
|
3931
3955
|
className: "cp-stats",
|
|
3932
3956
|
children: [
|
|
3933
|
-
/* @__PURE__ */ S(
|
|
3957
|
+
/* @__PURE__ */ S(Y, {
|
|
3934
3958
|
label: "Instance",
|
|
3935
3959
|
value: t.instance?.instance_id
|
|
3936
3960
|
}),
|
|
3937
|
-
/* @__PURE__ */ S(
|
|
3961
|
+
/* @__PURE__ */ S(Y, {
|
|
3938
3962
|
label: "Namespace",
|
|
3939
3963
|
value: t.instance?.namespace
|
|
3940
3964
|
}),
|
|
3941
|
-
/* @__PURE__ */ S(
|
|
3965
|
+
/* @__PURE__ */ S(Y, {
|
|
3942
3966
|
label: "Engine",
|
|
3943
3967
|
value: t.instance?.engine_version
|
|
3944
3968
|
}),
|
|
3945
|
-
/* @__PURE__ */ S(
|
|
3969
|
+
/* @__PURE__ */ S(Y, {
|
|
3946
3970
|
label: "Protocol",
|
|
3947
3971
|
value: t.instance?.protocol_version
|
|
3948
3972
|
})
|
|
@@ -3957,19 +3981,19 @@ function qt() {
|
|
|
3957
3981
|
}), /* @__PURE__ */ C("div", {
|
|
3958
3982
|
className: "cp-stats",
|
|
3959
3983
|
children: [
|
|
3960
|
-
/* @__PURE__ */ S(
|
|
3984
|
+
/* @__PURE__ */ S(Y, {
|
|
3961
3985
|
label: "Authority revision",
|
|
3962
3986
|
value: t.authority?.authority_revision
|
|
3963
3987
|
}),
|
|
3964
|
-
/* @__PURE__ */ S(
|
|
3988
|
+
/* @__PURE__ */ S(Y, {
|
|
3965
3989
|
label: "Lease clock",
|
|
3966
3990
|
value: typeof t.authority?.lease_clock_healthy == "boolean" ? t.authority.lease_clock_healthy ? "Healthy" : "Degraded" : void 0
|
|
3967
3991
|
}),
|
|
3968
|
-
/* @__PURE__ */ S(
|
|
3992
|
+
/* @__PURE__ */ S(Y, {
|
|
3969
3993
|
label: "Log recovery",
|
|
3970
3994
|
value: t.storage?.log_recovery?.status
|
|
3971
3995
|
}),
|
|
3972
|
-
/* @__PURE__ */ S(
|
|
3996
|
+
/* @__PURE__ */ S(Y, {
|
|
3973
3997
|
label: "Autonomous worker",
|
|
3974
3998
|
value: typeof t.runtime?.worker_enabled == "boolean" ? t.runtime.worker_enabled ? "Running" : "Off" : void 0
|
|
3975
3999
|
})
|
|
@@ -3984,15 +4008,15 @@ function qt() {
|
|
|
3984
4008
|
}), /* @__PURE__ */ C("div", {
|
|
3985
4009
|
className: "cp-stats",
|
|
3986
4010
|
children: [
|
|
3987
|
-
/* @__PURE__ */ S(
|
|
4011
|
+
/* @__PURE__ */ S(Y, {
|
|
3988
4012
|
label: "Request deadline",
|
|
3989
4013
|
value: t.runtime?.request_deadline_ms === void 0 ? void 0 : `${t.runtime.request_deadline_ms} ms`
|
|
3990
4014
|
}),
|
|
3991
|
-
/* @__PURE__ */ S(
|
|
4015
|
+
/* @__PURE__ */ S(Y, {
|
|
3992
4016
|
label: "Admission slots free",
|
|
3993
4017
|
value: t.runtime?.admission_permits_available
|
|
3994
4018
|
}),
|
|
3995
|
-
/* @__PURE__ */ S(
|
|
4019
|
+
/* @__PURE__ */ S(Y, {
|
|
3996
4020
|
label: "Authentication",
|
|
3997
4021
|
value: typeof t.instance?.authentication_enabled == "boolean" ? t.instance.authentication_enabled ? "Enabled" : "Disabled" : void 0
|
|
3998
4022
|
})
|
|
@@ -4001,12 +4025,12 @@ function qt() {
|
|
|
4001
4025
|
}),
|
|
4002
4026
|
a && /* @__PURE__ */ C("details", {
|
|
4003
4027
|
className: "cp-raw",
|
|
4004
|
-
children: [/* @__PURE__ */ S("summary", { children: "Diagnostics" }), /* @__PURE__ */ S(
|
|
4028
|
+
children: [/* @__PURE__ */ S("summary", { children: "Diagnostics" }), /* @__PURE__ */ S(X, { value: a })]
|
|
4005
4029
|
})
|
|
4006
4030
|
] })
|
|
4007
4031
|
]
|
|
4008
4032
|
}),
|
|
4009
|
-
/* @__PURE__ */ S(
|
|
4033
|
+
/* @__PURE__ */ S(W, {
|
|
4010
4034
|
capability: "settings.mutate",
|
|
4011
4035
|
title: "Changing instance configuration"
|
|
4012
4036
|
}),
|
|
@@ -4036,7 +4060,7 @@ function qt() {
|
|
|
4036
4060
|
/* @__PURE__ */ S("code", { children: e.id })
|
|
4037
4061
|
] }),
|
|
4038
4062
|
/* @__PURE__ */ S("td", { children: e.area }),
|
|
4039
|
-
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(
|
|
4063
|
+
/* @__PURE__ */ S("td", { children: /* @__PURE__ */ S(U, { status: e.status }) }),
|
|
4040
4064
|
/* @__PURE__ */ S("td", {
|
|
4041
4065
|
className: "cp-keys",
|
|
4042
4066
|
children: e.surface.length === 0 ? /* @__PURE__ */ S("span", {
|
|
@@ -4052,21 +4076,21 @@ function qt() {
|
|
|
4052
4076
|
})
|
|
4053
4077
|
})
|
|
4054
4078
|
] }, e.id)) })] })
|
|
4055
|
-
}) : /* @__PURE__ */ S(
|
|
4079
|
+
}) : /* @__PURE__ */ S(J, { children: "The instance did not answer with a capability declaration, so Studio is treating every capability as unavailable." })
|
|
4056
4080
|
]
|
|
4057
4081
|
})
|
|
4058
4082
|
]
|
|
4059
4083
|
});
|
|
4060
4084
|
}
|
|
4061
|
-
function
|
|
4062
|
-
let { capabilities: e } =
|
|
4085
|
+
function Yt() {
|
|
4086
|
+
let { capabilities: e } = V(), t = e.usable("developer.access"), { value: n, loading: r, error: i, refresh: a } = H((e) => e.developer(), [], {
|
|
4063
4087
|
enabled: t,
|
|
4064
4088
|
subject: "developer access"
|
|
4065
4089
|
});
|
|
4066
4090
|
if (!t) return /* @__PURE__ */ S($, {
|
|
4067
4091
|
eyebrow: "Connect",
|
|
4068
4092
|
title: "Developer",
|
|
4069
|
-
children: /* @__PURE__ */ S(
|
|
4093
|
+
children: /* @__PURE__ */ S(G, {
|
|
4070
4094
|
capability: "developer.access",
|
|
4071
4095
|
children: /* @__PURE__ */ S(x, {})
|
|
4072
4096
|
})
|
|
@@ -4074,12 +4098,12 @@ function Jt() {
|
|
|
4074
4098
|
if (r && !n) return /* @__PURE__ */ S($, {
|
|
4075
4099
|
eyebrow: "Connect",
|
|
4076
4100
|
title: "Developer",
|
|
4077
|
-
children: /* @__PURE__ */ S(
|
|
4101
|
+
children: /* @__PURE__ */ S(K, { what: "connection details" })
|
|
4078
4102
|
});
|
|
4079
4103
|
if (!n) return /* @__PURE__ */ S($, {
|
|
4080
4104
|
eyebrow: "Connect",
|
|
4081
4105
|
title: "Developer",
|
|
4082
|
-
children: /* @__PURE__ */ S(
|
|
4106
|
+
children: /* @__PURE__ */ S(q, {
|
|
4083
4107
|
message: i,
|
|
4084
4108
|
onRetry: a
|
|
4085
4109
|
})
|
|
@@ -4089,25 +4113,25 @@ function Jt() {
|
|
|
4089
4113
|
eyebrow: "Connect",
|
|
4090
4114
|
title: "Developer",
|
|
4091
4115
|
description: "How an application, an agent, or a person connects to this instance.",
|
|
4092
|
-
children: /* @__PURE__ */ C(
|
|
4116
|
+
children: /* @__PURE__ */ C(G, {
|
|
4093
4117
|
capability: "developer.access",
|
|
4094
4118
|
children: [
|
|
4095
4119
|
/* @__PURE__ */ C("section", {
|
|
4096
4120
|
className: "cp-stats",
|
|
4097
4121
|
children: [
|
|
4098
|
-
/* @__PURE__ */ S(
|
|
4122
|
+
/* @__PURE__ */ S(Y, {
|
|
4099
4123
|
label: "Endpoint",
|
|
4100
4124
|
value: n.endpoint || "not advertised"
|
|
4101
4125
|
}),
|
|
4102
|
-
/* @__PURE__ */ S(
|
|
4126
|
+
/* @__PURE__ */ S(Y, {
|
|
4103
4127
|
label: "Namespace",
|
|
4104
4128
|
value: n.namespace
|
|
4105
4129
|
}),
|
|
4106
|
-
/* @__PURE__ */ S(
|
|
4130
|
+
/* @__PURE__ */ S(Y, {
|
|
4107
4131
|
label: "Protocol",
|
|
4108
4132
|
value: n.protocol_version
|
|
4109
4133
|
}),
|
|
4110
|
-
/* @__PURE__ */ S(
|
|
4134
|
+
/* @__PURE__ */ S(Y, {
|
|
4111
4135
|
label: "Authentication",
|
|
4112
4136
|
value: n.authentication
|
|
4113
4137
|
})
|
|
@@ -4164,10 +4188,10 @@ function Jt() {
|
|
|
4164
4188
|
]
|
|
4165
4189
|
})]
|
|
4166
4190
|
}),
|
|
4167
|
-
/* @__PURE__ */ S(
|
|
4191
|
+
/* @__PURE__ */ S(W, { capability: "developer.tool_projection" })
|
|
4168
4192
|
]
|
|
4169
4193
|
})
|
|
4170
4194
|
});
|
|
4171
4195
|
}
|
|
4172
4196
|
//#endregion
|
|
4173
|
-
export {
|
|
4197
|
+
export { U as A, Q as C, ct as D, $ as E, V as F, H as I, it as L, Z as M, W as N, lt as O, ot as P, He as R, q as S, K as T, mt as _, Wt as a, st as b, Ht as c, Nt as d, Mt as f, bt as g, xt as h, Gt as i, ut as j, Y as k, Lt as l, Dt as m, Yt as n, Jt as o, Ft as p, qt as r, Ut as s, Kt as t, It as u, dt as v, X as w, J as x, G as y, fe as z };
|