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