@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.
- package/README.cn.md +103 -237
- package/README.md +101 -186
- package/dist/chunk-4XRPAC7C.mjs +1 -0
- package/dist/chunk-VIG2GB47.mjs +1 -1
- package/dist/funcs.d.mts +1 -1
- package/dist/funcs.d.ts +1 -1
- package/dist/funcs.js +1 -1
- package/dist/funcs.mjs +1 -1
- package/dist/index-DEUnmyUq.d.mts +1792 -0
- package/dist/index-DEUnmyUq.d.ts +1792 -0
- package/dist/index.d.mts +1068 -9
- package/dist/index.d.ts +1068 -9
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/test/util.js +1 -1
- package/docs/api/README.md +165 -0
- package/docs/{_media → api/_media}/CONTRIBUTING.md +3 -3
- package/docs/api/_media/pubsub.md +326 -0
- package/docs/api/_media/server_client_tools.md +88 -0
- package/docs/api/_media/toolFunc.md +183 -0
- package/docs/api/_media/transport.md +137 -0
- package/docs/{classes → api/classes}/AbortError.md +139 -54
- package/docs/api/classes/AlreadyExistsError.md +431 -0
- package/docs/api/classes/BaseError.md +440 -0
- package/docs/{classes → api/classes}/BinarySemaphore.md +25 -25
- package/docs/{classes → api/classes}/CancelableAbility.md +25 -25
- package/docs/api/classes/ClientToolTransport.md +310 -0
- package/docs/{classes → api/classes}/ClientTools.md +646 -180
- package/docs/{classes → api/classes}/CommonError.md +139 -54
- package/docs/{classes → api/classes}/ConfigFile.md +54 -5
- package/docs/{classes → api/classes}/EnvPromptTemplate.md +94 -48
- package/docs/{classes → api/classes}/EventClient.md +742 -234
- package/docs/{classes → api/classes}/EventEmitter.md +12 -12
- package/docs/{classes → api/classes}/EventServer.md +670 -209
- package/docs/{classes → api/classes}/EventToolFunc.md +561 -109
- package/docs/{classes → api/classes}/FStringPromptTemplate.md +94 -48
- package/docs/{classes → api/classes}/FewShotPromptTemplate.md +100 -52
- package/docs/{classes → api/classes}/GolangPromptTemplate.md +99 -53
- package/docs/api/classes/HttpClientToolTransport.md +324 -0
- package/docs/api/classes/HttpServerToolTransport.md +332 -0
- package/docs/{classes → api/classes}/IntSet.md +12 -12
- package/docs/{classes → api/classes}/LRUCache.md +26 -26
- package/docs/api/classes/NotFoundError.md +431 -0
- package/docs/api/classes/NotImplementationError.md +431 -0
- package/docs/{classes → api/classes}/PromptExampleSelector.md +9 -9
- package/docs/{classes → api/classes}/PromptTemplate.md +91 -47
- package/docs/api/classes/ReadableStreamError.md +451 -0
- package/docs/api/classes/ResClientTools.md +3365 -0
- package/docs/api/classes/ResServerTools.md +3342 -0
- package/docs/api/classes/RpcMethodsClientTool.md +3275 -0
- package/docs/api/classes/RpcMethodsServerTool.md +3224 -0
- package/docs/api/classes/SSEChannel.md +272 -0
- package/docs/{classes → api/classes}/Semaphore.md +26 -26
- package/docs/api/classes/ServerToolTransport.md +323 -0
- package/docs/{classes → api/classes}/ServerTools.md +583 -120
- package/docs/{classes → api/classes}/SignalGate.md +9 -9
- package/docs/api/classes/SseClientPubSubTransport.md +92 -0
- package/docs/api/classes/SseServerPubSubTransport.md +234 -0
- package/docs/{classes → api/classes}/TaskAbortController.md +9 -9
- package/docs/api/classes/ToolFunc.md +2665 -0
- package/docs/api/classes/ToolTransport.md +143 -0
- package/docs/api/classes/YamlTypeBaseObject.md +31 -0
- package/docs/api/enumerations/AsyncFeatureBits.md +33 -0
- package/docs/api/enumerations/AsyncFeatures.md +33 -0
- package/docs/api/enumerations/ErrorCode.md +177 -0
- package/docs/api/enumerations/HashAlgorithm.md +97 -0
- package/docs/{functions → api/functions}/AIArgProcessor.md +1 -1
- package/docs/{functions → api/functions}/AIStream.md +1 -1
- package/docs/{functions → api/functions}/ChoiceArgProcessor.md +1 -1
- package/docs/api/functions/DefaultDateFormat.md +21 -0
- package/docs/{functions → api/functions}/ObjectArgsToArgsInfo.md +1 -1
- package/docs/{functions → api/functions}/RateLimit.md +1 -1
- package/docs/{functions → api/functions}/TemplateArgProcessor.md +1 -1
- package/docs/api/functions/addDate.md +71 -0
- package/docs/{functions → api/functions}/assignDirs.md +1 -1
- package/docs/{functions → api/functions}/backendEventable.md +1 -1
- package/docs/{functions → api/functions}/beforeShutdown.md +1 -1
- package/docs/api/functions/calcPerplexity.md +60 -0
- package/docs/api/functions/calcPerplexitySimple.md +42 -0
- package/docs/api/functions/canonicalize.md +33 -0
- package/docs/{functions → api/functions}/completeSentences.md +1 -1
- package/docs/{functions → api/functions}/concatText.md +1 -1
- package/docs/{functions → api/functions}/countLLMTokens.md +1 -1
- package/docs/{functions → api/functions}/countRegexMatches.md +1 -1
- package/docs/{functions → api/functions}/createAbilityInjector.md +4 -4
- package/docs/{functions → api/functions}/createCallbacksTransformer.md +1 -1
- package/docs/{functions → api/functions}/createEmptyReadableStream.md +1 -1
- package/docs/{functions → api/functions}/createEndWithRepetitionDetector.md +1 -1
- package/docs/{functions → api/functions}/createError.md +1 -1
- package/docs/{functions → api/functions}/createEventStreamTransformer.md +1 -1
- package/docs/{functions → api/functions}/createHfValueFunc.md +1 -1
- package/docs/{functions → api/functions}/createLRUCache.md +1 -1
- package/docs/{functions → api/functions}/createYamlObjectTag.md +1 -1
- package/docs/{functions → api/functions}/dateToText.md +1 -1
- package/docs/{functions → api/functions}/decodeCharset.md +1 -1
- package/docs/api/functions/defaultsWithConcat.md +74 -0
- package/docs/{functions → api/functions}/detectCharset.md +1 -1
- package/docs/{functions → api/functions}/encodeLLMTokens.md +1 -1
- package/docs/{functions → api/functions}/ensureQuoted.md +1 -1
- package/docs/{functions → api/functions}/eventable.md +1 -1
- package/docs/{functions → api/functions}/expandConfig.md +1 -1
- package/docs/{functions → api/functions}/expandEnv.md +1 -1
- package/docs/{functions → api/functions}/expandObjEnv.md +1 -1
- package/docs/{functions → api/functions}/expandPath.md +1 -1
- package/docs/api/functions/expandPathInObject.md +29 -0
- package/docs/api/functions/expandPaths.md +25 -0
- package/docs/{functions → api/functions}/extNameLevel.md +1 -1
- package/docs/{functions → api/functions}/fileIsExists.md +1 -1
- package/docs/{functions → api/functions}/filterValidFnScope.md +1 -1
- package/docs/{functions → api/functions}/findIndexNonEmptyFrom.md +1 -1
- package/docs/{functions → api/functions}/findPort.md +1 -1
- package/docs/{functions → api/functions}/formatISO.md +1 -1
- package/docs/{functions → api/functions}/formatTextWithSpace.md +1 -1
- package/docs/api/functions/funcGetMeta.md +27 -0
- package/docs/api/functions/funcWithMeta.md +41 -0
- package/docs/api/functions/genUrlParamsStr.md +27 -0
- package/docs/{functions → api/functions}/getAllEnumKeys.md +1 -1
- package/docs/{functions → api/functions}/getConfigFileNames.md +1 -1
- package/docs/{functions → api/functions}/getConfigs.md +1 -1
- package/docs/{functions → api/functions}/getEnvVairables.md +1 -1
- package/docs/{functions → api/functions}/getFileMetaInfo.md +1 -1
- package/docs/{functions → api/functions}/getHashAlgoBySize.md +1 -1
- package/docs/{functions → api/functions}/getKeysPath.md +1 -1
- package/docs/{functions → api/functions}/getLLMTokenizer.md +1 -1
- package/docs/{functions → api/functions}/getMultiLevelExtname.md +1 -1
- package/docs/{functions → api/functions}/getPackageDir.md +1 -1
- package/docs/{functions → api/functions}/getRealFilepath.md +1 -1
- package/docs/{functions → api/functions}/getResponseErrorReadableStream.md +1 -1
- package/docs/{functions → api/functions}/getXDGConfigs.md +1 -1
- package/docs/{functions → api/functions}/hasDirectoryIn.md +1 -1
- package/docs/{functions → api/functions}/hash.md +1 -1
- package/docs/{functions → api/functions}/hashFile.md +1 -1
- package/docs/api/functions/hashObject.md +25 -0
- package/docs/{functions → api/functions}/hashStream.md +1 -1
- package/docs/api/functions/initShutdown.md +15 -0
- package/docs/{functions → api/functions}/isLangUsingSpaces.md +1 -1
- package/docs/{functions → api/functions}/isListItemString.md +1 -1
- package/docs/{functions → api/functions}/isModelNameMatched.md +1 -1
- package/docs/{functions → api/functions}/isPunctuationChar.md +1 -1
- package/docs/{functions → api/functions}/isQuoted.md +1 -1
- package/docs/{functions → api/functions}/isRegExp.md +1 -1
- package/docs/{functions → api/functions}/isSameString.md +1 -1
- package/docs/{functions → api/functions}/isSectionString.md +1 -1
- package/docs/{functions → api/functions}/isSentenceEnding.md +1 -1
- package/docs/{functions → api/functions}/isSepLineString.md +1 -1
- package/docs/{functions → api/functions}/isStrWrapped.md +1 -1
- package/docs/{functions → api/functions}/isSubdirectory.md +2 -2
- package/docs/{functions → api/functions}/isTitleString.md +1 -1
- package/docs/{functions → api/functions}/isValidFilename.md +1 -1
- package/docs/{functions → api/functions}/isValidFilepath.md +1 -1
- package/docs/{functions → api/functions}/isWebStream.md +1 -1
- package/docs/api/functions/joinSplitWords.md +46 -0
- package/docs/{functions → api/functions}/jsonFilterToWhere.md +1 -1
- package/docs/{functions → api/functions}/jsonToMarkdownStr.md +9 -1
- package/docs/{functions → api/functions}/loadAIConfig.md +1 -1
- package/docs/{functions → api/functions}/loadConfig.md +1 -1
- package/docs/{functions → api/functions}/loadConfigFile.md +1 -1
- package/docs/{functions → api/functions}/loadFileFromPaths.md +1 -1
- package/docs/{functions → api/functions}/loadTextFromPaths.md +1 -1
- package/docs/{functions → api/functions}/lrucache.md +1 -1
- package/docs/{functions → api/functions}/makeToolFuncCancelable.md +1 -1
- package/docs/{functions → api/functions}/matchUrlProtocol.md +1 -1
- package/docs/{functions → api/functions}/memoize.md +1 -1
- package/docs/api/functions/mergeArray.md +57 -0
- package/docs/{functions → api/functions}/messagesToText.md +1 -1
- package/docs/api/functions/normalizePath.md +21 -0
- package/docs/{functions → api/functions}/paramsSizeToScaleStr.md +1 -1
- package/docs/{functions → api/functions}/parseCommand.md +1 -1
- package/docs/{functions → api/functions}/parseDateFormat.md +1 -1
- package/docs/{functions → api/functions}/parseISO.md +1 -1
- package/docs/{functions → api/functions}/parseJsJson.md +1 -1
- package/docs/{functions → api/functions}/parseJsJsonSimpleSync.md +1 -1
- package/docs/{functions → api/functions}/parseObjectArgInfo.md +1 -1
- package/docs/{functions → api/functions}/parseObjectArgumentInfos.md +1 -1
- package/docs/{functions → api/functions}/parseObjectArguments.md +1 -1
- package/docs/{functions → api/functions}/parseObjectArgumentsAsArgInfos.md +1 -1
- package/docs/{functions → api/functions}/parseYaml.md +1 -1
- package/docs/api/functions/pruneSubdirectories.md +35 -0
- package/docs/api/functions/pruneSubdirectoriesInPlace.md +38 -0
- package/docs/{functions → api/functions}/quoteStr.md +1 -1
- package/docs/{functions → api/functions}/readFilenamesRecursiveSync.md +1 -1
- package/docs/{functions → api/functions}/readTextFileChunks.md +1 -1
- package/docs/{functions → api/functions}/readTextFileChunksEx.md +1 -1
- package/docs/{functions → api/functions}/readableFromAsyncIterable.md +1 -1
- package/docs/{functions → api/functions}/registerCoreTools.md +1 -1
- package/docs/{functions → api/functions}/registerYamlTag.md +1 -1
- package/docs/{functions → api/functions}/removeMarkdownBold.md +1 -1
- package/docs/{functions → api/functions}/removeMarkdownBoldAndItalic.md +1 -1
- package/docs/{functions → api/functions}/removeMarkdownItalic.md +1 -1
- package/docs/{functions → api/functions}/replaceWithPlaceholder.md +1 -1
- package/docs/{functions → api/functions}/restoreFromPlacehoders.md +1 -1
- package/docs/{functions → api/functions}/sanitizeFilename.md +1 -1
- package/docs/{functions → api/functions}/sanitizeFilepath.md +1 -1
- package/docs/{functions → api/functions}/saveConfigFile.md +1 -1
- package/docs/{functions → api/functions}/scaleStrToParamsSize.md +1 -1
- package/docs/{functions → api/functions}/shutdown.md +1 -1
- package/docs/{functions → api/functions}/simplifyObjectArguments.md +1 -1
- package/docs/api/functions/sleep.md +36 -0
- package/docs/{functions → api/functions}/sortedValues.md +1 -1
- package/docs/{functions → api/functions}/splitChunks.md +1 -1
- package/docs/{functions → api/functions}/splitParagraph.md +1 -1
- package/docs/{functions → api/functions}/splitSentence.md +1 -1
- package/docs/api/functions/splitWords.md +42 -0
- package/docs/{functions → api/functions}/stringifyYaml.md +1 -1
- package/docs/{functions → api/functions}/stripConsoleColor.md +1 -1
- package/docs/{functions → api/functions}/textToDate.md +1 -1
- package/docs/{functions → api/functions}/throwError.md +3 -3
- package/docs/{functions → api/functions}/toDate.md +1 -1
- package/docs/{functions → api/functions}/toDateTime.md +1 -1
- package/docs/{functions → api/functions}/toRegExp.md +1 -1
- package/docs/{functions → api/functions}/trimStartOfStreamHelper.md +1 -1
- package/docs/{functions → api/functions}/truncTo.md +1 -1
- package/docs/{functions → api/functions}/truncateByToken.md +1 -1
- package/docs/{functions → api/functions}/truncateToTokenLimit.md +1 -1
- package/docs/{functions → api/functions}/truncateToTokenLimitEx.md +1 -1
- package/docs/{functions → api/functions}/uuid.md +1 -1
- package/docs/{functions → api/functions}/uuidParse.md +1 -1
- package/docs/{functions → api/functions}/uuidStringify.md +1 -1
- package/docs/{functions → api/functions}/uuidValidate.md +1 -1
- package/docs/{functions → api/functions}/uuidVersion.md +1 -1
- package/docs/{functions → api/functions}/uuidv1.md +9 -5
- package/docs/{functions → api/functions}/uuidv4.md +9 -5
- package/docs/{functions → api/functions}/uuidv5.md +9 -5
- package/docs/api/functions/wait.md +45 -0
- package/docs/{functions → api/functions}/wrapEventEmitter.md +1 -1
- package/docs/{functions → api/functions}/xxhash.md +1 -1
- package/docs/{functions → api/functions}/xxhash32.md +1 -1
- package/docs/{functions → api/functions}/xxhash64.md +1 -1
- package/docs/{functions → api/functions}/xxhashAsStr.md +1 -1
- package/docs/api/functions/yieldExec.md +27 -0
- package/docs/{globals.md → api/globals.md} +50 -1
- package/docs/api/interfaces/AIChatAssistantMessageParam.md +129 -0
- package/docs/api/interfaces/AIChatContentPartImage.md +29 -0
- package/docs/api/interfaces/AIChatContentPartText.md +25 -0
- package/docs/api/interfaces/AIChatMessageParamBase.md +68 -0
- package/docs/api/interfaces/AIChatMessageToolCall.md +41 -0
- package/docs/{interfaces → api/interfaces}/AIChatSystemMessageParam.md +9 -9
- package/docs/api/interfaces/AIChatToolChoiceFuncObject.md +37 -0
- package/docs/api/interfaces/AIChatToolChoiceObject.md +25 -0
- package/docs/api/interfaces/AIChatToolFunc.md +41 -0
- package/docs/api/interfaces/AIChatToolFuncParam.md +37 -0
- package/docs/api/interfaces/AIChatToolMessageParam.md +113 -0
- package/docs/api/interfaces/AIChatToolParam.md +25 -0
- package/docs/api/interfaces/AIChatToolTypeObject.md +17 -0
- package/docs/api/interfaces/AIChatUserMessageParam.md +137 -0
- package/docs/api/interfaces/AIChoiceConfig.md +65 -0
- package/docs/api/interfaces/AIResult.md +65 -0
- package/docs/{interfaces → api/interfaces}/AIStreamParser.md +2 -2
- package/docs/api/interfaces/AIStreamParserOptions.md +21 -0
- package/docs/api/interfaces/BaseFunc.md +299 -0
- package/docs/api/interfaces/BaseFuncItem.md +221 -0
- package/docs/api/interfaces/BinarySemaphoreAcquireOptions.md +25 -0
- package/docs/api/interfaces/BinarySemaphoreOptions.md +57 -0
- package/docs/api/interfaces/BinarySemaphoreReleaseOptions.md +25 -0
- package/docs/api/interfaces/BinarySemaphoreReleaserFunc.md +37 -0
- package/docs/api/interfaces/CancelableAbilityOptions.md +113 -0
- package/docs/api/interfaces/ClientFuncItem.md +326 -0
- package/docs/api/interfaces/EventClientFuncParams.md +51 -0
- package/docs/api/interfaces/EventServerFuncParams.md +73 -0
- package/docs/{interfaces → api/interfaces}/FewShotPromptTemplateOptions.md +24 -12
- package/docs/api/interfaces/FuncItem.md +281 -0
- package/docs/api/interfaces/FuncParam.md +51 -0
- package/docs/api/interfaces/FuncParams.md +28 -0
- package/docs/api/interfaces/Funcs.md +15 -0
- package/docs/api/interfaces/HashAlgoParams.md +33 -0
- package/docs/api/interfaces/IClientToolTransport.md +155 -0
- package/docs/api/interfaces/IFileMetaInfo.md +65 -0
- package/docs/api/interfaces/IPubSubClientTransport.md +70 -0
- package/docs/api/interfaces/IPubSubServerTransport.md +241 -0
- package/docs/api/interfaces/IReadTextFileChunksOptions.md +143 -0
- package/docs/api/interfaces/IServerToolTransport.md +159 -0
- package/docs/api/interfaces/IToolTransport.md +73 -0
- package/docs/api/interfaces/ITruncateToTokenLimitOptions.md +99 -0
- package/docs/api/interfaces/JsonFilter.md +13 -0
- package/docs/api/interfaces/ParseObjectArgumentOptions.md +89 -0
- package/docs/api/interfaces/ProbabilityItem.md +41 -0
- package/docs/api/interfaces/PromptExampleSelectorOptions.md +34 -0
- package/docs/{interfaces → api/interfaces}/PromptTemplateOptions.md +15 -7
- package/docs/api/interfaces/PubSubClient.md +27 -0
- package/docs/api/interfaces/PubSubClientStream.md +196 -0
- package/docs/api/interfaces/PubSubServerSession.md +103 -0
- package/docs/api/interfaces/RemoteFuncItem.md +316 -0
- package/docs/api/interfaces/ReplacePlacehoderOptions.md +41 -0
- package/docs/api/interfaces/ResClientFuncParams.md +37 -0
- package/docs/api/interfaces/ResServerFuncParams.md +77 -0
- package/docs/api/interfaces/RpcMethodsClientFuncParams.md +25 -0
- package/docs/api/interfaces/RpcMethodsServerFuncParams.md +61 -0
- package/docs/api/interfaces/SanitizeFilenameOptions.md +25 -0
- package/docs/api/interfaces/SectionStringOptions.md +25 -0
- package/docs/api/interfaces/SemaphoreOptions.md +89 -0
- package/docs/api/interfaces/SemaphoreTaskItem.md +73 -0
- package/docs/api/interfaces/ServerFuncItem.md +339 -0
- package/docs/api/interfaces/ServerFuncParams.md +42 -0
- package/docs/api/interfaces/SplitSentenceOptions.md +41 -0
- package/docs/{interfaces → api/interfaces}/StreamCallbacksAndOptions.md +5 -5
- package/docs/{interfaces → api/interfaces}/TaskAbortControllers.md +1 -1
- package/docs/{interfaces → api/interfaces}/TaskPromise.md +6 -6
- package/docs/api/interfaces/ToolFuncPackage.md +57 -0
- package/docs/{namespaces → api/namespaces}/EventStates/variables/ABORT.md +1 -1
- package/docs/{namespaces → api/namespaces}/EventStates/variables/CONTINUE.md +1 -1
- package/docs/{namespaces → api/namespaces}/EventStates/variables/DONE.md +1 -1
- package/docs/{namespaces → api/namespaces}/EventStates/variables/STOPPED.md +1 -1
- package/docs/{namespaces → api/namespaces}/uuidv5/variables/DNS.md +1 -1
- package/docs/{namespaces → api/namespaces}/uuidv5/variables/URL.md +1 -1
- package/docs/{type-aliases → api/type-aliases}/AIChatContentPart.md +1 -1
- package/docs/{type-aliases → api/type-aliases}/AIChatMessageParam.md +1 -1
- package/docs/{type-aliases → api/type-aliases}/AIChatRole.md +1 -1
- package/docs/{type-aliases → api/type-aliases}/AIChatToolChoiceParam.md +1 -1
- package/docs/{type-aliases → api/type-aliases}/AIMessageType.md +1 -1
- package/docs/api/type-aliases/AIModelNameRule.md +14 -0
- package/docs/api/type-aliases/AIModelNameRuleFn.md +28 -0
- package/docs/api/type-aliases/AIModelNameRules.md +13 -0
- package/docs/{type-aliases → api/type-aliases}/AITextGenerationFinishReason.md +1 -1
- package/docs/api/type-aliases/ActionName.md +13 -0
- package/docs/api/type-aliases/ArrayMergeWay.md +11 -0
- package/docs/api/type-aliases/AsyncTaskId.md +11 -0
- package/docs/{type-aliases → api/type-aliases}/BeforeShutdownListener.md +1 -1
- package/docs/{type-aliases → api/type-aliases}/EventErrorListenerFn.md +1 -1
- package/docs/{type-aliases → api/type-aliases}/EventListenerFn.md +1 -1
- package/docs/api/type-aliases/FuncParamType.md +13 -0
- package/docs/{type-aliases → api/type-aliases}/PromptExamples.md +1 -1
- package/docs/api/type-aliases/PubSubClientId.md +14 -0
- package/docs/api/type-aliases/PubSubCtx.md +37 -0
- package/docs/api/type-aliases/RpcMethodHandler.md +34 -0
- package/docs/{type-aliases → api/type-aliases}/SemaphoreIsReadyFuncType.md +1 -1
- package/docs/api/type-aliases/TFunc.md +33 -0
- package/docs/{variables → api/variables}/AIChatRoles.md +1 -1
- package/docs/{variables → api/variables}/AIMessageTypes.md +1 -1
- package/docs/{variables → api/variables}/AITextGenerationFinishReasons.md +1 -1
- package/docs/{variables → api/variables}/AbortErrorCode.md +1 -1
- package/docs/api/variables/ActionNames.md +13 -0
- package/docs/{variables → api/variables}/AlreadyExistsErrorCode.md +1 -1
- package/docs/api/variables/ArrayMergeWay.md +25 -0
- package/docs/api/variables/ArrayMergeWaySymbol.md +11 -0
- package/docs/api/variables/ClientToolFuncSchema.md +83 -0
- package/docs/{variables → api/variables}/DEFAULT_CONFIG_NAME.md +1 -1
- package/docs/{variables → api/variables}/DefaultAsyncSemaphoreCapacity.md +1 -1
- package/docs/api/variables/EventBusName.md +11 -0
- package/docs/api/variables/EventName.md +11 -0
- package/docs/{variables → api/variables}/FilenameReservedRegex.md +1 -1
- package/docs/api/variables/FuncMetaSymbol.md +15 -0
- package/docs/{variables → api/variables}/InternalErrorCode.md +1 -1
- package/docs/{variables → api/variables}/LLM_TOKENIZER_NAMES.md +1 -1
- package/docs/{variables → api/variables}/LLM_TOKENIZER_NAMES_MAP.md +1 -1
- package/docs/{variables → api/variables}/NotFoundErrorCode.md +1 -1
- package/docs/{variables → api/variables}/NotImplementedErrorCode.md +1 -1
- package/docs/api/variables/PASSING_SCORE.md +13 -0
- package/docs/api/variables/RStreamErrCode.md +11 -0
- package/docs/api/variables/RemoteToolFuncSchema.md +84 -0
- package/docs/api/variables/ResponseRStreamErrCode.md +11 -0
- package/docs/api/variables/RpcMethodsClientToolSchema.md +49 -0
- package/docs/api/variables/RpcMethodsServerToolSchema.md +21 -0
- package/docs/{variables → api/variables}/SHUTDOWN_SIGNALS.md +1 -1
- package/docs/{variables → api/variables}/SSEChannelAlreadyClosedErrCode.md +1 -1
- package/docs/api/variables/SecondaryCache.md +11 -0
- package/docs/api/variables/ServerToolFuncSchema.md +83 -0
- package/docs/api/variables/StrangeHumanName.md +11 -0
- package/docs/api/variables/ToolAsyncCancelableBit.md +11 -0
- package/docs/api/variables/ToolAsyncMultiTaskBit.md +11 -0
- package/docs/api/variables/ToolAsyncPriorityBit.md +11 -0
- package/docs/{variables → api/variables}/ToolFuncSchema.md +14 -1
- package/docs/{variables → api/variables}/WindowsReservedNameRegex.md +1 -1
- package/docs/api/variables/base32768.md +11 -0
- package/docs/{variables → api/variables}/defaultTemplateFormat.md +1 -1
- package/docs/api/variables/event.md +11 -0
- package/docs/api/variables/eventClient.md +11 -0
- package/docs/api/variables/eventServer.md +11 -0
- package/docs/api/variables/lrucache.md +11 -0
- package/docs/{variables → api/variables}/mimeType.md +1 -1
- package/docs/{variables → api/variables}/uuidNIL.md +1 -1
- package/docs/pubsub.md +326 -0
- package/docs/server_client_tools.md +88 -0
- package/docs/toolFunc.md +183 -0
- package/docs/transport.md +137 -0
- package/package.json +37 -39
- package/dist/chunk-OYDBRUZJ.mjs +0 -1
- package/dist/index-BkwhCK1q.d.mts +0 -899
- package/dist/index-BkwhCK1q.d.ts +0 -899
- package/docs/README.md +0 -250
- package/docs/classes/AlreadyExistsError.md +0 -346
- package/docs/classes/BaseError.md +0 -359
- package/docs/classes/NotFoundError.md +0 -346
- package/docs/classes/NotImplementationError.md +0 -346
- package/docs/classes/ReadableStreamError.md +0 -366
- package/docs/classes/ResClientTools.md +0 -2451
- package/docs/classes/ResServerTools.md +0 -2427
- package/docs/classes/SSEChannel.md +0 -270
- package/docs/classes/ToolFunc.md +0 -2201
- package/docs/classes/YamlTypeBaseObject.md +0 -31
- package/docs/enumerations/AsyncFeatureBits.md +0 -33
- package/docs/enumerations/AsyncFeatures.md +0 -33
- package/docs/enumerations/ErrorCode.md +0 -177
- package/docs/enumerations/HashAlgorithm.md +0 -97
- package/docs/functions/canonicalize.md +0 -21
- package/docs/functions/initShutdown.md +0 -15
- package/docs/functions/wait.md +0 -21
- package/docs/interfaces/AIChatAssistantMessageParam.md +0 -129
- package/docs/interfaces/AIChatContentPartImage.md +0 -29
- package/docs/interfaces/AIChatContentPartText.md +0 -25
- package/docs/interfaces/AIChatMessageParamBase.md +0 -68
- package/docs/interfaces/AIChatMessageToolCall.md +0 -41
- package/docs/interfaces/AIChatToolChoiceFuncObject.md +0 -37
- package/docs/interfaces/AIChatToolChoiceObject.md +0 -25
- package/docs/interfaces/AIChatToolFunc.md +0 -41
- package/docs/interfaces/AIChatToolFuncParam.md +0 -37
- package/docs/interfaces/AIChatToolMessageParam.md +0 -113
- package/docs/interfaces/AIChatToolParam.md +0 -25
- package/docs/interfaces/AIChatToolTypeObject.md +0 -17
- package/docs/interfaces/AIChatUserMessageParam.md +0 -137
- package/docs/interfaces/AIChoiceConfig.md +0 -65
- package/docs/interfaces/AIResult.md +0 -65
- package/docs/interfaces/AIStreamParserOptions.md +0 -21
- package/docs/interfaces/BaseFunc.md +0 -157
- package/docs/interfaces/BaseFuncItem.md +0 -101
- package/docs/interfaces/BinarySemaphoreAcquireOptions.md +0 -25
- package/docs/interfaces/BinarySemaphoreOptions.md +0 -57
- package/docs/interfaces/BinarySemaphoreReleaseOptions.md +0 -25
- package/docs/interfaces/BinarySemaphoreReleaserFunc.md +0 -37
- package/docs/interfaces/CancelableAbilityOptions.md +0 -113
- package/docs/interfaces/ClientFuncItem.md +0 -175
- package/docs/interfaces/EventClientFuncParams.md +0 -51
- package/docs/interfaces/EventServerFuncParams.md +0 -67
- package/docs/interfaces/FuncItem.md +0 -143
- package/docs/interfaces/FuncParam.md +0 -61
- package/docs/interfaces/FuncParams.md +0 -13
- package/docs/interfaces/Funcs.md +0 -13
- package/docs/interfaces/HashAlgoParams.md +0 -33
- package/docs/interfaces/IFileMetaInfo.md +0 -65
- package/docs/interfaces/IReadTextFileChunksOptions.md +0 -143
- package/docs/interfaces/ITruncateToTokenLimitOptions.md +0 -99
- package/docs/interfaces/JsonFilter.md +0 -13
- package/docs/interfaces/ParseObjectArgumentOptions.md +0 -89
- package/docs/interfaces/PromptExampleSelectorOptions.md +0 -34
- package/docs/interfaces/RemoteFuncItem.md +0 -164
- package/docs/interfaces/ReplacePlacehoderOptions.md +0 -41
- package/docs/interfaces/ResClientFuncParams.md +0 -37
- package/docs/interfaces/ResServerFuncParams.md +0 -69
- package/docs/interfaces/SanitizeFilenameOptions.md +0 -25
- package/docs/interfaces/SectionStringOptions.md +0 -25
- package/docs/interfaces/SemaphoreOptions.md +0 -89
- package/docs/interfaces/SemaphoreTaskItem.md +0 -73
- package/docs/interfaces/ServerFuncItem.md +0 -183
- package/docs/interfaces/ServerFuncParams.md +0 -35
- package/docs/interfaces/SplitSentenceOptions.md +0 -41
- package/docs/interfaces/ToolFuncPackage.md +0 -47
- package/docs/type-aliases/AIModelNameRule.md +0 -11
- package/docs/type-aliases/AIModelNameRuleFn.md +0 -21
- package/docs/type-aliases/AIModelNameRules.md +0 -11
- package/docs/type-aliases/ActionName.md +0 -11
- package/docs/type-aliases/AsyncTaskId.md +0 -11
- package/docs/type-aliases/FuncParamType.md +0 -11
- package/docs/type-aliases/TFunc.md +0 -25
- package/docs/variables/ActionNames.md +0 -11
- package/docs/variables/ClientToolFuncSchema.md +0 -101
- package/docs/variables/EventBusName.md +0 -11
- package/docs/variables/EventName.md +0 -11
- package/docs/variables/PASSING_SCORE.md +0 -11
- package/docs/variables/RStreamErrCode.md +0 -11
- package/docs/variables/RemoteToolFuncSchema.md +0 -101
- package/docs/variables/ResponseRStreamErrCode.md +0 -11
- package/docs/variables/SecondaryCache.md +0 -11
- package/docs/variables/ServerToolFuncSchema.md +0 -101
- package/docs/variables/ToolAsyncCancelableBit.md +0 -11
- package/docs/variables/ToolAsyncMultiTaskBit.md +0 -11
- package/docs/variables/ToolAsyncPriorityBit.md +0 -11
- package/docs/variables/base32768.md +0 -11
- package/docs/variables/event.md +0 -11
- package/docs/variables/eventClient.md +0 -11
- package/docs/variables/eventServer.md +0 -11
- package/docs/variables/lrucache.md +0 -11
- /package/docs/{_media → api/_media}/LICENSE-MIT +0 -0
- /package/docs/{namespaces → api/namespaces}/EventStates/README.md +0 -0
- /package/docs/{namespaces → api/namespaces}/uuidv5/README.md +0 -0
|
@@ -6,12 +6,25 @@
|
|
|
6
6
|
|
|
7
7
|
# Class: ClientTools
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/ai-tool/src/client-tools.ts:
|
|
9
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:9](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/client-tools.ts#L9)
|
|
10
|
+
|
|
11
|
+
Represents a client-side proxy for a remote tool function.
|
|
12
|
+
|
|
13
|
+
A `ClientTools` instance is a `ToolFunc` that, when executed, does not run
|
|
14
|
+
local code. Instead, it serializes the parameters and uses an injected
|
|
15
|
+
transport layer (`IClientToolTransport`) to make a remote procedure call
|
|
16
|
+
to its corresponding `ServerTools` counterpart.
|
|
17
|
+
|
|
18
|
+
These tools are typically created dynamically by loading definitions from a server.
|
|
10
19
|
|
|
11
20
|
## Extends
|
|
12
21
|
|
|
13
22
|
- [`ClientFuncItem`](../interfaces/ClientFuncItem.md).[`ToolFunc`](ToolFunc.md)
|
|
14
23
|
|
|
24
|
+
## Extended by
|
|
25
|
+
|
|
26
|
+
- [`RpcMethodsClientTool`](RpcMethodsClientTool.md)
|
|
27
|
+
|
|
15
28
|
## Indexable
|
|
16
29
|
|
|
17
30
|
\[`name`: `string`\]: `any`
|
|
@@ -20,9 +33,9 @@ Defined in: [packages/ai-tool/src/client-tools.ts:8](https://github.com/isdk/ai-
|
|
|
20
33
|
|
|
21
34
|
### new ClientTools()
|
|
22
35
|
|
|
23
|
-
> **new ClientTools**(`name`, `options
|
|
36
|
+
> **new ClientTools**(`name`, `options`?): [`ClientTools`](ClientTools.md)
|
|
24
37
|
|
|
25
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
38
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:571](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L571)
|
|
26
39
|
|
|
27
40
|
The initial value of Object.prototype.constructor is the standard built-in Object constructor.
|
|
28
41
|
|
|
@@ -30,12 +43,16 @@ The initial value of Object.prototype.constructor is the standard built-in Objec
|
|
|
30
43
|
|
|
31
44
|
##### name
|
|
32
45
|
|
|
46
|
+
Can be a function name, a function implementation, or a configuration object.
|
|
47
|
+
|
|
33
48
|
`string` | `Function` | [`FuncItem`](../interfaces/FuncItem.md)
|
|
34
49
|
|
|
35
|
-
##### options
|
|
50
|
+
##### options?
|
|
36
51
|
|
|
37
52
|
`any` = `{}`
|
|
38
53
|
|
|
54
|
+
Configuration options if not provided in the first argument.
|
|
55
|
+
|
|
39
56
|
#### Returns
|
|
40
57
|
|
|
41
58
|
[`ClientTools`](ClientTools.md)
|
|
@@ -50,7 +67,7 @@ The initial value of Object.prototype.constructor is the standard built-in Objec
|
|
|
50
67
|
|
|
51
68
|
> **$attributes**: `Properties`
|
|
52
69
|
|
|
53
|
-
Defined in:
|
|
70
|
+
Defined in: [property-manager.js/src/advance.d.ts:5](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/advance.d.ts#L5)
|
|
54
71
|
|
|
55
72
|
#### Inherited from
|
|
56
73
|
|
|
@@ -62,7 +79,10 @@ Defined in: node\_modules/.pnpm/property-manager@2.0.0/node\_modules/property-ma
|
|
|
62
79
|
|
|
63
80
|
> `optional` **action**: `"get"` \| `"post"` \| `"put"` \| `"delete"` \| `"patch"` \| `"list"` \| `"res"`
|
|
64
81
|
|
|
65
|
-
Defined in: [packages/ai-tool/src/utils/consts.ts:
|
|
82
|
+
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)
|
|
83
|
+
|
|
84
|
+
The action to be used for the remote call. This typically represents an RPC method name.
|
|
85
|
+
Only for RESTful HTTP transports, it might be mapped to a standard HTTP method (e.g., GET, POST)
|
|
66
86
|
|
|
67
87
|
#### Inherited from
|
|
68
88
|
|
|
@@ -74,7 +94,9 @@ Defined in: [packages/ai-tool/src/utils/consts.ts:35](https://github.com/isdk/ai
|
|
|
74
94
|
|
|
75
95
|
> `optional` **alias**: `string` \| `string`[]
|
|
76
96
|
|
|
77
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
97
|
+
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)
|
|
98
|
+
|
|
99
|
+
Optional aliases for the function name.
|
|
78
100
|
|
|
79
101
|
#### Inherited from
|
|
80
102
|
|
|
@@ -82,15 +104,33 @@ Defined in: [packages/ai-tool/src/tool-func.ts:31](https://github.com/isdk/ai-to
|
|
|
82
104
|
|
|
83
105
|
***
|
|
84
106
|
|
|
85
|
-
###
|
|
107
|
+
### asyncFeatures?
|
|
108
|
+
|
|
109
|
+
> `optional` **asyncFeatures**: `number`
|
|
110
|
+
|
|
111
|
+
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)
|
|
112
|
+
|
|
113
|
+
A bitmask representing asynchronous features supported by the function, built from `AsyncFeatureBits`.
|
|
114
|
+
This allows the system to understand if a function supports capabilities like cancellation or multi-tasking.
|
|
115
|
+
|
|
116
|
+
#### See
|
|
86
117
|
|
|
87
|
-
|
|
118
|
+
AsyncFeatureBits from `@src/utils/cancelable-ability.ts`
|
|
88
119
|
|
|
89
|
-
|
|
120
|
+
#### Example
|
|
121
|
+
|
|
122
|
+
```ts
|
|
123
|
+
import { AsyncFeatures } from './utils';
|
|
124
|
+
const func = new ToolFunc({
|
|
125
|
+
name: 'cancellableTask',
|
|
126
|
+
asyncFeatures: AsyncFeatures.Cancelable | AsyncFeatures.MultiTask,
|
|
127
|
+
// ...
|
|
128
|
+
});
|
|
129
|
+
```
|
|
90
130
|
|
|
91
131
|
#### Inherited from
|
|
92
132
|
|
|
93
|
-
[`
|
|
133
|
+
[`ToolFunc`](ToolFunc.md).[`asyncFeatures`](ToolFunc.md#asyncfeatures)
|
|
94
134
|
|
|
95
135
|
***
|
|
96
136
|
|
|
@@ -98,7 +138,7 @@ Defined in: [packages/ai-tool/src/client-tools.ts:16](https://github.com/isdk/ai
|
|
|
98
138
|
|
|
99
139
|
> **constructor**: `Function`
|
|
100
140
|
|
|
101
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:125
|
|
141
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:125
|
|
102
142
|
|
|
103
143
|
The initial value of Object.prototype.constructor is the standard built-in Object constructor.
|
|
104
144
|
|
|
@@ -108,7 +148,7 @@ The initial value of Object.prototype.constructor is the standard built-in Objec
|
|
|
108
148
|
|
|
109
149
|
> **defaultOptions**: `object`
|
|
110
150
|
|
|
111
|
-
Defined in:
|
|
151
|
+
Defined in: [property-manager.js/src/abstract.d.ts:74](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L74)
|
|
112
152
|
|
|
113
153
|
The default options for export and assign
|
|
114
154
|
|
|
@@ -126,11 +166,70 @@ The default options for export and assign
|
|
|
126
166
|
|
|
127
167
|
***
|
|
128
168
|
|
|
129
|
-
###
|
|
169
|
+
### depends?
|
|
170
|
+
|
|
171
|
+
> `optional` **depends**: `object`
|
|
172
|
+
|
|
173
|
+
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)
|
|
174
|
+
|
|
175
|
+
A map of dependencies this function has on other tool functions.
|
|
176
|
+
Declaring dependencies ensures that they are automatically registered when this function is registered.
|
|
177
|
+
This is crucial for building modular functions that rely on each other without needing to manage registration order manually.
|
|
178
|
+
|
|
179
|
+
#### Index Signature
|
|
180
|
+
|
|
181
|
+
\[`name`: `string`\]: [`ToolFunc`](ToolFunc.md)
|
|
182
|
+
|
|
183
|
+
#### Example
|
|
184
|
+
|
|
185
|
+
```ts
|
|
186
|
+
const helperFunc = new ToolFunc({ name: 'helper', func: () => 'world' });
|
|
187
|
+
const mainFunc = new ToolFunc({
|
|
188
|
+
name: 'main',
|
|
189
|
+
depends: {
|
|
190
|
+
helper: helperFunc,
|
|
191
|
+
},
|
|
192
|
+
func() {
|
|
193
|
+
// We can now safely run the dependency
|
|
194
|
+
const result = this.runSync('helper');
|
|
195
|
+
return `Hello, ${result}`;
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
// When mainFunc is registered, helperFunc will be registered automatically.
|
|
199
|
+
mainFunc.register();
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
#### Inherited from
|
|
203
|
+
|
|
204
|
+
[`ToolFunc`](ToolFunc.md).[`depends`](ToolFunc.md#depends)
|
|
205
|
+
|
|
206
|
+
***
|
|
207
|
+
|
|
208
|
+
### description?
|
|
209
|
+
|
|
210
|
+
> `optional` **description**: `string`
|
|
211
|
+
|
|
212
|
+
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)
|
|
213
|
+
|
|
214
|
+
A detailed description of what the function does.
|
|
215
|
+
|
|
216
|
+
#### Inherited from
|
|
217
|
+
|
|
218
|
+
[`ToolFunc`](ToolFunc.md).[`description`](ToolFunc.md#description)
|
|
219
|
+
|
|
220
|
+
***
|
|
221
|
+
|
|
222
|
+
### ~~fetchOptions?~~
|
|
130
223
|
|
|
131
224
|
> `optional` **fetchOptions**: `any`
|
|
132
225
|
|
|
133
|
-
Defined in: [packages/ai-tool/src/utils/consts.ts:
|
|
226
|
+
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)
|
|
227
|
+
|
|
228
|
+
Options to be passed to the underlying `fetch` call in an HTTP transport.
|
|
229
|
+
|
|
230
|
+
#### Deprecated
|
|
231
|
+
|
|
232
|
+
Use `transport` instead.
|
|
134
233
|
|
|
135
234
|
#### Inherited from
|
|
136
235
|
|
|
@@ -142,7 +241,9 @@ Defined in: [packages/ai-tool/src/utils/consts.ts:36](https://github.com/isdk/ai
|
|
|
142
241
|
|
|
143
242
|
> `optional` **isApi**: `boolean`
|
|
144
243
|
|
|
145
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
244
|
+
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)
|
|
245
|
+
|
|
246
|
+
If true, indicates that this function should be treated as a server-side API.
|
|
146
247
|
|
|
147
248
|
#### Inherited from
|
|
148
249
|
|
|
@@ -154,11 +255,13 @@ Defined in: [packages/ai-tool/src/tool-func.ts:29](https://github.com/isdk/ai-to
|
|
|
154
255
|
|
|
155
256
|
> `optional` **name**: `string`
|
|
156
257
|
|
|
157
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
258
|
+
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)
|
|
259
|
+
|
|
260
|
+
The unique name of the function.
|
|
158
261
|
|
|
159
262
|
#### Inherited from
|
|
160
263
|
|
|
161
|
-
[`ToolFunc`](ToolFunc.md).[`name`](ToolFunc.md#name-
|
|
264
|
+
[`ToolFunc`](ToolFunc.md).[`name`](ToolFunc.md#name-3)
|
|
162
265
|
|
|
163
266
|
***
|
|
164
267
|
|
|
@@ -166,7 +269,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:23](https://github.com/isdk/ai-to
|
|
|
166
269
|
|
|
167
270
|
> **nonExported1stChar**: `string`
|
|
168
271
|
|
|
169
|
-
Defined in:
|
|
272
|
+
Defined in: [property-manager.js/src/abstract.d.ts:78](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L78)
|
|
170
273
|
|
|
171
274
|
the property with the default prefix '$' will not be exported.
|
|
172
275
|
|
|
@@ -180,7 +283,9 @@ the property with the default prefix '$' will not be exported.
|
|
|
180
283
|
|
|
181
284
|
> `optional` **params**: [`FuncParams`](../interfaces/FuncParams.md) \| [`FuncParam`](../interfaces/FuncParam.md)[]
|
|
182
285
|
|
|
183
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
286
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:81](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L81)
|
|
287
|
+
|
|
288
|
+
Parameter definitions, which can be an object mapping names to definitions or an array for positional parameters.
|
|
184
289
|
|
|
185
290
|
#### Inherited from
|
|
186
291
|
|
|
@@ -190,9 +295,11 @@ Defined in: [packages/ai-tool/src/tool-func.ts:24](https://github.com/isdk/ai-to
|
|
|
190
295
|
|
|
191
296
|
### result?
|
|
192
297
|
|
|
193
|
-
> `optional` **result**: `string`
|
|
298
|
+
> `optional` **result**: `string` \| `Record`\<`string`, `any`\>
|
|
194
299
|
|
|
195
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
300
|
+
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)
|
|
301
|
+
|
|
302
|
+
The expected return type of the function, described as a string or a JSON schema object.
|
|
196
303
|
|
|
197
304
|
#### Inherited from
|
|
198
305
|
|
|
@@ -204,7 +311,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:25](https://github.com/isdk/ai-to
|
|
|
204
311
|
|
|
205
312
|
> `optional` **scope**: `any`
|
|
206
313
|
|
|
207
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
314
|
+
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)
|
|
315
|
+
|
|
316
|
+
The execution scope or context (`this`) for the function.
|
|
208
317
|
|
|
209
318
|
#### Inherited from
|
|
210
319
|
|
|
@@ -216,7 +325,11 @@ Defined in: [packages/ai-tool/src/tool-func.ts:26](https://github.com/isdk/ai-to
|
|
|
216
325
|
|
|
217
326
|
> `optional` **setup**: (`this`, `options`?) => `void`
|
|
218
327
|
|
|
219
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
328
|
+
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)
|
|
329
|
+
|
|
330
|
+
A lifecycle hook called once during the `ToolFunc` instance's initialization.
|
|
331
|
+
It allows for initial setup, state configuration, or property modification on the instance
|
|
332
|
+
before it is used or registered. The `this` context is the `ToolFunc` instance itself.
|
|
220
333
|
|
|
221
334
|
#### Parameters
|
|
222
335
|
|
|
@@ -228,10 +341,26 @@ Defined in: [packages/ai-tool/src/tool-func.ts:28](https://github.com/isdk/ai-to
|
|
|
228
341
|
|
|
229
342
|
[`FuncItem`](../interfaces/FuncItem.md)
|
|
230
343
|
|
|
344
|
+
The configuration options for the function.
|
|
345
|
+
|
|
231
346
|
#### Returns
|
|
232
347
|
|
|
233
348
|
`void`
|
|
234
349
|
|
|
350
|
+
#### Example
|
|
351
|
+
|
|
352
|
+
```ts
|
|
353
|
+
const myFunc = new ToolFunc({
|
|
354
|
+
name: 'myFunc',
|
|
355
|
+
customState: 'initial',
|
|
356
|
+
setup() {
|
|
357
|
+
// `this` is the myFunc instance
|
|
358
|
+
this.customState = 'configured';
|
|
359
|
+
}
|
|
360
|
+
});
|
|
361
|
+
console.log(myFunc.customState); // Outputs: 'configured'
|
|
362
|
+
```
|
|
363
|
+
|
|
235
364
|
#### Inherited from
|
|
236
365
|
|
|
237
366
|
[`ToolFunc`](ToolFunc.md).[`setup`](ToolFunc.md#setup)
|
|
@@ -242,7 +371,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:28](https://github.com/isdk/ai-to
|
|
|
242
371
|
|
|
243
372
|
> `optional` **stream**: `boolean`
|
|
244
373
|
|
|
245
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
374
|
+
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)
|
|
375
|
+
|
|
376
|
+
If true, indicates that the function has the *capability* to stream its output.
|
|
377
|
+
Whether a specific call is streamed is determined by a `stream` property in the runtime parameters.
|
|
246
378
|
|
|
247
379
|
#### Inherited from
|
|
248
380
|
|
|
@@ -254,7 +386,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:30](https://github.com/isdk/ai-to
|
|
|
254
386
|
|
|
255
387
|
> `optional` **tags**: `string` \| `string`[]
|
|
256
388
|
|
|
257
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
389
|
+
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)
|
|
390
|
+
|
|
391
|
+
Tags for grouping or filtering functions.
|
|
258
392
|
|
|
259
393
|
#### Inherited from
|
|
260
394
|
|
|
@@ -262,11 +396,39 @@ Defined in: [packages/ai-tool/src/tool-func.ts:27](https://github.com/isdk/ai-to
|
|
|
262
396
|
|
|
263
397
|
***
|
|
264
398
|
|
|
399
|
+
### title?
|
|
400
|
+
|
|
401
|
+
> `optional` **title**: `string`
|
|
402
|
+
|
|
403
|
+
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)
|
|
404
|
+
|
|
405
|
+
A concise, human-readable title for the function, often used in UI or by AI.
|
|
406
|
+
|
|
407
|
+
#### Inherited from
|
|
408
|
+
|
|
409
|
+
[`ToolFunc`](ToolFunc.md).[`title`](ToolFunc.md#title)
|
|
410
|
+
|
|
411
|
+
***
|
|
412
|
+
|
|
413
|
+
### action?
|
|
414
|
+
|
|
415
|
+
> `static` `optional` **action**: `string`
|
|
416
|
+
|
|
417
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:32](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/client-tools.ts#L32)
|
|
418
|
+
|
|
419
|
+
#### Inherited from
|
|
420
|
+
|
|
421
|
+
`ClientFuncItem.action`
|
|
422
|
+
|
|
423
|
+
***
|
|
424
|
+
|
|
265
425
|
### aliases
|
|
266
426
|
|
|
267
427
|
> `static` **aliases**: `object` = `{}`
|
|
268
428
|
|
|
269
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
429
|
+
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)
|
|
430
|
+
|
|
431
|
+
A static map of aliases to their corresponding function names.
|
|
270
432
|
|
|
271
433
|
#### Index Signature
|
|
272
434
|
|
|
@@ -282,7 +444,11 @@ Defined in: [packages/ai-tool/src/tool-func.ts:58](https://github.com/isdk/ai-to
|
|
|
282
444
|
|
|
283
445
|
> `static` **dataPath**: `string`
|
|
284
446
|
|
|
285
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
447
|
+
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)
|
|
448
|
+
|
|
449
|
+
A conventional property to designate a file path for saving the registered `ToolFunc` data.
|
|
450
|
+
Note: The `ToolFunc` class itself does not implement persistence logic. It is up to the
|
|
451
|
+
developer to use this path to save and load the `ToolFunc.items` registry if needed.
|
|
286
452
|
|
|
287
453
|
#### Inherited from
|
|
288
454
|
|
|
@@ -294,7 +460,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:59](https://github.com/isdk/ai-to
|
|
|
294
460
|
|
|
295
461
|
> `static` **items**: [`Funcs`](../interfaces/Funcs.md) = `{}`
|
|
296
462
|
|
|
297
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
463
|
+
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)
|
|
464
|
+
|
|
465
|
+
A static registry of all `ToolFunc` instances, indexed by name.
|
|
298
466
|
|
|
299
467
|
#### Inherited from
|
|
300
468
|
|
|
@@ -302,29 +470,80 @@ Defined in: [packages/ai-tool/src/tool-func.ts:57](https://github.com/isdk/ai-to
|
|
|
302
470
|
|
|
303
471
|
## Accessors
|
|
304
472
|
|
|
473
|
+
### ~~apiRoot~~
|
|
474
|
+
|
|
475
|
+
#### Get Signature
|
|
476
|
+
|
|
477
|
+
> **get** **apiRoot**(): `string`
|
|
478
|
+
|
|
479
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:109](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/client-tools.ts#L109)
|
|
480
|
+
|
|
481
|
+
##### Deprecated
|
|
482
|
+
|
|
483
|
+
This property is now mainly for informational purposes.
|
|
484
|
+
The actual endpoint is managed by the transport.
|
|
485
|
+
|
|
486
|
+
##### Returns
|
|
487
|
+
|
|
488
|
+
`string`
|
|
489
|
+
|
|
490
|
+
The root endpoint for the remote service.
|
|
491
|
+
|
|
492
|
+
#### Deprecated
|
|
493
|
+
|
|
494
|
+
Use `transport` instead.
|
|
495
|
+
|
|
496
|
+
#### Inherited from
|
|
497
|
+
|
|
498
|
+
[`ClientFuncItem`](../interfaces/ClientFuncItem.md).[`apiRoot`](../interfaces/ClientFuncItem.md#apiroot)
|
|
499
|
+
|
|
500
|
+
***
|
|
501
|
+
|
|
305
502
|
### apiRoot
|
|
306
503
|
|
|
307
504
|
#### Get Signature
|
|
308
505
|
|
|
309
|
-
> **get** `static` **apiRoot**(): `
|
|
506
|
+
> **get** `static` **apiRoot**(): `string`
|
|
507
|
+
|
|
508
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:40](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/client-tools.ts#L40)
|
|
509
|
+
|
|
510
|
+
##### Deprecated
|
|
310
511
|
|
|
311
|
-
|
|
512
|
+
This property is now mainly for informational purposes.
|
|
513
|
+
The actual endpoint is managed by the transport.
|
|
312
514
|
|
|
313
515
|
##### Returns
|
|
314
516
|
|
|
315
|
-
`
|
|
517
|
+
`string`
|
|
316
518
|
|
|
317
519
|
#### Inherited from
|
|
318
520
|
|
|
319
521
|
`ClientFuncItem.apiRoot`
|
|
320
522
|
|
|
523
|
+
***
|
|
524
|
+
|
|
525
|
+
### transport
|
|
526
|
+
|
|
527
|
+
#### Get Signature
|
|
528
|
+
|
|
529
|
+
> **get** `static` **transport**(): [`IClientToolTransport`](../interfaces/IClientToolTransport.md)
|
|
530
|
+
|
|
531
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:60](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/client-tools.ts#L60)
|
|
532
|
+
|
|
533
|
+
##### Returns
|
|
534
|
+
|
|
535
|
+
[`IClientToolTransport`](../interfaces/IClientToolTransport.md)
|
|
536
|
+
|
|
321
537
|
## Methods
|
|
322
538
|
|
|
323
539
|
### arr2ObjParams()
|
|
324
540
|
|
|
325
541
|
> **arr2ObjParams**(`params`): `any`[]
|
|
326
542
|
|
|
327
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
543
|
+
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)
|
|
544
|
+
|
|
545
|
+
Converts an array of positional arguments into a named parameters object.
|
|
546
|
+
This is used internally to support functions defined with named parameters.
|
|
328
547
|
|
|
329
548
|
#### Parameters
|
|
330
549
|
|
|
@@ -332,10 +551,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:269](https://github.com/isdk/ai-t
|
|
|
332
551
|
|
|
333
552
|
`any`[]
|
|
334
553
|
|
|
554
|
+
An array of positional arguments.
|
|
555
|
+
|
|
335
556
|
#### Returns
|
|
336
557
|
|
|
337
558
|
`any`[]
|
|
338
559
|
|
|
560
|
+
An array containing a single parameters object.
|
|
561
|
+
|
|
339
562
|
#### Inherited from
|
|
340
563
|
|
|
341
564
|
[`ToolFunc`](ToolFunc.md).[`arr2ObjParams`](ToolFunc.md#arr2objparams)
|
|
@@ -346,7 +569,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:269](https://github.com/isdk/ai-t
|
|
|
346
569
|
|
|
347
570
|
> **assign**(`src`, `options`?): `this`
|
|
348
571
|
|
|
349
|
-
Defined in:
|
|
572
|
+
Defined in: [property-manager.js/src/abstract.d.ts:106](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L106)
|
|
350
573
|
|
|
351
574
|
Assign the values from the src object.
|
|
352
575
|
|
|
@@ -378,7 +601,7 @@ this object
|
|
|
378
601
|
|
|
379
602
|
> **assignProperty**(`src`, `name`, `value`, `attrs`?, `options`?): `void`
|
|
380
603
|
|
|
381
|
-
Defined in:
|
|
604
|
+
Defined in: [property-manager.js/src/abstract.d.ts:117](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L117)
|
|
382
605
|
|
|
383
606
|
Assign a property of src to this object.
|
|
384
607
|
|
|
@@ -426,7 +649,7 @@ the attributes object
|
|
|
426
649
|
|
|
427
650
|
> `abstract` **assignPropertyTo**(`dest`, `src`, `name`, `value`, `attrs`?, `options`?): `void`
|
|
428
651
|
|
|
429
|
-
Defined in:
|
|
652
|
+
Defined in: [property-manager.js/src/abstract.d.ts:131](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L131)
|
|
430
653
|
|
|
431
654
|
Assign the property value from the src to destination object.
|
|
432
655
|
|
|
@@ -480,7 +703,7 @@ The attributes object of the property
|
|
|
480
703
|
|
|
481
704
|
> **assignTo**(`dest`?, `options`?): `any`
|
|
482
705
|
|
|
483
|
-
Defined in:
|
|
706
|
+
Defined in: [property-manager.js/src/abstract.d.ts:191](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L191)
|
|
484
707
|
|
|
485
708
|
Assign this attributes to the dest object
|
|
486
709
|
|
|
@@ -512,7 +735,7 @@ the dest object
|
|
|
512
735
|
|
|
513
736
|
> **clone**(`options`?): `any`
|
|
514
737
|
|
|
515
|
-
Defined in:
|
|
738
|
+
Defined in: [property-manager.js/src/abstract.d.ts:155](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L155)
|
|
516
739
|
|
|
517
740
|
Create a new object with the same values of attributes.
|
|
518
741
|
|
|
@@ -538,7 +761,7 @@ the new object
|
|
|
538
761
|
|
|
539
762
|
> **cloneTo**(`dest`, `options`?): `any`
|
|
540
763
|
|
|
541
|
-
Defined in:
|
|
764
|
+
Defined in: [property-manager.js/src/abstract.d.ts:148](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L148)
|
|
542
765
|
|
|
543
766
|
Create and assign the values to the destination object.
|
|
544
767
|
|
|
@@ -570,7 +793,7 @@ the new dest object
|
|
|
570
793
|
|
|
571
794
|
> `abstract` **defineProperties**(`aProperties`): `any`
|
|
572
795
|
|
|
573
|
-
Defined in:
|
|
796
|
+
Defined in: [property-manager.js/src/abstract.d.ts:89](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L89)
|
|
574
797
|
|
|
575
798
|
Define the attributes of this object.
|
|
576
799
|
|
|
@@ -592,29 +815,11 @@ the defined attributes of the object
|
|
|
592
815
|
|
|
593
816
|
***
|
|
594
817
|
|
|
595
|
-
### errorFrom()
|
|
596
|
-
|
|
597
|
-
> **errorFrom**(`res`): `Promise`\<[`CommonError`](CommonError.md)\>
|
|
598
|
-
|
|
599
|
-
Defined in: [packages/ai-tool/src/client-tools.ts:118](https://github.com/isdk/ai-tool.js/blob/b0ee9498dddfa5222989cf00502bb34c601df743/src/client-tools.ts#L118)
|
|
600
|
-
|
|
601
|
-
#### Parameters
|
|
602
|
-
|
|
603
|
-
##### res
|
|
604
|
-
|
|
605
|
-
`Response`
|
|
606
|
-
|
|
607
|
-
#### Returns
|
|
608
|
-
|
|
609
|
-
`Promise`\<[`CommonError`](CommonError.md)\>
|
|
610
|
-
|
|
611
|
-
***
|
|
612
|
-
|
|
613
818
|
### exportTo()
|
|
614
819
|
|
|
615
820
|
> **exportTo**(`dest`, `options`?): `any`
|
|
616
821
|
|
|
617
|
-
Defined in:
|
|
822
|
+
Defined in: [property-manager.js/src/abstract.d.ts:173](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L173)
|
|
618
823
|
|
|
619
824
|
Export attributes to the dest json object.
|
|
620
825
|
|
|
@@ -644,9 +849,9 @@ the dest object.
|
|
|
644
849
|
|
|
645
850
|
### fetch()
|
|
646
851
|
|
|
647
|
-
> **fetch**(`objParam`?, `act`?, `subName`?): `Promise`\<`
|
|
852
|
+
> **fetch**(`objParam`?, `act`?, `subName`?): `Promise`\<`any`\>
|
|
648
853
|
|
|
649
|
-
Defined in: [packages/ai-tool/src/client-tools.ts:
|
|
854
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:114](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/client-tools.ts#L114)
|
|
650
855
|
|
|
651
856
|
#### Parameters
|
|
652
857
|
|
|
@@ -664,7 +869,7 @@ Defined in: [packages/ai-tool/src/client-tools.ts:74](https://github.com/isdk/ai
|
|
|
664
869
|
|
|
665
870
|
#### Returns
|
|
666
871
|
|
|
667
|
-
`Promise`\<`
|
|
872
|
+
`Promise`\<`any`\>
|
|
668
873
|
|
|
669
874
|
***
|
|
670
875
|
|
|
@@ -672,7 +877,11 @@ Defined in: [packages/ai-tool/src/client-tools.ts:74](https://github.com/isdk/ai
|
|
|
672
877
|
|
|
673
878
|
> **func**(`objParam`): `Promise`\<`any`\>
|
|
674
879
|
|
|
675
|
-
Defined in: [packages/ai-tool/src/client-tools.ts:
|
|
880
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:132](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/client-tools.ts#L132)
|
|
881
|
+
|
|
882
|
+
The core implementation for a client-side tool. When a `ClientTools` instance
|
|
883
|
+
is "run", this `func` method is executed. It delegates the call to the
|
|
884
|
+
configured transport, which handles the network communication.
|
|
676
885
|
|
|
677
886
|
#### Parameters
|
|
678
887
|
|
|
@@ -680,10 +889,14 @@ Defined in: [packages/ai-tool/src/client-tools.ts:149](https://github.com/isdk/a
|
|
|
680
889
|
|
|
681
890
|
`any`
|
|
682
891
|
|
|
892
|
+
The parameters to send to the remote tool.
|
|
893
|
+
|
|
683
894
|
#### Returns
|
|
684
895
|
|
|
685
896
|
`Promise`\<`any`\>
|
|
686
897
|
|
|
898
|
+
The result from the remote tool.
|
|
899
|
+
|
|
687
900
|
#### Inherited from
|
|
688
901
|
|
|
689
902
|
[`ToolFunc`](ToolFunc.md).[`func`](ToolFunc.md#func)
|
|
@@ -694,7 +907,11 @@ Defined in: [packages/ai-tool/src/client-tools.ts:149](https://github.com/isdk/a
|
|
|
694
907
|
|
|
695
908
|
> **getFunc**(`name`?): `any`
|
|
696
909
|
|
|
697
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
910
|
+
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)
|
|
911
|
+
|
|
912
|
+
Gets a bound function reference for execution with named parameters.
|
|
913
|
+
If a name is provided, it retrieves a different function from the registry.
|
|
914
|
+
Otherwise, it returns a bound version of this instance's `runSync`.
|
|
698
915
|
|
|
699
916
|
#### Parameters
|
|
700
917
|
|
|
@@ -702,10 +919,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:322](https://github.com/isdk/ai-t
|
|
|
702
919
|
|
|
703
920
|
`string`
|
|
704
921
|
|
|
922
|
+
Optional name of the function to retrieve.
|
|
923
|
+
|
|
705
924
|
#### Returns
|
|
706
925
|
|
|
707
926
|
`any`
|
|
708
927
|
|
|
928
|
+
A function reference or `undefined` if not found.
|
|
929
|
+
|
|
709
930
|
#### Inherited from
|
|
710
931
|
|
|
711
932
|
[`ToolFunc`](ToolFunc.md).[`getFunc`](ToolFunc.md#getfunc)
|
|
@@ -716,7 +937,11 @@ Defined in: [packages/ai-tool/src/tool-func.ts:322](https://github.com/isdk/ai-t
|
|
|
716
937
|
|
|
717
938
|
> **getFuncWithPos**(`name`?): `any`
|
|
718
939
|
|
|
719
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
940
|
+
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)
|
|
941
|
+
|
|
942
|
+
Gets a bound function reference suitable for positional argument execution.
|
|
943
|
+
If a name is provided, it retrieves a different function from the registry.
|
|
944
|
+
Otherwise, it returns a bound version of this instance's `runWithPosSync`.
|
|
720
945
|
|
|
721
946
|
#### Parameters
|
|
722
947
|
|
|
@@ -724,10 +949,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:346](https://github.com/isdk/ai-t
|
|
|
724
949
|
|
|
725
950
|
`string`
|
|
726
951
|
|
|
952
|
+
Optional name of the function to retrieve.
|
|
953
|
+
|
|
727
954
|
#### Returns
|
|
728
955
|
|
|
729
956
|
`any`
|
|
730
957
|
|
|
958
|
+
A function reference or `undefined` if not found.
|
|
959
|
+
|
|
731
960
|
#### Inherited from
|
|
732
961
|
|
|
733
962
|
[`ToolFunc`](ToolFunc.md).[`getFuncWithPos`](ToolFunc.md#getfuncwithpos)
|
|
@@ -738,7 +967,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:346](https://github.com/isdk/ai-t
|
|
|
738
967
|
|
|
739
968
|
> `abstract` **getProperties**(): `PropDescriptors`
|
|
740
969
|
|
|
741
|
-
Defined in:
|
|
970
|
+
Defined in: [property-manager.js/src/abstract.d.ts:98](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L98)
|
|
742
971
|
|
|
743
972
|
Get the defined attributes.
|
|
744
973
|
|
|
@@ -754,29 +983,13 @@ the descriptors of properties object
|
|
|
754
983
|
|
|
755
984
|
***
|
|
756
985
|
|
|
757
|
-
### getUrlParams()
|
|
758
|
-
|
|
759
|
-
> **getUrlParams**(`objParam`): `string`
|
|
760
|
-
|
|
761
|
-
Defined in: [packages/ai-tool/src/client-tools.ts:63](https://github.com/isdk/ai-tool.js/blob/b0ee9498dddfa5222989cf00502bb34c601df743/src/client-tools.ts#L63)
|
|
762
|
-
|
|
763
|
-
#### Parameters
|
|
764
|
-
|
|
765
|
-
##### objParam
|
|
766
|
-
|
|
767
|
-
`any`
|
|
768
|
-
|
|
769
|
-
#### Returns
|
|
770
|
-
|
|
771
|
-
`string`
|
|
772
|
-
|
|
773
|
-
***
|
|
774
|
-
|
|
775
986
|
### hasAsyncFeature()
|
|
776
987
|
|
|
777
988
|
> **hasAsyncFeature**(`feature`): `boolean`
|
|
778
989
|
|
|
779
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
990
|
+
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)
|
|
991
|
+
|
|
992
|
+
Checks if the current function instance supports a specific async feature.
|
|
780
993
|
|
|
781
994
|
#### Parameters
|
|
782
995
|
|
|
@@ -784,10 +997,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:351](https://github.com/isdk/ai-t
|
|
|
784
997
|
|
|
785
998
|
[`AsyncFeatureBits`](../enumerations/AsyncFeatureBits.md)
|
|
786
999
|
|
|
1000
|
+
The async feature bit to check for.
|
|
1001
|
+
|
|
787
1002
|
#### Returns
|
|
788
1003
|
|
|
789
1004
|
`boolean`
|
|
790
1005
|
|
|
1006
|
+
`true` if the feature is supported, otherwise `false`.
|
|
1007
|
+
|
|
791
1008
|
#### Inherited from
|
|
792
1009
|
|
|
793
1010
|
[`ToolFunc`](ToolFunc.md).[`hasAsyncFeature`](ToolFunc.md#hasasyncfeature)
|
|
@@ -798,7 +1015,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:351](https://github.com/isdk/ai-t
|
|
|
798
1015
|
|
|
799
1016
|
> **hasOwnProperty**(`v`): `boolean`
|
|
800
1017
|
|
|
801
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:140
|
|
1018
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:140
|
|
802
1019
|
|
|
803
1020
|
Determines whether an object has a property with the specified name.
|
|
804
1021
|
|
|
@@ -824,7 +1041,7 @@ A property name.
|
|
|
824
1041
|
|
|
825
1042
|
> **initialize**(`src`?): `this`
|
|
826
1043
|
|
|
827
|
-
Defined in:
|
|
1044
|
+
Defined in: [property-manager.js/src/abstract.d.ts:139](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L139)
|
|
828
1045
|
|
|
829
1046
|
Initialize object and assign attribute values from src if src exists.
|
|
830
1047
|
|
|
@@ -850,7 +1067,7 @@ this object.
|
|
|
850
1067
|
|
|
851
1068
|
> **isPrototypeOf**(`v`): `boolean`
|
|
852
1069
|
|
|
853
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:146
|
|
1070
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:146
|
|
854
1071
|
|
|
855
1072
|
Determines whether an object exists in another object's prototype chain.
|
|
856
1073
|
|
|
@@ -876,7 +1093,7 @@ Another object whose prototype chain is to be checked.
|
|
|
876
1093
|
|
|
877
1094
|
> **isSame**(`src`, `options`?): `boolean`
|
|
878
1095
|
|
|
879
|
-
Defined in:
|
|
1096
|
+
Defined in: [property-manager.js/src/abstract.d.ts:200](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L200)
|
|
880
1097
|
|
|
881
1098
|
Check the src object whether “equals” this object.
|
|
882
1099
|
|
|
@@ -906,7 +1123,15 @@ The source object
|
|
|
906
1123
|
|
|
907
1124
|
> **isStream**(`params`): `undefined` \| `boolean`
|
|
908
1125
|
|
|
909
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1126
|
+
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)
|
|
1127
|
+
|
|
1128
|
+
Determines if a function call should produce a stream.
|
|
1129
|
+
|
|
1130
|
+
The logic is as follows:
|
|
1131
|
+
1. It first checks if the function is generally capable of streaming (`this.stream`).
|
|
1132
|
+
2. If it is, it then checks if a `stream` parameter is formally declared in the function's `params` definition.
|
|
1133
|
+
3. If both are true, the method returns the value of the `stream` property from the runtime `params` object.
|
|
1134
|
+
Otherwise, it returns the function's static `stream` capability.
|
|
910
1135
|
|
|
911
1136
|
#### Parameters
|
|
912
1137
|
|
|
@@ -914,10 +1139,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:357](https://github.com/isdk/ai-t
|
|
|
914
1139
|
|
|
915
1140
|
`any`
|
|
916
1141
|
|
|
1142
|
+
The runtime parameters passed to the function call.
|
|
1143
|
+
|
|
917
1144
|
#### Returns
|
|
918
1145
|
|
|
919
1146
|
`undefined` \| `boolean`
|
|
920
1147
|
|
|
1148
|
+
`true` if the call should be streamed, `false` or `undefined` otherwise.
|
|
1149
|
+
|
|
921
1150
|
#### Inherited from
|
|
922
1151
|
|
|
923
1152
|
[`ToolFunc`](ToolFunc.md).[`isStream`](ToolFunc.md#isstream)
|
|
@@ -928,7 +1157,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:357](https://github.com/isdk/ai-t
|
|
|
928
1157
|
|
|
929
1158
|
> **mergeTo**(`dest`, `options`?): `any`
|
|
930
1159
|
|
|
931
|
-
Defined in:
|
|
1160
|
+
Defined in: [property-manager.js/src/abstract.d.ts:164](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L164)
|
|
932
1161
|
|
|
933
1162
|
Merge this attributes to dest object.
|
|
934
1163
|
|
|
@@ -960,7 +1189,10 @@ the dest object.
|
|
|
960
1189
|
|
|
961
1190
|
> **obj2ArrParams**(`params`?): `any`[]
|
|
962
1191
|
|
|
963
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1192
|
+
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)
|
|
1193
|
+
|
|
1194
|
+
Converts a named parameters object into an array of positional arguments.
|
|
1195
|
+
This is used for functions defined with positional parameters.
|
|
964
1196
|
|
|
965
1197
|
#### Parameters
|
|
966
1198
|
|
|
@@ -968,10 +1200,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:282](https://github.com/isdk/ai-t
|
|
|
968
1200
|
|
|
969
1201
|
`any`
|
|
970
1202
|
|
|
1203
|
+
A named parameters object.
|
|
1204
|
+
|
|
971
1205
|
#### Returns
|
|
972
1206
|
|
|
973
1207
|
`any`[]
|
|
974
1208
|
|
|
1209
|
+
An array of positional arguments.
|
|
1210
|
+
|
|
975
1211
|
#### Inherited from
|
|
976
1212
|
|
|
977
1213
|
[`ToolFunc`](ToolFunc.md).[`obj2ArrParams`](ToolFunc.md#obj2arrparams)
|
|
@@ -982,7 +1218,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:282](https://github.com/isdk/ai-t
|
|
|
982
1218
|
|
|
983
1219
|
> **propertyIsEnumerable**(`v`): `boolean`
|
|
984
1220
|
|
|
985
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:152
|
|
1221
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:152
|
|
986
1222
|
|
|
987
1223
|
Determines whether a specified property is enumerable.
|
|
988
1224
|
|
|
@@ -1008,12 +1244,17 @@ A property name.
|
|
|
1008
1244
|
|
|
1009
1245
|
> **register**(): `boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
1010
1246
|
|
|
1011
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1247
|
+
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)
|
|
1248
|
+
|
|
1249
|
+
Registers the current `ToolFunc` instance into the static registry.
|
|
1250
|
+
Also registers any declared dependencies.
|
|
1012
1251
|
|
|
1013
1252
|
#### Returns
|
|
1014
1253
|
|
|
1015
1254
|
`boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
1016
1255
|
|
|
1256
|
+
The instance itself upon successful registration, or `false` if it already exists.
|
|
1257
|
+
|
|
1017
1258
|
#### Inherited from
|
|
1018
1259
|
|
|
1019
1260
|
[`ToolFunc`](ToolFunc.md).[`register`](ToolFunc.md#register)
|
|
@@ -1024,7 +1265,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:252](https://github.com/isdk/ai-t
|
|
|
1024
1265
|
|
|
1025
1266
|
> **run**(`params`?): `Promise`\<`any`\>
|
|
1026
1267
|
|
|
1027
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1268
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:686](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L686)
|
|
1269
|
+
|
|
1270
|
+
Executes the function asynchronously with a named parameters object.
|
|
1028
1271
|
|
|
1029
1272
|
#### Parameters
|
|
1030
1273
|
|
|
@@ -1032,10 +1275,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:309](https://github.com/isdk/ai-t
|
|
|
1032
1275
|
|
|
1033
1276
|
`any`
|
|
1034
1277
|
|
|
1278
|
+
The parameters object for the function.
|
|
1279
|
+
|
|
1035
1280
|
#### Returns
|
|
1036
1281
|
|
|
1037
1282
|
`Promise`\<`any`\>
|
|
1038
1283
|
|
|
1284
|
+
A promise that resolves with the function's result.
|
|
1285
|
+
|
|
1039
1286
|
#### Inherited from
|
|
1040
1287
|
|
|
1041
1288
|
[`ToolFunc`](ToolFunc.md).[`run`](ToolFunc.md#run)
|
|
@@ -1046,7 +1293,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:309](https://github.com/isdk/ai-t
|
|
|
1046
1293
|
|
|
1047
1294
|
> **runAs**(`name`, `params`?): `Promise`\<`any`\>
|
|
1048
1295
|
|
|
1049
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1296
|
+
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)
|
|
1297
|
+
|
|
1298
|
+
Asynchronously executes another registered function by name.
|
|
1299
|
+
This method delegates to `runAsSync()` internally.
|
|
1050
1300
|
|
|
1051
1301
|
#### Parameters
|
|
1052
1302
|
|
|
@@ -1054,14 +1304,20 @@ Defined in: [packages/ai-tool/src/tool-func.ts:313](https://github.com/isdk/ai-t
|
|
|
1054
1304
|
|
|
1055
1305
|
`string`
|
|
1056
1306
|
|
|
1307
|
+
The name of the target function to run.
|
|
1308
|
+
|
|
1057
1309
|
##### params?
|
|
1058
1310
|
|
|
1059
1311
|
`any`
|
|
1060
1312
|
|
|
1313
|
+
Optional parameters to pass to the function.
|
|
1314
|
+
|
|
1061
1315
|
#### Returns
|
|
1062
1316
|
|
|
1063
1317
|
`Promise`\<`any`\>
|
|
1064
1318
|
|
|
1319
|
+
A promise that resolves with the result of the function execution.
|
|
1320
|
+
|
|
1065
1321
|
#### Inherited from
|
|
1066
1322
|
|
|
1067
1323
|
[`ToolFunc`](ToolFunc.md).[`runAs`](ToolFunc.md#runas)
|
|
@@ -1072,7 +1328,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:313](https://github.com/isdk/ai-t
|
|
|
1072
1328
|
|
|
1073
1329
|
> **runAsSync**(`name`, `params`?): `any`
|
|
1074
1330
|
|
|
1075
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1331
|
+
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)
|
|
1332
|
+
|
|
1333
|
+
Synchronously executes another registered function by name.
|
|
1334
|
+
This is a convenience method that forwards the call to the static `runSync()` method.
|
|
1076
1335
|
|
|
1077
1336
|
#### Parameters
|
|
1078
1337
|
|
|
@@ -1080,14 +1339,20 @@ Defined in: [packages/ai-tool/src/tool-func.ts:317](https://github.com/isdk/ai-t
|
|
|
1080
1339
|
|
|
1081
1340
|
`string`
|
|
1082
1341
|
|
|
1342
|
+
The name of the target function to run.
|
|
1343
|
+
|
|
1083
1344
|
##### params?
|
|
1084
1345
|
|
|
1085
1346
|
`any`
|
|
1086
1347
|
|
|
1348
|
+
Optional parameters to pass to the function.
|
|
1349
|
+
|
|
1087
1350
|
#### Returns
|
|
1088
1351
|
|
|
1089
1352
|
`any`
|
|
1090
1353
|
|
|
1354
|
+
The result of the function execution.
|
|
1355
|
+
|
|
1091
1356
|
#### Inherited from
|
|
1092
1357
|
|
|
1093
1358
|
[`ToolFunc`](ToolFunc.md).[`runAsSync`](ToolFunc.md#runassync)
|
|
@@ -1098,7 +1363,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:317](https://github.com/isdk/ai-t
|
|
|
1098
1363
|
|
|
1099
1364
|
> **runSync**(`params`?): `any`
|
|
1100
1365
|
|
|
1101
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1366
|
+
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)
|
|
1367
|
+
|
|
1368
|
+
Executes the function synchronously with a named parameters object.
|
|
1102
1369
|
|
|
1103
1370
|
#### Parameters
|
|
1104
1371
|
|
|
@@ -1106,10 +1373,18 @@ Defined in: [packages/ai-tool/src/tool-func.ts:295](https://github.com/isdk/ai-t
|
|
|
1106
1373
|
|
|
1107
1374
|
`any`
|
|
1108
1375
|
|
|
1376
|
+
The parameters object for the function.
|
|
1377
|
+
|
|
1109
1378
|
#### Returns
|
|
1110
1379
|
|
|
1111
1380
|
`any`
|
|
1112
1381
|
|
|
1382
|
+
The result of the function execution.
|
|
1383
|
+
|
|
1384
|
+
#### Throws
|
|
1385
|
+
|
|
1386
|
+
Will throw an error if an array of parameters is passed to a function that expects an object.
|
|
1387
|
+
|
|
1113
1388
|
#### Inherited from
|
|
1114
1389
|
|
|
1115
1390
|
[`ToolFunc`](ToolFunc.md).[`runSync`](ToolFunc.md#runsync)
|
|
@@ -1120,7 +1395,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:295](https://github.com/isdk/ai-t
|
|
|
1120
1395
|
|
|
1121
1396
|
> **runWithPos**(...`params`): `Promise`\<`any`\>
|
|
1122
1397
|
|
|
1123
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1398
|
+
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)
|
|
1399
|
+
|
|
1400
|
+
Executes the function asynchronously using positional arguments.
|
|
1401
|
+
Delegates to `runWithPosSync()` internally.
|
|
1124
1402
|
|
|
1125
1403
|
#### Parameters
|
|
1126
1404
|
|
|
@@ -1128,10 +1406,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:338](https://github.com/isdk/ai-t
|
|
|
1128
1406
|
|
|
1129
1407
|
...`any`[]
|
|
1130
1408
|
|
|
1409
|
+
Positional arguments passed to the function.
|
|
1410
|
+
|
|
1131
1411
|
#### Returns
|
|
1132
1412
|
|
|
1133
1413
|
`Promise`\<`any`\>
|
|
1134
1414
|
|
|
1415
|
+
A promise that resolves with the result of the function execution.
|
|
1416
|
+
|
|
1135
1417
|
#### Inherited from
|
|
1136
1418
|
|
|
1137
1419
|
[`ToolFunc`](ToolFunc.md).[`runWithPos`](ToolFunc.md#runwithpos)
|
|
@@ -1142,7 +1424,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:338](https://github.com/isdk/ai-t
|
|
|
1142
1424
|
|
|
1143
1425
|
> **runWithPosAs**(`name`, ...`params`): `Promise`\<`any`\>
|
|
1144
1426
|
|
|
1145
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1427
|
+
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)
|
|
1428
|
+
|
|
1429
|
+
Asynchronously executes another function by name using positional arguments.
|
|
1430
|
+
Delegates to `runWithPosAsSync()` internally.
|
|
1146
1431
|
|
|
1147
1432
|
#### Parameters
|
|
1148
1433
|
|
|
@@ -1150,14 +1435,20 @@ Defined in: [packages/ai-tool/src/tool-func.ts:342](https://github.com/isdk/ai-t
|
|
|
1150
1435
|
|
|
1151
1436
|
`string`
|
|
1152
1437
|
|
|
1438
|
+
The name of the target function to run.
|
|
1439
|
+
|
|
1153
1440
|
##### params
|
|
1154
1441
|
|
|
1155
1442
|
...`any`[]
|
|
1156
1443
|
|
|
1444
|
+
Positional arguments to pass to the function.
|
|
1445
|
+
|
|
1157
1446
|
#### Returns
|
|
1158
1447
|
|
|
1159
1448
|
`Promise`\<`any`\>
|
|
1160
1449
|
|
|
1450
|
+
A promise that resolves with the result of the function execution.
|
|
1451
|
+
|
|
1161
1452
|
#### Inherited from
|
|
1162
1453
|
|
|
1163
1454
|
[`ToolFunc`](ToolFunc.md).[`runWithPosAs`](ToolFunc.md#runwithposas)
|
|
@@ -1168,7 +1459,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:342](https://github.com/isdk/ai-t
|
|
|
1168
1459
|
|
|
1169
1460
|
> **runWithPosAsSync**(`name`, ...`params`): `any`
|
|
1170
1461
|
|
|
1171
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1462
|
+
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)
|
|
1463
|
+
|
|
1464
|
+
Synchronously executes another function by name using positional arguments.
|
|
1465
|
+
This is a convenience wrapper around the static `runWithPosSync()` method.
|
|
1172
1466
|
|
|
1173
1467
|
#### Parameters
|
|
1174
1468
|
|
|
@@ -1176,14 +1470,20 @@ Defined in: [packages/ai-tool/src/tool-func.ts:334](https://github.com/isdk/ai-t
|
|
|
1176
1470
|
|
|
1177
1471
|
`string`
|
|
1178
1472
|
|
|
1473
|
+
The name of the target function to run.
|
|
1474
|
+
|
|
1179
1475
|
##### params
|
|
1180
1476
|
|
|
1181
1477
|
...`any`[]
|
|
1182
1478
|
|
|
1479
|
+
Positional arguments to pass to the function.
|
|
1480
|
+
|
|
1183
1481
|
#### Returns
|
|
1184
1482
|
|
|
1185
1483
|
`any`
|
|
1186
1484
|
|
|
1485
|
+
The result of the function execution.
|
|
1486
|
+
|
|
1187
1487
|
#### Inherited from
|
|
1188
1488
|
|
|
1189
1489
|
[`ToolFunc`](ToolFunc.md).[`runWithPosAsSync`](ToolFunc.md#runwithposassync)
|
|
@@ -1194,7 +1494,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:334](https://github.com/isdk/ai-t
|
|
|
1194
1494
|
|
|
1195
1495
|
> **runWithPosSync**(...`params`): `any`
|
|
1196
1496
|
|
|
1197
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1497
|
+
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)
|
|
1498
|
+
|
|
1499
|
+
Executes the function synchronously using positional arguments.
|
|
1500
|
+
If the function expects named parameters, it converts the arguments automatically.
|
|
1198
1501
|
|
|
1199
1502
|
#### Parameters
|
|
1200
1503
|
|
|
@@ -1202,10 +1505,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:327](https://github.com/isdk/ai-t
|
|
|
1202
1505
|
|
|
1203
1506
|
...`any`[]
|
|
1204
1507
|
|
|
1508
|
+
Positional arguments passed to the function.
|
|
1509
|
+
|
|
1205
1510
|
#### Returns
|
|
1206
1511
|
|
|
1207
1512
|
`any`
|
|
1208
1513
|
|
|
1514
|
+
The result of the function execution.
|
|
1515
|
+
|
|
1209
1516
|
#### Inherited from
|
|
1210
1517
|
|
|
1211
1518
|
[`ToolFunc`](ToolFunc.md).[`runWithPosSync`](ToolFunc.md#runwithpossync)
|
|
@@ -1216,7 +1523,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:327](https://github.com/isdk/ai-t
|
|
|
1216
1523
|
|
|
1217
1524
|
> **toJSON**(): `any`
|
|
1218
1525
|
|
|
1219
|
-
Defined in:
|
|
1526
|
+
Defined in: [property-manager.js/src/abstract.d.ts:182](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L182)
|
|
1220
1527
|
|
|
1221
1528
|
#### Returns
|
|
1222
1529
|
|
|
@@ -1232,7 +1539,7 @@ Defined in: node\_modules/.pnpm/property-manager@2.0.0/node\_modules/property-ma
|
|
|
1232
1539
|
|
|
1233
1540
|
> **toLocaleString**(): `string`
|
|
1234
1541
|
|
|
1235
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:131
|
|
1542
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:131
|
|
1236
1543
|
|
|
1237
1544
|
Returns a date converted to a string using the current locale.
|
|
1238
1545
|
|
|
@@ -1250,7 +1557,7 @@ Returns a date converted to a string using the current locale.
|
|
|
1250
1557
|
|
|
1251
1558
|
> **toObject**(`options`?): `any`
|
|
1252
1559
|
|
|
1253
|
-
Defined in:
|
|
1560
|
+
Defined in: [property-manager.js/src/abstract.d.ts:181](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L181)
|
|
1254
1561
|
|
|
1255
1562
|
Convert the attributes to the json object
|
|
1256
1563
|
|
|
@@ -1276,7 +1583,7 @@ the json object.
|
|
|
1276
1583
|
|
|
1277
1584
|
> **toString**(): `string`
|
|
1278
1585
|
|
|
1279
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:128
|
|
1586
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:128
|
|
1280
1587
|
|
|
1281
1588
|
Returns a string representation of an object.
|
|
1282
1589
|
|
|
@@ -1294,12 +1601,16 @@ Returns a string representation of an object.
|
|
|
1294
1601
|
|
|
1295
1602
|
> **unregister**(): `any`
|
|
1296
1603
|
|
|
1297
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1604
|
+
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)
|
|
1605
|
+
|
|
1606
|
+
Removes the current `ToolFunc` instance from the static registry.
|
|
1298
1607
|
|
|
1299
1608
|
#### Returns
|
|
1300
1609
|
|
|
1301
1610
|
`any`
|
|
1302
1611
|
|
|
1612
|
+
The instance that was unregistered.
|
|
1613
|
+
|
|
1303
1614
|
#### Inherited from
|
|
1304
1615
|
|
|
1305
1616
|
[`ToolFunc`](ToolFunc.md).[`unregister`](ToolFunc.md#unregister)
|
|
@@ -1310,7 +1621,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:265](https://github.com/isdk/ai-t
|
|
|
1310
1621
|
|
|
1311
1622
|
> **valueOf**(): `Object`
|
|
1312
1623
|
|
|
1313
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:134
|
|
1624
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:134
|
|
1314
1625
|
|
|
1315
1626
|
Returns the primitive value of the specified object.
|
|
1316
1627
|
|
|
@@ -1330,7 +1641,7 @@ Returns the primitive value of the specified object.
|
|
|
1330
1641
|
|
|
1331
1642
|
> `static` **assign**\<`T`, `U`\>(`target`, `source`): `T` & `U`
|
|
1332
1643
|
|
|
1333
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:286
|
|
1644
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:286
|
|
1334
1645
|
|
|
1335
1646
|
Copy the values of all of the enumerable own properties from one or more source objects to a
|
|
1336
1647
|
target object. Returns the target object.
|
|
@@ -1367,7 +1678,7 @@ The source object from which to copy properties.
|
|
|
1367
1678
|
|
|
1368
1679
|
> `static` **assign**\<`T`, `U`, `V`\>(`target`, `source1`, `source2`): `T` & `U` & `V`
|
|
1369
1680
|
|
|
1370
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:295
|
|
1681
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:295
|
|
1371
1682
|
|
|
1372
1683
|
Copy the values of all of the enumerable own properties from one or more source objects to a
|
|
1373
1684
|
target object. Returns the target object.
|
|
@@ -1412,7 +1723,7 @@ The second source object from which to copy properties.
|
|
|
1412
1723
|
|
|
1413
1724
|
> `static` **assign**\<`T`, `U`, `V`, `W`\>(`target`, `source1`, `source2`, `source3`): `T` & `U` & `V` & `W`
|
|
1414
1725
|
|
|
1415
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:305
|
|
1726
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:305
|
|
1416
1727
|
|
|
1417
1728
|
Copy the values of all of the enumerable own properties from one or more source objects to a
|
|
1418
1729
|
target object. Returns the target object.
|
|
@@ -1465,7 +1776,7 @@ The third source object from which to copy properties.
|
|
|
1465
1776
|
|
|
1466
1777
|
> `static` **assign**(`target`, ...`sources`): `any`
|
|
1467
1778
|
|
|
1468
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:313
|
|
1779
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:313
|
|
1469
1780
|
|
|
1470
1781
|
Copy the values of all of the enumerable own properties from one or more source objects to a
|
|
1471
1782
|
target object. Returns the target object.
|
|
@@ -1500,7 +1811,7 @@ One or more source objects from which to copy properties
|
|
|
1500
1811
|
|
|
1501
1812
|
> `static` **create**(`o`): `any`
|
|
1502
1813
|
|
|
1503
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:188
|
|
1814
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:188
|
|
1504
1815
|
|
|
1505
1816
|
Creates an object that has the specified prototype or that has null prototype.
|
|
1506
1817
|
|
|
@@ -1524,7 +1835,7 @@ Object to use as a prototype. May be null.
|
|
|
1524
1835
|
|
|
1525
1836
|
> `static` **create**(`o`, `properties`): `any`
|
|
1526
1837
|
|
|
1527
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:195
|
|
1838
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:195
|
|
1528
1839
|
|
|
1529
1840
|
Creates an object that has the specified prototype, and that optionally contains specified properties.
|
|
1530
1841
|
|
|
@@ -1556,7 +1867,7 @@ JavaScript object that contains one or more property descriptors.
|
|
|
1556
1867
|
|
|
1557
1868
|
> `static` **defineProperties**(`aTarget`, `aProperties`, `recreate`?): `any`
|
|
1558
1869
|
|
|
1559
|
-
Defined in:
|
|
1870
|
+
Defined in: [property-manager.js/src/advance.d.ts:11](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/advance.d.ts#L11)
|
|
1560
1871
|
|
|
1561
1872
|
Adds one or more properties to an object, and/or modifies attributes of existing properties.
|
|
1562
1873
|
|
|
@@ -1588,7 +1899,7 @@ Adds one or more properties to an object, and/or modifies attributes of existing
|
|
|
1588
1899
|
|
|
1589
1900
|
> `static` **defineProperty**\<`T`\>(`o`, `p`, `attributes`): `T`
|
|
1590
1901
|
|
|
1591
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:203
|
|
1902
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:203
|
|
1592
1903
|
|
|
1593
1904
|
Adds a property to an object, or modifies attributes of an existing property.
|
|
1594
1905
|
|
|
@@ -1632,7 +1943,7 @@ Descriptor for the property. It can be for a data property or an accessor proper
|
|
|
1632
1943
|
|
|
1633
1944
|
> `static` **entries**\<`T`\>(`o`): \[`string`, `T`\][]
|
|
1634
1945
|
|
|
1635
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:36
|
|
1946
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:36
|
|
1636
1947
|
|
|
1637
1948
|
Returns an array of key/values of the enumerable own properties of an object
|
|
1638
1949
|
|
|
@@ -1660,7 +1971,7 @@ Object that contains the properties and methods. This can be an object that you
|
|
|
1660
1971
|
|
|
1661
1972
|
> `static` **entries**(`o`): \[`string`, `any`\][]
|
|
1662
1973
|
|
|
1663
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:42
|
|
1974
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:42
|
|
1664
1975
|
|
|
1665
1976
|
Returns an array of key/values of the enumerable own properties of an object
|
|
1666
1977
|
|
|
@@ -1682,9 +1993,9 @@ Object that contains the properties and methods. This can be an object that you
|
|
|
1682
1993
|
|
|
1683
1994
|
### fetch()
|
|
1684
1995
|
|
|
1685
|
-
> `static` **fetch**(`name`, `objParam`?): `Promise`\<`any`\>
|
|
1996
|
+
> `static` **fetch**(`name`, `objParam`?, ...`args`?): `Promise`\<`any`\>
|
|
1686
1997
|
|
|
1687
|
-
Defined in: [packages/ai-tool/src/client-tools.ts:
|
|
1998
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:98](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/client-tools.ts#L98)
|
|
1688
1999
|
|
|
1689
2000
|
#### Parameters
|
|
1690
2001
|
|
|
@@ -1696,6 +2007,10 @@ Defined in: [packages/ai-tool/src/client-tools.ts:56](https://github.com/isdk/ai
|
|
|
1696
2007
|
|
|
1697
2008
|
`any`
|
|
1698
2009
|
|
|
2010
|
+
##### args?
|
|
2011
|
+
|
|
2012
|
+
...`any`[]
|
|
2013
|
+
|
|
1699
2014
|
#### Returns
|
|
1700
2015
|
|
|
1701
2016
|
`Promise`\<`any`\>
|
|
@@ -1708,7 +2023,7 @@ Defined in: [packages/ai-tool/src/client-tools.ts:56](https://github.com/isdk/ai
|
|
|
1708
2023
|
|
|
1709
2024
|
> `static` **freeze**\<`T`\>(`f`): `T`
|
|
1710
2025
|
|
|
1711
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:222
|
|
2026
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:222
|
|
1712
2027
|
|
|
1713
2028
|
Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
|
|
1714
2029
|
|
|
@@ -1736,7 +2051,7 @@ Object on which to lock the attributes.
|
|
|
1736
2051
|
|
|
1737
2052
|
> `static` **freeze**\<`T`, `U`\>(`o`): `Readonly`\<`T`\>
|
|
1738
2053
|
|
|
1739
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:228
|
|
2054
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:228
|
|
1740
2055
|
|
|
1741
2056
|
Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
|
|
1742
2057
|
|
|
@@ -1766,7 +2081,7 @@ Object on which to lock the attributes.
|
|
|
1766
2081
|
|
|
1767
2082
|
> `static` **freeze**\<`T`\>(`o`): `Readonly`\<`T`\>
|
|
1768
2083
|
|
|
1769
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:234
|
|
2084
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:234
|
|
1770
2085
|
|
|
1771
2086
|
Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
|
|
1772
2087
|
|
|
@@ -1798,7 +2113,7 @@ Object on which to lock the attributes.
|
|
|
1798
2113
|
|
|
1799
2114
|
> `static` **fromEntries**\<`T`\>(`entries`): `object`
|
|
1800
2115
|
|
|
1801
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2019.object.d.ts:26
|
|
2116
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2019.object.d.ts:26
|
|
1802
2117
|
|
|
1803
2118
|
Returns an object created by key-value entries for properties and methods
|
|
1804
2119
|
|
|
@@ -1826,7 +2141,7 @@ An iterable object that contains key-value entries for properties and methods.
|
|
|
1826
2141
|
|
|
1827
2142
|
> `static` **fromEntries**(`entries`): `any`
|
|
1828
2143
|
|
|
1829
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2019.object.d.ts:32
|
|
2144
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2019.object.d.ts:32
|
|
1830
2145
|
|
|
1831
2146
|
Returns an object created by key-value entries for properties and methods
|
|
1832
2147
|
|
|
@@ -1852,7 +2167,9 @@ An iterable object that contains key-value entries for properties and methods.
|
|
|
1852
2167
|
|
|
1853
2168
|
> `static` **get**(`name`): [`ToolFunc`](ToolFunc.md)
|
|
1854
2169
|
|
|
1855
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2170
|
+
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)
|
|
2171
|
+
|
|
2172
|
+
Retrieves a registered function by its name or alias.
|
|
1856
2173
|
|
|
1857
2174
|
#### Parameters
|
|
1858
2175
|
|
|
@@ -1860,10 +2177,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:61](https://github.com/isdk/ai-to
|
|
|
1860
2177
|
|
|
1861
2178
|
`string`
|
|
1862
2179
|
|
|
2180
|
+
The name or alias of the function to retrieve.
|
|
2181
|
+
|
|
1863
2182
|
#### Returns
|
|
1864
2183
|
|
|
1865
2184
|
[`ToolFunc`](ToolFunc.md)
|
|
1866
2185
|
|
|
2186
|
+
The `ToolFunc` instance if found, otherwise `undefined`.
|
|
2187
|
+
|
|
1867
2188
|
#### Inherited from
|
|
1868
2189
|
|
|
1869
2190
|
[`ToolFunc`](ToolFunc.md).[`get`](ToolFunc.md#get)
|
|
@@ -1874,7 +2195,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:61](https://github.com/isdk/ai-to
|
|
|
1874
2195
|
|
|
1875
2196
|
> `static` **getAllByTag**(`tagName`): [`ToolFunc`](ToolFunc.md)[]
|
|
1876
2197
|
|
|
1877
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2198
|
+
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)
|
|
2199
|
+
|
|
2200
|
+
Retrieves all registered functions that have a specific tag.
|
|
1878
2201
|
|
|
1879
2202
|
#### Parameters
|
|
1880
2203
|
|
|
@@ -1882,10 +2205,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:93](https://github.com/isdk/ai-to
|
|
|
1882
2205
|
|
|
1883
2206
|
`string`
|
|
1884
2207
|
|
|
2208
|
+
The tag to search for.
|
|
2209
|
+
|
|
1885
2210
|
#### Returns
|
|
1886
2211
|
|
|
1887
2212
|
[`ToolFunc`](ToolFunc.md)[]
|
|
1888
2213
|
|
|
2214
|
+
An array of matching `ToolFunc` instances.
|
|
2215
|
+
|
|
1889
2216
|
#### Inherited from
|
|
1890
2217
|
|
|
1891
2218
|
[`ToolFunc`](ToolFunc.md).[`getAllByTag`](ToolFunc.md#getallbytag)
|
|
@@ -1896,7 +2223,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:93](https://github.com/isdk/ai-to
|
|
|
1896
2223
|
|
|
1897
2224
|
> `static` **getByTag**(`tagName`): `undefined` \| [`ToolFunc`](ToolFunc.md)
|
|
1898
2225
|
|
|
1899
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2226
|
+
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)
|
|
2227
|
+
|
|
2228
|
+
Finds the first registered function that has a specific tag.
|
|
1900
2229
|
|
|
1901
2230
|
#### Parameters
|
|
1902
2231
|
|
|
@@ -1904,10 +2233,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:73](https://github.com/isdk/ai-to
|
|
|
1904
2233
|
|
|
1905
2234
|
`string`
|
|
1906
2235
|
|
|
2236
|
+
The tag to search for.
|
|
2237
|
+
|
|
1907
2238
|
#### Returns
|
|
1908
2239
|
|
|
1909
2240
|
`undefined` \| [`ToolFunc`](ToolFunc.md)
|
|
1910
2241
|
|
|
2242
|
+
The first matching `ToolFunc` instance, or `undefined` if none is found.
|
|
2243
|
+
|
|
1911
2244
|
#### Inherited from
|
|
1912
2245
|
|
|
1913
2246
|
[`ToolFunc`](ToolFunc.md).[`getByTag`](ToolFunc.md#getbytag)
|
|
@@ -1918,7 +2251,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:73](https://github.com/isdk/ai-to
|
|
|
1918
2251
|
|
|
1919
2252
|
> `static` **getFunc**(`name`): `any`
|
|
1920
2253
|
|
|
1921
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2254
|
+
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)
|
|
2255
|
+
|
|
2256
|
+
Retrieves a bound, runnable function reference for a registered function.
|
|
2257
|
+
This reference is suitable for execution with an object of named parameters.
|
|
1922
2258
|
|
|
1923
2259
|
#### Parameters
|
|
1924
2260
|
|
|
@@ -1926,10 +2262,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:134](https://github.com/isdk/ai-t
|
|
|
1926
2262
|
|
|
1927
2263
|
`string`
|
|
1928
2264
|
|
|
2265
|
+
The name of the function.
|
|
2266
|
+
|
|
1929
2267
|
#### Returns
|
|
1930
2268
|
|
|
1931
2269
|
`any`
|
|
1932
2270
|
|
|
2271
|
+
A bound function reference, or `undefined` if not found.
|
|
2272
|
+
|
|
1933
2273
|
#### Inherited from
|
|
1934
2274
|
|
|
1935
2275
|
[`ToolFunc`](ToolFunc.md).[`getFunc`](ToolFunc.md#getfunc-2)
|
|
@@ -1940,7 +2280,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:134](https://github.com/isdk/ai-t
|
|
|
1940
2280
|
|
|
1941
2281
|
> `static` **getFuncWithPos**(`name`): `any`
|
|
1942
2282
|
|
|
1943
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2283
|
+
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)
|
|
2284
|
+
|
|
2285
|
+
Retrieves a bound, runnable function reference for a registered function.
|
|
2286
|
+
This reference is suitable for execution with positional arguments.
|
|
1944
2287
|
|
|
1945
2288
|
#### Parameters
|
|
1946
2289
|
|
|
@@ -1948,10 +2291,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:155](https://github.com/isdk/ai-t
|
|
|
1948
2291
|
|
|
1949
2292
|
`string`
|
|
1950
2293
|
|
|
2294
|
+
The name of the function.
|
|
2295
|
+
|
|
1951
2296
|
#### Returns
|
|
1952
2297
|
|
|
1953
2298
|
`any`
|
|
1954
2299
|
|
|
2300
|
+
A bound function reference, or `undefined` if not found.
|
|
2301
|
+
|
|
1955
2302
|
#### Inherited from
|
|
1956
2303
|
|
|
1957
2304
|
[`ToolFunc`](ToolFunc.md).[`getFuncWithPos`](ToolFunc.md#getfuncwithpos-2)
|
|
@@ -1962,7 +2309,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:155](https://github.com/isdk/ai-t
|
|
|
1962
2309
|
|
|
1963
2310
|
> `static` **getOwnPropertyDescriptor**(`o`, `p`): `undefined` \| `PropertyDescriptor`
|
|
1964
2311
|
|
|
1965
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:175
|
|
2312
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:175
|
|
1966
2313
|
|
|
1967
2314
|
Gets the own property descriptor of the specified object.
|
|
1968
2315
|
An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.
|
|
@@ -1995,7 +2342,7 @@ Name of the property.
|
|
|
1995
2342
|
|
|
1996
2343
|
> `static` **getOwnPropertyDescriptors**\<`T`\>(`o`): \{ \[P in string \| number \| symbol\]: TypedPropertyDescriptor\<T\[P\]\> \} & `object`
|
|
1997
2344
|
|
|
1998
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:48
|
|
2345
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:48
|
|
1999
2346
|
|
|
2000
2347
|
Returns an object containing all own property descriptors of an object
|
|
2001
2348
|
|
|
@@ -2025,7 +2372,7 @@ Object that contains the properties and methods. This can be an object that you
|
|
|
2025
2372
|
|
|
2026
2373
|
> `static` **getOwnPropertyNames**(`o`): `string`[]
|
|
2027
2374
|
|
|
2028
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:182
|
|
2375
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:182
|
|
2029
2376
|
|
|
2030
2377
|
Returns the names of the own properties of an object. The own properties of an object are those that are defined directly
|
|
2031
2378
|
on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.
|
|
@@ -2052,7 +2399,7 @@ Object that contains the own properties.
|
|
|
2052
2399
|
|
|
2053
2400
|
> `static` **getOwnPropertySymbols**(`o`): `symbol`[]
|
|
2054
2401
|
|
|
2055
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:319
|
|
2402
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:319
|
|
2056
2403
|
|
|
2057
2404
|
Returns an array of all symbol properties found directly on object o.
|
|
2058
2405
|
|
|
@@ -2078,7 +2425,7 @@ Object to retrieve the symbols from.
|
|
|
2078
2425
|
|
|
2079
2426
|
> `static` **getProperties**(): `PropDescriptors`
|
|
2080
2427
|
|
|
2081
|
-
Defined in:
|
|
2428
|
+
Defined in: [property-manager.js/src/advance.d.ts:10](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/advance.d.ts#L10)
|
|
2082
2429
|
|
|
2083
2430
|
get all properties descriptor include inherited.
|
|
2084
2431
|
|
|
@@ -2096,7 +2443,7 @@ get all properties descriptor include inherited.
|
|
|
2096
2443
|
|
|
2097
2444
|
> `static` **getPrototypeOf**(`o`): `any`
|
|
2098
2445
|
|
|
2099
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:167
|
|
2446
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:167
|
|
2100
2447
|
|
|
2101
2448
|
Returns the prototype of an object.
|
|
2102
2449
|
|
|
@@ -2122,7 +2469,9 @@ The object that references the prototype.
|
|
|
2122
2469
|
|
|
2123
2470
|
> `static` **hasAsyncFeature**(`feature`): `boolean`
|
|
2124
2471
|
|
|
2125
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2472
|
+
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)
|
|
2473
|
+
|
|
2474
|
+
Checks if any registered function has a specific asynchronous feature.
|
|
2126
2475
|
|
|
2127
2476
|
#### Parameters
|
|
2128
2477
|
|
|
@@ -2130,10 +2479,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:111](https://github.com/isdk/ai-t
|
|
|
2130
2479
|
|
|
2131
2480
|
[`AsyncFeatureBits`](../enumerations/AsyncFeatureBits.md)
|
|
2132
2481
|
|
|
2482
|
+
The async feature bit to check for.
|
|
2483
|
+
|
|
2133
2484
|
#### Returns
|
|
2134
2485
|
|
|
2135
2486
|
`boolean`
|
|
2136
2487
|
|
|
2488
|
+
`true` if the feature is present in any function, otherwise `false`.
|
|
2489
|
+
|
|
2137
2490
|
#### Inherited from
|
|
2138
2491
|
|
|
2139
2492
|
[`ToolFunc`](ToolFunc.md).[`hasAsyncFeature`](ToolFunc.md#hasasyncfeature-2)
|
|
@@ -2144,7 +2497,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:111](https://github.com/isdk/ai-t
|
|
|
2144
2497
|
|
|
2145
2498
|
> `static` **hasOwn**(`o`, `v`): `boolean`
|
|
2146
2499
|
|
|
2147
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2022.object.d.ts:25
|
|
2500
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2022.object.d.ts:25
|
|
2148
2501
|
|
|
2149
2502
|
Determines whether an object has a property with the specified name.
|
|
2150
2503
|
|
|
@@ -2176,7 +2529,7 @@ A property name.
|
|
|
2176
2529
|
|
|
2177
2530
|
> `static` **is**(`value1`, `value2`): `boolean`
|
|
2178
2531
|
|
|
2179
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:332
|
|
2532
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:332
|
|
2180
2533
|
|
|
2181
2534
|
Returns true if the values are the same value, false otherwise.
|
|
2182
2535
|
|
|
@@ -2208,7 +2561,7 @@ The second value.
|
|
|
2208
2561
|
|
|
2209
2562
|
> `static` **isExtensible**(`o`): `boolean`
|
|
2210
2563
|
|
|
2211
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:258
|
|
2564
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:258
|
|
2212
2565
|
|
|
2213
2566
|
Returns a value that indicates whether new properties can be added to an object.
|
|
2214
2567
|
|
|
@@ -2234,7 +2587,7 @@ Object to test.
|
|
|
2234
2587
|
|
|
2235
2588
|
> `static` **isFrozen**(`o`): `boolean`
|
|
2236
2589
|
|
|
2237
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:252
|
|
2590
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:252
|
|
2238
2591
|
|
|
2239
2592
|
Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.
|
|
2240
2593
|
|
|
@@ -2260,7 +2613,7 @@ Object to test.
|
|
|
2260
2613
|
|
|
2261
2614
|
> `static` **isSealed**(`o`): `boolean`
|
|
2262
2615
|
|
|
2263
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:246
|
|
2616
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:246
|
|
2264
2617
|
|
|
2265
2618
|
Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.
|
|
2266
2619
|
|
|
@@ -2288,7 +2641,7 @@ Object to test.
|
|
|
2288
2641
|
|
|
2289
2642
|
> `static` **keys**(`o`): `string`[]
|
|
2290
2643
|
|
|
2291
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:264
|
|
2644
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:264
|
|
2292
2645
|
|
|
2293
2646
|
Returns the names of the enumerable string properties and methods of an object.
|
|
2294
2647
|
|
|
@@ -2312,7 +2665,7 @@ Object that contains the properties and methods. This can be an object that you
|
|
|
2312
2665
|
|
|
2313
2666
|
> `static` **keys**(`o`): `string`[]
|
|
2314
2667
|
|
|
2315
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:325
|
|
2668
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:325
|
|
2316
2669
|
|
|
2317
2670
|
Returns the names of the enumerable string properties and methods of an object.
|
|
2318
2671
|
|
|
@@ -2336,12 +2689,16 @@ Object that contains the properties and methods. This can be an object that you
|
|
|
2336
2689
|
|
|
2337
2690
|
> `static` **list**(): [`Funcs`](../interfaces/Funcs.md)
|
|
2338
2691
|
|
|
2339
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2692
|
+
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)
|
|
2693
|
+
|
|
2694
|
+
Returns the complete map of all registered functions.
|
|
2340
2695
|
|
|
2341
2696
|
#### Returns
|
|
2342
2697
|
|
|
2343
2698
|
[`Funcs`](../interfaces/Funcs.md)
|
|
2344
2699
|
|
|
2700
|
+
The map of `ToolFunc` instances.
|
|
2701
|
+
|
|
2345
2702
|
#### Inherited from
|
|
2346
2703
|
|
|
2347
2704
|
[`ToolFunc`](ToolFunc.md).[`list`](ToolFunc.md#list)
|
|
@@ -2350,13 +2707,22 @@ Defined in: [packages/ai-tool/src/tool-func.ts:69](https://github.com/isdk/ai-to
|
|
|
2350
2707
|
|
|
2351
2708
|
### loadFrom()
|
|
2352
2709
|
|
|
2353
|
-
> `static` **loadFrom**(): `Promise
|
|
2710
|
+
> `static` **loadFrom**(`items`?): `Promise`\<[`Funcs`](../interfaces/Funcs.md)\>
|
|
2354
2711
|
|
|
2355
|
-
Defined in: [packages/ai-tool/src/client-tools.ts:
|
|
2712
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:68](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/client-tools.ts#L68)
|
|
2713
|
+
|
|
2714
|
+
Loads tool definitions from the remote server via the configured transport.
|
|
2715
|
+
This method populates the local `ToolFunc` registry with `ClientTools` stubs.
|
|
2716
|
+
|
|
2717
|
+
#### Parameters
|
|
2718
|
+
|
|
2719
|
+
##### items?
|
|
2720
|
+
|
|
2721
|
+
[`Funcs`](../interfaces/Funcs.md)
|
|
2356
2722
|
|
|
2357
2723
|
#### Returns
|
|
2358
2724
|
|
|
2359
|
-
`Promise
|
|
2725
|
+
`Promise`\<[`Funcs`](../interfaces/Funcs.md)\>
|
|
2360
2726
|
|
|
2361
2727
|
***
|
|
2362
2728
|
|
|
@@ -2364,7 +2730,10 @@ Defined in: [packages/ai-tool/src/client-tools.ts:29](https://github.com/isdk/ai
|
|
|
2364
2730
|
|
|
2365
2731
|
> `static` **loadFromSync**(`items`): `void`
|
|
2366
2732
|
|
|
2367
|
-
Defined in: [packages/ai-tool/src/client-tools.ts:
|
|
2733
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:84](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/client-tools.ts#L84)
|
|
2734
|
+
|
|
2735
|
+
Synchronously loads tool definitions from a provided object, registering
|
|
2736
|
+
each one as a `ClientTools` instance.
|
|
2368
2737
|
|
|
2369
2738
|
#### Parameters
|
|
2370
2739
|
|
|
@@ -2372,6 +2741,8 @@ Defined in: [packages/ai-tool/src/client-tools.ts:41](https://github.com/isdk/ai
|
|
|
2372
2741
|
|
|
2373
2742
|
[`Funcs`](../interfaces/Funcs.md)
|
|
2374
2743
|
|
|
2744
|
+
A map of tool function metadata, typically from a server.
|
|
2745
|
+
|
|
2375
2746
|
#### Returns
|
|
2376
2747
|
|
|
2377
2748
|
`void`
|
|
@@ -2382,7 +2753,7 @@ Defined in: [packages/ai-tool/src/client-tools.ts:41](https://github.com/isdk/ai
|
|
|
2382
2753
|
|
|
2383
2754
|
> `static` **preventExtensions**\<`T`\>(`o`): `T`
|
|
2384
2755
|
|
|
2385
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:240
|
|
2756
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:240
|
|
2386
2757
|
|
|
2387
2758
|
Prevents the addition of new properties to an object.
|
|
2388
2759
|
|
|
@@ -2414,7 +2785,9 @@ Object to make non-extensible.
|
|
|
2414
2785
|
|
|
2415
2786
|
> `static` **register**(`name`, `options`): `boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2416
2787
|
|
|
2417
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2788
|
+
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)
|
|
2789
|
+
|
|
2790
|
+
Registers a new tool function.
|
|
2418
2791
|
|
|
2419
2792
|
##### Parameters
|
|
2420
2793
|
|
|
@@ -2422,14 +2795,24 @@ Defined in: [packages/ai-tool/src/tool-func.ts:160](https://github.com/isdk/ai-t
|
|
|
2422
2795
|
|
|
2423
2796
|
`string`
|
|
2424
2797
|
|
|
2798
|
+
The name of the function.
|
|
2799
|
+
|
|
2425
2800
|
###### options
|
|
2426
2801
|
|
|
2427
2802
|
[`FuncItem`](../interfaces/FuncItem.md)
|
|
2428
2803
|
|
|
2804
|
+
The function's configuration.
|
|
2805
|
+
|
|
2429
2806
|
##### Returns
|
|
2430
2807
|
|
|
2431
2808
|
`boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2432
2809
|
|
|
2810
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2811
|
+
|
|
2812
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2813
|
+
|
|
2814
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2815
|
+
|
|
2433
2816
|
##### Inherited from
|
|
2434
2817
|
|
|
2435
2818
|
[`ToolFunc`](ToolFunc.md).[`register`](ToolFunc.md#register-2)
|
|
@@ -2438,7 +2821,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:160](https://github.com/isdk/ai-t
|
|
|
2438
2821
|
|
|
2439
2822
|
> `static` **register**(`func`, `options`): `boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2440
2823
|
|
|
2441
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2824
|
+
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)
|
|
2825
|
+
|
|
2826
|
+
Registers a new tool function.
|
|
2442
2827
|
|
|
2443
2828
|
##### Parameters
|
|
2444
2829
|
|
|
@@ -2446,14 +2831,24 @@ Defined in: [packages/ai-tool/src/tool-func.ts:161](https://github.com/isdk/ai-t
|
|
|
2446
2831
|
|
|
2447
2832
|
`Function`
|
|
2448
2833
|
|
|
2834
|
+
The function implementation.
|
|
2835
|
+
|
|
2449
2836
|
###### options
|
|
2450
2837
|
|
|
2451
2838
|
[`FuncItem`](../interfaces/FuncItem.md)
|
|
2452
2839
|
|
|
2840
|
+
The function's configuration.
|
|
2841
|
+
|
|
2453
2842
|
##### Returns
|
|
2454
2843
|
|
|
2455
2844
|
`boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2456
2845
|
|
|
2846
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2847
|
+
|
|
2848
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2849
|
+
|
|
2850
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2851
|
+
|
|
2457
2852
|
##### Inherited from
|
|
2458
2853
|
|
|
2459
2854
|
[`ToolFunc`](ToolFunc.md).[`register`](ToolFunc.md#register-2)
|
|
@@ -2462,22 +2857,34 @@ Defined in: [packages/ai-tool/src/tool-func.ts:161](https://github.com/isdk/ai-t
|
|
|
2462
2857
|
|
|
2463
2858
|
> `static` **register**(`name`, `options`?): `boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2464
2859
|
|
|
2465
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2860
|
+
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)
|
|
2861
|
+
|
|
2862
|
+
Registers a new tool function.
|
|
2466
2863
|
|
|
2467
2864
|
##### Parameters
|
|
2468
2865
|
|
|
2469
2866
|
###### name
|
|
2470
2867
|
|
|
2868
|
+
The name of the function.
|
|
2869
|
+
|
|
2471
2870
|
`string` | `Function` | [`ToolFunc`](ToolFunc.md) | [`FuncItem`](../interfaces/FuncItem.md)
|
|
2472
2871
|
|
|
2473
2872
|
###### options?
|
|
2474
2873
|
|
|
2475
2874
|
[`FuncItem`](../interfaces/FuncItem.md)
|
|
2476
2875
|
|
|
2876
|
+
The function's configuration.
|
|
2877
|
+
|
|
2477
2878
|
##### Returns
|
|
2478
2879
|
|
|
2479
2880
|
`boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2480
2881
|
|
|
2882
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2883
|
+
|
|
2884
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2885
|
+
|
|
2886
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2887
|
+
|
|
2481
2888
|
##### Inherited from
|
|
2482
2889
|
|
|
2483
2890
|
[`ToolFunc`](ToolFunc.md).[`register`](ToolFunc.md#register-2)
|
|
@@ -2488,7 +2895,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:162](https://github.com/isdk/ai-t
|
|
|
2488
2895
|
|
|
2489
2896
|
> `static` **run**(`name`, `params`?): `Promise`\<`any`\>
|
|
2490
2897
|
|
|
2491
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2898
|
+
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)
|
|
2899
|
+
|
|
2900
|
+
Asynchronously executes a registered function by name with named parameters.
|
|
2492
2901
|
|
|
2493
2902
|
#### Parameters
|
|
2494
2903
|
|
|
@@ -2496,14 +2905,24 @@ Defined in: [packages/ai-tool/src/tool-func.ts:118](https://github.com/isdk/ai-t
|
|
|
2496
2905
|
|
|
2497
2906
|
`string`
|
|
2498
2907
|
|
|
2908
|
+
The name of the function to run.
|
|
2909
|
+
|
|
2499
2910
|
##### params?
|
|
2500
2911
|
|
|
2501
2912
|
`any`
|
|
2502
2913
|
|
|
2914
|
+
The parameters object for the function.
|
|
2915
|
+
|
|
2503
2916
|
#### Returns
|
|
2504
2917
|
|
|
2505
2918
|
`Promise`\<`any`\>
|
|
2506
2919
|
|
|
2920
|
+
A promise that resolves with the function's result.
|
|
2921
|
+
|
|
2922
|
+
#### Throws
|
|
2923
|
+
|
|
2924
|
+
If the function with the given name is not found.
|
|
2925
|
+
|
|
2507
2926
|
#### Inherited from
|
|
2508
2927
|
|
|
2509
2928
|
[`ToolFunc`](ToolFunc.md).[`run`](ToolFunc.md#run-2)
|
|
@@ -2514,7 +2933,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:118](https://github.com/isdk/ai-t
|
|
|
2514
2933
|
|
|
2515
2934
|
> `static` **runSync**(`name`, `params`?): `any`
|
|
2516
2935
|
|
|
2517
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2936
|
+
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)
|
|
2937
|
+
|
|
2938
|
+
Synchronously executes a registered function by name with named parameters.
|
|
2518
2939
|
|
|
2519
2940
|
#### Parameters
|
|
2520
2941
|
|
|
@@ -2522,14 +2943,24 @@ Defined in: [packages/ai-tool/src/tool-func.ts:126](https://github.com/isdk/ai-t
|
|
|
2522
2943
|
|
|
2523
2944
|
`string`
|
|
2524
2945
|
|
|
2946
|
+
The name of the function to run.
|
|
2947
|
+
|
|
2525
2948
|
##### params?
|
|
2526
2949
|
|
|
2527
2950
|
`any`
|
|
2528
2951
|
|
|
2952
|
+
The parameters object for the function.
|
|
2953
|
+
|
|
2529
2954
|
#### Returns
|
|
2530
2955
|
|
|
2531
2956
|
`any`
|
|
2532
2957
|
|
|
2958
|
+
The result of the function's execution.
|
|
2959
|
+
|
|
2960
|
+
#### Throws
|
|
2961
|
+
|
|
2962
|
+
If the function with the given name is not found.
|
|
2963
|
+
|
|
2533
2964
|
#### Inherited from
|
|
2534
2965
|
|
|
2535
2966
|
[`ToolFunc`](ToolFunc.md).[`runSync`](ToolFunc.md#runsync-2)
|
|
@@ -2540,7 +2971,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:126](https://github.com/isdk/ai-t
|
|
|
2540
2971
|
|
|
2541
2972
|
> `static` **runWithPos**(`name`, ...`params`): `Promise`\<`any`\>
|
|
2542
2973
|
|
|
2543
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2974
|
+
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)
|
|
2975
|
+
|
|
2976
|
+
Asynchronously executes a function using positional arguments.
|
|
2544
2977
|
|
|
2545
2978
|
#### Parameters
|
|
2546
2979
|
|
|
@@ -2548,14 +2981,24 @@ Defined in: [packages/ai-tool/src/tool-func.ts:139](https://github.com/isdk/ai-t
|
|
|
2548
2981
|
|
|
2549
2982
|
`string`
|
|
2550
2983
|
|
|
2984
|
+
The name of the function to run.
|
|
2985
|
+
|
|
2551
2986
|
##### params
|
|
2552
2987
|
|
|
2553
2988
|
...`any`[]
|
|
2554
2989
|
|
|
2990
|
+
Positional arguments to pass to the function.
|
|
2991
|
+
|
|
2555
2992
|
#### Returns
|
|
2556
2993
|
|
|
2557
2994
|
`Promise`\<`any`\>
|
|
2558
2995
|
|
|
2996
|
+
A promise that resolves with the function's result.
|
|
2997
|
+
|
|
2998
|
+
#### Throws
|
|
2999
|
+
|
|
3000
|
+
If the function with the given name is not found.
|
|
3001
|
+
|
|
2559
3002
|
#### Inherited from
|
|
2560
3003
|
|
|
2561
3004
|
[`ToolFunc`](ToolFunc.md).[`runWithPos`](ToolFunc.md#runwithpos-2)
|
|
@@ -2566,7 +3009,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:139](https://github.com/isdk/ai-t
|
|
|
2566
3009
|
|
|
2567
3010
|
> `static` **runWithPosSync**(`name`, ...`params`): `any`
|
|
2568
3011
|
|
|
2569
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
3012
|
+
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)
|
|
3013
|
+
|
|
3014
|
+
Synchronously executes a function using positional arguments.
|
|
2570
3015
|
|
|
2571
3016
|
#### Parameters
|
|
2572
3017
|
|
|
@@ -2574,14 +3019,24 @@ Defined in: [packages/ai-tool/src/tool-func.ts:147](https://github.com/isdk/ai-t
|
|
|
2574
3019
|
|
|
2575
3020
|
`string`
|
|
2576
3021
|
|
|
3022
|
+
The name of the function to run.
|
|
3023
|
+
|
|
2577
3024
|
##### params
|
|
2578
3025
|
|
|
2579
3026
|
...`any`[]
|
|
2580
3027
|
|
|
3028
|
+
Positional arguments to pass to the function.
|
|
3029
|
+
|
|
2581
3030
|
#### Returns
|
|
2582
3031
|
|
|
2583
3032
|
`any`
|
|
2584
3033
|
|
|
3034
|
+
The result of the function's execution.
|
|
3035
|
+
|
|
3036
|
+
#### Throws
|
|
3037
|
+
|
|
3038
|
+
If the function with the given name is not found.
|
|
3039
|
+
|
|
2585
3040
|
#### Inherited from
|
|
2586
3041
|
|
|
2587
3042
|
[`ToolFunc`](ToolFunc.md).[`runWithPosSync`](ToolFunc.md#runwithpossync-2)
|
|
@@ -2592,7 +3047,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:147](https://github.com/isdk/ai-t
|
|
|
2592
3047
|
|
|
2593
3048
|
> `static` **seal**\<`T`\>(`o`): `T`
|
|
2594
3049
|
|
|
2595
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:216
|
|
3050
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:216
|
|
2596
3051
|
|
|
2597
3052
|
Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
|
|
2598
3053
|
|
|
@@ -2618,29 +3073,11 @@ Object on which to lock the attributes.
|
|
|
2618
3073
|
|
|
2619
3074
|
***
|
|
2620
3075
|
|
|
2621
|
-
### setApiRoot()
|
|
2622
|
-
|
|
2623
|
-
> `static` **setApiRoot**(`v`): `void`
|
|
2624
|
-
|
|
2625
|
-
Defined in: [packages/ai-tool/src/client-tools.ts:23](https://github.com/isdk/ai-tool.js/blob/b0ee9498dddfa5222989cf00502bb34c601df743/src/client-tools.ts#L23)
|
|
2626
|
-
|
|
2627
|
-
#### Parameters
|
|
2628
|
-
|
|
2629
|
-
##### v
|
|
2630
|
-
|
|
2631
|
-
`string`
|
|
2632
|
-
|
|
2633
|
-
#### Returns
|
|
2634
|
-
|
|
2635
|
-
`void`
|
|
2636
|
-
|
|
2637
|
-
***
|
|
2638
|
-
|
|
2639
3076
|
### setPrototypeOf()
|
|
2640
3077
|
|
|
2641
3078
|
> `static` **setPrototypeOf**(`o`, `proto`): `any`
|
|
2642
3079
|
|
|
2643
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:339
|
|
3080
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:339
|
|
2644
3081
|
|
|
2645
3082
|
Sets the prototype of a specified object o to object proto or null. Returns the object o.
|
|
2646
3083
|
|
|
@@ -2668,11 +3105,36 @@ The value of the new prototype or null.
|
|
|
2668
3105
|
|
|
2669
3106
|
***
|
|
2670
3107
|
|
|
3108
|
+
### setTransport()
|
|
3109
|
+
|
|
3110
|
+
> `static` **setTransport**(`transport`): `void`
|
|
3111
|
+
|
|
3112
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:50](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/client-tools.ts#L50)
|
|
3113
|
+
|
|
3114
|
+
Injects the client-side transport implementation. This is a crucial step
|
|
3115
|
+
to enable communication with the server.
|
|
3116
|
+
|
|
3117
|
+
#### Parameters
|
|
3118
|
+
|
|
3119
|
+
##### transport
|
|
3120
|
+
|
|
3121
|
+
[`IClientToolTransport`](../interfaces/IClientToolTransport.md)
|
|
3122
|
+
|
|
3123
|
+
The transport instance to use for all client-server communication.
|
|
3124
|
+
|
|
3125
|
+
#### Returns
|
|
3126
|
+
|
|
3127
|
+
`void`
|
|
3128
|
+
|
|
3129
|
+
***
|
|
3130
|
+
|
|
2671
3131
|
### unregister()
|
|
2672
3132
|
|
|
2673
3133
|
> `static` **unregister**(`name`): `undefined` \| [`ToolFunc`](ToolFunc.md)
|
|
2674
3134
|
|
|
2675
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
3135
|
+
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)
|
|
3136
|
+
|
|
3137
|
+
Unregisters a function by its name, also removing any associated aliases.
|
|
2676
3138
|
|
|
2677
3139
|
#### Parameters
|
|
2678
3140
|
|
|
@@ -2680,10 +3142,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:207](https://github.com/isdk/ai-t
|
|
|
2680
3142
|
|
|
2681
3143
|
`string`
|
|
2682
3144
|
|
|
3145
|
+
The name of the function to unregister.
|
|
3146
|
+
|
|
2683
3147
|
#### Returns
|
|
2684
3148
|
|
|
2685
3149
|
`undefined` \| [`ToolFunc`](ToolFunc.md)
|
|
2686
3150
|
|
|
3151
|
+
The unregistered `ToolFunc` instance, or `undefined` if it was not found.
|
|
3152
|
+
|
|
2687
3153
|
#### Inherited from
|
|
2688
3154
|
|
|
2689
3155
|
[`ToolFunc`](ToolFunc.md).[`unregister`](ToolFunc.md#unregister-2)
|
|
@@ -2696,7 +3162,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:207](https://github.com/isdk/ai-t
|
|
|
2696
3162
|
|
|
2697
3163
|
> `static` **values**\<`T`\>(`o`): `T`[]
|
|
2698
3164
|
|
|
2699
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:24
|
|
3165
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:24
|
|
2700
3166
|
|
|
2701
3167
|
Returns an array of values of the enumerable own properties of an object
|
|
2702
3168
|
|
|
@@ -2724,7 +3190,7 @@ Object that contains the properties and methods. This can be an object that you
|
|
|
2724
3190
|
|
|
2725
3191
|
> `static` **values**(`o`): `any`[]
|
|
2726
3192
|
|
|
2727
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:30
|
|
3193
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:30
|
|
2728
3194
|
|
|
2729
3195
|
Returns an array of values of the enumerable own properties of an object
|
|
2730
3196
|
|