@qredence/fleet 0.5.1 → 0.5.7
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 +19 -0
- package/bin/fleet-prime.mjs +6 -0
- package/dist/web/client/assets/action-swap-roll-BB8DFMuf.js +1 -0
- package/dist/web/client/assets/agent-activity-CDcDNVC6.js +1 -0
- package/dist/web/client/assets/agent-disclosure-B8SnhQXL.js +1 -0
- package/dist/web/client/assets/analytics-stub-B8MIkiDB.js +1 -0
- package/dist/web/client/assets/{artifacts-panel-CX62LQ13.js → artifacts-panel-CmHYXfoo.js} +1 -1
- package/dist/web/client/assets/button-BV9NafmI.js +1 -0
- package/dist/web/client/assets/{chat-CsepBQwy.js → chat-W-yOMyG_.js} +1 -1
- package/dist/web/client/assets/chat-command-palette-DiG-i3uJ.js +1 -0
- package/dist/web/client/assets/check-JjHKAZas.js +1 -0
- package/dist/web/client/assets/chevron-up-CnSvySGH.js +1 -0
- package/dist/web/client/assets/circle-alert-CONlFReH.js +1 -0
- package/dist/web/client/assets/circle-x-CkKCB__4.js +1 -0
- package/dist/web/client/assets/citations-CpTFUvx7.js +2 -0
- package/dist/web/client/assets/collapsible-BoXtZZWN.js +1 -0
- package/dist/web/client/assets/command-Cx-UYeQ9.js +1 -0
- package/dist/web/client/assets/createBaseUIEventDetails-DV0dQrBX.js +1 -0
- package/dist/web/client/assets/dialog-Dh7WpGIu.js +1 -0
- package/dist/web/client/assets/dist-BPaFisIZ.js +41 -0
- package/dist/web/client/assets/earth-DGZXAN5r.js +1 -0
- package/dist/web/client/assets/ease-u56MhKYS.js +1 -0
- package/dist/web/client/assets/file-text-T-NcAlZs.js +1 -0
- package/dist/web/client/assets/fleet-message-queue-B6zAK-hX.js +1 -0
- package/dist/web/client/assets/{fleet-pi-tool-renderer-BD_ZAjlG.js → fleet-pi-tool-renderer-Btq9mDUe.js} +29 -29
- package/dist/web/client/assets/fleet-reasoning-panel-MtbSdoCv.js +1 -0
- package/dist/web/client/assets/fleet-subagent-list-iszvrvy_.js +1 -0
- package/dist/web/client/assets/fleet-tool-timeline-COzPrwr8.js +1 -0
- package/dist/web/client/assets/{fork-picker-dialog-C2cVJUbf.js → fork-picker-dialog-CAhWx0G5.js} +1 -1
- package/dist/web/client/assets/gauge-DNpstbBn.js +1 -0
- package/dist/web/client/assets/generative-text-renderer-C1JrmYfx.js +6 -0
- package/dist/web/client/assets/globals-Bfr0jrPq.css +2 -0
- package/dist/web/client/assets/horizontal-resize-Bl3AyBJg.js +1 -0
- package/dist/web/client/assets/image-BbPmlw-n.js +1 -0
- package/dist/web/client/assets/index-QgUwd4m8.js +12 -0
- package/dist/web/client/assets/input-Bol3TP4v.js +1 -0
- package/dist/web/client/assets/input-group-D5gi9zBK.js +1 -0
- package/dist/web/client/assets/{ipython-tool-BfeIa0nK.js → ipython-tool-BrMePqD-.js} +1 -1
- package/dist/web/client/assets/{markdown-DG7pUdsX.js → markdown-RD_ydkyD.js} +2 -2
- package/dist/web/client/assets/{markdown-code-BgMzpy7O.js → markdown-code-ETqXqY8E.js} +1 -1
- package/dist/web/client/assets/message-square-hbDao-A1.js +1 -0
- package/dist/web/client/assets/model-selector-list-CJY9pyt2.js +1 -0
- package/dist/web/client/assets/notify-DKTqXChG.js +1 -0
- package/dist/web/client/assets/{openui-renderer-DlUo6ehT.js → openui-renderer-BZMghkzQ.js} +8 -8
- package/dist/web/client/assets/{prime-agent-artifacts-CHGb5V_j.js → prime-agent-artifacts-C-g1VPiW.js} +1 -1
- package/dist/web/client/assets/prompt-suggestions-CXM6knMK.js +1 -0
- package/dist/web/client/assets/provider-catalog-CHKFGwHr.js +1 -0
- package/dist/web/client/assets/provider-label-KkqVX1CI.js +1 -0
- package/dist/web/client/assets/range-BWOHiLNe.js +1 -0
- package/dist/web/client/assets/refresh-cw-IThTJ3j-.js +1 -0
- package/dist/web/client/assets/repl-panel-CCh4ly7J.js +1 -0
- package/dist/web/client/assets/{resource-helpers-ULlyU8qK.js → resource-helpers-Q2T0YCMO.js} +1 -1
- package/dist/web/client/assets/resources-panel-Bo8dfUdm.js +1 -0
- package/dist/web/client/assets/right-panel-context-B2VAZ2p4.js +1 -0
- package/dist/web/client/assets/right-panel-registry-C5fQcBKw.js +2 -0
- package/dist/web/client/assets/routes-C1hRkRkv.js +16 -0
- package/dist/web/client/assets/safe-external-url-D3PJJIcM.js +1 -0
- package/dist/web/client/assets/session-insights-panel-CQdT90Op.js +1 -0
- package/dist/web/client/assets/settings-dialog-CvvM6T0m.js +1 -0
- package/dist/web/client/assets/{sparkles-C5H3Jtgf.js → shield-check-CkA2viVW.js} +1 -1
- package/dist/web/client/assets/{skeleton-loaders-fStjEeRP.js → skeleton-loaders-DjGv9LLA.js} +1 -1
- package/dist/web/client/assets/sparkles-DuclzqlE.js +1 -0
- package/dist/web/client/assets/subagent-chat-panel-tGCg6gcn.js +1 -0
- package/dist/web/client/assets/subagent-transcript-NO0PR8RU.js +1 -0
- package/dist/web/client/assets/subagent-utils-CQbaJ1g-.js +1 -0
- package/dist/web/client/assets/subagents-panel-BkFLsQQY.js +1 -0
- package/dist/web/client/assets/surfaces-cW-gp56p.js +1 -0
- package/dist/web/client/assets/switch-CcOFiQBK.js +1 -0
- package/dist/web/client/assets/terminal-DOS1s1gm.js +1 -0
- package/dist/web/client/assets/toast-ATq44uAL.js +1 -0
- package/dist/web/client/assets/tool-result-pklnrxSW.js +4 -0
- package/dist/web/client/assets/use-reduced-motion-eORd7fqW.js +9 -0
- package/dist/web/client/assets/useBaseUiId-CHqXB2UQ.js +1 -0
- package/dist/web/client/assets/useControlled-CJJ9BOQB.js +1 -0
- package/dist/web/client/assets/workspace-panel-BmMW7h7b.js +1 -0
- package/dist/web/client/assets/wrench-BJNNe07k.js +1 -0
- package/dist/web/client/assets/x-CsRC_tCI.js +1 -0
- package/dist/web/client/bundle-budget.json +10 -0
- package/dist/web/server/_tanstack-start-manifest_v-B4BnRTa_-DR7WQTT5.js +90 -0
- package/dist/web/server/agent-activity-Dx6AlDhN-JXOL2EXK.js +514 -0
- package/dist/web/server/{artifacts-panel-D9w1DHAN-FGRDCYU2.js → artifacts-panel-CloS3-ij-XWYXKL6A.js} +30 -22
- package/dist/web/server/{chat-command-palette-BaenPkCN-BHSOPGU4.js → chat-command-palette-Cc0uGvNm-GKENKTO7.js} +48 -22
- package/dist/web/server/{chunk-KPNGZR2R.js → chunk-3B6M63AO.js} +206 -209
- package/dist/web/server/chunk-3D4Z32XA.js +22 -0
- package/dist/web/server/chunk-3SSHBMDS.js +196 -0
- package/dist/web/server/chunk-4PQ6OD6J.js +22 -0
- package/dist/web/server/{chunk-5AVQZ4AZ.js → chunk-4UBOIY2S.js} +2 -1
- package/dist/web/server/chunk-56SEDI5N.js +19 -0
- package/dist/web/server/chunk-6QNW66XR.js +19 -0
- package/dist/web/server/chunk-744IIIDL.js +19 -0
- package/dist/web/server/{chunk-52SJQXO4.js → chunk-7PQTPSEE.js} +568 -568
- package/dist/web/server/{chunk-XYYNYFFD.js → chunk-7SR6WDM2.js} +2 -2
- package/dist/web/server/chunk-ANL4B775.js +60 -0
- package/dist/web/server/chunk-BNQWMQHD.js +35 -0
- package/dist/web/server/{chunk-X2TUFLTP.js → chunk-C5X6G26O.js} +436 -454
- package/dist/web/server/chunk-C66BSNA6.js +42 -0
- package/dist/web/server/{chunk-3GSFXWL5.js → chunk-DEUBJJZN.js} +4 -59
- package/dist/web/server/chunk-E365EOXJ.js +35 -0
- package/dist/web/server/{chunk-5WZFFNFY.js → chunk-EFAGCVZ3.js} +2 -23
- package/dist/web/server/{chunk-Y6LJ4WBI.js → chunk-EGQ6ZX4D.js} +563 -830
- package/dist/web/server/{chunk-DO3TVNGA.js → chunk-EKBKGAWX.js} +12 -10
- package/dist/web/server/{chunk-RPROZ2JC.js → chunk-F6MGAW3L.js} +133 -133
- package/dist/web/server/chunk-GABXCOY3.js +37 -0
- package/dist/web/server/chunk-GV7DJIHY.js +36 -0
- package/dist/web/server/{chunk-PWK2HJIV.js → chunk-HSJMLO36.js} +5 -252
- package/dist/web/server/{chunk-46VQY7SG.js → chunk-HU4AIJV3.js} +4 -4
- package/dist/web/server/{chunk-H64JLONZ.js → chunk-HZY3LBGP.js} +146 -2
- package/dist/web/server/{chunk-3IKSPTYI.js → chunk-J6MRJXUH.js} +22 -15
- package/dist/web/server/{chunk-FE4KN6T2.js → chunk-JOSTE7WK.js} +7 -5
- package/dist/web/server/{chunk-QJBEWT4E.js → chunk-K3BXQG3N.js} +27 -292
- package/dist/web/server/chunk-K4ESBQ3R.js +20 -0
- package/dist/web/server/chunk-KOIPYBJF.js +3773 -0
- package/dist/web/server/{chunk-44IVTHDV.js → chunk-KZSM3BHO.js} +28 -119
- package/dist/web/server/chunk-L46H6IDX.js +13 -0
- package/dist/web/server/chunk-LNGWHEE6.js +206 -0
- package/dist/web/server/{chunk-2U7PWSJX.js → chunk-MOSVTKH5.js} +262 -3661
- package/dist/web/server/{chunk-MDYA4NXK.js → chunk-NJRYX4A2.js} +4 -4
- package/dist/web/server/chunk-NNMZQN7Q.js +296 -0
- package/dist/web/server/{chunk-VHCAD46L.js → chunk-NPPG2GTW.js} +7 -7
- package/dist/web/server/{chunk-AZZHUVJR.js → chunk-PJNYH5SR.js} +7 -303
- package/dist/web/server/{chunk-7APYEQIO.js → chunk-QAE5SXDK.js} +1 -24
- package/dist/web/server/chunk-QTFCJGOY.js +189 -0
- package/dist/web/server/{chunk-FBOO3G67.js → chunk-RANJ6OJ3.js} +9 -9
- package/dist/web/server/chunk-RPBSDXJ4.js +62 -0
- package/dist/web/server/{chunk-PCJ5EKFE.js → chunk-RYHIJMFD.js} +63 -34
- package/dist/web/server/{chunk-NLIUTTKL.js → chunk-S3PQ6HKH.js} +1 -16
- package/dist/web/server/chunk-SG4W4SPQ.js +31 -0
- package/dist/web/server/{chunk-LESNF5O4.js → chunk-T23OO4SC.js} +2 -11
- package/dist/web/server/{chunk-FVWDJNXR.js → chunk-UNZJQ7CY.js} +6 -4
- package/dist/web/server/chunk-V3S6BVXO.js +22 -0
- package/dist/web/server/{chunk-M2FGGPNA.js → chunk-VGDP4YDU.js} +70 -45
- package/dist/web/server/{chunk-WK7CQS2N.js → chunk-W5GRNHV5.js} +51 -49
- package/dist/web/server/{chunk-HBZ6YKRB.js → chunk-WN77JNYY.js} +2 -2
- package/dist/web/server/{chunk-B2F6MLVZ.js → chunk-XFVL5ITL.js} +2246 -2228
- package/dist/web/server/{chunk-EIVNRYP3.js → chunk-XKYEXPLQ.js} +2 -17
- package/dist/web/server/{chunk-6GMKRR3C.js → chunk-XNYQSCB2.js} +2 -2
- package/dist/web/server/chunk-YHXAXJ6I.js +22 -0
- package/dist/web/server/chunk-YLMXYMLG.js +86 -0
- package/dist/web/server/chunk-YNGDUWCF.js +56 -0
- package/dist/web/server/chunk-ZJFA4F5X.js +280 -0
- package/dist/web/server/fleet-message-queue-Bn0_3Efe-G4BZR2EU.js +74 -0
- package/dist/web/server/fleet-pi-tool-renderer-C52SZmPx-CIAH3IV7.js +51 -0
- package/dist/web/server/fleet-reasoning-panel-C_e7wzVm-SDHEWDQT.js +199 -0
- package/dist/web/server/fleet-subagent-list-CQltKswG-EKCMQHDI.js +18 -0
- package/dist/web/server/fleet-tool-timeline-KENErMKg-HTN7SW3D.js +16 -0
- package/dist/web/server/{fork-picker-dialog-BZzfxdQd-Y725VJ7G.js → fork-picker-dialog-DK9YGQuB-4QEFWRU4.js} +6 -5
- package/dist/web/server/{markdown-Boni3lHk-AZGKDNAR.js → markdown-QcSUaLyd-6DJUK5NC.js} +1 -1
- package/dist/web/server/{markdown-code-BrWukbg3-D2GN4Y77.js → markdown-code-Dyo1_13a-52ZQZSPE.js} +2 -2
- package/dist/web/server/model-selector-list-CEfWjRc--GBW2GUO6.js +289 -0
- package/dist/web/server/{openui-renderer-Cg4RSE9k-7BTJIYZJ.js → openui-renderer-Dk0Ak9cW-MUJQHDAS.js} +19 -16
- package/dist/web/server/prompt-suggestions-BOmHi4-J-C563CHFU.js +30 -0
- package/dist/web/server/{repl-panel-BEQrC2ef-V3YEZ7EO.js → repl-panel-D9E8nkQy-L45ZNG2V.js} +4 -3
- package/dist/web/server/{resources-panel-CwKh4U9f-D3VDEMDW.js → resources-panel-B03M8bEp-SZG726N5.js} +7 -6
- package/dist/web/server/{router-CEahIUpn-SRG7XKIH.js → router-BE9HcX2W-JMQ3JWE5.js} +1756 -1374
- package/dist/web/server/{routes-BznemByz-F4DJAYIM.js → routes-CJTRGB1Z-WJKXJFFT.js} +3748 -3955
- package/dist/web/server/server.js +3 -3
- package/dist/web/server/{session-insights-panel-JfeTHE0d-3HZB3ZWI.js → session-insights-panel-BHZyKDTo-LRMAMA3O.js} +4 -2
- package/dist/web/server/{settings-dialog-DgeBMORv-7SRSENPM.js → settings-dialog-yDibpbBH-TCLJ7NRJ.js} +172 -161
- package/dist/web/server/{start-CLAD7RcD-56S4BWMM.js → start-BYVnok_H-IA6TWGA3.js} +1 -1
- package/dist/web/server/subagent-chat-panel-B1YoZIKO-DFRUDQJ2.js +82 -0
- package/dist/web/server/subagents-panel-dJJwpsEL-FTWWCHND.js +200 -0
- package/dist/web/server/{workspace-panel-y54P79_B-VPIYUXF6.js → workspace-panel-BC_H8Jri-5MHAEQQS.js} +22 -18
- package/package.json +5 -5
- package/dist/web/client/assets/analytics-stub-Jh3lkb8P.js +0 -1
- package/dist/web/client/assets/button-0At5xSyU.js +0 -1
- package/dist/web/client/assets/chat-command-palette-C4sSf8Kg.js +0 -1
- package/dist/web/client/assets/collapsible-DmyYcezk.js +0 -1
- package/dist/web/client/assets/command-CB6emP8m.js +0 -2
- package/dist/web/client/assets/conversation-turns-ByFoWPXe.js +0 -6
- package/dist/web/client/assets/dialog-DZ44tBtH.js +0 -1
- package/dist/web/client/assets/dist-MNgIFxqY.js +0 -41
- package/dist/web/client/assets/ease-vFBiNFNK.js +0 -9
- package/dist/web/client/assets/file-text-BhQ0ZnoU.js +0 -1
- package/dist/web/client/assets/globals-CqqQdk2S.css +0 -2
- package/dist/web/client/assets/horizontal-resize-C1TpRLNC.js +0 -1
- package/dist/web/client/assets/index-DweoFRMs.js +0 -12
- package/dist/web/client/assets/input-CqC82Agz.js +0 -1
- package/dist/web/client/assets/input-group-H0TG-mkU.js +0 -1
- package/dist/web/client/assets/notify-Duj26eeZ.js +0 -1
- package/dist/web/client/assets/provider-catalog-BZhZuKSz.js +0 -1
- package/dist/web/client/assets/provider-label-jKm8v18u.js +0 -1
- package/dist/web/client/assets/range-vSJ7Ux_5.js +0 -2
- package/dist/web/client/assets/repl-panel-DiGS6uCw.js +0 -1
- package/dist/web/client/assets/resources-panel-DSU7VGX2.js +0 -1
- package/dist/web/client/assets/routes-CxlNCi_v.js +0 -16
- package/dist/web/client/assets/safe-external-url-Bl_78dpZ.js +0 -1
- package/dist/web/client/assets/session-insights-panel-DwmwiikS.js +0 -1
- package/dist/web/client/assets/settings-dialog-CkfpTKfM.js +0 -1
- package/dist/web/client/assets/subagents-panel-DGnsK6Nx.js +0 -1
- package/dist/web/client/assets/switch-BFEBpUEU.js +0 -1
- package/dist/web/client/assets/toast-C4s7FYYa.js +0 -1
- package/dist/web/client/assets/tool-result-CBzwwUE9.js +0 -4
- package/dist/web/client/assets/useBaseUiId-B9f7fokB.js +0 -1
- package/dist/web/client/assets/useControlled-CoY1jSuL.js +0 -1
- package/dist/web/client/assets/workspace-panel-CjdXlEvd.js +0 -1
- package/dist/web/client/assets/x-BgciQ7_C.js +0 -1
- package/dist/web/server/_tanstack-start-manifest_v-bDUlyKY0-KFW35JRO.js +0 -82
- package/dist/web/server/chunk-ZEVZFLIY.js +0 -334
- package/dist/web/server/fleet-pi-tool-renderer-lJvZWmBJ-4M5YI6VS.js +0 -35
- package/dist/web/server/subagents-panel-CzZe3co7-2VZ5JTWF.js +0 -332
|
@@ -1,334 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cn
|
|
3
|
-
} from "./chunk-DJMHPJBP.js";
|
|
4
|
-
|
|
5
|
-
// web/app/dist/server/assets/src-URINr_dJ.js
|
|
6
|
-
import "react";
|
|
7
|
-
import { jsx } from "react/jsx-runtime";
|
|
8
|
-
function Card({ className, size = "default", ...props }) {
|
|
9
|
-
return /* @__PURE__ */ jsx("div", {
|
|
10
|
-
"data-slot": "card",
|
|
11
|
-
"data-size": size,
|
|
12
|
-
className: cn("group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl", className),
|
|
13
|
-
...props
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
function CardHeader({ className, ...props }) {
|
|
17
|
-
return /* @__PURE__ */ jsx("div", {
|
|
18
|
-
"data-slot": "card-header",
|
|
19
|
-
className: cn("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3", className),
|
|
20
|
-
...props
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
function CardTitle({ className, ...props }) {
|
|
24
|
-
return /* @__PURE__ */ jsx("div", {
|
|
25
|
-
"data-slot": "card-title",
|
|
26
|
-
className: cn("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm", className),
|
|
27
|
-
...props
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
function CardDescription({ className, ...props }) {
|
|
31
|
-
return /* @__PURE__ */ jsx("div", {
|
|
32
|
-
"data-slot": "card-description",
|
|
33
|
-
className: cn("text-sm text-muted-foreground", className),
|
|
34
|
-
...props
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
function CardContent({ className, ...props }) {
|
|
38
|
-
return /* @__PURE__ */ jsx("div", {
|
|
39
|
-
"data-slot": "card-content",
|
|
40
|
-
className: cn("px-4 group-data-[size=sm]/card:px-3", className),
|
|
41
|
-
...props
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
var CSP_META = `<meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'unsafe-inline'; style-src 'unsafe-inline'; img-src data:; font-src 'none'; connect-src 'none'; frame-src 'none'; object-src 'none'; base-uri 'none'; form-action 'none'; media-src data:; navigate-to 'none';">`;
|
|
45
|
-
var MAX_TITLE_BYTES = 240;
|
|
46
|
-
var FORBIDDEN_ELEMENTS = /<(?:link|iframe|object|embed|base|form|portal|frameset)\b/i;
|
|
47
|
-
var META_TAG = /<meta\b[^>]*>/gi;
|
|
48
|
-
var REFRESH_META = /\bhttp-equiv\s*=[\s"']*refresh\b/i;
|
|
49
|
-
var CSP_META_REFERENCE = /\bcontent-security-policy\b/i;
|
|
50
|
-
var EVENT_HANDLER_ATTRIBUTE = /\son[a-z][\w:-]*\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/i;
|
|
51
|
-
var SCRIPT_SOURCE_ATTRIBUTE = /<script\b[^>]*\bsrc\s*=/i;
|
|
52
|
-
var CSS_IMPORT = /@import\b/i;
|
|
53
|
-
var NETWORK_API = /\b(?:fetch|XMLHttpRequest|WebSocket|EventSource|sendBeacon|showModalDialog)\s*\(|\bwindow\s*\.\s*open\s*\(|\b(?:window|globalThis|document|location)\s*\.\s*(?:location|assign|replace|reload|href|pathname|host|hostname|port|protocol|search|hash)\s*=|\b(?:window|globalThis|document|location)\s*\.\s*(?:location\s*\.\s*)?(?:assign|replace|reload)\s*\(/i;
|
|
54
|
-
var RESOURCE_ATTRIBUTE = /\b(?:src|href|action|formaction|poster|cite|background|xlink:href)\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+))/gi;
|
|
55
|
-
var UNSAFE_SCHEME = /^(?:javascript|vbscript|file|blob|filesystem|about|data:text\/html|data:application\/javascript):/i;
|
|
56
|
-
function byteLength(value) {
|
|
57
|
-
return new TextEncoder().encode(value).byteLength;
|
|
58
|
-
}
|
|
59
|
-
function safeResourceUrl(value) {
|
|
60
|
-
const normalized = value.trim();
|
|
61
|
-
if (!normalized || UNSAFE_SCHEME.test(normalized)) return false;
|
|
62
|
-
if (normalized.startsWith("#")) return true;
|
|
63
|
-
return /^(?:data:image\/(?:gif|jpeg|jpg|png|webp|svg\+xml);|data:(?:audio|video)\/)/i.test(normalized);
|
|
64
|
-
}
|
|
65
|
-
function scanHtmlTags(document) {
|
|
66
|
-
const tags = [];
|
|
67
|
-
let index = 0;
|
|
68
|
-
let rawTextElement;
|
|
69
|
-
while (index < document.length) {
|
|
70
|
-
if (rawTextElement) {
|
|
71
|
-
const closingTag = new RegExp(`<\\/\\s*${rawTextElement}\\b[^>]*>`, "ig");
|
|
72
|
-
closingTag.lastIndex = index;
|
|
73
|
-
const closingMatch = closingTag.exec(document);
|
|
74
|
-
if (!closingMatch) break;
|
|
75
|
-
index = closingMatch.index;
|
|
76
|
-
rawTextElement = void 0;
|
|
77
|
-
}
|
|
78
|
-
const start = document.indexOf("<", index);
|
|
79
|
-
if (start < 0) break;
|
|
80
|
-
if (document.startsWith("<!--", start)) {
|
|
81
|
-
const commentEnd = document.indexOf("-->", start + 4);
|
|
82
|
-
index = commentEnd < 0 ? document.length : commentEnd + 3;
|
|
83
|
-
continue;
|
|
84
|
-
}
|
|
85
|
-
let end = start + 1;
|
|
86
|
-
let quote;
|
|
87
|
-
for (; end < document.length; end += 1) {
|
|
88
|
-
const character = document[end];
|
|
89
|
-
if (quote) {
|
|
90
|
-
if (character === quote) quote = void 0;
|
|
91
|
-
continue;
|
|
92
|
-
}
|
|
93
|
-
if (character === '"' || character === "'") {
|
|
94
|
-
quote = character;
|
|
95
|
-
continue;
|
|
96
|
-
}
|
|
97
|
-
if (character === ">") break;
|
|
98
|
-
}
|
|
99
|
-
if (end >= document.length) break;
|
|
100
|
-
const raw = document.slice(start, end + 1);
|
|
101
|
-
const tagMatch = /^<\s*(\/?)\s*([A-Za-z][\w:-]*)\b/i.exec(raw);
|
|
102
|
-
if (!tagMatch) {
|
|
103
|
-
index = end + 1;
|
|
104
|
-
continue;
|
|
105
|
-
}
|
|
106
|
-
const closing = Boolean(tagMatch[1]);
|
|
107
|
-
const name = tagMatch[2].toLowerCase();
|
|
108
|
-
tags.push({
|
|
109
|
-
raw,
|
|
110
|
-
name,
|
|
111
|
-
closing,
|
|
112
|
-
start,
|
|
113
|
-
end: end + 1
|
|
114
|
-
});
|
|
115
|
-
if (!closing && (name === "script" || name === "style") && !/\/\s*>$/.test(raw)) rawTextElement = name;
|
|
116
|
-
index = end + 1;
|
|
117
|
-
}
|
|
118
|
-
return tags;
|
|
119
|
-
}
|
|
120
|
-
function hasHtmlAttribute(document, expectedAttribute) {
|
|
121
|
-
let inTag = false;
|
|
122
|
-
let quote;
|
|
123
|
-
let tagStart = -1;
|
|
124
|
-
for (let index = 0; index < document.length; index += 1) {
|
|
125
|
-
const character = document[index];
|
|
126
|
-
if (!inTag) {
|
|
127
|
-
if (character === "<") {
|
|
128
|
-
inTag = true;
|
|
129
|
-
tagStart = index;
|
|
130
|
-
}
|
|
131
|
-
continue;
|
|
132
|
-
}
|
|
133
|
-
if (quote) {
|
|
134
|
-
if (character === quote) quote = void 0;
|
|
135
|
-
continue;
|
|
136
|
-
}
|
|
137
|
-
if (character === '"' || character === "'") {
|
|
138
|
-
quote = character;
|
|
139
|
-
continue;
|
|
140
|
-
}
|
|
141
|
-
if (character !== ">") continue;
|
|
142
|
-
const tag = document.slice(tagStart, index + 1);
|
|
143
|
-
inTag = false;
|
|
144
|
-
if (/^<\s*\//.test(tag) || /^<\s*[!/?]/.test(tag)) continue;
|
|
145
|
-
const tagName = /^<\s*[A-Za-z][\w:-]*/.exec(tag);
|
|
146
|
-
if (!tagName) continue;
|
|
147
|
-
const attributes = tag.slice(tagName[0].length, -1);
|
|
148
|
-
let attributeIndex = 0;
|
|
149
|
-
while (attributeIndex < attributes.length) {
|
|
150
|
-
while (/\s/.test(attributes[attributeIndex] ?? "")) attributeIndex += 1;
|
|
151
|
-
if (attributeIndex >= attributes.length || attributes[attributeIndex] === "/") break;
|
|
152
|
-
const nameStart = attributeIndex;
|
|
153
|
-
while (!/[\s=/>]/.test(attributes[attributeIndex] ?? "")) attributeIndex += 1;
|
|
154
|
-
if (attributes.slice(nameStart, attributeIndex).toLowerCase() === expectedAttribute.toLowerCase()) return true;
|
|
155
|
-
while (/\s/.test(attributes[attributeIndex] ?? "")) attributeIndex += 1;
|
|
156
|
-
if (attributes[attributeIndex] !== "=") continue;
|
|
157
|
-
attributeIndex += 1;
|
|
158
|
-
while (/\s/.test(attributes[attributeIndex] ?? "")) attributeIndex += 1;
|
|
159
|
-
const valueQuote = attributes[attributeIndex];
|
|
160
|
-
if (valueQuote === '"' || valueQuote === "'") {
|
|
161
|
-
attributeIndex += 1;
|
|
162
|
-
while (attributeIndex < attributes.length && attributes[attributeIndex] !== valueQuote) attributeIndex += 1;
|
|
163
|
-
attributeIndex += 1;
|
|
164
|
-
continue;
|
|
165
|
-
}
|
|
166
|
-
while (attributeIndex < attributes.length && !/[\s>]/.test(attributes[attributeIndex] ?? "")) attributeIndex += 1;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
return false;
|
|
170
|
-
}
|
|
171
|
-
function hasUnsafeResourceAttribute(document) {
|
|
172
|
-
RESOURCE_ATTRIBUTE.lastIndex = 0;
|
|
173
|
-
for (const match of document.matchAll(RESOURCE_ATTRIBUTE)) if (!safeResourceUrl(match[1] ?? match[2] ?? match[3] ?? "")) return true;
|
|
174
|
-
return false;
|
|
175
|
-
}
|
|
176
|
-
function isCssWhitespace(character) {
|
|
177
|
-
return character !== void 0 && /\s/.test(character);
|
|
178
|
-
}
|
|
179
|
-
function extractCssUrlValues(document) {
|
|
180
|
-
const values = [];
|
|
181
|
-
const lower = document.toLowerCase();
|
|
182
|
-
let searchFrom = 0;
|
|
183
|
-
while (searchFrom < document.length) {
|
|
184
|
-
const keywordStart = lower.indexOf("url", searchFrom);
|
|
185
|
-
if (keywordStart === -1) break;
|
|
186
|
-
let cursor = keywordStart + 3;
|
|
187
|
-
while (isCssWhitespace(document[cursor])) cursor += 1;
|
|
188
|
-
if (document[cursor] !== "(") {
|
|
189
|
-
searchFrom = keywordStart + 3;
|
|
190
|
-
continue;
|
|
191
|
-
}
|
|
192
|
-
cursor += 1;
|
|
193
|
-
while (isCssWhitespace(document[cursor])) cursor += 1;
|
|
194
|
-
const contentStart = cursor;
|
|
195
|
-
const quote = document[contentStart];
|
|
196
|
-
if (quote === '"' || quote === "'") {
|
|
197
|
-
const closingQuote = document.indexOf(quote, contentStart + 1);
|
|
198
|
-
if (closingQuote !== -1) {
|
|
199
|
-
let afterQuote = closingQuote + 1;
|
|
200
|
-
while (isCssWhitespace(document[afterQuote])) afterQuote += 1;
|
|
201
|
-
if (document[afterQuote] === ")") {
|
|
202
|
-
values.push(document.slice(contentStart, closingQuote + 1));
|
|
203
|
-
searchFrom = afterQuote + 1;
|
|
204
|
-
continue;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
const closingParen = document.indexOf(")", contentStart);
|
|
209
|
-
if (closingParen === -1) break;
|
|
210
|
-
values.push(document.slice(contentStart, closingParen));
|
|
211
|
-
searchFrom = closingParen + 1;
|
|
212
|
-
}
|
|
213
|
-
return values;
|
|
214
|
-
}
|
|
215
|
-
function hasUnsafeCssUrl(document) {
|
|
216
|
-
for (const rawValue of extractCssUrlValues(document)) {
|
|
217
|
-
let value = rawValue;
|
|
218
|
-
if (value.length >= 2 && (value.startsWith('"') && value.endsWith('"') || value.startsWith("'") && value.endsWith("'"))) value = value.slice(1, -1);
|
|
219
|
-
else value = value.trim();
|
|
220
|
-
if (!safeResourceUrl(value)) return true;
|
|
221
|
-
}
|
|
222
|
-
return false;
|
|
223
|
-
}
|
|
224
|
-
function hasForbiddenMeta(document) {
|
|
225
|
-
META_TAG.lastIndex = 0;
|
|
226
|
-
for (const match of document.matchAll(META_TAG)) {
|
|
227
|
-
const tag = match[0] ?? "";
|
|
228
|
-
if (REFRESH_META.test(tag)) return true;
|
|
229
|
-
if (CSP_META_REFERENCE.test(tag) && tag !== CSP_META) return true;
|
|
230
|
-
}
|
|
231
|
-
return false;
|
|
232
|
-
}
|
|
233
|
-
function hasCanonicalCspMetaInHead(document) {
|
|
234
|
-
let headDepth = 0;
|
|
235
|
-
for (const tag of scanHtmlTags(document)) {
|
|
236
|
-
if (tag.name === "head") {
|
|
237
|
-
if (tag.closing) headDepth = Math.max(0, headDepth - 1);
|
|
238
|
-
else headDepth += 1;
|
|
239
|
-
continue;
|
|
240
|
-
}
|
|
241
|
-
if (headDepth > 0 && tag.name === "meta" && !tag.closing && tag.raw === CSP_META) return true;
|
|
242
|
-
}
|
|
243
|
-
return false;
|
|
244
|
-
}
|
|
245
|
-
function normalizeDocument(document) {
|
|
246
|
-
const trimmed = document.trim();
|
|
247
|
-
if (hasCanonicalCspMetaInHead(trimmed)) return trimmed;
|
|
248
|
-
const tags = scanHtmlTags(trimmed);
|
|
249
|
-
const htmlTag = tags.find((tag) => tag.name === "html" && !tag.closing);
|
|
250
|
-
if (!htmlTag) return `<!doctype html><html><head>${CSP_META}</head><body>${trimmed}</body></html>`;
|
|
251
|
-
const headTag = tags.find((tag) => tag.name === "head" && !tag.closing);
|
|
252
|
-
if (headTag) return `${trimmed.slice(0, headTag.end)}${CSP_META}${trimmed.slice(headTag.end)}`;
|
|
253
|
-
return `${trimmed.slice(0, htmlTag.end)}<head>${CSP_META}</head>${trimmed.slice(htmlTag.end)}`;
|
|
254
|
-
}
|
|
255
|
-
function validateAndNormalizeOpenUIHtmlArtifact(input) {
|
|
256
|
-
if (typeof input !== "object" || input === null) return {
|
|
257
|
-
ok: false,
|
|
258
|
-
reason: "OpenUI artifact must be an object."
|
|
259
|
-
};
|
|
260
|
-
const source = input;
|
|
261
|
-
if (typeof source.title !== "string" || !source.title.trim()) return {
|
|
262
|
-
ok: false,
|
|
263
|
-
reason: "OpenUI artifact title is required."
|
|
264
|
-
};
|
|
265
|
-
if (typeof source.document !== "string" || !source.document.trim()) return {
|
|
266
|
-
ok: false,
|
|
267
|
-
reason: "OpenUI artifact document is required."
|
|
268
|
-
};
|
|
269
|
-
const title = source.title.trim();
|
|
270
|
-
const document = source.document.trim();
|
|
271
|
-
if (byteLength(title) > MAX_TITLE_BYTES) return {
|
|
272
|
-
ok: false,
|
|
273
|
-
reason: "OpenUI artifact title is too large."
|
|
274
|
-
};
|
|
275
|
-
if (byteLength(document) > 1048576) return {
|
|
276
|
-
ok: false,
|
|
277
|
-
reason: "OpenUI artifact exceeds the 1 MiB limit.",
|
|
278
|
-
status: 413
|
|
279
|
-
};
|
|
280
|
-
if (FORBIDDEN_ELEMENTS.test(document)) return {
|
|
281
|
-
ok: false,
|
|
282
|
-
reason: "External HTML resources and embedded frames are not allowed."
|
|
283
|
-
};
|
|
284
|
-
if (hasForbiddenMeta(document)) return {
|
|
285
|
-
ok: false,
|
|
286
|
-
reason: "Custom refresh and CSP metadata are not allowed."
|
|
287
|
-
};
|
|
288
|
-
if (EVENT_HANDLER_ATTRIBUTE.test(document)) return {
|
|
289
|
-
ok: false,
|
|
290
|
-
reason: "Inline event-handler attributes are not allowed."
|
|
291
|
-
};
|
|
292
|
-
if (SCRIPT_SOURCE_ATTRIBUTE.test(document)) return {
|
|
293
|
-
ok: false,
|
|
294
|
-
reason: "External scripts are not allowed."
|
|
295
|
-
};
|
|
296
|
-
if (CSS_IMPORT.test(document) || hasUnsafeCssUrl(document)) return {
|
|
297
|
-
ok: false,
|
|
298
|
-
reason: "External styles and CSS resources are not allowed."
|
|
299
|
-
};
|
|
300
|
-
if (hasUnsafeResourceAttribute(document)) return {
|
|
301
|
-
ok: false,
|
|
302
|
-
reason: "External or unsafe resource URLs are not allowed."
|
|
303
|
-
};
|
|
304
|
-
if (NETWORK_API.test(document)) return {
|
|
305
|
-
ok: false,
|
|
306
|
-
reason: "Network access and pop-up APIs are not allowed."
|
|
307
|
-
};
|
|
308
|
-
if (hasHtmlAttribute(document, "download") || hasHtmlAttribute(document, "target")) return {
|
|
309
|
-
ok: false,
|
|
310
|
-
reason: "Downloads and new-window navigation are not allowed."
|
|
311
|
-
};
|
|
312
|
-
const normalizedDocument = normalizeDocument(document);
|
|
313
|
-
if (byteLength(normalizedDocument) > 1048576) return {
|
|
314
|
-
ok: false,
|
|
315
|
-
reason: "Normalized OpenUI artifact exceeds the 1 MiB limit.",
|
|
316
|
-
status: 413
|
|
317
|
-
};
|
|
318
|
-
return {
|
|
319
|
-
ok: true,
|
|
320
|
-
value: {
|
|
321
|
-
title,
|
|
322
|
-
document: normalizedDocument
|
|
323
|
-
}
|
|
324
|
-
};
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
export {
|
|
328
|
-
Card,
|
|
329
|
-
CardHeader,
|
|
330
|
-
CardTitle,
|
|
331
|
-
CardDescription,
|
|
332
|
-
CardContent,
|
|
333
|
-
validateAndNormalizeOpenUIHtmlArtifact
|
|
334
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
FleetPiToolRenderer
|
|
3
|
-
} from "./chunk-PCJ5EKFE.js";
|
|
4
|
-
import "./chunk-44IVTHDV.js";
|
|
5
|
-
import "./chunk-P66QQWUM.js";
|
|
6
|
-
import "./chunk-DBXYBYBP.js";
|
|
7
|
-
import "./chunk-5WZFFNFY.js";
|
|
8
|
-
import "./chunk-2H6A6Z7F.js";
|
|
9
|
-
import "./chunk-YRWVQ7BW.js";
|
|
10
|
-
import "./chunk-3IKSPTYI.js";
|
|
11
|
-
import "./chunk-PWK2HJIV.js";
|
|
12
|
-
import "./chunk-QJBEWT4E.js";
|
|
13
|
-
import "./chunk-FAGDMGLK.js";
|
|
14
|
-
import "./chunk-6RJYXDSD.js";
|
|
15
|
-
import "./chunk-PKCTG7EW.js";
|
|
16
|
-
import "./chunk-7QCDOBZ3.js";
|
|
17
|
-
import "./chunk-LESNF5O4.js";
|
|
18
|
-
import "./chunk-QLY3L4A2.js";
|
|
19
|
-
import "./chunk-NLIUTTKL.js";
|
|
20
|
-
import "./chunk-XYYNYFFD.js";
|
|
21
|
-
import "./chunk-X2TUFLTP.js";
|
|
22
|
-
import "./chunk-ST5I2PLN.js";
|
|
23
|
-
import "./chunk-7APYEQIO.js";
|
|
24
|
-
import "./chunk-M2FGGPNA.js";
|
|
25
|
-
import "./chunk-G5BCQQ5N.js";
|
|
26
|
-
import "./chunk-BYXBJQAS.js";
|
|
27
|
-
import "./chunk-E26EAQIM.js";
|
|
28
|
-
import "./chunk-DJMHPJBP.js";
|
|
29
|
-
import "./chunk-UQVZJSZZ.js";
|
|
30
|
-
import "./chunk-JDCCC7A7.js";
|
|
31
|
-
import "./chunk-L547YHC4.js";
|
|
32
|
-
import "./chunk-MLKGABMK.js";
|
|
33
|
-
export {
|
|
34
|
-
FleetPiToolRenderer
|
|
35
|
-
};
|