@isdk/ai-tool 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (359) hide show
  1. package/dist/chunk-4FKBOPZI.mjs +1 -0
  2. package/dist/{chunk-VIG2GB47.mjs → chunk-TGTHY57V.mjs} +1 -1
  3. package/dist/funcs.d.mts +1 -2
  4. package/dist/funcs.d.ts +1 -2
  5. package/dist/funcs.js +1 -1
  6. package/dist/funcs.mjs +1 -1
  7. package/dist/{index-BCco-g_I.d.mts → index-BLW3R7VS.d.mts} +114 -69
  8. package/dist/{index-BCco-g_I.d.ts → index-BLW3R7VS.d.ts} +114 -69
  9. package/dist/index.d.mts +101 -38
  10. package/dist/index.d.ts +101 -38
  11. package/dist/index.js +1 -1
  12. package/dist/index.mjs +1 -1
  13. package/dist/test/util.js +1 -1
  14. package/dist/test/util.mjs +1 -1
  15. package/docs/api/{namespaces → @isdk/namespaces}/EventStates/README.md +2 -2
  16. package/docs/api/{namespaces → @isdk/namespaces}/EventStates/variables/ABORT.md +2 -2
  17. package/docs/api/{namespaces → @isdk/namespaces}/EventStates/variables/CONTINUE.md +2 -2
  18. package/docs/api/{namespaces → @isdk/namespaces}/EventStates/variables/DONE.md +2 -2
  19. package/docs/api/{namespaces → @isdk/namespaces}/EventStates/variables/STOPPED.md +2 -2
  20. package/docs/api/@isdk/namespaces/uuidv5/README.md +12 -0
  21. package/docs/api/{namespaces → @isdk/namespaces}/uuidv5/variables/DNS.md +2 -2
  22. package/docs/api/{namespaces → @isdk/namespaces}/uuidv5/variables/URL.md +2 -2
  23. package/docs/api/_media/pubsub.md +427 -105
  24. package/docs/api/_media/server_client_tools.md +5 -3
  25. package/docs/api/_media/toolFunc.md +3 -1
  26. package/docs/api/classes/AbortError.md +8 -8
  27. package/docs/api/classes/AlreadyExistsError.md +8 -8
  28. package/docs/api/classes/BaseError.md +14 -14
  29. package/docs/api/classes/BinarySemaphore.md +39 -39
  30. package/docs/api/classes/CancelableAbility.md +43 -39
  31. package/docs/api/classes/ClientToolTransport.md +22 -22
  32. package/docs/api/classes/ClientTools.md +182 -154
  33. package/docs/api/classes/CommonError.md +12 -12
  34. package/docs/api/classes/ConfigFile.md +6 -6
  35. package/docs/api/classes/EnvPromptTemplate.md +14 -14
  36. package/docs/api/classes/EventClient.md +258 -201
  37. package/docs/api/classes/EventEmitter.md +14 -14
  38. package/docs/api/classes/EventServer.md +220 -237
  39. package/docs/api/classes/EventToolFunc.md +144 -116
  40. package/docs/api/classes/FStringPromptTemplate.md +14 -14
  41. package/docs/api/classes/FewShotPromptTemplate.md +30 -26
  42. package/docs/api/classes/GolangPromptTemplate.md +13 -13
  43. package/docs/api/classes/HttpClientToolTransport.md +23 -23
  44. package/docs/api/classes/HttpServerToolTransport.md +40 -27
  45. package/docs/api/classes/IntSet.md +21 -21
  46. package/docs/api/classes/LRUCache.md +18 -18
  47. package/docs/api/classes/NotFoundError.md +8 -8
  48. package/docs/api/classes/NotImplementationError.md +8 -8
  49. package/docs/api/classes/PromptExampleSelector.md +17 -15
  50. package/docs/api/classes/PromptTemplate.md +15 -15
  51. package/docs/api/classes/ReadableStreamError.md +12 -12
  52. package/docs/api/classes/ResClientTools.md +658 -143
  53. package/docs/api/classes/ResServerTools.md +643 -133
  54. package/docs/api/classes/RpcMethodsClientTool.md +3303 -0
  55. package/docs/api/classes/RpcMethodsServerTool.md +3248 -0
  56. package/docs/api/classes/SSEChannel.md +142 -52
  57. package/docs/api/classes/Semaphore.md +40 -40
  58. package/docs/api/classes/ServerToolTransport.md +32 -27
  59. package/docs/api/classes/ServerTools.md +167 -139
  60. package/docs/api/classes/SignalGate.md +19 -17
  61. package/docs/api/classes/SseClientPubSubTransport.md +38 -10
  62. package/docs/api/classes/SseServerPubSubTransport.md +115 -42
  63. package/docs/api/classes/TaskAbortController.md +13 -13
  64. package/docs/api/classes/ToolFunc.md +157 -129
  65. package/docs/api/classes/ToolTransport.md +13 -13
  66. package/docs/api/classes/YamlTypeBaseObject.md +5 -5
  67. package/docs/api/enumerations/AsyncFeatureBits.md +4 -4
  68. package/docs/api/enumerations/AsyncFeatures.md +4 -4
  69. package/docs/api/enumerations/HashAlgorithm.md +12 -12
  70. package/docs/api/functions/AIArgProcessor.md +2 -2
  71. package/docs/api/functions/AIStream.md +8 -4
  72. package/docs/api/functions/ChoiceArgProcessor.md +2 -2
  73. package/docs/api/functions/DefaultDateFormat.md +2 -2
  74. package/docs/api/functions/ObjectArgsToArgsInfo.md +1 -1
  75. package/docs/api/functions/RateLimit.md +2 -2
  76. package/docs/api/functions/TemplateArgProcessor.md +2 -2
  77. package/docs/api/functions/addDate.md +7 -3
  78. package/docs/api/functions/assignDirs.md +1 -1
  79. package/docs/api/functions/beforeShutdown.md +1 -1
  80. package/docs/api/functions/calcPerplexity.md +2 -2
  81. package/docs/api/functions/calcPerplexitySimple.md +1 -1
  82. package/docs/api/functions/canonicalize.md +1 -1
  83. package/docs/api/functions/completeSentences.md +1 -1
  84. package/docs/api/functions/concatText.md +1 -1
  85. package/docs/api/functions/countLLMTokens.md +1 -1
  86. package/docs/api/functions/countRegexMatches.md +1 -1
  87. package/docs/api/functions/createAbilityInjector.md +16 -8
  88. package/docs/api/functions/createCallbacksTransformer.md +7 -3
  89. package/docs/api/functions/createEmptyReadableStream.md +1 -1
  90. package/docs/api/functions/createEndWithRepetitionDetector.md +2 -2
  91. package/docs/api/functions/createError.md +1 -1
  92. package/docs/api/functions/createEventStreamTransformer.md +8 -4
  93. package/docs/api/functions/createHfValueFunc.md +1 -1
  94. package/docs/api/functions/createLRUCache.md +2 -2
  95. package/docs/api/functions/createYamlObjectTag.md +1 -1
  96. package/docs/api/functions/dateToText.md +1 -1
  97. package/docs/api/functions/decodeCharset.md +2 -2
  98. package/docs/api/functions/defaultsWithConcat.md +1 -1
  99. package/docs/api/functions/detectCharset.md +2 -2
  100. package/docs/api/functions/encodeLLMTokens.md +1 -1
  101. package/docs/api/functions/ensureQuoted.md +1 -1
  102. package/docs/api/functions/eventable.md +6 -8
  103. package/docs/api/functions/expandConfig.md +2 -2
  104. package/docs/api/functions/expandObjEnv.md +1 -1
  105. package/docs/api/functions/expandPath.md +2 -2
  106. package/docs/api/functions/expandPathInObject.md +2 -2
  107. package/docs/api/functions/expandPaths.md +2 -2
  108. package/docs/api/functions/fileIsExists.md +1 -1
  109. package/docs/api/functions/filterValidFnScope.md +2 -2
  110. package/docs/api/functions/findIndexNonEmptyFrom.md +1 -1
  111. package/docs/api/functions/findPort.md +1 -1
  112. package/docs/api/functions/formatISO.md +1 -1
  113. package/docs/api/functions/formatTextWithSpace.md +2 -2
  114. package/docs/api/functions/funcGetMeta.md +1 -1
  115. package/docs/api/functions/funcWithMeta.md +2 -2
  116. package/docs/api/functions/genUrlParamsStr.md +8 -2
  117. package/docs/api/functions/getAllEnumKeys.md +4 -2
  118. package/docs/api/functions/getConfigFileNames.md +2 -2
  119. package/docs/api/functions/getConfigs.md +2 -2
  120. package/docs/api/functions/getFileMetaInfo.md +1 -1
  121. package/docs/api/functions/getHashAlgoBySize.md +1 -1
  122. package/docs/api/functions/getKeysPath.md +4 -2
  123. package/docs/api/functions/getLLMTokenizer.md +1 -1
  124. package/docs/api/functions/getMultiLevelExtname.md +1 -1
  125. package/docs/api/functions/getPackageDir.md +1 -1
  126. package/docs/api/functions/getRealFilepath.md +1 -1
  127. package/docs/api/functions/getResponseErrorReadableStream.md +2 -2
  128. package/docs/api/functions/getXDGConfigs.md +1 -1
  129. package/docs/api/functions/hasDirectoryIn.md +2 -2
  130. package/docs/api/functions/hash.md +1 -1
  131. package/docs/api/functions/hashFile.md +2 -2
  132. package/docs/api/functions/hashObject.md +2 -2
  133. package/docs/api/functions/hashStream.md +1 -1
  134. package/docs/api/functions/initShutdown.md +1 -1
  135. package/docs/api/functions/isLangUsingSpaces.md +1 -1
  136. package/docs/api/functions/isListItemString.md +1 -1
  137. package/docs/api/functions/isModelNameMatched.md +2 -2
  138. package/docs/api/functions/isPunctuationChar.md +1 -1
  139. package/docs/api/functions/isQuoted.md +1 -1
  140. package/docs/api/functions/isRegExp.md +1 -1
  141. package/docs/api/functions/isSameString.md +1 -1
  142. package/docs/api/functions/isSectionString.md +2 -2
  143. package/docs/api/functions/isSentenceEnding.md +1 -1
  144. package/docs/api/functions/isSepLineString.md +1 -1
  145. package/docs/api/functions/isStrWrapped.md +1 -1
  146. package/docs/api/functions/isSubdirectory.md +1 -1
  147. package/docs/api/functions/isTitleString.md +2 -2
  148. package/docs/api/functions/isWebStream.md +1 -1
  149. package/docs/api/functions/joinSplitWords.md +1 -1
  150. package/docs/api/functions/jsonFilterToWhere.md +2 -2
  151. package/docs/api/functions/jsonToMarkdownStr.md +2 -2
  152. package/docs/api/functions/loadAIConfig.md +1 -1
  153. package/docs/api/functions/loadConfig.md +1 -1
  154. package/docs/api/functions/loadConfigFile.md +1 -1
  155. package/docs/api/functions/loadFileFromPaths.md +2 -2
  156. package/docs/api/functions/loadTextFromPaths.md +3 -3
  157. package/docs/api/functions/lrucache.md +1 -1
  158. package/docs/api/functions/matchUrlProtocol.md +1 -1
  159. package/docs/api/functions/memoize.md +5 -3
  160. package/docs/api/functions/mergeArray.md +1 -1
  161. package/docs/api/functions/messagesToText.md +1 -1
  162. package/docs/api/functions/nanoid.md +45 -0
  163. package/docs/api/functions/normalizePath.md +1 -1
  164. package/docs/api/functions/paramsSizeToScaleStr.md +1 -1
  165. package/docs/api/functions/parseCommand.md +3 -3
  166. package/docs/api/functions/parseDateFormat.md +7 -3
  167. package/docs/api/functions/parseISO.md +7 -3
  168. package/docs/api/functions/parseJsJson.md +2 -2
  169. package/docs/api/functions/parseJsJsonSimpleSync.md +2 -2
  170. package/docs/api/functions/parseObjectArgInfo.md +2 -2
  171. package/docs/api/functions/parseObjectArgumentInfos.md +2 -2
  172. package/docs/api/functions/parseObjectArguments.md +2 -2
  173. package/docs/api/functions/parseObjectArgumentsAsArgInfos.md +2 -2
  174. package/docs/api/functions/parseYaml.md +1 -1
  175. package/docs/api/functions/pruneSubdirectories.md +1 -1
  176. package/docs/api/functions/pruneSubdirectoriesInPlace.md +1 -1
  177. package/docs/api/functions/quoteStr.md +1 -1
  178. package/docs/api/functions/readFilenamesRecursiveSync.md +2 -2
  179. package/docs/api/functions/readTextFileChunks.md +2 -2
  180. package/docs/api/functions/readTextFileChunksEx.md +2 -2
  181. package/docs/api/functions/readableFromAsyncIterable.md +4 -2
  182. package/docs/api/functions/registerCoreTools.md +1 -1
  183. package/docs/api/functions/removeMarkdownBold.md +2 -2
  184. package/docs/api/functions/removeMarkdownBoldAndItalic.md +2 -2
  185. package/docs/api/functions/removeMarkdownItalic.md +2 -2
  186. package/docs/api/functions/replaceWithPlaceholder.md +2 -2
  187. package/docs/api/functions/restoreFromPlacehoders.md +2 -2
  188. package/docs/api/functions/sanitizeFilename.md +1 -1
  189. package/docs/api/functions/sanitizeFilepath.md +1 -1
  190. package/docs/api/functions/saveConfigFile.md +1 -1
  191. package/docs/api/functions/scaleStrToParamsSize.md +1 -1
  192. package/docs/api/functions/shutdown.md +1 -1
  193. package/docs/api/functions/simplifyObjectArguments.md +1 -1
  194. package/docs/api/functions/sleep.md +1 -1
  195. package/docs/api/functions/sortedValues.md +4 -2
  196. package/docs/api/functions/splitChunks.md +2 -2
  197. package/docs/api/functions/splitParagraph.md +2 -2
  198. package/docs/api/functions/splitSentence.md +1 -1
  199. package/docs/api/functions/splitWords.md +1 -1
  200. package/docs/api/functions/stringifyYaml.md +1 -1
  201. package/docs/api/functions/stripConsoleColor.md +1 -1
  202. package/docs/api/functions/textToDate.md +1 -1
  203. package/docs/api/functions/throwError.md +1 -1
  204. package/docs/api/functions/toDate.md +7 -3
  205. package/docs/api/functions/toDateTime.md +1 -1
  206. package/docs/api/functions/trimStartOfStreamHelper.md +3 -3
  207. package/docs/api/functions/truncTo.md +1 -1
  208. package/docs/api/functions/truncateByToken.md +2 -2
  209. package/docs/api/functions/truncateToTokenLimit.md +2 -2
  210. package/docs/api/functions/truncateToTokenLimitEx.md +2 -2
  211. package/docs/api/functions/uuid.md +15 -6
  212. package/docs/api/functions/uuidStringify.md +1 -1
  213. package/docs/api/functions/uuidv1.md +5 -3
  214. package/docs/api/functions/uuidv4.md +5 -3
  215. package/docs/api/functions/uuidv5.md +5 -3
  216. package/docs/api/functions/uuidv6.md +61 -0
  217. package/docs/api/functions/uuidv7.md +61 -0
  218. package/docs/api/functions/wrapEventEmitter.md +1 -1
  219. package/docs/api/functions/xxhash.md +1 -1
  220. package/docs/api/functions/xxhash32.md +1 -1
  221. package/docs/api/functions/xxhash64.md +1 -1
  222. package/docs/api/functions/xxhashAsStr.md +1 -1
  223. package/docs/api/functions/yieldExec.md +1 -1
  224. package/docs/api/globals.md +17 -6
  225. package/docs/api/interfaces/AIChatAssistantMessageParam.md +12 -12
  226. package/docs/api/interfaces/AIChatContentPartImage.md +3 -3
  227. package/docs/api/interfaces/AIChatContentPartText.md +3 -3
  228. package/docs/api/interfaces/AIChatMessageParamBase.md +7 -7
  229. package/docs/api/interfaces/AIChatMessageToolCall.md +4 -4
  230. package/docs/api/interfaces/AIChatSystemMessageParam.md +9 -9
  231. package/docs/api/interfaces/AIChatToolChoiceFuncObject.md +3 -3
  232. package/docs/api/interfaces/AIChatToolChoiceObject.md +2 -2
  233. package/docs/api/interfaces/AIChatToolFunc.md +5 -5
  234. package/docs/api/interfaces/AIChatToolFuncParam.md +3 -3
  235. package/docs/api/interfaces/AIChatToolMessageParam.md +10 -10
  236. package/docs/api/interfaces/AIChatToolParam.md +2 -2
  237. package/docs/api/interfaces/AIChatToolTypeObject.md +2 -2
  238. package/docs/api/interfaces/AIChatUserMessageParam.md +13 -13
  239. package/docs/api/interfaces/AIChoiceConfig.md +8 -8
  240. package/docs/api/interfaces/AIResult.md +12 -8
  241. package/docs/api/interfaces/AIStreamParser.md +8 -6
  242. package/docs/api/interfaces/AIStreamParserOptions.md +2 -2
  243. package/docs/api/interfaces/BaseFunc.md +17 -17
  244. package/docs/api/interfaces/BaseFuncItem.md +15 -15
  245. package/docs/api/interfaces/BinarySemaphoreAcquireOptions.md +2 -2
  246. package/docs/api/interfaces/BinarySemaphoreOptions.md +5 -5
  247. package/docs/api/interfaces/BinarySemaphoreReleaseOptions.md +2 -2
  248. package/docs/api/interfaces/BinarySemaphoreReleaserFunc.md +3 -3
  249. package/docs/api/interfaces/CancelableAbilityOptions.md +4 -4
  250. package/docs/api/interfaces/ClientFuncItem.md +21 -25
  251. package/docs/api/interfaces/EventClientFuncParams.md +5 -5
  252. package/docs/api/interfaces/EventServerFuncParams.md +14 -6
  253. package/docs/api/interfaces/FewShotPromptTemplateOptions.md +9 -7
  254. package/docs/api/interfaces/FuncItem.md +18 -18
  255. package/docs/api/interfaces/FuncParam.md +5 -5
  256. package/docs/api/interfaces/FuncParams.md +1 -1
  257. package/docs/api/interfaces/Funcs.md +1 -1
  258. package/docs/api/interfaces/HashAlgoParams.md +4 -4
  259. package/docs/api/interfaces/IClientToolTransport.md +9 -9
  260. package/docs/api/interfaces/IFileMetaInfo.md +8 -8
  261. package/docs/api/interfaces/IPubSubClientTransport.md +31 -7
  262. package/docs/api/interfaces/IPubSubServerTransport.md +92 -47
  263. package/docs/api/interfaces/IReadTextFileChunksOptions.md +13 -13
  264. package/docs/api/interfaces/IServerToolTransport.md +19 -14
  265. package/docs/api/interfaces/IToolTransport.md +6 -6
  266. package/docs/api/interfaces/ITruncateToTokenLimitOptions.md +11 -11
  267. package/docs/api/interfaces/JsonFilter.md +1 -1
  268. package/docs/api/interfaces/ParseObjectArgumentOptions.md +11 -11
  269. package/docs/api/interfaces/ProbabilityItem.md +4 -4
  270. package/docs/api/interfaces/PromptExampleSelectorOptions.md +3 -3
  271. package/docs/api/interfaces/PubSubClientStream.md +26 -14
  272. package/docs/api/interfaces/PubSubServerSession.md +8 -8
  273. package/docs/api/interfaces/RemoteFuncItem.md +21 -25
  274. package/docs/api/interfaces/ReplacePlacehoderOptions.md +5 -5
  275. package/docs/api/interfaces/ResClientFuncParams.md +5 -5
  276. package/docs/api/interfaces/ResServerFuncParams.md +14 -10
  277. package/docs/api/interfaces/RpcMethodsClientFuncParams.md +25 -0
  278. package/docs/api/interfaces/RpcMethodsServerFuncParams.md +61 -0
  279. package/docs/api/interfaces/SectionStringOptions.md +3 -3
  280. package/docs/api/interfaces/SemaphoreOptions.md +7 -7
  281. package/docs/api/interfaces/SemaphoreTaskItem.md +6 -6
  282. package/docs/api/interfaces/ServerFuncItem.md +22 -26
  283. package/docs/api/interfaces/ServerFuncParams.md +4 -3
  284. package/docs/api/interfaces/SplitSentenceOptions.md +5 -5
  285. package/docs/api/interfaces/StreamCallbacksAndOptions.md +11 -7
  286. package/docs/api/interfaces/TaskAbortControllers.md +1 -1
  287. package/docs/api/interfaces/TaskPromise.md +17 -9
  288. package/docs/api/interfaces/ToolFuncPackage.md +5 -5
  289. package/docs/api/type-aliases/AIChatContentPart.md +2 -2
  290. package/docs/api/type-aliases/AIChatMessageParam.md +2 -2
  291. package/docs/api/type-aliases/AIChatRole.md +2 -2
  292. package/docs/api/type-aliases/AIChatToolChoiceParam.md +2 -2
  293. package/docs/api/type-aliases/AIMessageType.md +2 -2
  294. package/docs/api/type-aliases/AIModelNameRule.md +2 -2
  295. package/docs/api/type-aliases/AIModelNameRuleFn.md +2 -2
  296. package/docs/api/type-aliases/AIModelNameRules.md +2 -2
  297. package/docs/api/type-aliases/AITextGenerationFinishReason.md +2 -2
  298. package/docs/api/type-aliases/ActionName.md +2 -2
  299. package/docs/api/type-aliases/ArrayMergeWay.md +2 -2
  300. package/docs/api/type-aliases/AsyncTaskId.md +2 -2
  301. package/docs/api/type-aliases/BeforeShutdownListener.md +2 -2
  302. package/docs/api/type-aliases/EventErrorListenerFn.md +2 -2
  303. package/docs/api/type-aliases/EventListenerFn.md +2 -2
  304. package/docs/api/type-aliases/FuncParamType.md +2 -2
  305. package/docs/api/type-aliases/PromptExamples.md +5 -3
  306. package/docs/api/type-aliases/PubSubClientId.md +2 -2
  307. package/docs/api/type-aliases/PubSubCtx.md +24 -4
  308. package/docs/api/type-aliases/RpcMethodHandler.md +2 -2
  309. package/docs/api/type-aliases/SSEClient.md +53 -0
  310. package/docs/api/type-aliases/SemaphoreIsReadyFuncType.md +2 -2
  311. package/docs/api/type-aliases/TFunc.md +2 -2
  312. package/docs/api/type-aliases/UUIDVersions.md +11 -0
  313. package/docs/api/variables/AIChatRoles.md +1 -1
  314. package/docs/api/variables/AIMessageTypes.md +1 -1
  315. package/docs/api/variables/AITextGenerationFinishReasons.md +1 -1
  316. package/docs/api/variables/ActionNames.md +1 -1
  317. package/docs/api/variables/ArrayMergeWay.md +2 -2
  318. package/docs/api/variables/ArrayMergeWaySymbol.md +2 -2
  319. package/docs/api/variables/ClientEventPrefix.md +11 -0
  320. package/docs/api/variables/ClientToolFuncSchema.md +4 -2
  321. package/docs/api/variables/DEFAULT_CONFIG_NAME.md +1 -1
  322. package/docs/api/variables/DefaultAsyncSemaphoreCapacity.md +1 -1
  323. package/docs/api/variables/EventBusName.md +1 -1
  324. package/docs/api/variables/EventName.md +1 -1
  325. package/docs/api/variables/FuncMetaSymbol.md +2 -2
  326. package/docs/api/variables/LLM_TOKENIZER_NAMES.md +4 -4
  327. package/docs/api/variables/LLM_TOKENIZER_NAMES_MAP.md +1 -1
  328. package/docs/api/variables/PASSING_SCORE.md +1 -1
  329. package/docs/api/variables/RStreamErrCode.md +1 -1
  330. package/docs/api/variables/RemoteToolFuncSchema.md +4 -2
  331. package/docs/api/variables/ResponseRStreamErrCode.md +1 -1
  332. package/docs/api/variables/RpcMethodsClientToolSchema.md +51 -0
  333. package/docs/api/variables/RpcMethodsServerToolSchema.md +21 -0
  334. package/docs/api/variables/SHUTDOWN_SIGNALS.md +1 -1
  335. package/docs/api/variables/SSEChannelAlreadyClosedErrCode.md +1 -1
  336. package/docs/api/variables/SecondaryCache.md +1 -1
  337. package/docs/api/variables/ServerToolFuncSchema.md +4 -2
  338. package/docs/api/variables/StrangeHumanName.md +1 -1
  339. package/docs/api/variables/ToolAsyncCancelableBit.md +1 -1
  340. package/docs/api/variables/ToolAsyncMultiTaskBit.md +1 -1
  341. package/docs/api/variables/ToolAsyncPriorityBit.md +1 -1
  342. package/docs/api/variables/ToolFuncSchema.md +4 -2
  343. package/docs/api/variables/backendEventable.md +11 -0
  344. package/docs/api/variables/base32768.md +1 -1
  345. package/docs/api/variables/event.md +1 -1
  346. package/docs/api/variables/eventClient.md +1 -1
  347. package/docs/api/variables/eventServer.md +1 -1
  348. package/docs/api/variables/lrucache.md +1 -1
  349. package/docs/api/variables/makeToolFuncCancelable.md +11 -0
  350. package/docs/api/{functions → variables}/wait.md +16 -14
  351. package/docs/pubsub.md +427 -105
  352. package/docs/server_client_tools.md +5 -3
  353. package/docs/toolFunc.md +3 -1
  354. package/package.json +10 -9
  355. package/dist/chunk-LNTIQQNN.mjs +0 -1
  356. package/docs/api/functions/backendEventable.md +0 -29
  357. package/docs/api/functions/makeToolFuncCancelable.md +0 -29
  358. package/docs/api/interfaces/PubSubClient.md +0 -27
  359. package/docs/api/namespaces/uuidv5/README.md +0 -12
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as custom_ability from 'custom-ability';
2
2
  export { createAbilityInjector } from 'custom-ability';
3
3
  export { toRegExp } from 'util-ex';
4
- import { A as AsyncTaskId, a as AIModelNameRules, I as IPubSubServerTransport, P as PubSubClientId, b as PubSubServerSession, c as IPubSubClientTransport, d as PubSubClientStream, e as IToolTransport, S as ServerTools, T as ToolTransport, C as ClientToolTransport, F as Funcs, f as ActionName } from './index-BCco-g_I.js';
5
- export { j as AIModelNameRule, i as AIModelNameRuleFn, h as ActionNames, x as AsyncFeatureBits, y as AsyncFeatures, V as BaseFunc, Q as BaseFuncItem, r as BinarySemaphore, m as BinarySemaphoreAcquireOptions, B as BinarySemaphoreOptions, n as BinarySemaphoreReleaseOptions, o as BinarySemaphoreReleaserFunc, J as CancelableAbility, z as CancelableAbilityOptions, a1 as ClientFuncItem, a2 as ClientToolFuncSchema, a0 as ClientTools, D as DefaultAsyncSemaphoreCapacity, ae as EventClient, ad as EventClientFuncParams, ah as EventServer, ag as EventServerFuncParams, a7 as EventToolFunc, U as FuncItem, Z as FuncMetaSymbol, M as FuncParam, L as FuncParamType, N as FuncParams, ao as IClientToolTransport, g as PASSING_SCORE, aq as PubSubClient, ap as PubSubCtx, t as RateLimit, k as RemoteFuncItem, R as RemoteToolFuncSchema, aj as ResClientFuncParams, ak as ResClientTools, al as ResServerFuncParams, am as ResServerTools, an as RpcMethodHandler, a9 as SecondaryCache, s as Semaphore, l as SemaphoreIsReadyFuncType, p as SemaphoreOptions, q as SemaphoreTaskItem, a4 as ServerFuncItem, a3 as ServerFuncParams, a5 as ServerToolFuncSchema, O as TFunc, E as TaskAbortController, G as TaskAbortControllers, H as TaskPromise, v as ToolAsyncCancelableBit, u as ToolAsyncMultiTaskBit, w as ToolAsyncPriorityBit, X as ToolFunc, W as ToolFuncPackage, Y as ToolFuncSchema, aa as _lrucache, ab as createLRUCache, a8 as event, af as eventClient, ai as eventServer, $ as funcGetMeta, _ as funcWithMeta, ac as lrucache, K as makeToolFuncCancelable, a6 as registerCoreTools } from './index-BCco-g_I.js';
4
+ import { A as AsyncTaskId, a as AIModelNameRules, I as IPubSubServerTransport, P as PubSubServerSession, b as PubSubClientId, c as IPubSubClientTransport, d as PubSubClientStream, e as IToolTransport, S as ServerTools, T as ToolTransport, C as ClientToolTransport, F as Funcs, f as ActionName } from './index-BLW3R7VS.js';
5
+ export { j as AIModelNameRule, i as AIModelNameRuleFn, h as ActionNames, x as AsyncFeatureBits, y as AsyncFeatures, V as BaseFunc, Q as BaseFuncItem, r as BinarySemaphore, m as BinarySemaphoreAcquireOptions, B as BinarySemaphoreOptions, n as BinarySemaphoreReleaseOptions, o as BinarySemaphoreReleaserFunc, J as CancelableAbility, z as CancelableAbilityOptions, ag as ClientEventPrefix, a1 as ClientFuncItem, a2 as ClientToolFuncSchema, a0 as ClientTools, D as DefaultAsyncSemaphoreCapacity, ae as EventClient, ad as EventClientFuncParams, ai as EventServer, ah as EventServerFuncParams, a7 as EventToolFunc, U as FuncItem, Z as FuncMetaSymbol, M as FuncParam, L as FuncParamType, N as FuncParams, av as IClientToolTransport, g as PASSING_SCORE, aw as PubSubCtx, t as RateLimit, k as RemoteFuncItem, R as RemoteToolFuncSchema, aq as ResClientFuncParams, ar as ResClientTools, as as ResServerFuncParams, at as ResServerTools, au as RpcMethodHandler, ak as RpcMethodsClientFuncParams, al as RpcMethodsClientTool, am as RpcMethodsClientToolSchema, an as RpcMethodsServerFuncParams, ao as RpcMethodsServerTool, ap as RpcMethodsServerToolSchema, a9 as SecondaryCache, s as Semaphore, l as SemaphoreIsReadyFuncType, p as SemaphoreOptions, q as SemaphoreTaskItem, a4 as ServerFuncItem, a3 as ServerFuncParams, a5 as ServerToolFuncSchema, O as TFunc, E as TaskAbortController, G as TaskAbortControllers, H as TaskPromise, v as ToolAsyncCancelableBit, u as ToolAsyncMultiTaskBit, w as ToolAsyncPriorityBit, X as ToolFunc, W as ToolFuncPackage, Y as ToolFuncSchema, aa as _lrucache, ab as createLRUCache, a8 as event, af as eventClient, aj as eventServer, $ as funcGetMeta, _ as funcWithMeta, ac as lrucache, K as makeToolFuncCancelable, a6 as registerCoreTools } from './index-BLW3R7VS.js';
6
6
  import * as _isdk_common_error from '@isdk/common-error';
7
7
  import { BaseError } from '@isdk/common-error';
8
8
  export { AbortError, AbortErrorCode, AlreadyExistsError, AlreadyExistsErrorCode, BaseError, CommonError, ErrorCode, InternalErrorCode, NotFoundError, NotFoundErrorCode, NotImplementationError, NotImplementedErrorCode, createError, throwError } from '@isdk/common-error';
@@ -11,6 +11,9 @@ export { EnvStringTemplate as EnvPromptTemplate, FStringTemplate as FStringPromp
11
11
  import { Event, EventEmitter } from 'events-ex';
12
12
  export { EventEmitter, states as EventStates, eventable, wrapEventEmitter } from 'events-ex';
13
13
  import http, { IncomingMessage, ServerResponse } from 'http';
14
+ export { nanoid } from 'nanoid';
15
+ import { v1, v4, v5, v6, v7 } from 'uuid';
16
+ export { NIL as uuidNIL, parse as uuidParse, stringify as uuidStringify, validate as uuidValidate, version as uuidVersion, v1 as uuidv1, v4 as uuidv4, v5 as uuidv5, v6 as uuidv6, v7 as uuidv7 } from 'uuid';
14
17
  import * as _base32768 from 'base32768';
15
18
  import { IDataType } from 'hash-wasm';
16
19
  export { ConfigFile, FilenameReservedRegex, SanitizeFilenameOptions, WindowsReservedNameRegex, extNameLevel, getMultiLevelExtname, isValidFilename, isValidFilepath, parseYaml, registerYamlTag, sanitizeFilename, sanitizeFilepath, stringifyYaml } from '@isdk/util';
@@ -18,7 +21,6 @@ import * as fs from 'fs';
18
21
  import _memoize, { Options } from 'memoizee';
19
22
  export { f as findPort } from './find-port-qS1CZ9c-.js';
20
23
  import { PreTrainedTokenizer } from '@huggingface/transformers';
21
- export { NIL as uuidNIL, parse as uuidParse, stringify as uuidStringify, validate as uuidValidate, version as uuidVersion, v1 as uuidv1, v4 as uuidv4, v5 as uuidv5 } from 'uuid';
22
24
  export { canonicalize } from 'json-canonicalize';
23
25
  export { mimeType } from 'mime-type/with-db';
24
26
  export { add as addDate, formatISO, parse as parseDateFormat, parseISO, toDate } from 'date-fns';
@@ -374,7 +376,9 @@ declare const EventName = "event";
374
376
  declare const EventBusName = "event-bus";
375
377
  type EventListenerFn = (this: Event, name: string, ...args: any) => any;
376
378
  type EventErrorListenerFn = (this: Event, err: Error, name: string, ...args: any) => any;
377
- declare function getEventableClass(Backend: any): {
379
+ declare function getEventableClass(Backend: any, options?: {
380
+ eventBusName?: string;
381
+ }): {
378
382
  new (): {
379
383
  name: string;
380
384
  _events: any;
@@ -395,7 +399,7 @@ type Events = (string | RegExp)[];
395
399
  /**
396
400
  * Represents a client connected to the SSE channel.
397
401
  */
398
- type Client = {
402
+ type SSEClient = {
399
403
  /** The incoming HTTP request from the client. */
400
404
  req: IncomingMessage;
401
405
  /** The server response object used to send events to the client. */
@@ -404,9 +408,8 @@ type Client = {
404
408
  events?: Events;
405
409
  /**
406
410
  * A unique identifier for the client.
407
- * If not provided during subscription, it defaults to `remoteAddress:remotePort`.
408
411
  */
409
- clientId?: string;
412
+ clientId: string;
410
413
  };
411
414
  declare const SSEChannelAlreadyClosedErrCode = 498;
412
415
  /**
@@ -417,16 +420,27 @@ declare const SSEChannelAlreadyClosedErrCode = 498;
417
420
  */
418
421
  declare class SSEChannel {
419
422
  _active: boolean;
420
- clients: Set<Client>;
423
+ clients: Map<string, SSEClient>;
421
424
  messages: Record<string, any>[];
422
425
  nextID: number;
423
426
  options: Record<string, any>;
424
427
  pingTimer?: NodeJS.Timeout;
428
+ /**
429
+ * Gets the active status of the channel.
430
+ * @returns True if the channel is active, false otherwise.
431
+ */
425
432
  get active(): boolean;
426
433
  set active(v: boolean);
427
434
  /**
428
435
  * Creates a new SSE channel.
429
436
  * @param options - The options for the SSE channel.
437
+ * @param options.pingInterval - Interval in milliseconds to send ping messages (default: 3000).
438
+ * @param options.maxStreamDuration - Maximum duration of a client connection in milliseconds (default: 30000).
439
+ * @param options.clientRetryInterval - Interval in milliseconds for clients to retry connection (default: 1000).
440
+ * @param options.startId - Starting ID for messages (default: 1).
441
+ * @param options.historySize - Maximum number of messages to keep in history (default: 100).
442
+ * @param options.rewind - Number of historical messages to send to new clients (default: 0).
443
+ * @param options.cors - Whether to enable CORS headers (default: false).
430
444
  */
431
445
  constructor(options?: Record<string, any>);
432
446
  /**
@@ -442,21 +456,44 @@ declare class SSEChannel {
442
456
  clientId?: string | string[];
443
457
  }): number | undefined;
444
458
  /**
445
- * Subscribes a client to the SSE channel.
459
+ * Adds event subscriptions to an active client.
460
+ * @param clientId The ID of the client to modify.
461
+ * @param events An array of event names or patterns to add.
462
+ * @returns `true` if the client was found and updated, otherwise `false`.
463
+ */
464
+ subscribe(clientId: string, events: Events): boolean;
465
+ /**
466
+ * Removes event subscriptions from an active client.
467
+ * @param clientId The ID of the client to modify.
468
+ * @param events An array of event names or patterns to remove.
469
+ * @returns `true` if the client was found and updated, otherwise `false`.
470
+ */
471
+ unsubscribe(clientId: string, events: Events): boolean;
472
+ /**
473
+ * Finds a client instance by its unique ID.
474
+ * @param clientId The unique ID of the client.
475
+ * @returns The matching SSEClient, or undefined if not found.
476
+ */
477
+ getClient(clientId: string): SSEClient | undefined;
478
+ /**
479
+ * Establishes a new SSE connection with a client and adds it to the channel.
446
480
  *
447
- * @param req The incoming HTTP request.
448
- * @param res The server response.
449
- * @param events An array of event names or patterns to subscribe to.
450
- * @param clientId An optional unique ID for the client. If not provided, it defaults to `remoteAddress:remotePort`.
451
- * @returns The newly created client object.
452
- * @throws An error if the channel is closed.
481
+ * @param req The incoming HTTP request from the client.
482
+ * @param res The server response object used to send events to the client.
483
+ * @param events An array of event names or patterns that the client wants to subscribe to.
484
+ * @param clientId An optional unique identifier for the client. If not provided, one will be generated based on the client's IP and port.
485
+ * @returns The newly created client object representing the connected client.
486
+ * @throws An error if the channel is closed or if a client ID cannot be determined.
453
487
  */
454
- subscribe(req: IncomingMessage, res: ServerResponse, events?: Events, clientId?: string): Client;
488
+ connect(req: IncomingMessage, res: ServerResponse, events?: Events, clientId?: string): SSEClient;
455
489
  /**
456
- * Unsubscribes a client from the SSE channel.
457
- * @param c - The client to unsubscribe.
490
+ * Disconnects a client from the SSE channel and cleans up resources.
491
+ * @param c - The client to disconnect.
492
+ */
493
+ disconnect(c: SSEClient): void;
494
+ /**
495
+ * Disconnects all clients from the SSE channel.
458
496
  */
459
- unsubscribe(c: Client): void;
460
497
  clearClients(): void;
461
498
  /**
462
499
  * Lists the clients connected to the SSE channel grouped by IP address.
@@ -589,7 +626,26 @@ interface StreamCallbacksAndOptions<I = any, O = any> {
589
626
  */
590
627
  declare function createCallbacksTransformer<I = any, O = any>(cb: StreamCallbacksAndOptions<I, O> | undefined): TransformStream<I, O>;
591
628
 
592
- declare function uuid(ver?: 1 | 4 | 5, encode?: boolean): string;
629
+ declare const uuids: {
630
+ 1: typeof v1;
631
+ 4: typeof v4;
632
+ 5: typeof v5;
633
+ 6: typeof v6;
634
+ 7: typeof v7;
635
+ };
636
+ type UUIDVersions = keyof typeof uuids;
637
+ /**
638
+ * Generates a UUID (Universally Unique Identifier) based on the specified version and encoding options.
639
+ *
640
+ * @param encode - Whether to encode the generated UUID using Base32768 encoding. Defaults to `false`.
641
+ *
642
+ * @returns A string representing the generated UUID. If `encode` is `true`, the UUID will be encoded in Base32768 format.
643
+ *
644
+ * @example
645
+ * // Generate an encoded UUID version 1 using Base32768
646
+ * const encodedUuid1 = uuid(true);
647
+ */
648
+ declare function uuid(encode?: boolean): string;
593
649
 
594
650
  declare enum HashAlgorithm {
595
651
  md5 = 1,
@@ -2304,28 +2360,28 @@ declare function splitWords(input: string): string[];
2304
2360
 
2305
2361
  /**
2306
2362
  * Utility to serialize an object into a URL query parameter string.
2307
- * @param {any} objParam - The parameter object.
2308
- * @returns {string} The URL-encoded query string or an empty string.
2363
+ * @param objParam The parameter object.
2364
+ * @param omitQuestionMark If true, omits the leading '?' from the result. Defaults to false.
2365
+ * @returns The URL-encoded query string or an empty string.
2309
2366
  */
2310
- declare function genUrlParamsStr(objParam: any): string;
2367
+ declare function genUrlParamsStr(objParam: any, omitQuestionMark?: boolean): string;
2311
2368
 
2312
2369
  declare class SseServerPubSubTransport implements IPubSubServerTransport {
2313
2370
  readonly name = "sse";
2314
2371
  readonly protocol: "sse";
2315
2372
  private channel;
2373
+ private sessions;
2316
2374
  private onConn?;
2317
2375
  private onDis?;
2318
- mount?(): void;
2319
- subscribe(events?: string[], options?: {
2320
- req?: IncomingMessage;
2321
- res?: ServerResponse;
2322
- clientId?: string;
2323
- }): {
2376
+ connect(options?: {
2324
2377
  req: IncomingMessage;
2325
2378
  res: ServerResponse;
2326
- events?: (string | RegExp)[];
2327
2379
  clientId?: string;
2328
- };
2380
+ events?: string[];
2381
+ }): PubSubServerSession;
2382
+ getSessionFromReq(req: IncomingMessage): PubSubServerSession | undefined;
2383
+ subscribe(session: PubSubServerSession, events: string[]): void;
2384
+ unsubscribe(session: PubSubServerSession, events: string[]): void;
2329
2385
  publish(event: string, data: any, target?: {
2330
2386
  clientId?: PubSubClientId | PubSubClientId[];
2331
2387
  }): void;
@@ -2334,7 +2390,9 @@ declare class SseServerPubSubTransport implements IPubSubServerTransport {
2334
2390
  }
2335
2391
 
2336
2392
  declare class SseClientPubSubTransport implements IPubSubClientTransport {
2337
- connect(url: string, params?: Record<string, any>): PubSubClientStream;
2393
+ private apiRoot;
2394
+ setApiRoot(apiRoot: string): void;
2395
+ connect(url: string, params?: any): Promise<PubSubClientStream>;
2338
2396
  disconnect(stream: PubSubClientStream): void;
2339
2397
  }
2340
2398
 
@@ -2345,9 +2403,15 @@ declare class SseClientPubSubTransport implements IPubSubClientTransport {
2345
2403
  interface IServerToolTransport extends IToolTransport {
2346
2404
  /**
2347
2405
  * Mounts the ServerTools registry, creating the necessary API routes.
2348
- * @param serverTools The ServerTools class.
2349
- * @param apiPrefix An optional prefix for all API routes.
2350
- * @param options Additional options for the transport start.
2406
+ *
2407
+ * This method is responsible for integrating the tool-handling logic with a
2408
+ * running server instance.
2409
+ *
2410
+ * @param serverTools The ServerTools class containing the tool definitions.
2411
+ * @param apiPrefix An optional prefix for all API routes (e.g., '/api').
2412
+ * @param options A container for transport-specific options. For example,
2413
+ * an HTTP-based transport would expect an `{ server: http.Server }` object
2414
+ * to attach its route handlers to.
2351
2415
  */
2352
2416
  mount(serverTools: typeof ServerTools, apiPrefix?: string, options?: any): void;
2353
2417
  /**
@@ -2389,7 +2453,6 @@ declare abstract class ServerToolTransport extends ToolTransport implements ISer
2389
2453
  declare class HttpServerToolTransport extends ServerToolTransport {
2390
2454
  server: http.Server;
2391
2455
  private discoveryHandlerInfo;
2392
- private rpcHandlerInfo;
2393
2456
  constructor(options?: http.ServerOptions);
2394
2457
  private requestListener;
2395
2458
  addDiscoveryHandler(apiPrefix: string, handler: () => any): void;
@@ -2400,7 +2463,7 @@ declare class HttpServerToolTransport extends ServerToolTransport {
2400
2463
  port: number;
2401
2464
  host?: string;
2402
2465
  }): Promise<void>;
2403
- stop(): Promise<void>;
2466
+ stop(force?: boolean): Promise<void>;
2404
2467
  getRaw(): http.Server;
2405
2468
  }
2406
2469
 
@@ -2424,4 +2487,4 @@ declare class HttpClientToolTransport extends ClientToolTransport {
2424
2487
  toObject(res: any, args?: any): Promise<any>;
2425
2488
  }
2426
2489
 
2427
- export { AIArgProcessor, type AIChatAssistantMessageParam, type AIChatContentPart, type AIChatContentPartImage, type AIChatContentPartText, type AIChatMessageParam, type AIChatMessageParamBase, type AIChatMessageToolCall, type AIChatRole, AIChatRoles, type AIChatSystemMessageParam, type AIChatToolChoiceFuncObject, type AIChatToolChoiceObject, type AIChatToolChoiceParam, type AIChatToolFunc, type AIChatToolFuncParam, type AIChatToolMessageParam, type AIChatToolParam, type AIChatToolTypeObject, type AIChatUserMessageParam, type AIChoiceConfig, type AIMessageType, AIMessageTypes, AIModelNameRules, type AIResult, AIStream, type AIStreamParser, type AIStreamParserOptions, type AITextGenerationFinishReason, AITextGenerationFinishReasons, ActionName, ArrayMergeWay, ArrayMergeWaySymbol, AsyncTaskId, type BeforeShutdownListener, ChoiceArgProcessor, ClientToolTransport, DEFAULT_CONFIG_NAME, DefaultDateFormat, EventBusName, type EventErrorListenerFn, type EventListenerFn, EventName, FewShotPromptTemplate, type FewShotPromptTemplateOptions, Funcs, type HashAlgoParams, HashAlgorithm, HttpClientToolTransport, HttpServerToolTransport, type IFileMetaInfo, IPubSubClientTransport, IPubSubServerTransport, type IReadTextFileChunksOptions, type IServerToolTransport, IToolTransport, type ITruncateToTokenLimitOptions, IntSet, type JsonFilter, LLM_TOKENIZER_NAMES, LLM_TOKENIZER_NAMES_MAP, ObjectArgsToArgsInfo, type ParseObjectArgumentOptions, type ProbabilityItem, PromptExampleSelector, type PromptExampleSelectorOptions, type PromptExamples, PubSubClientId, PubSubClientStream, PubSubServerSession, RStreamErrCode, ReadableStreamError, type ReplacePlacehoderOptions, ResponseRStreamErrCode, SHUTDOWN_SIGNALS, SSEChannel, SSEChannelAlreadyClosedErrCode, type SectionStringOptions, ServerToolTransport, ServerTools, SignalGate, type SplitSentenceOptions, SseClientPubSubTransport, SseServerPubSubTransport, StrangeHumanName, type StreamCallbacksAndOptions, TemplateArgProcessor, ToolTransport, YamlTypeBaseObject, assignDirs, backendEventable, base32768, beforeShutdown, calcPerplexity, calcPerplexitySimple, completeSentences, concatText, countLLMTokens, countRegexMatches, createCallbacksTransformer, createEmptyReadableStream, createEndWithRepetitionDetector, createEventStreamTransformer, createYamlObjectTag, dateToText, decodeCharset, defaultsWithConcat, detectCharset, encodeLLMTokens, ensureQuoted, expandConfig, expandPath, expandPathInObject, expandPaths, fileIsExists, filterValidFnScope, findIndexNonEmptyFrom, formatTextWithSpace, genUrlParamsStr, getAllEnumKeys, getConfigFileNames, getConfigs, getFileMetaInfo, getHashAlgoBySize, getKeysPath, getLLMTokenizer, getPackageDir, getRealFilepath, getResponseErrorReadableStream, getXDGConfigs, hasDirectoryIn, hash, hashFile, hashObject, hashStream, initShutdown, isLangUsingSpaces, isListItemString, isModelNameMatched, isPunctuationChar, isQuoted, isRegExp, isSameString, isSectionString, isSentenceEnding, isSepLineString, isStrWrapped, isSubdirectory, isTitleString, isWebStream, joinSplitWords, jsonFilterToWhere, jsonToMarkdownStr, loadAIConfig, loadConfig, loadConfigFile, loadFileFromPaths, loadTextFromPaths, matchUrlProtocol, memoize, mergeArray, messagesToText, normalizePath, paramsSizeToScaleStr, parseCommand, parseJsJson, parseJsJsonSimpleSync, parseObjectArgInfo, parseObjectArgumentInfos, parseObjectArguments, parseObjectArgumentsAsArgInfos, pruneSubdirectories, pruneSubdirectoriesInPlace, quoteStr, readFilenamesRecursiveSync, readTextFileChunks, readTextFileChunksEx, readableFromAsyncIterable, removeMarkdownBold, removeMarkdownBoldAndItalic, removeMarkdownItalic, replaceWithPlaceholder, restoreFromPlacehoders, saveConfigFile, scaleStrToParamsSize, shutdown, simplifyObjectArguments, sleep, sortedValues, splitChunks, splitParagraph, splitSentence, splitWords, stripConsoleColor, textToDate, toDateTime, trimStartOfStreamHelper, truncTo, truncateByToken, truncateToTokenLimit, truncateToTokenLimitEx, uuid, wait, xxhash, xxhash32, xxhash64, xxhashAsStr, yieldExec };
2490
+ export { AIArgProcessor, type AIChatAssistantMessageParam, type AIChatContentPart, type AIChatContentPartImage, type AIChatContentPartText, type AIChatMessageParam, type AIChatMessageParamBase, type AIChatMessageToolCall, type AIChatRole, AIChatRoles, type AIChatSystemMessageParam, type AIChatToolChoiceFuncObject, type AIChatToolChoiceObject, type AIChatToolChoiceParam, type AIChatToolFunc, type AIChatToolFuncParam, type AIChatToolMessageParam, type AIChatToolParam, type AIChatToolTypeObject, type AIChatUserMessageParam, type AIChoiceConfig, type AIMessageType, AIMessageTypes, AIModelNameRules, type AIResult, AIStream, type AIStreamParser, type AIStreamParserOptions, type AITextGenerationFinishReason, AITextGenerationFinishReasons, ActionName, ArrayMergeWay, ArrayMergeWaySymbol, AsyncTaskId, type BeforeShutdownListener, ChoiceArgProcessor, ClientToolTransport, DEFAULT_CONFIG_NAME, DefaultDateFormat, EventBusName, type EventErrorListenerFn, type EventListenerFn, EventName, FewShotPromptTemplate, type FewShotPromptTemplateOptions, Funcs, type HashAlgoParams, HashAlgorithm, HttpClientToolTransport, HttpServerToolTransport, type IFileMetaInfo, IPubSubClientTransport, IPubSubServerTransport, type IReadTextFileChunksOptions, type IServerToolTransport, IToolTransport, type ITruncateToTokenLimitOptions, IntSet, type JsonFilter, LLM_TOKENIZER_NAMES, LLM_TOKENIZER_NAMES_MAP, ObjectArgsToArgsInfo, type ParseObjectArgumentOptions, type ProbabilityItem, PromptExampleSelector, type PromptExampleSelectorOptions, type PromptExamples, PubSubClientId, PubSubClientStream, PubSubServerSession, RStreamErrCode, ReadableStreamError, type ReplacePlacehoderOptions, ResponseRStreamErrCode, SHUTDOWN_SIGNALS, SSEChannel, SSEChannelAlreadyClosedErrCode, type SSEClient, type SectionStringOptions, ServerToolTransport, ServerTools, SignalGate, type SplitSentenceOptions, SseClientPubSubTransport, SseServerPubSubTransport, StrangeHumanName, type StreamCallbacksAndOptions, TemplateArgProcessor, ToolTransport, type UUIDVersions, YamlTypeBaseObject, assignDirs, backendEventable, base32768, beforeShutdown, calcPerplexity, calcPerplexitySimple, completeSentences, concatText, countLLMTokens, countRegexMatches, createCallbacksTransformer, createEmptyReadableStream, createEndWithRepetitionDetector, createEventStreamTransformer, createYamlObjectTag, dateToText, decodeCharset, defaultsWithConcat, detectCharset, encodeLLMTokens, ensureQuoted, expandConfig, expandPath, expandPathInObject, expandPaths, fileIsExists, filterValidFnScope, findIndexNonEmptyFrom, formatTextWithSpace, genUrlParamsStr, getAllEnumKeys, getConfigFileNames, getConfigs, getFileMetaInfo, getHashAlgoBySize, getKeysPath, getLLMTokenizer, getPackageDir, getRealFilepath, getResponseErrorReadableStream, getXDGConfigs, hasDirectoryIn, hash, hashFile, hashObject, hashStream, initShutdown, isLangUsingSpaces, isListItemString, isModelNameMatched, isPunctuationChar, isQuoted, isRegExp, isSameString, isSectionString, isSentenceEnding, isSepLineString, isStrWrapped, isSubdirectory, isTitleString, isWebStream, joinSplitWords, jsonFilterToWhere, jsonToMarkdownStr, loadAIConfig, loadConfig, loadConfigFile, loadFileFromPaths, loadTextFromPaths, matchUrlProtocol, memoize, mergeArray, messagesToText, normalizePath, paramsSizeToScaleStr, parseCommand, parseJsJson, parseJsJsonSimpleSync, parseObjectArgInfo, parseObjectArgumentInfos, parseObjectArguments, parseObjectArgumentsAsArgInfos, pruneSubdirectories, pruneSubdirectoriesInPlace, quoteStr, readFilenamesRecursiveSync, readTextFileChunks, readTextFileChunksEx, readableFromAsyncIterable, removeMarkdownBold, removeMarkdownBoldAndItalic, removeMarkdownItalic, replaceWithPlaceholder, restoreFromPlacehoders, saveConfigFile, scaleStrToParamsSize, shutdown, simplifyObjectArguments, sleep, sortedValues, splitChunks, splitParagraph, splitSentence, splitWords, stripConsoleColor, textToDate, toDateTime, trimStartOfStreamHelper, truncTo, truncateByToken, truncateToTokenLimit, truncateToTokenLimitEx, uuid, wait, xxhash, xxhash32, xxhash64, xxhashAsStr, yieldExec };