@kky42/pievo-server 2.0.2 → 2.0.3
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/.output/nitro.json +1 -1
- package/.output/public/assets/{LoopView-XXW59HAV.js → LoopView-CCYqXrKq.js} +3 -3
- package/.output/public/assets/{Modal-BnCPgN_k.js → Modal-BhRzAXQg.js} +1 -1
- package/.output/public/assets/{SignIn-BAoOONQ9.js → SignIn-CV3jqX_8.js} +1 -1
- package/.output/public/assets/{actionUi-Dxe9cHAc.js → actionUi-BRtdWVvO.js} +1 -1
- package/.output/public/assets/app-B03JVnFn.css +2 -0
- package/.output/public/assets/index-BATGA0jG.js +12 -0
- package/.output/public/assets/{invite._token-BAqaXvte.js → invite._token-CQgv8lTC.js} +1 -1
- package/.output/public/assets/{invite._token-q54LLZ6A.js → invite._token-Dp2HL9X5.js} +1 -1
- package/.output/public/assets/lifecycleUi-C3k2MlX8.js +1 -0
- package/.output/public/assets/loops._loopId-C9vRjZ8W.js +4 -0
- package/.output/public/assets/{loops._loopId_.runs._runId-lGYlHXTN.js → loops._loopId_.runs._runId-BNN-dLrW.js} +2 -2
- package/.output/public/assets/notifyFns-DuBElaqG.js +1 -0
- package/.output/public/assets/{preload-helper-ycaoAemE.js → preload-helper-3xcHsDtt.js} +1 -1
- package/.output/public/assets/{routes-C7Pw5lGn.js → routes-CmuCVIIS.js} +1 -1
- package/.output/public/assets/{routes-D0zKR7gK.js → routes-YnrsFY5X.js} +1 -1
- package/.output/public/assets/{t._teamId-CCgajlMS.js → t._teamId-Bi-C9s5j.js} +1 -1
- package/.output/public/assets/{t._teamId-Cn7cRGAh.js → t._teamId-BlE4mCSj.js} +1 -1
- package/.output/public/assets/ui-By58RJgB.js +1 -0
- package/.output/server/_ssr/{DashboardView-BhJBW7IL.mjs → DashboardView-2eNPqWcy.mjs} +34 -109
- package/.output/server/_ssr/{LoopPlaybook-BC9Dvnw2.mjs → LoopPlaybook-CnQ8Qgyf.mjs} +8 -8
- package/.output/server/_ssr/{LoopView-Dom6Ad5G.mjs → LoopView-DM30OPCN.mjs} +13 -13
- package/.output/server/_ssr/{Modal-CfWC9R49.mjs → Modal-B7gBr5Pm.mjs} +2 -2
- package/.output/server/_ssr/{SignIn-D70NUJsN.mjs → SignIn-CaAi4_mk.mjs} +3 -3
- package/.output/server/_ssr/{actionUi-mDYOvJdB.mjs → actionUi-Be7dmMxb.mjs} +2 -2
- package/.output/server/_ssr/{adapters-D0d1fBKK.mjs → adapters-CHURWoZx.mjs} +4 -8
- package/.output/server/_ssr/{artifactFiles-BfE1070_.mjs → artifactFiles-D6b_RP78.mjs} +3 -3
- package/.output/server/_ssr/artifacts-CXMpBzMY.mjs +2 -0
- package/.output/server/_ssr/{auth-BP81awUE.mjs → auth-B_OxPpFr.mjs} +9 -9
- package/.output/server/_ssr/{boot-sM4t8RJu.mjs → boot-BNoivm21.mjs} +250 -489
- package/.output/server/_ssr/boot-C9VAWt9Z.mjs +2 -0
- package/.output/server/_ssr/{bun-sqlite-dialect-BW9W1_Ps-CZJuWL5Z.mjs → bun-sqlite-dialect-BW9W1_Ps-B3RHdVjo.mjs} +2 -2
- package/.output/server/_ssr/{d1-sqlite-dialect-BLC8LXE6-C2PCtZfI.mjs → d1-sqlite-dialect-BLC8LXE6-DpVe1foU.mjs} +2 -2
- package/.output/server/_ssr/db-C11vQNxP.mjs +2 -0
- package/.output/server/_ssr/{dist-Z7v6ihws.mjs → dist-BTx1ljg7.mjs} +2 -2
- package/.output/server/_ssr/{factory-BQ_XiP23.mjs → factory-TSnFcS96.mjs} +2 -2
- package/.output/server/_ssr/{invite._token-CRAl6-yK.mjs → invite._token-CDpO3cfB.mjs} +5 -5
- package/.output/server/_ssr/{invite._token-23daBIfe.mjs → invite._token-CvqaKH2R.mjs} +2 -2
- package/.output/server/_ssr/{invite._token-VKmyC9-R.mjs → invite._token-DWOPXXLS.mjs} +4 -4
- package/.output/server/_ssr/{kysely-adapter-DjQPkqgJ.mjs → kysely-adapter-BWjzeCGK.mjs} +1 -1
- package/.output/server/_ssr/{lifecycleUi-l3nx9i3T.mjs → lifecycleUi-5jMhxINb.mjs} +1 -3
- package/.output/server/_ssr/logger-DE_PU5bE.mjs +2 -0
- package/.output/server/_ssr/{loopApi-i7xdpokI.mjs → loopApi-Cpm8YV3U.mjs} +22 -16
- package/.output/server/_ssr/{loops._loopId-jXSgPWG1.mjs → loops._loopId-C-y4Pux_.mjs} +3 -3
- package/.output/server/_ssr/{loops._loopId-DOPfN_Op.mjs → loops._loopId-DfrHw2mZ.mjs} +31 -57
- package/.output/server/_ssr/{loops._loopId_.runs._runId-BhoM6DWj.mjs → loops._loopId_.runs._runId-BXyyqXwX.mjs} +3 -3
- package/.output/server/_ssr/{loops._loopId_.runs._runId-DiBP2rCe.mjs → loops._loopId_.runs._runId-C9d0EC2Q.mjs} +9 -16
- package/.output/server/_ssr/{machineFns-ChO1NM3C.mjs → machineFns-CRbwYxD3.mjs} +3 -3
- package/.output/server/_ssr/{node-sqlite-dialect-BGlhyZkk.mjs → node-sqlite-dialect-B10G6C4W.mjs} +2 -2
- package/.output/server/_ssr/{notifyFns-DWotltSJ.mjs → notifyFns-CtmSVNmE.mjs} +6 -7
- package/.output/server/_ssr/{notifyFns-B1MSIzrT.mjs → notifyFns-DvH4C-GH.mjs} +3 -3
- package/.output/server/_ssr/{router-BOHN4CWd.mjs → router-B4ipreZ4.mjs} +30 -30
- package/.output/server/_ssr/{routes-DjaTMZqZ.mjs → routes-DKox93l0.mjs} +2 -2
- package/.output/server/_ssr/{routes-BQjhKV-m.mjs → routes-iHT61OkI.mjs} +5 -5
- package/.output/server/_ssr/{routes-C2VJzARp.mjs → routes-l7tUe3lr.mjs} +5 -5
- package/.output/server/_ssr/{runDiff-SlGPjjNq.mjs → runDiff-Bohd5W5R.mjs} +2 -2
- package/.output/server/_ssr/ssr.mjs +48 -48
- package/.output/server/_ssr/store-Ck7kCAGf.mjs +2 -0
- package/.output/server/_ssr/{t._teamId-D_vi_OuG.mjs → t._teamId-B3g0Cs8B.mjs} +2 -2
- package/.output/server/_ssr/{t._teamId-o86wLJrg.mjs → t._teamId-BPK2mrN3.mjs} +5 -5
- package/.output/server/_ssr/{t._teamId-CRgNlDGk.mjs → t._teamId-jO8dUmSQ.mjs} +5 -5
- package/.output/server/_ssr/{teamFns-C3vnwAqv.mjs → teamFns-6zjFV7lM.mjs} +3 -3
- package/.output/server/_ssr/tokens-oJm6yFyt.mjs +2 -0
- package/.output/server/_ssr/{ui-WGITbP6Z.mjs → ui-CI-OeTr7.mjs} +2 -18
- package/.output/server/{_tanstack-start-manifest_v-DYC0z7st.mjs → _tanstack-start-manifest_v-CxHUYCv8.mjs} +26 -26
- package/.output/server/drizzle/0014_luxuriant_scrambler.sql +5 -0
- package/.output/server/drizzle/meta/_journal.json +7 -0
- package/.output/server/index.mjs +106 -106
- package/drizzle/0014_luxuriant_scrambler.sql +5 -0
- package/drizzle/meta/_journal.json +7 -0
- package/package.json +1 -1
- package/.output/public/assets/app-DzFILlbu.css +0 -2
- package/.output/public/assets/index-BtvLZjhl.js +0 -12
- package/.output/public/assets/lifecycleUi-B8Je9exd.js +0 -1
- package/.output/public/assets/loops._loopId-BCK4oIRv.js +0 -4
- package/.output/public/assets/notifyFns-BneSItOi.js +0 -1
- package/.output/public/assets/ui-RFP3R3lU.js +0 -1
- package/.output/server/_ssr/artifacts-CSGRJdSy.mjs +0 -2
- package/.output/server/_ssr/boot-pUGFIxSA.mjs +0 -2
- package/.output/server/_ssr/db-Cc6I8bWL.mjs +0 -2
- package/.output/server/_ssr/logger-CHoC5_kz.mjs +0 -2
- package/.output/server/_ssr/store-BjXC623Z.mjs +0 -2
- package/.output/server/_ssr/tokens-BCOvumer.mjs +0 -2
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
import { o as __toESM } from "../_runtime.mjs";
|
|
2
2
|
import { g as require_jsx_runtime, h as require_react, t as TooltipProvider } from "../_libs/@base-ui/react+[...].mjs";
|
|
3
|
-
import { C as
|
|
3
|
+
import { C as lastRunOf, M as useHydrated, S as labelCls, T as rel, c as btnDanger, f as btnSm, h as dotLabel, k as selectCls, l as btnPrimary, o as btn, p as cronText, r as Pill, t as ErrorBanner, u as btnPrimaryPill, x as inputCls } from "./ui-CI-OeTr7.mjs";
|
|
4
4
|
import { d as useNavigate } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
5
5
|
import { _ as mintClaim, g as loadOlderRuns, l as getConfig, m as listMyTeams, n as claimStatus, p as listJobs } from "./loopApi-BfMnXaKT.mjs";
|
|
6
|
-
import { n as ModalHead, r as ModalSection, t as Modal } from "./Modal-
|
|
7
|
-
import { i as PievoLogo, n as GitHubIcon, r as LoopPlaybook, t as GITHUB_URL } from "./LoopPlaybook-
|
|
6
|
+
import { n as ModalHead, r as ModalSection, t as Modal } from "./Modal-B7gBr5Pm.mjs";
|
|
7
|
+
import { i as PievoLogo, n as GitHubIcon, r as LoopPlaybook, t as GITHUB_URL } from "./LoopPlaybook-CnQ8Qgyf.mjs";
|
|
8
8
|
import { t as setActiveTeamCookie } from "./teamCookie-B7hLOIie.mjs";
|
|
9
9
|
import { a as getTeamDetail, d as revokeTeamInvite, f as setTeamMemberRole, i as deleteTeam, l as removeTeamMember, n as createTeam, o as leaveTeam, r as createTeamInvite, s as listManagedTeams, t as addTeamMember, u as renameTeam } from "./teamFns-D4I-0dEB.mjs";
|
|
10
|
-
import { r as deriveLoopLifecycle } from "./lifecycleUi-
|
|
11
|
-
import { a as listChannels, c as testChannel, i as deleteChannel, n as Timeline, o as listMachines, r as createChannel, s as mergeRuns, t as MachinesModal } from "./notifyFns-
|
|
12
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/DashboardView-
|
|
10
|
+
import { r as deriveLoopLifecycle } from "./lifecycleUi-5jMhxINb.mjs";
|
|
11
|
+
import { a as listChannels, c as testChannel, i as deleteChannel, n as Timeline, o as listMachines, r as createChannel, s as mergeRuns, t as MachinesModal } from "./notifyFns-CtmSVNmE.mjs";
|
|
12
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/DashboardView-2eNPqWcy.js
|
|
13
13
|
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
14
14
|
var import_jsx_runtime = require_jsx_runtime();
|
|
15
15
|
function LoopCard({ job, onOpen, onPickRun }) {
|
|
16
16
|
const en = job.enabled;
|
|
17
17
|
const last = lastRunOf(job);
|
|
18
|
-
const completed = isCompleted(job);
|
|
19
18
|
const lifecycle = deriveLoopLifecycle(job);
|
|
20
|
-
const closedActive = isClosed(job) && !completed;
|
|
21
19
|
const hydrated = useHydrated();
|
|
22
20
|
const [older, setOlder] = (0, import_react.useState)([]);
|
|
23
21
|
const runs = (0, import_react.useMemo)(() => older.length ? mergeRuns(job.runs ?? [], older) : job.runs ?? [], [job.runs, older]);
|
|
@@ -64,17 +62,12 @@ function LoopCard({ job, onOpen, onPickRun }) {
|
|
|
64
62
|
children: "Queued"
|
|
65
63
|
}) : null,
|
|
66
64
|
job.graduation && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Pill, { children: job.graduation }),
|
|
67
|
-
|
|
68
|
-
tone: "success",
|
|
69
|
-
dot: "green",
|
|
70
|
-
children: "Completed"
|
|
71
|
-
}),
|
|
72
|
-
!completed && closedActive && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Pill, {
|
|
65
|
+
job.goal && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Pill, {
|
|
73
66
|
tone: "success",
|
|
74
67
|
title: job.goal ?? void 0,
|
|
75
|
-
children: "
|
|
68
|
+
children: "Objective"
|
|
76
69
|
}),
|
|
77
|
-
|
|
70
|
+
lifecycle === "paused" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Pill, {
|
|
78
71
|
tone: job.pauseCause?.kind === "blocked" ? "accent" : void 0,
|
|
79
72
|
children: job.pauseCause?.kind === "blocked" ? "Paused — blocked" : job.pauseCause?.kind === "failure-streak" ? "Paused automatically" : job.pauseCause?.kind === "owner" ? "Paused by owner" : "Paused"
|
|
80
73
|
}),
|
|
@@ -125,17 +118,6 @@ function LoopCard({ job, onOpen, onPickRun }) {
|
|
|
125
118
|
latestIncidentRun?.reportIncident && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
126
119
|
className: "mt-1.5 text-label text-secondary",
|
|
127
120
|
children: latestIncidentRun.phase === "error" ? "Last run failed · Terminal report rejected" : "Last run telemetry warning · Terminal report rejected"
|
|
128
|
-
}),
|
|
129
|
-
completed && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
130
|
-
className: "mt-1.5 text-label text-success",
|
|
131
|
-
children: [
|
|
132
|
-
"Completed",
|
|
133
|
-
job.completedAt ? ` · ${fmt(job.completedAt)}` : "",
|
|
134
|
-
job.completionReason && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
135
|
-
className: "text-secondary",
|
|
136
|
-
children: [" - ", job.completionReason]
|
|
137
|
-
})
|
|
138
|
-
]
|
|
139
121
|
})
|
|
140
122
|
]
|
|
141
123
|
});
|
|
@@ -1391,8 +1373,8 @@ var FLOWS = {
|
|
|
1391
1373
|
setup: true,
|
|
1392
1374
|
kicker: "Before first run",
|
|
1393
1375
|
glyph: "⚙",
|
|
1394
|
-
title: "Verify + define the
|
|
1395
|
-
detail: "smoke-test an observation path · set
|
|
1376
|
+
title: "Verify + define the target",
|
|
1377
|
+
detail: "smoke-test an observation path · set a standing objective"
|
|
1396
1378
|
},
|
|
1397
1379
|
{
|
|
1398
1380
|
id: "tick",
|
|
@@ -1419,16 +1401,8 @@ var FLOWS = {
|
|
|
1419
1401
|
id: "check",
|
|
1420
1402
|
kicker: "Step 3 · Check",
|
|
1421
1403
|
glyph: "⚖",
|
|
1422
|
-
title: "
|
|
1423
|
-
detail: "keep watching
|
|
1424
|
-
},
|
|
1425
|
-
{
|
|
1426
|
-
id: "finish",
|
|
1427
|
-
finish: true,
|
|
1428
|
-
kicker: "When met",
|
|
1429
|
-
glyph: "⚑",
|
|
1430
|
-
title: "Finish the loop",
|
|
1431
|
-
detail: "marks it done — stops watching"
|
|
1404
|
+
title: "Track the objective",
|
|
1405
|
+
detail: "keep watching and surface regressions"
|
|
1432
1406
|
}
|
|
1433
1407
|
],
|
|
1434
1408
|
dashboard: [{
|
|
@@ -1455,7 +1429,7 @@ var FLOWS = {
|
|
|
1455
1429
|
43,
|
|
1456
1430
|
44
|
|
1457
1431
|
],
|
|
1458
|
-
note: "
|
|
1432
|
+
note: "objective: sustain ≥ 40%; keep watching for regressions."
|
|
1459
1433
|
}]
|
|
1460
1434
|
}
|
|
1461
1435
|
};
|
|
@@ -1475,8 +1449,6 @@ var WT_PAD_BOT = 16;
|
|
|
1475
1449
|
var hOf = (d) => d.setup ? 78 : NODE_H;
|
|
1476
1450
|
function buildGeometry(defs) {
|
|
1477
1451
|
const tickIndex = defs.findIndex((d) => !d.setup);
|
|
1478
|
-
const finishIndex = defs.findIndex((d) => d.finish);
|
|
1479
|
-
const closed = finishIndex >= 0;
|
|
1480
1452
|
const nodes = [];
|
|
1481
1453
|
let y = TOP;
|
|
1482
1454
|
defs.forEach((d, i) => {
|
|
@@ -1486,7 +1458,7 @@ function buildGeometry(defs) {
|
|
|
1486
1458
|
const gap = !prevWt && curWt ? 48 : prevWt && curWt ? 30 : 36;
|
|
1487
1459
|
y += hOf(defs[i - 1]) + gap;
|
|
1488
1460
|
}
|
|
1489
|
-
const kind = d.
|
|
1461
|
+
const kind = d.setup ? "setup" : i === tickIndex ? "tick" : "step";
|
|
1490
1462
|
nodes.push({
|
|
1491
1463
|
...d,
|
|
1492
1464
|
kind,
|
|
@@ -1505,34 +1477,20 @@ function buildGeometry(defs) {
|
|
|
1505
1477
|
} : null;
|
|
1506
1478
|
const wires = [];
|
|
1507
1479
|
for (let i = 0; i < nodes.length - 1; i++) wires.push(`M${CX} ${nodes[i].y + nodes[i].h} L${CX} ${nodes[i + 1].y - 4}`);
|
|
1508
|
-
const finishWireIndex = closed ? finishIndex - 1 : -1;
|
|
1509
1480
|
const tickNode = nodes[tickIndex];
|
|
1510
1481
|
const tickMidY = tickNode.y + tickNode.h / 2;
|
|
1511
|
-
const cycleLast = nodes[
|
|
1482
|
+
const cycleLast = nodes[nodes.length - 1];
|
|
1512
1483
|
const returnWireIndex = wires.length;
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
if (closed) {
|
|
1516
|
-
const midY = cycleLast.y + cycleLast.h / 2;
|
|
1517
|
-
wires.push(`M${NODE_X} ${midY} L36 ${midY} Q${LANE_X} ${midY} ${LANE_X} ${midY - 6} L${LANE_X} ${tickMidY + 6} Q${LANE_X} ${tickMidY} 36 ${tickMidY} L${NODE_X - 4} ${tickMidY}`);
|
|
1518
|
-
route = `M${nodes.slice(tickIndex, finishIndex).map((n) => `${CX} ${n.y + n.h / 2}`).join(" L ")} L${LANE_X} ${midY} L${LANE_X} ${tickMidY} L${NODE_X - 4} ${tickMidY}`;
|
|
1519
|
-
const finishNode = nodes[finishIndex];
|
|
1520
|
-
viewH = finishNode.y + finishNode.h + 14;
|
|
1521
|
-
} else {
|
|
1522
|
-
const laneY = cycleLast.y + cycleLast.h + 28;
|
|
1523
|
-
wires.push(`M${CX} ${cycleLast.y + cycleLast.h} L${CX} ${laneY - 6} Q${CX} ${laneY} ${CX - 6} ${laneY} L36 ${laneY} Q${LANE_X} ${laneY} ${LANE_X} ${laneY - 6} L${LANE_X} ${tickMidY + 6} Q${LANE_X} ${tickMidY} 36 ${tickMidY} L${NODE_X - 4} ${tickMidY}`);
|
|
1524
|
-
route = `M${nodes.slice(tickIndex).map((n) => `${CX} ${n.y + n.h / 2}`).join(" L ")} L${CX} ${laneY} L${LANE_X} ${laneY} L${LANE_X} ${tickMidY} L${NODE_X - 4} ${tickMidY}`;
|
|
1525
|
-
viewH = laneY + 14;
|
|
1526
|
-
}
|
|
1484
|
+
const laneY = cycleLast.y + cycleLast.h + 28;
|
|
1485
|
+
wires.push(`M${CX} ${cycleLast.y + cycleLast.h} L${CX} ${laneY - 6} Q${CX} ${laneY} ${CX - 6} ${laneY} L36 ${laneY} Q${LANE_X} ${laneY} ${LANE_X} ${laneY - 6} L${LANE_X} ${tickMidY + 6} Q${LANE_X} ${tickMidY} 36 ${tickMidY} L${NODE_X - 4} ${tickMidY}`);
|
|
1527
1486
|
return {
|
|
1528
1487
|
nodes,
|
|
1529
1488
|
wires,
|
|
1530
|
-
route
|
|
1489
|
+
route: `M${nodes.slice(tickIndex).map((n) => `${CX} ${n.y + n.h / 2}`).join(" L ")} L${CX} ${laneY} L${LANE_X} ${laneY} L${LANE_X} ${tickMidY} L${NODE_X - 4} ${tickMidY}`,
|
|
1531
1490
|
worktree,
|
|
1532
1491
|
returnWireIndex,
|
|
1533
|
-
finishWireIndex,
|
|
1534
1492
|
viewW: VIEW_W,
|
|
1535
|
-
viewH
|
|
1493
|
+
viewH: laneY + 14
|
|
1536
1494
|
};
|
|
1537
1495
|
}
|
|
1538
1496
|
function LoopFlow({ template }) {
|
|
@@ -1600,7 +1558,7 @@ function FlowDiagram({ spec }) {
|
|
|
1600
1558
|
};
|
|
1601
1559
|
const nodeEls = /* @__PURE__ */ new Map();
|
|
1602
1560
|
root.querySelectorAll("[data-lpf]").forEach((el) => nodeEls.set(el.dataset.lpf, el));
|
|
1603
|
-
const order = geo.nodes.filter((n) => n.kind !== "setup"
|
|
1561
|
+
const order = geo.nodes.filter((n) => n.kind !== "setup").map((n) => ({
|
|
1604
1562
|
len: lenAt(n.x + n.w / 2, n.y + n.h / 2),
|
|
1605
1563
|
el: nodeEls.get(n.id)
|
|
1606
1564
|
})).filter((n) => n.el).sort((a, b) => a.len - b.len);
|
|
@@ -1718,20 +1676,6 @@ function FlowDiagram({ spec }) {
|
|
|
1718
1676
|
fill: "var(--color-interactive)"
|
|
1719
1677
|
})
|
|
1720
1678
|
}),
|
|
1721
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("marker", {
|
|
1722
|
-
id: "lpf-arw-good",
|
|
1723
|
-
markerUnits: "userSpaceOnUse",
|
|
1724
|
-
viewBox: "0 0 8 8",
|
|
1725
|
-
refX: "6",
|
|
1726
|
-
refY: "4",
|
|
1727
|
-
markerWidth: "9",
|
|
1728
|
-
markerHeight: "9",
|
|
1729
|
-
orient: "auto-start-reverse",
|
|
1730
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
|
1731
|
-
d: "M1.2 1.2 L7 4 L1.2 6.8 Z",
|
|
1732
|
-
fill: "var(--color-success)"
|
|
1733
|
-
})
|
|
1734
|
-
}),
|
|
1735
1679
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("filter", {
|
|
1736
1680
|
id: "lpf-glow",
|
|
1737
1681
|
x: "-60%",
|
|
@@ -1749,18 +1693,15 @@ function FlowDiagram({ spec }) {
|
|
|
1749
1693
|
d: geo.route
|
|
1750
1694
|
})
|
|
1751
1695
|
] }),
|
|
1752
|
-
geo.wires.map((d, i) => {
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
markerEnd: isFinish ? "url(#lpf-arw-good)" : "url(#lpf-arw)"
|
|
1762
|
-
}, i);
|
|
1763
|
-
}),
|
|
1696
|
+
geo.wires.map((d, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
|
1697
|
+
className: "lpf-wire",
|
|
1698
|
+
d,
|
|
1699
|
+
fill: "none",
|
|
1700
|
+
strokeWidth: 2,
|
|
1701
|
+
strokeLinecap: "round",
|
|
1702
|
+
strokeDasharray: i === geo.returnWireIndex ? "6 6" : void 0,
|
|
1703
|
+
markerEnd: "url(#lpf-arw)"
|
|
1704
|
+
}, i)),
|
|
1764
1705
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
|
1765
1706
|
className: "lpf-comet",
|
|
1766
1707
|
d: geo.route,
|
|
@@ -2551,9 +2492,7 @@ function DashboardView({ teamId, initial }) {
|
|
|
2551
2492
|
return () => clearInterval(t);
|
|
2552
2493
|
}, [refetch, anyRunning]);
|
|
2553
2494
|
const refresh = () => void refetch();
|
|
2554
|
-
const
|
|
2555
|
-
const active = jobs.filter((j) => !isCompleted(j));
|
|
2556
|
-
const activeOn = active.filter((j) => j.enabled).length;
|
|
2495
|
+
const activeOn = jobs.filter((j) => j.enabled).length;
|
|
2557
2496
|
const cardProps = () => ({
|
|
2558
2497
|
onOpen: (id) => void navigate({
|
|
2559
2498
|
to: "/loops/$loopId",
|
|
@@ -2666,10 +2605,10 @@ function DashboardView({ teamId, initial }) {
|
|
|
2666
2605
|
children: "Active loops"
|
|
2667
2606
|
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
2668
2607
|
className: "text-label text-secondary",
|
|
2669
|
-
children:
|
|
2608
|
+
children: jobs.length ? `${activeOn} scheduled · ${jobs.length} total` : ""
|
|
2670
2609
|
})]
|
|
2671
2610
|
}),
|
|
2672
|
-
|
|
2611
|
+
jobs.length ? jobs.map((j) => /* @__PURE__ */ (0, import_react.createElement)(LoopCard, {
|
|
2673
2612
|
job: j,
|
|
2674
2613
|
...cardProps(),
|
|
2675
2614
|
key: j.id
|
|
@@ -2677,26 +2616,12 @@ function DashboardView({ teamId, initial }) {
|
|
|
2677
2616
|
className: "py-16 text-center",
|
|
2678
2617
|
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
2679
2618
|
className: "text-[15px] text-secondary",
|
|
2680
|
-
children:
|
|
2619
|
+
children: "No loops yet"
|
|
2681
2620
|
}), !jobs.length && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
2682
2621
|
className: "mt-1.5 text-body text-disabled",
|
|
2683
2622
|
children: "Pick a template above, or start a blank loop."
|
|
2684
2623
|
})]
|
|
2685
2624
|
}),
|
|
2686
|
-
completed.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2687
|
-
className: "mb-5 mt-11 flex items-baseline gap-2.5",
|
|
2688
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", {
|
|
2689
|
-
className: "text-body font-semibold text-display",
|
|
2690
|
-
children: "Completed"
|
|
2691
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
2692
|
-
className: "text-label text-secondary",
|
|
2693
|
-
children: [completed.length, " total"]
|
|
2694
|
-
})]
|
|
2695
|
-
}), completed.map((j) => /* @__PURE__ */ (0, import_react.createElement)(LoopCard, {
|
|
2696
|
-
job: j,
|
|
2697
|
-
...cardProps(),
|
|
2698
|
-
key: j.id
|
|
2699
|
-
}))] }),
|
|
2700
2625
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(LoopPlaybook, { onStart: () => setCompose({
|
|
2701
2626
|
open: true,
|
|
2702
2627
|
template: null
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { o as __toESM } from "../_runtime.mjs";
|
|
2
2
|
import { g as require_jsx_runtime, h as require_react } from "../_libs/@base-ui/react+[...].mjs";
|
|
3
|
-
import {
|
|
4
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/LoopPlaybook-
|
|
3
|
+
import { $t as toKebabCase, T as createFetch, U as getBaseURL, j as defu, pt as isSafeUrlScheme, v as capitalizeFirstLetter } from "./boot-BNoivm21.mjs";
|
|
4
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/LoopPlaybook-CnQ8Qgyf.js
|
|
5
5
|
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
6
6
|
var import_jsx_runtime = require_jsx_runtime();
|
|
7
7
|
var PROTO_POLLUTION_PATTERNS = {
|
|
@@ -1005,12 +1005,12 @@ function LoopPlaybook({ onStart }) {
|
|
|
1005
1005
|
})
|
|
1006
1006
|
}),
|
|
1007
1007
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(IdeaCard, {
|
|
1008
|
-
title: "
|
|
1008
|
+
title: "Memory + logs",
|
|
1009
1009
|
caption: "Durable memory across runs, so it never re-does work and every lesson sticks. Month three is smarter than week one.",
|
|
1010
1010
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DocMock, {
|
|
1011
|
-
name: "
|
|
1011
|
+
name: "memory.md",
|
|
1012
1012
|
lines: [
|
|
1013
|
-
{ h: "##
|
|
1013
|
+
{ h: "## Memory" },
|
|
1014
1014
|
{ t: "hypothesis: credit-wall users reply 3x" },
|
|
1015
1015
|
{ t: "skip: known-noise fingerprints" },
|
|
1016
1016
|
{ h: "## Logs" },
|
|
@@ -1339,7 +1339,7 @@ function TriggerRow({ code, label }) {
|
|
|
1339
1339
|
* The three roles laid out as a dispatch map (the article's infographic, on
|
|
1340
1340
|
* app tokens): a trigger wakes the orchestrator, which fans tasks out to
|
|
1341
1341
|
* parallel executor→verifier lanes; every lane ends in proof, and every run
|
|
1342
|
-
* reports back into
|
|
1342
|
+
* reports back into memory + logs. Warm ink = work being dispatched, green =
|
|
1343
1343
|
* proof flowing home. Real HTML cards carry all the text; SVG only draws the
|
|
1344
1344
|
* connectors. Wide by nature, so the diagram scrolls inside its own pane on
|
|
1345
1345
|
* narrow screens (never the page). Lane rows are fixed-height so the fan-out
|
|
@@ -1531,7 +1531,7 @@ function RolesFlow() {
|
|
|
1531
1531
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
1532
1532
|
className: "lpb-stage mt-auto rounded-control border border-success/40 bg-success-soft px-2 py-1.5 text-center font-mono text-micro text-success",
|
|
1533
1533
|
style: stageStyle(4, "success"),
|
|
1534
|
-
children: "✍ writes
|
|
1534
|
+
children: "✍ writes memory + logs"
|
|
1535
1535
|
})
|
|
1536
1536
|
]
|
|
1537
1537
|
}),
|
|
@@ -1706,7 +1706,7 @@ function RolesFlow() {
|
|
|
1706
1706
|
}),
|
|
1707
1707
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
1708
1708
|
className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 whitespace-nowrap bg-surface px-2.5 font-mono text-micro text-success",
|
|
1709
|
-
children: "every run reports back → orchestrator writes
|
|
1709
|
+
children: "every run reports back → orchestrator writes memory + logs"
|
|
1710
1710
|
})
|
|
1711
1711
|
]
|
|
1712
1712
|
})
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { o as __toESM } from "../_runtime.mjs";
|
|
2
2
|
import { g as require_jsx_runtime, h as require_react } from "../_libs/@base-ui/react+[...].mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { ht as isTaskPath } from "./boot-BNoivm21.mjs";
|
|
4
|
+
import { A as tsShort, v as fmt, w as md, y as fnum } from "./ui-CI-OeTr7.mjs";
|
|
5
5
|
import { s as getArtifacts } from "./loopApi-BfMnXaKT.mjs";
|
|
6
6
|
import { t as artifactKind } from "./artifactKind-BW0isV8L.mjs";
|
|
7
7
|
import { t as purify } from "../_libs/dompurify.mjs";
|
|
8
8
|
import { i as isMarkdown, r as ViewerHead, t as ArtifactBody } from "./artifactView-CYV1r48i.mjs";
|
|
9
|
-
import { n as ModalHead, t as Modal } from "./Modal-
|
|
9
|
+
import { n as ModalHead, t as Modal } from "./Modal-B7gBr5Pm.mjs";
|
|
10
10
|
import { n as import_lib, t as esm_default } from "../_libs/html-react-parser+[...].mjs";
|
|
11
11
|
import { a as Area, c as Tooltip, i as XAxis, l as ResponsiveContainer, n as LineChart, o as Line, r as YAxis, s as CartesianGrid, t as AreaChart } from "../_libs/recharts+victory-vendor.mjs";
|
|
12
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/LoopView-
|
|
12
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/LoopView-DM30OPCN.js
|
|
13
13
|
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
14
14
|
var import_jsx_runtime = require_jsx_runtime();
|
|
15
|
-
/** Parse a `<loop-chart series="key:label:unit, ...">` attribute into
|
|
15
|
+
/** Parse a `<loop-chart series="key:label:unit, ...">` attribute into MetricField[]. */
|
|
16
16
|
function parseSeries(attr) {
|
|
17
17
|
if (!attr) return [];
|
|
18
18
|
return attr.split(",").map((s) => {
|
|
@@ -26,12 +26,12 @@ function parseSeries(attr) {
|
|
|
26
26
|
}
|
|
27
27
|
function buildBindingContext(runs) {
|
|
28
28
|
const latest = {};
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
const seen = /* @__PURE__ */ new Set();
|
|
30
|
+
for (const r of runs) if (r.metrics && typeof r.metrics === "object" && !Array.isArray(r.metrics)) for (const k in r.metrics) {
|
|
31
|
+
if (seen.has(k)) continue;
|
|
32
|
+
seen.add(k);
|
|
33
|
+
const v = r.metrics[k];
|
|
34
|
+
if (typeof v === "number") latest[k] = fnum(v);
|
|
35
35
|
}
|
|
36
36
|
return { latest };
|
|
37
37
|
}
|
|
@@ -53,12 +53,12 @@ function lookup(ctx, path) {
|
|
|
53
53
|
const parts = path.split(".");
|
|
54
54
|
if (parts[0] === "latest" && parts[1]) return ctx.latest[parts[1]];
|
|
55
55
|
}
|
|
56
|
-
/** Per-run numeric
|
|
56
|
+
/** Per-run numeric metrics snapshots → one series per numeric field (chronological). */
|
|
57
57
|
function numericSeries(runsNewestFirst) {
|
|
58
58
|
const chron = (runsNewestFirst ?? []).slice().reverse();
|
|
59
59
|
const series = {};
|
|
60
60
|
for (const r of chron) {
|
|
61
|
-
const obj = r.
|
|
61
|
+
const obj = r.metrics && typeof r.metrics === "object" && !Array.isArray(r.metrics) ? r.metrics : {};
|
|
62
62
|
for (const k in obj) {
|
|
63
63
|
const v = obj[k];
|
|
64
64
|
if (typeof v === "number" && isFinite(v)) (series[k] ??= []).push({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as DialogRoot, d as DialogClose, f as DialogBackdrop, g as require_jsx_runtime, l as DialogPortal, s as DialogTitle, u as DialogPopup } from "../_libs/@base-ui/react+[...].mjs";
|
|
2
|
-
import {
|
|
3
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/Modal-
|
|
2
|
+
import { O as sectionHeadCls } from "./ui-CI-OeTr7.mjs";
|
|
3
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/Modal-B7gBr5Pm.js
|
|
4
4
|
var import_jsx_runtime = require_jsx_runtime();
|
|
5
5
|
/** Shared modal shell — Base UI Dialog handles focus trap, Esc, scroll lock.
|
|
6
6
|
* Content-height, optically centered — sized for the small form/compose dialogs
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { o as __toESM } from "../_runtime.mjs";
|
|
2
2
|
import { g as require_jsx_runtime, h as require_react } from "../_libs/@base-ui/react+[...].mjs";
|
|
3
|
-
import { l as btnPrimary } from "./ui-
|
|
4
|
-
import { i as PievoLogo, n as GitHubIcon, o as signIn, r as LoopPlaybook, t as GITHUB_URL } from "./LoopPlaybook-
|
|
5
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/SignIn-
|
|
3
|
+
import { l as btnPrimary } from "./ui-CI-OeTr7.mjs";
|
|
4
|
+
import { i as PievoLogo, n as GitHubIcon, o as signIn, r as LoopPlaybook, t as GITHUB_URL } from "./LoopPlaybook-CnQ8Qgyf.mjs";
|
|
5
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/SignIn-CaAi4_mk.js
|
|
6
6
|
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
7
7
|
var import_jsx_runtime = require_jsx_runtime();
|
|
8
8
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { o as __toESM } from "../_runtime.mjs";
|
|
2
2
|
import { g as require_jsx_runtime, h as require_react } from "../_libs/@base-ui/react+[...].mjs";
|
|
3
|
-
import { c as btnDanger, l as btnPrimary, o as btn } from "./ui-
|
|
4
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/actionUi-
|
|
3
|
+
import { c as btnDanger, l as btnPrimary, o as btn } from "./ui-CI-OeTr7.mjs";
|
|
4
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/actionUi-Be7dmMxb.js
|
|
5
5
|
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
6
6
|
var import_jsx_runtime = require_jsx_runtime();
|
|
7
7
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/adapters-
|
|
1
|
+
import { Nt as machinePresence, Q as getMachine, S as countRuns, Tt as listRuns, at as hasPendingRun, d as MIN_DAEMON_VERSION, k as daemonNeedsUpdate, ot as hasRunningRun } from "./boot-BNoivm21.mjs";
|
|
2
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/adapters-CHURWoZx.js
|
|
3
3
|
/**
|
|
4
4
|
* Map the new relational rows (Loop + Run) onto the shapes the UI already
|
|
5
5
|
* renders (JobSummary / JobDetail / RunSummary / JobFull), so the dashboard
|
|
@@ -34,7 +34,7 @@ function toRunSummary(r) {
|
|
|
34
34
|
cacheCreationTokens: r.usage.cacheCreationTokens
|
|
35
35
|
} : null,
|
|
36
36
|
error: r.error ?? null,
|
|
37
|
-
|
|
37
|
+
metrics: r.metrics ?? null,
|
|
38
38
|
control: r.control ?? null,
|
|
39
39
|
sessionId: r.sessionId ?? null,
|
|
40
40
|
reportIncident: r.reportIncident ?? null
|
|
@@ -74,8 +74,6 @@ async function toJobSummary(loop) {
|
|
|
74
74
|
lastRunTs: runs.length ? runs[runs.length - 1].ts : null,
|
|
75
75
|
graduation: null,
|
|
76
76
|
goal: loop.goal ?? null,
|
|
77
|
-
completedAt: loop.completedAt ?? null,
|
|
78
|
-
completionReason: loop.completionReason ?? null,
|
|
79
77
|
deleteRequestedAt: loop.deleteRequestedAt ?? null,
|
|
80
78
|
pauseCause: loop.pauseCause ?? null,
|
|
81
79
|
runs,
|
|
@@ -92,11 +90,9 @@ function toJobFull(loop) {
|
|
|
92
90
|
enabled: loop.enabled,
|
|
93
91
|
notify: loop.notify,
|
|
94
92
|
goal: loop.goal ?? null,
|
|
95
|
-
completedAt: loop.completedAt ?? null,
|
|
96
|
-
completionReason: loop.completionReason ?? null,
|
|
97
93
|
pauseCause: loop.pauseCause ?? null,
|
|
98
94
|
taskFile: loop.taskFile ?? void 0,
|
|
99
|
-
|
|
95
|
+
metricSchema: loop.metricSchema ?? void 0,
|
|
100
96
|
ui: loop.ui ?? void 0,
|
|
101
97
|
channelId: loop.channelId ?? null,
|
|
102
98
|
agent: loop.agent,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { H as
|
|
2
|
-
import { t as toArtifactSummary } from "./adapters-
|
|
3
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/artifactFiles-
|
|
1
|
+
import { H as getArtifactSync, V as getArtifactFile, qt as safeRelPath, yt as listArtifactsWithMeta } from "./boot-BNoivm21.mjs";
|
|
2
|
+
import { t as toArtifactSummary } from "./adapters-CHURWoZx.mjs";
|
|
3
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/artifactFiles-D6b_RP78.js
|
|
4
4
|
/**
|
|
5
5
|
* Server-side reads over a loop's live-synced artifacts (Phase 2). Pure helpers
|
|
6
6
|
* (no request/session context) so they're shared by the lazy server fns
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { A as sql, C as or, S as notInArray, _ as isNull$1, b as lte, c as asc, d as eq, f as gt, g as isNotNull, h as inArray, l as desc, m as ilike, o as count, p as gte, u as and, v as like, x as ne, y as lt } from "../_libs/drizzle-orm+postgres.mjs";
|
|
2
|
-
import { $
|
|
3
|
-
import { C as withSpan, S as shouldPublishLog, _ as logger, a as __getBetterAuthGlobal, b as runWithTransaction, c as createRandomStringGenerator, d as getAuthTables, f as getBetterAuthVersion, g as initGetModelName, h as initGetFieldName, l as generateId$2, m as import_src, n as ATTR_HOOK_TYPE, o as createAdapterFactory, p as getCurrentAdapter, r as ATTR_OPERATION_ID, s as createLogger, t as ATTR_CONTEXT, u as getAsyncLocalStorage, v as queueAfterTransactionHook, x as safeJSONParse, y as runWithAdapter } from "./factory-
|
|
2
|
+
import { $ as getOrigin, A as db, At as loginGateEnabled, Ft as normalizePathname, Kt as resolveBaseURL, L as ensureTeam, Qt as teamIdForUser, R as env, U as getBaseURL, W as getBooleanEnvVar, Y as getHost, _t as isTest, a as BetterAuthError, an as wildcardMatch, ct as isDynamicBaseURLConfig, dt as isProduction, et as getProtocol, ft as isRequestLike, gt as isTeamMember, h as betterFetch, j as defu, l as ENV, n as APIError$1, o as BetterCallError, p as ValidationError$1, q as getEnvVar, r as BASE_ERROR_CODES, st as isDevelopment, t as APIError, v as capitalizeFirstLetter, vt as kAPIErrorHeaderSymbol, w as createDefu } from "./boot-BNoivm21.mjs";
|
|
3
|
+
import { C as withSpan, S as shouldPublishLog, _ as logger, a as __getBetterAuthGlobal, b as runWithTransaction, c as createRandomStringGenerator, d as getAuthTables, f as getBetterAuthVersion, g as initGetModelName, h as initGetFieldName, l as generateId$2, m as import_src, n as ATTR_HOOK_TYPE, o as createAdapterFactory, p as getCurrentAdapter, r as ATTR_OPERATION_ID, s as createLogger, t as ATTR_CONTEXT, u as getAsyncLocalStorage, v as queueAfterTransactionHook, x as safeJSONParse, y as runWithAdapter } from "./factory-TSnFcS96.mjs";
|
|
4
4
|
import { randomBytes, scrypt } from "node:crypto";
|
|
5
5
|
import fs from "node:fs";
|
|
6
6
|
import path from "node:path";
|
|
@@ -1700,7 +1700,7 @@ var JOIN_TYPE_SQL = freeze({
|
|
|
1700
1700
|
Using: "using"
|
|
1701
1701
|
});
|
|
1702
1702
|
//#endregion
|
|
1703
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/auth-
|
|
1703
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/auth-B_OxPpFr.js
|
|
1704
1704
|
/**
|
|
1705
1705
|
* @internal
|
|
1706
1706
|
*/
|
|
@@ -15993,7 +15993,7 @@ var createKyselyAdapter = async (config) => {
|
|
|
15993
15993
|
if ("getConnection" in db) dialect = new MysqlDialect(db);
|
|
15994
15994
|
if ("connect" in db) dialect = new PostgresDialect({ pool: db });
|
|
15995
15995
|
if ("fileControl" in db) {
|
|
15996
|
-
const { BunSqliteDialect } = await import("./bun-sqlite-dialect-BW9W1_Ps-
|
|
15996
|
+
const { BunSqliteDialect } = await import("./bun-sqlite-dialect-BW9W1_Ps-B3RHdVjo.mjs");
|
|
15997
15997
|
dialect = new BunSqliteDialect({ database: db });
|
|
15998
15998
|
}
|
|
15999
15999
|
if ("createSession" in db) {
|
|
@@ -16009,12 +16009,12 @@ var createKyselyAdapter = async (config) => {
|
|
|
16009
16009
|
if (error !== null && typeof error === "object" && "code" in error && error.code !== "ERR_UNKNOWN_BUILTIN_MODULE") throw error;
|
|
16010
16010
|
}
|
|
16011
16011
|
if (DatabaseSync && db instanceof DatabaseSync) {
|
|
16012
|
-
const { NodeSqliteDialect } = await import("./node-sqlite-dialect-
|
|
16012
|
+
const { NodeSqliteDialect } = await import("./node-sqlite-dialect-B10G6C4W.mjs");
|
|
16013
16013
|
dialect = new NodeSqliteDialect({ database: db });
|
|
16014
16014
|
}
|
|
16015
16015
|
}
|
|
16016
16016
|
if ("batch" in db && "exec" in db && "prepare" in db) {
|
|
16017
|
-
const { D1SqliteDialect } = await import("./d1-sqlite-dialect-BLC8LXE6-
|
|
16017
|
+
const { D1SqliteDialect } = await import("./d1-sqlite-dialect-BLC8LXE6-DpVe1foU.mjs");
|
|
16018
16018
|
dialect = new D1SqliteDialect({ database: db });
|
|
16019
16019
|
}
|
|
16020
16020
|
return {
|
|
@@ -36526,7 +36526,7 @@ async function getBaseAdapter(options, handleDirectDatabase) {
|
|
|
36526
36526
|
acc[key] = [];
|
|
36527
36527
|
return acc;
|
|
36528
36528
|
}, {});
|
|
36529
|
-
const { memoryAdapter } = await import("./dist-
|
|
36529
|
+
const { memoryAdapter } = await import("./dist-BTx1ljg7.mjs");
|
|
36530
36530
|
adapter = memoryAdapter(memoryDB)(options);
|
|
36531
36531
|
} else if (typeof options.database === "function") adapter = options.database(options);
|
|
36532
36532
|
else adapter = await handleDirectDatabase(options);
|
|
@@ -36540,10 +36540,10 @@ async function getBaseAdapter(options, handleDirectDatabase) {
|
|
|
36540
36540
|
}
|
|
36541
36541
|
async function getAdapter(options) {
|
|
36542
36542
|
return getBaseAdapter(options, async (opts) => {
|
|
36543
|
-
const { createKyselyAdapter } = await import("./kysely-adapter-
|
|
36543
|
+
const { createKyselyAdapter } = await import("./kysely-adapter-BWjzeCGK.mjs");
|
|
36544
36544
|
const { kysely, databaseType, transaction } = await createKyselyAdapter(opts);
|
|
36545
36545
|
if (!kysely) throw new BetterAuthError("Failed to initialize database adapter");
|
|
36546
|
-
const { kyselyAdapter } = await import("./kysely-adapter-
|
|
36546
|
+
const { kyselyAdapter } = await import("./kysely-adapter-BWjzeCGK.mjs");
|
|
36547
36547
|
return kyselyAdapter(kysely, {
|
|
36548
36548
|
type: databaseType || "sqlite",
|
|
36549
36549
|
debugLogs: opts.database && "debugLogs" in opts.database ? opts.database.debugLogs : false,
|