@voltro/cli 0.29.0 → 0.30.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.
- package/CHANGELOG.md +377 -0
- package/THIRD-PARTY-NOTICES.md +2 -2
- package/dist/{apiBuild-BESZbTjA.js → apiBuild-BceikpQf.js} +2 -2
- package/dist/apiBuild-CxvR1Dwt.js +2 -0
- package/dist/bin.js +3 -3
- package/dist/{checkCommand-BPAtyWs8.js → checkCommand-BMr-X48w.js} +23 -16
- package/dist/checkCommand-BOk9y264.js +2 -0
- package/dist/{commands-82BDEktg.js → commands-D4Y1-Nlu.js} +1936 -1339
- package/dist/{dbCommand-bCBbk6tz.js → dbCommand-C7hbl5pk.js} +344 -265
- package/dist/dbCommand-D8nhyppR.js +2 -0
- package/dist/{dev-DeEJj5T4.js → dev-Cr-teYsz.js} +1 -1
- package/dist/{dev-Cg4BKLmi.js → dev-DmnkH-wr.js} +2660 -1742
- package/dist/{frameworkTableAssembly-4Db40V23.js → frameworkTableAssembly-BzAajuUv.js} +114 -98
- package/dist/frameworkTableAssembly-DU0aOxjL.js +2 -0
- package/dist/index.d.ts +7 -2
- package/dist/index.js +1 -1
- package/dist/{inspect-BMvQpwqy.js → inspect-BUUjt773.js} +150 -14
- package/dist/inspect-mmBuRXmy.js +2 -0
- package/dist/{inspectMetrics-DHYygE4s.js → inspectMetrics-BeJdP_3b.js} +564 -512
- package/dist/{manifestBuild-C4R1EdHn.js → manifestBuild-BLrVuSlM.js} +1 -1
- package/dist/manifestBuild-Dj8Jjoto.js +2 -0
- package/dist/{sdkgen-CW5NbYF0.js → sdkgen-CqpOq_fy.js} +1 -1
- package/dist/serveCommand-Ciq_wIY8.js +1577 -0
- package/dist/serveEntry.js +2 -2
- package/dist/{start-CsCIaW4-.js → start-ocqB1seX.js} +19 -19
- package/dist/startEntry.js +2 -2
- package/package.json +17 -17
- package/templates/AGENTS.core.md +50 -0
- package/templates/AGENTS.md +53 -2
- package/templates/agent-docs/_index.md +3 -2
- package/templates/agent-docs/_manifest.json +16 -4
- package/templates/agent-docs/ai.md +56 -0
- package/templates/agent-docs/cli.md +19 -0
- package/templates/agent-docs/internationalization.md +8 -7
- package/templates/agent-docs/local-first-mobile.md +18 -6
- package/templates/agent-docs/routing.md +1 -1
- package/templates/agent-docs/security.md +17 -0
- package/templates/agent-docs/templates/apibackends.md +209 -0
- package/templates/agent-docs/templates/appshells.md +144 -1
- package/templates/agent-docs/templates/mobile.md +60 -0
- package/templates/agent-docs/templates/overview.md +17 -7
- package/templates/agent-docs/whats-new.md +256 -157
- package/templates/agent-docs/workflows.md +365 -0
- package/templates/apps/api-ai/package.json +7 -7
- package/templates/apps/api-auth/package.json +8 -8
- package/templates/apps/api-backend/package.json +7 -7
- package/templates/apps/api-backend-deactivation/package.json +7 -7
- package/templates/apps/api-backend-mail/package.json +8 -8
- package/templates/apps/api-backend-mariadb/package.json +9 -9
- package/templates/apps/api-backend-sqlite/package.json +8 -8
- package/templates/apps/api-backend-storage/package.json +8 -8
- package/templates/apps/api-cms/package.json +10 -10
- package/templates/apps/api-collab/README.md +70 -0
- package/templates/apps/api-collab/app.config.ts +28 -0
- package/templates/apps/api-collab/database/schema.ts +63 -0
- package/templates/apps/api-collab/mutations/documents.create.mutation.server.ts +19 -0
- package/templates/apps/api-collab/mutations/documents.create.mutation.ts +36 -0
- package/templates/apps/api-collab/mutations/documents.setBody.mutation.server.ts +20 -0
- package/templates/apps/api-collab/mutations/documents.setBody.mutation.ts +30 -0
- package/templates/apps/api-collab/package.json +30 -0
- package/templates/apps/api-collab/queries/documents.query.server.ts +16 -0
- package/templates/apps/api-collab/queries/documents.query.ts +23 -0
- package/templates/apps/api-collab/template.json +6 -0
- package/templates/apps/api-collab/tests/documents.setBody.test.ts +89 -0
- package/templates/apps/api-collab/tsconfig.json +5 -0
- package/templates/apps/api-data-advanced/package.json +8 -8
- package/templates/apps/api-durable/package.json +8 -8
- package/templates/apps/api-feature-flags/package.json +9 -9
- package/templates/apps/api-governance/package.json +8 -8
- package/templates/apps/api-kv/package.json +8 -8
- package/templates/apps/api-moderation/package.json +8 -8
- package/templates/apps/api-observability/package.json +8 -8
- package/templates/apps/api-ratelimit/package.json +8 -8
- package/templates/apps/api-rbac/package.json +8 -8
- package/templates/apps/api-rest/package.json +7 -7
- package/templates/apps/api-saas/package.json +11 -11
- package/templates/apps/api-saas-starter/package.json +10 -10
- package/templates/apps/api-search/package.json +8 -8
- package/templates/apps/api-status/package.json +8 -8
- package/templates/apps/api-versioning/package.json +8 -8
- package/templates/apps/api-webhooks/package.json +9 -9
- package/templates/apps/changelog/package.json +6 -6
- package/templates/apps/edge-functions/package.json +2 -2
- package/templates/apps/frontend-admin/app.config.ts +1 -1
- package/templates/apps/frontend-admin/package.json +8 -8
- package/templates/apps/frontend-admin/src/locales/index.ts +1 -1
- package/templates/apps/frontend-app/app.config.ts +1 -1
- package/templates/apps/frontend-app/package.json +8 -8
- package/templates/apps/frontend-app/src/locales/index.ts +1 -1
- package/templates/apps/frontend-app/src/pages/layout.tsx +1 -1
- package/templates/apps/frontend-app/src/pages/page.tsx +1 -1
- package/templates/apps/frontend-auth/package.json +8 -8
- package/templates/apps/frontend-auth/src/locales/index.ts +1 -1
- package/templates/apps/frontend-blank/app.config.ts +1 -1
- package/templates/apps/frontend-blank/package.json +7 -7
- package/templates/apps/frontend-blank/src/locales/index.ts +1 -1
- package/templates/apps/frontend-blank/src/pages/layout.tsx +1 -1
- package/templates/apps/frontend-blank/src/pages/page.tsx +1 -1
- package/templates/apps/frontend-cms/package.json +9 -9
- package/templates/apps/frontend-cms/src/locales/index.ts +1 -1
- package/templates/apps/frontend-collab/README.md +80 -0
- package/templates/apps/frontend-collab/app.config.ts +38 -0
- package/templates/apps/frontend-collab/package.json +33 -0
- package/templates/apps/frontend-collab/src/locales/de.ts +29 -0
- package/templates/apps/frontend-collab/src/locales/en.ts +31 -0
- package/templates/apps/frontend-collab/src/locales/index.ts +15 -0
- package/templates/apps/frontend-collab/src/pages/layout.tsx +39 -0
- package/templates/apps/frontend-collab/src/pages/page.test.tsx +150 -0
- package/templates/apps/frontend-collab/src/pages/page.tsx +186 -0
- package/templates/apps/frontend-collab/template.json +6 -0
- package/templates/apps/frontend-collab/tsconfig.json +11 -0
- package/templates/apps/frontend-contact/package.json +7 -7
- package/templates/apps/frontend-dashboard/app.config.ts +1 -1
- package/templates/apps/frontend-dashboard/package.json +7 -7
- package/templates/apps/frontend-dashboard/src/locales/index.ts +1 -1
- package/templates/apps/frontend-docs/package.json +7 -7
- package/templates/apps/frontend-i18n/package.json +6 -6
- package/templates/apps/frontend-landing/package.json +7 -7
- package/templates/apps/frontend-portal/package.json +8 -8
- package/templates/apps/frontend-portal/src/locales/index.ts +1 -1
- package/templates/apps/frontend-saas/README.md +1 -1
- package/templates/apps/frontend-saas/app.config.ts +1 -1
- package/templates/apps/frontend-saas/package.json +8 -8
- package/templates/apps/frontend-saas/src/locales/index.ts +1 -1
- package/templates/apps/frontend-spa/app.config.ts +1 -1
- package/templates/apps/frontend-spa/package.json +7 -7
- package/templates/apps/frontend-spa/src/locales/index.ts +1 -1
- package/templates/apps/frontend-spa/src/pages/layout.tsx +1 -1
- package/templates/apps/frontend-spa/src/pages/page.tsx +1 -1
- package/templates/apps/frontend-ssr/app.config.ts +1 -1
- package/templates/apps/frontend-ssr/package.json +7 -7
- package/templates/apps/frontend-ssr/src/locales/index.ts +1 -1
- package/templates/apps/frontend-ssr/src/pages/layout.tsx +1 -1
- package/templates/apps/frontend-ssr/src/pages/page.tsx +1 -1
- package/templates/apps/frontend-ssr-api/app.config.ts +1 -1
- package/templates/apps/frontend-ssr-api/package.json +8 -8
- package/templates/apps/frontend-ssr-api/src/locales/index.ts +1 -1
- package/templates/apps/frontend-ssr-api/src/pages/layout.tsx +1 -1
- package/templates/apps/frontend-static-blog/package.json +6 -6
- package/templates/apps/frontend-status/package.json +8 -8
- package/templates/apps/frontend-status/src/locales/index.ts +1 -1
- package/templates/apps/mobile-app/README.md +58 -0
- package/templates/apps/mobile-app/app.config.ts +33 -0
- package/templates/apps/mobile-app/babel.config.js +5 -0
- package/templates/apps/mobile-app/metro.config.js +20 -0
- package/templates/apps/mobile-app/package.json +33 -0
- package/templates/apps/mobile-app/src/app/_layout.tsx +61 -0
- package/templates/apps/mobile-app/src/app/index.tsx +62 -0
- package/templates/apps/mobile-app/src/app/orders/[id].tsx +19 -0
- package/templates/apps/mobile-app/src/app/settings.tsx +51 -0
- package/templates/apps/mobile-app/src/client.ts +74 -0
- package/templates/apps/mobile-app/src/lib/deeplinks.ts +39 -0
- package/templates/apps/mobile-app/src/lib/notifications.ts +31 -0
- package/templates/apps/mobile-app/src/lib/sync.ts +29 -0
- package/templates/apps/mobile-app/src/persistence.ts +38 -0
- package/templates/apps/mobile-app/template.json +6 -0
- package/templates/apps/mobile-app/tests/deeplinks.test.ts +32 -0
- package/templates/apps/mobile-app/tests/notifications.test.ts +26 -0
- package/templates/apps/mobile-app/tests/sync.test.ts +34 -0
- package/templates/apps/mobile-app/tsconfig.json +10 -0
- package/templates/apps/mobile-app/voltro.mobile.ts +11 -0
- package/templates/patches/@effect__cluster@0.60.0.patch +6 -6
- package/dist/apiBuild-C8d74T6g.js +0 -2
- package/dist/checkCommand-DBvZvCh1.js +0 -2
- package/dist/dbCommand-CaIVTp-a.js +0 -2
- package/dist/frameworkTableAssembly-BTNirAAk.js +0 -2
- package/dist/inspect-DHeaMZak.js +0 -2
- package/dist/manifestBuild-Ck_90gZy.js +0 -2
- package/dist/serveCommand-BXl8mhZD.js +0 -1489
|
@@ -509,10 +509,15 @@ var n = "/_voltro/inspect", r = () => process.env.VOLTRO_INSPECT === "off", i =
|
|
|
509
509
|
}, o);
|
|
510
510
|
let d = O(e);
|
|
511
511
|
try {
|
|
512
|
-
let e = d.get("deadLettered") === "1" || d.get("deadLettered") === "true";
|
|
512
|
+
let e = d.get("deadLettered") === "1" || d.get("deadLettered") === "true", n = (d.get("statuses") ?? "").split(",").map((e) => e.trim()).filter((e) => e !== "");
|
|
513
513
|
return s(200, await t.inspectWorkflowRuns({
|
|
514
514
|
...d.get("tag") === null ? {} : { tag: d.get("tag") },
|
|
515
|
-
...e ? { deadLettered: !0 } : d.get("status") === null ? {} : { status: d.get("status") },
|
|
515
|
+
...e ? { deadLettered: !0 } : d.get("status") === null ? n.length > 0 ? { statuses: n } : {} : { status: d.get("status") },
|
|
516
|
+
...d.get("q") === null ? {} : { tagContains: d.get("q") },
|
|
517
|
+
...d.get("source") === null ? {} : { source: d.get("source") },
|
|
518
|
+
...d.get("idPrefix") === null ? {} : { idPrefix: d.get("idPrefix") },
|
|
519
|
+
...d.get("from") === null ? {} : { startedAfter: d.get("from") },
|
|
520
|
+
...d.get("to") === null ? {} : { startedBefore: d.get("to") },
|
|
516
521
|
offset: k(d.get("offset")) ?? 0,
|
|
517
522
|
limit: k(d.get("limit")) ?? 50
|
|
518
523
|
}), o);
|
|
@@ -522,7 +527,41 @@ var n = "/_voltro/inspect", r = () => process.env.VOLTRO_INSPECT === "off", i =
|
|
|
522
527
|
message: e?.message ?? String(e)
|
|
523
528
|
}, o);
|
|
524
529
|
}
|
|
525
|
-
}, j = async (e, t, n, i
|
|
530
|
+
}, j = async (e, t, n, i = {}) => {
|
|
531
|
+
if (_(e) !== "/_voltro/inspect/workflows/stats") return null;
|
|
532
|
+
let o = l(n.origin ?? n.Origin), c = (i.method ?? "GET").toUpperCase();
|
|
533
|
+
if (c !== "GET") return s(405, {
|
|
534
|
+
error: "method not allowed",
|
|
535
|
+
expected: "GET"
|
|
536
|
+
}, o);
|
|
537
|
+
if (r()) return s(503, { error: "inspect disabled (VOLTRO_INSPECT=off)" }, o);
|
|
538
|
+
let u = (i.authResolver ?? a)(n, c);
|
|
539
|
+
if (!u.ok) return s(401, {
|
|
540
|
+
error: "unauthorized",
|
|
541
|
+
reason: u.reason
|
|
542
|
+
}, o);
|
|
543
|
+
if (t.kind !== "api") return s(404, { error: "workflows endpoint is api-only" }, o);
|
|
544
|
+
if (t.inspectWorkflowRunStats === void 0) return s(200, {
|
|
545
|
+
windowHours: 24,
|
|
546
|
+
bucketMinutes: 30,
|
|
547
|
+
buckets: [],
|
|
548
|
+
byTag: [],
|
|
549
|
+
total: 0,
|
|
550
|
+
truncated: !1
|
|
551
|
+
}, o);
|
|
552
|
+
let d = O(e);
|
|
553
|
+
try {
|
|
554
|
+
return s(200, await t.inspectWorkflowRunStats({
|
|
555
|
+
...d.get("tag") === null ? {} : { tag: d.get("tag") },
|
|
556
|
+
...k(d.get("hours")) === void 0 ? {} : { hours: k(d.get("hours")) }
|
|
557
|
+
}), o);
|
|
558
|
+
} catch (e) {
|
|
559
|
+
return s(500, {
|
|
560
|
+
error: "workflow-stats query failed",
|
|
561
|
+
message: e?.message ?? String(e)
|
|
562
|
+
}, o);
|
|
563
|
+
}
|
|
564
|
+
}, M = async (e, t, n, i, o = {}) => {
|
|
526
565
|
let c = _(e).match(/^\/_voltro\/inspect\/workflows\/start\/([^/]+)$/);
|
|
527
566
|
if (!c) return null;
|
|
528
567
|
let u = decodeURIComponent(c[1] ?? ""), d = l(n.origin ?? n.Origin), f = (o.method ?? "POST").toUpperCase();
|
|
@@ -555,7 +594,7 @@ var n = "/_voltro/inspect", r = () => process.env.VOLTRO_INSPECT === "off", i =
|
|
|
555
594
|
message: e?.message ?? String(e)
|
|
556
595
|
}, d);
|
|
557
596
|
}
|
|
558
|
-
},
|
|
597
|
+
}, N = async (e, t, n, i = {}) => {
|
|
559
598
|
let o = _(e);
|
|
560
599
|
if (!o.startsWith("/_voltro/inspect/schedules")) return null;
|
|
561
600
|
let c = l(n.origin ?? n.Origin);
|
|
@@ -623,7 +662,7 @@ var n = "/_voltro/inspect", r = () => process.env.VOLTRO_INSPECT === "off", i =
|
|
|
623
662
|
error: "unknown schedules endpoint",
|
|
624
663
|
path: o
|
|
625
664
|
}, c);
|
|
626
|
-
},
|
|
665
|
+
}, P = async (e, t, n, i = {}) => {
|
|
627
666
|
if (_(e) !== "/_voltro/inspect/cluster") return null;
|
|
628
667
|
let o = l(n.origin ?? n.Origin);
|
|
629
668
|
if (r()) return s(503, { error: "inspect disabled (VOLTRO_INSPECT=off)" }, o);
|
|
@@ -671,7 +710,7 @@ var n = "/_voltro/inspect", r = () => process.env.VOLTRO_INSPECT === "off", i =
|
|
|
671
710
|
message: e?.message ?? String(e)
|
|
672
711
|
}, o);
|
|
673
712
|
}
|
|
674
|
-
},
|
|
713
|
+
}, F = async (e, t, n, i = {}) => {
|
|
675
714
|
let o = _(e).match(/^\/_voltro\/inspect\/workflows\/runs\/([^/]+)\/steps$/);
|
|
676
715
|
if (!o) return null;
|
|
677
716
|
let c = decodeURIComponent(o[1] ?? ""), u = l(n.origin ?? n.Origin), d = (i.method ?? "GET").toUpperCase();
|
|
@@ -695,7 +734,7 @@ var n = "/_voltro/inspect", r = () => process.env.VOLTRO_INSPECT === "off", i =
|
|
|
695
734
|
message: e?.message ?? String(e)
|
|
696
735
|
}, u);
|
|
697
736
|
}
|
|
698
|
-
},
|
|
737
|
+
}, I = async (e, t, n, i = {}) => {
|
|
699
738
|
let o = _(e).match(/^\/_voltro\/inspect\/workflows\/runs\/([^/]+)\/events$/);
|
|
700
739
|
if (!o) return null;
|
|
701
740
|
let c = decodeURIComponent(o[1] ?? ""), u = l(n.origin ?? n.Origin), d = (i.method ?? "GET").toUpperCase();
|
|
@@ -719,7 +758,7 @@ var n = "/_voltro/inspect", r = () => process.env.VOLTRO_INSPECT === "off", i =
|
|
|
719
758
|
message: e?.message ?? String(e)
|
|
720
759
|
}, u);
|
|
721
760
|
}
|
|
722
|
-
},
|
|
761
|
+
}, L = async (e, t, n, i = {}) => {
|
|
723
762
|
if (_(t) !== "/_voltro/inspect/workflows/events") return null;
|
|
724
763
|
let o = l(n.origin ?? n.Origin), c = (i.method ?? "GET").toUpperCase();
|
|
725
764
|
if (c !== "GET") return s(405, {
|
|
@@ -752,7 +791,7 @@ var n = "/_voltro/inspect", r = () => process.env.VOLTRO_INSPECT === "off", i =
|
|
|
752
791
|
message: e?.message ?? String(e)
|
|
753
792
|
}, o);
|
|
754
793
|
}
|
|
755
|
-
},
|
|
794
|
+
}, R = async (e, t, n, i = {}) => {
|
|
756
795
|
let o = _(t).match(/^\/_voltro\/inspect\/workflows\/events\/([^/]+)\/deliveries$/);
|
|
757
796
|
if (!o) return null;
|
|
758
797
|
let c = decodeURIComponent(o[1] ?? ""), u = l(n.origin ?? n.Origin), d = (i.method ?? "GET").toUpperCase();
|
|
@@ -776,7 +815,7 @@ var n = "/_voltro/inspect", r = () => process.env.VOLTRO_INSPECT === "off", i =
|
|
|
776
815
|
message: e?.message ?? String(e)
|
|
777
816
|
}, u);
|
|
778
817
|
}
|
|
779
|
-
},
|
|
818
|
+
}, z = async (e, t, n, i = {}) => {
|
|
780
819
|
if (_(e) !== "/_voltro/inspect/workflows/children") return null;
|
|
781
820
|
let o = l(n.origin ?? n.Origin), c = (i.method ?? "GET").toUpperCase();
|
|
782
821
|
if (c !== "GET") return s(405, {
|
|
@@ -806,7 +845,7 @@ var n = "/_voltro/inspect", r = () => process.env.VOLTRO_INSPECT === "off", i =
|
|
|
806
845
|
message: e?.message ?? String(e)
|
|
807
846
|
}, o);
|
|
808
847
|
}
|
|
809
|
-
},
|
|
848
|
+
}, B = async (e, t, n, i, o = {}) => {
|
|
810
849
|
let c = _(e).match(/^\/_voltro\/inspect\/workflows\/runs\/([^/]+)\/(cancel|retry|suspend|resume-from-step|resume|signal|update|discard|redrive)$/);
|
|
811
850
|
if (!c) return null;
|
|
812
851
|
let u = decodeURIComponent(c[1] ?? ""), d = c[2], f = l(n.origin ?? n.Origin), p = (o.method ?? "POST").toUpperCase();
|
|
@@ -864,7 +903,7 @@ var n = "/_voltro/inspect", r = () => process.env.VOLTRO_INSPECT === "off", i =
|
|
|
864
903
|
message: e?.message ?? String(e)
|
|
865
904
|
}, f);
|
|
866
905
|
}
|
|
867
|
-
},
|
|
906
|
+
}, V = async (e, t, n, i, o = {}) => {
|
|
868
907
|
if (_(e) !== "/_voltro/inspect/data/import" || (o.method ?? "POST").toUpperCase() !== "POST") return null;
|
|
869
908
|
let c = l(n.origin ?? n.Origin);
|
|
870
909
|
if (r()) return s(503, { error: "inspect disabled (VOLTRO_INSPECT=off)" }, c);
|
|
@@ -897,7 +936,7 @@ var n = "/_voltro/inspect", r = () => process.env.VOLTRO_INSPECT === "off", i =
|
|
|
897
936
|
message: e?.message ?? String(e)
|
|
898
937
|
}, c);
|
|
899
938
|
}
|
|
900
|
-
},
|
|
939
|
+
}, H = async (e, t, n, i, o = {}) => {
|
|
901
940
|
let c = _(e);
|
|
902
941
|
if (!c.startsWith("/_voltro/inspect/data/rows")) return null;
|
|
903
942
|
let u = (o.method ?? "POST").toUpperCase();
|
|
@@ -977,6 +1016,103 @@ var n = "/_voltro/inspect", r = () => process.env.VOLTRO_INSPECT === "off", i =
|
|
|
977
1016
|
error: "method not allowed",
|
|
978
1017
|
expected: "POST | PATCH | DELETE"
|
|
979
1018
|
}, d);
|
|
1019
|
+
}, U = async (e, t, i, o, c = {}) => {
|
|
1020
|
+
let u = _(e), d = `${n}/workflows/flow-control`;
|
|
1021
|
+
if (u !== d && !u.startsWith(`${d}/`)) return null;
|
|
1022
|
+
let f = l(i.origin ?? i.Origin), p = (c.method ?? "GET").toUpperCase();
|
|
1023
|
+
if (r()) return s(503, { error: "inspect disabled (VOLTRO_INSPECT=off)" }, f);
|
|
1024
|
+
let m = (c.authResolver ?? a)(i, p);
|
|
1025
|
+
if (!m.ok) return s(401, {
|
|
1026
|
+
error: "unauthorized",
|
|
1027
|
+
reason: m.reason
|
|
1028
|
+
}, f);
|
|
1029
|
+
if (t.kind !== "api") return s(404, { error: "flow control is api-only" }, f);
|
|
1030
|
+
if (u === `${d}/inferences`) {
|
|
1031
|
+
if (p !== "GET") return s(405, {
|
|
1032
|
+
error: "method not allowed",
|
|
1033
|
+
expected: "GET"
|
|
1034
|
+
}, f);
|
|
1035
|
+
if (t.inspectInferences === void 0) return s(404, { error: "inspectInferences not configured" }, f);
|
|
1036
|
+
let n = O(e).get("limit"), r = n === null ? void 0 : Number(n);
|
|
1037
|
+
try {
|
|
1038
|
+
return s(200, await t.inspectInferences(r !== void 0 && Number.isFinite(r) ? { limit: r } : {}), f);
|
|
1039
|
+
} catch (e) {
|
|
1040
|
+
return s(500, {
|
|
1041
|
+
error: "inference queue read failed",
|
|
1042
|
+
message: e?.message ?? String(e)
|
|
1043
|
+
}, f);
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
if (u === d) {
|
|
1047
|
+
if (p !== "GET") return s(405, {
|
|
1048
|
+
error: "method not allowed",
|
|
1049
|
+
expected: "GET"
|
|
1050
|
+
}, f);
|
|
1051
|
+
if (t.inspectFlowControl === void 0) return s(404, { error: "inspectFlowControl not configured" }, f);
|
|
1052
|
+
let n = O(e).get("limit"), r = n === null ? void 0 : Number(n);
|
|
1053
|
+
try {
|
|
1054
|
+
return s(200, await t.inspectFlowControl(r !== void 0 && Number.isFinite(r) ? { limit: r } : {}), f);
|
|
1055
|
+
} catch (e) {
|
|
1056
|
+
return s(500, {
|
|
1057
|
+
error: "flow control read failed",
|
|
1058
|
+
message: e?.message ?? String(e)
|
|
1059
|
+
}, f);
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
if (p !== "POST") return s(405, {
|
|
1063
|
+
error: "method not allowed",
|
|
1064
|
+
expected: "POST"
|
|
1065
|
+
}, f);
|
|
1066
|
+
let h = {};
|
|
1067
|
+
if (o.length > 0) try {
|
|
1068
|
+
h = JSON.parse(o);
|
|
1069
|
+
} catch {
|
|
1070
|
+
return s(400, { error: "expected a JSON body" }, f);
|
|
1071
|
+
}
|
|
1072
|
+
let g = u.slice(d.length + 1);
|
|
1073
|
+
try {
|
|
1074
|
+
if (g === "pause") return t.inspectPauseWorkflow === void 0 ? s(404, { error: "inspectPauseWorkflow not configured" }, f) : h.workflow ? s(200, await t.inspectPauseWorkflow({
|
|
1075
|
+
workflow: h.workflow,
|
|
1076
|
+
...h.reason === void 0 ? {} : { reason: h.reason }
|
|
1077
|
+
}), f) : s(400, { error: "body.workflow is required" }, f);
|
|
1078
|
+
if (g === "resume") return t.inspectResumeWorkflow === void 0 ? s(404, { error: "inspectResumeWorkflow not configured" }, f) : h.workflow ? s(200, await t.inspectResumeWorkflow({ workflow: h.workflow }), f) : s(400, { error: "body.workflow is required" }, f);
|
|
1079
|
+
if (g === "discard") return t.inspectDiscardIntent === void 0 ? s(404, { error: "inspectDiscardIntent not configured" }, f) : h.intentId ? s(200, await t.inspectDiscardIntent({ intentId: h.intentId }), f) : s(400, { error: "body.intentId is required" }, f);
|
|
1080
|
+
if (g === "bulk") {
|
|
1081
|
+
if (t.inspectBulkWorkflowRuns === void 0) return s(404, { error: "inspectBulkWorkflowRuns not configured" }, f);
|
|
1082
|
+
if (h.op !== "cancel" && h.op !== "replay") return s(400, { error: "body.op must be 'cancel' or 'replay'" }, f);
|
|
1083
|
+
if (typeof h.limit != "number") return s(400, { error: "body.limit is required — a bulk operation has no unbounded form, the cap IS the blast radius. The response reports `truncated` when more matched." }, f);
|
|
1084
|
+
try {
|
|
1085
|
+
return s(200, await t.inspectBulkWorkflowRuns({
|
|
1086
|
+
op: h.op,
|
|
1087
|
+
limit: h.limit,
|
|
1088
|
+
...h.reason === void 0 ? {} : { reason: h.reason },
|
|
1089
|
+
...h.mode === void 0 ? {} : { mode: h.mode },
|
|
1090
|
+
...h.dryRun === void 0 ? {} : { dryRun: h.dryRun },
|
|
1091
|
+
...h.workflow === void 0 ? {} : { workflow: h.workflow },
|
|
1092
|
+
...h.status === void 0 ? {} : { status: h.status },
|
|
1093
|
+
...h.startedAfter === void 0 ? {} : { startedAfter: h.startedAfter },
|
|
1094
|
+
...h.startedBefore === void 0 ? {} : { startedBefore: h.startedBefore }
|
|
1095
|
+
}), f);
|
|
1096
|
+
} catch (e) {
|
|
1097
|
+
if (e?.name === "BulkRequestError") return s(400, { error: e.message }, f);
|
|
1098
|
+
throw e;
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
} catch (e) {
|
|
1102
|
+
return s(500, {
|
|
1103
|
+
error: "flow control action failed",
|
|
1104
|
+
message: e?.message ?? String(e)
|
|
1105
|
+
}, f);
|
|
1106
|
+
}
|
|
1107
|
+
return s(404, {
|
|
1108
|
+
error: `unknown flow-control action '${g}'`,
|
|
1109
|
+
expected: [
|
|
1110
|
+
"pause",
|
|
1111
|
+
"resume",
|
|
1112
|
+
"discard",
|
|
1113
|
+
"bulk"
|
|
1114
|
+
]
|
|
1115
|
+
}, f);
|
|
980
1116
|
};
|
|
981
1117
|
//#endregion
|
|
982
|
-
export {
|
|
1118
|
+
export { c as A, F as C, h as D, l as E, g as M, o as N, u as O, j as S, M as T, B as _, a, R as b, E as c, T as d, C as f, w as g, N as h, d as i, f as j, r as k, H as l, S as m, b as n, P as o, D as p, x as r, V as s, n as t, U as u, z as v, A as w, I as x, L as y };
|