loopable-cli 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/public/assets/_connectorId-CkygNLny.js +1 -0
- package/.output/public/assets/_loopId-Cshlc5Ja.js +1 -0
- package/.output/public/assets/_taskId-BKDIJ_Fg.js +1 -0
- package/.output/public/assets/connector-icon-BUoK6Cru.js +1 -0
- package/.output/public/assets/connectors-CeLBtEtg.js +1 -0
- package/.output/public/assets/gaps-BtFoD7mF.js +1 -0
- package/.output/public/assets/{inbox-CLEXUXCI.js → inbox-BYNjkNDJ.js} +1 -1
- package/.output/public/assets/index-0yP3Jn_G.js +18 -0
- package/.output/public/assets/loop-form-DnSJNc1k.js +1 -0
- package/.output/public/assets/loops-1CvbqO6m.js +1 -0
- package/.output/public/assets/{new-DPEaXKAY.js → new-m5NlqYQT.js} +1 -1
- package/.output/public/assets/refresh-cw-C3xBnKfy.js +1 -0
- package/.output/public/assets/{runners-BVBggS5B.js → runners-D8QVl-Y6.js} +1 -1
- package/.output/public/assets/{setting-fields-BT1naVJX.js → setting-fields-bJ_gTG7Q.js} +1 -1
- package/.output/public/assets/styles-ClTGaXU0.css +2 -0
- package/.output/public/assets/{task-list-CrptnI1N.js → task-list-BAxjcVgr.js} +1 -1
- package/.output/server/{_connectorId-DcSnoRjk.mjs → _connectorId-C9yydJrC.mjs} +90 -9
- package/.output/server/{_loopId-G_TAkYtS.mjs → _loopId-B0VG-eBC.mjs} +42 -13
- package/.output/server/_ssr/{callback-D20cVD2w.mjs → access-DTttr563.mjs} +37 -20
- package/.output/server/_ssr/{agents-Dms_6TBF.mjs → agents-C7B6RJ6-.mjs} +3 -3
- package/.output/server/_ssr/{agents-CrUmIQpi.mjs → agents-DG643yoJ.mjs} +2 -2
- package/.output/server/_ssr/alert-DQvzE7bu.mjs +1 -1
- package/.output/server/_ssr/connection-status-BZr3Y-IC.mjs +1 -1
- package/.output/server/_ssr/{connections-ypex3qUd.mjs → connections-Df-aDpfJ.mjs} +814 -15
- package/.output/server/_ssr/connector-icon-WvxwZ5TF.mjs +56 -0
- package/.output/server/_ssr/{connectors-4yzKb0KG.mjs → connectors-BU0IiRge.mjs} +6 -5
- package/.output/server/_ssr/{connectors-BZly0yGF.mjs → connectors-e0mf2pMs.mjs} +14 -3
- package/.output/server/_ssr/{gaps-D2Zh8sEo.mjs → gaps-Cz76ZicM.mjs} +6 -6
- package/.output/server/_ssr/{inbox-C2VBGLa5.mjs → inbox-CAUBa1I3.mjs} +3 -3
- package/.output/server/_ssr/{loop-form-D-U-kU4k.mjs → loop-form-FqSaXiHl.mjs} +5 -5
- package/.output/server/_ssr/{loops-Og_G3KyZ.mjs → loops-D8WuK7Ke.mjs} +199 -6
- package/.output/server/_ssr/{loops-D0XJ8eBb.mjs → loops-Dqoebe8q.mjs} +6 -6
- package/.output/server/_ssr/{new-CajvgIog.mjs → new-bBsVaWD6.mjs} +5 -5
- package/.output/server/_ssr/{router-BbrBz36P.mjs → router-54IDWTVz.mjs} +24 -19
- package/.output/server/_ssr/{runners-B_WuF8UJ.mjs → runners-Cj6z9Mqh.mjs} +26 -3
- package/.output/server/_ssr/{runners-D-0_lfiq.mjs → runners-D2UAdLyj.mjs} +1 -1
- package/.output/server/_ssr/{runners-zqF_zbEc.mjs → runners-DGWaVvWi.mjs} +2 -2
- package/.output/server/_ssr/{setting-fields-mpXfGftI.mjs → setting-fields-DzBlslan.mjs} +2 -2
- package/.output/server/_ssr/ssr.mjs +42 -34
- package/.output/server/_ssr/{start-BgTj-h_C.mjs → start-Vq3Oan3v.mjs} +2 -3
- package/.output/server/_ssr/switch-1pnd_bPJ.mjs +1 -1
- package/.output/server/_ssr/{task-list-BnQJ94Dk.mjs → task-list-_qgBS9LU.mjs} +5 -5
- package/.output/server/_ssr/{tasks-B_QmDFVs.mjs → tasks-BDqznm57.mjs} +16 -5
- package/.output/server/_ssr/{tasks-LIi-W4cy.mjs → tasks-Qtml5TlK.mjs} +3 -3
- package/.output/server/_ssr/textarea-CHJTKtsJ.mjs +1 -1
- package/.output/server/{_tanstack-start-manifest_v-BCHAazE8.mjs → _tanstack-start-manifest_v-CvheE7ZF.mjs} +25 -23
- package/.output/server/{_taskId-CIv0ajIx.mjs → _taskId-V4QLBO2N.mjs} +4 -4
- package/.output/server/index.mjs +139 -132
- package/README.md +24 -19
- package/dist/cli.mjs +24 -59
- package/dist/dispatcher.mjs +811 -31
- package/package.json +21 -17
- package/.output/public/assets/_connectorId-m67WbiJ8.js +0 -1
- package/.output/public/assets/_loopId-Bf4K5sdd.js +0 -1
- package/.output/public/assets/_taskId-eCKkcVOx.js +0 -1
- package/.output/public/assets/connector-icon-qGpNsPgH.js +0 -1
- package/.output/public/assets/connectors-DxXlc9zF.js +0 -1
- package/.output/public/assets/gaps-CoTA-PzA.js +0 -1
- package/.output/public/assets/index-Cndsw84p.js +0 -16
- package/.output/public/assets/loop-form-BvizlZdR.js +0 -1
- package/.output/public/assets/loops-Dbe_mf5T.js +0 -1
- package/.output/public/assets/styles-D3sonCfX.css +0 -2
- package/.output/server/_ssr/access-B7TcOZ7F.mjs +0 -42
- package/.output/server/_ssr/connector-icon-CFrrHjzR.mjs +0 -37
|
@@ -1,8 +1,31 @@
|
|
|
1
1
|
import { n as createServerFn } from "./ssr.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { c as listRunners, n as forgetRunner, r as getJoinToken, u as rotateJoinToken } from "./runners-D-0_lfiq.mjs";
|
|
2
|
+
import { c as listRunners, n as forgetRunner, r as getJoinToken, u as rotateJoinToken } from "./runners-D2UAdLyj.mjs";
|
|
4
3
|
import { t as createServerRpc } from "./createServerRpc-DPDrnFdH.mjs";
|
|
5
|
-
|
|
4
|
+
import { networkInterfaces } from "node:os";
|
|
5
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/runners-Cj6z9Mqh.js
|
|
6
|
+
function configuredOrigin() {
|
|
7
|
+
return process.env.LOOPABLE_BASE_URL?.replace(/\/$/, "") || null;
|
|
8
|
+
}
|
|
9
|
+
/** First non-internal IPv4, preferring typical LAN ranges. */
|
|
10
|
+
function lanIPv4(nics = networkInterfaces()) {
|
|
11
|
+
const found = [];
|
|
12
|
+
for (const addrs of Object.values(nics)) for (const addr of addrs ?? []) {
|
|
13
|
+
if (addr.internal) continue;
|
|
14
|
+
if (!["IPv4", "4"].includes(String(addr.family))) continue;
|
|
15
|
+
found.push(addr.address);
|
|
16
|
+
}
|
|
17
|
+
return found.find((ip) => ip.startsWith("192.168.")) ?? found.find((ip) => ip.startsWith("10.")) ?? found.find((ip) => {
|
|
18
|
+
const b = Number(ip.split(".")[1]);
|
|
19
|
+
return ip.startsWith("172.") && b >= 16 && b <= 31;
|
|
20
|
+
}) ?? found[0] ?? null;
|
|
21
|
+
}
|
|
22
|
+
/** Where runners should address this Loopable. A LAN IP when one exists. */
|
|
23
|
+
function loopableOrigin(nics = networkInterfaces()) {
|
|
24
|
+
const configured = configuredOrigin();
|
|
25
|
+
if (configured) return configured;
|
|
26
|
+
const port = process.env.PORT ?? process.env.NITRO_PORT ?? "4321";
|
|
27
|
+
return `http://${lanIPv4(nics) ?? "127.0.0.1"}:${port}`;
|
|
28
|
+
}
|
|
6
29
|
var getRunnersPage_createServerFn_handler = createServerRpc({
|
|
7
30
|
id: "45dbbb612763589268984d236edcd17f5868ecf716df9625bfa46e7fec691f4e",
|
|
8
31
|
name: "getRunnersPage",
|
|
@@ -3,7 +3,7 @@ import { f as runners, g as tasks, s as db } from "./client-BtVRVhQ2.mjs";
|
|
|
3
3
|
import { a as runnerTokenKey, o as secretStore, r as joinTokenKey } from "./secrets-CRnpwGBh.mjs";
|
|
4
4
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
5
5
|
import { hostname } from "node:os";
|
|
6
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/runners-
|
|
6
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/runners-D2UAdLyj.js
|
|
7
7
|
var ONLINE_MS = 45e3;
|
|
8
8
|
function isRunnerOnline(row, now = Date.now()) {
|
|
9
9
|
if (row.status !== "online") return false;
|
|
@@ -2,9 +2,9 @@ import { U as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
|
2
2
|
import { m as useRouter } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
3
3
|
import { s as Server } from "../_libs/lucide-react.mjs";
|
|
4
4
|
import { n as toast } from "../_libs/sonner.mjs";
|
|
5
|
-
import { B as
|
|
5
|
+
import { B as Card, H as CardHeader, R as Badge, V as CardContent, f as useLiveRefresh, i as rotateRunnerJoinToken, n as Route$7, r as removeRunner, z as Button$1 } from "./router-54IDWTVz.mjs";
|
|
6
6
|
import { n as AlertDescription, t as Alert } from "./alert-DQvzE7bu.mjs";
|
|
7
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/runners-
|
|
7
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/runners-DGWaVvWi.js
|
|
8
8
|
var import_jsx_runtime = require_jsx_runtime();
|
|
9
9
|
function inventoryLines(runner) {
|
|
10
10
|
if (runner.inventory.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { U as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
2
|
-
import { S as Input$1, _ as SelectItem, b as Label, g as SelectContent, h as Select$1, v as SelectTrigger, y as SelectValue } from "./router-
|
|
2
|
+
import { S as Input$1, _ as SelectItem, b as Label, g as SelectContent, h as Select$1, v as SelectTrigger, y as SelectValue } from "./router-54IDWTVz.mjs";
|
|
3
3
|
import { t as Switch$1 } from "./switch-1pnd_bPJ.mjs";
|
|
4
4
|
import { t as Textarea } from "./textarea-CHJTKtsJ.mjs";
|
|
5
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/setting-fields-
|
|
5
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/setting-fields-DzBlslan.js
|
|
6
6
|
var import_jsx_runtime = require_jsx_runtime();
|
|
7
7
|
/**
|
|
8
8
|
* One renderer for anything a connector declares as a field, so connection
|
|
@@ -4107,7 +4107,7 @@ var defaultSerovalPlugins = [
|
|
|
4107
4107
|
* the dev styles URL for route-scoped CSS collection.
|
|
4108
4108
|
*/
|
|
4109
4109
|
async function getStartManifest(matchedRoutes) {
|
|
4110
|
-
const { tsrStartManifest } = await import("../_tanstack-start-manifest_v-
|
|
4110
|
+
const { tsrStartManifest } = await import("../_tanstack-start-manifest_v-CvheE7ZF.mjs");
|
|
4111
4111
|
const startManifest = tsrStartManifest();
|
|
4112
4112
|
let routes = startManifest.routes;
|
|
4113
4113
|
routes[rootRouteId];
|
|
@@ -4129,127 +4129,135 @@ async function getStartManifest(matchedRoutes) {
|
|
|
4129
4129
|
var manifest = {
|
|
4130
4130
|
"0033ef7c619c027b1428a722dff188d315ed335645afcb1033528630b7c95e88": {
|
|
4131
4131
|
functionName: "getTaskById_createServerFn_handler",
|
|
4132
|
-
importer: () => import("./tasks-
|
|
4132
|
+
importer: () => import("./tasks-Qtml5TlK.mjs")
|
|
4133
4133
|
},
|
|
4134
4134
|
"0e209afb63fad4a95a5cfeaf4831610f23673145cbf5b8054765d79804a62d31": {
|
|
4135
4135
|
functionName: "getConnectorOverview_createServerFn_handler",
|
|
4136
|
-
importer: () => import("./connectors-
|
|
4136
|
+
importer: () => import("./connectors-e0mf2pMs.mjs")
|
|
4137
4137
|
},
|
|
4138
4138
|
"0fa144f67263a4a51c51e8baf134a15b89c0afdf9b92b64660520a5bce247eec": {
|
|
4139
4139
|
functionName: "pauseDispatcher_createServerFn_handler",
|
|
4140
|
-
importer: () => import("./tasks-
|
|
4140
|
+
importer: () => import("./tasks-Qtml5TlK.mjs")
|
|
4141
4141
|
},
|
|
4142
4142
|
"143ea51f7421d9eebec9ad31c2df8eed5aa2e5d8035473dbfad39913fd7d54c0": {
|
|
4143
4143
|
functionName: "chooseDefaultAgent_createServerFn_handler",
|
|
4144
|
-
importer: () => import("./agents-
|
|
4144
|
+
importer: () => import("./agents-C7B6RJ6-.mjs")
|
|
4145
4145
|
},
|
|
4146
4146
|
"18bae5deb2a19571893f0067e374e537f16d6774f9b4e04f9b7349360f6f8fdc": {
|
|
4147
4147
|
functionName: "saveConnectionSettings_createServerFn_handler",
|
|
4148
|
-
importer: () => import("./connectors-
|
|
4148
|
+
importer: () => import("./connectors-e0mf2pMs.mjs")
|
|
4149
4149
|
},
|
|
4150
4150
|
"3f938fac3e5ec1631e700a2fdd4790e78abbefeb732ecfbbe6864cc19f0d5aac": {
|
|
4151
4151
|
functionName: "getLoopTasks_createServerFn_handler",
|
|
4152
|
-
importer: () => import("./tasks-
|
|
4152
|
+
importer: () => import("./tasks-Qtml5TlK.mjs")
|
|
4153
4153
|
},
|
|
4154
4154
|
"3fc8a7de98be979f9820a4f5a0ca2e234ed8a7df8e692abb8c4437765474eca0": {
|
|
4155
4155
|
functionName: "toggleLoop_createServerFn_handler",
|
|
4156
|
-
importer: () => import("./loops-
|
|
4156
|
+
importer: () => import("./loops-D8WuK7Ke.mjs")
|
|
4157
4157
|
},
|
|
4158
4158
|
"43b97e3644ad73286fe5de3e99134bff099e1a8704f1ae91fe643d419eceba73": {
|
|
4159
4159
|
functionName: "continueQrLogin_createServerFn_handler",
|
|
4160
|
-
importer: () => import("./connectors-
|
|
4160
|
+
importer: () => import("./connectors-e0mf2pMs.mjs")
|
|
4161
4161
|
},
|
|
4162
4162
|
"45dbbb612763589268984d236edcd17f5868ecf716df9625bfa46e7fec691f4e": {
|
|
4163
4163
|
functionName: "getRunnersPage_createServerFn_handler",
|
|
4164
|
-
importer: () => import("./runners-
|
|
4164
|
+
importer: () => import("./runners-Cj6z9Mqh.mjs")
|
|
4165
4165
|
},
|
|
4166
4166
|
"48bc32df9d6f69f45df8dfbc6e798e1f99152dbd4b4ed65b149fa2612c65e687": {
|
|
4167
4167
|
functionName: "getInbox_createServerFn_handler",
|
|
4168
|
-
importer: () => import("./tasks-
|
|
4168
|
+
importer: () => import("./tasks-Qtml5TlK.mjs")
|
|
4169
4169
|
},
|
|
4170
4170
|
"4fd3855e3e9ed954e102071a55b98d91651c9b1e353161f7223768ed6f2b8c28": {
|
|
4171
4171
|
functionName: "getLoopPollState_createServerFn_handler",
|
|
4172
|
-
importer: () => import("./loops-
|
|
4172
|
+
importer: () => import("./loops-D8WuK7Ke.mjs")
|
|
4173
4173
|
},
|
|
4174
4174
|
"611491b32d9583ccaae637ddf9fb2f842ff75994f50513ecd8273e305e889eb8": {
|
|
4175
4175
|
functionName: "removeRunner_createServerFn_handler",
|
|
4176
|
-
importer: () => import("./runners-
|
|
4176
|
+
importer: () => import("./runners-Cj6z9Mqh.mjs")
|
|
4177
4177
|
},
|
|
4178
4178
|
"65494cbfd06143dbd9a012808fbba21163d9902e387869503fb8b68b0674902b": {
|
|
4179
4179
|
functionName: "runLoopBacklog_createServerFn_handler",
|
|
4180
|
-
importer: () => import("./loops-
|
|
4180
|
+
importer: () => import("./loops-D8WuK7Ke.mjs")
|
|
4181
4181
|
},
|
|
4182
4182
|
"6d5a90e9ec4ebf70d8e2ac4aff960533a5e68d21b289033cc7e0751d00554c93": {
|
|
4183
4183
|
functionName: "getLoopsPage_createServerFn_handler",
|
|
4184
|
-
importer: () => import("./loops-
|
|
4184
|
+
importer: () => import("./loops-D8WuK7Ke.mjs")
|
|
4185
4185
|
},
|
|
4186
4186
|
"7258ce5fc6f23acf3aab039ecd4acdb006d42b2ddbf3ab8629b4000e101b51dc": {
|
|
4187
4187
|
functionName: "runLoopNow_createServerFn_handler",
|
|
4188
|
-
importer: () => import("./tasks-
|
|
4188
|
+
importer: () => import("./tasks-Qtml5TlK.mjs")
|
|
4189
4189
|
},
|
|
4190
4190
|
"794964d675b97edaa881ab5cb209225ef0a4507e3d2771d6577658a058e7621f": {
|
|
4191
4191
|
functionName: "beginQrLogin_createServerFn_handler",
|
|
4192
|
-
importer: () => import("./connectors-
|
|
4192
|
+
importer: () => import("./connectors-e0mf2pMs.mjs")
|
|
4193
4193
|
},
|
|
4194
4194
|
"7d7d5f80a4f0d2b3bb659d7dc2a91ea5983880648b9d1aa24356e7340505930f": {
|
|
4195
4195
|
functionName: "reorderLoop_createServerFn_handler",
|
|
4196
|
-
importer: () => import("./loops-
|
|
4196
|
+
importer: () => import("./loops-D8WuK7Ke.mjs")
|
|
4197
4197
|
},
|
|
4198
4198
|
"80883b912a5a0aba2aa583b505e4e289d765a3f7fbb793a97692f439e7f960ba": {
|
|
4199
4199
|
functionName: "saveAgent_createServerFn_handler",
|
|
4200
|
-
importer: () => import("./agents-
|
|
4200
|
+
importer: () => import("./agents-C7B6RJ6-.mjs")
|
|
4201
4201
|
},
|
|
4202
4202
|
"81a1af559b2a373901872aa9f9a6546f2f3bda8157d81c21a36ba0d1d337613b": {
|
|
4203
4203
|
functionName: "getLoopById_createServerFn_handler",
|
|
4204
|
-
importer: () => import("./loops-
|
|
4204
|
+
importer: () => import("./loops-D8WuK7Ke.mjs")
|
|
4205
4205
|
},
|
|
4206
4206
|
"81f567724371f0d6f24e636906e2e9ea5b7384422ac583c86a1050fb838664ce": {
|
|
4207
4207
|
functionName: "getTaskLog_createServerFn_handler",
|
|
4208
|
-
importer: () => import("./tasks-
|
|
4208
|
+
importer: () => import("./tasks-Qtml5TlK.mjs")
|
|
4209
4209
|
},
|
|
4210
4210
|
"921b049ebafe3c6fb5206fbe3e2100608d3333b944e18385e57da62a28233bc6": {
|
|
4211
4211
|
functionName: "getDispatcherState_createServerFn_handler",
|
|
4212
|
-
importer: () => import("./tasks-
|
|
4212
|
+
importer: () => import("./tasks-Qtml5TlK.mjs")
|
|
4213
|
+
},
|
|
4214
|
+
"965ff21ee2f1e1f5a1cb78d50570cbad6f58ccdbdcc7955f02f816a9c0684f8e": {
|
|
4215
|
+
functionName: "lookLoopNow_createServerFn_handler",
|
|
4216
|
+
importer: () => import("./loops-D8WuK7Ke.mjs")
|
|
4213
4217
|
},
|
|
4214
4218
|
"997d2dd097598c44811fe97def167b79d33e4349c51e783058da648e860c7c1f": {
|
|
4215
4219
|
functionName: "getLoopReadiness_createServerFn_handler",
|
|
4216
|
-
importer: () => import("./loops-
|
|
4220
|
+
importer: () => import("./loops-D8WuK7Ke.mjs")
|
|
4217
4221
|
},
|
|
4218
4222
|
"a57f49c322cc5afa2996e4a5777fa533fd963755d614d4a14eb32e51fb198d9d": {
|
|
4219
4223
|
functionName: "stopTask_createServerFn_handler",
|
|
4220
|
-
importer: () => import("./tasks-
|
|
4224
|
+
importer: () => import("./tasks-Qtml5TlK.mjs")
|
|
4221
4225
|
},
|
|
4222
4226
|
"b0878f841b35f46b5f2dc9cbd71c5be5895ae1b8903b3b24c24dfcf86291d3e4": {
|
|
4223
4227
|
functionName: "runAgentTest_createServerFn_handler",
|
|
4224
|
-
importer: () => import("./agents-
|
|
4228
|
+
importer: () => import("./agents-C7B6RJ6-.mjs")
|
|
4225
4229
|
},
|
|
4226
4230
|
"b4f7a66e1bb69cc14ab84d8f5dc7f85119c9a9b1d065a6b4e51dd0ba84c3f60c": {
|
|
4227
4231
|
functionName: "rotateRunnerJoinToken_createServerFn_handler",
|
|
4228
|
-
importer: () => import("./runners-
|
|
4232
|
+
importer: () => import("./runners-Cj6z9Mqh.mjs")
|
|
4229
4233
|
},
|
|
4230
4234
|
"b5a89ca2d07f4ccf2827b5132ca52e7c7a42d584e702b0ab3963b2d5763c35b0": {
|
|
4231
4235
|
functionName: "removeLoop_createServerFn_handler",
|
|
4232
|
-
importer: () => import("./loops-
|
|
4236
|
+
importer: () => import("./loops-D8WuK7Ke.mjs")
|
|
4233
4237
|
},
|
|
4234
4238
|
"bde588e9b0b81a4ee619a63872d6b8b76e22db006c7a3c4351bcd56e5f76bbed": {
|
|
4235
4239
|
functionName: "getAgentsPage_createServerFn_handler",
|
|
4236
|
-
importer: () => import("./agents-
|
|
4240
|
+
importer: () => import("./agents-C7B6RJ6-.mjs")
|
|
4237
4241
|
},
|
|
4238
4242
|
"bef559b165754b06d6d5cf7c6dccde3d5a6a326462430c621eb131f78665d6e1": {
|
|
4239
4243
|
functionName: "runPrompt_createServerFn_handler",
|
|
4240
|
-
importer: () => import("./tasks-
|
|
4244
|
+
importer: () => import("./tasks-Qtml5TlK.mjs")
|
|
4241
4245
|
},
|
|
4242
4246
|
"e91fc2fd51633c7ca9184fea4beb66fe775ed0b4e6323111a4690da916a78b00": {
|
|
4243
4247
|
functionName: "saveLoop_createServerFn_handler",
|
|
4244
|
-
importer: () => import("./loops-
|
|
4248
|
+
importer: () => import("./loops-D8WuK7Ke.mjs")
|
|
4245
4249
|
},
|
|
4246
4250
|
"f94f0787ce6704ea24f18add66832e0367a0feb9a690d8ad6454abec5e5df193": {
|
|
4247
4251
|
functionName: "disconnectConnection_createServerFn_handler",
|
|
4248
|
-
importer: () => import("./connectors-
|
|
4252
|
+
importer: () => import("./connectors-e0mf2pMs.mjs")
|
|
4249
4253
|
},
|
|
4250
4254
|
"f9ade3084971078ee9f2bc16fcdcdfb5a8d66a0f9b634803bb611287c14e21d7": {
|
|
4251
4255
|
functionName: "verifyConnection_createServerFn_handler",
|
|
4252
|
-
importer: () => import("./connectors-
|
|
4256
|
+
importer: () => import("./connectors-e0mf2pMs.mjs")
|
|
4257
|
+
},
|
|
4258
|
+
"fbf19a0d12b4046a23a8a41e106a79443b174cf1cad922b029e23fb4679b20db": {
|
|
4259
|
+
functionName: "connectWithToken_createServerFn_handler",
|
|
4260
|
+
importer: () => import("./connectors-e0mf2pMs.mjs")
|
|
4253
4261
|
}
|
|
4254
4262
|
};
|
|
4255
4263
|
async function getServerFnById(id, access) {
|
|
@@ -6160,8 +6168,8 @@ var getBaseManifest = getProdBaseManifest;
|
|
|
6160
6168
|
var createEarlyHintsForRequest = createEarlyHintsCollector;
|
|
6161
6169
|
async function loadEntries() {
|
|
6162
6170
|
const [routerEntry, startEntry, pluginAdapters] = await Promise.all([
|
|
6163
|
-
import("./router-
|
|
6164
|
-
import("./start-
|
|
6171
|
+
import("./router-54IDWTVz.mjs").then((n) => n.t),
|
|
6172
|
+
import("./start-Vq3Oan3v.mjs"),
|
|
6165
6173
|
import("./empty-plugin-adapters-BJ4m9L8g.mjs")
|
|
6166
6174
|
]);
|
|
6167
6175
|
return {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { t as createMiddleware } from "./ssr.mjs";
|
|
2
2
|
import { l as migrateIfNeeded } from "./client-BtVRVhQ2.mjs";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/start-BgTj-h_C.js
|
|
3
|
+
import { c as readAppToken, o as isLoopbackHost, r as assertAppAccess, s as isPublicApiPath, t as appAccessCookie } from "./access-DTttr563.mjs";
|
|
4
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/start-Vq3Oan3v.js
|
|
6
5
|
function dedupeSerializationAdapters(deduped, serializationAdapters) {
|
|
7
6
|
for (let i = 0, len = serializationAdapters.length; i < len; i++) {
|
|
8
7
|
const current = serializationAdapters[i];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { U as require_jsx_runtime, c as SwitchThumb, l as SwitchRoot } from "../_libs/@base-ui/react+[...].mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { W as cn } from "./router-54IDWTVz.mjs";
|
|
3
3
|
//#region node_modules/.nitro/vite/services/ssr/assets/switch-1pnd_bPJ.js
|
|
4
4
|
var import_jsx_runtime = require_jsx_runtime();
|
|
5
5
|
function Switch$1({ className, size = "default", ...props }) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { U as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
2
2
|
import { f as Link } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { n as agentManifest } from "./agents-
|
|
3
|
+
import { o as connectorManifest } from "./connections-Df-aDpfJ.mjs";
|
|
4
|
+
import { n as agentManifest } from "./agents-DG643yoJ.mjs";
|
|
5
5
|
import { A as CircleMinus, D as CircleSlash, I as Bot, T as CircleX, b as FileText, d as Plug, g as Loader, j as CircleCheck, n as Workflow, w as Clock } from "../_libs/lucide-react.mjs";
|
|
6
|
-
import {
|
|
7
|
-
import { t as ConnectorIcon } from "./connector-icon-
|
|
8
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/task-list-
|
|
6
|
+
import { B as Card, R as Badge, V as CardContent, W as cn, p as useLiveTasks } from "./router-54IDWTVz.mjs";
|
|
7
|
+
import { t as ConnectorIcon } from "./connector-icon-WvxwZ5TF.mjs";
|
|
8
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/task-list-_qgBS9LU.js
|
|
9
9
|
var import_jsx_runtime = require_jsx_runtime();
|
|
10
10
|
var STATES = {
|
|
11
11
|
queued: {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { f as eq, u as desc } from "../_libs/drizzle-orm.mjs";
|
|
2
2
|
import { c as loops, d as runDir, g as tasks, s as db } from "./client-BtVRVhQ2.mjs";
|
|
3
|
-
import { a as
|
|
4
|
-
import {
|
|
5
|
-
import { t as availableAgentIds } from "./runners-
|
|
3
|
+
import { a as connectorAction, c as connectorWorkflow, l as credentialForConnector, o as connectorManifest, s as connectorRuntime } from "./connections-Df-aDpfJ.mjs";
|
|
4
|
+
import { i as listAgents, n as agentManifest, s as settingsFor } from "./agents-DG643yoJ.mjs";
|
|
5
|
+
import { t as availableAgentIds } from "./runners-D2UAdLyj.mjs";
|
|
6
6
|
import { randomUUID } from "node:crypto";
|
|
7
7
|
import { existsSync, readFileSync, statSync, writeFileSync } from "node:fs";
|
|
8
8
|
import { isAbsolute, join } from "node:path";
|
|
9
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/tasks-
|
|
9
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/tasks-BDqznm57.js
|
|
10
10
|
/** The agent says this when the honest answer is silence. */
|
|
11
11
|
var AGENT_NOTHING = "NOTHING_TO_DO";
|
|
12
12
|
function isAgentNothing(text) {
|
|
@@ -608,5 +608,16 @@ async function finish(id, task, values) {
|
|
|
608
608
|
leaseUntil: null
|
|
609
609
|
});
|
|
610
610
|
}
|
|
611
|
+
async function defaultAgentFor(pinned) {
|
|
612
|
+
if (pinned) {
|
|
613
|
+
if (!agentManifest(pinned)) throw new Error(`Unknown agent: ${pinned}`);
|
|
614
|
+
return pinned;
|
|
615
|
+
}
|
|
616
|
+
const available = await availableAgentIds();
|
|
617
|
+
const chosen = (await listAgents()).find((agent) => agent.isDefault)?.agentId ?? null;
|
|
618
|
+
if (chosen && available.includes(chosen)) return chosen;
|
|
619
|
+
if (available.length === 1) return available[0];
|
|
620
|
+
throw new Error("No agent is available. Start a runner with an agent signed in.");
|
|
621
|
+
}
|
|
611
622
|
//#endregion
|
|
612
|
-
export {
|
|
623
|
+
export { enqueueTask as a, jobRequiresHost as c, readTaskLog as d, requestCancel as f, enqueueSignal as i, listRunnableAgents as l, updateTask as m, defaultAgentFor as n, getTask as o, taskRow as p, enqueuePrompt as r, jobForTask as s, absorbAgentOutput as t, listTasks as u };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { n as createServerFn } from "./ssr.mjs";
|
|
2
2
|
import { f as eq } from "../_libs/drizzle-orm.mjs";
|
|
3
3
|
import { r as appSettings, s as db } from "./client-BtVRVhQ2.mjs";
|
|
4
|
-
import { l as onlineRunnerCount } from "./runners-
|
|
5
|
-
import { a as
|
|
4
|
+
import { l as onlineRunnerCount } from "./runners-D2UAdLyj.mjs";
|
|
5
|
+
import { a as enqueueTask, d as readTaskLog, f as requestCancel, l as listRunnableAgents, o as getTask, r as enqueuePrompt, u as listTasks } from "./tasks-BDqznm57.mjs";
|
|
6
6
|
import { t as createServerRpc } from "./createServerRpc-DPDrnFdH.mjs";
|
|
7
7
|
import { randomUUID } from "node:crypto";
|
|
8
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/tasks-
|
|
8
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/tasks-Qtml5TlK.js
|
|
9
9
|
async function readSetting(key, fallback) {
|
|
10
10
|
const row = await db().select().from(appSettings).where(eq(appSettings.key, key)).get();
|
|
11
11
|
return row === void 0 ? fallback : row.value;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../_runtime.mjs";
|
|
2
2
|
import { U as require_jsx_runtime, W as require_react } from "../_libs/@base-ui/react+[...].mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { W as cn } from "./router-54IDWTVz.mjs";
|
|
4
4
|
require_react();
|
|
5
5
|
var import_jsx_runtime = require_jsx_runtime();
|
|
6
6
|
function Textarea({ className, ...props }) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/_tanstack-start-manifest_v-
|
|
1
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/_tanstack-start-manifest_v-CvheE7ZF.js
|
|
2
2
|
var tsrStartManifest = () => ({ routes: {
|
|
3
3
|
__root__: {
|
|
4
4
|
filePath: "/Users/bytedance/codex-projects/loopable/src/routes/__root.tsx",
|
|
@@ -23,7 +23,7 @@ var tsrStartManifest = () => ({ routes: {
|
|
|
23
23
|
"/api/runners/jobs/$taskId/log"
|
|
24
24
|
],
|
|
25
25
|
preloads: [
|
|
26
|
-
"/assets/index-
|
|
26
|
+
"/assets/index-0yP3Jn_G.js",
|
|
27
27
|
"/assets/rolldown-runtime-CbXtAM7H.js",
|
|
28
28
|
"/assets/preload-helper-CfdAYKD7.js",
|
|
29
29
|
"/assets/select-Cppu-hti.js",
|
|
@@ -32,20 +32,21 @@ var tsrStartManifest = () => ({ routes: {
|
|
|
32
32
|
scripts: [{ attrs: {
|
|
33
33
|
type: "module",
|
|
34
34
|
async: !0,
|
|
35
|
-
src: "/assets/index-
|
|
35
|
+
src: "/assets/index-0yP3Jn_G.js"
|
|
36
36
|
} }]
|
|
37
37
|
},
|
|
38
38
|
"/connectors/$connectorId": {
|
|
39
39
|
filePath: "/Users/bytedance/codex-projects/loopable/src/routes/connectors/$connectorId.tsx",
|
|
40
40
|
children: void 0,
|
|
41
41
|
preloads: [
|
|
42
|
-
"/assets/_connectorId-
|
|
42
|
+
"/assets/_connectorId-CkygNLny.js",
|
|
43
43
|
"/assets/arrow-left-CWUZt6k2.js",
|
|
44
|
-
"/assets/connector-icon-
|
|
44
|
+
"/assets/connector-icon-BUoK6Cru.js",
|
|
45
45
|
"/assets/external-link-DC11orFA.js",
|
|
46
46
|
"/assets/loader-B4Epchm_.js",
|
|
47
|
+
"/assets/refresh-cw-C3xBnKfy.js",
|
|
47
48
|
"/assets/trash-2-BXZzBsoV.js",
|
|
48
|
-
"/assets/setting-fields-
|
|
49
|
+
"/assets/setting-fields-bJ_gTG7Q.js",
|
|
49
50
|
"/assets/connection-status-DCqqmY_6.js",
|
|
50
51
|
"/assets/alert-BT2EVMJP.js"
|
|
51
52
|
]
|
|
@@ -54,9 +55,9 @@ var tsrStartManifest = () => ({ routes: {
|
|
|
54
55
|
filePath: "/Users/bytedance/codex-projects/loopable/src/routes/inbox/$taskId.tsx",
|
|
55
56
|
children: void 0,
|
|
56
57
|
preloads: [
|
|
57
|
-
"/assets/_taskId-
|
|
58
|
+
"/assets/_taskId-BKDIJ_Fg.js",
|
|
58
59
|
"/assets/arrow-left-CWUZt6k2.js",
|
|
59
|
-
"/assets/task-list-
|
|
60
|
+
"/assets/task-list-BAxjcVgr.js",
|
|
60
61
|
"/assets/external-link-DC11orFA.js",
|
|
61
62
|
"/assets/loader-B4Epchm_.js",
|
|
62
63
|
"/assets/alert-BT2EVMJP.js"
|
|
@@ -66,34 +67,35 @@ var tsrStartManifest = () => ({ routes: {
|
|
|
66
67
|
filePath: "/Users/bytedance/codex-projects/loopable/src/routes/loops/$loopId.tsx",
|
|
67
68
|
children: void 0,
|
|
68
69
|
preloads: [
|
|
69
|
-
"/assets/_loopId-
|
|
70
|
+
"/assets/_loopId-Cshlc5Ja.js",
|
|
70
71
|
"/assets/arrow-left-CWUZt6k2.js",
|
|
71
|
-
"/assets/loop-form-
|
|
72
|
-
"/assets/task-list-
|
|
72
|
+
"/assets/loop-form-DnSJNc1k.js",
|
|
73
|
+
"/assets/task-list-BAxjcVgr.js",
|
|
73
74
|
"/assets/play-DD4xQgvi.js",
|
|
75
|
+
"/assets/refresh-cw-C3xBnKfy.js",
|
|
74
76
|
"/assets/switch-hRIbNGOj.js",
|
|
75
77
|
"/assets/alert-BT2EVMJP.js",
|
|
76
|
-
"/assets/gaps-
|
|
78
|
+
"/assets/gaps-BtFoD7mF.js"
|
|
77
79
|
]
|
|
78
80
|
},
|
|
79
81
|
"/loops/new": {
|
|
80
82
|
filePath: "/Users/bytedance/codex-projects/loopable/src/routes/loops/new.tsx",
|
|
81
83
|
children: void 0,
|
|
82
84
|
preloads: [
|
|
83
|
-
"/assets/new-
|
|
85
|
+
"/assets/new-m5NlqYQT.js",
|
|
84
86
|
"/assets/arrow-left-CWUZt6k2.js",
|
|
85
87
|
"/assets/arrow-right-dy_oOg_c.js",
|
|
86
|
-
"/assets/loop-form-
|
|
87
|
-
"/assets/connector-icon-
|
|
88
|
+
"/assets/loop-form-DnSJNc1k.js",
|
|
89
|
+
"/assets/connector-icon-BUoK6Cru.js"
|
|
88
90
|
]
|
|
89
91
|
},
|
|
90
92
|
"/connectors/": {
|
|
91
93
|
filePath: "/Users/bytedance/codex-projects/loopable/src/routes/connectors/index.tsx",
|
|
92
94
|
children: void 0,
|
|
93
95
|
preloads: [
|
|
94
|
-
"/assets/connectors-
|
|
96
|
+
"/assets/connectors-CeLBtEtg.js",
|
|
95
97
|
"/assets/arrow-right-dy_oOg_c.js",
|
|
96
|
-
"/assets/connector-icon-
|
|
98
|
+
"/assets/connector-icon-BUoK6Cru.js",
|
|
97
99
|
"/assets/connection-status-DCqqmY_6.js"
|
|
98
100
|
]
|
|
99
101
|
},
|
|
@@ -101,8 +103,8 @@ var tsrStartManifest = () => ({ routes: {
|
|
|
101
103
|
filePath: "/Users/bytedance/codex-projects/loopable/src/routes/inbox/index.tsx",
|
|
102
104
|
children: void 0,
|
|
103
105
|
preloads: [
|
|
104
|
-
"/assets/inbox-
|
|
105
|
-
"/assets/task-list-
|
|
106
|
+
"/assets/inbox-BYNjkNDJ.js",
|
|
107
|
+
"/assets/task-list-BAxjcVgr.js",
|
|
106
108
|
"/assets/play-DD4xQgvi.js",
|
|
107
109
|
"/assets/textarea-Fyuzi6Vp.js"
|
|
108
110
|
]
|
|
@@ -111,18 +113,18 @@ var tsrStartManifest = () => ({ routes: {
|
|
|
111
113
|
filePath: "/Users/bytedance/codex-projects/loopable/src/routes/loops/index.tsx",
|
|
112
114
|
children: void 0,
|
|
113
115
|
preloads: [
|
|
114
|
-
"/assets/loops-
|
|
115
|
-
"/assets/connector-icon-
|
|
116
|
+
"/assets/loops-1CvbqO6m.js",
|
|
117
|
+
"/assets/connector-icon-BUoK6Cru.js",
|
|
116
118
|
"/assets/trash-2-BXZzBsoV.js",
|
|
117
119
|
"/assets/switch-hRIbNGOj.js",
|
|
118
120
|
"/assets/alert-BT2EVMJP.js",
|
|
119
|
-
"/assets/gaps-
|
|
121
|
+
"/assets/gaps-BtFoD7mF.js"
|
|
120
122
|
]
|
|
121
123
|
},
|
|
122
124
|
"/runners/": {
|
|
123
125
|
filePath: "/Users/bytedance/codex-projects/loopable/src/routes/runners/index.tsx",
|
|
124
126
|
children: void 0,
|
|
125
|
-
preloads: ["/assets/runners-
|
|
127
|
+
preloads: ["/assets/runners-D8QVl-Y6.js", "/assets/alert-BT2EVMJP.js"]
|
|
126
128
|
}
|
|
127
129
|
} });
|
|
128
130
|
//#endregion
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { i as __toESM } from "./_runtime.mjs";
|
|
2
2
|
import { U as require_jsx_runtime, W as require_react } from "./_libs/@base-ui/react+[...].mjs";
|
|
3
3
|
import { f as Link, m as useRouter } from "./_libs/@tanstack/react-router+[...].mjs";
|
|
4
|
-
import { a as
|
|
4
|
+
import { a as connectorAction, o as connectorManifest } from "./_ssr/connections-Df-aDpfJ.mjs";
|
|
5
5
|
import { B as ArrowLeft, C as ExternalLink, E as CircleStop, g as Loader, x as FileCode } from "./_libs/lucide-react.mjs";
|
|
6
6
|
import { n as toast } from "./_libs/sonner.mjs";
|
|
7
|
-
import {
|
|
7
|
+
import { B as Card, H as CardHeader, R as Badge, U as CardTitle, V as CardContent, c as Route$12, j as stopTask, m as isTaskActive, p as useLiveTasks, z as Button$1 } from "./_ssr/router-54IDWTVz.mjs";
|
|
8
8
|
import { n as AlertDescription, r as AlertTitle, t as Alert } from "./_ssr/alert-DQvzE7bu.mjs";
|
|
9
|
-
import { i as taskTitle, r as TaskStateLabel, t as KIND_LABEL } from "./_ssr/task-list-
|
|
10
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/_taskId-
|
|
9
|
+
import { i as taskTitle, r as TaskStateLabel, t as KIND_LABEL } from "./_ssr/task-list-_qgBS9LU.mjs";
|
|
10
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/_taskId-V4QLBO2N.js
|
|
11
11
|
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
12
12
|
var import_jsx_runtime = require_jsx_runtime();
|
|
13
13
|
function TaskPage() {
|