@cardstack/boxel-cli 0.9.0 → 0.10.0-unstable.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/README.md +12 -0
- package/bundled-test-harness/assets/account-switch-failed-GCSVbJML.js +23 -0
- package/bundled-test-harness/assets/account-switch-failed-GsWni_Gk.css +18 -0
- package/bundled-test-harness/assets/account-switch-failed-test-CdZWNths.js +45 -0
- package/bundled-test-harness/assets/add-workspace-c7L50Gx8.js +141 -0
- package/bundled-test-harness/assets/add-workspace-test-BZxHa6Pe.js +72 -0
- package/bundled-test-harness/assets/advanced-color-picker-0pGF-3WG.js +504 -0
- package/bundled-test-harness/assets/advanced-color-picker-pbO4HWc_.js +2 -0
- package/bundled-test-harness/assets/ai-assistant-test-Dnm4o9vK.js +2211 -0
- package/bundled-test-harness/assets/ai-module-creation-test-C6253CMt.js +151 -0
- package/bundled-test-harness/assets/aibot-message-miKyGeKk.js +278 -0
- package/bundled-test-harness/assets/app-i8pGdQkw.js +22855 -0
- package/bundled-test-harness/assets/app-zC7o6PyQ.css +2718 -0
- package/bundled-test-harness/assets/audio-file-def-DHnydP0t.js +133 -0
- package/bundled-test-harness/assets/auth-container-BP2gSoo4.css +51 -0
- package/bundled-test-harness/assets/auth-container-DN94iVfX.js +24 -0
- package/bundled-test-harness/assets/avif-meta-extractor-Bo5zRX1V.js +162 -0
- package/bundled-test-harness/assets/base64-image-B0RYxzHT.js +2 -0
- package/bundled-test-harness/assets/base64-image-Bxjqdwew.js +262 -0
- package/bundled-test-harness/assets/big-integer-7RLj5_7H.js +89 -0
- package/bundled-test-harness/assets/big-integer-C9sJxKVy.js +2 -0
- package/bundled-test-harness/assets/binary-upload-dedupe-test-DZo3EaV0.js +308 -0
- package/bundled-test-harness/assets/boolean-CcKPYUph.js +94 -0
- package/bundled-test-harness/assets/boolean-DvsSmtM7.js +2 -0
- package/bundled-test-harness/assets/brand-functional-palette-KpVSY2Sa.js +137 -0
- package/bundled-test-harness/assets/brand-logo-DDiOec0t.js +295 -0
- package/bundled-test-harness/assets/broken-link-template-test-DAngUbFJ.js +192 -0
- package/bundled-test-harness/assets/bundled-base-C_lumba6.js +254 -0
- package/bundled-test-harness/assets/bundled-base-modules-test-CSF7Rl4Z.js +54 -0
- package/bundled-test-harness/assets/buried-stack-item-scroll-test-B0J_EP88.js +236 -0
- package/bundled-test-harness/assets/bxl-expression-test-Dej7WgI6.js +250 -0
- package/bundled-test-harness/assets/can-invoke-test-elyUcOKT.js +401 -0
- package/bundled-test-harness/assets/card-api-CjWXCkqh.js +8 -0
- package/bundled-test-harness/assets/card-api-Dzje0smT.js +4393 -0
- package/bundled-test-harness/assets/card-api-test-DA8d4Ooc.js +198 -0
- package/bundled-test-harness/assets/card-basics-test-mp1Odo-l.js +5364 -0
- package/bundled-test-harness/assets/card-chooser-paging-test-y8OfboYd.js +235 -0
- package/bundled-test-harness/assets/card-chooser-test-nmg2zkDj.js +393 -0
- package/bundled-test-harness/assets/card-collection-BXiO3i7R.js +118 -0
- package/bundled-test-harness/assets/card-context-search-results-Dbhn7lvW.js +30 -0
- package/bundled-test-harness/assets/card-context-search-results-test-DVXT-YC5.js +184 -0
- package/bundled-test-harness/assets/card-def-field-def-relationships-test-mX4rxrtO.js +562 -0
- package/bundled-test-harness/assets/card-delete-test-BxFsqFnX.js +466 -0
- package/bundled-test-harness/assets/card-error-C-7hjxu9.js +72 -0
- package/bundled-test-harness/assets/card-error-awaiting-index-test-BvfY2eaW.js +53 -0
- package/bundled-test-harness/assets/card-error-detail-nMwopDir.js +271 -0
- package/bundled-test-harness/assets/card-info-CTFxdohf.js +2 -0
- package/bundled-test-harness/assets/card-list-B9QrkJ97.js +2 -0
- package/bundled-test-harness/assets/card-list-XbwLCXZS.js +202 -0
- package/bundled-test-harness/assets/card-resource-JGLjQUy6.js +86 -0
- package/bundled-test-harness/assets/cards-grid-CWG41hZE.js +344 -0
- package/bundled-test-harness/assets/cards-grid-DSpX99p6.js +2 -0
- package/bundled-test-harness/assets/cards-grid-layout-Bht0LwZy.js +2 -0
- package/bundled-test-harness/assets/cards-grid-layout-CdpKlHUb.js +111 -0
- package/bundled-test-harness/assets/check-correctness-test-C4BrUeKA.js +554 -0
- package/bundled-test-harness/assets/clip-BEVvLrXx.js +2 -0
- package/bundled-test-harness/assets/clip-CoB714qX.js +92 -0
- package/bundled-test-harness/assets/code-ref-C2uguisI.js +2 -0
- package/bundled-test-harness/assets/code-ref-Cy7sV5a4.js +138 -0
- package/bundled-test-harness/assets/code-submode-availability-test-BsA_Ul01.js +198 -0
- package/bundled-test-harness/assets/code-submode-test-DkBhpEPB.js +1839 -0
- package/bundled-test-harness/assets/codeblocks-test-B1eZ2_JF.js +418 -0
- package/bundled-test-harness/assets/codemirror-editor-C6pxSm5y.js +2 -0
- package/bundled-test-harness/assets/codemirror-editor-DzM46Cd8.js +701 -0
- package/bundled-test-harness/assets/codemirror-embed-toolbar-test-BemP-ZdG.js +366 -0
- package/bundled-test-harness/assets/color-C-jGNFWZ.js +2 -0
- package/bundled-test-harness/assets/color-field-test-DPIRaBec.js +212 -0
- package/bundled-test-harness/assets/color-picker-field-Bv4IjS-d.js +139 -0
- package/bundled-test-harness/assets/color-picker-field-D1bYCQIg.js +2 -0
- package/bundled-test-harness/assets/color-wheel-picker-IIaCQplL.js +283 -0
- package/bundled-test-harness/assets/color-wheel-picker-Kw-UN3kV.js +2 -0
- package/bundled-test-harness/assets/color-zzCBneih.js +65 -0
- package/bundled-test-harness/assets/command-data-BMBtjT1E.js +95 -0
- package/bundled-test-harness/assets/command-data-BXC5Z0oA.js +2 -0
- package/bundled-test-harness/assets/compaction-test-CxUKnxlQ.js +150 -0
- package/bundled-test-harness/assets/components-Ct_agx0G.js +14294 -0
- package/bundled-test-harness/assets/computed-test-C-lpGQQ3.js +1320 -0
- package/bundled-test-harness/assets/container-BdPu8rvc.css +5565 -0
- package/bundled-test-harness/assets/container-Dj-5prh9.js +11288 -0
- package/bundled-test-harness/assets/contains-many-component-CAWqzX8W.js +2 -0
- package/bundled-test-harness/assets/contrast-checker-addon-BTLD7oMx.js +2 -0
- package/bundled-test-harness/assets/contrast-checker-addon-DBzizR04.js +71 -0
- package/bundled-test-harness/assets/convert-to-class-name-test-zZuKxYvF.js +17 -0
- package/bundled-test-harness/assets/coordinate-Bw8va6tO.js +48 -0
- package/bundled-test-harness/assets/copy-file-to-realm-test-DtCKPzqj.js +148 -0
- package/bundled-test-harness/assets/country-B_tWpLlO.js +199 -0
- package/bundled-test-harness/assets/create-file-modal-D-VPyEYp.js +570 -0
- package/bundled-test-harness/assets/create-listing-modal-test-hyLkQY0u.js +273 -0
- package/bundled-test-harness/assets/create-listing-pr-request-test-rjWFA_5S.js +117 -0
- package/bundled-test-harness/assets/create-spec-test-HKIxZGxK.js +256 -0
- package/bundled-test-harness/assets/create-specs-9-ELVyJP.js +215 -0
- package/bundled-test-harness/assets/create-submission-workflow-test-DNZrbRX8.js +132 -0
- package/bundled-test-harness/assets/credential-fields-test-xPEdA911.js +157 -0
- package/bundled-test-harness/assets/css-value-Du3HL39X.js +48 -0
- package/bundled-test-harness/assets/csv-file-def-EHRmilrp.js +277 -0
- package/bundled-test-harness/assets/currency-y6ZCHIqG.js +134 -0
- package/bundled-test-harness/assets/date-B27PrSFT.js +183 -0
- package/bundled-test-harness/assets/date-CiP5Eb9i.js +2 -0
- package/bundled-test-harness/assets/date-time-fields-test-Clf5vxRW.js +359 -0
- package/bundled-test-harness/assets/datetime-BEbR9YgU.js +201 -0
- package/bundled-test-harness/assets/datetime-DPnrt1wl.js +2 -0
- package/bundled-test-harness/assets/datetime-stamp-AuT7F7qn.js +2 -0
- package/bundled-test-harness/assets/datetime-stamp-CGwP2P3f.js +81 -0
- package/bundled-test-harness/assets/day-BFLxZ9bQ.js +2 -0
- package/bundled-test-harness/assets/day-CQoEkqgE.js +113 -0
- package/bundled-test-harness/assets/debug-message-test-CzgOpfcI.js +117 -0
- package/bundled-test-harness/assets/dist-B-fYvxfL.js +389 -0
- package/bundled-test-harness/assets/dist-C2IXvIKX.js +323 -0
- package/bundled-test-harness/assets/dist-CdNZu43l.js +1710 -0
- package/bundled-test-harness/assets/docx-file-def-BQMw460_.js +60 -0
- package/bundled-test-harness/assets/docx-meta-extractor-DBlmH_kV.js +60 -0
- package/bundled-test-harness/assets/docx-meta-extractor-Dw4gZ0ae.js +2 -0
- package/bundled-test-harness/assets/duration-B0SnEiw1.js +184 -0
- package/bundled-test-harness/assets/duration-DbjJTFeA.js +2 -0
- package/bundled-test-harness/assets/email-C-8cyWiQ.js +80 -0
- package/bundled-test-harness/assets/email-field-test-BOBmvQqx.js +75 -0
- package/bundled-test-harness/assets/email-xUgCst-p.js +2 -0
- package/bundled-test-harness/assets/enum-BWiCyJlu.js +167 -0
- package/bundled-test-harness/assets/enum-CzYjivhO.js +2 -0
- package/bundled-test-harness/assets/enum-field-test-Bea9EsQR.js +953 -0
- package/bundled-test-harness/assets/error-display-test-Cbl2D_0c.js +343 -0
- package/bundled-test-harness/assets/ethereum-address-Bw_J05bD.js +78 -0
- package/bundled-test-harness/assets/ethereum-address-C9wHMBt3.js +2 -0
- package/bundled-test-harness/assets/expiration-warning-BHcJEjZt.js +90 -0
- package/bundled-test-harness/assets/expiration-warning-_G8SKZd0.js +2 -0
- package/bundled-test-harness/assets/externals-CKblKBo1.js +4393 -0
- package/bundled-test-harness/assets/fallback-banner-BqCrvTDt.js +24 -0
- package/bundled-test-harness/assets/fallback-banner-live-delete-test-D_AYMvf6.js +207 -0
- package/bundled-test-harness/assets/fallback-banner-test-B8Ne9a5g.js +225 -0
- package/bundled-test-harness/assets/fallback-banner-test-C7oaSxd1.js +53 -0
- package/bundled-test-harness/assets/fallback-models-test-DY-PvU9k.js +161 -0
- package/bundled-test-harness/assets/field-component-Bj8YthPE.js +2 -0
- package/bundled-test-harness/assets/field-configuration-test-B5LztQ47.js +548 -0
- package/bundled-test-harness/assets/field-edit-Cx_haspD.js +36 -0
- package/bundled-test-harness/assets/field-edit-DQZWUz3F.js +2 -0
- package/bundled-test-harness/assets/field-markdown-domain-test-DnqK3CrE.js +616 -0
- package/bundled-test-harness/assets/field-markdown-oversize-test-BEpbXIvl.js +88 -0
- package/bundled-test-harness/assets/field-markdown-primitives-test-BDORWoOk.js +365 -0
- package/bundled-test-harness/assets/field-markdown-specialized-test-BmIzadYq.js +534 -0
- package/bundled-test-harness/assets/field-test-helpers-CRF9-jFw.js +45 -0
- package/bundled-test-harness/assets/file-api-DPMJghBY.js +7 -0
- package/bundled-test-harness/assets/file-attachment-test-DFLXg3xV.js +796 -0
- package/bundled-test-harness/assets/file-chooser-panel-test-B4DzCWkt.js +153 -0
- package/bundled-test-harness/assets/file-chooser-test-DpjOWgpB.js +504 -0
- package/bundled-test-harness/assets/file-def-edit-Bstl7Kkl.js +2 -0
- package/bundled-test-harness/assets/file-def-edit-C1dzJxmQ.js +26 -0
- package/bundled-test-harness/assets/file-def-embedded-CUy4G7Vc.js +2 -0
- package/bundled-test-harness/assets/file-def-embedded-DJs6P5t0.js +38 -0
- package/bundled-test-harness/assets/file-def-fitted-BlrBFfLh.js +38 -0
- package/bundled-test-harness/assets/file-def-fitted-Bo5Qfkyf.js +2 -0
- package/bundled-test-harness/assets/file-def-isolated-BsHydanv.js +38 -0
- package/bundled-test-harness/assets/file-def-isolated-Dp-Lc99-.js +2 -0
- package/bundled-test-harness/assets/file-def-serialization-test-CISKpt_o.js +89 -0
- package/bundled-test-harness/assets/file-menu-items-7_ltrFZq.js +117 -0
- package/bundled-test-harness/assets/file-menu-items-BnRG9ydE.js +2 -0
- package/bundled-test-harness/assets/file-preview-stage-CV3qZpiK.js +72 -0
- package/bundled-test-harness/assets/file-preview-stage-DTA5X8rX.js +2 -0
- package/bundled-test-harness/assets/file-shell-embedded-BpmiVzIG.js +2 -0
- package/bundled-test-harness/assets/file-shell-embedded-CEv0-6OE.js +68 -0
- package/bundled-test-harness/assets/file-shell-fitted-C6k3GnMc.js +2 -0
- package/bundled-test-harness/assets/file-shell-fitted-iSTg3PJa.js +98 -0
- package/bundled-test-harness/assets/file-shell-isolated-C-pEod2J.js +195 -0
- package/bundled-test-harness/assets/file-shell-isolated-DI9oU7ix.js +2 -0
- package/bundled-test-harness/assets/file-tree-from-index-BtOOMqnb.js +151 -0
- package/bundled-test-harness/assets/file-tree-from-index-test-T8w3hPw_.js +96 -0
- package/bundled-test-harness/assets/film-5n9_gRqZ.js +4074 -0
- package/bundled-test-harness/assets/film-Ca2Vzlfu.js +13 -0
- package/bundled-test-harness/assets/film-DEvhBbBu.js +2 -0
- package/bundled-test-harness/assets/fitted-6OGuHgoU.js +2 -0
- package/bundled-test-harness/assets/fitted-B2l1jlSp.js +34 -0
- package/bundled-test-harness/assets/flac-meta-extractor-BoJqvmDC.js +99 -0
- package/bundled-test-harness/assets/font-file-def-Czzt5paT.js +64 -0
- package/bundled-test-harness/assets/font-meta-extractor-DQYT_e5b.js +2 -0
- package/bundled-test-harness/assets/font-meta-extractor-IHD-pG8V.js +303 -0
- package/bundled-test-harness/assets/formatted-aibot-message-test-Djsl8RzE.js +109 -0
- package/bundled-test-harness/assets/from-elsewhere-BXcLYxxu.js +131 -0
- package/bundled-test-harness/assets/frontmatter-field-CciolgL3.js +41 -0
- package/bundled-test-harness/assets/garbage-collection-test-BTOLAfB6.js +403 -0
- package/bundled-test-harness/assets/gauge-C1loqGq3.js +2 -0
- package/bundled-test-harness/assets/gauge-u8dxl90d.js +106 -0
- package/bundled-test-harness/assets/general-test-Cd5WtVvd.js +926 -0
- package/bundled-test-harness/assets/get-relationship-membership-state-test-DJAuhOVM.js +1308 -0
- package/bundled-test-harness/assets/gif-meta-extractor-tSaPtuYW.js +114 -0
- package/bundled-test-harness/assets/glimmer-motion-and-choreo-in-cards-test-DNSy5l59.js +160 -0
- package/bundled-test-harness/assets/glimmer-motion-and-choreo-test-B6BbQxYq.js +74 -0
- package/bundled-test-harness/assets/helper-m6jA5HmU.js +478 -0
- package/bundled-test-harness/assets/host-submode-test-CsgdksBi.js +1243 -0
- package/bundled-test-harness/assets/html-file-def-yKtdMSa-.js +82 -0
- package/bundled-test-harness/assets/hydratable-card-CxNfbqly.js +147 -0
- package/bundled-test-harness/assets/hydratable-card-test-NJ4CI4ey.js +426 -0
- package/bundled-test-harness/assets/icons-B3SAtRoj.js +894 -0
- package/bundled-test-harness/assets/image-file-def-B0rpS3Yy.js +3 -0
- package/bundled-test-harness/assets/image-file-def-DUFmjNL8.js +65 -0
- package/bundled-test-harness/assets/image-olOUqgMQ.js +47 -0
- package/bundled-test-harness/assets/index-changes-test-D7OE-99k.js +367 -0
- package/bundled-test-harness/assets/index-query-engine-test-BBKqgSmg.js +2593 -0
- package/bundled-test-harness/assets/inspector-test-DV6Ms2uz.js +1930 -0
- package/bundled-test-harness/assets/instance-filter-matcher-test-Bs4kf7E8.js +788 -0
- package/bundled-test-harness/assets/interact-submode-creation-and-permissions-test-DIfgRhIN.js +475 -0
- package/bundled-test-harness/assets/interact-submode-setup-D4M_e580.js +566 -0
- package/bundled-test-harness/assets/is-component-declaration-test-jPGRTVh1.js +50 -0
- package/bundled-test-harness/assets/iso-bmff-DHtkSbQM.js +205 -0
- package/bundled-test-harness/assets/iso-bmff-zmOHoSVg.js +2 -0
- package/bundled-test-harness/assets/isolated-and-edit-BAnwcK1T.js +2 -0
- package/bundled-test-harness/assets/job-priority-header-test-7j2f3Dtl.js +81 -0
- package/bundled-test-harness/assets/job-scoped-instance-residency-test-DPzVQUL3.js +103 -0
- package/bundled-test-harness/assets/join-the-community-Ft5fjeIA.js +86 -0
- package/bundled-test-harness/assets/jpg-meta-extractor-Dsq6rZ8F.js +88 -0
- package/bundled-test-harness/assets/json-field-CxOZvp3k.js +19 -0
- package/bundled-test-harness/assets/json-field-ojdwGD6T.js +2 -0
- package/bundled-test-harness/assets/json-file-def-Da_5-zSM.js +298 -0
- package/bundled-test-harness/assets/last-modified-date-BnyJsc04.js +43 -0
- package/bundled-test-harness/assets/last-modified-date-test-DFl2mo1B.js +28 -0
- package/bundled-test-harness/assets/links-to-editor-DO24-71w.js +2 -0
- package/bundled-test-harness/assets/links-to-many-component-C7DabwAY.js +2 -0
- package/bundled-test-harness/assets/linksto-broken-link-placeholder-test-D4lDhvnQ.js +398 -0
- package/bundled-test-harness/assets/linksto-error-sentinel-test-oWgDz00K.js +238 -0
- package/bundled-test-harness/assets/linksto-many-broken-link-placeholder-test-CpSl7zJ7.js +354 -0
- package/bundled-test-harness/assets/linksto-many-per-slot-access-test-DJY3J8Xl.js +303 -0
- package/bundled-test-harness/assets/linksto-sentinel-reload-test-BxzfoONe.js +197 -0
- package/bundled-test-harness/assets/linksto-sentinel-roundtrip-test-DyE99km_.js +260 -0
- package/bundled-test-harness/assets/linksto-singular-js-access-contract-test-dcWAAgxt.js +196 -0
- package/bundled-test-harness/assets/llm-model-DrswiczZ.js +64 -0
- package/bundled-test-harness/assets/login-C-EIG0-Q.css +543 -0
- package/bundled-test-harness/assets/login-CNeL-9IC.js +408 -0
- package/bundled-test-harness/assets/login-error-text-test-CEH2tjNP.js +51 -0
- package/bundled-test-harness/assets/login-test-BpMx7qwV.js +246 -0
- package/bundled-test-harness/assets/m4a-meta-extractor-BJkMHUIK.js +204 -0
- package/bundled-test-harness/assets/main-BaUgfpPE.js +5 -0
- package/bundled-test-harness/assets/markdown-ByEGbwov.js +7 -0
- package/bundled-test-harness/assets/markdown-KJzgTg-A.js +2 -0
- package/bundled-test-harness/assets/markdown-editor-mode-select-BUGPXaSE.js +2 -0
- package/bundled-test-harness/assets/markdown-editor-mode-select-DBk8dG0O.js +54 -0
- package/bundled-test-harness/assets/markdown-embed-chooser-modal-test-BIlEmna9.js +470 -0
- package/bundled-test-harness/assets/markdown-embed-preview-pane-test-B6rscKpk.js +447 -0
- package/bundled-test-harness/assets/markdown-embed-preview-test-CTQw1wq-.js +368 -0
- package/bundled-test-harness/assets/markdown-fallback-BVsco6gJ.js +2 -0
- package/bundled-test-harness/assets/markdown-fallback-test-C_CIFEzH.js +316 -0
- package/bundled-test-harness/assets/markdown-highlighting-test-D6YvywF5.js +244 -0
- package/bundled-test-harness/assets/markdown-preview-1TSMSUv0.js +64 -0
- package/bundled-test-harness/assets/markdown-preview-jbuUjLoD.js +72 -0
- package/bundled-test-harness/assets/markdown-preview-test-zuU5uoA_.js +238 -0
- package/bundled-test-harness/assets/markdown-skill-frontmatter-test-CoicGRkb.js +146 -0
- package/bundled-test-harness/assets/menu-items-DZ_uOoYu.js +2 -0
- package/bundled-test-harness/assets/message-tool-test-K6LgTq5d.js +33 -0
- package/bundled-test-harness/assets/metadata-fields-WiOuUCDl.js +1415 -0
- package/bundled-test-harness/assets/metadata-fields-iu5AfQp3.js +2 -0
- package/bundled-test-harness/assets/midi-audio-def-CD2-4Wjx.js +52 -0
- package/bundled-test-harness/assets/midi-meta-extractor-CE3sLiEV.js +284 -0
- package/bundled-test-harness/assets/midi-meta-extractor-O7c8LHYV.js +2 -0
- package/bundled-test-harness/assets/migrate-skill-test-Beh-AeSN.js +161 -0
- package/bundled-test-harness/assets/mini-BNXINKKF.js +85 -0
- package/bundled-test-harness/assets/mini-C43Q4BWp.js +1519 -0
- package/bundled-test-harness/assets/mini-card-chooser-test-B1GMp-31.js +272 -0
- package/bundled-test-harness/assets/mini-file-chooser-test-CbI1vrQn.js +201 -0
- package/bundled-test-harness/assets/missing-template-BPhJRbDs.js +48 -0
- package/bundled-test-harness/assets/missing-template-DP-Pi-HQ.js +2 -0
- package/bundled-test-harness/assets/modal-KpPz2f8x.js +322 -0
- package/bundled-test-harness/assets/modal-container-0Efz_h2z.js +40 -0
- package/bundled-test-harness/assets/model-cost-tier-test-D-5VSjh6.js +173 -0
- package/bundled-test-harness/assets/module-contents-service-BRkTETb6.js +256 -0
- package/bundled-test-harness/assets/moment-Cln59YUK.js +3474 -0
- package/bundled-test-harness/assets/monaco-AbHCoDJY.js +143 -0
- package/bundled-test-harness/assets/monaco-test-DCPi18sy.js +100 -0
- package/bundled-test-harness/assets/monaco-test-waiter-lvFEYpFj.js +190 -0
- package/bundled-test-harness/assets/month-1eUIsvWN.js +2 -0
- package/bundled-test-harness/assets/month-BeUdWMWQ.js +123 -0
- package/bundled-test-harness/assets/month-day-Bbsd8YbR.js +192 -0
- package/bundled-test-harness/assets/month-day-Dks5STJu.js +2 -0
- package/bundled-test-harness/assets/month-year-pL_rpUhX.js +2 -0
- package/bundled-test-harness/assets/month-year-wH_YnYgL.js +93 -0
- package/bundled-test-harness/assets/mp3-meta-extractor-C3u34UHM.js +476 -0
- package/bundled-test-harness/assets/mp4-meta-extractor-Bj3F7dxs.js +188 -0
- package/bundled-test-harness/assets/multiple-stacks-test-mkNdTUMI.js +208 -0
- package/bundled-test-harness/assets/nested-query-field-render-test-BQLn3wg9.js +249 -0
- package/bundled-test-harness/assets/no-stacks-test-DpwZQAJ-.js +48 -0
- package/bundled-test-harness/assets/number-DZa-fHpu.js +151 -0
- package/bundled-test-harness/assets/number-Dvua76YP.js +3 -0
- package/bundled-test-harness/assets/number-field-test-BiaH2eaB.js +184 -0
- package/bundled-test-harness/assets/number-input-D5nDYDkK.js +82 -0
- package/bundled-test-harness/assets/office-extract-JzYva33g.js +27 -0
- package/bundled-test-harness/assets/office-extract-XMpsyYRh.js +2 -0
- package/bundled-test-harness/assets/ogg-meta-extractor-DJosZ9LA.js +225 -0
- package/bundled-test-harness/assets/on-key-BBVkS8Bi.js +472 -0
- package/bundled-test-harness/assets/ooxml-BlAE2w4d.js +172 -0
- package/bundled-test-harness/assets/ooxml-D-p8OmuM.js +2 -0
- package/bundled-test-harness/assets/open-image-in-new-tab-test-DWBU5pw9.js +52 -0
- package/bundled-test-harness/assets/operation-lowering-test-nzqprueU.js +2812 -0
- package/bundled-test-harness/assets/operations-CPvfTuY3.js +766 -0
- package/bundled-test-harness/assets/operations-invocation-test-C75T6zn3.js +523 -0
- package/bundled-test-harness/assets/operations-query-test-BoCszQEW.js +459 -0
- package/bundled-test-harness/assets/operations-test-79ipSnpM.js +2518 -0
- package/bundled-test-harness/assets/operations-x3Aw2Nky.js +3 -0
- package/bundled-test-harness/assets/operator-mode-acceptance-test-jjsYtt96.js +1188 -0
- package/bundled-test-harness/assets/operator-mode-card-chooser-test-hZP9gEQK.js +1036 -0
- package/bundled-test-harness/assets/operator-mode-links-test-DN16SuIx.js +793 -0
- package/bundled-test-harness/assets/operator-mode-state-service-gwiTSiWX.js +1275 -0
- package/bundled-test-harness/assets/operator-mode-state-service-test-Dt2qnKKP.js +206 -0
- package/bundled-test-harness/assets/operator-mode-test-BZnnxO9q.js +683 -0
- package/bundled-test-harness/assets/operator-mode-ui-test-O--qEo-y.js +1027 -0
- package/bundled-test-harness/assets/overlay-menu-items-test-Bl2k0aAa.js +317 -0
- package/bundled-test-harness/assets/overlays-CdN_JokA.js +270 -0
- package/bundled-test-harness/assets/overlays-clip-test-DpbR1ZTz.js +91 -0
- package/bundled-test-harness/assets/overlays-detached-element-test-cLgEGvMs.js +56 -0
- package/bundled-test-harness/assets/pane-PYdezM7g.js +330 -0
- package/bundled-test-harness/assets/panel-7FDqkxrr.js +474 -0
- package/bundled-test-harness/assets/panel-C3E0s49q.js +3540 -0
- package/bundled-test-harness/assets/past-sessions-test-BsjEeoze.js +321 -0
- package/bundled-test-harness/assets/patch-fields-test-CsixJmSr.js +1014 -0
- package/bundled-test-harness/assets/patch-instance-test-CBDgTi0L.js +348 -0
- package/bundled-test-harness/assets/pdf-file-def-9VNjnqDa.js +76 -0
- package/bundled-test-harness/assets/pdf-meta-extractor-BF4e5kMR.js +156 -0
- package/bundled-test-harness/assets/pdf-meta-extractor-D8Bxh2cc.js +2 -0
- package/bundled-test-harness/assets/pdf-viewer-Bu413sN8.js +112 -0
- package/bundled-test-harness/assets/pdf-viewer-GKDi_xmf.js +2 -0
- package/bundled-test-harness/assets/percentage-TOr6qK2T.js +84 -0
- package/bundled-test-harness/assets/permission-checking-realm-test-BRNVYszm.js +306 -0
- package/bundled-test-harness/assets/phone-number-D5SR8nWu.js +236 -0
- package/bundled-test-harness/assets/phone-number-field-test-DffwtqGd.js +73 -0
- package/bundled-test-harness/assets/phone-number-hf_xIVGQ.js +2 -0
- package/bundled-test-harness/assets/plate-Vojc88hM.js +41 -0
- package/bundled-test-harness/assets/plate-dTUzEMj5.js +2 -0
- package/bundled-test-harness/assets/player-CmRw0uM5.js +82 -0
- package/bundled-test-harness/assets/player-Dt85lPZl.js +2 -0
- package/bundled-test-harness/assets/plural-field-components-test-DNpGuH1D.js +198 -0
- package/bundled-test-harness/assets/png-image-def-GY7gjqya.js +48 -0
- package/bundled-test-harness/assets/png-meta-extractor-4pI611re.js +2 -0
- package/bundled-test-harness/assets/png-meta-extractor-CHp_rpAi.js +111 -0
- package/bundled-test-harness/assets/policy-scoped-search-test-CipPu7tY.js +339 -0
- package/bundled-test-harness/assets/pptx-file-def-lBBiebvn.js +60 -0
- package/bundled-test-harness/assets/pptx-meta-extractor-BjJYWiOJ.js +77 -0
- package/bundled-test-harness/assets/pptx-meta-extractor-DbT-dPRg.js +2 -0
- package/bundled-test-harness/assets/prerender-persistence-block-test-ClHMVvJt.js +124 -0
- package/bundled-test-harness/assets/prerender-serialize-cycle-test-LdqaMTK8.js +134 -0
- package/bundled-test-harness/assets/preview-CYlam_aW.js +74 -0
- package/bundled-test-harness/assets/preview-format-CiSo4kEa.js +41 -0
- package/bundled-test-harness/assets/preview-format-test-MsB1TOLB.js +103 -0
- package/bundled-test-harness/assets/process-card-B3xBGkv1.js +2 -0
- package/bundled-test-harness/assets/process-card-DumVcx9E.js +114 -0
- package/bundled-test-harness/assets/process-card-test-C44H8yVy.js +94 -0
- package/bundled-test-harness/assets/profile-settings-modal-ipYzrVTz.js +708 -0
- package/bundled-test-harness/assets/progress-circle-DJ6WSO2E.js +95 -0
- package/bundled-test-harness/assets/progress-circle-q358_9Sn.js +2 -0
- package/bundled-test-harness/assets/quarter-BjO5DlU2.js +2 -0
- package/bundled-test-harness/assets/quarter-_D72FwfS.js +168 -0
- package/bundled-test-harness/assets/query-field-membership-status-test-CzDyfK49.js +323 -0
- package/bundled-test-harness/assets/query-field-page-optin-test-B-x3vsmC.js +126 -0
- package/bundled-test-harness/assets/query-field-schema-test-DFw6KuYv.js +231 -0
- package/bundled-test-harness/assets/query-field-stale-prerender-test-DSQ-cv_O.js +152 -0
- package/bundled-test-harness/assets/query-fields-test-DQiMFRCe.js +535 -0
- package/bundled-test-harness/assets/rail-CNspDFyn.js +44 -0
- package/bundled-test-harness/assets/rail-D2YcQ0VP.js +2 -0
- package/bundled-test-harness/assets/realm-82Z5RUM_.js +95 -0
- package/bundled-test-harness/assets/realm-config-SgrwqjRu.js +844 -0
- package/bundled-test-harness/assets/realm-config-policy-standing-test-C6sQNk2u.js +290 -0
- package/bundled-test-harness/assets/realm-config-routing-rule-edit-test-DcYXBlvi.js +274 -0
- package/bundled-test-harness/assets/realm-config-settings-test-DblJv06X.js +187 -0
- package/bundled-test-harness/assets/realm-dropdown-CDvL8k3B.js +560 -0
- package/bundled-test-harness/assets/realm-et890flh.js +2 -0
- package/bundled-test-harness/assets/realm-field-test-pBK_x-Xw.js +100 -0
- package/bundled-test-harness/assets/realm-indexing-test-DSFn2F8F.js +4380 -0
- package/bundled-test-harness/assets/realm-policy-test-DYnLqzTS.js +1141 -0
- package/bundled-test-harness/assets/realm-test-DOZT2EG5.js +2363 -0
- package/bundled-test-harness/assets/realm-url-tooltip-qaXTjRb-.js +56 -0
- package/bundled-test-harness/assets/realm-url-tooltip-test-DGTEeLH9.js +78 -0
- package/bundled-test-harness/assets/reasoning-test-BRkhvYjr.js +234 -0
- package/bundled-test-harness/assets/recent-colors-addon-BreXcpg8.js +2 -0
- package/bundled-test-harness/assets/recent-colors-addon-CmCkbJ2_.js +61 -0
- package/bundled-test-harness/assets/relationship-loading-state-test-B6UGYKzG.js +290 -0
- package/bundled-test-harness/assets/relative-time-BjHvL023.js +2 -0
- package/bundled-test-harness/assets/relative-time-ChYKOMIM.js +129 -0
- package/bundled-test-harness/assets/remix-card-test-CpV0kKfq.js +58 -0
- package/bundled-test-harness/assets/rendered-markdown-CJa7IzCC.js +263 -0
- package/bundled-test-harness/assets/rendered-markdown-test-CVKsHS4P.js +587 -0
- package/bundled-test-harness/assets/resident-instance-reuse-test-jQfW1NMn.js +82 -0
- package/bundled-test-harness/assets/response-field-B2-daCl2.js +38 -0
- package/bundled-test-harness/assets/result-tile-BSg4mzbc.js +140 -0
- package/bundled-test-harness/assets/rich-markdown-BtP1yamM.js +2 -0
- package/bundled-test-harness/assets/rich-markdown-C6rQUngb.js +218 -0
- package/bundled-test-harness/assets/rich-markdown-field-test-9yB6ykCe.js +1647 -0
- package/bundled-test-harness/assets/room-C7tKd02X.js +1008 -0
- package/bundled-test-harness/assets/room-message-test-DsMmRYpV.js +445 -0
- package/bundled-test-harness/assets/room-test-golI1H61.js +95 -0
- package/bundled-test-harness/assets/run-realm-code-CbXk6bnK.js +1600 -0
- package/bundled-test-harness/assets/run-realm-code-test-B9JeesaW.js +2468 -0
- package/bundled-test-harness/assets/schema-generation-test-uLLGm5Vh.js +28 -0
- package/bundled-test-harness/assets/score-BQhCQdUP.js +2 -0
- package/bundled-test-harness/assets/score-CoWEzENH.js +100 -0
- package/bundled-test-harness/assets/scrolling-test-WHWEkKeZ.js +384 -0
- package/bundled-test-harness/assets/search-BkQYpQDY.js +605 -0
- package/bundled-test-harness/assets/search-adorn-test-CW92JPOk.js +136 -0
- package/bundled-test-harness/assets/search-entries-BU4w6Ymc.js +472 -0
- package/bundled-test-harness/assets/search-entries-result-test-9eydsDtD.js +234 -0
- package/bundled-test-harness/assets/search-entries-test-ByUREx0G.js +1486 -0
- package/bundled-test-harness/assets/search-result-header-UFkdo0Bx.js +128 -0
- package/bundled-test-harness/assets/search-results-DrHTuVRZ.js +266 -0
- package/bundled-test-harness/assets/search-results-test-krtQQM57.js +578 -0
- package/bundled-test-harness/assets/search-selection-menu-test-DoqSbez7.js +108 -0
- package/bundled-test-harness/assets/search-sheet-persistence-test-4ZPaEY-y.js +131 -0
- package/bundled-test-harness/assets/search-test-BYpq32RM.js +2241 -0
- package/bundled-test-harness/assets/searchable-BXw4T11q.js +192 -0
- package/bundled-test-harness/assets/searchable-CVvPDA3Q.js +2 -0
- package/bundled-test-harness/assets/searchable-option-test-BhLFI4ei.js +322 -0
- package/bundled-test-harness/assets/searchable-search-doc-test-DrNLCF73.js +1271 -0
- package/bundled-test-harness/assets/secure-sign-in-VNQhe0ae.js +130 -0
- package/bundled-test-harness/assets/secure-sign-in-Za8PX9cD.css +24 -0
- package/bundled-test-harness/assets/secure-sign-in-aunWHCrB.js +73 -0
- package/bundled-test-harness/assets/secure-sign-in-test-BcY1TcNd.js +32 -0
- package/bundled-test-harness/assets/secure-sign-in-test-DRdz89BT.js +245 -0
- package/bundled-test-harness/assets/sending-test-mbHpGZUu.js +576 -0
- package/bundled-test-harness/assets/serialization-rri-form-audit-test-nypV9J82.js +136 -0
- package/bundled-test-harness/assets/serialization-test-aLwrFv4d.js +8758 -0
- package/bundled-test-harness/assets/setup-Dgn0s6Zk.js +772 -0
- package/bundled-test-harness/assets/shared-link-target-reuse-test-D9MR2UNc.js +207 -0
- package/bundled-test-harness/assets/show-card-Dwfk332M.js +67 -0
- package/bundled-test-harness/assets/show-card-test-CRPwwJvc.js +365 -0
- package/bundled-test-harness/assets/show-file-DLdFPHMR.js +34 -0
- package/bundled-test-harness/assets/signed-capture-DUR9PohQ.js +204 -0
- package/bundled-test-harness/assets/signed-capture-link-test-DfTAB6OT.js +132 -0
- package/bundled-test-harness/assets/single-stack-test-Crr_8nti.js +652 -0
- package/bundled-test-harness/assets/skill-DQ00VonZ.js +3 -0
- package/bundled-test-harness/assets/skill-reference-LEitQV9i.js +112 -0
- package/bundled-test-harness/assets/skill-yZXS1VHQ.js +76 -0
- package/bundled-test-harness/assets/skills-test-D3-C-Dbm.js +648 -0
- package/bundled-test-harness/assets/slider-picker-B6AxKL2j.js +245 -0
- package/bundled-test-harness/assets/slider-picker-C4Tc5o-s.js +2 -0
- package/bundled-test-harness/assets/spec-Cl_LB6nC.js +602 -0
- package/bundled-test-harness/assets/spinner-BHFM7zcR.js +39 -0
- package/bundled-test-harness/assets/spinner-DvAvsyDT.css +21 -0
- package/bundled-test-harness/assets/store-BV6WX8oV.js +2205 -0
- package/bundled-test-harness/assets/store-module-rebuild-test-HyphFJiF.js +454 -0
- package/bundled-test-harness/assets/store-search-test-nUeJ5opb.js +175 -0
- package/bundled-test-harness/assets/store-test-BebUIJAg.js +3460 -0
- package/bundled-test-harness/assets/string-BHZZwNlZ.js +9 -0
- package/bundled-test-harness/assets/submode-switcher-D-U9cXo0.js +169 -0
- package/bundled-test-harness/assets/svg-meta-extractor-BsG4w2nX.js +42 -0
- package/bundled-test-harness/assets/swatches-picker-4vFztxHo.js +33 -0
- package/bundled-test-harness/assets/swatches-picker-C7RE7uJ8.js +2 -0
- package/bundled-test-harness/assets/switch-submode-CuA0Zfjn.js +79 -0
- package/bundled-test-harness/assets/switch-submode-test-i1Qic_Cp.js +168 -0
- package/bundled-test-harness/assets/tag-CZNs3DPN.js +105 -0
- package/bundled-test-harness/assets/tests-BneuP252.js +3523 -0
- package/bundled-test-harness/assets/text-area-DAShQQBe.js +9 -0
- package/bundled-test-harness/assets/text-file-def-D2Rs6nS1.js +151 -0
- package/bundled-test-harness/assets/text-input-validator-test-C9IG-1GZ.js +156 -0
- package/bundled-test-harness/assets/theme-Dm8LWaRK.js +9 -0
- package/bundled-test-harness/assets/theme-card-test-Cbb6tAap.js +621 -0
- package/bundled-test-harness/assets/theme-scheme-island-test-DOVLakx3.js +264 -0
- package/bundled-test-harness/assets/three-d-model-def-DWSPQGgD.js +70 -0
- package/bundled-test-harness/assets/time--_Txqya1.js +126 -0
- package/bundled-test-harness/assets/time-DKD7Bdjd.js +2 -0
- package/bundled-test-harness/assets/time-slots-BZaugjq_.js +2 -0
- package/bundled-test-harness/assets/time-slots-C85M0rWl.js +85 -0
- package/bundled-test-harness/assets/timeline-B3KGDm3M.js +2 -0
- package/bundled-test-harness/assets/timeline-BMwgaZZu.js +59 -0
- package/bundled-test-harness/assets/to-device-streaming-test-CMp5bFiz.js +163 -0
- package/bundled-test-harness/assets/token-usage-test-CXA0b8Ep.js +166 -0
- package/bundled-test-harness/assets/tool-field-BGLelnsr.js +94 -0
- package/bundled-test-harness/assets/tool-field-BOFuDDt3.js +2 -0
- package/bundled-test-harness/assets/tools-CTjy7Aub.js +725 -0
- package/bundled-test-harness/assets/tools-calling-test--JR-7AK7.js +200 -0
- package/bundled-test-harness/assets/tools-test-6yAW3W5I.js +2820 -0
- package/bundled-test-harness/assets/tools-test-DhpMUQkz.js +1624 -0
- package/bundled-test-harness/assets/ts-file-def-CDbf8aw2.js +159 -0
- package/bundled-test-harness/assets/update-room-skills-test-DoKsS_1C.js +240 -0
- package/bundled-test-harness/assets/url-D0ooeJxC.js +2 -0
- package/bundled-test-harness/assets/url-mFskVPSX.js +96 -0
- package/bundled-test-harness/assets/video-file-def-AcmWqzev.js +76 -0
- package/bundled-test-harness/assets/wav-meta-extractor-CbTLruQf.js +368 -0
- package/bundled-test-harness/assets/webm-meta-extractor-C9JH-CMX.js +178 -0
- package/bundled-test-harness/assets/webp-meta-extractor-C6sHm4J7.js +98 -0
- package/bundled-test-harness/assets/website-Bxuk_OmR.js +92 -0
- package/bundled-test-harness/assets/week-Bxssxce7.js +2 -0
- package/bundled-test-harness/assets/week-DQLj9974.js +111 -0
- package/bundled-test-harness/assets/welcome-to-boxel-BH82RsW5.js +172 -0
- package/bundled-test-harness/assets/workspace-DJ_s2x4g.js +614 -0
- package/bundled-test-harness/assets/workspace-a11y-test-BJbZNgoP.js +197 -0
- package/bundled-test-harness/assets/workspace-behavior-test-BLBARTfb.js +200 -0
- package/bundled-test-harness/assets/workspace-chooser-BpmlVrVn.js +2219 -0
- package/bundled-test-harness/assets/workspace-chooser-CqLR2Dzh.css +1296 -0
- package/bundled-test-harness/assets/workspace-chooser-catalog-order-test-CmAVNAWC.js +36 -0
- package/bundled-test-harness/assets/workspace-chooser-unreachable-notice-test-DEfG7Uh9.js +60 -0
- package/bundled-test-harness/assets/workspace-delete-multiple-test-DE7Z8ooj.js +212 -0
- package/bundled-test-harness/assets/workspace-delete-summary-test-CwtG_zLH.js +63 -0
- package/bundled-test-harness/assets/workspace-timestamp-labels-test-DFAaRmJW.js +58 -0
- package/bundled-test-harness/assets/xlsx-file-def-DcvaRYnZ.js +60 -0
- package/bundled-test-harness/assets/xlsx-meta-extractor-0RlViVaf.js +101 -0
- package/bundled-test-harness/assets/xlsx-meta-extractor-BH30Vuem.js +2 -0
- package/bundled-test-harness/assets/year-B_MBk_hE.js +78 -0
- package/bundled-test-harness/assets/year-hSpccI9L.js +2 -0
- package/bundled-test-harness/assets/zip-file-def-c84iddi9.js +288 -0
- package/bundled-test-harness/index.html +78 -68
- package/bundled-test-harness/tests/index.html +78 -68
- package/bundled-types/host-app/components/matrix/account-switch-failed.gts +2 -2
- package/bundled-types/host-app/components/matrix/auth.gts +2 -2
- package/bundled-types/host-app/components/matrix/cli-auth.gts +7 -6
- package/bundled-types/host-app/components/matrix/forgot-password.gts +43 -129
- package/bundled-types/host-app/components/matrix/login.gts +15 -118
- package/bundled-types/host-app/components/matrix/register-user.gts +45 -226
- package/bundled-types/host-app/components/matrix/secure-sign-in.gts +235 -0
- package/bundled-types/host-app/components/operator-mode/container.gts +13 -1
- package/bundled-types/host-app/components/operator-mode/profile-info-popover.gts +1 -1
- package/bundled-types/host-app/config/environment.ts +1 -1
- package/bundled-types/host-app/lib/secure-sign-in.ts +130 -0
- package/bundled-types/host-app/services/matrix-service.ts +46 -0
- package/bundled-types/host-app/services/monaco-service.ts +0 -5
- package/bundled-types/host-app/utils/login-token.ts +23 -10
- package/dist/api.js +1 -1
- package/dist/index.js +289 -285
- package/package.json +1 -1
- package/src/build-program.ts +6 -2
- package/src/commands/profile.ts +72 -3
- package/src/lib/profile-manager.ts +5 -1
- package/src/lib/secure-session.ts +29 -0
- package/src/lib/sso-login.ts +94 -15
- package/bundled-test-harness/assets/account-switch-failed-B3pr_iC3.js +0 -32
- package/bundled-test-harness/assets/account-switch-failed-DTGZZo-G.css +0 -61
- package/bundled-test-harness/assets/account-switch-failed-test-9ENVgvlx.js +0 -45
- package/bundled-test-harness/assets/add-workspace-BAbk0250.js +0 -141
- package/bundled-test-harness/assets/add-workspace-test-ChAja_t-.js +0 -72
- package/bundled-test-harness/assets/advanced-color-picker-C-xBFJ2S.js +0 -504
- package/bundled-test-harness/assets/advanced-color-picker-bWAmCT-8.js +0 -2
- package/bundled-test-harness/assets/ai-assistant-test-BJ9yetuC.js +0 -2211
- package/bundled-test-harness/assets/ai-module-creation-test-Bw3TKS9d.js +0 -151
- package/bundled-test-harness/assets/aibot-message-DkgHT6eJ.js +0 -465
- package/bundled-test-harness/assets/app-DW5QjtRp.js +0 -22816
- package/bundled-test-harness/assets/app-yCDjO4mk.css +0 -2718
- package/bundled-test-harness/assets/audio-file-def-bJ3cXVmC.js +0 -133
- package/bundled-test-harness/assets/avif-meta-extractor-CrSDfYEt.js +0 -162
- package/bundled-test-harness/assets/base64-image-C7UBjK5W.js +0 -262
- package/bundled-test-harness/assets/base64-image-CjWpxROT.js +0 -2
- package/bundled-test-harness/assets/big-integer-BBql7oGZ.js +0 -89
- package/bundled-test-harness/assets/big-integer-B_TrzRy_.js +0 -2
- package/bundled-test-harness/assets/binary-upload-dedupe-test-BiX8kS7D.js +0 -308
- package/bundled-test-harness/assets/boolean-9LNUUTfw.js +0 -2
- package/bundled-test-harness/assets/boolean-BAmK01TF.js +0 -94
- package/bundled-test-harness/assets/brand-functional-palette-CFuoS-LS.js +0 -137
- package/bundled-test-harness/assets/brand-logo-By89eknI.js +0 -295
- package/bundled-test-harness/assets/broken-link-template-test-odBriDSP.js +0 -192
- package/bundled-test-harness/assets/bundled-base-CLQkkmN4.js +0 -254
- package/bundled-test-harness/assets/bundled-base-modules-test-BYrTaTwa.js +0 -54
- package/bundled-test-harness/assets/buried-stack-item-scroll-test-DU4bM5nd.js +0 -236
- package/bundled-test-harness/assets/bxl-expression-test-Cs9JaZbC.js +0 -250
- package/bundled-test-harness/assets/can-invoke-test-ccMc06BU.js +0 -401
- package/bundled-test-harness/assets/card-api-Bn65NUT0.js +0 -8
- package/bundled-test-harness/assets/card-api-test-COrFXu2i.js +0 -198
- package/bundled-test-harness/assets/card-api-u1pOrwS6.js +0 -4393
- package/bundled-test-harness/assets/card-basics-test-D4rn3iN-.js +0 -5364
- package/bundled-test-harness/assets/card-chooser-paging-test-bZhdrUXt.js +0 -235
- package/bundled-test-harness/assets/card-chooser-test-D9w1duob.js +0 -393
- package/bundled-test-harness/assets/card-collection-ClCV-__1.js +0 -118
- package/bundled-test-harness/assets/card-context-search-results-H_rN3Upz.js +0 -30
- package/bundled-test-harness/assets/card-context-search-results-test-jciyaouV.js +0 -184
- package/bundled-test-harness/assets/card-def-field-def-relationships-test-BVZoQzM8.js +0 -562
- package/bundled-test-harness/assets/card-delete-test-CuLcZFnY.js +0 -466
- package/bundled-test-harness/assets/card-error-DIOivSkD.js +0 -72
- package/bundled-test-harness/assets/card-error-awaiting-index-test-JMwcRONq.js +0 -53
- package/bundled-test-harness/assets/card-error-detail-96jWBx6B.js +0 -271
- package/bundled-test-harness/assets/card-info-BxPtwG1h.js +0 -2
- package/bundled-test-harness/assets/card-list-B34qY3io.js +0 -2
- package/bundled-test-harness/assets/card-list-BpCaKkZJ.js +0 -202
- package/bundled-test-harness/assets/card-resource-DcPbIwH9.js +0 -86
- package/bundled-test-harness/assets/cards-grid-CTN8nBT_.js +0 -344
- package/bundled-test-harness/assets/cards-grid-Cx44vL-M.js +0 -2
- package/bundled-test-harness/assets/cards-grid-layout-BdL0Uzxl.js +0 -111
- package/bundled-test-harness/assets/cards-grid-layout-Dn8Yb4ma.js +0 -2
- package/bundled-test-harness/assets/check-correctness-test-BfMV-MC0.js +0 -554
- package/bundled-test-harness/assets/clip-CK6mVuyN.js +0 -92
- package/bundled-test-harness/assets/clip-CfXD1JTr.js +0 -2
- package/bundled-test-harness/assets/code-ref-85Bih6Zl.js +0 -138
- package/bundled-test-harness/assets/code-ref-DATHaoyt.js +0 -2
- package/bundled-test-harness/assets/code-submode-availability-test-DLYlx0wo.js +0 -198
- package/bundled-test-harness/assets/code-submode-test-CDIi7MjD.js +0 -1824
- package/bundled-test-harness/assets/codeblocks-test-CNPyTvuv.js +0 -418
- package/bundled-test-harness/assets/codemirror-editor-BPOPTR-f.js +0 -2
- package/bundled-test-harness/assets/codemirror-editor-DPhG0pec.js +0 -701
- package/bundled-test-harness/assets/codemirror-embed-toolbar-test-Dk5lFOUq.js +0 -366
- package/bundled-test-harness/assets/color-BxN5gRSg.js +0 -65
- package/bundled-test-harness/assets/color-CrunRcis.js +0 -2
- package/bundled-test-harness/assets/color-field-test-COjFIpXV.js +0 -212
- package/bundled-test-harness/assets/color-picker-field-C-GS1CIw.js +0 -139
- package/bundled-test-harness/assets/color-picker-field-D3RXhbCK.js +0 -2
- package/bundled-test-harness/assets/color-wheel-picker-Bz8cBmf4.js +0 -283
- package/bundled-test-harness/assets/color-wheel-picker-DrwPrB8B.js +0 -2
- package/bundled-test-harness/assets/command-data-BxXgtNBf.js +0 -2
- package/bundled-test-harness/assets/command-data-ZdkcpEgG.js +0 -95
- package/bundled-test-harness/assets/compaction-test-DS7DTGT_.js +0 -150
- package/bundled-test-harness/assets/components-CbCTWAON.js +0 -17777
- package/bundled-test-harness/assets/computed-test-D_OrXDtR.js +0 -1320
- package/bundled-test-harness/assets/container-DDolu1gk.js +0 -11109
- package/bundled-test-harness/assets/container-DndcCIMv.css +0 -5169
- package/bundled-test-harness/assets/contains-many-component-BtgnAXih.js +0 -2
- package/bundled-test-harness/assets/contrast-checker-addon-kwtLKWdL.js +0 -2
- package/bundled-test-harness/assets/contrast-checker-addon-zFY5cen1.js +0 -71
- package/bundled-test-harness/assets/convert-to-class-name-test-BcGWl2K1.js +0 -17
- package/bundled-test-harness/assets/coordinate-D72EF1Pl.js +0 -48
- package/bundled-test-harness/assets/copy-file-to-realm-test-CYoDX4YV.js +0 -148
- package/bundled-test-harness/assets/country-B-iIe5v8.js +0 -199
- package/bundled-test-harness/assets/create-file-modal-PpvMksjR.js +0 -570
- package/bundled-test-harness/assets/create-listing-modal-test-CQtEf_UD.js +0 -273
- package/bundled-test-harness/assets/create-listing-pr-request-test-CDtKWyfk.js +0 -117
- package/bundled-test-harness/assets/create-spec-test-Cbqk8I9T.js +0 -256
- package/bundled-test-harness/assets/create-specs-CZg2cpnh.js +0 -215
- package/bundled-test-harness/assets/create-submission-workflow-test-CYrxF7bg.js +0 -132
- package/bundled-test-harness/assets/credential-fields-test-Di4jCJgU.js +0 -157
- package/bundled-test-harness/assets/css-value-CceJyI5o.js +0 -48
- package/bundled-test-harness/assets/csv-file-def-DJL2aZI9.js +0 -277
- package/bundled-test-harness/assets/currency-Bn5WIqzF.js +0 -134
- package/bundled-test-harness/assets/date-XI2CVYA2.js +0 -2
- package/bundled-test-harness/assets/date-h83UJcFR.js +0 -183
- package/bundled-test-harness/assets/date-time-fields-test-Cterr2mj.js +0 -359
- package/bundled-test-harness/assets/datetime-DadI80tC.js +0 -201
- package/bundled-test-harness/assets/datetime-Dpb_Sejj.js +0 -2
- package/bundled-test-harness/assets/datetime-stamp-C4vv397u.js +0 -81
- package/bundled-test-harness/assets/datetime-stamp-DIsJdQux.js +0 -2
- package/bundled-test-harness/assets/day-C4pZoGNM.js +0 -113
- package/bundled-test-harness/assets/day-D0goBhKb.js +0 -2
- package/bundled-test-harness/assets/debug-message-test-CV0sj-fl.js +0 -117
- package/bundled-test-harness/assets/dist-CAIttNZm.js +0 -1710
- package/bundled-test-harness/assets/dist-CLbqnmnm.js +0 -389
- package/bundled-test-harness/assets/dist-qkBOmIQy.js +0 -323
- package/bundled-test-harness/assets/docx-file-def-hz2tVQKf.js +0 -60
- package/bundled-test-harness/assets/docx-meta-extractor-CeRshlxL.js +0 -60
- package/bundled-test-harness/assets/docx-meta-extractor-muK5CKF3.js +0 -2
- package/bundled-test-harness/assets/duration-BYx1dLfm.js +0 -2
- package/bundled-test-harness/assets/duration-FAmTFeUa.js +0 -184
- package/bundled-test-harness/assets/email-D-bFy_C1.js +0 -80
- package/bundled-test-harness/assets/email-field-test-CY9K2zur.js +0 -75
- package/bundled-test-harness/assets/email-j4DZNH2-.js +0 -2
- package/bundled-test-harness/assets/enum-B7_baAn_.js +0 -167
- package/bundled-test-harness/assets/enum-BQqNzVQS.js +0 -2
- package/bundled-test-harness/assets/enum-field-test-BJ9Epz15.js +0 -953
- package/bundled-test-harness/assets/error-display-test-CbDWjJ2F.js +0 -343
- package/bundled-test-harness/assets/ethereum-address-BOLEnKsm.js +0 -78
- package/bundled-test-harness/assets/ethereum-address-s3Kvb2wG.js +0 -2
- package/bundled-test-harness/assets/expiration-warning-BaIP1MOZ.js +0 -2
- package/bundled-test-harness/assets/expiration-warning-gjEtxPk0.js +0 -90
- package/bundled-test-harness/assets/externals-Bih8ejPS.js +0 -4393
- package/bundled-test-harness/assets/fallback-banner-MlImHjSD.js +0 -24
- package/bundled-test-harness/assets/fallback-banner-live-delete-test-Bm7IKXPf.js +0 -207
- package/bundled-test-harness/assets/fallback-banner-test-C7TGA0Ob.js +0 -53
- package/bundled-test-harness/assets/fallback-banner-test-lvuaVRXu.js +0 -225
- package/bundled-test-harness/assets/fallback-models-test-Dy7iIKUS.js +0 -161
- package/bundled-test-harness/assets/field-component-DBoOxTke.js +0 -2
- package/bundled-test-harness/assets/field-configuration-test-DnAnzyC-.js +0 -548
- package/bundled-test-harness/assets/field-edit-DdJ8Akso.js +0 -2
- package/bundled-test-harness/assets/field-edit-XAop92l8.js +0 -36
- package/bundled-test-harness/assets/field-markdown-domain-test-cZCqbcjj.js +0 -616
- package/bundled-test-harness/assets/field-markdown-oversize-test-BuATetVz.js +0 -88
- package/bundled-test-harness/assets/field-markdown-primitives-test-BsubQfhv.js +0 -365
- package/bundled-test-harness/assets/field-markdown-specialized-test-4eNLiYpF.js +0 -534
- package/bundled-test-harness/assets/field-test-helpers-9I7cHnaU.js +0 -45
- package/bundled-test-harness/assets/file-api-CC86I7Er.js +0 -7
- package/bundled-test-harness/assets/file-attachment-test-o9191GMb.js +0 -796
- package/bundled-test-harness/assets/file-chooser-panel-test-C8aZuJlk.js +0 -153
- package/bundled-test-harness/assets/file-chooser-test-B0Tn8CCR.js +0 -504
- package/bundled-test-harness/assets/file-def-edit-BSiF2Lje.js +0 -2
- package/bundled-test-harness/assets/file-def-edit-C5TYBp_q.js +0 -26
- package/bundled-test-harness/assets/file-def-embedded-BLVTCiVB.js +0 -2
- package/bundled-test-harness/assets/file-def-embedded-Bep4iD6s.js +0 -38
- package/bundled-test-harness/assets/file-def-fitted-BTs-AS78.js +0 -2
- package/bundled-test-harness/assets/file-def-fitted-DcPitdYu.js +0 -38
- package/bundled-test-harness/assets/file-def-isolated-Kg1YVhm-.js +0 -38
- package/bundled-test-harness/assets/file-def-isolated-tK5JWCam.js +0 -2
- package/bundled-test-harness/assets/file-def-serialization-test-D4wnd5XK.js +0 -89
- package/bundled-test-harness/assets/file-menu-items-CH4-naSK.js +0 -117
- package/bundled-test-harness/assets/file-menu-items-emUxx3ZI.js +0 -2
- package/bundled-test-harness/assets/file-preview-stage-B1McIWwu.js +0 -2
- package/bundled-test-harness/assets/file-preview-stage-BgZLNMN4.js +0 -72
- package/bundled-test-harness/assets/file-shell-embedded-BmfuwWfU.js +0 -2
- package/bundled-test-harness/assets/file-shell-embedded-zh8CJanA.js +0 -68
- package/bundled-test-harness/assets/file-shell-fitted-DSFUNRGJ.js +0 -2
- package/bundled-test-harness/assets/file-shell-fitted-DXKDH0fn.js +0 -98
- package/bundled-test-harness/assets/file-shell-isolated-0F1MFv4q.js +0 -2
- package/bundled-test-harness/assets/file-shell-isolated-DduZZzmi.js +0 -195
- package/bundled-test-harness/assets/file-tree-from-index-BzDvvUHy.js +0 -151
- package/bundled-test-harness/assets/file-tree-from-index-test-D0hfI4a1.js +0 -96
- package/bundled-test-harness/assets/film-BN_HVXBU.js +0 -13
- package/bundled-test-harness/assets/film-CKkbUi0L.js +0 -2
- package/bundled-test-harness/assets/film-CMNJITZ-.js +0 -4074
- package/bundled-test-harness/assets/fitted-CAvdcKpu.js +0 -34
- package/bundled-test-harness/assets/fitted-CbKOwd1u.js +0 -2
- package/bundled-test-harness/assets/flac-meta-extractor-e8qajPSl.js +0 -99
- package/bundled-test-harness/assets/font-file-def-9atde5W8.js +0 -64
- package/bundled-test-harness/assets/font-meta-extractor-IralDC8M.js +0 -303
- package/bundled-test-harness/assets/font-meta-extractor-zPBVOfoR.js +0 -2
- package/bundled-test-harness/assets/formatted-aibot-message-test-CWOiZUng.js +0 -109
- package/bundled-test-harness/assets/from-elsewhere-ChxbtsBa.js +0 -131
- package/bundled-test-harness/assets/frontmatter-field-cdig7KR9.js +0 -41
- package/bundled-test-harness/assets/garbage-collection-test-Dg-ww_Sb.js +0 -403
- package/bundled-test-harness/assets/gauge-B45nLOGe.js +0 -106
- package/bundled-test-harness/assets/gauge-BK-768BM.js +0 -2
- package/bundled-test-harness/assets/general-test-D7cn7PUr.js +0 -926
- package/bundled-test-harness/assets/get-relationship-membership-state-test-Skmj9V6y.js +0 -1308
- package/bundled-test-harness/assets/gif-meta-extractor-BychhK9q.js +0 -114
- package/bundled-test-harness/assets/glimmer-motion-and-choreo-in-cards-test-C09YUmk4.js +0 -160
- package/bundled-test-harness/assets/glimmer-motion-and-choreo-test-DYskx_Kk.js +0 -74
- package/bundled-test-harness/assets/helper-BHX0HLF2.js +0 -478
- package/bundled-test-harness/assets/host-submode-test-Clw_QnvF.js +0 -1243
- package/bundled-test-harness/assets/html-file-def-C0P9giwU.js +0 -82
- package/bundled-test-harness/assets/hydratable-card-DnjrxKsT.js +0 -147
- package/bundled-test-harness/assets/hydratable-card-test-BAmWHfv1.js +0 -426
- package/bundled-test-harness/assets/icons-DBXBZgLe.js +0 -894
- package/bundled-test-harness/assets/image-Cip6ojDd.js +0 -47
- package/bundled-test-harness/assets/image-file-def-BdQxjZcN.js +0 -65
- package/bundled-test-harness/assets/image-file-def-DP4aqWcS.js +0 -3
- package/bundled-test-harness/assets/index-changes-test-D8b_56Ke.js +0 -367
- package/bundled-test-harness/assets/index-query-engine-test-CCyaUwMX.js +0 -2593
- package/bundled-test-harness/assets/inspector-test-BJTVGdOO.js +0 -1930
- package/bundled-test-harness/assets/instance-filter-matcher-test-DjsPrXL7.js +0 -788
- package/bundled-test-harness/assets/interact-submode-creation-and-permissions-test-DSqM0vxh.js +0 -475
- package/bundled-test-harness/assets/interact-submode-setup-DF31UMX-.js +0 -566
- package/bundled-test-harness/assets/is-component-declaration-test-Did47eG9.js +0 -50
- package/bundled-test-harness/assets/iso-bmff-LuWkGL__.js +0 -205
- package/bundled-test-harness/assets/iso-bmff-_flO6c20.js +0 -2
- package/bundled-test-harness/assets/isolated-and-edit-frocLHin.js +0 -2
- package/bundled-test-harness/assets/job-priority-header-test-DHLAXfp7.js +0 -81
- package/bundled-test-harness/assets/job-scoped-instance-residency-test-C1Bt5j98.js +0 -103
- package/bundled-test-harness/assets/join-the-community-BBUSO2cs.js +0 -86
- package/bundled-test-harness/assets/jpg-meta-extractor-CoybO4Hq.js +0 -88
- package/bundled-test-harness/assets/json-field-8sdH5RQb.js +0 -2
- package/bundled-test-harness/assets/json-field-BDD3iTUh.js +0 -19
- package/bundled-test-harness/assets/json-file-def-BKibsfc6.js +0 -298
- package/bundled-test-harness/assets/last-modified-date-CR5jru2m.js +0 -43
- package/bundled-test-harness/assets/last-modified-date-test-jJ00YdTm.js +0 -28
- package/bundled-test-harness/assets/links-to-editor-rDoCYaN-.js +0 -2
- package/bundled-test-harness/assets/links-to-many-component-BqZT88Fb.js +0 -2
- package/bundled-test-harness/assets/linksto-broken-link-placeholder-test-Cp1Eb_4U.js +0 -398
- package/bundled-test-harness/assets/linksto-error-sentinel-test-Bddavnh_.js +0 -238
- package/bundled-test-harness/assets/linksto-many-broken-link-placeholder-test-c5WegXnR.js +0 -354
- package/bundled-test-harness/assets/linksto-many-per-slot-access-test-CWskzfGW.js +0 -303
- package/bundled-test-harness/assets/linksto-sentinel-reload-test-ByeVNhr8.js +0 -197
- package/bundled-test-harness/assets/linksto-sentinel-roundtrip-test-DP26i6Gb.js +0 -260
- package/bundled-test-harness/assets/linksto-singular-js-access-contract-test-fDUXx8tO.js +0 -196
- package/bundled-test-harness/assets/llm-model-BcLEkTV7.js +0 -64
- package/bundled-test-harness/assets/login-CeuuNVvU.css +0 -139
- package/bundled-test-harness/assets/login-DV0WlJv-.js +0 -348
- package/bundled-test-harness/assets/login-error-text-test-BMGY_9gW.js +0 -51
- package/bundled-test-harness/assets/login-test-CL9YpMH5.js +0 -246
- package/bundled-test-harness/assets/m4a-meta-extractor-CHO1JQtb.js +0 -204
- package/bundled-test-harness/assets/main-CPLT8JNu.js +0 -5
- package/bundled-test-harness/assets/markdown-BvBALLGh.js +0 -7
- package/bundled-test-harness/assets/markdown-DFezmrFD.js +0 -2
- package/bundled-test-harness/assets/markdown-editor-mode-select-Au64bcIO.js +0 -2
- package/bundled-test-harness/assets/markdown-editor-mode-select-rK9PP8rv.js +0 -54
- package/bundled-test-harness/assets/markdown-embed-chooser-modal-test-CIxizf5k.js +0 -470
- package/bundled-test-harness/assets/markdown-embed-preview-pane-test-C7GoNN7l.js +0 -447
- package/bundled-test-harness/assets/markdown-embed-preview-test-CDnj4uhd.js +0 -368
- package/bundled-test-harness/assets/markdown-fallback-n7PsLNmO.js +0 -2
- package/bundled-test-harness/assets/markdown-fallback-test-DTHT6OwQ.js +0 -316
- package/bundled-test-harness/assets/markdown-highlighting-test-DJ-4WSE_.js +0 -244
- package/bundled-test-harness/assets/markdown-preview-Ccelx5W-.js +0 -64
- package/bundled-test-harness/assets/markdown-preview-JXuMC_ve.js +0 -72
- package/bundled-test-harness/assets/markdown-preview-test-ByZqrpPk.js +0 -238
- package/bundled-test-harness/assets/markdown-skill-frontmatter-test-DAHGeL4K.js +0 -146
- package/bundled-test-harness/assets/menu-items-DzJm9H_H.js +0 -2
- package/bundled-test-harness/assets/message-tool-test-lmdrIEdY.js +0 -33
- package/bundled-test-harness/assets/metadata-fields-BZZr4Qe5.js +0 -2
- package/bundled-test-harness/assets/metadata-fields-BtdjGsKE.js +0 -1415
- package/bundled-test-harness/assets/midi-audio-def-uYbYFmFi.js +0 -52
- package/bundled-test-harness/assets/midi-meta-extractor-DNI5gc1q.js +0 -284
- package/bundled-test-harness/assets/midi-meta-extractor-DbKZ4fMG.js +0 -2
- package/bundled-test-harness/assets/migrate-skill-test-DI1xceiL.js +0 -161
- package/bundled-test-harness/assets/mini-CNoDyHqG.js +0 -1519
- package/bundled-test-harness/assets/mini-DexlIeKK.js +0 -85
- package/bundled-test-harness/assets/mini-card-chooser-test-DT5eIf1_.js +0 -272
- package/bundled-test-harness/assets/mini-file-chooser-test-DTQnKTZJ.js +0 -201
- package/bundled-test-harness/assets/missing-template-DL2mwddM.js +0 -2
- package/bundled-test-harness/assets/missing-template-ltqlJ4JC.js +0 -48
- package/bundled-test-harness/assets/modal-container-DRnt95-S.js +0 -40
- package/bundled-test-harness/assets/modal-zE95eEFp.js +0 -322
- package/bundled-test-harness/assets/model-cost-tier-test-CcFz7hcv.js +0 -173
- package/bundled-test-harness/assets/module-contents-service-Dk_zWt-V.js +0 -256
- package/bundled-test-harness/assets/month-BqReBYWo.js +0 -2
- package/bundled-test-harness/assets/month-RhvmIp40.js +0 -123
- package/bundled-test-harness/assets/month-day-XFAQA72z.js +0 -2
- package/bundled-test-harness/assets/month-day-XzKpk6nz.js +0 -192
- package/bundled-test-harness/assets/month-year-BeuNr2Cl.js +0 -2
- package/bundled-test-harness/assets/month-year-DhU7hATV.js +0 -93
- package/bundled-test-harness/assets/mp3-meta-extractor-Dx2RnJc5.js +0 -476
- package/bundled-test-harness/assets/mp4-meta-extractor--k0m8KsT.js +0 -188
- package/bundled-test-harness/assets/multiple-stacks-test-bC24IWcJ.js +0 -208
- package/bundled-test-harness/assets/nested-query-field-render-test-qxElXx1e.js +0 -249
- package/bundled-test-harness/assets/no-stacks-test-Br7IGAgV.js +0 -48
- package/bundled-test-harness/assets/number-73SsCMEF.js +0 -3
- package/bundled-test-harness/assets/number-CicTBWQd.js +0 -151
- package/bundled-test-harness/assets/number-field-test-kV5zXo1J.js +0 -184
- package/bundled-test-harness/assets/number-input-CQy4xUeA.js +0 -82
- package/bundled-test-harness/assets/office-extract-Bo8sbNkK.js +0 -27
- package/bundled-test-harness/assets/office-extract-CfBaoRMD.js +0 -2
- package/bundled-test-harness/assets/ogg-meta-extractor-aIf5q_Rq.js +0 -225
- package/bundled-test-harness/assets/on-key-C8acaldQ.js +0 -472
- package/bundled-test-harness/assets/ooxml-Bu3iZezv.js +0 -172
- package/bundled-test-harness/assets/ooxml-jQPBQK25.js +0 -2
- package/bundled-test-harness/assets/open-image-in-new-tab-test-CP7q3kMm.js +0 -52
- package/bundled-test-harness/assets/operation-lowering-test-9Mdr0hRT.js +0 -2812
- package/bundled-test-harness/assets/operations-R9b661Qn.js +0 -3
- package/bundled-test-harness/assets/operations-Zv_V3Api.js +0 -766
- package/bundled-test-harness/assets/operations-invocation-test-BJPpWb2H.js +0 -523
- package/bundled-test-harness/assets/operations-query-test-DufdmPQF.js +0 -459
- package/bundled-test-harness/assets/operations-test-CzT051YH.js +0 -2518
- package/bundled-test-harness/assets/operator-mode-acceptance-test-ByOIOcD0.js +0 -1188
- package/bundled-test-harness/assets/operator-mode-card-chooser-test-CNhR9mvv.js +0 -1036
- package/bundled-test-harness/assets/operator-mode-links-test-CuxSVTPR.js +0 -793
- package/bundled-test-harness/assets/operator-mode-state-service-CCeHt5SH.js +0 -1275
- package/bundled-test-harness/assets/operator-mode-state-service-test-C8TI9WWg.js +0 -206
- package/bundled-test-harness/assets/operator-mode-test-DG-mG8Tn.js +0 -683
- package/bundled-test-harness/assets/operator-mode-ui-test-DB7xhjS0.js +0 -1027
- package/bundled-test-harness/assets/overlay-menu-items-test-C6rcdF_S.js +0 -317
- package/bundled-test-harness/assets/overlays-D2zmPxzK.js +0 -270
- package/bundled-test-harness/assets/overlays-clip-test-Clpq3JzQ.js +0 -91
- package/bundled-test-harness/assets/overlays-detached-element-test-BtsTeJch.js +0 -56
- package/bundled-test-harness/assets/pane-f-IYhcWT.js +0 -330
- package/bundled-test-harness/assets/panel-B3PCSBbf.js +0 -3540
- package/bundled-test-harness/assets/panel-Ban7zCBP.js +0 -474
- package/bundled-test-harness/assets/past-sessions-test-uM2m-oKV.js +0 -321
- package/bundled-test-harness/assets/patch-fields-test-COPjDhnt.js +0 -1014
- package/bundled-test-harness/assets/patch-instance-test-CRb3dfby.js +0 -348
- package/bundled-test-harness/assets/pdf-file-def-J_yOUU8_.js +0 -76
- package/bundled-test-harness/assets/pdf-meta-extractor-83T5Bdo7.js +0 -156
- package/bundled-test-harness/assets/pdf-meta-extractor-INFIklMy.js +0 -2
- package/bundled-test-harness/assets/pdf-viewer-B4rRluWA.js +0 -2
- package/bundled-test-harness/assets/pdf-viewer-vYem8ozk.js +0 -112
- package/bundled-test-harness/assets/percentage-ChagfNRG.js +0 -84
- package/bundled-test-harness/assets/permission-checking-realm-test-Dmb2a428.js +0 -306
- package/bundled-test-harness/assets/phone-number-BiD2eaSd.js +0 -236
- package/bundled-test-harness/assets/phone-number-C-wt4_UK.js +0 -2
- package/bundled-test-harness/assets/phone-number-field-test-BHzAmuBP.js +0 -73
- package/bundled-test-harness/assets/plate-CqN2nM6P.js +0 -41
- package/bundled-test-harness/assets/plate-DaIfpORN.js +0 -2
- package/bundled-test-harness/assets/player-CGt5fTd5.js +0 -2
- package/bundled-test-harness/assets/player-CN0l44LK.js +0 -82
- package/bundled-test-harness/assets/plural-field-components-test-CO2g2opW.js +0 -198
- package/bundled-test-harness/assets/png-image-def-B_oou2wS.js +0 -48
- package/bundled-test-harness/assets/png-meta-extractor-BfPz1qP_.js +0 -2
- package/bundled-test-harness/assets/png-meta-extractor-C8ai8sPw.js +0 -111
- package/bundled-test-harness/assets/policy-scoped-search-test-BRRp2a1A.js +0 -339
- package/bundled-test-harness/assets/pptx-file-def-C3qYEHDM.js +0 -60
- package/bundled-test-harness/assets/pptx-meta-extractor-8IuoBq4I.js +0 -77
- package/bundled-test-harness/assets/pptx-meta-extractor-BPhy9RMM.js +0 -2
- package/bundled-test-harness/assets/prerender-persistence-block-test-Cteb_Rs_.js +0 -124
- package/bundled-test-harness/assets/prerender-serialize-cycle-test-CH7b6Ra9.js +0 -134
- package/bundled-test-harness/assets/preview-CmERZpI6.js +0 -74
- package/bundled-test-harness/assets/preview-format-BPMlCSbb.js +0 -41
- package/bundled-test-harness/assets/preview-format-test-B7sA8fbZ.js +0 -103
- package/bundled-test-harness/assets/process-card-CtDzDB-_.js +0 -2
- package/bundled-test-harness/assets/process-card-erbWKY5h.js +0 -114
- package/bundled-test-harness/assets/process-card-test-DXOt1jDW.js +0 -94
- package/bundled-test-harness/assets/profile-settings-modal-11BrR058.js +0 -708
- package/bundled-test-harness/assets/progress-circle-Cd79Zqh2.js +0 -2
- package/bundled-test-harness/assets/progress-circle-sc-W5aUl.js +0 -95
- package/bundled-test-harness/assets/quarter-B61kCpcD.js +0 -168
- package/bundled-test-harness/assets/quarter-d5jkTzcz.js +0 -2
- package/bundled-test-harness/assets/query-field-membership-status-test-BmpVfohw.js +0 -323
- package/bundled-test-harness/assets/query-field-page-optin-test-9_Cce-OJ.js +0 -126
- package/bundled-test-harness/assets/query-field-schema-test-CwV7xanX.js +0 -231
- package/bundled-test-harness/assets/query-field-stale-prerender-test-RkdnZ-VV.js +0 -152
- package/bundled-test-harness/assets/query-fields-test-BLxYkTAM.js +0 -535
- package/bundled-test-harness/assets/rail-CFPU0tFe.js +0 -2
- package/bundled-test-harness/assets/rail-CQ53Dakr.js +0 -44
- package/bundled-test-harness/assets/realm-DdVH9lSZ.js +0 -95
- package/bundled-test-harness/assets/realm-DdsFw3b-.js +0 -2
- package/bundled-test-harness/assets/realm-config-DIslxoB7.js +0 -844
- package/bundled-test-harness/assets/realm-config-policy-standing-test-b4WxNDor.js +0 -290
- package/bundled-test-harness/assets/realm-config-routing-rule-edit-test-C-rcvkkD.js +0 -274
- package/bundled-test-harness/assets/realm-config-settings-test-DDUkM3zw.js +0 -187
- package/bundled-test-harness/assets/realm-dropdown-1j55Dy-1.js +0 -560
- package/bundled-test-harness/assets/realm-field-test-D-uEtFKO.js +0 -100
- package/bundled-test-harness/assets/realm-indexing-test-U9m0epR-.js +0 -4380
- package/bundled-test-harness/assets/realm-policy-test-DhKabhlk.js +0 -1141
- package/bundled-test-harness/assets/realm-test-BX6C9SS5.js +0 -2363
- package/bundled-test-harness/assets/realm-url-tooltip-BjjcKqBx.js +0 -56
- package/bundled-test-harness/assets/realm-url-tooltip-test-DW0ZwEEE.js +0 -78
- package/bundled-test-harness/assets/reasoning-test-BWT94KXG.js +0 -234
- package/bundled-test-harness/assets/recent-colors-addon-CfgmgilF.js +0 -61
- package/bundled-test-harness/assets/recent-colors-addon-D--Ry3Pf.js +0 -2
- package/bundled-test-harness/assets/relationship-loading-state-test-C5R6jao_.js +0 -290
- package/bundled-test-harness/assets/relative-time-Bq7pqums.js +0 -2
- package/bundled-test-harness/assets/relative-time-D0QyW4ig.js +0 -129
- package/bundled-test-harness/assets/remix-card-test-Cy0h3Xdf.js +0 -58
- package/bundled-test-harness/assets/rendered-markdown-Hw_EF8SO.js +0 -263
- package/bundled-test-harness/assets/rendered-markdown-test-CqeF-UZd.js +0 -587
- package/bundled-test-harness/assets/resident-instance-reuse-test-BiI6L40n.js +0 -82
- package/bundled-test-harness/assets/response-field-BCxG5phG.js +0 -38
- package/bundled-test-harness/assets/result-tile-DMzRnTP8.js +0 -140
- package/bundled-test-harness/assets/rich-markdown-C4RUl7L0.js +0 -2
- package/bundled-test-harness/assets/rich-markdown-DxQSCg-o.js +0 -218
- package/bundled-test-harness/assets/rich-markdown-field-test-B7wpedKs.js +0 -1647
- package/bundled-test-harness/assets/room-D0M0Zwrs.js +0 -1008
- package/bundled-test-harness/assets/room-message-test-BWWd4xC8.js +0 -445
- package/bundled-test-harness/assets/room-test-DFH-nOwi.js +0 -95
- package/bundled-test-harness/assets/run-realm-code-DyVyEDBl.js +0 -1600
- package/bundled-test-harness/assets/run-realm-code-test-BpxF-tOz.js +0 -2468
- package/bundled-test-harness/assets/schema-generation-test-DjaJqpYP.js +0 -28
- package/bundled-test-harness/assets/score-Cfp34BE7.js +0 -2
- package/bundled-test-harness/assets/score-DIWWpeyf.js +0 -100
- package/bundled-test-harness/assets/scrolling-test-hA_uBwBg.js +0 -384
- package/bundled-test-harness/assets/search-C0-b7dJI.js +0 -605
- package/bundled-test-harness/assets/search-adorn-test-C6KP3AwA.js +0 -136
- package/bundled-test-harness/assets/search-entries-BfPq5sPS.js +0 -472
- package/bundled-test-harness/assets/search-entries-result-test-Bl9u_BOD.js +0 -234
- package/bundled-test-harness/assets/search-entries-test-BDC_lS43.js +0 -1486
- package/bundled-test-harness/assets/search-result-header-DCAze_cg.js +0 -128
- package/bundled-test-harness/assets/search-results-Dd0enVun.js +0 -266
- package/bundled-test-harness/assets/search-results-test-T5KEEII4.js +0 -578
- package/bundled-test-harness/assets/search-selection-menu-test-CCssnBq1.js +0 -108
- package/bundled-test-harness/assets/search-sheet-persistence-test-BzQiO-FK.js +0 -131
- package/bundled-test-harness/assets/search-test-fyCWb24m.js +0 -2241
- package/bundled-test-harness/assets/searchable-BkgeKQMl.js +0 -2
- package/bundled-test-harness/assets/searchable-D_6p6fyb.js +0 -192
- package/bundled-test-harness/assets/searchable-option-test-CnCUYGaq.js +0 -322
- package/bundled-test-harness/assets/searchable-search-doc-test-B8Q0D98v.js +0 -1271
- package/bundled-test-harness/assets/sending-test-D5PGBDys.js +0 -576
- package/bundled-test-harness/assets/serialization-rri-form-audit-test-BRJ1cJ31.js +0 -136
- package/bundled-test-harness/assets/serialization-test-DM6hK258.js +0 -8758
- package/bundled-test-harness/assets/setup-C_GgVgzM.js +0 -772
- package/bundled-test-harness/assets/shared-link-target-reuse-test-Be-lSKib.js +0 -207
- package/bundled-test-harness/assets/show-card-BFG6KR1m.js +0 -67
- package/bundled-test-harness/assets/show-card-test-l0wMrfZq.js +0 -365
- package/bundled-test-harness/assets/show-file-B8-FRVHj.js +0 -34
- package/bundled-test-harness/assets/signed-capture-D_Q44TQ7.js +0 -204
- package/bundled-test-harness/assets/signed-capture-link-test-DOS5xpYv.js +0 -132
- package/bundled-test-harness/assets/single-stack-test-BIEtzHVS.js +0 -652
- package/bundled-test-harness/assets/skill-BUTGmSsm.js +0 -76
- package/bundled-test-harness/assets/skill-Bo7R_2Ud.js +0 -3
- package/bundled-test-harness/assets/skill-reference-Cs64py3k.js +0 -112
- package/bundled-test-harness/assets/skills-test-CXxSIkYa.js +0 -648
- package/bundled-test-harness/assets/slider-picker-C81errGI.js +0 -245
- package/bundled-test-harness/assets/slider-picker-mvKsy6cR.js +0 -2
- package/bundled-test-harness/assets/spec-B55lJurX.js +0 -602
- package/bundled-test-harness/assets/store-DyQ0KiyI.js +0 -2205
- package/bundled-test-harness/assets/store-module-rebuild-test-C7532_bS.js +0 -454
- package/bundled-test-harness/assets/store-search-test-80NMJuoW.js +0 -175
- package/bundled-test-harness/assets/store-test-dHiWXXMs.js +0 -3460
- package/bundled-test-harness/assets/string-DHlQEHYm.js +0 -9
- package/bundled-test-harness/assets/submode-switcher-DQv-CD6G.js +0 -169
- package/bundled-test-harness/assets/svg-meta-extractor-Uw_EJytF.js +0 -42
- package/bundled-test-harness/assets/swatches-picker-CaEoibN1.js +0 -33
- package/bundled-test-harness/assets/swatches-picker-gPl50JbP.js +0 -2
- package/bundled-test-harness/assets/switch-submode-BKDnJd4m.js +0 -79
- package/bundled-test-harness/assets/switch-submode-test-_E2mVk4z.js +0 -168
- package/bundled-test-harness/assets/tag-B60lDr-j.js +0 -105
- package/bundled-test-harness/assets/tests-BBBgPBB6.js +0 -3520
- package/bundled-test-harness/assets/text-area-CJjWmwpi.js +0 -9
- package/bundled-test-harness/assets/text-file-def-u_dl0i2z.js +0 -151
- package/bundled-test-harness/assets/text-input-validator-test-BTwnkSS2.js +0 -156
- package/bundled-test-harness/assets/theme-BK-fAHVn.js +0 -9
- package/bundled-test-harness/assets/theme-card-test-BQmT7rqr.js +0 -621
- package/bundled-test-harness/assets/theme-scheme-island-test-Oi3aeyp1.js +0 -264
- package/bundled-test-harness/assets/three-d-model-def-B4KckPVC.js +0 -70
- package/bundled-test-harness/assets/time-BcuaSkHg.js +0 -126
- package/bundled-test-harness/assets/time-f7Irg7Z7.js +0 -2
- package/bundled-test-harness/assets/time-slots-ClYIZN53.js +0 -2
- package/bundled-test-harness/assets/time-slots-TI1aaqRN.js +0 -85
- package/bundled-test-harness/assets/timeline-Cof9eyq0.js +0 -59
- package/bundled-test-harness/assets/timeline-DFWQtCWE.js +0 -2
- package/bundled-test-harness/assets/to-device-streaming-test-BDrUUlOt.js +0 -163
- package/bundled-test-harness/assets/token-usage-test-CiZo03fY.js +0 -166
- package/bundled-test-harness/assets/tool-field-BXHr9r0w.js +0 -94
- package/bundled-test-harness/assets/tool-field-CoRO5C4R.js +0 -2
- package/bundled-test-harness/assets/tools-CmVaYDIS.js +0 -725
- package/bundled-test-harness/assets/tools-calling-test-B454__XF.js +0 -200
- package/bundled-test-harness/assets/tools-test-CLu51dJO.js +0 -1624
- package/bundled-test-harness/assets/tools-test-XGRAvVug.js +0 -2820
- package/bundled-test-harness/assets/ts-file-def-C05BDwdg.js +0 -159
- package/bundled-test-harness/assets/update-room-skills-test-jOvP14JX.js +0 -240
- package/bundled-test-harness/assets/url-BFf2CNo-.js +0 -2
- package/bundled-test-harness/assets/url-CYm-CeXp.js +0 -96
- package/bundled-test-harness/assets/video-file-def-B2UIrOFS.js +0 -76
- package/bundled-test-harness/assets/wav-meta-extractor-BNkv7e2f.js +0 -368
- package/bundled-test-harness/assets/webm-meta-extractor-C933kYyc.js +0 -178
- package/bundled-test-harness/assets/webp-meta-extractor-BLz0z1pZ.js +0 -98
- package/bundled-test-harness/assets/website-BuOMUW1v.js +0 -92
- package/bundled-test-harness/assets/week-Bo0666ji.js +0 -111
- package/bundled-test-harness/assets/week-CaVFA8Vc.js +0 -2
- package/bundled-test-harness/assets/welcome-to-boxel-PWard7GF.js +0 -172
- package/bundled-test-harness/assets/workspace-KXfFTQNV.js +0 -614
- package/bundled-test-harness/assets/workspace-a11y-test-Buwb-rfO.js +0 -197
- package/bundled-test-harness/assets/workspace-behavior-test-CbgFUOOo.js +0 -200
- package/bundled-test-harness/assets/workspace-chooser-BmQvhhrl.js +0 -2248
- package/bundled-test-harness/assets/workspace-chooser-Cu84Gd_E.css +0 -1317
- package/bundled-test-harness/assets/workspace-chooser-catalog-order-test-rcRw6sni.js +0 -36
- package/bundled-test-harness/assets/workspace-chooser-unreachable-notice-test-DUXnBIdY.js +0 -60
- package/bundled-test-harness/assets/workspace-delete-multiple-test-DjRKhZ2g.js +0 -212
- package/bundled-test-harness/assets/workspace-delete-summary-test-CvkLVYyN.js +0 -63
- package/bundled-test-harness/assets/workspace-timestamp-labels-test-AYJT4inv.js +0 -58
- package/bundled-test-harness/assets/xlsx-file-def-DuKdbGrJ.js +0 -60
- package/bundled-test-harness/assets/xlsx-meta-extractor-Bz-C2JWP.js +0 -101
- package/bundled-test-harness/assets/xlsx-meta-extractor-ClwwgABg.js +0 -2
- package/bundled-test-harness/assets/year-B6ctHikl.js +0 -2
- package/bundled-test-harness/assets/year-C11uAQE6.js +0 -78
- package/bundled-test-harness/assets/zip-file-def-B8XN-OS_.js +0 -288
- package/bundled-types/host-app/components/matrix/auth-button.gts +0 -39
- package/bundled-types/host-app/components/matrix/auth-container.gts +0 -69
- package/bundled-types/host-app/components/matrix/auth-form-field.gts +0 -43
|
@@ -1,1600 +0,0 @@
|
|
|
1
|
-
import { r as __exportAll } from "./chunk-Rp0pCe6z.js";
|
|
2
|
-
import { r as initializeDeferredDecorator, t as decorateFieldV2 } from "./runtime--fcdnjmJ-BoCBNIsz.js";
|
|
3
|
-
import { $s as uint8ArrayToBase64, Ho as isRelativePath, Po as isCardInstance, Qa as clearReplacedArrayFieldMeta, dc as coerceErrorMessage, fo as assertQuery, lc as isBinaryContentType, ms as logger, na as searchEntryWireQueryFromQuery, no as resourceIdentity, rs as isResolvedCodeRef, sc as validateWriteSize, uo as SupportedMimeType } from "./runtime-common-ClpqhbwG.js";
|
|
4
|
-
import { _ as isPrefixForm, s as ensureTrailingSlash, v as ri, y as rri } from "./paths-BYHDgqsT.js";
|
|
5
|
-
import { B as cloneDeep, I as mergeWith } from "./lodash-DnaZ_rzx.js";
|
|
6
|
-
import { r as service } from "./service-LFpJ8EEP.js";
|
|
7
|
-
import { i as loadSkillSource } from "./skill-tools-NZxKP9oK.js";
|
|
8
|
-
import { t as HostBaseTool } from "./host-base-tool-BybIRY3B.js";
|
|
9
|
-
import { t as UpdateRoomSkillsTool } from "./update-room-skills-r535xnMn.js";
|
|
10
|
-
import { t as SetActiveLLMTool } from "./set-active-llm-CJQbDBe3.js";
|
|
11
|
-
import { n as deleteWorkspace, t as createWorkspace } from "./workspaces-DMfkSB8a.js";
|
|
12
|
-
import { t as LintAndFixTool } from "./lint-and-fix-Bke1wxM-.js";
|
|
13
|
-
import { t as SwitchSubmodeTool } from "./switch-submode-BKDnJd4m.js";
|
|
14
|
-
import { t as OpenWorkspaceTool } from "./open-workspace-QX74PaWD.js";
|
|
15
|
-
import { t as ShowCardTool } from "./show-card-BFG6KR1m.js";
|
|
16
|
-
import { t as PreviewFormatTool } from "./preview-format-BPMlCSbb.js";
|
|
17
|
-
import { a as uploadedImages, i as resolveViewTarget, n as captureDeadline, o as workspaceOf, r as captureForAgent, t as UPLOAD_RESERVE_MS } from "./visual-capture-BpfLvlFK.js";
|
|
18
|
-
import { t as pruneEmptyQueryParts } from "./prune-empty-query-B7Sj33nA.js";
|
|
19
|
-
import { n as composeSearchEntriesQuery, r as searchEntrySummaries } from "./search-entries-DPFRNoDW.js";
|
|
20
|
-
import { t as ShowFileTool } from "./show-file-B8-FRVHj.js";
|
|
21
|
-
//#region app/lib/generate-image.ts
|
|
22
|
-
var OPENROUTER_CHAT_URL = "https://openrouter.ai/api/v1/chat/completions";
|
|
23
|
-
var IMAGE_EXTENSIONS = {
|
|
24
|
-
"image/png": "png",
|
|
25
|
-
"image/jpeg": "jpg",
|
|
26
|
-
"image/jpg": "jpg",
|
|
27
|
-
"image/webp": "webp",
|
|
28
|
-
"image/gif": "gif",
|
|
29
|
-
"image/svg+xml": "svg",
|
|
30
|
-
"image/avif": "avif"
|
|
31
|
-
};
|
|
32
|
-
var IMAGE_EXTENSION_RE = /\.(png|jpe?g|webp|gif|svg|avif)$/i;
|
|
33
|
-
var IMAGE_FILE_EXTENSIONS = [...new Set(Object.values(IMAGE_EXTENSIONS))];
|
|
34
|
-
function imageExtension(mimeType) {
|
|
35
|
-
return IMAGE_EXTENSIONS[mimeType] ?? "png";
|
|
36
|
-
}
|
|
37
|
-
async function generateImage({ prompt, sourceImageDataUrl, model }, send) {
|
|
38
|
-
let response = await send({
|
|
39
|
-
url: OPENROUTER_CHAT_URL,
|
|
40
|
-
requestBody: JSON.stringify({
|
|
41
|
-
model: model?.trim() || "google/gemini-2.5-flash-image",
|
|
42
|
-
messages: [{
|
|
43
|
-
role: "user",
|
|
44
|
-
content: [{
|
|
45
|
-
type: "text",
|
|
46
|
-
text: prompt
|
|
47
|
-
}, ...sourceImageDataUrl ? [{
|
|
48
|
-
type: "image_url",
|
|
49
|
-
image_url: { url: sourceImageDataUrl }
|
|
50
|
-
}] : []]
|
|
51
|
-
}]
|
|
52
|
-
})
|
|
53
|
-
});
|
|
54
|
-
if (!response.ok) throw new Error(`Failed to generate an image: ${response.statusText}`);
|
|
55
|
-
let message = (await response.json()).choices?.[0]?.message;
|
|
56
|
-
let dataUrl = Array.isArray(message?.images) ? message.images.map((image) => image?.image_url?.url).find((url) => typeof url === "string" && url.startsWith("data:image/")) : void 0;
|
|
57
|
-
if (!dataUrl) {
|
|
58
|
-
let detail = typeof message?.content === "string" && message.content ? message.content : "No image was generated in the response.";
|
|
59
|
-
throw new Error(`Image generation failed: ${detail}`);
|
|
60
|
-
}
|
|
61
|
-
let commaIndex = dataUrl.indexOf(",");
|
|
62
|
-
if (commaIndex === -1) throw new Error("Generated image data URL is malformed: missing comma separator.");
|
|
63
|
-
let mimeMatch = dataUrl.slice(0, commaIndex).match(/^data:([^;]+);base64$/);
|
|
64
|
-
if (!mimeMatch) throw new Error("Generated image data URL has an unrecognisable MIME type.");
|
|
65
|
-
return {
|
|
66
|
-
mimeType: mimeMatch[1],
|
|
67
|
-
base64: dataUrl.slice(commaIndex + 1)
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
async function sourceImageDataUrl(url, fetchImage) {
|
|
71
|
-
if (url.startsWith("data:image/")) return url;
|
|
72
|
-
let response = await fetchImage(url);
|
|
73
|
-
if (!response.ok) throw new Error(`Failed to fetch source image ${url}: ${response.status} ${response.statusText}`);
|
|
74
|
-
return `data:${response.headers.get("content-type") ?? "image/png"};base64,${uint8ArrayToBase64(new Uint8Array(await response.arrayBuffer()))}`;
|
|
75
|
-
}
|
|
76
|
-
//#endregion
|
|
77
|
-
//#region app/lib/realm-runner/captures.ts
|
|
78
|
-
var MAX_CAPTURES = 3;
|
|
79
|
-
var CAPTURE_MARGIN_MS = 3e3;
|
|
80
|
-
var MIN_CAPTURE_BUDGET_MS = UPLOAD_RESERVE_MS + 5e3;
|
|
81
|
-
var RealmCaptures = class {
|
|
82
|
-
taken = [];
|
|
83
|
-
runEndsAt = Number.POSITIVE_INFINITY;
|
|
84
|
-
refusedAfterClose = 0;
|
|
85
|
-
closed = false;
|
|
86
|
-
inFlight = new AbortController();
|
|
87
|
-
constructor(captureURL) {
|
|
88
|
-
this.captureURL = captureURL;
|
|
89
|
-
}
|
|
90
|
-
close() {
|
|
91
|
-
this.closed = true;
|
|
92
|
-
this.inFlight.abort();
|
|
93
|
-
}
|
|
94
|
-
async take(url, path, rawOptions) {
|
|
95
|
-
if (this.taken.length >= MAX_CAPTURES) throw new Error(`realm.capture may run at most ${MAX_CAPTURES} times in one run; capture the rest in another run`);
|
|
96
|
-
let doneBy = this.runEndsAt - CAPTURE_MARGIN_MS;
|
|
97
|
-
if (doneBy - Date.now() < MIN_CAPTURE_BUDGET_MS) throw new Error(`Not enough time left in this run to capture ${url}; capture it in another run, before slower work`);
|
|
98
|
-
let viewed = await this.captureURL(url, captureOptions(rawOptions), doneBy, this.inFlight.signal);
|
|
99
|
-
if (this.closed) {
|
|
100
|
-
this.refusedAfterClose += 1;
|
|
101
|
-
throw new Error(`The run has ended; the capture of ${url} was dropped`);
|
|
102
|
-
}
|
|
103
|
-
this.taken.push(viewed);
|
|
104
|
-
return {
|
|
105
|
-
path,
|
|
106
|
-
kind: viewed.kind,
|
|
107
|
-
format: viewed.format,
|
|
108
|
-
width: viewed.width ?? null,
|
|
109
|
-
height: viewed.height ?? null,
|
|
110
|
-
...viewed.note ? { note: viewed.note } : {},
|
|
111
|
-
attached: true
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
function captureOptions(raw) {
|
|
116
|
-
let options = raw && typeof raw === "object" ? raw : {};
|
|
117
|
-
return {
|
|
118
|
-
...typeof options.format === "string" ? { format: options.format } : {},
|
|
119
|
-
...typeof options.viewportWidth === "number" ? { viewportWidth: options.viewportWidth } : {},
|
|
120
|
-
...typeof options.viewportHeight === "number" ? { viewportHeight: options.viewportHeight } : {},
|
|
121
|
-
...options.fullPage === true ? { fullPage: true } : {}
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
//#endregion
|
|
125
|
-
//#region app/lib/realm-runner/room-actions.ts
|
|
126
|
-
var MAX_SKILLS_PER_CALL = 20;
|
|
127
|
-
var RoomActions = class {
|
|
128
|
-
skills = /* @__PURE__ */ new Map();
|
|
129
|
-
model;
|
|
130
|
-
constructor(checks) {
|
|
131
|
-
this.checks = checks;
|
|
132
|
-
}
|
|
133
|
-
get requested() {
|
|
134
|
-
if (this.skills.size === 0 && this.model === void 0) return;
|
|
135
|
-
let entries = [...this.skills.entries()];
|
|
136
|
-
return {
|
|
137
|
-
skillsToEnable: entries.filter(([, on]) => on).map(([id]) => id),
|
|
138
|
-
skillsToDisable: entries.filter(([, on]) => !on).map(([id]) => id),
|
|
139
|
-
...this.model !== void 0 ? { model: this.model } : {}
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
async enableSkills(rawIds) {
|
|
143
|
-
let ids = skillIds("room.enableSkills", rawIds);
|
|
144
|
-
for (let id of ids) await this.checks.checkSkill(id);
|
|
145
|
-
for (let id of ids) this.skills.set(id, true);
|
|
146
|
-
return {
|
|
147
|
-
enable: ids,
|
|
148
|
-
appliedAfterRun: true
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
disableSkills(rawIds) {
|
|
152
|
-
let ids = skillIds("room.disableSkills", rawIds);
|
|
153
|
-
for (let id of ids) this.skills.set(id, false);
|
|
154
|
-
return {
|
|
155
|
-
disable: ids,
|
|
156
|
-
appliedAfterRun: true
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
async setModel(model) {
|
|
160
|
-
if (typeof model !== "string" || model.trim().length === 0) throw new TypeError("room.setModel expects a model id string");
|
|
161
|
-
model = model.trim();
|
|
162
|
-
let known = await this.checks.knownModels();
|
|
163
|
-
if (!known.includes(model)) throw new Error(`Unknown model: ${model}. Models this room can use: ${known.join(", ")}`);
|
|
164
|
-
this.model = model;
|
|
165
|
-
return {
|
|
166
|
-
model,
|
|
167
|
-
appliedAfterRun: true
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
};
|
|
171
|
-
function skillIds(method, raw) {
|
|
172
|
-
let list = typeof raw === "string" ? [raw] : raw;
|
|
173
|
-
if (!Array.isArray(list) || list.length === 0 || list.some((id) => typeof id !== "string" || id.trim().length === 0)) throw new TypeError(`${method} expects an array of skill id strings`);
|
|
174
|
-
if (list.length > MAX_SKILLS_PER_CALL) throw new Error(`${method} may name at most ${MAX_SKILLS_PER_CALL} skills in one call`);
|
|
175
|
-
return [...new Set(list.map((id) => id.trim()))];
|
|
176
|
-
}
|
|
177
|
-
//#endregion
|
|
178
|
-
//#region ../../node_modules/.pnpm/@jitl+quickjs-wasmfile-release-sync@0.31.0/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.wasm?url
|
|
179
|
-
var emscripten_module_default = "" + (globalThis.__boxelAssetsURL || "/") + "assets/emscripten-module-NWak2PoB.wasm";
|
|
180
|
-
//#endregion
|
|
181
|
-
//#region app/lib/realm-runner/worker.ts?worker&url
|
|
182
|
-
var worker_default = "" + (globalThis.__boxelAssetsURL || "/") + "assets/worker-DHBEBihX.js";
|
|
183
|
-
//#endregion
|
|
184
|
-
//#region app/lib/realm-runner/runner.ts
|
|
185
|
-
var BOOT_TIMEOUT_MS = 6e4;
|
|
186
|
-
function resolveAssetURL(assetURL) {
|
|
187
|
-
let assetsURL = globalThis.__boxelAssetsURL;
|
|
188
|
-
let base = assetsURL ? new URL(assetsURL, window.location.href) : window.location.href;
|
|
189
|
-
return new URL(assetURL, base);
|
|
190
|
-
}
|
|
191
|
-
function makeRealmWorker(absoluteURL) {
|
|
192
|
-
if (absoluteURL.origin === window.location.origin) return new Worker(absoluteURL, { type: "module" });
|
|
193
|
-
let blob = new Blob([`import ${JSON.stringify(absoluteURL.href)};`], { type: "text/javascript" });
|
|
194
|
-
let blobURL = URL.createObjectURL(blob);
|
|
195
|
-
try {
|
|
196
|
-
return new Worker(blobURL, { type: "module" });
|
|
197
|
-
} finally {
|
|
198
|
-
URL.revokeObjectURL(blobURL);
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
function runRealmCode(request, onCall, signal) {
|
|
202
|
-
return new Promise((resolve, reject) => {
|
|
203
|
-
let workerURL = resolveAssetURL(worker_default);
|
|
204
|
-
let worker = makeRealmWorker(workerURL);
|
|
205
|
-
let timer;
|
|
206
|
-
let settled = false;
|
|
207
|
-
let onAbort = () => settle(() => reject(signal?.reason instanceof Error ? signal.reason : /* @__PURE__ */ new Error("Realm code was stopped")));
|
|
208
|
-
let settle = (finish) => {
|
|
209
|
-
if (settled) return;
|
|
210
|
-
settled = true;
|
|
211
|
-
window.clearTimeout(timer);
|
|
212
|
-
signal?.removeEventListener("abort", onAbort);
|
|
213
|
-
worker.terminate();
|
|
214
|
-
finish();
|
|
215
|
-
};
|
|
216
|
-
if (signal?.aborted) {
|
|
217
|
-
onAbort();
|
|
218
|
-
return;
|
|
219
|
-
}
|
|
220
|
-
signal?.addEventListener("abort", onAbort);
|
|
221
|
-
timer = window.setTimeout(() => {
|
|
222
|
-
settle(() => reject(/* @__PURE__ */ new Error(`Realm runner did not start within ${BOOT_TIMEOUT_MS}ms (${workerURL.href})`)));
|
|
223
|
-
}, BOOT_TIMEOUT_MS);
|
|
224
|
-
let answer = (message) => worker.postMessage(message);
|
|
225
|
-
worker.onmessage = (event) => {
|
|
226
|
-
let message = event.data;
|
|
227
|
-
if (message.type === "call") {
|
|
228
|
-
let { id, method, args } = message;
|
|
229
|
-
onCall(method, args).then((value) => answer({
|
|
230
|
-
type: "callResult",
|
|
231
|
-
id,
|
|
232
|
-
value: JSON.stringify(value ?? null)
|
|
233
|
-
}), (error) => answer({
|
|
234
|
-
type: "callResult",
|
|
235
|
-
id,
|
|
236
|
-
error: error instanceof Error ? error.message : String(error)
|
|
237
|
-
}));
|
|
238
|
-
return;
|
|
239
|
-
}
|
|
240
|
-
if (message.type === "ready") {
|
|
241
|
-
window.clearTimeout(timer);
|
|
242
|
-
timer = window.setTimeout(() => {
|
|
243
|
-
settle(() => reject(/* @__PURE__ */ new Error(`Realm code exceeded the ${request.timeoutMs}ms time limit`)));
|
|
244
|
-
}, request.timeoutMs + 1e3);
|
|
245
|
-
return;
|
|
246
|
-
}
|
|
247
|
-
settle(() => {
|
|
248
|
-
if (message.type === "error") reject(new Error(message.error));
|
|
249
|
-
else resolve(message.result);
|
|
250
|
-
});
|
|
251
|
-
};
|
|
252
|
-
worker.onerror = (event) => {
|
|
253
|
-
settle(() => reject(new Error(event.message || `Realm runner worker failed to load from ${workerURL.href}`)));
|
|
254
|
-
};
|
|
255
|
-
answer({
|
|
256
|
-
type: "run",
|
|
257
|
-
...request,
|
|
258
|
-
wasmURL: resolveAssetURL(emscripten_module_default).href
|
|
259
|
-
});
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
//#endregion
|
|
263
|
-
//#region app/tools/run-realm-code.ts
|
|
264
|
-
var run_realm_code_exports = /* @__PURE__ */ __exportAll({
|
|
265
|
-
RunRealmCodeCommand: () => RunRealmCodeTool,
|
|
266
|
-
clickRequiredCallsIn: () => clickRequiredCallsIn,
|
|
267
|
-
default: () => RunRealmCodeTool
|
|
268
|
-
});
|
|
269
|
-
var log = logger("tools:run-realm-code");
|
|
270
|
-
var MAX_CODE_SIZE = 1e5;
|
|
271
|
-
var MAX_FILES = 20;
|
|
272
|
-
var MAX_CARD_UPDATES = 200;
|
|
273
|
-
var MAX_FILE_SIZE = 5e5;
|
|
274
|
-
var MAX_READ_BYTES = MAX_FILE_SIZE * 4;
|
|
275
|
-
var MAX_WORKSPACES = 5;
|
|
276
|
-
var MAX_BINARY_FILE_SIZE = 2e6;
|
|
277
|
-
var MAX_BINARY_BYTES_PER_RUN = 5e6;
|
|
278
|
-
var BASE64_RE = /^[A-Za-z0-9+/]*={0,2}$/;
|
|
279
|
-
var DATA_URL_PREFIX_RE = /^data:[^,]*;base64,/i;
|
|
280
|
-
var MAX_DOWNLOAD_FILE_SIZE = 1e7;
|
|
281
|
-
var MAX_DOWNLOAD_BYTES_PER_RUN = 25e6;
|
|
282
|
-
var DOWNLOAD_TIMEOUT_MS = 2e4;
|
|
283
|
-
var FILE_EXTENSION_RE = /\.[A-Za-z0-9]+$/;
|
|
284
|
-
var DEFAULT_SEARCH_RESULTS = 50;
|
|
285
|
-
var MAX_SEARCH_RESULTS = 100;
|
|
286
|
-
var MAX_SEARCH_RESULT_SIZE = 1e6;
|
|
287
|
-
var DEFAULT_ENTRY_RESULTS = 20;
|
|
288
|
-
var MAX_ENTRY_RESULTS = 50;
|
|
289
|
-
var MAX_ENTRY_RESULT_SIZE = 1e6;
|
|
290
|
-
var RUN_TIMEOUT_MS = 55e3;
|
|
291
|
-
var CALL_DEADLINE_MS = 1e5;
|
|
292
|
-
var MAX_IMAGES = 4;
|
|
293
|
-
var IMAGE_TIMEOUT_MS = 6e4;
|
|
294
|
-
var IMAGE_TIME_BUDGET_MS = 12e4;
|
|
295
|
-
var DownloadTooLarge = class extends Error {};
|
|
296
|
-
var BINARY = Symbol("binary");
|
|
297
|
-
var MAX_UI_ACTIONS = 10;
|
|
298
|
-
var PREVIEW_FORMATS = [
|
|
299
|
-
"isolated",
|
|
300
|
-
"embedded",
|
|
301
|
-
"fitted",
|
|
302
|
-
"atom",
|
|
303
|
-
"edit"
|
|
304
|
-
];
|
|
305
|
-
var MAX_INVALIDATE_PATHS = 100;
|
|
306
|
-
var CLICK_REQUIRED_CALLS = {
|
|
307
|
-
"realm.workspaces.delete": "Deletes a workspace. This cannot be undone.",
|
|
308
|
-
"realm.fs.delete": "Deletes a file. This cannot be undone.",
|
|
309
|
-
"realm.images.generate": "Generates images, which uses your credit.",
|
|
310
|
-
"realm.index.fullReindex": "Indexes the whole workspace again from the start, which can take a long time.",
|
|
311
|
-
"realm.index.cancelJob": "Cancels the workspace's running index job.",
|
|
312
|
-
"realm.fs.download": "Downloads a file from an outside URL into the workspace."
|
|
313
|
-
};
|
|
314
|
-
function clickRequiredCallsIn(code) {
|
|
315
|
-
return new Set(typeof code === "string" ? Object.keys(CLICK_REQUIRED_CALLS).filter((name) => code.includes(name)) : []);
|
|
316
|
-
}
|
|
317
|
-
function notNamedError(name) {
|
|
318
|
-
return /* @__PURE__ */ new Error(`${name} must be called by that name in the script, so the user confirms the run before it starts`);
|
|
319
|
-
}
|
|
320
|
-
var REQUIRES_WRITE = {
|
|
321
|
-
"fs.readText": false,
|
|
322
|
-
"fs.exists": false,
|
|
323
|
-
"fs.list": false,
|
|
324
|
-
"fs.replace": true,
|
|
325
|
-
"fs.writeText": true,
|
|
326
|
-
"fs.copy": true,
|
|
327
|
-
"fs.writeBytes": true,
|
|
328
|
-
"fs.download": true,
|
|
329
|
-
"cards.search": false,
|
|
330
|
-
"cards.get": false,
|
|
331
|
-
"cards.update": true,
|
|
332
|
-
"entries.search": false,
|
|
333
|
-
"fs.delete": true,
|
|
334
|
-
capture: false,
|
|
335
|
-
"images.generate": true,
|
|
336
|
-
"workspaces.create": false,
|
|
337
|
-
"workspaces.delete": false,
|
|
338
|
-
"room.enableSkills": false,
|
|
339
|
-
"room.disableSkills": false,
|
|
340
|
-
"room.setModel": false,
|
|
341
|
-
"ui.switchSubmode": false,
|
|
342
|
-
"ui.openFile": false,
|
|
343
|
-
"ui.previewFormat": false,
|
|
344
|
-
"ui.openWorkspace": false,
|
|
345
|
-
"index.invalidate": true,
|
|
346
|
-
"index.reindex": true,
|
|
347
|
-
"index.fullReindex": true,
|
|
348
|
-
"index.cancelJob": true
|
|
349
|
-
};
|
|
350
|
-
var RealmFsSession = class {
|
|
351
|
-
known = /* @__PURE__ */ new Map();
|
|
352
|
-
saved = /* @__PURE__ */ new Set();
|
|
353
|
-
created = /* @__PURE__ */ new Set();
|
|
354
|
-
deleted = /* @__PURE__ */ new Set();
|
|
355
|
-
cardUpdates = /* @__PURE__ */ new Map();
|
|
356
|
-
deletedExisting = /* @__PURE__ */ new Set();
|
|
357
|
-
createdWorkspaces = [];
|
|
358
|
-
deletedWorkspaces = [];
|
|
359
|
-
goneWorkspaces = /* @__PURE__ */ new Set();
|
|
360
|
-
indexActions = [];
|
|
361
|
-
binary = /* @__PURE__ */ new Set();
|
|
362
|
-
binaryDigests = /* @__PURE__ */ new Map();
|
|
363
|
-
binaryBytes = 0;
|
|
364
|
-
imagesRequested = 0;
|
|
365
|
-
imageTimeUsed = 0;
|
|
366
|
-
downloadedBytes = 0;
|
|
367
|
-
captures;
|
|
368
|
-
uiActions = [];
|
|
369
|
-
refused = 0;
|
|
370
|
-
queue = Promise.resolve();
|
|
371
|
-
inFlight = new AbortController();
|
|
372
|
-
closed = false;
|
|
373
|
-
constructor(realmURL, readSource, writeFile, saveCards, writeBinaryFile, deleteFile, downloadFile, listDirectory, search, resolveURL, readCard, searchEntries, captureURL, heldByThisRealm, createWorkspace, deleteWorkspace, generateImage, namedCalls, index, mayWrite, cardSizeLimitBytes, room) {
|
|
374
|
-
this.realmURL = realmURL;
|
|
375
|
-
this.readSource = readSource;
|
|
376
|
-
this.writeFile = writeFile;
|
|
377
|
-
this.saveCards = saveCards;
|
|
378
|
-
this.writeBinaryFile = writeBinaryFile;
|
|
379
|
-
this.deleteFile = deleteFile;
|
|
380
|
-
this.downloadFile = downloadFile;
|
|
381
|
-
this.listDirectory = listDirectory;
|
|
382
|
-
this.search = search;
|
|
383
|
-
this.resolveURL = resolveURL;
|
|
384
|
-
this.readCard = readCard;
|
|
385
|
-
this.searchEntries = searchEntries;
|
|
386
|
-
this.heldByThisRealm = heldByThisRealm;
|
|
387
|
-
this.createWorkspace = createWorkspace;
|
|
388
|
-
this.deleteWorkspace = deleteWorkspace;
|
|
389
|
-
this.generateImage = generateImage;
|
|
390
|
-
this.namedCalls = namedCalls;
|
|
391
|
-
this.index = index;
|
|
392
|
-
this.mayWrite = mayWrite;
|
|
393
|
-
this.cardSizeLimitBytes = cardSizeLimitBytes;
|
|
394
|
-
this.room = room;
|
|
395
|
-
this.captures = new RealmCaptures(captureURL);
|
|
396
|
-
}
|
|
397
|
-
get refusedAfterClose() {
|
|
398
|
-
return this.refused + this.captures.refusedAfterClose;
|
|
399
|
-
}
|
|
400
|
-
call(method, args) {
|
|
401
|
-
let result = this.queue.then(() => {
|
|
402
|
-
if (this.closed) {
|
|
403
|
-
this.refused += 1;
|
|
404
|
-
throw new Error("The run has ended; this realm call was not made");
|
|
405
|
-
}
|
|
406
|
-
if (REQUIRES_WRITE[method] && !this.mayWrite) throw new Error(`You can only read this workspace; realm.${method} was not run`);
|
|
407
|
-
return this.dispatch(method, args);
|
|
408
|
-
});
|
|
409
|
-
this.queue = result.catch(() => void 0);
|
|
410
|
-
return result;
|
|
411
|
-
}
|
|
412
|
-
close() {
|
|
413
|
-
this.closed = true;
|
|
414
|
-
this.captures.close();
|
|
415
|
-
this.inFlight.abort();
|
|
416
|
-
}
|
|
417
|
-
idle() {
|
|
418
|
-
return this.queue;
|
|
419
|
-
}
|
|
420
|
-
async dispatch(method, args) {
|
|
421
|
-
switch (method) {
|
|
422
|
-
case "fs.readText": {
|
|
423
|
-
let url = this.resolve(method, args[0]);
|
|
424
|
-
let content = await this.load(url);
|
|
425
|
-
if (content === void 0) throw new Error(`File not found: ${url}`);
|
|
426
|
-
return content;
|
|
427
|
-
}
|
|
428
|
-
case "fs.exists": {
|
|
429
|
-
let url = this.resolve(method, args[0]);
|
|
430
|
-
return await this.lookup(url) !== void 0;
|
|
431
|
-
}
|
|
432
|
-
case "fs.list": {
|
|
433
|
-
let url = this.resolveDirectory(args[0]);
|
|
434
|
-
let listing = await this.listDirectory(url);
|
|
435
|
-
if (listing.status === 404) throw new Error(`Directory not found: ${url}`);
|
|
436
|
-
if (listing.status !== 200) throw new Error(`Unable to list ${url}: ${listing.status}`);
|
|
437
|
-
let dir = this.relative(url);
|
|
438
|
-
return listing.entries.map(({ name, kind }) => ({
|
|
439
|
-
name,
|
|
440
|
-
path: `${dir}${name}${kind === "directory" ? "/" : ""}`,
|
|
441
|
-
kind
|
|
442
|
-
}));
|
|
443
|
-
}
|
|
444
|
-
case "fs.replace": {
|
|
445
|
-
let url = this.resolve(method, args[0]);
|
|
446
|
-
let [, search, replacement] = args;
|
|
447
|
-
if (typeof search !== "string" || typeof replacement !== "string") throw new TypeError("realm.fs.replace expects a path, a search string and a replacement string");
|
|
448
|
-
if (search.length === 0) throw new Error("realm.fs.replace requires a non-empty search string");
|
|
449
|
-
let current = await this.load(url);
|
|
450
|
-
if (current === void 0) throw new Error(`File not found: ${url}`);
|
|
451
|
-
let first = current.indexOf(search);
|
|
452
|
-
if (first < 0) throw new Error(`Search string was not found in ${url}`);
|
|
453
|
-
if (current.indexOf(search, first + search.length) >= 0) throw new Error(`Search string matched more than once in ${url}`);
|
|
454
|
-
await this.save(url, current.slice(0, first) + replacement + current.slice(first + search.length), current);
|
|
455
|
-
return {
|
|
456
|
-
path: this.relative(url),
|
|
457
|
-
matches: 1,
|
|
458
|
-
saved: true
|
|
459
|
-
};
|
|
460
|
-
}
|
|
461
|
-
case "fs.writeText": {
|
|
462
|
-
let url = this.resolve(method, args[0]);
|
|
463
|
-
let content = args[1];
|
|
464
|
-
if (typeof content !== "string") throw new TypeError("realm.fs.writeText expects a path and a content string");
|
|
465
|
-
if (await this.lookup(url) !== void 0) throw new Error(`File already exists; use realm.fs.replace to edit it: ${url}`);
|
|
466
|
-
await this.save(url, content, void 0);
|
|
467
|
-
return {
|
|
468
|
-
path: this.relative(url),
|
|
469
|
-
saved: true
|
|
470
|
-
};
|
|
471
|
-
}
|
|
472
|
-
case "fs.copy": {
|
|
473
|
-
let from = this.resolve(method, args[0]);
|
|
474
|
-
let to = this.resolve(method, args[1]);
|
|
475
|
-
let content = await this.load(from);
|
|
476
|
-
if (content === void 0) throw new Error(`File not found: ${from}`);
|
|
477
|
-
if (await this.lookup(to) !== void 0) throw new Error(`File already exists: ${to}`);
|
|
478
|
-
await this.save(to, content, void 0, { lint: false });
|
|
479
|
-
return {
|
|
480
|
-
path: this.relative(to),
|
|
481
|
-
saved: true
|
|
482
|
-
};
|
|
483
|
-
}
|
|
484
|
-
case "fs.writeBytes": {
|
|
485
|
-
let url = this.resolve(method, args[0]);
|
|
486
|
-
let base64 = cleanBase64(args[1]);
|
|
487
|
-
let size = decodedSize(base64);
|
|
488
|
-
if (size > MAX_BINARY_FILE_SIZE) throw new Error(`realm.fs.writeBytes accepts at most ${MAX_BINARY_FILE_SIZE} bytes per file: ${url} is ${size} bytes`);
|
|
489
|
-
if (this.binaryBytes + size > MAX_BINARY_BYTES_PER_RUN) throw new Error(`realm.fs.writeBytes accepts at most ${MAX_BINARY_BYTES_PER_RUN} bytes per run`);
|
|
490
|
-
if (await this.lookup(url) !== void 0) throw new Error(`File already exists: ${url}`);
|
|
491
|
-
if (this.closed) {
|
|
492
|
-
this.refused += 1;
|
|
493
|
-
throw new Error(`The run has ended; ${url} was not saved`);
|
|
494
|
-
}
|
|
495
|
-
let bytes = decodeBase64(base64);
|
|
496
|
-
await this.writeBinaryFile(url, bytes);
|
|
497
|
-
this.binaryBytes += bytes.byteLength;
|
|
498
|
-
this.binaryDigests.set(url, await sha256(bytes));
|
|
499
|
-
this.known.delete(url);
|
|
500
|
-
this.binary.add(url);
|
|
501
|
-
this.markCreated(url);
|
|
502
|
-
return {
|
|
503
|
-
path: this.relative(url),
|
|
504
|
-
size: bytes.byteLength,
|
|
505
|
-
saved: true
|
|
506
|
-
};
|
|
507
|
-
}
|
|
508
|
-
case "cards.search": return await this.searchCards(args[0]);
|
|
509
|
-
case "cards.get": {
|
|
510
|
-
let id = this.resolve(method, args[0]).replace(/\.json$/, "");
|
|
511
|
-
let { data } = await this.readCard(id);
|
|
512
|
-
let adoptsFrom = data.meta.adoptsFrom;
|
|
513
|
-
let relationships = {};
|
|
514
|
-
for (let [field, value] of Object.entries(data.relationships ?? {})) relationships[field] = value?.links?.self ?? null;
|
|
515
|
-
return {
|
|
516
|
-
id,
|
|
517
|
-
path: `${this.relative(id)}.json`,
|
|
518
|
-
...isResolvedCodeRef(adoptsFrom) ? { type: {
|
|
519
|
-
module: adoptsFrom.module,
|
|
520
|
-
name: adoptsFrom.name
|
|
521
|
-
} } : {},
|
|
522
|
-
attributes: data.attributes ?? {},
|
|
523
|
-
relationships
|
|
524
|
-
};
|
|
525
|
-
}
|
|
526
|
-
case "cards.update": return await this.updateCard(args[0], args[1]);
|
|
527
|
-
case "entries.search": return await this.searchEntriesFor(args[0], args[1]);
|
|
528
|
-
case "fs.delete": {
|
|
529
|
-
if (!this.namedCalls.has("realm.fs.delete")) throw notNamedError("realm.fs.delete");
|
|
530
|
-
let url = this.resolve(method, args[0]);
|
|
531
|
-
this.assertNoCardUpdate(url);
|
|
532
|
-
let content = await this.lookup(url);
|
|
533
|
-
if (content === void 0) throw new Error(this.deleted.has(url) || this.deletedExisting.has(url) ? `File not found; this run already deleted it: ${url}` : `File not found: ${url}`);
|
|
534
|
-
if (this.closed) {
|
|
535
|
-
this.refused += 1;
|
|
536
|
-
throw new Error(`The run has ended; ${url} was not deleted`);
|
|
537
|
-
}
|
|
538
|
-
let digest = this.binaryDigests.get(url);
|
|
539
|
-
await this.deleteFile(url, content !== BINARY ? { content } : digest !== void 0 ? { sha256: digest } : void 0);
|
|
540
|
-
let created = this.created.has(url);
|
|
541
|
-
this.forgetDeleted(url);
|
|
542
|
-
(created ? this.deleted : this.deletedExisting).add(url);
|
|
543
|
-
return {
|
|
544
|
-
path: this.relative(url),
|
|
545
|
-
deleted: true
|
|
546
|
-
};
|
|
547
|
-
}
|
|
548
|
-
case "fs.download": {
|
|
549
|
-
if (!this.namedCalls.has("realm.fs.download")) throw notNamedError("realm.fs.download");
|
|
550
|
-
let sourceUrl = downloadSource(args[0]);
|
|
551
|
-
let url = this.resolve(method, args[1]);
|
|
552
|
-
if (!FILE_EXTENSION_RE.test(url.slice(url.lastIndexOf("/") + 1))) throw new Error(`realm.fs.download needs a path with a file extension, so the realm knows the file type: ${url}`);
|
|
553
|
-
if (await this.lookup(url) !== void 0) throw new Error(`File already exists: ${url}`);
|
|
554
|
-
let left = MAX_DOWNLOAD_BYTES_PER_RUN - this.downloadedBytes;
|
|
555
|
-
let maxBytes = Math.min(MAX_DOWNLOAD_FILE_SIZE, left);
|
|
556
|
-
let bytes;
|
|
557
|
-
try {
|
|
558
|
-
bytes = await this.download(sourceUrl, maxBytes);
|
|
559
|
-
} catch (error) {
|
|
560
|
-
if (error instanceof DownloadTooLarge) throw new Error(maxBytes < MAX_DOWNLOAD_FILE_SIZE ? `realm.fs.download accepts at most ${MAX_DOWNLOAD_BYTES_PER_RUN} bytes per run: ${sourceUrl} is larger than the ${left} bytes left` : `realm.fs.download accepts at most ${MAX_DOWNLOAD_FILE_SIZE} bytes per file: ${sourceUrl} is larger`);
|
|
561
|
-
throw error;
|
|
562
|
-
}
|
|
563
|
-
this.downloadedBytes += bytes.byteLength;
|
|
564
|
-
if (bytes.byteLength === 0) throw new Error(`${sourceUrl} returned an empty file`);
|
|
565
|
-
if (this.closed) {
|
|
566
|
-
this.refused += 1;
|
|
567
|
-
throw new Error(`The run has ended; ${url} was not saved`);
|
|
568
|
-
}
|
|
569
|
-
await this.writeBinaryFile(url, bytes);
|
|
570
|
-
this.binaryDigests.set(url, await sha256(bytes));
|
|
571
|
-
this.known.delete(url);
|
|
572
|
-
this.binary.add(url);
|
|
573
|
-
this.markCreated(url);
|
|
574
|
-
return {
|
|
575
|
-
path: this.relative(url),
|
|
576
|
-
size: bytes.byteLength,
|
|
577
|
-
saved: true
|
|
578
|
-
};
|
|
579
|
-
}
|
|
580
|
-
case "capture": {
|
|
581
|
-
let { url, path } = this.captureTarget(args[0]);
|
|
582
|
-
return await this.captures.take(url, path, args[1]);
|
|
583
|
-
}
|
|
584
|
-
case "images.generate": return await this.generateAndSaveImage(args[0]);
|
|
585
|
-
case "workspaces.create": {
|
|
586
|
-
let options = args[0] ?? {};
|
|
587
|
-
if (typeof options !== "object" || Array.isArray(options)) throw new TypeError("realm.workspaces.create expects an options object: { name, endpoint }");
|
|
588
|
-
let { name, endpoint } = options;
|
|
589
|
-
for (let [key, value] of Object.entries({
|
|
590
|
-
name,
|
|
591
|
-
endpoint
|
|
592
|
-
})) if (value !== void 0 && value !== null && typeof value !== "string") throw new TypeError(`realm.workspaces.create expects ${key} to be a string`);
|
|
593
|
-
if (this.createdWorkspaces.length >= MAX_WORKSPACES) throw new Error(`Realm code may create at most ${MAX_WORKSPACES} workspaces`);
|
|
594
|
-
let creating = this.createWorkspace({
|
|
595
|
-
name: name ?? void 0,
|
|
596
|
-
endpoint: endpoint ?? void 0
|
|
597
|
-
});
|
|
598
|
-
let { signal } = this.inFlight;
|
|
599
|
-
let created = await new Promise((resolve, reject) => {
|
|
600
|
-
let onAbort = () => reject(/* @__PURE__ */ new Error("The run has ended; the workspace create was not awaited"));
|
|
601
|
-
if (signal.aborted) onAbort();
|
|
602
|
-
signal.addEventListener("abort", onAbort, { once: true });
|
|
603
|
-
creating.then((workspace) => {
|
|
604
|
-
if (signal.aborted) log.warn(`Workspace ${workspace.url} was created after the run ended`);
|
|
605
|
-
resolve(workspace);
|
|
606
|
-
}, reject).finally(() => {
|
|
607
|
-
signal.removeEventListener("abort", onAbort);
|
|
608
|
-
});
|
|
609
|
-
});
|
|
610
|
-
this.createdWorkspaces.push(created.url);
|
|
611
|
-
this.goneWorkspaces.delete(created.url);
|
|
612
|
-
return created;
|
|
613
|
-
}
|
|
614
|
-
case "workspaces.delete": {
|
|
615
|
-
if (!this.namedCalls.has("realm.workspaces.delete")) throw notNamedError("realm.workspaces.delete");
|
|
616
|
-
let realmIdentifier = args[0];
|
|
617
|
-
if (typeof realmIdentifier !== "string" || !realmIdentifier) throw new TypeError("realm.workspaces.delete expects the URL of a workspace");
|
|
618
|
-
let deleted = await this.deleteWorkspace(realmIdentifier);
|
|
619
|
-
this.deletedWorkspaces.push(deleted.url);
|
|
620
|
-
this.goneWorkspaces.add(deleted.url);
|
|
621
|
-
return {
|
|
622
|
-
url: deleted.url,
|
|
623
|
-
deleted: true
|
|
624
|
-
};
|
|
625
|
-
}
|
|
626
|
-
case "room.enableSkills": return await this.room.enableSkills(args[0]);
|
|
627
|
-
case "room.disableSkills": return this.room.disableSkills(args[0]);
|
|
628
|
-
case "room.setModel": return await this.room.setModel(args[0]);
|
|
629
|
-
case "ui.switchSubmode": {
|
|
630
|
-
let submode = args[0];
|
|
631
|
-
if (submode !== "interact" && submode !== "code") throw new TypeError("realm.ui.switchSubmode expects 'interact' or 'code'");
|
|
632
|
-
return this.queueUiAction({
|
|
633
|
-
action: "switchSubmode",
|
|
634
|
-
submode
|
|
635
|
-
});
|
|
636
|
-
}
|
|
637
|
-
case "ui.openFile": {
|
|
638
|
-
let url = this.resolve(method, args[0]);
|
|
639
|
-
if (!await this.exists(url)) throw new Error(`File not found: ${url}`);
|
|
640
|
-
return this.queueUiAction({
|
|
641
|
-
action: "openFile",
|
|
642
|
-
url
|
|
643
|
-
});
|
|
644
|
-
}
|
|
645
|
-
case "ui.previewFormat": {
|
|
646
|
-
let [path, format = "isolated"] = args;
|
|
647
|
-
if (typeof format !== "string" || !PREVIEW_FORMATS.includes(format)) throw new TypeError(`realm.ui.previewFormat expects a card path and one of these formats: ${PREVIEW_FORMATS.join(", ")}`);
|
|
648
|
-
let url = this.resolve(method, path);
|
|
649
|
-
let fileURL = url.endsWith(".json") ? url : `${url}.json`;
|
|
650
|
-
let content = await this.load(fileURL);
|
|
651
|
-
if (content === void 0) throw new Error(`Card not found: ${fileURL}`);
|
|
652
|
-
let module;
|
|
653
|
-
try {
|
|
654
|
-
module = JSON.parse(content)?.data?.meta?.adoptsFrom?.module;
|
|
655
|
-
} catch {}
|
|
656
|
-
if (typeof module !== "string") throw new Error(`Not a card instance: ${fileURL}`);
|
|
657
|
-
let modulePath = isRelativePath(module) ? new URL(module, fileURL).href : module;
|
|
658
|
-
if (!/\.(gts|ts)$/.test(modulePath)) modulePath = `${modulePath}.gts`;
|
|
659
|
-
return this.queueUiAction({
|
|
660
|
-
action: "previewFormat",
|
|
661
|
-
cardId: fileURL.slice(0, -5),
|
|
662
|
-
modulePath,
|
|
663
|
-
format
|
|
664
|
-
});
|
|
665
|
-
}
|
|
666
|
-
case "ui.openWorkspace": return this.queueUiAction({ action: "openWorkspace" });
|
|
667
|
-
case "index.invalidate": {
|
|
668
|
-
let paths = typeof args[0] === "string" ? [args[0]] : args[0];
|
|
669
|
-
if (!Array.isArray(paths) || paths.length === 0 || paths.length > MAX_INVALIDATE_PATHS) throw new TypeError(`realm.index.invalidate expects a path or an array of 1 to ${MAX_INVALIDATE_PATHS} paths`);
|
|
670
|
-
let urls = paths.map((path) => this.resolve(method, path));
|
|
671
|
-
await this.index.invalidate(urls);
|
|
672
|
-
let invalidated = urls.map((url) => this.relative(url));
|
|
673
|
-
this.indexActions.push(`invalidate ${invalidated.join(", ")}`);
|
|
674
|
-
return { invalidated };
|
|
675
|
-
}
|
|
676
|
-
case "index.reindex":
|
|
677
|
-
await this.index.reindex();
|
|
678
|
-
this.indexActions.push("reindex");
|
|
679
|
-
return { reindex: "started" };
|
|
680
|
-
case "index.fullReindex":
|
|
681
|
-
if (!this.namedCalls.has("realm.index.fullReindex")) throw notNamedError("realm.index.fullReindex");
|
|
682
|
-
await this.index.fullReindex();
|
|
683
|
-
this.indexActions.push("fullReindex");
|
|
684
|
-
return { fullReindex: "started" };
|
|
685
|
-
case "index.cancelJob":
|
|
686
|
-
if (!this.namedCalls.has("realm.index.cancelJob")) throw notNamedError("realm.index.cancelJob");
|
|
687
|
-
await this.index.cancelJob();
|
|
688
|
-
this.indexActions.push("cancelJob");
|
|
689
|
-
return { cancelled: true };
|
|
690
|
-
default: throw new Error(`Unknown realm call: ${String(method)}`);
|
|
691
|
-
}
|
|
692
|
-
}
|
|
693
|
-
get pendingCardUpdates() {
|
|
694
|
-
return this.cardUpdates.size;
|
|
695
|
-
}
|
|
696
|
-
async updateCard(path, attributes) {
|
|
697
|
-
if (attributes === null || typeof attributes !== "object" || Array.isArray(attributes)) throw new TypeError("realm.cards.update expects a card path and an attributes object");
|
|
698
|
-
let url = this.resolve("cards.update", path);
|
|
699
|
-
if (!url.endsWith(".json")) url = `${url}.json`;
|
|
700
|
-
let pending = this.cardUpdates.get(url);
|
|
701
|
-
if (!pending) {
|
|
702
|
-
if (this.cardUpdates.size >= MAX_CARD_UPDATES) throw new Error(`Realm code may update at most ${MAX_CARD_UPDATES} cards`);
|
|
703
|
-
let expected = await this.cardSource(url);
|
|
704
|
-
let doc;
|
|
705
|
-
try {
|
|
706
|
-
doc = JSON.parse(expected);
|
|
707
|
-
} catch {}
|
|
708
|
-
if (!doc?.data || typeof doc.data !== "object" || !doc.data.meta?.adoptsFrom) throw new Error(`Not a card instance: ${url}`);
|
|
709
|
-
pending = {
|
|
710
|
-
expected,
|
|
711
|
-
doc
|
|
712
|
-
};
|
|
713
|
-
}
|
|
714
|
-
let patch = attributes;
|
|
715
|
-
let doc = cloneDeep(pending.doc);
|
|
716
|
-
clearReplacedArrayFieldMeta(doc.data.meta, patch);
|
|
717
|
-
doc.data.attributes = mergeWith(doc.data.attributes ?? {}, patch, (_target, source) => Array.isArray(source) ? source : void 0);
|
|
718
|
-
try {
|
|
719
|
-
validateWriteSize(JSON.stringify(doc, null, 2), this.cardSizeLimitBytes, "card");
|
|
720
|
-
} catch (error) {
|
|
721
|
-
throw new Error(`Card is too large after this update: ${url}. ${coerceErrorMessage(error, "")}`.trim());
|
|
722
|
-
}
|
|
723
|
-
this.cardUpdates.set(url, {
|
|
724
|
-
expected: pending.expected,
|
|
725
|
-
doc
|
|
726
|
-
});
|
|
727
|
-
return {
|
|
728
|
-
path: this.relative(url),
|
|
729
|
-
fields: Object.keys(patch),
|
|
730
|
-
saves: "after the script finishes"
|
|
731
|
-
};
|
|
732
|
-
}
|
|
733
|
-
async cardSource(url) {
|
|
734
|
-
if (this.binary.has(url)) throw new Error(`Not a card instance: ${url}`);
|
|
735
|
-
if (this.known.has(url)) {
|
|
736
|
-
let content = this.known.get(url);
|
|
737
|
-
if (content === void 0) throw new Error(`Card not found: ${url}`);
|
|
738
|
-
return content;
|
|
739
|
-
}
|
|
740
|
-
let source = await this.readSource(url);
|
|
741
|
-
if (source.status === 404) throw new Error(`Card not found: ${url}`);
|
|
742
|
-
if (source.binary) throw new Error(`Not a card instance: ${url}`);
|
|
743
|
-
if (source.status !== 200) throw new Error(`Unable to read ${url}: ${source.status}`);
|
|
744
|
-
if (source.tooLarge || source.content.length > MAX_FILE_SIZE) throw new Error(`File is too large: ${url}`);
|
|
745
|
-
return source.content;
|
|
746
|
-
}
|
|
747
|
-
async saveCardUpdates() {
|
|
748
|
-
if (this.cardUpdates.size === 0) return;
|
|
749
|
-
let updates = [...this.cardUpdates].map(([url, { expected, doc }]) => ({
|
|
750
|
-
url,
|
|
751
|
-
expected,
|
|
752
|
-
content: JSON.stringify(doc, null, 2)
|
|
753
|
-
}));
|
|
754
|
-
await this.saveCards(updates);
|
|
755
|
-
this.cardUpdates.clear();
|
|
756
|
-
for (let { url } of updates) this.saved.add(url);
|
|
757
|
-
}
|
|
758
|
-
assertNoCardUpdate(url) {
|
|
759
|
-
if (this.cardUpdates.has(url)) throw new Error(`${url} has a realm.cards.update that is saved when the script finishes; realm.fs cannot read or change it in the same run`);
|
|
760
|
-
}
|
|
761
|
-
resolve(method, path) {
|
|
762
|
-
if (typeof path !== "string" || path.length === 0) throw new TypeError(`realm.${method} expects a path string`);
|
|
763
|
-
let url;
|
|
764
|
-
if (/^[a-z][a-z0-9+.-]*:/i.test(path)) url = new URL(path).href;
|
|
765
|
-
else {
|
|
766
|
-
if (path.startsWith("/") || path.includes("\\") || path.split("/").some((part) => part === ".." || part === "." || part === "")) throw new Error(`Path must be relative to the realm root: ${path}`);
|
|
767
|
-
url = new URL(path, this.realmURL).href;
|
|
768
|
-
}
|
|
769
|
-
if (!url.startsWith(this.realmURL) || url === this.realmURL) throw new Error(`Path is outside this realm: ${path}`);
|
|
770
|
-
return url;
|
|
771
|
-
}
|
|
772
|
-
async searchEntriesFor(rawQuery, rawOptions) {
|
|
773
|
-
if (rawQuery === null || typeof rawQuery !== "object" || Array.isArray(rawQuery)) throw new TypeError("realm.entries.search expects a query object");
|
|
774
|
-
if ("page" in rawQuery) throw new Error("realm.entries.search does not page; pass { limit } in the options and narrow the query to see other entries");
|
|
775
|
-
let options = rawOptions ?? {};
|
|
776
|
-
if (typeof options !== "object" || Array.isArray(options)) throw new TypeError("realm.entries.search expects an options object: { realms, scope, limit }");
|
|
777
|
-
let { realms, scope, limit } = options;
|
|
778
|
-
if (realms !== void 0 && (!Array.isArray(realms) || realms.some((realm) => typeof realm !== "string"))) throw new TypeError("realms must be an array of realm URLs or identifiers such as @cardstack/catalog/");
|
|
779
|
-
if (scope !== void 0 && typeof scope !== "string") throw new TypeError("scope must be one of 'cards', 'files', 'all'");
|
|
780
|
-
if (limit !== void 0 && (typeof limit !== "number" || !Number.isFinite(limit))) throw new TypeError("limit must be a number");
|
|
781
|
-
let size = limit === void 0 ? DEFAULT_ENTRY_RESULTS : Math.min(Math.max(Math.floor(limit), 1), MAX_ENTRY_RESULTS);
|
|
782
|
-
let query = pruneEmptyQueryParts(rawQuery);
|
|
783
|
-
assertQuery(query);
|
|
784
|
-
let { rows, total, incomplete } = await searchEntrySummaries(this.searchEntries, query, {
|
|
785
|
-
scope,
|
|
786
|
-
limit: size,
|
|
787
|
-
realms
|
|
788
|
-
});
|
|
789
|
-
let resultSize = 0;
|
|
790
|
-
for (let [index, row] of rows.entries()) {
|
|
791
|
-
resultSize += JSON.stringify(row).length;
|
|
792
|
-
if (resultSize > MAX_ENTRY_RESULT_SIZE) throw new Error(index > 0 ? `These entries are too large to return; search again with limit ${index} or less` : `The entry ${row.url} is too large to return from a search`);
|
|
793
|
-
}
|
|
794
|
-
return {
|
|
795
|
-
entries: rows,
|
|
796
|
-
total,
|
|
797
|
-
truncated: rows.length < total,
|
|
798
|
-
incomplete
|
|
799
|
-
};
|
|
800
|
-
}
|
|
801
|
-
resolveDirectory(path) {
|
|
802
|
-
if (path === void 0 || path === null || path === "") return this.realmURL;
|
|
803
|
-
if (typeof path === "string" && /^[a-z][a-z0-9+.-]*:/i.test(path)) {
|
|
804
|
-
let url = new URL(path).href;
|
|
805
|
-
if ((url.endsWith("/") ? url : `${url}/`) === this.realmURL) return this.realmURL;
|
|
806
|
-
}
|
|
807
|
-
let url = this.resolve("fs.list", typeof path === "string" && path.endsWith("/") ? path.slice(0, -1) : path);
|
|
808
|
-
return url.endsWith("/") ? url : `${url}/`;
|
|
809
|
-
}
|
|
810
|
-
queueUiAction(action) {
|
|
811
|
-
if (this.uiActions.length >= MAX_UI_ACTIONS) throw new Error(`Realm code may ask for at most ${MAX_UI_ACTIONS} realm.ui actions`);
|
|
812
|
-
this.uiActions.push(action);
|
|
813
|
-
return {
|
|
814
|
-
action: action.action,
|
|
815
|
-
runs: "after the script finishes"
|
|
816
|
-
};
|
|
817
|
-
}
|
|
818
|
-
async generateAndSaveImage(options) {
|
|
819
|
-
if (!this.namedCalls.has("realm.images.generate")) throw notNamedError("realm.images.generate");
|
|
820
|
-
if (!options || typeof options !== "object" || Array.isArray(options)) throw new TypeError("realm.images.generate expects an options object: { prompt, path, sourceImageUrl, llmModel }");
|
|
821
|
-
let { prompt, path, sourceImageUrl, llmModel } = options;
|
|
822
|
-
if (typeof prompt !== "string" || !prompt.trim()) throw new TypeError("realm.images.generate requires a prompt string");
|
|
823
|
-
for (let [key, value] of Object.entries({
|
|
824
|
-
sourceImageUrl,
|
|
825
|
-
llmModel
|
|
826
|
-
})) if (value !== void 0 && value !== null && typeof value !== "string") throw new TypeError(`realm.images.generate expects ${key} to be a string`);
|
|
827
|
-
let url = this.resolve("images.generate", path);
|
|
828
|
-
let source = typeof sourceImageUrl === "string" && sourceImageUrl ? /^data:/i.test(sourceImageUrl) ? sourceImageUrl : this.resolve("images.generate", sourceImageUrl) : void 0;
|
|
829
|
-
if (this.imagesRequested >= MAX_IMAGES) throw new Error(`Realm code may generate at most ${MAX_IMAGES} images`);
|
|
830
|
-
let timeLeft = IMAGE_TIME_BUDGET_MS - this.imageTimeUsed;
|
|
831
|
-
if (timeLeft <= 0) throw new Error(`Realm code may spend at most ${IMAGE_TIME_BUDGET_MS / 1e3} s generating images`);
|
|
832
|
-
if (this.known.size + this.binary.size >= MAX_FILES) throw new Error(`Realm code may touch at most ${MAX_FILES} files`);
|
|
833
|
-
let base = url.replace(IMAGE_EXTENSION_RE, "");
|
|
834
|
-
let destinations = [url, ...IMAGE_FILE_EXTENSIONS.map((extension) => `${base}.${extension}`)];
|
|
835
|
-
let taken = (await Promise.all([...new Set(destinations)].map(async (destination) => await this.exists(destination) ? destination : void 0))).filter((destination) => destination !== void 0);
|
|
836
|
-
if (taken.length > 0) throw new Error(`File already exists: ${taken.join(", ")}`);
|
|
837
|
-
this.imagesRequested += 1;
|
|
838
|
-
let limit = Math.min(IMAGE_TIMEOUT_MS, timeLeft);
|
|
839
|
-
let timeout = AbortSignal.timeout(limit);
|
|
840
|
-
let started = Date.now();
|
|
841
|
-
let image;
|
|
842
|
-
try {
|
|
843
|
-
image = await this.generateImage({
|
|
844
|
-
prompt: prompt.trim(),
|
|
845
|
-
sourceImageUrl: source,
|
|
846
|
-
llmModel: llmModel ?? void 0,
|
|
847
|
-
signal: AbortSignal.any([this.inFlight.signal, timeout])
|
|
848
|
-
});
|
|
849
|
-
} catch (error) {
|
|
850
|
-
if (this.inFlight.signal.aborted) throw new Error("The run has ended; the image request was stopped");
|
|
851
|
-
if (timeout.aborted) throw new Error(`realm.images.generate did not finish within ${Math.round(limit / 1e3)} s`);
|
|
852
|
-
throw error;
|
|
853
|
-
} finally {
|
|
854
|
-
this.imageTimeUsed += Date.now() - started;
|
|
855
|
-
}
|
|
856
|
-
let savedURL = `${base}.${imageExtension(image.mimeType)}`;
|
|
857
|
-
if (this.closed) {
|
|
858
|
-
this.refused += 1;
|
|
859
|
-
throw new Error(`The run has ended; ${savedURL} was not saved`);
|
|
860
|
-
}
|
|
861
|
-
let bytes = decodeBase64(image.base64.replace(/\s+/g, ""));
|
|
862
|
-
await this.writeBinaryFile(savedURL, bytes);
|
|
863
|
-
this.binaryDigests.set(savedURL, await sha256(bytes));
|
|
864
|
-
this.known.delete(savedURL);
|
|
865
|
-
this.binary.add(savedURL);
|
|
866
|
-
this.markCreated(savedURL);
|
|
867
|
-
return {
|
|
868
|
-
path: this.relative(savedURL),
|
|
869
|
-
contentType: image.mimeType,
|
|
870
|
-
size: bytes.byteLength,
|
|
871
|
-
saved: true
|
|
872
|
-
};
|
|
873
|
-
}
|
|
874
|
-
async exists(url) {
|
|
875
|
-
if (this.known.has(url)) return this.known.get(url) !== void 0;
|
|
876
|
-
if (this.binary.has(url)) return true;
|
|
877
|
-
let source = await this.readSource(url);
|
|
878
|
-
if (source.status !== 200 && source.status !== 404) throw new Error(`Unable to read ${url}: ${source.status}`);
|
|
879
|
-
return source.status === 200;
|
|
880
|
-
}
|
|
881
|
-
cardURL(path) {
|
|
882
|
-
if (typeof path !== "string") throw new TypeError("`show` must be a card or file path string");
|
|
883
|
-
return this.resolve("show", path).replace(/\.json$/, "");
|
|
884
|
-
}
|
|
885
|
-
captureTarget(path) {
|
|
886
|
-
if (typeof path === "string" && (/^[a-z][a-z0-9+.-]*:/i.test(path) || isPrefixForm(path))) {
|
|
887
|
-
let reference = path.trim();
|
|
888
|
-
return {
|
|
889
|
-
url: reference,
|
|
890
|
-
path: reference.startsWith(this.realmURL) && reference !== this.realmURL && this.heldByThisRealm(reference) ? this.relative(reference) : reference
|
|
891
|
-
};
|
|
892
|
-
}
|
|
893
|
-
let url = this.resolve("capture", path);
|
|
894
|
-
return {
|
|
895
|
-
url,
|
|
896
|
-
path: this.relative(url)
|
|
897
|
-
};
|
|
898
|
-
}
|
|
899
|
-
relative(url) {
|
|
900
|
-
return url.slice(this.realmURL.length);
|
|
901
|
-
}
|
|
902
|
-
async searchCards(raw) {
|
|
903
|
-
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) throw new TypeError("realm.cards.search expects a query object");
|
|
904
|
-
if ("realm" in raw || "realms" in raw) throw new Error("realm.cards.search searches only this realm; to search another realm, run code in that realm");
|
|
905
|
-
let query = pruneEmptyQueryParts(raw);
|
|
906
|
-
assertQuery(query);
|
|
907
|
-
let requested = query.page?.size;
|
|
908
|
-
let size = typeof requested === "number" && Number.isFinite(requested) ? Math.min(Math.max(Math.floor(requested), 1), MAX_SEARCH_RESULTS) : DEFAULT_SEARCH_RESULTS;
|
|
909
|
-
let wireQuery = searchEntryWireQueryFromQuery(composeSearchEntriesQuery(query, "cards").query, {
|
|
910
|
-
fields: ["item"],
|
|
911
|
-
scope: "cards"
|
|
912
|
-
});
|
|
913
|
-
wireQuery.page = {
|
|
914
|
-
...wireQuery.page,
|
|
915
|
-
size
|
|
916
|
-
};
|
|
917
|
-
let doc = await this.search(wireQuery);
|
|
918
|
-
if (doc.meta.incomplete) throw new Error(`The search in ${this.realmURL} did not answer; no cards were returned`);
|
|
919
|
-
let items = /* @__PURE__ */ new Map();
|
|
920
|
-
for (let resource of doc.included ?? []) if (resource.type === "card") items.set(resourceIdentity(resource.type, resource.id), resource);
|
|
921
|
-
let cards = [];
|
|
922
|
-
let resultSize = 0;
|
|
923
|
-
for (let entry of doc.data) {
|
|
924
|
-
let itemRef = entry.relationships?.item?.data;
|
|
925
|
-
let item = itemRef && items.get(resourceIdentity(itemRef.type, itemRef.id));
|
|
926
|
-
let card = entry.id && item ? this.foundCard(entry.id, item) : void 0;
|
|
927
|
-
if (!card) continue;
|
|
928
|
-
resultSize += JSON.stringify(card).length;
|
|
929
|
-
if (resultSize > MAX_SEARCH_RESULT_SIZE) throw new Error(cards.length > 0 ? `This page of cards is too large to return; search again with page.size ${cards.length} or less` : `The card ${card.path} is too large to return from a search; read it with realm.fs.readText`);
|
|
930
|
-
cards.push(card);
|
|
931
|
-
}
|
|
932
|
-
let total = doc.meta.page.total;
|
|
933
|
-
return {
|
|
934
|
-
cards,
|
|
935
|
-
total,
|
|
936
|
-
truncated: (wireQuery.page.number ?? 0) * size + doc.data.length < total
|
|
937
|
-
};
|
|
938
|
-
}
|
|
939
|
-
foundCard(entryId, item) {
|
|
940
|
-
let id = this.resolveURL(entryId);
|
|
941
|
-
if (!id.startsWith(this.realmURL)) return;
|
|
942
|
-
let file = this.relative(id);
|
|
943
|
-
let path = file.endsWith(".json") ? file : `${file}.json`;
|
|
944
|
-
let adoptsFrom = item.meta.adoptsFrom;
|
|
945
|
-
let type = isResolvedCodeRef(adoptsFrom) ? {
|
|
946
|
-
module: this.resolveURL(adoptsFrom.module, id),
|
|
947
|
-
name: adoptsFrom.name
|
|
948
|
-
} : void 0;
|
|
949
|
-
let relationships = {};
|
|
950
|
-
for (let [field, value] of Object.entries(item.relationships ?? {})) {
|
|
951
|
-
let self = value?.links?.self;
|
|
952
|
-
relationships[field] = self ? this.resolveURL(self, id) : null;
|
|
953
|
-
}
|
|
954
|
-
return {
|
|
955
|
-
id,
|
|
956
|
-
path,
|
|
957
|
-
...type ? { type } : {},
|
|
958
|
-
attributes: item.attributes ?? {},
|
|
959
|
-
relationships
|
|
960
|
-
};
|
|
961
|
-
}
|
|
962
|
-
async download(sourceUrl, maxBytes) {
|
|
963
|
-
if (this.inFlight.signal.aborted) {
|
|
964
|
-
this.refused += 1;
|
|
965
|
-
throw new Error(`The run has ended; ${sourceUrl} was not downloaded`);
|
|
966
|
-
}
|
|
967
|
-
let stop = new AbortController();
|
|
968
|
-
let timer = setTimeout(() => stop.abort(/* @__PURE__ */ new Error(`Downloading ${sourceUrl} took longer than ${DOWNLOAD_TIMEOUT_MS / 1e3} s`)), DOWNLOAD_TIMEOUT_MS);
|
|
969
|
-
let onRunEnd = () => stop.abort(/* @__PURE__ */ new Error(`The run has ended; ${sourceUrl} was not downloaded`));
|
|
970
|
-
this.inFlight.signal.addEventListener("abort", onRunEnd, { once: true });
|
|
971
|
-
try {
|
|
972
|
-
return await new Promise((resolve, reject) => {
|
|
973
|
-
stop.signal.addEventListener("abort", () => reject(stop.signal.reason), { once: true });
|
|
974
|
-
this.downloadFile(sourceUrl, maxBytes, stop.signal).then(resolve, reject);
|
|
975
|
-
});
|
|
976
|
-
} finally {
|
|
977
|
-
clearTimeout(timer);
|
|
978
|
-
this.inFlight.signal.removeEventListener("abort", onRunEnd);
|
|
979
|
-
}
|
|
980
|
-
}
|
|
981
|
-
async load(url) {
|
|
982
|
-
let content = await this.lookup(url);
|
|
983
|
-
if (content === BINARY) throw new Error(`${url} is a binary file; realm.fs reads only text`);
|
|
984
|
-
return content;
|
|
985
|
-
}
|
|
986
|
-
async lookup(url) {
|
|
987
|
-
this.assertNoCardUpdate(url);
|
|
988
|
-
if (this.known.has(url)) return this.known.get(url);
|
|
989
|
-
if (this.binary.has(url)) return BINARY;
|
|
990
|
-
if (this.known.size + this.binary.size >= MAX_FILES) throw new Error(`Realm code may touch at most ${MAX_FILES} files`);
|
|
991
|
-
let source = await this.readSource(url);
|
|
992
|
-
if (source.binary) {
|
|
993
|
-
this.binary.add(url);
|
|
994
|
-
return BINARY;
|
|
995
|
-
}
|
|
996
|
-
if (source.status !== 200 && source.status !== 404) throw new Error(`Unable to read ${url}: ${source.status}`);
|
|
997
|
-
if (source.tooLarge) throw new Error(`File is too large: ${url}`);
|
|
998
|
-
let content = source.status === 404 ? void 0 : source.content;
|
|
999
|
-
if (content !== void 0 && content.length > MAX_FILE_SIZE) throw new Error(`File is too large: ${url}`);
|
|
1000
|
-
this.known.set(url, content);
|
|
1001
|
-
return content;
|
|
1002
|
-
}
|
|
1003
|
-
async save(url, content, expected, options) {
|
|
1004
|
-
if (content.length > MAX_FILE_SIZE) throw new Error(`File is too large after editing: ${url}`);
|
|
1005
|
-
if (this.closed) {
|
|
1006
|
-
this.refused += 1;
|
|
1007
|
-
throw new Error(`The run has ended; ${url} was not saved`);
|
|
1008
|
-
}
|
|
1009
|
-
let saved = await this.writeFile(url, content, expected, options);
|
|
1010
|
-
this.known.set(url, saved);
|
|
1011
|
-
if (expected === void 0) this.markCreated(url);
|
|
1012
|
-
else this.saved.add(url);
|
|
1013
|
-
}
|
|
1014
|
-
markCreated(url) {
|
|
1015
|
-
this.created.add(url);
|
|
1016
|
-
this.saved.add(url);
|
|
1017
|
-
this.deleted.delete(url);
|
|
1018
|
-
this.deletedExisting.delete(url);
|
|
1019
|
-
}
|
|
1020
|
-
forgetDeleted(url) {
|
|
1021
|
-
this.created.delete(url);
|
|
1022
|
-
this.saved.delete(url);
|
|
1023
|
-
this.binary.delete(url);
|
|
1024
|
-
this.binaryDigests.delete(url);
|
|
1025
|
-
this.known.set(url, void 0);
|
|
1026
|
-
}
|
|
1027
|
-
};
|
|
1028
|
-
function failureReport(session, error) {
|
|
1029
|
-
let message = error instanceof Error ? error.message : String(error);
|
|
1030
|
-
let saved = [...session.saved];
|
|
1031
|
-
log.debug(`run failed: saved=${saved.length} refusedAfterClose=${session.refusedAfterClose}: ${message}`);
|
|
1032
|
-
let trimmed = message.trimEnd();
|
|
1033
|
-
let sentence = /[.!?]$/.test(trimmed) ? trimmed : `${trimmed}.`;
|
|
1034
|
-
let report = saved.length > 0 ? `${sentence} Files already saved by this run: ${saved.join(", ")}` : `${sentence} No file was saved.`;
|
|
1035
|
-
if (session.deleted.size > 0) report += ` Files this run created and already deleted: ${[...session.deleted].join(", ")}`;
|
|
1036
|
-
if (session.deletedExisting.size > 0) report += ` Files that existed before this run and that it already deleted: ${[...session.deletedExisting].join(", ")}`;
|
|
1037
|
-
if (session.createdWorkspaces.length > 0) report += ` Workspaces already created by this run: ${session.createdWorkspaces.join(", ")}`;
|
|
1038
|
-
if (session.deletedWorkspaces.length > 0) report += ` Workspaces already deleted by this run: ${session.deletedWorkspaces.join(", ")}`;
|
|
1039
|
-
if (session.indexActions.length > 0) report += ` Index actions already started by this run: ${session.indexActions.join("; ")}`;
|
|
1040
|
-
if (session.room.requested) report += " The room changes it asked for were not made.";
|
|
1041
|
-
if (session.uiActions.length > 0) report += " The UI actions it asked for were not done.";
|
|
1042
|
-
if (session.pendingCardUpdates > 0) report += " The card updates it asked for were not saved.";
|
|
1043
|
-
return report;
|
|
1044
|
-
}
|
|
1045
|
-
var UTF8 = new TextDecoder("utf-8", { fatal: true });
|
|
1046
|
-
async function sha256(bytes) {
|
|
1047
|
-
let digest = await crypto.subtle.digest("SHA-256", bytes);
|
|
1048
|
-
return Array.from(new Uint8Array(digest)).map((b) => b.toString(16).padStart(2, "0")).join("");
|
|
1049
|
-
}
|
|
1050
|
-
function downloadSource(value) {
|
|
1051
|
-
if (typeof value !== "string") throw new TypeError("realm.fs.download expects a source URL and a destination path");
|
|
1052
|
-
let url;
|
|
1053
|
-
try {
|
|
1054
|
-
url = new URL(value);
|
|
1055
|
-
} catch {
|
|
1056
|
-
throw new Error(`realm.fs.download expects an absolute source URL: ${value}`);
|
|
1057
|
-
}
|
|
1058
|
-
if (url.protocol !== "http:" && url.protocol !== "https:") throw new Error(`realm.fs.download downloads only http and https URLs: ${value}`);
|
|
1059
|
-
return url.href;
|
|
1060
|
-
}
|
|
1061
|
-
function cleanBase64(value) {
|
|
1062
|
-
if (typeof value !== "string") throw new TypeError("realm.fs.writeBytes expects a path and a base64 string");
|
|
1063
|
-
let base64 = value.replace(DATA_URL_PREFIX_RE, "").replace(/\s+/g, "");
|
|
1064
|
-
if (base64.length === 0) throw new Error("realm.fs.writeBytes requires non-empty content");
|
|
1065
|
-
if (base64.length % 4 === 1 || !BASE64_RE.test(base64)) throw new Error("realm.fs.writeBytes content is not valid base64");
|
|
1066
|
-
return base64;
|
|
1067
|
-
}
|
|
1068
|
-
function decodedSize(base64) {
|
|
1069
|
-
let padding = base64.endsWith("==") ? 2 : base64.endsWith("=") ? 1 : 0;
|
|
1070
|
-
return Math.floor(base64.length * 3 / 4) - padding;
|
|
1071
|
-
}
|
|
1072
|
-
function decodeBase64(base64) {
|
|
1073
|
-
let binary = atob(base64);
|
|
1074
|
-
let bytes = new Uint8Array(binary.length);
|
|
1075
|
-
for (let i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i);
|
|
1076
|
-
return bytes;
|
|
1077
|
-
}
|
|
1078
|
-
var RunRealmCodeTool = class extends HostBaseTool {
|
|
1079
|
-
static {
|
|
1080
|
-
decorateFieldV2(this.prototype, "cardService", [service]);
|
|
1081
|
-
}
|
|
1082
|
-
#cardService = (initializeDeferredDecorator(this, "cardService"), void 0);
|
|
1083
|
-
static {
|
|
1084
|
-
decorateFieldV2(this.prototype, "environmentService", [service]);
|
|
1085
|
-
}
|
|
1086
|
-
#environmentService = (initializeDeferredDecorator(this, "environmentService"), void 0);
|
|
1087
|
-
static {
|
|
1088
|
-
decorateFieldV2(this.prototype, "matrixService", [service]);
|
|
1089
|
-
}
|
|
1090
|
-
#matrixService = (initializeDeferredDecorator(this, "matrixService"), void 0);
|
|
1091
|
-
static {
|
|
1092
|
-
decorateFieldV2(this.prototype, "operatorModeStateService", [service]);
|
|
1093
|
-
}
|
|
1094
|
-
#operatorModeStateService = (initializeDeferredDecorator(this, "operatorModeStateService"), void 0);
|
|
1095
|
-
static {
|
|
1096
|
-
decorateFieldV2(this.prototype, "network", [service]);
|
|
1097
|
-
}
|
|
1098
|
-
#network = (initializeDeferredDecorator(this, "network"), void 0);
|
|
1099
|
-
static {
|
|
1100
|
-
decorateFieldV2(this.prototype, "realm", [service]);
|
|
1101
|
-
}
|
|
1102
|
-
#realm = (initializeDeferredDecorator(this, "realm"), void 0);
|
|
1103
|
-
static {
|
|
1104
|
-
decorateFieldV2(this.prototype, "realmServer", [service]);
|
|
1105
|
-
}
|
|
1106
|
-
#realmServer = (initializeDeferredDecorator(this, "realmServer"), void 0);
|
|
1107
|
-
static {
|
|
1108
|
-
decorateFieldV2(this.prototype, "recentFilesService", [service]);
|
|
1109
|
-
}
|
|
1110
|
-
#recentFilesService = (initializeDeferredDecorator(this, "recentFilesService"), void 0);
|
|
1111
|
-
static {
|
|
1112
|
-
decorateFieldV2(this.prototype, "store", [service]);
|
|
1113
|
-
}
|
|
1114
|
-
#store = (initializeDeferredDecorator(this, "store"), void 0);
|
|
1115
|
-
static {
|
|
1116
|
-
decorateFieldV2(this.prototype, "toolService", [service]);
|
|
1117
|
-
}
|
|
1118
|
-
#toolService = (initializeDeferredDecorator(this, "toolService"), void 0);
|
|
1119
|
-
description = "Run safe Realm code that reads and edits realm source files, finds cards with realm.cards.search, reads cards as JSON data with realm.cards.get, changes card fields with realm.cards.update, finds cards, specs and files across realms with realm.entries.search, can look at cards and files with realm.capture (a path in the realm, or the URL of a card or file in any workspace the user can read), can generate images into the realm with realm.images.generate, can save a file from a URL with realm.fs.download, can create workspaces with realm.workspaces.create, can change the skills and model of this room with room.*, and can refresh the index of the workspace with realm.index.*. In a workspace the user can only read, reads work and each write is refused. Return { show: \"<card path>\" } to open a card in the realm when the run ends.";
|
|
1120
|
-
static actionVerb = "Run";
|
|
1121
|
-
static bindsToInvokingRoom = true;
|
|
1122
|
-
static clickReasonsFor(attributes) {
|
|
1123
|
-
return [...clickRequiredCallsIn(attributes?.code)].map((call) => ({
|
|
1124
|
-
call,
|
|
1125
|
-
reason: CLICK_REQUIRED_CALLS[call]
|
|
1126
|
-
}));
|
|
1127
|
-
}
|
|
1128
|
-
static extraExecuteTimeMsFor(attributes) {
|
|
1129
|
-
return clickRequiredCallsIn(attributes?.code).has("realm.images.generate") ? IMAGE_TIME_BUDGET_MS : 0;
|
|
1130
|
-
}
|
|
1131
|
-
async getInputType() {
|
|
1132
|
-
return (await this.loadToolModule()).RunRealmCodeInput;
|
|
1133
|
-
}
|
|
1134
|
-
requireInputFields = ["code"];
|
|
1135
|
-
async run(input) {
|
|
1136
|
-
if (!input.code || input.code.length > MAX_CODE_SIZE) throw new Error(`Realm code must be between 1 and ${MAX_CODE_SIZE} characters`);
|
|
1137
|
-
let realmInput = input.realm || this.operatorModeStateService.realmURL;
|
|
1138
|
-
let roomId = input.roomId || this.matrixService.currentRoomId;
|
|
1139
|
-
if (!realmInput) throw new Error("Realm code needs a realm to run in");
|
|
1140
|
-
if (!roomId) throw new Error("Realm code needs the room it runs for");
|
|
1141
|
-
let realmURL = this.realmOfInput(rri(realmInput.endsWith("/") ? realmInput : `${realmInput}/`));
|
|
1142
|
-
if (!realmURL || !(this.realm.canRead(realmURL) || this.realm.canWrite(realmURL))) throw new Error(`The current user cannot read or write ${realmInput}`);
|
|
1143
|
-
let namedCalls = clickRequiredCallsIn(input.code);
|
|
1144
|
-
let imageTime = namedCalls.has("realm.images.generate") ? IMAGE_TIME_BUDGET_MS : 0;
|
|
1145
|
-
let runTimeoutMs = RUN_TIMEOUT_MS + imageTime;
|
|
1146
|
-
let callDeadlineMs = CALL_DEADLINE_MS + imageTime;
|
|
1147
|
-
let session = new RealmFsSession(this.realmRootURL(realmURL), (url) => this.readSource(url), (url, content, expected, options) => this.writeFile(roomId, url, content, expected, options), (updates) => this.saveCards(roomId, this.realmRootURL(realmURL), updates), (url, bytes) => this.writeBinaryFile(roomId, url, bytes), (url, expected) => this.deleteFile(url, expected), (url, maxBytes, signal) => this.downloadFile(url, maxBytes, signal), (url) => this.listDirectory(url), (query) => this.store.searchEntries(query, [realmURL], { linksOnly: true }), (reference, base) => this.network.virtualNetwork.resolveURL(reference, base).href, (id) => this.readCard(id), (query, realms) => {
|
|
1148
|
-
this.assertKnownRealmIdentifiers(realms);
|
|
1149
|
-
return this.store.searchEntries(query, realms);
|
|
1150
|
-
}, (url, options, doneBy, signal) => this.captureURL(url, options, doneBy, signal), (reference) => workspaceOf(reference, {
|
|
1151
|
-
network: this.network,
|
|
1152
|
-
realm: this.realm
|
|
1153
|
-
})?.realmURL === this.realmRootURL(realmURL), (workspaceInput) => createWorkspace({
|
|
1154
|
-
matrixService: this.matrixService,
|
|
1155
|
-
realm: this.realm
|
|
1156
|
-
}, workspaceInput), (realmIdentifier) => deleteWorkspace({
|
|
1157
|
-
matrixService: this.matrixService,
|
|
1158
|
-
operatorModeStateService: this.operatorModeStateService,
|
|
1159
|
-
realm: this.realm,
|
|
1160
|
-
realmServer: this.realmServer,
|
|
1161
|
-
recentFilesService: this.recentFilesService
|
|
1162
|
-
}, realmIdentifier), (imageInput) => this.generateImage(imageInput), namedCalls, {
|
|
1163
|
-
invalidate: (urls) => this.realm.invalidateUrls(realmURL, urls),
|
|
1164
|
-
reindex: () => this.realm.reindex(realmURL),
|
|
1165
|
-
fullReindex: () => this.realm.fullReindex(realmURL),
|
|
1166
|
-
cancelJob: () => this.realm.cancelIndexingJob(realmURL)
|
|
1167
|
-
}, this.realm.canWrite(realmURL), this.environmentService.cardSizeLimitBytes, new RoomActions({
|
|
1168
|
-
checkSkill: (id) => this.checkSkill(id),
|
|
1169
|
-
knownModels: () => this.matrixService.pickableModelIds(roomId)
|
|
1170
|
-
}));
|
|
1171
|
-
let runnerResult;
|
|
1172
|
-
let deadline = new AbortController();
|
|
1173
|
-
let deadlineTimer = setTimeout(() => deadline.abort(/* @__PURE__ */ new Error(`Realm code did not finish within ${callDeadlineMs / 1e3} s`)), callDeadlineMs);
|
|
1174
|
-
session.captures.runEndsAt = Date.now() + runTimeoutMs;
|
|
1175
|
-
try {
|
|
1176
|
-
runnerResult = await runRealmCode({
|
|
1177
|
-
code: input.code,
|
|
1178
|
-
realmURL: this.realmRootURL(realmURL),
|
|
1179
|
-
timeoutMs: runTimeoutMs
|
|
1180
|
-
}, (method, args) => session.call(method, args), deadline.signal);
|
|
1181
|
-
} catch (error) {
|
|
1182
|
-
clearTimeout(deadlineTimer);
|
|
1183
|
-
session.close();
|
|
1184
|
-
await session.idle();
|
|
1185
|
-
throw new Error(failureReport(session, error));
|
|
1186
|
-
}
|
|
1187
|
-
clearTimeout(deadlineTimer);
|
|
1188
|
-
session.close();
|
|
1189
|
-
await session.idle();
|
|
1190
|
-
try {
|
|
1191
|
-
await session.saveCardUpdates();
|
|
1192
|
-
} catch (error) {
|
|
1193
|
-
throw new Error(failureReport(session, error));
|
|
1194
|
-
}
|
|
1195
|
-
await this.openCreatedWorkspace(session);
|
|
1196
|
-
let roomChanges = session.room.requested ? await this.changeRoom(roomId, session.room.requested) : [];
|
|
1197
|
-
let shown = await this.showCard(session, runnerResult.scriptResult);
|
|
1198
|
-
let commandModule = await this.loadToolModule();
|
|
1199
|
-
let uiActions = [];
|
|
1200
|
-
for (let action of session.uiActions) uiActions.push(new commandModule.RealmCodeUiActionResult(await this.applyUiAction(action, realmURL)));
|
|
1201
|
-
return new commandModule.RunRealmCodeResult({
|
|
1202
|
-
uiActions,
|
|
1203
|
-
...shown,
|
|
1204
|
-
files: [
|
|
1205
|
-
...[...session.saved].map((fileUrl) => new commandModule.RealmCodeFileResult({
|
|
1206
|
-
fileUrl,
|
|
1207
|
-
status: "saved",
|
|
1208
|
-
detail: session.binary.has(fileUrl) ? "Binary file saved." : "Source saved; correctness validation will run after this tool result."
|
|
1209
|
-
})),
|
|
1210
|
-
...[...session.deleted].map((fileUrl) => new commandModule.RealmCodeFileResult({
|
|
1211
|
-
fileUrl,
|
|
1212
|
-
status: "deleted",
|
|
1213
|
-
detail: "Created by this run and then deleted."
|
|
1214
|
-
})),
|
|
1215
|
-
...[...session.deletedExisting].map((fileUrl) => new commandModule.RealmCodeFileResult({
|
|
1216
|
-
fileUrl,
|
|
1217
|
-
status: "deleted",
|
|
1218
|
-
detail: "Existed before this run; deleted."
|
|
1219
|
-
}))
|
|
1220
|
-
],
|
|
1221
|
-
scriptResult: runnerResult.scriptResult,
|
|
1222
|
-
captures: session.captures.taken.map((viewed) => new commandModule.AttachedImageField({
|
|
1223
|
-
name: viewed.file.name,
|
|
1224
|
-
sourceUrl: viewed.file.sourceUrl,
|
|
1225
|
-
url: viewed.file.url,
|
|
1226
|
-
contentType: viewed.file.contentType,
|
|
1227
|
-
contentHash: viewed.file.contentHash,
|
|
1228
|
-
contentSize: viewed.file.contentSize,
|
|
1229
|
-
width: viewed.width,
|
|
1230
|
-
height: viewed.height
|
|
1231
|
-
})),
|
|
1232
|
-
createdWorkspaces: [...session.createdWorkspaces],
|
|
1233
|
-
deletedWorkspaces: [...session.deletedWorkspaces],
|
|
1234
|
-
indexActions: [...session.indexActions],
|
|
1235
|
-
roomChanges
|
|
1236
|
-
});
|
|
1237
|
-
}
|
|
1238
|
-
async changeRoom(roomId, { skillsToEnable, skillsToDisable, model }) {
|
|
1239
|
-
let changes = [];
|
|
1240
|
-
if (skillsToEnable.length || skillsToDisable.length) try {
|
|
1241
|
-
await new UpdateRoomSkillsTool(this.toolContext).execute({
|
|
1242
|
-
roomId,
|
|
1243
|
-
skillCardIdsToActivate: skillsToEnable,
|
|
1244
|
-
skillCardIdsToDeactivate: skillsToDisable
|
|
1245
|
-
});
|
|
1246
|
-
if (skillsToEnable.length) changes.push(`Enabled skills: ${skillsToEnable.join(", ")}`);
|
|
1247
|
-
if (skillsToDisable.length) changes.push(`Disabled skills: ${skillsToDisable.join(", ")}`);
|
|
1248
|
-
} catch (error) {
|
|
1249
|
-
changes.push(`Skills were not changed: ${coerceErrorMessage(error, "unknown error")}`);
|
|
1250
|
-
}
|
|
1251
|
-
if (model !== void 0) try {
|
|
1252
|
-
await new SetActiveLLMTool(this.toolContext).execute({
|
|
1253
|
-
roomId,
|
|
1254
|
-
model
|
|
1255
|
-
});
|
|
1256
|
-
changes.push(`Model set to ${model}`);
|
|
1257
|
-
} catch (error) {
|
|
1258
|
-
changes.push(`Model was not changed: ${coerceErrorMessage(error, "unknown error")}`);
|
|
1259
|
-
}
|
|
1260
|
-
return changes;
|
|
1261
|
-
}
|
|
1262
|
-
async checkSkill(id) {
|
|
1263
|
-
let source;
|
|
1264
|
-
try {
|
|
1265
|
-
source = await loadSkillSource(this.store, id);
|
|
1266
|
-
} catch (error) {
|
|
1267
|
-
throw new Error(`Unable to load skill ${id}: ${coerceErrorMessage(error, "unknown error")}`);
|
|
1268
|
-
}
|
|
1269
|
-
if (!source) throw new Error(`Not a skill card or skill markdown file: ${id}`);
|
|
1270
|
-
}
|
|
1271
|
-
resultAttachments(result) {
|
|
1272
|
-
return [...(result.files ?? []).flatMap((file) => file?.fileUrl && file.status === "saved" ? [{
|
|
1273
|
-
sourceUrl: file.fileUrl,
|
|
1274
|
-
name: file.fileUrl.split("/").pop()
|
|
1275
|
-
}] : []), ...uploadedImages(result.captures)];
|
|
1276
|
-
}
|
|
1277
|
-
async openCreatedWorkspace(session) {
|
|
1278
|
-
let url = session.createdWorkspaces.filter((created) => !session.goneWorkspaces.has(created)).at(-1);
|
|
1279
|
-
if (!url || session.saved.size > 0) return;
|
|
1280
|
-
try {
|
|
1281
|
-
await this.operatorModeStateService.openWorkspace(url);
|
|
1282
|
-
} catch (error) {
|
|
1283
|
-
log.warn(`Could not open new workspace ${url}`, error);
|
|
1284
|
-
}
|
|
1285
|
-
}
|
|
1286
|
-
async showCard(session, scriptResult) {
|
|
1287
|
-
let value;
|
|
1288
|
-
try {
|
|
1289
|
-
value = JSON.parse(scriptResult);
|
|
1290
|
-
} catch {
|
|
1291
|
-
return {};
|
|
1292
|
-
}
|
|
1293
|
-
if (!value || typeof value !== "object" || Array.isArray(value) || !("show" in value)) return {};
|
|
1294
|
-
let cardId;
|
|
1295
|
-
try {
|
|
1296
|
-
cardId = session.cardURL(value.show);
|
|
1297
|
-
if ((await this.cardService.getSource(rri(`${cardId}.json`))).status !== 200) {
|
|
1298
|
-
if ((await this.cardService.getSource(rri(cardId))).status !== 200) throw new Error(`Not found: ${cardId}`);
|
|
1299
|
-
await new ShowFileTool(this.toolContext).execute({ fileIdentifier: cardId });
|
|
1300
|
-
return { shownCard: cardId };
|
|
1301
|
-
}
|
|
1302
|
-
let card = await this.store.getWithoutCache(cardId);
|
|
1303
|
-
if (!isCardInstance(card)) throw new Error(`${cardId} is not a card instance: ${card.message}`);
|
|
1304
|
-
await new ShowCardTool(this.toolContext).execute({ cardId });
|
|
1305
|
-
} catch (error) {
|
|
1306
|
-
return { showError: `The card was not shown. ${error instanceof Error ? error.message : String(error)}` };
|
|
1307
|
-
}
|
|
1308
|
-
return { shownCard: cardId };
|
|
1309
|
-
}
|
|
1310
|
-
moduleURL(module) {
|
|
1311
|
-
let { virtualNetwork } = this.network;
|
|
1312
|
-
return virtualNetwork.isRegisteredPrefix(module) ? virtualNetwork.toURL(module).href : module;
|
|
1313
|
-
}
|
|
1314
|
-
async applyUiAction(action, realmURL) {
|
|
1315
|
-
let target;
|
|
1316
|
-
try {
|
|
1317
|
-
switch (action.action) {
|
|
1318
|
-
case "switchSubmode":
|
|
1319
|
-
target = action.submode;
|
|
1320
|
-
await new SwitchSubmodeTool(this.toolContext).execute({ submode: action.submode });
|
|
1321
|
-
break;
|
|
1322
|
-
case "openFile":
|
|
1323
|
-
target = action.url;
|
|
1324
|
-
await new SwitchSubmodeTool(this.toolContext).execute({
|
|
1325
|
-
submode: "code",
|
|
1326
|
-
codePath: action.url
|
|
1327
|
-
});
|
|
1328
|
-
break;
|
|
1329
|
-
case "previewFormat":
|
|
1330
|
-
target = `${action.cardId} (${action.format})`;
|
|
1331
|
-
await new PreviewFormatTool(this.toolContext).execute({
|
|
1332
|
-
cardId: action.cardId,
|
|
1333
|
-
format: action.format,
|
|
1334
|
-
modulePath: this.moduleURL(action.modulePath)
|
|
1335
|
-
});
|
|
1336
|
-
break;
|
|
1337
|
-
case "openWorkspace":
|
|
1338
|
-
target = realmURL;
|
|
1339
|
-
await new OpenWorkspaceTool(this.toolContext).execute({ realmIdentifier: realmURL });
|
|
1340
|
-
break;
|
|
1341
|
-
}
|
|
1342
|
-
return {
|
|
1343
|
-
action: action.action,
|
|
1344
|
-
target,
|
|
1345
|
-
status: "done"
|
|
1346
|
-
};
|
|
1347
|
-
} catch (error) {
|
|
1348
|
-
let detail = error instanceof Error ? error.message : String(error);
|
|
1349
|
-
log.debug(`realm.ui.${action.action} failed: ${detail}`);
|
|
1350
|
-
return {
|
|
1351
|
-
action: action.action,
|
|
1352
|
-
target,
|
|
1353
|
-
status: "failed",
|
|
1354
|
-
detail
|
|
1355
|
-
};
|
|
1356
|
-
}
|
|
1357
|
-
}
|
|
1358
|
-
async captureURL(url, options, doneBy, signal) {
|
|
1359
|
-
let services = {
|
|
1360
|
-
loaderService: this.loaderService,
|
|
1361
|
-
matrixService: this.matrixService,
|
|
1362
|
-
network: this.network,
|
|
1363
|
-
realm: this.realm,
|
|
1364
|
-
realmServer: this.realmServer
|
|
1365
|
-
};
|
|
1366
|
-
return await captureForAgent(await resolveViewTarget(url, services, { signal }), options, services, {
|
|
1367
|
-
deadline: captureDeadline(doneBy),
|
|
1368
|
-
signal
|
|
1369
|
-
});
|
|
1370
|
-
}
|
|
1371
|
-
async writeFile(roomId, url, content, expected, options) {
|
|
1372
|
-
if (options?.lint !== false && /\.(gts|ts)$/.test(url)) {
|
|
1373
|
-
let lint = await new LintAndFixTool(this.toolContext).execute({
|
|
1374
|
-
realm: this.realm.realmOf(rri(url)),
|
|
1375
|
-
fileContent: content,
|
|
1376
|
-
filename: new URL(url).pathname.split("/").pop() || "input.gts"
|
|
1377
|
-
});
|
|
1378
|
-
if (lint.lintErrors?.length) throw new Error(`Lint errors in ${url}: ${lint.lintErrors.join("; ")}`);
|
|
1379
|
-
content = lint.output;
|
|
1380
|
-
}
|
|
1381
|
-
let current = await this.readSource(url);
|
|
1382
|
-
if (expected === void 0) {
|
|
1383
|
-
if (current.status !== 404) throw new Error(`File appeared while the script ran: ${url}`);
|
|
1384
|
-
} else if (current.status !== 200 || current.binary || current.content !== expected) throw new Error(`File changed while the script ran: ${url}`);
|
|
1385
|
-
let clientRequestId = this.toolService.trackAiAssistantCardRequest({
|
|
1386
|
-
action: "run-realm-code",
|
|
1387
|
-
roomId,
|
|
1388
|
-
fileUrl: url
|
|
1389
|
-
});
|
|
1390
|
-
await this.cardService.saveSource(rri(url), content, "bot-patch", {
|
|
1391
|
-
resetLoader: /\.(gts|ts)$/.test(url),
|
|
1392
|
-
clientRequestId
|
|
1393
|
-
});
|
|
1394
|
-
return content;
|
|
1395
|
-
}
|
|
1396
|
-
async saveCards(roomId, realmURL, updates) {
|
|
1397
|
-
let changed = (await Promise.all(updates.map(async ({ url, expected }) => {
|
|
1398
|
-
let current = await this.readSource(url);
|
|
1399
|
-
return current.status !== 200 || current.binary || current.content !== expected ? url : void 0;
|
|
1400
|
-
}))).filter((url) => url !== void 0);
|
|
1401
|
-
if (changed.length > 0) throw new Error(`Cards changed while the script ran: ${changed.join(", ")}; no card update was saved`);
|
|
1402
|
-
let clientRequestId;
|
|
1403
|
-
for (let { url } of updates) clientRequestId = this.toolService.trackAiAssistantCardRequest({
|
|
1404
|
-
action: "run-realm-code",
|
|
1405
|
-
roomId,
|
|
1406
|
-
fileUrl: url,
|
|
1407
|
-
clientRequestId
|
|
1408
|
-
});
|
|
1409
|
-
let response = await this.cardService.executeAtomicOperations(updates.map(({ url, content }) => ({
|
|
1410
|
-
op: "update",
|
|
1411
|
-
href: url,
|
|
1412
|
-
data: {
|
|
1413
|
-
type: "source",
|
|
1414
|
-
attributes: { content },
|
|
1415
|
-
meta: {}
|
|
1416
|
-
}
|
|
1417
|
-
})), ri(realmURL), { clientRequestId });
|
|
1418
|
-
if (!Array.isArray(response?.["atomic:results"])) {
|
|
1419
|
-
let detail = response?.errors?.[0]?.detail;
|
|
1420
|
-
throw new Error(`The card updates were not saved: ${detail ?? "the realm refused the write"}`);
|
|
1421
|
-
}
|
|
1422
|
-
}
|
|
1423
|
-
async readSource(url) {
|
|
1424
|
-
let response = await this.network.authedFetch(url, { headers: { Accept: SupportedMimeType.CardSource } });
|
|
1425
|
-
let { status } = response;
|
|
1426
|
-
if (status !== 200) {
|
|
1427
|
-
await response.body?.cancel();
|
|
1428
|
-
return {
|
|
1429
|
-
status,
|
|
1430
|
-
content: "",
|
|
1431
|
-
binary: false
|
|
1432
|
-
};
|
|
1433
|
-
}
|
|
1434
|
-
if (Number(response.headers.get("content-length")) > MAX_READ_BYTES) {
|
|
1435
|
-
await response.body?.cancel();
|
|
1436
|
-
let contentType = response.headers.get("content-type");
|
|
1437
|
-
let binary = !!contentType && isBinaryContentType(contentType);
|
|
1438
|
-
return {
|
|
1439
|
-
status,
|
|
1440
|
-
content: "",
|
|
1441
|
-
binary,
|
|
1442
|
-
tooLarge: !binary
|
|
1443
|
-
};
|
|
1444
|
-
}
|
|
1445
|
-
let bytes = new Uint8Array(await response.arrayBuffer());
|
|
1446
|
-
try {
|
|
1447
|
-
return {
|
|
1448
|
-
status,
|
|
1449
|
-
content: UTF8.decode(bytes),
|
|
1450
|
-
binary: false
|
|
1451
|
-
};
|
|
1452
|
-
} catch {
|
|
1453
|
-
return {
|
|
1454
|
-
status,
|
|
1455
|
-
content: "",
|
|
1456
|
-
binary: true
|
|
1457
|
-
};
|
|
1458
|
-
}
|
|
1459
|
-
}
|
|
1460
|
-
async writeBinaryFile(roomId, url, bytes) {
|
|
1461
|
-
if ((await this.readSource(url)).status !== 404) throw new Error(`File appeared while the script ran: ${url}`);
|
|
1462
|
-
let clientRequestId = this.toolService.trackAiAssistantCardRequest({
|
|
1463
|
-
action: "run-realm-code",
|
|
1464
|
-
roomId,
|
|
1465
|
-
fileUrl: url
|
|
1466
|
-
});
|
|
1467
|
-
if (clientRequestId) this.cardService.clientRequestIds.add(clientRequestId);
|
|
1468
|
-
let response = await this.network.authedFetch(url, {
|
|
1469
|
-
method: "POST",
|
|
1470
|
-
headers: {
|
|
1471
|
-
"Content-Type": "application/octet-stream",
|
|
1472
|
-
...clientRequestId ? { "X-Boxel-Client-Request-Id": clientRequestId } : {}
|
|
1473
|
-
},
|
|
1474
|
-
body: new Blob([bytes])
|
|
1475
|
-
});
|
|
1476
|
-
if (!response.ok) {
|
|
1477
|
-
let text = "";
|
|
1478
|
-
try {
|
|
1479
|
-
text = (await response.text()).slice(0, 500);
|
|
1480
|
-
} catch {}
|
|
1481
|
-
let wafRule = response.headers.get("x-blocked-by-waf-rule");
|
|
1482
|
-
throw new Error([
|
|
1483
|
-
`Unable to save ${url}: ${response.status} ${response.statusText}`,
|
|
1484
|
-
wafRule ? `WAF rule: ${wafRule}` : null,
|
|
1485
|
-
text || null
|
|
1486
|
-
].filter(Boolean).join(" | "));
|
|
1487
|
-
}
|
|
1488
|
-
}
|
|
1489
|
-
async readCard(id) {
|
|
1490
|
-
let card = await this.store.getWithoutCache(id);
|
|
1491
|
-
if (!isCardInstance(card)) {
|
|
1492
|
-
if (card.awaitingIndex) throw new Error(`Card is not indexed yet: ${id}; read it again in a moment`);
|
|
1493
|
-
throw new Error(card.status === 404 ? `Card not found: ${id}` : `Unable to read card ${id}: ${card.message}`);
|
|
1494
|
-
}
|
|
1495
|
-
let { default: Base64ImageField } = await this.loaderService.loader.import("@cardstack/base/base64-image");
|
|
1496
|
-
return await this.cardService.serializeCard(card, {
|
|
1497
|
-
omitFields: [Base64ImageField],
|
|
1498
|
-
useAbsoluteURL: true,
|
|
1499
|
-
includeComputeds: true
|
|
1500
|
-
});
|
|
1501
|
-
}
|
|
1502
|
-
async deleteFile(url, expected) {
|
|
1503
|
-
if (!(expected === void 0 ? true : "sha256" in expected ? await this.readBinaryDigest(url) === expected.sha256 : await this.readSource(url).then((current) => current.status === 200 && !current.binary && current.content === expected.content))) throw new Error(`File changed while the script ran: ${url}`);
|
|
1504
|
-
await this.cardService.deleteSource(rri(url));
|
|
1505
|
-
}
|
|
1506
|
-
async readBinaryDigest(url) {
|
|
1507
|
-
let response = await this.network.authedFetch(url, { headers: { Accept: SupportedMimeType.CardSource } });
|
|
1508
|
-
if (response.status !== 200 || Number(response.headers.get("content-length")) > MAX_BINARY_FILE_SIZE) {
|
|
1509
|
-
await response.body?.cancel();
|
|
1510
|
-
return;
|
|
1511
|
-
}
|
|
1512
|
-
return await sha256(new Uint8Array(await response.arrayBuffer()));
|
|
1513
|
-
}
|
|
1514
|
-
async generateImage({ prompt, sourceImageUrl, llmModel, signal }) {
|
|
1515
|
-
return await generateImage({
|
|
1516
|
-
prompt,
|
|
1517
|
-
sourceImageDataUrl: sourceImageUrl ? await sourceImageDataUrl(sourceImageUrl, (url) => this.network.authedFetch(url, { signal })) : void 0,
|
|
1518
|
-
model: llmModel
|
|
1519
|
-
}, ({ url, requestBody }) => this.realmServer.requestForward({
|
|
1520
|
-
url,
|
|
1521
|
-
method: "POST",
|
|
1522
|
-
requestBody,
|
|
1523
|
-
signal
|
|
1524
|
-
}));
|
|
1525
|
-
}
|
|
1526
|
-
async downloadFile(sourceUrl, maxBytes, signal) {
|
|
1527
|
-
let response = await this.network.authedFetch(sourceUrl, {
|
|
1528
|
-
method: "GET",
|
|
1529
|
-
signal
|
|
1530
|
-
});
|
|
1531
|
-
if (!response.ok) {
|
|
1532
|
-
await response.body?.cancel().catch(() => void 0);
|
|
1533
|
-
throw new Error(`Unable to download ${sourceUrl}: ${response.status} ${response.statusText}`);
|
|
1534
|
-
}
|
|
1535
|
-
if (Number(response.headers.get("content-length")) > maxBytes) {
|
|
1536
|
-
await response.body?.cancel().catch(() => void 0);
|
|
1537
|
-
throw new DownloadTooLarge();
|
|
1538
|
-
}
|
|
1539
|
-
if (!response.body) {
|
|
1540
|
-
let bytes = new Uint8Array(await response.arrayBuffer());
|
|
1541
|
-
if (bytes.byteLength > maxBytes) throw new DownloadTooLarge();
|
|
1542
|
-
return bytes;
|
|
1543
|
-
}
|
|
1544
|
-
let reader = response.body.getReader();
|
|
1545
|
-
let chunks = [];
|
|
1546
|
-
let total = 0;
|
|
1547
|
-
for (;;) {
|
|
1548
|
-
let { done, value } = await reader.read();
|
|
1549
|
-
if (done || !value) break;
|
|
1550
|
-
total += value.byteLength;
|
|
1551
|
-
if (total > maxBytes) {
|
|
1552
|
-
await reader.cancel().catch(() => void 0);
|
|
1553
|
-
throw new DownloadTooLarge();
|
|
1554
|
-
}
|
|
1555
|
-
chunks.push(value);
|
|
1556
|
-
}
|
|
1557
|
-
let bytes = new Uint8Array(total);
|
|
1558
|
-
let offset = 0;
|
|
1559
|
-
for (let chunk of chunks) {
|
|
1560
|
-
bytes.set(chunk, offset);
|
|
1561
|
-
offset += chunk.byteLength;
|
|
1562
|
-
}
|
|
1563
|
-
return bytes;
|
|
1564
|
-
}
|
|
1565
|
-
async listDirectory(url) {
|
|
1566
|
-
let response = await this.network.authedFetch(url, { headers: { Accept: SupportedMimeType.DirectoryListing } });
|
|
1567
|
-
if (!response.ok) return {
|
|
1568
|
-
status: response.status,
|
|
1569
|
-
entries: []
|
|
1570
|
-
};
|
|
1571
|
-
let { data } = await response.json();
|
|
1572
|
-
return {
|
|
1573
|
-
status: 200,
|
|
1574
|
-
entries: Object.entries(data.relationships ?? {}).map(([name, info]) => ({
|
|
1575
|
-
name: name.replace(/\/$/, ""),
|
|
1576
|
-
kind: info.meta?.kind === "directory" ? "directory" : "file"
|
|
1577
|
-
}))
|
|
1578
|
-
};
|
|
1579
|
-
}
|
|
1580
|
-
realmOfInput(realmId) {
|
|
1581
|
-
let realm = this.realm.realmOf(realmId);
|
|
1582
|
-
if (realm) return realm;
|
|
1583
|
-
try {
|
|
1584
|
-
return this.realm.realmOf(this.network.virtualNetwork.toURL(realmId));
|
|
1585
|
-
} catch {
|
|
1586
|
-
return;
|
|
1587
|
-
}
|
|
1588
|
-
}
|
|
1589
|
-
realmRootURL(realm) {
|
|
1590
|
-
let { virtualNetwork } = this.network;
|
|
1591
|
-
return virtualNetwork.isRegisteredPrefix(realm) ? virtualNetwork.toURL(realm).href : new URL(realm).href;
|
|
1592
|
-
}
|
|
1593
|
-
assertKnownRealmIdentifiers(realms) {
|
|
1594
|
-
let { virtualNetwork } = this.network;
|
|
1595
|
-
let unknown = (realms ?? []).find((realm) => isPrefixForm(realm) && virtualNetwork.prefixKind(ensureTrailingSlash(realm)) !== "realm");
|
|
1596
|
-
if (unknown !== void 0) throw new Error(`Unknown realm identifier "${unknown}". Pass a realm URL, or one of: ${virtualNetwork.knownRealms().join(", ")}`);
|
|
1597
|
-
}
|
|
1598
|
-
};
|
|
1599
|
-
//#endregion
|
|
1600
|
-
export { imageExtension as a, generateImage as i, run_realm_code_exports as n, sourceImageDataUrl as o, runRealmCode as r, RunRealmCodeTool as t };
|