@kky42/pievo-server 2.3.0 → 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 (199) 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-0Tjqs-Ma.js +1 -0
  4. package/.output/public/assets/actionUi-DpwGIGpw.js +1 -0
  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-KMD2JAgE.js +1 -0
  9. package/.output/public/assets/lifecycleUi-C7dwHtbw.js +1 -0
  10. package/.output/public/assets/loops._loopId-D5usF3DO.js +67 -0
  11. package/.output/public/assets/loops._loopId_.runs._runId-DRCgXaCq.js +3 -0
  12. package/.output/public/assets/preload-helper-DsxECZIS.js +5 -0
  13. package/.output/public/assets/routes-CtFgwdgW.js +1 -0
  14. package/.output/public/assets/routes-LDbnnQ3f.js +1 -0
  15. package/.output/public/assets/t._teamId-D41xcbsF.js +1 -0
  16. package/.output/public/assets/t._teamId-DUena1pV.js +1 -0
  17. package/.output/public/assets/ui-Do4gqMyP.js +1 -0
  18. package/.output/server/_libs/@base-ui/react+[...].mjs +4130 -4130
  19. package/.output/server/_libs/@tanstack/react-router+[...].mjs +1 -1
  20. package/.output/server/_libs/drizzle-orm+postgres.mjs +28 -1
  21. package/.output/server/_ssr/DashboardView-C2LdV6J0.mjs +914 -0
  22. package/.output/server/_ssr/{notifyFns-DuPR1zd7.mjs → MachinesModal-BjkcVjjx.mjs} +55 -35
  23. package/.output/server/_ssr/{SignIn-RmpWm9uy.mjs → SignIn-DEGrvJvb.mjs} +10 -24
  24. package/.output/server/_ssr/SocialLinks-Cm4H8pUJ.mjs +1044 -0
  25. package/.output/server/_ssr/{actionUi-BN55TNYE.mjs → actionUi-DJBWuNwr.mjs} +3 -3
  26. package/.output/server/_ssr/{artifactFiles-BCaIIrrT.mjs → artifactFiles-DtpRidFZ.mjs} +7 -8
  27. package/.output/server/_ssr/{artifactKind-BW0isV8L.mjs → artifactKind-FBYbgSuf.mjs} +27 -2
  28. package/.output/server/_ssr/artifacts-BR3jj0NC.mjs +2 -0
  29. package/.output/server/_ssr/{auth-30Z4lV1w.mjs → auth-C0zoZCGe.mjs} +16 -19
  30. package/.output/server/_ssr/boot-CdOO4xOo.mjs +2 -0
  31. package/.output/server/_ssr/{boot-3BNKujyp.mjs → boot-sNlIkoLe.mjs} +1331 -3927
  32. package/.output/server/_ssr/{bun-sqlite-dialect-BW9W1_Ps-_7tfuNRi.mjs → bun-sqlite-dialect-BW9W1_Ps-DmlZWqO7.mjs} +2 -2
  33. package/.output/server/_ssr/{d1-sqlite-dialect-BLC8LXE6-ucDUbeBk.mjs → d1-sqlite-dialect-BLC8LXE6-CCNzqZwZ.mjs} +2 -2
  34. package/.output/server/_ssr/db-CwLD-5w1.mjs +2 -0
  35. package/.output/server/_ssr/{dist-Cd6nlLlO.mjs → dist-B3SxDOpW.mjs} +2 -2
  36. package/.output/server/_ssr/{factory-CWWwV7XZ.mjs → factory-Dv3Zopis.mjs} +2 -2
  37. package/.output/server/_ssr/invite._token-CJ6-H-s3.mjs +20 -0
  38. package/.output/server/_ssr/{invite._token-SdWXemIc.mjs → invite._token-dLKDJKVs.mjs} +9 -17
  39. package/.output/server/_ssr/{invite._token-BKlz0R2f.mjs → invite._token-l1SjouDz.mjs} +6 -15
  40. package/.output/server/_ssr/{kysely-adapter-C8iS51DB.mjs → kysely-adapter-nL7WKSgw.mjs} +1 -1
  41. package/.output/server/_ssr/{lifecycleUi-DgBQAYzp.mjs → lifecycleUi-Dad3hvhm.mjs} +11 -11
  42. package/.output/server/_ssr/logger-B8m8F1Qu.mjs +2 -0
  43. package/.output/server/_ssr/loopApi-BKyFB4KM.mjs +342 -0
  44. package/.output/server/_ssr/{adapters-BoLkOf1T.mjs → loopProjection-B8a829ij.mjs} +25 -55
  45. package/.output/server/_ssr/loops._loopId-DS16Phmq.mjs +1271 -0
  46. package/.output/server/_ssr/{loops._loopId_.runs._runId-PUGBrD5q.mjs → loops._loopId_.runs._runId-BEJI6iK5.mjs} +23 -74
  47. package/.output/server/_ssr/{loops._loopId_.runs._runId-Ymy4lwee.mjs → loops._loopId_.runs._runId-CduETLqH.mjs} +4 -5
  48. package/.output/server/_ssr/{machineFns-BZ9puxDt.mjs → machineFns-ByMsgG12.mjs} +3 -5
  49. package/.output/server/_ssr/{node-sqlite-dialect-D_3JmkMo.mjs → node-sqlite-dialect-CjNineno.mjs} +2 -2
  50. package/.output/server/_ssr/router-CXyrnvx-.mjs +565 -0
  51. package/.output/server/_ssr/{routes-ClZEdsnB.mjs → routes-BulNEUEE.mjs} +6 -10
  52. package/.output/server/_ssr/{routes-ComqHvCL.mjs → routes-DD94baie.mjs} +3 -3
  53. package/.output/server/_ssr/{routes-D5jJJ-30.mjs → routes-Wjexi35W.mjs} +6 -6
  54. package/.output/server/_ssr/runDiff-Ba8Lg1vg.mjs +2 -0
  55. package/.output/server/_ssr/ssr.mjs +60 -100
  56. package/.output/server/_ssr/store-Cujtg2QE.mjs +2 -0
  57. package/.output/server/_ssr/{t._teamId-BgHV_KFP.mjs → t._teamId-1CreIlPV.mjs} +7 -11
  58. package/.output/server/_ssr/{t._teamId-DDERNgfn.mjs → t._teamId-Bd6-zZsy.mjs} +4 -4
  59. package/.output/server/_ssr/{t._teamId-DRJvKHZn.mjs → t._teamId-COuMKQ4r.mjs} +7 -7
  60. package/.output/server/_ssr/{teamFns-Bp81UO-x.mjs → teamFns-H438WnZC.mjs} +12 -30
  61. package/.output/server/_ssr/{teamFns-bm82twd5.mjs → teamFns-j2JKjorZ.mjs} +2 -2
  62. package/.output/server/_ssr/tokens-DgG_Syq3.mjs +2 -0
  63. package/.output/server/_ssr/{ui-Ww2tTM2u.mjs → ui-D5KWstlb.mjs} +26 -48
  64. package/.output/server/{_tanstack-start-manifest_v-DwKENYCN.mjs → _tanstack-start-manifest_v-3H7yBKLz.mjs} +25 -35
  65. package/{drizzle/0000_round_marauders.sql → .output/server/drizzle/0000_baseline.sql} +102 -44
  66. package/.output/server/drizzle/meta/_journal.json +3 -115
  67. package/.output/server/index.mjs +83 -132
  68. package/{.output/server/drizzle/0000_round_marauders.sql → drizzle/0000_baseline.sql} +102 -44
  69. package/drizzle/meta/_journal.json +3 -115
  70. package/package.json +2 -11
  71. package/scripts/pievo-server.mjs +3 -1
  72. package/scripts/server-cli-lib.mjs +23 -16
  73. package/.output/public/assets/CodeField-dOzyFQNH.js +0 -34
  74. package/.output/public/assets/LoopView-DjVHUyrR.js +0 -59
  75. package/.output/public/assets/Modal-CCRvx959.js +0 -1
  76. package/.output/public/assets/SignIn-Qxw5zDFq.js +0 -1
  77. package/.output/public/assets/actionUi-CXxhzYe2.js +0 -1
  78. package/.output/public/assets/app-D1cij_NJ.css +0 -2
  79. package/.output/public/assets/artifactView-Cd5wWPil.js +0 -66
  80. package/.output/public/assets/index-BRN_CQ8U.js +0 -12
  81. package/.output/public/assets/invite._token-BIxr8DlP.js +0 -1
  82. package/.output/public/assets/invite._token-j2BTCeG1.js +0 -1
  83. package/.output/public/assets/jsx-runtime-BseJUIpC.js +0 -1
  84. package/.output/public/assets/lifecycleUi-Qy_8beQK.js +0 -1
  85. package/.output/public/assets/loopApi-CT1mMhlb.js +0 -3
  86. package/.output/public/assets/loops._loopId-BRBQzioy.js +0 -4
  87. package/.output/public/assets/loops._loopId_.runs._runId-CMnOJkem.js +0 -3
  88. package/.output/public/assets/notifyFns-DYD4EKaG.js +0 -1
  89. package/.output/public/assets/preload-helper-DFkkpP6W.js +0 -3
  90. package/.output/public/assets/routes-3nuEJGdo.js +0 -1
  91. package/.output/public/assets/routes-DORLim-C.js +0 -1
  92. package/.output/public/assets/t._teamId-F5f4K8kd.js +0 -1
  93. package/.output/public/assets/t._teamId-XfE_S1Fo.js +0 -1
  94. package/.output/public/assets/ui-Dhsx6SW0.js +0 -1
  95. package/.output/public/assets/useRouter-DsjH8G0p.js +0 -1
  96. package/.output/server/_libs/@codemirror/autocomplete+[...].mjs +0 -19713
  97. package/.output/server/_libs/@codemirror/lang-css+[...].mjs +0 -2636
  98. package/.output/server/_libs/@codemirror/lang-html+[...].mjs +0 -2247
  99. package/.output/server/_libs/@codemirror/lang-json+[...].mjs +0 -79
  100. package/.output/server/_libs/@reduxjs/toolkit+[...].mjs +0 -1736
  101. package/.output/server/_libs/@uiw/codemirror-extensions-basic-setup+[...].mjs +0 -76
  102. package/.output/server/_libs/babel__runtime.mjs +0 -30
  103. package/.output/server/_libs/clsx.mjs +0 -16
  104. package/.output/server/_libs/codemirror__commands.mjs +0 -1725
  105. package/.output/server/_libs/codemirror__lint.mjs +0 -565
  106. package/.output/server/_libs/codemirror__search.mjs +0 -1138
  107. package/.output/server/_libs/codemirror__theme-one-dark.mjs +0 -161
  108. package/.output/server/_libs/d3-array.mjs +0 -231
  109. package/.output/server/_libs/d3-color.mjs +0 -330
  110. package/.output/server/_libs/d3-format.mjs +0 -252
  111. package/.output/server/_libs/d3-interpolate.mjs +0 -163
  112. package/.output/server/_libs/d3-path.mjs +0 -77
  113. package/.output/server/_libs/d3-scale+[...].mjs +0 -1907
  114. package/.output/server/_libs/d3-shape.mjs +0 -818
  115. package/.output/server/_libs/decimal.js-light.mjs +0 -884
  116. package/.output/server/_libs/dom-serializer+[...].mjs +0 -708
  117. package/.output/server/_libs/domhandler.mjs +0 -461
  118. package/.output/server/_libs/domutils.mjs +0 -868
  119. package/.output/server/_libs/es-toolkit.mjs +0 -1737
  120. package/.output/server/_libs/eventemitter3.mjs +0 -236
  121. package/.output/server/_libs/html-dom-parser+htmlparser2.mjs +0 -1560
  122. package/.output/server/_libs/html-react-parser+[...].mjs +0 -1360
  123. package/.output/server/_libs/react-is.mjs +0 -48
  124. package/.output/server/_libs/react-redux+[...].mjs +0 -205
  125. package/.output/server/_libs/recharts+victory-vendor.mjs +0 -17303
  126. package/.output/server/_libs/uiw__codemirror-themes.mjs +0 -32
  127. package/.output/server/_libs/uiw__react-codemirror.mjs +0 -354
  128. package/.output/server/_ssr/CodeField-B7oOmmwH.mjs +0 -143
  129. package/.output/server/_ssr/DashboardView-BF7PciP7.mjs +0 -2736
  130. package/.output/server/_ssr/LoopPlaybook-DC7QVvPY.mjs +0 -2105
  131. package/.output/server/_ssr/LoopView-DwSrm9Ja.mjs +0 -1300
  132. package/.output/server/_ssr/Modal-MaCG52Pv.mjs +0 -49
  133. package/.output/server/_ssr/artifactView-iuPsp5aa.mjs +0 -304
  134. package/.output/server/_ssr/artifacts-jQ-bfdhI.mjs +0 -2
  135. package/.output/server/_ssr/boot-CsEFT53K.mjs +0 -2
  136. package/.output/server/_ssr/db-CXownd1H.mjs +0 -2
  137. package/.output/server/_ssr/invite._token-CWl6kipD.mjs +0 -28
  138. package/.output/server/_ssr/logger-Gy-47z3k.mjs +0 -2
  139. package/.output/server/_ssr/loopApi-8_KgBapr.mjs +0 -109
  140. package/.output/server/_ssr/loopApi-ABi9SgWS.mjs +0 -564
  141. package/.output/server/_ssr/loops._loopId-SON_t43g.mjs +0 -30
  142. package/.output/server/_ssr/loops._loopId-p1KWsvMM.mjs +0 -1477
  143. package/.output/server/_ssr/notifyFns-BUCePuF3.mjs +0 -118
  144. package/.output/server/_ssr/router-Czxvra6l.mjs +0 -685
  145. package/.output/server/_ssr/runDiff--qLtU4FI.mjs +0 -2
  146. package/.output/server/_ssr/store-40eVzW1S.mjs +0 -2
  147. package/.output/server/_ssr/tokens-CbfoRC_s.mjs +0 -2
  148. package/.output/server/drizzle/0001_naive_silver_fox.sql +0 -25
  149. package/.output/server/drizzle/0002_funny_sage.sql +0 -12
  150. package/.output/server/drizzle/0003_optimal_slapstick.sql +0 -102
  151. package/.output/server/drizzle/0004_remove_grok_agent.sql +0 -5
  152. package/.output/server/drizzle/0005_heavy_gauntlet.sql +0 -8
  153. package/.output/server/drizzle/0006_tranquil_sharon_carter.sql +0 -1
  154. package/.output/server/drizzle/0007_faulty_starbolt.sql +0 -30
  155. package/.output/server/drizzle/0008_durable_lifecycle_evidence.sql +0 -15
  156. package/.output/server/drizzle/0009_ordinary_electro.sql +0 -1
  157. package/.output/server/drizzle/0010_workable_rage.sql +0 -14
  158. package/.output/server/drizzle/0011_steep_marvel_zombies.sql +0 -3
  159. package/.output/server/drizzle/0012_blocked_run_status.sql +0 -12
  160. package/.output/server/drizzle/0013_drop_run_outcome.sql +0 -2
  161. package/.output/server/drizzle/0014_luxuriant_scrambler.sql +0 -5
  162. package/.output/server/drizzle/0015_run_history_foundation.sql +0 -43
  163. package/.output/server/drizzle/0016_plural_machine_runs.sql +0 -4
  164. package/.output/server/drizzle/meta/0000_snapshot.json +0 -1333
  165. package/.output/server/drizzle/meta/0001_snapshot.json +0 -1498
  166. package/.output/server/drizzle/meta/0002_snapshot.json +0 -1576
  167. package/.output/server/drizzle/meta/0003_snapshot.json +0 -1666
  168. package/.output/server/drizzle/meta/0005_snapshot.json +0 -1666
  169. package/.output/server/drizzle/meta/0006_snapshot.json +0 -1672
  170. package/.output/server/drizzle/meta/0007_snapshot.json +0 -1787
  171. package/.output/server/drizzle/meta/0009_snapshot.json +0 -1793
  172. package/.output/server/drizzle/meta/0010_snapshot.json +0 -1891
  173. package/.output/server/drizzle/meta/0011_snapshot.json +0 -1872
  174. package/drizzle/0001_naive_silver_fox.sql +0 -25
  175. package/drizzle/0002_funny_sage.sql +0 -12
  176. package/drizzle/0003_optimal_slapstick.sql +0 -102
  177. package/drizzle/0004_remove_grok_agent.sql +0 -5
  178. package/drizzle/0005_heavy_gauntlet.sql +0 -8
  179. package/drizzle/0006_tranquil_sharon_carter.sql +0 -1
  180. package/drizzle/0007_faulty_starbolt.sql +0 -30
  181. package/drizzle/0008_durable_lifecycle_evidence.sql +0 -15
  182. package/drizzle/0009_ordinary_electro.sql +0 -1
  183. package/drizzle/0010_workable_rage.sql +0 -14
  184. package/drizzle/0011_steep_marvel_zombies.sql +0 -3
  185. package/drizzle/0012_blocked_run_status.sql +0 -12
  186. package/drizzle/0013_drop_run_outcome.sql +0 -2
  187. package/drizzle/0014_luxuriant_scrambler.sql +0 -5
  188. package/drizzle/0015_run_history_foundation.sql +0 -43
  189. package/drizzle/0016_plural_machine_runs.sql +0 -4
  190. package/drizzle/meta/0000_snapshot.json +0 -1333
  191. package/drizzle/meta/0001_snapshot.json +0 -1498
  192. package/drizzle/meta/0002_snapshot.json +0 -1576
  193. package/drizzle/meta/0003_snapshot.json +0 -1666
  194. package/drizzle/meta/0005_snapshot.json +0 -1666
  195. package/drizzle/meta/0006_snapshot.json +0 -1672
  196. package/drizzle/meta/0007_snapshot.json +0 -1787
  197. package/drizzle/meta/0009_snapshot.json +0 -1793
  198. package/drizzle/meta/0010_snapshot.json +0 -1891
  199. package/drizzle/meta/0011_snapshot.json +0 -1872
@@ -1,564 +0,0 @@
1
- import { Ct as listChartRuns, It as machinePresence, J as getChannel, Jt as requestDeleteLoop, U as forceDeleteLoop, Vt as pauseLoop, Yt as requestRunCancel, an as updateLoop, at as getTeam, b as coerceCodingAgent, cn as validateSchema, ct as hasRunningRun, en as startLoop, et as getLoop, in as tryDeleteLoop, it as getRun, jt as listTeamsForUser, kt as listRunsBefore, ln as validateSteerInstruction, ot as getTeamMember, tn as stopLoop, tt as getMachine, v as canEvolve, wt as listLoops, x as coerceUi, z as ensureServer, zt as normalizeProviderSetting } from "./boot-3BNKujyp.mjs";
2
- import { n as createServerFn } from "./ssr.mjs";
3
- import { i as toRunSummaries, n as toJobDetail, r as toJobSummary } from "./adapters-BoLkOf1T.mjs";
4
- import { canAccessLoop, requestScope } from "./auth-30Z4lV1w.mjs";
5
- import { t as createServerRpc } from "./createServerRpc-BD8Xn_0_.mjs";
6
- //#region node_modules/.nitro/vite/services/ssr/assets/loopApi-ABi9SgWS.js
7
- var meta_default$6 = {
8
- name: "dependency-triage",
9
- label: "Dependency Triage",
10
- desc: "A weekly triage that reviews your open dependency PRs on real evidence and merges only what you've authorized.",
11
- description: "Set up a weekly dependency-triage loop for this project. Before creating it, verify gh can see this repo's Dependabot or Renovate PRs and run one listing as a smoke test, then confirm with me whether the loop may merge low-risk patch and minor updates or must stay review-and-report-only. Every Monday morning my local time, snapshot the open dependency PRs and process each exactly once: judge it on its actual diff, release notes, advisories, and CI results at the exact head - version labels are inputs, not proof of safety - and run the tests in a fresh git worktree off the main branch and located outside the loop folder - the loop folder is a synced content home, not a workspace - so neither my working checkout nor the sync is polluted. Merge only what I authorized; give anything major, breaking, or security-sensitive a clear recommendation instead, and flag high or critical advisories affecting it. Track each PR as a markdown card with front matter `type: merged`, `type: deferred`, or `type: blocked`, and report the open-dependency-PR count as a metric. Set up the loop's dashboard at creation: a kanban of the PR cards plus a chart of that count over time."
12
- };
13
- var meta_default$5 = {
14
- name: "docs-sweep",
15
- label: "Doc Maintainer",
16
- desc: "A weekly sweep that catches documentation drift, verifies what really works, and lands fixes as a PR.",
17
- description: "Set up a weekly loop that keeps this project's documentation honest. Every Monday around 6am my local time, review what has changed since the previous sweep - the loop keeps track of where the last one ended - and compare the README, setup guides, examples, and runbooks against what the code actually ships now. Verify for real: run the commands, check the links, try the examples rather than trusting memory. Fix only material that is genuinely stale - never rewrite accurate docs just to create activity; finding nothing wrong is a clean stop. Do the work in a fresh git worktree off the main branch and located outside the loop folder - the loop folder is a synced content home, not a workspace - so neither my working checkout nor the sync is polluted, and open a pull request explaining the drift and the fixes - but if a previous sweep's PR is still unmerged, don't stack another one. Write a short summary each sweep and report the drift count as a metric, zero included. Set up the loop's dashboard at creation: an embed of the latest sweep summary plus a chart of the drift count over time."
18
- };
19
- var meta_default$4 = {
20
- name: "error-sweep",
21
- label: "Error Sweep",
22
- desc: "A daily reliability pass that traces your real production errors to root cause and opens a PR per verified fix.",
23
- description: "Set up a daily loop that sweeps this project's production errors. Before creating anything, verify a concrete way to read them exists on this machine - logs, an error tracker, a URL, or gh - smoke-test it once, propose the source and sweep window, and confirm it with me; never create a blind loop. Every morning around 6am my local time, sweep the agreed window, group repeated symptoms into incidents, and separate actionable errors from noise and upstream failures. Trace each to root cause, make the smallest verified fix in a fresh git worktree off the main branch and located outside the loop folder - the loop folder is a synced content home, not a workspace - so neither my working checkout nor the sync is polluted; open one pull request per fix, never while a previous Error Sweep PR is unmerged. Never copy credentials, tokens, or personal information into reports or PRs. Write one dated report per run with front matter `type: report`, a `title`, and `date`; report the actionable-error count as a metric; nothing actionable is a clean stop. Set up the loop's dashboard at creation: an embed of the newest report plus a chart of that count."
24
- };
25
- var meta_default$3 = {
26
- name: "follow-up-tracker",
27
- label: "Follow-up Tracker",
28
- desc: "A continuous loop that watches what happens after something you just shipped and surfaces regressions against a standing objective. Works best pasted right after finishing the task you want tracked.",
29
- description: "Look at what was just built or shipped in this session and set up a loop that tracks its aftermath. Before creating anything, verify a concrete way to observe the outcome exists on this machine - logs, metrics or MCP tools, a URL to check, or gh - and run it once as a smoke test; if nothing can actually be observed, say so and do not create a blind loop. Define a concrete standing objective. Propose a cadence that fits the thing being tracked (a few runs per day is a common default) and confirm it with me. On each run, observe through the verified path, report what you find (and every declared metric), and keep watching after the target is met so regressions remain visible; the owner decides when to pause or delete the loop. Set up a modest dashboard at creation: an embed of the latest report, plus a metric chart when a metric was defined."
30
- };
31
- var meta_default$2 = {
32
- name: "housekeeper",
33
- label: "Tech Debt Cleanup",
34
- desc: "A daily janitor that finds one provably safe cleanup in your codebase and lands it as a PR.",
35
- description: "Set up a daily loop that keeps this codebase tidy, one proven cleanup at a time. Every morning around 7am my local time, survey for housekeeping debt - dead code, stale files and comments, unused dependencies, duplication, inconsistent names - while protecting active, uncommitted, generated, and uncertain work. Pick one candidate, prove it genuinely low-risk with concrete evidence before touching it, then make the smallest coherent change in a fresh git worktree off the main branch and located outside the loop folder - the loop folder is a synced content home, not a workspace - so neither my working checkout nor the sync is polluted, and keep it only if the build, tests, and runtime checks stay green. Open a pull request - but if a previous Housekeeper PR is still open (unmerged), don't open another one that day; just refresh the existing PRs' statuses. Uncertain candidates go into a deferred-candidates file, listed, never deleted. Track each cleanup PR as a markdown card with front matter `type: open` or `type: merged`, and report cleanups landed as a daily metric. Set up the loop's dashboard at creation: a kanban of the cleanup cards plus a chart of cleanups landed over time."
36
- };
37
- var meta_default$1 = {
38
- name: "market-research",
39
- label: "Market Monitor",
40
- desc: "A daily monitor that researches your project's market and delivers one dated report every morning.",
41
- description: "Set up a daily market-research loop for this project. First look at the project to figure out what product it is and what market space it lives in, propose a research focus, and confirm it with me before creating the loop. Every morning around 5am my local time, research that day's relevant market developments - competitors, launches, pricing changes, ecosystem news - using whatever web capabilities this machine's agent has. Write exactly one dated markdown report per day, opening with front matter `type: report`, a `title`, and `date` set to today, so the reports ride the calendar view. Set up the loop's dashboard at creation: a calendar of the reports plus an embed of the newest one. Over time, sharpen the research focus around what keeps turning out to matter."
42
- };
43
- var meta_default = {
44
- name: "react-doctor",
45
- label: "React Doctor",
46
- desc: "A daily guardian that scans your React app, fixes the worst issue, and opens a PR.",
47
- description: "Set up a daily loop that keeps this React project healthy. Every morning around 6am my local time, scan the project with `npx react-doctor@latest`, pick the single most severe issue it reports, fix it, and verify the fix before proposing it. Do all the work in a fresh git worktree created off the main branch and located outside the loop folder - the loop folder is a synced content home, not a workspace - so neither my working checkout nor the sync is polluted. Open a pull request for the fix - but if a previous React Doctor PR is still open (unmerged), don't open another one that day; just refresh the existing PRs' statuses and still report the score. Track the pull requests as one markdown card per PR, each with front matter `type: open` or `type: merged` so a kanban board can follow them from open to merged, and report react-doctor's health score every day as a metric. Set up the loop's dashboard at creation: a kanban of the PR cards plus a chart of the health score over time."
48
- };
49
- var thumb_default$6 = "<svg viewBox=\"0 0 144 80\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <!-- Mock of the loop's dashboard: the merged / deferred / blocked triage\n kanban over the open-dependency-PR count easing down. Colors ride the\n app's CSS variables. -->\n <rect x=\"10\" y=\"8\" width=\"36\" height=\"3\" rx=\"1.5\" fill=\"var(--color-rubik-green, #009b48)\"/>\n <rect x=\"10.5\" y=\"16.5\" width=\"35\" height=\"15\" rx=\"4\" fill=\"var(--color-surface, #fff)\" stroke=\"var(--color-hairline, #e3e5ea)\"/>\n <rect x=\"15\" y=\"21\" width=\"20\" height=\"2.5\" rx=\"1.25\" fill=\"var(--color-wire, #cfd3db)\"/>\n <path d=\"M37 23l2 2 3.5-4\" stroke=\"var(--color-rubik-green, #009b48)\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <rect x=\"10.5\" y=\"36.5\" width=\"35\" height=\"15\" rx=\"4\" fill=\"var(--color-surface, #fff)\" stroke=\"var(--color-hairline, #e3e5ea)\"/>\n <rect x=\"15\" y=\"41\" width=\"24\" height=\"2.5\" rx=\"1.25\" fill=\"var(--color-wire, #cfd3db)\"/>\n <rect x=\"15\" y=\"46\" width=\"14\" height=\"2.5\" rx=\"1.25\" fill=\"var(--color-hairline, #e3e5ea)\"/>\n <rect x=\"54\" y=\"8\" width=\"36\" height=\"3\" rx=\"1.5\" fill=\"var(--color-rubik-yellow, #ffd500)\"/>\n <rect x=\"54.5\" y=\"16.5\" width=\"35\" height=\"15\" rx=\"4\" fill=\"var(--color-surface, #fff)\" stroke=\"var(--color-hairline, #e3e5ea)\"/>\n <rect x=\"59\" y=\"21\" width=\"22\" height=\"2.5\" rx=\"1.25\" fill=\"var(--color-wire, #cfd3db)\"/>\n <rect x=\"59\" y=\"26\" width=\"12\" height=\"2.5\" rx=\"1.25\" fill=\"var(--color-hairline, #e3e5ea)\"/>\n <rect x=\"98\" y=\"8\" width=\"36\" height=\"3\" rx=\"1.5\" fill=\"var(--color-rubik-red, #b71234)\"/>\n <rect x=\"98.5\" y=\"16.5\" width=\"35\" height=\"15\" rx=\"4\" fill=\"var(--color-surface, #fff)\" stroke=\"var(--color-hairline, #e3e5ea)\"/>\n <rect x=\"103\" y=\"21\" width=\"18\" height=\"2.5\" rx=\"1.25\" fill=\"var(--color-wire, #cfd3db)\"/>\n <circle cx=\"127\" cy=\"24\" r=\"2.5\" stroke=\"var(--color-rubik-red, #b71234)\" stroke-width=\"1.4\"/>\n <path d=\"M125.3 22.3l3.4 3.4\" stroke=\"var(--color-rubik-red, #b71234)\" stroke-width=\"1.4\" stroke-linecap=\"round\"/>\n <rect x=\"54\" y=\"42\" width=\"24\" height=\"7\" rx=\"3.5\" fill=\"var(--color-interactive-soft, rgba(0,70,173,0.08))\"/>\n <path d=\"M60 47.5v-4m0 0l-1.7 1.7M60 43.5l1.7 1.7\" stroke=\"var(--color-rubik-blue, #0046ad)\" stroke-width=\"1.3\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <rect x=\"65\" y=\"44.5\" width=\"10\" height=\"2.5\" rx=\"1.25\" fill=\"var(--color-rubik-blue, #0046ad)\" opacity=\"0.5\"/>\n <path d=\"M12 74h122\" stroke=\"var(--color-hairline, #e3e5ea)\" stroke-width=\"1.2\"/>\n <path d=\"M12 60 36 63 60 61 84 67 108 66 132 70\" stroke=\"var(--color-rubik-blue, #0046ad)\" stroke-width=\"1.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <rect x=\"12\" y=\"55\" width=\"20\" height=\"2.5\" rx=\"1.25\" fill=\"var(--color-hairline, #e3e5ea)\"/>\n</svg>\n";
50
- var thumb_default$5 = "<svg viewBox=\"0 0 144 80\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <!-- Mock of the loop's dashboard: a doc page with stale lines caught and\n corrected, beside the drift count trending to zero. Colors ride the\n app's CSS variables. -->\n <rect x=\"10.5\" y=\"8.5\" width=\"61\" height=\"63\" rx=\"5\" fill=\"var(--color-surface, #fff)\" stroke=\"var(--color-hairline, #e3e5ea)\"/>\n <rect x=\"17\" y=\"15\" width=\"30\" height=\"3\" rx=\"1.5\" fill=\"var(--color-wire, #cfd3db)\"/>\n <g fill=\"var(--color-hairline, #e3e5ea)\">\n <rect x=\"17\" y=\"25\" width=\"48\" height=\"2.5\" rx=\"1.25\"/>\n <rect x=\"17\" y=\"31\" width=\"40\" height=\"2.5\" rx=\"1.25\"/>\n <rect x=\"17\" y=\"49\" width=\"48\" height=\"2.5\" rx=\"1.25\"/>\n <rect x=\"17\" y=\"61\" width=\"28\" height=\"2.5\" rx=\"1.25\"/>\n </g>\n <rect x=\"17\" y=\"37\" width=\"44\" height=\"2.5\" rx=\"1.25\" fill=\"var(--color-rubik-orange, #ff5800)\" opacity=\"0.45\"/>\n <path d=\"M15 38.25h48\" stroke=\"var(--color-rubik-orange, #ff5800)\" stroke-width=\"1.2\" stroke-linecap=\"round\"/>\n <rect x=\"17\" y=\"43\" width=\"38\" height=\"2.5\" rx=\"1.25\" fill=\"var(--color-wire, #cfd3db)\"/>\n <path d=\"M58 43.5l2 2 3.5-4\" stroke=\"var(--color-rubik-green, #009b48)\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <rect x=\"17\" y=\"55\" width=\"34\" height=\"2.5\" rx=\"1.25\" fill=\"var(--color-rubik-orange, #ff5800)\" opacity=\"0.45\"/>\n <path d=\"M15 56.25h40\" stroke=\"var(--color-rubik-orange, #ff5800)\" stroke-width=\"1.2\" stroke-linecap=\"round\"/>\n <rect x=\"80\" y=\"12\" width=\"24\" height=\"3\" rx=\"1.5\" fill=\"var(--color-rubik-orange, #ff5800)\"/>\n <path d=\"M80 66h54\" stroke=\"var(--color-hairline, #e3e5ea)\" stroke-width=\"1.2\"/>\n <path d=\"M81 26 92 33 103 31 114 45 125 56 133 64\" stroke=\"var(--color-rubik-orange, #ff5800)\" stroke-width=\"1.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <circle cx=\"133\" cy=\"64\" r=\"3\" fill=\"var(--color-rubik-green, #009b48)\"/>\n</svg>\n";
51
- var thumb_default$4 = "<svg viewBox=\"0 0 144 80\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <!-- Mock of the loop's mechanics: a production log pane with an incident\n traced to a verified fix PR, and the actionable-error count falling.\n Colors ride the app's CSS variables. -->\n <rect x=\"10.5\" y=\"8.5\" width=\"62\" height=\"63\" rx=\"5\" fill=\"var(--color-surface, #fff)\" stroke=\"var(--color-hairline, #e3e5ea)\"/>\n <rect x=\"17\" y=\"15\" width=\"26\" height=\"3\" rx=\"1.5\" fill=\"var(--color-rubik-red, #b71234)\"/>\n <g fill=\"var(--color-hairline, #e3e5ea)\">\n <rect x=\"24\" y=\"26\" width=\"40\" height=\"2.5\" rx=\"1.25\"/>\n <rect x=\"24\" y=\"50\" width=\"42\" height=\"2.5\" rx=\"1.25\"/>\n <rect x=\"24\" y=\"62\" width=\"30\" height=\"2.5\" rx=\"1.25\"/>\n </g>\n <circle cx=\"19.5\" cy=\"27.25\" r=\"1.5\" fill=\"var(--color-wire, #cfd3db)\"/>\n <rect x=\"15\" y=\"34.5\" width=\"53\" height=\"9\" rx=\"3\" fill=\"var(--color-rubik-red, #b71234)\" opacity=\"0.08\"/>\n <circle cx=\"19.5\" cy=\"39\" r=\"2\" fill=\"var(--color-rubik-red, #b71234)\"/>\n <rect x=\"24\" y=\"37.75\" width=\"38\" height=\"2.5\" rx=\"1.25\" fill=\"var(--color-wire, #cfd3db)\"/>\n <circle cx=\"19.5\" cy=\"51.25\" r=\"1.5\" fill=\"var(--color-wire, #cfd3db)\"/>\n <circle cx=\"19.5\" cy=\"63.25\" r=\"1.5\" fill=\"var(--color-wire, #cfd3db)\"/>\n <path d=\"M72 39h16\" stroke=\"var(--color-wire, #cfd3db)\" stroke-width=\"1.2\" stroke-dasharray=\"3 3\"/>\n <rect x=\"90.5\" y=\"28.5\" width=\"43\" height=\"21\" rx=\"4\" fill=\"var(--color-surface, #fff)\" stroke=\"var(--color-hairline, #e3e5ea)\"/>\n <rect x=\"96\" y=\"34\" width=\"22\" height=\"2.5\" rx=\"1.25\" fill=\"var(--color-wire, #cfd3db)\"/>\n <rect x=\"96\" y=\"40\" width=\"14\" height=\"2.5\" rx=\"1.25\" fill=\"var(--color-hairline, #e3e5ea)\"/>\n <circle cx=\"125\" cy=\"39\" r=\"5.5\" fill=\"var(--color-success-soft, rgba(0,155,72,0.1))\"/>\n <path d=\"M122.5 39l1.8 1.8 3.2-3.6\" stroke=\"var(--color-rubik-green, #009b48)\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <rect x=\"90\" y=\"12\" width=\"20\" height=\"3\" rx=\"1.5\" fill=\"var(--color-hairline, #e3e5ea)\"/>\n <path d=\"M90 68h44\" stroke=\"var(--color-hairline, #e3e5ea)\" stroke-width=\"1.2\"/>\n <path d=\"M91 56 100 59 109 57 118 63 127 65 133 66.5\" stroke=\"var(--color-rubik-red, #b71234)\" stroke-width=\"1.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <circle cx=\"133\" cy=\"66.5\" r=\"2.5\" fill=\"var(--color-rubik-green, #009b48)\"/>\n</svg>\n";
52
- var thumb_default$3 = "<svg viewBox=\"0 0 144 80\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <!-- Mock of an ongoing loop tracking a standing objective through observed\n checkpoints. Colors ride the app's CSS variables. -->\n <rect x=\"10\" y=\"8\" width=\"62\" height=\"11\" rx=\"5.5\" fill=\"var(--color-success-soft, rgba(0,155,72,0.1))\"/>\n <circle cx=\"18\" cy=\"13.5\" r=\"2\" fill=\"var(--color-rubik-green, #009b48)\"/>\n <rect x=\"24\" y=\"12.5\" width=\"40\" height=\"2.5\" rx=\"1.25\" fill=\"var(--color-rubik-green, #009b48)\" opacity=\"0.55\"/>\n <g stroke=\"var(--color-rubik-green, #009b48)\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle cx=\"17\" cy=\"31\" r=\"4.5\" fill=\"none\"/>\n <path d=\"M15 31l1.6 1.6 2.8-3\"/>\n <circle cx=\"17\" cy=\"46\" r=\"4.5\" fill=\"none\"/>\n <path d=\"M15 46l1.6 1.6 2.8-3\"/>\n </g>\n <circle cx=\"17\" cy=\"61\" r=\"4.5\" stroke=\"var(--color-wire, #cfd3db)\" stroke-width=\"1.5\" fill=\"none\"/>\n <g fill=\"var(--color-wire, #cfd3db)\">\n <rect x=\"28\" y=\"29.5\" width=\"52\" height=\"2.5\" rx=\"1.25\"/>\n <rect x=\"28\" y=\"44.5\" width=\"44\" height=\"2.5\" rx=\"1.25\"/>\n </g>\n <g fill=\"var(--color-hairline, #e3e5ea)\">\n <rect x=\"28\" y=\"35\" width=\"34\" height=\"2.5\" rx=\"1.25\"/>\n <rect x=\"28\" y=\"50\" width=\"28\" height=\"2.5\" rx=\"1.25\"/>\n <rect x=\"28\" y=\"59.5\" width=\"48\" height=\"2.5\" rx=\"1.25\"/>\n <rect x=\"28\" y=\"65\" width=\"20\" height=\"2.5\" rx=\"1.25\"/>\n </g>\n <path d=\"M96 40h14\" stroke=\"var(--color-wire, #cfd3db)\" stroke-width=\"1.2\" stroke-dasharray=\"3 3\"/>\n <circle cx=\"121\" cy=\"40\" r=\"9\" fill=\"var(--color-success-soft, rgba(0,155,72,0.1))\"/>\n <path d=\"M116.5 40l3 3 5.5-6\" stroke=\"var(--color-rubik-green, #009b48)\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n";
53
- var thumb_default$2 = "<svg viewBox=\"0 0 144 80\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <!-- Mock of the loop's mechanics: one proven deletion kept only because the\n checks stay green, a deferred candidate parked, and cleanups landing\n over time. Colors ride the app's CSS variables. -->\n <rect x=\"10.5\" y=\"8.5\" width=\"80\" height=\"63\" rx=\"5\" fill=\"var(--color-surface, #fff)\" stroke=\"var(--color-hairline, #e3e5ea)\"/>\n <rect x=\"17\" y=\"15\" width=\"34\" height=\"3\" rx=\"1.5\" fill=\"var(--color-rubik-yellow, #ffd500)\"/>\n <g fill=\"var(--color-hairline, #e3e5ea)\">\n <rect x=\"17\" y=\"25\" width=\"60\" height=\"2.5\" rx=\"1.25\"/>\n <rect x=\"17\" y=\"43\" width=\"64\" height=\"2.5\" rx=\"1.25\"/>\n <rect x=\"17\" y=\"61\" width=\"42\" height=\"2.5\" rx=\"1.25\"/>\n </g>\n <rect x=\"15\" y=\"31.5\" width=\"70\" height=\"8\" rx=\"3\" fill=\"var(--color-rubik-red, #b71234)\" opacity=\"0.08\"/>\n <rect x=\"19\" y=\"34.25\" width=\"3.5\" height=\"2.5\" rx=\"1.25\" fill=\"var(--color-rubik-red, #b71234)\"/>\n <rect x=\"26\" y=\"34.25\" width=\"46\" height=\"2.5\" rx=\"1.25\" fill=\"var(--color-wire, #cfd3db)\"/>\n <path d=\"M26 35.5h46\" stroke=\"var(--color-rubik-red, #b71234)\" stroke-width=\"1.2\" stroke-linecap=\"round\"/>\n <circle cx=\"20.5\" cy=\"53.25\" r=\"2\" fill=\"var(--color-rubik-yellow, #ffd500)\"/>\n <rect x=\"26\" y=\"52\" width=\"38\" height=\"2.5\" rx=\"1.25\" fill=\"var(--color-wire, #cfd3db)\"/>\n <rect x=\"68\" y=\"50\" width=\"14\" height=\"6\" rx=\"3\" fill=\"var(--color-interactive-soft, rgba(0,70,173,0.08))\"/>\n <circle cx=\"113\" cy=\"22\" r=\"9\" fill=\"var(--color-success-soft, rgba(0,155,72,0.1))\"/>\n <path d=\"M108.5 22l3 3 5.5-6\" stroke=\"var(--color-rubik-green, #009b48)\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <g fill=\"var(--color-rubik-green, #009b48)\">\n <rect x=\"99\" y=\"60\" width=\"6\" height=\"8\" rx=\"1.5\" opacity=\"0.35\"/>\n <rect x=\"108\" y=\"55\" width=\"6\" height=\"13\" rx=\"1.5\" opacity=\"0.55\"/>\n <rect x=\"117\" y=\"50\" width=\"6\" height=\"18\" rx=\"1.5\" opacity=\"0.75\"/>\n <rect x=\"126\" y=\"44\" width=\"6\" height=\"24\" rx=\"1.5\"/>\n </g>\n</svg>\n";
54
- var thumb_default$1 = "<svg viewBox=\"0 0 144 80\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <!-- Mock of the loop's dashboard: a calendar of dated reports beside the\n newest report. Colors ride the app's CSS variables. -->\n <rect x=\"10\" y=\"10\" width=\"16\" height=\"3\" rx=\"1.5\" fill=\"var(--color-wire, #cfd3db)\"/>\n <g stroke=\"var(--color-hairline, #e3e5ea)\" fill=\"var(--color-surface, #fff)\">\n <rect x=\"10.5\" y=\"18.5\" width=\"15\" height=\"13\" rx=\"3\"/><rect x=\"29.5\" y=\"18.5\" width=\"15\" height=\"13\" rx=\"3\"/><rect x=\"48.5\" y=\"18.5\" width=\"15\" height=\"13\" rx=\"3\"/>\n <rect x=\"10.5\" y=\"35.5\" width=\"15\" height=\"13\" rx=\"3\"/><rect x=\"29.5\" y=\"35.5\" width=\"15\" height=\"13\" rx=\"3\"/><rect x=\"48.5\" y=\"35.5\" width=\"15\" height=\"13\" rx=\"3\"/>\n <rect x=\"10.5\" y=\"52.5\" width=\"15\" height=\"13\" rx=\"3\"/><rect x=\"29.5\" y=\"52.5\" width=\"15\" height=\"13\" rx=\"3\"/><rect x=\"48.5\" y=\"52.5\" width=\"15\" height=\"13\" rx=\"3\"/>\n </g>\n <g fill=\"var(--color-rubik-blue, #0046ad)\">\n <circle cx=\"18\" cy=\"25\" r=\"2\"/><circle cx=\"37\" cy=\"25\" r=\"2\"/><circle cx=\"56\" cy=\"25\" r=\"2\"/>\n <circle cx=\"18\" cy=\"42\" r=\"2\"/><circle cx=\"37\" cy=\"42\" r=\"2\"/>\n </g>\n <rect x=\"72.5\" y=\"10.5\" width=\"61\" height=\"59\" rx=\"5\" fill=\"var(--color-surface, #fff)\" stroke=\"var(--color-hairline, #e3e5ea)\"/>\n <rect x=\"79\" y=\"18\" width=\"28\" height=\"3\" rx=\"1.5\" fill=\"var(--color-wire, #cfd3db)\"/>\n <rect x=\"112\" y=\"17\" width=\"16\" height=\"5\" rx=\"2.5\" fill=\"var(--color-interactive-soft, rgba(0,70,173,0.08))\"/>\n <g fill=\"var(--color-hairline, #e3e5ea)\">\n <rect x=\"79\" y=\"28\" width=\"48\" height=\"2.5\" rx=\"1.25\"/>\n <rect x=\"79\" y=\"34\" width=\"42\" height=\"2.5\" rx=\"1.25\"/>\n <rect x=\"79\" y=\"40\" width=\"48\" height=\"2.5\" rx=\"1.25\"/>\n <rect x=\"79\" y=\"46\" width=\"34\" height=\"2.5\" rx=\"1.25\"/>\n <rect x=\"79\" y=\"56\" width=\"44\" height=\"2.5\" rx=\"1.25\"/>\n <rect x=\"79\" y=\"62\" width=\"26\" height=\"2.5\" rx=\"1.25\"/>\n </g>\n</svg>\n";
55
- var thumb_default = "<svg viewBox=\"0 0 144 80\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <!-- Mock of the loop's dashboard: a PR kanban (open -> merged) over the\n health-score trend. Colors ride the app's CSS variables. -->\n <rect x=\"10\" y=\"8\" width=\"58\" height=\"3\" rx=\"1.5\" fill=\"var(--color-rubik-yellow, #ffd500)\"/>\n <rect x=\"10.5\" y=\"16.5\" width=\"57\" height=\"15\" rx=\"4\" fill=\"var(--color-surface, #fff)\" stroke=\"var(--color-hairline, #e3e5ea)\"/>\n <rect x=\"16\" y=\"21\" width=\"30\" height=\"2.5\" rx=\"1.25\" fill=\"var(--color-wire, #cfd3db)\"/>\n <rect x=\"16\" y=\"26\" width=\"20\" height=\"2.5\" rx=\"1.25\" fill=\"var(--color-hairline, #e3e5ea)\"/>\n <rect x=\"10.5\" y=\"36.5\" width=\"57\" height=\"15\" rx=\"4\" fill=\"var(--color-surface, #fff)\" stroke=\"var(--color-hairline, #e3e5ea)\"/>\n <rect x=\"16\" y=\"41\" width=\"36\" height=\"2.5\" rx=\"1.25\" fill=\"var(--color-wire, #cfd3db)\"/>\n <rect x=\"16\" y=\"46\" width=\"24\" height=\"2.5\" rx=\"1.25\" fill=\"var(--color-hairline, #e3e5ea)\"/>\n <rect x=\"76\" y=\"8\" width=\"58\" height=\"3\" rx=\"1.5\" fill=\"var(--color-rubik-green, #009b48)\"/>\n <rect x=\"76.5\" y=\"16.5\" width=\"57\" height=\"15\" rx=\"4\" fill=\"var(--color-surface, #fff)\" stroke=\"var(--color-hairline, #e3e5ea)\"/>\n <rect x=\"82\" y=\"21\" width=\"28\" height=\"2.5\" rx=\"1.25\" fill=\"var(--color-wire, #cfd3db)\"/>\n <path d=\"M122 23.5l2.5 2.5 4.5-5\" stroke=\"var(--color-rubik-green, #009b48)\" stroke-width=\"1.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M12 70 38 68 64 61 90 63 116 55 132 51\" stroke=\"var(--color-rubik-green, #009b48)\" stroke-width=\"1.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <rect x=\"12\" y=\"59\" width=\"22\" height=\"2.5\" rx=\"1.25\" fill=\"var(--color-hairline, #e3e5ea)\"/>\n</svg>\n";
56
- var metas = /* #__PURE__ */ Object.assign({
57
- "../skill/templates/dependency-triage/meta.json": meta_default$6,
58
- "../skill/templates/docs-sweep/meta.json": meta_default$5,
59
- "../skill/templates/error-sweep/meta.json": meta_default$4,
60
- "../skill/templates/follow-up-tracker/meta.json": meta_default$3,
61
- "../skill/templates/housekeeper/meta.json": meta_default$2,
62
- "../skill/templates/market-research/meta.json": meta_default$1,
63
- "../skill/templates/react-doctor/meta.json": meta_default
64
- });
65
- /**
66
- * Optional per-template preview: a `thumb.svg` beside the meta.json, inlined as
67
- * a string (`?raw`, same mechanism as the skill markdown). Drawn with the
68
- * theme's CSS variables so the preview follows light/dark for free. Still pure
69
- * content addition - drop the file and the glob pairs it by folder.
70
- */
71
- var thumbs = /* #__PURE__ */ Object.assign({
72
- "../skill/templates/dependency-triage/thumb.svg": thumb_default$6,
73
- "../skill/templates/docs-sweep/thumb.svg": thumb_default$5,
74
- "../skill/templates/error-sweep/thumb.svg": thumb_default$4,
75
- "../skill/templates/follow-up-tracker/thumb.svg": thumb_default$3,
76
- "../skill/templates/housekeeper/thumb.svg": thumb_default$2,
77
- "../skill/templates/market-research/thumb.svg": thumb_default$1,
78
- "../skill/templates/react-doctor/thumb.svg": thumb_default
79
- });
80
- /**
81
- * Product-curated card order for the dashboard (NOT alphabetical): the code-hygiene
82
- * loops first (docs → errors → React → tech debt), then the research/ops loops. A
83
- * template not in this list falls to the end, name-sorted, so a new folder still shows.
84
- */
85
- var CARD_ORDER = [
86
- "docs-sweep",
87
- "error-sweep",
88
- "react-doctor",
89
- "housekeeper",
90
- "market-research",
91
- "dependency-triage",
92
- "follow-up-tracker"
93
- ];
94
- var orderOf = (name) => {
95
- const i = CARD_ORDER.indexOf(name);
96
- return i === -1 ? CARD_ORDER.length : i;
97
- };
98
- var TEMPLATES = Object.entries(metas).map(([path, meta]) => ({
99
- ...meta,
100
- thumb: thumbs[path.replace(/meta\.json$/, "thumb.svg")]
101
- })).sort((a, b) => orderOf(a.name) - orderOf(b.name) || a.name.localeCompare(b.name));
102
- /**
103
- * Server functions backing the dashboard. They run server-side (createServerFn
104
- * → RPC) and call the IN-PROCESS scheduler + store directly — the scheduler
105
- * lives in this same TanStack process (booted on first call via ensureServer).
106
- * The machine-facing endpoints (poll / agent-api / report) are sibling server
107
- * routes in this same process, so one process owns the single scheduler.
108
- *
109
- * Shared workspace (v1): no per-user filtering — every signed-in user sees all
110
- * loops/machines. `userId` is creator attribution only.
111
- */
112
- function backend() {
113
- return ensureServer();
114
- }
115
- /**
116
- * Resolve a loop and authorize the request against its owner. Returns the loop,
117
- * or undefined when it's missing OR (gate on) owned by a different user — callers
118
- * treat both as "not found" so existence never leaks across users.
119
- */
120
- async function ownedLoop(id) {
121
- const loop = await getLoop(id);
122
- if (!loop) return void 0;
123
- const scope = await requestScope();
124
- if (!await canAccessLoop(loop.teamId, scope)) return void 0;
125
- return {
126
- loop,
127
- enforce: scope.enforce,
128
- teamId: scope.teamId
129
- };
130
- }
131
- /** Whether the auth gate is active (a GitHub OAuth app is configured). */
132
- var getAuthState_createServerFn_handler = createServerRpc({
133
- id: "b8119d5fe6ca1ed9f609702aa2133b5ac5337030c0bdcf92dc7eba889d6bd2e6",
134
- name: "getAuthState",
135
- filename: "src/server/loopApi.ts"
136
- }, (opts) => getAuthState.__executeServer(opts));
137
- var getAuthState = createServerFn({ method: "GET" }).handler(getAuthState_createServerFn_handler, async () => {
138
- const { authEnabled } = await import("./auth-30Z4lV1w.mjs");
139
- return { enabled: authEnabled };
140
- });
141
- var getConfig_createServerFn_handler = createServerRpc({
142
- id: "cbb6a1b09b309459bbba3dc3851ae85fc468658b3cda77e22b6c6f3e28b65af4",
143
- name: "getConfig",
144
- filename: "src/server/loopApi.ts"
145
- }, (opts) => getConfig.__executeServer(opts));
146
- var getConfig = createServerFn({ method: "GET" }).handler(getConfig_createServerFn_handler, () => {
147
- const custom = process.env.PIEVO_CLI?.trim();
148
- return {
149
- pievoCli: custom || "pievo",
150
- /** True when a non-default (dev) CLI is configured — the New-loop paste then
151
- * carries an explicit `pievo-cli:` line so Claude Code uses it verbatim. */
152
- customCli: !!custom
153
- };
154
- });
155
- var listMyTeams_createServerFn_handler = createServerRpc({
156
- id: "0fe12e769203c42f432a927b9cbf13a967a0f9db567b61843598f734afb4f5c6",
157
- name: "listMyTeams",
158
- filename: "src/server/loopApi.ts"
159
- }, (opts) => listMyTeams.__executeServer(opts));
160
- var listMyTeams = createServerFn({ method: "GET" }).validator((teamId) => teamId).handler(listMyTeams_createServerFn_handler, async ({ data: teamId }) => {
161
- await backend();
162
- const { enforce, userId, teamId: active } = await requestScope(teamId);
163
- if (!enforce || !userId) return {
164
- teams: [],
165
- activeTeamId: active
166
- };
167
- return {
168
- teams: (await listTeamsForUser(userId)).map((t) => ({
169
- id: t.id,
170
- name: t.name
171
- })),
172
- activeTeamId: active
173
- };
174
- });
175
- var canViewTeam_createServerFn_handler = createServerRpc({
176
- id: "7cc22b3a0f6b1c4c73463c3401e981ad42caf6487b479b738ee5aeacb11710da",
177
- name: "canViewTeam",
178
- filename: "src/server/loopApi.ts"
179
- }, (opts) => canViewTeam.__executeServer(opts));
180
- var canViewTeam = createServerFn({ method: "GET" }).validator((teamId) => teamId).handler(canViewTeam_createServerFn_handler, async ({ data: teamId }) => {
181
- await backend();
182
- const scope = await requestScope(teamId);
183
- if (!scope.enforce) return true;
184
- if (!scope.userId) return false;
185
- return scope.teamId === teamId;
186
- });
187
- var getDefaultTeam_createServerFn_handler = createServerRpc({
188
- id: "dc0ec955d0d53a150a3e9a4673f98f3509cfb4bd411c512079ae4e94c561b70c",
189
- name: "getDefaultTeam",
190
- filename: "src/server/loopApi.ts"
191
- }, (opts) => getDefaultTeam.__executeServer(opts));
192
- var getDefaultTeam = createServerFn({ method: "GET" }).handler(getDefaultTeam_createServerFn_handler, async () => {
193
- await backend();
194
- return (await requestScope()).teamId;
195
- });
196
- var listJobs_createServerFn_handler = createServerRpc({
197
- id: "5a11dda4e2d3b0b097890c35ad7d447ff7245721b2ddc7f08787402446ef0919",
198
- name: "listJobs",
199
- filename: "src/server/loopApi.ts"
200
- }, (opts) => listJobs.__executeServer(opts));
201
- var listJobs = createServerFn({ method: "GET" }).validator((teamId) => teamId).handler(listJobs_createServerFn_handler, async ({ data: teamId }) => {
202
- await backend();
203
- const { enforce, userId, teamId: active } = await requestScope(teamId);
204
- if (enforce && !userId) return [];
205
- const loops = (await listLoops(enforce ? active : void 0)).sort((a, b) => a.createdAt < b.createdAt ? 1 : -1);
206
- return await Promise.all(loops.map(toJobSummary));
207
- });
208
- var getJobDetail_createServerFn_handler = createServerRpc({
209
- id: "0411aadd2c067b141180921284fb90f371fdeaf031baae51ae289b596e909da8",
210
- name: "getJobDetail",
211
- filename: "src/server/loopApi.ts"
212
- }, (opts) => getJobDetail.__executeServer(opts));
213
- var getJobDetail = createServerFn({ method: "GET" }).validator((id) => id).handler(getJobDetail_createServerFn_handler, async ({ data: id }) => {
214
- await backend();
215
- const owned = await ownedLoop(id);
216
- if (!owned) throw new Error("This loop does not exist, or you do not have access to it.");
217
- const detail = await toJobDetail(owned.loop);
218
- if (owned.enforce && owned.loop.teamId) {
219
- const team = await getTeam(owned.loop.teamId);
220
- detail.team = {
221
- id: owned.loop.teamId,
222
- name: team?.name ?? "Unknown team",
223
- isActive: owned.loop.teamId === owned.teamId
224
- };
225
- }
226
- return detail;
227
- });
228
- var loadOlderRuns_createServerFn_handler = createServerRpc({
229
- id: "85fdf73d4fee43aed762f93c5d47d33200fbff39e2d082647dc921f610d32698",
230
- name: "loadOlderRuns",
231
- filename: "src/server/loopApi.ts"
232
- }, (opts) => loadOlderRuns.__executeServer(opts));
233
- var loadOlderRuns = createServerFn({ method: "GET" }).validator((d) => d).handler(loadOlderRuns_createServerFn_handler, async ({ data }) => {
234
- await backend();
235
- if (!await ownedLoop(data.loopId)) return [];
236
- const limit = Math.min(Math.max(data.limit ?? 16, 1), 100);
237
- return toRunSummaries(data.loopId, await listRunsBefore(data.loopId, data.beforeTs, limit));
238
- });
239
- var getChartRuns_createServerFn_handler = createServerRpc({
240
- id: "bdf2cf0a884a9dccf99323b84675f048164a726f8347a2b6578a4ed1a350712e",
241
- name: "getChartRuns",
242
- filename: "src/server/loopApi.ts"
243
- }, (opts) => getChartRuns.__executeServer(opts));
244
- var getChartRuns = createServerFn({ method: "GET" }).validator((d) => d).handler(getChartRuns_createServerFn_handler, async ({ data }) => {
245
- await backend();
246
- if (!await ownedLoop(data.loopId)) return [];
247
- return listChartRuns(data.loopId, 100);
248
- });
249
- var getArtifacts_createServerFn_handler = createServerRpc({
250
- id: "b18bbec3d06dfc77714e1e527dfb9172fd7575a64a6c0d6e73ba6dc658dccf0d",
251
- name: "getArtifacts",
252
- filename: "src/server/loopApi.ts"
253
- }, (opts) => getArtifacts.__executeServer(opts));
254
- var getArtifacts = createServerFn({ method: "GET" }).validator((d) => d).handler(getArtifacts_createServerFn_handler, async ({ data }) => {
255
- await backend();
256
- if (!await ownedLoop(data.loopId)) return [];
257
- const { listLoopArtifacts } = await import("./artifactFiles-BCaIIrrT.mjs");
258
- return listLoopArtifacts(data.loopId);
259
- });
260
- var getArtifact_createServerFn_handler = createServerRpc({
261
- id: "ed10d5fe79208e5e0e4e18e4a17b18d7f7db4dd16204c00c3ac90c4644668841",
262
- name: "getArtifact",
263
- filename: "src/server/loopApi.ts"
264
- }, (opts) => getArtifact.__executeServer(opts));
265
- var getArtifact = createServerFn({ method: "GET" }).validator((d) => d).handler(getArtifact_createServerFn_handler, async ({ data }) => {
266
- await backend();
267
- if (!await ownedLoop(data.loopId)) return { error: "file not found" };
268
- const { readLoopArtifact } = await import("./artifactFiles-BCaIIrrT.mjs");
269
- return readLoopArtifact(data.loopId, data.path);
270
- });
271
- var getRunDiff_createServerFn_handler = createServerRpc({
272
- id: "08c28b892712a1b491b120b74c7dcb81761988d31ccea60216d1807b73c1182c",
273
- name: "getRunDiff",
274
- filename: "src/server/loopApi.ts"
275
- }, (opts) => getRunDiff.__executeServer(opts));
276
- var getRunDiff = createServerFn({ method: "GET" }).validator((d) => d).handler(getRunDiff_createServerFn_handler, async ({ data }) => {
277
- await backend();
278
- const run = await getRun(data.runId);
279
- if (!run) return {
280
- hasSnapshot: false,
281
- files: []
282
- };
283
- if (!await ownedLoop(run.loopId)) return {
284
- hasSnapshot: false,
285
- files: []
286
- };
287
- const { computeRunDiff } = await import("./runDiff--qLtU4FI.mjs");
288
- return computeRunDiff(data.runId);
289
- });
290
- var listTemplates_createServerFn_handler = createServerRpc({
291
- id: "3155d050a38c0e160018b462404acd048bfbed9e15166920b4bba09ed72ba817",
292
- name: "listTemplates",
293
- filename: "src/server/loopApi.ts"
294
- }, (opts) => listTemplates.__executeServer(opts));
295
- var listTemplates = createServerFn({ method: "GET" }).handler(listTemplates_createServerFn_handler, () => {
296
- return TEMPLATES;
297
- });
298
- var patchJob_createServerFn_handler = createServerRpc({
299
- id: "606503961026f5ed240adadfdee20ac0af65ac9dbb67209257ff1fdb9c642324",
300
- name: "patchJob",
301
- filename: "src/server/loopApi.ts"
302
- }, (opts) => patchJob.__executeServer(opts));
303
- var patchJob = createServerFn({ method: "POST" }).validator((d) => d).handler(patchJob_createServerFn_handler, async ({ data }) => {
304
- const { scheduler } = await backend();
305
- const owned = await ownedLoop(data.id);
306
- if (!owned) return { error: "not found" };
307
- const { enforce } = owned;
308
- const p = data.patch;
309
- if (p.scheduleMode !== void 0 && p.scheduleMode !== "cron" && p.scheduleMode !== "continuous") return { error: "scheduleMode must be cron|continuous" };
310
- if (p.continuousDelayMinutes !== void 0 && (!Number.isInteger(p.continuousDelayMinutes) || p.continuousDelayMinutes < 1)) return { error: "continuousDelayMinutes must be an integer >= 1" };
311
- if (p.channelId && enforce && (await getChannel(p.channelId))?.teamId !== owned.loop.teamId) return { error: "channel not found" };
312
- const agent = coerceCodingAgent(p.agent);
313
- let metricSchema;
314
- if (p.metricSchema !== void 0) if (p.metricSchema === null) metricSchema = null;
315
- else {
316
- const validated = await validateSchema(data.id, p.metricSchema);
317
- if (!validated.ok) return { error: validated.detail };
318
- metricSchema = validated.value;
319
- }
320
- const loop = await updateLoop(data.id, {
321
- ...p.name !== void 0 ? { name: p.name.trim() || null } : {},
322
- ...p.cron !== void 0 ? { cron: p.cron } : {},
323
- ...p.scheduleMode !== void 0 ? { scheduleMode: p.scheduleMode } : {},
324
- ...p.continuousDelayMinutes !== void 0 ? { continuousDelayMinutes: p.continuousDelayMinutes } : {},
325
- ...p.notify !== void 0 ? { notify: p.notify } : {},
326
- ...p.channelId !== void 0 ? { channelId: p.channelId || null } : {},
327
- ...p.enabled !== void 0 ? { enabled: !!p.enabled } : {},
328
- ...agent ? { agent } : {},
329
- ...p.goal !== void 0 ? { goal: p.goal?.trim() || null } : {},
330
- ...p.taskFile !== void 0 ? { taskFile: p.taskFile.trim() || null } : {},
331
- ...p.metricSchema !== void 0 ? { metricSchema: metricSchema ?? null } : {},
332
- ...p.ui !== void 0 ? { ui: coerceUi(p.ui) ?? null } : {},
333
- ...p.exec?.workdir !== void 0 ? { workdir: p.exec.workdir.trim() || null } : {},
334
- ...p.exec?.model !== void 0 ? { model: normalizeProviderSetting(p.exec.model) } : {},
335
- ...p.exec?.reasoningEffort !== void 0 ? { reasoningEffort: normalizeProviderSetting(p.exec.reasoningEffort) } : {},
336
- ...p.exec?.allowControl !== void 0 ? { allowControl: !!p.exec.allowControl } : {}
337
- });
338
- if (!loop) return { error: "not found" };
339
- if (loop.enabled) scheduler.addLoop(loop);
340
- else scheduler.removeLoop(loop.id);
341
- return { ok: true };
342
- });
343
- var pauseJob_createServerFn_handler = createServerRpc({
344
- id: "4c664fb177d6aae868b6baeab69348cff67d74d905cc6cf779c43cb37139b0aa",
345
- name: "pauseJob",
346
- filename: "src/server/loopApi.ts"
347
- }, (opts) => pauseJob.__executeServer(opts));
348
- var pauseJob = createServerFn({ method: "POST" }).validator((id) => id).handler(pauseJob_createServerFn_handler, async ({ data: id }) => {
349
- const { scheduler } = await backend();
350
- if (!await ownedLoop(id)) return { error: "not found" };
351
- if (!await pauseLoop(id)) return { error: "not found" };
352
- scheduler.removeLoop(id);
353
- return { ok: true };
354
- });
355
- var startJob_createServerFn_handler = createServerRpc({
356
- id: "7732cf412e02d47d9ac3933f09510503ea08428df967d44267ba47bea10d4cc4",
357
- name: "startJob",
358
- filename: "src/server/loopApi.ts"
359
- }, (opts) => startJob.__executeServer(opts));
360
- var startJob = createServerFn({ method: "POST" }).validator((id) => id).handler(startJob_createServerFn_handler, async ({ data: id }) => {
361
- const { scheduler } = await backend();
362
- const owned = await ownedLoop(id);
363
- if (!owned) return { error: "not found" };
364
- if (owned.loop.deleteRequestedAt) return { error: "loop is being deleted" };
365
- const loop = await startLoop(id);
366
- if (!loop) return { error: "not found" };
367
- scheduler.addLoop(loop);
368
- return { ok: true };
369
- });
370
- var stopJob_createServerFn_handler = createServerRpc({
371
- id: "934749369c5760593935c24bfa6f2041d3e82ea02fb7a13dfa7fd32940ac395d",
372
- name: "stopJob",
373
- filename: "src/server/loopApi.ts"
374
- }, (opts) => stopJob.__executeServer(opts));
375
- var stopJob = createServerFn({ method: "POST" }).validator((id) => id).handler(stopJob_createServerFn_handler, async ({ data: id }) => {
376
- const { scheduler } = await backend();
377
- const owned = await ownedLoop(id);
378
- if (!owned) return { error: "not found" };
379
- if (await hasRunningRun(id)) {
380
- if ((await getMachine(owned.loop.machineId))?.daemonProtocol !== 3) return { error: "Daemon upgrade required to stop a running process" };
381
- }
382
- const stopped = await stopLoop(id);
383
- if (!stopped) return { error: "not found" };
384
- scheduler.removeLoop(id);
385
- return {
386
- ok: true,
387
- waiting: !!stopped.running
388
- };
389
- });
390
- var deleteJob_createServerFn_handler = createServerRpc({
391
- id: "c3ccf6ce71809a0cdaf481b15b5fdc5db3a453a508e5841a62034cb1915a7f92",
392
- name: "deleteJob",
393
- filename: "src/server/loopApi.ts"
394
- }, (opts) => deleteJob.__executeServer(opts));
395
- var deleteJob = createServerFn({ method: "POST" }).validator((id) => id).handler(deleteJob_createServerFn_handler, async ({ data: id }) => {
396
- const { scheduler } = await backend();
397
- const owned = await ownedLoop(id);
398
- if (!owned) return { error: "not found" };
399
- const machine = await getMachine(owned.loop.machineId);
400
- const unreachable = machinePresence(machine?.online, machine?.lastSeen) !== "online";
401
- const actor = await requestScope();
402
- const mayRetireAuthority = !owned.enforce || !!(actor.userId && owned.loop.teamId && (await getTeamMember(owned.loop.teamId, actor.userId))?.role === "owner");
403
- if (!unreachable && await hasRunningRun(id) && machine?.daemonProtocol !== 3) return { error: "Daemon upgrade required to stop a running process" };
404
- scheduler.removeLoop(id);
405
- if (!await requestDeleteLoop(id)) return { error: "not found" };
406
- if (unreachable && mayRetireAuthority) {
407
- if (!await forceDeleteLoop(id)) return { error: "delete failed; server data was not deleted" };
408
- const { logger } = await import("./logger-Gy-47z3k.mjs");
409
- logger.child({ mod: "loop-lifecycle" }).warn({
410
- action: "unreachable-delete",
411
- loopId: id,
412
- actorUserId: actor.userId,
413
- machineId: owned.loop.machineId
414
- }, "unreachable-machine delete: retired execution authority and removed server data");
415
- return {
416
- ok: true,
417
- deleted: true
418
- };
419
- }
420
- const deleted = await tryDeleteLoop(id);
421
- return {
422
- ok: true,
423
- deleted,
424
- waiting: !deleted
425
- };
426
- });
427
- var FORCE_DELETE_CONFIRMATION = "delete-server-data-anyway";
428
- /** Destructive uncertainty escape hatch. Team owners only; the explicit marker
429
- * is the server-side half of the Dashboard's second confirmation. */
430
- var forceDeleteJob_createServerFn_handler = createServerRpc({
431
- id: "0cb2218861830aae4338b814b3819e15100942beab970bc4c188f88b8cb6bc7e",
432
- name: "forceDeleteJob",
433
- filename: "src/server/loopApi.ts"
434
- }, (opts) => forceDeleteJob.__executeServer(opts));
435
- var forceDeleteJob = createServerFn({ method: "POST" }).validator((d) => d).handler(forceDeleteJob_createServerFn_handler, async ({ data }) => {
436
- const { scheduler } = await backend();
437
- const owned = await ownedLoop(data.id);
438
- if (!owned) return { error: "not found" };
439
- if (!owned.loop.deleteRequestedAt) return { error: "delete must be requested first" };
440
- if (data.confirmation !== FORCE_DELETE_CONFIRMATION) return { error: "force delete confirmation required" };
441
- if (owned.enforce) {
442
- if (!owned.loop.teamId) return { error: "only a team owner can force delete this loop" };
443
- const actor = (await requestScope()).userId;
444
- if (!actor || (await getTeamMember(owned.loop.teamId, actor))?.role !== "owner") return { error: "only a team owner can force delete this loop" };
445
- }
446
- scheduler.removeLoop(data.id);
447
- if (!await forceDeleteLoop(data.id)) return { error: "force delete failed; server data was not deleted" };
448
- const { logger } = await import("./logger-Gy-47z3k.mjs");
449
- logger.child({ mod: "loop-lifecycle" }).warn({
450
- action: "force-delete",
451
- loopId: data.id,
452
- actorUserId: (await requestScope()).userId,
453
- machineId: owned.loop.machineId
454
- }, "force-delete: destructive server authority removal");
455
- return {
456
- ok: true,
457
- deleted: true
458
- };
459
- });
460
- var runJob_createServerFn_handler = createServerRpc({
461
- id: "0c9031f2f6a9ac0b1c60075833169755ef1815324918d1426c966ac8db563798",
462
- name: "runJob",
463
- filename: "src/server/loopApi.ts"
464
- }, (opts) => runJob.__executeServer(opts));
465
- var runJob = createServerFn({ method: "POST" }).validator((id) => id).handler(runJob_createServerFn_handler, async ({ data: id }) => {
466
- const { scheduler } = await backend();
467
- if (!await ownedLoop(id)) return { error: "not found" };
468
- const queued = await scheduler.runNow(id);
469
- if (!("run" in queued)) return { error: queued.reason };
470
- return {
471
- ok: true,
472
- runId: queued.run.id,
473
- queued: true,
474
- coalesced: queued.state === "coalesced"
475
- };
476
- });
477
- var evolveJob_createServerFn_handler = createServerRpc({
478
- id: "8a11b8d76ad42203a4bf128db0b8e0f2d6c947300dbee7a51498418404f211cd",
479
- name: "evolveJob",
480
- filename: "src/server/loopApi.ts"
481
- }, (opts) => evolveJob.__executeServer(opts));
482
- var evolveJob = createServerFn({ method: "POST" }).validator((id) => id).handler(evolveJob_createServerFn_handler, async ({ data: id }) => {
483
- const { scheduler } = await backend();
484
- const owned = await ownedLoop(id);
485
- if (!owned) return { error: "not found" };
486
- if (!canEvolve(owned.loop)) return { error: "nothing to evolve" };
487
- const queued = await scheduler.evolveNow(id);
488
- if (!("run" in queued)) return { error: queued.reason };
489
- return {
490
- ok: true,
491
- runId: queued.run.id,
492
- queued: true,
493
- coalesced: queued.state === "coalesced"
494
- };
495
- });
496
- var requestSteer_createServerFn_handler = createServerRpc({
497
- id: "38b831a8de4883e3d877f2169eaebde5864a2f256b1c5c790fa669702968cff9",
498
- name: "requestSteer",
499
- filename: "src/server/loopApi.ts"
500
- }, (opts) => requestSteer.__executeServer(opts));
501
- var requestSteer = createServerFn({ method: "POST" }).validator((d) => d).handler(requestSteer_createServerFn_handler, async ({ data }) => {
502
- const { scheduler } = await backend();
503
- if (!await ownedLoop(data.id)) return { error: "not found" };
504
- const instruction = validateSteerInstruction(data.instruction);
505
- if (!instruction.ok) return { error: instruction.detail };
506
- const queued = await scheduler.requestSteer(data.id, instruction.value);
507
- if (!("run" in queued)) return { error: queued.reason };
508
- return {
509
- ok: true,
510
- runId: queued.run.id,
511
- queued: true,
512
- coalesced: queued.state === "coalesced"
513
- };
514
- });
515
- var stopRun_createServerFn_handler = createServerRpc({
516
- id: "6850ba403da9dec5aff45794eb52636ca540ddec2d9e59f5c75ccbb852bfeacb",
517
- name: "stopRun",
518
- filename: "src/server/loopApi.ts"
519
- }, (opts) => stopRun.__executeServer(opts));
520
- var stopRun = createServerFn({ method: "POST" }).validator((id) => id).handler(stopRun_createServerFn_handler, async ({ data: id }) => {
521
- await backend();
522
- const run = await getRun(id);
523
- const owned = run ? await ownedLoop(run.loopId) : void 0;
524
- if (!run || !owned) return { error: "run not found" };
525
- if (run.phase === "running" && (await getMachine(owned.loop.machineId))?.daemonProtocol !== 3) return { error: "Daemon upgrade required to stop a running process" };
526
- const result = await requestRunCancel(run.loopId, id);
527
- return result ? {
528
- ok: true,
529
- waiting: result.phase === "running"
530
- } : { error: "run not found" };
531
- });
532
- var mintClaim_createServerFn_handler = createServerRpc({
533
- id: "4646f52fb09b83c9c9cef34836f3c9d03416423c879d9e5ceffcafd9a71ecba6",
534
- name: "mintClaim",
535
- filename: "src/server/loopApi.ts"
536
- }, (opts) => mintClaim.__executeServer(opts));
537
- var mintClaim = createServerFn({ method: "POST" }).validator((teamId) => teamId).handler(mintClaim_createServerFn_handler, async ({ data: teamId }) => {
538
- await backend();
539
- const { mintDeviceToken, rememberConnectKey } = await import("./tokens-CbfoRC_s.mjs");
540
- const { userId, teamId: active } = await requestScope(teamId);
541
- const owner = userId ?? "shared";
542
- const token = mintDeviceToken();
543
- await rememberConnectKey(token, {
544
- userId: owner,
545
- teamId: active
546
- });
547
- return { token };
548
- });
549
- var claimStatus_createServerFn_handler = createServerRpc({
550
- id: "4b0db7d6c8f25383a3526598cb0c1881db6cf413e451e9478687c05666461347",
551
- name: "claimStatus",
552
- filename: "src/server/loopApi.ts"
553
- }, (opts) => claimStatus.__executeServer(opts));
554
- var claimStatus = createServerFn({ method: "GET" }).validator((token) => token).handler(claimStatus_createServerFn_handler, async ({ data: token }) => {
555
- const r = (await backend()).gateway.claimStatus(token);
556
- return r ? {
557
- done: true,
558
- id: r.loopId,
559
- name: r.name,
560
- agent: r.agent
561
- } : { done: false };
562
- });
563
- //#endregion
564
- export { canViewTeam_createServerFn_handler, claimStatus_createServerFn_handler, deleteJob_createServerFn_handler, evolveJob_createServerFn_handler, forceDeleteJob_createServerFn_handler, getArtifact_createServerFn_handler, getArtifacts_createServerFn_handler, getAuthState_createServerFn_handler, getChartRuns_createServerFn_handler, getConfig_createServerFn_handler, getDefaultTeam_createServerFn_handler, getJobDetail_createServerFn_handler, getRunDiff_createServerFn_handler, listJobs_createServerFn_handler, listMyTeams_createServerFn_handler, listTemplates_createServerFn_handler, loadOlderRuns_createServerFn_handler, mintClaim_createServerFn_handler, patchJob_createServerFn_handler, pauseJob_createServerFn_handler, requestSteer_createServerFn_handler, runJob_createServerFn_handler, startJob_createServerFn_handler, stopJob_createServerFn_handler, stopRun_createServerFn_handler };
@@ -1,30 +0,0 @@
1
- import { c as createFileRoute, s as lazyRouteComponent } from "../_libs/@tanstack/react-router+[...].mjs";
2
- import { c as getAuthState } from "./loopApi-8_KgBapr.mjs";
3
- import { a as authClient } from "./LoopPlaybook-DC7QVvPY.mjs";
4
- //#region node_modules/.nitro/vite/services/ssr/assets/loops._loopId-SON_t43g.js
5
- var $$splitComponentImporter = () => import("./loops._loopId-p1KWsvMM.mjs");
6
- /**
7
- * Loop detail PAGE — `/loops/$loopId`. The dedicated page that replaced the old
8
- * dashboard modal: a loop header + action toolbar, the unified Files panel (task
9
- * file alongside synced artifacts), and the runs timeline. The view owns its own
10
- * data + self-poll (ssr:false so the session cookie rides along with its fetches,
11
- * like the dashboard loader). Run rows link on to `/loops/$loopId/runs/$runId`.
12
- *
13
- * Auth-gated exactly like the dashboard (`/`): the loader checks getAuthState +
14
- * the session so a logged-out/expired DEEP LINK shows the sign-in CTA instead of
15
- * a raw `loop not found` error from the ownership-blocked data fetch.
16
- */
17
- var Route = createFileRoute("/loops/$loopId")({
18
- ssr: false,
19
- loader: async () => {
20
- const auth = await getAuthState();
21
- if (auth.enabled) {
22
- const { data: session } = await authClient.getSession();
23
- if (!session) return { auth };
24
- }
25
- return { auth };
26
- },
27
- component: lazyRouteComponent($$splitComponentImporter, "component")
28
- });
29
- //#endregion
30
- export { Route as t };