@kky42/pievo-server 2.2.0 → 2.3.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/.output/nitro.json +1 -1
- package/.output/public/assets/{LoopView-BTXoqfzM.js → LoopView-DjVHUyrR.js} +1 -1
- package/.output/public/assets/{Modal-Ba36NAkv.js → Modal-CCRvx959.js} +1 -1
- package/.output/public/assets/{SignIn-Cc1zxGnA.js → SignIn-Qxw5zDFq.js} +1 -1
- package/.output/public/assets/{actionUi-DDDfD0WX.js → actionUi-CXxhzYe2.js} +1 -1
- package/.output/public/assets/{index-BGM1XGY0.js → index-BRN_CQ8U.js} +4 -4
- package/.output/public/assets/{invite._token-CUCNcN89.js → invite._token-BIxr8DlP.js} +1 -1
- package/.output/public/assets/{invite._token-C3t4JfAY.js → invite._token-j2BTCeG1.js} +1 -1
- package/.output/public/assets/lifecycleUi-Qy_8beQK.js +1 -0
- package/.output/public/assets/{loops._loopId-CrSSvSVl.js → loops._loopId-BRBQzioy.js} +3 -3
- package/.output/public/assets/{loops._loopId_.runs._runId-B5Qacloe.js → loops._loopId_.runs._runId-CMnOJkem.js} +2 -2
- package/.output/public/assets/{notifyFns-CYiZT7CK.js → notifyFns-DYD4EKaG.js} +1 -1
- package/.output/public/assets/{routes-DsdcURfk.js → routes-3nuEJGdo.js} +1 -1
- package/.output/public/assets/{routes-B6Kg4mFC.js → routes-DORLim-C.js} +1 -1
- package/.output/public/assets/{t._teamId-Cmm4xdKj.js → t._teamId-F5f4K8kd.js} +1 -1
- package/.output/public/assets/{t._teamId-C9uEyAh_.js → t._teamId-XfE_S1Fo.js} +1 -1
- package/.output/public/assets/ui-Dhsx6SW0.js +1 -0
- package/.output/server/_ssr/{DashboardView-0yoKh8Em.mjs → DashboardView-BF7PciP7.mjs} +9 -6
- package/.output/server/_ssr/{LoopPlaybook-uq_sFfgU.mjs → LoopPlaybook-DC7QVvPY.mjs} +2 -2
- package/.output/server/_ssr/{LoopView-BlOY-jfJ.mjs → LoopView-DwSrm9Ja.mjs} +4 -4
- package/.output/server/_ssr/{Modal-Bc_5TYGr.mjs → Modal-MaCG52Pv.mjs} +2 -2
- package/.output/server/_ssr/{SignIn-C4fSJl_j.mjs → SignIn-RmpWm9uy.mjs} +3 -3
- package/.output/server/_ssr/{actionUi-BKF6xI3d.mjs → actionUi-BN55TNYE.mjs} +2 -2
- package/.output/server/_ssr/{adapters-RReIIwAx.mjs → adapters-BoLkOf1T.mjs} +12 -6
- package/.output/server/_ssr/{artifactFiles-C8PQKN6V.mjs → artifactFiles-BCaIIrrT.mjs} +3 -3
- package/.output/server/_ssr/artifacts-jQ-bfdhI.mjs +2 -0
- package/.output/server/_ssr/{auth-Sie6sQHF.mjs → auth-30Z4lV1w.mjs} +9 -9
- package/.output/server/_ssr/{boot-akwC2sQg.mjs → boot-3BNKujyp.mjs} +75 -26
- package/.output/server/_ssr/{boot-pVS0wjd0.mjs → boot-CsEFT53K.mjs} +1 -1
- package/.output/server/_ssr/{bun-sqlite-dialect-BW9W1_Ps-CLY8cORt.mjs → bun-sqlite-dialect-BW9W1_Ps-_7tfuNRi.mjs} +2 -2
- package/.output/server/_ssr/{d1-sqlite-dialect-BLC8LXE6-CRsXQNRe.mjs → d1-sqlite-dialect-BLC8LXE6-ucDUbeBk.mjs} +2 -2
- package/.output/server/_ssr/db-CXownd1H.mjs +2 -0
- package/.output/server/_ssr/{dist-Cc_x6bBb.mjs → dist-Cd6nlLlO.mjs} +2 -2
- package/.output/server/_ssr/{factory-CDwHL_zY.mjs → factory-CWWwV7XZ.mjs} +2 -2
- package/.output/server/_ssr/{invite._token-BE_QUAVb.mjs → invite._token-BKlz0R2f.mjs} +4 -4
- package/.output/server/_ssr/{invite._token-BlbVjz-o.mjs → invite._token-CWl6kipD.mjs} +2 -2
- package/.output/server/_ssr/{invite._token-C7GjrJxr.mjs → invite._token-SdWXemIc.mjs} +5 -5
- package/.output/server/_ssr/{kysely-adapter-zflsyYBA.mjs → kysely-adapter-C8iS51DB.mjs} +1 -1
- package/.output/server/_ssr/{lifecycleUi-Djb44Aj3.mjs → lifecycleUi-DgBQAYzp.mjs} +2 -1
- package/.output/server/_ssr/logger-Gy-47z3k.mjs +2 -0
- package/.output/server/_ssr/{loopApi-JzmqWENY.mjs → loopApi-ABi9SgWS.mjs} +12 -12
- package/.output/server/_ssr/{loops._loopId-DZ-FjscA.mjs → loops._loopId-SON_t43g.mjs} +3 -3
- package/.output/server/_ssr/{loops._loopId-D-aCCtrX.mjs → loops._loopId-p1KWsvMM.mjs} +10 -10
- package/.output/server/_ssr/{loops._loopId_.runs._runId-rBHW41dx.mjs → loops._loopId_.runs._runId-PUGBrD5q.mjs} +14 -8
- package/.output/server/_ssr/{loops._loopId_.runs._runId-Dk1QY49p.mjs → loops._loopId_.runs._runId-Ymy4lwee.mjs} +3 -3
- package/.output/server/_ssr/{machineFns-CoqLRLRh.mjs → machineFns-BZ9puxDt.mjs} +3 -3
- package/.output/server/_ssr/{node-sqlite-dialect-dmrazfbM.mjs → node-sqlite-dialect-D_3JmkMo.mjs} +2 -2
- package/.output/server/_ssr/{notifyFns-CH7-bcmd.mjs → notifyFns-BUCePuF3.mjs} +3 -3
- package/.output/server/_ssr/{notifyFns-DXMbgYu2.mjs → notifyFns-DuPR1zd7.mjs} +5 -5
- package/.output/server/_ssr/{router-BFPzSTFx.mjs → router-Czxvra6l.mjs} +38 -32
- package/.output/server/_ssr/{routes-DebVUmCS.mjs → routes-ClZEdsnB.mjs} +5 -5
- package/.output/server/_ssr/{routes-Bx0bRxt9.mjs → routes-ComqHvCL.mjs} +2 -2
- package/.output/server/_ssr/{routes-dQCBLTxY.mjs → routes-D5jJJ-30.mjs} +5 -5
- package/.output/server/_ssr/runDiff--qLtU4FI.mjs +2 -0
- package/.output/server/_ssr/ssr.mjs +49 -49
- package/.output/server/_ssr/store-40eVzW1S.mjs +2 -0
- package/.output/server/_ssr/{t._teamId-BzWy4Ft2.mjs → t._teamId-BgHV_KFP.mjs} +5 -5
- package/.output/server/_ssr/{t._teamId-D9nCEa2h.mjs → t._teamId-DDERNgfn.mjs} +2 -2
- package/.output/server/_ssr/{t._teamId-BqOUF-0J.mjs → t._teamId-DRJvKHZn.mjs} +5 -5
- package/.output/server/_ssr/{teamFns-BcnGMC-g.mjs → teamFns-Bp81UO-x.mjs} +3 -3
- package/.output/server/_ssr/tokens-CbfoRC_s.mjs +2 -0
- package/.output/server/_ssr/{ui-B6mE5-5v.mjs → ui-Ww2tTM2u.mjs} +9 -2
- package/.output/server/{_tanstack-start-manifest_v-COr27bxK.mjs → _tanstack-start-manifest_v-DwKENYCN.mjs} +25 -25
- package/.output/server/index.mjs +100 -100
- package/package.json +1 -1
- package/.output/public/assets/lifecycleUi-CMFw5Nlj.js +0 -1
- package/.output/public/assets/ui-Gb1413-F.js +0 -1
- package/.output/server/_ssr/artifacts-B_F6vSih.mjs +0 -2
- package/.output/server/_ssr/db-Bdm9PFZF.mjs +0 -2
- package/.output/server/_ssr/logger-tfiliKTi.mjs +0 -2
- package/.output/server/_ssr/runDiff-qA1C8R_L.mjs +0 -2
- package/.output/server/_ssr/store-DWUdkIq2.mjs +0 -2
- package/.output/server/_ssr/tokens-DG8z1GIg.mjs +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { g as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
2
2
|
import { f as useRouter } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
3
|
-
import { r as LoadErrorCard } from "./actionUi-
|
|
4
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/invite._token-
|
|
3
|
+
import { r as LoadErrorCard } from "./actionUi-BN55TNYE.mjs";
|
|
4
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/invite._token-CWl6kipD.js
|
|
5
5
|
var import_jsx_runtime = require_jsx_runtime();
|
|
6
6
|
/**
|
|
7
7
|
* Invite-link redeem (`/invite/<token>`, design §4 option B). The recipient opens
|
|
@@ -1,13 +1,13 @@
|
|
|
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-
|
|
3
|
+
import { l as btnPrimary } from "./ui-Ww2tTM2u.mjs";
|
|
4
4
|
import { d as useNavigate } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
5
|
-
import { i as PievoLogo, s as useSession } from "./LoopPlaybook-
|
|
5
|
+
import { i as PievoLogo, s as useSession } from "./LoopPlaybook-DC7QVvPY.mjs";
|
|
6
6
|
import { t as setActiveTeamCookie } from "./teamCookie-B7hLOIie.mjs";
|
|
7
7
|
import { c as redeemTeamInvite } from "./teamFns-bm82twd5.mjs";
|
|
8
|
-
import { t as Route } from "./invite._token-
|
|
9
|
-
import { t as SignIn } from "./SignIn-
|
|
10
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/invite._token-
|
|
8
|
+
import { t as Route } from "./invite._token-BKlz0R2f.mjs";
|
|
9
|
+
import { t as SignIn } from "./SignIn-RmpWm9uy.mjs";
|
|
10
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/invite._token-SdWXemIc.js
|
|
11
11
|
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
12
12
|
var import_jsx_runtime = require_jsx_runtime();
|
|
13
13
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as kyselyAdapter, t as createKyselyAdapter } from "./auth-
|
|
1
|
+
import { r as kyselyAdapter, t as createKyselyAdapter } from "./auth-30Z4lV1w.mjs";
|
|
2
2
|
export { createKyselyAdapter, kyselyAdapter };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/lifecycleUi-
|
|
1
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/lifecycleUi-DgBQAYzp.js
|
|
2
2
|
var DAEMON_UPGRADE_REQUIRED = "Daemon upgrade required to stop a running process. Run `npm install -g @kky42/pievo@latest`, then `pievo daemon restart`.";
|
|
3
3
|
/** Derive product lifecycle state only from durable server facts. */
|
|
4
4
|
function deriveLoopLifecycle(job) {
|
|
@@ -21,6 +21,7 @@ function daemonStopSupport(protocol) {
|
|
|
21
21
|
/** Exact user-facing lifecycle wording, including uncertainty boundaries. */
|
|
22
22
|
function lifecycleDisplay(detail) {
|
|
23
23
|
const state = deriveLoopLifecycle(detail.summary);
|
|
24
|
+
if (detail.summary.queued && detail.summary.reconciliationBlocking) return detail.machine.presence === "online" ? "Queued · machine is checking an interrupted run" : "Queued · waiting for machine recovery";
|
|
24
25
|
const running = detail.summary.runs.find((run) => run.running);
|
|
25
26
|
if (running && detail.machine.daemonProtocol !== 3) return DAEMON_UPGRADE_REQUIRED;
|
|
26
27
|
if (state === "stopping" && running && !detail.machine.online) return `Stopping · waiting for ${detail.machine.name || "machine"}`;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ct as listChartRuns, It as machinePresence, J as getChannel, Jt as requestDeleteLoop, U as forceDeleteLoop, Vt as pauseLoop, Yt as requestRunCancel, an as updateLoop, at as getTeam, b as coerceCodingAgent, cn as validateSchema, ct as hasRunningRun, en as startLoop, et as getLoop, in as tryDeleteLoop, it as getRun, jt as listTeamsForUser, kt as listRunsBefore, ln as validateSteerInstruction, ot as getTeamMember, tn as stopLoop, tt as getMachine, v as canEvolve, wt as listLoops, x as coerceUi, z as ensureServer, zt as normalizeProviderSetting } from "./boot-3BNKujyp.mjs";
|
|
2
2
|
import { n as createServerFn } from "./ssr.mjs";
|
|
3
|
-
import { i as
|
|
4
|
-
import { canAccessLoop, requestScope } from "./auth-
|
|
3
|
+
import { i as toRunSummaries, n as toJobDetail, r as toJobSummary } from "./adapters-BoLkOf1T.mjs";
|
|
4
|
+
import { canAccessLoop, requestScope } from "./auth-30Z4lV1w.mjs";
|
|
5
5
|
import { t as createServerRpc } from "./createServerRpc-BD8Xn_0_.mjs";
|
|
6
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/loopApi-
|
|
6
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/loopApi-ABi9SgWS.js
|
|
7
7
|
var meta_default$6 = {
|
|
8
8
|
name: "dependency-triage",
|
|
9
9
|
label: "Dependency Triage",
|
|
@@ -135,7 +135,7 @@ var getAuthState_createServerFn_handler = createServerRpc({
|
|
|
135
135
|
filename: "src/server/loopApi.ts"
|
|
136
136
|
}, (opts) => getAuthState.__executeServer(opts));
|
|
137
137
|
var getAuthState = createServerFn({ method: "GET" }).handler(getAuthState_createServerFn_handler, async () => {
|
|
138
|
-
const { authEnabled } = await import("./auth-
|
|
138
|
+
const { authEnabled } = await import("./auth-30Z4lV1w.mjs");
|
|
139
139
|
return { enabled: authEnabled };
|
|
140
140
|
});
|
|
141
141
|
var getConfig_createServerFn_handler = createServerRpc({
|
|
@@ -234,7 +234,7 @@ var loadOlderRuns = createServerFn({ method: "GET" }).validator((d) => d).handle
|
|
|
234
234
|
await backend();
|
|
235
235
|
if (!await ownedLoop(data.loopId)) return [];
|
|
236
236
|
const limit = Math.min(Math.max(data.limit ?? 16, 1), 100);
|
|
237
|
-
return (await listRunsBefore(data.loopId, data.beforeTs, limit))
|
|
237
|
+
return toRunSummaries(data.loopId, await listRunsBefore(data.loopId, data.beforeTs, limit));
|
|
238
238
|
});
|
|
239
239
|
var getChartRuns_createServerFn_handler = createServerRpc({
|
|
240
240
|
id: "bdf2cf0a884a9dccf99323b84675f048164a726f8347a2b6578a4ed1a350712e",
|
|
@@ -254,7 +254,7 @@ var getArtifacts_createServerFn_handler = createServerRpc({
|
|
|
254
254
|
var getArtifacts = createServerFn({ method: "GET" }).validator((d) => d).handler(getArtifacts_createServerFn_handler, async ({ data }) => {
|
|
255
255
|
await backend();
|
|
256
256
|
if (!await ownedLoop(data.loopId)) return [];
|
|
257
|
-
const { listLoopArtifacts } = await import("./artifactFiles-
|
|
257
|
+
const { listLoopArtifacts } = await import("./artifactFiles-BCaIIrrT.mjs");
|
|
258
258
|
return listLoopArtifacts(data.loopId);
|
|
259
259
|
});
|
|
260
260
|
var getArtifact_createServerFn_handler = createServerRpc({
|
|
@@ -265,7 +265,7 @@ var getArtifact_createServerFn_handler = createServerRpc({
|
|
|
265
265
|
var getArtifact = createServerFn({ method: "GET" }).validator((d) => d).handler(getArtifact_createServerFn_handler, async ({ data }) => {
|
|
266
266
|
await backend();
|
|
267
267
|
if (!await ownedLoop(data.loopId)) return { error: "file not found" };
|
|
268
|
-
const { readLoopArtifact } = await import("./artifactFiles-
|
|
268
|
+
const { readLoopArtifact } = await import("./artifactFiles-BCaIIrrT.mjs");
|
|
269
269
|
return readLoopArtifact(data.loopId, data.path);
|
|
270
270
|
});
|
|
271
271
|
var getRunDiff_createServerFn_handler = createServerRpc({
|
|
@@ -284,7 +284,7 @@ var getRunDiff = createServerFn({ method: "GET" }).validator((d) => d).handler(g
|
|
|
284
284
|
hasSnapshot: false,
|
|
285
285
|
files: []
|
|
286
286
|
};
|
|
287
|
-
const { computeRunDiff } = await import("./runDiff
|
|
287
|
+
const { computeRunDiff } = await import("./runDiff--qLtU4FI.mjs");
|
|
288
288
|
return computeRunDiff(data.runId);
|
|
289
289
|
});
|
|
290
290
|
var listTemplates_createServerFn_handler = createServerRpc({
|
|
@@ -405,7 +405,7 @@ var deleteJob = createServerFn({ method: "POST" }).validator((id) => id).handler
|
|
|
405
405
|
if (!await requestDeleteLoop(id)) return { error: "not found" };
|
|
406
406
|
if (unreachable && mayRetireAuthority) {
|
|
407
407
|
if (!await forceDeleteLoop(id)) return { error: "delete failed; server data was not deleted" };
|
|
408
|
-
const { logger } = await import("./logger-
|
|
408
|
+
const { logger } = await import("./logger-Gy-47z3k.mjs");
|
|
409
409
|
logger.child({ mod: "loop-lifecycle" }).warn({
|
|
410
410
|
action: "unreachable-delete",
|
|
411
411
|
loopId: id,
|
|
@@ -445,7 +445,7 @@ var forceDeleteJob = createServerFn({ method: "POST" }).validator((d) => d).hand
|
|
|
445
445
|
}
|
|
446
446
|
scheduler.removeLoop(data.id);
|
|
447
447
|
if (!await forceDeleteLoop(data.id)) return { error: "force delete failed; server data was not deleted" };
|
|
448
|
-
const { logger } = await import("./logger-
|
|
448
|
+
const { logger } = await import("./logger-Gy-47z3k.mjs");
|
|
449
449
|
logger.child({ mod: "loop-lifecycle" }).warn({
|
|
450
450
|
action: "force-delete",
|
|
451
451
|
loopId: data.id,
|
|
@@ -536,7 +536,7 @@ var mintClaim_createServerFn_handler = createServerRpc({
|
|
|
536
536
|
}, (opts) => mintClaim.__executeServer(opts));
|
|
537
537
|
var mintClaim = createServerFn({ method: "POST" }).validator((teamId) => teamId).handler(mintClaim_createServerFn_handler, async ({ data: teamId }) => {
|
|
538
538
|
await backend();
|
|
539
|
-
const { mintDeviceToken, rememberConnectKey } = await import("./tokens-
|
|
539
|
+
const { mintDeviceToken, rememberConnectKey } = await import("./tokens-CbfoRC_s.mjs");
|
|
540
540
|
const { userId, teamId: active } = await requestScope(teamId);
|
|
541
541
|
const owner = userId ?? "shared";
|
|
542
542
|
const token = mintDeviceToken();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { c as createFileRoute, s as lazyRouteComponent } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
2
2
|
import { c as getAuthState } from "./loopApi-8_KgBapr.mjs";
|
|
3
|
-
import { a as authClient } from "./LoopPlaybook-
|
|
4
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/loops._loopId-
|
|
5
|
-
var $$splitComponentImporter = () => import("./loops._loopId-
|
|
3
|
+
import { a as authClient } from "./LoopPlaybook-DC7QVvPY.mjs";
|
|
4
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/loops._loopId-SON_t43g.js
|
|
5
|
+
var $$splitComponentImporter = () => import("./loops._loopId-p1KWsvMM.mjs");
|
|
6
6
|
/**
|
|
7
7
|
* Loop detail PAGE — `/loops/$loopId`. The dedicated page that replaced the old
|
|
8
8
|
* dashboard modal: a loop header + action toolbar, the unified Files panel (task
|
|
@@ -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 { _ as buildFileEntries, gt as isTaskEntry, l as CODING_AGENTS } from "./boot-
|
|
4
|
-
import { A as tsShort, D as runPulseStyle, O as sectionHeadCls, S as labelCls, T as rel, _ as dur, b as humanBytes, c as btnDanger, d as btnQuiet, h as dotLabel, i as Pre, j as until, k as selectCls, l as btnPrimary, m as dotColor, n as Loading, o as btn, p as cronText, r as Pill, s as btnCost, t as ErrorBanner, v as fmt, x as inputCls } from "./ui-
|
|
3
|
+
import { _ as buildFileEntries, gt as isTaskEntry, l as CODING_AGENTS } from "./boot-3BNKujyp.mjs";
|
|
4
|
+
import { A as tsShort, D as runPulseStyle, O as sectionHeadCls, S as labelCls, T as rel, _ as dur, b as humanBytes, c as btnDanger, d as btnQuiet, h as dotLabel, i as Pre, j as until, k as selectCls, l as btnPrimary, m as dotColor, n as Loading, o as btn, p as cronText, r as Pill, s as btnCost, t as ErrorBanner, v as fmt, x as inputCls } from "./ui-Ww2tTM2u.mjs";
|
|
5
5
|
import { d as useNavigate, u as Link } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
6
6
|
import { C as startJob, S as runJob, _ as loadOlderRuns, a as evolveJob, b as pauseJob, f as getJobDetail, i as deleteJob, s as getArtifacts, w as stopJob, x as requestSteer, y as patchJob } from "./loopApi-8_KgBapr.mjs";
|
|
7
7
|
import { n as TaskFileView, r as ViewerHead, t as ArtifactBody } from "./artifactView-iuPsp5aa.mjs";
|
|
8
|
-
import { i as useFlash, n as FlashLine, r as LoadErrorCard, t as ConfirmBar } from "./actionUi-
|
|
9
|
-
import { s as useSession } from "./LoopPlaybook-
|
|
8
|
+
import { i as useFlash, n as FlashLine, r as LoadErrorCard, t as ConfirmBar } from "./actionUi-BN55TNYE.mjs";
|
|
9
|
+
import { s as useSession } from "./LoopPlaybook-DC7QVvPY.mjs";
|
|
10
10
|
import { t as setActiveTeamCookie } from "./teamCookie-B7hLOIie.mjs";
|
|
11
|
-
import { t as SignIn } from "./SignIn-
|
|
12
|
-
import { i as lifecycleDisplay, n as daemonStopSupport, r as deriveLoopLifecycle, t as DAEMON_UPGRADE_REQUIRED } from "./lifecycleUi-
|
|
13
|
-
import { a as listChannels, n as Timeline, s as mergeRuns, t as MachinesModal } from "./notifyFns-
|
|
14
|
-
import { t as Route } from "./loops._loopId-
|
|
15
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/loops._loopId-
|
|
11
|
+
import { t as SignIn } from "./SignIn-RmpWm9uy.mjs";
|
|
12
|
+
import { i as lifecycleDisplay, n as daemonStopSupport, r as deriveLoopLifecycle, t as DAEMON_UPGRADE_REQUIRED } from "./lifecycleUi-DgBQAYzp.mjs";
|
|
13
|
+
import { a as listChannels, n as Timeline, s as mergeRuns, t as MachinesModal } from "./notifyFns-DuPR1zd7.mjs";
|
|
14
|
+
import { t as Route } from "./loops._loopId-SON_t43g.mjs";
|
|
15
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/loops._loopId-p1KWsvMM.js
|
|
16
16
|
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
17
17
|
var import_jsx_runtime = require_jsx_runtime();
|
|
18
18
|
/**
|
|
@@ -556,7 +556,7 @@ var STEER_SEEDS = [
|
|
|
556
556
|
seed: "Give this loop a standing objective to optimize toward: "
|
|
557
557
|
}
|
|
558
558
|
];
|
|
559
|
-
var LoopView = (0, import_react.lazy)(() => import("./LoopView-
|
|
559
|
+
var LoopView = (0, import_react.lazy)(() => import("./LoopView-DwSrm9Ja.mjs").then((m) => ({ default: m.LoopView })));
|
|
560
560
|
/**
|
|
561
561
|
* Loop detail PAGE body (`/loops/$loopId`) — the redesign of the former modal.
|
|
562
562
|
* One scrolling page: a loop header (name / status / schedule / agent / machine +
|
|
@@ -1,13 +1,13 @@
|
|
|
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 { D as runPulseStyle, O as sectionHeadCls, _ as dur, a as StatusPill, b as humanBytes, c as btnDanger, n as Loading, o as btn, r as Pill, v as fmt, y as fnum } from "./ui-
|
|
3
|
+
import { D as runPulseStyle, O as sectionHeadCls, _ as dur, a as StatusPill, b as humanBytes, c as btnDanger, n as Loading, o as btn, r as Pill, v as fmt, y as fnum } from "./ui-Ww2tTM2u.mjs";
|
|
4
4
|
import { u as Link } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
5
5
|
import { T as stopRun, _ as loadOlderRuns, f as getJobDetail, p as getRunDiff } from "./loopApi-8_KgBapr.mjs";
|
|
6
|
-
import { r as LoadErrorCard } from "./actionUi-
|
|
7
|
-
import { s as useSession } from "./LoopPlaybook-
|
|
8
|
-
import { t as SignIn } from "./SignIn-
|
|
9
|
-
import { t as Route } from "./loops._loopId_.runs._runId-
|
|
10
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/loops._loopId_.runs._runId-
|
|
6
|
+
import { r as LoadErrorCard } from "./actionUi-BN55TNYE.mjs";
|
|
7
|
+
import { s as useSession } from "./LoopPlaybook-DC7QVvPY.mjs";
|
|
8
|
+
import { t as SignIn } from "./SignIn-RmpWm9uy.mjs";
|
|
9
|
+
import { t as Route } from "./loops._loopId_.runs._runId-Ymy4lwee.mjs";
|
|
10
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/loops._loopId_.runs._runId-PUGBrD5q.js
|
|
11
11
|
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
12
12
|
var import_jsx_runtime = require_jsx_runtime();
|
|
13
13
|
/**
|
|
@@ -424,7 +424,7 @@ function RunDetailView({ loopId, runId }) {
|
|
|
424
424
|
loopId,
|
|
425
425
|
runId
|
|
426
426
|
]);
|
|
427
|
-
const running = !!(run?.queued || run?.running);
|
|
427
|
+
const running = !!(run?.queued || run?.running || run?.reconciliation);
|
|
428
428
|
(0, import_react.useEffect)(() => {
|
|
429
429
|
if (!running) return;
|
|
430
430
|
const t = setInterval(() => void poll(), 3e3);
|
|
@@ -525,7 +525,13 @@ function RunDetailView({ loopId, runId }) {
|
|
|
525
525
|
className: "text-body text-secondary",
|
|
526
526
|
children: "Queued; it starts when this loop is free and the machine polls."
|
|
527
527
|
})
|
|
528
|
-
}) : run.running ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RunningState, { run }) :
|
|
528
|
+
}) : run.running ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RunningState, { run }) : run.reconciliation ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Card, {
|
|
529
|
+
label: "Recovery",
|
|
530
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
531
|
+
className: "text-body text-secondary",
|
|
532
|
+
children: run.reconciliation === "blocking" ? detail.machine.presence === "online" ? "The machine is online and checking an interrupted run. Queued work starts automatically after recovery." : "Waiting for the machine to reconnect and check an interrupted run. Queued work starts automatically; no action is required." : "This interrupted run no longer blocks queued work. Pievo will still accept its saved report if it arrives."
|
|
533
|
+
})
|
|
534
|
+
}) : null,
|
|
529
535
|
run.reportIncident && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Card, {
|
|
530
536
|
label: "Terminal report rejected",
|
|
531
537
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { c as createFileRoute, s as lazyRouteComponent } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
2
2
|
import { c as getAuthState } from "./loopApi-8_KgBapr.mjs";
|
|
3
|
-
import { a as authClient } from "./LoopPlaybook-
|
|
4
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/loops._loopId_.runs._runId-
|
|
5
|
-
var $$splitComponentImporter = () => import("./loops._loopId_.runs._runId-
|
|
3
|
+
import { a as authClient } from "./LoopPlaybook-DC7QVvPY.mjs";
|
|
4
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/loops._loopId_.runs._runId-Ymy4lwee.js
|
|
5
|
+
var $$splitComponentImporter = () => import("./loops._loopId_.runs._runId-PUGBrD5q.mjs");
|
|
6
6
|
/**
|
|
7
7
|
* Run detail PAGE — `/loops/$loopId/runs/$runId`. A standalone page (the trailing
|
|
8
8
|
* `_` on the `$loopId` segment opts it out of the loop page's component so the run
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Et as listMachinesForTeam, Ft as machineIdFromToken, L as deleteMachine$1, Lt as mintDeviceToken, Pt as loopsForMachine,
|
|
1
|
+
import { $t as sha256, Et as listMachinesForTeam, Ft as machineIdFromToken, Gt as rememberConnectKey, L as deleteMachine$1, Lt as mintDeviceToken, Pt as loopsForMachine, Tt as listMachines$1, f as MIN_DAEMON_VERSION, j as daemonNeedsUpdate, k as createMachine$1, on as updateMachine, tt as getMachine, z as ensureServer } from "./boot-3BNKujyp.mjs";
|
|
2
2
|
import { n as createServerFn } from "./ssr.mjs";
|
|
3
|
-
import { requestScope } from "./auth-
|
|
3
|
+
import { requestScope } from "./auth-30Z4lV1w.mjs";
|
|
4
4
|
import { t as createServerRpc } from "./createServerRpc-BD8Xn_0_.mjs";
|
|
5
5
|
//#region node_modules/.nitro/vite/services/ssr/assets/machineScope-2h-fcKmG.js
|
|
6
6
|
/**
|
|
@@ -28,7 +28,7 @@ function tokenVisibleTo(m, scope) {
|
|
|
28
28
|
return !scope.enforce || m.userId === scope.userId;
|
|
29
29
|
}
|
|
30
30
|
//#endregion
|
|
31
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/machineFns-
|
|
31
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/machineFns-BZ9puxDt.js
|
|
32
32
|
/**
|
|
33
33
|
* Latest published @kky42/pievo version — a cached, fail-silent lookup of the
|
|
34
34
|
* npm dist-tag `latest`, so the web can tell a user their daemon is outdated and
|
package/.output/server/_ssr/{node-sqlite-dialect-dmrazfbM.mjs → node-sqlite-dialect-D_3JmkMo.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as DefaultQueryCompiler, o as CompiledQuery, s as sql$1 } from "./auth-
|
|
1
|
+
import { n as DefaultQueryCompiler, o as CompiledQuery, s as sql$1 } from "./auth-30Z4lV1w.mjs";
|
|
2
2
|
import { n as DEFAULT_MIGRATION_TABLE, t as DEFAULT_MIGRATION_LOCK_TABLE } from "./kysely-migration-tables-JkVUjPF_-bPAX9LR_.mjs";
|
|
3
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/node-sqlite-dialect-
|
|
3
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/node-sqlite-dialect-D_3JmkMo.js
|
|
4
4
|
var NodeSqliteAdapter = class {
|
|
5
5
|
get supportsCreateIfNotExists() {
|
|
6
6
|
return true;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { F as deleteChannel$1, J as getChannel, St as listChannels$1, T as createChannel$1, s as CHANNELS, z as ensureServer } from "./boot-
|
|
1
|
+
import { F as deleteChannel$1, J as getChannel, St as listChannels$1, T as createChannel$1, s as CHANNELS, z as ensureServer } from "./boot-3BNKujyp.mjs";
|
|
2
2
|
import { n as createServerFn } from "./ssr.mjs";
|
|
3
|
-
import { requestScope } from "./auth-
|
|
3
|
+
import { requestScope } from "./auth-30Z4lV1w.mjs";
|
|
4
4
|
import { t as createServerRpc } from "./createServerRpc-BD8Xn_0_.mjs";
|
|
5
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/notifyFns-
|
|
5
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/notifyFns-BUCePuF3.js
|
|
6
6
|
/**
|
|
7
7
|
* Notification-channel server functions. Channels are per-team push targets a
|
|
8
8
|
* loop can route its run messages to. Secrets (bot token / chat id) live in the
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { o as __toESM } from "../_runtime.mjs";
|
|
2
2
|
import { a as TooltipTrigger, g as require_jsx_runtime, h as require_react, i as TooltipPortal, n as TooltipPopup, o as TooltipRoot, r as TooltipPositioner } from "../_libs/@base-ui/react+[...].mjs";
|
|
3
|
-
import { It as machinePresence, dt as isOutdated } from "./boot-
|
|
4
|
-
import { E as runPulseAnim, M as useHydrated, S as labelCls, T as rel, _ as dur, c as btnDanger, g as dotOpacity, h as dotLabel, j as until, l as btnPrimary, m as dotColor, o as btn, t as ErrorBanner, v as fmt, x as inputCls } from "./ui-
|
|
3
|
+
import { It as machinePresence, dt as isOutdated } from "./boot-3BNKujyp.mjs";
|
|
4
|
+
import { E as runPulseAnim, M as useHydrated, S as labelCls, T as rel, _ as dur, c as btnDanger, g as dotOpacity, h as dotLabel, j as until, l as btnPrimary, m as dotColor, o as btn, t as ErrorBanner, v as fmt, x as inputCls } from "./ui-Ww2tTM2u.mjs";
|
|
5
5
|
import { n as createServerFn } from "./ssr.mjs";
|
|
6
6
|
import { r as createSsrRpc, u as getConfig } from "./loopApi-8_KgBapr.mjs";
|
|
7
|
-
import { n as ModalHead, r as ModalSection, t as Modal } from "./Modal-
|
|
8
|
-
import { n as daemonStopSupport } from "./lifecycleUi-
|
|
9
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/notifyFns-
|
|
7
|
+
import { n as ModalHead, r as ModalSection, t as Modal } from "./Modal-MaCG52Pv.mjs";
|
|
8
|
+
import { n as daemonStopSupport } from "./lifecycleUi-DgBQAYzp.mjs";
|
|
9
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/notifyFns-DuPR1zd7.js
|
|
10
10
|
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
11
11
|
var import_jsx_runtime = require_jsx_runtime();
|
|
12
12
|
/**
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { A as sql } from "../_libs/drizzle-orm+postgres.mjs";
|
|
2
2
|
import { g as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
3
|
-
import { H as evolve_default, Ht as readJsonBody, M as dashboard_default, d as MACHINE_BODY_CAP, z as ensureServer } from "./boot-
|
|
3
|
+
import { H as evolve_default, Ht as readJsonBody, M as dashboard_default, d as MACHINE_BODY_CAP, z as ensureServer } from "./boot-3BNKujyp.mjs";
|
|
4
4
|
import { c as createFileRoute, i as HeadContent, l as createRootRoute, o as createRouter, r as Scripts } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
5
5
|
import { n as imageMime } from "./artifactKind-BW0isV8L.mjs";
|
|
6
|
-
import { t as Route$17 } from "./invite._token-
|
|
7
|
-
import { t as Route$18 } from "./loops._loopId-
|
|
8
|
-
import { t as Route$19 } from "./loops._loopId_.runs._runId-
|
|
9
|
-
import { t as Route$20 } from "./routes-
|
|
10
|
-
import { t as Route$21 } from "./t._teamId-
|
|
11
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/router-
|
|
6
|
+
import { t as Route$17 } from "./invite._token-BKlz0R2f.mjs";
|
|
7
|
+
import { t as Route$18 } from "./loops._loopId-SON_t43g.mjs";
|
|
8
|
+
import { t as Route$19 } from "./loops._loopId_.runs._runId-Ymy4lwee.mjs";
|
|
9
|
+
import { t as Route$20 } from "./routes-ClZEdsnB.mjs";
|
|
10
|
+
import { t as Route$21 } from "./t._teamId-BgHV_KFP.mjs";
|
|
11
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/router-Czxvra6l.js
|
|
12
12
|
var import_jsx_runtime = require_jsx_runtime();
|
|
13
13
|
var app_default = "/assets/app-D1cij_NJ.css";
|
|
14
14
|
var Route$16 = createRootRoute({
|
|
@@ -176,7 +176,7 @@ var Route$15 = createFileRoute("/machine/report")({ server: { handlers: { POST:
|
|
|
176
176
|
const parsed = await readJsonBody(request, MACHINE_BODY_CAP);
|
|
177
177
|
if (parsed.kind === "too-large") return Response.json({ error: "body too large" }, { status: 413 });
|
|
178
178
|
const body = parsed.kind === "ok" && parsed.body && typeof parsed.body === "object" ? parsed.body : {};
|
|
179
|
-
const { getGateway } = await import("./boot-
|
|
179
|
+
const { getGateway } = await import("./boot-CsEFT53K.mjs");
|
|
180
180
|
const r = await (await getGateway()).report(token, body);
|
|
181
181
|
return Response.json(r.body, { status: r.status });
|
|
182
182
|
} } } });
|
|
@@ -223,7 +223,7 @@ var Route$11 = createFileRoute("/agent-api/loop")({ server: { handlers: { POST:
|
|
|
223
223
|
exitCode: 1
|
|
224
224
|
}, { status: 413 });
|
|
225
225
|
const body = parsed.kind === "ok" ? parsed.body : {};
|
|
226
|
-
const { getCliGateway } = await import("./boot-
|
|
226
|
+
const { getCliGateway } = await import("./boot-CsEFT53K.mjs");
|
|
227
227
|
const r = await (await getCliGateway()).agentApi(token, Array.isArray(body.argv) ? body.argv : []);
|
|
228
228
|
return Response.json(r.body, { status: r.status });
|
|
229
229
|
} } } });
|
|
@@ -242,11 +242,11 @@ var Route$10 = createFileRoute("/api/machine/sync")({ server: { handlers: { POST
|
|
|
242
242
|
const auth = request.headers.get("authorization") ?? "";
|
|
243
243
|
const token = auth.startsWith("Bearer ") ? auth.slice(7) : "";
|
|
244
244
|
if (!token) return Response.json({ error: "missing device token" }, { status: 401 });
|
|
245
|
-
const { SYNC_BODY_CAP } = await import("./artifacts-
|
|
245
|
+
const { SYNC_BODY_CAP } = await import("./artifacts-jQ-bfdhI.mjs");
|
|
246
246
|
const parsed = await readJsonBody(request, SYNC_BODY_CAP);
|
|
247
247
|
if (parsed.kind === "too-large") return Response.json({ error: "sync body too large" }, { status: 413 });
|
|
248
248
|
if (parsed.kind === "invalid") return Response.json({ error: "invalid JSON" }, { status: 400 });
|
|
249
|
-
const { getArtifactSync } = await import("./boot-
|
|
249
|
+
const { getArtifactSync } = await import("./boot-CsEFT53K.mjs");
|
|
250
250
|
const r = await (await getArtifactSync()).sync(token, parsed.body);
|
|
251
251
|
return Response.json(r.body, { status: r.status });
|
|
252
252
|
} } } });
|
|
@@ -257,10 +257,21 @@ var Route$9 = createFileRoute("/api/machine/status")({ server: { handlers: { GET
|
|
|
257
257
|
const limited = machineRouteLimit(request, token || void 0);
|
|
258
258
|
if (limited) return limited;
|
|
259
259
|
if (!token) return Response.json({ error: "missing device token" }, { status: 401 });
|
|
260
|
-
const { getGateway } = await import("./boot-
|
|
260
|
+
const { getGateway } = await import("./boot-CsEFT53K.mjs");
|
|
261
261
|
const r = await (await getGateway()).status(token);
|
|
262
262
|
return Response.json(r.body, { status: r.status });
|
|
263
263
|
} } } });
|
|
264
|
+
/** Keep the HTTP adapter's protocol forwarding independently testable. */
|
|
265
|
+
function gatewayPollRequest(body) {
|
|
266
|
+
return {
|
|
267
|
+
protocolVersion: body.protocolVersion,
|
|
268
|
+
currentRuns: body.currentRuns,
|
|
269
|
+
daemonInstanceId: body.daemonInstanceId,
|
|
270
|
+
recoveryComplete: body.recoveryComplete,
|
|
271
|
+
watchDigest: typeof body.watchDigest === "string" ? body.watchDigest : void 0,
|
|
272
|
+
info: body
|
|
273
|
+
};
|
|
274
|
+
}
|
|
264
275
|
/** POST /api/machine/poll — daemon claims this machine's pending runs (Bearer device token). */
|
|
265
276
|
var Route$8 = createFileRoute("/api/machine/poll")({ server: { handlers: { POST: async ({ request }) => {
|
|
266
277
|
const auth = request.headers.get("authorization") ?? "";
|
|
@@ -271,13 +282,8 @@ var Route$8 = createFileRoute("/api/machine/poll")({ server: { handlers: { POST:
|
|
|
271
282
|
const parsed = await readJsonBody(request, MACHINE_BODY_CAP);
|
|
272
283
|
if (parsed.kind === "too-large") return Response.json({ error: "body too large" }, { status: 413 });
|
|
273
284
|
const body = parsed.kind === "ok" ? parsed.body : {};
|
|
274
|
-
const { getGateway } = await import("./boot-
|
|
275
|
-
const r = await (await getGateway()).pollV3Wait(token,
|
|
276
|
-
protocolVersion: body.protocolVersion,
|
|
277
|
-
currentRuns: body.currentRuns,
|
|
278
|
-
watchDigest: typeof body.watchDigest === "string" ? body.watchDigest : void 0,
|
|
279
|
-
info: body
|
|
280
|
-
});
|
|
285
|
+
const { getGateway } = await import("./boot-CsEFT53K.mjs");
|
|
286
|
+
const r = await (await getGateway()).pollV3Wait(token, gatewayPollRequest(body));
|
|
281
287
|
return Response.json(r.body, { status: r.status });
|
|
282
288
|
} } } });
|
|
283
289
|
/** Bearer device token from the request (the machine's persisted ~/.pievo token). */
|
|
@@ -300,7 +306,7 @@ var Route$7 = createFileRoute("/api/machine/loop")({ server: { handlers: {
|
|
|
300
306
|
const parsed = await readJsonBody(request, MACHINE_BODY_CAP);
|
|
301
307
|
if (parsed.kind === "too-large") return Response.json({ error: "body too large" }, { status: 413 });
|
|
302
308
|
const body = parsed.kind === "ok" ? parsed.body : {};
|
|
303
|
-
const { getGateway } = await import("./boot-
|
|
309
|
+
const { getGateway } = await import("./boot-CsEFT53K.mjs");
|
|
304
310
|
const r = await (await getGateway()).createLoop(token, body);
|
|
305
311
|
return Response.json(r.body, { status: r.status });
|
|
306
312
|
},
|
|
@@ -309,7 +315,7 @@ var Route$7 = createFileRoute("/api/machine/loop")({ server: { handlers: {
|
|
|
309
315
|
const limited = machineRouteLimit(request, token || void 0);
|
|
310
316
|
if (limited) return limited;
|
|
311
317
|
if (!token) return Response.json({ error: "missing device token" }, { status: 401 });
|
|
312
|
-
const { getGateway } = await import("./boot-
|
|
318
|
+
const { getGateway } = await import("./boot-CsEFT53K.mjs");
|
|
313
319
|
const r = await (await getGateway()).listLoops(token);
|
|
314
320
|
return Response.json(r.body, { status: r.status });
|
|
315
321
|
},
|
|
@@ -321,7 +327,7 @@ var Route$7 = createFileRoute("/api/machine/loop")({ server: { handlers: {
|
|
|
321
327
|
const parsed = await readJsonBody(request, MACHINE_BODY_CAP);
|
|
322
328
|
if (parsed.kind === "too-large") return Response.json({ error: "body too large" }, { status: 413 });
|
|
323
329
|
const body = parsed.kind === "ok" ? parsed.body : {};
|
|
324
|
-
const { getGateway } = await import("./boot-
|
|
330
|
+
const { getGateway } = await import("./boot-CsEFT53K.mjs");
|
|
325
331
|
const r = await (await getGateway()).editLoop(token, body.id, body.patch ?? {}, body.dryRun === true);
|
|
326
332
|
return Response.json(r.body, { status: r.status });
|
|
327
333
|
}
|
|
@@ -337,7 +343,7 @@ var Route$6 = createFileRoute("/api/machine/log")({ server: { handlers: { GET: a
|
|
|
337
343
|
const url = new URL(request.url);
|
|
338
344
|
const loopId = url.searchParams.get("loopId") ?? "";
|
|
339
345
|
const limit = url.searchParams.get("limit") ?? void 0;
|
|
340
|
-
const { getGateway } = await import("./boot-
|
|
346
|
+
const { getGateway } = await import("./boot-CsEFT53K.mjs");
|
|
341
347
|
const r = await (await getGateway()).loopLog(token, loopId, limit);
|
|
342
348
|
return Response.json(r.body, { status: r.status });
|
|
343
349
|
} } } });
|
|
@@ -360,7 +366,7 @@ var Route$5 = createFileRoute("/api/machine/cli")({ server: { handlers: { POST:
|
|
|
360
366
|
const parsed = await readJsonBody(request, MACHINE_BODY_CAP);
|
|
361
367
|
if (parsed.kind === "too-large") return Response.json({ error: "body too large" }, { status: 413 });
|
|
362
368
|
const body = parsed.kind === "ok" ? parsed.body : {};
|
|
363
|
-
const { getCliGateway } = await import("./boot-
|
|
369
|
+
const { getCliGateway } = await import("./boot-CsEFT53K.mjs");
|
|
364
370
|
const r = await (await getCliGateway()).cli(token, Array.isArray(body.argv) ? body.argv : []);
|
|
365
371
|
return Response.json(r.body, { status: r.status });
|
|
366
372
|
} } } });
|
|
@@ -389,7 +395,7 @@ var Route$5 = createFileRoute("/api/machine/cli")({ server: { handlers: { POST:
|
|
|
389
395
|
var PROBE_TIMEOUT_MS = 5e3;
|
|
390
396
|
var Route$4 = createFileRoute("/api/health/db")({ server: { handlers: { GET: async () => {
|
|
391
397
|
try {
|
|
392
|
-
const { db } = await import("./db-
|
|
398
|
+
const { db } = await import("./db-CXownd1H.mjs");
|
|
393
399
|
const ping = db.execute(sql`select 1`);
|
|
394
400
|
const timeout = new Promise((_, reject) => {
|
|
395
401
|
setTimeout(() => reject(/* @__PURE__ */ new Error(`db ping timed out after ${PROBE_TIMEOUT_MS}ms`)), PROBE_TIMEOUT_MS).unref?.();
|
|
@@ -409,8 +415,8 @@ var Route$4 = createFileRoute("/api/health/db")({ server: { handlers: { GET: asy
|
|
|
409
415
|
} } } });
|
|
410
416
|
/** Better Auth handler — GET/POST /api/auth/* (OAuth callbacks, session, sign-out). */
|
|
411
417
|
var Route$3 = createFileRoute("/api/auth/$")({ server: { handlers: {
|
|
412
|
-
GET: async ({ request }) => (await import("./auth-
|
|
413
|
-
POST: async ({ request }) => (await import("./auth-
|
|
418
|
+
GET: async ({ request }) => (await import("./auth-30Z4lV1w.mjs")).auth.handler(request),
|
|
419
|
+
POST: async ({ request }) => (await import("./auth-30Z4lV1w.mjs")).auth.handler(request)
|
|
414
420
|
} } });
|
|
415
421
|
var REFERENCES = {
|
|
416
422
|
"create.md": "# Create a loop\n\nThis machine is already connected — `pievo daemon start` on first capture (see `bootstrap.md`) or the daemon that's been running since. Decide what to build, author it, create it. Use the **pievo-cli** prefix the user pasted (default `pievo`) and, on the first-capture path, the **connect-key** from the capture snippet.\n\n## 1 · Decide what to build\n\nA loop only makes sense with a real task behind it. Read the session you're in and pick the starting point:\n\n- **The user already did a clear task this session**: turn that task into the loop, grounded in the real URLs, paths, commands, and thresholds from the session.\n- **The capture snippet carries a task description**: that description is the intent. Build exactly that loop, grounded in this project's real paths and commands, and confirm anything it leaves open.\n- **There's no task yet**: don't invent a loop. Inspect what this project is, propose a few concrete loops that would be useful FOR IT, and let the user pick.\n\nOnly continue once there's a real intent.\n\n## 2 · Settle cadence, output, and the objective\n\nNever silently guess how often the loop runs or what each run produces: propose → confirm → build. Propose sensible defaults for this specific task, in one short message, and get a yes or adjustment before creating.\n\n- **Cadence.** Choose **cron** for wall-clock work (for example, every day at 9am your time, every hour, or Monday morning) or **continuous** when the next exec should become ready a fixed number of minutes after the previous exec ends. Continuous delay is at least 1 minute.\n- **Per-run output.** Propose the concrete artifact or message format, e.g. a short markdown summary in `report.md`, a dated markdown product, or a one-line status.\n- **Cheap checks**: if the loop needs a cheap deterministic check, put it in the task file SOP. The exec agent runs the check first; if nothing changed, it reports `no-change` and stops.\n- **Markdown products**: if runs write markdown products, choose a small fixed `type:` vocabulary up front and use flat front matter (`type:`, `title:`, `date:`) so dashboard primitives can index them.\n- **Standing objective — when useful**: optimization tasks may get a one-line `goal` that guides every run. It never stops the loop; all loops run until the owner pauses or deletes them.\n\n## 3 · Create README.md and COOKBOOK.md\n\nEvery loop gets its own folder under the project: `<project>/pievo/<slug>/`. It contains the authoritative standing instructions, bounded learned context, and lightweight products.\n\nThis folder is a synced content home, not a scratch workspace. Heavy work products — repo checkouts, git worktrees, `node_modules`, build output, caches — must live outside the loop folder. Write only finished reports/artifacts back into the loop folder.\n\nWrite `<project>/pievo/<slug>/README.md` with standing instructions only. It has one required section:\n\n```markdown\n# <Loop name>\n\n## Spec\n<What this loop checks or does and why; its concrete SOP, commands, endpoints, files, output and notification rules, cheap early checks, and product conventions. State mode: maintenance|optimization|mixed when that distinction helps interpret no-change evidence.>\n```\n\nWrite its sibling `<project>/pievo/<slug>/COOKBOOK.md` exactly as the initial bounded learned-context shell:\n\n```markdown\n# Cookbook\nConsolidated through: #0\n\n## Knowledge\n\n## Timeline\n```\n\nKnowledge will hold durable facts plus reusable positive and negative lessons. Timeline is reserved for evolve/steer decision boundaries, never one entry per exec. Keep the absolute path to `README.md`; it goes in config as `taskFile`. The Cookbook path is inferred beside it and is not a config field.\n\n## 4 · Author the loop config\n\nA loop uses `scheduleMode: \"cron\" | \"continuous\"`. Cron fires at wall-clock occurrences. Continuous enqueues its next exec only after an exec ends (`done` or `error`) plus `continuousDelayMinutes`; canceled runs, paused loops, and steer/evolve runs do not continue it.\n\nAuthor the config inline and pass it to `pievo new --json`:\n\n```json\n{\n \"name\": \"short human name\",\n \"cron\": \"m h dom mon dow\",\n \"scheduleMode\": \"cron\",\n \"continuousDelayMinutes\": 1,\n \"goal\": \"<optional one-line standing objective>\",\n \"workdir\": \"<absolute project dir>\",\n \"taskFile\": \"<absolute path to the task file above>\",\n \"model\": \"<optional coding-agent model id>\",\n \"reasoningEffort\": \"<optional provider effort value>\",\n \"metricSchema\": [{ \"key\": \"x\", \"label\": \"X\", \"unit\": \"\" }],\n \"ui\": \"<small dashboard HTML — optional>\",\n \"notify\": \"auto\"\n}\n```\n\nRules:\n\n- Include `taskFile`. There is no `task` field; the agent's standing brief is the task file. Its parent directory becomes the synced **loop content home** for Cookbook, reports, dashboard UI, and small artifacts.\n- Set `workdir` to the absolute project directory when the loop should run in that project. This is the provider's **execution workspace (cwd)**, not the artifact root; it can differ from the loop content home.\n- `scheduleMode` defaults to `cron`. For continuous work set `scheduleMode: \"continuous\"` and choose `continuousDelayMinutes` (integer >= 1). Keep a valid `cron`; continuous ignores it but Pievo retains it so switching back restores the prior cadence.\n- `goal` is an optional standing objective. It never changes lifecycle state.\n- `model` and `reasoningEffort` are optional arbitrary strings. Include them only when the owner explicitly requests it.\n- `metricSchema` is optional; declare numeric per-run metrics to get a chart. Every exec report then supplies all values with `--metrics` (number or `null`).\n- `ui` is optional; include a day-one dashboard only when the product/metric shape is already settled.\n\n### Dashboard at create\n\nWhen the product shape is known, author the initial `ui` now so the loop has a day-one dashboard. Read `dashboard.md`; bind only declared metrics and documented product types. Keep the UI small and verify it with `--dry-run`.\n- `notify`: `auto` (only when there's something to say) | `always` | `never`.\n- Don't add `timezone`, `claim`, or auth fields — `pievo new` injects the timezone, connect-key claim, and device token.\n\n## 5 · Validate, then create\n\nPreview first:\n\n```bash\n<pievo-cli> new --json '<config>' --dry-run\n```\n\nCheck the normalized objective and fire times look right. If you authored a `ui` and the preview warns that it was not applied, fix the HTML before creating.\n\nThen create for real:\n\n```bash\n<pievo-cli> new \\\n --json '<config>' \\\n --connect-key <connect-key> \\\n --agent claude-code\n```\n\n`pievo new` detects timezone, injects the claim, records the coding agent, authenticates, validates, and POSTs it. On success, tell the user the loop name + cadence and that the first run will come automatically shortly.\n",
|
|
@@ -469,12 +475,12 @@ var Route$1 = createFileRoute("/api/machine/blob/$hash")({ server: { handlers: {
|
|
|
469
475
|
if (!token) return Response.json({ error: "missing device token" }, { status: 401 });
|
|
470
476
|
const hash = safeDecode(new URL(request.url).pathname.split("/").pop() ?? "");
|
|
471
477
|
if (hash === null) return Response.json({ error: "bad hash" }, { status: 400 });
|
|
472
|
-
const { BLOB_CAP } = await import("./artifacts-
|
|
478
|
+
const { BLOB_CAP } = await import("./artifacts-jQ-bfdhI.mjs");
|
|
473
479
|
const declared = Number(request.headers.get("content-length") ?? "");
|
|
474
480
|
if (Number.isFinite(declared) && declared > BLOB_CAP) return Response.json({ error: "blob exceeds size cap" }, { status: 413 });
|
|
475
481
|
const buf = Buffer.from(await request.arrayBuffer());
|
|
476
482
|
if (buf.length > BLOB_CAP) return Response.json({ error: "blob exceeds size cap" }, { status: 413 });
|
|
477
|
-
const { getArtifactSync } = await import("./boot-
|
|
483
|
+
const { getArtifactSync } = await import("./boot-CsEFT53K.mjs");
|
|
478
484
|
const r = await (await getArtifactSync()).putBlob(token, hash, buf);
|
|
479
485
|
return Response.json(r.body, { status: r.status });
|
|
480
486
|
} } } });
|
|
@@ -509,11 +515,11 @@ var Route = createFileRoute("/api/artifact/$loopId/$")({ server: { handlers: { G
|
|
|
509
515
|
const segments = after.slice(slash + 1).split("/").map((s) => safeDecode(s));
|
|
510
516
|
if (segments.some((s) => s === null)) return Response.json({ error: "bad path" }, { status: 400 });
|
|
511
517
|
const relPath = segments.join("/");
|
|
512
|
-
const loop = await (await import("./store-
|
|
518
|
+
const loop = await (await import("./store-40eVzW1S.mjs")).getLoop(loopId);
|
|
513
519
|
if (!loop) return Response.json({ error: "not found" }, { status: 404 });
|
|
514
|
-
const { requestScope, canAccessLoop } = await import("./auth-
|
|
520
|
+
const { requestScope, canAccessLoop } = await import("./auth-30Z4lV1w.mjs");
|
|
515
521
|
if (!await canAccessLoop(loop.teamId, await requestScope())) return Response.json({ error: "not found" }, { status: 404 });
|
|
516
|
-
const { readLoopArtifactBytes } = await import("./artifactFiles-
|
|
522
|
+
const { readLoopArtifactBytes } = await import("./artifactFiles-BCaIIrrT.mjs");
|
|
517
523
|
const r = await readLoopArtifactBytes(loopId, relPath);
|
|
518
524
|
if (r.status !== 200 || !r.bytes) return Response.json({ error: "not found" }, { status: r.status });
|
|
519
525
|
const filename = (r.filename || "file").replace(/["\\\r\n]/g, "_");
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { c as createFileRoute, p as redirect, s as lazyRouteComponent } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
2
2
|
import { c as getAuthState, d as getDefaultTeam, g as listTemplates } from "./loopApi-8_KgBapr.mjs";
|
|
3
|
-
import { a as authClient } from "./LoopPlaybook-
|
|
4
|
-
import { n as fetchLiveData } from "./DashboardView-
|
|
5
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/routes-
|
|
6
|
-
var $$splitErrorComponentImporter = () => import("./routes-
|
|
7
|
-
var $$splitComponentImporter = () => import("./routes-
|
|
3
|
+
import { a as authClient } from "./LoopPlaybook-DC7QVvPY.mjs";
|
|
4
|
+
import { n as fetchLiveData } from "./DashboardView-BF7PciP7.mjs";
|
|
5
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/routes-ClZEdsnB.js
|
|
6
|
+
var $$splitErrorComponentImporter = () => import("./routes-ComqHvCL.mjs");
|
|
7
|
+
var $$splitComponentImporter = () => import("./routes-D5jJJ-30.mjs");
|
|
8
8
|
/**
|
|
9
9
|
* The home route. Under the auth gate it is now a THIN redirect to the explicit
|
|
10
10
|
* team URL (`/t/<lastUsed|personal>`) so the dashboard's team lives in the path
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { g as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
2
2
|
import { f as useRouter } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
3
|
-
import { r as LoadErrorCard } from "./actionUi-
|
|
4
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/routes-
|
|
3
|
+
import { r as LoadErrorCard } from "./actionUi-BN55TNYE.mjs";
|
|
4
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/routes-ComqHvCL.js
|
|
5
5
|
var import_jsx_runtime = require_jsx_runtime();
|
|
6
6
|
/**
|
|
7
7
|
* The home route. Under the auth gate it is now a THIN redirect to the explicit
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { g as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
2
|
-
import { s as useSession } from "./LoopPlaybook-
|
|
3
|
-
import { t as SignIn } from "./SignIn-
|
|
4
|
-
import { t as DashboardView } from "./DashboardView-
|
|
5
|
-
import { t as Route } from "./routes-
|
|
6
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/routes-
|
|
2
|
+
import { s as useSession } from "./LoopPlaybook-DC7QVvPY.mjs";
|
|
3
|
+
import { t as SignIn } from "./SignIn-RmpWm9uy.mjs";
|
|
4
|
+
import { t as DashboardView } from "./DashboardView-BF7PciP7.mjs";
|
|
5
|
+
import { t as Route } from "./routes-ClZEdsnB.mjs";
|
|
6
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/routes-D5jJJ-30.js
|
|
7
7
|
var import_jsx_runtime = require_jsx_runtime();
|
|
8
8
|
/**
|
|
9
9
|
* The home route. Under the auth gate it is now a THIN redirect to the explicit
|