@isdk/ai-tool 0.5.8 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.cn.md +103 -237
- package/README.md +101 -186
- package/dist/chunk-LNTIQQNN.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-BCco-g_I.d.mts +1781 -0
- package/dist/index-BCco-g_I.d.ts +1781 -0
- package/dist/index.d.mts +1083 -650
- package/dist/index.d.ts +1083 -650
- 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 +642 -180
- package/docs/{classes → api/classes}/CommonError.md +139 -54
- package/docs/api/classes/ConfigFile.md +218 -0
- package/docs/{classes → api/classes}/EnvPromptTemplate.md +308 -65
- package/docs/{classes → api/classes}/EventClient.md +725 -232
- package/docs/{classes → api/classes}/EventEmitter.md +12 -12
- package/docs/{classes → api/classes}/EventServer.md +658 -205
- package/docs/{classes → api/classes}/EventToolFunc.md +561 -109
- package/docs/{classes → api/classes}/FStringPromptTemplate.md +309 -66
- package/docs/{classes → api/classes}/FewShotPromptTemplate.md +290 -63
- package/docs/{classes → api/classes}/GolangPromptTemplate.md +308 -65
- package/docs/api/classes/HttpClientToolTransport.md +324 -0
- package/docs/api/classes/HttpServerToolTransport.md +324 -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 +303 -63
- package/docs/api/classes/ReadableStreamError.md +451 -0
- package/docs/api/classes/ResClientTools.md +2878 -0
- package/docs/api/classes/ResServerTools.md +2856 -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 +579 -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/api/functions/expandConfig.md +25 -0
- package/docs/{functions → api/functions}/expandEnv.md +4 -4
- package/docs/{functions → api/functions}/expandObjEnv.md +4 -4
- 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 +4 -4
- 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/api/functions/parseYaml.md +45 -0
- 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 +7 -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/api/functions/registerYamlTag.md +37 -0
- 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 +4 -4
- package/docs/{functions → api/functions}/sanitizeFilepath.md +4 -4
- 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/api/functions/stringifyYaml.md +45 -0
- 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} +44 -24
- 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/api/interfaces/FewShotPromptTemplateOptions.md +159 -0
- 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/{interfaces → api/interfaces}/IReadTextFileChunksOptions.md +12 -12
- 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/api/interfaces/PromptTemplateOptions.md +73 -0
- 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 +73 -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 +41 -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/{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/api/variables/defaultTemplateFormat.md +11 -0
- 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 +38 -38
- package/dist/chunk-YVFGQB4L.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/ConfigFile.md +0 -353
- package/docs/classes/HFEnvironment.md +0 -184
- package/docs/classes/HFInterpreter.md +0 -77
- package/docs/classes/HFTemplate.md +0 -67
- package/docs/classes/HfPromptTemplate.md +0 -1158
- 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/expandConfig.md +0 -25
- package/docs/functions/filenameReservedRegex.md +0 -20
- package/docs/functions/hfParse.md +0 -24
- package/docs/functions/hfTokenize.md +0 -27
- package/docs/functions/initShutdown.md +0 -15
- package/docs/functions/interpolateEnv.md +0 -29
- package/docs/functions/interpolateFString.md +0 -29
- package/docs/functions/interpolateGolangTemplate.md +0 -35
- package/docs/functions/parseFString.md +0 -26
- package/docs/functions/parseYaml.md +0 -25
- package/docs/functions/reControlCharsRegex.md +0 -19
- package/docs/functions/registerYamlTag.md +0 -21
- package/docs/functions/stringifyYaml.md +0 -25
- 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/DotenvExpandOptions.md +0 -43
- package/docs/interfaces/DotenvExpandOutput.md +0 -25
- package/docs/interfaces/DotenvParseInput.md +0 -13
- package/docs/interfaces/DotenvParseOutput.md +0 -13
- package/docs/interfaces/DotenvPopulateInput.md +0 -13
- package/docs/interfaces/EventClientFuncParams.md +0 -51
- package/docs/interfaces/EventServerFuncParams.md +0 -67
- package/docs/interfaces/FewShotPromptTemplateOptions.md +0 -147
- 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/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/PromptTemplateOptions.md +0 -65
- 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/FStringPromptTemplateNode.md +0 -14
- package/docs/type-aliases/FuncParamType.md +0 -11
- package/docs/type-aliases/PromptTemplateType.md +0 -11
- package/docs/type-aliases/PromptType.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/HFBuiltins.md +0 -122
- package/docs/variables/PASSING_SCORE.md +0 -11
- package/docs/variables/PromptTemplateTypes.md +0 -11
- package/docs/variables/PromptTypes.md +0 -14
- 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/defaultTemplateFormat.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,7 +6,62 @@
|
|
|
6
6
|
|
|
7
7
|
# Class: EventToolFunc
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/ai-tool/src/funcs/event.ts:
|
|
9
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event.ts:6](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/funcs/event.ts#L6)
|
|
10
|
+
|
|
11
|
+
A manager for creating, registering, and executing reusable tool functions.
|
|
12
|
+
|
|
13
|
+
`ToolFunc` provides a robust framework for defining functions with rich metadata,
|
|
14
|
+
managing their lifecycle, and executing them through a centralized registry.
|
|
15
|
+
It is the core component for creating modular and discoverable tools.
|
|
16
|
+
|
|
17
|
+
Key Features:
|
|
18
|
+
- **Rich Metadata**: Define functions with descriptions, parameters, tags, and titles, making them self-documenting.
|
|
19
|
+
- **Static Registry**: A global, static registry (`ToolFunc.items`) allows any part of an application to access and run registered functions by name.
|
|
20
|
+
- **Dependency Management**: Use the `depends` property to declare dependencies on other `ToolFunc`s, which are then auto-registered.
|
|
21
|
+
- **Aliasing**: Assign multiple names to a function for flexibility.
|
|
22
|
+
- **Lifecycle Hooks**: Use the `setup` method for one-time initialization logic when a `ToolFunc` instance is created.
|
|
23
|
+
- **Parameter Handling**: Automatically handles both positional and named parameters.
|
|
24
|
+
|
|
25
|
+
## Example
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
// 1. Define a helper function
|
|
29
|
+
const getUser = new ToolFunc({
|
|
30
|
+
name: 'getUser',
|
|
31
|
+
description: 'Retrieves a user by ID.',
|
|
32
|
+
params: { id: { type: 'string', required: true } },
|
|
33
|
+
func: (params) => ({ id: params.id, name: 'John Doe' }),
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
// 2. Define a main function that depends on the helper
|
|
37
|
+
const welcomeUser = new ToolFunc({
|
|
38
|
+
name: 'welcomeUser',
|
|
39
|
+
title: 'Welcome User',
|
|
40
|
+
description: 'Generates a welcome message for a user.',
|
|
41
|
+
params: { userId: 'string' },
|
|
42
|
+
depends: {
|
|
43
|
+
// By declaring this dependency, `getUser` will be auto-registered
|
|
44
|
+
// when `welcomeUser` is registered.
|
|
45
|
+
userFetcher: getUser,
|
|
46
|
+
},
|
|
47
|
+
func: function(params) {
|
|
48
|
+
// `this` is the ToolFunc instance, so we can use `runSync`
|
|
49
|
+
const user = this.runSync('userFetcher', { id: params.userId });
|
|
50
|
+
return `Hello, ${user.name}!`;
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
// 3. Register the main function. The dependency is registered automatically.
|
|
55
|
+
welcomeUser.register();
|
|
56
|
+
|
|
57
|
+
// 4. Run the function from anywhere using the static runner.
|
|
58
|
+
async function main() {
|
|
59
|
+
const message = await ToolFunc.run('welcomeUser', { userId: '123' });
|
|
60
|
+
console.log(message); // Outputs: "Hello, John Doe!"
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
main();
|
|
64
|
+
```
|
|
10
65
|
|
|
11
66
|
## Extends
|
|
12
67
|
|
|
@@ -20,9 +75,9 @@ Defined in: [packages/ai-tool/src/funcs/event.ts:5](https://github.com/isdk/ai-t
|
|
|
20
75
|
|
|
21
76
|
### new EventToolFunc()
|
|
22
77
|
|
|
23
|
-
> **new EventToolFunc**(`name`, `options
|
|
78
|
+
> **new EventToolFunc**(`name`, `options`?): [`EventToolFunc`](EventToolFunc.md)
|
|
24
79
|
|
|
25
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
80
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:571](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L571)
|
|
26
81
|
|
|
27
82
|
The initial value of Object.prototype.constructor is the standard built-in Object constructor.
|
|
28
83
|
|
|
@@ -30,12 +85,16 @@ The initial value of Object.prototype.constructor is the standard built-in Objec
|
|
|
30
85
|
|
|
31
86
|
##### name
|
|
32
87
|
|
|
88
|
+
Can be a function name, a function implementation, or a configuration object.
|
|
89
|
+
|
|
33
90
|
`string` | `Function` | [`FuncItem`](../interfaces/FuncItem.md)
|
|
34
91
|
|
|
35
|
-
##### options
|
|
92
|
+
##### options?
|
|
36
93
|
|
|
37
94
|
`any` = `{}`
|
|
38
95
|
|
|
96
|
+
Configuration options if not provided in the first argument.
|
|
97
|
+
|
|
39
98
|
#### Returns
|
|
40
99
|
|
|
41
100
|
[`EventToolFunc`](EventToolFunc.md)
|
|
@@ -50,7 +109,7 @@ The initial value of Object.prototype.constructor is the standard built-in Objec
|
|
|
50
109
|
|
|
51
110
|
> **\_emitter**: [`EventEmitter`](EventEmitter.md)
|
|
52
111
|
|
|
53
|
-
Defined in: [packages/ai-tool/src/funcs/event.ts:7](https://github.com/isdk/ai-tool.js/blob/
|
|
112
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event.ts:7](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/funcs/event.ts#L7)
|
|
54
113
|
|
|
55
114
|
***
|
|
56
115
|
|
|
@@ -58,7 +117,7 @@ Defined in: [packages/ai-tool/src/funcs/event.ts:7](https://github.com/isdk/ai-t
|
|
|
58
117
|
|
|
59
118
|
> **$attributes**: `Properties`
|
|
60
119
|
|
|
61
|
-
Defined in:
|
|
120
|
+
Defined in: [property-manager.js/src/advance.d.ts:5](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/advance.d.ts#L5)
|
|
62
121
|
|
|
63
122
|
#### Inherited from
|
|
64
123
|
|
|
@@ -70,7 +129,9 @@ Defined in: node\_modules/.pnpm/property-manager@2.0.0/node\_modules/property-ma
|
|
|
70
129
|
|
|
71
130
|
> `optional` **alias**: `string` \| `string`[]
|
|
72
131
|
|
|
73
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
132
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:130](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L130)
|
|
133
|
+
|
|
134
|
+
Optional aliases for the function name.
|
|
74
135
|
|
|
75
136
|
#### Inherited from
|
|
76
137
|
|
|
@@ -78,11 +139,41 @@ Defined in: [packages/ai-tool/src/tool-func.ts:31](https://github.com/isdk/ai-to
|
|
|
78
139
|
|
|
79
140
|
***
|
|
80
141
|
|
|
142
|
+
### asyncFeatures?
|
|
143
|
+
|
|
144
|
+
> `optional` **asyncFeatures**: `number`
|
|
145
|
+
|
|
146
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:144](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L144)
|
|
147
|
+
|
|
148
|
+
A bitmask representing asynchronous features supported by the function, built from `AsyncFeatureBits`.
|
|
149
|
+
This allows the system to understand if a function supports capabilities like cancellation or multi-tasking.
|
|
150
|
+
|
|
151
|
+
#### See
|
|
152
|
+
|
|
153
|
+
AsyncFeatureBits from `@src/utils/cancelable-ability.ts`
|
|
154
|
+
|
|
155
|
+
#### Example
|
|
156
|
+
|
|
157
|
+
```ts
|
|
158
|
+
import { AsyncFeatures } from './utils';
|
|
159
|
+
const func = new ToolFunc({
|
|
160
|
+
name: 'cancellableTask',
|
|
161
|
+
asyncFeatures: AsyncFeatures.Cancelable | AsyncFeatures.MultiTask,
|
|
162
|
+
// ...
|
|
163
|
+
});
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
#### Inherited from
|
|
167
|
+
|
|
168
|
+
[`ToolFunc`](ToolFunc.md).[`asyncFeatures`](ToolFunc.md#asyncfeatures)
|
|
169
|
+
|
|
170
|
+
***
|
|
171
|
+
|
|
81
172
|
### constructor
|
|
82
173
|
|
|
83
174
|
> **constructor**: `Function`
|
|
84
175
|
|
|
85
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:125
|
|
176
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:125
|
|
86
177
|
|
|
87
178
|
The initial value of Object.prototype.constructor is the standard built-in Object constructor.
|
|
88
179
|
|
|
@@ -96,7 +187,7 @@ The initial value of Object.prototype.constructor is the standard built-in Objec
|
|
|
96
187
|
|
|
97
188
|
> **defaultOptions**: `object`
|
|
98
189
|
|
|
99
|
-
Defined in:
|
|
190
|
+
Defined in: [property-manager.js/src/abstract.d.ts:74](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L74)
|
|
100
191
|
|
|
101
192
|
The default options for export and assign
|
|
102
193
|
|
|
@@ -114,11 +205,56 @@ The default options for export and assign
|
|
|
114
205
|
|
|
115
206
|
***
|
|
116
207
|
|
|
208
|
+
### depends?
|
|
209
|
+
|
|
210
|
+
> `optional` **depends**: `object`
|
|
211
|
+
|
|
212
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:167](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L167)
|
|
213
|
+
|
|
214
|
+
A map of dependencies this function has on other tool functions.
|
|
215
|
+
Declaring dependencies ensures that they are automatically registered when this function is registered.
|
|
216
|
+
This is crucial for building modular functions that rely on each other without needing to manage registration order manually.
|
|
217
|
+
|
|
218
|
+
#### Index Signature
|
|
219
|
+
|
|
220
|
+
\[`name`: `string`\]: [`ToolFunc`](ToolFunc.md)
|
|
221
|
+
|
|
222
|
+
#### Example
|
|
223
|
+
|
|
224
|
+
```ts
|
|
225
|
+
const helperFunc = new ToolFunc({ name: 'helper', func: () => 'world' });
|
|
226
|
+
const mainFunc = new ToolFunc({
|
|
227
|
+
name: 'main',
|
|
228
|
+
depends: {
|
|
229
|
+
helper: helperFunc,
|
|
230
|
+
},
|
|
231
|
+
func() {
|
|
232
|
+
// We can now safely run the dependency
|
|
233
|
+
const result = this.runSync('helper');
|
|
234
|
+
return `Hello, ${result}`;
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
// When mainFunc is registered, helperFunc will be registered automatically.
|
|
238
|
+
mainFunc.register();
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
#### Inherited from
|
|
242
|
+
|
|
243
|
+
[`ToolFunc`](ToolFunc.md).[`depends`](ToolFunc.md#depends)
|
|
244
|
+
|
|
245
|
+
***
|
|
246
|
+
|
|
117
247
|
### description
|
|
118
248
|
|
|
119
249
|
> **description**: `string` = `'Return event bus'`
|
|
120
250
|
|
|
121
|
-
Defined in: [packages/ai-tool/src/funcs/event.ts:9](https://github.com/isdk/ai-tool.js/blob/
|
|
251
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event.ts:9](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/funcs/event.ts#L9)
|
|
252
|
+
|
|
253
|
+
A detailed description of what the function does.
|
|
254
|
+
|
|
255
|
+
#### Overrides
|
|
256
|
+
|
|
257
|
+
[`ToolFunc`](ToolFunc.md).[`description`](ToolFunc.md#description)
|
|
122
258
|
|
|
123
259
|
***
|
|
124
260
|
|
|
@@ -126,7 +262,9 @@ Defined in: [packages/ai-tool/src/funcs/event.ts:9](https://github.com/isdk/ai-t
|
|
|
126
262
|
|
|
127
263
|
> `optional` **isApi**: `boolean`
|
|
128
264
|
|
|
129
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
265
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:119](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L119)
|
|
266
|
+
|
|
267
|
+
If true, indicates that this function should be treated as a server-side API.
|
|
130
268
|
|
|
131
269
|
#### Inherited from
|
|
132
270
|
|
|
@@ -138,11 +276,13 @@ Defined in: [packages/ai-tool/src/tool-func.ts:29](https://github.com/isdk/ai-to
|
|
|
138
276
|
|
|
139
277
|
> `optional` **name**: `string`
|
|
140
278
|
|
|
141
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
279
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:76](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L76)
|
|
280
|
+
|
|
281
|
+
The unique name of the function.
|
|
142
282
|
|
|
143
283
|
#### Inherited from
|
|
144
284
|
|
|
145
|
-
[`ToolFunc`](ToolFunc.md).[`name`](ToolFunc.md#name-
|
|
285
|
+
[`ToolFunc`](ToolFunc.md).[`name`](ToolFunc.md#name-3)
|
|
146
286
|
|
|
147
287
|
***
|
|
148
288
|
|
|
@@ -150,7 +290,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:23](https://github.com/isdk/ai-to
|
|
|
150
290
|
|
|
151
291
|
> **nonExported1stChar**: `string`
|
|
152
292
|
|
|
153
|
-
Defined in:
|
|
293
|
+
Defined in: [property-manager.js/src/abstract.d.ts:78](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L78)
|
|
154
294
|
|
|
155
295
|
the property with the default prefix '$' will not be exported.
|
|
156
296
|
|
|
@@ -164,7 +304,9 @@ the property with the default prefix '$' will not be exported.
|
|
|
164
304
|
|
|
165
305
|
> `optional` **params**: [`FuncParams`](../interfaces/FuncParams.md) \| [`FuncParam`](../interfaces/FuncParam.md)[]
|
|
166
306
|
|
|
167
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
307
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:81](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L81)
|
|
308
|
+
|
|
309
|
+
Parameter definitions, which can be an object mapping names to definitions or an array for positional parameters.
|
|
168
310
|
|
|
169
311
|
#### Inherited from
|
|
170
312
|
|
|
@@ -176,7 +318,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:24](https://github.com/isdk/ai-to
|
|
|
176
318
|
|
|
177
319
|
> **result**: `string` = `'event'`
|
|
178
320
|
|
|
179
|
-
Defined in: [packages/ai-tool/src/funcs/event.ts:10](https://github.com/isdk/ai-tool.js/blob/
|
|
321
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event.ts:10](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/funcs/event.ts#L10)
|
|
322
|
+
|
|
323
|
+
The expected return type of the function, described as a string or a JSON schema object.
|
|
180
324
|
|
|
181
325
|
#### Overrides
|
|
182
326
|
|
|
@@ -188,7 +332,9 @@ Defined in: [packages/ai-tool/src/funcs/event.ts:10](https://github.com/isdk/ai-
|
|
|
188
332
|
|
|
189
333
|
> `optional` **scope**: `any`
|
|
190
334
|
|
|
191
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
335
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:91](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L91)
|
|
336
|
+
|
|
337
|
+
The execution scope or context (`this`) for the function.
|
|
192
338
|
|
|
193
339
|
#### Inherited from
|
|
194
340
|
|
|
@@ -200,7 +346,11 @@ Defined in: [packages/ai-tool/src/tool-func.ts:26](https://github.com/isdk/ai-to
|
|
|
200
346
|
|
|
201
347
|
> `optional` **setup**: (`this`, `options`?) => `void`
|
|
202
348
|
|
|
203
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
349
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:114](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L114)
|
|
350
|
+
|
|
351
|
+
A lifecycle hook called once during the `ToolFunc` instance's initialization.
|
|
352
|
+
It allows for initial setup, state configuration, or property modification on the instance
|
|
353
|
+
before it is used or registered. The `this` context is the `ToolFunc` instance itself.
|
|
204
354
|
|
|
205
355
|
#### Parameters
|
|
206
356
|
|
|
@@ -212,10 +362,26 @@ Defined in: [packages/ai-tool/src/tool-func.ts:28](https://github.com/isdk/ai-to
|
|
|
212
362
|
|
|
213
363
|
[`FuncItem`](../interfaces/FuncItem.md)
|
|
214
364
|
|
|
365
|
+
The configuration options for the function.
|
|
366
|
+
|
|
215
367
|
#### Returns
|
|
216
368
|
|
|
217
369
|
`void`
|
|
218
370
|
|
|
371
|
+
#### Example
|
|
372
|
+
|
|
373
|
+
```ts
|
|
374
|
+
const myFunc = new ToolFunc({
|
|
375
|
+
name: 'myFunc',
|
|
376
|
+
customState: 'initial',
|
|
377
|
+
setup() {
|
|
378
|
+
// `this` is the myFunc instance
|
|
379
|
+
this.customState = 'configured';
|
|
380
|
+
}
|
|
381
|
+
});
|
|
382
|
+
console.log(myFunc.customState); // Outputs: 'configured'
|
|
383
|
+
```
|
|
384
|
+
|
|
219
385
|
#### Inherited from
|
|
220
386
|
|
|
221
387
|
[`ToolFunc`](ToolFunc.md).[`setup`](ToolFunc.md#setup)
|
|
@@ -226,7 +392,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:28](https://github.com/isdk/ai-to
|
|
|
226
392
|
|
|
227
393
|
> `optional` **stream**: `boolean`
|
|
228
394
|
|
|
229
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
395
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:125](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L125)
|
|
396
|
+
|
|
397
|
+
If true, indicates that the function has the *capability* to stream its output.
|
|
398
|
+
Whether a specific call is streamed is determined by a `stream` property in the runtime parameters.
|
|
230
399
|
|
|
231
400
|
#### Inherited from
|
|
232
401
|
|
|
@@ -238,7 +407,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:30](https://github.com/isdk/ai-to
|
|
|
238
407
|
|
|
239
408
|
> `optional` **tags**: `string` \| `string`[]
|
|
240
409
|
|
|
241
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
410
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:96](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L96)
|
|
411
|
+
|
|
412
|
+
Tags for grouping or filtering functions.
|
|
242
413
|
|
|
243
414
|
#### Inherited from
|
|
244
415
|
|
|
@@ -246,11 +417,27 @@ Defined in: [packages/ai-tool/src/tool-func.ts:27](https://github.com/isdk/ai-to
|
|
|
246
417
|
|
|
247
418
|
***
|
|
248
419
|
|
|
420
|
+
### title?
|
|
421
|
+
|
|
422
|
+
> `optional` **title**: `string`
|
|
423
|
+
|
|
424
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:177](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L177)
|
|
425
|
+
|
|
426
|
+
A concise, human-readable title for the function, often used in UI or by AI.
|
|
427
|
+
|
|
428
|
+
#### Inherited from
|
|
429
|
+
|
|
430
|
+
[`ToolFunc`](ToolFunc.md).[`title`](ToolFunc.md#title)
|
|
431
|
+
|
|
432
|
+
***
|
|
433
|
+
|
|
249
434
|
### aliases
|
|
250
435
|
|
|
251
436
|
> `static` **aliases**: `object` = `{}`
|
|
252
437
|
|
|
253
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
438
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:305](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L305)
|
|
439
|
+
|
|
440
|
+
A static map of aliases to their corresponding function names.
|
|
254
441
|
|
|
255
442
|
#### Index Signature
|
|
256
443
|
|
|
@@ -266,7 +453,11 @@ Defined in: [packages/ai-tool/src/tool-func.ts:58](https://github.com/isdk/ai-to
|
|
|
266
453
|
|
|
267
454
|
> `static` **dataPath**: `string`
|
|
268
455
|
|
|
269
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
456
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:312](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L312)
|
|
457
|
+
|
|
458
|
+
A conventional property to designate a file path for saving the registered `ToolFunc` data.
|
|
459
|
+
Note: The `ToolFunc` class itself does not implement persistence logic. It is up to the
|
|
460
|
+
developer to use this path to save and load the `ToolFunc.items` registry if needed.
|
|
270
461
|
|
|
271
462
|
#### Inherited from
|
|
272
463
|
|
|
@@ -278,7 +469,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:59](https://github.com/isdk/ai-to
|
|
|
278
469
|
|
|
279
470
|
> `static` **items**: [`Funcs`](../interfaces/Funcs.md) = `{}`
|
|
280
471
|
|
|
281
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
472
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:300](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L300)
|
|
473
|
+
|
|
474
|
+
A static registry of all `ToolFunc` instances, indexed by name.
|
|
282
475
|
|
|
283
476
|
#### Inherited from
|
|
284
477
|
|
|
@@ -292,7 +485,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:57](https://github.com/isdk/ai-to
|
|
|
292
485
|
|
|
293
486
|
> **get** **emitter**(): [`EventEmitter`](EventEmitter.md)
|
|
294
487
|
|
|
295
|
-
Defined in: [packages/ai-tool/src/funcs/event.ts:12](https://github.com/isdk/ai-tool.js/blob/
|
|
488
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event.ts:12](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/funcs/event.ts#L12)
|
|
296
489
|
|
|
297
490
|
##### Returns
|
|
298
491
|
|
|
@@ -304,7 +497,10 @@ Defined in: [packages/ai-tool/src/funcs/event.ts:12](https://github.com/isdk/ai-
|
|
|
304
497
|
|
|
305
498
|
> **arr2ObjParams**(`params`): `any`[]
|
|
306
499
|
|
|
307
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
500
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:629](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L629)
|
|
501
|
+
|
|
502
|
+
Converts an array of positional arguments into a named parameters object.
|
|
503
|
+
This is used internally to support functions defined with named parameters.
|
|
308
504
|
|
|
309
505
|
#### Parameters
|
|
310
506
|
|
|
@@ -312,10 +508,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:269](https://github.com/isdk/ai-t
|
|
|
312
508
|
|
|
313
509
|
`any`[]
|
|
314
510
|
|
|
511
|
+
An array of positional arguments.
|
|
512
|
+
|
|
315
513
|
#### Returns
|
|
316
514
|
|
|
317
515
|
`any`[]
|
|
318
516
|
|
|
517
|
+
An array containing a single parameters object.
|
|
518
|
+
|
|
319
519
|
#### Inherited from
|
|
320
520
|
|
|
321
521
|
[`ToolFunc`](ToolFunc.md).[`arr2ObjParams`](ToolFunc.md#arr2objparams)
|
|
@@ -326,7 +526,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:269](https://github.com/isdk/ai-t
|
|
|
326
526
|
|
|
327
527
|
> **assign**(`src`, `options`?): `this`
|
|
328
528
|
|
|
329
|
-
Defined in:
|
|
529
|
+
Defined in: [property-manager.js/src/abstract.d.ts:106](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L106)
|
|
330
530
|
|
|
331
531
|
Assign the values from the src object.
|
|
332
532
|
|
|
@@ -358,7 +558,7 @@ this object
|
|
|
358
558
|
|
|
359
559
|
> **assignProperty**(`src`, `name`, `value`, `attrs`?, `options`?): `void`
|
|
360
560
|
|
|
361
|
-
Defined in:
|
|
561
|
+
Defined in: [property-manager.js/src/abstract.d.ts:117](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L117)
|
|
362
562
|
|
|
363
563
|
Assign a property of src to this object.
|
|
364
564
|
|
|
@@ -406,7 +606,7 @@ the attributes object
|
|
|
406
606
|
|
|
407
607
|
> `abstract` **assignPropertyTo**(`dest`, `src`, `name`, `value`, `attrs`?, `options`?): `void`
|
|
408
608
|
|
|
409
|
-
Defined in:
|
|
609
|
+
Defined in: [property-manager.js/src/abstract.d.ts:131](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L131)
|
|
410
610
|
|
|
411
611
|
Assign the property value from the src to destination object.
|
|
412
612
|
|
|
@@ -460,7 +660,7 @@ The attributes object of the property
|
|
|
460
660
|
|
|
461
661
|
> **assignTo**(`dest`?, `options`?): `any`
|
|
462
662
|
|
|
463
|
-
Defined in:
|
|
663
|
+
Defined in: [property-manager.js/src/abstract.d.ts:191](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L191)
|
|
464
664
|
|
|
465
665
|
Assign this attributes to the dest object
|
|
466
666
|
|
|
@@ -492,7 +692,7 @@ the dest object
|
|
|
492
692
|
|
|
493
693
|
> **clone**(`options`?): `any`
|
|
494
694
|
|
|
495
|
-
Defined in:
|
|
695
|
+
Defined in: [property-manager.js/src/abstract.d.ts:155](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L155)
|
|
496
696
|
|
|
497
697
|
Create a new object with the same values of attributes.
|
|
498
698
|
|
|
@@ -518,7 +718,7 @@ the new object
|
|
|
518
718
|
|
|
519
719
|
> **cloneTo**(`dest`, `options`?): `any`
|
|
520
720
|
|
|
521
|
-
Defined in:
|
|
721
|
+
Defined in: [property-manager.js/src/abstract.d.ts:148](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L148)
|
|
522
722
|
|
|
523
723
|
Create and assign the values to the destination object.
|
|
524
724
|
|
|
@@ -550,7 +750,7 @@ the new dest object
|
|
|
550
750
|
|
|
551
751
|
> `abstract` **defineProperties**(`aProperties`): `any`
|
|
552
752
|
|
|
553
|
-
Defined in:
|
|
753
|
+
Defined in: [property-manager.js/src/abstract.d.ts:89](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L89)
|
|
554
754
|
|
|
555
755
|
Define the attributes of this object.
|
|
556
756
|
|
|
@@ -576,7 +776,7 @@ the defined attributes of the object
|
|
|
576
776
|
|
|
577
777
|
> **exportTo**(`dest`, `options`?): `any`
|
|
578
778
|
|
|
579
|
-
Defined in:
|
|
779
|
+
Defined in: [property-manager.js/src/abstract.d.ts:173](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L173)
|
|
580
780
|
|
|
581
781
|
Export attributes to the dest json object.
|
|
582
782
|
|
|
@@ -608,12 +808,16 @@ the dest object.
|
|
|
608
808
|
|
|
609
809
|
> **func**(): [`EventEmitter`](EventEmitter.md)
|
|
610
810
|
|
|
611
|
-
Defined in: [packages/ai-tool/src/funcs/event.ts:
|
|
811
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event.ts:16](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/funcs/event.ts#L16)
|
|
812
|
+
|
|
813
|
+
The actual function implementation.
|
|
612
814
|
|
|
613
815
|
#### Returns
|
|
614
816
|
|
|
615
817
|
[`EventEmitter`](EventEmitter.md)
|
|
616
818
|
|
|
819
|
+
The result of the function.
|
|
820
|
+
|
|
617
821
|
#### Overrides
|
|
618
822
|
|
|
619
823
|
[`ToolFunc`](ToolFunc.md).[`func`](ToolFunc.md#func)
|
|
@@ -624,7 +828,11 @@ Defined in: [packages/ai-tool/src/funcs/event.ts:17](https://github.com/isdk/ai-
|
|
|
624
828
|
|
|
625
829
|
> **getFunc**(`name`?): `any`
|
|
626
830
|
|
|
627
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
831
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:720](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L720)
|
|
832
|
+
|
|
833
|
+
Gets a bound function reference for execution with named parameters.
|
|
834
|
+
If a name is provided, it retrieves a different function from the registry.
|
|
835
|
+
Otherwise, it returns a bound version of this instance's `runSync`.
|
|
628
836
|
|
|
629
837
|
#### Parameters
|
|
630
838
|
|
|
@@ -632,10 +840,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:322](https://github.com/isdk/ai-t
|
|
|
632
840
|
|
|
633
841
|
`string`
|
|
634
842
|
|
|
843
|
+
Optional name of the function to retrieve.
|
|
844
|
+
|
|
635
845
|
#### Returns
|
|
636
846
|
|
|
637
847
|
`any`
|
|
638
848
|
|
|
849
|
+
A function reference or `undefined` if not found.
|
|
850
|
+
|
|
639
851
|
#### Inherited from
|
|
640
852
|
|
|
641
853
|
[`ToolFunc`](ToolFunc.md).[`getFunc`](ToolFunc.md#getfunc)
|
|
@@ -646,7 +858,11 @@ Defined in: [packages/ai-tool/src/tool-func.ts:322](https://github.com/isdk/ai-t
|
|
|
646
858
|
|
|
647
859
|
> **getFuncWithPos**(`name`?): `any`
|
|
648
860
|
|
|
649
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
861
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:777](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L777)
|
|
862
|
+
|
|
863
|
+
Gets a bound function reference suitable for positional argument execution.
|
|
864
|
+
If a name is provided, it retrieves a different function from the registry.
|
|
865
|
+
Otherwise, it returns a bound version of this instance's `runWithPosSync`.
|
|
650
866
|
|
|
651
867
|
#### Parameters
|
|
652
868
|
|
|
@@ -654,10 +870,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:346](https://github.com/isdk/ai-t
|
|
|
654
870
|
|
|
655
871
|
`string`
|
|
656
872
|
|
|
873
|
+
Optional name of the function to retrieve.
|
|
874
|
+
|
|
657
875
|
#### Returns
|
|
658
876
|
|
|
659
877
|
`any`
|
|
660
878
|
|
|
879
|
+
A function reference or `undefined` if not found.
|
|
880
|
+
|
|
661
881
|
#### Inherited from
|
|
662
882
|
|
|
663
883
|
[`ToolFunc`](ToolFunc.md).[`getFuncWithPos`](ToolFunc.md#getfuncwithpos)
|
|
@@ -668,7 +888,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:346](https://github.com/isdk/ai-t
|
|
|
668
888
|
|
|
669
889
|
> `abstract` **getProperties**(): `PropDescriptors`
|
|
670
890
|
|
|
671
|
-
Defined in:
|
|
891
|
+
Defined in: [property-manager.js/src/abstract.d.ts:98](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L98)
|
|
672
892
|
|
|
673
893
|
Get the defined attributes.
|
|
674
894
|
|
|
@@ -688,7 +908,9 @@ the descriptors of properties object
|
|
|
688
908
|
|
|
689
909
|
> **hasAsyncFeature**(`feature`): `boolean`
|
|
690
910
|
|
|
691
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
911
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:787](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L787)
|
|
912
|
+
|
|
913
|
+
Checks if the current function instance supports a specific async feature.
|
|
692
914
|
|
|
693
915
|
#### Parameters
|
|
694
916
|
|
|
@@ -696,10 +918,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:351](https://github.com/isdk/ai-t
|
|
|
696
918
|
|
|
697
919
|
[`AsyncFeatureBits`](../enumerations/AsyncFeatureBits.md)
|
|
698
920
|
|
|
921
|
+
The async feature bit to check for.
|
|
922
|
+
|
|
699
923
|
#### Returns
|
|
700
924
|
|
|
701
925
|
`boolean`
|
|
702
926
|
|
|
927
|
+
`true` if the feature is supported, otherwise `false`.
|
|
928
|
+
|
|
703
929
|
#### Inherited from
|
|
704
930
|
|
|
705
931
|
[`ToolFunc`](ToolFunc.md).[`hasAsyncFeature`](ToolFunc.md#hasasyncfeature)
|
|
@@ -710,7 +936,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:351](https://github.com/isdk/ai-t
|
|
|
710
936
|
|
|
711
937
|
> **hasOwnProperty**(`v`): `boolean`
|
|
712
938
|
|
|
713
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:140
|
|
939
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:140
|
|
714
940
|
|
|
715
941
|
Determines whether an object has a property with the specified name.
|
|
716
942
|
|
|
@@ -736,7 +962,7 @@ A property name.
|
|
|
736
962
|
|
|
737
963
|
> **initialize**(`src`?): `this`
|
|
738
964
|
|
|
739
|
-
Defined in:
|
|
965
|
+
Defined in: [property-manager.js/src/abstract.d.ts:139](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L139)
|
|
740
966
|
|
|
741
967
|
Initialize object and assign attribute values from src if src exists.
|
|
742
968
|
|
|
@@ -762,7 +988,7 @@ this object.
|
|
|
762
988
|
|
|
763
989
|
> **isPrototypeOf**(`v`): `boolean`
|
|
764
990
|
|
|
765
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:146
|
|
991
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:146
|
|
766
992
|
|
|
767
993
|
Determines whether an object exists in another object's prototype chain.
|
|
768
994
|
|
|
@@ -788,7 +1014,7 @@ Another object whose prototype chain is to be checked.
|
|
|
788
1014
|
|
|
789
1015
|
> **isSame**(`src`, `options`?): `boolean`
|
|
790
1016
|
|
|
791
|
-
Defined in:
|
|
1017
|
+
Defined in: [property-manager.js/src/abstract.d.ts:200](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L200)
|
|
792
1018
|
|
|
793
1019
|
Check the src object whether “equals” this object.
|
|
794
1020
|
|
|
@@ -818,7 +1044,15 @@ The source object
|
|
|
818
1044
|
|
|
819
1045
|
> **isStream**(`params`): `undefined` \| `boolean`
|
|
820
1046
|
|
|
821
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1047
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:805](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L805)
|
|
1048
|
+
|
|
1049
|
+
Determines if a function call should produce a stream.
|
|
1050
|
+
|
|
1051
|
+
The logic is as follows:
|
|
1052
|
+
1. It first checks if the function is generally capable of streaming (`this.stream`).
|
|
1053
|
+
2. If it is, it then checks if a `stream` parameter is formally declared in the function's `params` definition.
|
|
1054
|
+
3. If both are true, the method returns the value of the `stream` property from the runtime `params` object.
|
|
1055
|
+
Otherwise, it returns the function's static `stream` capability.
|
|
822
1056
|
|
|
823
1057
|
#### Parameters
|
|
824
1058
|
|
|
@@ -826,10 +1060,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:357](https://github.com/isdk/ai-t
|
|
|
826
1060
|
|
|
827
1061
|
`any`
|
|
828
1062
|
|
|
1063
|
+
The runtime parameters passed to the function call.
|
|
1064
|
+
|
|
829
1065
|
#### Returns
|
|
830
1066
|
|
|
831
1067
|
`undefined` \| `boolean`
|
|
832
1068
|
|
|
1069
|
+
`true` if the call should be streamed, `false` or `undefined` otherwise.
|
|
1070
|
+
|
|
833
1071
|
#### Inherited from
|
|
834
1072
|
|
|
835
1073
|
[`ToolFunc`](ToolFunc.md).[`isStream`](ToolFunc.md#isstream)
|
|
@@ -840,7 +1078,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:357](https://github.com/isdk/ai-t
|
|
|
840
1078
|
|
|
841
1079
|
> **mergeTo**(`dest`, `options`?): `any`
|
|
842
1080
|
|
|
843
|
-
Defined in:
|
|
1081
|
+
Defined in: [property-manager.js/src/abstract.d.ts:164](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L164)
|
|
844
1082
|
|
|
845
1083
|
Merge this attributes to dest object.
|
|
846
1084
|
|
|
@@ -872,7 +1110,10 @@ the dest object.
|
|
|
872
1110
|
|
|
873
1111
|
> **obj2ArrParams**(`params`?): `any`[]
|
|
874
1112
|
|
|
875
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1113
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:648](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L648)
|
|
1114
|
+
|
|
1115
|
+
Converts a named parameters object into an array of positional arguments.
|
|
1116
|
+
This is used for functions defined with positional parameters.
|
|
876
1117
|
|
|
877
1118
|
#### Parameters
|
|
878
1119
|
|
|
@@ -880,10 +1121,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:282](https://github.com/isdk/ai-t
|
|
|
880
1121
|
|
|
881
1122
|
`any`
|
|
882
1123
|
|
|
1124
|
+
A named parameters object.
|
|
1125
|
+
|
|
883
1126
|
#### Returns
|
|
884
1127
|
|
|
885
1128
|
`any`[]
|
|
886
1129
|
|
|
1130
|
+
An array of positional arguments.
|
|
1131
|
+
|
|
887
1132
|
#### Inherited from
|
|
888
1133
|
|
|
889
1134
|
[`ToolFunc`](ToolFunc.md).[`obj2ArrParams`](ToolFunc.md#obj2arrparams)
|
|
@@ -894,7 +1139,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:282](https://github.com/isdk/ai-t
|
|
|
894
1139
|
|
|
895
1140
|
> **propertyIsEnumerable**(`v`): `boolean`
|
|
896
1141
|
|
|
897
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:152
|
|
1142
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:152
|
|
898
1143
|
|
|
899
1144
|
Determines whether a specified property is enumerable.
|
|
900
1145
|
|
|
@@ -920,12 +1165,17 @@ A property name.
|
|
|
920
1165
|
|
|
921
1166
|
> **register**(): `boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
922
1167
|
|
|
923
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1168
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:602](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L602)
|
|
1169
|
+
|
|
1170
|
+
Registers the current `ToolFunc` instance into the static registry.
|
|
1171
|
+
Also registers any declared dependencies.
|
|
924
1172
|
|
|
925
1173
|
#### Returns
|
|
926
1174
|
|
|
927
1175
|
`boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
928
1176
|
|
|
1177
|
+
The instance itself upon successful registration, or `false` if it already exists.
|
|
1178
|
+
|
|
929
1179
|
#### Inherited from
|
|
930
1180
|
|
|
931
1181
|
[`ToolFunc`](ToolFunc.md).[`register`](ToolFunc.md#register)
|
|
@@ -936,7 +1186,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:252](https://github.com/isdk/ai-t
|
|
|
936
1186
|
|
|
937
1187
|
> **run**(`params`?): `Promise`\<`any`\>
|
|
938
1188
|
|
|
939
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1189
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:686](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L686)
|
|
1190
|
+
|
|
1191
|
+
Executes the function asynchronously with a named parameters object.
|
|
940
1192
|
|
|
941
1193
|
#### Parameters
|
|
942
1194
|
|
|
@@ -944,10 +1196,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:309](https://github.com/isdk/ai-t
|
|
|
944
1196
|
|
|
945
1197
|
`any`
|
|
946
1198
|
|
|
1199
|
+
The parameters object for the function.
|
|
1200
|
+
|
|
947
1201
|
#### Returns
|
|
948
1202
|
|
|
949
1203
|
`Promise`\<`any`\>
|
|
950
1204
|
|
|
1205
|
+
A promise that resolves with the function's result.
|
|
1206
|
+
|
|
951
1207
|
#### Inherited from
|
|
952
1208
|
|
|
953
1209
|
[`ToolFunc`](ToolFunc.md).[`run`](ToolFunc.md#run)
|
|
@@ -958,7 +1214,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:309](https://github.com/isdk/ai-t
|
|
|
958
1214
|
|
|
959
1215
|
> **runAs**(`name`, `params`?): `Promise`\<`any`\>
|
|
960
1216
|
|
|
961
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1217
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:697](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L697)
|
|
1218
|
+
|
|
1219
|
+
Asynchronously executes another registered function by name.
|
|
1220
|
+
This method delegates to `runAsSync()` internally.
|
|
962
1221
|
|
|
963
1222
|
#### Parameters
|
|
964
1223
|
|
|
@@ -966,14 +1225,20 @@ Defined in: [packages/ai-tool/src/tool-func.ts:313](https://github.com/isdk/ai-t
|
|
|
966
1225
|
|
|
967
1226
|
`string`
|
|
968
1227
|
|
|
1228
|
+
The name of the target function to run.
|
|
1229
|
+
|
|
969
1230
|
##### params?
|
|
970
1231
|
|
|
971
1232
|
`any`
|
|
972
1233
|
|
|
1234
|
+
Optional parameters to pass to the function.
|
|
1235
|
+
|
|
973
1236
|
#### Returns
|
|
974
1237
|
|
|
975
1238
|
`Promise`\<`any`\>
|
|
976
1239
|
|
|
1240
|
+
A promise that resolves with the result of the function execution.
|
|
1241
|
+
|
|
977
1242
|
#### Inherited from
|
|
978
1243
|
|
|
979
1244
|
[`ToolFunc`](ToolFunc.md).[`runAs`](ToolFunc.md#runas)
|
|
@@ -984,7 +1249,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:313](https://github.com/isdk/ai-t
|
|
|
984
1249
|
|
|
985
1250
|
> **runAsSync**(`name`, `params`?): `any`
|
|
986
1251
|
|
|
987
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1252
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:708](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L708)
|
|
1253
|
+
|
|
1254
|
+
Synchronously executes another registered function by name.
|
|
1255
|
+
This is a convenience method that forwards the call to the static `runSync()` method.
|
|
988
1256
|
|
|
989
1257
|
#### Parameters
|
|
990
1258
|
|
|
@@ -992,14 +1260,20 @@ Defined in: [packages/ai-tool/src/tool-func.ts:317](https://github.com/isdk/ai-t
|
|
|
992
1260
|
|
|
993
1261
|
`string`
|
|
994
1262
|
|
|
1263
|
+
The name of the target function to run.
|
|
1264
|
+
|
|
995
1265
|
##### params?
|
|
996
1266
|
|
|
997
1267
|
`any`
|
|
998
1268
|
|
|
1269
|
+
Optional parameters to pass to the function.
|
|
1270
|
+
|
|
999
1271
|
#### Returns
|
|
1000
1272
|
|
|
1001
1273
|
`any`
|
|
1002
1274
|
|
|
1275
|
+
The result of the function execution.
|
|
1276
|
+
|
|
1003
1277
|
#### Inherited from
|
|
1004
1278
|
|
|
1005
1279
|
[`ToolFunc`](ToolFunc.md).[`runAsSync`](ToolFunc.md#runassync)
|
|
@@ -1010,7 +1284,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:317](https://github.com/isdk/ai-t
|
|
|
1010
1284
|
|
|
1011
1285
|
> **runSync**(`params`?): `any`
|
|
1012
1286
|
|
|
1013
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1287
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:667](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L667)
|
|
1288
|
+
|
|
1289
|
+
Executes the function synchronously with a named parameters object.
|
|
1014
1290
|
|
|
1015
1291
|
#### Parameters
|
|
1016
1292
|
|
|
@@ -1018,10 +1294,18 @@ Defined in: [packages/ai-tool/src/tool-func.ts:295](https://github.com/isdk/ai-t
|
|
|
1018
1294
|
|
|
1019
1295
|
`any`
|
|
1020
1296
|
|
|
1297
|
+
The parameters object for the function.
|
|
1298
|
+
|
|
1021
1299
|
#### Returns
|
|
1022
1300
|
|
|
1023
1301
|
`any`
|
|
1024
1302
|
|
|
1303
|
+
The result of the function execution.
|
|
1304
|
+
|
|
1305
|
+
#### Throws
|
|
1306
|
+
|
|
1307
|
+
Will throw an error if an array of parameters is passed to a function that expects an object.
|
|
1308
|
+
|
|
1025
1309
|
#### Inherited from
|
|
1026
1310
|
|
|
1027
1311
|
[`ToolFunc`](ToolFunc.md).[`runSync`](ToolFunc.md#runsync)
|
|
@@ -1032,7 +1316,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:295](https://github.com/isdk/ai-t
|
|
|
1032
1316
|
|
|
1033
1317
|
> **runWithPos**(...`params`): `Promise`\<`any`\>
|
|
1034
1318
|
|
|
1035
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1319
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:755](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L755)
|
|
1320
|
+
|
|
1321
|
+
Executes the function asynchronously using positional arguments.
|
|
1322
|
+
Delegates to `runWithPosSync()` internally.
|
|
1036
1323
|
|
|
1037
1324
|
#### Parameters
|
|
1038
1325
|
|
|
@@ -1040,10 +1327,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:338](https://github.com/isdk/ai-t
|
|
|
1040
1327
|
|
|
1041
1328
|
...`any`[]
|
|
1042
1329
|
|
|
1330
|
+
Positional arguments passed to the function.
|
|
1331
|
+
|
|
1043
1332
|
#### Returns
|
|
1044
1333
|
|
|
1045
1334
|
`Promise`\<`any`\>
|
|
1046
1335
|
|
|
1336
|
+
A promise that resolves with the result of the function execution.
|
|
1337
|
+
|
|
1047
1338
|
#### Inherited from
|
|
1048
1339
|
|
|
1049
1340
|
[`ToolFunc`](ToolFunc.md).[`runWithPos`](ToolFunc.md#runwithpos)
|
|
@@ -1054,7 +1345,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:338](https://github.com/isdk/ai-t
|
|
|
1054
1345
|
|
|
1055
1346
|
> **runWithPosAs**(`name`, ...`params`): `Promise`\<`any`\>
|
|
1056
1347
|
|
|
1057
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1348
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:766](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L766)
|
|
1349
|
+
|
|
1350
|
+
Asynchronously executes another function by name using positional arguments.
|
|
1351
|
+
Delegates to `runWithPosAsSync()` internally.
|
|
1058
1352
|
|
|
1059
1353
|
#### Parameters
|
|
1060
1354
|
|
|
@@ -1062,14 +1356,20 @@ Defined in: [packages/ai-tool/src/tool-func.ts:342](https://github.com/isdk/ai-t
|
|
|
1062
1356
|
|
|
1063
1357
|
`string`
|
|
1064
1358
|
|
|
1359
|
+
The name of the target function to run.
|
|
1360
|
+
|
|
1065
1361
|
##### params
|
|
1066
1362
|
|
|
1067
1363
|
...`any`[]
|
|
1068
1364
|
|
|
1365
|
+
Positional arguments to pass to the function.
|
|
1366
|
+
|
|
1069
1367
|
#### Returns
|
|
1070
1368
|
|
|
1071
1369
|
`Promise`\<`any`\>
|
|
1072
1370
|
|
|
1371
|
+
A promise that resolves with the result of the function execution.
|
|
1372
|
+
|
|
1073
1373
|
#### Inherited from
|
|
1074
1374
|
|
|
1075
1375
|
[`ToolFunc`](ToolFunc.md).[`runWithPosAs`](ToolFunc.md#runwithposas)
|
|
@@ -1080,7 +1380,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:342](https://github.com/isdk/ai-t
|
|
|
1080
1380
|
|
|
1081
1381
|
> **runWithPosAsSync**(`name`, ...`params`): `any`
|
|
1082
1382
|
|
|
1083
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1383
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:745](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L745)
|
|
1384
|
+
|
|
1385
|
+
Synchronously executes another function by name using positional arguments.
|
|
1386
|
+
This is a convenience wrapper around the static `runWithPosSync()` method.
|
|
1084
1387
|
|
|
1085
1388
|
#### Parameters
|
|
1086
1389
|
|
|
@@ -1088,14 +1391,20 @@ Defined in: [packages/ai-tool/src/tool-func.ts:334](https://github.com/isdk/ai-t
|
|
|
1088
1391
|
|
|
1089
1392
|
`string`
|
|
1090
1393
|
|
|
1394
|
+
The name of the target function to run.
|
|
1395
|
+
|
|
1091
1396
|
##### params
|
|
1092
1397
|
|
|
1093
1398
|
...`any`[]
|
|
1094
1399
|
|
|
1400
|
+
Positional arguments to pass to the function.
|
|
1401
|
+
|
|
1095
1402
|
#### Returns
|
|
1096
1403
|
|
|
1097
1404
|
`any`
|
|
1098
1405
|
|
|
1406
|
+
The result of the function execution.
|
|
1407
|
+
|
|
1099
1408
|
#### Inherited from
|
|
1100
1409
|
|
|
1101
1410
|
[`ToolFunc`](ToolFunc.md).[`runWithPosAsSync`](ToolFunc.md#runwithposassync)
|
|
@@ -1106,7 +1415,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:334](https://github.com/isdk/ai-t
|
|
|
1106
1415
|
|
|
1107
1416
|
> **runWithPosSync**(...`params`): `any`
|
|
1108
1417
|
|
|
1109
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1418
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:731](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L731)
|
|
1419
|
+
|
|
1420
|
+
Executes the function synchronously using positional arguments.
|
|
1421
|
+
If the function expects named parameters, it converts the arguments automatically.
|
|
1110
1422
|
|
|
1111
1423
|
#### Parameters
|
|
1112
1424
|
|
|
@@ -1114,10 +1426,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:327](https://github.com/isdk/ai-t
|
|
|
1114
1426
|
|
|
1115
1427
|
...`any`[]
|
|
1116
1428
|
|
|
1429
|
+
Positional arguments passed to the function.
|
|
1430
|
+
|
|
1117
1431
|
#### Returns
|
|
1118
1432
|
|
|
1119
1433
|
`any`
|
|
1120
1434
|
|
|
1435
|
+
The result of the function execution.
|
|
1436
|
+
|
|
1121
1437
|
#### Inherited from
|
|
1122
1438
|
|
|
1123
1439
|
[`ToolFunc`](ToolFunc.md).[`runWithPosSync`](ToolFunc.md#runwithpossync)
|
|
@@ -1128,7 +1444,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:327](https://github.com/isdk/ai-t
|
|
|
1128
1444
|
|
|
1129
1445
|
> **toJSON**(): `any`
|
|
1130
1446
|
|
|
1131
|
-
Defined in:
|
|
1447
|
+
Defined in: [property-manager.js/src/abstract.d.ts:182](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L182)
|
|
1132
1448
|
|
|
1133
1449
|
#### Returns
|
|
1134
1450
|
|
|
@@ -1144,7 +1460,7 @@ Defined in: node\_modules/.pnpm/property-manager@2.0.0/node\_modules/property-ma
|
|
|
1144
1460
|
|
|
1145
1461
|
> **toLocaleString**(): `string`
|
|
1146
1462
|
|
|
1147
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:131
|
|
1463
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:131
|
|
1148
1464
|
|
|
1149
1465
|
Returns a date converted to a string using the current locale.
|
|
1150
1466
|
|
|
@@ -1162,7 +1478,7 @@ Returns a date converted to a string using the current locale.
|
|
|
1162
1478
|
|
|
1163
1479
|
> **toObject**(`options`?): `any`
|
|
1164
1480
|
|
|
1165
|
-
Defined in:
|
|
1481
|
+
Defined in: [property-manager.js/src/abstract.d.ts:181](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L181)
|
|
1166
1482
|
|
|
1167
1483
|
Convert the attributes to the json object
|
|
1168
1484
|
|
|
@@ -1188,7 +1504,7 @@ the json object.
|
|
|
1188
1504
|
|
|
1189
1505
|
> **toString**(): `string`
|
|
1190
1506
|
|
|
1191
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:128
|
|
1507
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:128
|
|
1192
1508
|
|
|
1193
1509
|
Returns a string representation of an object.
|
|
1194
1510
|
|
|
@@ -1206,12 +1522,16 @@ Returns a string representation of an object.
|
|
|
1206
1522
|
|
|
1207
1523
|
> **unregister**(): `any`
|
|
1208
1524
|
|
|
1209
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1525
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:619](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L619)
|
|
1526
|
+
|
|
1527
|
+
Removes the current `ToolFunc` instance from the static registry.
|
|
1210
1528
|
|
|
1211
1529
|
#### Returns
|
|
1212
1530
|
|
|
1213
1531
|
`any`
|
|
1214
1532
|
|
|
1533
|
+
The instance that was unregistered.
|
|
1534
|
+
|
|
1215
1535
|
#### Inherited from
|
|
1216
1536
|
|
|
1217
1537
|
[`ToolFunc`](ToolFunc.md).[`unregister`](ToolFunc.md#unregister)
|
|
@@ -1222,7 +1542,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:265](https://github.com/isdk/ai-t
|
|
|
1222
1542
|
|
|
1223
1543
|
> **valueOf**(): `Object`
|
|
1224
1544
|
|
|
1225
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:134
|
|
1545
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:134
|
|
1226
1546
|
|
|
1227
1547
|
Returns the primitive value of the specified object.
|
|
1228
1548
|
|
|
@@ -1242,7 +1562,7 @@ Returns the primitive value of the specified object.
|
|
|
1242
1562
|
|
|
1243
1563
|
> `static` **assign**\<`T`, `U`\>(`target`, `source`): `T` & `U`
|
|
1244
1564
|
|
|
1245
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:286
|
|
1565
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:286
|
|
1246
1566
|
|
|
1247
1567
|
Copy the values of all of the enumerable own properties from one or more source objects to a
|
|
1248
1568
|
target object. Returns the target object.
|
|
@@ -1279,7 +1599,7 @@ The source object from which to copy properties.
|
|
|
1279
1599
|
|
|
1280
1600
|
> `static` **assign**\<`T`, `U`, `V`\>(`target`, `source1`, `source2`): `T` & `U` & `V`
|
|
1281
1601
|
|
|
1282
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:295
|
|
1602
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:295
|
|
1283
1603
|
|
|
1284
1604
|
Copy the values of all of the enumerable own properties from one or more source objects to a
|
|
1285
1605
|
target object. Returns the target object.
|
|
@@ -1324,7 +1644,7 @@ The second source object from which to copy properties.
|
|
|
1324
1644
|
|
|
1325
1645
|
> `static` **assign**\<`T`, `U`, `V`, `W`\>(`target`, `source1`, `source2`, `source3`): `T` & `U` & `V` & `W`
|
|
1326
1646
|
|
|
1327
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:305
|
|
1647
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:305
|
|
1328
1648
|
|
|
1329
1649
|
Copy the values of all of the enumerable own properties from one or more source objects to a
|
|
1330
1650
|
target object. Returns the target object.
|
|
@@ -1377,7 +1697,7 @@ The third source object from which to copy properties.
|
|
|
1377
1697
|
|
|
1378
1698
|
> `static` **assign**(`target`, ...`sources`): `any`
|
|
1379
1699
|
|
|
1380
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:313
|
|
1700
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:313
|
|
1381
1701
|
|
|
1382
1702
|
Copy the values of all of the enumerable own properties from one or more source objects to a
|
|
1383
1703
|
target object. Returns the target object.
|
|
@@ -1412,7 +1732,7 @@ One or more source objects from which to copy properties
|
|
|
1412
1732
|
|
|
1413
1733
|
> `static` **create**(`o`): `any`
|
|
1414
1734
|
|
|
1415
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:188
|
|
1735
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:188
|
|
1416
1736
|
|
|
1417
1737
|
Creates an object that has the specified prototype or that has null prototype.
|
|
1418
1738
|
|
|
@@ -1436,7 +1756,7 @@ Object to use as a prototype. May be null.
|
|
|
1436
1756
|
|
|
1437
1757
|
> `static` **create**(`o`, `properties`): `any`
|
|
1438
1758
|
|
|
1439
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:195
|
|
1759
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:195
|
|
1440
1760
|
|
|
1441
1761
|
Creates an object that has the specified prototype, and that optionally contains specified properties.
|
|
1442
1762
|
|
|
@@ -1468,7 +1788,7 @@ JavaScript object that contains one or more property descriptors.
|
|
|
1468
1788
|
|
|
1469
1789
|
> `static` **defineProperties**(`aTarget`, `aProperties`, `recreate`?): `any`
|
|
1470
1790
|
|
|
1471
|
-
Defined in:
|
|
1791
|
+
Defined in: [property-manager.js/src/advance.d.ts:11](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/advance.d.ts#L11)
|
|
1472
1792
|
|
|
1473
1793
|
Adds one or more properties to an object, and/or modifies attributes of existing properties.
|
|
1474
1794
|
|
|
@@ -1500,7 +1820,7 @@ Adds one or more properties to an object, and/or modifies attributes of existing
|
|
|
1500
1820
|
|
|
1501
1821
|
> `static` **defineProperty**\<`T`\>(`o`, `p`, `attributes`): `T`
|
|
1502
1822
|
|
|
1503
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:203
|
|
1823
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:203
|
|
1504
1824
|
|
|
1505
1825
|
Adds a property to an object, or modifies attributes of an existing property.
|
|
1506
1826
|
|
|
@@ -1544,7 +1864,7 @@ Descriptor for the property. It can be for a data property or an accessor proper
|
|
|
1544
1864
|
|
|
1545
1865
|
> `static` **entries**\<`T`\>(`o`): \[`string`, `T`\][]
|
|
1546
1866
|
|
|
1547
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:36
|
|
1867
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:36
|
|
1548
1868
|
|
|
1549
1869
|
Returns an array of key/values of the enumerable own properties of an object
|
|
1550
1870
|
|
|
@@ -1572,7 +1892,7 @@ Object that contains the properties and methods. This can be an object that you
|
|
|
1572
1892
|
|
|
1573
1893
|
> `static` **entries**(`o`): \[`string`, `any`\][]
|
|
1574
1894
|
|
|
1575
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:42
|
|
1895
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:42
|
|
1576
1896
|
|
|
1577
1897
|
Returns an array of key/values of the enumerable own properties of an object
|
|
1578
1898
|
|
|
@@ -1598,7 +1918,7 @@ Object that contains the properties and methods. This can be an object that you
|
|
|
1598
1918
|
|
|
1599
1919
|
> `static` **freeze**\<`T`\>(`f`): `T`
|
|
1600
1920
|
|
|
1601
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:222
|
|
1921
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:222
|
|
1602
1922
|
|
|
1603
1923
|
Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
|
|
1604
1924
|
|
|
@@ -1626,7 +1946,7 @@ Object on which to lock the attributes.
|
|
|
1626
1946
|
|
|
1627
1947
|
> `static` **freeze**\<`T`, `U`\>(`o`): `Readonly`\<`T`\>
|
|
1628
1948
|
|
|
1629
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:228
|
|
1949
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:228
|
|
1630
1950
|
|
|
1631
1951
|
Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
|
|
1632
1952
|
|
|
@@ -1656,7 +1976,7 @@ Object on which to lock the attributes.
|
|
|
1656
1976
|
|
|
1657
1977
|
> `static` **freeze**\<`T`\>(`o`): `Readonly`\<`T`\>
|
|
1658
1978
|
|
|
1659
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:234
|
|
1979
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:234
|
|
1660
1980
|
|
|
1661
1981
|
Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
|
|
1662
1982
|
|
|
@@ -1688,7 +2008,7 @@ Object on which to lock the attributes.
|
|
|
1688
2008
|
|
|
1689
2009
|
> `static` **fromEntries**\<`T`\>(`entries`): `object`
|
|
1690
2010
|
|
|
1691
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2019.object.d.ts:26
|
|
2011
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2019.object.d.ts:26
|
|
1692
2012
|
|
|
1693
2013
|
Returns an object created by key-value entries for properties and methods
|
|
1694
2014
|
|
|
@@ -1716,7 +2036,7 @@ An iterable object that contains key-value entries for properties and methods.
|
|
|
1716
2036
|
|
|
1717
2037
|
> `static` **fromEntries**(`entries`): `any`
|
|
1718
2038
|
|
|
1719
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2019.object.d.ts:32
|
|
2039
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2019.object.d.ts:32
|
|
1720
2040
|
|
|
1721
2041
|
Returns an object created by key-value entries for properties and methods
|
|
1722
2042
|
|
|
@@ -1742,7 +2062,9 @@ An iterable object that contains key-value entries for properties and methods.
|
|
|
1742
2062
|
|
|
1743
2063
|
> `static` **get**(`name`): [`ToolFunc`](ToolFunc.md)
|
|
1744
2064
|
|
|
1745
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2065
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:319](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L319)
|
|
2066
|
+
|
|
2067
|
+
Retrieves a registered function by its name or alias.
|
|
1746
2068
|
|
|
1747
2069
|
#### Parameters
|
|
1748
2070
|
|
|
@@ -1750,10 +2072,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:61](https://github.com/isdk/ai-to
|
|
|
1750
2072
|
|
|
1751
2073
|
`string`
|
|
1752
2074
|
|
|
2075
|
+
The name or alias of the function to retrieve.
|
|
2076
|
+
|
|
1753
2077
|
#### Returns
|
|
1754
2078
|
|
|
1755
2079
|
[`ToolFunc`](ToolFunc.md)
|
|
1756
2080
|
|
|
2081
|
+
The `ToolFunc` instance if found, otherwise `undefined`.
|
|
2082
|
+
|
|
1757
2083
|
#### Inherited from
|
|
1758
2084
|
|
|
1759
2085
|
[`ToolFunc`](ToolFunc.md).[`get`](ToolFunc.md#get)
|
|
@@ -1764,7 +2090,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:61](https://github.com/isdk/ai-to
|
|
|
1764
2090
|
|
|
1765
2091
|
> `static` **getAllByTag**(`tagName`): [`ToolFunc`](ToolFunc.md)[]
|
|
1766
2092
|
|
|
1767
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2093
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:365](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L365)
|
|
2094
|
+
|
|
2095
|
+
Retrieves all registered functions that have a specific tag.
|
|
1768
2096
|
|
|
1769
2097
|
#### Parameters
|
|
1770
2098
|
|
|
@@ -1772,10 +2100,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:93](https://github.com/isdk/ai-to
|
|
|
1772
2100
|
|
|
1773
2101
|
`string`
|
|
1774
2102
|
|
|
2103
|
+
The tag to search for.
|
|
2104
|
+
|
|
1775
2105
|
#### Returns
|
|
1776
2106
|
|
|
1777
2107
|
[`ToolFunc`](ToolFunc.md)[]
|
|
1778
2108
|
|
|
2109
|
+
An array of matching `ToolFunc` instances.
|
|
2110
|
+
|
|
1779
2111
|
#### Inherited from
|
|
1780
2112
|
|
|
1781
2113
|
[`ToolFunc`](ToolFunc.md).[`getAllByTag`](ToolFunc.md#getallbytag)
|
|
@@ -1786,7 +2118,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:93](https://github.com/isdk/ai-to
|
|
|
1786
2118
|
|
|
1787
2119
|
> `static` **getByTag**(`tagName`): `undefined` \| [`ToolFunc`](ToolFunc.md)
|
|
1788
2120
|
|
|
1789
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2121
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:340](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L340)
|
|
2122
|
+
|
|
2123
|
+
Finds the first registered function that has a specific tag.
|
|
1790
2124
|
|
|
1791
2125
|
#### Parameters
|
|
1792
2126
|
|
|
@@ -1794,10 +2128,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:73](https://github.com/isdk/ai-to
|
|
|
1794
2128
|
|
|
1795
2129
|
`string`
|
|
1796
2130
|
|
|
2131
|
+
The tag to search for.
|
|
2132
|
+
|
|
1797
2133
|
#### Returns
|
|
1798
2134
|
|
|
1799
2135
|
`undefined` \| [`ToolFunc`](ToolFunc.md)
|
|
1800
2136
|
|
|
2137
|
+
The first matching `ToolFunc` instance, or `undefined` if none is found.
|
|
2138
|
+
|
|
1801
2139
|
#### Inherited from
|
|
1802
2140
|
|
|
1803
2141
|
[`ToolFunc`](ToolFunc.md).[`getByTag`](ToolFunc.md#getbytag)
|
|
@@ -1808,7 +2146,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:73](https://github.com/isdk/ai-to
|
|
|
1808
2146
|
|
|
1809
2147
|
> `static` **getFunc**(`name`): `any`
|
|
1810
2148
|
|
|
1811
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2149
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:431](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L431)
|
|
2150
|
+
|
|
2151
|
+
Retrieves a bound, runnable function reference for a registered function.
|
|
2152
|
+
This reference is suitable for execution with an object of named parameters.
|
|
1812
2153
|
|
|
1813
2154
|
#### Parameters
|
|
1814
2155
|
|
|
@@ -1816,10 +2157,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:134](https://github.com/isdk/ai-t
|
|
|
1816
2157
|
|
|
1817
2158
|
`string`
|
|
1818
2159
|
|
|
2160
|
+
The name of the function.
|
|
2161
|
+
|
|
1819
2162
|
#### Returns
|
|
1820
2163
|
|
|
1821
2164
|
`any`
|
|
1822
2165
|
|
|
2166
|
+
A bound function reference, or `undefined` if not found.
|
|
2167
|
+
|
|
1823
2168
|
#### Inherited from
|
|
1824
2169
|
|
|
1825
2170
|
[`ToolFunc`](ToolFunc.md).[`getFunc`](ToolFunc.md#getfunc-2)
|
|
@@ -1830,7 +2175,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:134](https://github.com/isdk/ai-t
|
|
|
1830
2175
|
|
|
1831
2176
|
> `static` **getFuncWithPos**(`name`): `any`
|
|
1832
2177
|
|
|
1833
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2178
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:472](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L472)
|
|
2179
|
+
|
|
2180
|
+
Retrieves a bound, runnable function reference for a registered function.
|
|
2181
|
+
This reference is suitable for execution with positional arguments.
|
|
1834
2182
|
|
|
1835
2183
|
#### Parameters
|
|
1836
2184
|
|
|
@@ -1838,10 +2186,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:155](https://github.com/isdk/ai-t
|
|
|
1838
2186
|
|
|
1839
2187
|
`string`
|
|
1840
2188
|
|
|
2189
|
+
The name of the function.
|
|
2190
|
+
|
|
1841
2191
|
#### Returns
|
|
1842
2192
|
|
|
1843
2193
|
`any`
|
|
1844
2194
|
|
|
2195
|
+
A bound function reference, or `undefined` if not found.
|
|
2196
|
+
|
|
1845
2197
|
#### Inherited from
|
|
1846
2198
|
|
|
1847
2199
|
[`ToolFunc`](ToolFunc.md).[`getFuncWithPos`](ToolFunc.md#getfuncwithpos-2)
|
|
@@ -1852,7 +2204,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:155](https://github.com/isdk/ai-t
|
|
|
1852
2204
|
|
|
1853
2205
|
> `static` **getOwnPropertyDescriptor**(`o`, `p`): `undefined` \| `PropertyDescriptor`
|
|
1854
2206
|
|
|
1855
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:175
|
|
2207
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:175
|
|
1856
2208
|
|
|
1857
2209
|
Gets the own property descriptor of the specified object.
|
|
1858
2210
|
An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.
|
|
@@ -1885,7 +2237,7 @@ Name of the property.
|
|
|
1885
2237
|
|
|
1886
2238
|
> `static` **getOwnPropertyDescriptors**\<`T`\>(`o`): \{ \[P in string \| number \| symbol\]: TypedPropertyDescriptor\<T\[P\]\> \} & `object`
|
|
1887
2239
|
|
|
1888
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:48
|
|
2240
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:48
|
|
1889
2241
|
|
|
1890
2242
|
Returns an object containing all own property descriptors of an object
|
|
1891
2243
|
|
|
@@ -1915,7 +2267,7 @@ Object that contains the properties and methods. This can be an object that you
|
|
|
1915
2267
|
|
|
1916
2268
|
> `static` **getOwnPropertyNames**(`o`): `string`[]
|
|
1917
2269
|
|
|
1918
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:182
|
|
2270
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:182
|
|
1919
2271
|
|
|
1920
2272
|
Returns the names of the own properties of an object. The own properties of an object are those that are defined directly
|
|
1921
2273
|
on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.
|
|
@@ -1942,7 +2294,7 @@ Object that contains the own properties.
|
|
|
1942
2294
|
|
|
1943
2295
|
> `static` **getOwnPropertySymbols**(`o`): `symbol`[]
|
|
1944
2296
|
|
|
1945
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:319
|
|
2297
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:319
|
|
1946
2298
|
|
|
1947
2299
|
Returns an array of all symbol properties found directly on object o.
|
|
1948
2300
|
|
|
@@ -1968,7 +2320,7 @@ Object to retrieve the symbols from.
|
|
|
1968
2320
|
|
|
1969
2321
|
> `static` **getProperties**(): `PropDescriptors`
|
|
1970
2322
|
|
|
1971
|
-
Defined in:
|
|
2323
|
+
Defined in: [property-manager.js/src/advance.d.ts:10](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/advance.d.ts#L10)
|
|
1972
2324
|
|
|
1973
2325
|
get all properties descriptor include inherited.
|
|
1974
2326
|
|
|
@@ -1986,7 +2338,7 @@ get all properties descriptor include inherited.
|
|
|
1986
2338
|
|
|
1987
2339
|
> `static` **getPrototypeOf**(`o`): `any`
|
|
1988
2340
|
|
|
1989
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:167
|
|
2341
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:167
|
|
1990
2342
|
|
|
1991
2343
|
Returns the prototype of an object.
|
|
1992
2344
|
|
|
@@ -2012,7 +2364,9 @@ The object that references the prototype.
|
|
|
2012
2364
|
|
|
2013
2365
|
> `static` **hasAsyncFeature**(`feature`): `boolean`
|
|
2014
2366
|
|
|
2015
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2367
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:388](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L388)
|
|
2368
|
+
|
|
2369
|
+
Checks if any registered function has a specific asynchronous feature.
|
|
2016
2370
|
|
|
2017
2371
|
#### Parameters
|
|
2018
2372
|
|
|
@@ -2020,10 +2374,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:111](https://github.com/isdk/ai-t
|
|
|
2020
2374
|
|
|
2021
2375
|
[`AsyncFeatureBits`](../enumerations/AsyncFeatureBits.md)
|
|
2022
2376
|
|
|
2377
|
+
The async feature bit to check for.
|
|
2378
|
+
|
|
2023
2379
|
#### Returns
|
|
2024
2380
|
|
|
2025
2381
|
`boolean`
|
|
2026
2382
|
|
|
2383
|
+
`true` if the feature is present in any function, otherwise `false`.
|
|
2384
|
+
|
|
2027
2385
|
#### Inherited from
|
|
2028
2386
|
|
|
2029
2387
|
[`ToolFunc`](ToolFunc.md).[`hasAsyncFeature`](ToolFunc.md#hasasyncfeature-2)
|
|
@@ -2034,7 +2392,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:111](https://github.com/isdk/ai-t
|
|
|
2034
2392
|
|
|
2035
2393
|
> `static` **hasOwn**(`o`, `v`): `boolean`
|
|
2036
2394
|
|
|
2037
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2022.object.d.ts:25
|
|
2395
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2022.object.d.ts:25
|
|
2038
2396
|
|
|
2039
2397
|
Determines whether an object has a property with the specified name.
|
|
2040
2398
|
|
|
@@ -2066,7 +2424,7 @@ A property name.
|
|
|
2066
2424
|
|
|
2067
2425
|
> `static` **is**(`value1`, `value2`): `boolean`
|
|
2068
2426
|
|
|
2069
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:332
|
|
2427
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:332
|
|
2070
2428
|
|
|
2071
2429
|
Returns true if the values are the same value, false otherwise.
|
|
2072
2430
|
|
|
@@ -2098,7 +2456,7 @@ The second value.
|
|
|
2098
2456
|
|
|
2099
2457
|
> `static` **isExtensible**(`o`): `boolean`
|
|
2100
2458
|
|
|
2101
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:258
|
|
2459
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:258
|
|
2102
2460
|
|
|
2103
2461
|
Returns a value that indicates whether new properties can be added to an object.
|
|
2104
2462
|
|
|
@@ -2124,7 +2482,7 @@ Object to test.
|
|
|
2124
2482
|
|
|
2125
2483
|
> `static` **isFrozen**(`o`): `boolean`
|
|
2126
2484
|
|
|
2127
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:252
|
|
2485
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:252
|
|
2128
2486
|
|
|
2129
2487
|
Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.
|
|
2130
2488
|
|
|
@@ -2150,7 +2508,7 @@ Object to test.
|
|
|
2150
2508
|
|
|
2151
2509
|
> `static` **isSealed**(`o`): `boolean`
|
|
2152
2510
|
|
|
2153
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:246
|
|
2511
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:246
|
|
2154
2512
|
|
|
2155
2513
|
Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.
|
|
2156
2514
|
|
|
@@ -2178,7 +2536,7 @@ Object to test.
|
|
|
2178
2536
|
|
|
2179
2537
|
> `static` **keys**(`o`): `string`[]
|
|
2180
2538
|
|
|
2181
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:264
|
|
2539
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:264
|
|
2182
2540
|
|
|
2183
2541
|
Returns the names of the enumerable string properties and methods of an object.
|
|
2184
2542
|
|
|
@@ -2202,7 +2560,7 @@ Object that contains the properties and methods. This can be an object that you
|
|
|
2202
2560
|
|
|
2203
2561
|
> `static` **keys**(`o`): `string`[]
|
|
2204
2562
|
|
|
2205
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:325
|
|
2563
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:325
|
|
2206
2564
|
|
|
2207
2565
|
Returns the names of the enumerable string properties and methods of an object.
|
|
2208
2566
|
|
|
@@ -2226,12 +2584,16 @@ Object that contains the properties and methods. This can be an object that you
|
|
|
2226
2584
|
|
|
2227
2585
|
> `static` **list**(): [`Funcs`](../interfaces/Funcs.md)
|
|
2228
2586
|
|
|
2229
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2587
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:331](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L331)
|
|
2588
|
+
|
|
2589
|
+
Returns the complete map of all registered functions.
|
|
2230
2590
|
|
|
2231
2591
|
#### Returns
|
|
2232
2592
|
|
|
2233
2593
|
[`Funcs`](../interfaces/Funcs.md)
|
|
2234
2594
|
|
|
2595
|
+
The map of `ToolFunc` instances.
|
|
2596
|
+
|
|
2235
2597
|
#### Inherited from
|
|
2236
2598
|
|
|
2237
2599
|
[`ToolFunc`](ToolFunc.md).[`list`](ToolFunc.md#list)
|
|
@@ -2242,7 +2604,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:69](https://github.com/isdk/ai-to
|
|
|
2242
2604
|
|
|
2243
2605
|
> `static` **preventExtensions**\<`T`\>(`o`): `T`
|
|
2244
2606
|
|
|
2245
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:240
|
|
2607
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:240
|
|
2246
2608
|
|
|
2247
2609
|
Prevents the addition of new properties to an object.
|
|
2248
2610
|
|
|
@@ -2274,7 +2636,9 @@ Object to make non-extensible.
|
|
|
2274
2636
|
|
|
2275
2637
|
> `static` **register**(`name`, `options`): `boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2276
2638
|
|
|
2277
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2639
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:495](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L495)
|
|
2640
|
+
|
|
2641
|
+
Registers a new tool function.
|
|
2278
2642
|
|
|
2279
2643
|
##### Parameters
|
|
2280
2644
|
|
|
@@ -2282,14 +2646,24 @@ Defined in: [packages/ai-tool/src/tool-func.ts:160](https://github.com/isdk/ai-t
|
|
|
2282
2646
|
|
|
2283
2647
|
`string`
|
|
2284
2648
|
|
|
2649
|
+
The name of the function.
|
|
2650
|
+
|
|
2285
2651
|
###### options
|
|
2286
2652
|
|
|
2287
2653
|
[`FuncItem`](../interfaces/FuncItem.md)
|
|
2288
2654
|
|
|
2655
|
+
The function's configuration.
|
|
2656
|
+
|
|
2289
2657
|
##### Returns
|
|
2290
2658
|
|
|
2291
2659
|
`boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2292
2660
|
|
|
2661
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2662
|
+
|
|
2663
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2664
|
+
|
|
2665
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2666
|
+
|
|
2293
2667
|
##### Inherited from
|
|
2294
2668
|
|
|
2295
2669
|
[`ToolFunc`](ToolFunc.md).[`register`](ToolFunc.md#register-2)
|
|
@@ -2298,7 +2672,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:160](https://github.com/isdk/ai-t
|
|
|
2298
2672
|
|
|
2299
2673
|
> `static` **register**(`func`, `options`): `boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2300
2674
|
|
|
2301
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2675
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:496](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L496)
|
|
2676
|
+
|
|
2677
|
+
Registers a new tool function.
|
|
2302
2678
|
|
|
2303
2679
|
##### Parameters
|
|
2304
2680
|
|
|
@@ -2306,14 +2682,24 @@ Defined in: [packages/ai-tool/src/tool-func.ts:161](https://github.com/isdk/ai-t
|
|
|
2306
2682
|
|
|
2307
2683
|
`Function`
|
|
2308
2684
|
|
|
2685
|
+
The function implementation.
|
|
2686
|
+
|
|
2309
2687
|
###### options
|
|
2310
2688
|
|
|
2311
2689
|
[`FuncItem`](../interfaces/FuncItem.md)
|
|
2312
2690
|
|
|
2691
|
+
The function's configuration.
|
|
2692
|
+
|
|
2313
2693
|
##### Returns
|
|
2314
2694
|
|
|
2315
2695
|
`boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2316
2696
|
|
|
2697
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2698
|
+
|
|
2699
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2700
|
+
|
|
2701
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2702
|
+
|
|
2317
2703
|
##### Inherited from
|
|
2318
2704
|
|
|
2319
2705
|
[`ToolFunc`](ToolFunc.md).[`register`](ToolFunc.md#register-2)
|
|
@@ -2322,22 +2708,34 @@ Defined in: [packages/ai-tool/src/tool-func.ts:161](https://github.com/isdk/ai-t
|
|
|
2322
2708
|
|
|
2323
2709
|
> `static` **register**(`name`, `options`?): `boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2324
2710
|
|
|
2325
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2711
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:497](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L497)
|
|
2712
|
+
|
|
2713
|
+
Registers a new tool function.
|
|
2326
2714
|
|
|
2327
2715
|
##### Parameters
|
|
2328
2716
|
|
|
2329
2717
|
###### name
|
|
2330
2718
|
|
|
2719
|
+
The name of the function.
|
|
2720
|
+
|
|
2331
2721
|
`string` | `Function` | [`ToolFunc`](ToolFunc.md) | [`FuncItem`](../interfaces/FuncItem.md)
|
|
2332
2722
|
|
|
2333
2723
|
###### options?
|
|
2334
2724
|
|
|
2335
2725
|
[`FuncItem`](../interfaces/FuncItem.md)
|
|
2336
2726
|
|
|
2727
|
+
The function's configuration.
|
|
2728
|
+
|
|
2337
2729
|
##### Returns
|
|
2338
2730
|
|
|
2339
2731
|
`boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2340
2732
|
|
|
2733
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2734
|
+
|
|
2735
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2736
|
+
|
|
2737
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2738
|
+
|
|
2341
2739
|
##### Inherited from
|
|
2342
2740
|
|
|
2343
2741
|
[`ToolFunc`](ToolFunc.md).[`register`](ToolFunc.md#register-2)
|
|
@@ -2348,7 +2746,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:162](https://github.com/isdk/ai-t
|
|
|
2348
2746
|
|
|
2349
2747
|
> `static` **run**(`name`, `params`?): `Promise`\<`any`\>
|
|
2350
2748
|
|
|
2351
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2749
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:402](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L402)
|
|
2750
|
+
|
|
2751
|
+
Asynchronously executes a registered function by name with named parameters.
|
|
2352
2752
|
|
|
2353
2753
|
#### Parameters
|
|
2354
2754
|
|
|
@@ -2356,14 +2756,24 @@ Defined in: [packages/ai-tool/src/tool-func.ts:118](https://github.com/isdk/ai-t
|
|
|
2356
2756
|
|
|
2357
2757
|
`string`
|
|
2358
2758
|
|
|
2759
|
+
The name of the function to run.
|
|
2760
|
+
|
|
2359
2761
|
##### params?
|
|
2360
2762
|
|
|
2361
2763
|
`any`
|
|
2362
2764
|
|
|
2765
|
+
The parameters object for the function.
|
|
2766
|
+
|
|
2363
2767
|
#### Returns
|
|
2364
2768
|
|
|
2365
2769
|
`Promise`\<`any`\>
|
|
2366
2770
|
|
|
2771
|
+
A promise that resolves with the function's result.
|
|
2772
|
+
|
|
2773
|
+
#### Throws
|
|
2774
|
+
|
|
2775
|
+
If the function with the given name is not found.
|
|
2776
|
+
|
|
2367
2777
|
#### Inherited from
|
|
2368
2778
|
|
|
2369
2779
|
[`ToolFunc`](ToolFunc.md).[`run`](ToolFunc.md#run-2)
|
|
@@ -2374,7 +2784,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:118](https://github.com/isdk/ai-t
|
|
|
2374
2784
|
|
|
2375
2785
|
> `static` **runSync**(`name`, `params`?): `any`
|
|
2376
2786
|
|
|
2377
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2787
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:417](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L417)
|
|
2788
|
+
|
|
2789
|
+
Synchronously executes a registered function by name with named parameters.
|
|
2378
2790
|
|
|
2379
2791
|
#### Parameters
|
|
2380
2792
|
|
|
@@ -2382,14 +2794,24 @@ Defined in: [packages/ai-tool/src/tool-func.ts:126](https://github.com/isdk/ai-t
|
|
|
2382
2794
|
|
|
2383
2795
|
`string`
|
|
2384
2796
|
|
|
2797
|
+
The name of the function to run.
|
|
2798
|
+
|
|
2385
2799
|
##### params?
|
|
2386
2800
|
|
|
2387
2801
|
`any`
|
|
2388
2802
|
|
|
2803
|
+
The parameters object for the function.
|
|
2804
|
+
|
|
2389
2805
|
#### Returns
|
|
2390
2806
|
|
|
2391
2807
|
`any`
|
|
2392
2808
|
|
|
2809
|
+
The result of the function's execution.
|
|
2810
|
+
|
|
2811
|
+
#### Throws
|
|
2812
|
+
|
|
2813
|
+
If the function with the given name is not found.
|
|
2814
|
+
|
|
2393
2815
|
#### Inherited from
|
|
2394
2816
|
|
|
2395
2817
|
[`ToolFunc`](ToolFunc.md).[`runSync`](ToolFunc.md#runsync-2)
|
|
@@ -2400,7 +2822,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:126](https://github.com/isdk/ai-t
|
|
|
2400
2822
|
|
|
2401
2823
|
> `static` **runWithPos**(`name`, ...`params`): `Promise`\<`any`\>
|
|
2402
2824
|
|
|
2403
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2825
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:443](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L443)
|
|
2826
|
+
|
|
2827
|
+
Asynchronously executes a function using positional arguments.
|
|
2404
2828
|
|
|
2405
2829
|
#### Parameters
|
|
2406
2830
|
|
|
@@ -2408,14 +2832,24 @@ Defined in: [packages/ai-tool/src/tool-func.ts:139](https://github.com/isdk/ai-t
|
|
|
2408
2832
|
|
|
2409
2833
|
`string`
|
|
2410
2834
|
|
|
2835
|
+
The name of the function to run.
|
|
2836
|
+
|
|
2411
2837
|
##### params
|
|
2412
2838
|
|
|
2413
2839
|
...`any`[]
|
|
2414
2840
|
|
|
2841
|
+
Positional arguments to pass to the function.
|
|
2842
|
+
|
|
2415
2843
|
#### Returns
|
|
2416
2844
|
|
|
2417
2845
|
`Promise`\<`any`\>
|
|
2418
2846
|
|
|
2847
|
+
A promise that resolves with the function's result.
|
|
2848
|
+
|
|
2849
|
+
#### Throws
|
|
2850
|
+
|
|
2851
|
+
If the function with the given name is not found.
|
|
2852
|
+
|
|
2419
2853
|
#### Inherited from
|
|
2420
2854
|
|
|
2421
2855
|
[`ToolFunc`](ToolFunc.md).[`runWithPos`](ToolFunc.md#runwithpos-2)
|
|
@@ -2426,7 +2860,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:139](https://github.com/isdk/ai-t
|
|
|
2426
2860
|
|
|
2427
2861
|
> `static` **runWithPosSync**(`name`, ...`params`): `any`
|
|
2428
2862
|
|
|
2429
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2863
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:458](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L458)
|
|
2864
|
+
|
|
2865
|
+
Synchronously executes a function using positional arguments.
|
|
2430
2866
|
|
|
2431
2867
|
#### Parameters
|
|
2432
2868
|
|
|
@@ -2434,14 +2870,24 @@ Defined in: [packages/ai-tool/src/tool-func.ts:147](https://github.com/isdk/ai-t
|
|
|
2434
2870
|
|
|
2435
2871
|
`string`
|
|
2436
2872
|
|
|
2873
|
+
The name of the function to run.
|
|
2874
|
+
|
|
2437
2875
|
##### params
|
|
2438
2876
|
|
|
2439
2877
|
...`any`[]
|
|
2440
2878
|
|
|
2879
|
+
Positional arguments to pass to the function.
|
|
2880
|
+
|
|
2441
2881
|
#### Returns
|
|
2442
2882
|
|
|
2443
2883
|
`any`
|
|
2444
2884
|
|
|
2885
|
+
The result of the function's execution.
|
|
2886
|
+
|
|
2887
|
+
#### Throws
|
|
2888
|
+
|
|
2889
|
+
If the function with the given name is not found.
|
|
2890
|
+
|
|
2445
2891
|
#### Inherited from
|
|
2446
2892
|
|
|
2447
2893
|
[`ToolFunc`](ToolFunc.md).[`runWithPosSync`](ToolFunc.md#runwithpossync-2)
|
|
@@ -2452,7 +2898,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:147](https://github.com/isdk/ai-t
|
|
|
2452
2898
|
|
|
2453
2899
|
> `static` **seal**\<`T`\>(`o`): `T`
|
|
2454
2900
|
|
|
2455
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:216
|
|
2901
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:216
|
|
2456
2902
|
|
|
2457
2903
|
Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
|
|
2458
2904
|
|
|
@@ -2482,7 +2928,7 @@ Object on which to lock the attributes.
|
|
|
2482
2928
|
|
|
2483
2929
|
> `static` **setPrototypeOf**(`o`, `proto`): `any`
|
|
2484
2930
|
|
|
2485
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:339
|
|
2931
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:339
|
|
2486
2932
|
|
|
2487
2933
|
Sets the prototype of a specified object o to object proto or null. Returns the object o.
|
|
2488
2934
|
|
|
@@ -2514,7 +2960,9 @@ The value of the new prototype or null.
|
|
|
2514
2960
|
|
|
2515
2961
|
> `static` **unregister**(`name`): `undefined` \| [`ToolFunc`](ToolFunc.md)
|
|
2516
2962
|
|
|
2517
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2963
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:547](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L547)
|
|
2964
|
+
|
|
2965
|
+
Unregisters a function by its name, also removing any associated aliases.
|
|
2518
2966
|
|
|
2519
2967
|
#### Parameters
|
|
2520
2968
|
|
|
@@ -2522,10 +2970,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:207](https://github.com/isdk/ai-t
|
|
|
2522
2970
|
|
|
2523
2971
|
`string`
|
|
2524
2972
|
|
|
2973
|
+
The name of the function to unregister.
|
|
2974
|
+
|
|
2525
2975
|
#### Returns
|
|
2526
2976
|
|
|
2527
2977
|
`undefined` \| [`ToolFunc`](ToolFunc.md)
|
|
2528
2978
|
|
|
2979
|
+
The unregistered `ToolFunc` instance, or `undefined` if it was not found.
|
|
2980
|
+
|
|
2529
2981
|
#### Inherited from
|
|
2530
2982
|
|
|
2531
2983
|
[`ToolFunc`](ToolFunc.md).[`unregister`](ToolFunc.md#unregister-2)
|
|
@@ -2538,7 +2990,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:207](https://github.com/isdk/ai-t
|
|
|
2538
2990
|
|
|
2539
2991
|
> `static` **values**\<`T`\>(`o`): `T`[]
|
|
2540
2992
|
|
|
2541
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:24
|
|
2993
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:24
|
|
2542
2994
|
|
|
2543
2995
|
Returns an array of values of the enumerable own properties of an object
|
|
2544
2996
|
|
|
@@ -2566,7 +3018,7 @@ Object that contains the properties and methods. This can be an object that you
|
|
|
2566
3018
|
|
|
2567
3019
|
> `static` **values**(`o`): `any`[]
|
|
2568
3020
|
|
|
2569
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:30
|
|
3021
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:30
|
|
2570
3022
|
|
|
2571
3023
|
Returns an array of values of the enumerable own properties of an object
|
|
2572
3024
|
|