@elizaos/ui 2.0.0-alpha.25 → 2.0.0-alpha.334

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 (1747) hide show
  1. package/package.json +78 -51
  2. package/packages/typescript/src/action-docs.d.ts +22 -0
  3. package/packages/typescript/src/action-docs.d.ts.map +1 -0
  4. package/packages/typescript/src/action-docs.js +95 -0
  5. package/packages/typescript/src/actions.d.ts +29 -0
  6. package/packages/typescript/src/actions.d.ts.map +1 -0
  7. package/packages/typescript/src/actions.js +531 -0
  8. package/packages/typescript/src/character-utils.d.ts +138 -0
  9. package/packages/typescript/src/character-utils.d.ts.map +1 -0
  10. package/packages/typescript/src/character-utils.js +271 -0
  11. package/packages/typescript/src/character.d.ts +68 -0
  12. package/packages/typescript/src/character.d.ts.map +1 -0
  13. package/packages/typescript/src/character.js +155 -0
  14. package/packages/typescript/src/connection.d.ts +45 -0
  15. package/packages/typescript/src/connection.d.ts.map +1 -0
  16. package/packages/typescript/src/connection.js +149 -0
  17. package/packages/typescript/src/constants/index.d.ts +7 -0
  18. package/packages/typescript/src/constants/index.d.ts.map +1 -0
  19. package/packages/typescript/src/constants/index.js +6 -0
  20. package/packages/typescript/src/constants/secrets.d.ts +99 -0
  21. package/packages/typescript/src/constants/secrets.d.ts.map +1 -0
  22. package/packages/typescript/src/constants/secrets.js +239 -0
  23. package/packages/typescript/src/database/inMemoryAdapter.d.ts +285 -0
  24. package/packages/typescript/src/database/inMemoryAdapter.d.ts.map +1 -0
  25. package/packages/typescript/src/database/inMemoryAdapter.js +1171 -0
  26. package/packages/typescript/src/database.d.ts +426 -0
  27. package/packages/typescript/src/database.d.ts.map +1 -0
  28. package/packages/typescript/src/database.js +24 -0
  29. package/packages/typescript/src/entities.d.ts +11 -0
  30. package/packages/typescript/src/entities.d.ts.map +1 -0
  31. package/packages/typescript/src/entities.js +437 -0
  32. package/packages/typescript/src/features/advanced-capabilities/actions/addContact.d.ts +3 -0
  33. package/packages/typescript/src/features/advanced-capabilities/actions/addContact.d.ts.map +1 -0
  34. package/packages/typescript/src/features/advanced-capabilities/actions/addContact.js +142 -0
  35. package/packages/typescript/src/features/advanced-capabilities/actions/followRoom.d.ts +3 -0
  36. package/packages/typescript/src/features/advanced-capabilities/actions/followRoom.d.ts.map +1 -0
  37. package/packages/typescript/src/features/advanced-capabilities/actions/followRoom.js +183 -0
  38. package/packages/typescript/src/features/advanced-capabilities/actions/imageGeneration.d.ts +3 -0
  39. package/packages/typescript/src/features/advanced-capabilities/actions/imageGeneration.d.ts.map +1 -0
  40. package/packages/typescript/src/features/advanced-capabilities/actions/imageGeneration.js +148 -0
  41. package/packages/typescript/src/features/advanced-capabilities/actions/index.d.ts +21 -0
  42. package/packages/typescript/src/features/advanced-capabilities/actions/index.d.ts.map +1 -0
  43. package/packages/typescript/src/features/advanced-capabilities/actions/index.js +20 -0
  44. package/packages/typescript/src/features/advanced-capabilities/actions/muteRoom.d.ts +3 -0
  45. package/packages/typescript/src/features/advanced-capabilities/actions/muteRoom.d.ts.map +1 -0
  46. package/packages/typescript/src/features/advanced-capabilities/actions/muteRoom.js +181 -0
  47. package/packages/typescript/src/features/advanced-capabilities/actions/removeContact.d.ts +3 -0
  48. package/packages/typescript/src/features/advanced-capabilities/actions/removeContact.d.ts.map +1 -0
  49. package/packages/typescript/src/features/advanced-capabilities/actions/removeContact.js +102 -0
  50. package/packages/typescript/src/features/advanced-capabilities/actions/roles.d.ts +13 -0
  51. package/packages/typescript/src/features/advanced-capabilities/actions/roles.d.ts.map +1 -0
  52. package/packages/typescript/src/features/advanced-capabilities/actions/roles.js +317 -0
  53. package/packages/typescript/src/features/advanced-capabilities/actions/scheduleFollowUp.d.ts +3 -0
  54. package/packages/typescript/src/features/advanced-capabilities/actions/scheduleFollowUp.d.ts.map +1 -0
  55. package/packages/typescript/src/features/advanced-capabilities/actions/scheduleFollowUp.js +136 -0
  56. package/packages/typescript/src/features/advanced-capabilities/actions/searchContacts.d.ts +3 -0
  57. package/packages/typescript/src/features/advanced-capabilities/actions/searchContacts.d.ts.map +1 -0
  58. package/packages/typescript/src/features/advanced-capabilities/actions/searchContacts.js +176 -0
  59. package/packages/typescript/src/features/advanced-capabilities/actions/sendMessage.d.ts +15 -0
  60. package/packages/typescript/src/features/advanced-capabilities/actions/sendMessage.d.ts.map +1 -0
  61. package/packages/typescript/src/features/advanced-capabilities/actions/sendMessage.js +476 -0
  62. package/packages/typescript/src/features/advanced-capabilities/actions/settings.d.ts +22 -0
  63. package/packages/typescript/src/features/advanced-capabilities/actions/settings.d.ts.map +1 -0
  64. package/packages/typescript/src/features/advanced-capabilities/actions/settings.js +823 -0
  65. package/packages/typescript/src/features/advanced-capabilities/actions/think.d.ts +3 -0
  66. package/packages/typescript/src/features/advanced-capabilities/actions/think.d.ts.map +1 -0
  67. package/packages/typescript/src/features/advanced-capabilities/actions/think.js +84 -0
  68. package/packages/typescript/src/features/advanced-capabilities/actions/unfollowRoom.d.ts +3 -0
  69. package/packages/typescript/src/features/advanced-capabilities/actions/unfollowRoom.d.ts.map +1 -0
  70. package/packages/typescript/src/features/advanced-capabilities/actions/unfollowRoom.js +134 -0
  71. package/packages/typescript/src/features/advanced-capabilities/actions/unmuteRoom.d.ts +3 -0
  72. package/packages/typescript/src/features/advanced-capabilities/actions/unmuteRoom.d.ts.map +1 -0
  73. package/packages/typescript/src/features/advanced-capabilities/actions/unmuteRoom.js +193 -0
  74. package/packages/typescript/src/features/advanced-capabilities/actions/updateContact.d.ts +3 -0
  75. package/packages/typescript/src/features/advanced-capabilities/actions/updateContact.d.ts.map +1 -0
  76. package/packages/typescript/src/features/advanced-capabilities/actions/updateContact.js +199 -0
  77. package/packages/typescript/src/features/advanced-capabilities/actions/updateEntity.d.ts +43 -0
  78. package/packages/typescript/src/features/advanced-capabilities/actions/updateEntity.d.ts.map +1 -0
  79. package/packages/typescript/src/features/advanced-capabilities/actions/updateEntity.js +372 -0
  80. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/append.d.ts +4 -0
  81. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/append.d.ts.map +1 -0
  82. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/append.js +150 -0
  83. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/delete.d.ts +4 -0
  84. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/delete.d.ts.map +1 -0
  85. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/delete.js +136 -0
  86. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/list.d.ts +4 -0
  87. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/list.d.ts.map +1 -0
  88. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/list.js +84 -0
  89. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/read-attachment.d.ts +4 -0
  90. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/read-attachment.d.ts.map +1 -0
  91. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/read-attachment.js +112 -0
  92. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/read-file.d.ts +16 -0
  93. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/read-file.d.ts.map +1 -0
  94. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/read-file.js +192 -0
  95. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/read.d.ts +4 -0
  96. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/read.d.ts.map +1 -0
  97. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/read.js +138 -0
  98. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/remove-from-clipboard.d.ts +4 -0
  99. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/remove-from-clipboard.d.ts.map +1 -0
  100. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/remove-from-clipboard.js +96 -0
  101. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/search.d.ts +4 -0
  102. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/search.d.ts.map +1 -0
  103. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/search.js +139 -0
  104. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/write.d.ts +4 -0
  105. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/write.d.ts.map +1 -0
  106. package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/write.js +138 -0
  107. package/packages/typescript/src/features/advanced-capabilities/clipboard/index.d.ts +39 -0
  108. package/packages/typescript/src/features/advanced-capabilities/clipboard/index.d.ts.map +1 -0
  109. package/packages/typescript/src/features/advanced-capabilities/clipboard/index.js +78 -0
  110. package/packages/typescript/src/features/advanced-capabilities/clipboard/providers/clipboard.d.ts +4 -0
  111. package/packages/typescript/src/features/advanced-capabilities/clipboard/providers/clipboard.d.ts.map +1 -0
  112. package/packages/typescript/src/features/advanced-capabilities/clipboard/providers/clipboard.js +62 -0
  113. package/packages/typescript/src/features/advanced-capabilities/clipboard/services/attachmentContext.d.ts +16 -0
  114. package/packages/typescript/src/features/advanced-capabilities/clipboard/services/attachmentContext.d.ts.map +1 -0
  115. package/packages/typescript/src/features/advanced-capabilities/clipboard/services/attachmentContext.js +162 -0
  116. package/packages/typescript/src/features/advanced-capabilities/clipboard/services/clipboardService.d.ts +65 -0
  117. package/packages/typescript/src/features/advanced-capabilities/clipboard/services/clipboardService.d.ts.map +1 -0
  118. package/packages/typescript/src/features/advanced-capabilities/clipboard/services/clipboardService.js +352 -0
  119. package/packages/typescript/src/features/advanced-capabilities/clipboard/services/taskClipboardPersistence.d.ts +24 -0
  120. package/packages/typescript/src/features/advanced-capabilities/clipboard/services/taskClipboardPersistence.d.ts.map +1 -0
  121. package/packages/typescript/src/features/advanced-capabilities/clipboard/services/taskClipboardPersistence.js +63 -0
  122. package/packages/typescript/src/features/advanced-capabilities/clipboard/services/taskClipboardService.d.ts +29 -0
  123. package/packages/typescript/src/features/advanced-capabilities/clipboard/services/taskClipboardService.d.ts.map +1 -0
  124. package/packages/typescript/src/features/advanced-capabilities/clipboard/services/taskClipboardService.js +195 -0
  125. package/packages/typescript/src/features/advanced-capabilities/clipboard/specs.d.ts +15 -0
  126. package/packages/typescript/src/features/advanced-capabilities/clipboard/specs.d.ts.map +1 -0
  127. package/packages/typescript/src/features/advanced-capabilities/clipboard/specs.js +164 -0
  128. package/packages/typescript/src/features/advanced-capabilities/clipboard/types.d.ts +92 -0
  129. package/packages/typescript/src/features/advanced-capabilities/clipboard/types.d.ts.map +1 -0
  130. package/packages/typescript/src/features/advanced-capabilities/clipboard/types.js +4 -0
  131. package/packages/typescript/src/features/advanced-capabilities/evaluators/factRefinement.d.ts +20 -0
  132. package/packages/typescript/src/features/advanced-capabilities/evaluators/factRefinement.d.ts.map +1 -0
  133. package/packages/typescript/src/features/advanced-capabilities/evaluators/factRefinement.js +362 -0
  134. package/packages/typescript/src/features/advanced-capabilities/evaluators/index.d.ts +11 -0
  135. package/packages/typescript/src/features/advanced-capabilities/evaluators/index.d.ts.map +1 -0
  136. package/packages/typescript/src/features/advanced-capabilities/evaluators/index.js +10 -0
  137. package/packages/typescript/src/features/advanced-capabilities/evaluators/reflection.d.ts +3 -0
  138. package/packages/typescript/src/features/advanced-capabilities/evaluators/reflection.d.ts.map +1 -0
  139. package/packages/typescript/src/features/advanced-capabilities/evaluators/reflection.js +710 -0
  140. package/packages/typescript/src/features/advanced-capabilities/evaluators/relationshipExtraction.d.ts +3 -0
  141. package/packages/typescript/src/features/advanced-capabilities/evaluators/relationshipExtraction.d.ts.map +1 -0
  142. package/packages/typescript/src/features/advanced-capabilities/evaluators/relationshipExtraction.js +641 -0
  143. package/packages/typescript/src/features/advanced-capabilities/evaluators/skillExtraction.d.ts +25 -0
  144. package/packages/typescript/src/features/advanced-capabilities/evaluators/skillExtraction.d.ts.map +1 -0
  145. package/packages/typescript/src/features/advanced-capabilities/evaluators/skillExtraction.js +362 -0
  146. package/packages/typescript/src/features/advanced-capabilities/evaluators/skillRefinement.d.ts +21 -0
  147. package/packages/typescript/src/features/advanced-capabilities/evaluators/skillRefinement.d.ts.map +1 -0
  148. package/packages/typescript/src/features/advanced-capabilities/evaluators/skillRefinement.js +541 -0
  149. package/packages/typescript/src/features/advanced-capabilities/evaluators/task-completion.d.ts +12 -0
  150. package/packages/typescript/src/features/advanced-capabilities/evaluators/task-completion.d.ts.map +1 -0
  151. package/packages/typescript/src/features/advanced-capabilities/evaluators/task-completion.js +14 -0
  152. package/packages/typescript/src/features/advanced-capabilities/experience/actions/record-experience.d.ts +3 -0
  153. package/packages/typescript/src/features/advanced-capabilities/experience/actions/record-experience.d.ts.map +1 -0
  154. package/packages/typescript/src/features/advanced-capabilities/experience/actions/record-experience.js +71 -0
  155. package/packages/typescript/src/features/advanced-capabilities/experience/evaluators/experienceEvaluator.d.ts +3 -0
  156. package/packages/typescript/src/features/advanced-capabilities/experience/evaluators/experienceEvaluator.d.ts.map +1 -0
  157. package/packages/typescript/src/features/advanced-capabilities/experience/evaluators/experienceEvaluator.js +256 -0
  158. package/packages/typescript/src/features/advanced-capabilities/experience/generated/prompts/typescript/prompts.d.ts +12 -0
  159. package/packages/typescript/src/features/advanced-capabilities/experience/generated/prompts/typescript/prompts.d.ts.map +1 -0
  160. package/packages/typescript/src/features/advanced-capabilities/experience/generated/prompts/typescript/prompts.js +41 -0
  161. package/packages/typescript/src/features/advanced-capabilities/experience/generated/specs/spec-helpers.d.ts +49 -0
  162. package/packages/typescript/src/features/advanced-capabilities/experience/generated/specs/spec-helpers.d.ts.map +1 -0
  163. package/packages/typescript/src/features/advanced-capabilities/experience/generated/specs/spec-helpers.js +78 -0
  164. package/packages/typescript/src/features/advanced-capabilities/experience/generated/specs/specs.d.ts +159 -0
  165. package/packages/typescript/src/features/advanced-capabilities/experience/generated/specs/specs.d.ts.map +1 -0
  166. package/packages/typescript/src/features/advanced-capabilities/experience/generated/specs/specs.js +192 -0
  167. package/packages/typescript/src/features/advanced-capabilities/experience/index.d.ts +9 -0
  168. package/packages/typescript/src/features/advanced-capabilities/experience/index.d.ts.map +1 -0
  169. package/packages/typescript/src/features/advanced-capabilities/experience/index.js +7 -0
  170. package/packages/typescript/src/features/advanced-capabilities/experience/providers/experienceProvider.d.ts +3 -0
  171. package/packages/typescript/src/features/advanced-capabilities/experience/providers/experienceProvider.d.ts.map +1 -0
  172. package/packages/typescript/src/features/advanced-capabilities/experience/providers/experienceProvider.js +51 -0
  173. package/packages/typescript/src/features/advanced-capabilities/experience/service.d.ts +68 -0
  174. package/packages/typescript/src/features/advanced-capabilities/experience/service.d.ts.map +1 -0
  175. package/packages/typescript/src/features/advanced-capabilities/experience/service.js +755 -0
  176. package/packages/typescript/src/features/advanced-capabilities/experience/types.d.ts +90 -0
  177. package/packages/typescript/src/features/advanced-capabilities/experience/types.d.ts.map +1 -0
  178. package/packages/typescript/src/features/advanced-capabilities/experience/types.js +22 -0
  179. package/packages/typescript/src/features/advanced-capabilities/experience/utils/confidenceDecay.d.ts +34 -0
  180. package/packages/typescript/src/features/advanced-capabilities/experience/utils/confidenceDecay.d.ts.map +1 -0
  181. package/packages/typescript/src/features/advanced-capabilities/experience/utils/confidenceDecay.js +106 -0
  182. package/packages/typescript/src/features/advanced-capabilities/experience/utils/experienceRelationships.d.ts +26 -0
  183. package/packages/typescript/src/features/advanced-capabilities/experience/utils/experienceRelationships.d.ts.map +1 -0
  184. package/packages/typescript/src/features/advanced-capabilities/experience/utils/experienceRelationships.js +129 -0
  185. package/packages/typescript/src/features/advanced-capabilities/form/actions/restore.d.ts +13 -0
  186. package/packages/typescript/src/features/advanced-capabilities/form/actions/restore.d.ts.map +1 -0
  187. package/packages/typescript/src/features/advanced-capabilities/form/actions/restore.js +152 -0
  188. package/packages/typescript/src/features/advanced-capabilities/form/builder.d.ts +101 -0
  189. package/packages/typescript/src/features/advanced-capabilities/form/builder.d.ts.map +1 -0
  190. package/packages/typescript/src/features/advanced-capabilities/form/builder.js +362 -0
  191. package/packages/typescript/src/features/advanced-capabilities/form/builtins.d.ts +16 -0
  192. package/packages/typescript/src/features/advanced-capabilities/form/builtins.d.ts.map +1 -0
  193. package/packages/typescript/src/features/advanced-capabilities/form/builtins.js +245 -0
  194. package/packages/typescript/src/features/advanced-capabilities/form/defaults.d.ts +32 -0
  195. package/packages/typescript/src/features/advanced-capabilities/form/defaults.d.ts.map +1 -0
  196. package/packages/typescript/src/features/advanced-capabilities/form/defaults.js +98 -0
  197. package/packages/typescript/src/features/advanced-capabilities/form/evaluators/extractor.d.ts +12 -0
  198. package/packages/typescript/src/features/advanced-capabilities/form/evaluators/extractor.d.ts.map +1 -0
  199. package/packages/typescript/src/features/advanced-capabilities/form/evaluators/extractor.js +231 -0
  200. package/packages/typescript/src/features/advanced-capabilities/form/extraction.d.ts +24 -0
  201. package/packages/typescript/src/features/advanced-capabilities/form/extraction.d.ts.map +1 -0
  202. package/packages/typescript/src/features/advanced-capabilities/form/extraction.js +319 -0
  203. package/packages/typescript/src/features/advanced-capabilities/form/index.d.ts +22 -0
  204. package/packages/typescript/src/features/advanced-capabilities/form/index.d.ts.map +1 -0
  205. package/packages/typescript/src/features/advanced-capabilities/form/index.js +52 -0
  206. package/packages/typescript/src/features/advanced-capabilities/form/intent.d.ts +41 -0
  207. package/packages/typescript/src/features/advanced-capabilities/form/intent.d.ts.map +1 -0
  208. package/packages/typescript/src/features/advanced-capabilities/form/intent.js +119 -0
  209. package/packages/typescript/src/features/advanced-capabilities/form/providers/context.d.ts +11 -0
  210. package/packages/typescript/src/features/advanced-capabilities/form/providers/context.d.ts.map +1 -0
  211. package/packages/typescript/src/features/advanced-capabilities/form/providers/context.js +166 -0
  212. package/packages/typescript/src/features/advanced-capabilities/form/service.d.ts +66 -0
  213. package/packages/typescript/src/features/advanced-capabilities/form/service.d.ts.map +1 -0
  214. package/packages/typescript/src/features/advanced-capabilities/form/service.js +912 -0
  215. package/packages/typescript/src/features/advanced-capabilities/form/storage.d.ts +26 -0
  216. package/packages/typescript/src/features/advanced-capabilities/form/storage.d.ts.map +1 -0
  217. package/packages/typescript/src/features/advanced-capabilities/form/storage.js +228 -0
  218. package/packages/typescript/src/features/advanced-capabilities/form/template.d.ts +10 -0
  219. package/packages/typescript/src/features/advanced-capabilities/form/template.d.ts.map +1 -0
  220. package/packages/typescript/src/features/advanced-capabilities/form/template.js +56 -0
  221. package/packages/typescript/src/features/advanced-capabilities/form/ttl.d.ts +40 -0
  222. package/packages/typescript/src/features/advanced-capabilities/form/ttl.d.ts.map +1 -0
  223. package/packages/typescript/src/features/advanced-capabilities/form/ttl.js +107 -0
  224. package/packages/typescript/src/features/advanced-capabilities/form/types.d.ts +589 -0
  225. package/packages/typescript/src/features/advanced-capabilities/form/types.d.ts.map +1 -0
  226. package/packages/typescript/src/features/advanced-capabilities/form/types.js +71 -0
  227. package/packages/typescript/src/features/advanced-capabilities/form/validation.d.ts +24 -0
  228. package/packages/typescript/src/features/advanced-capabilities/form/validation.d.ts.map +1 -0
  229. package/packages/typescript/src/features/advanced-capabilities/form/validation.js +311 -0
  230. package/packages/typescript/src/features/advanced-capabilities/index.d.ts +47 -0
  231. package/packages/typescript/src/features/advanced-capabilities/index.d.ts.map +1 -0
  232. package/packages/typescript/src/features/advanced-capabilities/index.js +114 -0
  233. package/packages/typescript/src/features/advanced-capabilities/personality/actions/modify-character.d.ts +7 -0
  234. package/packages/typescript/src/features/advanced-capabilities/personality/actions/modify-character.d.ts.map +1 -0
  235. package/packages/typescript/src/features/advanced-capabilities/personality/actions/modify-character.js +1299 -0
  236. package/packages/typescript/src/features/advanced-capabilities/personality/evaluators/character-evolution.d.ts +53 -0
  237. package/packages/typescript/src/features/advanced-capabilities/personality/evaluators/character-evolution.d.ts.map +1 -0
  238. package/packages/typescript/src/features/advanced-capabilities/personality/evaluators/character-evolution.js +429 -0
  239. package/packages/typescript/src/features/advanced-capabilities/personality/index.d.ts +10 -0
  240. package/packages/typescript/src/features/advanced-capabilities/personality/index.d.ts.map +1 -0
  241. package/packages/typescript/src/features/advanced-capabilities/personality/index.js +8 -0
  242. package/packages/typescript/src/features/advanced-capabilities/personality/providers/user-personality.d.ts +8 -0
  243. package/packages/typescript/src/features/advanced-capabilities/personality/providers/user-personality.d.ts.map +1 -0
  244. package/packages/typescript/src/features/advanced-capabilities/personality/providers/user-personality.js +57 -0
  245. package/packages/typescript/src/features/advanced-capabilities/personality/services/character-file-manager.d.ts +71 -0
  246. package/packages/typescript/src/features/advanced-capabilities/personality/services/character-file-manager.d.ts.map +1 -0
  247. package/packages/typescript/src/features/advanced-capabilities/personality/services/character-file-manager.js +478 -0
  248. package/packages/typescript/src/features/advanced-capabilities/personality/types.d.ts +13 -0
  249. package/packages/typescript/src/features/advanced-capabilities/personality/types.d.ts.map +1 -0
  250. package/packages/typescript/src/features/advanced-capabilities/personality/types.js +8 -0
  251. package/packages/typescript/src/features/advanced-capabilities/providers/contacts.d.ts +3 -0
  252. package/packages/typescript/src/features/advanced-capabilities/providers/contacts.d.ts.map +1 -0
  253. package/packages/typescript/src/features/advanced-capabilities/providers/contacts.js +77 -0
  254. package/packages/typescript/src/features/advanced-capabilities/providers/facts.d.ts +11 -0
  255. package/packages/typescript/src/features/advanced-capabilities/providers/facts.d.ts.map +1 -0
  256. package/packages/typescript/src/features/advanced-capabilities/providers/facts.js +162 -0
  257. package/packages/typescript/src/features/advanced-capabilities/providers/followUps.d.ts +3 -0
  258. package/packages/typescript/src/features/advanced-capabilities/providers/followUps.d.ts.map +1 -0
  259. package/packages/typescript/src/features/advanced-capabilities/providers/followUps.js +112 -0
  260. package/packages/typescript/src/features/advanced-capabilities/providers/index.d.ts +13 -0
  261. package/packages/typescript/src/features/advanced-capabilities/providers/index.d.ts.map +1 -0
  262. package/packages/typescript/src/features/advanced-capabilities/providers/index.js +12 -0
  263. package/packages/typescript/src/features/advanced-capabilities/providers/knowledge.d.ts +9 -0
  264. package/packages/typescript/src/features/advanced-capabilities/providers/knowledge.d.ts.map +1 -0
  265. package/packages/typescript/src/features/advanced-capabilities/providers/knowledge.js +83 -0
  266. package/packages/typescript/src/features/advanced-capabilities/providers/relationships.d.ts +15 -0
  267. package/packages/typescript/src/features/advanced-capabilities/providers/relationships.d.ts.map +1 -0
  268. package/packages/typescript/src/features/advanced-capabilities/providers/relationships.js +125 -0
  269. package/packages/typescript/src/features/advanced-capabilities/providers/roles.d.ts +19 -0
  270. package/packages/typescript/src/features/advanced-capabilities/providers/roles.d.ts.map +1 -0
  271. package/packages/typescript/src/features/advanced-capabilities/providers/roles.js +180 -0
  272. package/packages/typescript/src/features/advanced-capabilities/providers/settings.d.ts +7 -0
  273. package/packages/typescript/src/features/advanced-capabilities/providers/settings.d.ts.map +1 -0
  274. package/packages/typescript/src/features/advanced-capabilities/providers/settings.js +294 -0
  275. package/packages/typescript/src/features/advanced-memory/evaluators/index.d.ts +3 -0
  276. package/packages/typescript/src/features/advanced-memory/evaluators/index.d.ts.map +1 -0
  277. package/packages/typescript/src/features/advanced-memory/evaluators/index.js +2 -0
  278. package/packages/typescript/src/features/advanced-memory/evaluators/long-term-extraction.d.ts +3 -0
  279. package/packages/typescript/src/features/advanced-memory/evaluators/long-term-extraction.d.ts.map +1 -0
  280. package/packages/typescript/src/features/advanced-memory/evaluators/long-term-extraction.js +199 -0
  281. package/packages/typescript/src/features/advanced-memory/evaluators/summarization.d.ts +3 -0
  282. package/packages/typescript/src/features/advanced-memory/evaluators/summarization.d.ts.map +1 -0
  283. package/packages/typescript/src/features/advanced-memory/evaluators/summarization.js +240 -0
  284. package/packages/typescript/src/features/advanced-memory/index.d.ts +16 -0
  285. package/packages/typescript/src/features/advanced-memory/index.d.ts.map +1 -0
  286. package/packages/typescript/src/features/advanced-memory/index.js +26 -0
  287. package/packages/typescript/src/features/advanced-memory/prompts.d.ts +2 -0
  288. package/packages/typescript/src/features/advanced-memory/prompts.d.ts.map +1 -0
  289. package/packages/typescript/src/features/advanced-memory/prompts.js +1 -0
  290. package/packages/typescript/src/features/advanced-memory/providers/context-summary.d.ts +3 -0
  291. package/packages/typescript/src/features/advanced-memory/providers/context-summary.d.ts.map +1 -0
  292. package/packages/typescript/src/features/advanced-memory/providers/context-summary.js +85 -0
  293. package/packages/typescript/src/features/advanced-memory/providers/index.d.ts +3 -0
  294. package/packages/typescript/src/features/advanced-memory/providers/index.d.ts.map +1 -0
  295. package/packages/typescript/src/features/advanced-memory/providers/index.js +2 -0
  296. package/packages/typescript/src/features/advanced-memory/providers/long-term-memory.d.ts +3 -0
  297. package/packages/typescript/src/features/advanced-memory/providers/long-term-memory.d.ts.map +1 -0
  298. package/packages/typescript/src/features/advanced-memory/providers/long-term-memory.js +92 -0
  299. package/packages/typescript/src/features/advanced-memory/schemas/index.d.ts +5 -0
  300. package/packages/typescript/src/features/advanced-memory/schemas/index.d.ts.map +1 -0
  301. package/packages/typescript/src/features/advanced-memory/schemas/index.js +3 -0
  302. package/packages/typescript/src/features/advanced-memory/schemas/long-term-memories.d.ts +10 -0
  303. package/packages/typescript/src/features/advanced-memory/schemas/long-term-memories.d.ts.map +1 -0
  304. package/packages/typescript/src/features/advanced-memory/schemas/long-term-memories.js +65 -0
  305. package/packages/typescript/src/features/advanced-memory/schemas/memory-access-logs.d.ts +10 -0
  306. package/packages/typescript/src/features/advanced-memory/schemas/memory-access-logs.d.ts.map +1 -0
  307. package/packages/typescript/src/features/advanced-memory/schemas/memory-access-logs.js +45 -0
  308. package/packages/typescript/src/features/advanced-memory/schemas/session-summaries.d.ts +10 -0
  309. package/packages/typescript/src/features/advanced-memory/schemas/session-summaries.d.ts.map +1 -0
  310. package/packages/typescript/src/features/advanced-memory/schemas/session-summaries.js +66 -0
  311. package/packages/typescript/src/features/advanced-memory/services/memory-service.d.ts +38 -0
  312. package/packages/typescript/src/features/advanced-memory/services/memory-service.d.ts.map +1 -0
  313. package/packages/typescript/src/features/advanced-memory/services/memory-service.js +367 -0
  314. package/packages/typescript/src/features/advanced-memory/trajectory.d.ts +10 -0
  315. package/packages/typescript/src/features/advanced-memory/trajectory.d.ts.map +1 -0
  316. package/packages/typescript/src/features/advanced-memory/trajectory.js +33 -0
  317. package/packages/typescript/src/features/advanced-memory/types.d.ts +68 -0
  318. package/packages/typescript/src/features/advanced-memory/types.d.ts.map +1 -0
  319. package/packages/typescript/src/features/advanced-memory/types.js +6 -0
  320. package/packages/typescript/src/features/advanced-planning/actions/chain-example.d.ts +6 -0
  321. package/packages/typescript/src/features/advanced-planning/actions/chain-example.d.ts.map +1 -0
  322. package/packages/typescript/src/features/advanced-planning/actions/chain-example.js +181 -0
  323. package/packages/typescript/src/features/advanced-planning/index.d.ts +5 -0
  324. package/packages/typescript/src/features/advanced-planning/index.d.ts.map +1 -0
  325. package/packages/typescript/src/features/advanced-planning/index.js +20 -0
  326. package/packages/typescript/src/features/advanced-planning/providers/message-classifier.d.ts +3 -0
  327. package/packages/typescript/src/features/advanced-planning/providers/message-classifier.d.ts.map +1 -0
  328. package/packages/typescript/src/features/advanced-planning/providers/message-classifier.js +105 -0
  329. package/packages/typescript/src/features/advanced-planning/services/planning-service.d.ts +77 -0
  330. package/packages/typescript/src/features/advanced-planning/services/planning-service.d.ts.map +1 -0
  331. package/packages/typescript/src/features/advanced-planning/services/planning-service.js +875 -0
  332. package/packages/typescript/src/features/advanced-planning/types.d.ts +78 -0
  333. package/packages/typescript/src/features/advanced-planning/types.d.ts.map +1 -0
  334. package/packages/typescript/src/features/advanced-planning/types.js +1 -0
  335. package/packages/typescript/src/features/autonomy/action.d.ts +14 -0
  336. package/packages/typescript/src/features/autonomy/action.d.ts.map +1 -0
  337. package/packages/typescript/src/features/autonomy/action.js +177 -0
  338. package/packages/typescript/src/features/autonomy/execution-facade.d.ts +22 -0
  339. package/packages/typescript/src/features/autonomy/execution-facade.d.ts.map +1 -0
  340. package/packages/typescript/src/features/autonomy/execution-facade.js +150 -0
  341. package/packages/typescript/src/features/autonomy/index.d.ts +11 -0
  342. package/packages/typescript/src/features/autonomy/index.d.ts.map +1 -0
  343. package/packages/typescript/src/features/autonomy/index.js +13 -0
  344. package/packages/typescript/src/features/autonomy/providers.d.ts +21 -0
  345. package/packages/typescript/src/features/autonomy/providers.d.ts.map +1 -0
  346. package/packages/typescript/src/features/autonomy/providers.js +154 -0
  347. package/packages/typescript/src/features/autonomy/routes.d.ts +11 -0
  348. package/packages/typescript/src/features/autonomy/routes.d.ts.map +1 -0
  349. package/packages/typescript/src/features/autonomy/routes.js +158 -0
  350. package/packages/typescript/src/features/autonomy/service.d.ts +138 -0
  351. package/packages/typescript/src/features/autonomy/service.d.ts.map +1 -0
  352. package/packages/typescript/src/features/autonomy/service.js +813 -0
  353. package/packages/typescript/src/features/autonomy/types.d.ts +31 -0
  354. package/packages/typescript/src/features/autonomy/types.d.ts.map +1 -0
  355. package/packages/typescript/src/features/autonomy/types.js +6 -0
  356. package/packages/typescript/src/features/basic-capabilities/actions/choice.d.ts +4 -0
  357. package/packages/typescript/src/features/basic-capabilities/actions/choice.d.ts.map +1 -0
  358. package/packages/typescript/src/features/basic-capabilities/actions/choice.js +278 -0
  359. package/packages/typescript/src/features/basic-capabilities/actions/ignore.d.ts +3 -0
  360. package/packages/typescript/src/features/basic-capabilities/actions/ignore.d.ts.map +1 -0
  361. package/packages/typescript/src/features/basic-capabilities/actions/ignore.js +23 -0
  362. package/packages/typescript/src/features/basic-capabilities/actions/index.d.ts +10 -0
  363. package/packages/typescript/src/features/basic-capabilities/actions/index.d.ts.map +1 -0
  364. package/packages/typescript/src/features/basic-capabilities/actions/index.js +9 -0
  365. package/packages/typescript/src/features/basic-capabilities/actions/none.d.ts +3 -0
  366. package/packages/typescript/src/features/basic-capabilities/actions/none.d.ts.map +1 -0
  367. package/packages/typescript/src/features/basic-capabilities/actions/none.js +26 -0
  368. package/packages/typescript/src/features/basic-capabilities/actions/reply.d.ts +3 -0
  369. package/packages/typescript/src/features/basic-capabilities/actions/reply.d.ts.map +1 -0
  370. package/packages/typescript/src/features/basic-capabilities/actions/reply.js +80 -0
  371. package/packages/typescript/src/features/basic-capabilities/index.d.ts +108 -0
  372. package/packages/typescript/src/features/basic-capabilities/index.d.ts.map +1 -0
  373. package/packages/typescript/src/features/basic-capabilities/index.js +1027 -0
  374. package/packages/typescript/src/features/basic-capabilities/providers/actionState.d.ts +7 -0
  375. package/packages/typescript/src/features/basic-capabilities/providers/actionState.d.ts.map +1 -0
  376. package/packages/typescript/src/features/basic-capabilities/providers/actionState.js +232 -0
  377. package/packages/typescript/src/features/basic-capabilities/providers/actions.d.ts +35 -0
  378. package/packages/typescript/src/features/basic-capabilities/providers/actions.d.ts.map +1 -0
  379. package/packages/typescript/src/features/basic-capabilities/providers/actions.js +104 -0
  380. package/packages/typescript/src/features/basic-capabilities/providers/attachments.d.ts +20 -0
  381. package/packages/typescript/src/features/basic-capabilities/providers/attachments.d.ts.map +1 -0
  382. package/packages/typescript/src/features/basic-capabilities/providers/attachments.js +94 -0
  383. package/packages/typescript/src/features/basic-capabilities/providers/character.d.ts +17 -0
  384. package/packages/typescript/src/features/basic-capabilities/providers/character.d.ts.map +1 -0
  385. package/packages/typescript/src/features/basic-capabilities/providers/character.js +190 -0
  386. package/packages/typescript/src/features/basic-capabilities/providers/choice.d.ts +11 -0
  387. package/packages/typescript/src/features/basic-capabilities/providers/choice.d.ts.map +1 -0
  388. package/packages/typescript/src/features/basic-capabilities/providers/choice.js +86 -0
  389. package/packages/typescript/src/features/basic-capabilities/providers/contextBench.d.ts +12 -0
  390. package/packages/typescript/src/features/basic-capabilities/providers/contextBench.d.ts.map +1 -0
  391. package/packages/typescript/src/features/basic-capabilities/providers/contextBench.js +50 -0
  392. package/packages/typescript/src/features/basic-capabilities/providers/currentTime.d.ts +11 -0
  393. package/packages/typescript/src/features/basic-capabilities/providers/currentTime.d.ts.map +1 -0
  394. package/packages/typescript/src/features/basic-capabilities/providers/currentTime.js +56 -0
  395. package/packages/typescript/src/features/basic-capabilities/providers/entities.d.ts +7 -0
  396. package/packages/typescript/src/features/basic-capabilities/providers/entities.d.ts.map +1 -0
  397. package/packages/typescript/src/features/basic-capabilities/providers/entities.js +39 -0
  398. package/packages/typescript/src/features/basic-capabilities/providers/evaluators.d.ts +27 -0
  399. package/packages/typescript/src/features/basic-capabilities/providers/evaluators.d.ts.map +1 -0
  400. package/packages/typescript/src/features/basic-capabilities/providers/evaluators.js +107 -0
  401. package/packages/typescript/src/features/basic-capabilities/providers/index.d.ts +20 -0
  402. package/packages/typescript/src/features/basic-capabilities/providers/index.d.ts.map +1 -0
  403. package/packages/typescript/src/features/basic-capabilities/providers/index.js +19 -0
  404. package/packages/typescript/src/features/basic-capabilities/providers/non-actionable-chatter.d.ts +5 -0
  405. package/packages/typescript/src/features/basic-capabilities/providers/non-actionable-chatter.d.ts.map +1 -0
  406. package/packages/typescript/src/features/basic-capabilities/providers/non-actionable-chatter.js +22 -0
  407. package/packages/typescript/src/features/basic-capabilities/providers/providers.d.ts +18 -0
  408. package/packages/typescript/src/features/basic-capabilities/providers/providers.d.ts.map +1 -0
  409. package/packages/typescript/src/features/basic-capabilities/providers/providers.js +75 -0
  410. package/packages/typescript/src/features/basic-capabilities/providers/recentMessages.d.ts +14 -0
  411. package/packages/typescript/src/features/basic-capabilities/providers/recentMessages.d.ts.map +1 -0
  412. package/packages/typescript/src/features/basic-capabilities/providers/recentMessages.js +323 -0
  413. package/packages/typescript/src/features/basic-capabilities/providers/time.d.ts +12 -0
  414. package/packages/typescript/src/features/basic-capabilities/providers/time.d.ts.map +1 -0
  415. package/packages/typescript/src/features/basic-capabilities/providers/time.js +36 -0
  416. package/packages/typescript/src/features/basic-capabilities/providers/uiContext.d.ts +3 -0
  417. package/packages/typescript/src/features/basic-capabilities/providers/uiContext.d.ts.map +1 -0
  418. package/packages/typescript/src/features/basic-capabilities/providers/uiContext.js +48 -0
  419. package/packages/typescript/src/features/basic-capabilities/providers/world.d.ts +8 -0
  420. package/packages/typescript/src/features/basic-capabilities/providers/world.d.ts.map +1 -0
  421. package/packages/typescript/src/features/basic-capabilities/providers/world.js +212 -0
  422. package/packages/typescript/src/features/evaluator-doc-examples.d.ts +4 -0
  423. package/packages/typescript/src/features/evaluator-doc-examples.d.ts.map +1 -0
  424. package/packages/typescript/src/features/evaluator-doc-examples.js +13 -0
  425. package/packages/typescript/src/features/index.d.ts +58 -0
  426. package/packages/typescript/src/features/index.d.ts.map +1 -0
  427. package/packages/typescript/src/features/index.js +153 -0
  428. package/packages/typescript/src/features/knowledge/actions.d.ts +5 -0
  429. package/packages/typescript/src/features/knowledge/actions.d.ts.map +1 -0
  430. package/packages/typescript/src/features/knowledge/actions.js +275 -0
  431. package/packages/typescript/src/features/knowledge/config.d.ts +5 -0
  432. package/packages/typescript/src/features/knowledge/config.d.ts.map +1 -0
  433. package/packages/typescript/src/features/knowledge/config.js +147 -0
  434. package/packages/typescript/src/features/knowledge/ctx-embeddings.d.ts +53 -0
  435. package/packages/typescript/src/features/knowledge/ctx-embeddings.d.ts.map +1 -0
  436. package/packages/typescript/src/features/knowledge/ctx-embeddings.js +412 -0
  437. package/packages/typescript/src/features/knowledge/docs-loader.d.ts +27 -0
  438. package/packages/typescript/src/features/knowledge/docs-loader.d.ts.map +1 -0
  439. package/packages/typescript/src/features/knowledge/docs-loader.js +226 -0
  440. package/packages/typescript/src/features/knowledge/document-processor.d.ts +27 -0
  441. package/packages/typescript/src/features/knowledge/document-processor.d.ts.map +1 -0
  442. package/packages/typescript/src/features/knowledge/document-processor.js +629 -0
  443. package/packages/typescript/src/features/knowledge/documents-provider.d.ts +3 -0
  444. package/packages/typescript/src/features/knowledge/documents-provider.d.ts.map +1 -0
  445. package/packages/typescript/src/features/knowledge/documents-provider.js +112 -0
  446. package/packages/typescript/src/features/knowledge/index.d.ts +16 -0
  447. package/packages/typescript/src/features/knowledge/index.d.ts.map +1 -0
  448. package/packages/typescript/src/features/knowledge/index.js +29 -0
  449. package/packages/typescript/src/features/knowledge/llm.d.ts +27 -0
  450. package/packages/typescript/src/features/knowledge/llm.d.ts.map +1 -0
  451. package/packages/typescript/src/features/knowledge/llm.js +444 -0
  452. package/packages/typescript/src/features/knowledge/provider.d.ts +3 -0
  453. package/packages/typescript/src/features/knowledge/provider.d.ts.map +1 -0
  454. package/packages/typescript/src/features/knowledge/provider.js +114 -0
  455. package/packages/typescript/src/features/knowledge/service.d.ts +83 -0
  456. package/packages/typescript/src/features/knowledge/service.d.ts.map +1 -0
  457. package/packages/typescript/src/features/knowledge/service.js +648 -0
  458. package/packages/typescript/src/features/knowledge/types.d.ts +162 -0
  459. package/packages/typescript/src/features/knowledge/types.d.ts.map +1 -0
  460. package/packages/typescript/src/features/knowledge/types.js +57 -0
  461. package/packages/typescript/src/features/knowledge/utils.d.ts +22 -0
  462. package/packages/typescript/src/features/knowledge/utils.d.ts.map +1 -0
  463. package/packages/typescript/src/features/knowledge/utils.js +387 -0
  464. package/packages/typescript/src/features/plugin-manager/actions/coreStatusAction.d.ts +3 -0
  465. package/packages/typescript/src/features/plugin-manager/actions/coreStatusAction.d.ts.map +1 -0
  466. package/packages/typescript/src/features/plugin-manager/actions/coreStatusAction.js +65 -0
  467. package/packages/typescript/src/features/plugin-manager/actions/listEjectedPluginsAction.d.ts +3 -0
  468. package/packages/typescript/src/features/plugin-manager/actions/listEjectedPluginsAction.d.ts.map +1 -0
  469. package/packages/typescript/src/features/plugin-manager/actions/listEjectedPluginsAction.js +63 -0
  470. package/packages/typescript/src/features/plugin-manager/actions/searchPluginAction.d.ts +4 -0
  471. package/packages/typescript/src/features/plugin-manager/actions/searchPluginAction.d.ts.map +1 -0
  472. package/packages/typescript/src/features/plugin-manager/actions/searchPluginAction.js +232 -0
  473. package/packages/typescript/src/features/plugin-manager/coreExtensions.d.ts +28 -0
  474. package/packages/typescript/src/features/plugin-manager/coreExtensions.d.ts.map +1 -0
  475. package/packages/typescript/src/features/plugin-manager/coreExtensions.js +54 -0
  476. package/packages/typescript/src/features/plugin-manager/index.d.ts +25 -0
  477. package/packages/typescript/src/features/plugin-manager/index.d.ts.map +1 -0
  478. package/packages/typescript/src/features/plugin-manager/index.js +53 -0
  479. package/packages/typescript/src/features/plugin-manager/providers/pluginConfigurationStatus.d.ts +5 -0
  480. package/packages/typescript/src/features/plugin-manager/providers/pluginConfigurationStatus.d.ts.map +1 -0
  481. package/packages/typescript/src/features/plugin-manager/providers/pluginConfigurationStatus.js +104 -0
  482. package/packages/typescript/src/features/plugin-manager/providers/pluginStateProvider.d.ts +5 -0
  483. package/packages/typescript/src/features/plugin-manager/providers/pluginStateProvider.d.ts.map +1 -0
  484. package/packages/typescript/src/features/plugin-manager/providers/pluginStateProvider.js +105 -0
  485. package/packages/typescript/src/features/plugin-manager/providers/registryPluginsProvider.d.ts +5 -0
  486. package/packages/typescript/src/features/plugin-manager/providers/registryPluginsProvider.d.ts.map +1 -0
  487. package/packages/typescript/src/features/plugin-manager/providers/registryPluginsProvider.js +93 -0
  488. package/packages/typescript/src/features/plugin-manager/providers/relevance.d.ts +9 -0
  489. package/packages/typescript/src/features/plugin-manager/providers/relevance.d.ts.map +1 -0
  490. package/packages/typescript/src/features/plugin-manager/providers/relevance.js +229 -0
  491. package/packages/typescript/src/features/plugin-manager/services/coreManagerService.d.ts +76 -0
  492. package/packages/typescript/src/features/plugin-manager/services/coreManagerService.d.ts.map +1 -0
  493. package/packages/typescript/src/features/plugin-manager/services/coreManagerService.js +479 -0
  494. package/packages/typescript/src/features/plugin-manager/services/pluginConfigurationService.d.ts +31 -0
  495. package/packages/typescript/src/features/plugin-manager/services/pluginConfigurationService.d.ts.map +1 -0
  496. package/packages/typescript/src/features/plugin-manager/services/pluginConfigurationService.js +57 -0
  497. package/packages/typescript/src/features/plugin-manager/services/pluginManagerService.d.ts +68 -0
  498. package/packages/typescript/src/features/plugin-manager/services/pluginManagerService.d.ts.map +1 -0
  499. package/packages/typescript/src/features/plugin-manager/services/pluginManagerService.js +1005 -0
  500. package/packages/typescript/src/features/plugin-manager/services/pluginRegistryService.d.ts +84 -0
  501. package/packages/typescript/src/features/plugin-manager/services/pluginRegistryService.d.ts.map +1 -0
  502. package/packages/typescript/src/features/plugin-manager/services/pluginRegistryService.js +401 -0
  503. package/packages/typescript/src/features/plugin-manager/types.d.ts +142 -0
  504. package/packages/typescript/src/features/plugin-manager/types.d.ts.map +1 -0
  505. package/packages/typescript/src/features/plugin-manager/types.js +13 -0
  506. package/packages/typescript/src/features/plugin-manager/utils/paths.d.ts +4 -0
  507. package/packages/typescript/src/features/plugin-manager/utils/paths.d.ts.map +1 -0
  508. package/packages/typescript/src/features/plugin-manager/utils/paths.js +32 -0
  509. package/packages/typescript/src/features/secrets/actions/index.d.ts +7 -0
  510. package/packages/typescript/src/features/secrets/actions/index.d.ts.map +1 -0
  511. package/packages/typescript/src/features/secrets/actions/index.js +6 -0
  512. package/packages/typescript/src/features/secrets/actions/manage-secret.d.ts +12 -0
  513. package/packages/typescript/src/features/secrets/actions/manage-secret.d.ts.map +1 -0
  514. package/packages/typescript/src/features/secrets/actions/manage-secret.js +278 -0
  515. package/packages/typescript/src/features/secrets/actions/request-secret.d.ts +3 -0
  516. package/packages/typescript/src/features/secrets/actions/request-secret.d.ts.map +1 -0
  517. package/packages/typescript/src/features/secrets/actions/request-secret.js +105 -0
  518. package/packages/typescript/src/features/secrets/actions/set-secret.d.ts +12 -0
  519. package/packages/typescript/src/features/secrets/actions/set-secret.d.ts.map +1 -0
  520. package/packages/typescript/src/features/secrets/actions/set-secret.js +223 -0
  521. package/packages/typescript/src/features/secrets/crypto/encryption.d.ts +184 -0
  522. package/packages/typescript/src/features/secrets/crypto/encryption.d.ts.map +1 -0
  523. package/packages/typescript/src/features/secrets/crypto/encryption.js +373 -0
  524. package/packages/typescript/src/features/secrets/crypto/index.d.ts +5 -0
  525. package/packages/typescript/src/features/secrets/crypto/index.d.ts.map +1 -0
  526. package/packages/typescript/src/features/secrets/crypto/index.js +16 -0
  527. package/packages/typescript/src/features/secrets/onboarding/action.d.ts +12 -0
  528. package/packages/typescript/src/features/secrets/onboarding/action.d.ts.map +1 -0
  529. package/packages/typescript/src/features/secrets/onboarding/action.js +337 -0
  530. package/packages/typescript/src/features/secrets/onboarding/config.d.ts +99 -0
  531. package/packages/typescript/src/features/secrets/onboarding/config.d.ts.map +1 -0
  532. package/packages/typescript/src/features/secrets/onboarding/config.js +240 -0
  533. package/packages/typescript/src/features/secrets/onboarding/index.d.ts +13 -0
  534. package/packages/typescript/src/features/secrets/onboarding/index.d.ts.map +1 -0
  535. package/packages/typescript/src/features/secrets/onboarding/index.js +12 -0
  536. package/packages/typescript/src/features/secrets/onboarding/provider.d.ts +16 -0
  537. package/packages/typescript/src/features/secrets/onboarding/provider.d.ts.map +1 -0
  538. package/packages/typescript/src/features/secrets/onboarding/provider.js +231 -0
  539. package/packages/typescript/src/features/secrets/onboarding/service.d.ts +134 -0
  540. package/packages/typescript/src/features/secrets/onboarding/service.d.ts.map +1 -0
  541. package/packages/typescript/src/features/secrets/onboarding/service.js +436 -0
  542. package/packages/typescript/src/features/secrets/providers/index.d.ts +5 -0
  543. package/packages/typescript/src/features/secrets/providers/index.d.ts.map +1 -0
  544. package/packages/typescript/src/features/secrets/providers/index.js +4 -0
  545. package/packages/typescript/src/features/secrets/providers/secrets-status.d.ts +22 -0
  546. package/packages/typescript/src/features/secrets/providers/secrets-status.d.ts.map +1 -0
  547. package/packages/typescript/src/features/secrets/providers/secrets-status.js +160 -0
  548. package/packages/typescript/src/features/secrets/services/plugin-activator.d.ts +182 -0
  549. package/packages/typescript/src/features/secrets/services/plugin-activator.d.ts.map +1 -0
  550. package/packages/typescript/src/features/secrets/services/plugin-activator.js +617 -0
  551. package/packages/typescript/src/features/secrets/services/secrets.d.ts +183 -0
  552. package/packages/typescript/src/features/secrets/services/secrets.d.ts.map +1 -0
  553. package/packages/typescript/src/features/secrets/services/secrets.js +566 -0
  554. package/packages/typescript/src/features/secrets/storage/character-store.d.ts +63 -0
  555. package/packages/typescript/src/features/secrets/storage/character-store.d.ts.map +1 -0
  556. package/packages/typescript/src/features/secrets/storage/character-store.js +265 -0
  557. package/packages/typescript/src/features/secrets/storage/component-store.d.ts +47 -0
  558. package/packages/typescript/src/features/secrets/storage/component-store.d.ts.map +1 -0
  559. package/packages/typescript/src/features/secrets/storage/component-store.js +264 -0
  560. package/packages/typescript/src/features/secrets/storage/index.d.ts +10 -0
  561. package/packages/typescript/src/features/secrets/storage/index.d.ts.map +1 -0
  562. package/packages/typescript/src/features/secrets/storage/index.js +8 -0
  563. package/packages/typescript/src/features/secrets/storage/interface.d.ts +52 -0
  564. package/packages/typescript/src/features/secrets/storage/interface.d.ts.map +1 -0
  565. package/packages/typescript/src/features/secrets/storage/interface.js +92 -0
  566. package/packages/typescript/src/features/secrets/storage/memory-store.d.ts +44 -0
  567. package/packages/typescript/src/features/secrets/storage/memory-store.d.ts.map +1 -0
  568. package/packages/typescript/src/features/secrets/storage/memory-store.js +142 -0
  569. package/packages/typescript/src/features/secrets/storage/world-store.d.ts +52 -0
  570. package/packages/typescript/src/features/secrets/storage/world-store.d.ts.map +1 -0
  571. package/packages/typescript/src/features/secrets/storage/world-store.js +292 -0
  572. package/packages/typescript/src/features/secrets/types.d.ts +438 -0
  573. package/packages/typescript/src/features/secrets/types.d.ts.map +1 -0
  574. package/packages/typescript/src/features/secrets/types.js +57 -0
  575. package/packages/typescript/src/features/secrets/validation.d.ts +33 -0
  576. package/packages/typescript/src/features/secrets/validation.d.ts.map +1 -0
  577. package/packages/typescript/src/features/secrets/validation.js +389 -0
  578. package/packages/typescript/src/features/shared/schedule-follow-up-response.d.ts +10 -0
  579. package/packages/typescript/src/features/shared/schedule-follow-up-response.d.ts.map +1 -0
  580. package/packages/typescript/src/features/shared/schedule-follow-up-response.js +49 -0
  581. package/packages/typescript/src/features/trajectories/TrajectoriesService.d.ts +289 -0
  582. package/packages/typescript/src/features/trajectories/TrajectoriesService.d.ts.map +1 -0
  583. package/packages/typescript/src/features/trajectories/TrajectoriesService.js +1423 -0
  584. package/packages/typescript/src/features/trajectories/action-interceptor.d.ts +23 -0
  585. package/packages/typescript/src/features/trajectories/action-interceptor.d.ts.map +1 -0
  586. package/packages/typescript/src/features/trajectories/action-interceptor.js +178 -0
  587. package/packages/typescript/src/features/trajectories/art-format.d.ts +32 -0
  588. package/packages/typescript/src/features/trajectories/art-format.d.ts.map +1 -0
  589. package/packages/typescript/src/features/trajectories/art-format.js +221 -0
  590. package/packages/typescript/src/features/trajectories/export.d.ts +40 -0
  591. package/packages/typescript/src/features/trajectories/export.d.ts.map +1 -0
  592. package/packages/typescript/src/features/trajectories/export.js +99 -0
  593. package/packages/typescript/src/features/trajectories/game-rewards.d.ts +14 -0
  594. package/packages/typescript/src/features/trajectories/game-rewards.d.ts.map +1 -0
  595. package/packages/typescript/src/features/trajectories/game-rewards.js +20 -0
  596. package/packages/typescript/src/features/trajectories/index.d.ts +24 -0
  597. package/packages/typescript/src/features/trajectories/index.d.ts.map +1 -0
  598. package/packages/typescript/src/features/trajectories/index.js +332 -0
  599. package/packages/typescript/src/features/trajectories/integration.d.ts +59 -0
  600. package/packages/typescript/src/features/trajectories/integration.d.ts.map +1 -0
  601. package/packages/typescript/src/features/trajectories/integration.js +83 -0
  602. package/packages/typescript/src/features/trajectories/reward-service.d.ts +24 -0
  603. package/packages/typescript/src/features/trajectories/reward-service.d.ts.map +1 -0
  604. package/packages/typescript/src/features/trajectories/reward-service.js +89 -0
  605. package/packages/typescript/src/features/trajectories/types.d.ts +261 -0
  606. package/packages/typescript/src/features/trajectories/types.d.ts.map +1 -0
  607. package/packages/typescript/src/features/trajectories/types.js +1 -0
  608. package/packages/typescript/src/features/trust/actions/evaluateTrust.d.ts +3 -0
  609. package/packages/typescript/src/features/trust/actions/evaluateTrust.d.ts.map +1 -0
  610. package/packages/typescript/src/features/trust/actions/evaluateTrust.js +225 -0
  611. package/packages/typescript/src/features/trust/actions/hasTrustEngine.d.ts +3 -0
  612. package/packages/typescript/src/features/trust/actions/hasTrustEngine.d.ts.map +1 -0
  613. package/packages/typescript/src/features/trust/actions/hasTrustEngine.js +3 -0
  614. package/packages/typescript/src/features/trust/actions/index.d.ts +6 -0
  615. package/packages/typescript/src/features/trust/actions/index.d.ts.map +1 -0
  616. package/packages/typescript/src/features/trust/actions/index.js +5 -0
  617. package/packages/typescript/src/features/trust/actions/recordTrustInteraction.d.ts +3 -0
  618. package/packages/typescript/src/features/trust/actions/recordTrustInteraction.d.ts.map +1 -0
  619. package/packages/typescript/src/features/trust/actions/recordTrustInteraction.js +189 -0
  620. package/packages/typescript/src/features/trust/actions/requestElevation.d.ts +3 -0
  621. package/packages/typescript/src/features/trust/actions/requestElevation.d.ts.map +1 -0
  622. package/packages/typescript/src/features/trust/actions/requestElevation.js +165 -0
  623. package/packages/typescript/src/features/trust/actions/roles.d.ts +3 -0
  624. package/packages/typescript/src/features/trust/actions/roles.d.ts.map +1 -0
  625. package/packages/typescript/src/features/trust/actions/roles.js +295 -0
  626. package/packages/typescript/src/features/trust/actions/settings.d.ts +5 -0
  627. package/packages/typescript/src/features/trust/actions/settings.d.ts.map +1 -0
  628. package/packages/typescript/src/features/trust/actions/settings.js +603 -0
  629. package/packages/typescript/src/features/trust/evaluators/index.d.ts +4 -0
  630. package/packages/typescript/src/features/trust/evaluators/index.d.ts.map +1 -0
  631. package/packages/typescript/src/features/trust/evaluators/index.js +3 -0
  632. package/packages/typescript/src/features/trust/evaluators/reflection.d.ts +3 -0
  633. package/packages/typescript/src/features/trust/evaluators/reflection.d.ts.map +1 -0
  634. package/packages/typescript/src/features/trust/evaluators/reflection.js +319 -0
  635. package/packages/typescript/src/features/trust/evaluators/securityEvaluator.d.ts +3 -0
  636. package/packages/typescript/src/features/trust/evaluators/securityEvaluator.d.ts.map +1 -0
  637. package/packages/typescript/src/features/trust/evaluators/securityEvaluator.js +270 -0
  638. package/packages/typescript/src/features/trust/evaluators/trustChangeEvaluator.d.ts +3 -0
  639. package/packages/typescript/src/features/trust/evaluators/trustChangeEvaluator.d.ts.map +1 -0
  640. package/packages/typescript/src/features/trust/evaluators/trustChangeEvaluator.js +201 -0
  641. package/packages/typescript/src/features/trust/index.d.ts +23 -0
  642. package/packages/typescript/src/features/trust/index.d.ts.map +1 -0
  643. package/packages/typescript/src/features/trust/index.js +96 -0
  644. package/packages/typescript/src/features/trust/providers/adminTrust.d.ts +3 -0
  645. package/packages/typescript/src/features/trust/providers/adminTrust.d.ts.map +1 -0
  646. package/packages/typescript/src/features/trust/providers/adminTrust.js +49 -0
  647. package/packages/typescript/src/features/trust/providers/index.d.ts +6 -0
  648. package/packages/typescript/src/features/trust/providers/index.d.ts.map +1 -0
  649. package/packages/typescript/src/features/trust/providers/index.js +5 -0
  650. package/packages/typescript/src/features/trust/providers/roles.d.ts +4 -0
  651. package/packages/typescript/src/features/trust/providers/roles.d.ts.map +1 -0
  652. package/packages/typescript/src/features/trust/providers/roles.js +142 -0
  653. package/packages/typescript/src/features/trust/providers/securityStatus.d.ts +3 -0
  654. package/packages/typescript/src/features/trust/providers/securityStatus.d.ts.map +1 -0
  655. package/packages/typescript/src/features/trust/providers/securityStatus.js +110 -0
  656. package/packages/typescript/src/features/trust/providers/settings.d.ts +3 -0
  657. package/packages/typescript/src/features/trust/providers/settings.d.ts.map +1 -0
  658. package/packages/typescript/src/features/trust/providers/settings.js +222 -0
  659. package/packages/typescript/src/features/trust/providers/trustProfile.d.ts +3 -0
  660. package/packages/typescript/src/features/trust/providers/trustProfile.d.ts.map +1 -0
  661. package/packages/typescript/src/features/trust/providers/trustProfile.js +68 -0
  662. package/packages/typescript/src/features/trust/schema.d.ts +1170 -0
  663. package/packages/typescript/src/features/trust/schema.d.ts.map +1 -0
  664. package/packages/typescript/src/features/trust/schema.js +108 -0
  665. package/packages/typescript/src/features/trust/services/ContextualPermissionSystem.d.ts +40 -0
  666. package/packages/typescript/src/features/trust/services/ContextualPermissionSystem.d.ts.map +1 -0
  667. package/packages/typescript/src/features/trust/services/ContextualPermissionSystem.js +317 -0
  668. package/packages/typescript/src/features/trust/services/CredentialProtector.d.ts +62 -0
  669. package/packages/typescript/src/features/trust/services/CredentialProtector.d.ts.map +1 -0
  670. package/packages/typescript/src/features/trust/services/CredentialProtector.js +417 -0
  671. package/packages/typescript/src/features/trust/services/SecurityModule.d.ts +142 -0
  672. package/packages/typescript/src/features/trust/services/SecurityModule.d.ts.map +1 -0
  673. package/packages/typescript/src/features/trust/services/SecurityModule.js +1057 -0
  674. package/packages/typescript/src/features/trust/services/SecurityStore.d.ts +53 -0
  675. package/packages/typescript/src/features/trust/services/SecurityStore.d.ts.map +1 -0
  676. package/packages/typescript/src/features/trust/services/SecurityStore.js +123 -0
  677. package/packages/typescript/src/features/trust/services/TrustEngine.d.ts +81 -0
  678. package/packages/typescript/src/features/trust/services/TrustEngine.d.ts.map +1 -0
  679. package/packages/typescript/src/features/trust/services/TrustEngine.js +621 -0
  680. package/packages/typescript/src/features/trust/services/adminContext.d.ts +3 -0
  681. package/packages/typescript/src/features/trust/services/adminContext.d.ts.map +1 -0
  682. package/packages/typescript/src/features/trust/services/adminContext.js +32 -0
  683. package/packages/typescript/src/features/trust/services/db.d.ts +12 -0
  684. package/packages/typescript/src/features/trust/services/db.d.ts.map +1 -0
  685. package/packages/typescript/src/features/trust/services/db.js +10 -0
  686. package/packages/typescript/src/features/trust/services/wrappers.d.ts +56 -0
  687. package/packages/typescript/src/features/trust/services/wrappers.d.ts.map +1 -0
  688. package/packages/typescript/src/features/trust/services/wrappers.js +124 -0
  689. package/packages/typescript/src/features/trust/types/permissions.d.ts +185 -0
  690. package/packages/typescript/src/features/trust/types/permissions.d.ts.map +1 -0
  691. package/packages/typescript/src/features/trust/types/permissions.js +58 -0
  692. package/packages/typescript/src/features/trust/types/security.d.ts +114 -0
  693. package/packages/typescript/src/features/trust/types/security.d.ts.map +1 -0
  694. package/packages/typescript/src/features/trust/types/security.js +15 -0
  695. package/packages/typescript/src/features/trust/types/trust.d.ts +179 -0
  696. package/packages/typescript/src/features/trust/types/trust.d.ts.map +1 -0
  697. package/packages/typescript/src/features/trust/types/trust.js +25 -0
  698. package/packages/typescript/src/generated/action-docs.d.ts +2799 -0
  699. package/packages/typescript/src/generated/action-docs.d.ts.map +1 -0
  700. package/packages/typescript/src/generated/action-docs.js +4021 -0
  701. package/packages/typescript/src/generated/spec-helpers.d.ts +49 -0
  702. package/packages/typescript/src/generated/spec-helpers.d.ts.map +1 -0
  703. package/packages/typescript/src/generated/spec-helpers.js +78 -0
  704. package/packages/typescript/src/i18n/generated/validation-keyword-data.d.ts +1069 -0
  705. package/packages/typescript/src/i18n/generated/validation-keyword-data.d.ts.map +1 -0
  706. package/packages/typescript/src/i18n/generated/validation-keyword-data.js +1069 -0
  707. package/packages/typescript/src/i18n/validation-keywords.d.ts +25 -0
  708. package/packages/typescript/src/i18n/validation-keywords.d.ts.map +1 -0
  709. package/packages/typescript/src/i18n/validation-keywords.js +112 -0
  710. package/packages/typescript/src/index.d.ts +12 -0
  711. package/packages/typescript/src/index.d.ts.map +1 -0
  712. package/packages/typescript/src/index.js +13 -0
  713. package/packages/typescript/src/index.node.d.ts +81 -0
  714. package/packages/typescript/src/index.node.d.ts.map +1 -0
  715. package/packages/typescript/src/index.node.js +114 -0
  716. package/packages/typescript/src/logger.d.ts +121 -0
  717. package/packages/typescript/src/logger.d.ts.map +1 -0
  718. package/packages/typescript/src/logger.js +1023 -0
  719. package/packages/typescript/src/markdown/chunk.d.ts +50 -0
  720. package/packages/typescript/src/markdown/chunk.d.ts.map +1 -0
  721. package/packages/typescript/src/markdown/chunk.js +268 -0
  722. package/packages/typescript/src/markdown/code-spans.d.ts +42 -0
  723. package/packages/typescript/src/markdown/code-spans.d.ts.map +1 -0
  724. package/packages/typescript/src/markdown/code-spans.js +89 -0
  725. package/packages/typescript/src/markdown/fences.d.ts +50 -0
  726. package/packages/typescript/src/markdown/fences.d.ts.map +1 -0
  727. package/packages/typescript/src/markdown/fences.js +90 -0
  728. package/packages/typescript/src/markdown/frontmatter.d.ts +24 -0
  729. package/packages/typescript/src/markdown/frontmatter.d.ts.map +1 -0
  730. package/packages/typescript/src/markdown/frontmatter.js +151 -0
  731. package/packages/typescript/src/markdown/index.d.ts +18 -0
  732. package/packages/typescript/src/markdown/index.d.ts.map +1 -0
  733. package/packages/typescript/src/markdown/index.js +17 -0
  734. package/packages/typescript/src/markdown/ir.d.ts +101 -0
  735. package/packages/typescript/src/markdown/ir.d.ts.map +1 -0
  736. package/packages/typescript/src/markdown/ir.js +789 -0
  737. package/packages/typescript/src/media/fetch.d.ts +39 -0
  738. package/packages/typescript/src/media/fetch.d.ts.map +1 -0
  739. package/packages/typescript/src/media/fetch.js +205 -0
  740. package/packages/typescript/src/media/index.d.ts +8 -0
  741. package/packages/typescript/src/media/index.d.ts.map +1 -0
  742. package/packages/typescript/src/media/index.js +7 -0
  743. package/packages/typescript/src/media/mime.d.ts +51 -0
  744. package/packages/typescript/src/media/mime.d.ts.map +1 -0
  745. package/packages/typescript/src/media/mime.js +225 -0
  746. package/packages/typescript/src/memory.d.ts +40 -0
  747. package/packages/typescript/src/memory.d.ts.map +1 -0
  748. package/packages/typescript/src/memory.js +58 -0
  749. package/packages/typescript/src/network/fetch-guard.d.ts +34 -0
  750. package/packages/typescript/src/network/fetch-guard.d.ts.map +1 -0
  751. package/packages/typescript/src/network/fetch-guard.js +136 -0
  752. package/packages/typescript/src/network/index.d.ts +11 -0
  753. package/packages/typescript/src/network/index.d.ts.map +1 -0
  754. package/packages/typescript/src/network/index.js +10 -0
  755. package/packages/typescript/src/network/ssrf.d.ts +58 -0
  756. package/packages/typescript/src/network/ssrf.d.ts.map +1 -0
  757. package/packages/typescript/src/network/ssrf.js +252 -0
  758. package/packages/typescript/src/optimization/ab-analysis.d.ts +3 -0
  759. package/packages/typescript/src/optimization/ab-analysis.d.ts.map +1 -0
  760. package/packages/typescript/src/optimization/ab-analysis.js +8 -0
  761. package/packages/typescript/src/optimization-root-dir.d.ts +8 -0
  762. package/packages/typescript/src/optimization-root-dir.d.ts.map +1 -0
  763. package/packages/typescript/src/optimization-root-dir.js +14 -0
  764. package/packages/typescript/src/plugin-lifecycle.d.ts +16 -0
  765. package/packages/typescript/src/plugin-lifecycle.d.ts.map +1 -0
  766. package/packages/typescript/src/plugin-lifecycle.js +590 -0
  767. package/packages/typescript/src/plugin.d.ts +13 -0
  768. package/packages/typescript/src/plugin.d.ts.map +1 -0
  769. package/packages/typescript/src/plugin.js +341 -0
  770. package/packages/typescript/src/plugins/index.d.ts +9 -0
  771. package/packages/typescript/src/plugins/index.d.ts.map +1 -0
  772. package/packages/typescript/src/plugins/index.js +8 -0
  773. package/packages/typescript/src/plugins/native-features.d.ts +14 -0
  774. package/packages/typescript/src/plugins/native-features.d.ts.map +1 -0
  775. package/packages/typescript/src/plugins/native-features.js +59 -0
  776. package/packages/typescript/src/prompts.d.ts +88 -0
  777. package/packages/typescript/src/prompts.d.ts.map +1 -0
  778. package/packages/typescript/src/prompts.js +1140 -0
  779. package/packages/typescript/src/providers/onboarding-progress.d.ts +19 -0
  780. package/packages/typescript/src/providers/onboarding-progress.d.ts.map +1 -0
  781. package/packages/typescript/src/providers/onboarding-progress.js +268 -0
  782. package/packages/typescript/src/providers/skill-eligibility.d.ts +28 -0
  783. package/packages/typescript/src/providers/skill-eligibility.d.ts.map +1 -0
  784. package/packages/typescript/src/providers/skill-eligibility.js +179 -0
  785. package/packages/typescript/src/provisioning.d.ts +54 -0
  786. package/packages/typescript/src/provisioning.d.ts.map +1 -0
  787. package/packages/typescript/src/provisioning.js +209 -0
  788. package/packages/typescript/src/roles.d.ts +70 -0
  789. package/packages/typescript/src/roles.d.ts.map +1 -0
  790. package/packages/typescript/src/roles.js +544 -0
  791. package/packages/typescript/src/runtime-composition.d.ts +129 -0
  792. package/packages/typescript/src/runtime-composition.d.ts.map +1 -0
  793. package/packages/typescript/src/runtime-composition.js +335 -0
  794. package/packages/typescript/src/runtime.d.ts +924 -0
  795. package/packages/typescript/src/runtime.d.ts.map +1 -0
  796. package/packages/typescript/src/runtime.js +6013 -0
  797. package/packages/typescript/src/schemas/agent.d.ts +7 -0
  798. package/packages/typescript/src/schemas/agent.d.ts.map +1 -0
  799. package/packages/typescript/src/schemas/agent.js +112 -0
  800. package/packages/typescript/src/schemas/cache.d.ts +7 -0
  801. package/packages/typescript/src/schemas/cache.d.ts.map +1 -0
  802. package/packages/typescript/src/schemas/cache.js +55 -0
  803. package/packages/typescript/src/schemas/channel-participant.d.ts +7 -0
  804. package/packages/typescript/src/schemas/channel-participant.d.ts.map +1 -0
  805. package/packages/typescript/src/schemas/channel-participant.js +49 -0
  806. package/packages/typescript/src/schemas/channel.d.ts +7 -0
  807. package/packages/typescript/src/schemas/channel.d.ts.map +1 -0
  808. package/packages/typescript/src/schemas/channel.js +94 -0
  809. package/packages/typescript/src/schemas/character.d.ts +445 -0
  810. package/packages/typescript/src/schemas/character.d.ts.map +1 -0
  811. package/packages/typescript/src/schemas/character.js +309 -0
  812. package/packages/typescript/src/schemas/component.d.ts +7 -0
  813. package/packages/typescript/src/schemas/component.d.ts.map +1 -0
  814. package/packages/typescript/src/schemas/component.js +156 -0
  815. package/packages/typescript/src/schemas/embedding.d.ts +7 -0
  816. package/packages/typescript/src/schemas/embedding.d.ts.map +1 -0
  817. package/packages/typescript/src/schemas/embedding.js +89 -0
  818. package/packages/typescript/src/schemas/entity-identity.d.ts +29 -0
  819. package/packages/typescript/src/schemas/entity-identity.d.ts.map +1 -0
  820. package/packages/typescript/src/schemas/entity-identity.js +334 -0
  821. package/packages/typescript/src/schemas/entity.d.ts +7 -0
  822. package/packages/typescript/src/schemas/entity.d.ts.map +1 -0
  823. package/packages/typescript/src/schemas/entity.js +69 -0
  824. package/packages/typescript/src/schemas/index.d.ts +77 -0
  825. package/packages/typescript/src/schemas/index.d.ts.map +1 -0
  826. package/packages/typescript/src/schemas/index.js +75 -0
  827. package/packages/typescript/src/schemas/log.d.ts +6 -0
  828. package/packages/typescript/src/schemas/log.d.ts.map +1 -0
  829. package/packages/typescript/src/schemas/log.js +93 -0
  830. package/packages/typescript/src/schemas/memory.d.ts +7 -0
  831. package/packages/typescript/src/schemas/memory.d.ts.map +1 -0
  832. package/packages/typescript/src/schemas/memory.js +167 -0
  833. package/packages/typescript/src/schemas/message-server-agent.d.ts +7 -0
  834. package/packages/typescript/src/schemas/message-server-agent.d.ts.map +1 -0
  835. package/packages/typescript/src/schemas/message-server-agent.js +58 -0
  836. package/packages/typescript/src/schemas/message-server.d.ts +6 -0
  837. package/packages/typescript/src/schemas/message-server.d.ts.map +1 -0
  838. package/packages/typescript/src/schemas/message-server.js +62 -0
  839. package/packages/typescript/src/schemas/message.d.ts +7 -0
  840. package/packages/typescript/src/schemas/message.d.ts.map +1 -0
  841. package/packages/typescript/src/schemas/message.js +106 -0
  842. package/packages/typescript/src/schemas/pairing-allowlist.d.ts +7 -0
  843. package/packages/typescript/src/schemas/pairing-allowlist.d.ts.map +1 -0
  844. package/packages/typescript/src/schemas/pairing-allowlist.js +76 -0
  845. package/packages/typescript/src/schemas/pairing-request.d.ts +7 -0
  846. package/packages/typescript/src/schemas/pairing-request.d.ts.map +1 -0
  847. package/packages/typescript/src/schemas/pairing-request.js +96 -0
  848. package/packages/typescript/src/schemas/participant.d.ts +6 -0
  849. package/packages/typescript/src/schemas/participant.d.ts.map +1 -0
  850. package/packages/typescript/src/schemas/participant.js +91 -0
  851. package/packages/typescript/src/schemas/relationship.d.ts +7 -0
  852. package/packages/typescript/src/schemas/relationship.d.ts.map +1 -0
  853. package/packages/typescript/src/schemas/relationship.js +102 -0
  854. package/packages/typescript/src/schemas/room.d.ts +6 -0
  855. package/packages/typescript/src/schemas/room.d.ts.map +1 -0
  856. package/packages/typescript/src/schemas/room.js +86 -0
  857. package/packages/typescript/src/schemas/server.d.ts +7 -0
  858. package/packages/typescript/src/schemas/server.d.ts.map +1 -0
  859. package/packages/typescript/src/schemas/server.js +33 -0
  860. package/packages/typescript/src/schemas/task.d.ts +6 -0
  861. package/packages/typescript/src/schemas/task.d.ts.map +1 -0
  862. package/packages/typescript/src/schemas/task.js +95 -0
  863. package/packages/typescript/src/schemas/world.d.ts +6 -0
  864. package/packages/typescript/src/schemas/world.d.ts.map +1 -0
  865. package/packages/typescript/src/schemas/world.js +64 -0
  866. package/packages/typescript/src/search.d.ts +359 -0
  867. package/packages/typescript/src/search.d.ts.map +1 -0
  868. package/packages/typescript/src/search.js +1580 -0
  869. package/packages/typescript/src/secrets.d.ts +6 -0
  870. package/packages/typescript/src/secrets.d.ts.map +1 -0
  871. package/packages/typescript/src/secrets.js +28 -0
  872. package/packages/typescript/src/security/external-content.d.ts +96 -0
  873. package/packages/typescript/src/security/external-content.d.ts.map +1 -0
  874. package/packages/typescript/src/security/external-content.js +252 -0
  875. package/packages/typescript/src/security/index.d.ts +12 -0
  876. package/packages/typescript/src/security/index.d.ts.map +1 -0
  877. package/packages/typescript/src/security/index.js +13 -0
  878. package/packages/typescript/src/security/redact.d.ts +111 -0
  879. package/packages/typescript/src/security/redact.d.ts.map +1 -0
  880. package/packages/typescript/src/security/redact.js +254 -0
  881. package/packages/typescript/src/services/agentEvent.d.ts +297 -0
  882. package/packages/typescript/src/services/agentEvent.d.ts.map +1 -0
  883. package/packages/typescript/src/services/agentEvent.js +422 -0
  884. package/packages/typescript/src/services/approval.d.ts +169 -0
  885. package/packages/typescript/src/services/approval.d.ts.map +1 -0
  886. package/packages/typescript/src/services/approval.js +399 -0
  887. package/packages/typescript/src/services/embedding.d.ts +29 -0
  888. package/packages/typescript/src/services/embedding.d.ts.map +1 -0
  889. package/packages/typescript/src/services/embedding.js +211 -0
  890. package/packages/typescript/src/services/followUp.d.ts +48 -0
  891. package/packages/typescript/src/services/followUp.d.ts.map +1 -0
  892. package/packages/typescript/src/services/followUp.js +333 -0
  893. package/packages/typescript/src/services/hook.d.ts +85 -0
  894. package/packages/typescript/src/services/hook.d.ts.map +1 -0
  895. package/packages/typescript/src/services/hook.js +396 -0
  896. package/packages/typescript/src/services/message.d.ts +130 -0
  897. package/packages/typescript/src/services/message.d.ts.map +1 -0
  898. package/packages/typescript/src/services/message.js +4899 -0
  899. package/packages/typescript/src/services/onboarding-cli.d.ts +240 -0
  900. package/packages/typescript/src/services/onboarding-cli.d.ts.map +1 -0
  901. package/packages/typescript/src/services/onboarding-cli.js +688 -0
  902. package/packages/typescript/src/services/onboarding-rpc.d.ts +225 -0
  903. package/packages/typescript/src/services/onboarding-rpc.d.ts.map +1 -0
  904. package/packages/typescript/src/services/onboarding-rpc.js +318 -0
  905. package/packages/typescript/src/services/onboarding-state.d.ts +155 -0
  906. package/packages/typescript/src/services/onboarding-state.d.ts.map +1 -0
  907. package/packages/typescript/src/services/onboarding-state.js +706 -0
  908. package/packages/typescript/src/services/optimized-prompt-resolver.d.ts +23 -0
  909. package/packages/typescript/src/services/optimized-prompt-resolver.d.ts.map +1 -0
  910. package/packages/typescript/src/services/optimized-prompt-resolver.js +49 -0
  911. package/packages/typescript/src/services/optimized-prompt.d.ts +116 -0
  912. package/packages/typescript/src/services/optimized-prompt.d.ts.map +1 -0
  913. package/packages/typescript/src/services/optimized-prompt.js +254 -0
  914. package/packages/typescript/src/services/pairing-integration.d.ts +96 -0
  915. package/packages/typescript/src/services/pairing-integration.d.ts.map +1 -0
  916. package/packages/typescript/src/services/pairing-integration.js +145 -0
  917. package/packages/typescript/src/services/pairing-migration.d.ts +105 -0
  918. package/packages/typescript/src/services/pairing-migration.d.ts.map +1 -0
  919. package/packages/typescript/src/services/pairing-migration.js +283 -0
  920. package/packages/typescript/src/services/pairing.d.ts +80 -0
  921. package/packages/typescript/src/services/pairing.d.ts.map +1 -0
  922. package/packages/typescript/src/services/pairing.js +253 -0
  923. package/packages/typescript/src/services/plugin-hooks.d.ts +112 -0
  924. package/packages/typescript/src/services/plugin-hooks.d.ts.map +1 -0
  925. package/packages/typescript/src/services/plugin-hooks.js +163 -0
  926. package/packages/typescript/src/services/relationships.d.ts +350 -0
  927. package/packages/typescript/src/services/relationships.d.ts.map +1 -0
  928. package/packages/typescript/src/services/relationships.js +1649 -0
  929. package/packages/typescript/src/services/task-scheduler.d.ts +28 -0
  930. package/packages/typescript/src/services/task-scheduler.d.ts.map +1 -0
  931. package/packages/typescript/src/services/task-scheduler.js +89 -0
  932. package/packages/typescript/src/services/task.d.ts +133 -0
  933. package/packages/typescript/src/services/task.d.ts.map +1 -0
  934. package/packages/typescript/src/services/task.js +559 -0
  935. package/packages/typescript/src/services/tool-policy.d.ts +186 -0
  936. package/packages/typescript/src/services/tool-policy.d.ts.map +1 -0
  937. package/packages/typescript/src/services/tool-policy.js +332 -0
  938. package/packages/typescript/src/services/trajectories.d.ts +34 -0
  939. package/packages/typescript/src/services/trajectories.d.ts.map +1 -0
  940. package/packages/typescript/src/services/trajectories.js +1 -0
  941. package/packages/typescript/src/services.d.ts +61 -0
  942. package/packages/typescript/src/services.d.ts.map +1 -0
  943. package/packages/typescript/src/services.js +99 -0
  944. package/packages/typescript/src/sessions/index.d.ts +17 -0
  945. package/packages/typescript/src/sessions/index.d.ts.map +1 -0
  946. package/packages/typescript/src/sessions/index.js +29 -0
  947. package/packages/typescript/src/sessions/provider.d.ts +71 -0
  948. package/packages/typescript/src/sessions/provider.d.ts.map +1 -0
  949. package/packages/typescript/src/sessions/provider.js +243 -0
  950. package/packages/typescript/src/sessions/session-key.d.ts +201 -0
  951. package/packages/typescript/src/sessions/session-key.d.ts.map +1 -0
  952. package/packages/typescript/src/sessions/session-key.js +396 -0
  953. package/packages/typescript/src/sessions/types.d.ts +197 -0
  954. package/packages/typescript/src/sessions/types.d.ts.map +1 -0
  955. package/packages/typescript/src/sessions/types.js +68 -0
  956. package/packages/typescript/src/settings.d.ts +99 -0
  957. package/packages/typescript/src/settings.d.ts.map +1 -0
  958. package/packages/typescript/src/settings.js +409 -0
  959. package/packages/typescript/src/should-respond.d.ts +2 -0
  960. package/packages/typescript/src/should-respond.d.ts.map +1 -0
  961. package/packages/typescript/src/should-respond.js +16 -0
  962. package/packages/typescript/src/streaming-context.d.ts +88 -0
  963. package/packages/typescript/src/streaming-context.d.ts.map +1 -0
  964. package/packages/typescript/src/streaming-context.js +160 -0
  965. package/packages/typescript/src/trajectory-context.d.ts +39 -0
  966. package/packages/typescript/src/trajectory-context.d.ts.map +1 -0
  967. package/packages/typescript/src/trajectory-context.js +85 -0
  968. package/packages/typescript/src/trajectory-utils.d.ts +73 -0
  969. package/packages/typescript/src/trajectory-utils.d.ts.map +1 -0
  970. package/packages/typescript/src/trajectory-utils.js +124 -0
  971. package/packages/typescript/src/types/agent.d.ts +62 -0
  972. package/packages/typescript/src/types/agent.d.ts.map +1 -0
  973. package/packages/typescript/src/types/agent.js +5 -0
  974. package/packages/typescript/src/types/agentEvent.d.ts +258 -0
  975. package/packages/typescript/src/types/agentEvent.d.ts.map +1 -0
  976. package/packages/typescript/src/types/agentEvent.js +11 -0
  977. package/packages/typescript/src/types/channel-config.d.ts +167 -0
  978. package/packages/typescript/src/types/channel-config.d.ts.map +1 -0
  979. package/packages/typescript/src/types/channel-config.js +7 -0
  980. package/packages/typescript/src/types/components.d.ts +358 -0
  981. package/packages/typescript/src/types/components.d.ts.map +1 -0
  982. package/packages/typescript/src/types/components.js +1 -0
  983. package/packages/typescript/src/types/database.d.ts +1079 -0
  984. package/packages/typescript/src/types/database.d.ts.map +1 -0
  985. package/packages/typescript/src/types/database.js +9 -0
  986. package/packages/typescript/src/types/environment.d.ts +73 -0
  987. package/packages/typescript/src/types/environment.d.ts.map +1 -0
  988. package/packages/typescript/src/types/environment.js +16 -0
  989. package/packages/typescript/src/types/events.d.ts +403 -0
  990. package/packages/typescript/src/types/events.d.ts.map +1 -0
  991. package/packages/typescript/src/types/events.js +85 -0
  992. package/packages/typescript/src/types/generated/eliza/v1/agent_pb.d.ts +400 -0
  993. package/packages/typescript/src/types/generated/eliza/v1/agent_pb.d.ts.map +1 -0
  994. package/packages/typescript/src/types/generated/eliza/v1/agent_pb.js +72 -0
  995. package/packages/typescript/src/types/generated/eliza/v1/components_pb.d.ts +364 -0
  996. package/packages/typescript/src/types/generated/eliza/v1/components_pb.d.ts.map +1 -0
  997. package/packages/typescript/src/types/generated/eliza/v1/components_pb.js +68 -0
  998. package/packages/typescript/src/types/generated/eliza/v1/database_pb.d.ts +694 -0
  999. package/packages/typescript/src/types/generated/eliza/v1/database_pb.d.ts.map +1 -0
  1000. package/packages/typescript/src/types/generated/eliza/v1/database_pb.js +172 -0
  1001. package/packages/typescript/src/types/generated/eliza/v1/environment_pb.d.ts +299 -0
  1002. package/packages/typescript/src/types/generated/eliza/v1/environment_pb.d.ts.map +1 -0
  1003. package/packages/typescript/src/types/generated/eliza/v1/environment_pb.js +52 -0
  1004. package/packages/typescript/src/types/generated/eliza/v1/events_pb.d.ts +746 -0
  1005. package/packages/typescript/src/types/generated/eliza/v1/events_pb.d.ts.map +1 -0
  1006. package/packages/typescript/src/types/generated/eliza/v1/events_pb.js +357 -0
  1007. package/packages/typescript/src/types/generated/eliza/v1/ipc_pb.d.ts +799 -0
  1008. package/packages/typescript/src/types/generated/eliza/v1/ipc_pb.d.ts.map +1 -0
  1009. package/packages/typescript/src/types/generated/eliza/v1/ipc_pb.js +172 -0
  1010. package/packages/typescript/src/types/generated/eliza/v1/knowledge_pb.d.ts +63 -0
  1011. package/packages/typescript/src/types/generated/eliza/v1/knowledge_pb.d.ts.map +1 -0
  1012. package/packages/typescript/src/types/generated/eliza/v1/knowledge_pb.js +18 -0
  1013. package/packages/typescript/src/types/generated/eliza/v1/memory_pb.d.ts +290 -0
  1014. package/packages/typescript/src/types/generated/eliza/v1/memory_pb.d.ts.map +1 -0
  1015. package/packages/typescript/src/types/generated/eliza/v1/memory_pb.js +53 -0
  1016. package/packages/typescript/src/types/generated/eliza/v1/message_service_pb.d.ts +160 -0
  1017. package/packages/typescript/src/types/generated/eliza/v1/message_service_pb.d.ts.map +1 -0
  1018. package/packages/typescript/src/types/generated/eliza/v1/message_service_pb.js +88 -0
  1019. package/packages/typescript/src/types/generated/eliza/v1/messaging_pb.d.ts +214 -0
  1020. package/packages/typescript/src/types/generated/eliza/v1/messaging_pb.d.ts.map +1 -0
  1021. package/packages/typescript/src/types/generated/eliza/v1/messaging_pb.js +78 -0
  1022. package/packages/typescript/src/types/generated/eliza/v1/model_pb.d.ts +653 -0
  1023. package/packages/typescript/src/types/generated/eliza/v1/model_pb.d.ts.map +1 -0
  1024. package/packages/typescript/src/types/generated/eliza/v1/model_pb.js +237 -0
  1025. package/packages/typescript/src/types/generated/eliza/v1/payment_pb.d.ts +147 -0
  1026. package/packages/typescript/src/types/generated/eliza/v1/payment_pb.d.ts.map +1 -0
  1027. package/packages/typescript/src/types/generated/eliza/v1/payment_pb.js +27 -0
  1028. package/packages/typescript/src/types/generated/eliza/v1/plugin_pb.d.ts +286 -0
  1029. package/packages/typescript/src/types/generated/eliza/v1/plugin_pb.d.ts.map +1 -0
  1030. package/packages/typescript/src/types/generated/eliza/v1/plugin_pb.js +86 -0
  1031. package/packages/typescript/src/types/generated/eliza/v1/primitives_pb.d.ts +263 -0
  1032. package/packages/typescript/src/types/generated/eliza/v1/primitives_pb.d.ts.map +1 -0
  1033. package/packages/typescript/src/types/generated/eliza/v1/primitives_pb.js +38 -0
  1034. package/packages/typescript/src/types/generated/eliza/v1/prompts_pb.d.ts +137 -0
  1035. package/packages/typescript/src/types/generated/eliza/v1/prompts_pb.d.ts.map +1 -0
  1036. package/packages/typescript/src/types/generated/eliza/v1/prompts_pb.js +27 -0
  1037. package/packages/typescript/src/types/generated/eliza/v1/service_interfaces_pb.d.ts +2687 -0
  1038. package/packages/typescript/src/types/generated/eliza/v1/service_interfaces_pb.d.ts.map +1 -0
  1039. package/packages/typescript/src/types/generated/eliza/v1/service_interfaces_pb.js +392 -0
  1040. package/packages/typescript/src/types/generated/eliza/v1/service_pb.d.ts +144 -0
  1041. package/packages/typescript/src/types/generated/eliza/v1/service_pb.d.ts.map +1 -0
  1042. package/packages/typescript/src/types/generated/eliza/v1/service_pb.js +99 -0
  1043. package/packages/typescript/src/types/generated/eliza/v1/settings_pb.d.ts +146 -0
  1044. package/packages/typescript/src/types/generated/eliza/v1/settings_pb.d.ts.map +1 -0
  1045. package/packages/typescript/src/types/generated/eliza/v1/settings_pb.js +32 -0
  1046. package/packages/typescript/src/types/generated/eliza/v1/state_pb.d.ts +259 -0
  1047. package/packages/typescript/src/types/generated/eliza/v1/state_pb.d.ts.map +1 -0
  1048. package/packages/typescript/src/types/generated/eliza/v1/state_pb.js +44 -0
  1049. package/packages/typescript/src/types/generated/eliza/v1/task_pb.d.ts +120 -0
  1050. package/packages/typescript/src/types/generated/eliza/v1/task_pb.d.ts.map +1 -0
  1051. package/packages/typescript/src/types/generated/eliza/v1/task_pb.js +53 -0
  1052. package/packages/typescript/src/types/generated/eliza/v1/tee_pb.d.ts +205 -0
  1053. package/packages/typescript/src/types/generated/eliza/v1/tee_pb.d.ts.map +1 -0
  1054. package/packages/typescript/src/types/generated/eliza/v1/tee_pb.js +89 -0
  1055. package/packages/typescript/src/types/generated/eliza/v1/testing_pb.d.ts +47 -0
  1056. package/packages/typescript/src/types/generated/eliza/v1/testing_pb.d.ts.map +1 -0
  1057. package/packages/typescript/src/types/generated/eliza/v1/testing_pb.js +16 -0
  1058. package/packages/typescript/src/types/hook.d.ts +338 -0
  1059. package/packages/typescript/src/types/hook.d.ts.map +1 -0
  1060. package/packages/typescript/src/types/hook.js +73 -0
  1061. package/packages/typescript/src/types/index.d.ts +42 -0
  1062. package/packages/typescript/src/types/index.d.ts.map +1 -0
  1063. package/packages/typescript/src/types/index.js +50 -0
  1064. package/packages/typescript/src/types/knowledge.d.ts +49 -0
  1065. package/packages/typescript/src/types/knowledge.d.ts.map +1 -0
  1066. package/packages/typescript/src/types/knowledge.js +1 -0
  1067. package/packages/typescript/src/types/memory-storage.d.ts +28 -0
  1068. package/packages/typescript/src/types/memory-storage.d.ts.map +1 -0
  1069. package/packages/typescript/src/types/memory-storage.js +13 -0
  1070. package/packages/typescript/src/types/memory.d.ts +438 -0
  1071. package/packages/typescript/src/types/memory.d.ts.map +1 -0
  1072. package/packages/typescript/src/types/memory.js +16 -0
  1073. package/packages/typescript/src/types/message-service.d.ts +178 -0
  1074. package/packages/typescript/src/types/message-service.d.ts.map +1 -0
  1075. package/packages/typescript/src/types/message-service.js +1 -0
  1076. package/packages/typescript/src/types/messaging.d.ts +358 -0
  1077. package/packages/typescript/src/types/messaging.d.ts.map +1 -0
  1078. package/packages/typescript/src/types/messaging.js +27 -0
  1079. package/packages/typescript/src/types/model.d.ts +697 -0
  1080. package/packages/typescript/src/types/model.d.ts.map +1 -0
  1081. package/packages/typescript/src/types/model.js +247 -0
  1082. package/packages/typescript/src/types/onboarding.d.ts +319 -0
  1083. package/packages/typescript/src/types/onboarding.d.ts.map +1 -0
  1084. package/packages/typescript/src/types/onboarding.js +97 -0
  1085. package/packages/typescript/src/types/pairing.d.ts +124 -0
  1086. package/packages/typescript/src/types/pairing.d.ts.map +1 -0
  1087. package/packages/typescript/src/types/pairing.js +32 -0
  1088. package/packages/typescript/src/types/payment.d.ts +45 -0
  1089. package/packages/typescript/src/types/payment.d.ts.map +1 -0
  1090. package/packages/typescript/src/types/payment.js +1 -0
  1091. package/packages/typescript/src/types/pipeline-hooks.d.ts +234 -0
  1092. package/packages/typescript/src/types/pipeline-hooks.d.ts.map +1 -0
  1093. package/packages/typescript/src/types/pipeline-hooks.js +111 -0
  1094. package/packages/typescript/src/types/plugin-manifest.d.ts +381 -0
  1095. package/packages/typescript/src/types/plugin-manifest.d.ts.map +1 -0
  1096. package/packages/typescript/src/types/plugin-manifest.js +10 -0
  1097. package/packages/typescript/src/types/plugin-store.d.ts +173 -0
  1098. package/packages/typescript/src/types/plugin-store.d.ts.map +1 -0
  1099. package/packages/typescript/src/types/plugin-store.js +1 -0
  1100. package/packages/typescript/src/types/plugin.d.ts +336 -0
  1101. package/packages/typescript/src/types/plugin.d.ts.map +1 -0
  1102. package/packages/typescript/src/types/plugin.js +1 -0
  1103. package/packages/typescript/src/types/primitives.d.ts +176 -0
  1104. package/packages/typescript/src/types/primitives.d.ts.map +1 -0
  1105. package/packages/typescript/src/types/primitives.js +41 -0
  1106. package/packages/typescript/src/types/prompt-batcher.d.ts +126 -0
  1107. package/packages/typescript/src/types/prompt-batcher.d.ts.map +1 -0
  1108. package/packages/typescript/src/types/prompt-batcher.js +6 -0
  1109. package/packages/typescript/src/types/prompt-optimization-hooks.d.ts +41 -0
  1110. package/packages/typescript/src/types/prompt-optimization-hooks.d.ts.map +1 -0
  1111. package/packages/typescript/src/types/prompt-optimization-hooks.js +1 -0
  1112. package/packages/typescript/src/types/prompt-optimization-score-card.d.ts +22 -0
  1113. package/packages/typescript/src/types/prompt-optimization-score-card.d.ts.map +1 -0
  1114. package/packages/typescript/src/types/prompt-optimization-score-card.js +72 -0
  1115. package/packages/typescript/src/types/prompt-optimization-trace.d.ts +53 -0
  1116. package/packages/typescript/src/types/prompt-optimization-trace.d.ts.map +1 -0
  1117. package/packages/typescript/src/types/prompt-optimization-trace.js +19 -0
  1118. package/packages/typescript/src/types/prompts.d.ts +39 -0
  1119. package/packages/typescript/src/types/prompts.d.ts.map +1 -0
  1120. package/packages/typescript/src/types/prompts.js +7 -0
  1121. package/packages/typescript/src/types/proto.d.ts +60 -0
  1122. package/packages/typescript/src/types/proto.d.ts.map +1 -0
  1123. package/packages/typescript/src/types/proto.js +53 -0
  1124. package/packages/typescript/src/types/runtime.d.ts +445 -0
  1125. package/packages/typescript/src/types/runtime.d.ts.map +1 -0
  1126. package/packages/typescript/src/types/runtime.js +1 -0
  1127. package/packages/typescript/src/types/schema-builder.d.ts +43 -0
  1128. package/packages/typescript/src/types/schema-builder.d.ts.map +1 -0
  1129. package/packages/typescript/src/types/schema-builder.js +16 -0
  1130. package/packages/typescript/src/types/schema.d.ts +99 -0
  1131. package/packages/typescript/src/types/schema.d.ts.map +1 -0
  1132. package/packages/typescript/src/types/schema.js +11 -0
  1133. package/packages/typescript/src/types/service-interfaces.d.ts +1200 -0
  1134. package/packages/typescript/src/types/service-interfaces.d.ts.map +1 -0
  1135. package/packages/typescript/src/types/service-interfaces.js +81 -0
  1136. package/packages/typescript/src/types/service.d.ts +175 -0
  1137. package/packages/typescript/src/types/service.d.ts.map +1 -0
  1138. package/packages/typescript/src/types/service.js +79 -0
  1139. package/packages/typescript/src/types/settings.d.ts +36 -0
  1140. package/packages/typescript/src/types/settings.d.ts.map +1 -0
  1141. package/packages/typescript/src/types/settings.js +1 -0
  1142. package/packages/typescript/src/types/state.d.ts +251 -0
  1143. package/packages/typescript/src/types/state.d.ts.map +1 -0
  1144. package/packages/typescript/src/types/state.js +1 -0
  1145. package/packages/typescript/src/types/streaming.d.ts +93 -0
  1146. package/packages/typescript/src/types/streaming.d.ts.map +1 -0
  1147. package/packages/typescript/src/types/streaming.js +21 -0
  1148. package/packages/typescript/src/types/task.d.ts +122 -0
  1149. package/packages/typescript/src/types/task.d.ts.map +1 -0
  1150. package/packages/typescript/src/types/task.js +1 -0
  1151. package/packages/typescript/src/types/tee.d.ts +3 -0
  1152. package/packages/typescript/src/types/tee.d.ts.map +1 -0
  1153. package/packages/typescript/src/types/tee.js +1 -0
  1154. package/packages/typescript/src/types/testing.d.ts +15 -0
  1155. package/packages/typescript/src/types/testing.d.ts.map +1 -0
  1156. package/packages/typescript/src/types/testing.js +1 -0
  1157. package/packages/typescript/src/types/tools.d.ts +166 -0
  1158. package/packages/typescript/src/types/tools.d.ts.map +1 -0
  1159. package/packages/typescript/src/types/tools.js +380 -0
  1160. package/packages/typescript/src/types/trigger.d.ts +42 -0
  1161. package/packages/typescript/src/types/trigger.d.ts.map +1 -0
  1162. package/packages/typescript/src/types/trigger.js +1 -0
  1163. package/packages/typescript/src/utils/batch-queue/batch-processor.d.ts +52 -0
  1164. package/packages/typescript/src/utils/batch-queue/batch-processor.d.ts.map +1 -0
  1165. package/packages/typescript/src/utils/batch-queue/batch-processor.js +126 -0
  1166. package/packages/typescript/src/utils/batch-queue/index.d.ts +97 -0
  1167. package/packages/typescript/src/utils/batch-queue/index.d.ts.map +1 -0
  1168. package/packages/typescript/src/utils/batch-queue/index.js +175 -0
  1169. package/packages/typescript/src/utils/batch-queue/priority-queue.d.ts +53 -0
  1170. package/packages/typescript/src/utils/batch-queue/priority-queue.d.ts.map +1 -0
  1171. package/packages/typescript/src/utils/batch-queue/priority-queue.js +128 -0
  1172. package/packages/typescript/src/utils/batch-queue/semaphore.d.ts +18 -0
  1173. package/packages/typescript/src/utils/batch-queue/semaphore.d.ts.map +1 -0
  1174. package/packages/typescript/src/utils/batch-queue/semaphore.js +34 -0
  1175. package/packages/typescript/src/utils/batch-queue/task-drain.d.ts +57 -0
  1176. package/packages/typescript/src/utils/batch-queue/task-drain.d.ts.map +1 -0
  1177. package/packages/typescript/src/utils/batch-queue/task-drain.js +150 -0
  1178. package/packages/typescript/src/utils/batch-queue.d.ts +20 -0
  1179. package/packages/typescript/src/utils/batch-queue.d.ts.map +1 -0
  1180. package/packages/typescript/src/utils/batch-queue.js +19 -0
  1181. package/packages/typescript/src/utils/boolean.d.ts +50 -0
  1182. package/packages/typescript/src/utils/boolean.d.ts.map +1 -0
  1183. package/packages/typescript/src/utils/boolean.js +73 -0
  1184. package/packages/typescript/src/utils/buffer.d.ts +107 -0
  1185. package/packages/typescript/src/utils/buffer.d.ts.map +1 -0
  1186. package/packages/typescript/src/utils/buffer.js +229 -0
  1187. package/packages/typescript/src/utils/channel-utils.d.ts +274 -0
  1188. package/packages/typescript/src/utils/channel-utils.d.ts.map +1 -0
  1189. package/packages/typescript/src/utils/channel-utils.js +337 -0
  1190. package/packages/typescript/src/utils/context-catalog.d.ts +6 -0
  1191. package/packages/typescript/src/utils/context-catalog.d.ts.map +1 -0
  1192. package/packages/typescript/src/utils/context-catalog.js +144 -0
  1193. package/packages/typescript/src/utils/context-routing.d.ts +25 -0
  1194. package/packages/typescript/src/utils/context-routing.d.ts.map +1 -0
  1195. package/packages/typescript/src/utils/context-routing.js +164 -0
  1196. package/packages/typescript/src/utils/crypto-compat.d.ts +92 -0
  1197. package/packages/typescript/src/utils/crypto-compat.d.ts.map +1 -0
  1198. package/packages/typescript/src/utils/crypto-compat.js +373 -0
  1199. package/packages/typescript/src/utils/deterministic.d.ts +9 -0
  1200. package/packages/typescript/src/utils/deterministic.d.ts.map +1 -0
  1201. package/packages/typescript/src/utils/deterministic.js +70 -0
  1202. package/packages/typescript/src/utils/environment.d.ts +125 -0
  1203. package/packages/typescript/src/utils/environment.d.ts.map +1 -0
  1204. package/packages/typescript/src/utils/environment.js +290 -0
  1205. package/packages/typescript/src/utils/example-names.d.ts +3 -0
  1206. package/packages/typescript/src/utils/example-names.d.ts.map +1 -0
  1207. package/packages/typescript/src/utils/example-names.js +30 -0
  1208. package/packages/typescript/src/utils/json-llm.d.ts +17 -0
  1209. package/packages/typescript/src/utils/json-llm.d.ts.map +1 -0
  1210. package/packages/typescript/src/utils/json-llm.js +32 -0
  1211. package/packages/typescript/src/utils/model-errors.d.ts +3 -0
  1212. package/packages/typescript/src/utils/model-errors.d.ts.map +1 -0
  1213. package/packages/typescript/src/utils/model-errors.js +23 -0
  1214. package/packages/typescript/src/utils/node.d.ts +8 -0
  1215. package/packages/typescript/src/utils/node.d.ts.map +1 -0
  1216. package/packages/typescript/src/utils/node.js +12 -0
  1217. package/packages/typescript/src/utils/paths.d.ts +97 -0
  1218. package/packages/typescript/src/utils/paths.d.ts.map +1 -0
  1219. package/packages/typescript/src/utils/paths.js +204 -0
  1220. package/packages/typescript/src/utils/prompt-batcher/batcher.d.ts +163 -0
  1221. package/packages/typescript/src/utils/prompt-batcher/batcher.d.ts.map +1 -0
  1222. package/packages/typescript/src/utils/prompt-batcher/batcher.js +896 -0
  1223. package/packages/typescript/src/utils/prompt-batcher/dispatcher.d.ts +15 -0
  1224. package/packages/typescript/src/utils/prompt-batcher/dispatcher.d.ts.map +1 -0
  1225. package/packages/typescript/src/utils/prompt-batcher/dispatcher.js +230 -0
  1226. package/packages/typescript/src/utils/prompt-batcher/shared.d.ts +66 -0
  1227. package/packages/typescript/src/utils/prompt-batcher/shared.d.ts.map +1 -0
  1228. package/packages/typescript/src/utils/prompt-batcher/shared.js +101 -0
  1229. package/packages/typescript/src/utils/prompt-batcher.d.ts +5 -0
  1230. package/packages/typescript/src/utils/prompt-batcher.d.ts.map +1 -0
  1231. package/packages/typescript/src/utils/prompt-batcher.js +4 -0
  1232. package/packages/typescript/src/utils/retry.d.ts +128 -0
  1233. package/packages/typescript/src/utils/retry.d.ts.map +1 -0
  1234. package/packages/typescript/src/utils/retry.js +190 -0
  1235. package/packages/typescript/src/utils/server-health.d.ts +35 -0
  1236. package/packages/typescript/src/utils/server-health.d.ts.map +1 -0
  1237. package/packages/typescript/src/utils/server-health.js +76 -0
  1238. package/packages/typescript/src/utils/slice-to-fit-budget.d.ts +12 -0
  1239. package/packages/typescript/src/utils/slice-to-fit-budget.d.ts.map +1 -0
  1240. package/packages/typescript/src/utils/slice-to-fit-budget.js +36 -0
  1241. package/packages/typescript/src/utils/state-dir.d.ts +19 -0
  1242. package/packages/typescript/src/utils/state-dir.d.ts.map +1 -0
  1243. package/packages/typescript/src/utils/state-dir.js +24 -0
  1244. package/packages/typescript/src/utils/streaming.d.ts +275 -0
  1245. package/packages/typescript/src/utils/streaming.d.ts.map +1 -0
  1246. package/packages/typescript/src/utils/streaming.js +774 -0
  1247. package/packages/typescript/src/utils/text-normalize.d.ts +23 -0
  1248. package/packages/typescript/src/utils/text-normalize.d.ts.map +1 -0
  1249. package/packages/typescript/src/utils/text-normalize.js +42 -0
  1250. package/packages/typescript/src/utils/text-splitting.d.ts +14 -0
  1251. package/packages/typescript/src/utils/text-splitting.d.ts.map +1 -0
  1252. package/packages/typescript/src/utils/text-splitting.js +66 -0
  1253. package/packages/typescript/src/utils/toon.d.ts +8 -0
  1254. package/packages/typescript/src/utils/toon.d.ts.map +1 -0
  1255. package/packages/typescript/src/utils/toon.js +346 -0
  1256. package/packages/typescript/src/utils/type-guards.d.ts +25 -0
  1257. package/packages/typescript/src/utils/type-guards.d.ts.map +1 -0
  1258. package/packages/typescript/src/utils/type-guards.js +73 -0
  1259. package/packages/typescript/src/utils/union-find.d.ts +30 -0
  1260. package/packages/typescript/src/utils/union-find.d.ts.map +1 -0
  1261. package/packages/typescript/src/utils/union-find.js +81 -0
  1262. package/packages/typescript/src/utils.d.ts +192 -0
  1263. package/packages/typescript/src/utils.d.ts.map +1 -0
  1264. package/packages/typescript/src/utils.js +1120 -0
  1265. package/packages/typescript/src/validation/index.d.ts +8 -0
  1266. package/packages/typescript/src/validation/index.d.ts.map +1 -0
  1267. package/packages/typescript/src/validation/index.js +7 -0
  1268. package/packages/typescript/src/validation/keywords.d.ts +26 -0
  1269. package/packages/typescript/src/validation/keywords.d.ts.map +1 -0
  1270. package/packages/typescript/src/validation/keywords.js +76 -0
  1271. package/packages/typescript/src/validation/secrets.d.ts +94 -0
  1272. package/packages/typescript/src/validation/secrets.d.ts.map +1 -0
  1273. package/packages/typescript/src/validation/secrets.js +399 -0
  1274. package/packages/ui/src/components/composites/chat/chat-attachment-strip.d.ts +9 -0
  1275. package/packages/ui/src/components/composites/chat/chat-attachment-strip.d.ts.map +1 -0
  1276. package/packages/ui/src/components/composites/chat/chat-attachment-strip.js +8 -0
  1277. package/packages/ui/src/components/composites/chat/chat-bubble.d.ts +14 -0
  1278. package/packages/ui/src/components/composites/chat/chat-bubble.d.ts.map +1 -0
  1279. package/packages/ui/src/components/composites/chat/chat-bubble.js +7 -0
  1280. package/packages/ui/src/components/composites/chat/chat-composer-shell.d.ts +14 -0
  1281. package/packages/ui/src/components/composites/chat/chat-composer-shell.d.ts.map +1 -0
  1282. package/packages/ui/src/components/composites/chat/chat-composer-shell.js +25 -0
  1283. package/packages/ui/src/components/composites/chat/chat-composer.d.ts +45 -0
  1284. package/packages/ui/src/components/composites/chat/chat-composer.d.ts.map +1 -0
  1285. package/packages/ui/src/components/composites/chat/chat-composer.js +217 -0
  1286. package/packages/ui/src/components/composites/chat/chat-conversation-item.d.ts +21 -0
  1287. package/packages/ui/src/components/composites/chat/chat-conversation-item.d.ts.map +1 -0
  1288. package/packages/ui/src/components/composites/chat/chat-conversation-item.js +118 -0
  1289. package/packages/ui/src/components/composites/chat/chat-conversation-rename-dialog.d.ts +22 -0
  1290. package/packages/ui/src/components/composites/chat/chat-conversation-rename-dialog.d.ts.map +1 -0
  1291. package/packages/ui/src/components/composites/chat/chat-conversation-rename-dialog.js +14 -0
  1292. package/packages/ui/src/components/composites/chat/chat-empty-state.d.ts +19 -0
  1293. package/packages/ui/src/components/composites/chat/chat-empty-state.d.ts.map +1 -0
  1294. package/packages/ui/src/components/composites/chat/chat-empty-state.js +8 -0
  1295. package/packages/ui/src/components/composites/chat/chat-message-actions.d.ts +14 -0
  1296. package/packages/ui/src/components/composites/chat/chat-message-actions.d.ts.map +1 -0
  1297. package/packages/ui/src/components/composites/chat/chat-message-actions.js +10 -0
  1298. package/packages/ui/src/components/composites/chat/chat-message.d.ts +18 -0
  1299. package/packages/ui/src/components/composites/chat/chat-message.d.ts.map +1 -0
  1300. package/packages/ui/src/components/composites/chat/chat-message.js +260 -0
  1301. package/packages/ui/src/components/composites/chat/chat-sidebar.d.ts +54 -0
  1302. package/packages/ui/src/components/composites/chat/chat-sidebar.d.ts.map +1 -0
  1303. package/packages/ui/src/components/composites/chat/chat-sidebar.js +64 -0
  1304. package/packages/ui/src/components/composites/chat/chat-source.d.ts +23 -0
  1305. package/packages/ui/src/components/composites/chat/chat-source.d.ts.map +1 -0
  1306. package/packages/ui/src/components/composites/chat/chat-source.js +60 -0
  1307. package/packages/ui/src/components/composites/chat/chat-thread-layout.d.ts +22 -0
  1308. package/packages/ui/src/components/composites/chat/chat-thread-layout.d.ts.map +1 -0
  1309. package/packages/ui/src/components/composites/chat/chat-thread-layout.js +37 -0
  1310. package/packages/ui/src/components/composites/chat/chat-transcript.d.ts +19 -0
  1311. package/packages/ui/src/components/composites/chat/chat-transcript.d.ts.map +1 -0
  1312. package/packages/ui/src/components/composites/chat/chat-transcript.js +82 -0
  1313. package/packages/ui/src/components/composites/chat/chat-types.d.ts +91 -0
  1314. package/packages/ui/src/components/composites/chat/chat-types.d.ts.map +1 -0
  1315. package/packages/ui/src/components/composites/chat/chat-types.js +1 -0
  1316. package/packages/ui/src/components/composites/chat/chat-typing-indicator.d.ts +10 -0
  1317. package/packages/ui/src/components/composites/chat/chat-typing-indicator.d.ts.map +1 -0
  1318. package/packages/ui/src/components/composites/chat/chat-typing-indicator.js +10 -0
  1319. package/packages/ui/src/components/composites/chat/create-task-popover.d.ts +13 -0
  1320. package/packages/ui/src/components/composites/chat/create-task-popover.d.ts.map +1 -0
  1321. package/packages/ui/src/components/composites/chat/create-task-popover.js +44 -0
  1322. package/packages/ui/src/components/composites/chat/index.d.ts +17 -0
  1323. package/packages/ui/src/components/composites/chat/index.d.ts.map +1 -0
  1324. package/packages/ui/src/components/composites/chat/index.js +16 -0
  1325. package/packages/ui/src/components/composites/form-field/form-field.d.ts +14 -0
  1326. package/packages/ui/src/components/composites/form-field/form-field.d.ts.map +1 -0
  1327. package/packages/ui/src/components/composites/form-field/form-field.js +8 -0
  1328. package/packages/ui/src/components/composites/form-field/index.d.ts +2 -0
  1329. package/packages/ui/src/components/composites/form-field/index.d.ts.map +1 -0
  1330. package/packages/ui/src/components/composites/form-field/index.js +1 -0
  1331. package/packages/ui/src/components/composites/index.d.ts +27 -0
  1332. package/packages/ui/src/components/composites/index.d.ts.map +1 -0
  1333. package/packages/ui/src/components/composites/index.js +26 -0
  1334. package/packages/ui/src/components/composites/page-panel/index.d.ts +29 -0
  1335. package/packages/ui/src/components/composites/page-panel/index.d.ts.map +1 -0
  1336. package/packages/ui/src/components/composites/page-panel/index.js +28 -0
  1337. package/packages/ui/src/components/composites/page-panel/page-panel-collapsible-section.d.ts +4 -0
  1338. package/packages/ui/src/components/composites/page-panel/page-panel-collapsible-section.d.ts.map +1 -0
  1339. package/packages/ui/src/components/composites/page-panel/page-panel-collapsible-section.js +60 -0
  1340. package/packages/ui/src/components/composites/page-panel/page-panel-empty.d.ts +3 -0
  1341. package/packages/ui/src/components/composites/page-panel/page-panel-empty.d.ts.map +1 -0
  1342. package/packages/ui/src/components/composites/page-panel/page-panel-empty.js +15 -0
  1343. package/packages/ui/src/components/composites/page-panel/page-panel-frame.d.ts +5 -0
  1344. package/packages/ui/src/components/composites/page-panel/page-panel-frame.d.ts.map +1 -0
  1345. package/packages/ui/src/components/composites/page-panel/page-panel-frame.js +9 -0
  1346. package/packages/ui/src/components/composites/page-panel/page-panel-header.d.ts +7 -0
  1347. package/packages/ui/src/components/composites/page-panel/page-panel-header.d.ts.map +1 -0
  1348. package/packages/ui/src/components/composites/page-panel/page-panel-header.js +30 -0
  1349. package/packages/ui/src/components/composites/page-panel/page-panel-loading.d.ts +3 -0
  1350. package/packages/ui/src/components/composites/page-panel/page-panel-loading.d.ts.map +1 -0
  1351. package/packages/ui/src/components/composites/page-panel/page-panel-loading.js +13 -0
  1352. package/packages/ui/src/components/composites/page-panel/page-panel-root.d.ts +7 -0
  1353. package/packages/ui/src/components/composites/page-panel/page-panel-root.d.ts.map +1 -0
  1354. package/packages/ui/src/components/composites/page-panel/page-panel-root.js +17 -0
  1355. package/packages/ui/src/components/composites/page-panel/page-panel-toolbar.d.ts +4 -0
  1356. package/packages/ui/src/components/composites/page-panel/page-panel-toolbar.d.ts.map +1 -0
  1357. package/packages/ui/src/components/composites/page-panel/page-panel-toolbar.js +6 -0
  1358. package/packages/ui/src/components/composites/page-panel/page-panel-types.d.ts +66 -0
  1359. package/packages/ui/src/components/composites/page-panel/page-panel-types.d.ts.map +1 -0
  1360. package/packages/ui/src/components/composites/page-panel/page-panel-types.js +1 -0
  1361. package/packages/ui/src/components/composites/search/index.d.ts +3 -0
  1362. package/packages/ui/src/components/composites/search/index.d.ts.map +1 -0
  1363. package/packages/ui/src/components/composites/search/index.js +2 -0
  1364. package/packages/ui/src/components/composites/search/search-input.d.ts.map +1 -0
  1365. package/packages/ui/src/components/composites/search/search-input.js +10 -0
  1366. package/packages/ui/src/components/composites/search/searchbar.d.ts +18 -0
  1367. package/packages/ui/src/components/composites/search/searchbar.d.ts.map +1 -0
  1368. package/packages/ui/src/components/composites/search/searchbar.js +25 -0
  1369. package/packages/ui/src/components/composites/sidebar/index.d.ts +11 -0
  1370. package/packages/ui/src/components/composites/sidebar/index.d.ts.map +1 -0
  1371. package/packages/ui/src/components/composites/sidebar/index.js +10 -0
  1372. package/packages/ui/src/components/composites/sidebar/sidebar-auto-rail.d.ts +15 -0
  1373. package/packages/ui/src/components/composites/sidebar/sidebar-auto-rail.d.ts.map +1 -0
  1374. package/packages/ui/src/components/composites/sidebar/sidebar-auto-rail.js +292 -0
  1375. package/packages/ui/src/components/composites/sidebar/sidebar-body.d.ts +4 -0
  1376. package/packages/ui/src/components/composites/sidebar/sidebar-body.d.ts.map +1 -0
  1377. package/packages/ui/src/components/composites/sidebar/sidebar-body.js +7 -0
  1378. package/packages/ui/src/components/composites/sidebar/sidebar-collapsed-rail.d.ts +11 -0
  1379. package/packages/ui/src/components/composites/sidebar/sidebar-collapsed-rail.d.ts.map +1 -0
  1380. package/packages/ui/src/components/composites/sidebar/sidebar-collapsed-rail.js +13 -0
  1381. package/packages/ui/src/components/composites/sidebar/sidebar-content.d.ts +78 -0
  1382. package/packages/ui/src/components/composites/sidebar/sidebar-content.d.ts.map +1 -0
  1383. package/packages/ui/src/components/composites/sidebar/sidebar-content.js +94 -0
  1384. package/packages/ui/src/components/composites/sidebar/sidebar-filter-bar.d.ts +3 -0
  1385. package/packages/ui/src/components/composites/sidebar/sidebar-filter-bar.d.ts.map +1 -0
  1386. package/packages/ui/src/components/composites/sidebar/sidebar-filter-bar.js +14 -0
  1387. package/packages/ui/src/components/composites/sidebar/sidebar-header-stack.d.ts +3 -0
  1388. package/packages/ui/src/components/composites/sidebar/sidebar-header-stack.d.ts.map +1 -0
  1389. package/packages/ui/src/components/composites/sidebar/sidebar-header-stack.js +6 -0
  1390. package/packages/ui/src/components/composites/sidebar/sidebar-header.d.ts +9 -0
  1391. package/packages/ui/src/components/composites/sidebar/sidebar-header.d.ts.map +1 -0
  1392. package/packages/ui/src/components/composites/sidebar/sidebar-header.js +6 -0
  1393. package/packages/ui/src/components/composites/sidebar/sidebar-panel.d.ts +3 -0
  1394. package/packages/ui/src/components/composites/sidebar/sidebar-panel.d.ts.map +1 -0
  1395. package/packages/ui/src/components/composites/sidebar/sidebar-panel.js +18 -0
  1396. package/packages/ui/src/components/composites/sidebar/sidebar-root.d.ts +4 -0
  1397. package/packages/ui/src/components/composites/sidebar/sidebar-root.d.ts.map +1 -0
  1398. package/packages/ui/src/components/composites/sidebar/sidebar-root.js +491 -0
  1399. package/packages/ui/src/components/composites/sidebar/sidebar-scroll-region.d.ts +3 -0
  1400. package/packages/ui/src/components/composites/sidebar/sidebar-scroll-region.d.ts.map +1 -0
  1401. package/packages/ui/src/components/composites/sidebar/sidebar-scroll-region.js +18 -0
  1402. package/packages/ui/src/components/composites/sidebar/sidebar-types.d.ts +77 -0
  1403. package/packages/ui/src/components/composites/sidebar/sidebar-types.d.ts.map +1 -0
  1404. package/packages/ui/src/components/composites/sidebar/sidebar-types.js +1 -0
  1405. package/packages/ui/src/components/composites/skills/index.d.ts +2 -0
  1406. package/packages/ui/src/components/composites/skills/index.d.ts.map +1 -0
  1407. package/packages/ui/src/components/composites/skills/index.js +1 -0
  1408. package/packages/ui/src/components/composites/skills/skill-sidebar-item.d.ts +16 -0
  1409. package/packages/ui/src/components/composites/skills/skill-sidebar-item.d.ts.map +1 -0
  1410. package/packages/ui/src/components/composites/skills/skill-sidebar-item.js +7 -0
  1411. package/packages/ui/src/components/composites/trajectories/index.d.ts +5 -0
  1412. package/packages/ui/src/components/composites/trajectories/index.d.ts.map +1 -0
  1413. package/packages/ui/src/components/composites/trajectories/index.js +4 -0
  1414. package/packages/ui/src/components/composites/trajectories/trajectory-code-block.d.ts +13 -0
  1415. package/packages/ui/src/components/composites/trajectories/trajectory-code-block.d.ts.map +1 -0
  1416. package/packages/ui/src/components/composites/trajectories/trajectory-code-block.js +13 -0
  1417. package/packages/ui/src/components/composites/trajectories/trajectory-llm-call-card.d.ts +34 -0
  1418. package/packages/ui/src/components/composites/trajectories/trajectory-llm-call-card.d.ts.map +1 -0
  1419. package/packages/ui/src/components/composites/trajectories/trajectory-llm-call-card.js +14 -0
  1420. package/packages/ui/src/components/composites/trajectories/trajectory-pipeline-graph.d.ts +26 -0
  1421. package/packages/ui/src/components/composites/trajectories/trajectory-pipeline-graph.d.ts.map +1 -0
  1422. package/packages/ui/src/components/composites/trajectories/trajectory-pipeline-graph.js +46 -0
  1423. package/packages/ui/src/components/composites/trajectories/trajectory-sidebar-item.d.ts +15 -0
  1424. package/packages/ui/src/components/composites/trajectories/trajectory-sidebar-item.d.ts.map +1 -0
  1425. package/packages/ui/src/components/composites/trajectories/trajectory-sidebar-item.js +8 -0
  1426. package/packages/ui/src/components/primitives/index.d.ts +26 -0
  1427. package/packages/ui/src/components/primitives/index.d.ts.map +1 -0
  1428. package/packages/ui/src/components/primitives/index.js +25 -0
  1429. package/packages/ui/src/components/ui/admin-dialog.d.ts +50 -0
  1430. package/packages/ui/src/components/ui/admin-dialog.d.ts.map +1 -0
  1431. package/packages/ui/src/components/ui/admin-dialog.js +48 -0
  1432. package/packages/ui/src/components/ui/badge.d.ts +10 -0
  1433. package/packages/ui/src/components/ui/badge.d.ts.map +1 -0
  1434. package/packages/ui/src/components/ui/badge.js +21 -0
  1435. package/packages/ui/src/components/ui/banner.d.ts +17 -0
  1436. package/packages/ui/src/components/ui/banner.d.ts.map +1 -0
  1437. package/packages/ui/src/components/ui/banner.js +29 -0
  1438. package/packages/ui/src/components/ui/button.d.ts +13 -0
  1439. package/packages/ui/src/components/ui/button.d.ts.map +1 -0
  1440. package/packages/ui/src/components/ui/button.js +40 -0
  1441. package/packages/ui/src/components/ui/card.d.ts +15 -0
  1442. package/packages/ui/src/components/ui/card.d.ts.map +1 -0
  1443. package/packages/ui/src/components/ui/card.js +32 -0
  1444. package/packages/ui/src/components/ui/checkbox.d.ts.map +1 -0
  1445. package/packages/ui/src/components/ui/confirm-delete.d.ts +20 -0
  1446. package/packages/ui/src/components/ui/confirm-delete.d.ts.map +1 -0
  1447. package/packages/ui/src/components/ui/confirm-delete.js +16 -0
  1448. package/packages/ui/src/components/ui/confirm-dialog.d.ts +49 -0
  1449. package/packages/ui/src/components/ui/confirm-dialog.d.ts.map +1 -0
  1450. package/packages/ui/src/components/ui/confirm-dialog.js +90 -0
  1451. package/packages/ui/src/components/ui/connection-status.d.ts +15 -0
  1452. package/packages/ui/src/components/ui/connection-status.d.ts.map +1 -0
  1453. package/packages/ui/src/components/ui/connection-status.js +25 -0
  1454. package/packages/ui/src/components/ui/copy-button.d.ts.map +1 -0
  1455. package/packages/ui/src/components/ui/dialog.d.ts +25 -0
  1456. package/packages/ui/src/components/ui/dialog.d.ts.map +1 -0
  1457. package/packages/ui/src/components/ui/dialog.js +23 -0
  1458. package/packages/ui/src/components/ui/drawer-sheet.d.ts +19 -0
  1459. package/packages/ui/src/components/ui/drawer-sheet.d.ts.map +1 -0
  1460. package/packages/ui/src/components/ui/drawer-sheet.js +21 -0
  1461. package/packages/ui/src/components/ui/dropdown-menu.d.ts.map +1 -0
  1462. package/packages/ui/src/components/ui/dropdown-menu.js +35 -0
  1463. package/packages/ui/src/components/ui/empty-state.d.ts.map +1 -0
  1464. package/packages/ui/src/components/ui/error-boundary.d.ts +22 -0
  1465. package/packages/ui/src/components/ui/error-boundary.d.ts.map +1 -0
  1466. package/packages/ui/src/components/ui/error-boundary.js +27 -0
  1467. package/packages/ui/src/components/ui/field-switch.d.ts +8 -0
  1468. package/packages/ui/src/components/ui/field-switch.d.ts.map +1 -0
  1469. package/packages/ui/src/components/ui/field-switch.js +10 -0
  1470. package/packages/ui/src/components/ui/field.d.ts +12 -0
  1471. package/packages/ui/src/components/ui/field.d.ts.map +1 -0
  1472. package/packages/ui/src/components/ui/field.js +21 -0
  1473. package/packages/ui/src/components/ui/form-select.d.ts +14 -0
  1474. package/packages/ui/src/components/ui/form-select.d.ts.map +1 -0
  1475. package/packages/ui/src/components/ui/form-select.js +9 -0
  1476. package/packages/ui/src/components/ui/grid.d.ts +10 -0
  1477. package/packages/ui/src/components/ui/grid.d.ts.map +1 -0
  1478. package/packages/ui/src/components/ui/grid.js +31 -0
  1479. package/packages/ui/src/components/ui/input.d.ts +12 -0
  1480. package/packages/ui/src/components/ui/input.d.ts.map +1 -0
  1481. package/packages/ui/src/components/ui/input.js +29 -0
  1482. package/packages/ui/src/components/ui/label.d.ts +5 -0
  1483. package/packages/ui/src/components/ui/label.d.ts.map +1 -0
  1484. package/packages/ui/src/components/ui/label.js +10 -0
  1485. package/packages/ui/src/components/ui/new-action-button.d.ts +7 -0
  1486. package/packages/ui/src/components/ui/new-action-button.d.ts.map +1 -0
  1487. package/packages/ui/src/components/ui/new-action-button.js +13 -0
  1488. package/packages/ui/src/components/ui/popover.d.ts.map +1 -0
  1489. package/packages/ui/src/components/ui/save-footer.d.ts.map +1 -0
  1490. package/packages/ui/src/components/ui/save-footer.js +10 -0
  1491. package/packages/ui/src/components/ui/section-card.d.ts.map +1 -0
  1492. package/packages/ui/src/components/ui/section-card.js +10 -0
  1493. package/packages/ui/src/components/ui/segmented-control.d.ts +18 -0
  1494. package/packages/ui/src/components/ui/segmented-control.d.ts.map +1 -0
  1495. package/packages/ui/src/components/ui/segmented-control.js +10 -0
  1496. package/packages/ui/src/components/ui/select.d.ts.map +1 -0
  1497. package/packages/ui/src/components/ui/select.js +27 -0
  1498. package/packages/ui/src/components/ui/separator.d.ts.map +1 -0
  1499. package/packages/ui/src/components/ui/settings-controls.d.ts +41 -0
  1500. package/packages/ui/src/components/ui/settings-controls.d.ts.map +1 -0
  1501. package/packages/ui/src/components/ui/settings-controls.js +60 -0
  1502. package/packages/ui/src/components/ui/skeleton.d.ts.map +1 -0
  1503. package/packages/ui/src/components/ui/skeleton.js +24 -0
  1504. package/packages/ui/src/components/ui/slider.d.ts.map +1 -0
  1505. package/packages/ui/src/components/ui/slider.js +7 -0
  1506. package/packages/ui/src/components/ui/sonner.d.ts +2 -0
  1507. package/packages/ui/src/components/ui/sonner.d.ts.map +1 -0
  1508. package/packages/ui/src/components/ui/sonner.js +1 -0
  1509. package/packages/ui/src/components/ui/spinner.d.ts.map +1 -0
  1510. package/packages/ui/src/components/ui/stack.d.ts +11 -0
  1511. package/packages/ui/src/components/ui/stack.d.ts.map +1 -0
  1512. package/packages/ui/src/components/ui/stack.js +40 -0
  1513. package/packages/ui/src/components/ui/status-badge.d.ts +27 -0
  1514. package/packages/ui/src/components/ui/status-badge.d.ts.map +1 -0
  1515. package/packages/ui/src/components/ui/status-badge.js +70 -0
  1516. package/packages/ui/src/components/ui/switch.d.ts.map +1 -0
  1517. package/packages/ui/src/components/ui/switch.js +7 -0
  1518. package/packages/ui/src/components/ui/tabs.d.ts.map +1 -0
  1519. package/packages/ui/src/components/ui/tabs.js +12 -0
  1520. package/packages/ui/src/components/ui/tag-editor.d.ts +12 -0
  1521. package/packages/ui/src/components/ui/tag-editor.d.ts.map +1 -0
  1522. package/packages/ui/src/components/ui/tag-editor.js +34 -0
  1523. package/packages/ui/src/components/ui/tag-input.d.ts +3 -0
  1524. package/packages/ui/src/components/ui/tag-input.d.ts.map +1 -0
  1525. package/packages/ui/src/components/ui/tag-input.js +1 -0
  1526. package/packages/ui/src/components/ui/textarea.d.ts +12 -0
  1527. package/packages/ui/src/components/ui/textarea.d.ts.map +1 -0
  1528. package/packages/ui/src/components/ui/textarea.js +29 -0
  1529. package/packages/ui/src/components/ui/themed-select.d.ts +22 -0
  1530. package/packages/ui/src/components/ui/themed-select.d.ts.map +1 -0
  1531. package/packages/ui/src/components/ui/themed-select.js +137 -0
  1532. package/packages/ui/src/components/ui/tooltip-extended.d.ts +54 -0
  1533. package/packages/ui/src/components/ui/tooltip-extended.d.ts.map +1 -0
  1534. package/packages/ui/src/components/ui/tooltip-extended.js +114 -0
  1535. package/packages/ui/src/components/ui/tooltip.d.ts +18 -0
  1536. package/packages/ui/src/components/ui/tooltip.d.ts.map +1 -0
  1537. package/packages/ui/src/components/ui/tooltip.js +13 -0
  1538. package/packages/ui/src/components/ui/typography.d.ts +15 -0
  1539. package/packages/ui/src/components/ui/typography.d.ts.map +1 -0
  1540. package/packages/ui/src/components/ui/typography.js +46 -0
  1541. package/packages/ui/src/hooks/index.d.ts +6 -0
  1542. package/packages/ui/src/hooks/index.d.ts.map +1 -0
  1543. package/packages/ui/src/hooks/index.js +5 -0
  1544. package/packages/ui/src/hooks/useClickOutside.d.ts +3 -0
  1545. package/packages/ui/src/hooks/useClickOutside.d.ts.map +1 -0
  1546. package/packages/ui/src/hooks/useClickOutside.js +22 -0
  1547. package/packages/ui/src/hooks/useDocumentVisibility.d.ts +3 -0
  1548. package/packages/ui/src/hooks/useDocumentVisibility.d.ts.map +1 -0
  1549. package/packages/ui/src/hooks/useDocumentVisibility.js +28 -0
  1550. package/packages/ui/src/hooks/useKeyboardShortcuts.d.ts +13 -0
  1551. package/packages/ui/src/hooks/useKeyboardShortcuts.d.ts.map +1 -0
  1552. package/packages/ui/src/hooks/useKeyboardShortcuts.js +34 -0
  1553. package/packages/ui/src/hooks/useLinkedSidebarSelection.d.ts +16 -0
  1554. package/packages/ui/src/hooks/useLinkedSidebarSelection.d.ts.map +1 -0
  1555. package/packages/ui/src/hooks/useLinkedSidebarSelection.js +117 -0
  1556. package/packages/ui/src/hooks/useTimeout.d.ts +5 -0
  1557. package/packages/ui/src/hooks/useTimeout.d.ts.map +1 -0
  1558. package/packages/ui/src/hooks/useTimeout.js +26 -0
  1559. package/packages/ui/src/index.d.ts +8 -0
  1560. package/packages/ui/src/index.d.ts.map +1 -0
  1561. package/packages/ui/src/index.js +7 -0
  1562. package/packages/ui/src/layouts/chat-panel-layout/chat-panel-layout.d.ts +11 -0
  1563. package/packages/ui/src/layouts/chat-panel-layout/chat-panel-layout.d.ts.map +1 -0
  1564. package/packages/ui/src/layouts/chat-panel-layout/chat-panel-layout.js +37 -0
  1565. package/packages/ui/src/layouts/chat-panel-layout/index.d.ts +2 -0
  1566. package/packages/ui/src/layouts/chat-panel-layout/index.d.ts.map +1 -0
  1567. package/packages/ui/src/layouts/chat-panel-layout/index.js +1 -0
  1568. package/packages/ui/src/layouts/content-layout/content-layout.d.ts +21 -0
  1569. package/packages/ui/src/layouts/content-layout/content-layout.d.ts.map +1 -0
  1570. package/packages/ui/src/layouts/content-layout/content-layout.js +5 -0
  1571. package/packages/ui/src/layouts/content-layout/index.d.ts +2 -0
  1572. package/packages/ui/src/layouts/content-layout/index.d.ts.map +1 -0
  1573. package/packages/ui/src/layouts/content-layout/index.js +1 -0
  1574. package/packages/ui/src/layouts/index.d.ts +5 -0
  1575. package/packages/ui/src/layouts/index.d.ts.map +1 -0
  1576. package/packages/ui/src/layouts/index.js +4 -0
  1577. package/packages/ui/src/layouts/layout-test-utils.d.ts +6 -0
  1578. package/packages/ui/src/layouts/layout-test-utils.d.ts.map +1 -0
  1579. package/packages/ui/src/layouts/layout-test-utils.js +36 -0
  1580. package/packages/ui/src/layouts/page-layout/index.d.ts +5 -0
  1581. package/packages/ui/src/layouts/page-layout/index.d.ts.map +1 -0
  1582. package/packages/ui/src/layouts/page-layout/index.js +4 -0
  1583. package/packages/ui/src/layouts/page-layout/page-layout-header.d.ts +287 -0
  1584. package/packages/ui/src/layouts/page-layout/page-layout-header.d.ts.map +1 -0
  1585. package/packages/ui/src/layouts/page-layout/page-layout-header.js +8 -0
  1586. package/packages/ui/src/layouts/page-layout/page-layout-mobile-drawer.d.ts +3 -0
  1587. package/packages/ui/src/layouts/page-layout/page-layout-mobile-drawer.d.ts.map +1 -0
  1588. package/packages/ui/src/layouts/page-layout/page-layout-mobile-drawer.js +18 -0
  1589. package/packages/ui/src/layouts/page-layout/page-layout-types.d.ts +15 -0
  1590. package/packages/ui/src/layouts/page-layout/page-layout-types.d.ts.map +1 -0
  1591. package/packages/ui/src/layouts/page-layout/page-layout-types.js +1 -0
  1592. package/packages/ui/src/layouts/page-layout/page-layout.d.ts +3 -0
  1593. package/packages/ui/src/layouts/page-layout/page-layout.d.ts.map +1 -0
  1594. package/packages/ui/src/layouts/page-layout/page-layout.js +5 -0
  1595. package/packages/ui/src/layouts/workspace-layout/index.d.ts +3 -0
  1596. package/packages/ui/src/layouts/workspace-layout/index.d.ts.map +1 -0
  1597. package/packages/ui/src/layouts/workspace-layout/index.js +2 -0
  1598. package/packages/ui/src/layouts/workspace-layout/workspace-layout-types.d.ts +19 -0
  1599. package/packages/ui/src/layouts/workspace-layout/workspace-layout-types.d.ts.map +1 -0
  1600. package/packages/ui/src/layouts/workspace-layout/workspace-layout-types.js +1 -0
  1601. package/packages/ui/src/layouts/workspace-layout/workspace-layout.d.ts +3 -0
  1602. package/packages/ui/src/layouts/workspace-layout/workspace-layout.d.ts.map +1 -0
  1603. package/packages/ui/src/layouts/workspace-layout/workspace-layout.js +59 -0
  1604. package/packages/ui/src/lib/floating-layers.d.ts +17 -0
  1605. package/packages/ui/src/lib/floating-layers.d.ts.map +1 -0
  1606. package/packages/ui/src/lib/floating-layers.js +20 -0
  1607. package/packages/ui/src/lib/utils.d.ts +3 -0
  1608. package/packages/ui/src/lib/utils.d.ts.map +1 -0
  1609. package/packages/ui/src/lib/utils.js +5 -0
  1610. package/packages/ui/src/stories/layout-story-fixtures.d.ts +14 -0
  1611. package/packages/ui/src/stories/layout-story-fixtures.d.ts.map +1 -0
  1612. package/packages/ui/src/stories/layout-story-fixtures.js +33 -0
  1613. package/packages/ui/src/types/onboarding.d.ts +8 -0
  1614. package/packages/ui/src/types/onboarding.d.ts.map +1 -0
  1615. package/packages/ui/src/types/onboarding.js +17 -0
  1616. package/styles/electrobun-mac-window-drag.css +94 -0
  1617. package/styles/theme.css +73 -0
  1618. package/README.md +0 -6
  1619. package/dist/components/ui/badge.d.ts +0 -10
  1620. package/dist/components/ui/badge.d.ts.map +0 -1
  1621. package/dist/components/ui/badge.js +0 -20
  1622. package/dist/components/ui/banner.d.ts +0 -18
  1623. package/dist/components/ui/banner.d.ts.map +0 -1
  1624. package/dist/components/ui/banner.js +0 -27
  1625. package/dist/components/ui/button.d.ts +0 -12
  1626. package/dist/components/ui/button.d.ts.map +0 -1
  1627. package/dist/components/ui/button.js +0 -33
  1628. package/dist/components/ui/card.d.ts +0 -9
  1629. package/dist/components/ui/card.d.ts.map +0 -1
  1630. package/dist/components/ui/card.js +0 -16
  1631. package/dist/components/ui/chat-atoms.d.ts +0 -26
  1632. package/dist/components/ui/chat-atoms.d.ts.map +0 -1
  1633. package/dist/components/ui/chat-atoms.js +0 -17
  1634. package/dist/components/ui/checkbox.d.ts.map +0 -1
  1635. package/dist/components/ui/confirm-delete.d.ts +0 -12
  1636. package/dist/components/ui/confirm-delete.d.ts.map +0 -1
  1637. package/dist/components/ui/confirm-delete.js +0 -13
  1638. package/dist/components/ui/confirm-dialog.d.ts +0 -24
  1639. package/dist/components/ui/confirm-dialog.d.ts.map +0 -1
  1640. package/dist/components/ui/confirm-dialog.js +0 -55
  1641. package/dist/components/ui/connection-status.d.ts +0 -9
  1642. package/dist/components/ui/connection-status.d.ts.map +0 -1
  1643. package/dist/components/ui/connection-status.js +0 -25
  1644. package/dist/components/ui/copy-button.d.ts.map +0 -1
  1645. package/dist/components/ui/dialog.d.ts +0 -20
  1646. package/dist/components/ui/dialog.d.ts.map +0 -1
  1647. package/dist/components/ui/dialog.js +0 -22
  1648. package/dist/components/ui/dropdown-menu.d.ts.map +0 -1
  1649. package/dist/components/ui/dropdown-menu.js +0 -35
  1650. package/dist/components/ui/empty-state.d.ts.map +0 -1
  1651. package/dist/components/ui/error-boundary.d.ts +0 -18
  1652. package/dist/components/ui/error-boundary.d.ts.map +0 -1
  1653. package/dist/components/ui/error-boundary.js +0 -27
  1654. package/dist/components/ui/grid.d.ts +0 -11
  1655. package/dist/components/ui/grid.d.ts.map +0 -1
  1656. package/dist/components/ui/grid.js +0 -30
  1657. package/dist/components/ui/input.d.ts +0 -6
  1658. package/dist/components/ui/input.d.ts.map +0 -1
  1659. package/dist/components/ui/input.js +0 -8
  1660. package/dist/components/ui/label.d.ts +0 -6
  1661. package/dist/components/ui/label.d.ts.map +0 -1
  1662. package/dist/components/ui/label.js +0 -9
  1663. package/dist/components/ui/popover.d.ts.map +0 -1
  1664. package/dist/components/ui/save-footer.d.ts.map +0 -1
  1665. package/dist/components/ui/save-footer.js +0 -9
  1666. package/dist/components/ui/search-bar.d.ts +0 -17
  1667. package/dist/components/ui/search-bar.d.ts.map +0 -1
  1668. package/dist/components/ui/search-bar.js +0 -19
  1669. package/dist/components/ui/search-input.d.ts.map +0 -1
  1670. package/dist/components/ui/search-input.js +0 -9
  1671. package/dist/components/ui/section-card.d.ts.map +0 -1
  1672. package/dist/components/ui/section-card.js +0 -9
  1673. package/dist/components/ui/select.d.ts.map +0 -1
  1674. package/dist/components/ui/select.js +0 -26
  1675. package/dist/components/ui/separator.d.ts.map +0 -1
  1676. package/dist/components/ui/skeleton.d.ts.map +0 -1
  1677. package/dist/components/ui/skeleton.js +0 -25
  1678. package/dist/components/ui/slider.d.ts.map +0 -1
  1679. package/dist/components/ui/slider.js +0 -7
  1680. package/dist/components/ui/sonner.d.ts +0 -5
  1681. package/dist/components/ui/sonner.d.ts.map +0 -1
  1682. package/dist/components/ui/sonner.js +0 -15
  1683. package/dist/components/ui/spinner.d.ts.map +0 -1
  1684. package/dist/components/ui/stack.d.ts +0 -13
  1685. package/dist/components/ui/stack.d.ts.map +0 -1
  1686. package/dist/components/ui/stack.js +0 -39
  1687. package/dist/components/ui/status-badge.d.ts +0 -20
  1688. package/dist/components/ui/status-badge.d.ts.map +0 -1
  1689. package/dist/components/ui/status-badge.js +0 -41
  1690. package/dist/components/ui/switch.d.ts.map +0 -1
  1691. package/dist/components/ui/switch.js +0 -7
  1692. package/dist/components/ui/tabs.d.ts.map +0 -1
  1693. package/dist/components/ui/tabs.js +0 -12
  1694. package/dist/components/ui/tag-editor.d.ts +0 -24
  1695. package/dist/components/ui/tag-editor.d.ts.map +0 -1
  1696. package/dist/components/ui/tag-editor.js +0 -32
  1697. package/dist/components/ui/tag-input.d.ts +0 -19
  1698. package/dist/components/ui/tag-input.d.ts.map +0 -1
  1699. package/dist/components/ui/tag-input.js +0 -28
  1700. package/dist/components/ui/textarea.d.ts +0 -6
  1701. package/dist/components/ui/textarea.d.ts.map +0 -1
  1702. package/dist/components/ui/textarea.js +0 -8
  1703. package/dist/components/ui/themed-select.d.ts +0 -27
  1704. package/dist/components/ui/themed-select.d.ts.map +0 -1
  1705. package/dist/components/ui/themed-select.js +0 -57
  1706. package/dist/components/ui/tooltip-extended.d.ts +0 -76
  1707. package/dist/components/ui/tooltip-extended.d.ts.map +0 -1
  1708. package/dist/components/ui/tooltip-extended.js +0 -128
  1709. package/dist/components/ui/tooltip.d.ts +0 -8
  1710. package/dist/components/ui/tooltip.d.ts.map +0 -1
  1711. package/dist/components/ui/tooltip.js +0 -10
  1712. package/dist/components/ui/typography.d.ts +0 -17
  1713. package/dist/components/ui/typography.d.ts.map +0 -1
  1714. package/dist/components/ui/typography.js +0 -44
  1715. package/dist/index.d.ts +0 -42
  1716. package/dist/index.d.ts.map +0 -1
  1717. package/dist/index.js +0 -43
  1718. package/dist/lib/button-styles.d.ts +0 -12
  1719. package/dist/lib/button-styles.d.ts.map +0 -1
  1720. package/dist/lib/button-styles.js +0 -11
  1721. package/dist/lib/utils.d.ts +0 -6
  1722. package/dist/lib/utils.d.ts.map +0 -1
  1723. package/dist/lib/utils.js +0 -8
  1724. package/dist/package.json +0 -65
  1725. package/dist/styles/theme.css +0 -193
  1726. package/src/styles/theme.css +0 -193
  1727. /package/{dist/components/ui → packages/ui/src/components/composites/search}/search-input.d.ts +0 -0
  1728. /package/{dist → packages/ui/src}/components/ui/checkbox.d.ts +0 -0
  1729. /package/{dist → packages/ui/src}/components/ui/checkbox.js +0 -0
  1730. /package/{dist → packages/ui/src}/components/ui/copy-button.d.ts +0 -0
  1731. /package/{dist → packages/ui/src}/components/ui/copy-button.js +0 -0
  1732. /package/{dist → packages/ui/src}/components/ui/dropdown-menu.d.ts +0 -0
  1733. /package/{dist → packages/ui/src}/components/ui/empty-state.d.ts +0 -0
  1734. /package/{dist → packages/ui/src}/components/ui/empty-state.js +0 -0
  1735. /package/{dist → packages/ui/src}/components/ui/popover.d.ts +0 -0
  1736. /package/{dist → packages/ui/src}/components/ui/popover.js +0 -0
  1737. /package/{dist → packages/ui/src}/components/ui/save-footer.d.ts +0 -0
  1738. /package/{dist → packages/ui/src}/components/ui/section-card.d.ts +0 -0
  1739. /package/{dist → packages/ui/src}/components/ui/select.d.ts +0 -0
  1740. /package/{dist → packages/ui/src}/components/ui/separator.d.ts +0 -0
  1741. /package/{dist → packages/ui/src}/components/ui/separator.js +0 -0
  1742. /package/{dist → packages/ui/src}/components/ui/skeleton.d.ts +0 -0
  1743. /package/{dist → packages/ui/src}/components/ui/slider.d.ts +0 -0
  1744. /package/{dist → packages/ui/src}/components/ui/spinner.d.ts +0 -0
  1745. /package/{dist → packages/ui/src}/components/ui/spinner.js +0 -0
  1746. /package/{dist → packages/ui/src}/components/ui/switch.d.ts +0 -0
  1747. /package/{dist → packages/ui/src}/components/ui/tabs.d.ts +0 -0
@@ -0,0 +1,1580 @@
1
+ // Implementation of BM25 and Porter2 stemming
2
+ // https://github.com/eilvelia/porter2.js
3
+ // https://www.npmjs.com/package/fast-bm25
4
+ // The MIT License
5
+ // Copyright (c) 2024 eilvelia <hi@eilvelia.cat>
6
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ // of this software and associated documentation files (the "Software"), to deal
8
+ // in the Software without restriction, including without limitation the rights
9
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ // copies of the Software, and to permit persons to whom the Software is
11
+ // furnished to do so, subject to the following conditions:
12
+ // The above copyright notice and this permission notice shall be included in all
13
+ // copies or substantial portions of the Software.
14
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ // SOFTWARE.
21
+ // MIT License
22
+ // Copyright (c) 2024 Vivek Patel <me@patelvivek.dev>.
23
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
24
+ // of this software and associated documentation files (the "Software"), to deal
25
+ // in the Software without restriction, including without limitation the rights
26
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
27
+ // copies of the Software, and to permit persons to whom the Software is
28
+ // furnished to do so, subject to the following conditions:
29
+ // The above copyright notice and this permission notice shall be included in all
30
+ // copies or substantial portions of the Software.
31
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
32
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
33
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
34
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
35
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
36
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
37
+ // SOFTWARE.
38
+ /**
39
+ * Checks if the character code represents a vowel (a, e, i, o, u, y).
40
+ * @param char - The character code.
41
+ * @returns True if the character is a vowel, false otherwise.
42
+ */
43
+ const isV = (char) => {
44
+ switch (char) {
45
+ case 97:
46
+ case 101:
47
+ case 105:
48
+ case 111:
49
+ case 117:
50
+ case 121:
51
+ return true;
52
+ default:
53
+ return false;
54
+ }
55
+ };
56
+ /**
57
+ * Checks if the character code is 'w', 'x', 'y', or a vowel.
58
+ * Used in determining short syllables.
59
+ * @param char - The character code.
60
+ * @returns True if the character is w, x, y, or a vowel, false otherwise.
61
+ */
62
+ const isWxy = (char) => {
63
+ switch (char) {
64
+ case 97:
65
+ case 101:
66
+ case 105:
67
+ case 111:
68
+ case 117:
69
+ case 121:
70
+ case 119:
71
+ case 120:
72
+ case 89:
73
+ return true;
74
+ default:
75
+ return false;
76
+ }
77
+ };
78
+ /**
79
+ * Checks if the character code is one of the valid endings for Step 1c ('li' rule).
80
+ * Valid endings: c, d, e, g, h, k, m, n, r, t.
81
+ * @param char - The character code.
82
+ * @returns True if the character is a valid 'li' ending, false otherwise.
83
+ */
84
+ const isValidLi = (char) => {
85
+ switch (char) {
86
+ case 99:
87
+ case 100:
88
+ case 101:
89
+ case 103:
90
+ case 104:
91
+ case 107:
92
+ case 109:
93
+ case 110:
94
+ case 114:
95
+ case 116:
96
+ return true;
97
+ default:
98
+ return false;
99
+ }
100
+ };
101
+ /**
102
+ * Checks if the character code represents a "double" consonant sound
103
+ * (bb, dd, ff, gg, mm, nn, pp, rr, tt).
104
+ * @param char - The character code.
105
+ * @returns True if the character forms a double consonant, false otherwise.
106
+ */
107
+ const isDouble = (char) => {
108
+ switch (char) {
109
+ case 98:
110
+ case 100:
111
+ case 102:
112
+ case 103:
113
+ case 109:
114
+ case 110:
115
+ case 112:
116
+ case 114:
117
+ case 116:
118
+ return true;
119
+ default:
120
+ return false;
121
+ }
122
+ };
123
+ /**
124
+ * Checks if a word ends in a short syllable.
125
+ * A short syllable is defined as:
126
+ * 1. A vowel followed by a non-vowel at the end of the word. (e.g., "hop")
127
+ * 2. A vowel followed by a non-vowel followed by a non-vowel ('w', 'x', 'y' excluded). (e.g., "trap")
128
+ * @param w - Array of character codes representing the word.
129
+ * @param len - The current effective length of the word being considered.
130
+ * @returns True if the word ends in a short syllable, false otherwise.
131
+ */
132
+ const isShortV = (w, len) => {
133
+ // backwardmode: ( non-v_WXY v non-v ) or ( non-v v atlimit )
134
+ return (len >= 2 &&
135
+ isV(w[len - 2]) &&
136
+ ((len === 2 && !isV(w[len - 1])) ||
137
+ (len >= 3 && !isV(w[len - 3]) && !isWxy(w[len - 1]))));
138
+ };
139
+ // #endregion Porter2 Stemmer Helper Functions
140
+ // #region Porter2 Stemmer Algorithm
141
+ /**
142
+ * Stems a given word using the Porter2 (Snowball English) stemming algorithm.
143
+ *
144
+ * The algorithm works in several steps, applying suffix stripping rules based on
145
+ * regions R1 and R2 within the word.
146
+ * - R1: The region after the first non-vowel following a vowel.
147
+ * - R2: The region after the first non-vowel following a vowel in R1.
148
+ *
149
+ * The steps generally involve:
150
+ * 1. Handling plurals and past participles (-s, -es, -ed, -ing).
151
+ * 2. Turning terminal 'y' to 'i' if there is another vowel in the stem.
152
+ * 3. Mapping double suffixes to single ones (e.g., -ization to -ize).
153
+ * 4. Dealing with suffixes like -full, -ness, etc.
154
+ * 5. Removing suffixes like -ant, -ence, etc.
155
+ * 6. Removing a final -e.
156
+ *
157
+ * @param word - The word to be stemmed.
158
+ * @returns The stemmed version of the word.
159
+ */
160
+ const stem = (word) => {
161
+ if (word.length < 3)
162
+ return word;
163
+ // exception1
164
+ if (word.length <= 6) {
165
+ switch (word) {
166
+ case "ski":
167
+ return "ski";
168
+ case "skies":
169
+ return "sky";
170
+ case "dying":
171
+ return "die";
172
+ case "lying":
173
+ return "lie";
174
+ case "tying":
175
+ return "tie";
176
+ // special -LY cases
177
+ case "idly":
178
+ return "idl";
179
+ case "gently":
180
+ return "gentl";
181
+ case "ugly":
182
+ return "ugli";
183
+ case "early":
184
+ return "earli";
185
+ case "only":
186
+ return "onli";
187
+ case "singly":
188
+ return "singl";
189
+ // invariant forms
190
+ case "sky":
191
+ case "news":
192
+ case "howe":
193
+ // not plural forms
194
+ case "atlas":
195
+ case "cosmos":
196
+ case "bias":
197
+ case "andes":
198
+ return word;
199
+ }
200
+ }
201
+ const initialOffset = word.charCodeAt(0) === 39 /* ' */ ? 1 : 0;
202
+ let l = word.length - initialOffset;
203
+ const w = new Array(l);
204
+ let yFound = false;
205
+ for (let i = 0; i < l; ++i) {
206
+ const ch = word.charCodeAt(i + initialOffset);
207
+ if (ch === 121 && (i === 0 || isV(w[i - 1]))) {
208
+ yFound = true;
209
+ w[i] = 89;
210
+ continue;
211
+ }
212
+ w[i] = ch;
213
+ }
214
+ if (w[l - 1] === 39 /* ' */)
215
+ --l;
216
+ if (l >= 2 && w[l - 2] === 39 /* ' */ && w[l - 1] === 115 /* s */)
217
+ l -= 2;
218
+ // mark_regions
219
+ let rv = 0;
220
+ // rv is the position after the first vowel
221
+ while (rv < l && !isV(w[rv]))
222
+ ++rv;
223
+ if (rv < l)
224
+ ++rv;
225
+ let r1 = rv;
226
+ if (l >= 5 &&
227
+ ((w[0] === 103 &&
228
+ w[1] === 101 &&
229
+ w[2] === 110 &&
230
+ w[3] === 101 &&
231
+ w[4] === 114) || // gener
232
+ (w[0] === 97 &&
233
+ w[1] === 114 &&
234
+ w[2] === 115 &&
235
+ w[3] === 101 &&
236
+ w[4] === 110)) // arsen
237
+ )
238
+ r1 = 5;
239
+ else if (l >= 6 &&
240
+ w[0] === 99 && // c
241
+ w[1] === 111 && // o
242
+ w[2] === 109 && // m
243
+ w[3] === 109 && // m
244
+ w[4] === 117 && // u
245
+ w[5] === 110 // n
246
+ )
247
+ // commun
248
+ r1 = 6;
249
+ else {
250
+ // > R1 is the region after the first non-vowel following a vowel,
251
+ // > or the end of the word if there is no such non-vowel.
252
+ while (r1 < l && isV(w[r1]))
253
+ ++r1;
254
+ if (r1 < l)
255
+ ++r1;
256
+ }
257
+ // > R2 is the region after the first non-vowel following a vowel in R1,
258
+ // > or the end of the word if there is no such non-vowel.
259
+ let r2 = r1;
260
+ while (r2 < l && !isV(w[r2]))
261
+ ++r2;
262
+ while (r2 < l && isV(w[r2]))
263
+ ++r2;
264
+ if (r2 < l)
265
+ ++r2;
266
+ // Step_1a
267
+ if (l >= 3) {
268
+ if (w[l - 1] === 115) {
269
+ // s
270
+ if (l >= 4 && w[l - 2] === 101 && w[l - 3] === 115 && w[l - 4] === 115)
271
+ // sses
272
+ l -= 2; // sses -> ss
273
+ else if (w[l - 2] === 101 && w[l - 3] === 105)
274
+ // ies
275
+ l -= l >= 5 ? 2 : 1; // ies
276
+ else if (w[l - 2] !== 117 && w[l - 2] !== 115 && rv < l - 1)
277
+ // us ss -> <nothing>; s -> "delete if the preceding word part
278
+ // contains a vowel not immediately before the s"
279
+ l -= 1;
280
+ }
281
+ else if (w[l - 1] === 100 && w[l - 2] === 101 && w[l - 3] === 105)
282
+ l -= l >= 5 ? 2 : 1; // ied
283
+ }
284
+ // exception2
285
+ if ((l === 6 &&
286
+ ((w[0] === 105 && // i
287
+ w[1] === 110 && // n
288
+ w[2] === 110 && // n
289
+ w[3] === 105 && // i
290
+ w[4] === 110 && // n
291
+ w[5] === 103) || // g (inning)
292
+ (w[0] === 111 && // o
293
+ w[1] === 117 && // u
294
+ w[2] === 116 && // t
295
+ w[3] === 105 && // i
296
+ w[4] === 110 && // n
297
+ w[5] === 103) || // g (outing)
298
+ (w[0] === 101 && // e
299
+ w[1] === 120 && // x
300
+ w[2] === 99 && // c
301
+ w[3] === 101 && // e
302
+ w[4] === 101 && // e
303
+ w[5] === 100))) || // d (exceed)
304
+ (l === 7 &&
305
+ ((w[0] === 99 && // c
306
+ w[1] === 97 && // a
307
+ w[2] === 110 && // n
308
+ w[3] === 110 && // n
309
+ w[4] === 105 && // i
310
+ w[5] === 110 && // n
311
+ w[6] === 103) || // g (canning)
312
+ (w[0] === 104 && // h
313
+ w[1] === 101 && // e
314
+ w[2] === 114 && // r
315
+ w[3] === 114 && // r
316
+ w[4] === 105 && // i
317
+ w[5] === 110 && // n
318
+ w[6] === 103) || // g (herring)
319
+ (w[0] === 101 && // e
320
+ w[1] === 97 && // a
321
+ w[2] === 114 && // r
322
+ w[3] === 114 && // r
323
+ w[4] === 105 && // i
324
+ w[5] === 110 && // n
325
+ w[6] === 103) || // g (earring)
326
+ (w[0] === 112 && // p
327
+ w[1] === 114 && // r
328
+ w[2] === 111 && // o
329
+ w[3] === 99 && // c
330
+ w[4] === 101 && // e
331
+ w[5] === 101 && // e
332
+ w[6] === 100) || // d (proceed)
333
+ (w[0] === 115 && // s
334
+ w[1] === 117 && // u
335
+ w[2] === 99 && // c
336
+ w[3] === 99 && // c
337
+ w[4] === 101 && // e
338
+ w[5] === 101 && // e
339
+ w[6] === 100))) // d (succeed)
340
+ ) {
341
+ let exp2Out = "";
342
+ for (let i = 0; i < l; ++i)
343
+ exp2Out += String.fromCharCode(w[i]);
344
+ return exp2Out;
345
+ }
346
+ // Step_1b
347
+ let ll =
348
+ // l (length) without the -ly ending
349
+ l >= 2 && w[l - 1] === 121 && w[l - 2] === 108 ? l - 2 : l;
350
+ if (ll >= 3) {
351
+ if (w[ll - 3] === 101 && w[ll - 2] === 101 && w[ll - 1] === 100) {
352
+ // eed
353
+ if (ll >= r1 + 3)
354
+ l = ll - 1; // eed eedly -> ee (if in R1)
355
+ }
356
+ else {
357
+ // ll without: ed edly ing ingly (-1 if not found)
358
+ if (w[ll - 2] === 101 && w[ll - 1] === 100)
359
+ ll -= 2; // ed
360
+ else if (w[ll - 3] === 105 && w[ll - 2] === 110 && w[ll - 1] === 103)
361
+ ll -= 3; // ing
362
+ else
363
+ ll = -1;
364
+ if (ll >= 0 && rv <= ll) {
365
+ l = ll;
366
+ if (l >= 2) {
367
+ if ((w[l - 1] === 116 && w[l - 2] === 97) || // at
368
+ (w[l - 1] === 108 && w[l - 2] === 98) || // bl
369
+ (w[l - 1] === 122 && w[l - 2] === 105) // iz
370
+ ) {
371
+ // at -> ate bl -> ble iz -> ize
372
+ w[l] = 101;
373
+ ++l;
374
+ }
375
+ else if (w[l - 2] === w[l - 1] && isDouble(w[l - 1])) {
376
+ --l;
377
+ }
378
+ else if (r1 >= l && isShortV(w, l)) {
379
+ // <shortv> -> e
380
+ w[l] = 101;
381
+ ++l;
382
+ }
383
+ }
384
+ }
385
+ }
386
+ }
387
+ // Step_1c
388
+ if (l >= 3 && (w[l - 1] === 89 || w[l - 1] === 121) && !isV(w[l - 2]))
389
+ w[l - 1] = 105; // i
390
+ // Step_2
391
+ if (l >= r1 + 2) {
392
+ switch (w[l - 1]) {
393
+ case 108: // l
394
+ if (l >= r1 + 6 &&
395
+ w[l - 2] === 97 && // a
396
+ w[l - 3] === 110 && // n
397
+ w[l - 4] === 111 && // o
398
+ w[l - 5] === 105 && // i
399
+ w[l - 6] === 116 // t (tional)
400
+ ) {
401
+ if (l >= 7 && w[l - 7] === 97) {
402
+ // a (ational)
403
+ if (l >= r1 + 7) {
404
+ // ational -> ate
405
+ l -= 4;
406
+ w[l - 1] = 101; // e
407
+ }
408
+ }
409
+ else {
410
+ l -= 2; // tional -> tion
411
+ }
412
+ }
413
+ break;
414
+ case 110: // n
415
+ if (l >= r1 + 5 &&
416
+ w[l - 2] === 111 && // o
417
+ w[l - 3] === 105 && // i
418
+ w[l - 4] === 116 && // t
419
+ w[l - 5] === 97 // a (ation)
420
+ ) {
421
+ if (l >= 7 && w[l - 6] === 122 && w[l - 7] === 105) {
422
+ // iz (ization)
423
+ if (l >= r1 + 7) {
424
+ // ization -> ize
425
+ l -= 4;
426
+ w[l - 1] = 101; // e
427
+ }
428
+ }
429
+ else {
430
+ // ation -> ate
431
+ l -= 2;
432
+ w[l - 1] = 101; // e
433
+ }
434
+ }
435
+ break;
436
+ case 114: // r
437
+ if (l >= r1 + 4) {
438
+ if (w[l - 2] === 101) {
439
+ // e (er)
440
+ if (w[l - 3] === 122 && w[l - 4] === 105)
441
+ --l; // izer -> ize
442
+ }
443
+ else if (w[l - 2] === 111) {
444
+ // o (or)
445
+ if (w[l - 3] === 116 && w[l - 4] === 97) {
446
+ // ator
447
+ --l;
448
+ w[l - 1] = 101; // e
449
+ }
450
+ }
451
+ }
452
+ break;
453
+ case 115: // s
454
+ if (l >= r1 + 7 &&
455
+ w[l - 2] === 115 && // s
456
+ w[l - 3] === 101 && // e
457
+ w[l - 4] === 110 && // n (ness)
458
+ ((w[l - 5] === 108 && w[l - 6] === 117 && w[l - 7] === 102) || // fulness
459
+ (w[l - 5] === 115 && w[l - 6] === 117 && w[l - 7] === 111) || // ousness
460
+ (w[l - 5] === 101 && w[l - 6] === 118 && w[l - 7] === 105)) // iveness
461
+ ) {
462
+ l -= 4; // fulness -> ful ousness -> ous iveness -> ive
463
+ }
464
+ break;
465
+ case 109: // m
466
+ if (l >= r1 + 5 &&
467
+ w[l - 2] === 115 && // s
468
+ w[l - 3] === 105 && // i
469
+ w[l - 4] === 108 && // l
470
+ w[l - 5] === 97 // a (alism)
471
+ )
472
+ l -= 3; // alism -> al
473
+ break;
474
+ case 105: // i
475
+ if (w[l - 2] === 99) {
476
+ // c (ic)
477
+ if (l >= r1 + 4 &&
478
+ (w[l - 4] === 101 || w[l - 4] === 97) &&
479
+ w[l - 3] === 110) {
480
+ // enci anci
481
+ w[l - 1] = 101; // enci -> ence anci -> ance
482
+ }
483
+ }
484
+ else if (w[l - 2] === 103) {
485
+ // g (gi)
486
+ if (l >= r1 + 3 &&
487
+ l >= 4 &&
488
+ w[l - 2] === 103 &&
489
+ w[l - 3] === 111 &&
490
+ w[l - 4] === 108)
491
+ // logi
492
+ --l; // ogi -> og (if preceded by l)
493
+ }
494
+ else if (w[l - 2] === 116) {
495
+ // t (ti)
496
+ if (l >= r1 + 5 && w[l - 3] === 105) {
497
+ // iti
498
+ if (w[l - 4] === 108) {
499
+ // liti
500
+ if (l >= 6 && w[l - 5] === 105 && w[l - 6] === 98) {
501
+ // biliti
502
+ if (l >= r1 + 6) {
503
+ // biliti -> ble
504
+ l -= 3;
505
+ w[l - 2] = 108; // l
506
+ w[l - 1] = 101; // e
507
+ }
508
+ }
509
+ else if (w[l - 4] === 108 && w[l - 5] === 97) {
510
+ // aliti
511
+ l -= 3; // aliti -> al
512
+ }
513
+ }
514
+ else if (w[l - 4] === 118 && w[l - 5] === 105) {
515
+ // iviti
516
+ // iviti -> ive
517
+ l -= 2;
518
+ w[l - 1] = 101; // e
519
+ }
520
+ }
521
+ }
522
+ else if (w[l - 2] === 108 && l >= 3) {
523
+ // l (li)
524
+ if (w[l - 3] === 98) {
525
+ // bli
526
+ if (l >= 4 && w[l - 4] === 97) {
527
+ // abli
528
+ if (l >= r1 + 4)
529
+ w[l - 1] = 101; // abli -> able
530
+ }
531
+ else if (l >= r1 + 3) {
532
+ w[l - 1] = 101; // bli -> ble
533
+ }
534
+ }
535
+ else {
536
+ // Remove li
537
+ if (w[l - 3] === 108) {
538
+ // lli
539
+ if (l >= 5 && w[l - 4] === 117 && w[l - 5] === 102) {
540
+ // fulli
541
+ if (l >= r1 + 5)
542
+ l -= 2; // fulli -> ful
543
+ }
544
+ else if (l >= r1 + 4 && w[l - 4] === 97) {
545
+ // alli
546
+ l -= 2; // alli -> al
547
+ }
548
+ }
549
+ else if (w[l - 3] === 115) {
550
+ // sli
551
+ if (l >= 6 &&
552
+ w[l - 4] === 115 &&
553
+ w[l - 5] === 101 &&
554
+ w[l - 6] === 108) {
555
+ // lessli
556
+ if (l >= r1 + 6)
557
+ l -= 2; // lessli -> less
558
+ }
559
+ else if (l >= r1 + 5 && w[l - 4] === 117 && w[l - 5] === 111) {
560
+ // ousli
561
+ l -= 2; // ousli -> ous
562
+ }
563
+ }
564
+ else if (l >= 5 &&
565
+ w[l - 3] === 116 &&
566
+ w[l - 4] === 110 &&
567
+ w[l - 5] === 101) {
568
+ // entli
569
+ if (l >= r1 + 5)
570
+ l -= 2; // entli -> ent
571
+ }
572
+ else if (isValidLi(w[l - 3])) {
573
+ l -= 2;
574
+ }
575
+ }
576
+ }
577
+ }
578
+ }
579
+ // Step_3
580
+ if (l >= r1 + 3) {
581
+ switch (w[l - 1]) {
582
+ case 108: // l
583
+ if (w[l - 3] === 99) {
584
+ // cal
585
+ if (l >= r1 + 4 && w[l - 4] === 105 && w[l - 2] === 97)
586
+ l -= 2; // ical -> ic
587
+ }
588
+ else if (w[l - 3] === 102) {
589
+ // ful
590
+ if (w[l - 2] === 117)
591
+ l -= 3; // ful -> <delete>
592
+ }
593
+ else if (w[l - 3] === 110) {
594
+ // nal
595
+ if (l >= r1 + 6 &&
596
+ w[l - 2] === 97 && // a
597
+ w[l - 4] === 111 && // o
598
+ w[l - 5] === 105 && // i
599
+ w[l - 6] === 116 // t (tional)
600
+ ) {
601
+ if (l >= 7 && w[l - 7] === 97) {
602
+ // ational
603
+ if (l >= r1 + 7) {
604
+ // ational -> ate
605
+ l -= 4;
606
+ w[l - 1] = 101; // e
607
+ }
608
+ }
609
+ else {
610
+ l -= 2; // tional -> tion
611
+ }
612
+ }
613
+ }
614
+ break;
615
+ case 101: // e
616
+ if (w[l - 2] === 122) {
617
+ // ze
618
+ if (l >= r1 + 5 &&
619
+ w[l - 3] === 105 &&
620
+ w[l - 4] === 108 &&
621
+ w[l - 5] === 97)
622
+ l -= 3; // alize -> al
623
+ }
624
+ else if (w[l - 2] === 116) {
625
+ // te
626
+ if (l >= r1 + 5 &&
627
+ w[l - 3] === 97 &&
628
+ w[l - 4] === 99 &&
629
+ w[l - 5] === 105)
630
+ l -= 3; // icate -> ic
631
+ }
632
+ else if (w[l - 2] === 118) {
633
+ // ve
634
+ if (l >= r2 + 5 &&
635
+ w[l - 3] === 105 &&
636
+ w[l - 4] === 116 &&
637
+ w[l - 5] === 97)
638
+ l -= 5; // ative -> <delete> (if in R2)
639
+ }
640
+ break;
641
+ case 105: // i
642
+ if (l >= r1 + 5 &&
643
+ w[l - 2] === 116 && // t
644
+ w[l - 3] === 105 && // i
645
+ w[l - 4] === 99 && // c
646
+ w[l - 5] === 105 // i (iciti)
647
+ )
648
+ l -= 3; // iciti -> ic
649
+ break;
650
+ case 115: // s
651
+ if (l >= r1 + 4 &&
652
+ w[l - 2] === 115 &&
653
+ w[l - 3] === 101 &&
654
+ w[l - 4] === 110)
655
+ l -= 4; // ness -> <delete>
656
+ }
657
+ }
658
+ // Step_4
659
+ if (l >= r2 + 2) {
660
+ switch (w[l - 1]) {
661
+ case 110: // n
662
+ if (l >= r2 + 3 &&
663
+ w[l - 2] === 111 && // o
664
+ w[l - 3] === 105 && // i (ion)
665
+ (w[l - 4] === 115 || w[l - 4] === 116) // s or t
666
+ )
667
+ l -= 3; // ion -> <delete> (if preceded by s or t)
668
+ break;
669
+ case 108: // l
670
+ if (w[l - 2] === 97)
671
+ l -= 2; // al
672
+ break;
673
+ case 114: // r
674
+ if (w[l - 2] === 101)
675
+ l -= 2; // er
676
+ break;
677
+ case 99: // c
678
+ if (w[l - 2] === 105)
679
+ l -= 2; // ic
680
+ break;
681
+ case 109: // m
682
+ if (l >= r2 + 3 && w[l - 2] === 115 && w[l - 3] === 105)
683
+ l -= 3; // ism
684
+ break;
685
+ case 105: // i
686
+ if (l >= r2 + 3 && w[l - 2] === 116 && w[l - 3] === 105)
687
+ l -= 3; // iti
688
+ break;
689
+ case 115: // s
690
+ if (l >= r2 + 3 && w[l - 2] === 117 && w[l - 3] === 111)
691
+ l -= 3; // ous
692
+ break;
693
+ case 116: // t
694
+ if (l >= r2 + 3 && w[l - 2] === 110) {
695
+ // nt
696
+ if (w[l - 3] === 97) {
697
+ // ant
698
+ l -= 3; // ant
699
+ }
700
+ else if (w[l - 3] === 101) {
701
+ // ent
702
+ if (l >= 4 && w[l - 4] === 109) {
703
+ // ment
704
+ if (l >= 5 && w[l - 5] === 101) {
705
+ // ement
706
+ if (l >= r2 + 5)
707
+ l -= 5; // ement
708
+ }
709
+ else if (l >= r2 + 4) {
710
+ l -= 4; // ment
711
+ }
712
+ }
713
+ else {
714
+ l -= 3; // ent
715
+ }
716
+ }
717
+ }
718
+ break;
719
+ case 101: // e
720
+ if (w[l - 2] === 99) {
721
+ // ce
722
+ if (l >= r2 + 4 &&
723
+ w[l - 3] === 110 &&
724
+ (w[l - 4] === 97 || w[l - 4] === 101))
725
+ l -= 4; // ance ence
726
+ }
727
+ else if (w[l - 2] === 108) {
728
+ // le
729
+ if (l >= r2 + 4 &&
730
+ w[l - 3] === 98 &&
731
+ (w[l - 4] === 97 || w[l - 4] === 105))
732
+ l -= 4; // able ible
733
+ }
734
+ else if (w[l - 2] === 116) {
735
+ // te
736
+ if (l >= r2 + 3 && w[l - 3] === 97)
737
+ l -= 3; // ate
738
+ }
739
+ else if (l >= r2 + 3 &&
740
+ (w[l - 2] === 118 || w[l - 2] === 122) &&
741
+ w[l - 3] === 105) {
742
+ // ive ize
743
+ l -= 3; // ive ize
744
+ }
745
+ }
746
+ }
747
+ // Step_5
748
+ if (l >= r1 + 1 && // r1 is >= 1
749
+ ((l >= r2 + 1 && w[l - 1] === 108 && w[l - 2] === 108) || // ll
750
+ (w[l - 1] === 101 && (l >= r2 + 1 || !isShortV(w, l - 1)))) // e
751
+ )
752
+ --l;
753
+ let out = "";
754
+ if (yFound) {
755
+ for (let i = 0; i < l; ++i) {
756
+ out += String.fromCharCode(w[i] === 89 ? 121 : w[i]); // Y -> y
757
+ }
758
+ }
759
+ else {
760
+ for (let i = 0; i < l; ++i)
761
+ out += String.fromCharCode(w[i]);
762
+ }
763
+ return out;
764
+ };
765
+ // #endregion Porter2 Stemmer Algorithm
766
+ // src/constants.ts
767
+ const DEFAULT_OPTIONS = {
768
+ k1: 1.2,
769
+ b: 0.75,
770
+ minLength: 2,
771
+ stopWords: /* @__PURE__ */ new Set([
772
+ "a",
773
+ "an",
774
+ "and",
775
+ "are",
776
+ "as",
777
+ "at",
778
+ "be",
779
+ "by",
780
+ "for",
781
+ "from",
782
+ "has",
783
+ "he",
784
+ "in",
785
+ "is",
786
+ "it",
787
+ "its",
788
+ "of",
789
+ "on",
790
+ "that",
791
+ "the",
792
+ "to",
793
+ "was",
794
+ "were",
795
+ "will",
796
+ "with",
797
+ ]),
798
+ stemming: false,
799
+ stemWords: (word) => word,
800
+ };
801
+ /**
802
+ * Flexible text tokenizer with support for stop words, minimum token length,
803
+ * Unicode normalization, and optional Porter2 stemming with custom rules.
804
+ */
805
+ export class Tokenizer {
806
+ /** Set of stop words to ignore. */
807
+ stopWords;
808
+ /** Minimum length of tokens to keep. */
809
+ minLength;
810
+ /** Flag indicating if stemming is enabled. */
811
+ stemming;
812
+ /** Custom stemming rules. */
813
+ stemmingRules;
814
+ /** Default options for the Tokenizer. */
815
+ static DEFAULT_OPTIONS = {
816
+ stopWords: /* @__PURE__ */ new Set(),
817
+ minLength: 2,
818
+ stemming: false,
819
+ stemmingRules: [],
820
+ };
821
+ /**
822
+ * Creates a new tokenizer instance.
823
+ * @param options - Tokenization options including stop words, min length, stemming, and custom rules.
824
+ */
825
+ constructor(options = {}) {
826
+ const mergedOptions = { ...Tokenizer.DEFAULT_OPTIONS, ...options };
827
+ this.stopWords = mergedOptions.stopWords;
828
+ this.minLength = mergedOptions.minLength;
829
+ this.stemming = mergedOptions.stemming;
830
+ // Ensure all rule patterns are RegExp objects
831
+ this.stemmingRules = mergedOptions.stemmingRules.map((rule) => ({
832
+ ...rule,
833
+ pattern: typeof rule.pattern === "string"
834
+ ? new RegExp(rule.pattern)
835
+ : rule.pattern,
836
+ }));
837
+ }
838
+ /**
839
+ * Tokenizes input text into an array of processed terms.
840
+ * Steps:
841
+ * 1. Cleans the text (lowercase, normalize, remove punctuation/symbols).
842
+ * 2. Splits the text into potential tokens.
843
+ * 3. Filters tokens based on `minLength` and `stopWords`.
844
+ * 4. Applies stemming if `stemming` is true (custom rules first, then Porter2).
845
+ * 5. Optionally calculates statistics.
846
+ *
847
+ * @param text - The input text string to tokenize.
848
+ * @param includeStats - If true, returns tokenization statistics along with tokens. Defaults to false.
849
+ * @returns A `TokenizationResult` object containing the array of tokens and optional stats.
850
+ * @throws {Error} If the input text is null, undefined, or empty.
851
+ */
852
+ tokenize(text, includeStats = false) {
853
+ if (!text) {
854
+ throw new Error("Input text cannot be null or empty");
855
+ }
856
+ const startTime = includeStats ? Date.now() : 0;
857
+ const cleaned = this.cleanText(text);
858
+ const tokens = cleaned
859
+ .split(/\s+/)
860
+ .filter((token) => this.isValidToken(token))
861
+ .map((token) => (this.stemming ? this.stemWord(token) : token));
862
+ let stats;
863
+ if (includeStats) {
864
+ const originalWords = text.split(/\s+/).filter((word) => word.length > 0);
865
+ stats = {
866
+ originalWordCount: originalWords.length,
867
+ stopWordsRemoved: originalWords.length - tokens.length, // This might be incorrect if stemming changes token count
868
+ stemmedWords: this.stemming ? tokens.length : 0,
869
+ processingTimeMs: Date.now() - startTime,
870
+ };
871
+ }
872
+ return { tokens, stats };
873
+ }
874
+ /**
875
+ * Cleans and normalizes text for tokenization.
876
+ * - Converts to lowercase.
877
+ * - Normalizes Unicode characters (NFKD).
878
+ * - Removes control characters and zero-width spaces.
879
+ * - Removes diacritical marks (accents).
880
+ * - Removes emojis and pictographs.
881
+ * - Removes common symbols (™, ®, ©, ℠, ‼).
882
+ * - Replaces Unicode punctuation with spaces.
883
+ * - Removes characters not matching basic Latin, CJK, Hangul, or whitespace.
884
+ * - Collapses multiple spaces into single spaces.
885
+ * - Trims leading/trailing whitespace.
886
+ *
887
+ * @param text - Input text to clean.
888
+ * @returns Cleaned and normalized text, ready for splitting into tokens.
889
+ *
890
+ * @example
891
+ * cleanText("Hello, World™!") // "hello world"
892
+ * cleanText("héllo 👋") // "hello"
893
+ * cleanText("Hello 世界!") // "hello 世界"
894
+ * cleanText("I'm don't") // "i'm don't" (apostrophes kept by replacing punctuation with space)
895
+ * cleanText("test©2023") // "test 2023"
896
+ */
897
+ cleanText(text) {
898
+ return (text
899
+ .toLowerCase()
900
+ .normalize("NFKD")
901
+ // biome-ignore lint/suspicious/noControlCharactersInRegex: Intentionally matching control characters to remove them
902
+ .replace(/[\u0000-\u001F\u007F-\u009F\u200B-\u200D\uFEFF]/g, "") // Control characters & zero-width spaces
903
+ .replace(/[\u0300-\u036f]/g, "") // Diacritical marks
904
+ .replace(/[\p{Emoji_Presentation}\p{Extended_Pictographic}]/gu, "") // Emojis and pictographs
905
+ .replace(/[™®©℠‼]/g, "") // Common symbols
906
+ .replace(/[\p{P}]/gu, " ") // Unicode punctuation to space
907
+ .replace(/[^a-z0-9\u3040-\u30FF\u3400-\u4DBF\u4E00-\u9FFF\uAC00-\uD7AF\s]/gu, " ") // Keep only latin, cjk, hangul, numbers, whitespace
908
+ .replace(/\s+/g, " ") // Collapse multiple spaces
909
+ .trim());
910
+ }
911
+ /**
912
+ * Checks if a token is valid (meets `minLength` criteria and is not a stop word).
913
+ * Numeric tokens are always considered valid regardless of length.
914
+ * @param token - The token string to validate.
915
+ * @returns `true` if the token is valid, `false` otherwise.
916
+ */
917
+ isValidToken(token) {
918
+ const isNumeric = /^\d+$/.test(token);
919
+ return ((token.length >= this.minLength || isNumeric) &&
920
+ !this.stopWords.has(token));
921
+ }
922
+ /**
923
+ * Applies stemming to a single word.
924
+ * First, tries to apply custom stemming rules defined in `stemmingRules`.
925
+ * If no custom rule matches, applies the default Porter2 stemming algorithm.
926
+ * Words shorter than 3 characters are not stemmed.
927
+ * @param word - The word to stem.
928
+ * @returns The stemmed word.
929
+ */
930
+ stemWord(word) {
931
+ if (word.length < 3)
932
+ return word;
933
+ let customRuleApplied = false;
934
+ let stemmed = word;
935
+ for (const rule of this.stemmingRules) {
936
+ const match = stemmed.match(rule.pattern);
937
+ if (match) {
938
+ if (!rule.minMeasure ||
939
+ this.measure(stemmed.substring(0, match.index)) >= rule.minMeasure) {
940
+ // Apply replacement
941
+ if (typeof rule.replacement === "string") {
942
+ stemmed = stemmed.replace(rule.pattern, rule.replacement);
943
+ }
944
+ else {
945
+ // If replacement is a function, it might need more specific arguments based on its definition.
946
+ // Assuming it takes the matched substring and potentially other match groups.
947
+ stemmed = stemmed.replace(rule.pattern, (...args) => rule.replacement(...args));
948
+ }
949
+ customRuleApplied = true; // Mark that a custom rule was (potentially) applied
950
+ // Depending on stemming strategy, might want to break or continue applying rules
951
+ }
952
+ }
953
+ }
954
+ // If a custom rule was applied and modified the word, return it.
955
+ // Otherwise, or if custom rules are meant to precede default stemming, apply Porter2.
956
+ if (customRuleApplied && stemmed !== word)
957
+ return stemmed; // Return if custom rule changed the word
958
+ // Fallback to Porter2 if no custom rule applied or if custom rules are pre-processing
959
+ return stem(stemmed); // Apply Porter2 to the (potentially already custom-stemmed) word
960
+ }
961
+ /**
962
+ * Checks if the character at a given index in a word is a consonant.
963
+ * Treats 'y' as a consonant if it's the first letter or follows a consonant.
964
+ * @param word - The word string.
965
+ * @param i - The index of the character to check.
966
+ * @returns `true` if the character is a consonant, `false` otherwise.
967
+ */
968
+ isConsonant(word, i) {
969
+ const char = word[i];
970
+ if ("aeiou".includes(char))
971
+ return false;
972
+ return char !== "y" || (i === 0 ? true : !this.isConsonant(word, i - 1));
973
+ }
974
+ /**
975
+ * Calculates the "measure" of a word stem (approximates syllable count).
976
+ * The measure (m) is the number of times a sequence of vowels is followed by a
977
+ * sequence of consonants (VC). Used in some stemming rules.
978
+ * Example: measure("tree") = 0, measure("trouble") = 1, measure("private") = 2
979
+ * @param word - The word (or stem) to measure.
980
+ * @returns The measure (m) of the word.
981
+ */
982
+ measure(word) {
983
+ let m = 0;
984
+ let vowelSeen = false;
985
+ for (let i = 0; i < word.length; i++) {
986
+ if (this.isConsonant(word, i)) {
987
+ if (vowelSeen) {
988
+ m++;
989
+ vowelSeen = false;
990
+ }
991
+ }
992
+ else {
993
+ vowelSeen = true;
994
+ }
995
+ }
996
+ return m;
997
+ }
998
+ }
999
+ /**
1000
+ * Implements the Okapi BM25 (Best Matching 25) ranking function for information retrieval.
1001
+ *
1002
+ * BM25 ranks documents based on the query terms appearing in each document,
1003
+ * considering term frequency (TF) and inverse document frequency (IDF).
1004
+ * It improves upon basic TF-IDF by incorporating:
1005
+ * - Term Frequency Saturation (k1): Prevents overly frequent terms from dominating the score.
1006
+ * - Document Length Normalization (b): Penalizes documents that are longer than average,
1007
+ * assuming longer documents are more likely to contain query terms by chance.
1008
+ *
1009
+ * Key Components:
1010
+ * - Tokenizer: Processes text into terms (words), handles stop words and stemming.
1011
+ * - Document Indexing: Stores document lengths, term frequencies per document,
1012
+ * and overall document frequency for each term.
1013
+ * - IDF Calculation: Measures the informativeness of a term based on how many documents contain it.
1014
+ * - Scoring: Combines TF, IDF, document length, and parameters k1/b to calculate relevance.
1015
+ */
1016
+ export class BM25 {
1017
+ /** Term frequency saturation parameter (k1). */
1018
+ termFrequencySaturation; // k1
1019
+ /** Document length normalization factor (b). */
1020
+ lengthNormalizationFactor; // b
1021
+ /** Tokenizer instance used for processing text. */
1022
+ tokenizer;
1023
+ /** Array storing the length (number of tokens, adjusted by field boosts) of each document. */
1024
+ documentLengths;
1025
+ /** Average length of all documents in the index. */
1026
+ averageDocLength;
1027
+ /** Map from term (string) to its unique integer index. */
1028
+ termToIndex;
1029
+ /** Array storing the document frequency (number of docs containing the term) for each term index. */
1030
+ documentFrequency; // DF for each term index
1031
+ /** Map from term index to another map storing `docIndex: termFrequencyInDoc`. */
1032
+ termFrequencies; // TermIndex -> { DocIndex -> TF }
1033
+ /** Boost factors for different fields within documents. */
1034
+ fieldBoosts;
1035
+ /** Array storing the original documents added to the index. */
1036
+ documents;
1037
+ /**
1038
+ * Creates a new BM25 search instance.
1039
+ * @param docs - Optional array of initial documents (objects with string fields) to index.
1040
+ * @param options - Configuration options for BM25 parameters (k1, b), tokenizer (stopWords, stemming, minLength), and field boosts.
1041
+ */
1042
+ constructor(docs, options = {}) {
1043
+ const opts = { ...DEFAULT_OPTIONS, ...options };
1044
+ this.termFrequencySaturation = opts.k1 ?? 1.2;
1045
+ this.lengthNormalizationFactor = opts.b ?? 0.75;
1046
+ this.tokenizer = new Tokenizer(opts);
1047
+ this.fieldBoosts = opts.fieldBoosts || {};
1048
+ // Initialize index structures
1049
+ this.documents = [];
1050
+ this.documentLengths = new Uint32Array(0);
1051
+ this.termToIndex = new Map();
1052
+ this.documentFrequency = new Uint32Array(0); // Will be sized later
1053
+ this.averageDocLength = 0;
1054
+ this.termFrequencies = new Map(); // TermIndex -> { DocIndex -> TF }
1055
+ // Index initial documents if provided
1056
+ if (docs && docs.length > 0) {
1057
+ this.documents = [...docs]; // Store original documents
1058
+ const { documentLengths, termToIndex, documentFrequency, averageDocLength, termFrequencies, } = this.processDocuments(docs);
1059
+ // Assign processed data to instance properties
1060
+ this.documentLengths = documentLengths;
1061
+ this.termToIndex = termToIndex;
1062
+ this.documentFrequency = documentFrequency;
1063
+ this.averageDocLength = averageDocLength;
1064
+ this.termFrequencies = termFrequencies;
1065
+ }
1066
+ }
1067
+ /**
1068
+ * Processes an array of documents to build the initial index structures.
1069
+ * Calculates document lengths, term frequencies, document frequencies, and average document length.
1070
+ * @param docs - Array of documents to process.
1071
+ * @returns An object containing the calculated index data.
1072
+ * @internal
1073
+ */
1074
+ processDocuments(docs) {
1075
+ const numDocs = docs.length;
1076
+ const documentLengths = new Uint32Array(numDocs);
1077
+ const termToIndex = new Map();
1078
+ const termDocs = new Map(); // Temp map: Term -> Set<DocIndex>
1079
+ const termFrequencies = new Map(); // TermIndex -> { DocIndex -> TF }
1080
+ let totalDocLength = 0;
1081
+ let nextTermIndex = 0;
1082
+ docs.forEach((doc, docIndex) => {
1083
+ let currentDocLength = 0;
1084
+ const docTermFrequencies = new Map(); // TermIndex -> TF for this doc
1085
+ // Iterate through fields of the document
1086
+ for (const field in doc) {
1087
+ const content = doc[field];
1088
+ if (typeof content !== "string")
1089
+ continue; // Skip non-string fields
1090
+ const fieldBoost = this.fieldBoosts[field] || 1;
1091
+ const { tokens } = this.tokenizer.tokenize(content);
1092
+ const fieldLength = tokens.length * fieldBoost;
1093
+ currentDocLength += fieldLength;
1094
+ // Calculate term frequencies within this field/doc
1095
+ tokens.forEach((term) => {
1096
+ // Assign index to new terms
1097
+ if (!termToIndex.has(term)) {
1098
+ termToIndex.set(term, nextTermIndex++);
1099
+ }
1100
+ const termIndexVal = termToIndex.get(term);
1101
+ // Track which documents contain the term
1102
+ let termDocsTerm = termDocs.get(term);
1103
+ if (!termDocsTerm) {
1104
+ termDocsTerm = new Set();
1105
+ termDocs.set(term, termDocsTerm);
1106
+ }
1107
+ termDocsTerm.add(docIndex);
1108
+ // Increment frequency for this term in this document
1109
+ const currentFreq = docTermFrequencies.get(termIndexVal) || 0;
1110
+ docTermFrequencies.set(termIndexVal, currentFreq + fieldBoost); // TF weighted by boost
1111
+ });
1112
+ }
1113
+ // Store the calculated length for this document
1114
+ documentLengths[docIndex] = currentDocLength;
1115
+ totalDocLength += currentDocLength;
1116
+ // Merge this document's term frequencies into the main structure
1117
+ docTermFrequencies.forEach((freq, termIndexVal) => {
1118
+ if (!termFrequencies.has(termIndexVal)) {
1119
+ termFrequencies.set(termIndexVal, new Map());
1120
+ }
1121
+ const termFrequenciesTermIndexVal = termFrequencies.get(termIndexVal);
1122
+ if (termFrequenciesTermIndexVal) {
1123
+ termFrequenciesTermIndexVal.set(docIndex, freq);
1124
+ }
1125
+ });
1126
+ });
1127
+ // Calculate document frequency (DF) for each term
1128
+ const documentFrequency = new Uint32Array(termToIndex.size);
1129
+ termDocs.forEach((docsSet, term) => {
1130
+ const termIndexVal = termToIndex.get(term);
1131
+ if (termIndexVal !== undefined) {
1132
+ documentFrequency[termIndexVal] = docsSet.size;
1133
+ }
1134
+ });
1135
+ return {
1136
+ documentLengths,
1137
+ termToIndex,
1138
+ documentFrequency,
1139
+ averageDocLength: numDocs > 0 ? totalDocLength / numDocs : 0,
1140
+ termFrequencies,
1141
+ };
1142
+ }
1143
+ /**
1144
+ * Recalculates the average document length based on the current `documentLengths`.
1145
+ * @internal
1146
+ */
1147
+ recalculateAverageLength() {
1148
+ if (this.documentLengths.length === 0) {
1149
+ this.averageDocLength = 0;
1150
+ return;
1151
+ }
1152
+ // Use the typed array's reduce method for type safety and performance
1153
+ const totalLength = this.documentLengths.reduce((sum, len) => sum + len, 0);
1154
+ this.averageDocLength = totalLength / this.documentLengths.length;
1155
+ }
1156
+ /**
1157
+ * Searches the indexed documents for a given query string using the BM25 ranking formula.
1158
+ *
1159
+ * @param query - The search query text.
1160
+ * @param topK - The maximum number of top-scoring results to return. Defaults to 10.
1161
+ * @returns An array of `SearchResult` objects, sorted by descending BM25 score.
1162
+ */
1163
+ search(query, topK = 10) {
1164
+ if (topK <= 0)
1165
+ return [];
1166
+ const { tokens: queryTokens } = this.tokenizer.tokenize(query); // Tokenize the query
1167
+ const scores = new Float32Array(this.documentLengths.length).fill(0); // Initialize scores to 0
1168
+ // Accumulate scores for each document based on query terms
1169
+ queryTokens.forEach((term) => {
1170
+ const termIndex = this.termToIndex.get(term);
1171
+ // Ignore terms not found in the index
1172
+ if (termIndex === undefined)
1173
+ return;
1174
+ const idf = this.calculateIdf(termIndex);
1175
+ // Skip terms with non-positive IDF (e.g., term in all docs)
1176
+ if (idf <= 0)
1177
+ return;
1178
+ const termFreqsInDocs = this.termFrequencies.get(termIndex); // Map<DocIndex, TF>
1179
+ if (!termFreqsInDocs)
1180
+ return; // Should not happen if termIndex exists, but check anyway
1181
+ // Iterate over documents containing this term
1182
+ termFreqsInDocs.forEach((tf, docIndex) => {
1183
+ const docLength = this.documentLengths[docIndex];
1184
+ // --- BM25 Term Score Calculation ---
1185
+ // Normalizes TF based on document length and saturation parameters.
1186
+ const numerator = tf * (this.termFrequencySaturation + 1);
1187
+ const denominator = tf +
1188
+ this.termFrequencySaturation *
1189
+ (1 -
1190
+ this.lengthNormalizationFactor +
1191
+ (this.lengthNormalizationFactor * docLength) /
1192
+ this.averageDocLength);
1193
+ // Add the weighted score (IDF * normalized TF) for this term to the document's total score
1194
+ scores[docIndex] += idf * (numerator / denominator);
1195
+ });
1196
+ });
1197
+ // --- Result Generation ---
1198
+ // Keep only topK results without sorting the full set.
1199
+ const results = [];
1200
+ for (let i = 0; i < scores.length; i++) {
1201
+ const score = scores[i];
1202
+ if (score <= 0)
1203
+ continue;
1204
+ const result = { index: i, score };
1205
+ if (results.length < topK) {
1206
+ results.push(result);
1207
+ if (results.length === topK) {
1208
+ results.sort((a, b) => b.score - a.score);
1209
+ }
1210
+ continue;
1211
+ }
1212
+ if (score <= results[results.length - 1].score)
1213
+ continue;
1214
+ let insertAt = results.length - 1;
1215
+ while (insertAt > 0 && results[insertAt - 1].score < score) {
1216
+ insertAt--;
1217
+ }
1218
+ results.splice(insertAt, 0, result);
1219
+ results.pop();
1220
+ }
1221
+ return results;
1222
+ }
1223
+ /**
1224
+ * Searches for an exact phrase within the indexed documents.
1225
+ * Ranks documents containing the exact sequence of tokens higher.
1226
+ * Basic implementation - proximity-based phrase search could improve results.
1227
+ *
1228
+ * @param phrase - The exact phrase to search for.
1229
+ * @param topK - The maximum number of results to return. Defaults to 10.
1230
+ * @returns An array of `SearchResult` objects, sorted by score, for documents containing the phrase.
1231
+ */
1232
+ searchPhrase(phrase, topK = 10) {
1233
+ const { tokens: phraseTokens } = this.tokenizer.tokenize(phrase); // Tokenize the phrase
1234
+ if (phraseTokens.length === 0)
1235
+ return []; // Cannot search for empty phrase
1236
+ // --- Find Candidate Documents ---
1237
+ // Start with documents containing the *first* term, then intersect with subsequent terms.
1238
+ let candidateDocs = null;
1239
+ for (const term of phraseTokens) {
1240
+ const termIndex = this.termToIndex.get(term);
1241
+ if (termIndex === undefined)
1242
+ return []; // Phrase cannot exist if any term is missing
1243
+ const termFrequenciesTermIndex = this.termFrequencies.get(termIndex);
1244
+ const docsContainingTermIter = termFrequenciesTermIndex?.keys();
1245
+ if (!docsContainingTermIter)
1246
+ return []; // Should not happen, but check
1247
+ const currentTermDocs = new Set(docsContainingTermIter);
1248
+ if (candidateDocs === null) {
1249
+ // First term initializes the candidates
1250
+ candidateDocs = currentTermDocs;
1251
+ }
1252
+ else {
1253
+ // Intersect: Keep only documents present in both sets
1254
+ candidateDocs = new Set([...candidateDocs].filter((docIdx) => currentTermDocs.has(docIdx)));
1255
+ }
1256
+ // If intersection becomes empty, the phrase cannot exist
1257
+ if (candidateDocs.size === 0)
1258
+ return [];
1259
+ }
1260
+ if (candidateDocs === null || candidateDocs.size === 0)
1261
+ return []; // No candidates found
1262
+ // --- Verify Phrase Occurrence and Score ---
1263
+ const scores = new Map(); // Map<DocIndex, Score>
1264
+ candidateDocs.forEach((docIndex) => {
1265
+ const doc = this.getDocument(docIndex); // Get the original document content
1266
+ let phraseFoundInDoc = false;
1267
+ // Check each field for the phrase
1268
+ for (const field in doc) {
1269
+ const content = doc[field];
1270
+ if (typeof content !== "string" || phraseFoundInDoc)
1271
+ continue; // Skip non-strings or if already found
1272
+ const fieldBoost = this.fieldBoosts[field] || 1;
1273
+ // Tokenize the field content using the same settings
1274
+ const { tokens: docTokens } = this.tokenizer.tokenize(content);
1275
+ // Simple sliding window check for the exact phrase sequence
1276
+ for (let i = 0; i <= docTokens.length - phraseTokens.length; i++) {
1277
+ let match = true;
1278
+ for (let j = 0; j < phraseTokens.length; j++) {
1279
+ if (docTokens[i + j] !== phraseTokens[j]) {
1280
+ match = false;
1281
+ break;
1282
+ }
1283
+ }
1284
+ if (match) {
1285
+ // Phrase found! Calculate score for this document based on the phrase terms
1286
+ const phraseScoreVal = this.calculatePhraseScore(phraseTokens, docIndex) * fieldBoost;
1287
+ scores.set(docIndex, (scores.get(docIndex) || 0) + phraseScoreVal);
1288
+ phraseFoundInDoc = true; // Only score once per doc even if phrase repeats
1289
+ break; // Move to next document once found in this one
1290
+ }
1291
+ }
1292
+ }
1293
+ });
1294
+ // --- Format and Sort Results ---
1295
+ return Array.from(scores.entries())
1296
+ .map(([index, score]) => ({ index, score }))
1297
+ .sort((a, b) => b.score - a.score) // Sort by score descending
1298
+ .slice(0, topK); // Limit results
1299
+ }
1300
+ /**
1301
+ * Calculates a BM25-like score for a sequence of phrase tokens within a specific document.
1302
+ * Sums the individual BM25 scores of the terms in the phrase for that document.
1303
+ * @param phraseTokens - The tokenized phrase.
1304
+ * @param docIndex - The index of the document to score against.
1305
+ * @returns The calculated phrase score for the document.
1306
+ * @internal
1307
+ */
1308
+ calculatePhraseScore(phraseTokens, docIndex) {
1309
+ return phraseTokens.reduce((currentScore, term) => {
1310
+ const termIndex = this.termToIndex.get(term);
1311
+ // Ignore terms not in index (shouldn't happen if candidate selection worked)
1312
+ if (termIndex === undefined)
1313
+ return currentScore;
1314
+ const idf = this.calculateIdf(termIndex);
1315
+ const termFrequenciesTermIndex = this.termFrequencies.get(termIndex);
1316
+ const tf = termFrequenciesTermIndex?.get(docIndex) || 0;
1317
+ const docLength = this.documentLengths[docIndex];
1318
+ // Calculate the BM25 contribution of this single term
1319
+ const numerator = tf * (this.termFrequencySaturation + 1);
1320
+ const denominator = tf +
1321
+ this.termFrequencySaturation *
1322
+ (1 -
1323
+ this.lengthNormalizationFactor +
1324
+ (this.lengthNormalizationFactor * docLength) /
1325
+ this.averageDocLength);
1326
+ // Add IDF * normalized TF to the total phrase score
1327
+ return currentScore + idf * (numerator / denominator);
1328
+ }, 0); // Start score at 0
1329
+ }
1330
+ /**
1331
+ * Adds a single new document to the index.
1332
+ * Updates all internal index structures incrementally.
1333
+ * For bulk additions, prefer `addDocumentsParallel` for better performance.
1334
+ *
1335
+ * @param doc - The document object (with string fields) to add.
1336
+ * @throws {Error} If the document is null or undefined.
1337
+ */
1338
+ async addDocument(doc) {
1339
+ if (!doc)
1340
+ throw new Error("Document cannot be null");
1341
+ const docIndex = this.documentLengths.length; // Index for the new document
1342
+ // --- Update Document List and Lengths ---
1343
+ this.documents.push(doc);
1344
+ // Resize documentLengths array (simple append)
1345
+ const newDocLengths = new Uint32Array(docIndex + 1);
1346
+ newDocLengths.set(this.documentLengths, 0); // Copy old lengths
1347
+ // Calculate length later...
1348
+ this.documentLengths = newDocLengths; // Assign temporarily
1349
+ let currentDocLength = 0;
1350
+ const docTermFrequencies = new Map(); // TermIndex -> TF for this new doc
1351
+ // --- Process Fields and Tokens ---
1352
+ for (const field in doc) {
1353
+ const content = doc[field];
1354
+ if (typeof content !== "string")
1355
+ continue;
1356
+ const fieldBoost = this.fieldBoosts[field] || 1;
1357
+ const { tokens } = this.tokenizer.tokenize(content);
1358
+ currentDocLength += tokens.length * fieldBoost;
1359
+ // Process each token in the field
1360
+ tokens.forEach((term) => {
1361
+ let termIndexVal;
1362
+ // Check if term already exists in the index
1363
+ const existingIndex = this.termToIndex.get(term);
1364
+ if (existingIndex === undefined) {
1365
+ // Add term to index if new
1366
+ termIndexVal = this.termToIndex.size;
1367
+ this.termToIndex.set(term, termIndexVal);
1368
+ // Ensure documentFrequency array is large enough
1369
+ if (this.documentFrequency.length <= termIndexVal) {
1370
+ const oldDf = this.documentFrequency;
1371
+ // Grow exponentially, ensure it's at least termIndex + 1
1372
+ const newSize = Math.max(termIndexVal + 1, oldDf.length * 2 || 1); // Ensure newSize is at least 1 if oldDf.length is 0
1373
+ this.documentFrequency = new Uint32Array(newSize);
1374
+ this.documentFrequency.set(oldDf, 0);
1375
+ }
1376
+ // Initialize DF for new term (will be incremented below)
1377
+ this.documentFrequency[termIndexVal] = 0;
1378
+ }
1379
+ else {
1380
+ // Term exists in the map, use its existing index
1381
+ termIndexVal = existingIndex;
1382
+ }
1383
+ // Increment frequency for this term in this new document
1384
+ const currentFreq = docTermFrequencies.get(termIndexVal) || 0;
1385
+ docTermFrequencies.set(termIndexVal, currentFreq + fieldBoost); // Weighted TF
1386
+ });
1387
+ }
1388
+ // --- Update Global Structures ---
1389
+ // Set the calculated length for the new document
1390
+ this.documentLengths[docIndex] = currentDocLength;
1391
+ // Add this document's term frequencies to the main map and update DF
1392
+ docTermFrequencies.forEach((freq, termIndexVal) => {
1393
+ // Add TF entry
1394
+ if (!this.termFrequencies.has(termIndexVal)) {
1395
+ this.termFrequencies.set(termIndexVal, new Map());
1396
+ }
1397
+ const termFrequenciesTermIndexVal = this.termFrequencies.get(termIndexVal);
1398
+ if (termFrequenciesTermIndexVal) {
1399
+ termFrequenciesTermIndexVal.set(docIndex, freq);
1400
+ }
1401
+ // Increment document frequency for the term
1402
+ // Ensure termIndexVal is within bounds of documentFrequency before incrementing
1403
+ if (termIndexVal < this.documentFrequency.length) {
1404
+ this.documentFrequency[termIndexVal]++;
1405
+ }
1406
+ });
1407
+ // Recalculate average document length
1408
+ this.recalculateAverageLength(); // Efficiently update average
1409
+ }
1410
+ /**
1411
+ * Calculates the Inverse Document Frequency (IDF) for a given term index.
1412
+ * Uses the BM25 IDF formula: log(1 + (N - n + 0.5) / (n + 0.5))
1413
+ * where N is the total number of documents and n is the number of documents
1414
+ * containing the term. The +1 smooths the logarithm.
1415
+ *
1416
+ * @param termIndex - The integer index of the term.
1417
+ * @returns The IDF score for the term. Returns 0 if the term is not found or has 0 DF.
1418
+ */
1419
+ calculateIdf(termIndex) {
1420
+ // Ensure termIndex is valid
1421
+ if (termIndex < 0 || termIndex >= this.documentFrequency.length) {
1422
+ return 0; // Term not in index or index out of bounds
1423
+ }
1424
+ const docFreq = this.documentFrequency[termIndex]; // n: number of docs containing the term
1425
+ // If term appears in 0 documents or more docs than exist (error state), return 0 IDF.
1426
+ if (docFreq <= 0 || docFreq > this.documentLengths.length) {
1427
+ return 0;
1428
+ }
1429
+ const N = this.documentLengths.length; // Total number of documents
1430
+ const numerator = N - docFreq + 0.5;
1431
+ const denominator = docFreq + 0.5;
1432
+ // Adding 1 inside the log ensures IDF is always non-negative.
1433
+ return Math.log(1 + numerator / denominator);
1434
+ }
1435
+ /**
1436
+ * Retrieves the term frequency (TF) for a specific term in a specific document.
1437
+ * @param termIndex - The integer index of the term.
1438
+ * @param docIndex - The index of the document.
1439
+ * @returns The term frequency, or 0 if the term is not in the document or indices are invalid.
1440
+ */
1441
+ getTermFrequency(termIndex, docIndex) {
1442
+ const termFrequenciesTermIndex = this.termFrequencies.get(termIndex);
1443
+ return termFrequenciesTermIndex?.get(docIndex) || 0;
1444
+ }
1445
+ /**
1446
+ * Retrieves the original document object stored at a given index.
1447
+ * @param index - The index of the document to retrieve.
1448
+ * @returns The document object.
1449
+ * @throws {Error} If the index is out of bounds.
1450
+ */
1451
+ getDocument(index) {
1452
+ // Consider using a generic <T>
1453
+ if (index < 0 || index >= this.documents.length) {
1454
+ throw new Error(`Document index ${index} out of bounds (0-${this.documents.length - 1})`);
1455
+ }
1456
+ return this.documents[index];
1457
+ }
1458
+ /**
1459
+ * Clears all indexed documents and resets the BM25 instance to its initial state.
1460
+ */
1461
+ clearDocuments() {
1462
+ this.documents = [];
1463
+ this.documentLengths = new Uint32Array(0);
1464
+ this.termToIndex.clear();
1465
+ this.documentFrequency = new Uint32Array(0);
1466
+ this.averageDocLength = 0;
1467
+ this.termFrequencies.clear();
1468
+ }
1469
+ /**
1470
+ * Gets the total number of documents currently indexed.
1471
+ * @returns The document count.
1472
+ */
1473
+ getDocumentCount() {
1474
+ return this.documents.length;
1475
+ }
1476
+ /**
1477
+ * Adds multiple documents sequentially by calling `addDocument` for each.
1478
+ * This method processes documents sequentially in the main thread.
1479
+ * @param docs - An array of documents to add.
1480
+ */
1481
+ async addDocuments(docs) {
1482
+ for (const doc of docs) {
1483
+ await this.addDocument(doc);
1484
+ }
1485
+ }
1486
+ }
1487
+ /**
1488
+ * Build an FTS (Full-Text Search) query from a raw search string.
1489
+ * Extracts alphanumeric tokens and joins them with AND for strict matching.
1490
+ *
1491
+ * @param raw - The raw search query string.
1492
+ * @returns The FTS query string, or null if no valid tokens found.
1493
+ */
1494
+ export function buildFtsQuery(raw) {
1495
+ const tokens = raw
1496
+ .match(/[A-Za-z0-9_]+/g)
1497
+ ?.map((t) => t.trim())
1498
+ .filter(Boolean) ?? [];
1499
+ if (tokens.length === 0)
1500
+ return null;
1501
+ const quoted = tokens.map((t) => `"${t.replaceAll('"', "")}"`);
1502
+ return quoted.join(" AND ");
1503
+ }
1504
+ /**
1505
+ * Convert BM25 rank to a normalized score between 0 and 1.
1506
+ * Lower rank = higher score.
1507
+ *
1508
+ * @param rank - The BM25 rank value.
1509
+ * @returns A normalized score where 1 is best and 0 is worst.
1510
+ */
1511
+ export function bm25RankToScore(rank) {
1512
+ const normalized = Number.isFinite(rank) ? Math.max(0, rank) : 999;
1513
+ return 1 / (1 + normalized);
1514
+ }
1515
+ /**
1516
+ * Merge vector similarity and keyword search results using weighted scoring.
1517
+ *
1518
+ * This implements a hybrid search approach where results from both vector
1519
+ * similarity search and keyword (BM25) search are combined. Results that
1520
+ * appear in both searches get boosted scores.
1521
+ *
1522
+ * @param params.vector - Results from vector similarity search.
1523
+ * @param params.keyword - Results from keyword (BM25) search.
1524
+ * @param params.vectorWeight - Weight for vector similarity scores (default: 0.7).
1525
+ * @param params.textWeight - Weight for keyword/text scores (default: 0.3).
1526
+ * @returns Merged and sorted results with combined scores.
1527
+ */
1528
+ export function mergeHybridResults(params) {
1529
+ const byId = new Map();
1530
+ // Add vector search results
1531
+ for (const r of params.vector) {
1532
+ byId.set(r.id, {
1533
+ id: r.id,
1534
+ path: r.path,
1535
+ startLine: r.startLine,
1536
+ endLine: r.endLine,
1537
+ source: r.source,
1538
+ snippet: r.snippet,
1539
+ vectorScore: r.vectorScore,
1540
+ textScore: 0,
1541
+ });
1542
+ }
1543
+ // Merge keyword search results
1544
+ for (const r of params.keyword) {
1545
+ const existing = byId.get(r.id);
1546
+ if (existing) {
1547
+ existing.textScore = r.textScore;
1548
+ // Prefer keyword snippet if available (may have highlights)
1549
+ if (r.snippet && r.snippet.length > 0) {
1550
+ existing.snippet = r.snippet;
1551
+ }
1552
+ }
1553
+ else {
1554
+ byId.set(r.id, {
1555
+ id: r.id,
1556
+ path: r.path,
1557
+ startLine: r.startLine,
1558
+ endLine: r.endLine,
1559
+ source: r.source,
1560
+ snippet: r.snippet,
1561
+ vectorScore: 0,
1562
+ textScore: r.textScore,
1563
+ });
1564
+ }
1565
+ }
1566
+ // Calculate weighted scores and sort
1567
+ const merged = Array.from(byId.values()).map((entry) => {
1568
+ const score = params.vectorWeight * entry.vectorScore +
1569
+ params.textWeight * entry.textScore;
1570
+ return {
1571
+ path: entry.path,
1572
+ startLine: entry.startLine,
1573
+ endLine: entry.endLine,
1574
+ score,
1575
+ snippet: entry.snippet,
1576
+ source: entry.source,
1577
+ };
1578
+ });
1579
+ return [...merged].sort((a, b) => b.score - a.score);
1580
+ }