@feltdb/core 0.8.0 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/application-development.d.ts +7 -2
- package/dist/application-development.d.ts.map +1 -1
- package/dist/application-development.js +7 -13
- package/dist/application-manifest.d.ts +1 -0
- package/dist/application-manifest.d.ts.map +1 -1
- package/dist/application-manifest.js +1 -1
- package/dist/application-understanding.d.ts +76 -0
- package/dist/application-understanding.d.ts.map +1 -0
- package/dist/application-understanding.js +282 -0
- package/dist/cli/ai-model-config.js +3 -3
- package/dist/cli/commands.js +131 -38
- package/dist/cli/proposal-client.js +5 -1
- package/dist/cli/publish-engine.js +1 -1
- package/dist/cli/repository-evidence.js +55 -0
- package/dist/cli/source-sync.js +190 -75
- package/dist/convergence.d.ts +55 -0
- package/dist/convergence.d.ts.map +1 -0
- package/dist/convergence.js +63 -0
- package/dist/create/managed-account.js +1 -0
- package/dist/create/package-versions.js +1 -1
- package/dist/create/server-source/crates/feltdb/src/application.rs +23 -0
- package/dist/create/server-source/crates/feltdb/src/authority.rs +349 -0
- package/dist/create/server-source/crates/feltdb/src/bin/feltdb-authority-client.rs +32 -0
- package/dist/create/server-source/crates/feltdb/src/bin/feltdb-authority.rs +19 -0
- package/dist/create/server-source/crates/feltdb/src/lib.rs +444 -189
- package/dist/create/server-source/crates/feltdb/src/state_contract.rs +244 -51
- package/dist/create/server-source/crates/feltdb/tests/authority_process.rs +297 -0
- package/dist/create/server-source/crates/feltdb-server/src/auth.rs +41 -11
- package/dist/create/server-source/crates/feltdb-server/src/connections.rs +14 -0
- package/dist/create/server-source/crates/feltdb-server/src/key_management.rs +8 -3
- package/dist/create/server-source/crates/feltdb-server/src/main.rs +1262 -173
- package/dist/create/server-source/crates/feltdb-server/src/tenancy.rs +142 -1
- package/dist/create/template/default-project/src/context/AuthContext.tsx +9 -1
- package/dist/create/template/default-project/src/pages/SignUp.tsx +1 -1
- package/dist/flowspec.d.ts.map +1 -1
- package/dist/flowspec.js +6 -1
- package/dist/http-client.d.ts +32 -1
- package/dist/http-client.d.ts.map +1 -1
- package/dist/http-client.js +14 -2
- package/dist/http-db.d.ts +6 -0
- package/dist/http-db.d.ts.map +1 -1
- package/dist/http-db.js +30 -4
- package/dist/index-core.d.ts +3 -0
- package/dist/index-core.d.ts.map +1 -1
- package/dist/index-core.js +3 -0
- package/dist/intent.d.ts +98 -0
- package/dist/intent.d.ts.map +1 -0
- package/dist/intent.js +343 -0
- package/dist/module-intent.d.ts +19 -5
- package/dist/module-intent.d.ts.map +1 -1
- package/dist/module-intent.js +211 -62
- package/dist/module.d.ts +41 -12
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +543 -38
- package/dist/proposal.d.ts +13 -1
- package/dist/proposal.d.ts.map +1 -1
- package/dist/proposal.js +21 -4
- package/dist/state-contract.d.ts +4 -1
- package/dist/state-contract.d.ts.map +1 -1
- package/dist/state-contract.js +1 -1
- package/dist/studio/components/AskFeltDB.d.ts.map +1 -1
- package/dist/studio/components/ProposalBrowser.d.ts +1 -1
- package/dist/studio/components/ProposalBrowser.d.ts.map +1 -1
- package/dist/studio/components/index.js +1 -1
- package/dist/studio/{components-CNSNrmA9.js → components-Duq2xQWt.js} +251 -193
- package/dist/studio/index.js +1 -1
- package/dist/studio/studio.css +1 -1
- package/dist/studio/utils/proposal-api.d.ts +4 -1
- package/dist/studio/utils/proposal-api.d.ts.map +1 -1
- package/dist/studio/utils/proposal-api.js +3 -0
- package/dist/studio-app/assets/{feltdb_wasm-CSB6KVgw.js → feltdb_wasm-DB8cX151.js} +1 -1
- package/dist/studio-app/assets/feltdb_wasm_bg-ClhDHp0S.wasm +0 -0
- package/dist/studio-app/assets/index-B0k4UAlI.js +29 -0
- package/dist/studio-app/assets/{index-yazaWMUN.css → index-Cd_NPw14.css} +1 -1
- package/dist/studio-app/index.html +2 -2
- package/dist/wasm/feltdb_wasm_bg.wasm +0 -0
- package/dist/workspace/local-development-authority.d.ts +2 -0
- package/dist/workspace/local-development-authority.d.ts.map +1 -1
- package/dist/workspace/local-development-authority.js +65 -2
- package/package.json +1 -1
- package/dist/studio-app/assets/dist-CCOk39Uc.js +0 -1
- package/dist/studio-app/assets/feltdb_wasm_bg-Dd1fnO9U.wasm +0 -0
- package/dist/studio-app/assets/index-Bncji3aN.js +0 -43
- package/dist/studio-app/assets/lib-B2_7fcn7.js +0 -69
- package/dist/studio-app/assets/worker-CARZ5g7K.js +0 -69
|
@@ -1414,14 +1414,14 @@ function ee({ db: e, namespace: t = "default", projectSpec: n, managedPublish: r
|
|
|
1414
1414
|
}]
|
|
1415
1415
|
} : t)
|
|
1416
1416
|
}), P(null);
|
|
1417
|
-
},
|
|
1417
|
+
}, X = () => {
|
|
1418
1418
|
let e = [...D, {
|
|
1419
1419
|
version: D.length + 1,
|
|
1420
1420
|
source: c,
|
|
1421
1421
|
savedAt: Date.now()
|
|
1422
1422
|
}];
|
|
1423
1423
|
O(e), A(`Saved local revision v${e.length}`);
|
|
1424
|
-
},
|
|
1424
|
+
}, re = async () => {
|
|
1425
1425
|
if (!e) return A("Local embedded storage is unavailable");
|
|
1426
1426
|
if (T.some((e) => e.severity === "error")) return A("Resolve validation errors before deploying");
|
|
1427
1427
|
if (K.filter((e) => e.safety === "destructive").length && !L) return A("Review and approve destructive local changes before applying");
|
|
@@ -1435,7 +1435,7 @@ function ee({ db: e, namespace: t = "default", projectSpec: n, managedPublish: r
|
|
|
1435
1435
|
} catch (e) {
|
|
1436
1436
|
A(`Local apply failed: ${e instanceof Error ? e.message : String(e)}`);
|
|
1437
1437
|
}
|
|
1438
|
-
},
|
|
1438
|
+
}, Z = async () => {
|
|
1439
1439
|
if (V.publishEndpoint) {
|
|
1440
1440
|
H({
|
|
1441
1441
|
...V,
|
|
@@ -1510,12 +1510,12 @@ function ee({ db: e, namespace: t = "default", projectSpec: n, managedPublish: r
|
|
|
1510
1510
|
} finally {
|
|
1511
1511
|
await e.close();
|
|
1512
1512
|
}
|
|
1513
|
-
},
|
|
1513
|
+
}, ie = () => {
|
|
1514
1514
|
let e = URL.createObjectURL(new Blob([c], { type: "text/plain" })), t = document.createElement("a");
|
|
1515
1515
|
t.href = e, t.download = "feltdb.flow", t.click(), URL.revokeObjectURL(e);
|
|
1516
|
-
},
|
|
1516
|
+
}, ae = async (e) => {
|
|
1517
1517
|
e && q(await e.text());
|
|
1518
|
-
},
|
|
1518
|
+
}, oe = [
|
|
1519
1519
|
["Data", m.collections.map((e) => e.name)],
|
|
1520
1520
|
["Capabilities", m.capabilities.map((e) => e.name)],
|
|
1521
1521
|
["Agents", m.agents.map((e) => e.name)],
|
|
@@ -1544,7 +1544,7 @@ function ee({ db: e, namespace: t = "default", projectSpec: n, managedPublish: r
|
|
|
1544
1544
|
hidden: !0,
|
|
1545
1545
|
type: "file",
|
|
1546
1546
|
accept: ".flow,text/plain",
|
|
1547
|
-
onChange: (e) => void
|
|
1547
|
+
onChange: (e) => void ae(e.target.files?.[0])
|
|
1548
1548
|
}),
|
|
1549
1549
|
/* @__PURE__ */ h("button", {
|
|
1550
1550
|
className: "btn btn-ghost",
|
|
@@ -1553,17 +1553,17 @@ function ee({ db: e, namespace: t = "default", projectSpec: n, managedPublish: r
|
|
|
1553
1553
|
}),
|
|
1554
1554
|
/* @__PURE__ */ h("button", {
|
|
1555
1555
|
className: "btn btn-ghost",
|
|
1556
|
-
onClick:
|
|
1556
|
+
onClick: ie,
|
|
1557
1557
|
children: "Export"
|
|
1558
1558
|
}),
|
|
1559
1559
|
/* @__PURE__ */ h("button", {
|
|
1560
1560
|
className: "btn btn-ghost",
|
|
1561
|
-
onClick:
|
|
1561
|
+
onClick: X,
|
|
1562
1562
|
children: "Version"
|
|
1563
1563
|
}),
|
|
1564
1564
|
/* @__PURE__ */ h("button", {
|
|
1565
1565
|
className: "btn btn-ghost",
|
|
1566
|
-
onClick: () => void
|
|
1566
|
+
onClick: () => void re(),
|
|
1567
1567
|
children: "Apply locally"
|
|
1568
1568
|
}),
|
|
1569
1569
|
/* @__PURE__ */ h("button", {
|
|
@@ -1585,7 +1585,7 @@ function ee({ db: e, namespace: t = "default", projectSpec: n, managedPublish: r
|
|
|
1585
1585
|
z && /* @__PURE__ */ g("form", {
|
|
1586
1586
|
className: "cloud-publisher",
|
|
1587
1587
|
onSubmit: (e) => {
|
|
1588
|
-
e.preventDefault(),
|
|
1588
|
+
e.preventDefault(), Z();
|
|
1589
1589
|
},
|
|
1590
1590
|
children: [
|
|
1591
1591
|
/* @__PURE__ */ g("div", {
|
|
@@ -1738,7 +1738,7 @@ function ee({ db: e, namespace: t = "default", projectSpec: n, managedPublish: r
|
|
|
1738
1738
|
})] })
|
|
1739
1739
|
]
|
|
1740
1740
|
}),
|
|
1741
|
-
|
|
1741
|
+
oe.map(([e, t]) => /* @__PURE__ */ g("section", { children: [/* @__PURE__ */ h("h3", { children: e }), t.length ? t.map((e) => /* @__PURE__ */ h("div", {
|
|
1742
1742
|
className: "tree-item",
|
|
1743
1743
|
children: e
|
|
1744
1744
|
}, e)) : /* @__PURE__ */ h("div", {
|
|
@@ -2063,50 +2063,25 @@ function ee({ db: e, namespace: t = "default", projectSpec: n, managedPublish: r
|
|
|
2063
2063
|
//#endregion
|
|
2064
2064
|
//#region src/components/AskFeltDB.tsx
|
|
2065
2065
|
function te({ configuration: e, onApplied: t, onProposalCreated: n }) {
|
|
2066
|
-
let [r, i] = f(""), [a, o] = f(), [s, c] = f(), [l, u] = f(""), [d, p] = f(0), [_, v] = f(!1), [y, b] = f([]), S =
|
|
2067
|
-
if (!(!
|
|
2068
|
-
u("
|
|
2066
|
+
let [r, i] = f(""), [a, o] = f(), [s, c] = f(), [l, u] = f(""), [d, p] = f(0), [_, v] = f(!1), [y, b] = f([]), S = !!e?.enabled, C = async () => {
|
|
2067
|
+
if (!(!S || !e)) {
|
|
2068
|
+
u("Resolving intent…"), c(void 0), o(void 0);
|
|
2069
2069
|
try {
|
|
2070
|
-
let t = await fetch("/_feltdb/
|
|
2071
|
-
if (!t.ok) throw Error(i.error || "Could not load contract");
|
|
2072
|
-
if (i.drift && !i.drift.synchronized) throw Error("Contract drift detected. Review feltdb status before generating.");
|
|
2073
|
-
let a;
|
|
2074
|
-
if (C) {
|
|
2075
|
-
u(`Asking ${e.aiModel?.model} through the local CLI…`);
|
|
2076
|
-
let t = await fetch("/_feltdb/ai/generate", {
|
|
2077
|
-
method: "POST",
|
|
2078
|
-
headers: {
|
|
2079
|
-
"content-type": "application/json",
|
|
2080
|
-
"x-feltdb-studio-token": e.token
|
|
2081
|
-
},
|
|
2082
|
-
body: JSON.stringify({ intent: r })
|
|
2083
|
-
}), n = await t.json();
|
|
2084
|
-
if (!t.ok) throw Error(n.error || "Configured model failed");
|
|
2085
|
-
a = n.proposal;
|
|
2086
|
-
} else {
|
|
2087
|
-
let { WebLLMProvider: t } = await import("@feltdb/webllm"), n = new t({
|
|
2088
|
-
model: e.aiModel?.model,
|
|
2089
|
-
contract: i.snapshot,
|
|
2090
|
-
onProgress: (e) => {
|
|
2091
|
-
p(e.progress), u(e.text);
|
|
2092
|
-
}
|
|
2093
|
-
});
|
|
2094
|
-
try {
|
|
2095
|
-
a = await n.generateFlow(r, { currentFlow: i.source });
|
|
2096
|
-
} finally {
|
|
2097
|
-
await n.shutdown();
|
|
2098
|
-
}
|
|
2099
|
-
}
|
|
2100
|
-
let s = await fetch("/_feltdb/proposals", {
|
|
2070
|
+
let t = await fetch("/_feltdb/intents", {
|
|
2101
2071
|
method: "POST",
|
|
2102
2072
|
headers: {
|
|
2103
2073
|
"content-type": "application/json",
|
|
2104
2074
|
"x-feltdb-studio-token": e.token
|
|
2105
2075
|
},
|
|
2106
|
-
body: JSON.stringify({
|
|
2107
|
-
}),
|
|
2108
|
-
if (!
|
|
2109
|
-
|
|
2076
|
+
body: JSON.stringify({ intent: r })
|
|
2077
|
+
}), i = await t.json();
|
|
2078
|
+
if (!t.ok) throw Error(i.error || i.intent?.ambiguities?.[0]?.message || i.blockers?.join(" · ") || "Intent execution failed");
|
|
2079
|
+
if (!i.proposal) {
|
|
2080
|
+
u(i.warnings?.join(" · ") || "No proposal was required.");
|
|
2081
|
+
return;
|
|
2082
|
+
}
|
|
2083
|
+
let a = i.proposal;
|
|
2084
|
+
o(a), c(i), i.proposalId && i.proposalId !== "ephemeral" && n?.(i.proposalId), b(x(a.proposedFlow).collections.map((e) => ({
|
|
2110
2085
|
name: e.name,
|
|
2111
2086
|
fields: e.fields.map((e) => e.name)
|
|
2112
2087
|
}))), u("Validated proposal ready for review");
|
|
@@ -2114,7 +2089,7 @@ function te({ configuration: e, onApplied: t, onProposalCreated: n }) {
|
|
|
2114
2089
|
u(e instanceof Error ? e.message : String(e));
|
|
2115
2090
|
}
|
|
2116
2091
|
}
|
|
2117
|
-
},
|
|
2092
|
+
}, w = async (t) => {
|
|
2118
2093
|
if (!(!s || !e)) {
|
|
2119
2094
|
u(t === "approve" ? "Recording approval…" : "Rejecting preview…");
|
|
2120
2095
|
try {
|
|
@@ -2143,52 +2118,21 @@ function te({ configuration: e, onApplied: t, onProposalCreated: n }) {
|
|
|
2143
2118
|
/* @__PURE__ */ g("div", { children: [
|
|
2144
2119
|
/* @__PURE__ */ h("span", {
|
|
2145
2120
|
className: "eyebrow",
|
|
2146
|
-
children: "
|
|
2121
|
+
children: "Unified intent engine"
|
|
2147
2122
|
}),
|
|
2148
2123
|
/* @__PURE__ */ h("h2", { children: "Ask FeltDB" }),
|
|
2149
|
-
/* @__PURE__ */ h("p", { children: "Describe
|
|
2124
|
+
/* @__PURE__ */ h("p", { children: "Describe the outcome. FeltDB resolves the intent, builds one implementation plan, validates it, and creates a durable proposal." })
|
|
2150
2125
|
] }),
|
|
2151
|
-
/* @__PURE__ */ g("
|
|
2152
|
-
className: "ai-model-choice",
|
|
2153
|
-
children: [
|
|
2154
|
-
"Model: ",
|
|
2155
|
-
/* @__PURE__ */ h("strong", { children: e?.aiModel?.model ?? "SmolLM2-360M-Instruct" }),
|
|
2156
|
-
" (",
|
|
2157
|
-
C ? "bring-your-own provider; credential held by CLI" : "private local WebLLM",
|
|
2158
|
-
"). Change it with ",
|
|
2159
|
-
/* @__PURE__ */ h("code", { children: "feltdb ai model set" }),
|
|
2160
|
-
"."
|
|
2161
|
-
]
|
|
2162
|
-
}),
|
|
2163
|
-
C && !e?.aiModel?.credentialConfigured ? /* @__PURE__ */ g("p", {
|
|
2164
|
-
className: "ai-unavailable",
|
|
2165
|
-
children: [
|
|
2166
|
-
"The selected hosted model needs a credential. Pipe it securely with ",
|
|
2167
|
-
/* @__PURE__ */ h("code", { children: "printf %s \"$KEY\" | feltdb ai model set ... --api-key-stdin" }),
|
|
2168
|
-
"."
|
|
2169
|
-
]
|
|
2170
|
-
}) : !C && !e?.webllmEnabled ? /* @__PURE__ */ g("p", {
|
|
2171
|
-
className: "ai-unavailable",
|
|
2172
|
-
children: [
|
|
2173
|
-
"Local AI is not enabled for this project. Install ",
|
|
2174
|
-
/* @__PURE__ */ h("code", { children: "@feltdb/webllm" }),
|
|
2175
|
-
" to opt in, or configure your own model with ",
|
|
2176
|
-
/* @__PURE__ */ h("code", { children: "feltdb ai model set" }),
|
|
2177
|
-
"."
|
|
2178
|
-
]
|
|
2179
|
-
}) : !C && !S ? /* @__PURE__ */ h("p", {
|
|
2180
|
-
className: "ai-unavailable",
|
|
2181
|
-
children: "Local FeltDB AI is unavailable because WebGPU is not available. You can configure an OpenAI-compatible model instead."
|
|
2182
|
-
}) : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("textarea", {
|
|
2126
|
+
/* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("textarea", {
|
|
2183
2127
|
"aria-label": "Ask FeltDB",
|
|
2184
2128
|
value: r,
|
|
2185
2129
|
onChange: (e) => i(e.target.value),
|
|
2186
|
-
placeholder: "
|
|
2130
|
+
placeholder: "Implement Stripe."
|
|
2187
2131
|
}), /* @__PURE__ */ h("button", {
|
|
2188
2132
|
className: "btn btn-primary",
|
|
2189
|
-
disabled: !r.trim(),
|
|
2190
|
-
onClick: () => void
|
|
2191
|
-
children: "
|
|
2133
|
+
disabled: !S || !r.trim(),
|
|
2134
|
+
onClick: () => void C(),
|
|
2135
|
+
children: "Execute intent"
|
|
2192
2136
|
})] }),
|
|
2193
2137
|
d > 0 && d < 1 && /* @__PURE__ */ h("progress", {
|
|
2194
2138
|
value: d,
|
|
@@ -2254,11 +2198,11 @@ function te({ configuration: e, onApplied: t, onProposalCreated: n }) {
|
|
|
2254
2198
|
!e?.previewOnly && /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("button", {
|
|
2255
2199
|
className: "btn btn-primary",
|
|
2256
2200
|
disabled: s.authorizationChanges.length > 0 && !_,
|
|
2257
|
-
onClick: () => void
|
|
2201
|
+
onClick: () => void w("approve"),
|
|
2258
2202
|
children: "Approve proposal"
|
|
2259
2203
|
}), /* @__PURE__ */ h("button", {
|
|
2260
2204
|
className: "btn",
|
|
2261
|
-
onClick: () => void
|
|
2205
|
+
onClick: () => void w("reject"),
|
|
2262
2206
|
children: "Reject preview"
|
|
2263
2207
|
})] }),
|
|
2264
2208
|
e?.previewOnly && /* @__PURE__ */ g("p", {
|
|
@@ -2285,18 +2229,19 @@ var ne = [
|
|
|
2285
2229
|
"applied",
|
|
2286
2230
|
"rejected",
|
|
2287
2231
|
"expired"
|
|
2288
|
-
],
|
|
2289
|
-
function
|
|
2232
|
+
], X = (e) => e ? `${e.slice(0, 12)}…` : "Not recorded", re = (e) => new Date(typeof e == "number" && e < 1e10 ? e * 1e3 : e).toLocaleString();
|
|
2233
|
+
function Z({ name: e, values: t }) {
|
|
2290
2234
|
return t.length ? /* @__PURE__ */ g("section", {
|
|
2291
2235
|
className: "semantic-section",
|
|
2292
2236
|
children: [/* @__PURE__ */ h("h4", { children: e }), t.map((e, t) => /* @__PURE__ */ g("div", { children: ["+ ", e] }, `${e}-${t}`))]
|
|
2293
2237
|
}) : null;
|
|
2294
2238
|
}
|
|
2295
|
-
function
|
|
2239
|
+
function ie({ value: e }) {
|
|
2296
2240
|
let t = {
|
|
2297
2241
|
contract_changed: "Contract changed since Proposal creation.",
|
|
2298
2242
|
flow_changed: "Flow changed since Proposal creation.",
|
|
2299
2243
|
module_versions_changed: "Resolved module versions changed.",
|
|
2244
|
+
evidence_changed: "Application evidence changed since Proposal creation.",
|
|
2300
2245
|
expired: "Proposal expired."
|
|
2301
2246
|
};
|
|
2302
2247
|
return /* @__PURE__ */ g("section", {
|
|
@@ -2323,29 +2268,92 @@ function ae({ value: e }) {
|
|
|
2323
2268
|
]
|
|
2324
2269
|
});
|
|
2325
2270
|
}
|
|
2271
|
+
function ae({ proposal: e }) {
|
|
2272
|
+
let t = e.understanding;
|
|
2273
|
+
if (!t) return null;
|
|
2274
|
+
let n = new Map(t.evidence.map((e) => [e.id, e]));
|
|
2275
|
+
return /* @__PURE__ */ g("section", {
|
|
2276
|
+
className: "proposal-understanding",
|
|
2277
|
+
children: [
|
|
2278
|
+
/* @__PURE__ */ h("h3", { children: "Understanding" }),
|
|
2279
|
+
/* @__PURE__ */ h("p", { children: "What FeltDB knew when this Proposal was created." }),
|
|
2280
|
+
t.inferences.map((e) => /* @__PURE__ */ g("article", { children: [
|
|
2281
|
+
/* @__PURE__ */ g("header", { children: [
|
|
2282
|
+
/* @__PURE__ */ h("strong", { children: e.claim }),
|
|
2283
|
+
/* @__PURE__ */ g("b", { children: [Math.round(e.confidence * 100), "%"] }),
|
|
2284
|
+
/* @__PURE__ */ h("span", { children: e.authority })
|
|
2285
|
+
] }),
|
|
2286
|
+
/* @__PURE__ */ h("p", { children: String(e.value) }),
|
|
2287
|
+
/* @__PURE__ */ h("small", { children: e.reason }),
|
|
2288
|
+
e.evidence.map((e) => /* @__PURE__ */ g("div", { children: [
|
|
2289
|
+
"↳ ",
|
|
2290
|
+
n.get(e)?.value ? String(n.get(e)?.value) : e,
|
|
2291
|
+
/* @__PURE__ */ h("code", { children: n.get(e)?.source_ref })
|
|
2292
|
+
] }, e))
|
|
2293
|
+
] }, e.id)),
|
|
2294
|
+
t.completeness && /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("h4", { children: [
|
|
2295
|
+
"Understanding completeness · ",
|
|
2296
|
+
t.completeness.score,
|
|
2297
|
+
"%"
|
|
2298
|
+
] }), t.completeness.findings.map((e) => /* @__PURE__ */ g("p", { children: [
|
|
2299
|
+
e.status === "complete" ? "✓" : e.status === "partial" ? "⚠" : "✗",
|
|
2300
|
+
" ",
|
|
2301
|
+
e.claim.replace(/_/g, " ")
|
|
2302
|
+
] }, e.claim))] }),
|
|
2303
|
+
t.unknowns.length > 0 && /* @__PURE__ */ g("div", {
|
|
2304
|
+
className: "understanding-unknowns",
|
|
2305
|
+
children: [/* @__PURE__ */ h("h4", { children: "Unknowns" }), t.unknowns.map((e) => /* @__PURE__ */ g("p", { children: [
|
|
2306
|
+
/* @__PURE__ */ h("strong", { children: e.claim }),
|
|
2307
|
+
/* @__PURE__ */ h("br", {}),
|
|
2308
|
+
/* @__PURE__ */ h("span", { children: e.reason })
|
|
2309
|
+
] }, e.claim))]
|
|
2310
|
+
}),
|
|
2311
|
+
/* @__PURE__ */ g("footer", { children: [/* @__PURE__ */ g("code", { children: ["Evidence ", X(t.evidence_hash)] }), /* @__PURE__ */ g("code", { children: ["Understanding ", X(t.understanding_hash)] })] })
|
|
2312
|
+
]
|
|
2313
|
+
});
|
|
2314
|
+
}
|
|
2326
2315
|
function oe({ artifact: e }) {
|
|
2327
2316
|
let t = e.current_contract ?? e.current, n = e.proposed_contract ?? e.proposed;
|
|
2328
2317
|
return /* @__PURE__ */ g("section", {
|
|
2329
2318
|
className: "proposal-runtime-preview",
|
|
2330
|
-
children: [
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
/* @__PURE__ */ h("
|
|
2344
|
-
n.schema.map((e) => /* @__PURE__ */ h("span", { children: e.name }, e.name))
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2319
|
+
children: [
|
|
2320
|
+
/* @__PURE__ */ g("div", {
|
|
2321
|
+
className: "preview-banner",
|
|
2322
|
+
children: [
|
|
2323
|
+
/* @__PURE__ */ h("b", { children: "PROPOSED PREVIEW" }),
|
|
2324
|
+
/* @__PURE__ */ h("br", {}),
|
|
2325
|
+
"Synthetic, isolated state. This is not the live application or repository."
|
|
2326
|
+
]
|
|
2327
|
+
}),
|
|
2328
|
+
/* @__PURE__ */ g("div", {
|
|
2329
|
+
className: "preview-comparison",
|
|
2330
|
+
children: [
|
|
2331
|
+
/* @__PURE__ */ g("section", { children: [/* @__PURE__ */ h("h4", { children: "Current" }), t.schema.map((e) => /* @__PURE__ */ h("span", { children: e.name }, e.name))] }),
|
|
2332
|
+
/* @__PURE__ */ h("i", { children: "→" }),
|
|
2333
|
+
/* @__PURE__ */ g("section", { children: [/* @__PURE__ */ h("h4", { children: "Proposed application" }), n.schema.map((e) => /* @__PURE__ */ h("span", { children: e.name }, e.name))] })
|
|
2334
|
+
]
|
|
2335
|
+
}),
|
|
2336
|
+
/* @__PURE__ */ h(Z, {
|
|
2337
|
+
name: "Relationships",
|
|
2338
|
+
values: e.relationships
|
|
2339
|
+
}),
|
|
2340
|
+
/* @__PURE__ */ h(Z, {
|
|
2341
|
+
name: "Capabilities",
|
|
2342
|
+
values: e.capabilities.map((e) => typeof e == "string" ? e : e.name ?? "").filter(Boolean)
|
|
2343
|
+
}),
|
|
2344
|
+
/* @__PURE__ */ h(Z, {
|
|
2345
|
+
name: "Workflows",
|
|
2346
|
+
values: e.workflows.map((e) => typeof e == "string" ? e : e.name ?? "").filter(Boolean)
|
|
2347
|
+
}),
|
|
2348
|
+
/* @__PURE__ */ h(Z, {
|
|
2349
|
+
name: "Events",
|
|
2350
|
+
values: e.events
|
|
2351
|
+
}),
|
|
2352
|
+
e.state_flow.map((e) => /* @__PURE__ */ h("div", {
|
|
2353
|
+
className: "reconciliation-flow",
|
|
2354
|
+
children: e.split(/\s*->\s*/).map((t, n) => /* @__PURE__ */ g(s.Fragment, { children: [/* @__PURE__ */ h("span", { children: t }), n < e.split(/\s*->\s*/).length - 1 && /* @__PURE__ */ h("i", { children: "↓" })] }, `${t}-${n}`))
|
|
2355
|
+
}, e))
|
|
2356
|
+
]
|
|
2349
2357
|
});
|
|
2350
2358
|
}
|
|
2351
2359
|
function se({ value: e }) {
|
|
@@ -2354,24 +2362,62 @@ function se({ value: e }) {
|
|
|
2354
2362
|
children: [/* @__PURE__ */ h("h3", { children: "Repository" }), e ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("strong", { children: e.ready ? "✓ READY FOR CLI APPLY" : "⚠ BLOCKED" }), /* @__PURE__ */ g("ul", { children: [
|
|
2355
2363
|
/* @__PURE__ */ g("li", { children: [
|
|
2356
2364
|
e.contractMatches ? "✓" : "⚠",
|
|
2357
|
-
" Contract
|
|
2365
|
+
" Contract",
|
|
2366
|
+
" ",
|
|
2358
2367
|
e.contractMatches ? "matches Proposal" : "does not match"
|
|
2359
2368
|
] }),
|
|
2360
2369
|
/* @__PURE__ */ g("li", { children: [
|
|
2361
2370
|
e.flowMatches ? "✓" : "⚠",
|
|
2362
|
-
" Flow
|
|
2371
|
+
" Flow",
|
|
2372
|
+
" ",
|
|
2363
2373
|
e.flowMatches ? "matches Proposal" : "does not match"
|
|
2364
2374
|
] }),
|
|
2365
2375
|
/* @__PURE__ */ h("li", { children: e.gitClean ? "✓ Clean" : "⚠ Local source conflicts" }),
|
|
2366
2376
|
e.conflicts.map((e) => /* @__PURE__ */ h("li", { children: /* @__PURE__ */ h("code", { children: e }) }, e))
|
|
2367
2377
|
] })] }) : /* @__PURE__ */ g("p", { children: [
|
|
2368
|
-
"Repository context is available when Studio is opened through
|
|
2378
|
+
"Repository context is available when Studio is opened through",
|
|
2379
|
+
" ",
|
|
2369
2380
|
/* @__PURE__ */ h("code", { children: "feltdb studio" }),
|
|
2370
2381
|
"."
|
|
2371
2382
|
] })]
|
|
2372
2383
|
});
|
|
2373
2384
|
}
|
|
2374
|
-
function
|
|
2385
|
+
function ce({ value: e }) {
|
|
2386
|
+
return e ? /* @__PURE__ */ g("section", {
|
|
2387
|
+
className: `proposal-verification ${e.status}`,
|
|
2388
|
+
children: [
|
|
2389
|
+
/* @__PURE__ */ h("h3", { children: "Verification" }),
|
|
2390
|
+
/* @__PURE__ */ h("strong", { children: e.status.toUpperCase().replace("_", " ") }),
|
|
2391
|
+
/* @__PURE__ */ g("p", { children: [
|
|
2392
|
+
"Confidence ",
|
|
2393
|
+
Math.round(e.confidence * 100),
|
|
2394
|
+
"%"
|
|
2395
|
+
] }),
|
|
2396
|
+
e.findings.map((e, t) => /* @__PURE__ */ g("div", { children: [
|
|
2397
|
+
/* @__PURE__ */ g("b", { children: [
|
|
2398
|
+
e.status === "satisfied" ? "✓" : e.status === "unverified" || e.status === "partial" ? "⚠" : "✗",
|
|
2399
|
+
" ",
|
|
2400
|
+
e.surface
|
|
2401
|
+
] }),
|
|
2402
|
+
" ",
|
|
2403
|
+
e.claim,
|
|
2404
|
+
/* @__PURE__ */ h("small", { children: e.reason })
|
|
2405
|
+
] }, `${e.claim}-${t}`))
|
|
2406
|
+
]
|
|
2407
|
+
}) : /* @__PURE__ */ g("section", {
|
|
2408
|
+
className: "proposal-verification",
|
|
2409
|
+
children: [
|
|
2410
|
+
/* @__PURE__ */ h("h3", { children: "Verification" }),
|
|
2411
|
+
/* @__PURE__ */ h("strong", { children: "UNVERIFIED" }),
|
|
2412
|
+
/* @__PURE__ */ g("p", { children: [
|
|
2413
|
+
"Run ",
|
|
2414
|
+
/* @__PURE__ */ h("code", { children: "feltdb ai verify <proposal-id>" }),
|
|
2415
|
+
" after application."
|
|
2416
|
+
] })
|
|
2417
|
+
]
|
|
2418
|
+
});
|
|
2419
|
+
}
|
|
2420
|
+
function le({ serviceUrl: t = "", token: n = "", applicationId: r, environment: d, applicationName: p, sourceSync: _ }) {
|
|
2375
2421
|
let v = u(() => new i({
|
|
2376
2422
|
baseUrl: t,
|
|
2377
2423
|
token: n,
|
|
@@ -2382,62 +2428,63 @@ function Z({ serviceUrl: t = "", token: n = "", applicationId: r, environment: d
|
|
|
2382
2428
|
n,
|
|
2383
2429
|
r,
|
|
2384
2430
|
d
|
|
2385
|
-
]), [y, b] = f([]), [x, S] = f(), [C, w] = f([]), [T, E] = f(), [D, O] = f(), [k, A] = f(), [j, M] = f(
|
|
2386
|
-
|
|
2431
|
+
]), [y, b] = f([]), [x, S] = f(), [C, w] = f([]), [T, E] = f(), [D, O] = f(), [k, A] = f(), [j, M] = f(), [N, P] = f(""), [F, I] = f(), [L, R] = f(null), [z, B] = f([]), [V, H] = f(!0), [U, W] = f(""), [G, K] = f(!1), [q, J] = f(!1), [Y, ee] = f(""), [le, ue] = f(!1), Q = c(async (t, n = !0) => {
|
|
2432
|
+
H(!0);
|
|
2387
2433
|
try {
|
|
2388
|
-
let e = await v.list(
|
|
2389
|
-
b(e.proposals),
|
|
2434
|
+
let e = await v.list(N, t);
|
|
2435
|
+
b(e.proposals), I(t), R(e.pagination?.nextCursor ?? null), W("");
|
|
2390
2436
|
} catch (r) {
|
|
2391
2437
|
if (n && t && r instanceof e && r.code === "invalid_cursor") {
|
|
2392
|
-
|
|
2438
|
+
B([]), await Q(void 0, !1), W(a(r));
|
|
2393
2439
|
return;
|
|
2394
2440
|
}
|
|
2395
|
-
|
|
2441
|
+
W(a(r));
|
|
2396
2442
|
} finally {
|
|
2397
|
-
|
|
2443
|
+
H(!1);
|
|
2398
2444
|
}
|
|
2399
|
-
}, [v,
|
|
2400
|
-
|
|
2445
|
+
}, [v, N]), $ = c(async (e) => {
|
|
2446
|
+
W("");
|
|
2401
2447
|
try {
|
|
2402
|
-
let [t, n, r] = await Promise.all([
|
|
2448
|
+
let [t, n, r, i] = await Promise.all([
|
|
2403
2449
|
v.get(e),
|
|
2404
2450
|
v.status(e),
|
|
2405
|
-
v.history(e)
|
|
2451
|
+
v.history(e),
|
|
2452
|
+
v.convergence(e)
|
|
2406
2453
|
]);
|
|
2407
|
-
S(t), E(n), w(r.events), fetch(`/_feltdb/repository-readiness?proposal=${encodeURIComponent(e)}`, { cache: "no-store" }).then((e) => e.ok ? e.json() : void 0).then(A).catch(() => A(void 0)), t.preview_id ? v.preview(t.preview_id).then(O).catch((e) =>
|
|
2454
|
+
S(t), E(n), w(r.events), M(i.convergence[0]), fetch(`/_feltdb/repository-readiness?proposal=${encodeURIComponent(e)}`, { cache: "no-store" }).then((e) => e.ok ? e.json() : void 0).then(A).catch(() => A(void 0)), t.preview_id ? v.preview(t.preview_id).then(O).catch((e) => W(a(e))) : O(void 0);
|
|
2408
2455
|
} catch (e) {
|
|
2409
|
-
|
|
2456
|
+
W(a(e));
|
|
2410
2457
|
}
|
|
2411
2458
|
}, [v]);
|
|
2412
2459
|
l(() => {
|
|
2413
|
-
|
|
2414
|
-
}, [
|
|
2460
|
+
B([]), Q();
|
|
2461
|
+
}, [Q]), l(() => {
|
|
2415
2462
|
if (!x?.id) return;
|
|
2416
2463
|
let e = window.setInterval(() => {
|
|
2417
|
-
|
|
2464
|
+
$(x.id), Q(F);
|
|
2418
2465
|
}, 5e3);
|
|
2419
2466
|
return () => window.clearInterval(e);
|
|
2420
2467
|
}, [
|
|
2421
2468
|
x?.id,
|
|
2469
|
+
$,
|
|
2422
2470
|
Q,
|
|
2423
|
-
|
|
2424
|
-
N
|
|
2471
|
+
F
|
|
2425
2472
|
]);
|
|
2426
|
-
let
|
|
2427
|
-
await
|
|
2428
|
-
},
|
|
2473
|
+
let de = async () => {
|
|
2474
|
+
await Q(F), x && await $(x.id);
|
|
2475
|
+
}, fe = async (e) => {
|
|
2429
2476
|
if (x) try {
|
|
2430
|
-
e === "approve" ? await v.approve(x.id,
|
|
2477
|
+
e === "approve" ? await v.approve(x.id, le) : await v.reject(x.id, Y || void 0), K(!1), J(!1), await de();
|
|
2431
2478
|
} catch (e) {
|
|
2432
|
-
|
|
2479
|
+
W(a(e));
|
|
2433
2480
|
}
|
|
2434
|
-
},
|
|
2481
|
+
}, pe = async () => {
|
|
2435
2482
|
if (x) try {
|
|
2436
|
-
x.status === "proposed" ? await v.validate(x.id) : await v.createPreview(x.id), await
|
|
2483
|
+
x.status === "proposed" ? await v.validate(x.id) : await v.createPreview(x.id), await de();
|
|
2437
2484
|
} catch (e) {
|
|
2438
|
-
|
|
2485
|
+
W(a(e));
|
|
2439
2486
|
}
|
|
2440
|
-
},
|
|
2487
|
+
}, me = x ? o(x) : void 0, he = x?.warnings.some((e) => e.startsWith("Authorization "));
|
|
2441
2488
|
return /* @__PURE__ */ g("div", {
|
|
2442
2489
|
className: "proposal-workspace",
|
|
2443
2490
|
children: [
|
|
@@ -2456,13 +2503,13 @@ function Z({ serviceUrl: t = "", token: n = "", applicationId: r, environment: d
|
|
|
2456
2503
|
] }),
|
|
2457
2504
|
/* @__PURE__ */ h(te, {
|
|
2458
2505
|
configuration: _,
|
|
2459
|
-
onProposalCreated: () => void
|
|
2506
|
+
onProposalCreated: () => void Q()
|
|
2460
2507
|
}),
|
|
2461
|
-
|
|
2508
|
+
U && /* @__PURE__ */ g("div", {
|
|
2462
2509
|
className: "data-error",
|
|
2463
2510
|
role: "alert",
|
|
2464
|
-
children: [
|
|
2465
|
-
onClick: () => void
|
|
2511
|
+
children: [U, /* @__PURE__ */ h("button", {
|
|
2512
|
+
onClick: () => void de(),
|
|
2466
2513
|
children: "Refresh"
|
|
2467
2514
|
})]
|
|
2468
2515
|
}),
|
|
@@ -2473,35 +2520,35 @@ function Z({ serviceUrl: t = "", token: n = "", applicationId: r, environment: d
|
|
|
2473
2520
|
children: [
|
|
2474
2521
|
/* @__PURE__ */ g("header", { children: [/* @__PURE__ */ h("h2", { children: "Proposals" }), /* @__PURE__ */ h("select", {
|
|
2475
2522
|
"aria-label": "Proposal status",
|
|
2476
|
-
value:
|
|
2477
|
-
onChange: (e) =>
|
|
2523
|
+
value: N,
|
|
2524
|
+
onChange: (e) => P(e.target.value),
|
|
2478
2525
|
children: ne.map((e) => /* @__PURE__ */ h("option", {
|
|
2479
2526
|
value: e,
|
|
2480
2527
|
children: e ? e.toUpperCase() : "ALL STATUSES"
|
|
2481
2528
|
}, e || "all"))
|
|
2482
2529
|
})] }),
|
|
2483
|
-
|
|
2530
|
+
V ? /* @__PURE__ */ h("p", { children: "Loading…" }) : y.length ? y.map((e) => /* @__PURE__ */ g("button", {
|
|
2484
2531
|
className: `proposal-list-row ${x?.id === e.id ? "active" : ""}`,
|
|
2485
|
-
onClick: () => void
|
|
2532
|
+
onClick: () => void $(e.id),
|
|
2486
2533
|
children: [/* @__PURE__ */ g("span", { children: [/* @__PURE__ */ h("strong", { children: e.summary }), /* @__PURE__ */ g("small", { children: [
|
|
2487
2534
|
e.id,
|
|
2488
2535
|
" · ",
|
|
2489
|
-
|
|
2536
|
+
re(e.created_at)
|
|
2490
2537
|
] })] }), /* @__PURE__ */ h("b", { children: e.status })]
|
|
2491
2538
|
}, e.id)) : /* @__PURE__ */ h("p", { children: "No Proposals yet. Ask FeltDB AI to propose an application change." }),
|
|
2492
2539
|
/* @__PURE__ */ g("footer", {
|
|
2493
2540
|
className: "data-pagination",
|
|
2494
2541
|
children: [/* @__PURE__ */ h("button", {
|
|
2495
|
-
disabled: !
|
|
2542
|
+
disabled: !z.length,
|
|
2496
2543
|
onClick: () => {
|
|
2497
|
-
let e =
|
|
2498
|
-
|
|
2544
|
+
let e = z.at(-1);
|
|
2545
|
+
B((e) => e.slice(0, -1)), Q(e);
|
|
2499
2546
|
},
|
|
2500
2547
|
children: "←"
|
|
2501
2548
|
}), /* @__PURE__ */ h("button", {
|
|
2502
|
-
disabled: !
|
|
2549
|
+
disabled: !L,
|
|
2503
2550
|
onClick: () => {
|
|
2504
|
-
|
|
2551
|
+
B((e) => [...e, F]), Q(L || void 0);
|
|
2505
2552
|
},
|
|
2506
2553
|
children: "→"
|
|
2507
2554
|
})]
|
|
@@ -2516,11 +2563,15 @@ function Z({ serviceUrl: t = "", token: n = "", applicationId: r, environment: d
|
|
|
2516
2563
|
children: x.status
|
|
2517
2564
|
}),
|
|
2518
2565
|
/* @__PURE__ */ h("h2", { children: x.summary }),
|
|
2519
|
-
x.parent_proposal_id && /* @__PURE__ */ g("p", { children: [
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2566
|
+
x.parent_proposal_id && /* @__PURE__ */ g("p", { children: [
|
|
2567
|
+
"Incremental Proposal · Based on",
|
|
2568
|
+
" ",
|
|
2569
|
+
/* @__PURE__ */ h("button", {
|
|
2570
|
+
className: "reference-value",
|
|
2571
|
+
onClick: () => void $(x.parent_proposal_id),
|
|
2572
|
+
children: x.parent_proposal_id
|
|
2573
|
+
})
|
|
2574
|
+
] })
|
|
2524
2575
|
] }), /* @__PURE__ */ g("dl", { children: [
|
|
2525
2576
|
/* @__PURE__ */ h("dt", { children: "Application" }),
|
|
2526
2577
|
/* @__PURE__ */ h("dd", { children: p || x.application_id }),
|
|
@@ -2530,25 +2581,27 @@ function Z({ serviceUrl: t = "", token: n = "", applicationId: r, environment: d
|
|
|
2530
2581
|
/* @__PURE__ */ g("dd", { children: [
|
|
2531
2582
|
"v",
|
|
2532
2583
|
x.base_contract_version,
|
|
2533
|
-
" ·
|
|
2534
|
-
|
|
2584
|
+
" ·",
|
|
2585
|
+
" ",
|
|
2586
|
+
/* @__PURE__ */ h("code", { children: X(x.base_contract_hash) })
|
|
2535
2587
|
] }),
|
|
2536
2588
|
/* @__PURE__ */ h("dt", { children: "Flow" }),
|
|
2537
|
-
/* @__PURE__ */ h("dd", { children: /* @__PURE__ */ h("code", { children:
|
|
2589
|
+
/* @__PURE__ */ h("dd", { children: /* @__PURE__ */ h("code", { children: X(x.base_flow_hash) }) })
|
|
2538
2590
|
] })] }),
|
|
2539
|
-
x.module_versions.length > 0 && /* @__PURE__ */ h(
|
|
2591
|
+
x.module_versions.length > 0 && /* @__PURE__ */ h(Z, {
|
|
2540
2592
|
name: "Modules",
|
|
2541
2593
|
values: x.module_versions.map((e) => `${e.id} (${e.provider}) ${e.version}`)
|
|
2542
2594
|
}),
|
|
2595
|
+
/* @__PURE__ */ h(ae, { proposal: x }),
|
|
2543
2596
|
/* @__PURE__ */ g("section", {
|
|
2544
2597
|
className: "semantic-diff",
|
|
2545
2598
|
children: [
|
|
2546
2599
|
/* @__PURE__ */ h("h3", { children: "Current application → Semantic diff → Proposed application" }),
|
|
2547
|
-
|
|
2600
|
+
me && Object.entries(me).map(([e, t]) => /* @__PURE__ */ h(Z, {
|
|
2548
2601
|
name: e,
|
|
2549
2602
|
values: t
|
|
2550
2603
|
}, e)),
|
|
2551
|
-
/* @__PURE__ */ h(
|
|
2604
|
+
/* @__PURE__ */ h(Z, {
|
|
2552
2605
|
name: "Semantic Diff",
|
|
2553
2606
|
values: x.contract_diff
|
|
2554
2607
|
})
|
|
@@ -2575,8 +2628,9 @@ function Z({ serviceUrl: t = "", token: n = "", applicationId: r, environment: d
|
|
|
2575
2628
|
/* @__PURE__ */ h("small", { children: "Required · Secret · Value never exposed" })
|
|
2576
2629
|
] }, e))
|
|
2577
2630
|
] }),
|
|
2578
|
-
T && /* @__PURE__ */ h(
|
|
2631
|
+
T && /* @__PURE__ */ h(ie, { value: T }),
|
|
2579
2632
|
D && /* @__PURE__ */ h(oe, { artifact: D }),
|
|
2633
|
+
x.status === "applied" && /* @__PURE__ */ h(ce, { value: j }),
|
|
2580
2634
|
/* @__PURE__ */ g("section", { children: [/* @__PURE__ */ h("h3", { children: "Source plan" }), x.source_plan.files.map((e) => /* @__PURE__ */ h("p", { children: /* @__PURE__ */ g("code", { children: [
|
|
2581
2635
|
e.operation,
|
|
2582
2636
|
" ",
|
|
@@ -2587,18 +2641,18 @@ function Z({ serviceUrl: t = "", token: n = "", applicationId: r, environment: d
|
|
|
2587
2641
|
className: "proposal-history",
|
|
2588
2642
|
children: C.map((e) => /* @__PURE__ */ g("li", { children: [
|
|
2589
2643
|
/* @__PURE__ */ h("strong", { children: e.to_status }),
|
|
2590
|
-
/* @__PURE__ */ h("span", { children:
|
|
2644
|
+
/* @__PURE__ */ h("span", { children: re(e.created_at) }),
|
|
2591
2645
|
/* @__PURE__ */ h("small", { children: e.actor })
|
|
2592
2646
|
] }, e.id))
|
|
2593
2647
|
})] }),
|
|
2594
2648
|
x.status === "proposed" && /* @__PURE__ */ h("button", {
|
|
2595
2649
|
className: "btn btn-primary",
|
|
2596
|
-
onClick: () => void
|
|
2650
|
+
onClick: () => void pe(),
|
|
2597
2651
|
children: "Validate Proposal"
|
|
2598
2652
|
}),
|
|
2599
2653
|
x.status === "validated" && /* @__PURE__ */ h("button", {
|
|
2600
2654
|
className: "btn btn-primary",
|
|
2601
|
-
onClick: () => void
|
|
2655
|
+
onClick: () => void pe(),
|
|
2602
2656
|
children: "Create Proposed Preview"
|
|
2603
2657
|
}),
|
|
2604
2658
|
x.status === "previewed" && /* @__PURE__ */ g("div", {
|
|
@@ -2606,17 +2660,17 @@ function Z({ serviceUrl: t = "", token: n = "", applicationId: r, environment: d
|
|
|
2606
2660
|
children: [/* @__PURE__ */ h("button", {
|
|
2607
2661
|
className: "btn btn-primary",
|
|
2608
2662
|
disabled: T?.readiness === "blocked",
|
|
2609
|
-
onClick: () =>
|
|
2663
|
+
onClick: () => K(!0),
|
|
2610
2664
|
children: "Approve Proposal"
|
|
2611
2665
|
}), /* @__PURE__ */ h("button", {
|
|
2612
2666
|
className: "btn btn-ghost",
|
|
2613
|
-
onClick: () =>
|
|
2667
|
+
onClick: () => J(!0),
|
|
2614
2668
|
children: "Reject"
|
|
2615
2669
|
})]
|
|
2616
2670
|
}),
|
|
2617
2671
|
["proposed", "validated"].includes(x.status) && /* @__PURE__ */ h("button", {
|
|
2618
2672
|
className: "btn btn-ghost",
|
|
2619
|
-
onClick: () =>
|
|
2673
|
+
onClick: () => J(!0),
|
|
2620
2674
|
children: "Reject"
|
|
2621
2675
|
}),
|
|
2622
2676
|
x.status === "approved" && /* @__PURE__ */ g("section", {
|
|
@@ -2638,7 +2692,7 @@ function Z({ serviceUrl: t = "", token: n = "", applicationId: r, environment: d
|
|
|
2638
2692
|
})
|
|
2639
2693
|
})]
|
|
2640
2694
|
}),
|
|
2641
|
-
|
|
2695
|
+
G && x && /* @__PURE__ */ h("div", {
|
|
2642
2696
|
className: "proposal-modal",
|
|
2643
2697
|
role: "dialog",
|
|
2644
2698
|
"aria-modal": "true",
|
|
@@ -2647,22 +2701,26 @@ function Z({ serviceUrl: t = "", token: n = "", applicationId: r, environment: d
|
|
|
2647
2701
|
/* @__PURE__ */ h("p", { children: x.summary }),
|
|
2648
2702
|
x.contract_diff.slice(0, 6).map((e) => /* @__PURE__ */ h("div", { children: e }, e)),
|
|
2649
2703
|
/* @__PURE__ */ h("p", { children: /* @__PURE__ */ h("strong", { children: "Repository source will not be modified." }) }),
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2704
|
+
he && /* @__PURE__ */ g("label", { children: [
|
|
2705
|
+
/* @__PURE__ */ h("input", {
|
|
2706
|
+
type: "checkbox",
|
|
2707
|
+
checked: le,
|
|
2708
|
+
onChange: (e) => ue(e.target.checked)
|
|
2709
|
+
}),
|
|
2710
|
+
" ",
|
|
2711
|
+
"I explicitly approve the authorization change."
|
|
2712
|
+
] }),
|
|
2655
2713
|
/* @__PURE__ */ g("footer", { children: [/* @__PURE__ */ h("button", {
|
|
2656
|
-
onClick: () =>
|
|
2714
|
+
onClick: () => K(!1),
|
|
2657
2715
|
children: "Cancel"
|
|
2658
2716
|
}), /* @__PURE__ */ h("button", {
|
|
2659
|
-
disabled:
|
|
2660
|
-
onClick: () => void
|
|
2717
|
+
disabled: he && !le,
|
|
2718
|
+
onClick: () => void fe("approve"),
|
|
2661
2719
|
children: "Approve"
|
|
2662
2720
|
})] })
|
|
2663
2721
|
] })
|
|
2664
2722
|
}),
|
|
2665
|
-
|
|
2723
|
+
q && x && /* @__PURE__ */ h("div", {
|
|
2666
2724
|
className: "proposal-modal",
|
|
2667
2725
|
role: "dialog",
|
|
2668
2726
|
"aria-modal": "true",
|
|
@@ -2670,15 +2728,15 @@ function Z({ serviceUrl: t = "", token: n = "", applicationId: r, environment: d
|
|
|
2670
2728
|
/* @__PURE__ */ h("h2", { children: "Reject Proposal?" }),
|
|
2671
2729
|
/* @__PURE__ */ h("textarea", {
|
|
2672
2730
|
"aria-label": "Rejection reason",
|
|
2673
|
-
value:
|
|
2674
|
-
onChange: (e) =>
|
|
2731
|
+
value: Y,
|
|
2732
|
+
onChange: (e) => ee(e.target.value),
|
|
2675
2733
|
placeholder: "Optional reason"
|
|
2676
2734
|
}),
|
|
2677
2735
|
/* @__PURE__ */ g("footer", { children: [/* @__PURE__ */ h("button", {
|
|
2678
|
-
onClick: () =>
|
|
2736
|
+
onClick: () => J(!1),
|
|
2679
2737
|
children: "Cancel"
|
|
2680
2738
|
}), /* @__PURE__ */ h("button", {
|
|
2681
|
-
onClick: () => void
|
|
2739
|
+
onClick: () => void fe("reject"),
|
|
2682
2740
|
children: "Reject"
|
|
2683
2741
|
})] })
|
|
2684
2742
|
] })
|
|
@@ -2688,7 +2746,7 @@ function Z({ serviceUrl: t = "", token: n = "", applicationId: r, environment: d
|
|
|
2688
2746
|
}
|
|
2689
2747
|
//#endregion
|
|
2690
2748
|
//#region src/components/ModuleExplorer.tsx
|
|
2691
|
-
function
|
|
2749
|
+
function ue({ model: e }) {
|
|
2692
2750
|
let t = C(e?.modules ?? []);
|
|
2693
2751
|
return /* @__PURE__ */ g("section", {
|
|
2694
2752
|
className: "module-explorer",
|
|
@@ -2755,7 +2813,7 @@ function Q({ model: e }) {
|
|
|
2755
2813
|
}
|
|
2756
2814
|
//#endregion
|
|
2757
2815
|
//#region src/components/ContractInspector.tsx
|
|
2758
|
-
function
|
|
2816
|
+
function Q({ model: e, section: t }) {
|
|
2759
2817
|
return e ? /* @__PURE__ */ g("div", {
|
|
2760
2818
|
className: "studio-model-page",
|
|
2761
2819
|
children: [/* @__PURE__ */ g("header", { children: [/* @__PURE__ */ h("span", {
|
|
@@ -2784,4 +2842,4 @@ function $({ model: e, section: t }) {
|
|
|
2784
2842
|
});
|
|
2785
2843
|
}
|
|
2786
2844
|
//#endregion
|
|
2787
|
-
export { A as C, j as S, T, R as _, ee as a, N as b, K as c, U as d, H as f, P as g, F as h, te as i, G as l, L as m,
|
|
2845
|
+
export { A as C, j as S, T, R as _, ee as a, N as b, K as c, U as d, H as f, P as g, F as h, te as i, G as l, L as m, ue as n, J as o, V as p, le as r, q as s, Q as t, W as u, z as v, O as w, M as x, I as y };
|