@kky42/pievo-server 1.0.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 +17 -0
- package/.output/public/assets/CodeField-dOzyFQNH.js +34 -0
- package/.output/public/assets/LoopView-B4H9QibC.js +55 -0
- package/.output/public/assets/Modal-D33gNSgx.js +1 -0
- package/.output/public/assets/SignIn-SHuRRyOv.js +1 -0
- package/.output/public/assets/actionUi-ChGGALzg.js +1 -0
- package/.output/public/assets/app-DElSo_jy.css +2 -0
- package/.output/public/assets/artifactView-DFuubXLJ.js +66 -0
- package/.output/public/assets/index-DfpTWRSz.js +12 -0
- package/.output/public/assets/invite._token-DJtd-XE2.js +1 -0
- package/.output/public/assets/invite._token-T8oo4Qtw.js +1 -0
- package/.output/public/assets/jsx-runtime-BseJUIpC.js +1 -0
- package/.output/public/assets/lifecycleUi-DKkChdnU.js +1 -0
- package/.output/public/assets/loopApi-BM2nj71x.js +3 -0
- package/.output/public/assets/loops._loopId-B19Jw7jC.js +5 -0
- package/.output/public/assets/loops._loopId_.runs._runId-_CflHV38.js +3 -0
- package/.output/public/assets/notifyFns-DCubjpRy.js +1 -0
- package/.output/public/assets/preload-helper-CKUiEq3b.js +3 -0
- package/.output/public/assets/routes-B9tgli5f.js +1 -0
- package/.output/public/assets/routes-CTtlM_qt.js +1 -0
- package/.output/public/assets/t._teamId-Bm21mngW.js +1 -0
- package/.output/public/assets/t._teamId-gR7BVKkR.js +1 -0
- package/.output/public/assets/ui-Dp88qUWh.js +1 -0
- package/.output/public/assets/useRouter-DsjH8G0p.js +1 -0
- package/.output/public/favicon.svg +12 -0
- package/.output/public/fonts/GeistPixel-Square.woff2 +0 -0
- package/.output/server/_chunks/ssr-renderer.mjs +26 -0
- package/.output/server/_libs/@aws-crypto/crc32+[...].mjs +419 -0
- package/.output/server/_libs/@aws-sdk/checksums+[...].mjs +10732 -0
- package/.output/server/_libs/@aws-sdk/client-s3+[...].mjs +9475 -0
- package/.output/server/_libs/@aws-sdk/credential-provider-http+[...].mjs +137 -0
- package/.output/server/_libs/@aws-sdk/credential-provider-ini+[...].mjs +440 -0
- package/.output/server/_libs/@aws-sdk/credential-provider-process+[...].mjs +62 -0
- package/.output/server/_libs/@aws-sdk/credential-provider-sso+[...].mjs +818 -0
- package/.output/server/_libs/@aws-sdk/credential-provider-web-identity+[...].mjs +59 -0
- package/.output/server/_libs/@base-ui/react+[...].mjs +11125 -0
- package/.output/server/_libs/@codemirror/autocomplete+[...].mjs +19713 -0
- package/.output/server/_libs/@codemirror/lang-css+[...].mjs +2636 -0
- package/.output/server/_libs/@codemirror/lang-html+[...].mjs +2247 -0
- package/.output/server/_libs/@codemirror/lang-json+[...].mjs +79 -0
- package/.output/server/_libs/@reduxjs/toolkit+[...].mjs +1736 -0
- package/.output/server/_libs/@smithy/credential-provider-imds+[...].mjs +342 -0
- package/.output/server/_libs/@tanstack/react-router+[...].mjs +14300 -0
- package/.output/server/_libs/@uiw/codemirror-extensions-basic-setup+[...].mjs +76 -0
- package/.output/server/_libs/atomic-sleep.mjs +27 -0
- package/.output/server/_libs/aws-crypto__crc32c.mjs +314 -0
- package/.output/server/_libs/aws-sdk__nested-clients.mjs +2671 -0
- package/.output/server/_libs/babel__runtime.mjs +30 -0
- package/.output/server/_libs/clsx.mjs +16 -0
- package/.output/server/_libs/codemirror__commands.mjs +1725 -0
- package/.output/server/_libs/codemirror__lint.mjs +565 -0
- package/.output/server/_libs/codemirror__search.mjs +1138 -0
- package/.output/server/_libs/codemirror__theme-one-dark.mjs +161 -0
- package/.output/server/_libs/colorette.mjs +129 -0
- package/.output/server/_libs/croner.mjs +735 -0
- package/.output/server/_libs/d3-array.mjs +231 -0
- package/.output/server/_libs/d3-color.mjs +330 -0
- package/.output/server/_libs/d3-format.mjs +252 -0
- package/.output/server/_libs/d3-interpolate.mjs +163 -0
- package/.output/server/_libs/d3-path.mjs +77 -0
- package/.output/server/_libs/d3-scale+[...].mjs +1907 -0
- package/.output/server/_libs/d3-shape.mjs +689 -0
- package/.output/server/_libs/dateformat.mjs +341 -0
- package/.output/server/_libs/decimal.js-light.mjs +884 -0
- package/.output/server/_libs/diff.mjs +732 -0
- package/.output/server/_libs/dom-serializer+[...].mjs +708 -0
- package/.output/server/_libs/domhandler.mjs +461 -0
- package/.output/server/_libs/dompurify.mjs +2111 -0
- package/.output/server/_libs/domutils.mjs +868 -0
- package/.output/server/_libs/drizzle-orm+postgres.mjs +7689 -0
- package/.output/server/_libs/electric-sql__pglite.mjs +14674 -0
- package/.output/server/_libs/end-of-stream+once+wrappy.mjs +145 -0
- package/.output/server/_libs/es-toolkit.mjs +1737 -0
- package/.output/server/_libs/eventemitter3.mjs +236 -0
- package/.output/server/_libs/fast-copy.mjs +285 -0
- package/.output/server/_libs/fast-safe-stringify.mjs +172 -0
- package/.output/server/_libs/h3+rou3+srvx.mjs +1201 -0
- package/.output/server/_libs/html-dom-parser+htmlparser2.mjs +1560 -0
- package/.output/server/_libs/html-react-parser+[...].mjs +1360 -0
- package/.output/server/_libs/initdb.wasm +0 -0
- package/.output/server/_libs/marked.mjs +1548 -0
- package/.output/server/_libs/on-exit-leak-free.mjs +80 -0
- package/.output/server/_libs/pglite.data +37667 -8
- package/.output/server/_libs/pglite.wasm +0 -0
- package/.output/server/_libs/pino+[...].mjs +3196 -0
- package/.output/server/_libs/pino-abstract-transport+split2.mjs +194 -0
- package/.output/server/_libs/pino-pretty+[...].mjs +1623 -0
- package/.output/server/_libs/pinojs__redact.mjs +280 -0
- package/.output/server/_libs/react-redux+[...].mjs +205 -0
- package/.output/server/_libs/recharts+victory-vendor.mjs +15875 -0
- package/.output/server/_libs/tanstack__history.mjs +342 -0
- package/.output/server/_libs/ufo.mjs +64 -0
- package/.output/server/_libs/uiw__codemirror-themes.mjs +32 -0
- package/.output/server/_libs/uiw__react-codemirror.mjs +354 -0
- package/.output/server/_runtime.mjs +37 -0
- package/.output/server/_ssr/CodeField-tm4rr6G3.mjs +143 -0
- package/.output/server/_ssr/DashboardView-CC7htv28.mjs +2795 -0
- package/.output/server/_ssr/LoopPlaybook-BXH8mhiX.mjs +2105 -0
- package/.output/server/_ssr/LoopView-DCugEbHx.mjs +1106 -0
- package/.output/server/_ssr/Modal-DpKZHLZK.mjs +49 -0
- package/.output/server/_ssr/SignIn-dTndU6Hw.mjs +67 -0
- package/.output/server/_ssr/actionUi-CZbEixbf.mjs +119 -0
- package/.output/server/_ssr/adapters-BS8XosjF.mjs +130 -0
- package/.output/server/_ssr/artifactFiles-Cagtj7J0.mjs +61 -0
- package/.output/server/_ssr/artifactKind-BW0isV8L.mjs +37 -0
- package/.output/server/_ssr/artifactView-DS4O22wl.mjs +304 -0
- package/.output/server/_ssr/artifacts-DngKyW2u.mjs +2 -0
- package/.output/server/_ssr/auth-DY1DuYZd.mjs +38429 -0
- package/.output/server/_ssr/boot-BbtG0ImW.mjs +9010 -0
- package/.output/server/_ssr/boot-CMHTxQpJ.mjs +2 -0
- package/.output/server/_ssr/bun-sqlite-dialect-BW9W1_Ps-CU1Spd6z.mjs +162 -0
- package/.output/server/_ssr/core-RrmWoKne.mjs +5 -0
- package/.output/server/_ssr/createServerRpc-BD8Xn_0_.mjs +12 -0
- package/.output/server/_ssr/d1-sqlite-dialect-BLC8LXE6-DfG7tB8s.mjs +112 -0
- package/.output/server/_ssr/db-DWAuZq1o.mjs +2 -0
- package/.output/server/_ssr/dist-BIxFFVZg.mjs +342 -0
- package/.output/server/_ssr/empty-plugin-adapters-DKUlnwwl.mjs +5 -0
- package/.output/server/_ssr/factory-Blq0DYfT.mjs +6903 -0
- package/.output/server/_ssr/invite._token-BRCo9LGB.mjs +36 -0
- package/.output/server/_ssr/invite._token-DJxGLILJ.mjs +28 -0
- package/.output/server/_ssr/invite._token-NewFt27g.mjs +92 -0
- package/.output/server/_ssr/kysely-adapter-D3XTe64J.mjs +2 -0
- package/.output/server/_ssr/kysely-migration-tables-JkVUjPF_-bPAX9LR_.mjs +19 -0
- package/.output/server/_ssr/lifecycleUi-C9lg1r3r.mjs +38 -0
- package/.output/server/_ssr/logger-Dw82jNjH.mjs +2 -0
- package/.output/server/_ssr/loopApi-BtfkZQYK.mjs +532 -0
- package/.output/server/_ssr/loopApi-Cxe8WyOB.mjs +105 -0
- package/.output/server/_ssr/loops._loopId-7NQJPB9W.mjs +30 -0
- package/.output/server/_ssr/loops._loopId-DhnArGdL.mjs +1635 -0
- package/.output/server/_ssr/loops._loopId_.runs._runId-Bvuo2nki.mjs +29 -0
- package/.output/server/_ssr/loops._loopId_.runs._runId-Dip5Xk-q.mjs +674 -0
- package/.output/server/_ssr/machineFns-Dvr5ICUy.mjs +266 -0
- package/.output/server/_ssr/node-sqlite-dialect-DhyOpJTX.mjs +162 -0
- package/.output/server/_ssr/notifyFns-BcMRY5kP.mjs +118 -0
- package/.output/server/_ssr/notifyFns-Q458pZmE.mjs +580 -0
- package/.output/server/_ssr/router-J8KZ30xw.mjs +678 -0
- package/.output/server/_ssr/routes-Bcs4T1ox.mjs +28 -0
- package/.output/server/_ssr/routes-BoGrcf-b.mjs +43 -0
- package/.output/server/_ssr/routes-D4am3Zff.mjs +28 -0
- package/.output/server/_ssr/runDiff-CpEFqo7G.mjs +113 -0
- package/.output/server/_ssr/ssr.mjs +5837 -0
- package/.output/server/_ssr/start-4ifArtKx.mjs +4 -0
- package/.output/server/_ssr/store-b3JcQ08F.mjs +2 -0
- package/.output/server/_ssr/t._teamId-CeUhzgzT.mjs +32 -0
- package/.output/server/_ssr/t._teamId-DR-hQK7o.mjs +47 -0
- package/.output/server/_ssr/t._teamId-Dy_McbRt.mjs +31 -0
- package/.output/server/_ssr/teamCookie-B7hLOIie.mjs +10 -0
- package/.output/server/_ssr/teamFns-BIDnsg2A.mjs +473 -0
- package/.output/server/_ssr/teamFns-DA4ovI5g.mjs +33 -0
- package/.output/server/_ssr/tokens-ytd60FUt.mjs +2 -0
- package/.output/server/_ssr/ui-Dej2qjuS.mjs +267 -0
- package/.output/server/_tanstack-start-manifest_v-CVS6c7re.mjs +95 -0
- package/.output/server/drizzle/0000_round_marauders.sql +193 -0
- package/.output/server/drizzle/0001_naive_silver_fox.sql +25 -0
- package/.output/server/drizzle/0002_funny_sage.sql +12 -0
- package/.output/server/drizzle/0003_optimal_slapstick.sql +102 -0
- package/.output/server/drizzle/0004_remove_grok_agent.sql +5 -0
- package/.output/server/drizzle/0005_heavy_gauntlet.sql +8 -0
- package/.output/server/drizzle/0006_tranquil_sharon_carter.sql +1 -0
- package/.output/server/drizzle/0007_faulty_starbolt.sql +30 -0
- package/.output/server/drizzle/0008_durable_lifecycle_evidence.sql +15 -0
- package/.output/server/drizzle/meta/0000_snapshot.json +1333 -0
- package/.output/server/drizzle/meta/0001_snapshot.json +1498 -0
- package/.output/server/drizzle/meta/0002_snapshot.json +1576 -0
- package/.output/server/drizzle/meta/0003_snapshot.json +1666 -0
- package/.output/server/drizzle/meta/0005_snapshot.json +1666 -0
- package/.output/server/drizzle/meta/0006_snapshot.json +1672 -0
- package/.output/server/drizzle/meta/0007_snapshot.json +1787 -0
- package/.output/server/drizzle/meta/_journal.json +69 -0
- package/.output/server/index.mjs +464 -0
- package/.output/server/node_modules/tslib/modules/index.js +70 -0
- package/.output/server/node_modules/tslib/modules/package.json +3 -0
- package/.output/server/node_modules/tslib/package.json +47 -0
- package/.output/server/node_modules/tslib/tslib.js +484 -0
- package/.output/server/package.json +9 -0
- package/LICENSE +21 -0
- package/drizzle/0000_round_marauders.sql +193 -0
- package/drizzle/0001_naive_silver_fox.sql +25 -0
- package/drizzle/0002_funny_sage.sql +12 -0
- package/drizzle/0003_optimal_slapstick.sql +102 -0
- package/drizzle/0004_remove_grok_agent.sql +5 -0
- package/drizzle/0005_heavy_gauntlet.sql +8 -0
- package/drizzle/0006_tranquil_sharon_carter.sql +1 -0
- package/drizzle/0007_faulty_starbolt.sql +30 -0
- package/drizzle/0008_durable_lifecycle_evidence.sql +15 -0
- package/drizzle/meta/0000_snapshot.json +1333 -0
- package/drizzle/meta/0001_snapshot.json +1498 -0
- package/drizzle/meta/0002_snapshot.json +1576 -0
- package/drizzle/meta/0003_snapshot.json +1666 -0
- package/drizzle/meta/0005_snapshot.json +1666 -0
- package/drizzle/meta/0006_snapshot.json +1672 -0
- package/drizzle/meta/0007_snapshot.json +1787 -0
- package/drizzle/meta/_journal.json +69 -0
- package/package.json +84 -0
- package/scripts/pievo-server.mjs +390 -0
- package/scripts/prestart.mjs +66 -0
- package/scripts/server-cli-lib.mjs +451 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { C as require_jsx_runtime, _ as DialogPopup, g as DialogPortal, h as DialogRoot, m as DialogTitle, v as DialogClose, y as DialogBackdrop } from "../_libs/@base-ui/react+[...].mjs";
|
|
2
|
+
import { k as sectionHeadCls } from "./ui-Dej2qjuS.mjs";
|
|
3
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/Modal-DpKZHLZK.js
|
|
4
|
+
var import_jsx_runtime = require_jsx_runtime();
|
|
5
|
+
/** Shared modal shell — Base UI Dialog handles focus trap, Esc, scroll lock.
|
|
6
|
+
* Content-height, optically centered — sized for the small form/compose dialogs
|
|
7
|
+
* (the old `detail`/`wide` variants died with the modal-era job/run views). */
|
|
8
|
+
function Modal({ open, onClose, children, wide = false }) {
|
|
9
|
+
const pos = `-translate-y-1/2 max-h-[calc(100dvh-4rem)] ${wide ? "top-1/2 max-w-[62rem]" : "top-[46%] max-w-160"}`;
|
|
10
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogRoot, {
|
|
11
|
+
open,
|
|
12
|
+
onOpenChange: (o) => !o && onClose(),
|
|
13
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DialogPortal, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogBackdrop, { className: "fixed inset-0 z-[900] bg-black/25 backdrop-blur-[8px] transition-opacity duration-200 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 dark:bg-black/45" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPopup, {
|
|
14
|
+
className: `glass-strong fixed left-1/2 z-[901] w-full -translate-x-1/2 overflow-auto rounded-sheet px-[26px] pb-7 pt-6 outline-none transition-opacity duration-200 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 ${pos}`,
|
|
15
|
+
children
|
|
16
|
+
})] })
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function ModalHead({ title, sub }) {
|
|
20
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
21
|
+
className: "flex items-start justify-between gap-3",
|
|
22
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogTitle, {
|
|
23
|
+
className: "text-[20px] font-semibold tracking-[-0.015em] text-display",
|
|
24
|
+
children: title
|
|
25
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogClose, {
|
|
26
|
+
"aria-label": "Close",
|
|
27
|
+
className: "-mr-1 shrink-0 cursor-pointer rounded-full border-none bg-transparent px-1.5 py-0.5 text-[15px] leading-none text-disabled transition-colors hover:text-display focus-visible:text-display focus-visible:outline-none",
|
|
28
|
+
children: "✕"
|
|
29
|
+
})]
|
|
30
|
+
}), sub != null && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
31
|
+
className: "mt-1.5 text-meta text-secondary",
|
|
32
|
+
children: sub
|
|
33
|
+
})] });
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Section divider heading - sentence case, hierarchy from weight + color.
|
|
37
|
+
* `action` drops an optional control (e.g. Copy) flush-right on the divider.
|
|
38
|
+
*/
|
|
39
|
+
function ModalSection({ children, action }) {
|
|
40
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
41
|
+
className: "mb-2.5 mt-6 flex items-end justify-between gap-3 border-b border-hairline pb-1.5",
|
|
42
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", {
|
|
43
|
+
className: sectionHeadCls,
|
|
44
|
+
children
|
|
45
|
+
}), action]
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
export { ModalHead as n, ModalSection as r, Modal as t };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { o as __toESM } from "../_runtime.mjs";
|
|
2
|
+
import { C as require_jsx_runtime, S as require_react } from "../_libs/@base-ui/react+[...].mjs";
|
|
3
|
+
import { l as btnPrimary } from "./ui-Dej2qjuS.mjs";
|
|
4
|
+
import { i as PievoLogo, n as GitHubIcon, o as signIn, r as LoopPlaybook, t as GITHUB_URL } from "./LoopPlaybook-BXH8mhiX.mjs";
|
|
5
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/SignIn-dTndU6Hw.js
|
|
6
|
+
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
7
|
+
var import_jsx_runtime = require_jsx_runtime();
|
|
8
|
+
/**
|
|
9
|
+
* Sign-in CTA — shown by the auth gate when a GitHub OAuth app is configured and
|
|
10
|
+
* the visitor has no session. `callbackURL` returns the user to where they were
|
|
11
|
+
* (the dashboard by default, or the deep-linked loop/run page) after the OAuth
|
|
12
|
+
* round-trip, so a logged-out deep link lands back on the page it was for.
|
|
13
|
+
*
|
|
14
|
+
* The playbook band renders below the card as the signed-out pitch; its
|
|
15
|
+
* "Start a loop" CTA scrolls back up to this card (with a brief highlight)
|
|
16
|
+
* so the path to signing in is obvious.
|
|
17
|
+
*/
|
|
18
|
+
function SignIn({ callbackURL = "/" }) {
|
|
19
|
+
const cardRef = (0, import_react.useRef)(null);
|
|
20
|
+
const [hint, setHint] = (0, import_react.useState)(false);
|
|
21
|
+
const scrollToSignIn = () => {
|
|
22
|
+
cardRef.current?.scrollIntoView({
|
|
23
|
+
behavior: "smooth",
|
|
24
|
+
block: "center"
|
|
25
|
+
});
|
|
26
|
+
setHint(true);
|
|
27
|
+
setTimeout(() => setHint(false), 1800);
|
|
28
|
+
};
|
|
29
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("main", {
|
|
30
|
+
className: "mx-auto max-w-[1180px] px-8 pb-24",
|
|
31
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
32
|
+
ref: cardRef,
|
|
33
|
+
className: `mx-auto mt-32 max-w-sm rounded-card p-6 text-center transition-shadow duration-500 ${hint ? "shadow-[0_0_0_2px_var(--color-surface),0_0_0_4px_var(--color-interactive)]" : ""}`,
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PievoLogo, { size: 52 }),
|
|
36
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", {
|
|
37
|
+
className: "mt-4 text-2xl font-semibold tracking-tight text-display",
|
|
38
|
+
children: "Pievo"
|
|
39
|
+
}),
|
|
40
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
41
|
+
className: "mt-2 text-sm text-secondary",
|
|
42
|
+
children: "Sign in to manage your scheduled agent loops."
|
|
43
|
+
}),
|
|
44
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
45
|
+
className: `${btnPrimary} mt-6`,
|
|
46
|
+
onClick: () => void signIn.social({
|
|
47
|
+
provider: "github",
|
|
48
|
+
callbackURL
|
|
49
|
+
}),
|
|
50
|
+
children: "Continue with GitHub"
|
|
51
|
+
}),
|
|
52
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
53
|
+
className: "mt-5 flex items-center justify-center text-caption text-secondary",
|
|
54
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("a", {
|
|
55
|
+
href: GITHUB_URL,
|
|
56
|
+
target: "_blank",
|
|
57
|
+
rel: "noreferrer",
|
|
58
|
+
className: "inline-flex items-center gap-1.5 transition-colors hover:text-display",
|
|
59
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(GitHubIcon, { className: "size-4" }), " Open source"]
|
|
60
|
+
})
|
|
61
|
+
})
|
|
62
|
+
]
|
|
63
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LoopPlaybook, { onStart: scrollToSignIn })]
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
export { SignIn as t };
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { o as __toESM } from "../_runtime.mjs";
|
|
2
|
+
import { C as require_jsx_runtime, S as require_react } from "../_libs/@base-ui/react+[...].mjs";
|
|
3
|
+
import { c as btnDanger, l as btnPrimary, o as btn } from "./ui-Dej2qjuS.mjs";
|
|
4
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/actionUi-CZbEixbf.js
|
|
5
|
+
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
6
|
+
var import_jsx_runtime = require_jsx_runtime();
|
|
7
|
+
/**
|
|
8
|
+
* First-load failure card — the calm "couldn't load X" + Retry the dashboard,
|
|
9
|
+
* loop page, and run page all show instead of a raw error dump. One shared
|
|
10
|
+
* markup so the three screens can't drift.
|
|
11
|
+
*/
|
|
12
|
+
function LoadErrorCard({ title, detail, onRetry }) {
|
|
13
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
14
|
+
className: "rounded-card border border-hairline bg-surface px-6 py-8 shadow-card",
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17
|
+
className: "text-[14px] text-accent",
|
|
18
|
+
children: title
|
|
19
|
+
}),
|
|
20
|
+
detail && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
21
|
+
className: "mt-1 text-meta text-secondary",
|
|
22
|
+
children: detail
|
|
23
|
+
}),
|
|
24
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
25
|
+
type: "button",
|
|
26
|
+
onClick: onRetry,
|
|
27
|
+
className: "mt-3 cursor-pointer border-none bg-transparent p-0 text-label font-medium text-interactive underline underline-offset-2 hover:text-display",
|
|
28
|
+
children: "Retry"
|
|
29
|
+
})
|
|
30
|
+
]
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* In-panel guard — the Nothing-styled stand-in for native confirm(). Owns its
|
|
35
|
+
* own a11y so the caller just renders it when armed: focus lands on the CTA,
|
|
36
|
+
* Esc cancels, Enter (CTA focused) confirms. Render with `key={kind}` so it
|
|
37
|
+
* remounts (and re-focuses) per guard.
|
|
38
|
+
*/
|
|
39
|
+
function ConfirmBar({ prompt, note, cta, danger, busy, onConfirm, onCancel }) {
|
|
40
|
+
const ctaRef = (0, import_react.useRef)(null);
|
|
41
|
+
(0, import_react.useEffect)(() => {
|
|
42
|
+
ctaRef.current?.focus();
|
|
43
|
+
}, []);
|
|
44
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
45
|
+
role: "group",
|
|
46
|
+
"aria-label": prompt,
|
|
47
|
+
onKeyDown: (e) => {
|
|
48
|
+
if (e.key === "Escape" && !busy) onCancel();
|
|
49
|
+
},
|
|
50
|
+
className: "flex flex-wrap items-center gap-x-4 gap-y-2.5 rounded-control border border-hairline bg-raised px-4 py-3",
|
|
51
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
52
|
+
className: "min-w-0",
|
|
53
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
54
|
+
className: "text-body font-medium text-display",
|
|
55
|
+
children: prompt
|
|
56
|
+
}), note && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
57
|
+
className: "mt-0.5 text-meta text-secondary",
|
|
58
|
+
children: note
|
|
59
|
+
})]
|
|
60
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
61
|
+
className: "ml-auto flex items-center gap-2.5",
|
|
62
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
63
|
+
ref: ctaRef,
|
|
64
|
+
className: danger ? btnDanger : btnPrimary,
|
|
65
|
+
disabled: busy,
|
|
66
|
+
onClick: onConfirm,
|
|
67
|
+
children: busy ? "Working…" : cta
|
|
68
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
69
|
+
className: btn,
|
|
70
|
+
disabled: busy,
|
|
71
|
+
onClick: onCancel,
|
|
72
|
+
children: "Cancel"
|
|
73
|
+
})]
|
|
74
|
+
})]
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Transient peak-end acknowledgement (✓ done / ✕ gone), announced to AT via
|
|
79
|
+
* aria-live. Self-clearing is the caller's concern (see `useFlash`); this is
|
|
80
|
+
* pure presentation. No outer margin — wrap at the call site for spacing.
|
|
81
|
+
*/
|
|
82
|
+
function FlashLine({ label, tone = "ok", onUndo }) {
|
|
83
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
84
|
+
role: "status",
|
|
85
|
+
"aria-live": "polite",
|
|
86
|
+
className: "inline-flex items-center gap-2 text-label font-medium text-secondary",
|
|
87
|
+
style: { animation: "fadeIn 0.2s ease-out" },
|
|
88
|
+
children: [
|
|
89
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
90
|
+
"aria-hidden": true,
|
|
91
|
+
className: tone === "gone" ? "text-accent" : "text-success",
|
|
92
|
+
children: tone === "gone" ? "✕" : "✓"
|
|
93
|
+
}),
|
|
94
|
+
label,
|
|
95
|
+
onUndo && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
96
|
+
type: "button",
|
|
97
|
+
onClick: onUndo,
|
|
98
|
+
className: "cursor-pointer border-none bg-transparent p-0 text-label font-medium text-interactive underline underline-offset-2 transition-colors hover:text-display",
|
|
99
|
+
children: "Undo"
|
|
100
|
+
})
|
|
101
|
+
]
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Flash state + its self-clear timer in one unit. `hold` wins; else an Undo
|
|
106
|
+
* flash lingers ~6s (reachable), a bare "done" fades after ~2.2s. Fade, don't
|
|
107
|
+
* slide.
|
|
108
|
+
*/
|
|
109
|
+
function useFlash() {
|
|
110
|
+
const [flash, setFlash] = (0, import_react.useState)(null);
|
|
111
|
+
(0, import_react.useEffect)(() => {
|
|
112
|
+
if (!flash) return;
|
|
113
|
+
const t = setTimeout(() => setFlash(null), flash.hold ?? (flash.undo ? 6e3 : 2200));
|
|
114
|
+
return () => clearTimeout(t);
|
|
115
|
+
}, [flash]);
|
|
116
|
+
return [flash, setFlash];
|
|
117
|
+
}
|
|
118
|
+
//#endregion
|
|
119
|
+
export { useFlash as i, FlashLine as n, LoadErrorCard as r, ConfirmBar as t };
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { Ct as listRuns, S as countRuns, Z as getMachine, at as hasRunningRun, it as hasPendingRun, jt as machinePresence } from "./boot-BbtG0ImW.mjs";
|
|
2
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/adapters-BS8XosjF.js
|
|
3
|
+
/**
|
|
4
|
+
* Map the new relational rows (Loop + Run) onto the shapes the UI already
|
|
5
|
+
* renders (JobSummary / JobDetail / RunSummary / JobFull), so the dashboard
|
|
6
|
+
* components stay unchanged while the data now comes from the in-process store.
|
|
7
|
+
*/
|
|
8
|
+
var SUMMARY_RUNS = 18;
|
|
9
|
+
function nextRun(loop) {
|
|
10
|
+
return [loop.nextRunAt, loop.nextCadenceAt].filter((v) => v != null).sort()[0] ?? null;
|
|
11
|
+
}
|
|
12
|
+
function toRunSummary(r) {
|
|
13
|
+
return {
|
|
14
|
+
id: r.id,
|
|
15
|
+
loopId: r.loopId,
|
|
16
|
+
ts: r.ts,
|
|
17
|
+
queued: r.phase === "pending",
|
|
18
|
+
running: r.phase === "running",
|
|
19
|
+
requestedBy: r.requestedBy,
|
|
20
|
+
canceled: r.phase === "canceled",
|
|
21
|
+
cancelRequested: r.cancelRequestedAt != null,
|
|
22
|
+
role: r.role,
|
|
23
|
+
agent: r.agent ?? null,
|
|
24
|
+
outcome: r.outcome ?? "silent",
|
|
25
|
+
status: r.status ?? null,
|
|
26
|
+
message: r.message ?? null,
|
|
27
|
+
durationMs: r.durationMs ?? null,
|
|
28
|
+
exitCode: r.exitCode ?? null,
|
|
29
|
+
finalText: r.finalText ?? null,
|
|
30
|
+
usage: r.usage ? {
|
|
31
|
+
inputTokens: r.usage.inputTokens,
|
|
32
|
+
outputTokens: r.usage.outputTokens,
|
|
33
|
+
cacheReadTokens: r.usage.cacheReadTokens,
|
|
34
|
+
cacheCreationTokens: r.usage.cacheCreationTokens
|
|
35
|
+
} : null,
|
|
36
|
+
error: r.error ?? null,
|
|
37
|
+
state: r.state ?? null,
|
|
38
|
+
control: r.control ?? null,
|
|
39
|
+
sessionId: r.sessionId ?? null
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/** One live artifact_files row (with its blob meta joined) → the compact UI shape
|
|
43
|
+
* (metadata only; the bytes are fetched lazily by getArtifact / the download
|
|
44
|
+
* route. The front-matter `meta` rides along so the
|
|
45
|
+
* Files list + calendar can surface type/title/date without a byte fetch. */
|
|
46
|
+
function toArtifactSummary(row) {
|
|
47
|
+
return {
|
|
48
|
+
path: row.path,
|
|
49
|
+
size: row.size ?? null,
|
|
50
|
+
updatedAt: row.updatedAt,
|
|
51
|
+
binary: row.binary,
|
|
52
|
+
oversize: row.oversize,
|
|
53
|
+
meta: row.meta ?? null
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
async function toJobSummary(loop) {
|
|
57
|
+
const runs = (await listRuns(loop.id, SUMMARY_RUNS)).map(toRunSummary);
|
|
58
|
+
return {
|
|
59
|
+
id: loop.id,
|
|
60
|
+
name: loop.name ?? loop.id,
|
|
61
|
+
cron: loop.cron,
|
|
62
|
+
scheduleMode: loop.scheduleMode,
|
|
63
|
+
continuousDelayMinutes: loop.continuousDelayMinutes,
|
|
64
|
+
kind: loop.workflow ? "workflow" : `exec:${loop.agent}`,
|
|
65
|
+
hasUi: !!loop.ui,
|
|
66
|
+
enabled: loop.enabled,
|
|
67
|
+
notify: loop.notify,
|
|
68
|
+
nextRun: nextRun(loop),
|
|
69
|
+
running: await hasRunningRun(loop.id),
|
|
70
|
+
queued: await hasPendingRun(loop.id),
|
|
71
|
+
lastRunTs: runs.length ? runs[runs.length - 1].ts : null,
|
|
72
|
+
graduation: null,
|
|
73
|
+
goal: loop.goal ?? null,
|
|
74
|
+
completedAt: loop.completedAt ?? null,
|
|
75
|
+
completionReason: loop.completionReason ?? null,
|
|
76
|
+
deleteRequestedAt: loop.deleteRequestedAt ?? null,
|
|
77
|
+
runs,
|
|
78
|
+
runCount: await countRuns(loop.id)
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function toJobFull(loop) {
|
|
82
|
+
return {
|
|
83
|
+
id: loop.id,
|
|
84
|
+
name: loop.name ?? void 0,
|
|
85
|
+
cron: loop.cron,
|
|
86
|
+
scheduleMode: loop.scheduleMode,
|
|
87
|
+
continuousDelayMinutes: loop.continuousDelayMinutes,
|
|
88
|
+
enabled: loop.enabled,
|
|
89
|
+
notify: loop.notify,
|
|
90
|
+
goal: loop.goal ?? null,
|
|
91
|
+
completedAt: loop.completedAt ?? null,
|
|
92
|
+
completionReason: loop.completionReason ?? null,
|
|
93
|
+
taskFile: loop.taskFile ?? void 0,
|
|
94
|
+
workflow: loop.workflow ?? void 0,
|
|
95
|
+
stateSchema: loop.stateSchema ?? void 0,
|
|
96
|
+
ui: loop.ui ?? void 0,
|
|
97
|
+
channelId: loop.channelId ?? null,
|
|
98
|
+
agent: loop.agent,
|
|
99
|
+
exec: {
|
|
100
|
+
executor: loop.agent,
|
|
101
|
+
workdir: loop.workdir ?? "",
|
|
102
|
+
model: loop.model ?? void 0,
|
|
103
|
+
allowControl: loop.allowControl
|
|
104
|
+
},
|
|
105
|
+
createdAt: loop.createdAt,
|
|
106
|
+
updatedAt: loop.updatedAt
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
async function toJobDetail(loop) {
|
|
110
|
+
const fullRuns = (await listRuns(loop.id, 100)).map(toRunSummary).reverse();
|
|
111
|
+
const m = await getMachine(loop.machineId);
|
|
112
|
+
const presence = machinePresence(m?.online, m?.lastSeen);
|
|
113
|
+
return {
|
|
114
|
+
job: toJobFull(loop),
|
|
115
|
+
summary: await toJobSummary(loop),
|
|
116
|
+
taskFileContent: loop.taskFileContent ?? null,
|
|
117
|
+
taskFileSyncedAt: loop.taskFileSyncedAt ?? null,
|
|
118
|
+
machine: {
|
|
119
|
+
id: loop.machineId,
|
|
120
|
+
name: m?.name || "",
|
|
121
|
+
online: presence === "online",
|
|
122
|
+
presence,
|
|
123
|
+
lastSeen: m?.lastSeen ?? null,
|
|
124
|
+
daemonProtocol: m?.daemonProtocol ?? null
|
|
125
|
+
},
|
|
126
|
+
runs: fullRuns
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
//#endregion
|
|
130
|
+
export { toRunSummary as i, toJobDetail as n, toJobSummary as r, toArtifactSummary as t };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { B as getArtifactFile, V as getArtifactSync, Wt as safeRelPath, _t as listArtifactsWithMeta } from "./boot-BbtG0ImW.mjs";
|
|
2
|
+
import { t as toArtifactSummary } from "./adapters-BS8XosjF.mjs";
|
|
3
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/artifactFiles-Cagtj7J0.js
|
|
4
|
+
/**
|
|
5
|
+
* Server-side reads over a loop's live-synced artifacts (Phase 2). Pure helpers
|
|
6
|
+
* (no request/session context) so they're shared by the lazy server fns
|
|
7
|
+
* (`getArtifacts` / `getArtifact` in loopApi) AND the download route, and are
|
|
8
|
+
* directly unit-testable against an injected blob store — authorization is the
|
|
9
|
+
* caller's job (the server fn via `ownedLoop`, the route via `canAccessLoop`).
|
|
10
|
+
*
|
|
11
|
+
* The bytes live in the gateway's BlobStore (local by default, R2 when configured);
|
|
12
|
+
* here we only read them — never write — so the feature is strictly read-only and
|
|
13
|
+
* the server's zero-exec invariant holds (it decodes text, never interprets it).
|
|
14
|
+
*/
|
|
15
|
+
/** The loop's current (non-deleted) file set as compact UI rows, path-sorted, each
|
|
16
|
+
* carrying its blob's front-matter meta (one indexed join, no per-file fetch). */
|
|
17
|
+
async function listLoopArtifacts(loopId) {
|
|
18
|
+
return (await listArtifactsWithMeta(loopId)).map(toArtifactSummary);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* One file's content for inline display: decoded text for a text file, or a
|
|
22
|
+
* binary/oversize marker (the UI then offers the download route). Returns an
|
|
23
|
+
* error marker for an unknown/tombstoned path or a blob whose bytes aren't
|
|
24
|
+
* stored yet (a pending upload) — never throws.
|
|
25
|
+
*/
|
|
26
|
+
async function readLoopArtifact(loopId, rawPath) {
|
|
27
|
+
const rel = safeRelPath(rawPath);
|
|
28
|
+
if (!rel) return { error: "invalid path" };
|
|
29
|
+
const row = await getArtifactFile(loopId, rel);
|
|
30
|
+
if (!row || row.deleted) return { error: "file not found" };
|
|
31
|
+
if (row.binary || row.oversize) return {
|
|
32
|
+
binary: true,
|
|
33
|
+
size: row.size ?? null,
|
|
34
|
+
oversize: row.oversize
|
|
35
|
+
};
|
|
36
|
+
if (!row.hash) return { error: "file not synced yet" };
|
|
37
|
+
const bytes = await (await getArtifactSync()).readBlob(row.hash);
|
|
38
|
+
if (!bytes) return { error: "file not found" };
|
|
39
|
+
return { text: bytes.toString("utf8") };
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Resolve a loop-relative path to its stored bytes for the download route.
|
|
43
|
+
* Path-safe (rejects absolute/`..`/escaping → 400). Oversize/tombstoned/absent
|
|
44
|
+
* → 404 (no bytes to serve). The bytes stream straight from the BlobStore.
|
|
45
|
+
*/
|
|
46
|
+
async function readLoopArtifactBytes(loopId, rawPath) {
|
|
47
|
+
const rel = safeRelPath(rawPath);
|
|
48
|
+
if (!rel) return { status: 400 };
|
|
49
|
+
const row = await getArtifactFile(loopId, rel);
|
|
50
|
+
if (!row || row.deleted || !row.hash) return { status: 404 };
|
|
51
|
+
const bytes = await (await getArtifactSync()).readBlob(row.hash);
|
|
52
|
+
if (!bytes) return { status: 404 };
|
|
53
|
+
return {
|
|
54
|
+
status: 200,
|
|
55
|
+
bytes,
|
|
56
|
+
binary: row.binary,
|
|
57
|
+
filename: rel.split("/").pop() || "file"
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
//#endregion
|
|
61
|
+
export { listLoopArtifacts, readLoopArtifact, readLoopArtifactBytes };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/artifactKind-BW0isV8L.js
|
|
2
|
+
/** Extension → MIME for the image types we serve inline. This is an ALLOWLIST:
|
|
3
|
+
* the route serves an inline content-type only for these, everything else stays
|
|
4
|
+
* a download. SVG is included but is only ever rendered via <img> (never inline
|
|
5
|
+
* markup) and served with a sandbox CSP so a direct navigation can't script. */
|
|
6
|
+
var IMAGE_MIME = {
|
|
7
|
+
png: "image/png",
|
|
8
|
+
jpg: "image/jpeg",
|
|
9
|
+
jpeg: "image/jpeg",
|
|
10
|
+
gif: "image/gif",
|
|
11
|
+
webp: "image/webp",
|
|
12
|
+
avif: "image/avif",
|
|
13
|
+
bmp: "image/bmp",
|
|
14
|
+
ico: "image/x-icon",
|
|
15
|
+
svg: "image/svg+xml"
|
|
16
|
+
};
|
|
17
|
+
/** Lowercased file extension without the dot (`''` when the path has none). */
|
|
18
|
+
function ext(path) {
|
|
19
|
+
return (path.match(/\.([a-z0-9]+)$/i)?.[1] ?? "").toLowerCase();
|
|
20
|
+
}
|
|
21
|
+
/** The safe inline image MIME for this path, or null when it isn't a known image. */
|
|
22
|
+
function imageMime(path) {
|
|
23
|
+
return IMAGE_MIME[ext(path)] ?? null;
|
|
24
|
+
}
|
|
25
|
+
var isImagePath = (path) => imageMime(path) !== null;
|
|
26
|
+
var isHtmlPath = (path) => ext(path) === "html" || ext(path) === "htm";
|
|
27
|
+
var isMarkdownPath = (path) => ext(path) === "md" || ext(path) === "markdown";
|
|
28
|
+
/** The display kind for one artifact path (extension only - the bytes decide
|
|
29
|
+
* binary-ness elsewhere; here we only pick the RENDERER). */
|
|
30
|
+
function artifactKind(path) {
|
|
31
|
+
if (isImagePath(path)) return "image";
|
|
32
|
+
if (isHtmlPath(path)) return "html";
|
|
33
|
+
if (isMarkdownPath(path)) return "markdown";
|
|
34
|
+
return "text";
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
export { imageMime as n, artifactKind as t };
|