@poe-platform/safe-bash 0.1.822 → 0.1.824

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 (291) hide show
  1. package/dist/safe-bash/chunks/{chunk-HNT2MR4W.js → chunk-363QOIDR.js} +2 -1
  2. package/dist/safe-bash/chunks/chunk-AGHV53VF.js +42 -0
  3. package/dist/safe-bash/chunks/{chunk-VF3Q2V3E.js → chunk-RAFD5ZAH.js} +1 -1
  4. package/dist/safe-bash/chunks/{chunk-67QE3JLU.js → chunk-TZRVK3NU.js} +1 -1
  5. package/dist/safe-bash/chunks/{chunk-IRJS54AA.js → chunk-VWLQDZFF.js} +20 -12
  6. package/dist/safe-bash/chunks/{chunk-NAETSXBW.js → chunk-ZJAXMB5M.js} +1 -1
  7. package/dist/safe-bash/command-chunks/{chunk-LDR3PPM3.js → chunk-22QEL76N.js} +3 -3
  8. package/dist/safe-bash/command-chunks/{chunk-QX3WKBLI.js → chunk-36FV6BAG.js} +5 -3
  9. package/dist/safe-bash/command-chunks/{chunk-BSLXS4PE.js → chunk-3DH5QBZC.js} +1 -1
  10. package/dist/safe-bash/command-chunks/{chunk-ZSHXZ3XG.js → chunk-3EAZRKI4.js} +7 -7
  11. package/dist/safe-bash/command-chunks/{chunk-5EFNQ6FY.js → chunk-3EBQOZET.js} +216 -1
  12. package/dist/safe-bash/command-chunks/{chunk-KQE2D7PX.js → chunk-3HUCLYKJ.js} +2 -2
  13. package/dist/safe-bash/command-chunks/{chunk-J4I7KCQQ.js → chunk-4JABZEDO.js} +4 -4
  14. package/dist/safe-bash/command-chunks/{chunk-PVKSBXHB.js → chunk-4M6D4IUB.js} +4 -4
  15. package/dist/safe-bash/command-chunks/{chunk-UVM6QG2H.js → chunk-4MVQE6CT.js} +1 -1
  16. package/dist/safe-bash/command-chunks/{chunk-QWQHLMDX.js → chunk-4VTB4DGE.js} +3 -3
  17. package/dist/safe-bash/command-chunks/{chunk-JQPDVCBU.js → chunk-565AAQTV.js} +3 -3
  18. package/dist/safe-bash/command-chunks/{chunk-JSW6YH6T.js → chunk-5PRXCH54.js} +5 -5
  19. package/dist/safe-bash/command-chunks/{chunk-42OQIFPW.js → chunk-5RLK2QSY.js} +3 -3
  20. package/dist/safe-bash/command-chunks/{chunk-PYYAX5FB.js → chunk-63WEGFLL.js} +16 -16
  21. package/dist/safe-bash/command-chunks/{chunk-5QR4LTAK.js → chunk-6KZXFPOT.js} +6 -6
  22. package/dist/safe-bash/command-chunks/{chunk-LJLB7TBN.js → chunk-6YTXU3NF.js} +6 -6
  23. package/dist/safe-bash/command-chunks/{chunk-NNYOPI7K.js → chunk-7NF44M2V.js} +5 -5
  24. package/dist/safe-bash/command-chunks/{chunk-ZRHKXN6W.js → chunk-7RQGRFHJ.js} +2 -2
  25. package/dist/safe-bash/command-chunks/{chunk-QGSY4ZAU.js → chunk-7UYBNOOM.js} +2 -2
  26. package/dist/safe-bash/command-chunks/{chunk-WOT2YXBT.js → chunk-7ZQVMPSB.js} +213 -42
  27. package/dist/safe-bash/command-chunks/{chunk-6REH56FL.js → chunk-AA254KE5.js} +4 -4
  28. package/dist/safe-bash/command-chunks/{chunk-2VSNIHIW.js → chunk-APUXNXXQ.js} +11 -11
  29. package/dist/safe-bash/command-chunks/{chunk-4VHCA4KK.js → chunk-AVSINNZ6.js} +80 -3
  30. package/dist/safe-bash/command-chunks/{chunk-XE75H5ZZ.js → chunk-AVXSR5MO.js} +6 -6
  31. package/dist/safe-bash/command-chunks/{chunk-22D6Q6SW.js → chunk-BKCVCMUX.js} +2 -2
  32. package/dist/safe-bash/command-chunks/{chunk-UDRJKA3P.js → chunk-C23L4HZB.js} +2 -2
  33. package/dist/safe-bash/command-chunks/{chunk-PAEAEFK3.js → chunk-C3EEMMQL.js} +3 -3
  34. package/dist/safe-bash/command-chunks/{chunk-NDJPULBE.js → chunk-CEKBIZGU.js} +2 -2
  35. package/dist/safe-bash/command-chunks/{chunk-75OUKYCM.js → chunk-CH5JDE3C.js} +1 -1
  36. package/dist/safe-bash/command-chunks/{chunk-XNVL6AOV.js → chunk-CIYGC7WU.js} +6 -6
  37. package/dist/safe-bash/command-chunks/{chunk-RUXY7GN5.js → chunk-CMJBRGU2.js} +1 -1
  38. package/dist/safe-bash/command-chunks/{chunk-DGFMOT4O.js → chunk-CO4HYNPS.js} +1 -1
  39. package/dist/safe-bash/command-chunks/{chunk-TMJG745A.js → chunk-CQLZM75U.js} +3 -3
  40. package/dist/safe-bash/command-chunks/{chunk-T2LZWXWF.js → chunk-DBCTHLB5.js} +4 -4
  41. package/dist/safe-bash/command-chunks/{chunk-6RE4MZYM.js → chunk-DBEJMI7J.js} +1 -1
  42. package/dist/safe-bash/command-chunks/{chunk-XXUMECE4.js → chunk-DEEZYCOQ.js} +6 -6
  43. package/dist/safe-bash/command-chunks/{chunk-YJMS5Q4Y.js → chunk-DHTTI7CE.js} +8 -8
  44. package/dist/safe-bash/command-chunks/{chunk-D3WMD32B.js → chunk-DLLGOC4Q.js} +6 -6
  45. package/dist/safe-bash/command-chunks/{chunk-HVLF3Y4B.js → chunk-DYCYAIET.js} +5 -5
  46. package/dist/safe-bash/command-chunks/{chunk-BZLLQWRK.js → chunk-E5CDHXFA.js} +2 -2
  47. package/dist/safe-bash/command-chunks/{chunk-5NC2IQMQ.js → chunk-EV7A5FNN.js} +1 -1
  48. package/dist/safe-bash/command-chunks/{chunk-MCUDSE4H.js → chunk-EWECMOQ5.js} +1 -1
  49. package/dist/safe-bash/command-chunks/{chunk-2YC6MWQB.js → chunk-EY3UE26F.js} +1 -1
  50. package/dist/safe-bash/command-chunks/{chunk-ZQ4NQ24M.js → chunk-FJLVISSD.js} +4 -4
  51. package/dist/safe-bash/command-chunks/{chunk-WOO3YO2X.js → chunk-HTMGN3KL.js} +4 -4
  52. package/dist/safe-bash/command-chunks/{chunk-2E53ZL5D.js → chunk-HU72CZBN.js} +4 -4
  53. package/dist/safe-bash/command-chunks/{chunk-AH3ZEPAN.js → chunk-IGHFIRXK.js} +1 -1
  54. package/dist/safe-bash/command-chunks/{chunk-R4NPYXQX.js → chunk-IKBTII7C.js} +285 -70
  55. package/dist/safe-bash/command-chunks/{chunk-J3ISXTYB.js → chunk-JTEAYB72.js} +2 -2
  56. package/dist/safe-bash/command-chunks/{chunk-NR7POLKP.js → chunk-KCS25XUJ.js} +2 -2
  57. package/dist/safe-bash/command-chunks/chunk-LKAFLJ5L.js +123 -0
  58. package/dist/safe-bash/command-chunks/{chunk-EU5SR3LS.js → chunk-LSH6UKCT.js} +2 -2
  59. package/dist/safe-bash/command-chunks/{chunk-WV3C6BRD.js → chunk-MHZ7UTRX.js} +5 -5
  60. package/dist/safe-bash/command-chunks/{chunk-K6J3KFQ2.js → chunk-MSA5BQFK.js} +3 -3
  61. package/dist/safe-bash/command-chunks/{chunk-OMD45J52.js → chunk-MW3L6JB7.js} +6 -6
  62. package/dist/safe-bash/command-chunks/{chunk-AR65HNNX.js → chunk-N2TN7IBE.js} +1 -1
  63. package/dist/safe-bash/command-chunks/chunk-NNGWTDVJ.js +2819 -0
  64. package/dist/safe-bash/command-chunks/{chunk-NWA7ZJDV.js → chunk-NU64GWGN.js} +3 -3
  65. package/dist/safe-bash/command-chunks/{chunk-4Q3HP33O.js → chunk-NW3S6T6R.js} +146 -123
  66. package/dist/safe-bash/command-chunks/chunk-NXCJNPL3.js +47 -0
  67. package/dist/safe-bash/command-chunks/{chunk-GAYTDZPP.js → chunk-ORWYNKKL.js} +3 -3
  68. package/dist/safe-bash/command-chunks/{chunk-FCGMSOF6.js → chunk-P6YTNXRV.js} +1 -1
  69. package/dist/safe-bash/command-chunks/{chunk-3RDEX4AF.js → chunk-PAS4YSNN.js} +1 -1
  70. package/dist/safe-bash/command-chunks/{chunk-RKAL5VFP.js → chunk-PLVFJ6FF.js} +255 -616
  71. package/dist/safe-bash/command-chunks/{chunk-TTPT3OME.js → chunk-PSNTCRL5.js} +4 -4
  72. package/dist/safe-bash/command-chunks/{chunk-CJIFJ45R.js → chunk-QBCEAYQT.js} +1 -1
  73. package/dist/safe-bash/command-chunks/{chunk-FGK6HLSY.js → chunk-QC2RWSYM.js} +3 -3
  74. package/dist/safe-bash/command-chunks/{chunk-HCZITM4C.js → chunk-QPY3NCMC.js} +5 -5
  75. package/dist/safe-bash/command-chunks/{chunk-3TXPZLFI.js → chunk-R6RVR6ZZ.js} +5 -5
  76. package/dist/safe-bash/command-chunks/{chunk-HQFX5XKV.js → chunk-RB7XAYO2.js} +3 -3
  77. package/dist/safe-bash/command-chunks/{chunk-6PDXNY3T.js → chunk-RF5VEKFU.js} +9 -9
  78. package/dist/safe-bash/command-chunks/{chunk-VAMBWXDV.js → chunk-RUAGHZNF.js} +18 -18
  79. package/dist/safe-bash/command-chunks/{chunk-3MFYCMQU.js → chunk-S2T7DDGY.js} +16 -16
  80. package/dist/safe-bash/command-chunks/{chunk-LZHFVNEV.js → chunk-S3QYSI5E.js} +1 -1
  81. package/dist/safe-bash/command-chunks/{chunk-ZLMCWAAU.js → chunk-STTXZKR6.js} +3 -3
  82. package/dist/safe-bash/command-chunks/{chunk-AXUHORS3.js → chunk-SUYSZJI3.js} +1 -1
  83. package/dist/safe-bash/command-chunks/{chunk-C5SLY3RB.js → chunk-U2C6A3QO.js} +1 -1
  84. package/dist/safe-bash/command-chunks/{chunk-HCJWEB6P.js → chunk-U6IEK2CI.js} +7 -7
  85. package/dist/safe-bash/command-chunks/{chunk-NN6OWOJG.js → chunk-UC6DUY3K.js} +2 -2
  86. package/dist/safe-bash/command-chunks/{chunk-64L57DEI.js → chunk-UQTU7H6T.js} +9 -9
  87. package/dist/safe-bash/command-chunks/{chunk-I7MEH76L.js → chunk-UYNJF5QN.js} +1 -1
  88. package/dist/safe-bash/command-chunks/{chunk-ARA57PMC.js → chunk-V5PVNBOS.js} +4 -4
  89. package/dist/safe-bash/command-chunks/{chunk-IAHYG67O.js → chunk-V5ZBRM5R.js} +3 -3
  90. package/dist/safe-bash/command-chunks/{chunk-ZZ6EIACJ.js → chunk-VGHRMAI4.js} +5 -5
  91. package/dist/safe-bash/command-chunks/{chunk-DZTT5SLG.js → chunk-VP7R7HKY.js} +5 -5
  92. package/dist/safe-bash/command-chunks/{chunk-TP5MZHCB.js → chunk-W5Y7Y7PS.js} +3 -3
  93. package/dist/safe-bash/command-chunks/{chunk-ZTW2E5OT.js → chunk-WAE3OCOU.js} +3 -3
  94. package/dist/safe-bash/command-chunks/{chunk-DBYY7IDI.js → chunk-WCM47S5A.js} +10 -10
  95. package/dist/safe-bash/command-chunks/{chunk-U6VSRO6E.js → chunk-WNVBS4GV.js} +4 -4
  96. package/dist/safe-bash/command-chunks/{chunk-CXOAMPOV.js → chunk-WUIS2INH.js} +13 -13
  97. package/dist/safe-bash/command-chunks/{chunk-4HJEZGYN.js → chunk-YODHIRPW.js} +7 -7
  98. package/dist/safe-bash/command-chunks/{chunk-C3FERGHU.js → chunk-YRMTOLG5.js} +3 -3
  99. package/dist/safe-bash/command-chunks/{chunk-GQV5RWMN.js → chunk-ZFXHSFTU.js} +1 -1
  100. package/dist/safe-bash/command-chunks/{chunk-YXIJOYT6.js → chunk-ZUOCXDYW.js} +1 -1
  101. package/dist/safe-bash/command-chunks/{chunk-LBBJ5S3W.js → chunk-ZZKJPLIH.js} +1 -1
  102. package/dist/safe-bash/command-chunks/{engine-UPLVIV72-IGXUDNO5.js → engine-UPLVIV72-MSSFJLK4.js} +1 -1
  103. package/dist/safe-bash/command-chunks/{prompt-tool-debug-ERJKK3XZ.js → prompt-tool-debug-3POFNRYP.js} +5 -5
  104. package/dist/safe-bash/commands/bc/index.browser.js +1 -1
  105. package/dist/safe-bash/commands/llm/index.browser.js +3 -1
  106. package/dist/safe-bash/commands/llm/index.js +1 -1
  107. package/dist/safe-bash/commands/python/executor.browser.js +12 -1
  108. package/dist/safe-bash/commands/python/executor.js +1 -1
  109. package/dist/safe-bash/commands/python/index.browser.js +23 -1
  110. package/dist/safe-bash/commands/python/index.js +1 -1
  111. package/dist/safe-bash/commands/python/source-archive.d.ts +2 -0
  112. package/dist/safe-bash/commands/python/source-archive.js +2 -0
  113. package/dist/safe-bash/commands/python/source-zip.d.ts +2 -0
  114. package/dist/safe-bash/commands/python/source-zip.js +2 -0
  115. package/dist/safe-bash/core.browser.js +2 -2
  116. package/dist/safe-bash/full-core.browser.js +30 -6
  117. package/dist/safe-bash/plugins/index.browser.js +3 -3
  118. package/dist/safe-bash/registry-entry.browser.js +2 -2
  119. package/dist/safe-bash/search.browser.js +1 -1
  120. package/dist/safe-bash/shell/runtime.d.ts +2 -2
  121. package/dist/safe-bash/shell/runtime.js +11 -2
  122. package/dist/safe-bash/shell/sync-extra-evaluators.js +12 -12
  123. package/dist/safe-bash/shell-entry.browser.js +2 -2
  124. package/dist/safe-bash-command-exiftool/index.js +41 -0
  125. package/dist/safe-bash-command-git/git_rust.wasm +0 -0
  126. package/dist/safe-bash-command-llm/collections.js +24 -65
  127. package/dist/safe-bash-command-llm/command.js +6 -6
  128. package/dist/safe-bash-command-llm/fragment-loaders.d.ts +3 -2
  129. package/dist/safe-bash-command-llm/index.d.ts +3 -2
  130. package/dist/safe-bash-command-llm/index.js +10 -8
  131. package/dist/safe-bash-command-llm/loader-provider.d.ts +25 -0
  132. package/dist/safe-bash-command-llm/openai-sse.js +2 -2
  133. package/dist/safe-bash-command-llm/openai.js +4 -4
  134. package/dist/safe-bash-command-llm/providers/index.js +4 -4
  135. package/dist/safe-bash-command-llm/providers/openai.js +4 -4
  136. package/dist/safe-bash-command-llm/python-unicode.d.ts +2 -0
  137. package/dist/safe-bash-command-llm/templates.d.ts +7 -2
  138. package/dist/safe-bash-command-llm/types.d.ts +7 -1
  139. package/dist/safe-bash-command-mcp/index.browser.js +3 -0
  140. package/dist/safe-bash-command-mcp/index.js +3 -0
  141. package/dist/safe-bash-command-playwright-cli/index.js +36 -36
  142. package/dist/safe-bash-command-playwright-cli/playwright/abilities.js +7 -7
  143. package/dist/safe-bash-command-playwright-cli/playwright/adapter.js +3 -3
  144. package/dist/safe-bash-command-playwright-cli/playwright/capability-events.js +1 -1
  145. package/dist/safe-bash-command-playwright-cli/playwright/capability-result.js +1 -1
  146. package/dist/safe-bash-command-playwright-cli/playwright/controller.js +15 -15
  147. package/dist/safe-bash-command-playwright-cli/playwright/download-capabilities.js +1 -1
  148. package/dist/safe-bash-command-playwright-cli/playwright/drop-capability.js +1 -1
  149. package/dist/safe-bash-command-playwright-cli/playwright/index.js +35 -35
  150. package/dist/safe-bash-command-playwright-cli/playwright/modal-capabilities.js +1 -1
  151. package/dist/safe-bash-command-playwright-cli/playwright/native-evaluation.js +1 -1
  152. package/dist/safe-bash-command-playwright-cli/playwright/native-json-snapshot.js +1 -1
  153. package/dist/safe-bash-command-playwright-cli/playwright/native-snapshot.js +1 -1
  154. package/dist/safe-bash-command-playwright-cli/playwright/native-storage-replacement.js +2 -2
  155. package/dist/safe-bash-command-playwright-cli/playwright/profile.js +3 -3
  156. package/dist/safe-bash-command-playwright-cli/playwright/recording-capabilities.js +1 -1
  157. package/dist/safe-bash-command-playwright-cli/playwright/route-capabilities.js +1 -1
  158. package/dist/safe-bash-command-playwright-cli/playwright/snapshot.js +1 -1
  159. package/dist/safe-bash-command-playwright-cli/playwright/standard-capabilities.js +6 -6
  160. package/dist/safe-bash-command-playwright-cli/playwright/storage-capabilities.js +5 -5
  161. package/dist/safe-bash-command-playwright-cli/playwright/tracing-capabilities.js +1 -1
  162. package/dist/safe-bash-command-playwright-cli/playwright/webmcp-capabilities.js +1 -1
  163. package/dist/safe-bash-command-python/build-backend.d.ts +93 -0
  164. package/dist/safe-bash-command-python/build-dependencies.d.ts +13 -0
  165. package/dist/safe-bash-command-python/build-environment.d.ts +3 -0
  166. package/dist/safe-bash-command-python/build-wheel.d.ts +8 -0
  167. package/dist/safe-bash-command-python/executor.d.ts +12 -2
  168. package/dist/safe-bash-command-python/executor.js +27 -4
  169. package/dist/safe-bash-command-python/index.js +27 -4
  170. package/dist/safe-bash-command-python/jspi.js +2 -2
  171. package/dist/safe-bash-command-python/llm-assets-node.js +1 -1
  172. package/dist/safe-bash-command-python/llm-fragment-loader.d.ts +6 -0
  173. package/dist/safe-bash-command-python/llm-functions-loader.d.ts +5 -1
  174. package/dist/safe-bash-command-python/llm-loader-discovery.d.ts +13 -0
  175. package/dist/safe-bash-command-python/llm-package-manager.d.ts +7 -0
  176. package/dist/safe-bash-command-python/llm-template-loader.d.ts +6 -0
  177. package/dist/safe-bash-command-python/manifest.d.ts +17 -0
  178. package/dist/safe-bash-command-python/provisioning.d.ts +37 -5
  179. package/dist/safe-bash-command-python/provisioning.js +2 -1
  180. package/dist/safe-bash-command-python/source-archive.d.ts +4 -0
  181. package/dist/safe-bash-command-python/source-archive.js +136 -0
  182. package/dist/safe-bash-command-python/source-environment.d.ts +12 -0
  183. package/dist/safe-bash-command-python/source-snapshot.d.ts +8 -0
  184. package/dist/safe-bash-command-python/source-zip.d.ts +8 -0
  185. package/dist/safe-bash-command-python/source-zip.js +8 -0
  186. package/dist/safe-bash-command-python/worker.js +3 -185
  187. package/dist/safe-bash-command-safejs/index.js +5 -5
  188. package/dist/safe-bash-command-safejs/runtime.js +3 -3
  189. package/dist/safe-bash-command-ssconvert/index.js +8 -8
  190. package/dist/safe-bash-compression-engine/bounded-codec.js +2 -2
  191. package/dist/safe-bash-compression-engine/codec-loader.js +1 -1
  192. package/dist/safe-bash-compression-engine/files.js +5 -5
  193. package/dist/safe-bash-compression-engine/index.js +4 -4
  194. package/dist/safe-bash-compression-engine/operand.js +5 -5
  195. package/dist/safe-bash-compression-engine/stream.js +4 -4
  196. package/dist/safe-bash-compression-engine/zstd-decode.js +3 -3
  197. package/dist/safe-bash-csv-engine/index.js +1 -1
  198. package/dist/safe-bash-csv-engine/python-utf7.d.ts +18 -0
  199. package/dist/safe-bash-csv-engine/text-decoder.d.ts +1 -0
  200. package/dist/safe-bash-csv-engine/text-decoder.js +5 -3
  201. package/dist/safe-bash-presentation-engine/accessibility.js +15 -15
  202. package/dist/safe-bash-presentation-engine/animation-editing.js +5 -5
  203. package/dist/safe-bash-presentation-engine/animations.js +5 -5
  204. package/dist/safe-bash-presentation-engine/backgrounds.js +6 -6
  205. package/dist/safe-bash-presentation-engine/chart-editing.js +18 -18
  206. package/dist/safe-bash-presentation-engine/chart-object-operations.js +12 -12
  207. package/dist/safe-bash-presentation-engine/charts.js +15 -15
  208. package/dist/safe-bash-presentation-engine/command-placeholder.js +39 -39
  209. package/dist/safe-bash-presentation-engine/comments.js +6 -6
  210. package/dist/safe-bash-presentation-engine/connector-operations.js +16 -16
  211. package/dist/safe-bash-presentation-engine/connectors.js +13 -13
  212. package/dist/safe-bash-presentation-engine/diff.js +21 -21
  213. package/dist/safe-bash-presentation-engine/drawing-format.js +7 -7
  214. package/dist/safe-bash-presentation-engine/drawing-operations.js +15 -15
  215. package/dist/safe-bash-presentation-engine/drawing-schema.js +8 -8
  216. package/dist/safe-bash-presentation-engine/equations.js +6 -6
  217. package/dist/safe-bash-presentation-engine/fields.js +6 -6
  218. package/dist/safe-bash-presentation-engine/image-extraction.js +7 -7
  219. package/dist/safe-bash-presentation-engine/image-formatting.js +16 -16
  220. package/dist/safe-bash-presentation-engine/image-insertion.js +6 -6
  221. package/dist/safe-bash-presentation-engine/image-replacement.js +7 -7
  222. package/dist/safe-bash-presentation-engine/images.js +6 -6
  223. package/dist/safe-bash-presentation-engine/index.js +104 -104
  224. package/dist/safe-bash-presentation-engine/layouts.js +5 -5
  225. package/dist/safe-bash-presentation-engine/links.js +5 -5
  226. package/dist/safe-bash-presentation-engine/masters.js +4 -4
  227. package/dist/safe-bash-presentation-engine/media-editing.js +13 -13
  228. package/dist/safe-bash-presentation-engine/media-extraction.js +7 -7
  229. package/dist/safe-bash-presentation-engine/media.js +6 -6
  230. package/dist/safe-bash-presentation-engine/memberships.js +5 -5
  231. package/dist/safe-bash-presentation-engine/notes.js +6 -6
  232. package/dist/safe-bash-presentation-engine/ole-insertion.js +6 -6
  233. package/dist/safe-bash-presentation-engine/opaque-objects.js +2 -2
  234. package/dist/safe-bash-presentation-engine/package-tools.js +6 -6
  235. package/dist/safe-bash-presentation-engine/presentation-model.js +38 -38
  236. package/dist/safe-bash-presentation-engine/presentation-settings.js +5 -5
  237. package/dist/safe-bash-presentation-engine/properties.js +6 -6
  238. package/dist/safe-bash-presentation-engine/retained-inspection.js +3 -3
  239. package/dist/safe-bash-presentation-engine/retained-text.js +16 -16
  240. package/dist/safe-bash-presentation-engine/sanitize.js +7 -7
  241. package/dist/safe-bash-presentation-engine/selectors.js +2 -2
  242. package/dist/safe-bash-presentation-engine/shape-groups.js +15 -15
  243. package/dist/safe-bash-presentation-engine/shape-operations.js +14 -14
  244. package/dist/safe-bash-presentation-engine/shape-path-operations.js +16 -16
  245. package/dist/safe-bash-presentation-engine/shape-paths.js +5 -5
  246. package/dist/safe-bash-presentation-engine/shape-selection.js +15 -15
  247. package/dist/safe-bash-presentation-engine/shape-transforms.js +5 -5
  248. package/dist/safe-bash-presentation-engine/shapes.js +11 -11
  249. package/dist/safe-bash-presentation-engine/slide-copy.js +7 -7
  250. package/dist/safe-bash-presentation-engine/slide-import.js +6 -6
  251. package/dist/safe-bash-presentation-engine/slide-merge-split.js +8 -8
  252. package/dist/safe-bash-presentation-engine/slide-model.js +25 -25
  253. package/dist/safe-bash-presentation-engine/slide-removal.js +7 -7
  254. package/dist/safe-bash-presentation-engine/slide-transfer-budget.js +2 -2
  255. package/dist/safe-bash-presentation-engine/slides.js +5 -5
  256. package/dist/safe-bash-presentation-engine/table-operations.js +17 -17
  257. package/dist/safe-bash-presentation-engine/table-spans.js +16 -16
  258. package/dist/safe-bash-presentation-engine/tables.js +15 -15
  259. package/dist/safe-bash-presentation-engine/tags.js +6 -6
  260. package/dist/safe-bash-presentation-engine/template-bindings.js +16 -16
  261. package/dist/safe-bash-presentation-engine/template-repeat.js +26 -26
  262. package/dist/safe-bash-presentation-engine/text-fitting.js +11 -11
  263. package/dist/safe-bash-presentation-engine/text-frames.js +11 -11
  264. package/dist/safe-bash-presentation-engine/text-paragraphs.js +11 -11
  265. package/dist/safe-bash-presentation-engine/text-reading.js +3 -3
  266. package/dist/safe-bash-presentation-engine/text-replacement.js +6 -6
  267. package/dist/safe-bash-presentation-engine/text-runs.js +8 -8
  268. package/dist/safe-bash-presentation-engine/themes.js +5 -5
  269. package/dist/safe-bash-presentation-engine/transitions.js +6 -6
  270. package/dist/safe-bash-presentation-engine/validation.js +2 -2
  271. package/dist/safe-bash-presentation-engine/xml-parts.js +5 -5
  272. package/dist/safe-bash-zip-engine/index.js +1 -1
  273. package/dist/safe-bash-zip-engine/zip/repair.js +1 -1
  274. package/dist/safe-bash-zip-engine/zip/sfx.js +1 -1
  275. package/dist/safe-bash-zip-engine/zip-format.d.ts +3 -1
  276. package/dist/safe-bash-zip-engine/zip-format.js +1 -1
  277. package/dist/safe-playwright-cloudflare/shell-browser-resource.d.ts +1 -1
  278. package/dist/safe-playwright-cloudflare/shell-browser-resource.js +35 -20
  279. package/package.json +13 -3
  280. package/dist/safe-bash/chunks/chunk-PSD2RSOS.js +0 -31
  281. package/dist/safe-bash/command-chunks/chunk-RHXV2KG5.js +0 -1466
  282. package/dist/safe-bash/command-chunks/{biff-AYJZR2YV-YFF3BK43.js → biff-AYJZR2YV-2BK47I2W.js} +1 -1
  283. package/dist/safe-bash/command-chunks/{chunk-SKDJCMGI.js → chunk-ATUZ7J3B.js} +3 -3
  284. package/dist/safe-bash/command-chunks/{chunk-4Q4R3VZU.js → chunk-ETFJ4L7F.js} +0 -0
  285. package/dist/safe-bash/command-chunks/{chunk-QWHBQBPB.js → chunk-EXDMIGZY.js} +6 -6
  286. package/dist/safe-bash/command-chunks/{chunk-SKF6PGA5.js → chunk-I2OKE2NI.js} +3 -3
  287. package/dist/safe-bash/command-chunks/{chunk-2H6RJPCQ.js → chunk-JDDZRKC4.js} +3 -3
  288. package/dist/safe-bash/command-chunks/{chunk-3TP4SSPS.js → chunk-SRXARACJ.js} +3 -3
  289. package/dist/safe-bash/command-chunks/{chunk-D54L2IOZ.js → chunk-Y7UXJ77P.js} +3 -3
  290. package/dist/safe-bash/command-chunks/{dif-BXKPQOCO-FVJYYGYB.js → dif-BXKPQOCO-4KB3RC6G.js} +4 -4
  291. package/dist/safe-bash/command-chunks/{sylk-25D7TL2Y-NJKBZZTF.js → sylk-25D7TL2Y-RU6ANKGT.js} +4 -4
@@ -1421,11 +1421,20 @@ export class BudgetedPipeStageSink {
1421
1421
  }
1422
1422
  }
1423
1423
  writeSync(chunk) {
1424
- this.budget.assertPipelineInput(chunk.byteLength);
1425
- this.budget.bytes += chunk.byteLength;
1424
+ if (!this.canWriteSync(chunk.byteLength))
1425
+ return false;
1426
+ this.signal.throwIfAborted();
1427
+ if (!(chunk instanceof Uint8Array))
1428
+ throw new TypeError("Shell output must be Uint8Array");
1429
+ const budget = this.budget;
1430
+ if (chunk.byteLength > budget.limits.maxOutputBytes - budget.bytes)
1431
+ budget.fail("maxOutputBytes");
1432
+ budget.assertPipelineInput(chunk.byteLength);
1433
+ budget.bytes += chunk.byteLength;
1426
1434
  this.writable.write(chunk);
1427
1435
  if (chunk.byteLength && this.written)
1428
1436
  this.written.add(this.index);
1437
+ return true;
1429
1438
  }
1430
1439
  write(chunk) {
1431
1440
  try {
@@ -318,6 +318,9 @@ import { text as awkValueText, compare as awkCompare, inputValue as awkInputValu
318
318
  import { shellValueByteLength } from "../contracts/value.js";
319
319
  import { stateMonitor } from "./arrays/state.js";
320
320
  import { Budget, Runtime } from "./runtime.js";
321
+ function canWriteBuiltinOutput(budget, pipe, byteLength) {
322
+ return (!pipe || pipe.canWriteSync(byteLength)) && (budget.bytes + byteLength <= budget.maxOutputBytesSmi || byteLength <= budget.limits.maxOutputBytes - budget.bytes);
323
+ }
321
324
  const createFmtEngine = (...args) => syncCommandEvaluators.createFmtEngine(...args);
322
325
  const parseFmtArguments = (...args) => syncCommandEvaluators.parseFmtArguments(...args);
323
326
  const evalSyncCal = (...args) => syncCommandEvaluators.evalSyncCal?.(...args);
@@ -489,12 +492,14 @@ function initializeSyncPrototypes() {
489
492
  },
490
493
  });
491
494
  Object.assign(BudgetedPipeStageSink.prototype, {
492
- canWriteSync() {
495
+ canWriteSync(byteLength = 0) {
493
496
  if (this.signal.aborted)
494
497
  return false;
495
498
  const w = this.writable;
496
499
  const pipe = w._pipe;
497
- return Boolean(w.open && pipe && !pipe.failed && !pipe.signal?.aborted && pipe.readerReferences && (!pipe.writes || pipe.writes.size === 0) && (pipe.availableBytes ?? 0) < (pipe.highWaterMark ?? 0));
500
+ const avail = pipe?.availableBytes ?? 0;
501
+ const hwm = pipe?.highWaterMark ?? 0;
502
+ return Boolean(w.open && pipe && !pipe.failed && !pipe.signal?.aborted && pipe.readerReferences && (!pipe.writes || pipe.writes.size === 0) && (byteLength > 0 ? avail + byteLength <= hwm : avail < hwm));
498
503
  },
499
504
  });
500
505
  }
@@ -12159,7 +12164,7 @@ const syncExtraRuntimeMethods = {
12159
12164
  if (disc.status !== 0 || fastSyncSink || fastPipeSink || syncOut) {
12160
12165
  const encoded = disc.status === 0 ? (encodeRedirectTextWithNewlineToScratch(disc.text) ?? fastSharedTextEncoder.encode(`${disc.text}\n`)) : undefined;
12161
12166
  const byteLength = encoded ? encoded.byteLength : 0;
12162
- if (byteLength === 0 || this.budget.bytes + byteLength <= this.budget.maxOutputBytesSmi || byteLength <= this.budget.limits.maxOutputBytes - this.budget.bytes) {
12167
+ if (byteLength === 0 || (canWriteBuiltinOutput(this.budget, fastPipeSink, byteLength))) {
12163
12168
  if (rawState.extensions && !rawState.extensions.eventDepth)
12164
12169
  publishCommandSpelling(rawState, commandSpelling(command));
12165
12170
  const restEpoch = monitor.chargeInternal(syncRestorationCharge, syncRestorationTickets).epoch;
@@ -12200,7 +12205,7 @@ const syncExtraRuntimeMethods = {
12200
12205
  if (fastSyncSink || fastPipeSink || syncOut) {
12201
12206
  const encoded = encodeRedirectTextWithNewlineToScratch(rawState.cwd) ?? fastSharedTextEncoder.encode(`${rawState.cwd}\n`);
12202
12207
  const byteLength = encoded.byteLength;
12203
- if (this.budget.bytes + byteLength <= this.budget.maxOutputBytesSmi || byteLength <= this.budget.limits.maxOutputBytes - this.budget.bytes) {
12208
+ if (canWriteBuiltinOutput(this.budget, fastPipeSink, byteLength)) {
12204
12209
  if (rawState.extensions && !rawState.extensions.eventDepth)
12205
12210
  publishCommandSpelling(rawState, commandSpelling(command));
12206
12211
  const restEpoch = monitor.chargeInternal(syncRestorationCharge, syncRestorationTickets).epoch;
@@ -12282,7 +12287,7 @@ const syncExtraRuntimeMethods = {
12282
12287
  if (outText !== undefined) {
12283
12288
  const encoded = encodeRedirectTextWithNewlineToScratch(outText) ?? fastSharedTextEncoder.encode(`${outText}\n`);
12284
12289
  const byteLength = encoded.byteLength;
12285
- if (this.budget.bytes + byteLength <= this.budget.maxOutputBytesSmi || byteLength <= this.budget.limits.maxOutputBytes - this.budget.bytes) {
12290
+ if (canWriteBuiltinOutput(this.budget, fastPipeSink, byteLength)) {
12286
12291
  if (rawState.extensions && !rawState.extensions.eventDepth)
12287
12292
  publishCommandSpelling(rawState, commandSpelling(command));
12288
12293
  const restEpoch = monitor.chargeInternal(syncRestorationCharge, syncRestorationTickets).epoch;
@@ -12401,7 +12406,7 @@ const syncExtraRuntimeMethods = {
12401
12406
  if (preEncoded !== undefined || formatted !== undefined) {
12402
12407
  const encoded = preEncoded ?? encodeRedirectTextToScratch(formatted);
12403
12408
  const byteLength = encoded.byteLength;
12404
- if (this.budget.bytes + byteLength <= this.budget.maxOutputBytesSmi || byteLength <= this.budget.limits.maxOutputBytes - this.budget.bytes) {
12409
+ if (canWriteBuiltinOutput(this.budget, fastPipeSink, byteLength)) {
12405
12410
  const restEpoch = monitor.chargeInternal(syncRestorationCharge, syncRestorationTickets).epoch;
12406
12411
  this.budget.tick();
12407
12412
  if (fastSyncSink) {
@@ -19272,7 +19277,7 @@ const syncExtraRuntimeMethods = {
19272
19277
  }
19273
19278
  const chunk = fastSharedTextEncoder.encode(this._syncStdoutBatch);
19274
19279
  this._syncStdoutBatch = "";
19275
- if ((io.stdout instanceof BudgetedSyncSink && io.stdout.write === BudgetedSyncSink.prototype.write) || (io.stdout instanceof Capture && io.stdout.write === Capture.prototype.write)) {
19280
+ if ((io.stdout instanceof BudgetedSyncSink && io.stdout.write === BudgetedSyncSink.prototype.write) || (io.stdout instanceof Capture && io.stdout.write === Capture.prototype.write) || (io.stdout instanceof BudgetedPipeStageSink && io.stdout.write === BudgetedPipeStageSink.prototype.write && io.stdout.canWriteSync(chunk.byteLength))) {
19276
19281
  if (io.stdout.budget !== this.budget) {
19277
19282
  if (chunk.byteLength > this.budget.limits.maxOutputBytes - this.budget.bytes)
19278
19283
  this.budget.fail("maxOutputBytes");
@@ -19280,11 +19285,6 @@ const syncExtraRuntimeMethods = {
19280
19285
  }
19281
19286
  io.stdout.writeSync(chunk);
19282
19287
  }
19283
- else if (io.stdout instanceof BudgetedPipeStageSink && io.stdout.canWriteSync()) {
19284
- if (chunk.byteLength > this.budget.limits.maxOutputBytes - this.budget.bytes)
19285
- this.budget.fail("maxOutputBytes");
19286
- io.stdout.writeSync(chunk);
19287
- }
19288
19288
  else {
19289
19289
  if (budgetedSinks.get(io.stdout)?.budget !== this.budget) {
19290
19290
  if (chunk.byteLength > this.budget.limits.maxOutputBytes - this.budget.bytes)
@@ -2,14 +2,14 @@ import {
2
2
  cloudflareWorkerLimits,
3
3
  mapfileExtension,
4
4
  readExtension
5
- } from "./chunks/chunk-67QE3JLU.js";
5
+ } from "./chunks/chunk-TZRVK3NU.js";
6
6
  import "./chunks/chunk-GI7OALXO.js";
7
7
  import {
8
8
  Shell,
9
9
  ShellLimitError,
10
10
  ShellSyntaxError,
11
11
  parseShell
12
- } from "./chunks/chunk-IRJS54AA.js";
12
+ } from "./chunks/chunk-VWLQDZFF.js";
13
13
  import "./chunks/chunk-N4CQ5E3G.js";
14
14
  import "./chunks/chunk-EDJBO2HZ.js";
15
15
  import "./chunks/chunk-IMOFLK26.js";
@@ -2241,6 +2241,47 @@ function createExiftoolCommand(options = {}) {
2241
2241
  resources.admit("retained", text.length * 5);
2242
2242
  await writeBytes(error ? stderr.output : stdout.output, new TextEncoder().encode(text), context.signal);
2243
2243
  };
2244
+ if (context.args.length === 1 && ["--help", "-help", "-?"].includes(context.args[0])) {
2245
+ await output(`Usage: exiftool [OPTIONS] [-TAG...] FILE...
2246
+ exiftool --help | -help | -?
2247
+
2248
+ Inspect and edit the supported metadata subset in virtual files.
2249
+ Standalone help reads no files and never invokes host ExifTool.
2250
+
2251
+ Examples:
2252
+ exiftool -j image.png
2253
+ exiftool -n -s3 -ImageWidth image.png
2254
+ exiftool -Title=Example image.png
2255
+ exiftool -Title= -overwrite_original image.png
2256
+ exiftool -j -- --help
2257
+
2258
+ Formats:
2259
+ PNG: dimensions, text metadata and timestamps; admitted tag writes.
2260
+ JPEG: dimensions, selected EXIF tags and comments; admitted tag writes.
2261
+ PDF: selected Info metadata reads/writes; no -all= or redaction.
2262
+ WebP, DOCX, PPTX, XLSX, ODT, EPUB: limited metadata inspection only.
2263
+ This is not full upstream format or tag compatibility.
2264
+
2265
+ Options:
2266
+ -j, -json JSON extraction; -csv for CSV extraction
2267
+ -TAG Select an admitted tag; -TAG=VALUE writes, -TAG= deletes
2268
+ -n, -s3 Numeric conversion, values-only output
2269
+ -overwrite_original Replace without creating the default FILE_original backup
2270
+ -- Remaining arguments are literal file names
2271
+ - Read stdin once (extraction only)
2272
+ -@ FILE Read arguments from a virtual UTF-8 file
2273
+ -ver, --version Report the reference ExifTool version
2274
+
2275
+ Limits:
2276
+ No host files, user config code, directory scanning or stay_open protocol.
2277
+ Unsupported flags, tags and editing operations are refused.
2278
+ SDK limits bound cumulative input, decoded, retained and output bytes,
2279
+ work, arguments, files and argument-file depth; quotas default to unlimited.
2280
+ Configure maxInputBytes, maxOutputBytes, maxWork and other limits through
2281
+ exiftoolCommands({ limits }); cancellation and output budgets apply to help.
2282
+ `);
2283
+ return { exitCode: 0 };
2284
+ }
2244
2285
  if (context.args.length === 1 && (context.args[0] === "-ver" || context.args[0] === "--version")) {
2245
2286
  await output(exiftoolRegistry.source.version + "\n");
2246
2287
  return { exitCode: 0 };
@@ -2,27 +2,30 @@ import {
2
2
  decodeLlmText,
3
3
  indentLlmText,
4
4
  withEmbeddingJsonDocument
5
- } from "../safe-bash/command-chunks/chunk-I7MEH76L.js";
5
+ } from "../safe-bash/command-chunks/chunk-UYNJF5QN.js";
6
6
  import {
7
7
  acquireEmbeddingInput,
8
+ commandArguments,
8
9
  createLlmConfiguration,
9
10
  embeddingCommand,
10
- embeddingText
11
- } from "../safe-bash/command-chunks/chunk-WOT2YXBT.js";
11
+ embeddingText,
12
+ hasUnpairedSurrogate,
13
+ pythonSurrogateId
14
+ } from "../safe-bash/command-chunks/chunk-7ZQVMPSB.js";
12
15
  import {
13
16
  createLlmSpool,
14
17
  fileSource,
15
18
  floatText,
16
19
  isPythonPrintable
17
- } from "../safe-bash/command-chunks/chunk-BZLLQWRK.js";
20
+ } from "../safe-bash/command-chunks/chunk-E5CDHXFA.js";
18
21
  import {
19
22
  tokenInteger
20
23
  } from "../safe-bash/command-chunks/chunk-GDH7OVYK.js";
21
- import "../safe-bash/command-chunks/chunk-GQV5RWMN.js";
24
+ import "../safe-bash/command-chunks/chunk-ZFXHSFTU.js";
22
25
  import {
23
26
  sourceBytes,
24
27
  waitForSource
25
- } from "../safe-bash/command-chunks/chunk-QX3WKBLI.js";
28
+ } from "../safe-bash/command-chunks/chunk-36FV6BAG.js";
26
29
  import {
27
30
  jsonValue
28
31
  } from "../safe-bash/command-chunks/chunk-GNPPPYDF.js";
@@ -164,16 +167,6 @@ import { FsError } from "../safe-bash-contracts/index.js";
164
167
  import { md5 as md52 } from "../safe-bash-checksum-engine/md5.js";
165
168
  import { withSqliteStatement as withSqliteStatement3 } from "../safe-bash-sqlite-engine/storage.js";
166
169
 
167
- // packages/safe-bash-command-llm/src/python-unicode.ts
168
- function hasUnpairedSurrogate(value) {
169
- for (const char of value) {
170
- const point = char.codePointAt(0);
171
- if (point >= 55296 && point <= 57343) return true;
172
- }
173
- return false;
174
- }
175
- var pythonSurrogateId = /* @__PURE__ */ Symbol("pythonSurrogateId");
176
-
177
170
  // packages/safe-bash-command-llm/src/collections-write.ts
178
171
  import { sqliteRecord as sqliteRecord2, withSqliteStatement as withSqliteStatement2 } from "../safe-bash-sqlite-engine/storage.js";
179
172
  var blob2 = (size, bytes) => ({ type: "blob", size, bytes });
@@ -1303,7 +1296,7 @@ async function withEmbeddingFileGlob(options, source, operation) {
1303
1296
 
1304
1297
  // packages/safe-bash-command-llm/src/import-files.ts
1305
1298
  import { FsError as FsError9 } from "../safe-bash-contracts/index.js";
1306
- import { PythonTextDecoder, PythonTextDecodeError, PythonIso2022PendingError } from "../safe-bash-csv-engine/text-decoder.js";
1299
+ import { PythonTextDecoder, PythonTextDecodeError, PythonIso2022PendingError, PythonUtf7EncodingError } from "../safe-bash-csv-engine/text-decoder.js";
1307
1300
  async function withFileEmbeddingEntries(options, files, operation) {
1308
1301
  const { fs, directory, signal } = options, maxBytes = options.maxInputBytes ?? Infinity;
1309
1302
  if (maxBytes !== Infinity && (!Number.isSafeInteger(maxBytes) || maxBytes < 0)) throw new RangeError("Invalid embedding input byte limit");
@@ -1315,6 +1308,7 @@ async function withFileEmbeddingEntries(options, files, operation) {
1315
1308
  const stat = await fs.stat(file.path, { signal });
1316
1309
  if (stat.type === "directory") continue;
1317
1310
  const input = await fileSource({ fs, path: file.path, signal, maxBytes, expectedStat: stat });
1311
+ let selectedEncodingError;
1318
1312
  let raw, selected, failed2 = false, retire;
1319
1313
  try {
1320
1314
  raw = await createLlmSpool(fs, directory, signal, "input");
@@ -1328,7 +1322,7 @@ async function withFileEmbeddingEntries(options, files, operation) {
1328
1322
  else if (options.binary) selected = await createLlmSpool(fs, directory, signal, "input");
1329
1323
  else for (const encoding of options.encodings?.length ? options.encodings : ["utf-8", "latin-1"]) {
1330
1324
  const decoder = new PythonTextDecoder(encoding), candidate = await createLlmSpool(fs, directory, signal, "input");
1331
- let accepted = false, failedAttempt = false;
1325
+ let accepted = false, failedAttempt = false, encodingError;
1332
1326
  try {
1333
1327
  const decoded = { async *[Symbol.asyncIterator]() {
1334
1328
  for await (const bytes of raw.replay()) for (let offset = 0; offset < bytes.length; offset += 4096) {
@@ -1347,7 +1341,10 @@ async function withFileEmbeddingEntries(options, files, operation) {
1347
1341
  } catch (error) {
1348
1342
  failedAttempt = true;
1349
1343
  signal.throwIfAborted();
1350
- if (!(error instanceof PythonTextDecodeError) && !(error instanceof PythonIso2022PendingError)) throw error;
1344
+ if (error instanceof PythonUtf7EncodingError) {
1345
+ accepted = true;
1346
+ encodingError = error;
1347
+ } else if (!(error instanceof PythonTextDecodeError) && !(error instanceof PythonIso2022PendingError)) throw error;
1351
1348
  failedAttempt = false;
1352
1349
  } finally {
1353
1350
  if (!accepted) try {
@@ -1357,6 +1354,7 @@ async function withFileEmbeddingEntries(options, files, operation) {
1357
1354
  }
1358
1355
  }
1359
1356
  if (accepted) {
1357
+ selectedEncodingError = encodingError;
1360
1358
  const previous = selected;
1361
1359
  selected = candidate;
1362
1360
  await previous?.close();
@@ -1366,6 +1364,7 @@ async function withFileEmbeddingEntries(options, files, operation) {
1366
1364
  await options.undecodable?.(file.displayPath ?? file.path);
1367
1365
  continue;
1368
1366
  }
1367
+ if (selectedEncodingError) throw selectedEncodingError;
1369
1368
  const retained = selected;
1370
1369
  let closed = false, consumed = false;
1371
1370
  retire = () => {
@@ -1776,58 +1775,18 @@ function createLlmCollectionCommands(options) {
1776
1775
  throw error;
1777
1776
  }
1778
1777
  });
1779
- if (tokens[0] === "--help" || tokens[0] === "-h") {
1780
- await emit(groupHelp);
1781
- return 0;
1782
- }
1783
- let command = "list", start = tokens[0] === "--" ? 1 : 0;
1784
- if (tokens[start] && Object.hasOwn(usages, tokens[start])) {
1785
- command = tokens[start];
1786
- start++;
1787
- }
1778
+ const parsed = await commandArguments("collections", tokens, ["list", "delete", "path"], emit, diagnostic, step, void 0, (name) => name === "collections" ? groupHelp : help2[name.slice(12)]);
1779
+ if (typeof parsed === "number") return parsed;
1780
+ const { command, operands, values } = parsed;
1781
+ const database = values.get("--database")?.at(-1), json = values.has("--json");
1788
1782
  const fail = async (message, code = 1, usage3 = false) => {
1789
- await diagnostic((usage3 ? usages[command] + `Try 'llm collections ${command} -h' for help.
1783
+ await diagnostic((usage3 ? `Usage: llm collections ${command} [OPTIONS]${command === "delete" ? " COLLECTION" : ""}
1784
+ Try 'llm collections ${command} -h' for help.
1790
1785
 
1791
1786
  ` : "") + `Error: ${message}
1792
1787
  `);
1793
1788
  return code;
1794
1789
  };
1795
- let database, json = false, ended = false, wantsHelp = false;
1796
- const operands = [];
1797
- for (let index = start; index < tokens.length; index++) {
1798
- await step();
1799
- const token = tokens[index];
1800
- if (!ended && token === "--") {
1801
- ended = true;
1802
- continue;
1803
- }
1804
- if (ended || !token.startsWith("-") || token === "-") {
1805
- operands.push(token);
1806
- continue;
1807
- }
1808
- const equals = token.indexOf("="), long = token.startsWith("--");
1809
- for (let cursor = long ? 0 : 1; cursor < token.length; cursor++) {
1810
- const flag = long ? token.slice(0, equals < 0 ? void 0 : equals) : "-" + token[cursor];
1811
- if (flag === "--help" || flag === "-h" || flag === "--json" && command === "list") {
1812
- if (long && equals >= 0) return fail(`Option '${flag}' does not take a value.`, 2);
1813
- if (flag === "--json") json = true;
1814
- else wantsHelp = true;
1815
- if (long) break;
1816
- continue;
1817
- }
1818
- if (command === "path" || flag !== "-d" && flag !== "--database") return fail(`No such option: ${flag}`, 2, true);
1819
- database = (long ? equals < 0 ? void 0 : token.slice(equals + 1) : token.slice(cursor + 1) || void 0) ?? tokens[++index];
1820
- if (database === void 0) return fail(`Option '${flag}' requires an argument.`, 2);
1821
- break;
1822
- }
1823
- }
1824
- if (wantsHelp) {
1825
- await emit(help2[command]);
1826
- return 0;
1827
- }
1828
- if (command === "delete" && !operands.length) return fail("Missing argument 'COLLECTION'.", 2, true);
1829
- const extra = operands.slice(command === "delete" ? 1 : 0);
1830
- if (extra.length) return fail(`Got unexpected extra argument${extra.length === 1 ? "" : "s"} (${extra.join(" ")})`, 2, true);
1831
1790
  const config = createLlmConfiguration(context, maxConfigurationBytes);
1832
1791
  if (command === "path") {
1833
1792
  await emit(config.directory + "/embeddings.db\n");
@@ -3,19 +3,19 @@ import {
3
3
  createLlmCommands,
4
4
  llmCommands,
5
5
  llmReferenceVersion
6
- } from "../safe-bash/command-chunks/chunk-RKAL5VFP.js";
7
- import "../safe-bash/command-chunks/chunk-MCUDSE4H.js";
8
- import "../safe-bash/command-chunks/chunk-WOT2YXBT.js";
9
- import "../safe-bash/command-chunks/chunk-BZLLQWRK.js";
6
+ } from "../safe-bash/command-chunks/chunk-PLVFJ6FF.js";
7
+ import "../safe-bash/command-chunks/chunk-EWECMOQ5.js";
8
+ import "../safe-bash/command-chunks/chunk-7ZQVMPSB.js";
9
+ import "../safe-bash/command-chunks/chunk-E5CDHXFA.js";
10
10
  import "../safe-bash/command-chunks/chunk-SENLC5KK.js";
11
11
  import "../safe-bash/command-chunks/chunk-3PO534WJ.js";
12
12
  import "../safe-bash/command-chunks/chunk-B74LVFAN.js";
13
13
  import "../safe-bash/command-chunks/chunk-GDH7OVYK.js";
14
- import "../safe-bash/command-chunks/chunk-GQV5RWMN.js";
14
+ import "../safe-bash/command-chunks/chunk-ZFXHSFTU.js";
15
15
  import "../safe-bash/command-chunks/chunk-CKQ5SXOO.js";
16
16
  import "../safe-bash/command-chunks/chunk-B6NAEWHC.js";
17
17
  import "../safe-bash/command-chunks/chunk-E47FFS5M.js";
18
- import "../safe-bash/command-chunks/chunk-QX3WKBLI.js";
18
+ import "../safe-bash/command-chunks/chunk-36FV6BAG.js";
19
19
  import "../safe-bash/command-chunks/chunk-GNPPPYDF.js";
20
20
  import "../safe-bash/command-chunks/chunk-VMA3NJXU.js";
21
21
  import "../safe-bash/command-chunks/chunk-65DS4IOB.js";
@@ -1,6 +1,7 @@
1
1
  import type { CommandContext, FileSystem } from "../safe-bash-contracts/index.js";
2
2
  import type { LlmInputSource } from './types.js';
3
3
  import type { LlmFragmentInputSource } from './fragments.js';
4
+ import { type LlmLoaderProvider } from './loader-provider.js';
4
5
  export type LlmLoadedFragment = {
5
6
  readonly type: 'text';
6
7
  readonly source: LlmFragmentInputSource;
@@ -10,7 +11,7 @@ export type LlmLoadedFragment = {
10
11
  readonly mimeType: string;
11
12
  readonly id?: string;
12
13
  };
13
- export interface LlmFragmentLoaderContext {
14
+ export interface LlmFragmentLoaderContext extends Partial<Omit<CommandContext, 'fs' | 'cwd' | 'signal'>> {
14
15
  readonly fs: FileSystem;
15
16
  readonly cwd: string;
16
17
  readonly signal: AbortSignal;
@@ -26,4 +27,4 @@ export declare function getLlmFragmentPrefix(reference: string): string | undefi
26
27
  /** Preserve registration order and the reference's collision suffixes. */
27
28
  export declare function createLlmFragmentLoaders(entries: Iterable<readonly [string, LlmFragmentLoader]>): ReadonlyMap<string, LlmFragmentLoader>;
28
29
  /** Resolve an injected loader without ambient plugin imports or history. */
29
- export declare function loadLlmPluginFragments(reference: string, loaders: ReadonlyMap<string, LlmFragmentLoader>, context: LlmFragmentLoaderContext, allowAttachments?: boolean): AsyncGenerator<LlmLoadedFragment>;
30
+ export declare function loadLlmPluginFragments(reference: string, loaders: ReadonlyMap<string, LlmFragmentLoader>, context: LlmFragmentLoaderContext, allowAttachments?: boolean, provider?: Pick<LlmLoaderProvider, 'fragments'>): AsyncGenerator<LlmLoadedFragment>;
@@ -1,4 +1,5 @@
1
1
  export { serializeLlmTokenUsage } from "./usage.js";
2
+ export { LlmLoaderLookupError, type LlmLoaderProvider, type LlmDiscoveredLoaders, type LlmLoaderDiscoveryContext } from './loader-provider.js';
2
3
  export { createLlmToolRegistry, selectLlmTools, type LlmRegisteredTool, type LlmToolLoader, type LlmToolboxDescription, type LlmPluginQuery, type LlmPluginInfo } from './tool-registry.js';
3
4
  export { executeLlmToolCalls, LlmCancelToolCall, type LlmToolContext, type LlmToolOutput, type LlmExecutableTool, type LlmToolExecutionResult, type LlmToolExecutionOptions } from './tool-execution.js';
4
5
  export type { LlmTool, LlmToolCall, LlmMessage } from "./types.js";
@@ -6,13 +7,13 @@ export { createLlmInputBudget, type LlmInputLimits } from "./input-budget.js";
6
7
  export * from "./provider-serialization.js";
7
8
  export { llmReferenceVersion, createLlmCommand, createLlmCommands, llmCommands } from "./command.js";
8
9
  export { createLlmService, type LlmService, type LlmServiceOptions, type LlmServiceModel, type LlmStreamEvent, type LlmServiceRequest, type LlmServiceSourceRequest } from "./service.js";
9
- export type { LlmInputSource, LlmSourceRequest, LlmAttachment, LlmSourceAttachment, LlmModelOption, LlmOption, LlmCapability, LlmResponseMetadata, LlmEmbeddingRequest, LlmEmbeddingSourceRequest, LlmEmbeddingResponse, LlmLimits, LlmCommandsOptions, LlmProvider, LlmModel, LlmRequest } from "./types.js";
10
+ export type { LlmPackageManager, LlmInputSource, LlmSourceRequest, LlmAttachment, LlmSourceAttachment, LlmModelOption, LlmOption, LlmCapability, LlmResponseMetadata, LlmEmbeddingRequest, LlmEmbeddingSourceRequest, LlmEmbeddingResponse, LlmLimits, LlmCommandsOptions, LlmProvider, LlmModel, LlmRequest } from "./types.js";
10
11
  export { serializeOpenAiChatRequest, type OpenAiChatSourceRequest, createOpenAiProvider, type OpenAiModel, type OpenAiProviderOptions } from "./openai.js";
11
12
  export { createElevenLabsProvider, type ElevenLabsModel, type ElevenLabsProviderOptions } from "./elevenlabs.js";
12
13
  export type { LlmProviderLimits } from "./providers/shared.js";
13
14
  export { createLlmConfiguration, type LlmConfiguration } from "./configuration.js";
14
15
  export { validateModelOptions } from "./model-options.js";
15
- export { createLlmTemplateStore, evaluateLlmTemplate, llmTemplateUsesInput, validateLlmTemplateParameters, type LlmTemplate, type LlmTemplateLoader, type TemplateLoaderOptions } from "./templates.js";
16
+ export { createLlmTemplateStore, evaluateLlmTemplate, llmTemplateUsesInput, validateLlmTemplateParameters, type LlmTemplate, type LlmTemplateLoader, type LlmTemplateLoaderContext, type TemplateLoaderOptions } from "./templates.js";
16
17
  export { templateYaml } from "./template-yaml.js";
17
18
  export { findExtractedRange } from "./extract-range.js";
18
19
  export { parseLlmSchemaDsl } from "./schemas.js";
@@ -10,14 +10,15 @@ import {
10
10
  chatJson,
11
11
  createOpenAiProvider,
12
12
  openAiChatOptions
13
- } from "../safe-bash/command-chunks/chunk-IAHYG67O.js";
13
+ } from "../safe-bash/command-chunks/chunk-V5ZBRM5R.js";
14
14
  import {
15
15
  jsonString
16
- } from "../safe-bash/command-chunks/chunk-CJIFJ45R.js";
16
+ } from "../safe-bash/command-chunks/chunk-QBCEAYQT.js";
17
17
  import "../safe-bash/command-chunks/chunk-UN2RIRCD.js";
18
18
  import "../safe-bash/command-chunks/chunk-HLRLMFMS.js";
19
19
  import {
20
20
  LlmCancelToolCall,
21
+ LlmLoaderLookupError,
21
22
  createLlmCommand,
22
23
  createLlmCommands,
23
24
  createLlmFragmentLoaders,
@@ -43,14 +44,14 @@ import {
43
44
  serializeLlmTokenUsage,
44
45
  streamLlmToolChain,
45
46
  validateLlmTemplateParameters
46
- } from "../safe-bash/command-chunks/chunk-RKAL5VFP.js";
47
- import "../safe-bash/command-chunks/chunk-MCUDSE4H.js";
47
+ } from "../safe-bash/command-chunks/chunk-PLVFJ6FF.js";
48
+ import "../safe-bash/command-chunks/chunk-EWECMOQ5.js";
48
49
  import {
49
50
  createLlmConfiguration
50
- } from "../safe-bash/command-chunks/chunk-WOT2YXBT.js";
51
+ } from "../safe-bash/command-chunks/chunk-7ZQVMPSB.js";
51
52
  import {
52
53
  createLlmSpool
53
- } from "../safe-bash/command-chunks/chunk-BZLLQWRK.js";
54
+ } from "../safe-bash/command-chunks/chunk-E5CDHXFA.js";
54
55
  import {
55
56
  createLlmService,
56
57
  validateModelOptions
@@ -62,13 +63,13 @@ import {
62
63
  import "../safe-bash/command-chunks/chunk-GDH7OVYK.js";
63
64
  import {
64
65
  base64Stream
65
- } from "../safe-bash/command-chunks/chunk-GQV5RWMN.js";
66
+ } from "../safe-bash/command-chunks/chunk-ZFXHSFTU.js";
66
67
  import "../safe-bash/command-chunks/chunk-CKQ5SXOO.js";
67
68
  import {
68
69
  resolveUrlAttachment
69
70
  } from "../safe-bash/command-chunks/chunk-B6NAEWHC.js";
70
71
  import "../safe-bash/command-chunks/chunk-E47FFS5M.js";
71
- import "../safe-bash/command-chunks/chunk-QX3WKBLI.js";
72
+ import "../safe-bash/command-chunks/chunk-36FV6BAG.js";
72
73
  import {
73
74
  jsonValue
74
75
  } from "../safe-bash/command-chunks/chunk-GNPPPYDF.js";
@@ -76,6 +77,7 @@ import "../safe-bash/command-chunks/chunk-VMA3NJXU.js";
76
77
  import "../safe-bash/command-chunks/chunk-65DS4IOB.js";
77
78
  export {
78
79
  LlmCancelToolCall,
80
+ LlmLoaderLookupError,
79
81
  createElevenLabsProvider,
80
82
  createLlmCommand,
81
83
  createLlmCommands,
@@ -0,0 +1,25 @@
1
+ import type { LlmFragmentLoader, LlmFragmentLoaderContext } from './fragment-loaders.js';
2
+ import type { LlmTemplateLoader } from './templates.js';
3
+ export interface LlmDiscoveredLoaders {
4
+ readonly fragmentLoaders: ReadonlyMap<string, LlmFragmentLoader>;
5
+ readonly templateLoaders: ReadonlyMap<string, LlmTemplateLoader>;
6
+ }
7
+ export interface LlmLoaderDiscoveryContext extends LlmFragmentLoaderContext {
8
+ readonly kind?: 'fragments' | 'templates';
9
+ /** Charge metadata before retention, in addition to maxBytes admission. */
10
+ readonly admitBytes?: ((size: number) => void) | undefined;
11
+ }
12
+ export interface LlmLoaderProvider {
13
+ discover(context: LlmLoaderDiscoveryContext): Promise<LlmDiscoveredLoaders>;
14
+ /** Resolve lazily; discovery must not run again before executing a loader. */
15
+ fragments(prefix: string): LlmFragmentLoader | undefined;
16
+ templates(prefix: string): LlmTemplateLoader | undefined;
17
+ }
18
+ /** Lookup failures precede loader execution and retain their native diagnostic. */
19
+ export declare class LlmLoaderLookupError extends Error {
20
+ }
21
+ export declare function discoverLlmLoaders(loaders: ReadonlyMap<string, {
22
+ readonly description?: string;
23
+ }> | undefined, context: LlmLoaderDiscoveryContext, provider?: LlmLoaderProvider): Promise<ReadonlyMap<string, {
24
+ readonly description?: string;
25
+ }>>;
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  openAiChat
3
- } from "../safe-bash/command-chunks/chunk-CJIFJ45R.js";
3
+ } from "../safe-bash/command-chunks/chunk-QBCEAYQT.js";
4
4
  import "../safe-bash/command-chunks/chunk-UN2RIRCD.js";
5
5
  import "../safe-bash/command-chunks/chunk-E47FFS5M.js";
6
- import "../safe-bash/command-chunks/chunk-QX3WKBLI.js";
6
+ import "../safe-bash/command-chunks/chunk-36FV6BAG.js";
7
7
  import "../safe-bash/command-chunks/chunk-GNPPPYDF.js";
8
8
  import "../safe-bash/command-chunks/chunk-65DS4IOB.js";
9
9
  export {
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  chatJson,
3
3
  createOpenAiProvider
4
- } from "../safe-bash/command-chunks/chunk-IAHYG67O.js";
5
- import "../safe-bash/command-chunks/chunk-CJIFJ45R.js";
4
+ } from "../safe-bash/command-chunks/chunk-V5ZBRM5R.js";
5
+ import "../safe-bash/command-chunks/chunk-QBCEAYQT.js";
6
6
  import "../safe-bash/command-chunks/chunk-UN2RIRCD.js";
7
7
  import "../safe-bash/command-chunks/chunk-HLRLMFMS.js";
8
8
  import "../safe-bash/command-chunks/chunk-B74LVFAN.js";
9
9
  import "../safe-bash/command-chunks/chunk-GDH7OVYK.js";
10
- import "../safe-bash/command-chunks/chunk-GQV5RWMN.js";
10
+ import "../safe-bash/command-chunks/chunk-ZFXHSFTU.js";
11
11
  import "../safe-bash/command-chunks/chunk-CKQ5SXOO.js";
12
12
  import "../safe-bash/command-chunks/chunk-B6NAEWHC.js";
13
13
  import "../safe-bash/command-chunks/chunk-E47FFS5M.js";
14
- import "../safe-bash/command-chunks/chunk-QX3WKBLI.js";
14
+ import "../safe-bash/command-chunks/chunk-36FV6BAG.js";
15
15
  import "../safe-bash/command-chunks/chunk-GNPPPYDF.js";
16
16
  import "../safe-bash/command-chunks/chunk-VMA3NJXU.js";
17
17
  import "../safe-bash/command-chunks/chunk-65DS4IOB.js";
@@ -9,21 +9,21 @@ import {
9
9
  chatJson,
10
10
  createOpenAiProvider,
11
11
  openAiChatOptions
12
- } from "../../safe-bash/command-chunks/chunk-IAHYG67O.js";
12
+ } from "../../safe-bash/command-chunks/chunk-V5ZBRM5R.js";
13
13
  import {
14
14
  jsonString
15
- } from "../../safe-bash/command-chunks/chunk-CJIFJ45R.js";
15
+ } from "../../safe-bash/command-chunks/chunk-QBCEAYQT.js";
16
16
  import "../../safe-bash/command-chunks/chunk-UN2RIRCD.js";
17
17
  import "../../safe-bash/command-chunks/chunk-HLRLMFMS.js";
18
18
  import "../../safe-bash/command-chunks/chunk-B74LVFAN.js";
19
19
  import "../../safe-bash/command-chunks/chunk-GDH7OVYK.js";
20
20
  import {
21
21
  base64Stream
22
- } from "../../safe-bash/command-chunks/chunk-GQV5RWMN.js";
22
+ } from "../../safe-bash/command-chunks/chunk-ZFXHSFTU.js";
23
23
  import "../../safe-bash/command-chunks/chunk-CKQ5SXOO.js";
24
24
  import "../../safe-bash/command-chunks/chunk-B6NAEWHC.js";
25
25
  import "../../safe-bash/command-chunks/chunk-E47FFS5M.js";
26
- import "../../safe-bash/command-chunks/chunk-QX3WKBLI.js";
26
+ import "../../safe-bash/command-chunks/chunk-36FV6BAG.js";
27
27
  import {
28
28
  jsonValue
29
29
  } from "../../safe-bash/command-chunks/chunk-GNPPPYDF.js";
@@ -2,17 +2,17 @@ import "../../safe-bash/command-chunks/chunk-MUUY3FZC.js";
2
2
  import {
3
3
  chatJson,
4
4
  createOpenAiProvider
5
- } from "../../safe-bash/command-chunks/chunk-IAHYG67O.js";
6
- import "../../safe-bash/command-chunks/chunk-CJIFJ45R.js";
5
+ } from "../../safe-bash/command-chunks/chunk-V5ZBRM5R.js";
6
+ import "../../safe-bash/command-chunks/chunk-QBCEAYQT.js";
7
7
  import "../../safe-bash/command-chunks/chunk-UN2RIRCD.js";
8
8
  import "../../safe-bash/command-chunks/chunk-HLRLMFMS.js";
9
9
  import "../../safe-bash/command-chunks/chunk-B74LVFAN.js";
10
10
  import "../../safe-bash/command-chunks/chunk-GDH7OVYK.js";
11
- import "../../safe-bash/command-chunks/chunk-GQV5RWMN.js";
11
+ import "../../safe-bash/command-chunks/chunk-ZFXHSFTU.js";
12
12
  import "../../safe-bash/command-chunks/chunk-CKQ5SXOO.js";
13
13
  import "../../safe-bash/command-chunks/chunk-B6NAEWHC.js";
14
14
  import "../../safe-bash/command-chunks/chunk-E47FFS5M.js";
15
- import "../../safe-bash/command-chunks/chunk-QX3WKBLI.js";
15
+ import "../../safe-bash/command-chunks/chunk-36FV6BAG.js";
16
16
  import "../../safe-bash/command-chunks/chunk-GNPPPYDF.js";
17
17
  import "../../safe-bash/command-chunks/chunk-VMA3NJXU.js";
18
18
  import "../../safe-bash/command-chunks/chunk-65DS4IOB.js";
@@ -2,3 +2,5 @@
2
2
  export declare function hasUnpairedSurrogate(value: string): boolean;
3
3
  /** Internal provenance for Python IDs that cannot be represented by a JS string. */
4
4
  export declare const pythonSurrogateId: unique symbol;
5
+ /** Python sorts strings by Unicode code points, including supplementary planes. */
6
+ export declare function unicodeOrder(left: string, right: string): number;
@@ -1,3 +1,4 @@
1
+ import { type LlmLoaderProvider } from './loader-provider.js';
1
2
  import { type CommandContext } from "../safe-bash-contracts/index.js";
2
3
  export interface LlmTemplate {
3
4
  name: string;
@@ -26,14 +27,18 @@ export declare function evaluateLlmTemplate(value: LlmTemplate, input: string, p
26
27
  prompt: string;
27
28
  system?: string;
28
29
  };
29
- export type LlmTemplateLoader = ((remainder: string, signal: AbortSignal) => Promise<LlmTemplate> | LlmTemplate) & {
30
+ export type LlmTemplateLoaderContext = LlmTemplateStoreContext & {
31
+ readonly maxBytes: number;
32
+ };
33
+ export type LlmTemplateLoader = ((remainder: string, signal: AbortSignal, context?: LlmTemplateLoaderContext) => Promise<LlmTemplate> | LlmTemplate) & {
30
34
  readonly description?: string;
31
35
  };
32
36
  export interface TemplateLoaderOptions {
37
+ readonly provider?: LlmLoaderProvider | undefined;
33
38
  readonly maxRemoteBytes: number;
34
39
  readonly maxBytes?: number;
35
40
  readonly admitBytes?: (size: number) => void;
36
- readonly loaders?: ReadonlyMap<string, LlmTemplateLoader>;
41
+ readonly loaders?: ReadonlyMap<string, LlmTemplateLoader> | undefined;
37
42
  }
38
43
  export type LlmTemplateStoreContext = Pick<CommandContext, "fs" | "cwd" | "env" | "signal"> & Partial<Omit<CommandContext, "fs" | "cwd" | "env" | "signal">> & {
39
44
  readonly fetch?: typeof globalThis.fetch | undefined;