@kky42/pievo-server 2.4.4 → 2.4.5
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/MachinesModal-LxqWuI5Z.js +1 -0
- package/.output/public/assets/{SignIn-Czy-XJou.js → SignIn-Cf4HOpdF.js} +1 -1
- package/.output/public/assets/{actionUi-DGJmNwsD.js → actionUi-yYVvoOTn.js} +1 -1
- package/.output/public/assets/{index-gJavUZIA.js → index-0VPwUcZS.js} +3 -3
- package/.output/public/assets/{invite._token-BUYUsIBj.js → invite._token-B0EKVyrU.js} +1 -1
- package/.output/public/assets/{invite._token-BQUbjPMM.js → invite._token-rUfzvFd9.js} +1 -1
- package/.output/public/assets/{loops._loopId-BkEPvT1q.js → loops._loopId-BGXJzKUQ.js} +1 -1
- package/.output/public/assets/{loops._loopId_.runs._runId-SM4sD1xB.js → loops._loopId_.runs._runId-BL2fgDqc.js} +1 -1
- package/.output/public/assets/{preload-helper-D1jXs0sN.js → preload-helper-Bs7oCAsw.js} +1 -1
- package/.output/public/assets/{routes-B0svLfFq.js → routes-4N6mrQK_.js} +1 -1
- package/.output/public/assets/routes-BfEn81Yx.js +1 -0
- package/.output/public/assets/{t._teamId-BLO_bz6b.js → t._teamId-CAUjvMZ6.js} +1 -1
- package/.output/public/assets/t._teamId-CBTSOgMp.js +1 -0
- package/.output/public/assets/{ui-DGHTxOhC.js → ui-s5IMg6RF.js} +1 -1
- package/.output/server/_libs/@tanstack/react-router+[...].mjs +1 -1
- package/.output/server/_ssr/{DashboardView-DqZLADCp.mjs → DashboardView-DCxO1HHu.mjs} +5 -5
- package/.output/server/_ssr/{MachinesModal-BsCfGuwp.mjs → MachinesModal-CBpDG1jV.mjs} +26 -9
- package/.output/server/_ssr/{SignIn-ffgDY0yf.mjs → SignIn-DwHmFBg2.mjs} +3 -3
- package/.output/server/_ssr/{SocialLinks-Bt7huqfS.mjs → SocialLinks-y7JuqJqp.mjs} +2 -2
- package/.output/server/_ssr/{actionUi-DD7Cd7Le.mjs → actionUi-DCNmrAjw.mjs} +2 -2
- package/.output/server/_ssr/{artifactFiles-DHBXTtZn.mjs → artifactFiles-1f04rZwG.mjs} +3 -3
- package/.output/server/_ssr/{artifactKind-CwQ_Ddj6.mjs → artifactKind-CmNkee8I.mjs} +3 -3
- package/.output/server/_ssr/{artifacts-BR3jj0NC.mjs → artifacts-DM3Q8kSN.mjs} +1 -1
- package/.output/server/_ssr/{auth-C0zoZCGe.mjs → auth-C_Xnj8JO.mjs} +9 -9
- package/.output/server/_ssr/{boot-sNlIkoLe.mjs → boot-D_THchbC.mjs} +16 -2
- package/.output/server/_ssr/{boot-CdOO4xOo.mjs → boot-DnVqzrBE.mjs} +1 -1
- package/.output/server/_ssr/{bun-sqlite-dialect-BW9W1_Ps-DmlZWqO7.mjs → bun-sqlite-dialect-BW9W1_Ps-mjhr2FKB.mjs} +2 -2
- package/.output/server/_ssr/{d1-sqlite-dialect-BLC8LXE6-CCNzqZwZ.mjs → d1-sqlite-dialect-BLC8LXE6-57NKRt7v.mjs} +2 -2
- package/.output/server/_ssr/db-BUHGfj7t.mjs +2 -0
- package/.output/server/_ssr/{dist-B3SxDOpW.mjs → dist-xlBlQKer.mjs} +2 -2
- package/.output/server/_ssr/{factory-Dv3Zopis.mjs → factory-CUICkr5b.mjs} +2 -2
- package/.output/server/_ssr/{invite._token-tw3mgvEo.mjs → invite._token-C3ik1Xca.mjs} +6 -6
- package/.output/server/_ssr/{invite._token-AvtAuDKv.mjs → invite._token-CGzJGIfm.mjs} +2 -2
- package/.output/server/_ssr/{invite._token-CHR5K84a.mjs → invite._token-CSENXkE5.mjs} +4 -4
- package/.output/server/_ssr/{kysely-adapter-nL7WKSgw.mjs → kysely-adapter-8WrOeuSs.mjs} +1 -1
- package/.output/server/_ssr/logger-CQdxLIT9.mjs +2 -0
- package/.output/server/_ssr/{loopApi-7YHXDl5g.mjs → loopApi-B7uUJlS3.mjs} +10 -10
- package/.output/server/_ssr/{loopProjection-eZvVobW7.mjs → loopProjection-B30cdu8n.mjs} +6 -3
- package/.output/server/_ssr/{loops._loopId-TEIcuqZU.mjs → loops._loopId-3GFocAep.mjs} +8 -8
- package/.output/server/_ssr/{loops._loopId_.runs._runId-BVQKe8xT.mjs → loops._loopId_.runs._runId-B2ONGiQe.mjs} +6 -6
- package/.output/server/_ssr/{loops._loopId_.runs._runId-B4jXeonc.mjs → loops._loopId_.runs._runId-CeJuOVke.mjs} +3 -3
- package/.output/server/_ssr/{machineFns-ByMsgG12.mjs → machineFns-DslRixAv.mjs} +3 -3
- package/.output/server/_ssr/{node-sqlite-dialect-CjNineno.mjs → node-sqlite-dialect-D74sKAO_.mjs} +2 -2
- package/.output/server/_ssr/{router-DyhWcIzt.mjs → router-CAxR0CJG.mjs} +21 -21
- package/.output/server/_ssr/{routes-Cz49hLy6.mjs → routes-BhM8_kf0.mjs} +5 -5
- package/.output/server/_ssr/{routes-BWLQNDn5.mjs → routes-D5GHah06.mjs} +2 -2
- package/.output/server/_ssr/{routes-DqIGr7p0.mjs → routes-DgjhPWRJ.mjs} +5 -5
- package/.output/server/_ssr/runDiff-BIYvi0EH.mjs +2 -0
- package/.output/server/_ssr/ssr.mjs +39 -39
- package/.output/server/_ssr/store-B_RNzP1r.mjs +2 -0
- package/.output/server/_ssr/{t._teamId-COoQSQtH.mjs → t._teamId-259lg_JB.mjs} +5 -5
- package/.output/server/_ssr/{t._teamId-xFPYdSPu.mjs → t._teamId-B6d1UVPx.mjs} +5 -5
- package/.output/server/_ssr/{t._teamId-Dms0PTMu.mjs → t._teamId-CrZ7EkUL.mjs} +2 -2
- package/.output/server/_ssr/{teamFns-gilVwh7z.mjs → teamFns-BEvVeIHP.mjs} +2 -2
- package/.output/server/_ssr/{teamFns-H438WnZC.mjs → teamFns-C2jguwv8.mjs} +3 -3
- package/.output/server/_ssr/tokens-BzwlaFxs.mjs +2 -0
- package/.output/server/_ssr/{ui-dMEI4sHj.mjs → ui-BEPYdOmJ.mjs} +7 -2
- package/.output/server/{_tanstack-start-manifest_v-UkU-Jq6w.mjs → _tanstack-start-manifest_v-HOdB50PD.mjs} +24 -24
- package/.output/server/index.mjs +73 -73
- package/package.json +1 -1
- package/.output/public/assets/MachinesModal-Ci18Bitd.js +0 -1
- package/.output/public/assets/routes-4mIvs8LG.js +0 -1
- package/.output/public/assets/t._teamId-D-wGh4mo.js +0 -1
- package/.output/server/_ssr/db-CwLD-5w1.mjs +0 -2
- package/.output/server/_ssr/logger-B8m8F1Qu.mjs +0 -2
- package/.output/server/_ssr/runDiff-Ba8Lg1vg.mjs +0 -2
- package/.output/server/_ssr/store-Cujtg2QE.mjs +0 -2
- package/.output/server/_ssr/tokens-DgG_Syq3.mjs +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/SignIn-
|
|
2
|
+
import { S as signIn, n as GitHubIcon, r as PievoLogo, t as GITHUB_URL } from "./SocialLinks-y7JuqJqp.mjs";
|
|
3
|
+
import { s as btnPrimary } from "./ui-BEPYdOmJ.mjs";
|
|
4
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/SignIn-DwHmFBg2.js
|
|
5
5
|
var import_jsx_runtime = require_jsx_runtime();
|
|
6
6
|
/**
|
|
7
7
|
* Sign-in CTA — shown by the auth gate when a GitHub OAuth app is configured and
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { o as __toESM } from "../_runtime.mjs";
|
|
2
|
-
import { D as defu,
|
|
2
|
+
import { D as defu, Kt as toKebabCase, L as getBaseURL, at as isSafeUrlScheme, g as capitalizeFirstLetter, x as createFetch } from "./boot-D_THchbC.mjs";
|
|
3
3
|
import { g as require_react, h as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
4
4
|
import { n as createServerFn, r as getServerFnById, t as TSS_SERVER_FUNCTION } from "./ssr.mjs";
|
|
5
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/SocialLinks-
|
|
5
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/SocialLinks-y7JuqJqp.js
|
|
6
6
|
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
7
7
|
var import_jsx_runtime = require_jsx_runtime();
|
|
8
8
|
var createSsrRpc = (functionId) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { o as __toESM } from "../_runtime.mjs";
|
|
2
2
|
import { g as require_react, h as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
3
|
-
import { a as btn, o as btnDanger, s as btnPrimary } from "./ui-
|
|
4
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/actionUi-
|
|
3
|
+
import { a as btn, o as btnDanger, s as btnPrimary } from "./ui-BEPYdOmJ.mjs";
|
|
4
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/actionUi-DCNmrAjw.js
|
|
5
5
|
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
6
6
|
var import_jsx_runtime = require_jsx_runtime();
|
|
7
7
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { F as getArtifactFile, I as getArtifactSync,
|
|
2
|
-
import { n as toArtifactSummary } from "./loopProjection-
|
|
3
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/artifactFiles-
|
|
1
|
+
import { F as getArtifactFile, I as getArtifactSync, Rt as safeRelPath, lt as listArtifacts } from "./boot-D_THchbC.mjs";
|
|
2
|
+
import { n as toArtifactSummary } from "./loopProjection-B30cdu8n.mjs";
|
|
3
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/artifactFiles-1f04rZwG.js
|
|
4
4
|
/**
|
|
5
5
|
* Server-side reads over a loop's current exact artifacts. Pure helpers
|
|
6
6
|
* (no request/session context) so they're shared by the lazy server fns
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as createFileRoute, s as lazyRouteComponent } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
2
|
-
import { i as authClient, u as getAuthState } from "./SocialLinks-
|
|
3
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/artifactKind-
|
|
4
|
-
var $$splitComponentImporter = () => import("./loops._loopId-
|
|
2
|
+
import { i as authClient, u as getAuthState } from "./SocialLinks-y7JuqJqp.mjs";
|
|
3
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/artifactKind-CmNkee8I.js
|
|
4
|
+
var $$splitComponentImporter = () => import("./loops._loopId-3GFocAep.mjs");
|
|
5
5
|
/**
|
|
6
6
|
* Loop detail page — `/loops/$loopId`: a loop header and action toolbar, the
|
|
7
7
|
* exact artifact Files panel, and the runs timeline. The view owns its own
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Tt as parseArtifactSyncBody, f as SYNC_BODY_CAP, i as BLOB_CAP } from "./boot-
|
|
1
|
+
import { Tt as parseArtifactSyncBody, f as SYNC_BODY_CAP, i as BLOB_CAP } from "./boot-D_THchbC.mjs";
|
|
2
2
|
export { BLOB_CAP, SYNC_BODY_CAP, parseArtifactSyncBody };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { C as notInArray, S as ne, _ as isNotNull, b as lt, d as and, f as eq, g as inArray, h as ilike, j as sql, l as asc, m as gte, p as gt, s as count, u as desc, v as isNull$1, w as or, x as lte, y as like } from "../_libs/drizzle-orm+postgres.mjs";
|
|
2
|
-
import { $ as isDevelopment, B as getEnvVar, D as defu, E as db,
|
|
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 isDevelopment, B as getEnvVar, D as defu, E as db, Gt as teamIdForUser, H as getHost, K as getOrigin, L as getBaseURL, Lt as resolveBaseURL, M as ensureTeam, N as env, R as getBooleanEnvVar, a as BetterAuthError, b as createDefu, c as ENV, ct as kAPIErrorHeaderSymbol, et as isDynamicBaseURLConfig, g as capitalizeFirstLetter, h as betterFetch, it as isRequestLike, n as APIError$1, o as BetterCallError, ot as isTeamMember, p as ValidationError$1, q as getProtocol, r as BASE_ERROR_CODES, rt as isProduction, st as isTest, t as APIError, tn as wildcardMatch, wt as normalizePathname, yt as loginGateEnabled } from "./boot-D_THchbC.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-CUICkr5b.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-C_Xnj8JO.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-mjhr2FKB.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-D74sKAO_.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-57NKRt7v.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-xlBlQKer.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-8WrOeuSs.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-8WrOeuSs.mjs");
|
|
36547
36547
|
return kyselyAdapter(kysely, {
|
|
36548
36548
|
type: databaseType || "sqlite",
|
|
36549
36549
|
debugLogs: opts.database && "debugLogs" in opts.database ? opts.database.debugLogs : false,
|
|
@@ -11,7 +11,7 @@ import { fileURLToPath } from "node:url";
|
|
|
11
11
|
import path from "node:path";
|
|
12
12
|
import os from "node:os";
|
|
13
13
|
import fs$1 from "node:fs/promises";
|
|
14
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/boot-
|
|
14
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/boot-D_THchbC.js
|
|
15
15
|
var import_pino = /* @__PURE__ */ __toESM(require_pino());
|
|
16
16
|
var import_pino_pretty = /* @__PURE__ */ __toESM(require_pino_pretty());
|
|
17
17
|
function defineErrorCodes(codes) {
|
|
@@ -2814,6 +2814,20 @@ async function countRuns(loopId) {
|
|
|
2814
2814
|
const r = (await db.select({ n: sql`count(*)` }).from(runs).where(eq(runs.loopId, loopId)))[0];
|
|
2815
2815
|
return Number(r?.n ?? 0);
|
|
2816
2816
|
}
|
|
2817
|
+
/** Run count and reported input + output tokens in a bounded recent window. */
|
|
2818
|
+
async function recentLoopUsage(loopId, since) {
|
|
2819
|
+
const row = (await db.select({
|
|
2820
|
+
runCount: sql`count(*)`,
|
|
2821
|
+
tokenCount: sql`coalesce(sum(
|
|
2822
|
+
coalesce((${runs.usage} ->> 'inputTokens')::bigint, 0) +
|
|
2823
|
+
coalesce((${runs.usage} ->> 'outputTokens')::bigint, 0)
|
|
2824
|
+
), 0)`
|
|
2825
|
+
}).from(runs).where(and(eq(runs.loopId, loopId), sql`${runs.ts} >= ${since}`)))[0];
|
|
2826
|
+
return {
|
|
2827
|
+
runCount: Number(row?.runCount ?? 0),
|
|
2828
|
+
tokenCount: Number(row?.tokenCount ?? 0)
|
|
2829
|
+
};
|
|
2830
|
+
}
|
|
2817
2831
|
/** Open runs (pending/running) — used by the timeout-reclaim sweep. */
|
|
2818
2832
|
async function openRuns() {
|
|
2819
2833
|
return db.select().from(runs).where(inArray(runs.phase, ["pending", "running"]));
|
|
@@ -7583,4 +7597,4 @@ async function getCliGateway() {
|
|
|
7583
7597
|
return (await ensureServer()).cliGateway;
|
|
7584
7598
|
}
|
|
7585
7599
|
//#endregion
|
|
7586
|
-
export { isDevelopment as $,
|
|
7600
|
+
export { isDevelopment as $, validPollWireId as $t, deleteTeamCascade as A, reconciliationStatesForRuns as At, getEnvVar as B, setTeamMemberRoleGuarded as Bt, createMachine as C, mintDeviceToken as Ct, defu as D, readByteBody as Dt, db as E, pauseLoop as Et, getArtifactFile as F, requestDeleteLoop as Ft, getMachine as G, teamIdForUser as Gt, getHost as H, startLoop as Ht, getArtifactSync as I, requestRunCancel as It, getRun as J, updateLoop as Jt, getOrigin as K, toKebabCase as Kt, getBaseURL as L, resolveBaseURL as Lt, ensureTeam as M, rememberConnectKey as Mt, env as N, removeTeamMemberGuarded as Nt, deleteInvite as O, readJsonBody as Ot, forceDeleteLoop as P, renameTeam as Pt, hasRunningRun as Q, validPollCurrentRun as Qt, getBooleanEnvVar as R, safeRelPath as Rt, createInvite as S, machinePresence as St, daemonNeedsUpdate as T, parseArtifactSyncBody as Tt, getInvite as U, statusDefinitionsFromLoop as Ut, getGateway as V, sha256 as Vt, getLoop as W, stopLoop as Wt, getTeamMember as X, userByEmail as Xt, getTeam as Y, updateMachine as Yt, hasPendingRun as Z, validOptionalPollString as Zt, computeRunDiff as _, listTeamsForUser as _t, BetterAuthError as a, isSafeUrlScheme as at, createDefu as b, loopsForMachine as bt, ENV as c, kAPIErrorHeaderSymbol as ct, POLL_HTTP_BODY_FIELDS as d, listMachines as dt, validateLoopEdit as en, isDynamicBaseURLConfig as et, SYNC_BODY_CAP as f, listMachinesForTeam as ft, capitalizeFirstLetter as g, listTeamMembers as gt, betterFetch as h, listRunsBefore as ht, BLOB_CAP as i, isRequestLike as it, ensureServer as j, redeemInviteAtomic as jt, deleteMachine as k, recentLoopUsage as kt, MACHINE_BODY_CAP as l, listArtifacts as lt, addTeamMember as m, listRuns as mt, APIError$1 as n, isPersonalTeam as nt, BetterCallError as o, isTeamMember as ot, ValidationError$1 as p, listPendingInvites as pt, getProtocol as q, tryDeleteLoop as qt, BASE_ERROR_CODES as r, isProduction as rt, CODING_AGENTS as s, isTest as st, APIError as t, wildcardMatch as tn, isOutdated as tt, MIN_DAEMON_VERSION as u, listLoops as ut, countLoopsForTeam as v, logger as vt, createTeam as w, normalizePathname as wt, createFetch as x, machineIdFromToken as xt, countRuns as y, loginGateEnabled as yt, getCliGateway as z, scheduleFromLoop as zt };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { I as getArtifactSync, V as getGateway, z as getCliGateway } from "./boot-
|
|
1
|
+
import { I as getArtifactSync, V as getGateway, z as getCliGateway } from "./boot-D_THchbC.mjs";
|
|
2
2
|
export { getArtifactSync, getCliGateway, getGateway };
|
|
@@ -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-C_Xnj8JO.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/bun-sqlite-dialect-BW9W1_Ps-
|
|
3
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/bun-sqlite-dialect-BW9W1_Ps-mjhr2FKB.js
|
|
4
4
|
var BunSqliteAdapter = class {
|
|
5
5
|
get supportsCreateIfNotExists() {
|
|
6
6
|
return true;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as SqliteQueryCompiler, i as SqliteAdapter } from "./auth-
|
|
1
|
+
import { a as SqliteQueryCompiler, i as SqliteAdapter } from "./auth-C_Xnj8JO.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/d1-sqlite-dialect-BLC8LXE6-
|
|
3
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/d1-sqlite-dialect-BLC8LXE6-57NKRt7v.js
|
|
4
4
|
var D1SqliteAdapter = class extends SqliteAdapter {};
|
|
5
5
|
var D1SqliteDriver = class {
|
|
6
6
|
#config;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as logger, o as createAdapterFactory } from "./factory-
|
|
2
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/dist-
|
|
1
|
+
import { _ as logger, o as createAdapterFactory } from "./factory-CUICkr5b.mjs";
|
|
2
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/dist-xlBlQKer.js
|
|
3
3
|
/**
|
|
4
4
|
* Case-insensitive in-memory comparison helpers.
|
|
5
5
|
* Used when evaluating where clauses in the memory adapter.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as getEnvVar, N as env, a as BetterAuthError } from "./boot-
|
|
2
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/factory-
|
|
1
|
+
import { B as getEnvVar, N as env, a as BetterAuthError } from "./boot-D_THchbC.mjs";
|
|
2
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/factory-CUICkr5b.js
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
5
5
|
var __exportAll = (all, no_symbols) => {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { o as __toESM } from "../_runtime.mjs";
|
|
2
2
|
import { g as require_react, h as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
3
|
-
import { s as btnPrimary } from "./ui-dMEI4sHj.mjs";
|
|
4
3
|
import { d as useNavigate } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
5
|
-
import { E as useSession, r as PievoLogo } from "./SocialLinks-
|
|
4
|
+
import { E as useSession, r as PievoLogo } from "./SocialLinks-y7JuqJqp.mjs";
|
|
5
|
+
import { s as btnPrimary } from "./ui-BEPYdOmJ.mjs";
|
|
6
6
|
import { t as setActiveTeamCookie } from "./teamCookie-B7hLOIie.mjs";
|
|
7
|
-
import { c as redeemTeamInvite } from "./teamFns-
|
|
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-
|
|
7
|
+
import { c as redeemTeamInvite } from "./teamFns-BEvVeIHP.mjs";
|
|
8
|
+
import { t as Route } from "./invite._token-CSENXkE5.mjs";
|
|
9
|
+
import { t as SignIn } from "./SignIn-DwHmFBg2.mjs";
|
|
10
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/invite._token-C3ik1Xca.js
|
|
11
11
|
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
12
12
|
var import_jsx_runtime = require_jsx_runtime();
|
|
13
13
|
/** Redeem a team invite after normal gated sign-in. Invites grant membership but
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
2
|
-
import { r as LoadErrorCard } from "./actionUi-DD7Cd7Le.mjs";
|
|
3
2
|
import { f as useRouter } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
4
|
-
|
|
3
|
+
import { r as LoadErrorCard } from "./actionUi-DCNmrAjw.mjs";
|
|
4
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/invite._token-CGzJGIfm.js
|
|
5
5
|
var import_jsx_runtime = require_jsx_runtime();
|
|
6
6
|
/** Redeem a team invite after normal gated sign-in. Invites grant membership but
|
|
7
7
|
* never bypass the login allowlist; open mode has no invite identity to redeem. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { c as createFileRoute, s as lazyRouteComponent } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
2
|
-
import { i as authClient, u as getAuthState } from "./SocialLinks-
|
|
3
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/invite._token-
|
|
4
|
-
var $$splitErrorComponentImporter = () => import("./invite._token-
|
|
5
|
-
var $$splitComponentImporter = () => import("./invite._token-
|
|
2
|
+
import { i as authClient, u as getAuthState } from "./SocialLinks-y7JuqJqp.mjs";
|
|
3
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/invite._token-CSENXkE5.js
|
|
4
|
+
var $$splitErrorComponentImporter = () => import("./invite._token-CGzJGIfm.mjs");
|
|
5
|
+
var $$splitComponentImporter = () => import("./invite._token-C3ik1Xca.mjs");
|
|
6
6
|
/** Redeem a team invite after normal gated sign-in. Invites grant membership but
|
|
7
7
|
* never bypass the login allowlist; open mode has no invite identity to redeem. */
|
|
8
8
|
var Route = createFileRoute("/invite/$token")({
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as kyselyAdapter, t as createKyselyAdapter } from "./auth-
|
|
1
|
+
import { r as kyselyAdapter, t as createKyselyAdapter } from "./auth-C_Xnj8JO.mjs";
|
|
2
2
|
export { createKyselyAdapter, kyselyAdapter };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as toRunSummaries, i as toLoopSummaries, r as toLoopDetail, t as sortLoopSummariesByRecentRun } from "./loopProjection-
|
|
3
|
-
import { canAccessLoop, requestScope } from "./auth-
|
|
1
|
+
import { Et as pauseLoop$1, Ft as requestDeleteLoop, G as getMachine, Ht as startLoop$1, It as requestRunCancel, J as getRun, Jt as updateLoop, P as forceDeleteLoop, Q as hasRunningRun, St as machinePresence, W as getLoop, Wt as stopLoop$1, X as getTeamMember, Y as getTeam, _t as listTeamsForUser, dt as listMachines, en as validateLoopEdit, ft as listMachinesForTeam, ht as listRunsBefore, j as ensureServer, qt as tryDeleteLoop, ut as listLoops$1 } from "./boot-D_THchbC.mjs";
|
|
2
|
+
import { a as toRunSummaries, i as toLoopSummaries, r as toLoopDetail, t as sortLoopSummariesByRecentRun } from "./loopProjection-B30cdu8n.mjs";
|
|
3
|
+
import { canAccessLoop, requestScope } from "./auth-C_Xnj8JO.mjs";
|
|
4
4
|
import { n as createServerFn } from "./ssr.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-B7uUJlS3.js
|
|
7
7
|
/**
|
|
8
8
|
* Server functions backing the dashboard. They run server-side (createServerFn
|
|
9
9
|
* → RPC) and call the IN-PROCESS scheduler + store directly — the scheduler
|
|
@@ -40,7 +40,7 @@ var getAuthState_createServerFn_handler = createServerRpc({
|
|
|
40
40
|
filename: "src/server/loopApi.ts"
|
|
41
41
|
}, (opts) => getAuthState.__executeServer(opts));
|
|
42
42
|
var getAuthState = createServerFn({ method: "GET" }).handler(getAuthState_createServerFn_handler, async () => {
|
|
43
|
-
const { authEnabled } = await import("./auth-
|
|
43
|
+
const { authEnabled } = await import("./auth-C_Xnj8JO.mjs");
|
|
44
44
|
return { enabled: authEnabled };
|
|
45
45
|
});
|
|
46
46
|
var getConfig_createServerFn_handler = createServerRpc({
|
|
@@ -150,7 +150,7 @@ var getArtifacts_createServerFn_handler = createServerRpc({
|
|
|
150
150
|
var getArtifacts = createServerFn({ method: "GET" }).validator((d) => d).handler(getArtifacts_createServerFn_handler, async ({ data }) => {
|
|
151
151
|
await backend();
|
|
152
152
|
if (!await ownedLoop(data.loopId)) return [];
|
|
153
|
-
const { listLoopArtifacts } = await import("./artifactFiles-
|
|
153
|
+
const { listLoopArtifacts } = await import("./artifactFiles-1f04rZwG.mjs");
|
|
154
154
|
return listLoopArtifacts(data.loopId);
|
|
155
155
|
});
|
|
156
156
|
var getArtifact_createServerFn_handler = createServerRpc({
|
|
@@ -161,7 +161,7 @@ var getArtifact_createServerFn_handler = createServerRpc({
|
|
|
161
161
|
var getArtifact = createServerFn({ method: "GET" }).validator((d) => d).handler(getArtifact_createServerFn_handler, async ({ data }) => {
|
|
162
162
|
await backend();
|
|
163
163
|
if (!await ownedLoop(data.loopId)) return { error: "file not found" };
|
|
164
|
-
const { readLoopArtifact } = await import("./artifactFiles-
|
|
164
|
+
const { readLoopArtifact } = await import("./artifactFiles-1f04rZwG.mjs");
|
|
165
165
|
return readLoopArtifact(data.loopId, data.path);
|
|
166
166
|
});
|
|
167
167
|
var getRunDiff_createServerFn_handler = createServerRpc({
|
|
@@ -180,7 +180,7 @@ var getRunDiff = createServerFn({ method: "GET" }).validator((d) => d).handler(g
|
|
|
180
180
|
hasSnapshot: false,
|
|
181
181
|
files: []
|
|
182
182
|
};
|
|
183
|
-
const { computeRunDiff } = await import("./runDiff-
|
|
183
|
+
const { computeRunDiff } = await import("./runDiff-BIYvi0EH.mjs");
|
|
184
184
|
return computeRunDiff(data.runId);
|
|
185
185
|
});
|
|
186
186
|
var patchLoop_createServerFn_handler = createServerRpc({
|
|
@@ -268,7 +268,7 @@ var deleteLoop = createServerFn({ method: "POST" }).validator((id) => id).handle
|
|
|
268
268
|
if (!await requestDeleteLoop(id)) return { error: "not found" };
|
|
269
269
|
if (unreachable && mayRetireAuthority) {
|
|
270
270
|
if (!await forceDeleteLoop(id)) return { error: "delete failed; server data was not deleted" };
|
|
271
|
-
const { logger } = await import("./logger-
|
|
271
|
+
const { logger } = await import("./logger-CQdxLIT9.mjs");
|
|
272
272
|
logger.child({ mod: "loop-lifecycle" }).warn({
|
|
273
273
|
action: "unreachable-delete",
|
|
274
274
|
loopId: id,
|
|
@@ -328,7 +328,7 @@ var mintClaim_createServerFn_handler = createServerRpc({
|
|
|
328
328
|
}, (opts) => mintClaim.__executeServer(opts));
|
|
329
329
|
var mintClaim = createServerFn({ method: "POST" }).validator((teamId) => teamId).handler(mintClaim_createServerFn_handler, async ({ data: teamId }) => {
|
|
330
330
|
await backend();
|
|
331
|
-
const { mintDeviceToken, rememberConnectKey } = await import("./tokens-
|
|
331
|
+
const { mintDeviceToken, rememberConnectKey } = await import("./tokens-BzwlaFxs.mjs");
|
|
332
332
|
const { userId, teamId: active } = await requestScope(teamId);
|
|
333
333
|
const owner = userId ?? "shared";
|
|
334
334
|
const token = mintDeviceToken();
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/loopProjection-
|
|
1
|
+
import { At as reconciliationStatesForRuns, G as getMachine, Q as hasRunningRun, St as machinePresence, T as daemonNeedsUpdate, Ut as statusDefinitionsFromLoop, Z as hasPendingRun, kt as recentLoopUsage, mt as listRuns, u as MIN_DAEMON_VERSION, y as countRuns, zt as scheduleFromLoop } from "./boot-D_THchbC.mjs";
|
|
2
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/loopProjection-B30cdu8n.js
|
|
3
3
|
/** Canonical client projections for persisted loops and runs. */
|
|
4
4
|
var SUMMARY_RUNS = 18;
|
|
5
|
+
var RECENT_USAGE_WINDOW_MS = 10080 * 60 * 1e3;
|
|
5
6
|
/** Dashboard order: loops with runs first, most recent run first. The incoming
|
|
6
7
|
* order remains the tie-breaker, so never-run loops keep listLoops' newest-created
|
|
7
8
|
* ordering and equal timestamps do not make cards jump between polls. */
|
|
@@ -58,6 +59,7 @@ function toArtifactSummary(row) {
|
|
|
58
59
|
}
|
|
59
60
|
async function toLoopSummaryWithMachine(loop, machine) {
|
|
60
61
|
const runs = await toRunSummaries(loop.id, await listRuns(loop.id, SUMMARY_RUNS));
|
|
62
|
+
const recentUsage = await recentLoopUsage(loop.id, (/* @__PURE__ */ new Date(Date.now() - RECENT_USAGE_WINDOW_MS)).toISOString());
|
|
61
63
|
const presence = machinePresence(machine?.online, machine?.lastSeen);
|
|
62
64
|
return {
|
|
63
65
|
id: loop.id,
|
|
@@ -83,7 +85,8 @@ async function toLoopSummaryWithMachine(loop, machine) {
|
|
|
83
85
|
deleteRequestedAt: loop.deleteRequestedAt ?? null,
|
|
84
86
|
pauseCause: loop.pauseCause ?? null,
|
|
85
87
|
runs,
|
|
86
|
-
runCount: await countRuns(loop.id)
|
|
88
|
+
runCount: await countRuns(loop.id),
|
|
89
|
+
recentUsage
|
|
87
90
|
};
|
|
88
91
|
}
|
|
89
92
|
/** Batch dashboard projection: machine rows are preloaded once, avoiding a
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { o as __toESM } from "../_runtime.mjs";
|
|
2
|
-
import { s as CODING_AGENTS } from "./boot-
|
|
2
|
+
import { s as CODING_AGENTS } from "./boot-D_THchbC.mjs";
|
|
3
3
|
import { g as require_react, h as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
4
|
-
import { E as tsShort, S as runPulseStyle, T as selectCls, _ as inputCls, a as btn, b as rel, c as btnQuiet, d as dotLabel, g as humanBytes, m as fmt, n as Loading, o as btnDanger, p as dur, r as Pill, s as btnPrimary, t as ErrorBanner, u as dotColor, v as labelCls, w as sectionHeadCls } from "./ui-dMEI4sHj.mjs";
|
|
5
|
-
import { i as useFlash, n as FlashLine, r as LoadErrorCard, t as ConfirmBar } from "./actionUi-DD7Cd7Le.mjs";
|
|
6
4
|
import { d as useNavigate, u as Link } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
7
|
-
import { C as startLoop, E as useSession, _ as loadOlderRuns, b as pauseLoop, c as getArtifact, l as getArtifacts, p as getLoopDetail, s as deleteLoop, w as stopLoop, x as runLoop, y as patchLoop } from "./SocialLinks-
|
|
5
|
+
import { C as startLoop, E as useSession, _ as loadOlderRuns, b as pauseLoop, c as getArtifact, l as getArtifacts, p as getLoopDetail, s as deleteLoop, w as stopLoop, x as runLoop, y as patchLoop } from "./SocialLinks-y7JuqJqp.mjs";
|
|
6
|
+
import { E as tsShort, S as runPulseStyle, T as selectCls, _ as inputCls, a as btn, b as rel, c as btnQuiet, d as dotLabel, g as humanBytes, m as fmt, n as Loading, o as btnDanger, p as dur, r as Pill, s as btnPrimary, t as ErrorBanner, u as dotColor, v as labelCls, w as sectionHeadCls } from "./ui-BEPYdOmJ.mjs";
|
|
8
7
|
import { t as setActiveTeamCookie } from "./teamCookie-B7hLOIie.mjs";
|
|
9
|
-
import { t as SignIn } from "./SignIn-
|
|
8
|
+
import { t as SignIn } from "./SignIn-DwHmFBg2.mjs";
|
|
9
|
+
import { i as useFlash, n as FlashLine, r as LoadErrorCard, t as ConfirmBar } from "./actionUi-DCNmrAjw.mjs";
|
|
10
10
|
import { n as daemonStopSupport, r as deriveLoopLifecycle, t as DAEMON_UPGRADE_REQUIRED } from "./lifecycleUi-DOr6Af13.mjs";
|
|
11
|
-
import { l as mergeRuns, n as MachinesModal, o as Timeline, t as LoopOverview } from "./MachinesModal-
|
|
12
|
-
import { n as artifactKind, t as Route } from "./artifactKind-
|
|
11
|
+
import { l as mergeRuns, n as MachinesModal, o as Timeline, t as LoopOverview } from "./MachinesModal-CBpDG1jV.mjs";
|
|
12
|
+
import { n as artifactKind, t as Route } from "./artifactKind-CmNkee8I.mjs";
|
|
13
13
|
import { t as purify } from "../_libs/dompurify.mjs";
|
|
14
14
|
import { t as g } from "../_libs/marked.mjs";
|
|
15
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/loops._loopId-
|
|
15
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/loops._loopId-3GFocAep.js
|
|
16
16
|
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
17
17
|
var import_jsx_runtime = require_jsx_runtime();
|
|
18
18
|
/** Download URL for one artifact. Each path segment is encoded independently so
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { o as __toESM } from "../_runtime.mjs";
|
|
2
2
|
import { g as require_react, h as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
3
|
-
import { S as runPulseStyle, a as btn, g as humanBytes, h as fnum, i as StatusPill, m as fmt, n as Loading, o as btnDanger, p as dur, r as Pill, w as sectionHeadCls } from "./ui-dMEI4sHj.mjs";
|
|
4
|
-
import { r as LoadErrorCard } from "./actionUi-DD7Cd7Le.mjs";
|
|
5
3
|
import { u as Link } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
6
|
-
import { E as useSession, T as stopRun, _ as loadOlderRuns, m as getRunDiff, p as getLoopDetail } from "./SocialLinks-
|
|
7
|
-
import {
|
|
8
|
-
import { t as
|
|
9
|
-
|
|
4
|
+
import { E as useSession, T as stopRun, _ as loadOlderRuns, m as getRunDiff, p as getLoopDetail } from "./SocialLinks-y7JuqJqp.mjs";
|
|
5
|
+
import { S as runPulseStyle, a as btn, g as humanBytes, h as fnum, i as StatusPill, m as fmt, n as Loading, o as btnDanger, p as dur, r as Pill, w as sectionHeadCls } from "./ui-BEPYdOmJ.mjs";
|
|
6
|
+
import { t as SignIn } from "./SignIn-DwHmFBg2.mjs";
|
|
7
|
+
import { r as LoadErrorCard } from "./actionUi-DCNmrAjw.mjs";
|
|
8
|
+
import { t as Route } from "./loops._loopId_.runs._runId-CeJuOVke.mjs";
|
|
9
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/loops._loopId_.runs._runId-B2ONGiQe.js
|
|
10
10
|
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
11
11
|
var import_jsx_runtime = require_jsx_runtime();
|
|
12
12
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as createFileRoute, s as lazyRouteComponent } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
2
|
-
import { i as authClient, u as getAuthState } from "./SocialLinks-
|
|
3
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/loops._loopId_.runs._runId-
|
|
4
|
-
var $$splitComponentImporter = () => import("./loops._loopId_.runs._runId-
|
|
2
|
+
import { i as authClient, u as getAuthState } from "./SocialLinks-y7JuqJqp.mjs";
|
|
3
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/loops._loopId_.runs._runId-CeJuOVke.js
|
|
4
|
+
var $$splitComponentImporter = () => import("./loops._loopId_.runs._runId-B2ONGiQe.mjs");
|
|
5
5
|
/**
|
|
6
6
|
* Run detail PAGE — `/loops/$loopId/runs/$runId`. A standalone page (the trailing
|
|
7
7
|
* `_` on the `$loopId` segment opts it out of the loop page's component so the run
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { requestScope } from "./auth-
|
|
1
|
+
import { C as createMachine$1, Ct as mintDeviceToken, G as getMachine, Mt as rememberConnectKey, T as daemonNeedsUpdate, Vt as sha256, Yt as updateMachine, bt as loopsForMachine, dt as listMachines$1, ft as listMachinesForTeam, j as ensureServer, k as deleteMachine$1, u as MIN_DAEMON_VERSION, xt as machineIdFromToken } from "./boot-D_THchbC.mjs";
|
|
2
|
+
import { requestScope } from "./auth-C_Xnj8JO.mjs";
|
|
3
3
|
import { n as createServerFn } from "./ssr.mjs";
|
|
4
4
|
import { t as createServerRpc } from "./createServerRpc-BD8Xn_0_.mjs";
|
|
5
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/machineFns-
|
|
5
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/machineFns-DslRixAv.js
|
|
6
6
|
/**
|
|
7
7
|
* Whether a machine is visible/actionable in the request scope. Mirrors
|
|
8
8
|
* listMachines: open mode sees everything; otherwise the requester must own the
|
package/.output/server/_ssr/{node-sqlite-dialect-CjNineno.mjs → node-sqlite-dialect-D74sKAO_.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-C_Xnj8JO.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-D74sKAO_.js
|
|
4
4
|
var NodeSqliteAdapter = class {
|
|
5
5
|
get supportsCreateIfNotExists() {
|
|
6
6
|
return true;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { j as sql } from "../_libs/drizzle-orm+postgres.mjs";
|
|
2
|
-
import { Dt as readByteBody, Ot as readJsonBody, Qt as
|
|
2
|
+
import { $t as validPollWireId, Dt as readByteBody, Ot as readJsonBody, Qt as validPollCurrentRun, Zt as validOptionalPollString, d as POLL_HTTP_BODY_FIELDS, j as ensureServer, l as MACHINE_BODY_CAP } from "./boot-D_THchbC.mjs";
|
|
3
3
|
import { h as require_jsx_runtime } from "../_libs/@base-ui/react+[...].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
|
-
import { t as Route$12 } from "./invite._token-
|
|
6
|
-
import { r as imageMime, t as Route$13 } from "./artifactKind-
|
|
7
|
-
import { t as Route$14 } from "./loops._loopId_.runs._runId-
|
|
8
|
-
import { t as Route$15 } from "./routes-
|
|
9
|
-
import { t as Route$16 } from "./t._teamId-
|
|
10
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/router-
|
|
5
|
+
import { t as Route$12 } from "./invite._token-CSENXkE5.mjs";
|
|
6
|
+
import { r as imageMime, t as Route$13 } from "./artifactKind-CmNkee8I.mjs";
|
|
7
|
+
import { t as Route$14 } from "./loops._loopId_.runs._runId-CeJuOVke.mjs";
|
|
8
|
+
import { t as Route$15 } from "./routes-DgjhPWRJ.mjs";
|
|
9
|
+
import { t as Route$16 } from "./t._teamId-B6d1UVPx.mjs";
|
|
10
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/router-CAxR0CJG.js
|
|
11
11
|
var import_jsx_runtime = require_jsx_runtime();
|
|
12
12
|
var app_default = "/assets/app-CuZ0I3Mb.css";
|
|
13
13
|
var Route$11 = createRootRoute({
|
|
@@ -173,7 +173,7 @@ var Route$10 = createFileRoute("/machine/report")({ server: { handlers: { POST:
|
|
|
173
173
|
const parsed = await readJsonBody(request, MACHINE_BODY_CAP);
|
|
174
174
|
if (parsed.kind === "too-large") return Response.json({ error: "body too large" }, { status: 413 });
|
|
175
175
|
const body = parsed.kind === "ok" && parsed.body && typeof parsed.body === "object" ? parsed.body : {};
|
|
176
|
-
const { getGateway } = await import("./boot-
|
|
176
|
+
const { getGateway } = await import("./boot-DnVqzrBE.mjs");
|
|
177
177
|
const r = await (await getGateway()).report(token, body);
|
|
178
178
|
return Response.json(r.body, { status: r.status });
|
|
179
179
|
} } } });
|
|
@@ -213,13 +213,13 @@ var Route$7 = createFileRoute("/api/machine/sync")({ server: { handlers: { POST:
|
|
|
213
213
|
const auth = request.headers.get("authorization") ?? "";
|
|
214
214
|
const token = auth.startsWith("Bearer ") ? auth.slice(7) : "";
|
|
215
215
|
if (!token) return Response.json({ error: "missing device token" }, { status: 401 });
|
|
216
|
-
const { SYNC_BODY_CAP, parseArtifactSyncBody } = await import("./artifacts-
|
|
216
|
+
const { SYNC_BODY_CAP, parseArtifactSyncBody } = await import("./artifacts-DM3Q8kSN.mjs");
|
|
217
217
|
const parsed = await readJsonBody(request, SYNC_BODY_CAP);
|
|
218
218
|
if (parsed.kind === "too-large") return Response.json({ error: "sync body too large" }, { status: 413 });
|
|
219
219
|
if (parsed.kind === "invalid") return Response.json({ error: "invalid JSON" }, { status: 400 });
|
|
220
220
|
const body = parseArtifactSyncBody(parsed.body);
|
|
221
221
|
if (!body) return Response.json({ error: "invalid sync body" }, { status: 400 });
|
|
222
|
-
const { getArtifactSync } = await import("./boot-
|
|
222
|
+
const { getArtifactSync } = await import("./boot-DnVqzrBE.mjs");
|
|
223
223
|
const r = await (await getArtifactSync()).sync(token, body);
|
|
224
224
|
return Response.json(r.body, { status: r.status });
|
|
225
225
|
} } } });
|
|
@@ -230,7 +230,7 @@ var Route$6 = createFileRoute("/api/machine/status")({ server: { handlers: { GET
|
|
|
230
230
|
const limited = machineRouteLimit(request, token || void 0);
|
|
231
231
|
if (limited) return limited;
|
|
232
232
|
if (!token) return Response.json({ error: "missing device token" }, { status: 401 });
|
|
233
|
-
const { getGateway } = await import("./boot-
|
|
233
|
+
const { getGateway } = await import("./boot-DnVqzrBE.mjs");
|
|
234
234
|
const r = await (await getGateway()).status(token);
|
|
235
235
|
return Response.json(r.body, { status: r.status });
|
|
236
236
|
} } } });
|
|
@@ -274,7 +274,7 @@ var Route$5 = createFileRoute("/api/machine/poll")({ server: { handlers: { POST:
|
|
|
274
274
|
if (parsed.kind !== "ok") return Response.json({ error: "invalid JSON body" }, { status: 400 });
|
|
275
275
|
const body = parsePollBody(parsed.body);
|
|
276
276
|
if (!body) return Response.json({ error: "unknown or invalid poll body fields" }, { status: 400 });
|
|
277
|
-
const { getGateway } = await import("./boot-
|
|
277
|
+
const { getGateway } = await import("./boot-DnVqzrBE.mjs");
|
|
278
278
|
const r = await (await getGateway()).pollV4Wait(token, gatewayPollRequest(body));
|
|
279
279
|
return Response.json(r.body, { status: r.status });
|
|
280
280
|
} } } });
|
|
@@ -301,7 +301,7 @@ var Route$4 = createFileRoute("/api/machine/cli")({ server: { handlers: { POST:
|
|
|
301
301
|
if (parsed.kind === "too-large") return Response.json({ error: "body too large" }, { status: 413 });
|
|
302
302
|
const body = parsed.kind === "ok" ? parseCliBody(parsed.body) : null;
|
|
303
303
|
if (!body) return Response.json({ error: "body must be exactly {argv:string[]}" }, { status: 400 });
|
|
304
|
-
const { getCliGateway } = await import("./boot-
|
|
304
|
+
const { getCliGateway } = await import("./boot-DnVqzrBE.mjs");
|
|
305
305
|
const r = await (await getCliGateway()).cli(token, body.argv);
|
|
306
306
|
return Response.json(r.body, { status: r.status });
|
|
307
307
|
} } } });
|
|
@@ -330,7 +330,7 @@ var Route$4 = createFileRoute("/api/machine/cli")({ server: { handlers: { POST:
|
|
|
330
330
|
var PROBE_TIMEOUT_MS = 5e3;
|
|
331
331
|
var Route$3 = createFileRoute("/api/health/db")({ server: { handlers: { GET: async () => {
|
|
332
332
|
try {
|
|
333
|
-
const { db } = await import("./db-
|
|
333
|
+
const { db } = await import("./db-BUHGfj7t.mjs");
|
|
334
334
|
const ping = db.execute(sql`select 1`);
|
|
335
335
|
const timeout = new Promise((_, reject) => {
|
|
336
336
|
setTimeout(() => reject(/* @__PURE__ */ new Error(`db ping timed out after ${PROBE_TIMEOUT_MS}ms`)), PROBE_TIMEOUT_MS).unref?.();
|
|
@@ -350,8 +350,8 @@ var Route$3 = createFileRoute("/api/health/db")({ server: { handlers: { GET: asy
|
|
|
350
350
|
} } } });
|
|
351
351
|
/** Better Auth handler — GET/POST /api/auth/* (OAuth callbacks, session, sign-out). */
|
|
352
352
|
var Route$2 = createFileRoute("/api/auth/$")({ server: { handlers: {
|
|
353
|
-
GET: async ({ request }) => (await import("./auth-
|
|
354
|
-
POST: async ({ request }) => (await import("./auth-
|
|
353
|
+
GET: async ({ request }) => (await import("./auth-C_Xnj8JO.mjs")).auth.handler(request),
|
|
354
|
+
POST: async ({ request }) => (await import("./auth-C_Xnj8JO.mjs")).auth.handler(request)
|
|
355
355
|
} } });
|
|
356
356
|
/**
|
|
357
357
|
* `decodeURIComponent` that returns null on malformed percent-encoding instead
|
|
@@ -385,12 +385,12 @@ var Route$1 = createFileRoute("/api/machine/blob/$hash")({ server: { handlers: {
|
|
|
385
385
|
if (!token) return Response.json({ error: "missing device token" }, { status: 401 });
|
|
386
386
|
const hash = safeDecode(new URL(request.url).pathname.split("/").pop() ?? "");
|
|
387
387
|
if (hash === null) return Response.json({ error: "bad hash" }, { status: 400 });
|
|
388
|
-
const { BLOB_CAP } = await import("./artifacts-
|
|
388
|
+
const { BLOB_CAP } = await import("./artifacts-DM3Q8kSN.mjs");
|
|
389
389
|
const body = await readByteBody(request, BLOB_CAP);
|
|
390
390
|
if (body.kind === "too-large") return Response.json({ error: "blob exceeds size cap" }, { status: 413 });
|
|
391
391
|
if (body.kind === "invalid") return Response.json({ error: "could not read blob body" }, { status: 400 });
|
|
392
392
|
const buf = Buffer.from(body.bytes.buffer, body.bytes.byteOffset, body.bytes.byteLength);
|
|
393
|
-
const { getArtifactSync } = await import("./boot-
|
|
393
|
+
const { getArtifactSync } = await import("./boot-DnVqzrBE.mjs");
|
|
394
394
|
const r = await (await getArtifactSync()).putBlob(token, hash, buf);
|
|
395
395
|
return Response.json(r.body, { status: r.status });
|
|
396
396
|
} } } });
|
|
@@ -425,11 +425,11 @@ var Route = createFileRoute("/api/artifact/$loopId/$")({ server: { handlers: { G
|
|
|
425
425
|
const segments = after.slice(slash + 1).split("/").map((s) => safeDecode(s));
|
|
426
426
|
if (segments.some((s) => s === null)) return Response.json({ error: "bad path" }, { status: 400 });
|
|
427
427
|
const relPath = segments.join("/");
|
|
428
|
-
const loop = await (await import("./store-
|
|
428
|
+
const loop = await (await import("./store-B_RNzP1r.mjs")).getLoop(loopId);
|
|
429
429
|
if (!loop) return Response.json({ error: "not found" }, { status: 404 });
|
|
430
|
-
const { requestScope, canAccessLoop } = await import("./auth-
|
|
430
|
+
const { requestScope, canAccessLoop } = await import("./auth-C_Xnj8JO.mjs");
|
|
431
431
|
if (!await canAccessLoop(loop.teamId, await requestScope())) return Response.json({ error: "not found" }, { status: 404 });
|
|
432
|
-
const { readLoopArtifactBytes } = await import("./artifactFiles-
|
|
432
|
+
const { readLoopArtifactBytes } = await import("./artifactFiles-1f04rZwG.mjs");
|
|
433
433
|
const r = await readLoopArtifactBytes(loopId, relPath);
|
|
434
434
|
if (r.status !== 200 || !r.bytes) return Response.json({ error: "not found" }, { status: r.status });
|
|
435
435
|
const filename = (r.filename || "file").replace(/["\\\r\n]/g, "_");
|