loopable-cli 0.2.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/_connectorId-CDCuSgpN.js +1 -0
  3. package/.output/public/assets/_loopId-DOnIsVTW.js +1 -0
  4. package/.output/public/assets/_taskId-BO5MZnlZ.js +1 -0
  5. package/.output/public/assets/agents-CBozi7oi.js +1 -0
  6. package/.output/public/assets/alert-Bn_wjgTX.js +1 -0
  7. package/.output/public/assets/button-K3ypIhAZ.js +1 -0
  8. package/.output/public/assets/card-DiVnaTIE.js +1 -0
  9. package/.output/public/assets/chevron-right-BrctLtFK.js +1 -0
  10. package/.output/public/assets/connection-status-DKWelvLO.js +1 -0
  11. package/.output/public/assets/connector-icon-CEbdE71G.js +1 -0
  12. package/.output/public/assets/connectors-JyX3IzJj.js +1 -0
  13. package/.output/public/assets/gaps-PjmcbaWo.js +1 -0
  14. package/.output/public/assets/inbox-CujRR0Cz.js +1 -0
  15. package/.output/public/assets/index-C9SQ_Baq.js +16 -0
  16. package/.output/public/assets/loop-form-Dw3cuTzw.js +1 -0
  17. package/.output/public/assets/loops-DcEfZa2_.js +1 -0
  18. package/.output/public/assets/manifests-yJpevyye.js +1 -0
  19. package/.output/public/assets/new-CwsnNuRW.js +1 -0
  20. package/.output/public/assets/page-bvnfRMum.js +1 -0
  21. package/.output/public/assets/play-yHLs4DjK.js +1 -0
  22. package/.output/public/assets/plus-Ber25lrU.js +1 -0
  23. package/.output/public/assets/preload-helper-BoU_7EQC.js +3 -0
  24. package/.output/public/assets/{refresh-cw-C3xBnKfy.js → refresh-cw-BzSY7M8I.js} +1 -1
  25. package/.output/public/assets/rotate-ccw-DLv9EfCX.js +1 -0
  26. package/.output/public/assets/runners-DzX-RU3i.js +2 -0
  27. package/.output/public/assets/select-C9grIFwG.js +1 -0
  28. package/.output/public/assets/setting-fields-DUc3npgh.js +3 -0
  29. package/.output/public/assets/styles-B9B98zLk.css +2 -0
  30. package/.output/public/assets/switch-DwABVI6d.js +1 -0
  31. package/.output/public/assets/task-list-Ddk8-qt7.js +1 -0
  32. package/.output/public/assets/textarea-Ds-gIYUQ.js +1 -0
  33. package/.output/public/assets/time-goBWd-5J.js +1 -0
  34. package/.output/public/assets/use-live-tasks-DZNNuECy.js +1 -0
  35. package/.output/public/assets/useCompositeListItem-P4Nmmn7j.js +1 -0
  36. package/.output/public/assets/usePositioner-B7i9Ejzh.js +1 -0
  37. package/.output/server/_chunks/ssr-renderer.mjs +1 -1
  38. package/.output/server/{_connectorId-C9yydJrC.mjs → _connectorId-COuQN02a.mjs} +198 -188
  39. package/.output/server/_libs/@base-ui/react+[...].mjs +1410 -804
  40. package/.output/server/_libs/@tanstack/react-router+[...].mjs +1 -1
  41. package/.output/server/_libs/lucide-react.mjs +93 -84
  42. package/.output/server/_libs/next-themes.mjs +1 -1
  43. package/.output/server/_libs/sonner.mjs +1 -1
  44. package/.output/server/_loopId-CZh6_Yhr.mjs +310 -0
  45. package/.output/server/_ssr/{agents-DG643yoJ.mjs → agents-B_qo1gpL.mjs} +195 -6
  46. package/.output/server/_ssr/{agents-C7B6RJ6-.mjs → agents-Bz10gz_m.mjs} +8 -8
  47. package/.output/server/_ssr/agents-CjbOUp3Z.mjs +206 -0
  48. package/.output/server/_ssr/{alert-DQvzE7bu.mjs → alert-C2WBWfzo.mjs} +2 -2
  49. package/.output/server/_ssr/card-r1cV-PCN.mjs +36 -0
  50. package/.output/server/_ssr/{client-BtVRVhQ2.mjs → client-Dk3SD8Il.mjs} +5 -1
  51. package/.output/server/_ssr/connection-status-BogAL-Fj.mjs +32 -0
  52. package/.output/server/_ssr/{connections-Df-aDpfJ.mjs → connections-Cqvb6Gw2.mjs} +372 -325
  53. package/.output/server/_ssr/connector-icon-DrhVbhs6.mjs +190 -0
  54. package/.output/server/_ssr/connectors-BfS5tQKr.mjs +81 -0
  55. package/.output/server/_ssr/{connectors-e0mf2pMs.mjs → connectors-DJI-rzPU.mjs} +10 -10
  56. package/.output/server/_ssr/{createServerRpc-DPDrnFdH.mjs → createServerRpc-DDrp2nLT.mjs} +2 -2
  57. package/.output/server/_ssr/{gaps-Cz76ZicM.mjs → gaps-CcvHiLcj.mjs} +15 -7
  58. package/.output/server/_ssr/inbox-D1ef761v.mjs +178 -0
  59. package/.output/server/_ssr/loop-form-DWwOR05R.mjs +346 -0
  60. package/.output/server/_ssr/{loops-D8WuK7Ke.mjs → loops-6WhUe_lc.mjs} +37 -27
  61. package/.output/server/_ssr/loops-DHPjzG-t.mjs +217 -0
  62. package/.output/server/_ssr/new-ChKBdcXJ.mjs +245 -0
  63. package/.output/server/_ssr/page-DZVxKvdn.mjs +120 -0
  64. package/.output/server/_ssr/{router-54IDWTVz.mjs → router-DdwREiOf.mjs} +162 -489
  65. package/.output/server/_ssr/runners-CK9Cx9fS.mjs +217 -0
  66. package/.output/server/_ssr/runners-CrznFPHt.mjs +140 -0
  67. package/.output/server/_ssr/{runners-Cj6z9Mqh.mjs → runners-W-pgo5yo.mjs} +5 -5
  68. package/.output/server/_ssr/{secrets-CRnpwGBh.mjs → secrets-CV5scFlt.mjs} +2 -2
  69. package/.output/server/_ssr/select-BtndHhHb.mjs +76 -0
  70. package/.output/server/_ssr/{setting-fields-DzBlslan.mjs → setting-fields-LNgywAW7.mjs} +25 -20
  71. package/.output/server/_ssr/ssr.mjs +43 -42
  72. package/.output/server/_ssr/{start-Vq3Oan3v.mjs → start-C_j-e4vF.mjs} +9 -4
  73. package/.output/server/_ssr/{switch-1pnd_bPJ.mjs → switch-odxNO_S4.mjs} +3 -3
  74. package/.output/server/_ssr/task-list-Dnmq_WeE.mjs +150 -0
  75. package/.output/server/_ssr/{tasks-Qtml5TlK.mjs → tasks-D-kXLgVP.mjs} +13 -13
  76. package/.output/server/_ssr/{tasks-BDqznm57.mjs → tasks-D7aUvA33.mjs} +44 -17
  77. package/.output/server/_ssr/{textarea-CHJTKtsJ.mjs → textarea-D2c_vTIC.mjs} +2 -2
  78. package/.output/server/_ssr/time-Cy8TZP0Z.mjs +13 -0
  79. package/.output/server/_ssr/use-live-tasks-BzhTkEOL.mjs +40 -0
  80. package/.output/server/_tanstack-start-manifest_v-2HUdn-2E.mjs +166 -0
  81. package/.output/server/_taskId-D3KkNJW1.mjs +263 -0
  82. package/.output/server/index.mjs +199 -164
  83. package/README.md +36 -6
  84. package/dist/cli.mjs +161 -8
  85. package/dist/dispatcher.mjs +671 -285
  86. package/dist/runner.mjs +333 -46
  87. package/drizzle/0025_prompt_tasks_done.sql +2 -0
  88. package/drizzle/0026_guidance_into_prompt.sql +3 -0
  89. package/drizzle/0027_relative_folders.sql +5 -0
  90. package/drizzle/0028_runner_version.sql +5 -0
  91. package/drizzle/meta/_journal.json +29 -1
  92. package/package.json +4 -2
  93. package/.output/public/assets/_connectorId-CkygNLny.js +0 -1
  94. package/.output/public/assets/_loopId-Cshlc5Ja.js +0 -1
  95. package/.output/public/assets/_taskId-BKDIJ_Fg.js +0 -1
  96. package/.output/public/assets/alert-BT2EVMJP.js +0 -1
  97. package/.output/public/assets/arrow-left-CWUZt6k2.js +0 -1
  98. package/.output/public/assets/arrow-right-dy_oOg_c.js +0 -1
  99. package/.output/public/assets/connection-status-DCqqmY_6.js +0 -1
  100. package/.output/public/assets/connector-icon-BUoK6Cru.js +0 -1
  101. package/.output/public/assets/connectors-CeLBtEtg.js +0 -1
  102. package/.output/public/assets/external-link-DC11orFA.js +0 -1
  103. package/.output/public/assets/gaps-BtFoD7mF.js +0 -1
  104. package/.output/public/assets/inbox-BYNjkNDJ.js +0 -1
  105. package/.output/public/assets/index-0yP3Jn_G.js +0 -18
  106. package/.output/public/assets/loader-B4Epchm_.js +0 -1
  107. package/.output/public/assets/loop-form-DnSJNc1k.js +0 -1
  108. package/.output/public/assets/loops-1CvbqO6m.js +0 -1
  109. package/.output/public/assets/new-m5NlqYQT.js +0 -1
  110. package/.output/public/assets/play-DD4xQgvi.js +0 -1
  111. package/.output/public/assets/preload-helper-CfdAYKD7.js +0 -3
  112. package/.output/public/assets/rolldown-runtime-CbXtAM7H.js +0 -1
  113. package/.output/public/assets/runners-D8QVl-Y6.js +0 -1
  114. package/.output/public/assets/select-Cppu-hti.js +0 -1
  115. package/.output/public/assets/setting-fields-bJ_gTG7Q.js +0 -3
  116. package/.output/public/assets/styles-ClTGaXU0.css +0 -2
  117. package/.output/public/assets/switch-hRIbNGOj.js +0 -1
  118. package/.output/public/assets/task-list-BAxjcVgr.js +0 -1
  119. package/.output/public/assets/textarea-Fyuzi6Vp.js +0 -1
  120. package/.output/public/assets/trash-2-BXZzBsoV.js +0 -1
  121. package/.output/public/assets/useValueChanged-VVyq4hb9.js +0 -1
  122. package/.output/server/_loopId-B0VG-eBC.mjs +0 -301
  123. package/.output/server/_ssr/connection-status-BZr3Y-IC.mjs +0 -31
  124. package/.output/server/_ssr/connector-icon-WvxwZ5TF.mjs +0 -56
  125. package/.output/server/_ssr/connectors-BU0IiRge.mjs +0 -107
  126. package/.output/server/_ssr/inbox-CAUBa1I3.mjs +0 -114
  127. package/.output/server/_ssr/loop-form-FqSaXiHl.mjs +0 -413
  128. package/.output/server/_ssr/loops-Dqoebe8q.mjs +0 -222
  129. package/.output/server/_ssr/new-bBsVaWD6.mjs +0 -169
  130. package/.output/server/_ssr/runners-D2UAdLyj.mjs +0 -106
  131. package/.output/server/_ssr/runners-DGWaVvWi.mjs +0 -116
  132. package/.output/server/_ssr/task-list-_qgBS9LU.mjs +0 -187
  133. package/.output/server/_tanstack-start-manifest_v-CvheE7ZF.mjs +0 -131
  134. package/.output/server/_taskId-V4QLBO2N.mjs +0 -256
@@ -1,5 +1,5 @@
1
1
  import { i as __toESM, r as __require, t as __commonJSMin } from "../../_runtime.mjs";
2
- import { H as require_with_selector, U as require_jsx_runtime, V as require_react_dom, W as require_react } from "../@base-ui/react+[...].mjs";
2
+ import { G as require_with_selector, K as require_jsx_runtime, W as require_react_dom, q as require_react } from "../@base-ui/react+[...].mjs";
3
3
  import { n as parseHref } from "../tanstack__history.mjs";
4
4
  import { PassThrough, Readable } from "node:stream";
5
5
  import { ReadableStream as ReadableStream$1 } from "node:stream/web";
@@ -1,5 +1,5 @@
1
1
  import { i as __toESM } from "../_runtime.mjs";
2
- import { W as require_react } from "./@base-ui/react+[...].mjs";
2
+ import { q as require_react } from "./@base-ui/react+[...].mjs";
3
3
  //#region node_modules/.pnpm/lucide-react@1.39.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.mjs
4
4
  var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
5
5
  /**
@@ -142,32 +142,6 @@ var ArrowDown = createLucideIcon("arrow-down", [["path", {
142
142
  * This source code is licensed under the ISC license.
143
143
  * See the LICENSE file in the root directory of this source tree.
144
144
  */
145
- var ArrowLeft = createLucideIcon("arrow-left", [["path", {
146
- d: "m12 19-7-7 7-7",
147
- key: "1l729n"
148
- }], ["path", {
149
- d: "M19 12H5",
150
- key: "x3x0zl"
151
- }]]);
152
- /**
153
- * @license lucide-react v1.39.0 - ISC
154
- *
155
- * This source code is licensed under the ISC license.
156
- * See the LICENSE file in the root directory of this source tree.
157
- */
158
- var ArrowRight = createLucideIcon("arrow-right", [["path", {
159
- d: "M5 12h14",
160
- key: "1ays0h"
161
- }], ["path", {
162
- d: "m12 5 7 7-7 7",
163
- key: "xquz4c"
164
- }]]);
165
- /**
166
- * @license lucide-react v1.39.0 - ISC
167
- *
168
- * This source code is licensed under the ISC license.
169
- * See the LICENSE file in the root directory of this source tree.
170
- */
171
145
  var ArrowUp = createLucideIcon("arrow-up", [["path", {
172
146
  d: "m5 12 7-7 7 7",
173
147
  key: "hav0vg"
@@ -181,19 +155,6 @@ var ArrowUp = createLucideIcon("arrow-up", [["path", {
181
155
  * This source code is licensed under the ISC license.
182
156
  * See the LICENSE file in the root directory of this source tree.
183
157
  */
184
- var Bell = createLucideIcon("bell", [["path", {
185
- d: "M10.268 21a2 2 0 0 0 3.464 0",
186
- key: "vwvbt9"
187
- }], ["path", {
188
- d: "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",
189
- key: "11g9vi"
190
- }]]);
191
- /**
192
- * @license lucide-react v1.39.0 - ISC
193
- *
194
- * This source code is licensed under the ISC license.
195
- * See the LICENSE file in the root directory of this source tree.
196
- */
197
158
  var Bot = createLucideIcon("bot", [
198
159
  ["path", {
199
160
  d: "M12 8V4H8",
@@ -250,6 +211,26 @@ var ChevronDown = createLucideIcon("chevron-down", [["path", {
250
211
  * This source code is licensed under the ISC license.
251
212
  * See the LICENSE file in the root directory of this source tree.
252
213
  */
214
+ var ChevronLeft = createLucideIcon("chevron-left", [["path", {
215
+ d: "m15 18-6-6 6-6",
216
+ key: "1wnfg3"
217
+ }]]);
218
+ /**
219
+ * @license lucide-react v1.39.0 - ISC
220
+ *
221
+ * This source code is licensed under the ISC license.
222
+ * See the LICENSE file in the root directory of this source tree.
223
+ */
224
+ var ChevronRight = createLucideIcon("chevron-right", [["path", {
225
+ d: "m9 18 6-6-6-6",
226
+ key: "mthhwq"
227
+ }]]);
228
+ /**
229
+ * @license lucide-react v1.39.0 - ISC
230
+ *
231
+ * This source code is licensed under the ISC license.
232
+ * See the LICENSE file in the root directory of this source tree.
233
+ */
253
234
  var ChevronUp = createLucideIcon("chevron-up", [["path", {
254
235
  d: "m18 15-6-6-6 6",
255
236
  key: "153udz"
@@ -435,6 +416,50 @@ var Clock = createLucideIcon("clock", [["circle", {
435
416
  * This source code is licensed under the ISC license.
436
417
  * See the LICENSE file in the root directory of this source tree.
437
418
  */
419
+ var Copy = createLucideIcon("copy", [["rect", {
420
+ width: "14",
421
+ height: "14",
422
+ x: "8",
423
+ y: "8",
424
+ rx: "2",
425
+ ry: "2",
426
+ key: "17jyea"
427
+ }], ["path", {
428
+ d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
429
+ key: "zix9uf"
430
+ }]]);
431
+ /**
432
+ * @license lucide-react v1.39.0 - ISC
433
+ *
434
+ * This source code is licensed under the ISC license.
435
+ * See the LICENSE file in the root directory of this source tree.
436
+ */
437
+ var Ellipsis = createLucideIcon("ellipsis", [
438
+ ["circle", {
439
+ cx: "12",
440
+ cy: "12",
441
+ r: "1",
442
+ key: "41hilf"
443
+ }],
444
+ ["circle", {
445
+ cx: "19",
446
+ cy: "12",
447
+ r: "1",
448
+ key: "1wjl8i"
449
+ }],
450
+ ["circle", {
451
+ cx: "5",
452
+ cy: "12",
453
+ r: "1",
454
+ key: "1pcz8c"
455
+ }]
456
+ ]);
457
+ /**
458
+ * @license lucide-react v1.39.0 - ISC
459
+ *
460
+ * This source code is licensed under the ISC license.
461
+ * See the LICENSE file in the root directory of this source tree.
462
+ */
438
463
  var ExternalLink = createLucideIcon("external-link", [
439
464
  ["path", {
440
465
  d: "M15 3h6v6",
@@ -455,21 +480,6 @@ var ExternalLink = createLucideIcon("external-link", [
455
480
  * This source code is licensed under the ISC license.
456
481
  * See the LICENSE file in the root directory of this source tree.
457
482
  */
458
- var Eye = createLucideIcon("eye", [["path", {
459
- d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",
460
- key: "1nclc0"
461
- }], ["circle", {
462
- cx: "12",
463
- cy: "12",
464
- r: "3",
465
- key: "1v7zrd"
466
- }]]);
467
- /**
468
- * @license lucide-react v1.39.0 - ISC
469
- *
470
- * This source code is licensed under the ISC license.
471
- * See the LICENSE file in the root directory of this source tree.
472
- */
473
483
  var FileCode = createLucideIcon("file-code", [
474
484
  ["path", {
475
485
  d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
@@ -607,26 +617,18 @@ var Loader = createLucideIcon("loader", [
607
617
  * This source code is licensed under the ISC license.
608
618
  * See the LICENSE file in the root directory of this source tree.
609
619
  */
610
- var MousePointerClick = createLucideIcon("mouse-pointer-click", [
620
+ var MessageSquarePlus = createLucideIcon("message-square-plus", [
611
621
  ["path", {
612
- d: "M14 4.1 12 6",
613
- key: "ita8i4"
622
+ d: "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",
623
+ key: "18887p"
614
624
  }],
615
625
  ["path", {
616
- d: "m5.1 8-2.9-.8",
617
- key: "1go3kf"
626
+ d: "M12 8v6",
627
+ key: "1ib9pf"
618
628
  }],
619
629
  ["path", {
620
- d: "m6 12-1.9 2",
621
- key: "mnht97"
622
- }],
623
- ["path", {
624
- d: "M7.2 2.2 8 5.1",
625
- key: "1cfko1"
626
- }],
627
- ["path", {
628
- d: "M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",
629
- key: "s0h3yz"
630
+ d: "M9 11h6",
631
+ key: "1fldmi"
630
632
  }]
631
633
  ]);
632
634
  /**
@@ -672,6 +674,26 @@ var PanelLeft = createLucideIcon("panel-left", [["rect", {
672
674
  * This source code is licensed under the ISC license.
673
675
  * See the LICENSE file in the root directory of this source tree.
674
676
  */
677
+ var PencilLine = createLucideIcon("pencil-line", [
678
+ ["path", {
679
+ d: "M13 21h8",
680
+ key: "1jsn5i"
681
+ }],
682
+ ["path", {
683
+ d: "m15 5 4 4",
684
+ key: "1mk7zo"
685
+ }],
686
+ ["path", {
687
+ d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",
688
+ key: "1a8usu"
689
+ }]
690
+ ]);
691
+ /**
692
+ * @license lucide-react v1.39.0 - ISC
693
+ *
694
+ * This source code is licensed under the ISC license.
695
+ * See the LICENSE file in the root directory of this source tree.
696
+ */
675
697
  var Play = createLucideIcon("play", [["path", {
676
698
  d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",
677
699
  key: "10ikf1"
@@ -811,19 +833,6 @@ var Settings = createLucideIcon("settings", [["path", {
811
833
  * This source code is licensed under the ISC license.
812
834
  * See the LICENSE file in the root directory of this source tree.
813
835
  */
814
- var Terminal = createLucideIcon("terminal", [["path", {
815
- d: "M12 19h8",
816
- key: "baeox8"
817
- }], ["path", {
818
- d: "m4 17 6-6-6-6",
819
- key: "1yngyt"
820
- }]]);
821
- /**
822
- * @license lucide-react v1.39.0 - ISC
823
- *
824
- * This source code is licensed under the ISC license.
825
- * See the LICENSE file in the root directory of this source tree.
826
- */
827
836
  var Trash2 = createLucideIcon("trash-2", [
828
837
  ["path", {
829
838
  d: "M10 11v6",
@@ -908,4 +917,4 @@ var X = createLucideIcon("x", [["path", {
908
917
  key: "d8bk6v"
909
918
  }]]);
910
919
  //#endregion
911
- export { CircleMinus as A, ArrowLeft as B, ExternalLink as C, CircleSlash as D, CircleStop as E, Check as F, Bot as I, Bell as L, CircleAlert as M, ChevronUp as N, CirclePlay as O, ChevronDown as P, ArrowUp as R, Eye as S, CircleX as T, ArrowDown as V, LoaderCircle as _, Terminal as a, FileText as b, RotateCcw as c, Plug as d, Play as f, Loader as g, MousePointerClick as h, Trash2 as i, CircleCheck as j, CirclePause as k, RefreshCw as l, OctagonX as m, Workflow as n, Settings as o, PanelLeft as p, TriangleAlert as r, Server as s, X as t, Plus as u, Info as v, Clock as w, FileCode as x, Inbox as y, ArrowRight as z };
920
+ export { CirclePause as A, ArrowUp as B, Ellipsis as C, CircleStop as D, CircleX as E, ChevronRight as F, ChevronLeft as I, ChevronDown as L, CircleCheck as M, CircleAlert as N, CircleSlash as O, ChevronUp as P, Check as R, ExternalLink as S, Clock as T, ArrowDown as V, LoaderCircle as _, Settings as a, FileText as b, RefreshCw as c, Play as d, PencilLine as f, Loader as g, MessageSquarePlus as h, Trash2 as i, CircleMinus as j, CirclePlay as k, Plus as l, OctagonX as m, Workflow as n, Server as o, PanelLeft as p, TriangleAlert as r, RotateCcw as s, X as t, Plug as u, Info as v, Copy as w, FileCode as x, Inbox as y, Bot as z };
@@ -1,5 +1,5 @@
1
1
  import { i as __toESM } from "../_runtime.mjs";
2
- import { W as require_react } from "./@base-ui/react+[...].mjs";
2
+ import { q as require_react } from "./@base-ui/react+[...].mjs";
3
3
  //#region node_modules/.pnpm/next-themes@0.4.6_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next-themes/dist/index.mjs
4
4
  var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
5
5
  var M = (e, i, s, u, m, a, l, h) => {
@@ -1,5 +1,5 @@
1
1
  import { i as __toESM } from "../_runtime.mjs";
2
- import { V as require_react_dom, W as require_react } from "./@base-ui/react+[...].mjs";
2
+ import { W as require_react_dom, q as require_react } from "./@base-ui/react+[...].mjs";
3
3
  //#region node_modules/.pnpm/sonner@2.0.8_@types+react@19.2.18_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/sonner/dist/index.mjs
4
4
  var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
5
5
  var import_react_dom = /* @__PURE__ */ __toESM(require_react_dom(), 1);
@@ -0,0 +1,310 @@
1
+ import { i as __toESM } from "./_runtime.mjs";
2
+ import { K as require_jsx_runtime, q as require_react } from "./_libs/@base-ui/react+[...].mjs";
3
+ import { m as useRouter, p as useNavigate } from "./_libs/@tanstack/react-router+[...].mjs";
4
+ import { d as destinationLabel, s as connectorManifest } from "./_ssr/connections-Cqvb6Gw2.mjs";
5
+ import { n as agentManifest } from "./_ssr/agents-B_qo1gpL.mjs";
6
+ import { F as ChevronRight, N as CircleAlert, c as RefreshCw, d as Play, i as Trash2 } from "./_libs/lucide-react.mjs";
7
+ import { n as toast } from "./_libs/sonner.mjs";
8
+ import { S as runLoopBacklog, T as runLoopNow, _ as Badge, b as removeLoop, g as Input$1, o as Route$10, v as Button$1, w as toggleLoop, y as lookLoopNow } from "./_ssr/router-DdwREiOf.mjs";
9
+ import { t as ConnectorIcon } from "./_ssr/connector-icon-DrhVbhs6.mjs";
10
+ import { a as List, i as LinkTabs, o as PageHeader, r as Label, s as Section } from "./_ssr/page-DZVxKvdn.mjs";
11
+ import { t as Switch$1 } from "./_ssr/switch-odxNO_S4.mjs";
12
+ import { n as AlertDescription, r as AlertTitle, t as Alert } from "./_ssr/alert-C2WBWfzo.mjs";
13
+ import { t as ago } from "./_ssr/time-Cy8TZP0Z.mjs";
14
+ import { n as useLiveRefresh } from "./_ssr/use-live-tasks-BzhTkEOL.mjs";
15
+ import { n as TaskList } from "./_ssr/task-list-Dnmq_WeE.mjs";
16
+ import { t as LoopForm } from "./_ssr/loop-form-DWwOR05R.mjs";
17
+ import { n as issuesFor } from "./_ssr/gaps-CcvHiLcj.mjs";
18
+ //#region node_modules/.nitro/vite/services/ssr/assets/_loopId-CZh6_Yhr.js
19
+ var import_react = /* @__PURE__ */ __toESM(require_react());
20
+ var import_jsx_runtime = require_jsx_runtime();
21
+ function useAction() {
22
+ const router = useRouter();
23
+ const [busy, setBusy] = (0, import_react.useState)(null);
24
+ const run = async (key, work) => {
25
+ setBusy(key);
26
+ try {
27
+ const message = await work();
28
+ await router.invalidate();
29
+ if (message) toast.success(message);
30
+ } catch (error) {
31
+ toast.error(error instanceof Error ? error.message : String(error));
32
+ } finally {
33
+ setBusy(null);
34
+ }
35
+ };
36
+ return {
37
+ busy,
38
+ run
39
+ };
40
+ }
41
+ function LoopPage() {
42
+ const { loop, tasks, poll, readiness } = Route$10.useLoaderData();
43
+ const { tab = "settings" } = Route$10.useSearch();
44
+ useLiveRefresh();
45
+ const issues = issuesFor(readiness, loop);
46
+ const connector = connectorManifest(loop.connectorId);
47
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
48
+ className: "flex flex-col gap-6",
49
+ children: [
50
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PageHeader, {
51
+ back: {
52
+ to: "/loops",
53
+ label: "Loops"
54
+ },
55
+ icon: connector ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ConnectorIcon, {
56
+ icon: connector.icon,
57
+ accent: connector.accent
58
+ }) : null,
59
+ title: loop.name,
60
+ actions: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HeaderActions, { loop }),
61
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Summary, {
62
+ loop,
63
+ poll
64
+ })
65
+ }),
66
+ issues.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert, { children: [
67
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CircleAlert, {}),
68
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertTitle, { children: "Cannot run yet" }),
69
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDescription, {
70
+ className: "flex flex-col gap-0.5",
71
+ children: issues.map((line) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: line }, line))
72
+ })
73
+ ] }) : null,
74
+ loop.enabled && poll.pollError ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert, {
75
+ variant: "destructive",
76
+ children: [
77
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CircleAlert, {}),
78
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertTitle, { children: "The last check failed" }),
79
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDescription, { children: poll.pollError })
80
+ ]
81
+ }) : null,
82
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LinkTabs, { items: [{
83
+ label: "Settings",
84
+ to: "/loops/$loopId",
85
+ params: { loopId: loop.id },
86
+ search: {},
87
+ active: tab === "settings"
88
+ }, {
89
+ label: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: ["Tasks", tasks.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
90
+ className: "text-xs text-muted-foreground",
91
+ children: tasks.length
92
+ }) : null] }),
93
+ to: "/loops/$loopId",
94
+ params: { loopId: loop.id },
95
+ search: { tab: "tasks" },
96
+ active: tab === "tasks"
97
+ }] }),
98
+ tab === "settings" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
99
+ className: "flex flex-col",
100
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(LoopForm, { loop }, loop.id), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DeleteLoop, { loop })]
101
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
102
+ className: "flex flex-col gap-4",
103
+ children: [
104
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TryOnLink, { loop }),
105
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NotRun, {
106
+ loop,
107
+ poll
108
+ }),
109
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TaskList, {
110
+ tasks,
111
+ showLoop: false,
112
+ empty: "No runs yet."
113
+ })
114
+ ]
115
+ })
116
+ ]
117
+ });
118
+ }
119
+ /** One line under the title: where it answers, with what, and when it last looked. */
120
+ function Summary({ loop, poll }) {
121
+ const agent = loop.agentId ? agentManifest(loop.agentId) : void 0;
122
+ const parts = [
123
+ destinationLabel(loop.actionConnectorId, loop.actionId),
124
+ agent?.name ?? "Default agent",
125
+ loop.enabled ? poll.polledAt ? `Checked ${ago(poll.polledAt)}` : "Not checked yet" : null
126
+ ].filter(Boolean);
127
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
128
+ suppressHydrationWarning: true,
129
+ className: "mt-1 flex flex-wrap items-center gap-x-2 text-sm text-muted-foreground",
130
+ children: [loop.enabled ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Badge, {
131
+ variant: "secondary",
132
+ children: "Off"
133
+ }), parts.join(" · ")]
134
+ });
135
+ }
136
+ function HeaderActions({ loop }) {
137
+ const { busy, run } = useAction();
138
+ const byHand = connectorManifest(loop.connectorId)?.byHand.kind ?? "none";
139
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [byHand === "now" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$1, {
140
+ variant: "outline",
141
+ size: "sm",
142
+ disabled: busy !== null,
143
+ onClick: () => run("run", async () => {
144
+ await runLoopNow({ data: {
145
+ loopId: loop.id,
146
+ url: "",
147
+ dryRun: false
148
+ } });
149
+ return "Queued";
150
+ }),
151
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Play, {}), "Run now"]
152
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$1, {
153
+ variant: "outline",
154
+ size: "sm",
155
+ disabled: busy !== null || !loop.enabled,
156
+ onClick: () => run("look", async () => {
157
+ const report = await lookLoopNow({ data: { id: loop.id } });
158
+ if (report.error) throw new Error(report.error);
159
+ return "Checked";
160
+ }),
161
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(RefreshCw, { className: busy === "look" ? "animate-spin" : void 0 }), "Check now"]
162
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", {
163
+ className: "flex items-center gap-2 pl-1 text-sm",
164
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Switch$1, {
165
+ checked: loop.enabled,
166
+ disabled: busy !== null,
167
+ onCheckedChange: (enabled) => run("toggle", async () => {
168
+ await toggleLoop({ data: {
169
+ id: loop.id,
170
+ enabled
171
+ } });
172
+ return enabled ? "Turned on" : "Turned off";
173
+ })
174
+ }), loop.enabled ? "On" : "Off"]
175
+ })] });
176
+ }
177
+ /**
178
+ * What matched but was never run: open before the loop existed, or held back
179
+ * by one of its rules. Neither runs by itself, so it stays folded into one
180
+ * line, with the reason said in the line.
181
+ */
182
+ function NotRun({ loop, poll }) {
183
+ const { busy, run } = useAction();
184
+ if (poll.backlog.length === 0) return null;
185
+ const held = poll.backlog.filter((item) => item.hold).length;
186
+ const before = poll.backlog.length - held;
187
+ const reasons = [before > 0 ? `${before} ${before === 1 ? "was" : "were"} open before this loop` : null, held > 0 ? `${held} held back by a rule` : null].filter(Boolean);
188
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("details", {
189
+ suppressHydrationWarning: true,
190
+ className: "group",
191
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("summary", {
192
+ className: "flex w-fit cursor-pointer list-none items-center gap-1 text-xs text-muted-foreground hover:text-foreground",
193
+ children: [
194
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChevronRight, { className: "size-3.5 transition-transform group-open:rotate-90" }),
195
+ poll.backlog.length,
196
+ " not run · ",
197
+ reasons.join(", ")
198
+ ]
199
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(List, {
200
+ className: "mt-2",
201
+ children: poll.backlog.map((item) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
202
+ className: "flex items-center gap-3 px-4 py-2",
203
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
204
+ className: "min-w-0 flex-1 truncate text-sm",
205
+ children: [
206
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
207
+ className: "text-muted-foreground",
208
+ children: item.sourceRef
209
+ }),
210
+ " ",
211
+ item.sourceTitle,
212
+ item.hold ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
213
+ className: "text-xs text-amber-700 dark:text-amber-500",
214
+ children: [" · ", item.hold]
215
+ }) : null
216
+ ]
217
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$1, {
218
+ variant: "ghost",
219
+ size: "sm",
220
+ disabled: busy !== null,
221
+ onClick: () => run(item.key, async () => {
222
+ await runLoopBacklog({ data: {
223
+ id: loop.id,
224
+ key: item.key
225
+ } });
226
+ return "Queued";
227
+ }),
228
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Play, {}), "Run"]
229
+ })]
230
+ }, item.key))
231
+ })]
232
+ });
233
+ }
234
+ /** Run the loop on one link, by hand, without waiting for something to arrive. */
235
+ function TryOnLink({ loop }) {
236
+ const { busy, run } = useAction();
237
+ const [url, setUrl] = (0, import_react.useState)("");
238
+ const [dryRun, setDryRun] = (0, import_react.useState)(true);
239
+ const manifest = connectorManifest(loop.connectorId);
240
+ if (manifest?.byHand.kind !== "link") return null;
241
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("form", {
242
+ className: "flex flex-col gap-2 sm:flex-row sm:items-center",
243
+ onSubmit: (event) => {
244
+ event.preventDefault();
245
+ run("try", async () => {
246
+ await runLoopNow({ data: {
247
+ loopId: loop.id,
248
+ url: url.trim(),
249
+ dryRun
250
+ } });
251
+ setUrl("");
252
+ return dryRun ? "Queued as a dry run" : "Queued";
253
+ });
254
+ },
255
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input$1, {
256
+ "aria-label": `${manifest.name} link`,
257
+ value: url,
258
+ placeholder: `Try on a link: ${manifest.byHand.placeholder}`,
259
+ onChange: (event) => setUrl(event.target.value),
260
+ className: "flex-1"
261
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
262
+ className: "flex items-center gap-3",
263
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Label, {
264
+ className: "flex items-center gap-2 font-normal text-muted-foreground",
265
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Switch$1, {
266
+ checked: dryRun,
267
+ onCheckedChange: setDryRun
268
+ }), "Dry run"]
269
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$1, {
270
+ type: "submit",
271
+ disabled: busy !== null || url.trim() === "",
272
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Play, {}), "Run"]
273
+ })]
274
+ })]
275
+ });
276
+ }
277
+ function DeleteLoop({ loop }) {
278
+ const navigate = useNavigate();
279
+ const [busy, setBusy] = (0, import_react.useState)(false);
280
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Section, {
281
+ title: "Delete",
282
+ className: "mt-6",
283
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
284
+ className: "flex items-center justify-between gap-4",
285
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
286
+ className: "text-sm text-muted-foreground",
287
+ children: "Its runs are deleted with it."
288
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$1, {
289
+ variant: "destructive",
290
+ size: "sm",
291
+ disabled: busy,
292
+ onClick: async () => {
293
+ if (!window.confirm(`Delete ${loop.name}?`)) return;
294
+ setBusy(true);
295
+ try {
296
+ await removeLoop({ data: { id: loop.id } });
297
+ toast.success(`Deleted ${loop.name}`);
298
+ await navigate({ to: "/loops" });
299
+ } catch (error) {
300
+ toast.error(error instanceof Error ? error.message : String(error));
301
+ setBusy(false);
302
+ }
303
+ },
304
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trash2, {}), "Delete loop"]
305
+ })]
306
+ })
307
+ });
308
+ }
309
+ //#endregion
310
+ export { LoopPage as component };