@isdk/ai-tool 0.8.2 → 0.9.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 (405) hide show
  1. package/dist/chunk-BIJ2JH4U.mjs +1 -0
  2. package/dist/chunk-OYMVHUDZ.mjs +1 -0
  3. package/dist/funcs.d.mts +16 -5
  4. package/dist/funcs.d.ts +16 -5
  5. package/dist/funcs.js +1 -1
  6. package/dist/funcs.mjs +1 -1
  7. package/dist/index.d.mts +839 -563
  8. package/dist/index.d.ts +839 -563
  9. package/dist/index.js +1 -1
  10. package/dist/index.mjs +1 -1
  11. package/dist/test/util.d.mts +1 -1
  12. package/dist/test/util.d.ts +1 -1
  13. package/dist/test/util.js +1 -1
  14. package/dist/test/util.mjs +1 -1
  15. package/docs/api/@isdk/namespaces/ClientTools/README.md +11 -0
  16. package/docs/api/@isdk/namespaces/ClientTools/functions/get.md +27 -0
  17. package/docs/api/@isdk/namespaces/EventStates/variables/ABORT.md +1 -1
  18. package/docs/api/@isdk/namespaces/EventStates/variables/CONTINUE.md +1 -1
  19. package/docs/api/@isdk/namespaces/EventStates/variables/DONE.md +1 -1
  20. package/docs/api/@isdk/namespaces/EventStates/variables/STOPPED.md +1 -1
  21. package/docs/api/classes/BinarySemaphore.md +148 -67
  22. package/docs/api/classes/CancelableAbility.md +95 -43
  23. package/docs/api/classes/ClientToolTransport.md +31 -16
  24. package/docs/api/classes/ClientTools.md +868 -158
  25. package/docs/api/classes/CmdArgLexer.md +82 -0
  26. package/docs/api/classes/CmdArgParser.md +56 -0
  27. package/docs/api/classes/ConfigFile.md +6 -6
  28. package/docs/api/classes/EnvPromptTemplate.md +224 -52
  29. package/docs/api/classes/EventClient.md +902 -192
  30. package/docs/api/classes/EventEmitter.md +62 -12
  31. package/docs/api/classes/EventServer.md +895 -182
  32. package/docs/api/classes/EventToolFunc.md +801 -123
  33. package/docs/api/classes/FStringPromptTemplate.md +224 -52
  34. package/docs/api/classes/FewShotPromptTemplate.md +231 -59
  35. package/docs/api/classes/GolangPromptTemplate.md +224 -52
  36. package/docs/api/classes/HttpClientToolTransport.md +33 -19
  37. package/docs/api/classes/HttpServerToolTransport.md +15 -15
  38. package/docs/api/classes/IntSet.md +21 -21
  39. package/docs/api/classes/MailboxClientTransport.md +398 -0
  40. package/docs/api/classes/MailboxServerTransport.md +433 -0
  41. package/docs/api/classes/PromptExampleSelector.md +11 -11
  42. package/docs/api/classes/PromptTemplate.md +199 -51
  43. package/docs/api/classes/ReadableStreamError.md +2 -2
  44. package/docs/api/classes/ResClientTools.md +875 -165
  45. package/docs/api/classes/ResServerTools.md +869 -156
  46. package/docs/api/classes/RpcMethodsClientTool.md +870 -160
  47. package/docs/api/classes/RpcMethodsServerTool.md +865 -152
  48. package/docs/api/classes/SSEChannel.md +23 -23
  49. package/docs/api/classes/Semaphore.md +148 -76
  50. package/docs/api/classes/ServerToolTransport.md +14 -13
  51. package/docs/api/classes/ServerTools.md +854 -138
  52. package/docs/api/classes/SignalGate.md +12 -12
  53. package/docs/api/classes/SseClientPubSubTransport.md +4 -4
  54. package/docs/api/classes/SseServerPubSubTransport.md +13 -13
  55. package/docs/api/classes/TaskAbortController.md +33 -11
  56. package/docs/api/classes/ToolFunc.md +725 -119
  57. package/docs/api/classes/ToolTransport.md +7 -7
  58. package/docs/api/classes/YamlTypeBaseObject.md +2 -2
  59. package/docs/api/enumerations/AsyncFeatureBits.md +4 -4
  60. package/docs/api/enumerations/AsyncFeatures.md +4 -4
  61. package/docs/api/enumerations/CmdArgTokenType.md +129 -0
  62. package/docs/api/enumerations/HashAlgorithm.md +38 -12
  63. package/docs/api/functions/AIArgProcessor.md +8 -17
  64. package/docs/api/functions/AIStream.md +1 -1
  65. package/docs/api/functions/ChoiceArgProcessor.md +13 -15
  66. package/docs/api/functions/DefaultDateFormat.md +1 -1
  67. package/docs/api/functions/ObjectArgsToArgsInfo.md +11 -9
  68. package/docs/api/functions/RateLimit.md +33 -6
  69. package/docs/api/functions/TemplateArgProcessor.md +13 -15
  70. package/docs/api/functions/assignDirs.md +1 -1
  71. package/docs/api/functions/beforeShutdown.md +3 -3
  72. package/docs/api/functions/calcPerplexity.md +3 -3
  73. package/docs/api/functions/calcPerplexitySimple.md +3 -3
  74. package/docs/api/functions/cmdArgEvaluate.md +28 -0
  75. package/docs/api/functions/cmdArgsToMergedObject.md +34 -0
  76. package/docs/api/functions/completeSentences.md +1 -1
  77. package/docs/api/functions/concatText.md +1 -1
  78. package/docs/api/functions/countLLMTokens.md +1 -1
  79. package/docs/api/functions/countRegexMatches.md +1 -1
  80. package/docs/api/functions/createCallbacksTransformer.md +23 -19
  81. package/docs/api/functions/createEmptyReadableStream.md +1 -1
  82. package/docs/api/functions/createEndWithRepetitionDetector.md +4 -4
  83. package/docs/api/functions/createEventStreamTransformer.md +1 -1
  84. package/docs/api/functions/createHfValueFunc.md +1 -1
  85. package/docs/api/functions/createLRUCache.md +1 -1
  86. package/docs/api/functions/createYamlObjectTag.md +1 -1
  87. package/docs/api/functions/dateToText.md +1 -1
  88. package/docs/api/functions/decodeCharset.md +1 -1
  89. package/docs/api/functions/defaultsWithConcat.md +1 -1
  90. package/docs/api/functions/detectCharset.md +1 -1
  91. package/docs/api/functions/encodeLLMTokens.md +1 -1
  92. package/docs/api/functions/ensureQuoted.md +3 -1
  93. package/docs/api/functions/evaluateExpression.md +40 -0
  94. package/docs/api/functions/eventable.md +1 -1
  95. package/docs/api/functions/expandConfig.md +1 -1
  96. package/docs/api/functions/expandEnv.md +1 -1
  97. package/docs/api/functions/expandObjEnv.md +1 -1
  98. package/docs/api/functions/expandPath.md +1 -1
  99. package/docs/api/functions/expandPathInObject.md +1 -1
  100. package/docs/api/functions/expandPaths.md +1 -1
  101. package/docs/api/functions/extNameLevel.md +1 -1
  102. package/docs/api/functions/extractCodeBlock.md +51 -0
  103. package/docs/api/functions/fileIsExists.md +3 -3
  104. package/docs/api/functions/filterValidFnScope.md +3 -3
  105. package/docs/api/functions/findIndexNonEmptyFrom.md +1 -1
  106. package/docs/api/functions/findPort.md +13 -5
  107. package/docs/api/functions/formatTextWithSpace.md +1 -1
  108. package/docs/api/functions/funcGetMeta.md +1 -1
  109. package/docs/api/functions/funcWithMeta.md +4 -4
  110. package/docs/api/functions/genUrlParamsStr.md +1 -1
  111. package/docs/api/functions/getAllEnumKeys.md +1 -1
  112. package/docs/api/functions/getConfigFileNames.md +1 -1
  113. package/docs/api/functions/getConfigs.md +1 -1
  114. package/docs/api/functions/getEnvVairables.md +1 -1
  115. package/docs/api/functions/getFileMetaInfo.md +1 -1
  116. package/docs/api/functions/getHashAlgoBySize.md +1 -1
  117. package/docs/api/functions/getKeysPath.md +1 -1
  118. package/docs/api/functions/getLLMTokenizer.md +1 -1
  119. package/docs/api/functions/getMultiLevelExtname.md +1 -1
  120. package/docs/api/functions/getPackageDir.md +1 -1
  121. package/docs/api/functions/getRealFilepath.md +1 -1
  122. package/docs/api/functions/getResponseErrorReadableStream.md +2 -2
  123. package/docs/api/functions/getXDGConfigs.md +1 -1
  124. package/docs/api/functions/hasDirectoryIn.md +3 -3
  125. package/docs/api/functions/hash.md +25 -4
  126. package/docs/api/functions/hashFile.md +1 -1
  127. package/docs/api/functions/hashObject.md +23 -1
  128. package/docs/api/functions/hashStream.md +25 -4
  129. package/docs/api/functions/initShutdown.md +1 -1
  130. package/docs/api/functions/isIdentifier.md +30 -0
  131. package/docs/api/functions/isLangUsingSpaces.md +1 -1
  132. package/docs/api/functions/isListItemString.md +3 -3
  133. package/docs/api/functions/isModelNameMatched.md +3 -3
  134. package/docs/api/functions/isPathIdentifier.md +23 -0
  135. package/docs/api/functions/isPunctuationChar.md +1 -1
  136. package/docs/api/functions/isQuoted.md +4 -1
  137. package/docs/api/functions/isRegExp.md +20 -1
  138. package/docs/api/functions/isSameString.md +1 -1
  139. package/docs/api/functions/isSectionString.md +3 -3
  140. package/docs/api/functions/isSentenceEnding.md +1 -1
  141. package/docs/api/functions/isSepLineString.md +3 -3
  142. package/docs/api/functions/isStrWrapped.md +3 -1
  143. package/docs/api/functions/isSubdirectory.md +1 -1
  144. package/docs/api/functions/isTitleString.md +3 -3
  145. package/docs/api/functions/isValidFilename.md +1 -1
  146. package/docs/api/functions/isValidFilepath.md +1 -1
  147. package/docs/api/functions/isWebStream.md +1 -1
  148. package/docs/api/functions/joinSplitWords.md +1 -1
  149. package/docs/api/functions/jsonFilterToWhere.md +1 -1
  150. package/docs/api/functions/jsonToMarkdownStr.md +1 -1
  151. package/docs/api/functions/loadAIConfig.md +1 -1
  152. package/docs/api/functions/loadConfig.md +1 -1
  153. package/docs/api/functions/loadConfigFile.md +1 -1
  154. package/docs/api/functions/loadFileFromPaths.md +1 -1
  155. package/docs/api/functions/loadTextFromPaths.md +1 -1
  156. package/docs/api/functions/lrucache.md +1 -1
  157. package/docs/api/functions/matchUrlProtocol.md +3 -3
  158. package/docs/api/functions/memoize.md +1 -1
  159. package/docs/api/functions/mergeArray.md +1 -1
  160. package/docs/api/functions/messagesToText.md +1 -1
  161. package/docs/api/functions/normalizePath.md +1 -1
  162. package/docs/api/functions/paramsSizeToScaleStr.md +1 -1
  163. package/docs/api/functions/parseCommand.md +21 -4
  164. package/docs/api/functions/parseJsJson.md +1 -1
  165. package/docs/api/functions/parseJsJsonSimpleSync.md +1 -1
  166. package/docs/api/functions/parseObjectArguments.md +17 -33
  167. package/docs/api/functions/parseYaml.md +1 -1
  168. package/docs/api/functions/prependNewlineIfMultiline.md +39 -0
  169. package/docs/api/functions/pruneSubdirectories.md +1 -1
  170. package/docs/api/functions/pruneSubdirectoriesInPlace.md +1 -1
  171. package/docs/api/functions/quoteStr.md +4 -1
  172. package/docs/api/functions/readFilenamesRecursiveSync.md +1 -1
  173. package/docs/api/functions/readTextFileChunks.md +1 -1
  174. package/docs/api/functions/readTextFileChunksEx.md +1 -1
  175. package/docs/api/functions/readableFromAsyncIterable.md +1 -1
  176. package/docs/api/functions/registerCoreTools.md +1 -1
  177. package/docs/api/functions/registerYamlTag.md +2 -2
  178. package/docs/api/functions/removeMarkdownBold.md +1 -1
  179. package/docs/api/functions/removeMarkdownBoldAndItalic.md +1 -1
  180. package/docs/api/functions/removeMarkdownItalic.md +1 -1
  181. package/docs/api/functions/replaceWithPlaceholder.md +3 -18
  182. package/docs/api/functions/restoreFromPlacehoders.md +2 -20
  183. package/docs/api/functions/sanitizeFilename.md +1 -1
  184. package/docs/api/functions/sanitizeFilepath.md +1 -1
  185. package/docs/api/functions/saveConfigFile.md +1 -1
  186. package/docs/api/functions/scaleStrToParamsSize.md +1 -1
  187. package/docs/api/functions/shutdown.md +2 -2
  188. package/docs/api/functions/simplifyObjectArguments.md +4 -1
  189. package/docs/api/functions/simplifyResult.md +34 -0
  190. package/docs/api/functions/sleep.md +1 -1
  191. package/docs/api/functions/sortedValues.md +1 -1
  192. package/docs/api/functions/splitChunks.md +1 -1
  193. package/docs/api/functions/splitParagraph.md +1 -1
  194. package/docs/api/functions/splitSentence.md +1 -1
  195. package/docs/api/functions/splitWords.md +1 -1
  196. package/docs/api/functions/stringifyYaml.md +1 -1
  197. package/docs/api/functions/stripConsoleColor.md +1 -1
  198. package/docs/api/functions/textToDate.md +1 -1
  199. package/docs/api/functions/textify.md +43 -0
  200. package/docs/api/functions/toDateTime.md +3 -3
  201. package/docs/api/functions/toRegExp.md +1 -1
  202. package/docs/api/functions/trimStartOfStreamHelper.md +1 -1
  203. package/docs/api/functions/truncTo.md +1 -1
  204. package/docs/api/functions/truncateByToken.md +1 -1
  205. package/docs/api/functions/truncateToTokenLimit.md +1 -1
  206. package/docs/api/functions/truncateToTokenLimitEx.md +1 -1
  207. package/docs/api/functions/uuid.md +1 -1
  208. package/docs/api/functions/wrapEventEmitter.md +1 -1
  209. package/docs/api/functions/wrapFlagValue.md +29 -0
  210. package/docs/api/functions/xxhash.md +27 -6
  211. package/docs/api/functions/xxhash32.md +22 -4
  212. package/docs/api/functions/xxhash64.md +22 -4
  213. package/docs/api/functions/xxhashAsStr.md +27 -6
  214. package/docs/api/functions/yieldExec.md +1 -1
  215. package/docs/api/globals.md +51 -18
  216. package/docs/api/interfaces/AIChatAssistantMessageParam.md +14 -14
  217. package/docs/api/interfaces/AIChatContentPartBase.md +26 -0
  218. package/docs/api/interfaces/AIChatContentPartImage.md +15 -3
  219. package/docs/api/interfaces/AIChatContentPartText.md +15 -3
  220. package/docs/api/interfaces/AIChatMessageParamBase.md +9 -9
  221. package/docs/api/interfaces/AIChatMessageToolCall.md +12 -8
  222. package/docs/api/interfaces/AIChatSystemMessageParam.md +10 -10
  223. package/docs/api/interfaces/AIChatToolChoiceFuncObject.md +3 -3
  224. package/docs/api/interfaces/AIChatToolChoiceObject.md +2 -2
  225. package/docs/api/interfaces/AIChatToolDefinition.md +45 -0
  226. package/docs/api/interfaces/AIChatToolFunc.md +5 -5
  227. package/docs/api/interfaces/AIChatToolFuncParam.md +3 -3
  228. package/docs/api/interfaces/AIChatToolMessageParam.md +13 -13
  229. package/docs/api/interfaces/AIChatToolParam.md +2 -2
  230. package/docs/api/interfaces/AIChatToolTypeObject.md +2 -2
  231. package/docs/api/interfaces/AIChatUserMessageParam.md +14 -14
  232. package/docs/api/interfaces/AIResult.md +7 -7
  233. package/docs/api/interfaces/AIStreamParser.md +2 -2
  234. package/docs/api/interfaces/AIStreamParserOptions.md +2 -2
  235. package/docs/api/interfaces/BaseFunc.md +15 -15
  236. package/docs/api/interfaces/BaseFuncItem.md +16 -16
  237. package/docs/api/interfaces/BinarySemaphoreAcquireOptions.md +9 -2
  238. package/docs/api/interfaces/BinarySemaphoreOptions.md +22 -5
  239. package/docs/api/interfaces/BinarySemaphoreReleaseOptions.md +7 -5
  240. package/docs/api/interfaces/CancelableAbilityOptions.md +4 -4
  241. package/docs/api/interfaces/ClientFuncItem.md +70 -19
  242. package/docs/api/interfaces/CmdArgAIChoiceConfig.md +97 -0
  243. package/docs/api/interfaces/CmdArgArgsInfo.md +31 -0
  244. package/docs/api/interfaces/CmdArgContext.md +103 -0
  245. package/docs/api/interfaces/CmdArgFlagMetadata.md +21 -0
  246. package/docs/api/interfaces/CmdArgMapResult.md +41 -0
  247. package/docs/api/interfaces/CmdArgParseResult.md +51 -0
  248. package/docs/api/interfaces/CmdArgParsedCommand.md +41 -0
  249. package/docs/api/interfaces/CmdArgParserOptions.md +225 -0
  250. package/docs/api/interfaces/CmdArgProcessorResultOptions.md +22 -0
  251. package/docs/api/interfaces/CmdArgSimplifyOptions.md +101 -0
  252. package/docs/api/interfaces/CmdArgToken.md +51 -0
  253. package/docs/api/interfaces/EventClientFuncParams.md +5 -5
  254. package/docs/api/interfaces/EventServerFuncParams.md +21 -7
  255. package/docs/api/interfaces/FewShotPromptTemplateOptions.md +18 -6
  256. package/docs/api/interfaces/FuncItem.md +19 -15
  257. package/docs/api/interfaces/FuncParam.md +5 -5
  258. package/docs/api/interfaces/FuncParams.md +1 -1
  259. package/docs/api/interfaces/Funcs.md +1 -1
  260. package/docs/api/interfaces/HashAlgoParams.md +36 -5
  261. package/docs/api/interfaces/IClientToolTransport.md +24 -10
  262. package/docs/api/interfaces/IFileMetaInfo.md +8 -8
  263. package/docs/api/interfaces/IPubSubClientTransport.md +4 -4
  264. package/docs/api/interfaces/IPubSubServerTransport.md +14 -14
  265. package/docs/api/interfaces/IReadTextFileChunksOptions.md +11 -11
  266. package/docs/api/interfaces/IServerToolTransport.md +8 -8
  267. package/docs/api/interfaces/IToolTransport.md +5 -5
  268. package/docs/api/interfaces/ITruncateToTokenLimitOptions.md +10 -10
  269. package/docs/api/interfaces/JsonFilter.md +1 -1
  270. package/docs/api/interfaces/MailboxClientOptions.md +74 -0
  271. package/docs/api/interfaces/MailboxServerOptions.md +69 -0
  272. package/docs/api/interfaces/ProbabilityItem.md +4 -4
  273. package/docs/api/interfaces/PromptExampleSelectorOptions.md +3 -3
  274. package/docs/api/interfaces/PromptTemplateOptions.md +8 -0
  275. package/docs/api/interfaces/PubSubClientStream.md +11 -11
  276. package/docs/api/interfaces/PubSubServerSession.md +8 -8
  277. package/docs/api/interfaces/RegisterOptions.md +298 -0
  278. package/docs/api/interfaces/RemoteFuncItem.md +63 -20
  279. package/docs/api/interfaces/ReplacePlacehoderOptions.md +5 -5
  280. package/docs/api/interfaces/ResClientFuncParams.md +3 -3
  281. package/docs/api/interfaces/ResServerFuncParams.md +20 -6
  282. package/docs/api/interfaces/RpcMethodsClientFuncParams.md +2 -2
  283. package/docs/api/interfaces/RpcMethodsServerFuncParams.md +18 -4
  284. package/docs/api/interfaces/SanitizeFilenameOptions.md +3 -3
  285. package/docs/api/interfaces/SectionStringOptions.md +3 -3
  286. package/docs/api/interfaces/SemaphoreOptions.md +30 -7
  287. package/docs/api/interfaces/SemaphoreTaskItem.md +18 -5
  288. package/docs/api/interfaces/ServerFuncItem.md +71 -20
  289. package/docs/api/interfaces/ServerFuncParams.md +14 -4
  290. package/docs/api/interfaces/SplitSentenceOptions.md +5 -5
  291. package/docs/api/interfaces/StreamCallbacksAndOptions.md +80 -7
  292. package/docs/api/interfaces/TaskAbortControllers.md +2 -2
  293. package/docs/api/interfaces/TaskPromise.md +6 -6
  294. package/docs/api/interfaces/TextifyInlineOptions.md +51 -0
  295. package/docs/api/interfaces/TextifyOptions.md +108 -0
  296. package/docs/api/interfaces/ToolFuncContext.md +73 -0
  297. package/docs/api/interfaces/ToolFuncPackage.md +4 -4
  298. package/docs/api/interfaces/ToolFuncRegistryIsolateOptions.md +41 -0
  299. package/docs/api/interfaces/UnregisterOptions.md +56 -0
  300. package/docs/api/type-aliases/AIChatContentPart.md +2 -2
  301. package/docs/api/type-aliases/AIChatMessageParam.md +1 -1
  302. package/docs/api/type-aliases/AIChatRole.md +2 -2
  303. package/docs/api/type-aliases/AIChatTemplateCaps.md +239 -0
  304. package/docs/api/type-aliases/AIChatToolChoiceParam.md +1 -1
  305. package/docs/api/type-aliases/AIMessageType.md +1 -1
  306. package/docs/api/type-aliases/AIModelNameRule.md +1 -1
  307. package/docs/api/type-aliases/AIModelNameRuleFn.md +1 -1
  308. package/docs/api/type-aliases/AIModelNameRules.md +1 -1
  309. package/docs/api/type-aliases/AITextGenerationFinishReason.md +1 -1
  310. package/docs/api/type-aliases/ActionName.md +1 -1
  311. package/docs/api/type-aliases/ArgProcessor.md +24 -0
  312. package/docs/api/type-aliases/ArrayMergeWay.md +1 -1
  313. package/docs/api/type-aliases/AsyncTaskId.md +1 -1
  314. package/docs/api/type-aliases/BeforeShutdownListener.md +1 -1
  315. package/docs/api/type-aliases/CmdArgFlagValue.md +14 -0
  316. package/docs/api/type-aliases/CmdArgFlagsRecord.md +13 -0
  317. package/docs/api/type-aliases/EventErrorListenerFn.md +1 -1
  318. package/docs/api/type-aliases/EventListenerFn.md +1 -1
  319. package/docs/api/type-aliases/FuncParamType.md +1 -1
  320. package/docs/api/type-aliases/PromptExamples.md +1 -1
  321. package/docs/api/type-aliases/PubSubClientId.md +1 -1
  322. package/docs/api/type-aliases/PubSubCtx.md +6 -6
  323. package/docs/api/type-aliases/RpcMethodHandler.md +1 -1
  324. package/docs/api/type-aliases/SSEClient.md +5 -5
  325. package/docs/api/type-aliases/SemaphoreIsReadyFuncType.md +4 -1
  326. package/docs/api/type-aliases/SimplifiedResultType.md +14 -0
  327. package/docs/api/type-aliases/StreamCloseStatus.md +16 -0
  328. package/docs/api/type-aliases/TFunc.md +1 -1
  329. package/docs/api/type-aliases/TextifyInlineStyleMode.md +16 -0
  330. package/docs/api/type-aliases/TextifyStringQuoting.md +16 -0
  331. package/docs/api/type-aliases/UUIDVersions.md +3 -1
  332. package/docs/api/variables/AIChatRoles.md +2 -2
  333. package/docs/api/variables/AIMessageTypes.md +1 -1
  334. package/docs/api/variables/AITextGenerationFinishReasons.md +1 -1
  335. package/docs/api/variables/ActionNames.md +1 -1
  336. package/docs/api/variables/ArrayMergeWay.md +1 -1
  337. package/docs/api/variables/ArrayMergeWaySymbol.md +1 -1
  338. package/docs/api/variables/CMD_ARG_FLAG_SYMBOL.md +21 -0
  339. package/docs/api/variables/CMD_ARG_PROCESSOR_RESULT.md +22 -0
  340. package/docs/api/variables/CMD_ARG_UNRESOLVED_SYMBOL.md +16 -0
  341. package/docs/api/variables/ClientEventPrefix.md +2 -2
  342. package/docs/api/variables/ClientToolFuncSchema.md +27 -17
  343. package/docs/api/variables/DEFAULT_CONFIG_NAME.md +1 -1
  344. package/docs/api/variables/DefaultAsyncSemaphoreCapacity.md +4 -1
  345. package/docs/api/variables/EventBusName.md +2 -2
  346. package/docs/api/variables/EventName.md +2 -2
  347. package/docs/api/variables/FilenameReservedRegex.md +1 -1
  348. package/docs/api/variables/FuncMetaSymbol.md +2 -2
  349. package/docs/api/variables/IDENTIFIER_REGEX.md +14 -0
  350. package/docs/api/variables/LLM_TOKENIZER_NAMES.md +1 -1
  351. package/docs/api/variables/LLM_TOKENIZER_NAMES_MAP.md +1 -1
  352. package/docs/api/variables/PASSING_SCORE.md +1 -1
  353. package/docs/api/variables/PATH_IDENTIFIER_REGEX.md +13 -0
  354. package/docs/api/variables/RESERVED_WORDS.md +13 -0
  355. package/docs/api/variables/RStreamErrCode.md +1 -1
  356. package/docs/api/variables/RemoteToolFuncSchema.md +36 -4
  357. package/docs/api/variables/ResponseRStreamErrCode.md +1 -1
  358. package/docs/api/variables/RpcMethodsClientToolSchema.md +2 -2
  359. package/docs/api/variables/RpcMethodsServerToolSchema.md +2 -2
  360. package/docs/api/variables/SHUTDOWN_SIGNALS.md +1 -1
  361. package/docs/api/variables/SSEChannelAlreadyClosedErrCode.md +1 -1
  362. package/docs/api/variables/SecondaryCache.md +1 -1
  363. package/docs/api/variables/ServerToolFuncSchema.md +27 -17
  364. package/docs/api/variables/StrangeHumanName.md +1 -1
  365. package/docs/api/variables/ToolAsyncCancelableBit.md +1 -1
  366. package/docs/api/variables/ToolAsyncMultiTaskBit.md +1 -1
  367. package/docs/api/variables/ToolAsyncPriorityBit.md +1 -1
  368. package/docs/api/variables/ToolFuncSchema.md +13 -13
  369. package/docs/api/variables/WindowsReservedNameRegex.md +1 -1
  370. package/docs/api/variables/backendEventable.md +23 -3
  371. package/docs/api/variables/base32768.md +2 -2
  372. package/docs/api/variables/event.md +1 -1
  373. package/docs/api/variables/eventClient.md +1 -1
  374. package/docs/api/variables/eventServer.md +1 -1
  375. package/docs/api/variables/lrucache.md +1 -1
  376. package/docs/api/variables/makeToolFuncCancelable.md +23 -3
  377. package/docs/api/variables/wait.md +1 -1
  378. package/docs/transport.dev.md +206 -0
  379. package/package.json +12 -10
  380. package/dist/chunk-4FKBOPZI.mjs +0 -1
  381. package/dist/chunk-TGTHY57V.mjs +0 -1
  382. package/dist/find-port-qS1CZ9c-.d.mts +0 -3
  383. package/dist/find-port-qS1CZ9c-.d.ts +0 -3
  384. package/dist/index-BLW3R7VS.d.mts +0 -1826
  385. package/dist/index-BLW3R7VS.d.ts +0 -1826
  386. package/docs/api/@isdk/namespaces/uuidv5/README.md +0 -12
  387. package/docs/api/@isdk/namespaces/uuidv5/variables/DNS.md +0 -11
  388. package/docs/api/@isdk/namespaces/uuidv5/variables/URL.md +0 -11
  389. package/docs/api/functions/nanoid.md +0 -45
  390. package/docs/api/functions/parseObjectArgInfo.md +0 -33
  391. package/docs/api/functions/parseObjectArgumentInfos.md +0 -29
  392. package/docs/api/functions/parseObjectArgumentsAsArgInfos.md +0 -46
  393. package/docs/api/functions/uuidParse.md +0 -21
  394. package/docs/api/functions/uuidStringify.md +0 -25
  395. package/docs/api/functions/uuidValidate.md +0 -21
  396. package/docs/api/functions/uuidVersion.md +0 -21
  397. package/docs/api/functions/uuidv1.md +0 -61
  398. package/docs/api/functions/uuidv4.md +0 -61
  399. package/docs/api/functions/uuidv5.md +0 -69
  400. package/docs/api/functions/uuidv6.md +0 -61
  401. package/docs/api/functions/uuidv7.md +0 -61
  402. package/docs/api/interfaces/AIChoiceConfig.md +0 -65
  403. package/docs/api/interfaces/BinarySemaphoreReleaserFunc.md +0 -37
  404. package/docs/api/interfaces/ParseObjectArgumentOptions.md +0 -89
  405. package/docs/api/variables/uuidNIL.md +0 -11
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Interface: RemoteFuncItem
8
8
 
9
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/consts.ts:83](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/utils/consts.ts#L83)
9
+ Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index-359784IS.d.ts:70
10
10
 
11
11
  Base interface for a remote function's configuration, extending `BaseFuncItem`
12
12
  with properties required for remote execution.
@@ -26,7 +26,7 @@ with properties required for remote execution.
26
26
 
27
27
  > `optional` **action**: `"get"` \| `"post"` \| `"put"` \| `"delete"` \| `"patch"` \| `"list"` \| `"res"`
28
28
 
29
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/consts.ts:95](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/utils/consts.ts#L95)
29
+ Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index-359784IS.d.ts:82
30
30
 
31
31
  The action to be used for the remote call. This typically represents an RPC method name.
32
32
  Only for RESTful HTTP transports, it might be mapped to a standard HTTP method (e.g., GET, POST)
@@ -37,7 +37,7 @@ Only for RESTful HTTP transports, it might be mapped to a standard HTTP method (
37
37
 
38
38
  > `optional` **alias**: `string` \| `string`[]
39
39
 
40
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:130](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/tool-func.ts#L130)
40
+ Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:258
41
41
 
42
42
  Optional aliases for the function name.
43
43
 
@@ -51,7 +51,7 @@ Optional aliases for the function name.
51
51
 
52
52
  > `optional` **apiRoot**: `string`
53
53
 
54
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/consts.ts:89](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/utils/consts.ts#L89)
54
+ Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index-359784IS.d.ts:76
55
55
 
56
56
  The root endpoint for the remote service.
57
57
 
@@ -65,7 +65,7 @@ Use `transport` instead.
65
65
 
66
66
  > `optional` **asyncFeatures**: `number`
67
67
 
68
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:144](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/tool-func.ts#L144)
68
+ Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:272
69
69
 
70
70
  A bitmask representing asynchronous features supported by the function, built from `AsyncFeatureBits`.
71
71
  This allows the system to understand if a function supports capabilities like cancellation or multi-tasking.
@@ -95,7 +95,7 @@ const func = new ToolFunc({
95
95
 
96
96
  > `optional` **depends**: `object`
97
97
 
98
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:167](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/tool-func.ts#L167)
98
+ Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:295
99
99
 
100
100
  A map of dependencies this function has on other tool functions.
101
101
  Declaring dependencies ensures that they are automatically registered when this function is registered.
@@ -134,7 +134,7 @@ mainFunc.register();
134
134
 
135
135
  > `optional` **description**: `string`
136
136
 
137
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:172](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/tool-func.ts#L172)
137
+ Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:302
138
138
 
139
139
  A detailed description of what the function does.
140
140
 
@@ -144,11 +144,21 @@ A detailed description of what the function does.
144
144
 
145
145
  ***
146
146
 
147
+ ### expectedDuration?
148
+
149
+ > `optional` **expectedDuration**: `number`
150
+
151
+ Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index-359784IS.d.ts:102
152
+
153
+ The expected duration of the remote call in milliseconds.
154
+
155
+ ***
156
+
147
157
  ### fetchOptions?
148
158
 
149
159
  > `optional` **fetchOptions**: `any`
150
160
 
151
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/consts.ts:100](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/utils/consts.ts#L100)
161
+ Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index-359784IS.d.ts:87
152
162
 
153
163
  Addtional options to be passed to the underlying `fetch` call in a transport.
154
164
 
@@ -158,7 +168,7 @@ Addtional options to be passed to the underlying `fetch` call in a transport.
158
168
 
159
169
  > `optional` **isApi**: `boolean`
160
170
 
161
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:119](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/tool-func.ts#L119)
171
+ Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:247
162
172
 
163
173
  If true, indicates that this function should be treated as a server-side API.
164
174
 
@@ -172,7 +182,7 @@ If true, indicates that this function should be treated as a server-side API.
172
182
 
173
183
  > `optional` **name**: `string`
174
184
 
175
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:76](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/tool-func.ts#L76)
185
+ Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:204
176
186
 
177
187
  The unique name of the function.
178
188
 
@@ -186,7 +196,7 @@ The unique name of the function.
186
196
 
187
197
  > `optional` **params**: [`FuncParams`](FuncParams.md) \| [`FuncParam`](FuncParam.md)[]
188
198
 
189
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:81](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/tool-func.ts#L81)
199
+ Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:209
190
200
 
191
201
  Parameter definitions, which can be an object mapping names to definitions or an array for positional parameters.
192
202
 
@@ -200,7 +210,7 @@ Parameter definitions, which can be an object mapping names to definitions or an
200
210
 
201
211
  > `optional` **result**: `string` \| `Record`\<`string`, `any`\>
202
212
 
203
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:86](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/tool-func.ts#L86)
213
+ Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:214
204
214
 
205
215
  The expected return type of the function, described as a string or a JSON schema object.
206
216
 
@@ -214,7 +224,7 @@ The expected return type of the function, described as a string or a JSON schema
214
224
 
215
225
  > `optional` **scope**: `any`
216
226
 
217
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:91](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/tool-func.ts#L91)
227
+ Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:219
218
228
 
219
229
  The execution scope or context (`this`) for the function.
220
230
 
@@ -228,7 +238,7 @@ The execution scope or context (`this`) for the function.
228
238
 
229
239
  > `optional` **setup**: (`this`, `options?`) => `void`
230
240
 
231
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:114](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/tool-func.ts#L114)
241
+ Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:242
232
242
 
233
243
  A lifecycle hook called once during the `ToolFunc` instance's initialization.
234
244
  It allows for initial setup, state configuration, or property modification on the instance
@@ -274,12 +284,11 @@ console.log(myFunc.customState); // Outputs: 'configured'
274
284
 
275
285
  > `optional` **stream**: `boolean`
276
286
 
277
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:125](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/tool-func.ts#L125)
287
+ Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index-359784IS.d.ts:106
278
288
 
279
- If true, indicates that the function has the *capability* to stream its output.
280
- Whether a specific call is streamed is determined by a `stream` property in the runtime parameters.
289
+ Whether the tool returns a stream.
281
290
 
282
- #### Inherited from
291
+ #### Overrides
283
292
 
284
293
  [`BaseFuncItem`](BaseFuncItem.md).[`stream`](BaseFuncItem.md#stream)
285
294
 
@@ -289,7 +298,7 @@ Whether a specific call is streamed is determined by a `stream` property in the
289
298
 
290
299
  > `optional` **tags**: `string` \| `string`[]
291
300
 
292
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:96](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/tool-func.ts#L96)
301
+ Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:224
293
302
 
294
303
  Tags for grouping or filtering functions.
295
304
 
@@ -299,11 +308,45 @@ Tags for grouping or filtering functions.
299
308
 
300
309
  ***
301
310
 
311
+ ### timeout?
312
+
313
+ > `optional` **timeout**: `number` \| \{ `keepAliveOnTimeout?`: `boolean`; `streamIdleTimeout?`: `number`; `value`: `number`; \}
314
+
315
+ Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index-359784IS.d.ts:91
316
+
317
+ The timeout configuration for the remote call.
318
+
319
+ #### Type Declaration
320
+
321
+ `number`
322
+
323
+ \{ `keepAliveOnTimeout?`: `boolean`; `streamIdleTimeout?`: `number`; `value`: `number`; \}
324
+
325
+ #### keepAliveOnTimeout?
326
+
327
+ > `optional` **keepAliveOnTimeout**: `boolean`
328
+
329
+ Whether to keep the server-side function running after a timeout.
330
+
331
+ #### streamIdleTimeout?
332
+
333
+ > `optional` **streamIdleTimeout**: `number`
334
+
335
+ The idle timeout for streaming responses in milliseconds.
336
+
337
+ #### value
338
+
339
+ > **value**: `number`
340
+
341
+ The hard timeout in milliseconds.
342
+
343
+ ***
344
+
302
345
  ### title?
303
346
 
304
347
  > `optional` **title**: `string`
305
348
 
306
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:177](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/tool-func.ts#L177)
349
+ Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:307
307
350
 
308
351
  A concise, human-readable title for the function, often used in UI or by AI.
309
352
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Interface: ReplacePlacehoderOptions
8
8
 
9
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/parse-command.ts:464](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/utils/parse-command.ts#L464)
9
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/utils.ts:3](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/utils.ts#L3)
10
10
 
11
11
  ## Properties
12
12
 
@@ -14,7 +14,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/parse-command.ts:464](htt
14
14
 
15
15
  > `optional` **endChar**: `string` \| `string`[]
16
16
 
17
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/parse-command.ts:466](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/utils/parse-command.ts#L466)
17
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/utils.ts:5](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/utils.ts#L5)
18
18
 
19
19
  ***
20
20
 
@@ -22,7 +22,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/parse-command.ts:466](htt
22
22
 
23
23
  > `optional` **placehoders**: `string`[]
24
24
 
25
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/parse-command.ts:468](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/utils/parse-command.ts#L468)
25
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/utils.ts:7](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/utils.ts#L7)
26
26
 
27
27
  ***
28
28
 
@@ -30,7 +30,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/parse-command.ts:468](htt
30
30
 
31
31
  > `optional` **placeholder**: `string`
32
32
 
33
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/parse-command.ts:467](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/utils/parse-command.ts#L467)
33
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/utils.ts:6](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/utils.ts#L6)
34
34
 
35
35
  ***
36
36
 
@@ -38,4 +38,4 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/parse-command.ts:467](htt
38
38
 
39
39
  > `optional` **startChar**: `string` \| `string`[]
40
40
 
41
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/parse-command.ts:465](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/utils/parse-command.ts#L465)
41
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/utils.ts:4](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/utils.ts#L4)
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Interface: ResClientFuncParams
8
8
 
9
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-client-tools.ts:5](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/res-client-tools.ts#L5)
9
+ Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index.d.ts:51
10
10
 
11
11
  ## Extends
12
12
 
@@ -22,7 +22,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-client-tools.ts:5](https://
22
22
 
23
23
  > `optional` **act**: `string`
24
24
 
25
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-client-tool.ts:5](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/rpc-methods-client-tool.ts#L5)
25
+ Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index.d.ts:9
26
26
 
27
27
  #### Inherited from
28
28
 
@@ -34,4 +34,4 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-client-tool.ts:5](h
34
34
 
35
35
  > `optional` **id**: `string` \| `number`
36
36
 
37
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-client-tools.ts:6](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/res-client-tools.ts#L6)
37
+ Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index.d.ts:52
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Interface: ResServerFuncParams
8
8
 
9
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-server-tools.ts:5](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/res-server-tools.ts#L5)
9
+ Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index.d.ts:65
10
10
 
11
11
  Defines the structure for parameters passed to a `ServerTools` function.
12
12
  By convention, it includes optional `_req` and `_res` properties for direct
@@ -26,7 +26,7 @@ access to the underlying transport's request and response objects (e.g., from No
26
26
 
27
27
  > `optional` **\_req**: `any`
28
28
 
29
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/server-tools.ts:15](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/server-tools.ts#L15)
29
+ Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index-359784IS.d.ts:295
30
30
 
31
31
  The underlying request object from the transport layer (e.g., `IncomingMessage`).
32
32
 
@@ -40,7 +40,7 @@ The underlying request object from the transport layer (e.g., `IncomingMessage`)
40
40
 
41
41
  > `optional` **\_res**: `any`
42
42
 
43
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/server-tools.ts:20](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/server-tools.ts#L20)
43
+ Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index-359784IS.d.ts:300
44
44
 
45
45
  The underlying response or reply object from the transport layer (e.g., `ServerResponse`).
46
46
 
@@ -50,11 +50,25 @@ The underlying response or reply object from the transport layer (e.g., `ServerR
50
50
 
51
51
  ***
52
52
 
53
+ ### \_signal?
54
+
55
+ > `optional` **\_signal**: `AbortSignal`
56
+
57
+ Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index-359784IS.d.ts:305
58
+
59
+ The AbortSignal to monitor for cancellation or timeout.
60
+
61
+ #### Inherited from
62
+
63
+ [`RpcMethodsServerFuncParams`](RpcMethodsServerFuncParams.md).[`_signal`](RpcMethodsServerFuncParams.md#_signal)
64
+
65
+ ***
66
+
53
67
  ### act?
54
68
 
55
69
  > `optional` **act**: `string`
56
70
 
57
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:7](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/rpc-methods-server-tool.ts#L7)
71
+ Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index.d.ts:26
58
72
 
59
73
  #### Inherited from
60
74
 
@@ -66,7 +80,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:7](h
66
80
 
67
81
  > `optional` **id**: `string` \| `number`
68
82
 
69
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-server-tools.ts:6](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/res-server-tools.ts#L6)
83
+ Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index.d.ts:66
70
84
 
71
85
  ***
72
86
 
@@ -74,4 +88,4 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-server-tools.ts:6](https://
74
88
 
75
89
  > `optional` **val**: `any`
76
90
 
77
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-server-tools.ts:8](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/res-server-tools.ts#L8)
91
+ Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index.d.ts:67
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Interface: RpcMethodsClientFuncParams
8
8
 
9
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-client-tool.ts:4](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/rpc-methods-client-tool.ts#L4)
9
+ Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index.d.ts:8
10
10
 
11
11
  ## Extended by
12
12
 
@@ -22,4 +22,4 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-client-tool.ts:4](h
22
22
 
23
23
  > `optional` **act**: `string`
24
24
 
25
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-client-tool.ts:5](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/rpc-methods-client-tool.ts#L5)
25
+ Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index.d.ts:9
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Interface: RpcMethodsServerFuncParams
8
8
 
9
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:6](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/rpc-methods-server-tool.ts#L6)
9
+ Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index.d.ts:25
10
10
 
11
11
  Defines the structure for parameters passed to a `ServerTools` function.
12
12
  By convention, it includes optional `_req` and `_res` properties for direct
@@ -30,7 +30,7 @@ access to the underlying transport's request and response objects (e.g., from No
30
30
 
31
31
  > `optional` **\_req**: `any`
32
32
 
33
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/server-tools.ts:15](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/server-tools.ts#L15)
33
+ Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index-359784IS.d.ts:295
34
34
 
35
35
  The underlying request object from the transport layer (e.g., `IncomingMessage`).
36
36
 
@@ -44,7 +44,7 @@ The underlying request object from the transport layer (e.g., `IncomingMessage`)
44
44
 
45
45
  > `optional` **\_res**: `any`
46
46
 
47
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/server-tools.ts:20](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/server-tools.ts#L20)
47
+ Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index-359784IS.d.ts:300
48
48
 
49
49
  The underlying response or reply object from the transport layer (e.g., `ServerResponse`).
50
50
 
@@ -54,8 +54,22 @@ The underlying response or reply object from the transport layer (e.g., `ServerR
54
54
 
55
55
  ***
56
56
 
57
+ ### \_signal?
58
+
59
+ > `optional` **\_signal**: `AbortSignal`
60
+
61
+ Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index-359784IS.d.ts:305
62
+
63
+ The AbortSignal to monitor for cancellation or timeout.
64
+
65
+ #### Inherited from
66
+
67
+ [`ServerFuncParams`](ServerFuncParams.md).[`_signal`](ServerFuncParams.md#_signal)
68
+
69
+ ***
70
+
57
71
  ### act?
58
72
 
59
73
  > `optional` **act**: `string`
60
74
 
61
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:7](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/rpc-methods-server-tool.ts#L7)
75
+ Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index.d.ts:26
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Interface: SanitizeFilenameOptions
8
8
 
9
- Defined in: @isdk/util/dist/index.d.ts:407
9
+ Defined in: @isdk/util/dist/index.d.ts:408
10
10
 
11
11
  ## Properties
12
12
 
@@ -14,7 +14,7 @@ Defined in: @isdk/util/dist/index.d.ts:407
14
14
 
15
15
  > `optional` **maxLength**: `number`
16
16
 
17
- Defined in: @isdk/util/dist/index.d.ts:409
17
+ Defined in: @isdk/util/dist/index.d.ts:410
18
18
 
19
19
  ***
20
20
 
@@ -22,4 +22,4 @@ Defined in: @isdk/util/dist/index.d.ts:409
22
22
 
23
23
  > `optional` **replacement**: `string`
24
24
 
25
- Defined in: @isdk/util/dist/index.d.ts:408
25
+ Defined in: @isdk/util/dist/index.d.ts:409
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Interface: SectionStringOptions
8
8
 
9
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/split-sentence.ts:193](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/utils/split-sentence.ts#L193)
9
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/split-sentence.ts:193](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/split-sentence.ts#L193)
10
10
 
11
11
  ## Properties
12
12
 
@@ -14,7 +14,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/split-sentence.ts:193](ht
14
14
 
15
15
  > `optional` **isMarkdown**: `boolean`
16
16
 
17
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/split-sentence.ts:194](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/utils/split-sentence.ts#L194)
17
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/split-sentence.ts:194](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/split-sentence.ts#L194)
18
18
 
19
19
  ***
20
20
 
@@ -22,4 +22,4 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/split-sentence.ts:194](ht
22
22
 
23
23
  > `optional` **nextLine**: `string`
24
24
 
25
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/split-sentence.ts:195](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/utils/split-sentence.ts#L195)
25
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/split-sentence.ts:195](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/split-sentence.ts#L195)
@@ -6,7 +6,9 @@
6
6
 
7
7
  # Interface: SemaphoreOptions
8
8
 
9
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/async-semaphore.ts:42](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/utils/async-semaphore.ts#L42)
9
+ Defined in: @isdk/util/dist/index.d.ts:696
10
+
11
+ 通用信号量的配置选项,继承自二进制信号量选项。
10
12
 
11
13
  ## Extends
12
14
 
@@ -18,7 +20,10 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/async-semaphore.ts:42](ht
18
20
 
19
21
  > `optional` **capacity**: `number`
20
22
 
21
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/async-semaphore.ts:25](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/utils/async-semaphore.ts#L25)
23
+ Defined in: @isdk/util/dist/index.d.ts:654
24
+
25
+ 内部等待队列的初始预分配容量。
26
+ 适用于高性能场景,开发者可以根据并发规模预估此值以减少动态扩容。
22
27
 
23
28
  #### Inherited from
24
29
 
@@ -30,7 +35,11 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/async-semaphore.ts:25](ht
30
35
 
31
36
  > `optional` **initFn**: () => `any`
32
37
 
33
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/async-semaphore.ts:22](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/utils/async-semaphore.ts#L22)
38
+ Defined in: @isdk/util/dist/index.d.ts:637
39
+
40
+ 用于初始化令牌的函数。
41
+ 当信号量释放且没有等待任务时,如果未提供令牌,将调用此函数生成新令牌。
42
+ 默认为 `() => '1'`。
34
43
 
35
44
  #### Returns
36
45
 
@@ -46,7 +55,10 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/async-semaphore.ts:22](ht
46
55
 
47
56
  > `optional` **isReadyFn**: [`SemaphoreIsReadyFuncType`](../type-aliases/SemaphoreIsReadyFuncType.md)
48
57
 
49
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/async-semaphore.ts:44](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/utils/async-semaphore.ts#L44)
58
+ Defined in: @isdk/util/dist/index.d.ts:706
59
+
60
+ 可选的就绪检查函数。
61
+ 在尝试获取令牌前调用,如果返回 false(或解析为 false 的 Promise),则无法立即获取。
50
62
 
51
63
  ***
52
64
 
@@ -54,7 +66,10 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/async-semaphore.ts:44](ht
54
66
 
55
67
  > `optional` **maxConcurrency**: `number`
56
68
 
57
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/async-semaphore.ts:43](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/utils/async-semaphore.ts#L43)
69
+ Defined in: @isdk/util/dist/index.d.ts:701
70
+
71
+ 最大并发数。
72
+ 指定允许同时获取信号量的最大调用方数量。
58
73
 
59
74
  ***
60
75
 
@@ -62,7 +77,11 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/async-semaphore.ts:43](ht
62
77
 
63
78
  > `optional` **pauseFn**: () => `void`
64
79
 
65
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/async-semaphore.ts:23](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/utils/async-semaphore.ts#L23)
80
+ Defined in: @isdk/util/dist/index.d.ts:643
81
+
82
+ 可选的暂停函数。
83
+ 当等待队列开始积压(第一个任务进入队列)时调用,用于通知上游停止发送数据,
84
+ 以避免产生过多的等待 Promise 导致内存溢出。
66
85
 
67
86
  #### Returns
68
87
 
@@ -78,7 +97,11 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/async-semaphore.ts:23](ht
78
97
 
79
98
  > `optional` **resumeFn**: () => `void`
80
99
 
81
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/async-semaphore.ts:24](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/utils/async-semaphore.ts#L24)
100
+ Defined in: @isdk/util/dist/index.d.ts:649
101
+
102
+ 可选的恢复函数。
103
+ 当信号量有空闲槽位且之前已调用过 `pauseFn` 时调用。
104
+ 如果定义了 `pauseFn`,则必须同时定义此函数。
82
105
 
83
106
  #### Returns
84
107
 
@@ -6,7 +6,9 @@
6
6
 
7
7
  # Interface: SemaphoreTaskItem
8
8
 
9
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/async-semaphore.ts:52](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/utils/async-semaphore.ts#L52)
9
+ Defined in: @isdk/util/dist/index.d.ts:711
10
+
11
+ 内部等待任务项的结构定义。
10
12
 
11
13
  ## Extends
12
14
 
@@ -16,13 +18,17 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/async-semaphore.ts:52](ht
16
18
 
17
19
  \[`n`: `string`\]: `any`
18
20
 
21
+ 允许扩展其他自定义选项。
22
+
19
23
  ## Properties
20
24
 
21
25
  ### reject()
22
26
 
23
27
  > **reject**: (`reason?`) => `void`
24
28
 
25
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/async-semaphore.ts:54](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/utils/async-semaphore.ts#L54)
29
+ Defined in: @isdk/util/dist/index.d.ts:719
30
+
31
+ 当获取失败(如被中止)时调用的拒绝函数。
26
32
 
27
33
  #### Parameters
28
34
 
@@ -40,7 +46,9 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/async-semaphore.ts:54](ht
40
46
 
41
47
  > **resolve**: (`value`) => `void`
42
48
 
43
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/async-semaphore.ts:53](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/utils/async-semaphore.ts#L53)
49
+ Defined in: @isdk/util/dist/index.d.ts:715
50
+
51
+ 当获取成功时调用的解析函数,接收释放函数作为参数。
44
52
 
45
53
  #### Parameters
46
54
 
@@ -58,7 +66,10 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/async-semaphore.ts:53](ht
58
66
 
59
67
  > `optional` **signal**: `AbortSignal`
60
68
 
61
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/async-semaphore.ts:29](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/utils/async-semaphore.ts#L29)
69
+ Defined in: @isdk/util/dist/index.d.ts:664
70
+
71
+ 可选的 AbortSignal,用于取消获取操作。
72
+ 如果在获取到令牌前信号被中止,`acquire` 返回的 Promise 将被拒绝并抛出 `AbortError`。
62
73
 
63
74
  #### Inherited from
64
75
 
@@ -70,4 +81,6 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/async-semaphore.ts:29](ht
70
81
 
71
82
  > `optional` **token**: `any`
72
83
 
73
- Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/async-semaphore.ts:55](https://github.com/isdk/ai-tool.js/blob/e883e341c67e937e7d3a3e95e8bc56844896f5a3/src/utils/async-semaphore.ts#L55)
84
+ Defined in: @isdk/util/dist/index.d.ts:723
85
+
86
+ 与此任务关联的令牌。