@isdk/ai-tool 0.5.8 → 0.7.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 (497) hide show
  1. package/README.cn.md +103 -237
  2. package/README.md +101 -186
  3. package/dist/chunk-LNTIQQNN.mjs +1 -0
  4. package/dist/chunk-VIG2GB47.mjs +1 -1
  5. package/dist/funcs.d.mts +1 -1
  6. package/dist/funcs.d.ts +1 -1
  7. package/dist/funcs.js +1 -1
  8. package/dist/funcs.mjs +1 -1
  9. package/dist/index-BCco-g_I.d.mts +1781 -0
  10. package/dist/index-BCco-g_I.d.ts +1781 -0
  11. package/dist/index.d.mts +1083 -650
  12. package/dist/index.d.ts +1083 -650
  13. package/dist/index.js +1 -1
  14. package/dist/index.mjs +1 -1
  15. package/dist/test/util.js +1 -1
  16. package/docs/api/README.md +165 -0
  17. package/docs/{_media → api/_media}/CONTRIBUTING.md +3 -3
  18. package/docs/api/_media/pubsub.md +326 -0
  19. package/docs/api/_media/server_client_tools.md +88 -0
  20. package/docs/api/_media/toolFunc.md +183 -0
  21. package/docs/api/_media/transport.md +137 -0
  22. package/docs/{classes → api/classes}/AbortError.md +139 -54
  23. package/docs/api/classes/AlreadyExistsError.md +431 -0
  24. package/docs/api/classes/BaseError.md +440 -0
  25. package/docs/{classes → api/classes}/BinarySemaphore.md +25 -25
  26. package/docs/{classes → api/classes}/CancelableAbility.md +25 -25
  27. package/docs/api/classes/ClientToolTransport.md +310 -0
  28. package/docs/{classes → api/classes}/ClientTools.md +642 -180
  29. package/docs/{classes → api/classes}/CommonError.md +139 -54
  30. package/docs/api/classes/ConfigFile.md +218 -0
  31. package/docs/{classes → api/classes}/EnvPromptTemplate.md +308 -65
  32. package/docs/{classes → api/classes}/EventClient.md +725 -232
  33. package/docs/{classes → api/classes}/EventEmitter.md +12 -12
  34. package/docs/{classes → api/classes}/EventServer.md +658 -205
  35. package/docs/{classes → api/classes}/EventToolFunc.md +561 -109
  36. package/docs/{classes → api/classes}/FStringPromptTemplate.md +309 -66
  37. package/docs/{classes → api/classes}/FewShotPromptTemplate.md +290 -63
  38. package/docs/{classes → api/classes}/GolangPromptTemplate.md +308 -65
  39. package/docs/api/classes/HttpClientToolTransport.md +324 -0
  40. package/docs/api/classes/HttpServerToolTransport.md +324 -0
  41. package/docs/{classes → api/classes}/IntSet.md +12 -12
  42. package/docs/{classes → api/classes}/LRUCache.md +26 -26
  43. package/docs/api/classes/NotFoundError.md +431 -0
  44. package/docs/api/classes/NotImplementationError.md +431 -0
  45. package/docs/{classes → api/classes}/PromptExampleSelector.md +9 -9
  46. package/docs/{classes → api/classes}/PromptTemplate.md +303 -63
  47. package/docs/api/classes/ReadableStreamError.md +451 -0
  48. package/docs/api/classes/ResClientTools.md +2878 -0
  49. package/docs/api/classes/ResServerTools.md +2856 -0
  50. package/docs/api/classes/SSEChannel.md +272 -0
  51. package/docs/{classes → api/classes}/Semaphore.md +26 -26
  52. package/docs/api/classes/ServerToolTransport.md +323 -0
  53. package/docs/{classes → api/classes}/ServerTools.md +579 -120
  54. package/docs/{classes → api/classes}/SignalGate.md +9 -9
  55. package/docs/api/classes/SseClientPubSubTransport.md +92 -0
  56. package/docs/api/classes/SseServerPubSubTransport.md +234 -0
  57. package/docs/{classes → api/classes}/TaskAbortController.md +9 -9
  58. package/docs/api/classes/ToolFunc.md +2665 -0
  59. package/docs/api/classes/ToolTransport.md +143 -0
  60. package/docs/api/classes/YamlTypeBaseObject.md +31 -0
  61. package/docs/api/enumerations/AsyncFeatureBits.md +33 -0
  62. package/docs/api/enumerations/AsyncFeatures.md +33 -0
  63. package/docs/api/enumerations/ErrorCode.md +177 -0
  64. package/docs/api/enumerations/HashAlgorithm.md +97 -0
  65. package/docs/{functions → api/functions}/AIArgProcessor.md +1 -1
  66. package/docs/{functions → api/functions}/AIStream.md +1 -1
  67. package/docs/{functions → api/functions}/ChoiceArgProcessor.md +1 -1
  68. package/docs/api/functions/DefaultDateFormat.md +21 -0
  69. package/docs/{functions → api/functions}/ObjectArgsToArgsInfo.md +1 -1
  70. package/docs/{functions → api/functions}/RateLimit.md +1 -1
  71. package/docs/{functions → api/functions}/TemplateArgProcessor.md +1 -1
  72. package/docs/api/functions/addDate.md +71 -0
  73. package/docs/{functions → api/functions}/assignDirs.md +1 -1
  74. package/docs/{functions → api/functions}/backendEventable.md +1 -1
  75. package/docs/{functions → api/functions}/beforeShutdown.md +1 -1
  76. package/docs/api/functions/calcPerplexity.md +60 -0
  77. package/docs/api/functions/calcPerplexitySimple.md +42 -0
  78. package/docs/api/functions/canonicalize.md +33 -0
  79. package/docs/{functions → api/functions}/completeSentences.md +1 -1
  80. package/docs/{functions → api/functions}/concatText.md +1 -1
  81. package/docs/{functions → api/functions}/countLLMTokens.md +1 -1
  82. package/docs/{functions → api/functions}/countRegexMatches.md +1 -1
  83. package/docs/{functions → api/functions}/createAbilityInjector.md +4 -4
  84. package/docs/{functions → api/functions}/createCallbacksTransformer.md +1 -1
  85. package/docs/{functions → api/functions}/createEmptyReadableStream.md +1 -1
  86. package/docs/{functions → api/functions}/createEndWithRepetitionDetector.md +1 -1
  87. package/docs/{functions → api/functions}/createError.md +1 -1
  88. package/docs/{functions → api/functions}/createEventStreamTransformer.md +1 -1
  89. package/docs/{functions → api/functions}/createHfValueFunc.md +1 -1
  90. package/docs/{functions → api/functions}/createLRUCache.md +1 -1
  91. package/docs/{functions → api/functions}/createYamlObjectTag.md +1 -1
  92. package/docs/{functions → api/functions}/dateToText.md +1 -1
  93. package/docs/{functions → api/functions}/decodeCharset.md +1 -1
  94. package/docs/api/functions/defaultsWithConcat.md +74 -0
  95. package/docs/{functions → api/functions}/detectCharset.md +1 -1
  96. package/docs/{functions → api/functions}/encodeLLMTokens.md +1 -1
  97. package/docs/{functions → api/functions}/ensureQuoted.md +1 -1
  98. package/docs/{functions → api/functions}/eventable.md +1 -1
  99. package/docs/api/functions/expandConfig.md +25 -0
  100. package/docs/{functions → api/functions}/expandEnv.md +4 -4
  101. package/docs/{functions → api/functions}/expandObjEnv.md +4 -4
  102. package/docs/{functions → api/functions}/expandPath.md +1 -1
  103. package/docs/api/functions/expandPathInObject.md +29 -0
  104. package/docs/api/functions/expandPaths.md +25 -0
  105. package/docs/{functions → api/functions}/extNameLevel.md +1 -1
  106. package/docs/{functions → api/functions}/fileIsExists.md +1 -1
  107. package/docs/{functions → api/functions}/filterValidFnScope.md +1 -1
  108. package/docs/{functions → api/functions}/findIndexNonEmptyFrom.md +1 -1
  109. package/docs/{functions → api/functions}/findPort.md +1 -1
  110. package/docs/{functions → api/functions}/formatISO.md +1 -1
  111. package/docs/{functions → api/functions}/formatTextWithSpace.md +1 -1
  112. package/docs/api/functions/funcGetMeta.md +27 -0
  113. package/docs/api/functions/funcWithMeta.md +41 -0
  114. package/docs/api/functions/genUrlParamsStr.md +27 -0
  115. package/docs/{functions → api/functions}/getAllEnumKeys.md +1 -1
  116. package/docs/{functions → api/functions}/getConfigFileNames.md +1 -1
  117. package/docs/{functions → api/functions}/getConfigs.md +1 -1
  118. package/docs/{functions → api/functions}/getEnvVairables.md +1 -1
  119. package/docs/{functions → api/functions}/getFileMetaInfo.md +1 -1
  120. package/docs/{functions → api/functions}/getHashAlgoBySize.md +1 -1
  121. package/docs/{functions → api/functions}/getKeysPath.md +1 -1
  122. package/docs/{functions → api/functions}/getLLMTokenizer.md +1 -1
  123. package/docs/{functions → api/functions}/getMultiLevelExtname.md +4 -4
  124. package/docs/{functions → api/functions}/getPackageDir.md +1 -1
  125. package/docs/{functions → api/functions}/getRealFilepath.md +1 -1
  126. package/docs/{functions → api/functions}/getResponseErrorReadableStream.md +1 -1
  127. package/docs/{functions → api/functions}/getXDGConfigs.md +1 -1
  128. package/docs/{functions → api/functions}/hasDirectoryIn.md +1 -1
  129. package/docs/{functions → api/functions}/hash.md +1 -1
  130. package/docs/{functions → api/functions}/hashFile.md +1 -1
  131. package/docs/api/functions/hashObject.md +25 -0
  132. package/docs/{functions → api/functions}/hashStream.md +1 -1
  133. package/docs/api/functions/initShutdown.md +15 -0
  134. package/docs/{functions → api/functions}/isLangUsingSpaces.md +1 -1
  135. package/docs/{functions → api/functions}/isListItemString.md +1 -1
  136. package/docs/{functions → api/functions}/isModelNameMatched.md +1 -1
  137. package/docs/{functions → api/functions}/isPunctuationChar.md +1 -1
  138. package/docs/{functions → api/functions}/isQuoted.md +1 -1
  139. package/docs/{functions → api/functions}/isRegExp.md +1 -1
  140. package/docs/{functions → api/functions}/isSameString.md +1 -1
  141. package/docs/{functions → api/functions}/isSectionString.md +1 -1
  142. package/docs/{functions → api/functions}/isSentenceEnding.md +1 -1
  143. package/docs/{functions → api/functions}/isSepLineString.md +1 -1
  144. package/docs/{functions → api/functions}/isStrWrapped.md +1 -1
  145. package/docs/{functions → api/functions}/isSubdirectory.md +2 -2
  146. package/docs/{functions → api/functions}/isTitleString.md +1 -1
  147. package/docs/{functions → api/functions}/isValidFilename.md +1 -1
  148. package/docs/{functions → api/functions}/isValidFilepath.md +1 -1
  149. package/docs/{functions → api/functions}/isWebStream.md +1 -1
  150. package/docs/api/functions/joinSplitWords.md +46 -0
  151. package/docs/{functions → api/functions}/jsonFilterToWhere.md +1 -1
  152. package/docs/{functions → api/functions}/jsonToMarkdownStr.md +9 -1
  153. package/docs/{functions → api/functions}/loadAIConfig.md +1 -1
  154. package/docs/{functions → api/functions}/loadConfig.md +1 -1
  155. package/docs/{functions → api/functions}/loadConfigFile.md +1 -1
  156. package/docs/{functions → api/functions}/loadFileFromPaths.md +1 -1
  157. package/docs/{functions → api/functions}/loadTextFromPaths.md +1 -1
  158. package/docs/{functions → api/functions}/lrucache.md +1 -1
  159. package/docs/{functions → api/functions}/makeToolFuncCancelable.md +1 -1
  160. package/docs/{functions → api/functions}/matchUrlProtocol.md +1 -1
  161. package/docs/{functions → api/functions}/memoize.md +1 -1
  162. package/docs/api/functions/mergeArray.md +57 -0
  163. package/docs/{functions → api/functions}/messagesToText.md +1 -1
  164. package/docs/api/functions/normalizePath.md +21 -0
  165. package/docs/{functions → api/functions}/paramsSizeToScaleStr.md +1 -1
  166. package/docs/{functions → api/functions}/parseCommand.md +1 -1
  167. package/docs/{functions → api/functions}/parseDateFormat.md +1 -1
  168. package/docs/{functions → api/functions}/parseISO.md +1 -1
  169. package/docs/{functions → api/functions}/parseJsJson.md +1 -1
  170. package/docs/{functions → api/functions}/parseJsJsonSimpleSync.md +1 -1
  171. package/docs/{functions → api/functions}/parseObjectArgInfo.md +1 -1
  172. package/docs/{functions → api/functions}/parseObjectArgumentInfos.md +1 -1
  173. package/docs/{functions → api/functions}/parseObjectArguments.md +1 -1
  174. package/docs/{functions → api/functions}/parseObjectArgumentsAsArgInfos.md +1 -1
  175. package/docs/api/functions/parseYaml.md +45 -0
  176. package/docs/api/functions/pruneSubdirectories.md +35 -0
  177. package/docs/api/functions/pruneSubdirectoriesInPlace.md +38 -0
  178. package/docs/{functions → api/functions}/quoteStr.md +1 -1
  179. package/docs/{functions → api/functions}/readFilenamesRecursiveSync.md +7 -1
  180. package/docs/{functions → api/functions}/readTextFileChunks.md +1 -1
  181. package/docs/{functions → api/functions}/readTextFileChunksEx.md +1 -1
  182. package/docs/{functions → api/functions}/readableFromAsyncIterable.md +1 -1
  183. package/docs/{functions → api/functions}/registerCoreTools.md +1 -1
  184. package/docs/api/functions/registerYamlTag.md +37 -0
  185. package/docs/{functions → api/functions}/removeMarkdownBold.md +1 -1
  186. package/docs/{functions → api/functions}/removeMarkdownBoldAndItalic.md +1 -1
  187. package/docs/{functions → api/functions}/removeMarkdownItalic.md +1 -1
  188. package/docs/{functions → api/functions}/replaceWithPlaceholder.md +1 -1
  189. package/docs/{functions → api/functions}/restoreFromPlacehoders.md +1 -1
  190. package/docs/{functions → api/functions}/sanitizeFilename.md +4 -4
  191. package/docs/{functions → api/functions}/sanitizeFilepath.md +4 -4
  192. package/docs/{functions → api/functions}/saveConfigFile.md +1 -1
  193. package/docs/{functions → api/functions}/scaleStrToParamsSize.md +1 -1
  194. package/docs/{functions → api/functions}/shutdown.md +1 -1
  195. package/docs/{functions → api/functions}/simplifyObjectArguments.md +1 -1
  196. package/docs/api/functions/sleep.md +36 -0
  197. package/docs/{functions → api/functions}/sortedValues.md +1 -1
  198. package/docs/{functions → api/functions}/splitChunks.md +1 -1
  199. package/docs/{functions → api/functions}/splitParagraph.md +1 -1
  200. package/docs/{functions → api/functions}/splitSentence.md +1 -1
  201. package/docs/api/functions/splitWords.md +42 -0
  202. package/docs/api/functions/stringifyYaml.md +45 -0
  203. package/docs/{functions → api/functions}/stripConsoleColor.md +1 -1
  204. package/docs/{functions → api/functions}/textToDate.md +1 -1
  205. package/docs/{functions → api/functions}/throwError.md +3 -3
  206. package/docs/{functions → api/functions}/toDate.md +1 -1
  207. package/docs/{functions → api/functions}/toDateTime.md +1 -1
  208. package/docs/{functions → api/functions}/toRegExp.md +1 -1
  209. package/docs/{functions → api/functions}/trimStartOfStreamHelper.md +1 -1
  210. package/docs/{functions → api/functions}/truncTo.md +1 -1
  211. package/docs/{functions → api/functions}/truncateByToken.md +1 -1
  212. package/docs/{functions → api/functions}/truncateToTokenLimit.md +1 -1
  213. package/docs/{functions → api/functions}/truncateToTokenLimitEx.md +1 -1
  214. package/docs/{functions → api/functions}/uuid.md +1 -1
  215. package/docs/{functions → api/functions}/uuidParse.md +1 -1
  216. package/docs/{functions → api/functions}/uuidStringify.md +1 -1
  217. package/docs/{functions → api/functions}/uuidValidate.md +1 -1
  218. package/docs/{functions → api/functions}/uuidVersion.md +1 -1
  219. package/docs/{functions → api/functions}/uuidv1.md +9 -5
  220. package/docs/{functions → api/functions}/uuidv4.md +9 -5
  221. package/docs/{functions → api/functions}/uuidv5.md +9 -5
  222. package/docs/api/functions/wait.md +45 -0
  223. package/docs/{functions → api/functions}/wrapEventEmitter.md +1 -1
  224. package/docs/{functions → api/functions}/xxhash.md +1 -1
  225. package/docs/{functions → api/functions}/xxhash32.md +1 -1
  226. package/docs/{functions → api/functions}/xxhash64.md +1 -1
  227. package/docs/{functions → api/functions}/xxhashAsStr.md +1 -1
  228. package/docs/api/functions/yieldExec.md +27 -0
  229. package/docs/{globals.md → api/globals.md} +44 -24
  230. package/docs/api/interfaces/AIChatAssistantMessageParam.md +129 -0
  231. package/docs/api/interfaces/AIChatContentPartImage.md +29 -0
  232. package/docs/api/interfaces/AIChatContentPartText.md +25 -0
  233. package/docs/api/interfaces/AIChatMessageParamBase.md +68 -0
  234. package/docs/api/interfaces/AIChatMessageToolCall.md +41 -0
  235. package/docs/{interfaces → api/interfaces}/AIChatSystemMessageParam.md +9 -9
  236. package/docs/api/interfaces/AIChatToolChoiceFuncObject.md +37 -0
  237. package/docs/api/interfaces/AIChatToolChoiceObject.md +25 -0
  238. package/docs/api/interfaces/AIChatToolFunc.md +41 -0
  239. package/docs/api/interfaces/AIChatToolFuncParam.md +37 -0
  240. package/docs/api/interfaces/AIChatToolMessageParam.md +113 -0
  241. package/docs/api/interfaces/AIChatToolParam.md +25 -0
  242. package/docs/api/interfaces/AIChatToolTypeObject.md +17 -0
  243. package/docs/api/interfaces/AIChatUserMessageParam.md +137 -0
  244. package/docs/api/interfaces/AIChoiceConfig.md +65 -0
  245. package/docs/api/interfaces/AIResult.md +65 -0
  246. package/docs/{interfaces → api/interfaces}/AIStreamParser.md +2 -2
  247. package/docs/api/interfaces/AIStreamParserOptions.md +21 -0
  248. package/docs/api/interfaces/BaseFunc.md +299 -0
  249. package/docs/api/interfaces/BaseFuncItem.md +221 -0
  250. package/docs/api/interfaces/BinarySemaphoreAcquireOptions.md +25 -0
  251. package/docs/api/interfaces/BinarySemaphoreOptions.md +57 -0
  252. package/docs/api/interfaces/BinarySemaphoreReleaseOptions.md +25 -0
  253. package/docs/api/interfaces/BinarySemaphoreReleaserFunc.md +37 -0
  254. package/docs/api/interfaces/CancelableAbilityOptions.md +113 -0
  255. package/docs/api/interfaces/ClientFuncItem.md +326 -0
  256. package/docs/api/interfaces/EventClientFuncParams.md +51 -0
  257. package/docs/api/interfaces/EventServerFuncParams.md +73 -0
  258. package/docs/api/interfaces/FewShotPromptTemplateOptions.md +159 -0
  259. package/docs/api/interfaces/FuncItem.md +281 -0
  260. package/docs/api/interfaces/FuncParam.md +51 -0
  261. package/docs/api/interfaces/FuncParams.md +28 -0
  262. package/docs/api/interfaces/Funcs.md +15 -0
  263. package/docs/api/interfaces/HashAlgoParams.md +33 -0
  264. package/docs/api/interfaces/IClientToolTransport.md +155 -0
  265. package/docs/api/interfaces/IFileMetaInfo.md +65 -0
  266. package/docs/api/interfaces/IPubSubClientTransport.md +70 -0
  267. package/docs/api/interfaces/IPubSubServerTransport.md +241 -0
  268. package/docs/{interfaces → api/interfaces}/IReadTextFileChunksOptions.md +12 -12
  269. package/docs/api/interfaces/IServerToolTransport.md +159 -0
  270. package/docs/api/interfaces/IToolTransport.md +73 -0
  271. package/docs/api/interfaces/ITruncateToTokenLimitOptions.md +99 -0
  272. package/docs/api/interfaces/JsonFilter.md +13 -0
  273. package/docs/api/interfaces/ParseObjectArgumentOptions.md +89 -0
  274. package/docs/api/interfaces/ProbabilityItem.md +41 -0
  275. package/docs/api/interfaces/PromptExampleSelectorOptions.md +34 -0
  276. package/docs/api/interfaces/PromptTemplateOptions.md +73 -0
  277. package/docs/api/interfaces/PubSubClient.md +27 -0
  278. package/docs/api/interfaces/PubSubClientStream.md +196 -0
  279. package/docs/api/interfaces/PubSubServerSession.md +103 -0
  280. package/docs/api/interfaces/RemoteFuncItem.md +316 -0
  281. package/docs/api/interfaces/ReplacePlacehoderOptions.md +41 -0
  282. package/docs/api/interfaces/ResClientFuncParams.md +37 -0
  283. package/docs/api/interfaces/ResServerFuncParams.md +73 -0
  284. package/docs/api/interfaces/SanitizeFilenameOptions.md +25 -0
  285. package/docs/api/interfaces/SectionStringOptions.md +25 -0
  286. package/docs/api/interfaces/SemaphoreOptions.md +89 -0
  287. package/docs/api/interfaces/SemaphoreTaskItem.md +73 -0
  288. package/docs/api/interfaces/ServerFuncItem.md +339 -0
  289. package/docs/api/interfaces/ServerFuncParams.md +41 -0
  290. package/docs/api/interfaces/SplitSentenceOptions.md +41 -0
  291. package/docs/{interfaces → api/interfaces}/StreamCallbacksAndOptions.md +5 -5
  292. package/docs/{interfaces → api/interfaces}/TaskAbortControllers.md +1 -1
  293. package/docs/{interfaces → api/interfaces}/TaskPromise.md +6 -6
  294. package/docs/api/interfaces/ToolFuncPackage.md +57 -0
  295. package/docs/{namespaces → api/namespaces}/EventStates/variables/ABORT.md +1 -1
  296. package/docs/{namespaces → api/namespaces}/EventStates/variables/CONTINUE.md +1 -1
  297. package/docs/{namespaces → api/namespaces}/EventStates/variables/DONE.md +1 -1
  298. package/docs/{namespaces → api/namespaces}/EventStates/variables/STOPPED.md +1 -1
  299. package/docs/{namespaces → api/namespaces}/uuidv5/variables/DNS.md +1 -1
  300. package/docs/{namespaces → api/namespaces}/uuidv5/variables/URL.md +1 -1
  301. package/docs/{type-aliases → api/type-aliases}/AIChatContentPart.md +1 -1
  302. package/docs/{type-aliases → api/type-aliases}/AIChatMessageParam.md +1 -1
  303. package/docs/{type-aliases → api/type-aliases}/AIChatRole.md +1 -1
  304. package/docs/{type-aliases → api/type-aliases}/AIChatToolChoiceParam.md +1 -1
  305. package/docs/{type-aliases → api/type-aliases}/AIMessageType.md +1 -1
  306. package/docs/api/type-aliases/AIModelNameRule.md +14 -0
  307. package/docs/api/type-aliases/AIModelNameRuleFn.md +28 -0
  308. package/docs/api/type-aliases/AIModelNameRules.md +13 -0
  309. package/docs/{type-aliases → api/type-aliases}/AITextGenerationFinishReason.md +1 -1
  310. package/docs/api/type-aliases/ActionName.md +13 -0
  311. package/docs/api/type-aliases/ArrayMergeWay.md +11 -0
  312. package/docs/api/type-aliases/AsyncTaskId.md +11 -0
  313. package/docs/{type-aliases → api/type-aliases}/BeforeShutdownListener.md +1 -1
  314. package/docs/{type-aliases → api/type-aliases}/EventErrorListenerFn.md +1 -1
  315. package/docs/{type-aliases → api/type-aliases}/EventListenerFn.md +1 -1
  316. package/docs/api/type-aliases/FuncParamType.md +13 -0
  317. package/docs/{type-aliases → api/type-aliases}/PromptExamples.md +1 -1
  318. package/docs/api/type-aliases/PubSubClientId.md +14 -0
  319. package/docs/api/type-aliases/PubSubCtx.md +37 -0
  320. package/docs/api/type-aliases/RpcMethodHandler.md +34 -0
  321. package/docs/{type-aliases → api/type-aliases}/SemaphoreIsReadyFuncType.md +1 -1
  322. package/docs/api/type-aliases/TFunc.md +33 -0
  323. package/docs/{variables → api/variables}/AIChatRoles.md +1 -1
  324. package/docs/{variables → api/variables}/AIMessageTypes.md +1 -1
  325. package/docs/{variables → api/variables}/AITextGenerationFinishReasons.md +1 -1
  326. package/docs/{variables → api/variables}/AbortErrorCode.md +1 -1
  327. package/docs/api/variables/ActionNames.md +13 -0
  328. package/docs/{variables → api/variables}/AlreadyExistsErrorCode.md +1 -1
  329. package/docs/api/variables/ArrayMergeWay.md +25 -0
  330. package/docs/api/variables/ArrayMergeWaySymbol.md +11 -0
  331. package/docs/api/variables/ClientToolFuncSchema.md +83 -0
  332. package/docs/{variables → api/variables}/DEFAULT_CONFIG_NAME.md +1 -1
  333. package/docs/{variables → api/variables}/DefaultAsyncSemaphoreCapacity.md +1 -1
  334. package/docs/api/variables/EventBusName.md +11 -0
  335. package/docs/api/variables/EventName.md +11 -0
  336. package/docs/{variables → api/variables}/FilenameReservedRegex.md +1 -1
  337. package/docs/api/variables/FuncMetaSymbol.md +15 -0
  338. package/docs/{variables → api/variables}/InternalErrorCode.md +1 -1
  339. package/docs/{variables → api/variables}/LLM_TOKENIZER_NAMES.md +1 -1
  340. package/docs/{variables → api/variables}/LLM_TOKENIZER_NAMES_MAP.md +1 -1
  341. package/docs/{variables → api/variables}/NotFoundErrorCode.md +1 -1
  342. package/docs/{variables → api/variables}/NotImplementedErrorCode.md +1 -1
  343. package/docs/api/variables/PASSING_SCORE.md +13 -0
  344. package/docs/api/variables/RStreamErrCode.md +11 -0
  345. package/docs/api/variables/RemoteToolFuncSchema.md +84 -0
  346. package/docs/api/variables/ResponseRStreamErrCode.md +11 -0
  347. package/docs/{variables → api/variables}/SHUTDOWN_SIGNALS.md +1 -1
  348. package/docs/{variables → api/variables}/SSEChannelAlreadyClosedErrCode.md +1 -1
  349. package/docs/api/variables/SecondaryCache.md +11 -0
  350. package/docs/api/variables/ServerToolFuncSchema.md +83 -0
  351. package/docs/api/variables/StrangeHumanName.md +11 -0
  352. package/docs/api/variables/ToolAsyncCancelableBit.md +11 -0
  353. package/docs/api/variables/ToolAsyncMultiTaskBit.md +11 -0
  354. package/docs/api/variables/ToolAsyncPriorityBit.md +11 -0
  355. package/docs/{variables → api/variables}/ToolFuncSchema.md +14 -1
  356. package/docs/{variables → api/variables}/WindowsReservedNameRegex.md +1 -1
  357. package/docs/api/variables/base32768.md +11 -0
  358. package/docs/api/variables/defaultTemplateFormat.md +11 -0
  359. package/docs/api/variables/event.md +11 -0
  360. package/docs/api/variables/eventClient.md +11 -0
  361. package/docs/api/variables/eventServer.md +11 -0
  362. package/docs/api/variables/lrucache.md +11 -0
  363. package/docs/{variables → api/variables}/mimeType.md +1 -1
  364. package/docs/{variables → api/variables}/uuidNIL.md +1 -1
  365. package/docs/pubsub.md +326 -0
  366. package/docs/server_client_tools.md +88 -0
  367. package/docs/toolFunc.md +183 -0
  368. package/docs/transport.md +137 -0
  369. package/package.json +38 -38
  370. package/dist/chunk-YVFGQB4L.mjs +0 -1
  371. package/dist/index-BkwhCK1q.d.mts +0 -899
  372. package/dist/index-BkwhCK1q.d.ts +0 -899
  373. package/docs/README.md +0 -250
  374. package/docs/classes/AlreadyExistsError.md +0 -346
  375. package/docs/classes/BaseError.md +0 -359
  376. package/docs/classes/ConfigFile.md +0 -353
  377. package/docs/classes/HFEnvironment.md +0 -184
  378. package/docs/classes/HFInterpreter.md +0 -77
  379. package/docs/classes/HFTemplate.md +0 -67
  380. package/docs/classes/HfPromptTemplate.md +0 -1158
  381. package/docs/classes/NotFoundError.md +0 -346
  382. package/docs/classes/NotImplementationError.md +0 -346
  383. package/docs/classes/ReadableStreamError.md +0 -366
  384. package/docs/classes/ResClientTools.md +0 -2451
  385. package/docs/classes/ResServerTools.md +0 -2427
  386. package/docs/classes/SSEChannel.md +0 -270
  387. package/docs/classes/ToolFunc.md +0 -2201
  388. package/docs/classes/YamlTypeBaseObject.md +0 -31
  389. package/docs/enumerations/AsyncFeatureBits.md +0 -33
  390. package/docs/enumerations/AsyncFeatures.md +0 -33
  391. package/docs/enumerations/ErrorCode.md +0 -177
  392. package/docs/enumerations/HashAlgorithm.md +0 -97
  393. package/docs/functions/canonicalize.md +0 -21
  394. package/docs/functions/expandConfig.md +0 -25
  395. package/docs/functions/filenameReservedRegex.md +0 -20
  396. package/docs/functions/hfParse.md +0 -24
  397. package/docs/functions/hfTokenize.md +0 -27
  398. package/docs/functions/initShutdown.md +0 -15
  399. package/docs/functions/interpolateEnv.md +0 -29
  400. package/docs/functions/interpolateFString.md +0 -29
  401. package/docs/functions/interpolateGolangTemplate.md +0 -35
  402. package/docs/functions/parseFString.md +0 -26
  403. package/docs/functions/parseYaml.md +0 -25
  404. package/docs/functions/reControlCharsRegex.md +0 -19
  405. package/docs/functions/registerYamlTag.md +0 -21
  406. package/docs/functions/stringifyYaml.md +0 -25
  407. package/docs/functions/wait.md +0 -21
  408. package/docs/interfaces/AIChatAssistantMessageParam.md +0 -129
  409. package/docs/interfaces/AIChatContentPartImage.md +0 -29
  410. package/docs/interfaces/AIChatContentPartText.md +0 -25
  411. package/docs/interfaces/AIChatMessageParamBase.md +0 -68
  412. package/docs/interfaces/AIChatMessageToolCall.md +0 -41
  413. package/docs/interfaces/AIChatToolChoiceFuncObject.md +0 -37
  414. package/docs/interfaces/AIChatToolChoiceObject.md +0 -25
  415. package/docs/interfaces/AIChatToolFunc.md +0 -41
  416. package/docs/interfaces/AIChatToolFuncParam.md +0 -37
  417. package/docs/interfaces/AIChatToolMessageParam.md +0 -113
  418. package/docs/interfaces/AIChatToolParam.md +0 -25
  419. package/docs/interfaces/AIChatToolTypeObject.md +0 -17
  420. package/docs/interfaces/AIChatUserMessageParam.md +0 -137
  421. package/docs/interfaces/AIChoiceConfig.md +0 -65
  422. package/docs/interfaces/AIResult.md +0 -65
  423. package/docs/interfaces/AIStreamParserOptions.md +0 -21
  424. package/docs/interfaces/BaseFunc.md +0 -157
  425. package/docs/interfaces/BaseFuncItem.md +0 -101
  426. package/docs/interfaces/BinarySemaphoreAcquireOptions.md +0 -25
  427. package/docs/interfaces/BinarySemaphoreOptions.md +0 -57
  428. package/docs/interfaces/BinarySemaphoreReleaseOptions.md +0 -25
  429. package/docs/interfaces/BinarySemaphoreReleaserFunc.md +0 -37
  430. package/docs/interfaces/CancelableAbilityOptions.md +0 -113
  431. package/docs/interfaces/ClientFuncItem.md +0 -175
  432. package/docs/interfaces/DotenvExpandOptions.md +0 -43
  433. package/docs/interfaces/DotenvExpandOutput.md +0 -25
  434. package/docs/interfaces/DotenvParseInput.md +0 -13
  435. package/docs/interfaces/DotenvParseOutput.md +0 -13
  436. package/docs/interfaces/DotenvPopulateInput.md +0 -13
  437. package/docs/interfaces/EventClientFuncParams.md +0 -51
  438. package/docs/interfaces/EventServerFuncParams.md +0 -67
  439. package/docs/interfaces/FewShotPromptTemplateOptions.md +0 -147
  440. package/docs/interfaces/FuncItem.md +0 -143
  441. package/docs/interfaces/FuncParam.md +0 -61
  442. package/docs/interfaces/FuncParams.md +0 -13
  443. package/docs/interfaces/Funcs.md +0 -13
  444. package/docs/interfaces/HashAlgoParams.md +0 -33
  445. package/docs/interfaces/IFileMetaInfo.md +0 -65
  446. package/docs/interfaces/ITruncateToTokenLimitOptions.md +0 -99
  447. package/docs/interfaces/JsonFilter.md +0 -13
  448. package/docs/interfaces/ParseObjectArgumentOptions.md +0 -89
  449. package/docs/interfaces/PromptExampleSelectorOptions.md +0 -34
  450. package/docs/interfaces/PromptTemplateOptions.md +0 -65
  451. package/docs/interfaces/RemoteFuncItem.md +0 -164
  452. package/docs/interfaces/ReplacePlacehoderOptions.md +0 -41
  453. package/docs/interfaces/ResClientFuncParams.md +0 -37
  454. package/docs/interfaces/ResServerFuncParams.md +0 -69
  455. package/docs/interfaces/SanitizeFilenameOptions.md +0 -25
  456. package/docs/interfaces/SectionStringOptions.md +0 -25
  457. package/docs/interfaces/SemaphoreOptions.md +0 -89
  458. package/docs/interfaces/SemaphoreTaskItem.md +0 -73
  459. package/docs/interfaces/ServerFuncItem.md +0 -183
  460. package/docs/interfaces/ServerFuncParams.md +0 -35
  461. package/docs/interfaces/SplitSentenceOptions.md +0 -41
  462. package/docs/interfaces/ToolFuncPackage.md +0 -47
  463. package/docs/type-aliases/AIModelNameRule.md +0 -11
  464. package/docs/type-aliases/AIModelNameRuleFn.md +0 -21
  465. package/docs/type-aliases/AIModelNameRules.md +0 -11
  466. package/docs/type-aliases/ActionName.md +0 -11
  467. package/docs/type-aliases/AsyncTaskId.md +0 -11
  468. package/docs/type-aliases/FStringPromptTemplateNode.md +0 -14
  469. package/docs/type-aliases/FuncParamType.md +0 -11
  470. package/docs/type-aliases/PromptTemplateType.md +0 -11
  471. package/docs/type-aliases/PromptType.md +0 -11
  472. package/docs/type-aliases/TFunc.md +0 -25
  473. package/docs/variables/ActionNames.md +0 -11
  474. package/docs/variables/ClientToolFuncSchema.md +0 -101
  475. package/docs/variables/EventBusName.md +0 -11
  476. package/docs/variables/EventName.md +0 -11
  477. package/docs/variables/HFBuiltins.md +0 -122
  478. package/docs/variables/PASSING_SCORE.md +0 -11
  479. package/docs/variables/PromptTemplateTypes.md +0 -11
  480. package/docs/variables/PromptTypes.md +0 -14
  481. package/docs/variables/RStreamErrCode.md +0 -11
  482. package/docs/variables/RemoteToolFuncSchema.md +0 -101
  483. package/docs/variables/ResponseRStreamErrCode.md +0 -11
  484. package/docs/variables/SecondaryCache.md +0 -11
  485. package/docs/variables/ServerToolFuncSchema.md +0 -101
  486. package/docs/variables/ToolAsyncCancelableBit.md +0 -11
  487. package/docs/variables/ToolAsyncMultiTaskBit.md +0 -11
  488. package/docs/variables/ToolAsyncPriorityBit.md +0 -11
  489. package/docs/variables/base32768.md +0 -11
  490. package/docs/variables/defaultTemplateFormat.md +0 -11
  491. package/docs/variables/event.md +0 -11
  492. package/docs/variables/eventClient.md +0 -11
  493. package/docs/variables/eventServer.md +0 -11
  494. package/docs/variables/lrucache.md +0 -11
  495. /package/docs/{_media → api/_media}/LICENSE-MIT +0 -0
  496. /package/docs/{namespaces → api/namespaces}/EventStates/README.md +0 -0
  497. /package/docs/{namespaces → api/namespaces}/uuidv5/README.md +0 -0
@@ -0,0 +1,2856 @@
1
+ [**@isdk/ai-tool**](../README.md)
2
+
3
+ ***
4
+
5
+ [@isdk/ai-tool](../globals.md) / ResServerTools
6
+
7
+ # Class: ResServerTools
8
+
9
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-server-tools.ts:11](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/res-server-tools.ts#L11)
10
+
11
+ ## Extends
12
+
13
+ - `RpcMethodsServerTool`
14
+
15
+ ## Extended by
16
+
17
+ - [`EventServer`](EventServer.md)
18
+
19
+ ## Indexable
20
+
21
+ \[`name`: `string`\]: `any`
22
+
23
+ ## Constructors
24
+
25
+ ### new ResServerTools()
26
+
27
+ > **new ResServerTools**(`name`, `options`): [`ResServerTools`](ResServerTools.md)
28
+
29
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-server-tools.ts:27](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/res-server-tools.ts#L27)
30
+
31
+ #### Parameters
32
+
33
+ ##### name
34
+
35
+ `string` | `Function` | [`FuncItem`](../interfaces/FuncItem.md)
36
+
37
+ ##### options
38
+
39
+ `any` = `{}`
40
+
41
+ #### Returns
42
+
43
+ [`ResServerTools`](ResServerTools.md)
44
+
45
+ ## Properties
46
+
47
+ ### $attributes
48
+
49
+ > **$attributes**: `Properties`
50
+
51
+ Defined in: [property-manager.js/src/advance.d.ts:5](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/advance.d.ts#L5)
52
+
53
+ ***
54
+
55
+ ### action
56
+
57
+ > **action**: `"get"` \| `"post"` \| `"put"` \| `"delete"` \| `"patch"` \| `"list"` \| `"res"` = `'res'`
58
+
59
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-server-tools.ts:21](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/res-server-tools.ts#L21)
60
+
61
+ The action to be used for the remote call. This typically represents an RPC method name.
62
+ Only for RESTful HTTP transports, it might be mapped to a standard HTTP method (e.g., GET, POST)
63
+
64
+ ***
65
+
66
+ ### alias?
67
+
68
+ > `optional` **alias**: `string` \| `string`[]
69
+
70
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:130](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L130)
71
+
72
+ Optional aliases for the function name.
73
+
74
+ ***
75
+
76
+ ### allowExportFunc?
77
+
78
+ > `optional` **allowExportFunc**: `boolean`
79
+
80
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/server-tools.ts:35](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/server-tools.ts#L35)
81
+
82
+ If set to true, the body of the function (`func`) will be serialized and sent
83
+ to the client when tools are loaded. This allows the client to execute the
84
+ function locally instead of making a remote call. Defaults to false.
85
+
86
+ ***
87
+
88
+ ### ~~apiRoot?~~
89
+
90
+ > `optional` **apiRoot**: `string`
91
+
92
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/consts.ts:89](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/utils/consts.ts#L89)
93
+
94
+ The root endpoint for the remote service.
95
+
96
+ #### Deprecated
97
+
98
+ Use `transport` instead.
99
+
100
+ ***
101
+
102
+ ### asyncFeatures?
103
+
104
+ > `optional` **asyncFeatures**: `number`
105
+
106
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:144](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L144)
107
+
108
+ A bitmask representing asynchronous features supported by the function, built from `AsyncFeatureBits`.
109
+ This allows the system to understand if a function supports capabilities like cancellation or multi-tasking.
110
+
111
+ #### See
112
+
113
+ AsyncFeatureBits from `@src/utils/cancelable-ability.ts`
114
+
115
+ #### Example
116
+
117
+ ```ts
118
+ import { AsyncFeatures } from './utils';
119
+ const func = new ToolFunc({
120
+ name: 'cancellableTask',
121
+ asyncFeatures: AsyncFeatures.Cancelable | AsyncFeatures.MultiTask,
122
+ // ...
123
+ });
124
+ ```
125
+
126
+ ***
127
+
128
+ ### constructor
129
+
130
+ > **constructor**: `Function`
131
+
132
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:125
133
+
134
+ The initial value of Object.prototype.constructor is the standard built-in Object constructor.
135
+
136
+ ***
137
+
138
+ ### defaultOptions
139
+
140
+ > **defaultOptions**: `object`
141
+
142
+ Defined in: [property-manager.js/src/abstract.d.ts:74](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L74)
143
+
144
+ The default options for export and assign
145
+
146
+ #### assign?
147
+
148
+ > `optional` **assign**: `IMergeOptions`
149
+
150
+ #### export?
151
+
152
+ > `optional` **export**: `IMergeOptions`
153
+
154
+ ***
155
+
156
+ ### depends?
157
+
158
+ > `optional` **depends**: `object`
159
+
160
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:167](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L167)
161
+
162
+ A map of dependencies this function has on other tool functions.
163
+ Declaring dependencies ensures that they are automatically registered when this function is registered.
164
+ This is crucial for building modular functions that rely on each other without needing to manage registration order manually.
165
+
166
+ #### Index Signature
167
+
168
+ \[`name`: `string`\]: [`ToolFunc`](ToolFunc.md)
169
+
170
+ #### Example
171
+
172
+ ```ts
173
+ const helperFunc = new ToolFunc({ name: 'helper', func: () => 'world' });
174
+ const mainFunc = new ToolFunc({
175
+ name: 'main',
176
+ depends: {
177
+ helper: helperFunc,
178
+ },
179
+ func() {
180
+ // We can now safely run the dependency
181
+ const result = this.runSync('helper');
182
+ return `Hello, ${result}`;
183
+ }
184
+ });
185
+ // When mainFunc is registered, helperFunc will be registered automatically.
186
+ mainFunc.register();
187
+ ```
188
+
189
+ ***
190
+
191
+ ### description?
192
+
193
+ > `optional` **description**: `string`
194
+
195
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:172](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L172)
196
+
197
+ A detailed description of what the function does.
198
+
199
+ ***
200
+
201
+ ### ~~fetchOptions?~~
202
+
203
+ > `optional` **fetchOptions**: `any`
204
+
205
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/consts.ts:101](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/utils/consts.ts#L101)
206
+
207
+ Options to be passed to the underlying `fetch` call in an HTTP transport.
208
+
209
+ #### Deprecated
210
+
211
+ Use `transport` instead.
212
+
213
+ ***
214
+
215
+ ### isApi?
216
+
217
+ > `optional` **isApi**: `boolean`
218
+
219
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:119](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L119)
220
+
221
+ If true, indicates that this function should be treated as a server-side API.
222
+
223
+ ***
224
+
225
+ ### methods
226
+
227
+ > **methods**: `string`[]
228
+
229
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:11](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/rpc-methods-server-tool.ts#L11)
230
+
231
+ ***
232
+
233
+ ### name?
234
+
235
+ > `optional` **name**: `string`
236
+
237
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:76](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L76)
238
+
239
+ The unique name of the function.
240
+
241
+ ***
242
+
243
+ ### nonExported1stChar
244
+
245
+ > **nonExported1stChar**: `string`
246
+
247
+ Defined in: [property-manager.js/src/abstract.d.ts:78](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L78)
248
+
249
+ the property with the default prefix '$' will not be exported.
250
+
251
+ ***
252
+
253
+ ### params
254
+
255
+ > **params**: [`FuncParams`](../interfaces/FuncParams.md)
256
+
257
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-server-tools.ts:22](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/res-server-tools.ts#L22)
258
+
259
+ ***
260
+
261
+ ### result?
262
+
263
+ > `optional` **result**: `string` \| `Record`\<`string`, `any`\>
264
+
265
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:86](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L86)
266
+
267
+ The expected return type of the function, described as a string or a JSON schema object.
268
+
269
+ ***
270
+
271
+ ### scope?
272
+
273
+ > `optional` **scope**: `any`
274
+
275
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:91](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L91)
276
+
277
+ The execution scope or context (`this`) for the function.
278
+
279
+ ***
280
+
281
+ ### setup()?
282
+
283
+ > `optional` **setup**: (`this`, `options`?) => `void`
284
+
285
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:114](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L114)
286
+
287
+ A lifecycle hook called once during the `ToolFunc` instance's initialization.
288
+ It allows for initial setup, state configuration, or property modification on the instance
289
+ before it is used or registered. The `this` context is the `ToolFunc` instance itself.
290
+
291
+ #### Parameters
292
+
293
+ ##### this
294
+
295
+ [`ToolFunc`](ToolFunc.md)
296
+
297
+ ##### options?
298
+
299
+ [`FuncItem`](../interfaces/FuncItem.md)
300
+
301
+ The configuration options for the function.
302
+
303
+ #### Returns
304
+
305
+ `void`
306
+
307
+ #### Example
308
+
309
+ ```ts
310
+ const myFunc = new ToolFunc({
311
+ name: 'myFunc',
312
+ customState: 'initial',
313
+ setup() {
314
+ // `this` is the myFunc instance
315
+ this.customState = 'configured';
316
+ }
317
+ });
318
+ console.log(myFunc.customState); // Outputs: 'configured'
319
+ ```
320
+
321
+ ***
322
+
323
+ ### stream?
324
+
325
+ > `optional` **stream**: `boolean`
326
+
327
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:125](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L125)
328
+
329
+ If true, indicates that the function has the *capability* to stream its output.
330
+ Whether a specific call is streamed is determined by a `stream` property in the runtime parameters.
331
+
332
+ ***
333
+
334
+ ### tags?
335
+
336
+ > `optional` **tags**: `string` \| `string`[]
337
+
338
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:96](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L96)
339
+
340
+ Tags for grouping or filtering functions.
341
+
342
+ ***
343
+
344
+ ### title?
345
+
346
+ > `optional` **title**: `string`
347
+
348
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:177](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L177)
349
+
350
+ A concise, human-readable title for the function, often used in UI or by AI.
351
+
352
+ ***
353
+
354
+ ### aliases
355
+
356
+ > `static` **aliases**: `object` = `{}`
357
+
358
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:305](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L305)
359
+
360
+ A static map of aliases to their corresponding function names.
361
+
362
+ #### Index Signature
363
+
364
+ \[`name`: `string`\]: `string`
365
+
366
+ ***
367
+
368
+ ### dataPath
369
+
370
+ > `static` **dataPath**: `string`
371
+
372
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:312](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L312)
373
+
374
+ A conventional property to designate a file path for saving the registered `ToolFunc` data.
375
+ Note: The `ToolFunc` class itself does not implement persistence logic. It is up to the
376
+ developer to use this path to save and load the `ToolFunc.items` registry if needed.
377
+
378
+ ***
379
+
380
+ ### items
381
+
382
+ > `static` **items**: [`Funcs`](../interfaces/Funcs.md) = `{}`
383
+
384
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:300](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L300)
385
+
386
+ A static registry of all `ToolFunc` instances, indexed by name.
387
+
388
+ ***
389
+
390
+ ### SpecialRpcMethodNames
391
+
392
+ > `static` **SpecialRpcMethodNames**: `any`
393
+
394
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-server-tools.ts:20](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/res-server-tools.ts#L20)
395
+
396
+ ## Accessors
397
+
398
+ ### SpecialRpcMethodNames
399
+
400
+ #### Get Signature
401
+
402
+ > **get** **SpecialRpcMethodNames**(): `any`
403
+
404
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:22](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/rpc-methods-server-tool.ts#L22)
405
+
406
+ ##### Returns
407
+
408
+ `any`
409
+
410
+ ***
411
+
412
+ ### apiRoot
413
+
414
+ #### Get Signature
415
+
416
+ > **get** `static` **apiRoot**(): `undefined` \| `string`
417
+
418
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/server-tools.ts:57](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/server-tools.ts#L57)
419
+
420
+ The conventional root path for the API endpoint.
421
+
422
+ ##### Returns
423
+
424
+ `undefined` \| `string`
425
+
426
+ ## Methods
427
+
428
+ ### arr2ObjParams()
429
+
430
+ > **arr2ObjParams**(`params`): `any`[]
431
+
432
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:629](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L629)
433
+
434
+ Converts an array of positional arguments into a named parameters object.
435
+ This is used internally to support functions defined with named parameters.
436
+
437
+ #### Parameters
438
+
439
+ ##### params
440
+
441
+ `any`[]
442
+
443
+ An array of positional arguments.
444
+
445
+ #### Returns
446
+
447
+ `any`[]
448
+
449
+ An array containing a single parameters object.
450
+
451
+ ***
452
+
453
+ ### assign()
454
+
455
+ > **assign**(`src`, `options`?): `this`
456
+
457
+ Defined in: [property-manager.js/src/abstract.d.ts:106](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L106)
458
+
459
+ Assign the values from the src object.
460
+
461
+ #### Parameters
462
+
463
+ ##### src
464
+
465
+ `any`
466
+
467
+ the source object
468
+
469
+ ##### options?
470
+
471
+ `IMergeOptions`
472
+
473
+ #### Returns
474
+
475
+ `this`
476
+
477
+ this object
478
+
479
+ ***
480
+
481
+ ### assignProperty()
482
+
483
+ > **assignProperty**(`src`, `name`, `value`, `attrs`?, `options`?): `void`
484
+
485
+ Defined in: [property-manager.js/src/abstract.d.ts:117](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L117)
486
+
487
+ Assign a property of src to this object.
488
+
489
+ #### Parameters
490
+
491
+ ##### src
492
+
493
+ `any`
494
+
495
+ the src object
496
+
497
+ ##### name
498
+
499
+ `string`
500
+
501
+ the property name to assign
502
+
503
+ ##### value
504
+
505
+ `any`
506
+
507
+ the property value to assign
508
+
509
+ ##### attrs?
510
+
511
+ `any`
512
+
513
+ the attributes object
514
+
515
+ ##### options?
516
+
517
+ `IMergeOptions`
518
+
519
+ #### Returns
520
+
521
+ `void`
522
+
523
+ ***
524
+
525
+ ### assignPropertyTo()
526
+
527
+ > `abstract` **assignPropertyTo**(`dest`, `src`, `name`, `value`, `attrs`?, `options`?): `void`
528
+
529
+ Defined in: [property-manager.js/src/abstract.d.ts:131](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L131)
530
+
531
+ Assign the property value from the src to destination object.
532
+
533
+ #### Parameters
534
+
535
+ ##### dest
536
+
537
+ `any`
538
+
539
+ The destination object
540
+
541
+ ##### src
542
+
543
+ `any`
544
+
545
+ The src object
546
+
547
+ ##### name
548
+
549
+ `string`
550
+
551
+ The property name
552
+
553
+ ##### value
554
+
555
+ `any`
556
+
557
+ The property value
558
+
559
+ ##### attrs?
560
+
561
+ `any`
562
+
563
+ The attributes object of the property
564
+
565
+ ##### options?
566
+
567
+ `IMergeOptions`
568
+
569
+ #### Returns
570
+
571
+ `void`
572
+
573
+ ***
574
+
575
+ ### assignTo()
576
+
577
+ > **assignTo**(`dest`?, `options`?): `any`
578
+
579
+ Defined in: [property-manager.js/src/abstract.d.ts:191](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L191)
580
+
581
+ Assign this attributes to the dest object
582
+
583
+ #### Parameters
584
+
585
+ ##### dest?
586
+
587
+ `any`
588
+
589
+ the destination object
590
+
591
+ ##### options?
592
+
593
+ `IMergeOptions`
594
+
595
+ #### Returns
596
+
597
+ `any`
598
+
599
+ the dest object
600
+
601
+ ***
602
+
603
+ ### cast()
604
+
605
+ > **cast**(`key`, `value`): `any`
606
+
607
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:48](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/rpc-methods-server-tool.ts#L48)
608
+
609
+ #### Parameters
610
+
611
+ ##### key
612
+
613
+ `string`
614
+
615
+ ##### value
616
+
617
+ `any`
618
+
619
+ #### Returns
620
+
621
+ `any`
622
+
623
+ ***
624
+
625
+ ### castParams()
626
+
627
+ > **castParams**(`params`): `RpcMethodsServerFuncParams`
628
+
629
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-server-tools.ts:40](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/res-server-tools.ts#L40)
630
+
631
+ #### Parameters
632
+
633
+ ##### params
634
+
635
+ `RpcMethodsServerFuncParams`
636
+
637
+ #### Returns
638
+
639
+ `RpcMethodsServerFuncParams`
640
+
641
+ ***
642
+
643
+ ### clone()
644
+
645
+ > **clone**(`options`?): `any`
646
+
647
+ Defined in: [property-manager.js/src/abstract.d.ts:155](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L155)
648
+
649
+ Create a new object with the same values of attributes.
650
+
651
+ #### Parameters
652
+
653
+ ##### options?
654
+
655
+ `IMergeOptions`
656
+
657
+ #### Returns
658
+
659
+ `any`
660
+
661
+ the new object
662
+
663
+ ***
664
+
665
+ ### cloneTo()
666
+
667
+ > **cloneTo**(`dest`, `options`?): `any`
668
+
669
+ Defined in: [property-manager.js/src/abstract.d.ts:148](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L148)
670
+
671
+ Create and assign the values to the destination object.
672
+
673
+ #### Parameters
674
+
675
+ ##### dest
676
+
677
+ `any`
678
+
679
+ the destination object
680
+
681
+ ##### options?
682
+
683
+ `IMergeOptions`
684
+
685
+ #### Returns
686
+
687
+ `any`
688
+
689
+ the new dest object
690
+
691
+ ***
692
+
693
+ ### defineProperties()
694
+
695
+ > `abstract` **defineProperties**(`aProperties`): `any`
696
+
697
+ Defined in: [property-manager.js/src/abstract.d.ts:89](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L89)
698
+
699
+ Define the attributes of this object.
700
+
701
+ #### Parameters
702
+
703
+ ##### aProperties
704
+
705
+ `SimplePropDescriptors`
706
+
707
+ the defined attributes of the object
708
+
709
+ #### Returns
710
+
711
+ `any`
712
+
713
+ ***
714
+
715
+ ### delete()?
716
+
717
+ > `optional` **delete**(`__namedParameters`): `any`
718
+
719
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-server-tools.ts:15](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/res-server-tools.ts#L15)
720
+
721
+ #### Parameters
722
+
723
+ ##### \_\_namedParameters
724
+
725
+ [`ResServerFuncParams`](../interfaces/ResServerFuncParams.md)
726
+
727
+ #### Returns
728
+
729
+ `any`
730
+
731
+ ***
732
+
733
+ ### exportTo()
734
+
735
+ > **exportTo**(`dest`, `options`?): `any`
736
+
737
+ Defined in: [property-manager.js/src/abstract.d.ts:173](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L173)
738
+
739
+ Export attributes to the dest json object.
740
+
741
+ #### Parameters
742
+
743
+ ##### dest
744
+
745
+ `any`
746
+
747
+ the destination object
748
+
749
+ ##### options?
750
+
751
+ `IExportOptions`
752
+
753
+ #### Returns
754
+
755
+ `any`
756
+
757
+ the dest object.
758
+
759
+ ***
760
+
761
+ ### func()
762
+
763
+ > **func**(`params`): `any`
764
+
765
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:68](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/rpc-methods-server-tool.ts#L68)
766
+
767
+ Placeholder for the actual server-side function implementation.
768
+ This method is intended to be defined when a `ServerTools` instance is created.
769
+
770
+ #### Parameters
771
+
772
+ ##### params
773
+
774
+ `RpcMethodsServerFuncParams`
775
+
776
+ The parameters for the function.
777
+
778
+ #### Returns
779
+
780
+ `any`
781
+
782
+ The result of the function.
783
+
784
+ ***
785
+
786
+ ### get()?
787
+
788
+ > `optional` **get**(`__namedParameters`): `any`
789
+
790
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-server-tools.ts:12](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/res-server-tools.ts#L12)
791
+
792
+ #### Parameters
793
+
794
+ ##### \_\_namedParameters
795
+
796
+ [`ResServerFuncParams`](../interfaces/ResServerFuncParams.md)
797
+
798
+ #### Returns
799
+
800
+ `any`
801
+
802
+ ***
803
+
804
+ ### getFunc()
805
+
806
+ > **getFunc**(`name`?): `any`
807
+
808
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:720](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L720)
809
+
810
+ Gets a bound function reference for execution with named parameters.
811
+ If a name is provided, it retrieves a different function from the registry.
812
+ Otherwise, it returns a bound version of this instance's `runSync`.
813
+
814
+ #### Parameters
815
+
816
+ ##### name?
817
+
818
+ `string`
819
+
820
+ Optional name of the function to retrieve.
821
+
822
+ #### Returns
823
+
824
+ `any`
825
+
826
+ A function reference or `undefined` if not found.
827
+
828
+ ***
829
+
830
+ ### getFuncWithPos()
831
+
832
+ > **getFuncWithPos**(`name`?): `any`
833
+
834
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:777](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L777)
835
+
836
+ Gets a bound function reference suitable for positional argument execution.
837
+ If a name is provided, it retrieves a different function from the registry.
838
+ Otherwise, it returns a bound version of this instance's `runWithPosSync`.
839
+
840
+ #### Parameters
841
+
842
+ ##### name?
843
+
844
+ `string`
845
+
846
+ Optional name of the function to retrieve.
847
+
848
+ #### Returns
849
+
850
+ `any`
851
+
852
+ A function reference or `undefined` if not found.
853
+
854
+ ***
855
+
856
+ ### getMethodFromParams()
857
+
858
+ > **getMethodFromParams**(`params`): `any`
859
+
860
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-server-tools.ts:31](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/res-server-tools.ts#L31)
861
+
862
+ #### Parameters
863
+
864
+ ##### params
865
+
866
+ [`ResServerFuncParams`](../interfaces/ResServerFuncParams.md)
867
+
868
+ #### Returns
869
+
870
+ `any`
871
+
872
+ ***
873
+
874
+ ### getProperties()
875
+
876
+ > `abstract` **getProperties**(): `PropDescriptors`
877
+
878
+ Defined in: [property-manager.js/src/abstract.d.ts:98](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L98)
879
+
880
+ Get the defined attributes.
881
+
882
+ #### Returns
883
+
884
+ `PropDescriptors`
885
+
886
+ the descriptors of properties object
887
+
888
+ ***
889
+
890
+ ### hasAsyncFeature()
891
+
892
+ > **hasAsyncFeature**(`feature`): `boolean`
893
+
894
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:787](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L787)
895
+
896
+ Checks if the current function instance supports a specific async feature.
897
+
898
+ #### Parameters
899
+
900
+ ##### feature
901
+
902
+ [`AsyncFeatureBits`](../enumerations/AsyncFeatureBits.md)
903
+
904
+ The async feature bit to check for.
905
+
906
+ #### Returns
907
+
908
+ `boolean`
909
+
910
+ `true` if the feature is supported, otherwise `false`.
911
+
912
+ ***
913
+
914
+ ### hasOwnProperty()
915
+
916
+ > **hasOwnProperty**(`v`): `boolean`
917
+
918
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:140
919
+
920
+ Determines whether an object has a property with the specified name.
921
+
922
+ #### Parameters
923
+
924
+ ##### v
925
+
926
+ `PropertyKey`
927
+
928
+ A property name.
929
+
930
+ #### Returns
931
+
932
+ `boolean`
933
+
934
+ ***
935
+
936
+ ### initialize()
937
+
938
+ > **initialize**(`src`?): `this`
939
+
940
+ Defined in: [property-manager.js/src/abstract.d.ts:139](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L139)
941
+
942
+ Initialize object and assign attribute values from src if src exists.
943
+
944
+ #### Parameters
945
+
946
+ ##### src?
947
+
948
+ `any`
949
+
950
+ #### Returns
951
+
952
+ `this`
953
+
954
+ this object.
955
+
956
+ ***
957
+
958
+ ### initRpcMethods()
959
+
960
+ > **initRpcMethods**(`methods`): `void`
961
+
962
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:27](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/rpc-methods-server-tool.ts#L27)
963
+
964
+ #### Parameters
965
+
966
+ ##### methods
967
+
968
+ `string`[] = `...`
969
+
970
+ #### Returns
971
+
972
+ `void`
973
+
974
+ ***
975
+
976
+ ### isPrototypeOf()
977
+
978
+ > **isPrototypeOf**(`v`): `boolean`
979
+
980
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:146
981
+
982
+ Determines whether an object exists in another object's prototype chain.
983
+
984
+ #### Parameters
985
+
986
+ ##### v
987
+
988
+ `Object`
989
+
990
+ Another object whose prototype chain is to be checked.
991
+
992
+ #### Returns
993
+
994
+ `boolean`
995
+
996
+ ***
997
+
998
+ ### isSame()
999
+
1000
+ > **isSame**(`src`, `options`?): `boolean`
1001
+
1002
+ Defined in: [property-manager.js/src/abstract.d.ts:200](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L200)
1003
+
1004
+ Check the src object whether “equals” this object.
1005
+
1006
+ #### Parameters
1007
+
1008
+ ##### src
1009
+
1010
+ `any`
1011
+
1012
+ The source object
1013
+
1014
+ ##### options?
1015
+
1016
+ `IMergeOptions`
1017
+
1018
+ #### Returns
1019
+
1020
+ `boolean`
1021
+
1022
+ ***
1023
+
1024
+ ### isStream()
1025
+
1026
+ > **isStream**(`params`): `undefined` \| `boolean`
1027
+
1028
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:805](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L805)
1029
+
1030
+ Determines if a function call should produce a stream.
1031
+
1032
+ The logic is as follows:
1033
+ 1. It first checks if the function is generally capable of streaming (`this.stream`).
1034
+ 2. If it is, it then checks if a `stream` parameter is formally declared in the function's `params` definition.
1035
+ 3. If both are true, the method returns the value of the `stream` property from the runtime `params` object.
1036
+ Otherwise, it returns the function's static `stream` capability.
1037
+
1038
+ #### Parameters
1039
+
1040
+ ##### params
1041
+
1042
+ `any`
1043
+
1044
+ The runtime parameters passed to the function call.
1045
+
1046
+ #### Returns
1047
+
1048
+ `undefined` \| `boolean`
1049
+
1050
+ `true` if the call should be streamed, `false` or `undefined` otherwise.
1051
+
1052
+ ***
1053
+
1054
+ ### list()?
1055
+
1056
+ > `optional` **list**(`options`?): `any`
1057
+
1058
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-server-tools.ts:16](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/res-server-tools.ts#L16)
1059
+
1060
+ #### Parameters
1061
+
1062
+ ##### options?
1063
+
1064
+ [`ResServerFuncParams`](../interfaces/ResServerFuncParams.md)
1065
+
1066
+ #### Returns
1067
+
1068
+ `any`
1069
+
1070
+ ***
1071
+
1072
+ ### mergeTo()
1073
+
1074
+ > **mergeTo**(`dest`, `options`?): `any`
1075
+
1076
+ Defined in: [property-manager.js/src/abstract.d.ts:164](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L164)
1077
+
1078
+ Merge this attributes to dest object.
1079
+
1080
+ #### Parameters
1081
+
1082
+ ##### dest
1083
+
1084
+ `any`
1085
+
1086
+ The destination object
1087
+
1088
+ ##### options?
1089
+
1090
+ `IMergeOptions`
1091
+
1092
+ #### Returns
1093
+
1094
+ `any`
1095
+
1096
+ the dest object.
1097
+
1098
+ ***
1099
+
1100
+ ### obj2ArrParams()
1101
+
1102
+ > **obj2ArrParams**(`params`?): `any`[]
1103
+
1104
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:648](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L648)
1105
+
1106
+ Converts a named parameters object into an array of positional arguments.
1107
+ This is used for functions defined with positional parameters.
1108
+
1109
+ #### Parameters
1110
+
1111
+ ##### params?
1112
+
1113
+ `any`
1114
+
1115
+ A named parameters object.
1116
+
1117
+ #### Returns
1118
+
1119
+ `any`[]
1120
+
1121
+ An array of positional arguments.
1122
+
1123
+ ***
1124
+
1125
+ ### post()?
1126
+
1127
+ > `optional` **post**(`options`): `any`
1128
+
1129
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-server-tools.ts:13](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/res-server-tools.ts#L13)
1130
+
1131
+ #### Parameters
1132
+
1133
+ ##### options
1134
+
1135
+ [`ResServerFuncParams`](../interfaces/ResServerFuncParams.md)
1136
+
1137
+ #### Returns
1138
+
1139
+ `any`
1140
+
1141
+ ***
1142
+
1143
+ ### propertyIsEnumerable()
1144
+
1145
+ > **propertyIsEnumerable**(`v`): `boolean`
1146
+
1147
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:152
1148
+
1149
+ Determines whether a specified property is enumerable.
1150
+
1151
+ #### Parameters
1152
+
1153
+ ##### v
1154
+
1155
+ `PropertyKey`
1156
+
1157
+ A property name.
1158
+
1159
+ #### Returns
1160
+
1161
+ `boolean`
1162
+
1163
+ ***
1164
+
1165
+ ### put()?
1166
+
1167
+ > `optional` **put**(`__namedParameters`): `any`
1168
+
1169
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-server-tools.ts:14](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/res-server-tools.ts#L14)
1170
+
1171
+ #### Parameters
1172
+
1173
+ ##### \_\_namedParameters
1174
+
1175
+ [`ResServerFuncParams`](../interfaces/ResServerFuncParams.md)
1176
+
1177
+ #### Returns
1178
+
1179
+ `any`
1180
+
1181
+ ***
1182
+
1183
+ ### register()
1184
+
1185
+ > **register**(): `boolean` \| [`ToolFunc`](ToolFunc.md)
1186
+
1187
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:602](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L602)
1188
+
1189
+ Registers the current `ToolFunc` instance into the static registry.
1190
+ Also registers any declared dependencies.
1191
+
1192
+ #### Returns
1193
+
1194
+ `boolean` \| [`ToolFunc`](ToolFunc.md)
1195
+
1196
+ The instance itself upon successful registration, or `false` if it already exists.
1197
+
1198
+ ***
1199
+
1200
+ ### run()
1201
+
1202
+ > **run**(`params`, `context`?): `Promise`\<`any`\>
1203
+
1204
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/server-tools.ts:98](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/server-tools.ts#L98)
1205
+
1206
+ Overrides the base `run` method to inject transport-specific context.
1207
+ If a `context` object containing `req` and `reply` is provided, these are
1208
+ added to the parameters as `_req` and `_res` before execution.
1209
+
1210
+ #### Parameters
1211
+
1212
+ ##### params
1213
+
1214
+ [`ServerFuncParams`](../interfaces/ServerFuncParams.md)
1215
+
1216
+ The parameters for the function.
1217
+
1218
+ ##### context?
1219
+
1220
+ The transport-level context.
1221
+
1222
+ ###### reply
1223
+
1224
+ `any`
1225
+
1226
+ ###### req
1227
+
1228
+ `any`
1229
+
1230
+ #### Returns
1231
+
1232
+ `Promise`\<`any`\>
1233
+
1234
+ The result of the function execution.
1235
+
1236
+ ***
1237
+
1238
+ ### runAs()
1239
+
1240
+ > **runAs**(`name`, `params`?): `Promise`\<`any`\>
1241
+
1242
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:697](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L697)
1243
+
1244
+ Asynchronously executes another registered function by name.
1245
+ This method delegates to `runAsSync()` internally.
1246
+
1247
+ #### Parameters
1248
+
1249
+ ##### name
1250
+
1251
+ `string`
1252
+
1253
+ The name of the target function to run.
1254
+
1255
+ ##### params?
1256
+
1257
+ `any`
1258
+
1259
+ Optional parameters to pass to the function.
1260
+
1261
+ #### Returns
1262
+
1263
+ `Promise`\<`any`\>
1264
+
1265
+ A promise that resolves with the result of the function execution.
1266
+
1267
+ ***
1268
+
1269
+ ### runAsSync()
1270
+
1271
+ > **runAsSync**(`name`, `params`?): `any`
1272
+
1273
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:708](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L708)
1274
+
1275
+ Synchronously executes another registered function by name.
1276
+ This is a convenience method that forwards the call to the static `runSync()` method.
1277
+
1278
+ #### Parameters
1279
+
1280
+ ##### name
1281
+
1282
+ `string`
1283
+
1284
+ The name of the target function to run.
1285
+
1286
+ ##### params?
1287
+
1288
+ `any`
1289
+
1290
+ Optional parameters to pass to the function.
1291
+
1292
+ #### Returns
1293
+
1294
+ `any`
1295
+
1296
+ The result of the function execution.
1297
+
1298
+ ***
1299
+
1300
+ ### runSync()
1301
+
1302
+ > **runSync**(`params`?): `any`
1303
+
1304
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:667](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L667)
1305
+
1306
+ Executes the function synchronously with a named parameters object.
1307
+
1308
+ #### Parameters
1309
+
1310
+ ##### params?
1311
+
1312
+ `any`
1313
+
1314
+ The parameters object for the function.
1315
+
1316
+ #### Returns
1317
+
1318
+ `any`
1319
+
1320
+ The result of the function execution.
1321
+
1322
+ #### Throws
1323
+
1324
+ Will throw an error if an array of parameters is passed to a function that expects an object.
1325
+
1326
+ ***
1327
+
1328
+ ### runWithPos()
1329
+
1330
+ > **runWithPos**(...`params`): `Promise`\<`any`\>
1331
+
1332
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:755](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L755)
1333
+
1334
+ Executes the function asynchronously using positional arguments.
1335
+ Delegates to `runWithPosSync()` internally.
1336
+
1337
+ #### Parameters
1338
+
1339
+ ##### params
1340
+
1341
+ ...`any`[]
1342
+
1343
+ Positional arguments passed to the function.
1344
+
1345
+ #### Returns
1346
+
1347
+ `Promise`\<`any`\>
1348
+
1349
+ A promise that resolves with the result of the function execution.
1350
+
1351
+ ***
1352
+
1353
+ ### runWithPosAs()
1354
+
1355
+ > **runWithPosAs**(`name`, ...`params`): `Promise`\<`any`\>
1356
+
1357
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:766](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L766)
1358
+
1359
+ Asynchronously executes another function by name using positional arguments.
1360
+ Delegates to `runWithPosAsSync()` internally.
1361
+
1362
+ #### Parameters
1363
+
1364
+ ##### name
1365
+
1366
+ `string`
1367
+
1368
+ The name of the target function to run.
1369
+
1370
+ ##### params
1371
+
1372
+ ...`any`[]
1373
+
1374
+ Positional arguments to pass to the function.
1375
+
1376
+ #### Returns
1377
+
1378
+ `Promise`\<`any`\>
1379
+
1380
+ A promise that resolves with the result of the function execution.
1381
+
1382
+ ***
1383
+
1384
+ ### runWithPosAsSync()
1385
+
1386
+ > **runWithPosAsSync**(`name`, ...`params`): `any`
1387
+
1388
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:745](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L745)
1389
+
1390
+ Synchronously executes another function by name using positional arguments.
1391
+ This is a convenience wrapper around the static `runWithPosSync()` method.
1392
+
1393
+ #### Parameters
1394
+
1395
+ ##### name
1396
+
1397
+ `string`
1398
+
1399
+ The name of the target function to run.
1400
+
1401
+ ##### params
1402
+
1403
+ ...`any`[]
1404
+
1405
+ Positional arguments to pass to the function.
1406
+
1407
+ #### Returns
1408
+
1409
+ `any`
1410
+
1411
+ The result of the function execution.
1412
+
1413
+ ***
1414
+
1415
+ ### runWithPosSync()
1416
+
1417
+ > **runWithPosSync**(...`params`): `any`
1418
+
1419
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:731](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L731)
1420
+
1421
+ Executes the function synchronously using positional arguments.
1422
+ If the function expects named parameters, it converts the arguments automatically.
1423
+
1424
+ #### Parameters
1425
+
1426
+ ##### params
1427
+
1428
+ ...`any`[]
1429
+
1430
+ Positional arguments passed to the function.
1431
+
1432
+ #### Returns
1433
+
1434
+ `any`
1435
+
1436
+ The result of the function execution.
1437
+
1438
+ ***
1439
+
1440
+ ### toJSON()
1441
+
1442
+ > **toJSON**(): `any`
1443
+
1444
+ Defined in: [property-manager.js/src/abstract.d.ts:182](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L182)
1445
+
1446
+ #### Returns
1447
+
1448
+ `any`
1449
+
1450
+ ***
1451
+
1452
+ ### toLocaleString()
1453
+
1454
+ > **toLocaleString**(): `string`
1455
+
1456
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:131
1457
+
1458
+ Returns a date converted to a string using the current locale.
1459
+
1460
+ #### Returns
1461
+
1462
+ `string`
1463
+
1464
+ ***
1465
+
1466
+ ### toObject()
1467
+
1468
+ > **toObject**(`options`?): `any`
1469
+
1470
+ Defined in: [property-manager.js/src/abstract.d.ts:181](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L181)
1471
+
1472
+ Convert the attributes to the json object
1473
+
1474
+ #### Parameters
1475
+
1476
+ ##### options?
1477
+
1478
+ `any`
1479
+
1480
+ #### Returns
1481
+
1482
+ `any`
1483
+
1484
+ the json object.
1485
+
1486
+ ***
1487
+
1488
+ ### toString()
1489
+
1490
+ > **toString**(): `string`
1491
+
1492
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:128
1493
+
1494
+ Returns a string representation of an object.
1495
+
1496
+ #### Returns
1497
+
1498
+ `string`
1499
+
1500
+ ***
1501
+
1502
+ ### unregister()
1503
+
1504
+ > **unregister**(): `any`
1505
+
1506
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:619](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L619)
1507
+
1508
+ Removes the current `ToolFunc` instance from the static registry.
1509
+
1510
+ #### Returns
1511
+
1512
+ `any`
1513
+
1514
+ The instance that was unregistered.
1515
+
1516
+ ***
1517
+
1518
+ ### valueOf()
1519
+
1520
+ > **valueOf**(): `Object`
1521
+
1522
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:134
1523
+
1524
+ Returns the primitive value of the specified object.
1525
+
1526
+ #### Returns
1527
+
1528
+ `Object`
1529
+
1530
+ ***
1531
+
1532
+ ### assign()
1533
+
1534
+ #### Call Signature
1535
+
1536
+ > `static` **assign**\<`T`, `U`\>(`target`, `source`): `T` & `U`
1537
+
1538
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:286
1539
+
1540
+ Copy the values of all of the enumerable own properties from one or more source objects to a
1541
+ target object. Returns the target object.
1542
+
1543
+ ##### Type Parameters
1544
+
1545
+ • **T** *extends* `object`
1546
+
1547
+ • **U**
1548
+
1549
+ ##### Parameters
1550
+
1551
+ ###### target
1552
+
1553
+ `T`
1554
+
1555
+ The target object to copy to.
1556
+
1557
+ ###### source
1558
+
1559
+ `U`
1560
+
1561
+ The source object from which to copy properties.
1562
+
1563
+ ##### Returns
1564
+
1565
+ `T` & `U`
1566
+
1567
+ #### Call Signature
1568
+
1569
+ > `static` **assign**\<`T`, `U`, `V`\>(`target`, `source1`, `source2`): `T` & `U` & `V`
1570
+
1571
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:295
1572
+
1573
+ Copy the values of all of the enumerable own properties from one or more source objects to a
1574
+ target object. Returns the target object.
1575
+
1576
+ ##### Type Parameters
1577
+
1578
+ • **T** *extends* `object`
1579
+
1580
+ • **U**
1581
+
1582
+ • **V**
1583
+
1584
+ ##### Parameters
1585
+
1586
+ ###### target
1587
+
1588
+ `T`
1589
+
1590
+ The target object to copy to.
1591
+
1592
+ ###### source1
1593
+
1594
+ `U`
1595
+
1596
+ The first source object from which to copy properties.
1597
+
1598
+ ###### source2
1599
+
1600
+ `V`
1601
+
1602
+ The second source object from which to copy properties.
1603
+
1604
+ ##### Returns
1605
+
1606
+ `T` & `U` & `V`
1607
+
1608
+ #### Call Signature
1609
+
1610
+ > `static` **assign**\<`T`, `U`, `V`, `W`\>(`target`, `source1`, `source2`, `source3`): `T` & `U` & `V` & `W`
1611
+
1612
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:305
1613
+
1614
+ Copy the values of all of the enumerable own properties from one or more source objects to a
1615
+ target object. Returns the target object.
1616
+
1617
+ ##### Type Parameters
1618
+
1619
+ • **T** *extends* `object`
1620
+
1621
+ • **U**
1622
+
1623
+ • **V**
1624
+
1625
+ • **W**
1626
+
1627
+ ##### Parameters
1628
+
1629
+ ###### target
1630
+
1631
+ `T`
1632
+
1633
+ The target object to copy to.
1634
+
1635
+ ###### source1
1636
+
1637
+ `U`
1638
+
1639
+ The first source object from which to copy properties.
1640
+
1641
+ ###### source2
1642
+
1643
+ `V`
1644
+
1645
+ The second source object from which to copy properties.
1646
+
1647
+ ###### source3
1648
+
1649
+ `W`
1650
+
1651
+ The third source object from which to copy properties.
1652
+
1653
+ ##### Returns
1654
+
1655
+ `T` & `U` & `V` & `W`
1656
+
1657
+ #### Call Signature
1658
+
1659
+ > `static` **assign**(`target`, ...`sources`): `any`
1660
+
1661
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:313
1662
+
1663
+ Copy the values of all of the enumerable own properties from one or more source objects to a
1664
+ target object. Returns the target object.
1665
+
1666
+ ##### Parameters
1667
+
1668
+ ###### target
1669
+
1670
+ `object`
1671
+
1672
+ The target object to copy to.
1673
+
1674
+ ###### sources
1675
+
1676
+ ...`any`[]
1677
+
1678
+ One or more source objects from which to copy properties
1679
+
1680
+ ##### Returns
1681
+
1682
+ `any`
1683
+
1684
+ ***
1685
+
1686
+ ### create()
1687
+
1688
+ #### Call Signature
1689
+
1690
+ > `static` **create**(`o`): `any`
1691
+
1692
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:188
1693
+
1694
+ Creates an object that has the specified prototype or that has null prototype.
1695
+
1696
+ ##### Parameters
1697
+
1698
+ ###### o
1699
+
1700
+ Object to use as a prototype. May be null.
1701
+
1702
+ `null` | `object`
1703
+
1704
+ ##### Returns
1705
+
1706
+ `any`
1707
+
1708
+ #### Call Signature
1709
+
1710
+ > `static` **create**(`o`, `properties`): `any`
1711
+
1712
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:195
1713
+
1714
+ Creates an object that has the specified prototype, and that optionally contains specified properties.
1715
+
1716
+ ##### Parameters
1717
+
1718
+ ###### o
1719
+
1720
+ Object to use as a prototype. May be null
1721
+
1722
+ `null` | `object`
1723
+
1724
+ ###### properties
1725
+
1726
+ `PropertyDescriptorMap` & `ThisType`\<`any`\>
1727
+
1728
+ JavaScript object that contains one or more property descriptors.
1729
+
1730
+ ##### Returns
1731
+
1732
+ `any`
1733
+
1734
+ ***
1735
+
1736
+ ### defineProperties()
1737
+
1738
+ > `static` **defineProperties**(`aTarget`, `aProperties`, `recreate`?): `any`
1739
+
1740
+ Defined in: [property-manager.js/src/advance.d.ts:11](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/advance.d.ts#L11)
1741
+
1742
+ Adds one or more properties to an object, and/or modifies attributes of existing properties.
1743
+
1744
+ #### Parameters
1745
+
1746
+ ##### aTarget
1747
+
1748
+ `any`
1749
+
1750
+ ##### aProperties
1751
+
1752
+ `PropDescriptors`
1753
+
1754
+ ##### recreate?
1755
+
1756
+ `boolean`
1757
+
1758
+ #### Returns
1759
+
1760
+ `any`
1761
+
1762
+ ***
1763
+
1764
+ ### defineProperty()
1765
+
1766
+ > `static` **defineProperty**\<`T`\>(`o`, `p`, `attributes`): `T`
1767
+
1768
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:203
1769
+
1770
+ Adds a property to an object, or modifies attributes of an existing property.
1771
+
1772
+ #### Type Parameters
1773
+
1774
+ • **T**
1775
+
1776
+ #### Parameters
1777
+
1778
+ ##### o
1779
+
1780
+ `T`
1781
+
1782
+ Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object.
1783
+
1784
+ ##### p
1785
+
1786
+ `PropertyKey`
1787
+
1788
+ The property name.
1789
+
1790
+ ##### attributes
1791
+
1792
+ `PropertyDescriptor` & `ThisType`\<`any`\>
1793
+
1794
+ Descriptor for the property. It can be for a data property or an accessor property.
1795
+
1796
+ #### Returns
1797
+
1798
+ `T`
1799
+
1800
+ ***
1801
+
1802
+ ### entries()
1803
+
1804
+ #### Call Signature
1805
+
1806
+ > `static` **entries**\<`T`\>(`o`): \[`string`, `T`\][]
1807
+
1808
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:36
1809
+
1810
+ Returns an array of key/values of the enumerable own properties of an object
1811
+
1812
+ ##### Type Parameters
1813
+
1814
+ • **T**
1815
+
1816
+ ##### Parameters
1817
+
1818
+ ###### o
1819
+
1820
+ Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
1821
+
1822
+ \{\} | `ArrayLike`\<`T`\>
1823
+
1824
+ ##### Returns
1825
+
1826
+ \[`string`, `T`\][]
1827
+
1828
+ #### Call Signature
1829
+
1830
+ > `static` **entries**(`o`): \[`string`, `any`\][]
1831
+
1832
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:42
1833
+
1834
+ Returns an array of key/values of the enumerable own properties of an object
1835
+
1836
+ ##### Parameters
1837
+
1838
+ ###### o
1839
+
1840
+ Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
1841
+
1842
+ ##### Returns
1843
+
1844
+ \[`string`, `any`\][]
1845
+
1846
+ ***
1847
+
1848
+ ### freeze()
1849
+
1850
+ #### Call Signature
1851
+
1852
+ > `static` **freeze**\<`T`\>(`f`): `T`
1853
+
1854
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:222
1855
+
1856
+ Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
1857
+
1858
+ ##### Type Parameters
1859
+
1860
+ • **T** *extends* `Function`
1861
+
1862
+ ##### Parameters
1863
+
1864
+ ###### f
1865
+
1866
+ `T`
1867
+
1868
+ Object on which to lock the attributes.
1869
+
1870
+ ##### Returns
1871
+
1872
+ `T`
1873
+
1874
+ #### Call Signature
1875
+
1876
+ > `static` **freeze**\<`T`, `U`\>(`o`): `Readonly`\<`T`\>
1877
+
1878
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:228
1879
+
1880
+ Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
1881
+
1882
+ ##### Type Parameters
1883
+
1884
+ • **T** *extends* `object`
1885
+
1886
+ • **U** *extends* `string` \| `number` \| `bigint` \| `boolean` \| `symbol`
1887
+
1888
+ ##### Parameters
1889
+
1890
+ ###### o
1891
+
1892
+ `T`
1893
+
1894
+ Object on which to lock the attributes.
1895
+
1896
+ ##### Returns
1897
+
1898
+ `Readonly`\<`T`\>
1899
+
1900
+ #### Call Signature
1901
+
1902
+ > `static` **freeze**\<`T`\>(`o`): `Readonly`\<`T`\>
1903
+
1904
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:234
1905
+
1906
+ Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
1907
+
1908
+ ##### Type Parameters
1909
+
1910
+ • **T**
1911
+
1912
+ ##### Parameters
1913
+
1914
+ ###### o
1915
+
1916
+ `T`
1917
+
1918
+ Object on which to lock the attributes.
1919
+
1920
+ ##### Returns
1921
+
1922
+ `Readonly`\<`T`\>
1923
+
1924
+ ***
1925
+
1926
+ ### fromEntries()
1927
+
1928
+ #### Call Signature
1929
+
1930
+ > `static` **fromEntries**\<`T`\>(`entries`): `object`
1931
+
1932
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2019.object.d.ts:26
1933
+
1934
+ Returns an object created by key-value entries for properties and methods
1935
+
1936
+ ##### Type Parameters
1937
+
1938
+ • **T** = `any`
1939
+
1940
+ ##### Parameters
1941
+
1942
+ ###### entries
1943
+
1944
+ `Iterable`\<readonly \[`PropertyKey`, `T`\]\>
1945
+
1946
+ An iterable object that contains key-value entries for properties and methods.
1947
+
1948
+ ##### Returns
1949
+
1950
+ `object`
1951
+
1952
+ #### Call Signature
1953
+
1954
+ > `static` **fromEntries**(`entries`): `any`
1955
+
1956
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2019.object.d.ts:32
1957
+
1958
+ Returns an object created by key-value entries for properties and methods
1959
+
1960
+ ##### Parameters
1961
+
1962
+ ###### entries
1963
+
1964
+ `Iterable`\<readonly `any`[]\>
1965
+
1966
+ An iterable object that contains key-value entries for properties and methods.
1967
+
1968
+ ##### Returns
1969
+
1970
+ `any`
1971
+
1972
+ ***
1973
+
1974
+ ### get()
1975
+
1976
+ > `static` **get**(`name`): [`ToolFunc`](ToolFunc.md)
1977
+
1978
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:319](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L319)
1979
+
1980
+ Retrieves a registered function by its name or alias.
1981
+
1982
+ #### Parameters
1983
+
1984
+ ##### name
1985
+
1986
+ `string`
1987
+
1988
+ The name or alias of the function to retrieve.
1989
+
1990
+ #### Returns
1991
+
1992
+ [`ToolFunc`](ToolFunc.md)
1993
+
1994
+ The `ToolFunc` instance if found, otherwise `undefined`.
1995
+
1996
+ ***
1997
+
1998
+ ### getAllByTag()
1999
+
2000
+ > `static` **getAllByTag**(`tagName`): [`ToolFunc`](ToolFunc.md)[]
2001
+
2002
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:365](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L365)
2003
+
2004
+ Retrieves all registered functions that have a specific tag.
2005
+
2006
+ #### Parameters
2007
+
2008
+ ##### tagName
2009
+
2010
+ `string`
2011
+
2012
+ The tag to search for.
2013
+
2014
+ #### Returns
2015
+
2016
+ [`ToolFunc`](ToolFunc.md)[]
2017
+
2018
+ An array of matching `ToolFunc` instances.
2019
+
2020
+ ***
2021
+
2022
+ ### getByTag()
2023
+
2024
+ > `static` **getByTag**(`tagName`): `undefined` \| [`ToolFunc`](ToolFunc.md)
2025
+
2026
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:340](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L340)
2027
+
2028
+ Finds the first registered function that has a specific tag.
2029
+
2030
+ #### Parameters
2031
+
2032
+ ##### tagName
2033
+
2034
+ `string`
2035
+
2036
+ The tag to search for.
2037
+
2038
+ #### Returns
2039
+
2040
+ `undefined` \| [`ToolFunc`](ToolFunc.md)
2041
+
2042
+ The first matching `ToolFunc` instance, or `undefined` if none is found.
2043
+
2044
+ ***
2045
+
2046
+ ### getFunc()
2047
+
2048
+ > `static` **getFunc**(`name`): `any`
2049
+
2050
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:431](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L431)
2051
+
2052
+ Retrieves a bound, runnable function reference for a registered function.
2053
+ This reference is suitable for execution with an object of named parameters.
2054
+
2055
+ #### Parameters
2056
+
2057
+ ##### name
2058
+
2059
+ `string`
2060
+
2061
+ The name of the function.
2062
+
2063
+ #### Returns
2064
+
2065
+ `any`
2066
+
2067
+ A bound function reference, or `undefined` if not found.
2068
+
2069
+ ***
2070
+
2071
+ ### getFuncWithPos()
2072
+
2073
+ > `static` **getFuncWithPos**(`name`): `any`
2074
+
2075
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:472](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L472)
2076
+
2077
+ Retrieves a bound, runnable function reference for a registered function.
2078
+ This reference is suitable for execution with positional arguments.
2079
+
2080
+ #### Parameters
2081
+
2082
+ ##### name
2083
+
2084
+ `string`
2085
+
2086
+ The name of the function.
2087
+
2088
+ #### Returns
2089
+
2090
+ `any`
2091
+
2092
+ A bound function reference, or `undefined` if not found.
2093
+
2094
+ ***
2095
+
2096
+ ### getOwnPropertyDescriptor()
2097
+
2098
+ > `static` **getOwnPropertyDescriptor**(`o`, `p`): `undefined` \| `PropertyDescriptor`
2099
+
2100
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:175
2101
+
2102
+ Gets the own property descriptor of the specified object.
2103
+ An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.
2104
+
2105
+ #### Parameters
2106
+
2107
+ ##### o
2108
+
2109
+ `any`
2110
+
2111
+ Object that contains the property.
2112
+
2113
+ ##### p
2114
+
2115
+ `PropertyKey`
2116
+
2117
+ Name of the property.
2118
+
2119
+ #### Returns
2120
+
2121
+ `undefined` \| `PropertyDescriptor`
2122
+
2123
+ ***
2124
+
2125
+ ### getOwnPropertyDescriptors()
2126
+
2127
+ > `static` **getOwnPropertyDescriptors**\<`T`\>(`o`): \{ \[P in string \| number \| symbol\]: TypedPropertyDescriptor\<T\[P\]\> \} & `object`
2128
+
2129
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:48
2130
+
2131
+ Returns an object containing all own property descriptors of an object
2132
+
2133
+ #### Type Parameters
2134
+
2135
+ • **T**
2136
+
2137
+ #### Parameters
2138
+
2139
+ ##### o
2140
+
2141
+ `T`
2142
+
2143
+ Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
2144
+
2145
+ #### Returns
2146
+
2147
+ \{ \[P in string \| number \| symbol\]: TypedPropertyDescriptor\<T\[P\]\> \} & `object`
2148
+
2149
+ ***
2150
+
2151
+ ### getOwnPropertyNames()
2152
+
2153
+ > `static` **getOwnPropertyNames**(`o`): `string`[]
2154
+
2155
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:182
2156
+
2157
+ Returns the names of the own properties of an object. The own properties of an object are those that are defined directly
2158
+ on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.
2159
+
2160
+ #### Parameters
2161
+
2162
+ ##### o
2163
+
2164
+ `any`
2165
+
2166
+ Object that contains the own properties.
2167
+
2168
+ #### Returns
2169
+
2170
+ `string`[]
2171
+
2172
+ ***
2173
+
2174
+ ### getOwnPropertySymbols()
2175
+
2176
+ > `static` **getOwnPropertySymbols**(`o`): `symbol`[]
2177
+
2178
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:319
2179
+
2180
+ Returns an array of all symbol properties found directly on object o.
2181
+
2182
+ #### Parameters
2183
+
2184
+ ##### o
2185
+
2186
+ `any`
2187
+
2188
+ Object to retrieve the symbols from.
2189
+
2190
+ #### Returns
2191
+
2192
+ `symbol`[]
2193
+
2194
+ ***
2195
+
2196
+ ### getProperties()
2197
+
2198
+ > `static` **getProperties**(): `PropDescriptors`
2199
+
2200
+ Defined in: [property-manager.js/src/advance.d.ts:10](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/advance.d.ts#L10)
2201
+
2202
+ get all properties descriptor include inherited.
2203
+
2204
+ #### Returns
2205
+
2206
+ `PropDescriptors`
2207
+
2208
+ ***
2209
+
2210
+ ### getPrototypeOf()
2211
+
2212
+ > `static` **getPrototypeOf**(`o`): `any`
2213
+
2214
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:167
2215
+
2216
+ Returns the prototype of an object.
2217
+
2218
+ #### Parameters
2219
+
2220
+ ##### o
2221
+
2222
+ `any`
2223
+
2224
+ The object that references the prototype.
2225
+
2226
+ #### Returns
2227
+
2228
+ `any`
2229
+
2230
+ ***
2231
+
2232
+ ### hasAsyncFeature()
2233
+
2234
+ > `static` **hasAsyncFeature**(`feature`): `boolean`
2235
+
2236
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:388](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L388)
2237
+
2238
+ Checks if any registered function has a specific asynchronous feature.
2239
+
2240
+ #### Parameters
2241
+
2242
+ ##### feature
2243
+
2244
+ [`AsyncFeatureBits`](../enumerations/AsyncFeatureBits.md)
2245
+
2246
+ The async feature bit to check for.
2247
+
2248
+ #### Returns
2249
+
2250
+ `boolean`
2251
+
2252
+ `true` if the feature is present in any function, otherwise `false`.
2253
+
2254
+ ***
2255
+
2256
+ ### hasOwn()
2257
+
2258
+ > `static` **hasOwn**(`o`, `v`): `boolean`
2259
+
2260
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2022.object.d.ts:25
2261
+
2262
+ Determines whether an object has a property with the specified name.
2263
+
2264
+ #### Parameters
2265
+
2266
+ ##### o
2267
+
2268
+ `object`
2269
+
2270
+ An object.
2271
+
2272
+ ##### v
2273
+
2274
+ `PropertyKey`
2275
+
2276
+ A property name.
2277
+
2278
+ #### Returns
2279
+
2280
+ `boolean`
2281
+
2282
+ ***
2283
+
2284
+ ### is()
2285
+
2286
+ > `static` **is**(`value1`, `value2`): `boolean`
2287
+
2288
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:332
2289
+
2290
+ Returns true if the values are the same value, false otherwise.
2291
+
2292
+ #### Parameters
2293
+
2294
+ ##### value1
2295
+
2296
+ `any`
2297
+
2298
+ The first value.
2299
+
2300
+ ##### value2
2301
+
2302
+ `any`
2303
+
2304
+ The second value.
2305
+
2306
+ #### Returns
2307
+
2308
+ `boolean`
2309
+
2310
+ ***
2311
+
2312
+ ### isExtensible()
2313
+
2314
+ > `static` **isExtensible**(`o`): `boolean`
2315
+
2316
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:258
2317
+
2318
+ Returns a value that indicates whether new properties can be added to an object.
2319
+
2320
+ #### Parameters
2321
+
2322
+ ##### o
2323
+
2324
+ `any`
2325
+
2326
+ Object to test.
2327
+
2328
+ #### Returns
2329
+
2330
+ `boolean`
2331
+
2332
+ ***
2333
+
2334
+ ### isFrozen()
2335
+
2336
+ > `static` **isFrozen**(`o`): `boolean`
2337
+
2338
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:252
2339
+
2340
+ Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.
2341
+
2342
+ #### Parameters
2343
+
2344
+ ##### o
2345
+
2346
+ `any`
2347
+
2348
+ Object to test.
2349
+
2350
+ #### Returns
2351
+
2352
+ `boolean`
2353
+
2354
+ ***
2355
+
2356
+ ### isSealed()
2357
+
2358
+ > `static` **isSealed**(`o`): `boolean`
2359
+
2360
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:246
2361
+
2362
+ Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.
2363
+
2364
+ #### Parameters
2365
+
2366
+ ##### o
2367
+
2368
+ `any`
2369
+
2370
+ Object to test.
2371
+
2372
+ #### Returns
2373
+
2374
+ `boolean`
2375
+
2376
+ ***
2377
+
2378
+ ### keys()
2379
+
2380
+ #### Call Signature
2381
+
2382
+ > `static` **keys**(`o`): `string`[]
2383
+
2384
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:264
2385
+
2386
+ Returns the names of the enumerable string properties and methods of an object.
2387
+
2388
+ ##### Parameters
2389
+
2390
+ ###### o
2391
+
2392
+ `object`
2393
+
2394
+ Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
2395
+
2396
+ ##### Returns
2397
+
2398
+ `string`[]
2399
+
2400
+ #### Call Signature
2401
+
2402
+ > `static` **keys**(`o`): `string`[]
2403
+
2404
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:325
2405
+
2406
+ Returns the names of the enumerable string properties and methods of an object.
2407
+
2408
+ ##### Parameters
2409
+
2410
+ ###### o
2411
+
2412
+ Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
2413
+
2414
+ ##### Returns
2415
+
2416
+ `string`[]
2417
+
2418
+ ***
2419
+
2420
+ ### list()
2421
+
2422
+ > `static` **list**(): [`Funcs`](../interfaces/Funcs.md)
2423
+
2424
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:331](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L331)
2425
+
2426
+ Returns the complete map of all registered functions.
2427
+
2428
+ #### Returns
2429
+
2430
+ [`Funcs`](../interfaces/Funcs.md)
2431
+
2432
+ The map of `ToolFunc` instances.
2433
+
2434
+ ***
2435
+
2436
+ ### preventExtensions()
2437
+
2438
+ > `static` **preventExtensions**\<`T`\>(`o`): `T`
2439
+
2440
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:240
2441
+
2442
+ Prevents the addition of new properties to an object.
2443
+
2444
+ #### Type Parameters
2445
+
2446
+ • **T**
2447
+
2448
+ #### Parameters
2449
+
2450
+ ##### o
2451
+
2452
+ `T`
2453
+
2454
+ Object to make non-extensible.
2455
+
2456
+ #### Returns
2457
+
2458
+ `T`
2459
+
2460
+ ***
2461
+
2462
+ ### register()
2463
+
2464
+ #### Call Signature
2465
+
2466
+ > `static` **register**(`name`, `options`): `boolean` \| [`ToolFunc`](ToolFunc.md)
2467
+
2468
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:495](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L495)
2469
+
2470
+ Registers a new tool function.
2471
+
2472
+ ##### Parameters
2473
+
2474
+ ###### name
2475
+
2476
+ `string`
2477
+
2478
+ The name of the function.
2479
+
2480
+ ###### options
2481
+
2482
+ [`FuncItem`](../interfaces/FuncItem.md)
2483
+
2484
+ The function's configuration.
2485
+
2486
+ ##### Returns
2487
+
2488
+ `boolean` \| [`ToolFunc`](ToolFunc.md)
2489
+
2490
+ The new `ToolFunc` instance, or `false` if a function with that name already exists.
2491
+
2492
+ The new `ToolFunc` instance, or `false` if a function with that name already exists.
2493
+
2494
+ The new `ToolFunc` instance, or `false` if a function with that name already exists.
2495
+
2496
+ #### Call Signature
2497
+
2498
+ > `static` **register**(`func`, `options`): `boolean` \| [`ToolFunc`](ToolFunc.md)
2499
+
2500
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:496](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L496)
2501
+
2502
+ Registers a new tool function.
2503
+
2504
+ ##### Parameters
2505
+
2506
+ ###### func
2507
+
2508
+ `Function`
2509
+
2510
+ The function implementation.
2511
+
2512
+ ###### options
2513
+
2514
+ [`FuncItem`](../interfaces/FuncItem.md)
2515
+
2516
+ The function's configuration.
2517
+
2518
+ ##### Returns
2519
+
2520
+ `boolean` \| [`ToolFunc`](ToolFunc.md)
2521
+
2522
+ The new `ToolFunc` instance, or `false` if a function with that name already exists.
2523
+
2524
+ The new `ToolFunc` instance, or `false` if a function with that name already exists.
2525
+
2526
+ The new `ToolFunc` instance, or `false` if a function with that name already exists.
2527
+
2528
+ #### Call Signature
2529
+
2530
+ > `static` **register**(`name`, `options`?): `boolean` \| [`ToolFunc`](ToolFunc.md)
2531
+
2532
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:497](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L497)
2533
+
2534
+ Registers a new tool function.
2535
+
2536
+ ##### Parameters
2537
+
2538
+ ###### name
2539
+
2540
+ The name of the function.
2541
+
2542
+ `string` | `Function` | [`ToolFunc`](ToolFunc.md) | [`FuncItem`](../interfaces/FuncItem.md)
2543
+
2544
+ ###### options?
2545
+
2546
+ [`FuncItem`](../interfaces/FuncItem.md)
2547
+
2548
+ The function's configuration.
2549
+
2550
+ ##### Returns
2551
+
2552
+ `boolean` \| [`ToolFunc`](ToolFunc.md)
2553
+
2554
+ The new `ToolFunc` instance, or `false` if a function with that name already exists.
2555
+
2556
+ The new `ToolFunc` instance, or `false` if a function with that name already exists.
2557
+
2558
+ The new `ToolFunc` instance, or `false` if a function with that name already exists.
2559
+
2560
+ ***
2561
+
2562
+ ### run()
2563
+
2564
+ > `static` **run**(`name`, `params`?): `Promise`\<`any`\>
2565
+
2566
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:402](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L402)
2567
+
2568
+ Asynchronously executes a registered function by name with named parameters.
2569
+
2570
+ #### Parameters
2571
+
2572
+ ##### name
2573
+
2574
+ `string`
2575
+
2576
+ The name of the function to run.
2577
+
2578
+ ##### params?
2579
+
2580
+ `any`
2581
+
2582
+ The parameters object for the function.
2583
+
2584
+ #### Returns
2585
+
2586
+ `Promise`\<`any`\>
2587
+
2588
+ A promise that resolves with the function's result.
2589
+
2590
+ #### Throws
2591
+
2592
+ If the function with the given name is not found.
2593
+
2594
+ ***
2595
+
2596
+ ### runSync()
2597
+
2598
+ > `static` **runSync**(`name`, `params`?): `any`
2599
+
2600
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:417](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L417)
2601
+
2602
+ Synchronously executes a registered function by name with named parameters.
2603
+
2604
+ #### Parameters
2605
+
2606
+ ##### name
2607
+
2608
+ `string`
2609
+
2610
+ The name of the function to run.
2611
+
2612
+ ##### params?
2613
+
2614
+ `any`
2615
+
2616
+ The parameters object for the function.
2617
+
2618
+ #### Returns
2619
+
2620
+ `any`
2621
+
2622
+ The result of the function's execution.
2623
+
2624
+ #### Throws
2625
+
2626
+ If the function with the given name is not found.
2627
+
2628
+ ***
2629
+
2630
+ ### runWithPos()
2631
+
2632
+ > `static` **runWithPos**(`name`, ...`params`): `Promise`\<`any`\>
2633
+
2634
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:443](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L443)
2635
+
2636
+ Asynchronously executes a function using positional arguments.
2637
+
2638
+ #### Parameters
2639
+
2640
+ ##### name
2641
+
2642
+ `string`
2643
+
2644
+ The name of the function to run.
2645
+
2646
+ ##### params
2647
+
2648
+ ...`any`[]
2649
+
2650
+ Positional arguments to pass to the function.
2651
+
2652
+ #### Returns
2653
+
2654
+ `Promise`\<`any`\>
2655
+
2656
+ A promise that resolves with the function's result.
2657
+
2658
+ #### Throws
2659
+
2660
+ If the function with the given name is not found.
2661
+
2662
+ ***
2663
+
2664
+ ### runWithPosSync()
2665
+
2666
+ > `static` **runWithPosSync**(`name`, ...`params`): `any`
2667
+
2668
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:458](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L458)
2669
+
2670
+ Synchronously executes a function using positional arguments.
2671
+
2672
+ #### Parameters
2673
+
2674
+ ##### name
2675
+
2676
+ `string`
2677
+
2678
+ The name of the function to run.
2679
+
2680
+ ##### params
2681
+
2682
+ ...`any`[]
2683
+
2684
+ Positional arguments to pass to the function.
2685
+
2686
+ #### Returns
2687
+
2688
+ `any`
2689
+
2690
+ The result of the function's execution.
2691
+
2692
+ #### Throws
2693
+
2694
+ If the function with the given name is not found.
2695
+
2696
+ ***
2697
+
2698
+ ### seal()
2699
+
2700
+ > `static` **seal**\<`T`\>(`o`): `T`
2701
+
2702
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:216
2703
+
2704
+ Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
2705
+
2706
+ #### Type Parameters
2707
+
2708
+ • **T**
2709
+
2710
+ #### Parameters
2711
+
2712
+ ##### o
2713
+
2714
+ `T`
2715
+
2716
+ Object on which to lock the attributes.
2717
+
2718
+ #### Returns
2719
+
2720
+ `T`
2721
+
2722
+ ***
2723
+
2724
+ ### setApiRoot()
2725
+
2726
+ > `static` **setApiRoot**(`v`): `void`
2727
+
2728
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/server-tools.ts:61](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/server-tools.ts#L61)
2729
+
2730
+ #### Parameters
2731
+
2732
+ ##### v
2733
+
2734
+ `string`
2735
+
2736
+ #### Returns
2737
+
2738
+ `void`
2739
+
2740
+ ***
2741
+
2742
+ ### setPrototypeOf()
2743
+
2744
+ > `static` **setPrototypeOf**(`o`, `proto`): `any`
2745
+
2746
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:339
2747
+
2748
+ Sets the prototype of a specified object o to object proto or null. Returns the object o.
2749
+
2750
+ #### Parameters
2751
+
2752
+ ##### o
2753
+
2754
+ `any`
2755
+
2756
+ The object to change its prototype.
2757
+
2758
+ ##### proto
2759
+
2760
+ The value of the new prototype or null.
2761
+
2762
+ `null` | `object`
2763
+
2764
+ #### Returns
2765
+
2766
+ `any`
2767
+
2768
+ ***
2769
+
2770
+ ### toJSON()
2771
+
2772
+ > `static` **toJSON**(): `object`
2773
+
2774
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/server-tools.ts:74](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/server-tools.ts#L74)
2775
+
2776
+ Serializes all registered `ServerTools` instances into a JSON object.
2777
+ This method is typically called by a transport's discovery endpoint.
2778
+
2779
+ It filters for tools that are instances of `ServerTools` or marked as `isApi`.
2780
+ It omits the `func` body from the output unless `allowExportFunc` is true.
2781
+
2782
+ #### Returns
2783
+
2784
+ `object`
2785
+
2786
+ A map of serializable tool definitions.
2787
+
2788
+ ***
2789
+
2790
+ ### unregister()
2791
+
2792
+ > `static` **unregister**(`name`): `undefined` \| [`ToolFunc`](ToolFunc.md)
2793
+
2794
+ Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:547](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L547)
2795
+
2796
+ Unregisters a function by its name, also removing any associated aliases.
2797
+
2798
+ #### Parameters
2799
+
2800
+ ##### name
2801
+
2802
+ `string`
2803
+
2804
+ The name of the function to unregister.
2805
+
2806
+ #### Returns
2807
+
2808
+ `undefined` \| [`ToolFunc`](ToolFunc.md)
2809
+
2810
+ The unregistered `ToolFunc` instance, or `undefined` if it was not found.
2811
+
2812
+ ***
2813
+
2814
+ ### values()
2815
+
2816
+ #### Call Signature
2817
+
2818
+ > `static` **values**\<`T`\>(`o`): `T`[]
2819
+
2820
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:24
2821
+
2822
+ Returns an array of values of the enumerable own properties of an object
2823
+
2824
+ ##### Type Parameters
2825
+
2826
+ • **T**
2827
+
2828
+ ##### Parameters
2829
+
2830
+ ###### o
2831
+
2832
+ Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
2833
+
2834
+ \{\} | `ArrayLike`\<`T`\>
2835
+
2836
+ ##### Returns
2837
+
2838
+ `T`[]
2839
+
2840
+ #### Call Signature
2841
+
2842
+ > `static` **values**(`o`): `any`[]
2843
+
2844
+ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:30
2845
+
2846
+ Returns an array of values of the enumerable own properties of an object
2847
+
2848
+ ##### Parameters
2849
+
2850
+ ###### o
2851
+
2852
+ Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
2853
+
2854
+ ##### Returns
2855
+
2856
+ `any`[]