@isdk/ai-tool 0.6.0 → 0.7.1

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