mcard-js 2.1.41 → 2.1.43

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 (388) hide show
  1. package/dist/{CardCollection-MXTUJV4J.js → CardCollection-7DKJWKAG.js} +3 -2
  2. package/dist/CardCollection-S4RE3RXP.js +10 -0
  3. package/dist/CardCollection-VPN7AAAX.js +10 -0
  4. package/dist/{IndexedDBEngine-2G5KCISA.js → IndexedDBEngine-7JOGM2MM.js} +3 -2
  5. package/dist/IndexedDBEngine-BGZHJK5L.js +12 -0
  6. package/dist/IndexedDBEngine-ZJ442GI7.js +12 -0
  7. package/dist/{LLMRuntime-GIGDMDEZ.js → LLMRuntime-OZNVAPXJ.js} +4 -3
  8. package/dist/{LLMRuntime-LBWUJ7ON.js → LLMRuntime-UPSEDSIK.js} +2 -2
  9. package/dist/{LambdaRuntime-B6D6IQKZ.js → LambdaRuntime-JZ4Q56TI.js} +6 -5
  10. package/dist/LambdaRuntime-PM3OUFHU.js +19 -0
  11. package/dist/LambdaRuntime-WBEK37AF.js +19 -0
  12. package/dist/LambdaRuntime-YKSBAT65.js +19 -0
  13. package/dist/{Loader-3LSJXJQG.js → Loader-7HQVYDPA.js} +2 -2
  14. package/dist/{Loader-BM56B2TX.js → Loader-NYWTV7CQ.js} +4 -3
  15. package/dist/{Loader-CYLAA4XU.js → Loader-OLKPY6HT.js} +3 -3
  16. package/dist/{MCard-H56VOJLR.js → MCard-OYI73CUI.js} +1 -1
  17. package/dist/{MCard-5LIREV2B.js → MCard-XHG3BZC7.js} +2 -2
  18. package/dist/{NetworkRuntime-IAFHPQSX.js → NetworkRuntime-VYCC5HSY.js} +16 -11
  19. package/dist/{NetworkRuntime-JNGKW3DY.js → NetworkRuntime-XQX3LDDI.js} +61 -33
  20. package/dist/{NetworkRuntime-CXPKIAOQ.js → NetworkRuntime-XZR733M5.js} +17 -12
  21. package/dist/{OllamaProvider-QPX2JXL2.js → OllamaProvider-FBZ5WW72.js} +1 -1
  22. package/dist/OllamaProvider-W6TPZNHD.js +9 -0
  23. package/dist/chunk-2NFGZ6PA.js +170 -0
  24. package/dist/{chunk-VXV35I5J.js → chunk-4TYRTQ4V.js} +48 -17
  25. package/dist/chunk-4VWWTGRW.js +497 -0
  26. package/dist/{chunk-4PDYHPR6.js → chunk-5GHZP7E5.js} +4 -2
  27. package/dist/{chunk-42VF42KH.js → chunk-5HZNWJFT.js} +4 -2
  28. package/dist/{chunk-DEYMHG5A.js → chunk-6MG5ZHAP.js} +58 -22
  29. package/dist/{chunk-7V37AAPK.js → chunk-7B4PABOL.js} +16 -7
  30. package/dist/chunk-A5S2PI37.js +47 -0
  31. package/dist/chunk-BFD4WSWU.js +497 -0
  32. package/dist/chunk-BSEFN25Q.js +32 -0
  33. package/dist/{chunk-3LPY36OG.js → chunk-CBEVE7RG.js} +20 -15
  34. package/dist/{chunk-A5AB4WQN.js → chunk-DPA3ZK4Q.js} +30 -21
  35. package/dist/{chunk-5FA54AMM.js → chunk-EJHX3VZL.js} +54 -21
  36. package/dist/{chunk-QXPHMSPA.js → chunk-GNF4WAPV.js} +22 -9
  37. package/dist/{chunk-XPG6B5IW.js → chunk-JHIA2BQK.js} +26 -13
  38. package/dist/{chunk-4I5IZILN.js → chunk-KGPICAQW.js} +10 -7
  39. package/dist/{chunk-4WBJPHZP.js → chunk-MST5AZXJ.js} +17 -8
  40. package/dist/{chunk-K35KFTEA.js → chunk-N6KDHCBC.js} +58 -33
  41. package/dist/{chunk-2R4ESMZB.js → chunk-NFO5NU6B.js} +5 -3
  42. package/dist/chunk-OKWBHCKC.js +170 -0
  43. package/dist/{chunk-FIE4LAJG.js → chunk-OX3K6UZJ.js} +5 -3
  44. package/dist/{chunk-6SEX42H2.js → chunk-R3K7DG7O.js} +21 -16
  45. package/dist/chunk-RB35Z35T.js +44 -0
  46. package/dist/{chunk-AWGFLRLI.js → chunk-SP4YPKPR.js} +51 -318
  47. package/dist/chunk-U7TSFDKX.js +217 -0
  48. package/dist/chunk-UP3SQX56.js +112 -0
  49. package/dist/{chunk-4EUEU4SM.js → chunk-VGIRC3HX.js} +13 -110
  50. package/dist/chunk-WGG7526Z.js +112 -0
  51. package/dist/{chunk-3JBSRALP.js → chunk-WNKP66IR.js} +10 -7
  52. package/dist/{chunk-DOC55MPG.js → chunk-WR6ISHCS.js} +11 -3
  53. package/dist/{chunk-52UNWVOD.js → chunk-ZVOPQ5BM.js} +54 -21
  54. package/dist/chunk-ZZMOPQER.js +217 -0
  55. package/dist/index.browser.cjs +79 -1454
  56. package/dist/index.browser.d.cts +2 -17
  57. package/dist/index.browser.d.ts +2 -17
  58. package/dist/index.browser.js +7 -6
  59. package/dist/index.cjs +306 -1631
  60. package/dist/index.d.cts +3 -1
  61. package/dist/index.d.ts +3 -1
  62. package/dist/index.js +49 -35
  63. package/dist/storage/SqliteNodeEngine.cjs +59 -1335
  64. package/dist/storage/SqliteNodeEngine.js +4 -3
  65. package/dist/storage/SqliteWasmEngine.cjs +57 -1335
  66. package/dist/storage/SqliteWasmEngine.js +4 -3
  67. package/package.json +12 -8
  68. package/dist/CardCollection-4OFJ6XQJ.js +0 -9
  69. package/dist/CardCollection-7PDWM24F.js +0 -9
  70. package/dist/CardCollection-CEFQ5PA6.js +0 -9
  71. package/dist/CardCollection-GUEYGN2Y.js +0 -9
  72. package/dist/CardCollection-KDO4CQ4B.js +0 -9
  73. package/dist/CardCollection-PB7ZY73E.js +0 -9
  74. package/dist/CardCollection-RK4DVH63.js +0 -9
  75. package/dist/CardCollection-T376E3TS.js +0 -9
  76. package/dist/CardCollection-WGCKKUOD.js +0 -9
  77. package/dist/CardCollection-XON2IWDU.js +0 -9
  78. package/dist/CardCollection-ZEI6FMP3.js +0 -9
  79. package/dist/EventProducer-MW6QF4IO.js +0 -47
  80. package/dist/EventProducer-V7RY2KKR.js +0 -47
  81. package/dist/FileIO.d.ts +0 -44
  82. package/dist/FileIO.d.ts.map +0 -1
  83. package/dist/FileIO.js +0 -203
  84. package/dist/FileIO.js.map +0 -1
  85. package/dist/IndexedDBEngine-7JI2CL32.js +0 -10
  86. package/dist/IndexedDBEngine-7OHQIRTI.js +0 -10
  87. package/dist/IndexedDBEngine-E5YJQG4U.js +0 -10
  88. package/dist/IndexedDBEngine-NV625E7L.js +0 -10
  89. package/dist/IndexedDBEngine-RPQS7ILF.js +0 -10
  90. package/dist/IndexedDBEngine-S3ZWCSI7.js +0 -10
  91. package/dist/IndexedDBEngine-T7OC5GRR.js +0 -10
  92. package/dist/LLMRuntime-BKB3CLXM.js +0 -16
  93. package/dist/LLMRuntime-BQUUFLAB.js +0 -16
  94. package/dist/LLMRuntime-TNBC4JCB.js +0 -16
  95. package/dist/LambdaRuntime-4YILF3G7.js +0 -15
  96. package/dist/LambdaRuntime-53TPVENI.js +0 -16
  97. package/dist/LambdaRuntime-73BSWP2G.js +0 -16
  98. package/dist/LambdaRuntime-AL5SBDCA.js +0 -17
  99. package/dist/LambdaRuntime-BYBUI7H5.js +0 -17
  100. package/dist/LambdaRuntime-JDZP3HIQ.js +0 -17
  101. package/dist/LambdaRuntime-JEI7RVWG.js +0 -16
  102. package/dist/LambdaRuntime-LCTHBYMV.js +0 -17
  103. package/dist/LambdaRuntime-LDA3G7IR.js +0 -16
  104. package/dist/LambdaRuntime-LF4FR6YA.js +0 -16
  105. package/dist/LambdaRuntime-O7JBVHO2.js +0 -16
  106. package/dist/LambdaRuntime-OFOTT464.js +0 -17
  107. package/dist/LambdaRuntime-Q6ISCHAD.js +0 -16
  108. package/dist/LambdaRuntime-TCZ42XCB.js +0 -16
  109. package/dist/LambdaRuntime-UKUOKJIW.js +0 -17
  110. package/dist/LambdaRuntime-VKLON4IB.js +0 -17
  111. package/dist/LambdaRuntime-WNYDBTS6.js +0 -16
  112. package/dist/LambdaRuntime-WPTX76CX.js +0 -17
  113. package/dist/Loader-4P7PEBCL.js +0 -11
  114. package/dist/Loader-HQ3QKMYM.js +0 -11
  115. package/dist/Loader-NCATGB67.js +0 -11
  116. package/dist/Loader-NRHGDQBD.js +0 -11
  117. package/dist/Loader-RT4NI6AT.js +0 -11
  118. package/dist/Loader-SSRY57SS.js +0 -11
  119. package/dist/Loader-W72QZ3T7.js +0 -11
  120. package/dist/Loader-WECRIXQW.js +0 -11
  121. package/dist/Loader-XFBIHCQF.js +0 -11
  122. package/dist/Loader.d.ts +0 -34
  123. package/dist/Loader.d.ts.map +0 -1
  124. package/dist/Loader.js +0 -190
  125. package/dist/Loader.js.map +0 -1
  126. package/dist/MCard-4J6WSBRF.js +0 -8
  127. package/dist/MCard-E3MRPTJF.js +0 -8
  128. package/dist/MCard-FCOIB6BP.js +0 -8
  129. package/dist/MCard-G4HUWHY5.js +0 -8
  130. package/dist/MCard-HFL7AFIH.js +0 -8
  131. package/dist/MCard-JOW6RBSO.js +0 -8
  132. package/dist/MCard-M4LKN4U2.js +0 -8
  133. package/dist/MCard-VB7UDUTN.js +0 -8
  134. package/dist/MCard-WOHE6SX6.js +0 -8
  135. package/dist/NetworkRuntime-2H7AQITA.js +0 -1571
  136. package/dist/NetworkRuntime-3MIUBNOF.js +0 -1571
  137. package/dist/NetworkRuntime-AOE2EJIM.js +0 -1571
  138. package/dist/NetworkRuntime-BQMDBUDO.js +0 -1570
  139. package/dist/NetworkRuntime-GMANLCAB.js +0 -1542
  140. package/dist/NetworkRuntime-L7P4VCGK.js +0 -1542
  141. package/dist/NetworkRuntime-LC7SUAOF.js +0 -1542
  142. package/dist/NetworkRuntime-OJWCWPBI.js +0 -1570
  143. package/dist/NetworkRuntime-ZJ3B4T3A.js +0 -1542
  144. package/dist/OllamaProvider-32RC36HD.js +0 -8
  145. package/dist/OllamaProvider-MQXSXLCA.js +0 -8
  146. package/dist/OllamaProvider-Q45BMOVN.js +0 -8
  147. package/dist/SqliteNodeEngine-WKVFWBNH.js +0 -9
  148. package/dist/StorageAdapter-DdDUiIvH.d.cts +0 -391
  149. package/dist/StorageAdapter-DdDUiIvH.d.ts +0 -391
  150. package/dist/StorageAdapter-Dw1BeOam.d.cts +0 -380
  151. package/dist/StorageAdapter-Dw1BeOam.d.ts +0 -380
  152. package/dist/chunk-23GCCCXB.js +0 -402
  153. package/dist/chunk-2ECISK2I.js +0 -354
  154. package/dist/chunk-2MRBTM72.js +0 -354
  155. package/dist/chunk-2THXO6FH.js +0 -2313
  156. package/dist/chunk-2VNRWIBZ.js +0 -389
  157. package/dist/chunk-2VOQRXWH.js +0 -296
  158. package/dist/chunk-34AYBZRO.js +0 -920
  159. package/dist/chunk-37EEYISR.js +0 -372
  160. package/dist/chunk-3E2TKOCZ.js +0 -354
  161. package/dist/chunk-3MMMJ7NH.js +0 -1068
  162. package/dist/chunk-437JTYVP.js +0 -292
  163. package/dist/chunk-4MQINOOG.js +0 -1218
  164. package/dist/chunk-4UIWXZHY.js +0 -1049
  165. package/dist/chunk-53S2EZCY.js +0 -290
  166. package/dist/chunk-5BIDGXA6.js +0 -987
  167. package/dist/chunk-5HXLTWYN.js +0 -296
  168. package/dist/chunk-5W2FDGUF.js +0 -371
  169. package/dist/chunk-6R4ERZMG.js +0 -1136
  170. package/dist/chunk-74YSNHEM.js +0 -2309
  171. package/dist/chunk-7H2BQZDK.js +0 -270
  172. package/dist/chunk-7KEWCCES.js +0 -1136
  173. package/dist/chunk-7PN2BUYF.js +0 -371
  174. package/dist/chunk-A2ZJA2EV.js +0 -389
  175. package/dist/chunk-ARPIBGRP.js +0 -1236
  176. package/dist/chunk-ATHNEEAG.js +0 -2309
  177. package/dist/chunk-AVXJOPUE.js +0 -354
  178. package/dist/chunk-B7VEU4S2.js +0 -204
  179. package/dist/chunk-C2TKISBR.js +0 -1213
  180. package/dist/chunk-CBH4YKB4.js +0 -2309
  181. package/dist/chunk-DP7HBRDL.js +0 -2309
  182. package/dist/chunk-DV7ZSH4W.js +0 -2309
  183. package/dist/chunk-DWXNZ5AJ.js +0 -642
  184. package/dist/chunk-EFKMZTT2.js +0 -270
  185. package/dist/chunk-FXJYXHG6.js +0 -266
  186. package/dist/chunk-G466I6RT.js +0 -229
  187. package/dist/chunk-GATPBTHL.js +0 -1142
  188. package/dist/chunk-GMQAHPBC.js +0 -292
  189. package/dist/chunk-GMWA2IJJ.js +0 -1105
  190. package/dist/chunk-GVX5LDLH.js +0 -371
  191. package/dist/chunk-HGENNKOJ.js +0 -355
  192. package/dist/chunk-HM2NBYHU.js +0 -292
  193. package/dist/chunk-IZWB5GCG.js +0 -389
  194. package/dist/chunk-J4HOFUKM.js +0 -2309
  195. package/dist/chunk-JIK2G3EH.js +0 -2313
  196. package/dist/chunk-JRXNWGSW.js +0 -1136
  197. package/dist/chunk-KRKK3KP6.js +0 -1081
  198. package/dist/chunk-KYXZHRUG.js +0 -389
  199. package/dist/chunk-L36L2VDL.js +0 -371
  200. package/dist/chunk-L5PZCES6.js +0 -204
  201. package/dist/chunk-L5U77ZEM.js +0 -1142
  202. package/dist/chunk-LQEKGX2T.js +0 -204
  203. package/dist/chunk-LWMUDMMQ.js +0 -1144
  204. package/dist/chunk-MLKGABMK.js +0 -9
  205. package/dist/chunk-NZ6OQ7UT.js +0 -92
  206. package/dist/chunk-O2UMNZGF.js +0 -903
  207. package/dist/chunk-OFHDMLNM.js +0 -355
  208. package/dist/chunk-PDBMNUMB.js +0 -316
  209. package/dist/chunk-PW4XS7M3.js +0 -850
  210. package/dist/chunk-QA2XQMMJ.js +0 -2313
  211. package/dist/chunk-QL2JFNA7.js +0 -389
  212. package/dist/chunk-QPZ2HNSU.js +0 -912
  213. package/dist/chunk-QVGVU6OS.js +0 -296
  214. package/dist/chunk-RCEU7PFH.js +0 -270
  215. package/dist/chunk-RSTKX7WM.js +0 -907
  216. package/dist/chunk-RXL2CW64.js +0 -266
  217. package/dist/chunk-RXUF6Y43.js +0 -2309
  218. package/dist/chunk-SIAA4J6H.js +0 -21
  219. package/dist/chunk-SOJ2UMO2.js +0 -986
  220. package/dist/chunk-T3AG6DXY.js +0 -296
  221. package/dist/chunk-TPCNKMGZ.js +0 -355
  222. package/dist/chunk-TPT3S5AX.js +0 -204
  223. package/dist/chunk-TXWGIEVH.js +0 -2313
  224. package/dist/chunk-TZFI54AU.js +0 -2313
  225. package/dist/chunk-U3FWUPD3.js +0 -717
  226. package/dist/chunk-UFW2VW2D.js +0 -266
  227. package/dist/chunk-UTAOS5Y7.js +0 -2313
  228. package/dist/chunk-V7VX5OJ6.js +0 -389
  229. package/dist/chunk-W2XGNMYB.js +0 -355
  230. package/dist/chunk-W3M4HJ4U.js +0 -2309
  231. package/dist/chunk-WMJGGREP.js +0 -296
  232. package/dist/chunk-WTNVQ5WS.js +0 -732
  233. package/dist/chunk-WVFWNVT2.js +0 -1050
  234. package/dist/chunk-WY7EYSYC.js +0 -1236
  235. package/dist/chunk-X42F7DE3.js +0 -373
  236. package/dist/chunk-XC7Y4I7L.js +0 -290
  237. package/dist/chunk-YFULZTKP.js +0 -270
  238. package/dist/chunk-YSVHXKSZ.js +0 -373
  239. package/dist/chunk-YWGVK5OS.js +0 -292
  240. package/dist/chunk-Z4BRNTO5.js +0 -2313
  241. package/dist/chunk-ZDUXDKPD.js +0 -292
  242. package/dist/chunk-ZXQ2W7LO.js +0 -355
  243. package/dist/chunk-ZXQELXXO.js +0 -378
  244. package/dist/index.browser.d.ts.map +0 -1
  245. package/dist/index.browser.js.map +0 -1
  246. package/dist/index.d.ts.map +0 -1
  247. package/dist/index.js.map +0 -1
  248. package/dist/lib-4XS34IPZ.js +0 -778
  249. package/dist/model/CardCollection.d.ts +0 -147
  250. package/dist/model/CardCollection.d.ts.map +0 -1
  251. package/dist/model/CardCollection.js +0 -272
  252. package/dist/model/CardCollection.js.map +0 -1
  253. package/dist/model/ContentTypeInterpreter.d.ts +0 -28
  254. package/dist/model/ContentTypeInterpreter.d.ts.map +0 -1
  255. package/dist/model/ContentTypeInterpreter.js +0 -147
  256. package/dist/model/ContentTypeInterpreter.js.map +0 -1
  257. package/dist/model/EventProducer.d.ts +0 -10
  258. package/dist/model/EventProducer.d.ts.map +0 -1
  259. package/dist/model/EventProducer.js +0 -46
  260. package/dist/model/EventProducer.js.map +0 -1
  261. package/dist/model/GTime.d.ts +0 -44
  262. package/dist/model/GTime.d.ts.map +0 -1
  263. package/dist/model/GTime.js +0 -91
  264. package/dist/model/GTime.js.map +0 -1
  265. package/dist/model/Handle.d.ts +0 -37
  266. package/dist/model/Handle.d.ts.map +0 -1
  267. package/dist/model/Handle.js +0 -90
  268. package/dist/model/Handle.js.map +0 -1
  269. package/dist/model/MCard.d.ts +0 -145
  270. package/dist/model/MCard.d.ts.map +0 -1
  271. package/dist/model/MCard.js +0 -180
  272. package/dist/model/MCard.js.map +0 -1
  273. package/dist/model/PCard.d.ts +0 -271
  274. package/dist/model/PCard.d.ts.map +0 -1
  275. package/dist/model/PCard.js +0 -558
  276. package/dist/model/PCard.js.map +0 -1
  277. package/dist/model/VCard.d.ts +0 -277
  278. package/dist/model/VCard.d.ts.map +0 -1
  279. package/dist/model/VCard.js +0 -573
  280. package/dist/model/VCard.js.map +0 -1
  281. package/dist/model/constants.d.ts +0 -45
  282. package/dist/model/constants.d.ts.map +0 -1
  283. package/dist/model/constants.js +0 -27
  284. package/dist/model/constants.js.map +0 -1
  285. package/dist/model/vcard_vocabulary.d.ts +0 -174
  286. package/dist/model/vcard_vocabulary.d.ts.map +0 -1
  287. package/dist/model/vcard_vocabulary.js +0 -187
  288. package/dist/model/vcard_vocabulary.js.map +0 -1
  289. package/dist/monads/Either.d.ts +0 -51
  290. package/dist/monads/Either.d.ts.map +0 -1
  291. package/dist/monads/Either.js +0 -82
  292. package/dist/monads/Either.js.map +0 -1
  293. package/dist/monads/IO.d.ts +0 -38
  294. package/dist/monads/IO.d.ts.map +0 -1
  295. package/dist/monads/IO.js +0 -66
  296. package/dist/monads/IO.js.map +0 -1
  297. package/dist/monads/Maybe.d.ts +0 -45
  298. package/dist/monads/Maybe.d.ts.map +0 -1
  299. package/dist/monads/Maybe.js +0 -73
  300. package/dist/monads/Maybe.js.map +0 -1
  301. package/dist/monads/Reader.d.ts +0 -29
  302. package/dist/monads/Reader.d.ts.map +0 -1
  303. package/dist/monads/Reader.js +0 -44
  304. package/dist/monads/Reader.js.map +0 -1
  305. package/dist/monads/State.d.ts +0 -33
  306. package/dist/monads/State.d.ts.map +0 -1
  307. package/dist/monads/State.js +0 -50
  308. package/dist/monads/State.js.map +0 -1
  309. package/dist/monads/Writer.d.ts +0 -29
  310. package/dist/monads/Writer.d.ts.map +0 -1
  311. package/dist/monads/Writer.js +0 -46
  312. package/dist/monads/Writer.js.map +0 -1
  313. package/dist/ptr/Bridgelet.d.ts +0 -180
  314. package/dist/ptr/Bridgelet.d.ts.map +0 -1
  315. package/dist/ptr/Bridgelet.js +0 -296
  316. package/dist/ptr/Bridgelet.js.map +0 -1
  317. package/dist/ptr/CLMIntrospection.d.ts +0 -169
  318. package/dist/ptr/CLMIntrospection.d.ts.map +0 -1
  319. package/dist/ptr/CLMIntrospection.js +0 -329
  320. package/dist/ptr/CLMIntrospection.js.map +0 -1
  321. package/dist/ptr/FaroSidecar.d.ts +0 -56
  322. package/dist/ptr/FaroSidecar.d.ts.map +0 -1
  323. package/dist/ptr/FaroSidecar.js +0 -102
  324. package/dist/ptr/FaroSidecar.js.map +0 -1
  325. package/dist/ptr/LensProtocol.d.ts +0 -84
  326. package/dist/ptr/LensProtocol.d.ts.map +0 -1
  327. package/dist/ptr/LensProtocol.js +0 -98
  328. package/dist/ptr/LensProtocol.js.map +0 -1
  329. package/dist/ptr/OpenTelemetrySidecar.d.ts +0 -144
  330. package/dist/ptr/OpenTelemetrySidecar.d.ts.map +0 -1
  331. package/dist/ptr/OpenTelemetrySidecar.js +0 -232
  332. package/dist/ptr/OpenTelemetrySidecar.js.map +0 -1
  333. package/dist/ptr/SandboxWorker.d.ts +0 -79
  334. package/dist/ptr/SandboxWorker.d.ts.map +0 -1
  335. package/dist/ptr/SandboxWorker.js +0 -298
  336. package/dist/ptr/SandboxWorker.js.map +0 -1
  337. package/dist/ptr/common_types.d.ts +0 -39
  338. package/dist/ptr/common_types.d.ts.map +0 -1
  339. package/dist/ptr/common_types.js +0 -12
  340. package/dist/ptr/common_types.js.map +0 -1
  341. package/dist/rag/GraphRAGEngine.d.ts +0 -26
  342. package/dist/rag/GraphRAGEngine.d.ts.map +0 -1
  343. package/dist/rag/GraphRAGEngine.js +0 -166
  344. package/dist/rag/GraphRAGEngine.js.map +0 -1
  345. package/dist/rag/HandleVectorStore.d.ts +0 -201
  346. package/dist/rag/HandleVectorStore.d.ts.map +0 -1
  347. package/dist/rag/HandleVectorStore.js +0 -527
  348. package/dist/rag/HandleVectorStore.js.map +0 -1
  349. package/dist/rag/PersistentIndexer.d.ts +0 -148
  350. package/dist/rag/PersistentIndexer.d.ts.map +0 -1
  351. package/dist/rag/PersistentIndexer.js +0 -302
  352. package/dist/rag/PersistentIndexer.js.map +0 -1
  353. package/dist/rag/index.d.ts +0 -20
  354. package/dist/rag/index.d.ts.map +0 -1
  355. package/dist/rag/index.js +0 -26
  356. package/dist/rag/index.js.map +0 -1
  357. package/dist/rag/semanticVersioning.d.ts +0 -187
  358. package/dist/rag/semanticVersioning.d.ts.map +0 -1
  359. package/dist/rag/semanticVersioning.js +0 -253
  360. package/dist/rag/semanticVersioning.js.map +0 -1
  361. package/dist/storage/IndexedDBEngine.d.ts +0 -33
  362. package/dist/storage/IndexedDBEngine.d.ts.map +0 -1
  363. package/dist/storage/IndexedDBEngine.js +0 -198
  364. package/dist/storage/IndexedDBEngine.js.map +0 -1
  365. package/dist/storage/SqliteNodeEngine.d.ts.map +0 -1
  366. package/dist/storage/SqliteNodeEngine.js.map +0 -1
  367. package/dist/storage/SqliteWasmEngine.d.ts.map +0 -1
  368. package/dist/storage/SqliteWasmEngine.js.map +0 -1
  369. package/dist/storage/StorageAdapter.d.ts +0 -42
  370. package/dist/storage/StorageAdapter.d.ts.map +0 -1
  371. package/dist/storage/StorageAdapter.js +0 -2
  372. package/dist/storage/StorageAdapter.js.map +0 -1
  373. package/dist/storage/VectorStore.d.ts +0 -202
  374. package/dist/storage/VectorStore.d.ts.map +0 -1
  375. package/dist/storage/VectorStore.js +0 -557
  376. package/dist/storage/VectorStore.js.map +0 -1
  377. package/dist/storage/schema.d.ts +0 -162
  378. package/dist/storage/schema.d.ts.map +0 -1
  379. package/dist/storage/schema.js +0 -335
  380. package/dist/storage/schema.js.map +0 -1
  381. package/dist/storage/schema_constants.d.ts +0 -7
  382. package/dist/storage/schema_constants.d.ts.map +0 -1
  383. package/dist/storage/schema_constants.js +0 -415
  384. package/dist/storage/schema_constants.js.map +0 -1
  385. package/dist/types/dots.d.ts +0 -206
  386. package/dist/types/dots.d.ts.map +0 -1
  387. package/dist/types/dots.js +0 -201
  388. package/dist/types/dots.js.map +0 -1
@@ -4,15 +4,21 @@ import {
4
4
  LLMConfig,
5
5
  LLM_PROVIDERS,
6
6
  OllamaProvider
7
- } from "./chunk-QXPHMSPA.js";
7
+ } from "./chunk-GNF4WAPV.js";
8
8
  import {
9
9
  IO
10
10
  } from "./chunk-MPMRBT5R.js";
11
11
  import {
12
12
  Either
13
13
  } from "./chunk-2KADE3SE.js";
14
+ import {
15
+ LLM_DEFAULT_TIMEOUT_SECS
16
+ } from "./chunk-A5S2PI37.js";
14
17
 
15
18
  // src/ptr/llm/providers/WebLLMProvider.ts
19
+ function asOptionalNumber(value) {
20
+ return typeof value === "number" ? value : void 0;
21
+ }
16
22
  var WebLLMProvider = class extends BaseLLMProvider {
17
23
  provider_name = "webllm";
18
24
  config;
@@ -38,11 +44,13 @@ var WebLLMProvider = class extends BaseLLMProvider {
38
44
  if (typeof window === "undefined") {
39
45
  throw new Error("WebLLM only supports browser environments.");
40
46
  }
41
- let webllm = window.webllm;
47
+ const windowWithWebLLM = window;
48
+ let webllm = windowWithWebLLM.webllm;
42
49
  if (!webllm) {
43
50
  try {
44
51
  webllm = await import("@mlc-ai/web-llm");
45
52
  } catch (e) {
53
+ void e;
46
54
  }
47
55
  }
48
56
  if (!webllm) {
@@ -69,42 +77,44 @@ var WebLLMProvider = class extends BaseLLMProvider {
69
77
  return Either.right(this.engine);
70
78
  } catch (e) {
71
79
  this.initialization_promise = null;
72
- return Either.left(`WebLLM init failed: ${e.message || e}`);
80
+ const error = e;
81
+ return Either.left(`WebLLM init failed: ${error.message || String(e)}`);
73
82
  }
74
83
  }
75
- async complete(prompt, params) {
76
- const model = params.model || this.config.default_model;
84
+ async complete(prompt, params, images) {
85
+ const model = typeof params.model === "string" ? params.model : this.config.default_model;
77
86
  const engineResult = await this._get_engine(model);
78
87
  if (engineResult.isLeft) return Either.left(engineResult.left);
79
88
  const engine = engineResult.right;
80
89
  try {
81
90
  const completion = await engine.chat.completions.create({
82
91
  messages: [{ role: "user", content: prompt }],
83
- temperature: params.temperature,
84
- max_tokens: params.max_tokens,
85
- top_p: params.top_p,
92
+ temperature: asOptionalNumber(params.temperature),
93
+ max_tokens: asOptionalNumber(params.max_tokens),
94
+ top_p: asOptionalNumber(params.top_p),
86
95
  stream: false
87
96
  });
88
- const content = completion.choices[0]?.message?.content || "";
97
+ const content = completion.choices?.[0]?.message?.content || "";
89
98
  return Either.right(content);
90
99
  } catch (e) {
91
- return Either.left(`WebLLM completion error: ${e.message || e}`);
100
+ const error = e;
101
+ return Either.left(`WebLLM completion error: ${error.message || String(e)}`);
92
102
  }
93
103
  }
94
104
  async chat(messages, params) {
95
- const model = params.model || this.config.default_model;
105
+ const model = typeof params.model === "string" ? params.model : this.config.default_model;
96
106
  const engineResult = await this._get_engine(model);
97
107
  if (engineResult.isLeft) return Either.left(engineResult.left);
98
108
  const engine = engineResult.right;
99
109
  try {
100
110
  const completion = await engine.chat.completions.create({
101
111
  messages,
102
- temperature: params.temperature,
103
- max_tokens: params.max_tokens,
104
- top_p: params.top_p,
112
+ temperature: asOptionalNumber(params.temperature),
113
+ max_tokens: asOptionalNumber(params.max_tokens),
114
+ top_p: asOptionalNumber(params.top_p),
105
115
  stream: false
106
116
  });
107
- const choice = completion.choices[0];
117
+ const choice = completion.choices?.[0];
108
118
  return Either.right({
109
119
  content: choice?.message?.content || "",
110
120
  role: choice?.message?.role || "assistant",
@@ -112,7 +122,8 @@ var WebLLMProvider = class extends BaseLLMProvider {
112
122
  usage: completion.usage
113
123
  });
114
124
  } catch (e) {
115
- return Either.left(`WebLLM chat error: ${e.message || e}`);
125
+ const error = e;
126
+ return Either.left(`WebLLM chat error: ${error.message || String(e)}`);
116
127
  }
117
128
  }
118
129
  async validate_connection() {
@@ -138,7 +149,7 @@ var MLCLLMProvider = class extends BaseLLMProvider {
138
149
  base_url;
139
150
  timeout;
140
151
  config;
141
- constructor(base_url = null, timeout = 120) {
152
+ constructor(base_url = null, timeout = LLM_DEFAULT_TIMEOUT_SECS) {
142
153
  super();
143
154
  this.config = LLM_PROVIDERS["mlc-llm"];
144
155
  this.base_url = (base_url || this.config.base_url).replace(/\/$/, "");
@@ -160,7 +171,8 @@ var MLCLLMProvider = class extends BaseLLMProvider {
160
171
  const data = await response.json();
161
172
  return Either.right(data);
162
173
  } catch (e) {
163
- return Either.left(`Connection error: ${e.message}`);
174
+ const error = e;
175
+ return Either.left(`Connection error: ${error.message || String(e)}`);
164
176
  }
165
177
  }
166
178
  return this._node_request(endpoint, options);
@@ -202,10 +214,10 @@ var MLCLLMProvider = class extends BaseLLMProvider {
202
214
  req.end();
203
215
  });
204
216
  }
205
- async complete(prompt, params) {
217
+ async complete(prompt, params, images) {
206
218
  const data = {
207
- model: params.model || this.config.default_model,
208
- prompt,
219
+ model: typeof params.model === "string" ? params.model : this.config.default_model,
220
+ messages: [{ role: "user", content: prompt }],
209
221
  max_tokens: params.max_tokens,
210
222
  temperature: params.temperature,
211
223
  top_p: params.top_p,
@@ -242,8 +254,8 @@ var MLCLLMProvider = class extends BaseLLMProvider {
242
254
  if (response.choices && response.choices.length > 0) {
243
255
  const message = response.choices[0].message;
244
256
  return Either.right({
245
- content: message.content,
246
- role: message.role,
257
+ content: message?.content || "",
258
+ role: message?.role || "assistant",
247
259
  model: response.model,
248
260
  usage: response.usage
249
261
  });
@@ -259,14 +271,14 @@ var MLCLLMProvider = class extends BaseLLMProvider {
259
271
  if (result.isLeft) return Either.left(result.left);
260
272
  const response = result.right;
261
273
  if (response.data && Array.isArray(response.data)) {
262
- return Either.right(response.data.map((m) => m.id));
274
+ return Either.right(response.data.map((m) => m.id).filter((id) => typeof id === "string"));
263
275
  }
264
276
  return Either.left("Invalid models response");
265
277
  }
266
278
  };
267
279
 
268
280
  // src/ptr/llm/LLMRuntime.ts
269
- function get_provider(provider_name = DEFAULT_PROVIDER, base_url = null, timeout = 120) {
281
+ function get_provider(provider_name = DEFAULT_PROVIDER, base_url = null, timeout = LLM_DEFAULT_TIMEOUT_SECS) {
270
282
  if (provider_name === "ollama") {
271
283
  return new OllamaProvider(base_url, timeout);
272
284
  }
@@ -301,32 +313,45 @@ var LLMRuntime = class {
301
313
  this._provider = get_provider(llmConfig.provider, llmConfig.endpoint_url, llmConfig.timeout);
302
314
  }
303
315
  let prompt = "";
316
+ let images;
304
317
  if (typeof context === "string") {
305
318
  prompt = context;
306
- } else {
307
- prompt = JSON.stringify(context);
319
+ } else if (context && typeof context === "object") {
320
+ const ctx = context;
321
+ if (typeof ctx.prompt === "string") {
322
+ prompt = ctx.prompt;
323
+ if (Array.isArray(ctx.images)) {
324
+ images = ctx.images;
325
+ }
326
+ } else {
327
+ prompt = JSON.stringify(context);
328
+ }
308
329
  }
309
330
  let result;
310
331
  if (llmConfig.system_prompt) {
311
- result = await this._execute_chat(prompt, llmConfig);
332
+ result = await this._execute_chat(prompt, llmConfig, images);
312
333
  } else {
313
- result = await this._execute_completion(prompt, llmConfig);
334
+ result = await this._execute_completion(prompt, llmConfig, images);
314
335
  }
315
336
  if (result.isLeft) {
316
337
  return `Error: ${result.left}`;
317
338
  }
318
339
  return this._format_response(result.right, llmConfig);
319
340
  }
320
- async _execute_completion(prompt, config) {
341
+ async _execute_completion(prompt, config, images) {
321
342
  const params = config.to_provider_params();
322
- return this.provider.complete(prompt, params);
343
+ return this.provider.complete(prompt, params, images);
323
344
  }
324
- async _execute_chat(prompt, config) {
345
+ async _execute_chat(prompt, config, images) {
325
346
  const messages = [];
326
347
  if (config.system_prompt) {
327
348
  messages.push({ role: "system", content: config.system_prompt });
328
349
  }
329
- messages.push({ role: "user", content: prompt });
350
+ const userMsg = { role: "user", content: prompt };
351
+ if (images && images.length > 0) {
352
+ userMsg.images = images;
353
+ }
354
+ messages.push(userMsg);
330
355
  if (config.assistant_instruction) {
331
356
  messages.push({ role: "assistant", content: config.assistant_instruction });
332
357
  }
@@ -1,11 +1,13 @@
1
1
  import {
2
2
  AbstractSqlEngine,
3
3
  CORE_SCHEMAS
4
- } from "./chunk-RSTKX7WM.js";
4
+ } from "./chunk-BFD4WSWU.js";
5
+ import {
6
+ DEFAULT_SQLJS_WASM_URL
7
+ } from "./chunk-A5S2PI37.js";
5
8
  import {
6
- DEFAULT_SQLJS_WASM_URL,
7
9
  MCard
8
- } from "./chunk-3MMMJ7NH.js";
10
+ } from "./chunk-2NFGZ6PA.js";
9
11
 
10
12
  // src/storage/engines/SqliteWasmEngine.ts
11
13
  var SqliteWasmEngine = class extends AbstractSqlEngine {
@@ -0,0 +1,170 @@
1
+ import {
2
+ GTime,
3
+ HashValidator
4
+ } from "./chunk-7NKII2JA.js";
5
+
6
+ // src/model/ContentTypeInterpreter.ts
7
+ import { detect_content_type, is_binary_content as wasm_is_binary, get_extension as wasm_ext } from "mcard-wasm";
8
+ var ContentTypeInterpreter = class {
9
+ static detect(content) {
10
+ return this.detectContentType(content).mimeType;
11
+ }
12
+ static detectContentType(content, fileExtension) {
13
+ const buffer = typeof content === "string" ? new TextEncoder().encode(content) : content;
14
+ const result = detect_content_type(buffer, fileExtension);
15
+ return { mimeType: result[0], extension: result[1] };
16
+ }
17
+ static getExtension(mimeType) {
18
+ return wasm_ext(mimeType) || "bin";
19
+ }
20
+ static isBinaryContent(content, mimeType) {
21
+ const buffer = typeof content === "string" ? new TextEncoder().encode(content) : content;
22
+ return wasm_is_binary(buffer);
23
+ }
24
+ // Stub or bypass irrelevant manual TS rules now managed by mcard-core
25
+ static registerExtension(mimeType, extension) {
26
+ }
27
+ static registerExtensions(mapping) {
28
+ }
29
+ static isKnownLongLineExtension(extension) {
30
+ return false;
31
+ }
32
+ static isUnstructuredBinary(sample) {
33
+ if (sample.length < 512) return false;
34
+ let nullCount = 0;
35
+ let controlChars = 0;
36
+ for (let i = 0; i < sample.length; i++) {
37
+ const b = sample[i];
38
+ if (b === 0) nullCount++;
39
+ if (b < 32 && b !== 9 && b !== 10 && b !== 13) controlChars++;
40
+ }
41
+ const nullRatio = nullCount / sample.length;
42
+ const controlRatio = controlChars / sample.length;
43
+ return nullRatio > 0.1 || controlRatio > 0.2;
44
+ }
45
+ static hasPathologicalLines(sample, isKnownType) {
46
+ return false;
47
+ }
48
+ };
49
+
50
+ // src/types/dots.ts
51
+ function createMCardDOTSMetadata(tightRefs = [], looseRefs = []) {
52
+ return {
53
+ role: "Carrier" /* CARRIER */,
54
+ eosRole: "InvariantContent" /* INVARIANT_CONTENT */,
55
+ plane: "Data" /* DATA */,
56
+ tightRefs,
57
+ looseRefs
58
+ };
59
+ }
60
+ function createPCardDOTSMetadata(isLens, tightRefs = [], looseRefs = []) {
61
+ return {
62
+ role: isLens ? "Lens" /* LENS */ : "Chart" /* CHART */,
63
+ eosRole: "GenerativeLens" /* GENERATIVE_LENS */,
64
+ plane: "Control" /* CONTROL */,
65
+ tightRefs,
66
+ looseRefs
67
+ };
68
+ }
69
+ function createVCardDOTSMetadata() {
70
+ return {
71
+ role: "Arena" /* ARENA */,
72
+ eosRole: "SovereignDecision" /* SOVEREIGN_DECISION */,
73
+ plane: "Application" /* APPLICATION */
74
+ };
75
+ }
76
+
77
+ // src/model/MCard.ts
78
+ var MCard = class _MCard {
79
+ content;
80
+ hash;
81
+ g_time;
82
+ contentType;
83
+ // Defaulting to specific string or null
84
+ hashFunction;
85
+ constructor(content, hash, g_time, contentType, hashFunction) {
86
+ this.content = content;
87
+ this.hash = hash;
88
+ this.g_time = g_time;
89
+ this.contentType = contentType;
90
+ this.hashFunction = hashFunction;
91
+ }
92
+ /**
93
+ * Create a new MCard from content
94
+ */
95
+ static async create(content, hashAlgorithm = "sha256") {
96
+ if (content === null || content === void 0) {
97
+ throw new Error("Content cannot be null or undefined");
98
+ }
99
+ const bytes = typeof content === "string" ? new TextEncoder().encode(content) : content;
100
+ if (bytes.length === 0) {
101
+ throw new Error("Content cannot be empty");
102
+ }
103
+ const hash = await HashValidator.computeHash(bytes, hashAlgorithm);
104
+ const g_time = GTime.stampNow(hashAlgorithm);
105
+ const contentType = ContentTypeInterpreter.detect(bytes);
106
+ return new _MCard(bytes, hash, g_time, contentType, hashAlgorithm);
107
+ }
108
+ /**
109
+ * Create an MCard from existing data (e.g., from database)
110
+ */
111
+ static fromData(content, hash, g_time) {
112
+ const alg = GTime.getHashAlgorithm(g_time);
113
+ const contentType = ContentTypeInterpreter.detect(content);
114
+ return new _MCard(content, hash, g_time, contentType, alg);
115
+ }
116
+ /**
117
+ * Get content as text (UTF-8 decoded)
118
+ */
119
+ getContentAsText() {
120
+ return new TextDecoder().decode(this.content);
121
+ }
122
+ /**
123
+ * Get content as raw bytes
124
+ */
125
+ getContent() {
126
+ return this.content;
127
+ }
128
+ /**
129
+ * Convert to plain object
130
+ */
131
+ toObject() {
132
+ return {
133
+ hash: this.hash,
134
+ content: this.getContentAsText(),
135
+ g_time: this.g_time,
136
+ contentType: this.contentType,
137
+ hashFunction: this.hashFunction
138
+ };
139
+ }
140
+ /**
141
+ * Get DOTS vocabulary metadata for this MCard
142
+ *
143
+ * Returns the DOTS role information that positions this MCard
144
+ * in the Double Operadic Theory of Systems framework.
145
+ *
146
+ * MCard is always a CARRIER object in the Data Plane.
147
+ *
148
+ * @param tightRefs - Optional array of prerequisite MCard hashes (vertical composition)
149
+ * @param looseRefs - Optional array of alternative MCard hashes (horizontal composition)
150
+ * @returns DOTSMetadata describing this card's role in the compositional system
151
+ *
152
+ * @example
153
+ * ```typescript
154
+ * const card = await MCard.create('Hello World');
155
+ * const meta = card.getDOTSMetadata();
156
+ * console.log(meta.role); // 'Carrier'
157
+ * console.log(meta.plane); // 'Data'
158
+ * ```
159
+ */
160
+ getDOTSMetadata(tightRefs = [], looseRefs = []) {
161
+ return createMCardDOTSMetadata(tightRefs, looseRefs);
162
+ }
163
+ };
164
+
165
+ export {
166
+ ContentTypeInterpreter,
167
+ createPCardDOTSMetadata,
168
+ createVCardDOTSMetadata,
169
+ MCard
170
+ };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  AbstractSqlEngine,
3
3
  initCoreSchemas
4
- } from "./chunk-RSTKX7WM.js";
4
+ } from "./chunk-4VWWTGRW.js";
5
5
  import {
6
6
  createPage
7
7
  } from "./chunk-3EIBJPNF.js";
@@ -11,9 +11,11 @@ import {
11
11
  } from "./chunk-ADV52544.js";
12
12
  import {
13
13
  DEFAULT_PAGE_SIZE,
14
- MCard,
15
14
  SQLITE_BUSY_TIMEOUT_MS
16
- } from "./chunk-3MMMJ7NH.js";
15
+ } from "./chunk-BSEFN25Q.js";
16
+ import {
17
+ MCard
18
+ } from "./chunk-OKWBHCKC.js";
17
19
  import {
18
20
  __toCommonJS
19
21
  } from "./chunk-PNKVD2UK.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  ContentTypeInterpreter,
3
3
  MCard
4
- } from "./chunk-SOJ2UMO2.js";
4
+ } from "./chunk-OKWBHCKC.js";
5
5
  import {
6
6
  __export
7
- } from "./chunk-SIAA4J6H.js";
7
+ } from "./chunk-PNKVD2UK.js";
8
8
 
9
9
  // src/Loader.ts
10
10
  var Loader_exports = {};
@@ -183,6 +183,14 @@ async function processFileContent(filePath, options = {}) {
183
183
  var DEFAULT_MAX_PROBLEM_BYTES = 2 * 1024 * 1024;
184
184
  var WRAP_WIDTH_KNOWN = 1e3;
185
185
  var WRAP_WIDTH_DEFAULT = 80;
186
+ var Logger = {
187
+ info: (...args) => console.log("[Loader]", ...args),
188
+ warn: (...args) => console.warn("[Loader]", ...args),
189
+ error: (...args) => console.error("[Loader]", ...args),
190
+ debug: (...args) => {
191
+ if (process.env.DEBUG) console.log("[Loader]", ...args);
192
+ }
193
+ };
186
194
  async function processAndStoreFile(filePath, collection, options = {}) {
187
195
  const {
188
196
  allowProblematic = false,
@@ -194,13 +202,13 @@ async function processAndStoreFile(filePath, collection, options = {}) {
194
202
  let fileInfo;
195
203
  if (await isProblematicFile(filePath)) {
196
204
  if (!allowProblematic) {
197
- console.warn(`Skipping problematic file: ${filePath}`);
205
+ Logger.warn(`Skipping problematic file: ${filePath}`);
198
206
  return null;
199
207
  }
200
208
  const extension = path2.extname(filePath).toLowerCase();
201
209
  const isKnownType = ContentTypeInterpreter.isKnownLongLineExtension(extension);
202
210
  const wrapWidth = isKnownType ? WRAP_WIDTH_KNOWN : WRAP_WIDTH_DEFAULT;
203
- console.warn(`Problematic file detected, processing as safe text: ${filePath}`);
211
+ Logger.warn(`Problematic file detected, processing as safe text: ${filePath}`);
204
212
  try {
205
213
  const streamed = await streamReadNormalizedText(filePath, {
206
214
  byteCap: maxBytesOnProblem,
@@ -219,7 +227,7 @@ async function processAndStoreFile(filePath, collection, options = {}) {
219
227
  wrapWidth
220
228
  };
221
229
  } catch (e) {
222
- console.warn(`Safe text processing failed, falling back to capped binary: ${filePath}`);
230
+ Logger.warn(`Safe text processing failed, falling back to capped binary: ${filePath}`, e);
223
231
  fileInfo = await processFileContent(filePath, {
224
232
  forceBinary: true,
225
233
  allowPathological: true,
@@ -227,15 +235,13 @@ async function processAndStoreFile(filePath, collection, options = {}) {
227
235
  });
228
236
  }
229
237
  } else {
230
- console.log(`Processing file: ${filePath}`);
238
+ Logger.info(`Processing file: ${filePath}`);
231
239
  fileInfo = await processFileContent(filePath);
232
240
  }
233
241
  if (!fileInfo) return null;
234
242
  const content = fileInfo.content;
235
243
  if (!content || typeof content === "string" && content.length === 0 || content instanceof Uint8Array && content.length === 0) {
236
- if (process.env.DEBUG) {
237
- console.log(`Skipping empty file: ${filePath} (empty files cannot be stored as MCards)`);
238
- }
244
+ Logger.debug(`Skipping empty file: ${filePath} (empty files cannot be stored as MCards)`);
239
245
  return {
240
246
  hash: "",
241
247
  contentType: fileInfo.mimeType,
@@ -263,11 +269,9 @@ async function processAndStoreFile(filePath, collection, options = {}) {
263
269
  await collection.addWithHandle(mcard, relPath);
264
270
  registered = true;
265
271
  } catch (e2) {
266
- if (process.env.DEBUG) {
267
- console.log(
268
- `Handle name '${handle}' already in use (common for files like README.md, LICENSE). MCard stored successfully with hash ${mcard.hash.slice(0, 8)}... (accessible by hash, not by handle)`
269
- );
270
- }
272
+ Logger.debug(
273
+ `Handle name '${handle}' already in use (common for files like README.md, LICENSE). MCard stored successfully with hash ${mcard.hash.slice(0, 8)}... (accessible by hash, not by handle)`
274
+ );
271
275
  }
272
276
  }
273
277
  }
@@ -275,6 +279,7 @@ async function processAndStoreFile(filePath, collection, options = {}) {
275
279
  try {
276
280
  await collection.add(mcard);
277
281
  } catch (e3) {
282
+ Logger.warn(`Hash fallback also failed for ${handle}:`, e3);
278
283
  }
279
284
  }
280
285
  }
@@ -292,7 +297,7 @@ async function processAndStoreFile(filePath, collection, options = {}) {
292
297
  if (metadataOnly && isProblematic) result.metadataOnly = true;
293
298
  return result;
294
299
  } catch (e) {
295
- console.error(`Error processing ${filePath}:`, e);
300
+ Logger.error(`Error processing ${filePath}:`, e);
296
301
  return null;
297
302
  }
298
303
  }
@@ -334,7 +339,7 @@ async function loadFileToCollection(targetPath, collection, options = {}) {
334
339
  directoriesCount: uniqueDirs.size,
335
340
  directoryLevels: maxDepth
336
341
  };
337
- console.log(`About to process ${files.length} files`);
342
+ Logger.info(`About to process ${files.length} files`);
338
343
  for (const file of files) {
339
344
  const result = await processAndStoreFile(file, collection, {
340
345
  allowProblematic: includeProblematic,
@@ -0,0 +1,44 @@
1
+ // src/ptr/node/NetworkConfig.ts
2
+ var HTTP_DEFAULT_MAX_ATTEMPTS = 1;
3
+ var HTTP_DEFAULT_BACKOFF = "exponential";
4
+ var HTTP_DEFAULT_BASE_DELAY_MS = 1e3;
5
+ var HTTP_DEFAULT_MAX_DELAY_MS = 3e4;
6
+ var HTTP_DEFAULT_TIMEOUT_MS = 3e4;
7
+ var HTTP_DEFAULT_CACHE_TTL_SECONDS = 300;
8
+ var RATE_LIMIT_DEFAULT_TOKENS_PER_SECOND = 10;
9
+ var RATE_LIMIT_DEFAULT_MAX_BURST = 20;
10
+ var RATE_LIMIT_WAIT_INTERVAL_MS = 100;
11
+ var NETWORK_DEFAULT_LISTEN_PORT = 3e3;
12
+ var NETWORK_DEFAULT_SIGNALING_MAX_PORT_TRIES = 10;
13
+ var NETWORK_SIGNALING_PORT_RELEASE_WAIT_MS = 500;
14
+ var NETWORK_DEFAULT_HOST = "localhost";
15
+ var NETWORK_DEFAULT_ORCHESTRATOR_SLEEP_MS = 1e3;
16
+ var WEBSOCKET_SERVER_START_WAIT_MS = 3e3;
17
+ var STATIC_SERVER_START_WAIT_MS = 1500;
18
+ var PROCESS_TERMINATE_WAIT_MS = 500;
19
+ var SESSION_RECORD_DEFAULT_MAX_BUFFER_SIZE = 5;
20
+ var WEBRTC_DEFAULT_TIMEOUT_MS = 3e4;
21
+ var WEBRTC_DEFAULT_MOCK_DELAY_MS = 100;
22
+
23
+ export {
24
+ HTTP_DEFAULT_MAX_ATTEMPTS,
25
+ HTTP_DEFAULT_BACKOFF,
26
+ HTTP_DEFAULT_BASE_DELAY_MS,
27
+ HTTP_DEFAULT_MAX_DELAY_MS,
28
+ HTTP_DEFAULT_TIMEOUT_MS,
29
+ HTTP_DEFAULT_CACHE_TTL_SECONDS,
30
+ RATE_LIMIT_DEFAULT_TOKENS_PER_SECOND,
31
+ RATE_LIMIT_DEFAULT_MAX_BURST,
32
+ RATE_LIMIT_WAIT_INTERVAL_MS,
33
+ NETWORK_DEFAULT_LISTEN_PORT,
34
+ NETWORK_DEFAULT_SIGNALING_MAX_PORT_TRIES,
35
+ NETWORK_SIGNALING_PORT_RELEASE_WAIT_MS,
36
+ NETWORK_DEFAULT_HOST,
37
+ NETWORK_DEFAULT_ORCHESTRATOR_SLEEP_MS,
38
+ WEBSOCKET_SERVER_START_WAIT_MS,
39
+ STATIC_SERVER_START_WAIT_MS,
40
+ PROCESS_TERMINATE_WAIT_MS,
41
+ SESSION_RECORD_DEFAULT_MAX_BUFFER_SIZE,
42
+ WEBRTC_DEFAULT_TIMEOUT_MS,
43
+ WEBRTC_DEFAULT_MOCK_DELAY_MS
44
+ };