@cardstack/boxel-cli 0.13.0-unstable.4 → 0.13.0-unstable.6

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.
Files changed (1058) hide show
  1. package/bundled-realms/pretui/components/doc-report.gts +2 -2
  2. package/bundled-realms/pretui/components/doc-report.usage.gts +3 -3
  3. package/bundled-realms/pretui/components/form-field.md +1 -1
  4. package/bundled-realms/pretui/components/icon-button.md +1 -1
  5. package/bundled-realms/pretui/components/popup.md +1 -1
  6. package/bundled-realms/pretui/components/switch.gts +13 -0
  7. package/bundled-realms/pretui/components/switch.md +5 -3
  8. package/bundled-realms/pretui/components/theme-frame.gts +49 -22
  9. package/bundled-realms/pretui/components/tooltip.gts +141 -42
  10. package/bundled-realms/pretui/components/tooltip.md +10 -12
  11. package/bundled-realms/pretui/components/tooltip.usage.gts +3 -5
  12. package/bundled-realms/pretui/docs/structure.md +1 -1
  13. package/bundled-realms/pretui/internal/overlay.gts +4 -2
  14. package/bundled-realms/pretui/pretui-css.gts +6 -2
  15. package/bundled-realms/pretui/theme-scoped-css.gts +262 -0
  16. package/bundled-test-harness/assets/account-switch-failed-test-DwAZq6Sc.js +45 -0
  17. package/bundled-test-harness/assets/adapter-C_6pnsx1.js +2 -0
  18. package/bundled-test-harness/assets/add-field-to-card-definition-tool-test-zMYtJWBv.js +112 -0
  19. package/bundled-test-harness/assets/ai-assistant-create-workspace-test-CwhAV-Ow.js +130 -0
  20. package/bundled-test-harness/assets/ai-assistant-panel-relogin-test-DNgclkGJ.js +46 -0
  21. package/bundled-test-harness/assets/ai-assistant-test-DGYFiRTb.js +2223 -0
  22. package/bundled-test-harness/assets/ai-function-generation-test-Dj6WzKkh.js +1176 -0
  23. package/bundled-test-harness/assets/ai-module-creation-test-C4zhhxaZ.js +151 -0
  24. package/bundled-test-harness/assets/aibot-message-BShcljQ9.js +1312 -0
  25. package/bundled-test-harness/assets/app-DiEYqT6T.js +14146 -0
  26. package/bundled-test-harness/assets/apply-markdown-edit-test-CPhfeg1i.js +230 -0
  27. package/bundled-test-harness/assets/ask-user-picker-NVRkhKwt.js +370 -0
  28. package/bundled-test-harness/assets/ask-user-picker-test-SsZqFm9W.js +39 -0
  29. package/bundled-test-harness/assets/assistant-transcript-test-DesuBCIB.js +57 -0
  30. package/bundled-test-harness/assets/audio-metadata-extractor-test-8JM6oZXG.js +1176 -0
  31. package/bundled-test-harness/assets/authed-fetch-test-yPTMe-9V.js +73 -0
  32. package/bundled-test-harness/assets/avif-image-def-test-Kyknj908.js +187 -0
  33. package/bundled-test-harness/assets/basic-test-D9OrrMaq.js +139 -0
  34. package/bundled-test-harness/assets/binary-upload-dedupe-test-C0RFmHma.js +308 -0
  35. package/bundled-test-harness/assets/bot-registration-test-Bk2lTaCW.js +97 -0
  36. package/bundled-test-harness/assets/box-test-BbV9sMyU.js +50 -0
  37. package/bundled-test-harness/assets/brand-guide-attachments-test-z4wTsKbI.js +84 -0
  38. package/bundled-test-harness/assets/brand-guide-custom-css-test-BlSJE8xo.js +196 -0
  39. package/bundled-test-harness/assets/brand-guide-edit-test-DJ1OQ6IB.js +140 -0
  40. package/bundled-test-harness/assets/brand-logo-mark-field-test-ux7eetkO.js +86 -0
  41. package/bundled-test-harness/assets/broken-link-template-test-CqB3MWyw.js +192 -0
  42. package/bundled-test-harness/assets/bundled-base-modules-test-B2oNLZSJ.js +54 -0
  43. package/bundled-test-harness/assets/bundled-base-oracle-test-DelPfFjn.js +37 -0
  44. package/bundled-test-harness/assets/buried-stack-item-scroll-test-Ixsl1tS0.js +236 -0
  45. package/bundled-test-harness/assets/button-BvYQm_A1.js +141 -0
  46. package/bundled-test-harness/assets/bxl-cyclic-graph-test-p23WCLRW.js +47 -0
  47. package/bundled-test-harness/assets/bxl-expression-test-CVTQYT_C.js +250 -0
  48. package/bundled-test-harness/assets/bxl-indexing-test-D_A7X2sr.js +212 -0
  49. package/bundled-test-harness/assets/bxl-platform-module-test-Cltfyybp.js +71 -0
  50. package/bundled-test-harness/assets/can-invoke-test-CVfE1l1V.js +455 -0
  51. package/bundled-test-harness/assets/can-read-realm-test-CIz6WX_K.js +56 -0
  52. package/bundled-test-harness/assets/cancel-indexing-job-test-0LlrOgYK.js +69 -0
  53. package/bundled-test-harness/assets/capture-test-diHIWmh0.js +360 -0
  54. package/bundled-test-harness/assets/card-api-test-Ci9b0ghP.js +198 -0
  55. package/bundled-test-harness/assets/card-basics-test-RKQoQWZD.js +5364 -0
  56. package/bundled-test-harness/assets/card-chooser-paging-test-BN21sDpP.js +235 -0
  57. package/bundled-test-harness/assets/card-chooser-test-C9jDiIgM.js +393 -0
  58. package/bundled-test-harness/assets/card-context-search-results-KmkXJbmC.js +30 -0
  59. package/bundled-test-harness/assets/card-context-search-results-test-CpMr8OlX.js +184 -0
  60. package/bundled-test-harness/assets/card-def-field-def-relationships-test-D_30xak6.js +562 -0
  61. package/bundled-test-harness/assets/card-def-menu-items-test-ohuHc0b4.js +228 -0
  62. package/bundled-test-harness/assets/card-delete-test-BlsD9Xw4.js +466 -0
  63. package/bundled-test-harness/assets/card-error-3q1o3i0e.js +72 -0
  64. package/bundled-test-harness/assets/card-error-awaiting-index-test-DPgYKfbF.js +53 -0
  65. package/bundled-test-harness/assets/card-info-thumbnail-picker-test-CVfeJyjt.js +219 -0
  66. package/bundled-test-harness/assets/card-playground-test-D-7bi4PQ.js +1491 -0
  67. package/bundled-test-harness/assets/card-prerender-DemTfK_a.js +12939 -0
  68. package/bundled-test-harness/assets/card-thunk-error-test-DCBh1vRT.js +48 -0
  69. package/bundled-test-harness/assets/card-type-service-test-DXPrfVYk.js +161 -0
  70. package/bundled-test-harness/assets/check-correctness-test-DjE7r1X2.js +1093 -0
  71. package/bundled-test-harness/assets/check-domain-availability-test-U10xSKbY.js +98 -0
  72. package/bundled-test-harness/assets/chip-0r_r9SC8.js +44 -0
  73. package/bundled-test-harness/assets/choreo-CZUXQKjf.js +1110 -0
  74. package/bundled-test-harness/assets/choreo-D8RcLuoq.js +2 -0
  75. package/bundled-test-harness/assets/choreo-feature-reel-test-DRGloCAJ.js +155 -0
  76. package/bundled-test-harness/assets/choreo-gallery-build-order-test-BR-r7gaw.js +436 -0
  77. package/bundled-test-harness/assets/choreo-gallery-compositor-test-CWRLfcNT.js +399 -0
  78. package/bundled-test-harness/assets/choreo-gallery-cover-test-BT05gNKC.js +214 -0
  79. package/bundled-test-harness/assets/choreo-gallery-crossing-stage-test-WJ7FmjYi.js +133 -0
  80. package/bundled-test-harness/assets/choreo-gallery-demos-alive-test-C-yxdVT_.js +42 -0
  81. package/bundled-test-harness/assets/choreo-gallery-drift-test-HX1mK3od.js +620 -0
  82. package/bundled-test-harness/assets/choreo-gallery-escort-test-jZEVk_V4.js +187 -0
  83. package/bundled-test-harness/assets/choreo-gallery-films-test-DLDQzsxb.js +140 -0
  84. package/bundled-test-harness/assets/choreo-gallery-filter-test-BJv8KEeP.js +46 -0
  85. package/bundled-test-harness/assets/choreo-gallery-fold-test-BssKC8A8.js +180 -0
  86. package/bundled-test-harness/assets/choreo-gallery-guide-pages-test-DS41eNNV.js +114 -0
  87. package/bundled-test-harness/assets/choreo-gallery-guides-test-DTj7yEKp.js +321 -0
  88. package/bundled-test-harness/assets/choreo-gallery-hang-test-BqJLmeFF.js +426 -0
  89. package/bundled-test-harness/assets/choreo-gallery-highlight-test-B1Q7-ICm.js +60 -0
  90. package/bundled-test-harness/assets/choreo-gallery-inline-edit-test-7My9lVam.js +370 -0
  91. package/bundled-test-harness/assets/choreo-gallery-interruption-test-BlIAaGrw.js +176 -0
  92. package/bundled-test-harness/assets/choreo-gallery-lone-stack-test-C9NnYIP8.js +104 -0
  93. package/bundled-test-harness/assets/choreo-gallery-navigation-test-CWzXkvbW.js +193 -0
  94. package/bundled-test-harness/assets/choreo-gallery-playhead-transport-test-CwdiZWeI.js +111 -0
  95. package/bundled-test-harness/assets/choreo-gallery-poplayout-subtree-test-D55fxwTn.js +127 -0
  96. package/bundled-test-harness/assets/choreo-gallery-presence-modes-test-D8Wxv0lb.js +100 -0
  97. package/bundled-test-harness/assets/choreo-gallery-presentation-test-BLoWfp6G.js +157 -0
  98. package/bundled-test-harness/assets/choreo-gallery-reduced-motion-test-D5XxTBDS.js +145 -0
  99. package/bundled-test-harness/assets/choreo-gallery-sheet-standalone-test-DrHTTvss.js +89 -0
  100. package/bundled-test-harness/assets/choreo-gallery-sheet-test-BFVdnM_b.js +48 -0
  101. package/bundled-test-harness/assets/choreo-gallery-site-test-BhEBHdvI.js +237 -0
  102. package/bundled-test-harness/assets/choreo-gallery-stage-DcKKsdcu.js +256 -0
  103. package/bundled-test-harness/assets/choreo-gallery-stage-keyboard-test-Fcc6SC3F.js +102 -0
  104. package/bundled-test-harness/assets/choreo-gallery-stages-test-Cb-ADpxK.js +35 -0
  105. package/bundled-test-harness/assets/choreo-gallery-subdivision-test-DMJ6C9FW.js +138 -0
  106. package/bundled-test-harness/assets/choreo-gallery-table-plan-test-CAjSUdLJ.js +144 -0
  107. package/bundled-test-harness/assets/choreo-gallery-theater-test-B-3IZMj9.js +252 -0
  108. package/bundled-test-harness/assets/choreo-gallery-tuning-test-BVxK5Ry_.js +95 -0
  109. package/bundled-test-harness/assets/choreo-gallery-widget-room-test-uWBH1EKE.js +88 -0
  110. package/bundled-test-harness/assets/choreo-gallery-wires-test-Bo4Sd1Vn.js +148 -0
  111. package/bundled-test-harness/assets/client-telemetry-test-DFM4mML2.js +340 -0
  112. package/bundled-test-harness/assets/clip-DY6N6K67.js +92 -0
  113. package/bundled-test-harness/assets/clip-DzXoPdp-.js +2 -0
  114. package/bundled-test-harness/assets/code-block-DRE8KQZQ.js +502 -0
  115. package/bundled-test-harness/assets/code-ref-test-CDcqE8_C.js +163 -0
  116. package/bundled-test-harness/assets/code-submode-availability-test-DPTqZYYm.js +198 -0
  117. package/bundled-test-harness/assets/code-submode-test-AHV4mzJ4.js +1839 -0
  118. package/bundled-test-harness/assets/codeblocks-test-D6ijVvEL.js +418 -0
  119. package/bundled-test-harness/assets/codemirror-editor-test-BeAMVivu.js +1512 -0
  120. package/bundled-test-harness/assets/codemirror-embed-toolbar-test-Bnb7_KUT.js +366 -0
  121. package/bundled-test-harness/assets/color-field-test-CR6gGEqE.js +212 -0
  122. package/bundled-test-harness/assets/compaction-test-CjEsY0uG.js +150 -0
  123. package/bundled-test-harness/assets/computed-test-DtyZGgdc.js +1320 -0
  124. package/bundled-test-harness/assets/container-BYGZImLU.css +5101 -0
  125. package/bundled-test-harness/assets/container-CBZZ8uFw.js +10925 -0
  126. package/bundled-test-harness/assets/content-preview-components-test-BztI4fz-.js +462 -0
  127. package/bundled-test-harness/assets/copy-and-edit-test-Cqw7kcur.js +292 -0
  128. package/bundled-test-harness/assets/copy-card-test-D5m3eVEH.js +218 -0
  129. package/bundled-test-harness/assets/copy-file-to-realm-test-FPY-6Ddm.js +148 -0
  130. package/bundled-test-harness/assets/copy-source-test-9pJD-qey.js +56 -0
  131. package/bundled-test-harness/assets/create-file-test-DjMf88u_.js +1086 -0
  132. package/bundled-test-harness/assets/create-file-test-XbgOqg38.js +464 -0
  133. package/bundled-test-harness/assets/create-listing-modal-test-De7b4vu3.js +273 -0
  134. package/bundled-test-harness/assets/create-listing-pr-request-test-CBtIV0Z8.js +117 -0
  135. package/bundled-test-harness/assets/create-spec-test-4xR0gM7E.js +256 -0
  136. package/bundled-test-harness/assets/create-submission-workflow-test-DQpWrpGT.js +132 -0
  137. package/bundled-test-harness/assets/create-workspace-test-BQAudgpS.js +104 -0
  138. package/bundled-test-harness/assets/credential-fields-test-DXKBdbZD.js +200 -0
  139. package/bundled-test-harness/assets/csv-file-def-test-Cnp4y834.js +102 -0
  140. package/bundled-test-harness/assets/dashboard-CmuOhIYC.js +3628 -0
  141. package/bundled-test-harness/assets/dashboard-CzN49x74.css +2400 -0
  142. package/bundled-test-harness/assets/dashboard-add-workspace-test-T32hWB-g.js +50 -0
  143. package/bundled-test-harness/assets/dashboard-agents-test-BN5maCgQ.js +334 -0
  144. package/bundled-test-harness/assets/dashboard-archive-test-BzwUte_Z.js +128 -0
  145. package/bundled-test-harness/assets/dashboard-delete-test-D2Gcp81V.js +163 -0
  146. package/bundled-test-harness/assets/dashboard-duplicate-offer-test-BgKNIr35.js +71 -0
  147. package/bundled-test-harness/assets/dashboard-duplicate-test-D7JEWylc.js +222 -0
  148. package/bundled-test-harness/assets/dashboard-get-started-test-DOGPzGoA.js +374 -0
  149. package/bundled-test-harness/assets/dashboard-ir2bakJS.js +142 -0
  150. package/bundled-test-harness/assets/dashboard-pinned-cards-test-Bn_P9xJU.js +220 -0
  151. package/bundled-test-harness/assets/dashboard-publish-test-64sGQ0nG.js +70 -0
  152. package/bundled-test-harness/assets/dashboard-reindex-test-DJjYq1ct.js +115 -0
  153. package/bundled-test-harness/assets/dashboard-section-rail-test-ZkAhWu5V.js +169 -0
  154. package/bundled-test-harness/assets/dashboard-state-test-BbkpPB5L.js +162 -0
  155. package/bundled-test-harness/assets/dashboard-test-CBLdPrSt.js +545 -0
  156. package/bundled-test-harness/assets/dashboard-unreachable-notice-test-DFT3R1Zx.js +62 -0
  157. package/bundled-test-harness/assets/dashboard-workspace-test-DqBdCFo2.js +537 -0
  158. package/bundled-test-harness/assets/dashboard-workspaces-section-test-CH1HDfxR.js +410 -0
  159. package/bundled-test-harness/assets/data-file-def-preview-test-CNsZwQEJ.js +155 -0
  160. package/bundled-test-harness/assets/date-time-fields-test-CEFaZTnF.js +359 -0
  161. package/bundled-test-harness/assets/debug-message-test-Ck3BfFv3.js +117 -0
  162. package/bundled-test-harness/assets/declared-captures-test-C-0yPRU7.js +879 -0
  163. package/bundled-test-harness/assets/delete-workspace-test-CZOwGy78.js +102 -0
  164. package/bundled-test-harness/assets/diffing-test-BEKI905O.js +210 -0
  165. package/bundled-test-harness/assets/download-file-to-realm-test-C1kAGDll.js +119 -0
  166. package/bundled-test-harness/assets/editor-test-C9x5ZY6g.js +688 -0
  167. package/bundled-test-harness/assets/edits-D76-aanh.js +651 -0
  168. package/bundled-test-harness/assets/email-field-test-LGkrB_2B.js +75 -0
  169. package/bundled-test-harness/assets/enum-field-test-CPyV1J-m.js +935 -0
  170. package/bundled-test-harness/assets/error-display-test-bWuUtfIG.js +343 -0
  171. package/bundled-test-harness/assets/evaluate-module-test-CbS5h8t3.js +91 -0
  172. package/bundled-test-harness/assets/execute-atomic-operations-test-B4Kfco0k.js +113 -0
  173. package/bundled-test-harness/assets/externals-k-2ZBepK.js +4393 -0
  174. package/bundled-test-harness/assets/fallback-banner-live-delete-test-CuFiH1D8.js +207 -0
  175. package/bundled-test-harness/assets/fallback-banner-test-CqSRN7D8.js +225 -0
  176. package/bundled-test-harness/assets/fallback-banner-test-DQkrFE4-.js +53 -0
  177. package/bundled-test-harness/assets/fallback-models-test-BWekNxC0.js +161 -0
  178. package/bundled-test-harness/assets/fetch-card-json-test-DULUqUEu.js +61 -0
  179. package/bundled-test-harness/assets/field-configuration-test-BXZq28xa.js +551 -0
  180. package/bundled-test-harness/assets/field-markdown-domain-test-DdXCifs6.js +616 -0
  181. package/bundled-test-harness/assets/field-markdown-oversize-test-DouPPTHX.js +88 -0
  182. package/bundled-test-harness/assets/field-markdown-primitives-test-DSRGJeyl.js +365 -0
  183. package/bundled-test-harness/assets/field-markdown-specialized-test-DlTYLl_s.js +534 -0
  184. package/bundled-test-harness/assets/field-playground-test-NhS4VvoN.js +894 -0
  185. package/bundled-test-harness/assets/field-support-predicates-test-DWpyT1Qf.js +167 -0
  186. package/bundled-test-harness/assets/file-attachment-test-LwZf-BSY.js +796 -0
  187. package/bundled-test-harness/assets/file-chooser-panel-test-DuAqD9bn.js +153 -0
  188. package/bundled-test-harness/assets/file-chooser-test-CjaXXwpT.js +504 -0
  189. package/bundled-test-harness/assets/file-def-format-templates-test-BDs4OmHq.js +380 -0
  190. package/bundled-test-harness/assets/file-def-live-reload-test-BqTdnq-W.js +124 -0
  191. package/bundled-test-harness/assets/file-def-menu-items-test-DqdINXsD.js +138 -0
  192. package/bundled-test-harness/assets/file-def-navigation-test-BPGr0SQy.js +109 -0
  193. package/bundled-test-harness/assets/file-def-serialization-test-CvjW-FlC.js +89 -0
  194. package/bundled-test-harness/assets/file-def-test-C-Yv_NjS.js +216 -0
  195. package/bundled-test-harness/assets/file-preview-live-reload-test-MzwGwasU.js +310 -0
  196. package/bundled-test-harness/assets/file-resource-primitives-test-D3GmfqNs.js +255 -0
  197. package/bundled-test-harness/assets/file-tree-from-index-test-CfldnUgm.js +96 -0
  198. package/bundled-test-harness/assets/file-tree-test--0ZCPRe9.js +851 -0
  199. package/bundled-test-harness/assets/file-view-model-test-BDIAeBV8.js +346 -0
  200. package/bundled-test-harness/assets/filedef-export-shape-test-B2tgU404.js +61 -0
  201. package/bundled-test-harness/assets/film-Bf73ypzi.js +4074 -0
  202. package/bundled-test-harness/assets/film-C54lhaiU.js +2 -0
  203. package/bundled-test-harness/assets/film-DPcMEHYu.js +13 -0
  204. package/bundled-test-harness/assets/flac-audio-def-test-ByoXMoQ1.js +143 -0
  205. package/bundled-test-harness/assets/font-metadata-extractor-test-hawLTDTG.js +415 -0
  206. package/bundled-test-harness/assets/formatted-aibot-message-test-BahBj3x8.js +109 -0
  207. package/bundled-test-harness/assets/formatted-user-message-test-CodbrU3t.js +43 -0
  208. package/bundled-test-harness/assets/freestyle-test-faQhSciz.js +17 -0
  209. package/bundled-test-harness/assets/full-reindex-realm-test-CE5RJTIC.js +101 -0
  210. package/bundled-test-harness/assets/garbage-collection-test-v-3sev77.js +403 -0
  211. package/bundled-test-harness/assets/general-test-DKZPBtSb.js +923 -0
  212. package/bundled-test-harness/assets/generate-example-cards-one-shot-test-CucWyrkH.js +65 -0
  213. package/bundled-test-harness/assets/generic-file-def-preview-test-_EDRsebi.js +71 -0
  214. package/bundled-test-harness/assets/get-available-realm-identifiers-test-CV023yek.js +47 -0
  215. package/bundled-test-harness/assets/get-catalog-realm-identifiers-test--DOu3DyV.js +47 -0
  216. package/bundled-test-harness/assets/get-default-writable-realm-test-Bic8jl6R.js +54 -0
  217. package/bundled-test-harness/assets/get-published-realms-test-DrA5YcFN.js +71 -0
  218. package/bundled-test-harness/assets/get-realm-of-resource-identifier-test-jfU6SIWn.js +54 -0
  219. package/bundled-test-harness/assets/get-relationship-membership-state-test-Ccy2Z7MN.js +1308 -0
  220. package/bundled-test-harness/assets/get-user-system-card-test-Bmq2lmWv.js +67 -0
  221. package/bundled-test-harness/assets/gif-image-def-test-N1mMQC-X.js +188 -0
  222. package/bundled-test-harness/assets/glimmer-motion-and-choreo-in-cards-test-BkUDjiTs.js +160 -0
  223. package/bundled-test-harness/assets/glimmer-motion-and-choreo-test-DsFWCzTs.js +74 -0
  224. package/bundled-test-harness/assets/gts-file-def-test-BL1jpQ9J.js +100 -0
  225. package/bundled-test-harness/assets/head-format-preview-test-BVCaPQqc.js +158 -0
  226. package/bundled-test-harness/assets/helpers-Ds68JxHe.js +5 -0
  227. package/bundled-test-harness/assets/host-mode-service-B4bisRdR.js +262 -0
  228. package/bundled-test-harness/assets/host-mode-test-BmkN2PCJ.js +831 -0
  229. package/bundled-test-harness/assets/host-submode-test-C6SxQ796.js +1392 -0
  230. package/bundled-test-harness/assets/html-component-test-CNQ9wF0Q.js +65 -0
  231. package/bundled-test-harness/assets/html-def-test-BcaCVVQq.js +160 -0
  232. package/bundled-test-harness/assets/html-meta-extractor-test-BU1hjkTp.js +60 -0
  233. package/bundled-test-harness/assets/hydratable-card-test-CX6MWiti.js +426 -0
  234. package/bundled-test-harness/assets/icon-button-C1zH38Nc.js +67 -0
  235. package/bundled-test-harness/assets/image-metadata-extractor-test-CakSBPZ_.js +1109 -0
  236. package/bundled-test-harness/assets/index-changes-test-D8RtgfyG.js +367 -0
  237. package/bundled-test-harness/assets/index-query-engine-test-BETfoYOK.js +2593 -0
  238. package/bundled-test-harness/assets/index-writer-test-B_bR2fjw.js +3040 -0
  239. package/bundled-test-harness/assets/inspector-test-BwPXJj1S.js +2058 -0
  240. package/bundled-test-harness/assets/instance-filter-matcher-test-BSVCg59b.js +788 -0
  241. package/bundled-test-harness/assets/instantiate-card-test-BVQhZjpq.js +164 -0
  242. package/bundled-test-harness/assets/interact-submode-creation-and-permissions-test-DzQLG41H.js +475 -0
  243. package/bundled-test-harness/assets/interact-submode-setup-C5bKXq73.js +566 -0
  244. package/bundled-test-harness/assets/invalidate-realm-identifiers-test-Cd3dpjhB.js +99 -0
  245. package/bundled-test-harness/assets/invite-user-to-room-test-Brabz1tt.js +142 -0
  246. package/bundled-test-harness/assets/invoke-card-operation-test-C1Q1FUf4.js +333 -0
  247. package/bundled-test-harness/assets/isolated-render-test-BLJfS7BU.js +51 -0
  248. package/bundled-test-harness/assets/job-scoped-doc-cache-test-Bgv5woaB.js +181 -0
  249. package/bundled-test-harness/assets/job-scoped-instance-residency-test-C_bB6KpR.js +103 -0
  250. package/bundled-test-harness/assets/jpg-image-def-test-gdLIKocD.js +697 -0
  251. package/bundled-test-harness/assets/json-file-def-test-CPYMRBY-.js +95 -0
  252. package/bundled-test-harness/assets/key-notices-badge-test-DemslfLw.js +155 -0
  253. package/bundled-test-harness/assets/key-readiness-test-5tq5JycL.js +190 -0
  254. package/bundled-test-harness/assets/linksto-broken-link-placeholder-test-BbhDZ2PH.js +398 -0
  255. package/bundled-test-harness/assets/linksto-error-sentinel-test-C2t7fFPi.js +238 -0
  256. package/bundled-test-harness/assets/linksto-many-broken-link-placeholder-test--U_UvUty.js +354 -0
  257. package/bundled-test-harness/assets/linksto-many-per-slot-access-test-Dj3Xy0ZF.js +303 -0
  258. package/bundled-test-harness/assets/linksto-sentinel-reload-test-D0dK4Jjs.js +197 -0
  259. package/bundled-test-harness/assets/linksto-sentinel-roundtrip-test---IYiXok.js +260 -0
  260. package/bundled-test-harness/assets/linksto-singular-js-access-contract-test-CT04MhES.js +196 -0
  261. package/bundled-test-harness/assets/lint-and-fix-test-aadgx7rX.js +51 -0
  262. package/bundled-test-harness/assets/live-test-BGij_vuc.js +100 -0
  263. package/bundled-test-harness/assets/live-test-CppvValf.js +2 -0
  264. package/bundled-test-harness/assets/load-default-skills-test-Cp2m_ebp.js +74 -0
  265. package/bundled-test-harness/assets/loader-parallel-prefetch-test-vU_26Jqu.js +257 -0
  266. package/bundled-test-harness/assets/loader-test-CTaw8K_B.js +482 -0
  267. package/bundled-test-harness/assets/loading-test-DGGt4qZZ.js +63 -0
  268. package/bundled-test-harness/assets/m4a-audio-def-test-DAiReOXH.js +190 -0
  269. package/bundled-test-harness/assets/main-bXHwJ0CN.js +5 -0
  270. package/bundled-test-harness/assets/markdown-embed-chooser-modal-test-CIXq9FqR.js +470 -0
  271. package/bundled-test-harness/assets/markdown-embed-chooser-test-zFGh9WfP.js +334 -0
  272. package/bundled-test-harness/assets/markdown-embed-preview-pane-test-Byn_WFwY.js +447 -0
  273. package/bundled-test-harness/assets/markdown-embed-preview-test-Y3iFMttg.js +368 -0
  274. package/bundled-test-harness/assets/markdown-fallback-test-Br1TPkLZ.js +316 -0
  275. package/bundled-test-harness/assets/markdown-file-def-test-Crm2MAnq.js +380 -0
  276. package/bundled-test-harness/assets/markdown-helpers-test-CZ9Vvywc.js +188 -0
  277. package/bundled-test-harness/assets/markdown-highlighting-test-CFMkoVDl.js +244 -0
  278. package/bundled-test-harness/assets/markdown-preview-lOh-MyqF.js +72 -0
  279. package/bundled-test-harness/assets/markdown-preview-test-B8w0fFIy.js +238 -0
  280. package/bundled-test-harness/assets/markdown-skill-frontmatter-test-aH6HQly1.js +146 -0
  281. package/bundled-test-harness/assets/markdown-skill-search-test-CiNLQs-5.js +80 -0
  282. package/bundled-test-harness/assets/matrix-service-account-switch-sessions-test-DaA8w1Jj.js +63 -0
  283. package/bundled-test-harness/assets/matrix-service-boot-assembly-test-21GIlf55.js +300 -0
  284. package/bundled-test-harness/assets/matrix-service-personal-realm-test-jn9DUENm.js +125 -0
  285. package/bundled-test-harness/assets/matrix-service-realm-servers-test-eNZVJakl.js +55 -0
  286. package/bundled-test-harness/assets/matrix-service-realms-list-updated-test-Cabm8_dY.js +132 -0
  287. package/bundled-test-harness/assets/matrix-service-relogin-test-C77EFgjc.js +59 -0
  288. package/bundled-test-harness/assets/matrix-service-sliding-sync-test-BgM0fPiO.js +35 -0
  289. package/bundled-test-harness/assets/menu-Cl50TSFe.js +3561 -0
  290. package/bundled-test-harness/assets/message-service-subscription-test-CfEqH2jP.js +110 -0
  291. package/bundled-test-harness/assets/message-service-test-DsTzH1In.js +144 -0
  292. package/bundled-test-harness/assets/message-tool-test-C5xVfTtj.js +33 -0
  293. package/bundled-test-harness/assets/midi-audio-def-test-goLRCNCZ.js +182 -0
  294. package/bundled-test-harness/assets/migrate-skill-test-yPCbVfxG.js +161 -0
  295. package/bundled-test-harness/assets/mini-YXjrY_tH.js +1404 -0
  296. package/bundled-test-harness/assets/mini-card-chooser-test-DrllikHB.js +272 -0
  297. package/bundled-test-harness/assets/mini-file-chooser-test-BfqayhmI.js +201 -0
  298. package/bundled-test-harness/assets/mock-matrix-C7BrPS6S.js +2 -0
  299. package/bundled-test-harness/assets/mock-matrix-FjsXmU7-.js +15107 -0
  300. package/bundled-test-harness/assets/modal-BgaZavcs.js +322 -0
  301. package/bundled-test-harness/assets/model-cost-tier-test-BGg-sJML.js +174 -0
  302. package/bundled-test-harness/assets/model-file-extract-test-CjEBupY5.js +206 -0
  303. package/bundled-test-harness/assets/module-transpile-cache-test-XW6DDsmz.js +67 -0
  304. package/bundled-test-harness/assets/monaco-test-DkoRuFiQ.js +100 -0
  305. package/bundled-test-harness/assets/mp3-audio-def-test-v369NNsQ.js +133 -0
  306. package/bundled-test-harness/assets/multiple-stacks-test-CJpYPWdM.js +208 -0
  307. package/bundled-test-harness/assets/nested-query-field-render-test-CfDrBcUN.js +249 -0
  308. package/bundled-test-harness/assets/no-stacks-test-MmsJeLpz.js +48 -0
  309. package/bundled-test-harness/assets/number-field-test-A7B2r0M5.js +184 -0
  310. package/bundled-test-harness/assets/office-file-def-test-BNRvFmCB.js +263 -0
  311. package/bundled-test-harness/assets/office-metadata-extractor-test-zlDoEIEp.js +218 -0
  312. package/bundled-test-harness/assets/office-poster-capture-test-DdFEaOxR.js +203 -0
  313. package/bundled-test-harness/assets/ogg-audio-def-test-kk91BzQY.js +196 -0
  314. package/bundled-test-harness/assets/open-create-listing-modal-test-D1Dl1pov.js +131 -0
  315. package/bundled-test-harness/assets/open-image-in-new-tab-test-DyCmdMyO.js +52 -0
  316. package/bundled-test-harness/assets/open-secure-window-test-dz1vPudF.js +253 -0
  317. package/bundled-test-harness/assets/open-workspace-test-BvTcskzP.js +46 -0
  318. package/bundled-test-harness/assets/operation-lowering-test-omU66bkJ.js +2957 -0
  319. package/bundled-test-harness/assets/operations-invocation-test-BMj42rQe.js +523 -0
  320. package/bundled-test-harness/assets/operations-optimistic-test-KJLyzT8v.js +203 -0
  321. package/bundled-test-harness/assets/operations-query-test-J3HcnaoK.js +459 -0
  322. package/bundled-test-harness/assets/operations-store-reconciliation-test-CkbGBMBQ.js +406 -0
  323. package/bundled-test-harness/assets/operations-test-C7zXXpRW.js +2518 -0
  324. package/bundled-test-harness/assets/operator-mode-acceptance-test-BPolI_RD.js +1195 -0
  325. package/bundled-test-harness/assets/operator-mode-card-chooser-test-DjTQgizt.js +1036 -0
  326. package/bundled-test-harness/assets/operator-mode-links-test-DSEqy5Db.js +797 -0
  327. package/bundled-test-harness/assets/operator-mode-test-CB7BNDNE.js +696 -0
  328. package/bundled-test-harness/assets/operator-mode-ui-test-C1OhF1il.js +1045 -0
  329. package/bundled-test-harness/assets/overlay-D2rQi8lJ.js +427 -0
  330. package/bundled-test-harness/assets/overlay-menu-items-test-CPN31yBJ.js +331 -0
  331. package/bundled-test-harness/assets/overlays-B-qMEPhY.js +2 -0
  332. package/bundled-test-harness/assets/overlays-DSf2je0c.js +75 -0
  333. package/bundled-test-harness/assets/overlays-detached-element-test-C73nMXes.js +56 -0
  334. package/bundled-test-harness/assets/panel-DjrC7DxA.js +15124 -0
  335. package/bundled-test-harness/assets/past-sessions-test-BSIS2Hlq.js +321 -0
  336. package/bundled-test-harness/assets/patch-fields-test-Bp2IE0Jw.js +1014 -0
  337. package/bundled-test-harness/assets/patch-instance-test-DssuRGKP.js +348 -0
  338. package/bundled-test-harness/assets/pdf-file-def-test-Barj9ffD.js +111 -0
  339. package/bundled-test-harness/assets/pdf-metadata-extractor-test-B7KnXcIm.js +130 -0
  340. package/bundled-test-harness/assets/permission-checking-realm-test-BD4O0nen.js +306 -0
  341. package/bundled-test-harness/assets/persist-module-inspector-view-test-BIdbkdPr.js +60 -0
  342. package/bundled-test-harness/assets/persist-scroll-position-test-Bhb7wJiy.js +254 -0
  343. package/bundled-test-harness/assets/phone-number-field-test-C2yuCrXY.js +73 -0
  344. package/bundled-test-harness/assets/pill-menu-test-BIp91YXi.js +60 -0
  345. package/bundled-test-harness/assets/plate-CJq1veVA.js +41 -0
  346. package/bundled-test-harness/assets/plate-CwAvOUfL.js +2 -0
  347. package/bundled-test-harness/assets/player-Digk7omr.js +2 -0
  348. package/bundled-test-harness/assets/player-vsjosoN_.js +82 -0
  349. package/bundled-test-harness/assets/playground-B02e8uqB.js +58 -0
  350. package/bundled-test-harness/assets/plural-field-components-test-C1acuN-A.js +198 -0
  351. package/bundled-test-harness/assets/png-image-def-test-B9QeVo1f.js +266 -0
  352. package/bundled-test-harness/assets/policy-audit-confirmation-test-CeVquvc_.js +155 -0
  353. package/bundled-test-harness/assets/policy-scoped-search-test-SFPiIqR3.js +339 -0
  354. package/bundled-test-harness/assets/prerender-file-extract-test-HSJKAHyO.js +346 -0
  355. package/bundled-test-harness/assets/prerender-html-test-BTAcFCme.js +670 -0
  356. package/bundled-test-harness/assets/prerender-meta-test-Csyz2b21.js +614 -0
  357. package/bundled-test-harness/assets/prerender-module-test-DpTYAbmI.js +409 -0
  358. package/bundled-test-harness/assets/prerender-persistence-block-test-BhIt-7kK.js +124 -0
  359. package/bundled-test-harness/assets/prerender-pre-model-error-test-DxKPQKqx.js +61 -0
  360. package/bundled-test-harness/assets/prerender-serialize-cycle-test-C8V5YWQO.js +134 -0
  361. package/bundled-test-harness/assets/prerendered-html-read-test-Cq7JVGwg.js +191 -0
  362. package/bundled-test-harness/assets/pretui-components-test-Ducr9fLT.css +743 -0
  363. package/bundled-test-harness/assets/pretui-components-test-Hs0uyIUQ.js +992 -0
  364. package/bundled-test-harness/assets/pretui-primitives-CRs8NRm0.js +69 -0
  365. package/bundled-test-harness/assets/preview-format-test-cCqLrfdY.js +103 -0
  366. package/bundled-test-harness/assets/preview-test-BMqJSoR1.js +474 -0
  367. package/bundled-test-harness/assets/process-card-test-578tfDvr.js +94 -0
  368. package/bundled-test-harness/assets/profile-settings-modal-CVnNl7Yu.js +990 -0
  369. package/bundled-test-harness/assets/publish-realm-COoeWexp.js +82 -0
  370. package/bundled-test-harness/assets/publish-realm-test-a5nkx0Ov.js +210 -0
  371. package/bundled-test-harness/assets/query-field-barrier-test-qX3xVPfk.js +113 -0
  372. package/bundled-test-harness/assets/query-field-error-sentinel-test-V6JDPFLX.js +201 -0
  373. package/bundled-test-harness/assets/query-field-membership-status-test-CK7eDf-K.js +323 -0
  374. package/bundled-test-harness/assets/query-field-page-optin-test-B5YBHUvU.js +126 -0
  375. package/bundled-test-harness/assets/query-field-schema-test-D4SjOGlK.js +231 -0
  376. package/bundled-test-harness/assets/query-field-search-throttle-test-BVkm1-D8.js +154 -0
  377. package/bundled-test-harness/assets/query-field-stale-prerender-test-9g7hcD91.js +152 -0
  378. package/bundled-test-harness/assets/query-fields-test-CQYqhzpN.js +535 -0
  379. package/bundled-test-harness/assets/quick-look-test-CE0o6lJ4.js +139 -0
  380. package/bundled-test-harness/assets/read-card-for-ai-assistant-test-D0mJorwH.js +91 -0
  381. package/bundled-test-harness/assets/read-file-for-ai-assistant-test-B_F_2GEB.js +45 -0
  382. package/bundled-test-harness/assets/read-source-test-BgJV4B4F.js +67 -0
  383. package/bundled-test-harness/assets/read-text-file-test-DaeLzg4u.js +124 -0
  384. package/bundled-test-harness/assets/realm-C_a9su1j.js +2858 -0
  385. package/bundled-test-harness/assets/realm-api-keys-D5USFOoS.js +2 -0
  386. package/bundled-test-harness/assets/realm-api-keys-m_VOcixC.js +578 -0
  387. package/bundled-test-harness/assets/realm-api-keys-test-BVs7f5Dz.js +109 -0
  388. package/bundled-test-harness/assets/realm-api-keys-test-C_uZnTmq.js +588 -0
  389. package/bundled-test-harness/assets/realm-config-m5eccPW8.js +833 -0
  390. package/bundled-test-harness/assets/realm-config-policy-standing-test-Ber-IXpc.js +290 -0
  391. package/bundled-test-harness/assets/realm-config-routing-rule-edit-test-3Xqt5VlM.js +274 -0
  392. package/bundled-test-harness/assets/realm-config-settings-test-CkalhbDF.js +187 -0
  393. package/bundled-test-harness/assets/realm-field-test-B_PUoqnk.js +100 -0
  394. package/bundled-test-harness/assets/realm-indexing-test-8iLjeV_e.js +4380 -0
  395. package/bundled-test-harness/assets/realm-policy-fitted-test-Bptvra0U.js +206 -0
  396. package/bundled-test-harness/assets/realm-policy-test-DwG0qqXE.js +1141 -0
  397. package/bundled-test-harness/assets/realm-querying-test-Dvw26A6Q.js +1067 -0
  398. package/bundled-test-harness/assets/realm-server-form-agnostic-test-DrXQH0UP.js +96 -0
  399. package/bundled-test-harness/assets/realm-server-subscriber-test-Dkj23vQK.js +46 -0
  400. package/bundled-test-harness/assets/realm-service-info-test-CdRlDhj-.js +67 -0
  401. package/bundled-test-harness/assets/realm-test-DGYN48Qx.js +2364 -0
  402. package/bundled-test-harness/assets/realm-token-refresh-test-CEWATL9h.js +153 -0
  403. package/bundled-test-harness/assets/realm-url-tooltip-test-8ZjTNPuy.js +78 -0
  404. package/bundled-test-harness/assets/reasoning-test-BV49AYg2.js +221 -0
  405. package/bundled-test-harness/assets/recent-files-test-Dc6L6Dm4.js +450 -0
  406. package/bundled-test-harness/assets/reindex-realm-test-CFRSt39u.js +117 -0
  407. package/bundled-test-harness/assets/relationship-loading-state-test-FKbtOFUr.js +290 -0
  408. package/bundled-test-harness/assets/remix-card-test-CKGC_Sgq.js +58 -0
  409. package/bundled-test-harness/assets/rendered-markdown-DXiDN91F.js +292 -0
  410. package/bundled-test-harness/assets/rendered-markdown-test-n3MlXmmu.js +587 -0
  411. package/bundled-test-harness/assets/resident-instance-reuse-test-BjdhE6CM.js +82 -0
  412. package/bundled-test-harness/assets/result-tile-o6dtjgX4.js +144 -0
  413. package/bundled-test-harness/assets/rich-markdown-field-test-VXr6l20h.js +1647 -0
  414. package/bundled-test-harness/assets/room-message-test-BrjJ2wMs.js +484 -0
  415. package/bundled-test-harness/assets/run-P_7TsreC.js +4017 -0
  416. package/bundled-test-harness/assets/run-realm-code-DsBUf1si.js +2964 -0
  417. package/bundled-test-harness/assets/run-realm-code-test-cS0DzaKo.js +3844 -0
  418. package/bundled-test-harness/assets/sanitize-module-list-test-CvuOOiUY.js +85 -0
  419. package/bundled-test-harness/assets/save-card-skip-index-wait-test-fpJ1eq32.js +89 -0
  420. package/bundled-test-harness/assets/schema-editor-test-NkKjCgyf.js +785 -0
  421. package/bundled-test-harness/assets/schema-generation-test-Dmg3lWl7.js +28 -0
  422. package/bundled-test-harness/assets/scrolling-test-B0GNYGYc.js +412 -0
  423. package/bundled-test-harness/assets/search-adorn-test-CZebk7_y.js +136 -0
  424. package/bundled-test-harness/assets/search-and-choose-test-Bd4NZUup.js +154 -0
  425. package/bundled-test-harness/assets/search-correlation-id-test-DXKlEO55.js +139 -0
  426. package/bundled-test-harness/assets/search-entries-result-test-QQawA8Fm.js +234 -0
  427. package/bundled-test-harness/assets/search-entries-test-3DlqGPQq.js +1486 -0
  428. package/bundled-test-harness/assets/search-entries-tool-test-D1TvDE9D.js +504 -0
  429. package/bundled-test-harness/assets/search-google-images-test-DqsoQGr1.js +166 -0
  430. package/bundled-test-harness/assets/search-results-DGrNaPxh.js +266 -0
  431. package/bundled-test-harness/assets/search-results-test-CqVHYNRt.js +578 -0
  432. package/bundled-test-harness/assets/search-selection-menu-test-D6bIjKiH.js +108 -0
  433. package/bundled-test-harness/assets/search-sheet-files-test-Bf37TQXo.js +126 -0
  434. package/bundled-test-harness/assets/search-sheet-persistence-test-CV4_XdxR.js +131 -0
  435. package/bundled-test-harness/assets/search-test-Dlb-wg3a.js +2249 -0
  436. package/bundled-test-harness/assets/search-tool-test-BJLgVMoL.js +156 -0
  437. package/bundled-test-harness/assets/searchable-option-test-CcbfMqIL.js +322 -0
  438. package/bundled-test-harness/assets/searchable-search-doc-test-yH9fLGNS.js +1271 -0
  439. package/bundled-test-harness/assets/section-rail-CNFCebtT.js +113 -0
  440. package/bundled-test-harness/assets/section-rail-test-KNJAWWl6.js +256 -0
  441. package/bundled-test-harness/assets/secure-sign-in-Dyljp0Th.js +174 -0
  442. package/bundled-test-harness/assets/secure-sign-in-test-QnqNuTP3.js +373 -0
  443. package/bundled-test-harness/assets/segmented-control-DxJdoJ4Z.js +173 -0
  444. package/bundled-test-harness/assets/select-BiQTg2ts.js +175 -0
  445. package/bundled-test-harness/assets/send-ai-assistant-message-test-CAn7M2dZ.js +52 -0
  446. package/bundled-test-harness/assets/send-bot-trigger-event-test-qBu5E_jy.js +56 -0
  447. package/bundled-test-harness/assets/send-request-via-proxy-test-CLuwLBq_.js +380 -0
  448. package/bundled-test-harness/assets/sending-test-H0AaBSgi.js +659 -0
  449. package/bundled-test-harness/assets/serialization-rri-form-audit-test-hMJukiKt.js +136 -0
  450. package/bundled-test-harness/assets/serialization-test-W5e3wKbz.js +8758 -0
  451. package/bundled-test-harness/assets/set-user-system-card-test-CjgWLkNV.js +59 -0
  452. package/bundled-test-harness/assets/setup-CssMNvui.js +772 -0
  453. package/bundled-test-harness/assets/setup-D8YXvK-p.js +2 -0
  454. package/bundled-test-harness/assets/shared-link-target-reuse-test-D42UO8DC.js +207 -0
  455. package/bundled-test-harness/assets/show-card-test-CHEaS514.js +365 -0
  456. package/bundled-test-harness/assets/signed-capture-link-test-BgEu0F-S.js +132 -0
  457. package/bundled-test-harness/assets/single-stack-test-DYcu_v7Z.js +652 -0
  458. package/bundled-test-harness/assets/skills-test-ChmKhADX.js +648 -0
  459. package/bundled-test-harness/assets/skip-boot-index-guard-test-BzRIncDN.js +46 -0
  460. package/bundled-test-harness/assets/spec-test-BYvFR6Xb.js +1077 -0
  461. package/bundled-test-harness/assets/spinner-Bx9x55NA.js +49 -0
  462. package/bundled-test-harness/assets/src-C1hYFgVl.js +216 -0
  463. package/bundled-test-harness/assets/src-CIlLx7Lu.js +5 -0
  464. package/bundled-test-harness/assets/stick-to-bottom-resize-test-DMHsAG0v.js +56 -0
  465. package/bundled-test-harness/assets/store-add-test-D_9IHQjZ.js +50 -0
  466. package/bundled-test-harness/assets/store-module-rebuild-test-BRGZoLRV.js +454 -0
  467. package/bundled-test-harness/assets/store-search-test-3G8JHuj2.js +175 -0
  468. package/bundled-test-harness/assets/store-test-BiKKDqqW.js +3672 -0
  469. package/bundled-test-harness/assets/structured-theme-test-11TNsgUW.js +377 -0
  470. package/bundled-test-harness/assets/summarize-session-test-CwzD_ZbD.js +172 -0
  471. package/bundled-test-harness/assets/svg-image-def-test-zV6aMK9q.js +167 -0
  472. package/bundled-test-harness/assets/switch-submode-test-DQU2cP5_.js +168 -0
  473. package/bundled-test-harness/assets/sync-openrouter-models-test-xrXVaC2H.js +97 -0
  474. package/bundled-test-harness/assets/test-support-BGl3rthw.js +3 -0
  475. package/bundled-test-harness/assets/test-support-BcBv__98.js +99 -0
  476. package/bundled-test-harness/assets/tests-CmM9imwB.js +3598 -0
  477. package/bundled-test-harness/assets/text-file-def-test-Cyq78UFY.js +94 -0
  478. package/bundled-test-harness/assets/text-input-validator-test-DBj7TaM_.js +156 -0
  479. package/bundled-test-harness/assets/text-suggestion-test-C4XAqWqY.js +340 -0
  480. package/bundled-test-harness/assets/theme-card-test-dVNz4tgU.js +621 -0
  481. package/bundled-test-harness/assets/theme-dashboard-nav-test-DYSn5pqo.js +196 -0
  482. package/bundled-test-harness/assets/theme-scheme-island-test-C1WpkfEP.js +264 -0
  483. package/bundled-test-harness/assets/theme-scoped-css-parity-test-BVluppsE.js +176 -0
  484. package/bundled-test-harness/assets/titles-DCvAhECF.js +52 -0
  485. package/bundled-test-harness/assets/titles-ZPeArtS1.js +2 -0
  486. package/bundled-test-harness/assets/to-device-streaming-test-BJ4J1cXe.js +163 -0
  487. package/bundled-test-harness/assets/token-usage-test-WUf4r4fQ.js +160 -0
  488. package/bundled-test-harness/assets/tools-J_Knr_W6.js +774 -0
  489. package/bundled-test-harness/assets/tools-calling-test-CfqZX0Ed.js +200 -0
  490. package/bundled-test-harness/assets/tools-test-B4x58ZmI.js +1624 -0
  491. package/bundled-test-harness/assets/tools-test-Cvau5219.js +3204 -0
  492. package/bundled-test-harness/assets/tooltip-B0rEgyMW.css +66 -0
  493. package/bundled-test-harness/assets/tooltip-DvUMUgVX.js +195 -0
  494. package/bundled-test-harness/assets/transform-cards-test-CYQbZeD9.js +341 -0
  495. package/bundled-test-harness/assets/ts-file-def-preview-test-m39f8Zio.js +95 -0
  496. package/bundled-test-harness/assets/ts-file-def-test-xIcL5xWe.js +92 -0
  497. package/bundled-test-harness/assets/ttf-font-def-test-ClQ2SzFF.js +206 -0
  498. package/bundled-test-harness/assets/turn-settling-test-DZoL2mRT.js +160 -0
  499. package/bundled-test-harness/assets/turn-summary-Bmt7ZxTS.js +1039 -0
  500. package/bundled-test-harness/assets/unpublish-realm-test-0ToTJczx.js +102 -0
  501. package/bundled-test-harness/assets/update-room-skills-test-o_j8NOUV.js +240 -0
  502. package/bundled-test-harness/assets/use-ai-assistant-test-D7HFpxKJ.js +384 -0
  503. package/bundled-test-harness/assets/user-message-BAOt1hS3.js +262 -0
  504. package/bundled-test-harness/assets/validate-realm-test-e3xIbNLB.js +67 -0
  505. package/bundled-test-harness/assets/video-metadata-extractor-test-D8naLSlg.js +520 -0
  506. package/bundled-test-harness/assets/view-visually-test-BuhGau5E.js +335 -0
  507. package/bundled-test-harness/assets/virtual-network-reset-test-CgaFNGPi.js +96 -0
  508. package/bundled-test-harness/assets/wav-audio-def-test-CWG_UdCh.js +160 -0
  509. package/bundled-test-harness/assets/webp-image-def-test-sN4yw8Zu.js +226 -0
  510. package/bundled-test-harness/assets/workspace-0LfPqbYB.js +445 -0
  511. package/bundled-test-harness/assets/workspace-a11y-test-DQxYDRAP.js +197 -0
  512. package/bundled-test-harness/assets/workspace-actions-jGJSfl8M.js +588 -0
  513. package/bundled-test-harness/assets/workspace-behavior-test-BnF-bmBN.js +338 -0
  514. package/bundled-test-harness/assets/workspace-delete-multiple-test-D-rxPDuT.js +212 -0
  515. package/bundled-test-harness/assets/workspace-delete-summary-test-C2-Mve5R.js +63 -0
  516. package/bundled-test-harness/assets/workspace-hosting-test-BvDKdlOb.js +138 -0
  517. package/bundled-test-harness/assets/workspace-indexing-test-B34T3kqD.js +71 -0
  518. package/bundled-test-harness/assets/workspace-test-CJivgv-m.js +51 -0
  519. package/bundled-test-harness/assets/workspace-test-CuSRpPnQ.js +385 -0
  520. package/bundled-test-harness/assets/workspace-timestamp-labels-test-aWgjdbCp.js +68 -0
  521. package/bundled-test-harness/assets/workspace-unit-test-DHMUf2KT.js +122 -0
  522. package/bundled-test-harness/assets/write-binary-file-test-P-hVQuin.js +124 -0
  523. package/bundled-test-harness/assets/write-text-file-test-fXvJueDd.js +191 -0
  524. package/bundled-test-harness/assets/zip-archive-test-C2P5CUSR.js +285 -0
  525. package/bundled-test-harness/assets/zip-file-def-test-BfJZAmGt.js +164 -0
  526. package/bundled-test-harness/boxel-ui-checksum.txt +1 -1
  527. package/bundled-test-harness/index.html +48 -48
  528. package/bundled-test-harness/tests/index.html +50 -50
  529. package/bundled-types/boxel-ui/helpers/theme-scoped-css.ts +4 -0
  530. package/bundled-types/choreo/choreo.gts +58 -2
  531. package/bundled-types/choreo/compile.ts +5 -0
  532. package/bundled-types/choreo/layout-probe.ts +100 -0
  533. package/bundled-types/choreo/run.ts +99 -4
  534. package/bundled-types/host-app/components/operator-mode/dashboard/get-started.gts +152 -7
  535. package/bundled-types/host-app/components/operator-mode/dashboard/index.gts +2 -0
  536. package/bundled-types/host-app/components/operator-mode/dashboard/workspace.gts +5 -3
  537. package/bundled-types/host-app/components/operator-mode/dashboard-modals/workspace-modals.gts +5 -22
  538. package/bundled-types/host-app/components/operator-mode/host-submode/publishing-realm-popover.gts +1 -1
  539. package/bundled-types/host-app/components/operator-mode/host-submode.gts +111 -37
  540. package/bundled-types/host-app/components/operator-mode/motion/stack-motion.gts +92 -33
  541. package/bundled-types/host-app/components/operator-mode/publish-realm-modal.gts +1 -0
  542. package/bundled-types/host-app/components/operator-mode/stack-item.gts +2 -2
  543. package/bundled-types/host-app/components/operator-mode/stack.gts +36 -25
  544. package/bundled-types/host-app/components/operator-mode/submode-layout.gts +2 -2
  545. package/bundled-types/host-app/lib/modal-focus-trap.ts +33 -0
  546. package/bundled-types/host-app/lib/workspace-actions.ts +21 -0
  547. package/bundled-types/host-app/services/host-mode-service.ts +39 -0
  548. package/bundled-types/host-app/services/realm.ts +14 -0
  549. package/bundled-types/host-tests/helpers/dashboard.ts +67 -0
  550. package/package.json +1 -1
  551. package/bundled-test-harness/assets/account-switch-failed-test-FytUFiPO.js +0 -45
  552. package/bundled-test-harness/assets/adapter-DvmPwSZv.js +0 -2
  553. package/bundled-test-harness/assets/add-field-to-card-definition-tool-test-DN525jiY.js +0 -112
  554. package/bundled-test-harness/assets/ai-assistant-create-workspace-test-q3tKqVJQ.js +0 -130
  555. package/bundled-test-harness/assets/ai-assistant-panel-relogin-test-DgeXcCyi.js +0 -46
  556. package/bundled-test-harness/assets/ai-assistant-test-lDIGPKFP.js +0 -2223
  557. package/bundled-test-harness/assets/ai-function-generation-test-D5GbLyvL.js +0 -1176
  558. package/bundled-test-harness/assets/ai-module-creation-test-I3-j2beD.js +0 -151
  559. package/bundled-test-harness/assets/aibot-message-Dmsjifs6.js +0 -1312
  560. package/bundled-test-harness/assets/app-BS9_-DhN.js +0 -14146
  561. package/bundled-test-harness/assets/apply-markdown-edit-test-4zlwt0Db.js +0 -230
  562. package/bundled-test-harness/assets/ask-user-picker-Dr-0qpNr.js +0 -370
  563. package/bundled-test-harness/assets/ask-user-picker-test-633AFdmS.js +0 -39
  564. package/bundled-test-harness/assets/assistant-transcript-test-BgRnLvMg.js +0 -57
  565. package/bundled-test-harness/assets/audio-metadata-extractor-test-4xsQqL-0.js +0 -1176
  566. package/bundled-test-harness/assets/authed-fetch-test-663mT5_N.js +0 -73
  567. package/bundled-test-harness/assets/avif-image-def-test-h01BPIJy.js +0 -187
  568. package/bundled-test-harness/assets/basic-test-DiD6T-8Q.js +0 -139
  569. package/bundled-test-harness/assets/binary-upload-dedupe-test-CkjMPO_e.js +0 -308
  570. package/bundled-test-harness/assets/bot-registration-test-CFZHpwdj.js +0 -97
  571. package/bundled-test-harness/assets/box-test-C3pSy5ED.js +0 -50
  572. package/bundled-test-harness/assets/brand-guide-attachments-test-EoC_u7Vc.js +0 -84
  573. package/bundled-test-harness/assets/brand-guide-custom-css-test-Dn3fvblr.js +0 -196
  574. package/bundled-test-harness/assets/brand-guide-edit-test-NeiT3MyK.js +0 -140
  575. package/bundled-test-harness/assets/brand-logo-mark-field-test-C2A1EnBB.js +0 -86
  576. package/bundled-test-harness/assets/broken-link-template-test-CWn6V5zZ.js +0 -192
  577. package/bundled-test-harness/assets/bundled-base-modules-test-D7mLzpsw.js +0 -54
  578. package/bundled-test-harness/assets/bundled-base-oracle-test-I7xCId_k.js +0 -37
  579. package/bundled-test-harness/assets/buried-stack-item-scroll-test-DFBev0h-.js +0 -236
  580. package/bundled-test-harness/assets/button-BeSuhveJ.js +0 -207
  581. package/bundled-test-harness/assets/bxl-cyclic-graph-test-DPykwvvx.js +0 -47
  582. package/bundled-test-harness/assets/bxl-expression-test-LBWJiFb9.js +0 -250
  583. package/bundled-test-harness/assets/bxl-indexing-test-BuZmLk7y.js +0 -212
  584. package/bundled-test-harness/assets/bxl-platform-module-test-BNIvlkCM.js +0 -71
  585. package/bundled-test-harness/assets/can-invoke-test-t-bFIIeX.js +0 -455
  586. package/bundled-test-harness/assets/can-read-realm-test-2Q_MzRT9.js +0 -56
  587. package/bundled-test-harness/assets/cancel-indexing-job-test-QeYxEukn.js +0 -69
  588. package/bundled-test-harness/assets/capture-test-CJmJG8YR.js +0 -360
  589. package/bundled-test-harness/assets/card-api-test-B43I510H.js +0 -198
  590. package/bundled-test-harness/assets/card-basics-test-CBClzP2y.js +0 -5364
  591. package/bundled-test-harness/assets/card-chooser-paging-test-HEVzf6pR.js +0 -235
  592. package/bundled-test-harness/assets/card-chooser-test-GfjBRPFI.js +0 -393
  593. package/bundled-test-harness/assets/card-context-search-results-CoSr4EdS.js +0 -30
  594. package/bundled-test-harness/assets/card-context-search-results-test-BLMlZu9t.js +0 -184
  595. package/bundled-test-harness/assets/card-def-field-def-relationships-test-DEBOzKan.js +0 -562
  596. package/bundled-test-harness/assets/card-def-menu-items-test-88_h8o0D.js +0 -228
  597. package/bundled-test-harness/assets/card-delete-test-DKom1phy.js +0 -466
  598. package/bundled-test-harness/assets/card-error-awaiting-index-test-DEwgFZMP.js +0 -53
  599. package/bundled-test-harness/assets/card-error-r6_cXst9.js +0 -72
  600. package/bundled-test-harness/assets/card-info-thumbnail-picker-test-B7LiY15e.js +0 -219
  601. package/bundled-test-harness/assets/card-playground-test-CgyIJHui.js +0 -1491
  602. package/bundled-test-harness/assets/card-prerender-rPfzpIOU.js +0 -12939
  603. package/bundled-test-harness/assets/card-thunk-error-test-L0pvg4Ce.js +0 -48
  604. package/bundled-test-harness/assets/card-type-service-test-B2dhqxSD.js +0 -161
  605. package/bundled-test-harness/assets/check-correctness-test-DgqaLlCW.js +0 -1093
  606. package/bundled-test-harness/assets/check-domain-availability-test-B0hJHY5l.js +0 -98
  607. package/bundled-test-harness/assets/chip-D01NW3WH.js +0 -44
  608. package/bundled-test-harness/assets/choreo-D2Jl79RU.js +0 -1019
  609. package/bundled-test-harness/assets/choreo-_E8SOEe-.js +0 -2
  610. package/bundled-test-harness/assets/choreo-feature-reel-test-WLjsZDmS.js +0 -155
  611. package/bundled-test-harness/assets/choreo-gallery-build-order-test-6jnS8PsS.js +0 -436
  612. package/bundled-test-harness/assets/choreo-gallery-compositor-test-CbUZsVB6.js +0 -399
  613. package/bundled-test-harness/assets/choreo-gallery-cover-test-CbvAStgk.js +0 -214
  614. package/bundled-test-harness/assets/choreo-gallery-crossing-stage-test-tdjvUSa6.js +0 -133
  615. package/bundled-test-harness/assets/choreo-gallery-demos-alive-test-CsnM3hQK.js +0 -42
  616. package/bundled-test-harness/assets/choreo-gallery-drift-test-DG2LQTa7.js +0 -620
  617. package/bundled-test-harness/assets/choreo-gallery-escort-test-mn3-qXP1.js +0 -187
  618. package/bundled-test-harness/assets/choreo-gallery-films-test-BuktaC0D.js +0 -140
  619. package/bundled-test-harness/assets/choreo-gallery-filter-test-Dd-zpps0.js +0 -46
  620. package/bundled-test-harness/assets/choreo-gallery-fold-test-CWc1ijGc.js +0 -180
  621. package/bundled-test-harness/assets/choreo-gallery-guide-pages-test-tk2QmYPU.js +0 -114
  622. package/bundled-test-harness/assets/choreo-gallery-guides-test-DVbf1zM4.js +0 -321
  623. package/bundled-test-harness/assets/choreo-gallery-hang-test-B7EFp2dx.js +0 -426
  624. package/bundled-test-harness/assets/choreo-gallery-highlight-test-BFgbdesP.js +0 -60
  625. package/bundled-test-harness/assets/choreo-gallery-inline-edit-test-DJb8FC5R.js +0 -370
  626. package/bundled-test-harness/assets/choreo-gallery-interruption-test-DWyMXo5D.js +0 -176
  627. package/bundled-test-harness/assets/choreo-gallery-lone-stack-test-D3b8LsJ6.js +0 -104
  628. package/bundled-test-harness/assets/choreo-gallery-navigation-test-CjjU6Rvn.js +0 -193
  629. package/bundled-test-harness/assets/choreo-gallery-playhead-transport-test-Le_h3QWU.js +0 -111
  630. package/bundled-test-harness/assets/choreo-gallery-poplayout-subtree-test-Cp-DlWj4.js +0 -127
  631. package/bundled-test-harness/assets/choreo-gallery-presence-modes-test-DayS4GCJ.js +0 -100
  632. package/bundled-test-harness/assets/choreo-gallery-presentation-test-DeAfuFS7.js +0 -157
  633. package/bundled-test-harness/assets/choreo-gallery-reduced-motion-test-BgPWpggq.js +0 -145
  634. package/bundled-test-harness/assets/choreo-gallery-sheet-standalone-test-PzyoMNYv.js +0 -89
  635. package/bundled-test-harness/assets/choreo-gallery-sheet-test-CxaiNBkL.js +0 -48
  636. package/bundled-test-harness/assets/choreo-gallery-site-test-6xtSntS5.js +0 -237
  637. package/bundled-test-harness/assets/choreo-gallery-stage-E6Q5r-zU.js +0 -256
  638. package/bundled-test-harness/assets/choreo-gallery-stage-keyboard-test-C7aWMr9a.js +0 -102
  639. package/bundled-test-harness/assets/choreo-gallery-stages-test-CDWWgC61.js +0 -35
  640. package/bundled-test-harness/assets/choreo-gallery-subdivision-test-Bkp15XJv.js +0 -138
  641. package/bundled-test-harness/assets/choreo-gallery-table-plan-test-CcGRi_3O.js +0 -144
  642. package/bundled-test-harness/assets/choreo-gallery-theater-test-Qph5pLT_.js +0 -252
  643. package/bundled-test-harness/assets/choreo-gallery-tuning-test-C4DhFLVA.js +0 -95
  644. package/bundled-test-harness/assets/choreo-gallery-widget-room-test-LK493r1M.js +0 -88
  645. package/bundled-test-harness/assets/choreo-gallery-wires-test-B7SeUCc8.js +0 -148
  646. package/bundled-test-harness/assets/client-telemetry-test-DGmHzAFx.js +0 -340
  647. package/bundled-test-harness/assets/clip-BpYQPVz_.js +0 -2
  648. package/bundled-test-harness/assets/clip-CNaYbIwL.js +0 -92
  649. package/bundled-test-harness/assets/code-block-Cp2CJo5-.js +0 -502
  650. package/bundled-test-harness/assets/code-ref-test-C8JBHDb-.js +0 -163
  651. package/bundled-test-harness/assets/code-submode-availability-test-CzG1Tv6L.js +0 -198
  652. package/bundled-test-harness/assets/code-submode-test-BclVWjm5.js +0 -1839
  653. package/bundled-test-harness/assets/codeblocks-test-CmQlyxN7.js +0 -418
  654. package/bundled-test-harness/assets/codemirror-editor-test-B74H_yn8.js +0 -1512
  655. package/bundled-test-harness/assets/codemirror-embed-toolbar-test-Bz6VEysU.js +0 -366
  656. package/bundled-test-harness/assets/color-field-test-DMCPQKIP.js +0 -212
  657. package/bundled-test-harness/assets/compaction-test-saQCLBrQ.js +0 -150
  658. package/bundled-test-harness/assets/computed-test-C05HliJC.js +0 -1320
  659. package/bundled-test-harness/assets/container-Cqcwrd-m.js +0 -10857
  660. package/bundled-test-harness/assets/container-h3Wc26qn.css +0 -5097
  661. package/bundled-test-harness/assets/content-preview-components-test-DZPj4_CU.js +0 -462
  662. package/bundled-test-harness/assets/copy-and-edit-test-DiXTQNTF.js +0 -292
  663. package/bundled-test-harness/assets/copy-card-test-ys7GquUY.js +0 -218
  664. package/bundled-test-harness/assets/copy-file-to-realm-test-Gn0Wn4vT.js +0 -148
  665. package/bundled-test-harness/assets/copy-source-test-BTLrOmPm.js +0 -56
  666. package/bundled-test-harness/assets/create-file-test-BCeIW-Rt.js +0 -464
  667. package/bundled-test-harness/assets/create-file-test-DbHQ5JsS.js +0 -1086
  668. package/bundled-test-harness/assets/create-listing-modal-test-CeHc4ter.js +0 -273
  669. package/bundled-test-harness/assets/create-listing-pr-request-test-DXbJNfMh.js +0 -117
  670. package/bundled-test-harness/assets/create-spec-test-BDIZoyHT.js +0 -256
  671. package/bundled-test-harness/assets/create-submission-workflow-test-Bix5J-3A.js +0 -132
  672. package/bundled-test-harness/assets/create-workspace-test-BmNnLHwC.js +0 -104
  673. package/bundled-test-harness/assets/credential-fields-test-NK1F4QWn.js +0 -200
  674. package/bundled-test-harness/assets/csv-file-def-test-BSfs4TTP.js +0 -102
  675. package/bundled-test-harness/assets/dashboard-C4T7ffKY.js +0 -3576
  676. package/bundled-test-harness/assets/dashboard-CFeHuP5-.js +0 -81
  677. package/bundled-test-harness/assets/dashboard-DQlpW-ux.css +0 -2392
  678. package/bundled-test-harness/assets/dashboard-add-workspace-test--rr6objf.js +0 -50
  679. package/bundled-test-harness/assets/dashboard-agents-test-D1y8H4xH.js +0 -334
  680. package/bundled-test-harness/assets/dashboard-archive-test-bN4EQaXv.js +0 -128
  681. package/bundled-test-harness/assets/dashboard-delete-test-BvsASb8B.js +0 -163
  682. package/bundled-test-harness/assets/dashboard-duplicate-offer-test-DEsd5ZzZ.js +0 -71
  683. package/bundled-test-harness/assets/dashboard-duplicate-test-BnR0sTgB.js +0 -222
  684. package/bundled-test-harness/assets/dashboard-get-started-test-DG4uUXLv.js +0 -246
  685. package/bundled-test-harness/assets/dashboard-pinned-cards-test-AoGGVRAS.js +0 -220
  686. package/bundled-test-harness/assets/dashboard-reindex-test-BN9a96Xp.js +0 -115
  687. package/bundled-test-harness/assets/dashboard-section-rail-test-B3OT9V2T.js +0 -169
  688. package/bundled-test-harness/assets/dashboard-state-test-BY0Zqrmj.js +0 -162
  689. package/bundled-test-harness/assets/dashboard-test-C13oNpWt.js +0 -545
  690. package/bundled-test-harness/assets/dashboard-unreachable-notice-test-DZIV4x5j.js +0 -62
  691. package/bundled-test-harness/assets/dashboard-workspace-test-CBnOQViI.js +0 -537
  692. package/bundled-test-harness/assets/dashboard-workspaces-section-test-KU8ZVOYp.js +0 -396
  693. package/bundled-test-harness/assets/data-file-def-preview-test-CI5gcdtK.js +0 -155
  694. package/bundled-test-harness/assets/date-time-fields-test-D2CpR_Pb.js +0 -359
  695. package/bundled-test-harness/assets/debug-message-test-Df1kHesw.js +0 -117
  696. package/bundled-test-harness/assets/declared-captures-test-hQ43zuox.js +0 -879
  697. package/bundled-test-harness/assets/delete-workspace-test-BhfMKsix.js +0 -102
  698. package/bundled-test-harness/assets/diffing-test-CHRh55mC.js +0 -210
  699. package/bundled-test-harness/assets/download-file-to-realm-test-CC1HURCi.js +0 -119
  700. package/bundled-test-harness/assets/editor-test-DkeCv28f.js +0 -688
  701. package/bundled-test-harness/assets/edits-BSJqtUXM.js +0 -651
  702. package/bundled-test-harness/assets/email-field-test-DihK0suO.js +0 -75
  703. package/bundled-test-harness/assets/enum-field-test-Gja3bzt5.js +0 -935
  704. package/bundled-test-harness/assets/error-display-test-GhYZu7cp.js +0 -343
  705. package/bundled-test-harness/assets/evaluate-module-test-D_t4CiUq.js +0 -91
  706. package/bundled-test-harness/assets/execute-atomic-operations-test-xtou8Zeg.js +0 -113
  707. package/bundled-test-harness/assets/externals-B02-sD_L.js +0 -4393
  708. package/bundled-test-harness/assets/fallback-banner-live-delete-test-DtxzNXdE.js +0 -207
  709. package/bundled-test-harness/assets/fallback-banner-test-BfmiQ_68.js +0 -53
  710. package/bundled-test-harness/assets/fallback-banner-test-DLtTdmvn.js +0 -225
  711. package/bundled-test-harness/assets/fallback-models-test-BxNJxhfd.js +0 -161
  712. package/bundled-test-harness/assets/fetch-card-json-test-DofKbzvC.js +0 -61
  713. package/bundled-test-harness/assets/field-configuration-test-SUoPaXWy.js +0 -551
  714. package/bundled-test-harness/assets/field-markdown-domain-test-BwtR0dPP.js +0 -616
  715. package/bundled-test-harness/assets/field-markdown-oversize-test-D8UJcBc3.js +0 -88
  716. package/bundled-test-harness/assets/field-markdown-primitives-test-D5_ZdoDO.js +0 -365
  717. package/bundled-test-harness/assets/field-markdown-specialized-test-Dpd5hs04.js +0 -534
  718. package/bundled-test-harness/assets/field-playground-test-CzhYzKGv.js +0 -894
  719. package/bundled-test-harness/assets/field-support-predicates-test-BSvVOFth.js +0 -167
  720. package/bundled-test-harness/assets/file-attachment-test-fM-yFedm.js +0 -796
  721. package/bundled-test-harness/assets/file-chooser-panel-test-CKj8YTdY.js +0 -153
  722. package/bundled-test-harness/assets/file-chooser-test-Bs8jFXqa.js +0 -504
  723. package/bundled-test-harness/assets/file-def-format-templates-test-CxrRoWoD.js +0 -380
  724. package/bundled-test-harness/assets/file-def-live-reload-test-X_8YEkve.js +0 -124
  725. package/bundled-test-harness/assets/file-def-menu-items-test-Dx879o_o.js +0 -138
  726. package/bundled-test-harness/assets/file-def-navigation-test-MMI_EEO1.js +0 -109
  727. package/bundled-test-harness/assets/file-def-serialization-test-B5lguBQD.js +0 -89
  728. package/bundled-test-harness/assets/file-def-test-Di9QWcrj.js +0 -216
  729. package/bundled-test-harness/assets/file-preview-live-reload-test-aqx93A7c.js +0 -310
  730. package/bundled-test-harness/assets/file-resource-primitives-test-a5abpcSB.js +0 -255
  731. package/bundled-test-harness/assets/file-tree-from-index-test-CnruGxJ8.js +0 -96
  732. package/bundled-test-harness/assets/file-tree-test-BCyWDdSE.js +0 -851
  733. package/bundled-test-harness/assets/file-view-model-test-BfpLa01Y.js +0 -346
  734. package/bundled-test-harness/assets/filedef-export-shape-test-CQ9XbrzS.js +0 -61
  735. package/bundled-test-harness/assets/film-CL1zj_bJ.js +0 -2
  736. package/bundled-test-harness/assets/film-Dq_quZ31.js +0 -13
  737. package/bundled-test-harness/assets/film-xbkQa060.js +0 -4074
  738. package/bundled-test-harness/assets/flac-audio-def-test-BmVp9dMx.js +0 -143
  739. package/bundled-test-harness/assets/focus-Dm4wkM72.js +0 -306
  740. package/bundled-test-harness/assets/font-metadata-extractor-test-OWEh9_MS.js +0 -415
  741. package/bundled-test-harness/assets/formatted-aibot-message-test-BpHsWpuV.js +0 -109
  742. package/bundled-test-harness/assets/formatted-user-message-test-DZW5TAr0.js +0 -43
  743. package/bundled-test-harness/assets/freestyle-test-D_uaPU_3.js +0 -17
  744. package/bundled-test-harness/assets/full-reindex-realm-test-C6vHL5kC.js +0 -101
  745. package/bundled-test-harness/assets/garbage-collection-test-D-Ao4t2n.js +0 -403
  746. package/bundled-test-harness/assets/general-test-PSGI8W0z.js +0 -923
  747. package/bundled-test-harness/assets/generate-example-cards-one-shot-test-J-m-0E6W.js +0 -65
  748. package/bundled-test-harness/assets/generic-file-def-preview-test-BAsOhTYU.js +0 -71
  749. package/bundled-test-harness/assets/get-available-realm-identifiers-test-D5PBOr97.js +0 -47
  750. package/bundled-test-harness/assets/get-catalog-realm-identifiers-test-NM9UURHE.js +0 -47
  751. package/bundled-test-harness/assets/get-default-writable-realm-test-BxXc9a3J.js +0 -54
  752. package/bundled-test-harness/assets/get-published-realms-test-C8TJEc4-.js +0 -71
  753. package/bundled-test-harness/assets/get-realm-of-resource-identifier-test-Dt8CB6lS.js +0 -54
  754. package/bundled-test-harness/assets/get-relationship-membership-state-test-9_8x3myJ.js +0 -1308
  755. package/bundled-test-harness/assets/get-user-system-card-test-k0UO-uba.js +0 -67
  756. package/bundled-test-harness/assets/gif-image-def-test-BWrqPGDX.js +0 -188
  757. package/bundled-test-harness/assets/glimmer-motion-and-choreo-in-cards-test-BgG8QI9E.js +0 -160
  758. package/bundled-test-harness/assets/glimmer-motion-and-choreo-test-BKOvNyCN.js +0 -74
  759. package/bundled-test-harness/assets/gts-file-def-test-BCRHwDeZ.js +0 -100
  760. package/bundled-test-harness/assets/head-format-preview-test-DnfUhniI.js +0 -158
  761. package/bundled-test-harness/assets/helpers-DklkegO_.js +0 -5
  762. package/bundled-test-harness/assets/host-mode-service-vOfN0smp.js +0 -232
  763. package/bundled-test-harness/assets/host-mode-test-CCCJFz6_.js +0 -831
  764. package/bundled-test-harness/assets/host-submode-test-CtCfbuPA.js +0 -1342
  765. package/bundled-test-harness/assets/html-component-test-CWyhb5ZX.js +0 -65
  766. package/bundled-test-harness/assets/html-def-test-Cb8C2lUx.js +0 -160
  767. package/bundled-test-harness/assets/html-meta-extractor-test-BHT9Rtir.js +0 -60
  768. package/bundled-test-harness/assets/hydratable-card-test-DpgpdesD.js +0 -426
  769. package/bundled-test-harness/assets/icon-button-ABCGVF3C.js +0 -67
  770. package/bundled-test-harness/assets/image-metadata-extractor-test-ClhPTouq.js +0 -1109
  771. package/bundled-test-harness/assets/index-changes-test-CgnVr3LH.js +0 -367
  772. package/bundled-test-harness/assets/index-query-engine-test-CQTwju5_.js +0 -2593
  773. package/bundled-test-harness/assets/index-writer-test-IoVOoZT2.js +0 -3040
  774. package/bundled-test-harness/assets/inspector-test-BN2Ieb77.js +0 -2058
  775. package/bundled-test-harness/assets/instance-filter-matcher-test-Bq-_Sy89.js +0 -788
  776. package/bundled-test-harness/assets/instantiate-card-test-DEeDTzFV.js +0 -164
  777. package/bundled-test-harness/assets/interact-submode-creation-and-permissions-test-DP6kOyJS.js +0 -475
  778. package/bundled-test-harness/assets/interact-submode-setup-B0_cHqH-.js +0 -566
  779. package/bundled-test-harness/assets/invalidate-realm-identifiers-test-9uUD91Pw.js +0 -99
  780. package/bundled-test-harness/assets/invite-user-to-room-test-CcDA45Ac.js +0 -142
  781. package/bundled-test-harness/assets/invoke-card-operation-test-DmUtgueM.js +0 -333
  782. package/bundled-test-harness/assets/isolated-render-test-B2eXNHu6.js +0 -51
  783. package/bundled-test-harness/assets/job-scoped-doc-cache-test-DF9D7cOc.js +0 -181
  784. package/bundled-test-harness/assets/job-scoped-instance-residency-test-CSS8xUU5.js +0 -103
  785. package/bundled-test-harness/assets/jpg-image-def-test-voECMTht.js +0 -697
  786. package/bundled-test-harness/assets/json-file-def-test-8Y4KLjUC.js +0 -95
  787. package/bundled-test-harness/assets/key-notices-badge-test-d1mYqx0e.js +0 -155
  788. package/bundled-test-harness/assets/key-readiness-test-BtCg7PCk.js +0 -190
  789. package/bundled-test-harness/assets/linksto-broken-link-placeholder-test-CyCMbJnN.js +0 -398
  790. package/bundled-test-harness/assets/linksto-error-sentinel-test-BDW572-v.js +0 -238
  791. package/bundled-test-harness/assets/linksto-many-broken-link-placeholder-test-B4wM97hD.js +0 -354
  792. package/bundled-test-harness/assets/linksto-many-per-slot-access-test-BhJmtJ0_.js +0 -303
  793. package/bundled-test-harness/assets/linksto-sentinel-reload-test-BpBQ5V_i.js +0 -197
  794. package/bundled-test-harness/assets/linksto-sentinel-roundtrip-test-pkBBl4e9.js +0 -260
  795. package/bundled-test-harness/assets/linksto-singular-js-access-contract-test-Bb6wjUdD.js +0 -196
  796. package/bundled-test-harness/assets/lint-and-fix-test-CcMLn-co.js +0 -51
  797. package/bundled-test-harness/assets/live-test-AyBnq7BX.js +0 -2
  798. package/bundled-test-harness/assets/live-test-CgnAcIDw.js +0 -100
  799. package/bundled-test-harness/assets/load-default-skills-test-BIOwtx0Y.js +0 -74
  800. package/bundled-test-harness/assets/loader-parallel-prefetch-test-D5_oRSER.js +0 -257
  801. package/bundled-test-harness/assets/loader-test-DSc_jR1c.js +0 -482
  802. package/bundled-test-harness/assets/loading-test-8pldx7S-.js +0 -63
  803. package/bundled-test-harness/assets/m4a-audio-def-test-BDI5apzM.js +0 -190
  804. package/bundled-test-harness/assets/main-5kHyCkdm.js +0 -5
  805. package/bundled-test-harness/assets/markdown-embed-chooser-modal-test-Wud0s7WZ.js +0 -470
  806. package/bundled-test-harness/assets/markdown-embed-chooser-test-DVzzS-0C.js +0 -334
  807. package/bundled-test-harness/assets/markdown-embed-preview-pane-test-B5W_iqsi.js +0 -447
  808. package/bundled-test-harness/assets/markdown-embed-preview-test-CZF_s0fB.js +0 -368
  809. package/bundled-test-harness/assets/markdown-fallback-test-fT6BS4W7.js +0 -316
  810. package/bundled-test-harness/assets/markdown-file-def-test-B1aTzazR.js +0 -380
  811. package/bundled-test-harness/assets/markdown-helpers-test-gNKZf7Mw.js +0 -188
  812. package/bundled-test-harness/assets/markdown-highlighting-test-Du5_CQmD.js +0 -244
  813. package/bundled-test-harness/assets/markdown-preview-h-_aJhRc.js +0 -72
  814. package/bundled-test-harness/assets/markdown-preview-test-DJvoVsXw.js +0 -238
  815. package/bundled-test-harness/assets/markdown-skill-frontmatter-test-VwJi3Paj.js +0 -146
  816. package/bundled-test-harness/assets/markdown-skill-search-test-ysCdf0xM.js +0 -80
  817. package/bundled-test-harness/assets/matrix-service-account-switch-sessions-test-K2JuMy36.js +0 -63
  818. package/bundled-test-harness/assets/matrix-service-boot-assembly-test-CkdL_-os.js +0 -300
  819. package/bundled-test-harness/assets/matrix-service-personal-realm-test-Dy1DultK.js +0 -125
  820. package/bundled-test-harness/assets/matrix-service-realm-servers-test-DHDDKuEg.js +0 -55
  821. package/bundled-test-harness/assets/matrix-service-realms-list-updated-test-DcTbZpMl.js +0 -132
  822. package/bundled-test-harness/assets/matrix-service-relogin-test-D3NQktoa.js +0 -59
  823. package/bundled-test-harness/assets/matrix-service-sliding-sync-test-6CAflWOA.js +0 -35
  824. package/bundled-test-harness/assets/menu-kUSaJIPq.js +0 -3562
  825. package/bundled-test-harness/assets/message-service-subscription-test-DaQdgDWi.js +0 -110
  826. package/bundled-test-harness/assets/message-service-test-BsGEgM_m.js +0 -144
  827. package/bundled-test-harness/assets/message-tool-test-BB_4kw1V.js +0 -33
  828. package/bundled-test-harness/assets/midi-audio-def-test-BbbkFjqf.js +0 -182
  829. package/bundled-test-harness/assets/migrate-skill-test-X9xImDuq.js +0 -161
  830. package/bundled-test-harness/assets/mini-AwF31elJ.js +0 -1404
  831. package/bundled-test-harness/assets/mini-card-chooser-test-BZtrEiWu.js +0 -272
  832. package/bundled-test-harness/assets/mini-file-chooser-test-MIHW3kCI.js +0 -201
  833. package/bundled-test-harness/assets/mock-matrix-Dd8k0DNa.js +0 -15107
  834. package/bundled-test-harness/assets/mock-matrix-DhPN_34j.js +0 -2
  835. package/bundled-test-harness/assets/modal-LTh3_oHK.js +0 -322
  836. package/bundled-test-harness/assets/model-cost-tier-test-h1IkU9mp.js +0 -174
  837. package/bundled-test-harness/assets/model-file-extract-test-ntSo0wZF.js +0 -206
  838. package/bundled-test-harness/assets/module-transpile-cache-test-CDeRaaeP.js +0 -67
  839. package/bundled-test-harness/assets/monaco-test-C0Fa744D.js +0 -100
  840. package/bundled-test-harness/assets/mp3-audio-def-test-B4j4qR9H.js +0 -133
  841. package/bundled-test-harness/assets/multiple-stacks-test-BhA25ywL.js +0 -208
  842. package/bundled-test-harness/assets/nested-query-field-render-test-S9Y8YNKB.js +0 -249
  843. package/bundled-test-harness/assets/no-stacks-test-B7VciWyg.js +0 -48
  844. package/bundled-test-harness/assets/number-field-test-CS74lDPN.js +0 -184
  845. package/bundled-test-harness/assets/office-file-def-test-2cKc1pmd.js +0 -263
  846. package/bundled-test-harness/assets/office-metadata-extractor-test-DC8Fo-OW.js +0 -218
  847. package/bundled-test-harness/assets/office-poster-capture-test-Ba0_5UrT.js +0 -203
  848. package/bundled-test-harness/assets/ogg-audio-def-test-CIPQ1d4w.js +0 -196
  849. package/bundled-test-harness/assets/open-create-listing-modal-test-bmQkY5Zl.js +0 -131
  850. package/bundled-test-harness/assets/open-image-in-new-tab-test-DBD7_vMH.js +0 -52
  851. package/bundled-test-harness/assets/open-secure-window-test-BgeuYAqz.js +0 -253
  852. package/bundled-test-harness/assets/open-workspace-test-DRHGljV0.js +0 -46
  853. package/bundled-test-harness/assets/operation-lowering-test-CH1c0pSH.js +0 -2957
  854. package/bundled-test-harness/assets/operations-invocation-test-B1YkCLrv.js +0 -523
  855. package/bundled-test-harness/assets/operations-optimistic-test-DAbtOwsC.js +0 -203
  856. package/bundled-test-harness/assets/operations-query-test-9p1ZIDe-.js +0 -459
  857. package/bundled-test-harness/assets/operations-store-reconciliation-test-D0EQh3w2.js +0 -406
  858. package/bundled-test-harness/assets/operations-test-BQhlrfe3.js +0 -2518
  859. package/bundled-test-harness/assets/operator-mode-acceptance-test-DtHnonEb.js +0 -1195
  860. package/bundled-test-harness/assets/operator-mode-card-chooser-test-DQUxZxaq.js +0 -1036
  861. package/bundled-test-harness/assets/operator-mode-links-test-BJ26HllS.js +0 -797
  862. package/bundled-test-harness/assets/operator-mode-test-DIPDI0qt.js +0 -696
  863. package/bundled-test-harness/assets/operator-mode-ui-test-CfA-fAh4.js +0 -1045
  864. package/bundled-test-harness/assets/overlay-DecPh3nt.js +0 -123
  865. package/bundled-test-harness/assets/overlay-menu-items-test-C6XqjLtu.js +0 -331
  866. package/bundled-test-harness/assets/overlays-Ctp8ePzZ.js +0 -75
  867. package/bundled-test-harness/assets/overlays-CzWpSg5T.js +0 -2
  868. package/bundled-test-harness/assets/overlays-detached-element-test-DvL_8Bb5.js +0 -56
  869. package/bundled-test-harness/assets/panel-CImumikB.js +0 -15124
  870. package/bundled-test-harness/assets/past-sessions-test-N6riGN_I.js +0 -321
  871. package/bundled-test-harness/assets/patch-fields-test-D30_-KwQ.js +0 -1014
  872. package/bundled-test-harness/assets/patch-instance-test-C5rGscZq.js +0 -348
  873. package/bundled-test-harness/assets/pdf-file-def-test-DtiqGRvZ.js +0 -111
  874. package/bundled-test-harness/assets/pdf-metadata-extractor-test-FU02KmdV.js +0 -130
  875. package/bundled-test-harness/assets/permission-checking-realm-test-DqdNJDwU.js +0 -306
  876. package/bundled-test-harness/assets/persist-module-inspector-view-test-BHOAgPVy.js +0 -60
  877. package/bundled-test-harness/assets/persist-scroll-position-test-qtmS518r.js +0 -254
  878. package/bundled-test-harness/assets/phone-number-field-test-DhdaM7uL.js +0 -73
  879. package/bundled-test-harness/assets/pill-menu-test-C9Mrrepl.js +0 -60
  880. package/bundled-test-harness/assets/plate-9n-sXyCw.js +0 -41
  881. package/bundled-test-harness/assets/plate-BnZcAk-_.js +0 -2
  882. package/bundled-test-harness/assets/player-Cu5b4LEJ.js +0 -82
  883. package/bundled-test-harness/assets/player-unk2mkxV.js +0 -2
  884. package/bundled-test-harness/assets/playground-BwA8wFGK.js +0 -58
  885. package/bundled-test-harness/assets/plural-field-components-test-CFNQKETg.js +0 -198
  886. package/bundled-test-harness/assets/png-image-def-test-DG5Vhlqb.js +0 -266
  887. package/bundled-test-harness/assets/policy-audit-confirmation-test-yfKU47LR.js +0 -155
  888. package/bundled-test-harness/assets/policy-scoped-search-test-BjQRDYqR.js +0 -339
  889. package/bundled-test-harness/assets/prerender-file-extract-test-CEU4SaAZ.js +0 -346
  890. package/bundled-test-harness/assets/prerender-html-test-CGB3ClCS.js +0 -670
  891. package/bundled-test-harness/assets/prerender-meta-test-xqc4fW_0.js +0 -614
  892. package/bundled-test-harness/assets/prerender-module-test-CI1TmZw-.js +0 -409
  893. package/bundled-test-harness/assets/prerender-persistence-block-test-Da0dJO_N.js +0 -124
  894. package/bundled-test-harness/assets/prerender-pre-model-error-test-BVLyhk8R.js +0 -61
  895. package/bundled-test-harness/assets/prerender-serialize-cycle-test-glJFfxHU.js +0 -134
  896. package/bundled-test-harness/assets/prerendered-html-read-test-Mp4L0VHQ.js +0 -191
  897. package/bundled-test-harness/assets/pretui-components-test-BBpA9UnA.js +0 -991
  898. package/bundled-test-harness/assets/pretui-components-test-BqFq7rw_.css +0 -730
  899. package/bundled-test-harness/assets/preview-format-test-C55Bwcur.js +0 -103
  900. package/bundled-test-harness/assets/preview-test-CTAhRGU8.js +0 -474
  901. package/bundled-test-harness/assets/process-card-test-UjqpuxB7.js +0 -94
  902. package/bundled-test-harness/assets/profile-settings-modal-C8bCgTMK.js +0 -989
  903. package/bundled-test-harness/assets/publish-realm-ixUB4FPK.js +0 -82
  904. package/bundled-test-harness/assets/publish-realm-test-CrrsdL4W.js +0 -210
  905. package/bundled-test-harness/assets/query-field-barrier-test-DjivFE93.js +0 -113
  906. package/bundled-test-harness/assets/query-field-error-sentinel-test-0HwnV4Mw.js +0 -201
  907. package/bundled-test-harness/assets/query-field-membership-status-test-C8yTTBkc.js +0 -323
  908. package/bundled-test-harness/assets/query-field-page-optin-test-D4l_GcII.js +0 -126
  909. package/bundled-test-harness/assets/query-field-schema-test-DDbcNNm5.js +0 -231
  910. package/bundled-test-harness/assets/query-field-search-throttle-test-CXp50Ax0.js +0 -154
  911. package/bundled-test-harness/assets/query-field-stale-prerender-test-DErzt-Cv.js +0 -152
  912. package/bundled-test-harness/assets/query-fields-test-Dz67fdSl.js +0 -535
  913. package/bundled-test-harness/assets/quick-look-test-B1ijDsh_.js +0 -139
  914. package/bundled-test-harness/assets/read-card-for-ai-assistant-test-DJxZ16H_.js +0 -91
  915. package/bundled-test-harness/assets/read-file-for-ai-assistant-test-BoRQkZ8c.js +0 -45
  916. package/bundled-test-harness/assets/read-source-test-Bl-NjchO.js +0 -67
  917. package/bundled-test-harness/assets/read-text-file-test-CP37CZoo.js +0 -124
  918. package/bundled-test-harness/assets/realm-CaK5mkT-.js +0 -2852
  919. package/bundled-test-harness/assets/realm-api-keys-BNUFWbGR.js +0 -579
  920. package/bundled-test-harness/assets/realm-api-keys-CkshxhXC.js +0 -2
  921. package/bundled-test-harness/assets/realm-api-keys-test-BP8xifjn.js +0 -109
  922. package/bundled-test-harness/assets/realm-api-keys-test-CwdK9YXp.js +0 -588
  923. package/bundled-test-harness/assets/realm-config-iKwE3Htp.js +0 -833
  924. package/bundled-test-harness/assets/realm-config-policy-standing-test-BgVEIDnB.js +0 -290
  925. package/bundled-test-harness/assets/realm-config-routing-rule-edit-test-BoJoKzmX.js +0 -274
  926. package/bundled-test-harness/assets/realm-config-settings-test-Kxw-GHye.js +0 -187
  927. package/bundled-test-harness/assets/realm-field-test-CdGOxrFb.js +0 -100
  928. package/bundled-test-harness/assets/realm-indexing-test-CHtsBV2b.js +0 -4380
  929. package/bundled-test-harness/assets/realm-policy-fitted-test--DhNZSdC.js +0 -206
  930. package/bundled-test-harness/assets/realm-policy-test-D7714iVa.js +0 -1141
  931. package/bundled-test-harness/assets/realm-querying-test-Cj1ekZ0H.js +0 -1067
  932. package/bundled-test-harness/assets/realm-server-form-agnostic-test-CZFPNJfD.js +0 -96
  933. package/bundled-test-harness/assets/realm-server-subscriber-test-C86WmBp0.js +0 -46
  934. package/bundled-test-harness/assets/realm-service-info-test-CdgcwKDR.js +0 -67
  935. package/bundled-test-harness/assets/realm-test-DPoLsvKz.js +0 -2364
  936. package/bundled-test-harness/assets/realm-token-refresh-test-Ch35Siwi.js +0 -153
  937. package/bundled-test-harness/assets/realm-url-tooltip-test-x8xWOENK.js +0 -78
  938. package/bundled-test-harness/assets/reasoning-test-BxpE8Jvf.js +0 -221
  939. package/bundled-test-harness/assets/recent-files-test-DTmEzPLq.js +0 -450
  940. package/bundled-test-harness/assets/reindex-realm-test-BQ8KULn4.js +0 -117
  941. package/bundled-test-harness/assets/relationship-loading-state-test-BJoArPWf.js +0 -290
  942. package/bundled-test-harness/assets/remix-card-test-DsTA1KoG.js +0 -58
  943. package/bundled-test-harness/assets/rendered-markdown-DvukulDO.js +0 -292
  944. package/bundled-test-harness/assets/rendered-markdown-test-DxGptXSV.js +0 -587
  945. package/bundled-test-harness/assets/resident-instance-reuse-test-ZWnVu8uj.js +0 -82
  946. package/bundled-test-harness/assets/result-tile-CPyI6Vmv.js +0 -144
  947. package/bundled-test-harness/assets/rich-markdown-field-test-CdygoXIO.js +0 -1647
  948. package/bundled-test-harness/assets/room-message-test-D3NfMqH0.js +0 -484
  949. package/bundled-test-harness/assets/run-D_Px28eF.js +0 -3956
  950. package/bundled-test-harness/assets/run-realm-code-qWCZxmJ7.js +0 -2964
  951. package/bundled-test-harness/assets/run-realm-code-test-UzyeEJq6.js +0 -3844
  952. package/bundled-test-harness/assets/sanitize-module-list-test-Babq44bP.js +0 -85
  953. package/bundled-test-harness/assets/save-card-skip-index-wait-test-BcELXlQ_.js +0 -89
  954. package/bundled-test-harness/assets/schema-editor-test-CEvruZbt.js +0 -785
  955. package/bundled-test-harness/assets/schema-generation-test-hYAMdCrn.js +0 -28
  956. package/bundled-test-harness/assets/scrolling-test-DVIsh-_1.js +0 -412
  957. package/bundled-test-harness/assets/search-adorn-test-CkVhqFd0.js +0 -136
  958. package/bundled-test-harness/assets/search-and-choose-test-DUhOB3FV.js +0 -154
  959. package/bundled-test-harness/assets/search-correlation-id-test-Drn4r26N.js +0 -139
  960. package/bundled-test-harness/assets/search-entries-result-test-DTCRJ_wc.js +0 -234
  961. package/bundled-test-harness/assets/search-entries-test-CE0B47pw.js +0 -1486
  962. package/bundled-test-harness/assets/search-entries-tool-test-C4aG0ckM.js +0 -504
  963. package/bundled-test-harness/assets/search-google-images-test-LyhcB2f3.js +0 -166
  964. package/bundled-test-harness/assets/search-results-D4pSne0x.js +0 -266
  965. package/bundled-test-harness/assets/search-results-test-CRZHhqhn.js +0 -578
  966. package/bundled-test-harness/assets/search-selection-menu-test-B7Y3E_nj.js +0 -108
  967. package/bundled-test-harness/assets/search-sheet-files-test-C2y534g8.js +0 -126
  968. package/bundled-test-harness/assets/search-sheet-persistence-test-DePC59Bk.js +0 -131
  969. package/bundled-test-harness/assets/search-test-Dy8NxFkU.js +0 -2249
  970. package/bundled-test-harness/assets/search-tool-test-lctDaMH3.js +0 -156
  971. package/bundled-test-harness/assets/searchable-option-test-CE64M8oM.js +0 -322
  972. package/bundled-test-harness/assets/searchable-search-doc-test-C6u3mVvT.js +0 -1271
  973. package/bundled-test-harness/assets/section-rail-B_UQX00B.js +0 -113
  974. package/bundled-test-harness/assets/section-rail-test-DIda7MIw.js +0 -256
  975. package/bundled-test-harness/assets/secure-sign-in-CqqqfQG8.js +0 -174
  976. package/bundled-test-harness/assets/secure-sign-in-test-DimbVr_W.js +0 -373
  977. package/bundled-test-harness/assets/segmented-control-iePxSdTS.js +0 -173
  978. package/bundled-test-harness/assets/select-tNs6_xwW.js +0 -175
  979. package/bundled-test-harness/assets/send-ai-assistant-message-test-2GVrMF9Z.js +0 -52
  980. package/bundled-test-harness/assets/send-bot-trigger-event-test-B_3dKfGN.js +0 -56
  981. package/bundled-test-harness/assets/send-request-via-proxy-test-_clNWyYc.js +0 -380
  982. package/bundled-test-harness/assets/sending-test-DCPFXUVg.js +0 -659
  983. package/bundled-test-harness/assets/serialization-rri-form-audit-test-BI0zCs8Y.js +0 -136
  984. package/bundled-test-harness/assets/serialization-test-bjdtVlZL.js +0 -8758
  985. package/bundled-test-harness/assets/set-user-system-card-test-BUv1vL08.js +0 -59
  986. package/bundled-test-harness/assets/setup-BW1mmC7C.js +0 -772
  987. package/bundled-test-harness/assets/setup-DsIcFT-T.js +0 -2
  988. package/bundled-test-harness/assets/shared-link-target-reuse-test-9NeJEjkb.js +0 -207
  989. package/bundled-test-harness/assets/show-card-test-mfyLwusD.js +0 -365
  990. package/bundled-test-harness/assets/signed-capture-link-test-BOtKNCAM.js +0 -132
  991. package/bundled-test-harness/assets/single-stack-test-B4MGjaLk.js +0 -652
  992. package/bundled-test-harness/assets/skills-test-BuP-Yzk1.js +0 -648
  993. package/bundled-test-harness/assets/skip-boot-index-guard-test-Cmrx2-K7.js +0 -46
  994. package/bundled-test-harness/assets/spec-test-BhZDdhVQ.js +0 -1077
  995. package/bundled-test-harness/assets/spinner-CpIBUG9m.js +0 -49
  996. package/bundled-test-harness/assets/src-DGHttmW-.js +0 -216
  997. package/bundled-test-harness/assets/src-DaNDSbp7.js +0 -5
  998. package/bundled-test-harness/assets/stick-to-bottom-resize-test-Dpy3OVum.js +0 -56
  999. package/bundled-test-harness/assets/store-add-test-_IYS8o74.js +0 -50
  1000. package/bundled-test-harness/assets/store-module-rebuild-test-B5VMaICy.js +0 -454
  1001. package/bundled-test-harness/assets/store-search-test-C2VZabrH.js +0 -175
  1002. package/bundled-test-harness/assets/store-test-D6PObxoD.js +0 -3672
  1003. package/bundled-test-harness/assets/structured-theme-test-BHjVeMf-.js +0 -377
  1004. package/bundled-test-harness/assets/summarize-session-test-BFtTuhe0.js +0 -172
  1005. package/bundled-test-harness/assets/svg-image-def-test-BL6lkWUX.js +0 -167
  1006. package/bundled-test-harness/assets/switch-submode-test-6Uv3bZMl.js +0 -168
  1007. package/bundled-test-harness/assets/sync-openrouter-models-test-Dp9E05tL.js +0 -97
  1008. package/bundled-test-harness/assets/test-support-DYm8XZ0E.js +0 -3
  1009. package/bundled-test-harness/assets/test-support-DfnhiIMV.js +0 -99
  1010. package/bundled-test-harness/assets/tests-CZk0Iag2.js +0 -3596
  1011. package/bundled-test-harness/assets/text-file-def-test-CHdC0yIU.js +0 -94
  1012. package/bundled-test-harness/assets/text-input-validator-test-B9ZR8XPU.js +0 -156
  1013. package/bundled-test-harness/assets/text-suggestion-test-CGLspKFQ.js +0 -340
  1014. package/bundled-test-harness/assets/theme-card-test-CXZvSEvG.js +0 -621
  1015. package/bundled-test-harness/assets/theme-dashboard-nav-test-CkEE0ILk.js +0 -196
  1016. package/bundled-test-harness/assets/theme-scheme-island-test-URXTjipF.js +0 -264
  1017. package/bundled-test-harness/assets/titles-C6enAdIv.js +0 -2
  1018. package/bundled-test-harness/assets/titles-Dft1HoUT.js +0 -52
  1019. package/bundled-test-harness/assets/to-device-streaming-test-D33ZOc9o.js +0 -163
  1020. package/bundled-test-harness/assets/token-usage-test-BHQlU4J4.js +0 -160
  1021. package/bundled-test-harness/assets/tools-CrudqfS3.js +0 -774
  1022. package/bundled-test-harness/assets/tools-calling-test-jo7IREau.js +0 -200
  1023. package/bundled-test-harness/assets/tools-test-D1wMfUa0.js +0 -1624
  1024. package/bundled-test-harness/assets/tools-test-Dn1LYsXp.js +0 -3204
  1025. package/bundled-test-harness/assets/tooltip-8Wyz4IIn.css +0 -68
  1026. package/bundled-test-harness/assets/tooltip-CqwLzRz5.js +0 -134
  1027. package/bundled-test-harness/assets/transform-cards-test-BPhwPFtp.js +0 -341
  1028. package/bundled-test-harness/assets/ts-file-def-preview-test-Bq3zTgw8.js +0 -95
  1029. package/bundled-test-harness/assets/ts-file-def-test-GLswMl7O.js +0 -92
  1030. package/bundled-test-harness/assets/ttf-font-def-test-DQulvUWs.js +0 -206
  1031. package/bundled-test-harness/assets/turn-settling-test-BspmOUQP.js +0 -160
  1032. package/bundled-test-harness/assets/turn-summary-9A8nvC0-.js +0 -1039
  1033. package/bundled-test-harness/assets/unpublish-realm-test-SkYPEhDz.js +0 -102
  1034. package/bundled-test-harness/assets/update-room-skills-test-cTxb-WU6.js +0 -240
  1035. package/bundled-test-harness/assets/use-ai-assistant-test-uaqW1T_A.js +0 -384
  1036. package/bundled-test-harness/assets/user-message-BudkIP-3.js +0 -262
  1037. package/bundled-test-harness/assets/validate-realm-test-DxrGgH9n.js +0 -67
  1038. package/bundled-test-harness/assets/video-metadata-extractor-test-B2pe-Iqa.js +0 -520
  1039. package/bundled-test-harness/assets/view-visually-test-PNon6fUo.js +0 -335
  1040. package/bundled-test-harness/assets/virtual-network-reset-test-uYJLaQHf.js +0 -96
  1041. package/bundled-test-harness/assets/wav-audio-def-test-F4OrFFR4.js +0 -160
  1042. package/bundled-test-harness/assets/webp-image-def-test-B0a_-Vya.js +0 -226
  1043. package/bundled-test-harness/assets/workspace-Cyftysy9.js +0 -440
  1044. package/bundled-test-harness/assets/workspace-a11y-test-sKiPDcbl.js +0 -197
  1045. package/bundled-test-harness/assets/workspace-actions-BuawjFmZ.js +0 -561
  1046. package/bundled-test-harness/assets/workspace-behavior-test-CKa-pb3T.js +0 -338
  1047. package/bundled-test-harness/assets/workspace-delete-multiple-test-Dt2weG5R.js +0 -212
  1048. package/bundled-test-harness/assets/workspace-delete-summary-test-CkqgFqZ8.js +0 -63
  1049. package/bundled-test-harness/assets/workspace-hosting-test-Ci7EEtHP.js +0 -138
  1050. package/bundled-test-harness/assets/workspace-indexing-test-BPVxxY6W.js +0 -71
  1051. package/bundled-test-harness/assets/workspace-test-CWr7vFbg.js +0 -385
  1052. package/bundled-test-harness/assets/workspace-test-INNpQovc.js +0 -51
  1053. package/bundled-test-harness/assets/workspace-timestamp-labels-test-CigQb5wr.js +0 -68
  1054. package/bundled-test-harness/assets/workspace-unit-test-BwVKpuXT.js +0 -122
  1055. package/bundled-test-harness/assets/write-binary-file-test-BKP3gv1k.js +0 -124
  1056. package/bundled-test-harness/assets/write-text-file-test-B6ijTKTa.js +0 -191
  1057. package/bundled-test-harness/assets/zip-archive-test-C-PBzkTn.js +0 -285
  1058. package/bundled-test-harness/assets/zip-file-def-test-FyCzJT-9.js +0 -164
@@ -1,2957 +0,0 @@
1
- import { s as __toESM } from "./chunk-Rp0pCe6z.js";
2
- import { r as initializeDeferredDecorator, t as decorateFieldV2 } from "./runtime--fcdnjmJ-BoCBNIsz.js";
3
- import { Br as testRealmURL, Fa as maybeHandleScopedCSSRequest, Go as identifyCard, Ka as VirtualNetwork, Ss as definitionKind, Ys as Loader, Za as fetcher, is as loadCardDef, na as DEFINITION_FREE_BASE_OPERATIONS, wi as slotKeyKinds, ws as getFieldDefinitions } from "./runtime-common-BTaLJEw-.js";
4
- import { O as baseRealm } from "./constants-Icc0nFW-.js";
5
- import { t as config } from "./environment-DIUJgBKt.js";
6
- import { t as shimExternals } from "./externals-B02-sD_L.js";
7
- import { t as lowerOperationDeclarations } from "./card-operations-CzugytHO.js";
8
- import { t as require_qunit } from "./qunit-C-Foo4Nd.js";
9
- import { jt as shimTestModule } from "./mock-matrix-Dd8k0DNa.js";
10
- //#region tests/unit/operation-lowering-test.ts
11
- var import_qunit = /* @__PURE__ */ __toESM(require_qunit());
12
- var { resolvedBaseRealmURL } = config;
13
- (0, import_qunit.module)("Unit | operation lowering", function(hooks) {
14
- let loader;
15
- let api;
16
- let operations;
17
- let virtualNetwork;
18
- let StringField;
19
- let NumberField;
20
- let fixtures;
21
- hooks.beforeEach(async function() {
22
- virtualNetwork = new VirtualNetwork();
23
- virtualNetwork.addURLMapping(new URL(baseRealm.url), new URL(resolvedBaseRealmURL));
24
- virtualNetwork.addRealmMapping("@cardstack/base/", resolvedBaseRealmURL);
25
- virtualNetwork.addImportMap("@cardstack/boxel-icons/", (rest) => {
26
- return `${config.iconsURL}/@cardstack/boxel-icons/v1/icons/${rest}.js`;
27
- });
28
- shimExternals(virtualNetwork);
29
- loader = new Loader(fetcher(virtualNetwork.fetch, [async (req, next) => {
30
- return await maybeHandleScopedCSSRequest(req) || next(req);
31
- }]), virtualNetwork.resolveImport, { virtualNetwork });
32
- api = await loader.import("@cardstack/base/card-api");
33
- operations = await loader.import("@cardstack/base/operations");
34
- ({default: StringField} = await loader.import("@cardstack/base/string"));
35
- ({default: NumberField} = await loader.import("@cardstack/base/number"));
36
- let { field, contains, linksTo, linksToMany, CardDef, FieldDef } = api;
37
- class Author extends CardDef {
38
- static displayName = "Author";
39
- static {
40
- decorateFieldV2(this.prototype, "name", [field], function() {
41
- return contains(StringField);
42
- });
43
- }
44
- #name = (initializeDeferredDecorator(this, "name"), void 0);
45
- }
46
- class Address extends FieldDef {
47
- static displayName = "Address";
48
- static {
49
- decorateFieldV2(this.prototype, "city", [field], function() {
50
- return contains(StringField);
51
- });
52
- }
53
- #city = (initializeDeferredDecorator(this, "city"), void 0);
54
- }
55
- class Comment extends FieldDef {
56
- static displayName = "Comment";
57
- static {
58
- decorateFieldV2(this.prototype, "body", [field], function() {
59
- return contains(StringField);
60
- });
61
- }
62
- #body = (initializeDeferredDecorator(this, "body"), void 0);
63
- static {
64
- decorateFieldV2(this.prototype, "postedBy", [field], function() {
65
- return contains(StringField);
66
- });
67
- }
68
- #postedBy = (initializeDeferredDecorator(this, "postedBy"), void 0);
69
- static {
70
- decorateFieldV2(this.prototype, "author", [field], function() {
71
- return linksTo(() => Author);
72
- });
73
- }
74
- #author = (initializeDeferredDecorator(this, "author"), void 0);
75
- static {
76
- decorateFieldV2(this.prototype, "where", [field], function() {
77
- return contains(Address);
78
- });
79
- }
80
- #where = (initializeDeferredDecorator(this, "where"), void 0);
81
- }
82
- class Activity extends CardDef {
83
- static displayName = "Activity";
84
- static {
85
- decorateFieldV2(this.prototype, "label", [field], function() {
86
- return contains(StringField);
87
- });
88
- }
89
- #label = (initializeDeferredDecorator(this, "label"), void 0);
90
- static {
91
- decorateFieldV2(this.prototype, "postedBy", [field], function() {
92
- return contains(StringField);
93
- });
94
- }
95
- #postedBy = (initializeDeferredDecorator(this, "postedBy"), void 0);
96
- static {
97
- decorateFieldV2(this.prototype, "owner", [field], function() {
98
- return linksTo(() => Author);
99
- });
100
- }
101
- #owner = (initializeDeferredDecorator(this, "owner"), void 0);
102
- static {
103
- decorateFieldV2(this.prototype, "witnesses", [field], function() {
104
- return linksToMany(() => Author);
105
- });
106
- }
107
- #witnesses = (initializeDeferredDecorator(this, "witnesses"), void 0);
108
- }
109
- shim({
110
- Author,
111
- Address,
112
- Comment,
113
- Activity
114
- });
115
- fixtures = {
116
- Author,
117
- Comment,
118
- Activity
119
- };
120
- });
121
- function shim(exports) {
122
- for (let [name, def] of Object.entries(exports)) shimTestModule(loader, `${testRealmURL}${name.toLowerCase()}`, { [name]: def });
123
- }
124
- function buildDefinition(def) {
125
- let { fields, fieldDefs } = getFieldDefinitions(api, def);
126
- return {
127
- codeRef: identifyCard(def),
128
- displayName: def.displayName ?? null,
129
- fields,
130
- fieldDefs,
131
- type: definitionKind(def)
132
- };
133
- }
134
- async function lookupDefinition(codeRef) {
135
- try {
136
- return buildDefinition(await loadCardDef(codeRef, { loader }));
137
- } catch {
138
- return;
139
- }
140
- }
141
- async function lower(def) {
142
- return await lowerOperationDeclarations(operations.getDeclaredOperations(def), {
143
- definition: buildDefinition(def),
144
- lookupDefinition,
145
- identifyCard: (target) => identifyCard(target)
146
- });
147
- }
148
- function codes(result) {
149
- return result.issues.map((issue) => issue.code);
150
- }
151
- (0, import_qunit.test)("append lowers to an append statement, with a link-typed member as a card identity", async function(assert) {
152
- let { field, contains, containsMany, CardDef } = api;
153
- let { operation, params, actor, linkTo } = operations;
154
- class Report extends CardDef {
155
- static displayName = "Report";
156
- static {
157
- decorateFieldV2(this.prototype, "title", [field], function() {
158
- return contains(StringField);
159
- });
160
- }
161
- #title = (initializeDeferredDecorator(this, "title"), void 0);
162
- static {
163
- decorateFieldV2(this.prototype, "comments", [field], function() {
164
- return containsMany(fixtures.Comment);
165
- });
166
- }
167
- #comments = (initializeDeferredDecorator(this, "comments"), void 0);
168
- static {
169
- decorateFieldV2(this, "addComment", [operation], function() {
170
- return {
171
- base: "transform",
172
- params: {
173
- body: StringField,
174
- author: linkTo(() => fixtures.Author)
175
- },
176
- append: {
177
- to: "comments",
178
- value: {
179
- body: params("body"),
180
- postedBy: actor(),
181
- author: params("author")
182
- }
183
- }
184
- };
185
- });
186
- }
187
- #addComment = (initializeDeferredDecorator(this, "addComment"), void 0);
188
- }
189
- shim({ Report });
190
- let { operations: lowered, issues } = await lower(Report);
191
- assert.deepEqual(issues, [], "the declaration lowers cleanly");
192
- assert.deepEqual(lowered.addComment, {
193
- base: "transform",
194
- params: {
195
- body: {
196
- kind: "field",
197
- codeRef: identifyCard(StringField)
198
- },
199
- author: {
200
- kind: "link",
201
- codeRef: identifyCard(fixtures.Author)
202
- }
203
- },
204
- program: {
205
- source: "append(.comments;{body:params(\"body\"),postedBy:actor(),author:card(params(\"author\"))});",
206
- syntax: "solidified"
207
- },
208
- deterministic: true,
209
- readsActor: true
210
- }, "a link-typed member becomes a card identity while a scalar one stays the bare builtin, and a program naming the actor says so");
211
- });
212
- (0, import_qunit.test)("an actor in a link position is an authoring issue, not a spelling the lowering repairs", async function(assert) {
213
- let { field, contains, containsMany, linksTo, CardDef } = api;
214
- let { operation, actor } = operations;
215
- class Report extends CardDef {
216
- static displayName = "Report";
217
- static {
218
- decorateFieldV2(this.prototype, "title", [field], function() {
219
- return contains(StringField);
220
- });
221
- }
222
- #title = (initializeDeferredDecorator(this, "title"), void 0);
223
- static {
224
- decorateFieldV2(this.prototype, "owner", [field], function() {
225
- return linksTo(() => fixtures.Author);
226
- });
227
- }
228
- #owner = (initializeDeferredDecorator(this, "owner"), void 0);
229
- static {
230
- decorateFieldV2(this.prototype, "comments", [field], function() {
231
- return containsMany(fixtures.Comment);
232
- });
233
- }
234
- #comments = (initializeDeferredDecorator(this, "comments"), void 0);
235
- static {
236
- decorateFieldV2(this, "claim", [operation], function() {
237
- return {
238
- base: "transform",
239
- set: { owner: actor() }
240
- };
241
- });
242
- }
243
- #claim = (initializeDeferredDecorator(this, "claim"), void 0);
244
- static {
245
- decorateFieldV2(this, "addComment", [operation], function() {
246
- return {
247
- base: "transform",
248
- append: {
249
- to: "comments",
250
- value: { author: actor() }
251
- }
252
- };
253
- });
254
- }
255
- #addComment = (initializeDeferredDecorator(this, "addComment"), void 0);
256
- }
257
- shim({ Report });
258
- let result = await lower(Report);
259
- assert.deepEqual(codes(result), ["actor-not-a-card", "actor-not-a-card"]);
260
- assert.deepEqual(result.issues.map((issue) => issue.path), ["set.owner", "append.value.author"], "both the field itself and a member of a contained value are reached");
261
- assert.true(result.issues[0].message.includes("linkTo(…)"), "the message names the declaration that does express a link to a person");
262
- assert.true(result.operations.claim.invalid, "an operation carrying the issue reports it rather than running");
263
- });
264
- (0, import_qunit.test)("a create fills a link field with a card identity, and the caller is not one", async function(assert) {
265
- let { field, contains, CardDef } = api;
266
- let { operation, actor } = operations;
267
- class Classroom extends CardDef {
268
- static displayName = "Classroom";
269
- static {
270
- decorateFieldV2(this.prototype, "name", [field], function() {
271
- return contains(StringField);
272
- });
273
- }
274
- #name = (initializeDeferredDecorator(this, "name"), void 0);
275
- static {
276
- decorateFieldV2(this, "addActivity", [operation], function() {
277
- return {
278
- base: "create",
279
- of: () => fixtures.Activity,
280
- fill: { owner: actor() }
281
- };
282
- });
283
- }
284
- #addActivity = (initializeDeferredDecorator(this, "addActivity"), void 0);
285
- static {
286
- decorateFieldV2(this, "addWitnessed", [operation], function() {
287
- return {
288
- base: "create",
289
- of: () => fixtures.Activity,
290
- fill: { witnesses: [actor()] }
291
- };
292
- });
293
- }
294
- #addWitnessed = (initializeDeferredDecorator(this, "addWitnessed"), void 0);
295
- }
296
- shim({ Classroom });
297
- let result = await lower(Classroom);
298
- assert.deepEqual(result.issues.map((issue) => [issue.code, issue.path]), [["actor-not-a-card", "fill.owner"], ["actor-not-a-card", "fill.witnesses[0]"]], "a link collection is filled with a list, so every entry is an identity too");
299
- });
300
- (0, import_qunit.test)("set lowers to one assignment per field, and a scalar reference stays a bare builtin", async function(assert) {
301
- let { field, contains, CardDef } = api;
302
- let { operation, params, actor } = operations;
303
- class Report extends CardDef {
304
- static displayName = "Report";
305
- static {
306
- decorateFieldV2(this.prototype, "status", [field], function() {
307
- return contains(StringField);
308
- });
309
- }
310
- #status = (initializeDeferredDecorator(this, "status"), void 0);
311
- static {
312
- decorateFieldV2(this.prototype, "closedBy", [field], function() {
313
- return contains(StringField);
314
- });
315
- }
316
- #closedBy = (initializeDeferredDecorator(this, "closedBy"), void 0);
317
- static {
318
- decorateFieldV2(this, "close", [operation], function() {
319
- return {
320
- base: "transform",
321
- params: { note: StringField },
322
- set: {
323
- status: "closed",
324
- closedBy: actor(),
325
- "cardInfo.notes": params("note")
326
- }
327
- };
328
- });
329
- }
330
- #close = (initializeDeferredDecorator(this, "close"), void 0);
331
- }
332
- shim({ Report });
333
- let { operations: lowered, issues } = await lower(Report);
334
- assert.deepEqual(issues, [], "the declaration lowers cleanly");
335
- assert.strictEqual(lowered.close.program?.source, [
336
- ".status=\"closed\";",
337
- ".closedBy=actor();",
338
- ".cardInfo.notes=params(\"note\");"
339
- ].join("\n"), "a scalar field reads the builtin directly");
340
- });
341
- (0, import_qunit.test)("assert lowers to a uniqueness precondition keyed by the collection kind", async function(assert) {
342
- let { field, contains, containsMany, linksToMany, CardDef } = api;
343
- let { operation, params, actor } = operations;
344
- class Report extends CardDef {
345
- static displayName = "Report";
346
- static {
347
- decorateFieldV2(this.prototype, "tags", [field], function() {
348
- return containsMany(StringField);
349
- });
350
- }
351
- #tags = (initializeDeferredDecorator(this, "tags"), void 0);
352
- static {
353
- decorateFieldV2(this.prototype, "reviewers", [field], function() {
354
- return linksToMany(() => fixtures.Author, { searchable: true });
355
- });
356
- }
357
- #reviewers = (initializeDeferredDecorator(this, "reviewers"), void 0);
358
- static {
359
- decorateFieldV2(this.prototype, "title", [field], function() {
360
- return contains(StringField);
361
- });
362
- }
363
- #title = (initializeDeferredDecorator(this, "title"), void 0);
364
- static {
365
- decorateFieldV2(this, "addTag", [operation], function() {
366
- return {
367
- base: "transform",
368
- params: { tag: StringField },
369
- assert: {
370
- unique: "tags",
371
- by: params("tag"),
372
- message: "already tagged"
373
- },
374
- append: {
375
- to: "tags",
376
- value: params("tag")
377
- }
378
- };
379
- });
380
- }
381
- #addTag = (initializeDeferredDecorator(this, "addTag"), void 0);
382
- static {
383
- decorateFieldV2(this, "addReviewer", [operation], function() {
384
- return {
385
- base: "transform",
386
- params: { who: StringField },
387
- assert: {
388
- unique: "reviewers",
389
- by: params("who"),
390
- snapshot: true
391
- }
392
- };
393
- });
394
- }
395
- #addReviewer = (initializeDeferredDecorator(this, "addReviewer"), void 0);
396
- static {
397
- decorateFieldV2(this, "claimReview", [operation], function() {
398
- return {
399
- base: "transform",
400
- assert: {
401
- unique: "reviewers",
402
- by: actor(),
403
- snapshot: true
404
- }
405
- };
406
- });
407
- }
408
- #claimReview = (initializeDeferredDecorator(this, "claimReview"), void 0);
409
- static {
410
- decorateFieldV2(this, "tagSelf", [operation], function() {
411
- return {
412
- base: "transform",
413
- assert: {
414
- unique: "tags",
415
- by: actor()
416
- },
417
- append: {
418
- to: "tags",
419
- value: actor()
420
- }
421
- };
422
- });
423
- }
424
- #tagSelf = (initializeDeferredDecorator(this, "tagSelf"), void 0);
425
- }
426
- shim({ Report });
427
- let { operations: lowered, issues } = await lower(Report);
428
- assert.deepEqual(issues.map((issue) => [issue.code, issue.path]), [["actor-not-a-card", "assert.by"]], "only the comparison against a link collection is refused");
429
- assert.strictEqual(lowered.addTag.program?.source, ["assert(all(.tags[];.!=params(\"tag\"));\"already tagged\");", "append(.tags;params(\"tag\"));"].join("\n"), "a contained collection compares the item itself, and the precondition runs before the write");
430
- assert.strictEqual(lowered.addReviewer.program?.source, "assert(all(.reviewers[];.id!=params(\"who\"));\"reviewers already holds this value\");", "a link collection compares the linked card id against the identity itself — not against a card() projection — and an omitted message gets a default");
431
- assert.strictEqual(lowered.tagSelf.program?.source, ["assert(all(.tags[];.!=actor());\"tags already holds this value\");", "append(.tags;actor());"].join("\n"), "a contained collection compares the caller id against the item itself");
432
- assert.true(lowered.claimReview.invalid, "while a link collection compares against a linked card id, which the caller is not");
433
- assert.true(lowered.addReviewer.snapshot, "the gathering the author opted into travels with the program that needs it");
434
- assert.strictEqual(lowered.addTag.snapshot, void 0, "while an assert the stored document can answer asks for none");
435
- });
436
- (0, import_qunit.test)("a create lowers `of` to a code ref and keeps `fill` a marker-carrying template", async function(assert) {
437
- let { field, contains, CardDef } = api;
438
- let { operation, params, actor, linkTo } = operations;
439
- class Classroom extends CardDef {
440
- static displayName = "Classroom";
441
- static {
442
- decorateFieldV2(this.prototype, "name", [field], function() {
443
- return contains(StringField);
444
- });
445
- }
446
- #name = (initializeDeferredDecorator(this, "name"), void 0);
447
- static {
448
- decorateFieldV2(this, "addActivity", [operation], function() {
449
- return {
450
- base: "create",
451
- params: {
452
- label: StringField,
453
- teacher: linkTo(() => fixtures.Author)
454
- },
455
- of: () => fixtures.Activity,
456
- fill: {
457
- label: params("label"),
458
- postedBy: actor()
459
- }
460
- };
461
- });
462
- }
463
- #addActivity = (initializeDeferredDecorator(this, "addActivity"), void 0);
464
- }
465
- shim({ Classroom });
466
- let { operations: lowered, issues } = await lower(Classroom);
467
- assert.deepEqual(issues, [], "the declaration lowers cleanly");
468
- assert.deepEqual(lowered.addActivity, {
469
- base: "create",
470
- params: {
471
- label: {
472
- kind: "field",
473
- codeRef: identifyCard(StringField)
474
- },
475
- teacher: {
476
- kind: "link",
477
- codeRef: identifyCard(fixtures.Author)
478
- }
479
- },
480
- of: identifyCard(fixtures.Activity),
481
- fill: {
482
- label: {
483
- $ref: "params",
484
- key: "label"
485
- },
486
- postedBy: { $ref: "actor" }
487
- },
488
- deterministic: true,
489
- readsActor: true
490
- }, "a linkTo param is a link entry, fill stays data for the coordinator to substitute, and an actor marker inside it is reported the same as one in a program");
491
- });
492
- (0, import_qunit.test)("a query lowers to an entry-wire query template with code refs in the type slots", async function(assert) {
493
- let { field, contains, CardDef } = api;
494
- let { operation, actor, params } = operations;
495
- class Report extends CardDef {
496
- static displayName = "Report";
497
- static {
498
- decorateFieldV2(this.prototype, "title", [field], function() {
499
- return contains(StringField);
500
- });
501
- }
502
- #title = (initializeDeferredDecorator(this, "title"), void 0);
503
- static {
504
- decorateFieldV2(this, "mine", [operation], function() {
505
- return {
506
- base: "query",
507
- params: { term: StringField },
508
- query: {
509
- filter: {
510
- on: () => fixtures.Author,
511
- eq: { name: actor() }
512
- },
513
- sort: [{
514
- by: "name",
515
- on: () => fixtures.Author,
516
- direction: "desc"
517
- }],
518
- page: {
519
- size: 20,
520
- number: 0
521
- },
522
- queryString: params("term"),
523
- realms: [testRealmURL]
524
- }
525
- };
526
- });
527
- }
528
- #mine = (initializeDeferredDecorator(this, "mine"), void 0);
529
- }
530
- shim({ Report });
531
- let { operations: lowered, issues } = await lower(Report);
532
- assert.deepEqual(issues, [], "the declaration lowers cleanly");
533
- assert.deepEqual(lowered.mine.query, {
534
- filter: { every: [{
535
- "item.on": identifyCard(fixtures.Author),
536
- eq: { "item.name": { $ref: "actor" } }
537
- }, { matches: {
538
- $ref: "params",
539
- key: "term"
540
- } }] },
541
- sort: [{
542
- by: "item.name",
543
- "item.on": identifyCard(fixtures.Author),
544
- direction: "desc"
545
- }],
546
- page: {
547
- size: 20,
548
- number: 0
549
- },
550
- realms: [testRealmURL]
551
- }, "the type anchors resolve to code refs, field paths gain item. addressing, and the declared term becomes a matches conjunct");
552
- });
553
- (0, import_qunit.test)("a raw program is canonicalized rather than stored as written", async function(assert) {
554
- let { field, contains, CardDef } = api;
555
- let { operation, bxl } = operations;
556
- class Report extends CardDef {
557
- static displayName = "Report";
558
- static {
559
- decorateFieldV2(this.prototype, "status", [field], function() {
560
- return contains(StringField);
561
- });
562
- }
563
- #status = (initializeDeferredDecorator(this, "status"), void 0);
564
- static {
565
- decorateFieldV2(this.prototype, "revision", [field], function() {
566
- return contains(NumberField);
567
- });
568
- }
569
- #revision = (initializeDeferredDecorator(this, "revision"), void 0);
570
- static {
571
- decorateFieldV2(this, "escalate", [operation], function() {
572
- return {
573
- base: "transform",
574
- transformations: bxl`.status = "escalated"; .revision = IF(.revision = null; 1; .revision + 1);`
575
- };
576
- });
577
- }
578
- #escalate = (initializeDeferredDecorator(this, "escalate"), void 0);
579
- }
580
- shim({ Report });
581
- let { operations: lowered, issues } = await lower(Report);
582
- assert.deepEqual(issues, [], "the program parses");
583
- assert.deepEqual(lowered.escalate.program, {
584
- source: ".status=\"escalated\";\n.revision=IF(.revision==null;1;.revision+1);",
585
- syntax: "solidified"
586
- }, "the author's Excel-style comparison is stored in canonical form");
587
- });
588
- (0, import_qunit.test)("an output projection lowers to the program it describes", async function(assert) {
589
- let { field, contains, CardDef } = api;
590
- let { operation, actor } = operations;
591
- class Report extends CardDef {
592
- static displayName = "Report";
593
- static {
594
- decorateFieldV2(this.prototype, "title", [field], function() {
595
- return contains(StringField);
596
- });
597
- }
598
- #title = (initializeDeferredDecorator(this, "title"), void 0);
599
- static {
600
- decorateFieldV2(this, "read", [operation], function() {
601
- return {
602
- base: "read",
603
- output: { label: actor() }
604
- };
605
- });
606
- }
607
- #read = (initializeDeferredDecorator(this, "read"), void 0);
608
- }
609
- shim({ Report });
610
- let { operations: lowered, issues } = await lower(Report);
611
- assert.deepEqual(issues, [], "the projection lowers cleanly");
612
- assert.deepEqual(lowered.read, {
613
- base: "read",
614
- output: {
615
- source: "{label:actor()}",
616
- syntax: "solidified"
617
- },
618
- deterministic: true,
619
- readsActor: true
620
- }, "a declarative projection and a raw program reach the realm in one form, and a projection reading the actor is reported like any other stage");
621
- });
622
- (0, import_qunit.test)("an author-supplied optimistic flag is carried through", async function(assert) {
623
- let { field, contains, CardDef } = api;
624
- let { operation } = operations;
625
- class Report extends CardDef {
626
- static displayName = "Report";
627
- static {
628
- decorateFieldV2(this.prototype, "status", [field], function() {
629
- return contains(StringField);
630
- });
631
- }
632
- #status = (initializeDeferredDecorator(this, "status"), void 0);
633
- static {
634
- decorateFieldV2(this, "close", [operation], function() {
635
- return {
636
- base: "transform",
637
- optimistic: false,
638
- set: { status: "closed" }
639
- };
640
- });
641
- }
642
- #close = (initializeDeferredDecorator(this, "close"), void 0);
643
- }
644
- shim({ Report });
645
- let { operations: lowered } = await lower(Report);
646
- assert.false(lowered.close.optimistic, "the author's override reaches the client unchanged");
647
- });
648
- (0, import_qunit.test)("a non-grantable declaration is carried through, and nothing else is marked", async function(assert) {
649
- let { field, contains, containsMany, CardDef } = api;
650
- let { operation } = operations;
651
- class Ledger extends CardDef {
652
- static displayName = "Ledger";
653
- static {
654
- decorateFieldV2(this.prototype, "status", [field], function() {
655
- return contains(StringField);
656
- });
657
- }
658
- #status = (initializeDeferredDecorator(this, "status"), void 0);
659
- static {
660
- decorateFieldV2(this.prototype, "entries", [field], function() {
661
- return containsMany(StringField);
662
- });
663
- }
664
- #entries = (initializeDeferredDecorator(this, "entries"), void 0);
665
- static {
666
- decorateFieldV2(this, "seal", [operation], function() {
667
- return {
668
- base: "transform",
669
- nonGrantable: true,
670
- set: { status: "sealed" }
671
- };
672
- });
673
- }
674
- #seal = (initializeDeferredDecorator(this, "seal"), void 0);
675
- static {
676
- decorateFieldV2(this, "reopen", [operation], function() {
677
- return {
678
- base: "transform",
679
- set: { status: "open" }
680
- };
681
- });
682
- }
683
- #reopen = (initializeDeferredDecorator(this, "reopen"), void 0);
684
- static {
685
- decorateFieldV2(this, "appendContainsMany", [operation], function() {
686
- return {
687
- base: "appendContainsMany",
688
- nonGrantable: true
689
- };
690
- });
691
- }
692
- #appendContainsMany = (initializeDeferredDecorator(this, "appendContainsMany"), void 0);
693
- static {
694
- decorateFieldV2(this, "broken", [operation], function() {
695
- return {
696
- base: "transform",
697
- nonGrantable: true,
698
- set: { missing: "x" }
699
- };
700
- });
701
- }
702
- #broken = (initializeDeferredDecorator(this, "broken"), void 0);
703
- }
704
- shim({ Ledger });
705
- let { operations: lowered, issues } = await lower(Ledger);
706
- assert.deepEqual(issues.map((issue) => `${issue.operation}: ${issue.code}`), ["broken: unknown-field"], "only the declaration naming a missing field has findings");
707
- assert.true(lowered.seal.nonGrantable, "the flag reaches the realm");
708
- assert.false("nonGrantable" in lowered.reopen, "a declaration that does not ask carries no flag");
709
- assert.deepEqual(lowered.appendContainsMany, {
710
- base: "appendContainsMany",
711
- deterministic: true,
712
- nonGrantable: true
713
- }, "the built-in append, marked, lowers to no items, which the executor reads as the built-in");
714
- assert.true(lowered.broken.invalid, "the broken declaration is invalid");
715
- assert.true(lowered.broken.nonGrantable, "and a finding against it does not make it grantable");
716
- });
717
- (0, import_qunit.test)("a label is lowered onto the entry as written, on every base", async function(assert) {
718
- let { field, contains, containsMany, CardDef } = api;
719
- let { operation } = operations;
720
- class Inbox extends CardDef {
721
- static displayName = "Inbox";
722
- static {
723
- decorateFieldV2(this.prototype, "status", [field], function() {
724
- return contains(StringField);
725
- });
726
- }
727
- #status = (initializeDeferredDecorator(this, "status"), void 0);
728
- static {
729
- decorateFieldV2(this.prototype, "notes", [field], function() {
730
- return containsMany(StringField);
731
- });
732
- }
733
- #notes = (initializeDeferredDecorator(this, "notes"), void 0);
734
- static {
735
- decorateFieldV2(this, "archive", [operation], function() {
736
- return {
737
- base: "transform",
738
- label: "Archive this inbox",
739
- set: { status: "archived" }
740
- };
741
- });
742
- }
743
- #archive = (initializeDeferredDecorator(this, "archive"), void 0);
744
- static {
745
- decorateFieldV2(this, "read", [operation], function() {
746
- return {
747
- base: "read",
748
- label: "Read your inbox"
749
- };
750
- });
751
- }
752
- #read = (initializeDeferredDecorator(this, "read"), void 0);
753
- static {
754
- decorateFieldV2(this, "appendContainsMany", [operation], function() {
755
- return {
756
- base: "appendContainsMany",
757
- label: "Add a note"
758
- };
759
- });
760
- }
761
- #appendContainsMany = (initializeDeferredDecorator(this, "appendContainsMany"), void 0);
762
- static {
763
- decorateFieldV2(this, "reopen", [operation], function() {
764
- return {
765
- base: "transform",
766
- set: { status: "open" }
767
- };
768
- });
769
- }
770
- #reopen = (initializeDeferredDecorator(this, "reopen"), void 0);
771
- }
772
- shim({ Inbox });
773
- let { operations: lowered, issues } = await lower(Inbox);
774
- assert.deepEqual(issues, [], "a valid label is no finding");
775
- assert.strictEqual(lowered.archive.label, "Archive this inbox");
776
- assert.strictEqual(lowered.read.label, "Read your inbox");
777
- assert.deepEqual(lowered.appendContainsMany, {
778
- base: "appendContainsMany",
779
- deterministic: true,
780
- label: "Add a note"
781
- }, "the label rides beside the rest of the lowered declaration");
782
- assert.false("label" in lowered.reopen, "a declaration without a label lowers exactly as before");
783
- let context = {
784
- definition: buildDefinition(Inbox),
785
- lookupDefinition,
786
- identifyCard: (target) => identifyCard(target)
787
- };
788
- let refused = await lowerOperationDeclarations({
789
- empty: {
790
- base: "update",
791
- label: " "
792
- },
793
- long: {
794
- base: "update",
795
- label: "x".repeat(81)
796
- },
797
- markup: {
798
- base: "update",
799
- label: "<b>Archive</b>"
800
- },
801
- multiline: {
802
- base: "update",
803
- label: "Archive\nthis inbox"
804
- },
805
- notText: {
806
- base: "update",
807
- label: 42
808
- }
809
- }, context);
810
- assert.deepEqual(refused.issues.map((issue) => `${issue.operation} ${issue.path}: ${issue.code}`), [
811
- "empty label: invalid-label",
812
- "long label: invalid-label",
813
- "markup label: invalid-label",
814
- "multiline label: invalid-label",
815
- "notText label: invalid-label"
816
- ]);
817
- for (let name of Object.keys(refused.operations)) {
818
- assert.true(refused.operations[name].invalid, `${name} is invalid`);
819
- assert.false("label" in refused.operations[name], `${name} stores no label`);
820
- assert.deepEqual(refused.operations[name].issues?.map((issue) => issue.code), ["invalid-label"], `${name} carries its finding`);
821
- }
822
- });
823
- (0, import_qunit.test)("an explain lowers to its params, and is non-grantable whatever reaches lowering", async function(assert) {
824
- let { CardDef } = api;
825
- let { operation } = operations;
826
- class Policy extends CardDef {
827
- static displayName = "Policy";
828
- static {
829
- decorateFieldV2(this, "explain", [operation], function() {
830
- return {
831
- base: "explain",
832
- params: {
833
- actor: StringField,
834
- target: StringField,
835
- operation: StringField
836
- },
837
- nonGrantable: true
838
- };
839
- });
840
- }
841
- #explain = (initializeDeferredDecorator(this, "explain"), void 0);
842
- }
843
- shim({ Policy });
844
- let { operations: lowered, issues } = await lower(Policy);
845
- assert.deepEqual(issues, [], "the declaration lowers clean");
846
- assert.strictEqual(lowered.explain.base, "explain");
847
- assert.deepEqual(Object.keys(lowered.explain.params ?? {}).sort(), [
848
- "actor",
849
- "operation",
850
- "target"
851
- ], "the question travels as declared params");
852
- assert.true(lowered.explain.nonGrantable, "the flag reaches the realm");
853
- let context = {
854
- definition: buildDefinition(Policy),
855
- lookupDefinition,
856
- identifyCard: (target) => identifyCard(target)
857
- };
858
- let unmarked = await lowerOperationDeclarations({ explain: { base: "explain" } }, context);
859
- assert.true(unmarked.operations.explain.nonGrantable, "an explain is never grantable, flag or no flag");
860
- let projected = await lowerOperationDeclarations({ explain: {
861
- base: "explain",
862
- nonGrantable: true,
863
- output: { decision: { $bxl: ".decision" } }
864
- } }, context);
865
- assert.deepEqual(codes(projected), ["unrunnable-program"], "a projection over the explanation is recorded as never reached");
866
- assert.true(projected.operations.explain.invalid);
867
- });
868
- (0, import_qunit.test)("a validate lowers with no payload, and is non-grantable whatever reaches lowering", async function(assert) {
869
- let { CardDef } = api;
870
- let { operation } = operations;
871
- class Policy extends CardDef {
872
- static displayName = "Policy";
873
- static {
874
- decorateFieldV2(this, "validate", [operation], function() {
875
- return {
876
- base: "validate",
877
- nonGrantable: true
878
- };
879
- });
880
- }
881
- #validate = (initializeDeferredDecorator(this, "validate"), void 0);
882
- }
883
- shim({ Policy });
884
- let { operations: lowered, issues } = await lower(Policy);
885
- assert.deepEqual(issues, [], "the declaration lowers clean");
886
- assert.strictEqual(lowered.validate.base, "validate");
887
- assert.true(lowered.validate.nonGrantable, "the flag reaches the realm");
888
- let context = {
889
- definition: buildDefinition(Policy),
890
- lookupDefinition,
891
- identifyCard: (target) => identifyCard(target)
892
- };
893
- let unmarked = await lowerOperationDeclarations({ validate: { base: "validate" } }, context);
894
- assert.true(unmarked.operations.validate.nonGrantable, "a validate is never grantable, flag or no flag");
895
- let projected = await lowerOperationDeclarations({ validate: {
896
- base: "validate",
897
- nonGrantable: true,
898
- output: { issues: { $bxl: ".issues" } }
899
- } }, context);
900
- assert.deepEqual(codes(projected), ["unrunnable-program"], "a projection over the validation is recorded as never reached");
901
- assert.true(projected.operations.validate.invalid);
902
- let withPayload = await lowerOperationDeclarations({ validate: {
903
- base: "validate",
904
- nonGrantable: true,
905
- params: { realm: { type: "string" } },
906
- input: { $bxl: "{ strict: true }" }
907
- } }, context);
908
- assert.deepEqual(withPayload.issues.map((issue) => [issue.code, issue.path]), [["unrunnable-program", "params"], ["unrunnable-program", "input"]], "a payload stage on a validate is recorded as never read");
909
- assert.strictEqual(withPayload.operations.validate.params, void 0, "and no payload schema is stored for one");
910
- assert.strictEqual(withPayload.operations.validate.input, void 0);
911
- });
912
- (0, import_qunit.test)("an appendLine on a file def lowers to its payload and nothing else", async function(assert) {
913
- let { FileDef } = api;
914
- let { operation } = operations;
915
- class LogFile extends FileDef {
916
- static displayName = "LogFile";
917
- static {
918
- decorateFieldV2(this, "record", [operation], function() {
919
- return {
920
- base: "appendLine",
921
- params: { line: StringField }
922
- };
923
- });
924
- }
925
- #record = (initializeDeferredDecorator(this, "record"), void 0);
926
- }
927
- shim({ LogFile });
928
- let { operations: lowered, issues } = await lower(LogFile);
929
- assert.deepEqual(issues, [], "the declaration lowers cleanly");
930
- assert.deepEqual(lowered.record, {
931
- base: "appendLine",
932
- params: { line: {
933
- kind: "field",
934
- codeRef: identifyCard(StringField)
935
- } },
936
- deterministic: true
937
- }, "there is no program: the base operation appends the line the payload carries");
938
- });
939
- (0, import_qunit.test)("an appendContainsMany keeps its item a marker-carrying template, per field", async function(assert) {
940
- let { field, contains, containsMany, CardDef } = api;
941
- let { operation, params, linkTo } = operations;
942
- class EventLog extends CardDef {
943
- static displayName = "EventLog";
944
- static {
945
- decorateFieldV2(this.prototype, "title", [field], function() {
946
- return contains(StringField);
947
- });
948
- }
949
- #title = (initializeDeferredDecorator(this, "title"), void 0);
950
- static {
951
- decorateFieldV2(this.prototype, "events", [field], function() {
952
- return containsMany(fixtures.Comment);
953
- });
954
- }
955
- #events = (initializeDeferredDecorator(this, "events"), void 0);
956
- static {
957
- decorateFieldV2(this.prototype, "labels", [field], function() {
958
- return containsMany(StringField);
959
- });
960
- }
961
- #labels = (initializeDeferredDecorator(this, "labels"), void 0);
962
- static {
963
- decorateFieldV2(this, "log", [operation], function() {
964
- return {
965
- base: "appendContainsMany",
966
- params: {
967
- body: StringField,
968
- author: linkTo(() => fixtures.Author)
969
- },
970
- field: "events",
971
- item: {
972
- body: params("body"),
973
- author: params("author")
974
- }
975
- };
976
- });
977
- }
978
- #log = (initializeDeferredDecorator(this, "log"), void 0);
979
- static {
980
- decorateFieldV2(this, "logBoth", [operation], function() {
981
- return {
982
- base: "appendContainsMany",
983
- params: {
984
- body: StringField,
985
- label: StringField
986
- },
987
- fields: {
988
- events: { body: params("body") },
989
- labels: params("label")
990
- }
991
- };
992
- });
993
- }
994
- #logBoth = (initializeDeferredDecorator(this, "logBoth"), void 0);
995
- }
996
- shim({ EventLog });
997
- let { operations: lowered, issues } = await lower(EventLog);
998
- assert.deepEqual(issues, [], "both declarations lower cleanly");
999
- assert.deepEqual(lowered.log.items, { events: {
1000
- body: {
1001
- $ref: "params",
1002
- key: "body"
1003
- },
1004
- author: {
1005
- $ref: "params",
1006
- key: "author"
1007
- }
1008
- } }, "the item reaches the realm as data to substitute into the stored file, not as a program");
1009
- assert.strictEqual(lowered.log.program, void 0, "an append runs no BXL at all");
1010
- assert.deepEqual(lowered.logBoth.items, {
1011
- events: { body: {
1012
- $ref: "params",
1013
- key: "body"
1014
- } },
1015
- labels: {
1016
- $ref: "params",
1017
- key: "label"
1018
- }
1019
- }, "each named field carries its own item, and a collection of primitives takes a bare value");
1020
- });
1021
- (0, import_qunit.test)("an item member is lowered against the field it lands in", async function(assert) {
1022
- let { field, containsMany, CardDef } = api;
1023
- let { operation, actor } = operations;
1024
- class EventLog extends CardDef {
1025
- static displayName = "EventLog";
1026
- static {
1027
- decorateFieldV2(this.prototype, "events", [field], function() {
1028
- return containsMany(fixtures.Comment);
1029
- });
1030
- }
1031
- #events = (initializeDeferredDecorator(this, "events"), void 0);
1032
- static {
1033
- decorateFieldV2(this, "log", [operation], function() {
1034
- return {
1035
- base: "appendContainsMany",
1036
- field: "events",
1037
- item: {
1038
- body: actor(),
1039
- author: actor()
1040
- }
1041
- };
1042
- });
1043
- }
1044
- #log = (initializeDeferredDecorator(this, "log"), void 0);
1045
- }
1046
- shim({ EventLog });
1047
- let result = await lower(EventLog);
1048
- assert.deepEqual(result.issues.map((issue) => [issue.code, issue.path]), [["actor-not-a-card", "item.author"]], "only the member whose field is a link is refused");
1049
- assert.deepEqual(result.operations.log.items, { events: {
1050
- body: { $ref: "actor" },
1051
- author: { $ref: "actor" }
1052
- } }, "and both are stored as written, so invoking it reports the finding");
1053
- });
1054
- (0, import_qunit.test)("a realmConfig reference lowers to the builtin in a program and stays a marker in a template", async function(assert) {
1055
- let { field, contains, containsMany, CardDef } = api;
1056
- let { operation, realmConfig } = operations;
1057
- class Report extends CardDef {
1058
- static displayName = "Report";
1059
- static {
1060
- decorateFieldV2(this.prototype, "status", [field], function() {
1061
- return contains(StringField);
1062
- });
1063
- }
1064
- #status = (initializeDeferredDecorator(this, "status"), void 0);
1065
- static {
1066
- decorateFieldV2(this.prototype, "tags", [field], function() {
1067
- return containsMany(StringField);
1068
- });
1069
- }
1070
- #tags = (initializeDeferredDecorator(this, "tags"), void 0);
1071
- static {
1072
- decorateFieldV2(this.prototype, "events", [field], function() {
1073
- return containsMany(fixtures.Comment);
1074
- });
1075
- }
1076
- #events = (initializeDeferredDecorator(this, "events"), void 0);
1077
- static {
1078
- decorateFieldV2(this, "escalate", [operation], function() {
1079
- return {
1080
- base: "transform",
1081
- set: { status: realmConfig("escalatedStatus") },
1082
- append: {
1083
- to: "tags",
1084
- value: realmConfig()
1085
- }
1086
- };
1087
- });
1088
- }
1089
- #escalate = (initializeDeferredDecorator(this, "escalate"), void 0);
1090
- static {
1091
- decorateFieldV2(this, "logDefault", [operation], function() {
1092
- return {
1093
- base: "appendContainsMany",
1094
- field: "events",
1095
- item: { body: realmConfig("defaultNote") }
1096
- };
1097
- });
1098
- }
1099
- #logDefault = (initializeDeferredDecorator(this, "logDefault"), void 0);
1100
- static {
1101
- decorateFieldV2(this, "open", [operation], function() {
1102
- return {
1103
- base: "create",
1104
- of: () => fixtures.Activity,
1105
- fill: { label: realmConfig("defaultLabel") }
1106
- };
1107
- });
1108
- }
1109
- #open = (initializeDeferredDecorator(this, "open"), void 0);
1110
- }
1111
- shim({ Report });
1112
- let { operations: lowered, issues } = await lower(Report);
1113
- assert.deepEqual(issues, [], "a setting name is never checked here");
1114
- assert.strictEqual(lowered.escalate.program?.source, ".status=realmConfig(\"escalatedStatus\");\nappend(.tags;realmConfig());", "the marker lowers to the builtin of the same name, with and without a setting to read");
1115
- assert.deepEqual(lowered.logDefault.items, { events: { body: {
1116
- $ref: "realmConfig",
1117
- key: "defaultNote"
1118
- } } }, "a template carries the marker rather than a value, since which realm the operation runs in is not known here");
1119
- assert.deepEqual(lowered.open.fill, { label: {
1120
- $ref: "realmConfig",
1121
- key: "defaultLabel"
1122
- } }, "the same in a create");
1123
- assert.true(lowered.escalate.deterministic, "a realm setting is fixed for a given request, the way the rest of the context is");
1124
- });
1125
- (0, import_qunit.test)("a volatile call makes an operation non-deterministic; the request context does not", async function(assert) {
1126
- let { field, contains, CardDef } = api;
1127
- let { operation, params, actor, bxl } = operations;
1128
- class Report extends CardDef {
1129
- static displayName = "Report";
1130
- static {
1131
- decorateFieldV2(this.prototype, "title", [field], function() {
1132
- return contains(StringField);
1133
- });
1134
- }
1135
- #title = (initializeDeferredDecorator(this, "title"), void 0);
1136
- static {
1137
- decorateFieldV2(this, "stamped", [operation], function() {
1138
- return {
1139
- base: "read",
1140
- output: bxl`{ label: .title, at: TODAY() }`
1141
- };
1142
- });
1143
- }
1144
- #stamped = (initializeDeferredDecorator(this, "stamped"), void 0);
1145
- static {
1146
- decorateFieldV2(this, "contextual", [operation], function() {
1147
- return {
1148
- base: "transform",
1149
- params: { note: StringField },
1150
- set: { title: params("note") },
1151
- output: { who: actor() }
1152
- };
1153
- });
1154
- }
1155
- #contextual = (initializeDeferredDecorator(this, "contextual"), void 0);
1156
- }
1157
- shim({ Report });
1158
- let { operations: lowered } = await lower(Report);
1159
- assert.false(lowered.stamped.deterministic, "TODAY() yields a different value on every run, so the ledger cannot replay it locally");
1160
- assert.true(lowered.contextual.deterministic, "params(), actor() and instance() are fixed for a given request");
1161
- });
1162
- (0, import_qunit.test)("a field named after a volatile builtin is not read as a call", async function(assert) {
1163
- let { field, contains, CardDef } = api;
1164
- let { operation } = operations;
1165
- class Report extends CardDef {
1166
- static displayName = "Report";
1167
- static {
1168
- decorateFieldV2(this.prototype, "today", [field], function() {
1169
- return contains(StringField);
1170
- });
1171
- }
1172
- #today = (initializeDeferredDecorator(this, "today"), void 0);
1173
- static {
1174
- decorateFieldV2(this, "touch", [operation], function() {
1175
- return {
1176
- base: "transform",
1177
- set: { today: "noted" }
1178
- };
1179
- });
1180
- }
1181
- #touch = (initializeDeferredDecorator(this, "touch"), void 0);
1182
- }
1183
- shim({ Report });
1184
- let { operations: lowered } = await lower(Report);
1185
- assert.strictEqual(lowered.touch.program?.source, ".today=\"noted\";");
1186
- assert.true(lowered.touch.deterministic, "a field access is not a volatile call");
1187
- });
1188
- (0, import_qunit.test)("a clause naming a field the type does not have is recorded", async function(assert) {
1189
- let { field, contains, CardDef } = api;
1190
- let { operation } = operations;
1191
- class Report extends CardDef {
1192
- static displayName = "Report";
1193
- static {
1194
- decorateFieldV2(this.prototype, "title", [field], function() {
1195
- return contains(StringField);
1196
- });
1197
- }
1198
- #title = (initializeDeferredDecorator(this, "title"), void 0);
1199
- static {
1200
- decorateFieldV2(this, "close", [operation], function() {
1201
- return {
1202
- base: "transform",
1203
- set: { staus: "closed" }
1204
- };
1205
- });
1206
- }
1207
- #close = (initializeDeferredDecorator(this, "close"), void 0);
1208
- }
1209
- shim({ Report });
1210
- let result = await lower(Report);
1211
- assert.deepEqual(codes(result), ["unknown-field"]);
1212
- assert.strictEqual(result.issues[0].operation, "close");
1213
- assert.strictEqual(result.issues[0].path, "set.staus");
1214
- assert.strictEqual(result.issues[0].message, "\"staus\" is not a field of this type");
1215
- let lowered = result.operations.close;
1216
- assert.true(lowered.invalid, "the operation is stored flagged invalid, so invoking it reports the problem rather than reading as unknown");
1217
- assert.deepEqual(lowered.issues, result.issues);
1218
- assert.strictEqual(lowered.program, void 0, "and carries no program, since the statement it would have emitted names nothing");
1219
- });
1220
- (0, import_qunit.test)("an unknown field inside an appended value is recorded at whatever depth it sits", async function(assert) {
1221
- let { field, contains, containsMany, CardDef } = api;
1222
- let { operation, params } = operations;
1223
- class Report extends CardDef {
1224
- static displayName = "Report";
1225
- static {
1226
- decorateFieldV2(this.prototype, "comments", [field], function() {
1227
- return containsMany(fixtures.Comment);
1228
- });
1229
- }
1230
- #comments = (initializeDeferredDecorator(this, "comments"), void 0);
1231
- static {
1232
- decorateFieldV2(this.prototype, "title", [field], function() {
1233
- return contains(StringField);
1234
- });
1235
- }
1236
- #title = (initializeDeferredDecorator(this, "title"), void 0);
1237
- static {
1238
- decorateFieldV2(this, "addComment", [operation], function() {
1239
- return {
1240
- base: "transform",
1241
- params: {
1242
- body: StringField,
1243
- city: StringField
1244
- },
1245
- append: {
1246
- to: "comments",
1247
- value: {
1248
- body: params("body"),
1249
- bdy: "x",
1250
- where: {
1251
- city: params("city"),
1252
- citty: "x"
1253
- }
1254
- }
1255
- }
1256
- };
1257
- });
1258
- }
1259
- #addComment = (initializeDeferredDecorator(this, "addComment"), void 0);
1260
- }
1261
- shim({ Report });
1262
- let result = await lower(Report);
1263
- assert.deepEqual(codes(result), ["unknown-field", "unknown-field"]);
1264
- assert.deepEqual(result.issues.map((issue) => issue.path), ["append.value.bdy", "append.value.where.citty"]);
1265
- assert.true(result.issues[0].message.includes("Comment"), "the message names the item type the key was checked against");
1266
- assert.true(result.issues[1].message.includes("Address"), "and the nested key is checked against the type that actually holds it");
1267
- });
1268
- (0, import_qunit.test)("params() for a key the schema does not declare is refused in a clause and recorded in a program", async function(assert) {
1269
- let { field, contains, CardDef } = api;
1270
- let { operation, params, bxl } = operations;
1271
- assert.throws(() => {
1272
- class Flawed extends CardDef {
1273
- static displayName = "Flawed";
1274
- static {
1275
- decorateFieldV2(this.prototype, "status", [field], function() {
1276
- return contains(StringField);
1277
- });
1278
- }
1279
- #status = (initializeDeferredDecorator(this, "status"), void 0);
1280
- static {
1281
- decorateFieldV2(this, "close", [operation], function() {
1282
- return {
1283
- base: "transform",
1284
- params: { note: StringField },
1285
- set: { status: params("reason") }
1286
- };
1287
- });
1288
- }
1289
- #close = (initializeDeferredDecorator(this, "close"), void 0);
1290
- }
1291
- return Flawed;
1292
- }, /references the param "reason", which the `params` schema does not declare/, "an undeclared param in a clause never reaches lowering");
1293
- class Report extends CardDef {
1294
- static displayName = "Report";
1295
- static {
1296
- decorateFieldV2(this.prototype, "status", [field], function() {
1297
- return contains(StringField);
1298
- });
1299
- }
1300
- #status = (initializeDeferredDecorator(this, "status"), void 0);
1301
- static {
1302
- decorateFieldV2(this, "raw", [operation], function() {
1303
- return {
1304
- base: "transform",
1305
- params: { note: StringField },
1306
- transformations: bxl`.status = params("reason");`
1307
- };
1308
- });
1309
- }
1310
- #raw = (initializeDeferredDecorator(this, "raw"), void 0);
1311
- }
1312
- shim({ Report });
1313
- let result = await lower(Report);
1314
- assert.deepEqual(codes(result), ["undeclared-param"]);
1315
- assert.deepEqual(result.issues.map((issue) => issue.operation), ["raw"]);
1316
- assert.strictEqual(result.issues[0].path, "transformations", "the finding points at the program rather than at a clause");
1317
- });
1318
- (0, import_qunit.test)("card() naming a link identity lowers the same as naming it bare", async function(assert) {
1319
- let { field, contains, linksTo, linksToMany, CardDef } = api;
1320
- let { operation, params, card, linkTo } = operations;
1321
- class Report extends CardDef {
1322
- static displayName = "Report";
1323
- static {
1324
- decorateFieldV2(this.prototype, "title", [field], function() {
1325
- return contains(StringField);
1326
- });
1327
- }
1328
- #title = (initializeDeferredDecorator(this, "title"), void 0);
1329
- static {
1330
- decorateFieldV2(this.prototype, "owner", [field], function() {
1331
- return linksTo(() => fixtures.Author);
1332
- });
1333
- }
1334
- #owner = (initializeDeferredDecorator(this, "owner"), void 0);
1335
- static {
1336
- decorateFieldV2(this.prototype, "reviewers", [field], function() {
1337
- return linksToMany(() => fixtures.Author, { searchable: true });
1338
- });
1339
- }
1340
- #reviewers = (initializeDeferredDecorator(this, "reviewers"), void 0);
1341
- static {
1342
- decorateFieldV2(this, "assignBare", [operation], function() {
1343
- return {
1344
- base: "transform",
1345
- params: { who: linkTo(() => fixtures.Author) },
1346
- set: { owner: params("who") }
1347
- };
1348
- });
1349
- }
1350
- #assignBare = (initializeDeferredDecorator(this, "assignBare"), void 0);
1351
- static {
1352
- decorateFieldV2(this, "assignExplicit", [operation], function() {
1353
- return {
1354
- base: "transform",
1355
- params: { who: linkTo(() => fixtures.Author) },
1356
- set: { owner: card(params("who")) }
1357
- };
1358
- });
1359
- }
1360
- #assignExplicit = (initializeDeferredDecorator(this, "assignExplicit"), void 0);
1361
- static {
1362
- decorateFieldV2(this, "enrolExplicit", [operation], function() {
1363
- return {
1364
- base: "transform",
1365
- params: { who: linkTo(() => fixtures.Author) },
1366
- append: {
1367
- to: "reviewers",
1368
- value: card(params("who"))
1369
- }
1370
- };
1371
- });
1372
- }
1373
- #enrolExplicit = (initializeDeferredDecorator(this, "enrolExplicit"), void 0);
1374
- }
1375
- shim({ Report });
1376
- let { operations: lowered, issues } = await lower(Report);
1377
- assert.deepEqual(issues, [], "the declarations lower cleanly");
1378
- assert.strictEqual(lowered.assignExplicit.program?.source, ".owner=card(params(\"who\"));");
1379
- assert.strictEqual(lowered.assignBare.program?.source, lowered.assignExplicit.program?.source, "the two spellings are the same program");
1380
- assert.strictEqual(lowered.enrolExplicit.program?.source, "append(.reviewers;card(params(\"who\")));");
1381
- });
1382
- (0, import_qunit.test)("a contained value written whole may leave its link empty", async function(assert) {
1383
- let { field, contains, containsMany, CardDef } = api;
1384
- let { operation, params } = operations;
1385
- class Report extends CardDef {
1386
- static displayName = "Report";
1387
- static {
1388
- decorateFieldV2(this.prototype, "title", [field], function() {
1389
- return contains(StringField);
1390
- });
1391
- }
1392
- #title = (initializeDeferredDecorator(this, "title"), void 0);
1393
- static {
1394
- decorateFieldV2(this.prototype, "comments", [field], function() {
1395
- return containsMany(fixtures.Comment);
1396
- });
1397
- }
1398
- #comments = (initializeDeferredDecorator(this, "comments"), void 0);
1399
- static {
1400
- decorateFieldV2(this, "addComment", [operation], function() {
1401
- return {
1402
- base: "transform",
1403
- params: { body: StringField },
1404
- append: {
1405
- to: "comments",
1406
- value: {
1407
- body: params("body"),
1408
- author: null
1409
- }
1410
- }
1411
- };
1412
- });
1413
- }
1414
- #addComment = (initializeDeferredDecorator(this, "addComment"), void 0);
1415
- }
1416
- shim({ Report });
1417
- let result = await lower(Report);
1418
- assert.deepEqual(codes(result), []);
1419
- assert.strictEqual(result.operations.addComment.program?.source, "append(.comments;{body:params(\"body\"),author:null});");
1420
- assert.notOk(result.operations.addComment.invalid);
1421
- });
1422
- (0, import_qunit.test)("a value in a link position that is not a card identity is recorded", async function(assert) {
1423
- let { field, contains, linksTo, linksToMany, CardDef } = api;
1424
- let { operation } = operations;
1425
- class Report extends CardDef {
1426
- static displayName = "Report";
1427
- static {
1428
- decorateFieldV2(this.prototype, "title", [field], function() {
1429
- return contains(StringField);
1430
- });
1431
- }
1432
- #title = (initializeDeferredDecorator(this, "title"), void 0);
1433
- static {
1434
- decorateFieldV2(this.prototype, "owner", [field], function() {
1435
- return linksTo(() => fixtures.Author);
1436
- });
1437
- }
1438
- #owner = (initializeDeferredDecorator(this, "owner"), void 0);
1439
- static {
1440
- decorateFieldV2(this.prototype, "reviewers", [field], function() {
1441
- return linksToMany(() => fixtures.Author, { searchable: true });
1442
- });
1443
- }
1444
- #reviewers = (initializeDeferredDecorator(this, "reviewers"), void 0);
1445
- static {
1446
- decorateFieldV2(this, "misassign", [operation], function() {
1447
- return {
1448
- base: "transform",
1449
- set: { owner: { name: "Ada" } }
1450
- };
1451
- });
1452
- }
1453
- #misassign = (initializeDeferredDecorator(this, "misassign"), void 0);
1454
- static {
1455
- decorateFieldV2(this, "unassign", [operation], function() {
1456
- return {
1457
- base: "transform",
1458
- set: { owner: null }
1459
- };
1460
- });
1461
- }
1462
- #unassign = (initializeDeferredDecorator(this, "unassign"), void 0);
1463
- static {
1464
- decorateFieldV2(this, "misappend", [operation], function() {
1465
- return {
1466
- base: "transform",
1467
- append: {
1468
- to: "reviewers",
1469
- value: 7
1470
- }
1471
- };
1472
- });
1473
- }
1474
- #misappend = (initializeDeferredDecorator(this, "misappend"), void 0);
1475
- }
1476
- shim({ Report });
1477
- let result = await lower(Report);
1478
- assert.deepEqual(codes(result), [
1479
- "link-requires-identity",
1480
- "link-requires-identity",
1481
- "link-requires-identity"
1482
- ]);
1483
- assert.deepEqual(result.issues.map((issue) => issue.path), [
1484
- "set.owner",
1485
- "set.owner",
1486
- "append.value"
1487
- ]);
1488
- assert.true(result.issues[1].message.includes("already empty"), "clearing a link is called out as its own missing spelling rather than as a bad value");
1489
- for (let name of [
1490
- "misassign",
1491
- "unassign",
1492
- "misappend"
1493
- ]) assert.true(result.operations[name].invalid, `${name} is flagged rather than stored as though it would run`);
1494
- });
1495
- (0, import_qunit.test)("a write into a computed field is recorded", async function(assert) {
1496
- let { field, contains, CardDef } = api;
1497
- let { operation } = operations;
1498
- class Report extends CardDef {
1499
- static displayName = "Report";
1500
- static {
1501
- decorateFieldV2(this.prototype, "title", [field], function() {
1502
- return contains(StringField);
1503
- });
1504
- }
1505
- #title = (initializeDeferredDecorator(this, "title"), void 0);
1506
- static {
1507
- decorateFieldV2(this.prototype, "slug", [field], function() {
1508
- return contains(StringField, { computeVia: function() {
1509
- return this.title;
1510
- } });
1511
- });
1512
- }
1513
- #slug = (initializeDeferredDecorator(this, "slug"), void 0);
1514
- static {
1515
- decorateFieldV2(this, "rename", [operation], function() {
1516
- return {
1517
- base: "transform",
1518
- set: { slug: "x" }
1519
- };
1520
- });
1521
- }
1522
- #rename = (initializeDeferredDecorator(this, "rename"), void 0);
1523
- }
1524
- shim({ Report });
1525
- let result = await lower(Report);
1526
- assert.deepEqual(codes(result), ["computed-write"]);
1527
- assert.strictEqual(result.issues[0].path, "set.slug");
1528
- });
1529
- (0, import_qunit.test)("a write through a link is recorded", async function(assert) {
1530
- let { field, contains, linksTo, CardDef } = api;
1531
- let { operation } = operations;
1532
- class Report extends CardDef {
1533
- static displayName = "Report";
1534
- static {
1535
- decorateFieldV2(this.prototype, "title", [field], function() {
1536
- return contains(StringField);
1537
- });
1538
- }
1539
- #title = (initializeDeferredDecorator(this, "title"), void 0);
1540
- static {
1541
- decorateFieldV2(this.prototype, "owner", [field], function() {
1542
- return linksTo(() => fixtures.Author, { searchable: true });
1543
- });
1544
- }
1545
- #owner = (initializeDeferredDecorator(this, "owner"), void 0);
1546
- static {
1547
- decorateFieldV2(this, "rename", [operation], function() {
1548
- return {
1549
- base: "transform",
1550
- set: { "owner.name": "x" }
1551
- };
1552
- });
1553
- }
1554
- #rename = (initializeDeferredDecorator(this, "rename"), void 0);
1555
- }
1556
- shim({ Report });
1557
- let result = await lower(Report);
1558
- assert.deepEqual(codes(result), ["write-through-link"]);
1559
- assert.strictEqual(result.issues[0].path, "set.owner.name", "an operation binds to its target card, not to the cards it links to");
1560
- });
1561
- (0, import_qunit.test)("a read through a link that is not searchable is recorded", async function(assert) {
1562
- let { field, containsMany, linksTo, CardDef } = api;
1563
- let { operation, params } = operations;
1564
- class Tagger extends CardDef {
1565
- static displayName = "Tagger";
1566
- static {
1567
- decorateFieldV2(this.prototype, "tags", [field], function() {
1568
- return containsMany(StringField);
1569
- });
1570
- }
1571
- #tags = (initializeDeferredDecorator(this, "tags"), void 0);
1572
- }
1573
- shim({ Tagger });
1574
- class Report extends CardDef {
1575
- static displayName = "Report";
1576
- static {
1577
- decorateFieldV2(this.prototype, "owner", [field], function() {
1578
- return linksTo(() => Tagger);
1579
- });
1580
- }
1581
- #owner = (initializeDeferredDecorator(this, "owner"), void 0);
1582
- static {
1583
- decorateFieldV2(this, "claim", [operation], function() {
1584
- return {
1585
- base: "transform",
1586
- params: { who: StringField },
1587
- assert: {
1588
- unique: "owner.tags",
1589
- by: params("who"),
1590
- snapshot: true
1591
- }
1592
- };
1593
- });
1594
- }
1595
- #claim = (initializeDeferredDecorator(this, "claim"), void 0);
1596
- }
1597
- shim({ Report });
1598
- let result = await lower(Report);
1599
- assert.deepEqual(codes(result), ["unsearchable-read"]);
1600
- assert.true(result.issues[0].message.includes("searchable"), "the message says what makes a linked card's values reachable");
1601
- });
1602
- (0, import_qunit.test)("an assert over computed or linked values without a snapshot is recorded", async function(assert) {
1603
- let { field, contains, linksToMany, CardDef } = api;
1604
- let { operation, params } = operations;
1605
- class Report extends CardDef {
1606
- static displayName = "Report";
1607
- static {
1608
- decorateFieldV2(this.prototype, "title", [field], function() {
1609
- return contains(StringField);
1610
- });
1611
- }
1612
- #title = (initializeDeferredDecorator(this, "title"), void 0);
1613
- static {
1614
- decorateFieldV2(this.prototype, "reviewers", [field], function() {
1615
- return linksToMany(() => fixtures.Author, { searchable: true });
1616
- });
1617
- }
1618
- #reviewers = (initializeDeferredDecorator(this, "reviewers"), void 0);
1619
- static {
1620
- decorateFieldV2(this, "addReviewer", [operation], function() {
1621
- return {
1622
- base: "transform",
1623
- params: { who: StringField },
1624
- assert: {
1625
- unique: "reviewers",
1626
- by: params("who")
1627
- }
1628
- };
1629
- });
1630
- }
1631
- #addReviewer = (initializeDeferredDecorator(this, "addReviewer"), void 0);
1632
- }
1633
- shim({ Report });
1634
- let result = await lower(Report);
1635
- assert.deepEqual(codes(result), ["unsnapshotted-assert"]);
1636
- assert.true(result.issues[0].message.includes("snapshot: true"), "the message names the clause that resolves it");
1637
- assert.strictEqual(result.operations.addReviewer.program?.source, "assert(all(.reviewers[];.id!=params(\"who\"));\"reviewers already holds this value\");", "the program is still emitted, so the operation says what it would do");
1638
- });
1639
- (0, import_qunit.test)("replacing a whole link collection is recorded — a relationship changes one edge at a time", async function(assert) {
1640
- let { field, contains, linksToMany, CardDef } = api;
1641
- let { operation, params } = operations;
1642
- class Report extends CardDef {
1643
- static displayName = "Report";
1644
- static {
1645
- decorateFieldV2(this.prototype, "title", [field], function() {
1646
- return contains(StringField);
1647
- });
1648
- }
1649
- #title = (initializeDeferredDecorator(this, "title"), void 0);
1650
- static {
1651
- decorateFieldV2(this.prototype, "reviewers", [field], function() {
1652
- return linksToMany(() => fixtures.Author);
1653
- });
1654
- }
1655
- #reviewers = (initializeDeferredDecorator(this, "reviewers"), void 0);
1656
- static {
1657
- decorateFieldV2(this, "reassign", [operation], function() {
1658
- return {
1659
- base: "transform",
1660
- params: { who: StringField },
1661
- set: { reviewers: [params("who")] }
1662
- };
1663
- });
1664
- }
1665
- #reassign = (initializeDeferredDecorator(this, "reassign"), void 0);
1666
- }
1667
- shim({ Report });
1668
- let result = await lower(Report);
1669
- assert.deepEqual(codes(result), ["link-collection-replace"]);
1670
- assert.true(result.issues[0].message.includes("append"), "the message names the clause that does express the change");
1671
- assert.strictEqual(result.operations.reassign.program, void 0, "and no program is emitted, since an assignment here is not executable");
1672
- });
1673
- (0, import_qunit.test)("a write into a query-backed field or into `id` is recorded", async function(assert) {
1674
- let { field, contains, linksTo, CardDef } = api;
1675
- let { operation } = operations;
1676
- class Report extends CardDef {
1677
- static displayName = "Report";
1678
- static {
1679
- decorateFieldV2(this.prototype, "title", [field], function() {
1680
- return contains(StringField);
1681
- });
1682
- }
1683
- #title = (initializeDeferredDecorator(this, "title"), void 0);
1684
- static {
1685
- decorateFieldV2(this.prototype, "featured", [field], function() {
1686
- return linksTo(() => fixtures.Author, { query: { filter: { type: {
1687
- module: `${testRealmURL}author`,
1688
- name: "Author"
1689
- } } } });
1690
- });
1691
- }
1692
- #featured = (initializeDeferredDecorator(this, "featured"), void 0);
1693
- static {
1694
- decorateFieldV2(this, "feature", [operation], function() {
1695
- return {
1696
- base: "transform",
1697
- set: { featured: "http://example.com/a" }
1698
- };
1699
- });
1700
- }
1701
- #feature = (initializeDeferredDecorator(this, "feature"), void 0);
1702
- static {
1703
- decorateFieldV2(this, "rename", [operation], function() {
1704
- return {
1705
- base: "transform",
1706
- set: { id: "http://example.com/r" }
1707
- };
1708
- });
1709
- }
1710
- #rename = (initializeDeferredDecorator(this, "rename"), void 0);
1711
- }
1712
- shim({ Report });
1713
- let result = await lower(Report);
1714
- assert.deepEqual(codes(result), ["read-only-write", "read-only-write"]);
1715
- assert.true(result.issues[0].message.includes("query"), "a query-backed field holds no stored value to write");
1716
- assert.true(result.issues[1].message.includes("identity"), "and `id` is the card's identity rather than its data");
1717
- });
1718
- (0, import_qunit.test)("a path that continues past a collection is recorded — no item is named", async function(assert) {
1719
- let { field, contains, containsMany, CardDef } = api;
1720
- let { operation } = operations;
1721
- class Report extends CardDef {
1722
- static displayName = "Report";
1723
- static {
1724
- decorateFieldV2(this.prototype, "title", [field], function() {
1725
- return contains(StringField);
1726
- });
1727
- }
1728
- #title = (initializeDeferredDecorator(this, "title"), void 0);
1729
- static {
1730
- decorateFieldV2(this.prototype, "comments", [field], function() {
1731
- return containsMany(fixtures.Comment);
1732
- });
1733
- }
1734
- #comments = (initializeDeferredDecorator(this, "comments"), void 0);
1735
- static {
1736
- decorateFieldV2(this, "editComment", [operation], function() {
1737
- return {
1738
- base: "transform",
1739
- set: { "comments.body": "z" }
1740
- };
1741
- });
1742
- }
1743
- #editComment = (initializeDeferredDecorator(this, "editComment"), void 0);
1744
- }
1745
- shim({ Report });
1746
- let result = await lower(Report);
1747
- assert.deepEqual(codes(result), ["path-crosses-collection"]);
1748
- assert.true(result.issues[0].message.includes("which item"), "the message says what the declaration cannot express");
1749
- });
1750
- (0, import_qunit.test)("appending to a field that holds one value is recorded", async function(assert) {
1751
- let { field, contains, CardDef } = api;
1752
- let { operation } = operations;
1753
- class Report extends CardDef {
1754
- static displayName = "Report";
1755
- static {
1756
- decorateFieldV2(this.prototype, "title", [field], function() {
1757
- return contains(StringField);
1758
- });
1759
- }
1760
- #title = (initializeDeferredDecorator(this, "title"), void 0);
1761
- static {
1762
- decorateFieldV2(this, "addTitle", [operation], function() {
1763
- return {
1764
- base: "transform",
1765
- append: {
1766
- to: "title",
1767
- value: "x"
1768
- }
1769
- };
1770
- });
1771
- }
1772
- #addTitle = (initializeDeferredDecorator(this, "addTitle"), void 0);
1773
- }
1774
- shim({ Report });
1775
- let result = await lower(Report);
1776
- assert.deepEqual(codes(result), ["not-a-collection"]);
1777
- });
1778
- (0, import_qunit.test)("a raw program that does not parse is recorded", async function(assert) {
1779
- let { field, contains, CardDef } = api;
1780
- let { operation, bxl } = operations;
1781
- class Report extends CardDef {
1782
- static displayName = "Report";
1783
- static {
1784
- decorateFieldV2(this.prototype, "status", [field], function() {
1785
- return contains(StringField);
1786
- });
1787
- }
1788
- #status = (initializeDeferredDecorator(this, "status"), void 0);
1789
- static {
1790
- decorateFieldV2(this, "broken", [operation], function() {
1791
- return {
1792
- base: "transform",
1793
- transformations: bxl`.status = ;`
1794
- };
1795
- });
1796
- }
1797
- #broken = (initializeDeferredDecorator(this, "broken"), void 0);
1798
- }
1799
- shim({ Report });
1800
- let result = await lower(Report);
1801
- assert.deepEqual(codes(result), ["invalid-program"]);
1802
- assert.strictEqual(result.issues[0].path, "transformations");
1803
- assert.true(result.operations.broken.invalid, "the operation is stored so invoking it reports the parse failure");
1804
- });
1805
- (0, import_qunit.test)("a class no module exports has no code ref to store", async function(assert) {
1806
- let { field, contains, CardDef } = api;
1807
- let { operation } = operations;
1808
- class Unexported extends CardDef {
1809
- static displayName = "Unexported";
1810
- static {
1811
- decorateFieldV2(this.prototype, "name", [field], function() {
1812
- return contains(StringField);
1813
- });
1814
- }
1815
- #name = (initializeDeferredDecorator(this, "name"), void 0);
1816
- }
1817
- class Report extends CardDef {
1818
- static displayName = "Report";
1819
- static {
1820
- decorateFieldV2(this.prototype, "title", [field], function() {
1821
- return contains(StringField);
1822
- });
1823
- }
1824
- #title = (initializeDeferredDecorator(this, "title"), void 0);
1825
- static {
1826
- decorateFieldV2(this, "make", [operation], function() {
1827
- return {
1828
- base: "create",
1829
- of: () => Unexported
1830
- };
1831
- });
1832
- }
1833
- #make = (initializeDeferredDecorator(this, "make"), void 0);
1834
- }
1835
- shim({ Report });
1836
- let result = await lower(Report);
1837
- assert.deepEqual(codes(result), ["unresolved-type"]);
1838
- assert.strictEqual(result.issues[0].path, "of");
1839
- assert.strictEqual(result.operations.make.of, void 0);
1840
- });
1841
- (0, import_qunit.test)("a def that declares nothing lowers to nothing", async function(assert) {
1842
- let { field, contains, CardDef } = api;
1843
- class Plain extends CardDef {
1844
- static displayName = "Plain";
1845
- static {
1846
- decorateFieldV2(this.prototype, "title", [field], function() {
1847
- return contains(StringField);
1848
- });
1849
- }
1850
- #title = (initializeDeferredDecorator(this, "title"), void 0);
1851
- }
1852
- shim({ Plain });
1853
- let result = await lower(Plain);
1854
- assert.deepEqual(result, {
1855
- operations: {},
1856
- issues: []
1857
- }, "the base operations a def type carries are not declarations, so there is nothing to lower");
1858
- });
1859
- (0, import_qunit.test)("a behavior the def type does not carry is refused rather than lowered", async function(assert) {
1860
- let { field, contains, containsMany, CardDef, FieldDef, FileDef } = api;
1861
- class Ledger extends CardDef {
1862
- static displayName = "Ledger";
1863
- static {
1864
- decorateFieldV2(this.prototype, "entries", [field], function() {
1865
- return containsMany(StringField);
1866
- });
1867
- }
1868
- #entries = (initializeDeferredDecorator(this, "entries"), void 0);
1869
- }
1870
- class Attachment extends FileDef {
1871
- static displayName = "Attachment";
1872
- }
1873
- class Caption extends FieldDef {
1874
- static displayName = "Caption";
1875
- static {
1876
- decorateFieldV2(this.prototype, "text", [field], function() {
1877
- return contains(StringField);
1878
- });
1879
- }
1880
- #text = (initializeDeferredDecorator(this, "text"), void 0);
1881
- }
1882
- shim({
1883
- Ledger,
1884
- Attachment,
1885
- Caption
1886
- });
1887
- let refused = [
1888
- [
1889
- "appendLine",
1890
- Ledger,
1891
- "card definition"
1892
- ],
1893
- [
1894
- "appendContainsMany",
1895
- Attachment,
1896
- "file definition"
1897
- ],
1898
- [
1899
- "transform",
1900
- Attachment,
1901
- "file definition"
1902
- ],
1903
- [
1904
- "create",
1905
- Caption,
1906
- "definition recorded as a field"
1907
- ]
1908
- ];
1909
- for (let [base, def, kindLabel] of refused) {
1910
- let result = await lowerOperationDeclarations({ doIt: { base } }, {
1911
- definition: buildDefinition(def),
1912
- lookupDefinition,
1913
- identifyCard: (target) => identifyCard(target)
1914
- });
1915
- assert.deepEqual(codes(result), ["base-not-carried"], `a ${kindLabel} cannot build an operation on "${base}"`);
1916
- assert.strictEqual(result.issues[0].path, "base");
1917
- assert.true(result.issues[0].message.includes(kindLabel), "the finding names the def kind");
1918
- assert.true(result.issues[0].message.includes(`"${base}"`), "and the behavior it cannot carry out");
1919
- assert.true(result.operations.doIt?.invalid, "the operation is stored flagged, so invoking it reports the refusal rather than reading as unknown");
1920
- }
1921
- class Addressable extends api.BaseDef {
1922
- static displayName = "Addressable";
1923
- }
1924
- shim({ Addressable });
1925
- assert.strictEqual(buildDefinition(Addressable).type, "field-def", "the two land under one recorded kind");
1926
- let addressable = await lowerOperationDeclarations({ readRedacted: {
1927
- base: "read",
1928
- output: { name: true }
1929
- } }, {
1930
- definition: buildDefinition(Addressable),
1931
- lookupDefinition,
1932
- identifyCard: (target) => identifyCard(target)
1933
- });
1934
- assert.deepEqual(codes(addressable), [], "so the read lowers");
1935
- assert.notOk(addressable.operations.readRedacted.invalid);
1936
- });
1937
- (0, import_qunit.test)("an append names a containsMany field the type actually has", async function(assert) {
1938
- let { field, contains, containsMany, linksToMany, CardDef } = api;
1939
- let { operation } = operations;
1940
- class Ledger extends CardDef {
1941
- static displayName = "Ledger";
1942
- static {
1943
- decorateFieldV2(this.prototype, "title", [field], function() {
1944
- return contains(StringField);
1945
- });
1946
- }
1947
- #title = (initializeDeferredDecorator(this, "title"), void 0);
1948
- static {
1949
- decorateFieldV2(this.prototype, "helpers", [field], function() {
1950
- return linksToMany(() => fixtures.Author);
1951
- });
1952
- }
1953
- #helpers = (initializeDeferredDecorator(this, "helpers"), void 0);
1954
- static {
1955
- decorateFieldV2(this.prototype, "entries", [field], function() {
1956
- return containsMany(StringField);
1957
- });
1958
- }
1959
- #entries = (initializeDeferredDecorator(this, "entries"), void 0);
1960
- static {
1961
- decorateFieldV2(this, "toScalar", [operation], function() {
1962
- return {
1963
- base: "appendContainsMany",
1964
- field: "title",
1965
- item: "x"
1966
- };
1967
- });
1968
- }
1969
- #toScalar = (initializeDeferredDecorator(this, "toScalar"), void 0);
1970
- static {
1971
- decorateFieldV2(this, "toLinks", [operation], function() {
1972
- return {
1973
- base: "appendContainsMany",
1974
- field: "helpers",
1975
- item: "https://example.test/people/1"
1976
- };
1977
- });
1978
- }
1979
- #toLinks = (initializeDeferredDecorator(this, "toLinks"), void 0);
1980
- static {
1981
- decorateFieldV2(this, "toNothing", [operation], function() {
1982
- return {
1983
- base: "appendContainsMany",
1984
- field: "entires",
1985
- item: "x"
1986
- };
1987
- });
1988
- }
1989
- #toNothing = (initializeDeferredDecorator(this, "toNothing"), void 0);
1990
- }
1991
- shim({ Ledger });
1992
- let result = await lower(Ledger);
1993
- assert.deepEqual(codes(result), [
1994
- "not-a-collection",
1995
- "not-a-collection",
1996
- "unknown-field"
1997
- ]);
1998
- assert.true(result.issues[1].message.includes("linksToMany"), "a link collection is not one a card holds in its own file, so an append cannot splice into it");
1999
- assert.strictEqual(result.issues[0].path, "field");
2000
- assert.strictEqual(result.operations.toScalar.items, void 0, "nothing is stored for the field that could not carry the item");
2001
- });
2002
- (0, import_qunit.test)("an appended item's members are held to the item type's own fields", async function(assert) {
2003
- let { field, contains, containsMany, CardDef } = api;
2004
- let { operation, params } = operations;
2005
- assert.throws(() => {
2006
- class Flawed extends CardDef {
2007
- static displayName = "Flawed";
2008
- static {
2009
- decorateFieldV2(this.prototype, "events", [field], function() {
2010
- return containsMany(fixtures.Comment);
2011
- });
2012
- }
2013
- #events = (initializeDeferredDecorator(this, "events"), void 0);
2014
- static {
2015
- decorateFieldV2(this, "log", [operation], function() {
2016
- return {
2017
- base: "appendContainsMany",
2018
- params: { body: StringField },
2019
- field: "events",
2020
- item: { body: params("note") }
2021
- };
2022
- });
2023
- }
2024
- #log = (initializeDeferredDecorator(this, "log"), void 0);
2025
- }
2026
- return Flawed;
2027
- }, /references the param "note", which the `params` schema does not declare/, "an undeclared param inside an item never reaches lowering");
2028
- class EventLog extends CardDef {
2029
- static displayName = "EventLog";
2030
- static {
2031
- decorateFieldV2(this.prototype, "title", [field], function() {
2032
- return contains(StringField);
2033
- });
2034
- }
2035
- #title = (initializeDeferredDecorator(this, "title"), void 0);
2036
- static {
2037
- decorateFieldV2(this.prototype, "events", [field], function() {
2038
- return containsMany(fixtures.Comment);
2039
- });
2040
- }
2041
- #events = (initializeDeferredDecorator(this, "events"), void 0);
2042
- static {
2043
- decorateFieldV2(this.prototype, "slug", [field], function() {
2044
- return contains(StringField, { computeVia: function() {
2045
- return this.title;
2046
- } });
2047
- });
2048
- }
2049
- #slug = (initializeDeferredDecorator(this, "slug"), void 0);
2050
- static {
2051
- decorateFieldV2(this, "log", [operation], function() {
2052
- return {
2053
- base: "appendContainsMany",
2054
- params: { body: StringField },
2055
- field: "events",
2056
- item: { bdy: params("body") }
2057
- };
2058
- });
2059
- }
2060
- #log = (initializeDeferredDecorator(this, "log"), void 0);
2061
- static {
2062
- decorateFieldV2(this, "logComputed", [operation], function() {
2063
- return {
2064
- base: "appendContainsMany",
2065
- field: "slug",
2066
- item: "x"
2067
- };
2068
- });
2069
- }
2070
- #logComputed = (initializeDeferredDecorator(this, "logComputed"), void 0);
2071
- }
2072
- shim({ EventLog });
2073
- let result = await lower(EventLog);
2074
- assert.deepEqual(codes(result), ["unknown-field", "computed-write"]);
2075
- assert.strictEqual(result.issues[0].path, "item.bdy", "the finding names where in the item the author wrote it");
2076
- assert.true(result.issues[0].message.includes("Comment"), "and the item type the member was checked against");
2077
- assert.deepEqual(result.operations.log.items, { events: { bdy: {
2078
- $ref: "params",
2079
- key: "body"
2080
- } } }, "the item is stored as written, so invoking it reports the finding rather than appending something else");
2081
- });
2082
- (0, import_qunit.test)("a program declared on a base that runs none is recorded", async function(assert) {
2083
- let { field, containsMany, CardDef, FileDef } = api;
2084
- class EventLog extends CardDef {
2085
- static displayName = "EventLog";
2086
- static {
2087
- decorateFieldV2(this.prototype, "events", [field], function() {
2088
- return containsMany(StringField);
2089
- });
2090
- }
2091
- #events = (initializeDeferredDecorator(this, "events"), void 0);
2092
- }
2093
- class LogFile extends FileDef {
2094
- static displayName = "LogFile";
2095
- }
2096
- shim({
2097
- EventLog,
2098
- LogFile
2099
- });
2100
- for (let [def, base, clauses] of [[
2101
- EventLog,
2102
- "appendContainsMany",
2103
- {
2104
- field: "events",
2105
- item: "x"
2106
- }
2107
- ], [
2108
- LogFile,
2109
- "update",
2110
- {}
2111
- ]]) {
2112
- let result = await lowerOperationDeclarations({ doIt: {
2113
- base,
2114
- ...clauses,
2115
- transformations: { $bxl: ".status = \"closed\";" }
2116
- } }, {
2117
- definition: buildDefinition(def),
2118
- lookupDefinition,
2119
- identifyCard: (target) => identifyCard(target)
2120
- });
2121
- assert.deepEqual(codes(result), ["unrunnable-program"], `a "${base}" writes to the stored file rather than running a program`);
2122
- assert.strictEqual(result.operations.doIt.program, void 0, "and nothing is stored that could later be mistaken for one that runs");
2123
- }
2124
- });
2125
- (0, import_qunit.test)("a link strategy is carried onto a read or a query and recorded on anything else", async function(assert) {
2126
- let { field, contains, CardDef } = api;
2127
- class Roster extends CardDef {
2128
- static displayName = "Roster";
2129
- static {
2130
- decorateFieldV2(this.prototype, "title", [field], function() {
2131
- return contains(StringField);
2132
- });
2133
- }
2134
- #title = (initializeDeferredDecorator(this, "title"), void 0);
2135
- }
2136
- shim({ Roster });
2137
- let read = await lowerOperationDeclarations({ summary: {
2138
- base: "read",
2139
- links: "ids"
2140
- } }, {
2141
- definition: buildDefinition(Roster),
2142
- lookupDefinition,
2143
- identifyCard: (target) => identifyCard(target)
2144
- });
2145
- assert.deepEqual(codes(read), [], "a read may declare one");
2146
- assert.strictEqual(read.operations.summary.links, "ids", "and the realm executes it from the stored entry");
2147
- let write = await lowerOperationDeclarations({ rename: {
2148
- base: "transform",
2149
- set: { title: "Renamed" },
2150
- links: "none"
2151
- } }, {
2152
- definition: buildDefinition(Roster),
2153
- lookupDefinition,
2154
- identifyCard: (target) => identifyCard(target)
2155
- });
2156
- assert.deepEqual(codes(write), ["links-without-assembly"], "a base that assembles no link closure has nothing to narrow");
2157
- assert.strictEqual(write.operations.rename.links, void 0, "and nothing is stored that a serving path would read as a narrowing");
2158
- let query = await lowerOperationDeclarations({ roll: {
2159
- base: "query",
2160
- query: { filter: {
2161
- on: Roster,
2162
- eq: { title: "x" }
2163
- } },
2164
- links: "ids"
2165
- } }, {
2166
- definition: buildDefinition(Roster),
2167
- lookupDefinition,
2168
- identifyCard: (target) => identifyCard(target)
2169
- });
2170
- assert.deepEqual(codes(query), [], "a query may declare one");
2171
- assert.strictEqual(query.operations.roll.links, "ids", "and the realm serves its results from the stored entry");
2172
- let unknown = await lowerOperationDeclarations({ summary: {
2173
- base: "read",
2174
- links: "some"
2175
- } }, {
2176
- definition: buildDefinition(Roster),
2177
- lookupDefinition,
2178
- identifyCard: (target) => identifyCard(target)
2179
- });
2180
- assert.deepEqual(codes(unknown), ["invalid-link-strategy"], "a value that names no strategy is its own finding");
2181
- assert.strictEqual(unknown.operations.summary.links, void 0, "and is not stored for the serving path to read as the narrowest one");
2182
- });
2183
- (0, import_qunit.test)("`none` is a query strategy, and a read declaring it is recorded", async function(assert) {
2184
- let { field, contains, CardDef } = api;
2185
- class Roster extends CardDef {
2186
- static displayName = "Roster";
2187
- static {
2188
- decorateFieldV2(this.prototype, "title", [field], function() {
2189
- return contains(StringField);
2190
- });
2191
- }
2192
- #title = (initializeDeferredDecorator(this, "title"), void 0);
2193
- }
2194
- shim({ Roster });
2195
- let lower = (declarations) => lowerOperationDeclarations(declarations, {
2196
- definition: buildDefinition(Roster),
2197
- lookupDefinition,
2198
- identifyCard: (target) => identifyCard(target)
2199
- });
2200
- for (let name of ["read", "summary"]) {
2201
- let none = await lower({ [name]: {
2202
- base: "read",
2203
- links: "none"
2204
- } });
2205
- assert.deepEqual(codes(none), ["invalid-link-strategy"], `a read named "${name}" may not withhold its links`);
2206
- assert.true(none.operations[name].invalid, `and "${name}" is refused rather than served without them`);
2207
- assert.strictEqual(none.operations[name].links, void 0, `and no narrowing is stored for "${name}"`);
2208
- }
2209
- for (let links of ["full", "ids"]) {
2210
- let narrowed = await lower({ read: {
2211
- base: "read",
2212
- links
2213
- } });
2214
- assert.deepEqual(codes(narrowed), [], `a read may declare "${links}"`);
2215
- assert.strictEqual(narrowed.operations.read.links, links, `and "${links}" is stored for the realm to serve`);
2216
- }
2217
- let query = await lower({ roll: {
2218
- base: "query",
2219
- query: { filter: {
2220
- on: Roster,
2221
- eq: { title: "x" }
2222
- } },
2223
- links: "none"
2224
- } });
2225
- assert.deepEqual(codes(query), [], "a query may declare \"none\"");
2226
- assert.strictEqual(query.operations.roll.links, "none", "and its rows are served under it");
2227
- });
2228
- (0, import_qunit.test)("an html declaration is carried onto a read or a query and recorded on anything else", async function(assert) {
2229
- let { field, contains, CardDef } = api;
2230
- class Roster extends CardDef {
2231
- static displayName = "Roster";
2232
- static {
2233
- decorateFieldV2(this.prototype, "title", [field], function() {
2234
- return contains(StringField);
2235
- });
2236
- }
2237
- #title = (initializeDeferredDecorator(this, "title"), void 0);
2238
- }
2239
- shim({ Roster });
2240
- let lower = (declarations) => lowerOperationDeclarations(declarations, {
2241
- definition: buildDefinition(Roster),
2242
- lookupDefinition,
2243
- identifyCard: (target) => identifyCard(target)
2244
- });
2245
- let read = await lower({ summary: {
2246
- base: "read",
2247
- html: {
2248
- embedded: "unshareable",
2249
- fitted: "shareable"
2250
- }
2251
- } });
2252
- assert.deepEqual(codes(read), [], "a read may declare one");
2253
- assert.deepEqual(read.operations.summary.html, {
2254
- embedded: "unshareable",
2255
- fitted: "shareable"
2256
- }, "and the realm serves reads of the card from the stored entry");
2257
- let query = await lower({ roll: {
2258
- base: "query",
2259
- query: { filter: {
2260
- on: Roster,
2261
- eq: { title: "x" }
2262
- } },
2263
- html: { isolated: "unshareable" }
2264
- } });
2265
- assert.deepEqual(codes(query), [], "a query may declare one");
2266
- assert.deepEqual(query.operations.roll.html, { isolated: "unshareable" }, "and the realm serves its rows from the stored entry");
2267
- let write = await lower({ rename: {
2268
- base: "transform",
2269
- set: { title: "Renamed" },
2270
- html: { embedded: "unshareable" }
2271
- } });
2272
- assert.deepEqual(codes(write), ["html-without-rendering"], "a base that serves no prerendered HTML has nothing to withhold");
2273
- assert.strictEqual(write.operations.rename.html, void 0, "and nothing is stored that a serving path would read as a withholding");
2274
- for (let [label, html] of [
2275
- ["a format the realm does not prerender", { edit: "unshareable" }],
2276
- ["a value that says neither", { embedded: "hidden" }],
2277
- ["something other than a record of formats", ["embedded"]]
2278
- ]) {
2279
- let unknown = await lower({ summary: {
2280
- base: "read",
2281
- html
2282
- } });
2283
- assert.deepEqual(codes(unknown), ["invalid-html-declaration"], `${label} is its own finding`);
2284
- assert.strictEqual(unknown.operations.summary.html, void 0, `${label} is not stored for the serving path to read as withholding every format`);
2285
- }
2286
- });
2287
- (0, import_qunit.test)("an append that says nothing to append is recorded rather than stored as work", async function(assert) {
2288
- let { field, containsMany, CardDef } = api;
2289
- class Ledger extends CardDef {
2290
- static displayName = "Ledger";
2291
- static {
2292
- decorateFieldV2(this.prototype, "entries", [field], function() {
2293
- return containsMany(StringField);
2294
- });
2295
- }
2296
- #entries = (initializeDeferredDecorator(this, "entries"), void 0);
2297
- }
2298
- shim({ Ledger });
2299
- for (let [label, declaration, path] of [
2300
- [
2301
- "no field named",
2302
- { base: "appendContainsMany" },
2303
- "field"
2304
- ],
2305
- [
2306
- "an empty fields map",
2307
- {
2308
- base: "appendContainsMany",
2309
- fields: {}
2310
- },
2311
- "field"
2312
- ],
2313
- [
2314
- "a field with no item",
2315
- {
2316
- base: "appendContainsMany",
2317
- field: "entries"
2318
- },
2319
- "item"
2320
- ],
2321
- [
2322
- "both spellings at once",
2323
- {
2324
- base: "appendContainsMany",
2325
- field: "entries",
2326
- item: "a",
2327
- fields: { entries: "b" }
2328
- },
2329
- "fields"
2330
- ]
2331
- ]) {
2332
- let result = await lowerOperationDeclarations({ log: declaration }, {
2333
- definition: buildDefinition(Ledger),
2334
- lookupDefinition,
2335
- identifyCard: (target) => identifyCard(target)
2336
- });
2337
- assert.deepEqual(result.issues.map((issue) => [issue.code, issue.path]), [["incomplete-append", path]], `${label} is recorded`);
2338
- assert.strictEqual(result.operations.log.items, void 0, `${label} stores nothing to append`);
2339
- assert.true(result.operations.log.invalid, `${label} is flagged`);
2340
- }
2341
- });
2342
- (0, import_qunit.test)("a finding under the fields spelling names the field it was written at", async function(assert) {
2343
- let { field, containsMany, CardDef } = api;
2344
- let { operation } = operations;
2345
- class EventLog extends CardDef {
2346
- static displayName = "EventLog";
2347
- static {
2348
- decorateFieldV2(this.prototype, "events", [field], function() {
2349
- return containsMany(fixtures.Comment);
2350
- });
2351
- }
2352
- #events = (initializeDeferredDecorator(this, "events"), void 0);
2353
- static {
2354
- decorateFieldV2(this.prototype, "labels", [field], function() {
2355
- return containsMany(StringField);
2356
- });
2357
- }
2358
- #labels = (initializeDeferredDecorator(this, "labels"), void 0);
2359
- static {
2360
- decorateFieldV2(this, "log", [operation], function() {
2361
- return {
2362
- base: "appendContainsMany",
2363
- fields: {
2364
- notes: "x",
2365
- events: { bdy: "y" }
2366
- }
2367
- };
2368
- });
2369
- }
2370
- #log = (initializeDeferredDecorator(this, "log"), void 0);
2371
- }
2372
- shim({ EventLog });
2373
- let result = await lower(EventLog);
2374
- assert.deepEqual(result.issues.map((issue) => [issue.code, issue.path]), [["unknown-field", "fields.notes"], ["unknown-field", "fields.events.bdy"]], "the plural spelling carries its own clause path, at the field and inside its item");
2375
- });
2376
- (0, import_qunit.test)("a file def's read keeps the program its output lowers to", async function(assert) {
2377
- let { FileDef } = api;
2378
- let { operation, bxl } = operations;
2379
- class Attachment extends FileDef {
2380
- static displayName = "Attachment";
2381
- static {
2382
- decorateFieldV2(this, "readRedacted", [operation], function() {
2383
- return {
2384
- base: "read",
2385
- output: bxl`{ name: .name }`
2386
- };
2387
- });
2388
- }
2389
- #readRedacted = (initializeDeferredDecorator(this, "readRedacted"), void 0);
2390
- }
2391
- shim({ Attachment });
2392
- let result = await lower(Attachment);
2393
- assert.deepEqual(codes(result), [], "the projection is not refused");
2394
- assert.deepEqual(result.operations.readRedacted.output, {
2395
- source: "{name:.name}",
2396
- syntax: "solidified"
2397
- });
2398
- });
2399
- (0, import_qunit.test)("a realmConfig reference with no setting named cannot stand for a card identity", async function(assert) {
2400
- let { field, contains, linksTo, CardDef } = api;
2401
- let { operation, realmConfig } = operations;
2402
- class Report extends CardDef {
2403
- static displayName = "Report";
2404
- static {
2405
- decorateFieldV2(this.prototype, "title", [field], function() {
2406
- return contains(StringField);
2407
- });
2408
- }
2409
- #title = (initializeDeferredDecorator(this, "title"), void 0);
2410
- static {
2411
- decorateFieldV2(this.prototype, "owner", [field], function() {
2412
- return linksTo(() => fixtures.Author);
2413
- });
2414
- }
2415
- #owner = (initializeDeferredDecorator(this, "owner"), void 0);
2416
- static {
2417
- decorateFieldV2(this, "assign", [operation], function() {
2418
- return {
2419
- base: "transform",
2420
- set: { owner: realmConfig() }
2421
- };
2422
- });
2423
- }
2424
- #assign = (initializeDeferredDecorator(this, "assign"), void 0);
2425
- }
2426
- shim({ Report });
2427
- let result = await lower(Report);
2428
- assert.deepEqual(codes(result), ["link-requires-identity"]);
2429
- assert.strictEqual(result.operations.assign.program?.source, ".owner=card(realmConfig());", "the refused form is stored as the executor would read it, so nothing quietly writes something else");
2430
- });
2431
- (0, import_qunit.test)("a reserved name is refused rather than lowered", async function(assert) {
2432
- let { field, contains, CardDef } = api;
2433
- class Reserved extends CardDef {
2434
- static displayName = "Reserved";
2435
- static {
2436
- decorateFieldV2(this.prototype, "title", [field], function() {
2437
- return contains(StringField);
2438
- });
2439
- }
2440
- #title = (initializeDeferredDecorator(this, "title"), void 0);
2441
- }
2442
- shim({ Reserved });
2443
- for (let name of DEFINITION_FREE_BASE_OPERATIONS) {
2444
- let result = await lowerOperationDeclarations({ [name]: { base: "read" } }, {
2445
- definition: buildDefinition(Reserved),
2446
- lookupDefinition,
2447
- identifyCard: (target) => identifyCard(target)
2448
- });
2449
- assert.deepEqual(codes(result), ["reserved-name"], `${name} is recorded as reserved`);
2450
- assert.true(result.operations[name]?.invalid, `${name} is marked invalid rather than dropped, so a consumer reading the entry sees the refusal`);
2451
- }
2452
- });
2453
- (0, import_qunit.test)("a stored saved search under the name `query` is refused rather than lowered", async function(assert) {
2454
- let { field, contains, CardDef } = api;
2455
- class Listed extends CardDef {
2456
- static displayName = "Listed";
2457
- static {
2458
- decorateFieldV2(this.prototype, "title", [field], function() {
2459
- return contains(StringField);
2460
- });
2461
- }
2462
- #title = (initializeDeferredDecorator(this, "title"), void 0);
2463
- }
2464
- shim({ Listed });
2465
- let result = await lowerOperationDeclarations({ query: {
2466
- base: "transform",
2467
- set: { title: "x" }
2468
- } }, {
2469
- definition: buildDefinition(Listed),
2470
- lookupDefinition,
2471
- identifyCard: (target) => identifyCard(target)
2472
- });
2473
- assert.deepEqual(codes(result), ["reserved-name"]);
2474
- assert.true(result.operations.query?.invalid, "stored invalid");
2475
- assert.strictEqual(result.operations.query?.base, "query", "on the base the name means, whatever base the entry named");
2476
- });
2477
- async function lowerRequest(request, extra = {}) {
2478
- let { field, contains, CardDef } = api;
2479
- class Repo extends CardDef {
2480
- static displayName = "Repo";
2481
- static {
2482
- decorateFieldV2(this.prototype, "owner", [field], function() {
2483
- return contains(StringField);
2484
- });
2485
- }
2486
- #owner = (initializeDeferredDecorator(this, "owner"), void 0);
2487
- }
2488
- shim({ Repo });
2489
- return await lowerOperationDeclarations({ fetch: {
2490
- base: "callApi",
2491
- ...request,
2492
- ...extra
2493
- } }, {
2494
- definition: buildDefinition(Repo),
2495
- lookupDefinition,
2496
- identifyCard: (target) => identifyCard(target)
2497
- });
2498
- }
2499
- const ownerParam = {
2500
- $ref: "params",
2501
- key: "owner"
2502
- };
2503
- (0, import_qunit.test)("a keyless request lowers to the request it sends, its values still markers", async function(assert) {
2504
- let result = await lowerRequest({
2505
- url: "https://api.example.com/repos/{owner}/{repo}/issues",
2506
- path: {
2507
- owner: ownerParam,
2508
- repo: {
2509
- $ref: "instance",
2510
- key: "owner"
2511
- }
2512
- },
2513
- query: { state: "open" },
2514
- headers: { accept: "application/json" }
2515
- }, { params: { owner: StringField } });
2516
- assert.deepEqual(codes(result), []);
2517
- assert.deepEqual(result.operations.fetch, {
2518
- base: "callApi",
2519
- params: { owner: {
2520
- kind: "field",
2521
- codeRef: identifyCard(StringField)
2522
- } },
2523
- callApi: {
2524
- method: "GET",
2525
- url: "https://api.example.com/repos/{owner}/{repo}/issues",
2526
- destination: "https://api.example.com/repos/",
2527
- path: {
2528
- owner: ownerParam,
2529
- repo: {
2530
- $ref: "instance",
2531
- key: "owner"
2532
- }
2533
- },
2534
- headers: { accept: "application/json" },
2535
- query: { state: "open" },
2536
- slots: []
2537
- },
2538
- deterministic: true
2539
- });
2540
- });
2541
- (0, import_qunit.test)("an operation approved per instance says so in its lowered request", async function(assert) {
2542
- let perInstance = await lowerRequest({
2543
- url: "https://hooks.example.com/services/{hook}",
2544
- path: { hook: "{{apiKey:hook}}" },
2545
- perInstance: true
2546
- });
2547
- assert.deepEqual(codes(perInstance), []);
2548
- assert.true(perInstance.operations.fetch.callApi?.perInstance);
2549
- let perRealm = await lowerRequest({
2550
- url: "https://api.example.com/items",
2551
- perInstance: false
2552
- });
2553
- assert.deepEqual(codes(perRealm), []);
2554
- assert.false("perInstance" in (perRealm.operations.fetch.callApi ?? {}), "false is the same as leaving it out");
2555
- let notABoolean = await lowerRequest({
2556
- url: "https://api.example.com/items",
2557
- perInstance: "yes"
2558
- });
2559
- assert.deepEqual(codes(notABoolean), ["invalid-request"]);
2560
- });
2561
- (0, import_qunit.test)("a declared key kind is kept on the slots it names", async function(assert) {
2562
- let everySlot = await lowerRequest({
2563
- url: "https://sheets.googleapis.com/v4/spreadsheets/abc",
2564
- headers: { authorization: "Bearer {{userKey}}" },
2565
- keyKind: "google-service-account"
2566
- });
2567
- assert.deepEqual(codes(everySlot), []);
2568
- assert.deepEqual(everySlot.operations.fetch.callApi?.slots, [{
2569
- name: "userKey",
2570
- key: "userKey",
2571
- placement: "header",
2572
- at: "headers.authorization",
2573
- keyKind: "google-service-account"
2574
- }]);
2575
- let bySlot = await lowerRequest({
2576
- url: "https://api.example.com/items",
2577
- headers: {
2578
- authorization: "Bearer {{userKey:token}}",
2579
- "x-tenant": "{{userKey:tenant}}"
2580
- },
2581
- keyKind: { token: "oauth" }
2582
- });
2583
- assert.deepEqual(codes(bySlot), []);
2584
- assert.deepEqual(bySlot.operations.fetch.callApi?.slots.map((slot) => slot.keyKind), ["oauth", void 0], "a slot the declaration leaves out has no declared kind");
2585
- let unknownKind = await lowerRequest({
2586
- url: "https://api.example.com/items",
2587
- headers: { authorization: "Bearer {{userKey}}" },
2588
- keyKind: "password"
2589
- });
2590
- assert.deepEqual(codes(unknownKind), ["invalid-request"]);
2591
- assert.strictEqual(unknownKind.issues[0]?.path, "keyKind");
2592
- let unknownSlot = await lowerRequest({
2593
- url: "https://api.example.com/items",
2594
- headers: { authorization: "Bearer {{userKey}}" },
2595
- keyKind: { token: "oauth" }
2596
- });
2597
- assert.deepEqual(codes(unknownSlot), ["invalid-request"]);
2598
- assert.strictEqual(unknownSlot.issues[0]?.path, "keyKind.token");
2599
- let badSlotKind = await lowerRequest({
2600
- url: "https://api.example.com/items",
2601
- headers: { authorization: "Bearer {{userKey}}" },
2602
- keyKind: { userKey: "jwt" }
2603
- });
2604
- assert.deepEqual(codes(badSlotKind), ["invalid-request"]);
2605
- assert.strictEqual(badSlotKind.issues[0]?.path, "keyKind.userKey");
2606
- let basicEverySlot = await lowerRequest({
2607
- url: "https://api.example.com/items",
2608
- headers: { authorization: "Basic {{userKey|basic}}" },
2609
- keyKind: "oauth"
2610
- });
2611
- assert.deepEqual(codes(basicEverySlot), ["invalid-request"], "a minted token is never sent as Basic credentials");
2612
- assert.strictEqual(basicEverySlot.issues[0]?.path, "keyKind");
2613
- let basicBySlot = await lowerRequest({
2614
- url: "https://api.example.com/items",
2615
- headers: {
2616
- authorization: "Basic {{userKey:login|basic}}",
2617
- "x-token": "{{userKey:token}}"
2618
- },
2619
- keyKind: {
2620
- login: "google-service-account",
2621
- token: "oauth"
2622
- }
2623
- });
2624
- assert.deepEqual(codes(basicBySlot), ["invalid-request"]);
2625
- assert.strictEqual(basicBySlot.issues[0]?.path, "keyKind.login");
2626
- let basicStatic = await lowerRequest({
2627
- url: "https://api.example.com/items",
2628
- headers: { authorization: "Basic {{userKey|basic}}" },
2629
- keyKind: "static"
2630
- });
2631
- assert.deepEqual(codes(basicStatic), [], "a pasted key is");
2632
- });
2633
- (0, import_qunit.test)("the kinds of key a slot takes are its declared one, or every kind that can work where it stands", async function(assert) {
2634
- let kindsOf = async (request) => {
2635
- let result = await lowerRequest(request);
2636
- assert.deepEqual(codes(result), []);
2637
- let callApi = result.operations.fetch.callApi;
2638
- return callApi.slots.map((slot) => slotKeyKinds(slot, callApi));
2639
- };
2640
- assert.deepEqual(await kindsOf({
2641
- url: "https://api.github.com/user",
2642
- headers: { authorization: "Bearer {{userKey}}" }
2643
- }), [["static", "oauth"]], "a pasted key or a connected account");
2644
- assert.deepEqual(await kindsOf({
2645
- url: "https://api.github.com/user",
2646
- headers: { Authorization: " token {{ userKey }} " }
2647
- }), [["static", "oauth"]], "whatever the scheme");
2648
- assert.deepEqual(await kindsOf({
2649
- url: "https://www.googleapis.com/drive/v3/files",
2650
- headers: { authorization: "Bearer {{userKey}}" }
2651
- }), [[
2652
- "static",
2653
- "google-service-account",
2654
- "oauth"
2655
- ]], "a Google API also takes a service account");
2656
- assert.deepEqual(await kindsOf({
2657
- url: "https://example-db.firebaseio.com/items.json",
2658
- query: { access_token: "{{userKey}}" }
2659
- }), [[
2660
- "static",
2661
- "google-service-account",
2662
- "oauth"
2663
- ]], "and so does the Firebase Realtime Database");
2664
- assert.deepEqual(await kindsOf({
2665
- url: "https://api.weather.example/v1/current",
2666
- query: { appid: "{{userKey}}" }
2667
- }), [["static", "oauth"]], "a minted token fills a query value too");
2668
- assert.deepEqual(await kindsOf({
2669
- url: "https://api.example.com/items",
2670
- headers: {
2671
- authorization: "Basic {{userKey|basic}}",
2672
- "x-api-key": "{{apiKey}}"
2673
- },
2674
- json: { token: "{{apiKey:body}}" }
2675
- }), [
2676
- ["static"],
2677
- ["static", "oauth"],
2678
- ["static", "oauth"]
2679
- ], "a Basic credential is never a minted token, but another header or the body may be");
2680
- assert.deepEqual(await kindsOf({
2681
- url: "https://api.example.com/items",
2682
- query: { access_token: "{{userKey}}" },
2683
- keyKind: "oauth"
2684
- }), [["oauth"]], "a declared kind stands wherever the slot does");
2685
- });
2686
- (0, import_qunit.test)("the URL lowers to its normalized form and its destination", async function(assert) {
2687
- let result = await lowerRequest({
2688
- url: "https://API.openai.com:443/v1/../chat/{id}",
2689
- path: { id: "7" }
2690
- }, {});
2691
- assert.deepEqual(codes(result), []);
2692
- assert.strictEqual(result.operations.fetch.callApi?.url, "https://api.openai.com/chat/{id}", "the host is lower-cased, the default port dropped and the dot segment resolved, the `{name}` segment kept");
2693
- assert.strictEqual(result.operations.fetch.callApi?.destination, "https://api.openai.com/chat/", "the destination ends at the last `/` before the first `{name}` segment");
2694
- let twoSpellings = await Promise.all(["https://API.example.com:443/v1/../x/", "https://api.example.com/x/"].map((url) => lowerRequest({ url })));
2695
- assert.deepEqual(twoSpellings.map(({ operations }) => [operations.fetch.callApi?.url, operations.fetch.callApi?.destination]), [["https://api.example.com/x/", "https://api.example.com/x/"], ["https://api.example.com/x/", "https://api.example.com/x/"]], "two spellings of one place lower alike");
2696
- });
2697
- (0, import_qunit.test)("a URL with no `{name}` segment has the destination its path has up to the last `/`", async function(assert) {
2698
- for (let [url, destination] of [
2699
- ["https://api.example.com/v1/chat/completions", "https://api.example.com/v1/chat/"],
2700
- ["https://api.example.com/v1/models/", "https://api.example.com/v1/models/"],
2701
- ["https://api.example.com", "https://api.example.com/"],
2702
- ["https://api.example.com/items?page=2#top", "https://api.example.com/"],
2703
- ["https://api.example.com//evil.net/x", "https://api.example.com//evil.net/"],
2704
- ["http://localhost:4519/echo", "http://localhost:4519/"]
2705
- ]) {
2706
- let result = await lowerRequest({ url });
2707
- assert.deepEqual(codes(result), [], url);
2708
- assert.strictEqual(result.operations.fetch.callApi?.destination, destination, url);
2709
- }
2710
- let laterParameter = await lowerRequest({
2711
- url: "https://api.example.com/repos/{owner}/issues/{n}",
2712
- path: {
2713
- owner: "o",
2714
- n: "1"
2715
- }
2716
- });
2717
- assert.strictEqual(laterParameter.operations.fetch.callApi?.destination, "https://api.example.com/repos/", "the first `{name}` segment ends it, whatever follows");
2718
- });
2719
- (0, import_qunit.test)("a wildcard host is refused", async function(assert) {
2720
- for (let url of [
2721
- "https://*.example.com/items",
2722
- "https://%2A.example.com/items",
2723
- "https://api.*/items"
2724
- ]) {
2725
- let result = await lowerRequest({ url });
2726
- assert.deepEqual(codes(result), ["invalid-request"], url);
2727
- assert.strictEqual(result.operations.fetch.callApi, void 0, url);
2728
- }
2729
- });
2730
- (0, import_qunit.test)("a URL's own text that reads like lowering's stand-in for a segment stays where it is written", async function(assert) {
2731
- for (let literal of ["boxel-path-parameter-0-", "%62oxel-path-parameter-0-"]) {
2732
- let result = await lowerRequest({
2733
- url: `https://api.example.com/${literal}/{id}`,
2734
- path: { id: "7" }
2735
- });
2736
- assert.deepEqual(codes(result), [], literal);
2737
- assert.strictEqual(result.operations.fetch.callApi?.url, `https://api.example.com/${literal}/{id}`, literal);
2738
- assert.strictEqual(result.operations.fetch.callApi?.destination, `https://api.example.com/${literal}/`, literal);
2739
- }
2740
- });
2741
- (0, import_qunit.test)("a host with a trailing dot is refused", async function(assert) {
2742
- let result = await lowerRequest({
2743
- url: "https://api.example.com./v1/{id}",
2744
- path: { id: "7" }
2745
- });
2746
- assert.deepEqual(codes(result), ["invalid-request"]);
2747
- assert.strictEqual(result.operations.fetch.callApi, void 0);
2748
- });
2749
- (0, import_qunit.test)("an http URL lowers, for the outbound guard to judge when it is sent", async function(assert) {
2750
- let result = await lowerRequest({ url: "http://api.example.com/items" });
2751
- assert.deepEqual(codes(result), []);
2752
- assert.strictEqual(result.operations.fetch.callApi?.destination, "http://api.example.com/");
2753
- });
2754
- (0, import_qunit.test)("a request with a body defaults to POST, and a GraphQL document travels with its variables", async function(assert) {
2755
- let result = await lowerRequest({
2756
- url: "https://api.example.com/graphql",
2757
- graphql: {
2758
- document: "query($owner: String!) { repo(owner: $owner) { id } }",
2759
- variables: { owner: ownerParam }
2760
- }
2761
- }, { params: { owner: StringField } });
2762
- assert.deepEqual(codes(result), []);
2763
- assert.strictEqual(result.operations.fetch.callApi?.method, "POST");
2764
- assert.deepEqual(result.operations.fetch.callApi?.body, {
2765
- kind: "graphql",
2766
- document: "query($owner: String!) { repo(owner: $owner) { id } }",
2767
- variables: { owner: ownerParam }
2768
- });
2769
- });
2770
- (0, import_qunit.test)("each slot is indexed with its key, its name, its transform and where it is sent", async function(assert) {
2771
- let result = await lowerRequest({
2772
- url: "https://api.example.com/hooks/{secret}",
2773
- path: { secret: "{{apiKey:hook}}" },
2774
- headers: { authorization: "Basic {{userKey|basic}}" },
2775
- query: { key: "{{apiKey}}" },
2776
- json: { auth: { token: "tok {{ apiKey : body }}" } }
2777
- });
2778
- assert.deepEqual(codes(result), []);
2779
- assert.deepEqual(result.operations.fetch.callApi?.slots, [
2780
- {
2781
- name: "hook",
2782
- key: "apiKey",
2783
- placement: "path",
2784
- at: "path.secret"
2785
- },
2786
- {
2787
- name: "userKey",
2788
- key: "userKey",
2789
- transform: "basic",
2790
- placement: "header",
2791
- at: "headers.authorization"
2792
- },
2793
- {
2794
- name: "apiKey",
2795
- key: "apiKey",
2796
- placement: "query",
2797
- at: "query.key"
2798
- },
2799
- {
2800
- name: "body",
2801
- key: "apiKey",
2802
- placement: "body",
2803
- at: "json.auth.token"
2804
- }
2805
- ]);
2806
- assert.strictEqual(result.operations.fetch.callApi?.headers?.authorization, "Basic {{userKey|basic}}", "the slot stays where it was written, for the sender to fill");
2807
- });
2808
- (0, import_qunit.test)("a slot placed twice is refused", async function(assert) {
2809
- let result = await lowerRequest({
2810
- url: "https://api.example.com/items",
2811
- headers: { authorization: "Bearer {{apiKey}}" },
2812
- query: { key: "{{apiKey|basic}}" }
2813
- });
2814
- assert.deepEqual(codes(result), ["slot-placed-twice"]);
2815
- assert.true(result.operations.fetch.invalid, "stored invalid");
2816
- assert.strictEqual(result.operations.fetch.callApi, void 0);
2817
- });
2818
- (0, import_qunit.test)("a slot name reused for a different key is refused", async function(assert) {
2819
- let result = await lowerRequest({
2820
- url: "https://api.example.com/items",
2821
- headers: {
2822
- authorization: "Bearer {{apiKey:token}}",
2823
- "x-user": "{{userKey:token}}"
2824
- }
2825
- });
2826
- assert.deepEqual(codes(result), ["slot-name-reused"]);
2827
- });
2828
- (0, import_qunit.test)("a path parameter that is not filled through `path` is refused", async function(assert) {
2829
- let unfilled = await lowerRequest({ url: "https://api.example.com/repos/{owner}" });
2830
- assert.deepEqual(codes(unfilled), ["unencoded-path-parameter"]);
2831
- let partial = await lowerRequest({
2832
- url: "https://api.example.com/v{version}/items",
2833
- path: { version: "2" }
2834
- });
2835
- assert.deepEqual(codes(partial), ["unencoded-path-parameter", "invalid-request"], "part of a segment is not a segment the request fills, so `path` has nothing to fill");
2836
- let inHost = await lowerRequest({
2837
- url: "https://{tenant}.example.com/items",
2838
- path: { tenant: "acme" }
2839
- });
2840
- assert.deepEqual(codes(inHost), ["unencoded-path-parameter", "invalid-request"], "a parameter in the host is refused");
2841
- let spliced = await lowerRequest({ url: `https://api.example.com/repos/${String({})}` });
2842
- assert.deepEqual(codes(spliced), ["unencoded-path-parameter"], "a reference spliced into the URL text is refused");
2843
- let splicedValue = await lowerRequest({
2844
- url: "https://api.example.com/repos/{owner}",
2845
- path: { owner: `team-${String({})}` }
2846
- });
2847
- assert.deepEqual(codes(splicedValue), ["unencoded-path-parameter"]);
2848
- });
2849
- for (let value of [
2850
- "org/name",
2851
- "org\\name",
2852
- "{{apiKey}}/v2",
2853
- "",
2854
- ".",
2855
- "..",
2856
- "a\ud800"
2857
- ]) (0, import_qunit.test)(`a path value written as ${JSON.stringify(value)}, which no request can send, is refused`, async function(assert) {
2858
- let result = await lowerRequest({
2859
- url: "https://api.example.com/models/{model}",
2860
- path: { model: value }
2861
- });
2862
- assert.deepEqual(codes(result), ["invalid-request"]);
2863
- assert.strictEqual(result.issues[0].path, "path.model");
2864
- assert.true(result.issues[0].message.includes("`url`"), "the message points the author to the URL");
2865
- assert.true(result.operations.fetch.invalid, "stored invalid");
2866
- });
2867
- (0, import_qunit.test)("a path value written as text that fills one segment lowers", async function(assert) {
2868
- let result = await lowerRequest({
2869
- url: "https://api.example.com/models/{model}",
2870
- path: { model: "gpt-4.1" }
2871
- });
2872
- assert.deepEqual(codes(result), []);
2873
- assert.deepEqual(result.operations.fetch.callApi?.path, { model: "gpt-4.1" });
2874
- let paired = await lowerRequest({
2875
- url: "https://api.example.com/tags/{tag}",
2876
- path: { tag: "party-🎉" }
2877
- });
2878
- assert.deepEqual(codes(paired), [], "a surrogate pair is valid Unicode");
2879
- });
2880
- (0, import_qunit.test)("a slot outside a header value, a query value, a path value and the body is refused", async function(assert) {
2881
- let inURL = await lowerRequest({ url: "https://api.example.com/items?key={{apiKey}}" });
2882
- assert.deepEqual(codes(inURL), ["slot-out-of-place"]);
2883
- let inHeaderName = await lowerRequest({
2884
- url: "https://api.example.com/items",
2885
- headers: { "{{apiKey}}": "x" }
2886
- });
2887
- assert.true(codes(inHeaderName).includes("slot-out-of-place"));
2888
- let inQueryName = await lowerRequest({
2889
- url: "https://api.example.com/items",
2890
- query: { "{{apiKey}}": "x" }
2891
- });
2892
- assert.deepEqual(codes(inQueryName), ["slot-out-of-place"]);
2893
- let inBodyKey = await lowerRequest({
2894
- url: "https://api.example.com/items",
2895
- json: { auth: { "{{apiKey}}": "x" } }
2896
- });
2897
- assert.deepEqual(codes(inBodyKey), ["slot-out-of-place"], "a member's name is sent as written");
2898
- let inVariableName = await lowerRequest({
2899
- url: "https://api.example.com/graphql",
2900
- graphql: {
2901
- document: "query { viewer { id } }",
2902
- variables: { "{{apiKey}}": "x" }
2903
- }
2904
- });
2905
- assert.deepEqual(codes(inVariableName), ["slot-out-of-place"]);
2906
- let inDocument = await lowerRequest({
2907
- url: "https://api.example.com/graphql",
2908
- graphql: { document: "query { viewer(token: \"{{apiKey}}\") { id } }" }
2909
- });
2910
- assert.deepEqual(codes(inDocument), ["slot-out-of-place"]);
2911
- });
2912
- (0, import_qunit.test)("a GraphQL document built from values is refused", async function(assert) {
2913
- let computed = await lowerRequest({
2914
- url: "https://api.example.com/graphql",
2915
- graphql: { document: ownerParam }
2916
- }, { params: { owner: StringField } });
2917
- assert.deepEqual(codes(computed), ["string-built-graphql"]);
2918
- let spliced = await lowerRequest({
2919
- url: "https://api.example.com/graphql",
2920
- graphql: { document: `query { repo(owner: "${String({})}") { id } }` }
2921
- });
2922
- assert.deepEqual(codes(spliced), ["string-built-graphql"]);
2923
- });
2924
- (0, import_qunit.test)("a malformed slot is refused rather than sent as text", async function(assert) {
2925
- let result = await lowerRequest({
2926
- url: "https://api.example.com/items",
2927
- headers: { authorization: "Bearer {{apiKey|rot13}}" }
2928
- });
2929
- assert.deepEqual(codes(result), ["invalid-slot"]);
2930
- let foreign = await lowerRequest({
2931
- url: "https://api.example.com/items",
2932
- json: { template: "Hello {{name}}" }
2933
- });
2934
- assert.deepEqual(codes(foreign), [], "a vendor's own template text is not a slot");
2935
- });
2936
- (0, import_qunit.test)("a callApi runs no program", async function(assert) {
2937
- let result = await lowerRequest({ url: "https://api.example.com/items" }, { transformations: { $bxl: ".x=1;" } });
2938
- assert.deepEqual(codes(result), ["unrunnable-program"]);
2939
- });
2940
- (0, import_qunit.test)("a callApi is built on a card, not on a file", async function(assert) {
2941
- let { FileDef } = api;
2942
- class Notes extends FileDef {
2943
- static displayName = "Notes";
2944
- }
2945
- shim({ Notes });
2946
- let result = await lowerOperationDeclarations({ fetch: {
2947
- base: "callApi",
2948
- url: "https://api.example.com/items"
2949
- } }, {
2950
- definition: buildDefinition(Notes),
2951
- lookupDefinition,
2952
- identifyCard: (target) => identifyCard(target)
2953
- });
2954
- assert.deepEqual(codes(result), ["base-not-carried"]);
2955
- });
2956
- });
2957
- //#endregion