loopable-cli 0.1.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/alert-BT2EVMJP.js +1 -0
- package/.output/public/assets/arrow-left-CWUZt6k2.js +1 -0
- package/.output/public/assets/arrow-right-dy_oOg_c.js +1 -0
- package/.output/public/assets/connection-status-DCqqmY_6.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/{external-link-D46X-bXa.js → external-link-DC11orFA.js} +1 -1
- package/.output/public/assets/gaps-BtFoD7mF.js +1 -0
- package/.output/public/assets/inbox-BYNjkNDJ.js +1 -0
- package/.output/public/assets/index-0yP3Jn_G.js +18 -0
- package/.output/public/assets/{loader-CcBl2u8m.js → loader-B4Epchm_.js} +1 -1
- package/.output/public/assets/loop-form-DnSJNc1k.js +1 -0
- package/.output/public/assets/loops-1CvbqO6m.js +1 -0
- package/.output/public/assets/new-m5NlqYQT.js +1 -0
- package/.output/public/assets/play-DD4xQgvi.js +1 -0
- package/.output/public/assets/preload-helper-CfdAYKD7.js +3 -0
- package/.output/public/assets/refresh-cw-C3xBnKfy.js +1 -0
- package/.output/public/assets/rolldown-runtime-CbXtAM7H.js +1 -0
- package/.output/public/assets/runners-D8QVl-Y6.js +1 -0
- package/.output/public/assets/select-Cppu-hti.js +1 -0
- package/.output/public/assets/setting-fields-bJ_gTG7Q.js +3 -0
- package/.output/public/assets/styles-ClTGaXU0.css +2 -0
- package/.output/public/assets/switch-hRIbNGOj.js +1 -0
- package/.output/public/assets/task-list-BAxjcVgr.js +1 -0
- package/.output/public/assets/textarea-Fyuzi6Vp.js +1 -0
- package/.output/public/assets/{trash-2-D6u6NpzO.js → trash-2-BXZzBsoV.js} +1 -1
- package/.output/public/assets/useValueChanged-VVyq4hb9.js +1 -0
- package/.output/server/{_connectorId-8nb5yOzG.mjs → _connectorId-C9yydJrC.mjs} +92 -11
- package/.output/server/_libs/@base-ui/react+[...].mjs +427 -427
- package/.output/server/{_loopId-BsUL1SeL.mjs → _loopId-B0VG-eBC.mjs} +44 -15
- package/.output/server/_ssr/{callback-CUINvl7M.mjs → access-DTttr563.mjs} +39 -5
- package/.output/server/_ssr/{agents-DAOZPgO2.mjs → agents-C7B6RJ6-.mjs} +3 -3
- package/.output/server/_ssr/{agents-Btql102J.mjs → agents-DG643yoJ.mjs} +4 -4
- package/.output/server/_ssr/{alert-NEiOCTOl.mjs → alert-DQvzE7bu.mjs} +1 -1
- package/.output/server/_ssr/{client-CKkOfh-s.mjs → client-BtVRVhQ2.mjs} +4 -2
- package/.output/server/_ssr/{connection-status-Bi5peUAk.mjs → connection-status-BZr3Y-IC.mjs} +2 -2
- package/.output/server/_ssr/{connections-qnw2GVlP.mjs → connections-Df-aDpfJ.mjs} +816 -17
- package/.output/server/_ssr/connector-icon-WvxwZ5TF.mjs +56 -0
- package/.output/server/_ssr/{connectors-BHNwuIMj.mjs → connectors-BU0IiRge.mjs} +7 -6
- package/.output/server/_ssr/{connectors-C28g0i4c.mjs → connectors-e0mf2pMs.mjs} +14 -3
- package/.output/server/_ssr/{gaps-RAFSXLZf.mjs → gaps-Cz76ZicM.mjs} +6 -6
- package/.output/server/_ssr/inbox-CAUBa1I3.mjs +114 -0
- package/.output/server/_ssr/{loop-form-DlObSewZ.mjs → loop-form-FqSaXiHl.mjs} +8 -7
- package/.output/server/_ssr/{loops-APFcP0y6.mjs → loops-D8WuK7Ke.mjs} +200 -7
- package/.output/server/_ssr/{loops-xt2Bn7_q.mjs → loops-Dqoebe8q.mjs} +8 -8
- package/.output/server/_ssr/{new-DfKyd2Wa.mjs → new-bBsVaWD6.mjs} +5 -5
- package/.output/server/_ssr/{router-3WmpE5b_.mjs → router-54IDWTVz.mjs} +68 -62
- package/.output/server/_ssr/{runners-By-mwc3F.mjs → runners-Cj6z9Mqh.mjs} +26 -3
- package/.output/server/_ssr/{runners-DtXs4Q8a.mjs → runners-D2UAdLyj.mjs} +3 -3
- package/.output/server/_ssr/{runners-DI_NxpHC.mjs → runners-DGWaVvWi.mjs} +4 -4
- package/.output/server/_ssr/{secrets-Hqti-niS.mjs → secrets-CRnpwGBh.mjs} +2 -2
- package/.output/server/_ssr/{setting-fields-8vKFj4df.mjs → setting-fields-DzBlslan.mjs} +6 -13
- package/.output/server/_ssr/ssr.mjs +45 -33
- package/.output/server/_ssr/{start-Bdc2GJUI.mjs → start-Vq3Oan3v.mjs} +3 -4
- package/.output/server/_ssr/{switch-ReNglgH6.mjs → switch-1pnd_bPJ.mjs} +2 -2
- package/.output/server/_ssr/{task-list-CUITIqkb.mjs → task-list-_qgBS9LU.mjs} +9 -8
- package/.output/server/_ssr/{tasks-vcoodp_D.mjs → tasks-BDqznm57.mjs} +98 -8
- package/.output/server/_ssr/{tasks-SAjNovX6.mjs → tasks-Qtml5TlK.mjs} +15 -6
- package/.output/server/_ssr/textarea-CHJTKtsJ.mjs +14 -0
- package/.output/server/{_tanstack-start-manifest_v-C0cP5F0M.mjs → _tanstack-start-manifest_v-CvheE7ZF.mjs} +54 -48
- package/.output/server/{_taskId-CXS3lod0.mjs → _taskId-V4QLBO2N.mjs} +17 -10
- package/.output/server/index.mjs +173 -166
- package/README.md +26 -21
- package/dist/cli.mjs +7146 -16
- package/dist/dispatcher.mjs +844 -33
- package/drizzle/0024_prompt_tasks.sql +44 -0
- package/drizzle/meta/_journal.json +7 -0
- package/package.json +21 -17
- package/.output/public/assets/_connectorId-BWjYn5tm.js +0 -1
- package/.output/public/assets/_loopId-Ds4RkyEc.js +0 -1
- package/.output/public/assets/_taskId-BOzICXDf.js +0 -1
- package/.output/public/assets/alert-Bn9-Zm0l.js +0 -1
- package/.output/public/assets/arrow-left-BF9juV9T.js +0 -1
- package/.output/public/assets/arrow-right-CzqvnOY1.js +0 -1
- package/.output/public/assets/button-HCY6DCY-.js +0 -1
- package/.output/public/assets/connection-status-CYZB8kLy.js +0 -1
- package/.output/public/assets/connector-icon-BZ_MUJV_.js +0 -1
- package/.output/public/assets/connectors-BvzttfSu.js +0 -1
- package/.output/public/assets/connectors-DdJNwRN_.js +0 -1
- package/.output/public/assets/gaps-D-I6xiDc.js +0 -1
- package/.output/public/assets/inbox-BUUu9xxE.js +0 -1
- package/.output/public/assets/index-ztzex0FN.js +0 -10
- package/.output/public/assets/loop-form-dB3CLcZb.js +0 -1
- package/.output/public/assets/loops-DRunQrxL.js +0 -1
- package/.output/public/assets/loops-oSdqMd29.js +0 -1
- package/.output/public/assets/manifests-DNMqf7Vi.js +0 -7
- package/.output/public/assets/new-uyFxVjuB.js +0 -1
- package/.output/public/assets/preload-helper-ORbuV86A.js +0 -3
- package/.output/public/assets/runners-DSU3r5Ww.js +0 -1
- package/.output/public/assets/setting-fields-ixkpdBb-.js +0 -3
- package/.output/public/assets/styles-DZL5V1o7.css +0 -2
- package/.output/public/assets/switch-d5ummmHY.js +0 -1
- package/.output/public/assets/task-list-BpOStt9v.js +0 -1
- package/.output/public/assets/tasks-B8MsKgic.js +0 -1
- package/.output/server/_ssr/access-zIl15o8y.mjs +0 -42
- package/.output/server/_ssr/connector-icon-DZXQLLFo.mjs +0 -37
- package/.output/server/_ssr/inbox-k5zHergU.mjs +0 -35
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { i as __toESM } from "./_runtime.mjs";
|
|
2
2
|
import { U as require_jsx_runtime, W as require_react, a as AvatarFallback$1, o as AvatarImage$1, s as AvatarRoot } from "./_libs/@base-ui/react+[...].mjs";
|
|
3
3
|
import { f as Link, m as useRouter } from "./_libs/@tanstack/react-router+[...].mjs";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { i as connectionNoun, o as connectorManifest } from "./_ssr/connections-Df-aDpfJ.mjs";
|
|
5
|
+
import { l as registrableCallbackUrl } from "./_ssr/access-DTttr563.mjs";
|
|
6
6
|
import { B as ArrowLeft, C as ExternalLink, M as CircleAlert, c as RotateCcw, g as Loader, i as Trash2, l as RefreshCw } from "./_libs/lucide-react.mjs";
|
|
7
7
|
import { n as toast } from "./_libs/sonner.mjs";
|
|
8
|
-
import { B as
|
|
9
|
-
import {
|
|
10
|
-
import { t as ConnectionStatusBadge } from "./_ssr/connection-status-
|
|
11
|
-
import { t as ConnectorIcon } from "./_ssr/connector-icon-
|
|
12
|
-
import { n as AlertDescription, r as AlertTitle, t as Alert } from "./_ssr/alert-
|
|
13
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/_connectorId-
|
|
8
|
+
import { B as Card, F as disconnectConnection, H as CardHeader, I as saveConnectionSettings, L as verifyConnection, M as beginQrLogin, N as connectWithToken, P as continueQrLogin, R as Badge, S as Input$1, U as CardTitle, V as CardContent, W as cn, b as Label, u as Route$14, x as Separator$1, z as Button$1 } from "./_ssr/router-54IDWTVz.mjs";
|
|
9
|
+
import { n as initialFieldValues, t as SettingFieldInputs } from "./_ssr/setting-fields-DzBlslan.mjs";
|
|
10
|
+
import { t as ConnectionStatusBadge } from "./_ssr/connection-status-BZr3Y-IC.mjs";
|
|
11
|
+
import { t as ConnectorIcon } from "./_ssr/connector-icon-WvxwZ5TF.mjs";
|
|
12
|
+
import { n as AlertDescription, r as AlertTitle, t as Alert } from "./_ssr/alert-DQvzE7bu.mjs";
|
|
13
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/_connectorId-C9yydJrC.js
|
|
14
14
|
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
15
15
|
var import_jsx_runtime = require_jsx_runtime();
|
|
16
16
|
/** Renders a connector's settings from its manifest, so no page knows the fields. */
|
|
@@ -162,6 +162,72 @@ function QrConnect({ connectorId, note, onDone }) {
|
|
|
162
162
|
]
|
|
163
163
|
}) });
|
|
164
164
|
}
|
|
165
|
+
/**
|
|
166
|
+
* A secret someone already has, pasted once.
|
|
167
|
+
*
|
|
168
|
+
* The token reaches this form and is sent to the server; it is never written
|
|
169
|
+
* back. There is no consent screen and no account login.
|
|
170
|
+
*/
|
|
171
|
+
function TokenConnect({ connectorId, fields, note, helpUrl, onDone }) {
|
|
172
|
+
const router = useRouter();
|
|
173
|
+
const [values, setValues] = (0, import_react.useState)(() => Object.fromEntries(fields.map((field) => [field.key, ""])));
|
|
174
|
+
const [saving, setSaving] = (0, import_react.useState)(false);
|
|
175
|
+
const save = async () => {
|
|
176
|
+
setSaving(true);
|
|
177
|
+
try {
|
|
178
|
+
const result = await connectWithToken({ data: {
|
|
179
|
+
connectorId,
|
|
180
|
+
fields: values
|
|
181
|
+
} });
|
|
182
|
+
toast.success(`Connected ${result.accountLabel ?? connectorId}`);
|
|
183
|
+
await router.invalidate();
|
|
184
|
+
onDone?.();
|
|
185
|
+
} catch (error) {
|
|
186
|
+
toast.error(error instanceof Error ? error.message : String(error));
|
|
187
|
+
} finally {
|
|
188
|
+
setSaving(false);
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Card, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardContent, {
|
|
192
|
+
className: "flex flex-col gap-4 py-6",
|
|
193
|
+
children: [
|
|
194
|
+
note ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
195
|
+
className: "text-sm text-muted-foreground",
|
|
196
|
+
children: note
|
|
197
|
+
}) : null,
|
|
198
|
+
helpUrl ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", {
|
|
199
|
+
href: helpUrl,
|
|
200
|
+
target: "_blank",
|
|
201
|
+
rel: "noreferrer",
|
|
202
|
+
className: "text-sm text-muted-foreground hover:text-foreground",
|
|
203
|
+
children: "Open the app dashboard"
|
|
204
|
+
}) : null,
|
|
205
|
+
fields.map((field) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
206
|
+
className: "flex flex-col gap-1.5",
|
|
207
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Label, {
|
|
208
|
+
htmlFor: `token-${field.key}`,
|
|
209
|
+
children: field.label
|
|
210
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input$1, {
|
|
211
|
+
id: `token-${field.key}`,
|
|
212
|
+
type: field.secret ? "password" : "text",
|
|
213
|
+
autoComplete: "off",
|
|
214
|
+
spellCheck: false,
|
|
215
|
+
placeholder: field.placeholder,
|
|
216
|
+
value: values[field.key] ?? "",
|
|
217
|
+
onChange: (event) => setValues((prev) => ({
|
|
218
|
+
...prev,
|
|
219
|
+
[field.key]: event.target.value
|
|
220
|
+
}))
|
|
221
|
+
})]
|
|
222
|
+
}, field.key)),
|
|
223
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$1, {
|
|
224
|
+
onClick: save,
|
|
225
|
+
disabled: saving,
|
|
226
|
+
children: saving ? "Connecting..." : "Connect"
|
|
227
|
+
}) })
|
|
228
|
+
]
|
|
229
|
+
}) });
|
|
230
|
+
}
|
|
165
231
|
function Avatar$1({ className, size = "default", ...props }) {
|
|
166
232
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AvatarRoot, {
|
|
167
233
|
"data-slot": "avatar",
|
|
@@ -190,7 +256,9 @@ function ConnectorDetailPage() {
|
|
|
190
256
|
const manifest = connectorManifest(connectorId);
|
|
191
257
|
const canAddAccount = manifest.allowsMultipleAccounts || state.connections.length === 0;
|
|
192
258
|
const scans = manifest.auth.kind === "qr_scan";
|
|
259
|
+
const tokens = manifest.auth.kind === "token";
|
|
193
260
|
const [scanning, setScanning] = (0, import_react.useState)(false);
|
|
261
|
+
const [pasting, setPasting] = (0, import_react.useState)(false);
|
|
194
262
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
195
263
|
className: "flex flex-col gap-6",
|
|
196
264
|
children: [
|
|
@@ -220,6 +288,9 @@ function ConnectorDetailPage() {
|
|
|
220
288
|
state.readiness.ready && canAddAccount ? scans ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$1, {
|
|
221
289
|
onClick: () => setScanning((open) => !open),
|
|
222
290
|
children: scanning ? "Cancel" : "Connect"
|
|
291
|
+
}) : tokens ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$1, {
|
|
292
|
+
onClick: () => setPasting((open) => !open),
|
|
293
|
+
children: pasting ? "Cancel" : "Add bot"
|
|
223
294
|
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$1, {
|
|
224
295
|
render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { href: `/api/connectors/${connectorId}/authorize` }),
|
|
225
296
|
children: state.connections.length > 0 ? "Add another account" : "Connect"
|
|
@@ -231,6 +302,13 @@ function ConnectorDetailPage() {
|
|
|
231
302
|
note: manifest.auth.note,
|
|
232
303
|
onDone: () => setScanning(false)
|
|
233
304
|
}) : null,
|
|
305
|
+
pasting && manifest.auth.kind === "token" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TokenConnect, {
|
|
306
|
+
connectorId,
|
|
307
|
+
fields: manifest.auth.fields,
|
|
308
|
+
note: manifest.auth.note,
|
|
309
|
+
helpUrl: manifest.auth.helpUrl,
|
|
310
|
+
onDone: () => setPasting(false)
|
|
311
|
+
}) : null,
|
|
234
312
|
!state.readiness.ready ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert, {
|
|
235
313
|
variant: "destructive",
|
|
236
314
|
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(AlertTitle, { children: [manifest.name, " is not available in this build"] }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(AlertDescription, {
|
|
@@ -245,10 +323,12 @@ function ConnectorDetailPage() {
|
|
|
245
323
|
]
|
|
246
324
|
})]
|
|
247
325
|
}) : null,
|
|
248
|
-
state.connections.length === 0 && state.readiness.ready && !scanning ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Card, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardContent, {
|
|
326
|
+
state.connections.length === 0 && state.readiness.ready && !scanning && !pasting ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Card, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardContent, {
|
|
249
327
|
className: "py-8 text-center text-sm text-muted-foreground",
|
|
250
328
|
children: [
|
|
251
|
-
"No
|
|
329
|
+
"No ",
|
|
330
|
+
connectionNoun(connectorId),
|
|
331
|
+
" connected yet.",
|
|
252
332
|
manifest.auth.kind === "oauth_redirect" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
253
333
|
" ",
|
|
254
334
|
"Connecting opens ",
|
|
@@ -258,7 +338,8 @@ function ConnectorDetailPage() {
|
|
|
258
338
|
manifest.auth.scopes.join(", "),
|
|
259
339
|
"."
|
|
260
340
|
] }) : null,
|
|
261
|
-
manifest.auth.kind === "qr_scan" ? " Connecting shows a code to scan." : null
|
|
341
|
+
manifest.auth.kind === "qr_scan" ? " Connecting shows a code to scan." : null,
|
|
342
|
+
manifest.auth.kind === "token" ? " Connecting asks for app credentials, not a personal login." : null
|
|
262
343
|
]
|
|
263
344
|
}) }) : null,
|
|
264
345
|
state.connections.map((connection) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ConnectionCard, {
|