@kky42/pievo-server 2.4.1 → 2.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/MachinesModal-CSbnrUER.js +1 -0
  3. package/.output/public/assets/{SignIn-BdkKWOSs.js → SignIn-0Tjqs-Ma.js} +1 -1
  4. package/.output/public/assets/{actionUi-BYBeYy7U.js → actionUi-DpwGIGpw.js} +1 -1
  5. package/.output/public/assets/app-CaZpuwOS.css +2 -0
  6. package/.output/public/assets/index-CaS_SmDq.js +10 -0
  7. package/.output/public/assets/invite._token-Btg_0aLp.js +1 -0
  8. package/.output/public/assets/{invite._token-ZnVQqqq4.js → invite._token-KMD2JAgE.js} +1 -1
  9. package/.output/public/assets/loops._loopId-D5usF3DO.js +67 -0
  10. package/.output/public/assets/{loops._loopId_.runs._runId-CA0-q1y5.js → loops._loopId_.runs._runId-DRCgXaCq.js} +2 -2
  11. package/.output/public/assets/{preload-helper-CUIO87nJ.js → preload-helper-DsxECZIS.js} +3 -3
  12. package/.output/public/assets/routes-CtFgwdgW.js +1 -0
  13. package/.output/public/assets/routes-LDbnnQ3f.js +1 -0
  14. package/.output/public/assets/t._teamId-D41xcbsF.js +1 -0
  15. package/.output/public/assets/t._teamId-DUena1pV.js +1 -0
  16. package/.output/public/assets/{ui-DGOT8AoZ.js → ui-Do4gqMyP.js} +1 -1
  17. package/.output/server/_ssr/{DashboardView-D_hKsCsv.mjs → DashboardView-C2LdV6J0.mjs} +61 -245
  18. package/.output/server/_ssr/{MachinesModal-DZ_9ErAU.mjs → MachinesModal-BjkcVjjx.mjs} +6 -8
  19. package/.output/server/_ssr/{SignIn-DjSrg0nO.mjs → SignIn-DEGrvJvb.mjs} +3 -3
  20. package/.output/server/_ssr/{SocialLinks-BTjsnVOm.mjs → SocialLinks-Cm4H8pUJ.mjs} +5 -12
  21. package/.output/server/_ssr/{actionUi-D15R8L7R.mjs → actionUi-DJBWuNwr.mjs} +2 -2
  22. package/.output/server/_ssr/{artifactFiles-CV3OXxRD.mjs → artifactFiles-DtpRidFZ.mjs} +3 -3
  23. package/.output/server/_ssr/{artifactKind-ByzVa7fg.mjs → artifactKind-FBYbgSuf.mjs} +3 -3
  24. package/.output/server/_ssr/artifacts-BR3jj0NC.mjs +2 -0
  25. package/.output/server/_ssr/{auth-CPCDf6Wr.mjs → auth-C0zoZCGe.mjs} +9 -9
  26. package/.output/server/_ssr/boot-CdOO4xOo.mjs +2 -0
  27. package/.output/server/_ssr/{boot-BbWxaF-z.mjs → boot-sNlIkoLe.mjs} +66 -129
  28. package/.output/server/_ssr/{bun-sqlite-dialect-BW9W1_Ps-8MIh9jN1.mjs → bun-sqlite-dialect-BW9W1_Ps-DmlZWqO7.mjs} +2 -2
  29. package/.output/server/_ssr/{d1-sqlite-dialect-BLC8LXE6-CcMQ01_d.mjs → d1-sqlite-dialect-BLC8LXE6-CCNzqZwZ.mjs} +2 -2
  30. package/.output/server/_ssr/db-CwLD-5w1.mjs +2 -0
  31. package/.output/server/_ssr/{dist-AxCsRawm.mjs → dist-B3SxDOpW.mjs} +2 -2
  32. package/.output/server/_ssr/{factory-S7MaMVC2.mjs → factory-Dv3Zopis.mjs} +2 -2
  33. package/.output/server/_ssr/{invite._token-B1UgMbNQ.mjs → invite._token-CJ6-H-s3.mjs} +4 -12
  34. package/.output/server/_ssr/{invite._token-D296YVGd.mjs → invite._token-dLKDJKVs.mjs} +8 -16
  35. package/.output/server/_ssr/{invite._token-BliJIGk4.mjs → invite._token-l1SjouDz.mjs} +6 -14
  36. package/.output/server/_ssr/{kysely-adapter-DUdpqcCJ.mjs → kysely-adapter-nL7WKSgw.mjs} +1 -1
  37. package/.output/server/_ssr/logger-B8m8F1Qu.mjs +2 -0
  38. package/.output/server/_ssr/{loopApi-Dy8ztANM.mjs → loopApi-BKyFB4KM.mjs} +12 -59
  39. package/.output/server/_ssr/{loopProjection-BZ1_IYCr.mjs → loopProjection-B8a829ij.mjs} +2 -2
  40. package/.output/server/_ssr/{loops._loopId-CKsAnxMl.mjs → loops._loopId-DS16Phmq.mjs} +31 -15
  41. package/.output/server/_ssr/{loops._loopId_.runs._runId-DG405pQs.mjs → loops._loopId_.runs._runId-BEJI6iK5.mjs} +6 -6
  42. package/.output/server/_ssr/{loops._loopId_.runs._runId-a_SyY8rX.mjs → loops._loopId_.runs._runId-CduETLqH.mjs} +3 -3
  43. package/.output/server/_ssr/{machineFns-BSaE7K88.mjs → machineFns-ByMsgG12.mjs} +3 -3
  44. package/.output/server/_ssr/{node-sqlite-dialect-rWwVyt2J.mjs → node-sqlite-dialect-CjNineno.mjs} +2 -2
  45. package/.output/server/_ssr/{router-lMkobh5r.mjs → router-CXyrnvx-.mjs} +65 -118
  46. package/.output/server/_ssr/{routes-CRHc9cLG.mjs → routes-BulNEUEE.mjs} +5 -5
  47. package/.output/server/_ssr/{routes-DNCZrs8z.mjs → routes-DD94baie.mjs} +2 -2
  48. package/.output/server/_ssr/{routes-ufPbrGHs.mjs → routes-Wjexi35W.mjs} +5 -5
  49. package/.output/server/_ssr/runDiff-Ba8Lg1vg.mjs +2 -0
  50. package/.output/server/_ssr/ssr.mjs +39 -47
  51. package/.output/server/_ssr/store-Cujtg2QE.mjs +2 -0
  52. package/.output/server/_ssr/{t._teamId-QD2nN0wn.mjs → t._teamId-1CreIlPV.mjs} +5 -5
  53. package/.output/server/_ssr/{t._teamId-DcWOYjPf.mjs → t._teamId-Bd6-zZsy.mjs} +2 -2
  54. package/.output/server/_ssr/{t._teamId-BoBoYEHL.mjs → t._teamId-COuMKQ4r.mjs} +5 -5
  55. package/.output/server/_ssr/{teamFns-BsmconJ1.mjs → teamFns-H438WnZC.mjs} +12 -30
  56. package/.output/server/_ssr/{teamFns-DcoVuWyH.mjs → teamFns-j2JKjorZ.mjs} +2 -2
  57. package/.output/server/_ssr/tokens-DgG_Syq3.mjs +2 -0
  58. package/.output/server/_ssr/{ui-DmFKW2H_.mjs → ui-D5KWstlb.mjs} +3 -4
  59. package/.output/server/{_tanstack-start-manifest_v-Xd5bMpJe.mjs → _tanstack-start-manifest_v-3H7yBKLz.mjs} +24 -26
  60. package/.output/server/index.mjs +81 -81
  61. package/package.json +1 -2
  62. package/.output/public/assets/MachinesModal-CEddj7la.js +0 -1
  63. package/.output/public/assets/app-BAgHQVvr.css +0 -2
  64. package/.output/public/assets/index-BZLqD3JI.js +0 -12
  65. package/.output/public/assets/invite._token-BCLgmTO7.js +0 -1
  66. package/.output/public/assets/loops._loopId-X8PSlgdB.js +0 -67
  67. package/.output/public/assets/routes-BjKcDy6D.js +0 -1
  68. package/.output/public/assets/routes-bfMcArTT.js +0 -1
  69. package/.output/public/assets/t._teamId-B75J8h0x.js +0 -1
  70. package/.output/public/assets/t._teamId-D7WVPMDr.js +0 -1
  71. package/.output/server/_ssr/artifacts-BhQvaGjF.mjs +0 -2
  72. package/.output/server/_ssr/boot-COHf8Gv3.mjs +0 -2
  73. package/.output/server/_ssr/db-dw61xIt1.mjs +0 -2
  74. package/.output/server/_ssr/logger-DdUWuMdh.mjs +0 -2
  75. package/.output/server/_ssr/runDiff-CrZzjokj.mjs +0 -2
  76. package/.output/server/_ssr/store-CirPHuib.mjs +0 -2
  77. package/.output/server/_ssr/tokens-XngoyCU8.mjs +0 -2
@@ -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, s as TooltipProvider } from "../_libs/@base-ui/react+[...].mjs";
3
- import { E as selectCls, S as rel, a as btn, b as labelCls, c as btnPrimaryPill, d as cronText, k as useHydrated, o as btnDanger, p as dotLabel, r as Pill, s as btnPrimary, t as ErrorBanner, u as btnSm, x as lastRunOf, y as inputCls } from "./ui-DmFKW2H_.mjs";
3
+ import { O as useHydrated, T as selectCls, a as btn, b as lastRunOf, f as dotLabel, l as btnSm, o as btnDanger, r as Pill, s as btnPrimary, t as ErrorBanner, u as cronText, v as inputCls, x as rel, y as labelCls } from "./ui-D5KWstlb.mjs";
4
4
  import { d as useNavigate } from "../_libs/@tanstack/react-router+[...].mjs";
5
- import { _ as listMyTeams, f as getConfig, g as listLoops, n as GitHubIcon, o as claimStatus, r as PievoLogo, t as GITHUB_URL, v as loadOlderRuns, y as mintClaim } from "./SocialLinks-BTjsnVOm.mjs";
5
+ import { _ as loadOlderRuns, d as getConfig, g as listMyTeams, h as listLoops, n as GitHubIcon, r as PievoLogo, t as GITHUB_URL, v as mintClaim } from "./SocialLinks-Cm4H8pUJ.mjs";
6
6
  import { t as setActiveTeamCookie } from "./teamCookie-B7hLOIie.mjs";
7
- import { a as getTeamDetail, d as revokeTeamInvite, f as setTeamMemberRole, i as deleteTeam, l as removeTeamMember, n as createTeam, o as leaveTeam, r as createTeamInvite, s as listManagedTeams, t as addTeamMember, u as renameTeam } from "./teamFns-DcoVuWyH.mjs";
7
+ import { a as getTeamDetail, d as revokeTeamInvite, f as setTeamMemberRole, i as deleteTeam, l as removeTeamMember, n as createTeam, o as leaveTeam, r as createTeamInvite, s as listManagedTeams, t as addTeamMember, u as renameTeam } from "./teamFns-j2JKjorZ.mjs";
8
8
  import { r as deriveLoopLifecycle } from "./lifecycleUi-Dad3hvhm.mjs";
9
- import { a as Timeline, i as ModalSection, n as Modal, o as listMachines, r as ModalHead, s as mergeRuns, t as MachinesModal } from "./MachinesModal-DZ_9ErAU.mjs";
10
- //#region node_modules/.nitro/vite/services/ssr/assets/DashboardView-D_hKsCsv.js
9
+ import { a as Timeline, c as mergeRuns, i as ModalSection, n as Modal, o as daemonConnectCommand, r as ModalHead, s as listMachines, t as MachinesModal } from "./MachinesModal-BjkcVjjx.mjs";
10
+ //#region node_modules/.nitro/vite/services/ssr/assets/DashboardView-C2LdV6J0.js
11
11
  var import_react = /* @__PURE__ */ __toESM(require_react());
12
12
  var import_jsx_runtime = require_jsx_runtime();
13
13
  function LoopCard({ loop, onOpen, onPickRun }) {
@@ -629,113 +629,21 @@ function TeamsModal({ open, onClose, activeTeamId }) {
629
629
  ]
630
630
  });
631
631
  }
632
- var SLOW_WAIT_MS = 1e5;
633
- var AGENT_LABEL = {
634
- "claude-code": "Claude Code",
635
- codex: "Codex"
636
- };
637
- function ClaudeCodeMark({ size = 14 }) {
638
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
639
- "aria-hidden": true,
640
- width: size,
641
- height: size,
642
- viewBox: "0 0 24 24",
643
- fill: "#D97757",
644
- fillRule: "evenodd",
645
- className: "shrink-0",
646
- xmlns: "http://www.w3.org/2000/svg",
647
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
648
- clipRule: "evenodd",
649
- d: "M20.998 10.949H24v3.102h-3v3.028h-1.487V20H18v-2.921h-1.487V20H15v-2.921H9V20H7.488v-2.921H6V20H4.487v-2.921H3V14.05H0V10.95h3V5h17.998v5.949zM6 10.949h1.488V8.102H6v2.847zm10.51 0H18V8.102h-1.49v2.847z"
650
- })
651
- });
652
- }
653
- /** Codex color mark (LobeHub icon set) — verbatim: white app tile + gradient glyph. */
654
- function CodexMark({ size = 14 }) {
655
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
656
- "aria-hidden": true,
657
- width: size,
658
- height: size,
659
- viewBox: "0 0 24 24",
660
- className: "shrink-0",
661
- xmlns: "http://www.w3.org/2000/svg",
662
- children: [
663
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
664
- d: "M19.503 0H4.496A4.496 4.496 0 000 4.496v15.007A4.496 4.496 0 004.496 24h15.007A4.496 4.496 0 0024 19.503V4.496A4.496 4.496 0 0019.503 0z",
665
- fill: "#fff"
666
- }),
667
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
668
- d: "M9.064 3.344a4.578 4.578 0 012.285-.312c1 .115 1.891.54 2.673 1.275.01.01.024.017.037.021a.09.09 0 00.043 0 4.55 4.55 0 013.046.275l.047.022.116.057a4.581 4.581 0 012.188 2.399c.209.51.313 1.041.315 1.595a4.24 4.24 0 01-.134 1.223.123.123 0 00.03.115c.594.607.988 1.33 1.183 2.17.289 1.425-.007 2.71-.887 3.854l-.136.166a4.548 4.548 0 01-2.201 1.388.123.123 0 00-.081.076c-.191.551-.383 1.023-.74 1.494-.9 1.187-2.222 1.846-3.711 1.838-1.187-.006-2.239-.44-3.157-1.302a.107.107 0 00-.105-.024c-.388.125-.78.143-1.204.138a4.441 4.441 0 01-1.945-.466 4.544 4.544 0 01-1.61-1.335c-.152-.202-.303-.392-.414-.617a5.81 5.81 0 01-.37-.961 4.582 4.582 0 01-.014-2.298.124.124 0 00.006-.056.085.085 0 00-.027-.048 4.467 4.467 0 01-1.034-1.651 3.896 3.896 0 01-.251-1.192 5.189 5.189 0 01.141-1.6c.337-1.112.982-1.985 1.933-2.618.212-.141.413-.251.601-.33.215-.089.43-.164.646-.227a.098.098 0 00.065-.066 4.51 4.51 0 01.829-1.615 4.535 4.535 0 011.837-1.388zm3.482 10.565a.637.637 0 000 1.272h3.636a.637.637 0 100-1.272h-3.636zM8.462 9.23a.637.637 0 00-1.106.631l1.272 2.224-1.266 2.136a.636.636 0 101.095.649l1.454-2.455a.636.636 0 00.005-.64L8.462 9.23z",
669
- fill: "url(#lobe-icons-codex-grad)"
670
- }),
671
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("linearGradient", {
672
- gradientUnits: "userSpaceOnUse",
673
- id: "lobe-icons-codex-grad",
674
- x1: "12",
675
- x2: "12",
676
- y1: "3",
677
- y2: "21",
678
- children: [
679
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", { stopColor: "#B1A7FF" }),
680
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", {
681
- offset: ".5",
682
- stopColor: "#7A9DFF"
683
- }),
684
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", {
685
- offset: "1",
686
- stopColor: "#3941FF"
687
- })
688
- ]
689
- }) })
690
- ]
691
- });
692
- }
693
- var instructionFor = (origin) => `Fetch ${origin}/api/bootstrap and help me build a loop.`;
694
- /**
695
- * New loop = capture-from-Claude-Code (paste-forward, no machine picker). The web
696
- * mints a claim token, shows ONE instruction block, and waits. The user pastes it
697
- * into their own Claude Code session (where they just did the task); Claude
698
- * follows /api/bootstrap — ensures a daemon is running (the token authorizes a new
699
- * machine, or the machine's stored token reuses an existing one) and POSTs the
700
- * loop through /api/machine/cli with this token as `claim`. We poll until
701
- * the loop lands, then close. No machine selection: the binding is decided on the
702
- * machine, the claim just correlates the result back to this dialog.
703
- *
704
- * Pievo is BYOA-only: every loop runs on the connected machine; there is no
705
- * hosted-agent option.
706
- */
707
- function ComposeModal({ open, onClose, onCreated, teamId }) {
632
+ function ComposeModal({ open, onClose, teamId }) {
708
633
  const [token, setToken] = (0, import_react.useState)(null);
709
634
  const [config, setConfig] = (0, import_react.useState)(null);
710
- const [created, setCreated] = (0, import_react.useState)(null);
711
635
  const [copied, setCopied] = (0, import_react.useState)(false);
712
- const [slow, setSlow] = (0, import_react.useState)(false);
713
636
  const [error, setError] = (0, import_react.useState)(null);
714
637
  const [configError, setConfigError] = (0, import_react.useState)(false);
715
- const pollRef = (0, import_react.useRef)(null);
716
- const onCreatedRef = (0, import_react.useRef)(onCreated);
717
- onCreatedRef.current = onCreated;
718
638
  const origin = typeof window !== "undefined" ? window.location.origin : "";
719
- const instruction = instructionFor(origin);
720
- const configLines = token && config ? [
721
- `server-url: ${origin}`,
722
- `connect-key: ${token}`,
723
- ...config?.customCli ? [`pievo-cli: ${config.pievoCli}`] : []
724
- ].join("\n") : "";
725
- const snippet = token && config ? [
726
- instruction,
727
- "",
728
- configLines
729
- ].join("\n") : "";
639
+ const command = token && config ? daemonConnectCommand(origin, token, config.pievoCli, config.customCli) : "";
730
640
  (0, import_react.useEffect)(() => {
731
641
  if (!open) return;
732
642
  setToken(null);
733
643
  setConfig(null);
734
- setCreated(null);
644
+ setCopied(false);
735
645
  setError(null);
736
646
  setConfigError(false);
737
- setCopied(false);
738
- setSlow(false);
739
647
  }, [open]);
740
648
  (0, import_react.useEffect)(() => {
741
649
  if (!open) return;
@@ -745,8 +653,10 @@ function ComposeModal({ open, onClose, onCreated, teamId }) {
745
653
  }).catch(() => {
746
654
  if (active) setConfigError(true);
747
655
  });
748
- mintClaim({ data: teamId }).then((r) => {
749
- if (active) "token" in r ? setToken(r.token) : setError(r.error);
656
+ mintClaim({ data: teamId }).then((result) => {
657
+ if (!active) return;
658
+ if ("token" in result) setToken(result.token);
659
+ else setError(result.error);
750
660
  }).catch(() => {
751
661
  if (active) setError("could not mint a connect key");
752
662
  });
@@ -754,119 +664,15 @@ function ComposeModal({ open, onClose, onCreated, teamId }) {
754
664
  active = false;
755
665
  };
756
666
  }, [open, teamId]);
757
- (0, import_react.useEffect)(() => {
758
- if (!open || created || !token) return;
759
- if (pollRef.current) clearInterval(pollRef.current);
760
- pollRef.current = setInterval(() => {
761
- claimStatus({ data: token }).then((s) => {
762
- if (s.done) {
763
- if (!s.id || !s.name || !s.agent) throw new Error("invalid claim response");
764
- if (pollRef.current) clearInterval(pollRef.current);
765
- setCreated({
766
- id: s.id,
767
- name: s.name,
768
- agent: s.agent
769
- });
770
- onCreatedRef.current();
771
- }
772
- }).catch(() => {});
773
- }, 2500);
774
- const slowTimer = setTimeout(() => setSlow(true), SLOW_WAIT_MS);
775
- return () => {
776
- if (pollRef.current) clearInterval(pollRef.current);
777
- clearTimeout(slowTimer);
778
- };
779
- }, [
780
- open,
781
- created,
782
- token
783
- ]);
784
- async function copy() {
667
+ async function copyCommand() {
785
668
  try {
786
- await navigator.clipboard.writeText(snippet);
669
+ await navigator.clipboard.writeText(command);
787
670
  setCopied(true);
788
671
  setTimeout(() => setCopied(false), 1500);
789
672
  } catch {
790
- setError("could not copy - select the text and copy manually");
673
+ setError("could not copy - select the command and copy manually");
791
674
  }
792
675
  }
793
- const snippetBox = (showInlineCopy = true) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
794
- className: "min-w-0 flex-1",
795
- children: [
796
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
797
- className: "flex items-center justify-between gap-3",
798
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", {
799
- className: "text-label font-semibold text-display",
800
- children: "Paste to capture it"
801
- }), showInlineCopy && snippet && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
802
- className: btnSm,
803
- onClick: () => void copy(),
804
- children: copied ? "✓ Copied" : "Copy"
805
- })]
806
- }),
807
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
808
- className: "mt-2 overflow-hidden rounded-control border border-hairline bg-raised p-3 font-mono text-label text-primary",
809
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
810
- className: "leading-relaxed",
811
- children: instruction
812
- }), configLines ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("pre", {
813
- className: "mt-3 overflow-x-auto whitespace-pre-wrap border-t border-hairline pt-3 leading-relaxed text-secondary",
814
- children: configLines
815
- }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
816
- className: "mt-3 border-t border-hairline pt-3 leading-relaxed text-secondary",
817
- children: configError ? "Could not load the CLI configuration. Close and try again." : token ? "Loading CLI configuration…" : "Minting a connect key…"
818
- })]
819
- }),
820
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
821
- className: "mt-2 text-body leading-snug text-secondary",
822
- children: "Paste it in that same session - reuses this machine automatically. Your agent will ask what the loop should do."
823
- })
824
- ]
825
- });
826
- const wait = slow ? {
827
- dot: "bg-secondary",
828
- text: "Still waiting - check your coding agent is running in the right project, then paste again."
829
- } : {
830
- dot: "animate-pulse bg-rubik-orange",
831
- text: "Waiting for your coding agent…"
832
- };
833
- const copyPromptButton = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
834
- className: `${btnPrimaryPill} ml-auto`,
835
- onClick: () => void copy(),
836
- disabled: !snippet,
837
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
838
- className: "inline-flex items-center gap-0.5",
839
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ClaudeCodeMark, {}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CodexMark, {})]
840
- }), copied ? "✓ Copied" : "Copy prompt"]
841
- });
842
- if (created) return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Modal, {
843
- open,
844
- onClose,
845
- children: [
846
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ModalHead, {
847
- title: "Loop created",
848
- sub: `Configured to run with ${AGENT_LABEL[created.agent]}.`
849
- }),
850
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
851
- className: "mt-5 rounded-card border border-hairline bg-surface p-5 shadow-card",
852
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
853
- className: "text-[17px] font-medium text-display",
854
- children: ["✓ ", created.name]
855
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
856
- className: "mt-1 text-body text-secondary",
857
- children: "It’s scheduled now and will run on the machine."
858
- })]
859
- }),
860
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
861
- className: "mt-4",
862
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
863
- className: btnPrimary,
864
- onClick: onClose,
865
- children: "Done"
866
- })
867
- })
868
- ]
869
- });
870
676
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Modal, {
871
677
  open,
872
678
  onClose,
@@ -874,50 +680,62 @@ function ComposeModal({ open, onClose, onCreated, teamId }) {
874
680
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ModalHead, { title: "New loop" }),
875
681
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
876
682
  className: "mt-6",
877
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
878
- className: "flex gap-3.5",
879
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
880
- className: "flex flex-col items-center",
881
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
882
- className: "flex size-5 shrink-0 items-center justify-center rounded-full border border-display text-micro font-medium leading-none text-display",
883
- children: "1"
884
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "mt-1 w-px flex-1 bg-hairline" })]
683
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Step, {
684
+ number: "1",
685
+ continued: true,
686
+ title: "Install and connect the daemon",
687
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
688
+ className: "mt-1.5 text-body leading-snug text-secondary",
689
+ children: "Paste this command into the foreground coding-agent session where the loop should run."
885
690
  }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
886
- className: "pb-6",
887
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", {
888
- className: "text-label font-semibold text-display",
889
- children: "Do it once in your coding agent"
890
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
891
- className: "mt-1.5 text-body leading-snug text-secondary",
892
- children: "Run the task yourself first, to a real result you’re happy with."
691
+ className: "mt-3 flex min-w-0 items-start gap-2",
692
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("pre", {
693
+ className: "min-w-0 flex-1 overflow-x-auto whitespace-pre-wrap break-all rounded-control bg-display p-4 font-mono text-label leading-relaxed text-paper",
694
+ children: command || (configError ? "Could not load the connection command. Close and try again." : token ? "Loading CLI configuration…" : "Minting a connect key…")
695
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
696
+ className: btnSm,
697
+ onClick: () => void copyCommand(),
698
+ disabled: !command,
699
+ children: copied ? "Copied ✓" : "Copy"
893
700
  })]
894
701
  })]
895
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
896
- className: "flex gap-3.5",
897
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
898
- className: "flex size-5 shrink-0 items-center justify-center rounded-full border border-display text-micro font-medium leading-none text-display",
899
- children: "2"
900
- }), snippetBox(false)]
702
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Step, {
703
+ number: "2",
704
+ title: "Create the loop",
705
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
706
+ className: "mt-1.5 text-body leading-snug text-secondary",
707
+ children: "Then, in the same session, say:"
708
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
709
+ className: "mt-3 rounded-control border border-hairline bg-raised p-4 text-body font-medium text-display",
710
+ children: "Create a Pievo loop."
711
+ })]
901
712
  })]
902
713
  }),
903
714
  error && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
904
- className: "mt-3 text-body text-accent",
715
+ className: "mt-4 text-body text-accent",
905
716
  children: ["Error: ", error]
906
- }),
907
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
908
- className: "mt-6 flex items-start gap-3",
909
- children: [
910
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `mt-1 inline-block h-2 w-2 shrink-0 rounded-full ${wait.dot}` }),
911
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
912
- className: "text-label leading-relaxed text-secondary",
913
- children: wait.text
914
- }),
915
- copyPromptButton
916
- ]
917
717
  })
918
718
  ]
919
719
  });
920
720
  }
721
+ function Step({ number, title, continued = false, children }) {
722
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
723
+ className: "flex gap-3.5",
724
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
725
+ className: "flex flex-col items-center",
726
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
727
+ className: "flex size-5 shrink-0 items-center justify-center rounded-full border border-display text-micro font-medium leading-none text-display",
728
+ children: number
729
+ }), continued && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "mt-1 w-px flex-1 bg-hairline" })]
730
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
731
+ className: continued ? "min-w-0 flex-1 pb-7" : "min-w-0 flex-1",
732
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", {
733
+ className: "text-label font-semibold text-display",
734
+ children: title
735
+ }), children]
736
+ })]
737
+ });
738
+ }
921
739
  /** Loops, machines, and teams change between polls.
922
740
  *
923
741
  * `teamId` (the `/t/<id>` route's team, in id form or undefined in open mode)
@@ -964,7 +782,6 @@ function DashboardView({ teamId, initial }) {
964
782
  }, anyRunning ? 3e3 : 1e4);
965
783
  return () => clearInterval(t);
966
784
  }, [refetch, anyRunning]);
967
- const refresh = () => void refetch();
968
785
  const activeOn = loops.filter((j) => j.enabled).length;
969
786
  const cardProps = () => ({
970
787
  onOpen: (id) => void navigate({
@@ -1076,8 +893,7 @@ function DashboardView({ teamId, initial }) {
1076
893
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComposeModal, {
1077
894
  open: composeOpen,
1078
895
  teamId,
1079
- onClose: () => setComposeOpen(false),
1080
- onCreated: refresh
896
+ onClose: () => setComposeOpen(false)
1081
897
  }),
1082
898
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MachinesModal, {
1083
899
  open: machinesOpen,
@@ -1,11 +1,11 @@
1
1
  import { o as __toESM } from "../_runtime.mjs";
2
- import { et as isOutdated, xt as machinePresence } from "./boot-BbWxaF-z.mjs";
2
+ import { St as machinePresence, tt as isOutdated } from "./boot-sNlIkoLe.mjs";
3
3
  import { a as DialogClose, c as TooltipPopup, d as TooltipTrigger, f as TooltipRoot, g as require_react, h as require_jsx_runtime, i as DialogPopup, l as TooltipPositioner, n as DialogRoot, o as DialogBackdrop, r as DialogPortal, t as DialogTitle, u as TooltipPortal } from "../_libs/@base-ui/react+[...].mjs";
4
- import { C as runPulseAnim, O as until, S as rel, T as sectionHeadCls, a as btn, b as labelCls, f as dotColor, g as fmt, h as dur, k as useHydrated, m as dotOpacity, o as btnDanger, p as dotLabel, s as btnPrimary, t as ErrorBanner, y as inputCls } from "./ui-DmFKW2H_.mjs";
4
+ import { D as until, O as useHydrated, S as runPulseAnim, a as btn, d as dotColor, f as dotLabel, h as fmt, m as dur, o as btnDanger, p as dotOpacity, s as btnPrimary, t as ErrorBanner, v as inputCls, w as sectionHeadCls, x as rel, y as labelCls } from "./ui-D5KWstlb.mjs";
5
5
  import { n as createServerFn } from "./ssr.mjs";
6
- import { f as getConfig, s as createSsrRpc } from "./SocialLinks-BTjsnVOm.mjs";
6
+ import { d as getConfig, o as createSsrRpc } from "./SocialLinks-Cm4H8pUJ.mjs";
7
7
  import { n as daemonStopSupport } from "./lifecycleUi-Dad3hvhm.mjs";
8
- //#region node_modules/.nitro/vite/services/ssr/assets/MachinesModal-DZ_9ErAU.js
8
+ //#region node_modules/.nitro/vite/services/ssr/assets/MachinesModal-BjkcVjjx.js
9
9
  var import_react = /* @__PURE__ */ __toESM(require_react());
10
10
  var import_jsx_runtime = require_jsx_runtime();
11
11
  /**
@@ -197,9 +197,7 @@ function Timeline({ loop, runs, total, onLoadMore, onPickRun }) {
197
197
  ]
198
198
  });
199
199
  }
200
- /** Shared modal shell — Base UI Dialog handles focus trap, Esc, scroll lock.
201
- * Content-height, optically centered — sized for the small form/compose dialogs
202
- * (the old `detail`/`wide` variants died with the modal-era loop/run views). */
200
+ /** Shared modal shell — Base UI Dialog handles focus trap, Esc, and scroll lock. */
203
201
  function Modal({ open, onClose, children, wide = false }) {
204
202
  const pos = `-translate-y-1/2 max-h-[calc(100dvh-4rem)] ${wide ? "top-1/2 max-w-[62rem]" : "top-[46%] max-w-160"}`;
205
203
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogRoot, {
@@ -588,4 +586,4 @@ function MachinesModal({ open, onClose, teamId }) {
588
586
  });
589
587
  }
590
588
  //#endregion
591
- export { Timeline as a, ModalSection as i, Modal as n, listMachines as o, ModalHead as r, mergeRuns as s, MachinesModal as t };
589
+ export { Timeline as a, mergeRuns as c, ModalSection as i, Modal as n, daemonConnectCommand as o, ModalHead as r, listMachines as s, MachinesModal as t };
@@ -1,7 +1,7 @@
1
1
  import { h as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
2
- import { s as btnPrimary } from "./ui-DmFKW2H_.mjs";
3
- import { C as signIn, n as GitHubIcon, r as PievoLogo, t as GITHUB_URL } from "./SocialLinks-BTjsnVOm.mjs";
4
- //#region node_modules/.nitro/vite/services/ssr/assets/SignIn-DjSrg0nO.js
2
+ import { s as btnPrimary } from "./ui-D5KWstlb.mjs";
3
+ import { S as signIn, n as GitHubIcon, r as PievoLogo, t as GITHUB_URL } from "./SocialLinks-Cm4H8pUJ.mjs";
4
+ //#region node_modules/.nitro/vite/services/ssr/assets/SignIn-DEGrvJvb.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 { E as defu, I as getBaseURL, Wt as toKebabCase, b as createFetch, h as capitalizeFirstLetter, it as isSafeUrlScheme } from "./boot-BbWxaF-z.mjs";
2
+ import { D as defu, Gt as toKebabCase, L as getBaseURL, at as isSafeUrlScheme, g as capitalizeFirstLetter, x as createFetch } from "./boot-sNlIkoLe.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-BTjsnVOm.js
5
+ //#region node_modules/.nitro/vite/services/ssr/assets/SocialLinks-Cm4H8pUJ.js
6
6
  var import_react = /* @__PURE__ */ __toESM(require_react());
7
7
  var import_jsx_runtime = require_jsx_runtime();
8
8
  var createSsrRpc = (functionId) => {
@@ -87,20 +87,13 @@ var stopLoop = createServerFn({ method: "POST" }).validator((id) => id).handler(
87
87
  * Stop, so retire its execution authority and remove server data immediately.
88
88
  * Local files are never touched by either path. */
89
89
  var deleteLoop = createServerFn({ method: "POST" }).validator((id) => id).handler(createSsrRpc("5e0d6b55f5629faac2f55a68661eeb82668b2be752192b16264ffb5cd1e6fabe"));
90
- createServerFn({ method: "POST" }).validator((d) => d).handler(createSsrRpc("199e1c98d1946048b76a18a86c6d252d87776e70fefa62e4af66089244acb9de"));
91
90
  var runLoop = createServerFn({ method: "POST" }).validator((id) => id).handler(createSsrRpc("08565e35f6a3dd06ef25401de0343976c47f7ae319d3baed6320b56dd3718311"));
92
91
  /** Dedicated Stop-run operation. Pending work cancels immediately; running work
93
92
  * records intent and stays Running until the daemon reports its actual result. */
94
93
  var stopRun = createServerFn({ method: "POST" }).validator((id) => id).handler(createSsrRpc("6850ba403da9dec5aff45794eb52636ca540ddec2d9e59f5c75ccbb852bfeacb"));
95
- /**
96
- * Mint a fresh claim token for a New-loop dialog. It's shown in the paste
97
- * snippet and used by Claude Code as (a) this machine's device token if the
98
- * machine is new, and (b) the loop's `claim` so the dialog can correlate the
99
- * created loop. No machine row is created here — the daemon self-registers.
100
- */
94
+ /** Mint the key shown in the New-loop daemon connection command. It may enroll
95
+ * a new machine and remains valid as an optional team-bound create claim. */
101
96
  var mintClaim = createServerFn({ method: "POST" }).validator((teamId) => teamId).handler(createSsrRpc("4646f52fb09b83c9c9cef34836f3c9d03416423c879d9e5ceffcafd9a71ecba6"));
102
- /** Poll a claim while the New-loop dialog waits for Claude Code to create the loop. */
103
- var claimStatus = createServerFn({ method: "GET" }).validator((token) => token).handler(createSsrRpc("4b0db7d6c8f25383a3526598cb0c1881db6cf413e451e9478687c05666461347"));
104
97
  var PROTO_POLLUTION_PATTERNS = {
105
98
  proto: /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,
106
99
  constructor: /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,
@@ -1048,4 +1041,4 @@ function GitHubIcon({ className }) {
1048
1041
  });
1049
1042
  }
1050
1043
  //#endregion
1051
- export { signIn as C, useSession as D, stopRun as E, runLoop as S, stopLoop as T, listMyTeams as _, canViewTeam as a, patchLoop as b, deleteLoop as c, getAuthState as d, getConfig as f, listLoops as g, getRunDiff as h, authClient as i, getArtifact as l, getLoopDetail as m, GitHubIcon as n, claimStatus as o, getDefaultTeam as p, PievoLogo as r, createSsrRpc as s, GITHUB_URL as t, getArtifacts as u, loadOlderRuns as v, startLoop as w, pauseLoop as x, mintClaim as y };
1044
+ export { startLoop as C, useSession as E, signIn as S, stopRun as T, loadOlderRuns as _, canViewTeam as a, pauseLoop as b, getArtifact as c, getConfig as d, getDefaultTeam as f, listMyTeams as g, listLoops as h, authClient as i, getArtifacts as l, getRunDiff as m, GitHubIcon as n, createSsrRpc as o, getLoopDetail as p, PievoLogo as r, deleteLoop as s, GITHUB_URL as t, getAuthState as u, mintClaim as v, stopLoop as w, runLoop as x, patchLoop as y };
@@ -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-DmFKW2H_.mjs";
4
- //#region node_modules/.nitro/vite/services/ssr/assets/actionUi-D15R8L7R.js
3
+ import { a as btn, o as btnDanger, s as btnPrimary } from "./ui-D5KWstlb.mjs";
4
+ //#region node_modules/.nitro/vite/services/ssr/assets/actionUi-DJBWuNwr.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 getArtifactSync, It as safeRelPath, P as getArtifactFile, ct as listArtifacts } from "./boot-BbWxaF-z.mjs";
2
- import { t as toArtifactSummary } from "./loopProjection-BZ1_IYCr.mjs";
3
- //#region node_modules/.nitro/vite/services/ssr/assets/artifactFiles-CV3OXxRD.js
1
+ import { F as getArtifactFile, I as getArtifactSync, Lt as safeRelPath, lt as listArtifacts } from "./boot-sNlIkoLe.mjs";
2
+ import { t as toArtifactSummary } from "./loopProjection-B8a829ij.mjs";
3
+ //#region node_modules/.nitro/vite/services/ssr/assets/artifactFiles-DtpRidFZ.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 { d as getAuthState, i as authClient } from "./SocialLinks-BTjsnVOm.mjs";
3
- //#region node_modules/.nitro/vite/services/ssr/assets/artifactKind-ByzVa7fg.js
4
- var $$splitComponentImporter = () => import("./loops._loopId-CKsAnxMl.mjs");
2
+ import { i as authClient, u as getAuthState } from "./SocialLinks-Cm4H8pUJ.mjs";
3
+ //#region node_modules/.nitro/vite/services/ssr/assets/artifactKind-FBYbgSuf.js
4
+ var $$splitComponentImporter = () => import("./loops._loopId-DS16Phmq.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
@@ -0,0 +1,2 @@
1
+ import { Tt as parseArtifactSyncBody, f as SYNC_BODY_CAP, i as BLOB_CAP } from "./boot-sNlIkoLe.mjs";
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 isDynamicBaseURLConfig, Ct as normalizePathname, E as defu, Ft as resolveBaseURL, G as getOrigin, I as getBaseURL, K as getProtocol, L as getBooleanEnvVar, M as env, Q as isDevelopment, T as db, Ut as teamIdForUser, V as getHost, Zt as wildcardMatch, a as BetterAuthError, at as isTeamMember, c as ENV, f as ValidationError$1, h as capitalizeFirstLetter, j as ensureTeam, m as betterFetch, n as APIError$1, nt as isProduction, o as BetterCallError, ot as isTest, r as BASE_ERROR_CODES, rt as isRequestLike, st as kAPIErrorHeaderSymbol, t as APIError, vt as loginGateEnabled, y as createDefu, z as getEnvVar } from "./boot-BbWxaF-z.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-S7MaMVC2.mjs";
2
+ import { $ as isDevelopment, B as getEnvVar, D as defu, E as db, H as getHost, It as resolveBaseURL, K as getOrigin, L as getBaseURL, M as ensureTeam, N as env, R as getBooleanEnvVar, Wt as teamIdForUser, a as BetterAuthError, b as createDefu, c as ENV, ct as kAPIErrorHeaderSymbol, en as wildcardMatch, 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, wt as normalizePathname, yt as loginGateEnabled } from "./boot-sNlIkoLe.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-Dv3Zopis.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-CPCDf6Wr.js
1703
+ //#region node_modules/.nitro/vite/services/ssr/assets/auth-C0zoZCGe.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-8MIh9jN1.mjs");
15996
+ const { BunSqliteDialect } = await import("./bun-sqlite-dialect-BW9W1_Ps-DmlZWqO7.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-rWwVyt2J.mjs");
16012
+ const { NodeSqliteDialect } = await import("./node-sqlite-dialect-CjNineno.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-CcMQ01_d.mjs");
16017
+ const { D1SqliteDialect } = await import("./d1-sqlite-dialect-BLC8LXE6-CCNzqZwZ.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-AxCsRawm.mjs");
36529
+ const { memoryAdapter } = await import("./dist-B3SxDOpW.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-DUdpqcCJ.mjs");
36543
+ const { createKyselyAdapter } = await import("./kysely-adapter-nL7WKSgw.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-DUdpqcCJ.mjs");
36546
+ const { kyselyAdapter } = await import("./kysely-adapter-nL7WKSgw.mjs");
36547
36547
  return kyselyAdapter(kysely, {
36548
36548
  type: databaseType || "sqlite",
36549
36549
  debugLogs: opts.database && "debugLogs" in opts.database ? opts.database.debugLogs : false,
@@ -0,0 +1,2 @@
1
+ import { I as getArtifactSync, V as getGateway, z as getCliGateway } from "./boot-sNlIkoLe.mjs";
2
+ export { getArtifactSync, getCliGateway, getGateway };