@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,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Class: EventClient
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/ai-tool/src/funcs/event-client.ts:
|
|
9
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-client.ts:13](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/funcs/event-client.ts#L13)
|
|
10
10
|
|
|
11
11
|
## Extends
|
|
12
12
|
|
|
@@ -20,9 +20,9 @@ Defined in: [packages/ai-tool/src/funcs/event-client.ts:12](https://github.com/i
|
|
|
20
20
|
|
|
21
21
|
### new EventClient()
|
|
22
22
|
|
|
23
|
-
> **new EventClient**(`name`, `options
|
|
23
|
+
> **new EventClient**(`name`, `options`?): [`EventClient`](EventClient.md)
|
|
24
24
|
|
|
25
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
25
|
+
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
26
|
|
|
27
27
|
The initial value of Object.prototype.constructor is the standard built-in Object constructor.
|
|
28
28
|
|
|
@@ -30,12 +30,16 @@ The initial value of Object.prototype.constructor is the standard built-in Objec
|
|
|
30
30
|
|
|
31
31
|
##### name
|
|
32
32
|
|
|
33
|
+
Can be a function name, a function implementation, or a configuration object.
|
|
34
|
+
|
|
33
35
|
`string` | `Function` | [`FuncItem`](../interfaces/FuncItem.md)
|
|
34
36
|
|
|
35
|
-
##### options
|
|
37
|
+
##### options?
|
|
36
38
|
|
|
37
39
|
`any` = `{}`
|
|
38
40
|
|
|
41
|
+
Configuration options if not provided in the first argument.
|
|
42
|
+
|
|
39
43
|
#### Returns
|
|
40
44
|
|
|
41
45
|
[`EventClient`](EventClient.md)
|
|
@@ -46,35 +50,35 @@ The initial value of Object.prototype.constructor is the standard built-in Objec
|
|
|
46
50
|
|
|
47
51
|
## Properties
|
|
48
52
|
|
|
49
|
-
### \
|
|
53
|
+
### \_forwardEvents
|
|
50
54
|
|
|
51
|
-
> **\
|
|
55
|
+
> **\_forwardEvents**: `Set`\<`string`\>
|
|
52
56
|
|
|
53
|
-
Defined in: [packages/ai-tool/src/funcs/event-client.ts:
|
|
57
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-client.ts:25](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/funcs/event-client.ts#L25)
|
|
54
58
|
|
|
55
59
|
***
|
|
56
60
|
|
|
57
|
-
### \
|
|
61
|
+
### \_sseListeners
|
|
58
62
|
|
|
59
|
-
> **\
|
|
63
|
+
> **\_sseListeners**: `Record`\<`string`, (`data`, `ctx`?) => `void`\> = `{}`
|
|
60
64
|
|
|
61
|
-
Defined in: [packages/ai-tool/src/funcs/event-client.ts:
|
|
65
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-client.ts:24](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/funcs/event-client.ts#L24)
|
|
62
66
|
|
|
63
67
|
***
|
|
64
68
|
|
|
65
|
-
### \
|
|
69
|
+
### \_stream
|
|
66
70
|
|
|
67
|
-
> **\
|
|
71
|
+
> **\_stream**: `undefined` \| [`PubSubClientStream`](../interfaces/PubSubClientStream.md)
|
|
68
72
|
|
|
69
|
-
Defined in: [packages/ai-tool/src/funcs/event-client.ts:
|
|
73
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-client.ts:21](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/funcs/event-client.ts#L21)
|
|
70
74
|
|
|
71
75
|
***
|
|
72
76
|
|
|
73
|
-
### \
|
|
77
|
+
### \_streamEvents
|
|
74
78
|
|
|
75
|
-
> **\
|
|
79
|
+
> **\_streamEvents**: `undefined` \| `string`[]
|
|
76
80
|
|
|
77
|
-
Defined in: [packages/ai-tool/src/funcs/event-client.ts:
|
|
81
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-client.ts:22](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/funcs/event-client.ts#L22)
|
|
78
82
|
|
|
79
83
|
***
|
|
80
84
|
|
|
@@ -82,7 +86,7 @@ Defined in: [packages/ai-tool/src/funcs/event-client.ts:17](https://github.com/i
|
|
|
82
86
|
|
|
83
87
|
> **$attributes**: `Properties`
|
|
84
88
|
|
|
85
|
-
Defined in:
|
|
89
|
+
Defined in: [property-manager.js/src/advance.d.ts:5](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/advance.d.ts#L5)
|
|
86
90
|
|
|
87
91
|
#### Inherited from
|
|
88
92
|
|
|
@@ -94,7 +98,10 @@ Defined in: node\_modules/.pnpm/property-manager@2.0.0/node\_modules/property-ma
|
|
|
94
98
|
|
|
95
99
|
> `optional` **action**: `"get"` \| `"post"` \| `"put"` \| `"delete"` \| `"patch"` \| `"list"` \| `"res"`
|
|
96
100
|
|
|
97
|
-
Defined in: [packages/ai-tool/src/utils/consts.ts:
|
|
101
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/consts.ts:95](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/utils/consts.ts#L95)
|
|
102
|
+
|
|
103
|
+
The action to be used for the remote call. This typically represents an RPC method name.
|
|
104
|
+
Only for RESTful HTTP transports, it might be mapped to a standard HTTP method (e.g., GET, POST)
|
|
98
105
|
|
|
99
106
|
#### Inherited from
|
|
100
107
|
|
|
@@ -106,7 +113,9 @@ Defined in: [packages/ai-tool/src/utils/consts.ts:35](https://github.com/isdk/ai
|
|
|
106
113
|
|
|
107
114
|
> `optional` **alias**: `string` \| `string`[]
|
|
108
115
|
|
|
109
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
116
|
+
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)
|
|
117
|
+
|
|
118
|
+
Optional aliases for the function name.
|
|
110
119
|
|
|
111
120
|
#### Inherited from
|
|
112
121
|
|
|
@@ -114,15 +123,33 @@ Defined in: [packages/ai-tool/src/tool-func.ts:31](https://github.com/isdk/ai-to
|
|
|
114
123
|
|
|
115
124
|
***
|
|
116
125
|
|
|
117
|
-
###
|
|
126
|
+
### asyncFeatures?
|
|
118
127
|
|
|
119
|
-
>
|
|
128
|
+
> `optional` **asyncFeatures**: `number`
|
|
120
129
|
|
|
121
|
-
Defined in: [packages/ai-tool/src/
|
|
130
|
+
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)
|
|
131
|
+
|
|
132
|
+
A bitmask representing asynchronous features supported by the function, built from `AsyncFeatureBits`.
|
|
133
|
+
This allows the system to understand if a function supports capabilities like cancellation or multi-tasking.
|
|
134
|
+
|
|
135
|
+
#### See
|
|
136
|
+
|
|
137
|
+
AsyncFeatureBits from `@src/utils/cancelable-ability.ts`
|
|
138
|
+
|
|
139
|
+
#### Example
|
|
140
|
+
|
|
141
|
+
```ts
|
|
142
|
+
import { AsyncFeatures } from './utils';
|
|
143
|
+
const func = new ToolFunc({
|
|
144
|
+
name: 'cancellableTask',
|
|
145
|
+
asyncFeatures: AsyncFeatures.Cancelable | AsyncFeatures.MultiTask,
|
|
146
|
+
// ...
|
|
147
|
+
});
|
|
148
|
+
```
|
|
122
149
|
|
|
123
150
|
#### Inherited from
|
|
124
151
|
|
|
125
|
-
[`ResClientTools`](ResClientTools.md).[`
|
|
152
|
+
[`ResClientTools`](ResClientTools.md).[`asyncFeatures`](ResClientTools.md#asyncfeatures)
|
|
126
153
|
|
|
127
154
|
***
|
|
128
155
|
|
|
@@ -130,7 +157,7 @@ Defined in: [packages/ai-tool/src/client-tools.ts:16](https://github.com/isdk/ai
|
|
|
130
157
|
|
|
131
158
|
> **constructor**: `Function`
|
|
132
159
|
|
|
133
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:125
|
|
160
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:125
|
|
134
161
|
|
|
135
162
|
The initial value of Object.prototype.constructor is the standard built-in Object constructor.
|
|
136
163
|
|
|
@@ -144,7 +171,7 @@ The initial value of Object.prototype.constructor is the standard built-in Objec
|
|
|
144
171
|
|
|
145
172
|
> **defaultOptions**: `object`
|
|
146
173
|
|
|
147
|
-
Defined in:
|
|
174
|
+
Defined in: [property-manager.js/src/abstract.d.ts:74](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L74)
|
|
148
175
|
|
|
149
176
|
The default options for export and assign
|
|
150
177
|
|
|
@@ -162,11 +189,56 @@ The default options for export and assign
|
|
|
162
189
|
|
|
163
190
|
***
|
|
164
191
|
|
|
192
|
+
### depends?
|
|
193
|
+
|
|
194
|
+
> `optional` **depends**: `object`
|
|
195
|
+
|
|
196
|
+
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)
|
|
197
|
+
|
|
198
|
+
A map of dependencies this function has on other tool functions.
|
|
199
|
+
Declaring dependencies ensures that they are automatically registered when this function is registered.
|
|
200
|
+
This is crucial for building modular functions that rely on each other without needing to manage registration order manually.
|
|
201
|
+
|
|
202
|
+
#### Index Signature
|
|
203
|
+
|
|
204
|
+
\[`name`: `string`\]: [`ToolFunc`](ToolFunc.md)
|
|
205
|
+
|
|
206
|
+
#### Example
|
|
207
|
+
|
|
208
|
+
```ts
|
|
209
|
+
const helperFunc = new ToolFunc({ name: 'helper', func: () => 'world' });
|
|
210
|
+
const mainFunc = new ToolFunc({
|
|
211
|
+
name: 'main',
|
|
212
|
+
depends: {
|
|
213
|
+
helper: helperFunc,
|
|
214
|
+
},
|
|
215
|
+
func() {
|
|
216
|
+
// We can now safely run the dependency
|
|
217
|
+
const result = this.runSync('helper');
|
|
218
|
+
return `Hello, ${result}`;
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
// When mainFunc is registered, helperFunc will be registered automatically.
|
|
222
|
+
mainFunc.register();
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
#### Inherited from
|
|
226
|
+
|
|
227
|
+
[`ResClientTools`](ResClientTools.md).[`depends`](ResClientTools.md#depends)
|
|
228
|
+
|
|
229
|
+
***
|
|
230
|
+
|
|
165
231
|
### description
|
|
166
232
|
|
|
167
|
-
> **description**: `string` = `'subscribe server
|
|
233
|
+
> **description**: `string` = `'subscribe server event'`
|
|
168
234
|
|
|
169
|
-
Defined in: [packages/ai-tool/src/funcs/event-client.ts:
|
|
235
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-client.ts:49](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/funcs/event-client.ts#L49)
|
|
236
|
+
|
|
237
|
+
A detailed description of what the function does.
|
|
238
|
+
|
|
239
|
+
#### Overrides
|
|
240
|
+
|
|
241
|
+
[`ResClientTools`](ResClientTools.md).[`description`](ResClientTools.md#description)
|
|
170
242
|
|
|
171
243
|
***
|
|
172
244
|
|
|
@@ -174,7 +246,7 @@ Defined in: [packages/ai-tool/src/funcs/event-client.ts:45](https://github.com/i
|
|
|
174
246
|
|
|
175
247
|
> **ebListener**: (`this`, ...`data`) => `Promise`\<`void`\>
|
|
176
248
|
|
|
177
|
-
Defined in: [packages/ai-tool/src/funcs/event-client.ts:
|
|
249
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-client.ts:83](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/funcs/event-client.ts#L83)
|
|
178
250
|
|
|
179
251
|
#### Parameters
|
|
180
252
|
|
|
@@ -192,11 +264,17 @@ Defined in: [packages/ai-tool/src/funcs/event-client.ts:86](https://github.com/i
|
|
|
192
264
|
|
|
193
265
|
***
|
|
194
266
|
|
|
195
|
-
### fetchOptions
|
|
267
|
+
### ~~fetchOptions?~~
|
|
196
268
|
|
|
197
269
|
> `optional` **fetchOptions**: `any`
|
|
198
270
|
|
|
199
|
-
Defined in: [packages/ai-tool/src/utils/consts.ts:
|
|
271
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/consts.ts:101](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/utils/consts.ts#L101)
|
|
272
|
+
|
|
273
|
+
Options to be passed to the underlying `fetch` call in an HTTP transport.
|
|
274
|
+
|
|
275
|
+
#### Deprecated
|
|
276
|
+
|
|
277
|
+
Use `transport` instead.
|
|
200
278
|
|
|
201
279
|
#### Inherited from
|
|
202
280
|
|
|
@@ -208,7 +286,9 @@ Defined in: [packages/ai-tool/src/utils/consts.ts:36](https://github.com/isdk/ai
|
|
|
208
286
|
|
|
209
287
|
> `optional` **isApi**: `boolean`
|
|
210
288
|
|
|
211
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
289
|
+
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)
|
|
290
|
+
|
|
291
|
+
If true, indicates that this function should be treated as a server-side API.
|
|
212
292
|
|
|
213
293
|
#### Inherited from
|
|
214
294
|
|
|
@@ -216,15 +296,17 @@ Defined in: [packages/ai-tool/src/tool-func.ts:29](https://github.com/isdk/ai-to
|
|
|
216
296
|
|
|
217
297
|
***
|
|
218
298
|
|
|
219
|
-
### name
|
|
299
|
+
### name?
|
|
220
300
|
|
|
221
|
-
> **name**: `string`
|
|
301
|
+
> `optional` **name**: `string`
|
|
222
302
|
|
|
223
|
-
Defined in: [packages/ai-tool/src/
|
|
303
|
+
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)
|
|
224
304
|
|
|
225
|
-
|
|
305
|
+
The unique name of the function.
|
|
226
306
|
|
|
227
|
-
|
|
307
|
+
#### Inherited from
|
|
308
|
+
|
|
309
|
+
[`ResClientTools`](ResClientTools.md).[`name`](ResClientTools.md#name-3)
|
|
228
310
|
|
|
229
311
|
***
|
|
230
312
|
|
|
@@ -232,7 +314,7 @@ Defined in: [packages/ai-tool/src/funcs/event-client.ts:44](https://github.com/i
|
|
|
232
314
|
|
|
233
315
|
> **nonExported1stChar**: `string`
|
|
234
316
|
|
|
235
|
-
Defined in:
|
|
317
|
+
Defined in: [property-manager.js/src/abstract.d.ts:78](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L78)
|
|
236
318
|
|
|
237
319
|
the property with the default prefix '$' will not be exported.
|
|
238
320
|
|
|
@@ -246,7 +328,9 @@ the property with the default prefix '$' will not be exported.
|
|
|
246
328
|
|
|
247
329
|
> `optional` **params**: [`FuncParams`](../interfaces/FuncParams.md) \| [`FuncParam`](../interfaces/FuncParam.md)[]
|
|
248
330
|
|
|
249
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
331
|
+
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)
|
|
332
|
+
|
|
333
|
+
Parameter definitions, which can be an object mapping names to definitions or an array for positional parameters.
|
|
250
334
|
|
|
251
335
|
#### Inherited from
|
|
252
336
|
|
|
@@ -256,9 +340,11 @@ Defined in: [packages/ai-tool/src/tool-func.ts:24](https://github.com/isdk/ai-to
|
|
|
256
340
|
|
|
257
341
|
### result?
|
|
258
342
|
|
|
259
|
-
> `optional` **result**: `string`
|
|
343
|
+
> `optional` **result**: `string` \| `Record`\<`string`, `any`\>
|
|
260
344
|
|
|
261
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
345
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:86](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/tool-func.ts#L86)
|
|
346
|
+
|
|
347
|
+
The expected return type of the function, described as a string or a JSON schema object.
|
|
262
348
|
|
|
263
349
|
#### Inherited from
|
|
264
350
|
|
|
@@ -270,7 +356,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:25](https://github.com/isdk/ai-to
|
|
|
270
356
|
|
|
271
357
|
> `optional` **scope**: `any`
|
|
272
358
|
|
|
273
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
359
|
+
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)
|
|
360
|
+
|
|
361
|
+
The execution scope or context (`this`) for the function.
|
|
274
362
|
|
|
275
363
|
#### Inherited from
|
|
276
364
|
|
|
@@ -282,7 +370,11 @@ Defined in: [packages/ai-tool/src/tool-func.ts:26](https://github.com/isdk/ai-to
|
|
|
282
370
|
|
|
283
371
|
> `optional` **setup**: (`this`, `options`?) => `void`
|
|
284
372
|
|
|
285
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
373
|
+
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)
|
|
374
|
+
|
|
375
|
+
A lifecycle hook called once during the `ToolFunc` instance's initialization.
|
|
376
|
+
It allows for initial setup, state configuration, or property modification on the instance
|
|
377
|
+
before it is used or registered. The `this` context is the `ToolFunc` instance itself.
|
|
286
378
|
|
|
287
379
|
#### Parameters
|
|
288
380
|
|
|
@@ -294,10 +386,26 @@ Defined in: [packages/ai-tool/src/tool-func.ts:28](https://github.com/isdk/ai-to
|
|
|
294
386
|
|
|
295
387
|
[`FuncItem`](../interfaces/FuncItem.md)
|
|
296
388
|
|
|
389
|
+
The configuration options for the function.
|
|
390
|
+
|
|
297
391
|
#### Returns
|
|
298
392
|
|
|
299
393
|
`void`
|
|
300
394
|
|
|
395
|
+
#### Example
|
|
396
|
+
|
|
397
|
+
```ts
|
|
398
|
+
const myFunc = new ToolFunc({
|
|
399
|
+
name: 'myFunc',
|
|
400
|
+
customState: 'initial',
|
|
401
|
+
setup() {
|
|
402
|
+
// `this` is the myFunc instance
|
|
403
|
+
this.customState = 'configured';
|
|
404
|
+
}
|
|
405
|
+
});
|
|
406
|
+
console.log(myFunc.customState); // Outputs: 'configured'
|
|
407
|
+
```
|
|
408
|
+
|
|
301
409
|
#### Inherited from
|
|
302
410
|
|
|
303
411
|
[`ResClientTools`](ResClientTools.md).[`setup`](ResClientTools.md#setup)
|
|
@@ -308,7 +416,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:28](https://github.com/isdk/ai-to
|
|
|
308
416
|
|
|
309
417
|
> `optional` **stream**: `boolean`
|
|
310
418
|
|
|
311
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
419
|
+
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)
|
|
420
|
+
|
|
421
|
+
If true, indicates that the function has the *capability* to stream its output.
|
|
422
|
+
Whether a specific call is streamed is determined by a `stream` property in the runtime parameters.
|
|
312
423
|
|
|
313
424
|
#### Inherited from
|
|
314
425
|
|
|
@@ -320,7 +431,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:30](https://github.com/isdk/ai-to
|
|
|
320
431
|
|
|
321
432
|
> `optional` **tags**: `string` \| `string`[]
|
|
322
433
|
|
|
323
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
434
|
+
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)
|
|
435
|
+
|
|
436
|
+
Tags for grouping or filtering functions.
|
|
324
437
|
|
|
325
438
|
#### Inherited from
|
|
326
439
|
|
|
@@ -328,11 +441,47 @@ Defined in: [packages/ai-tool/src/tool-func.ts:27](https://github.com/isdk/ai-to
|
|
|
328
441
|
|
|
329
442
|
***
|
|
330
443
|
|
|
444
|
+
### title?
|
|
445
|
+
|
|
446
|
+
> `optional` **title**: `string`
|
|
447
|
+
|
|
448
|
+
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)
|
|
449
|
+
|
|
450
|
+
A concise, human-readable title for the function, often used in UI or by AI.
|
|
451
|
+
|
|
452
|
+
#### Inherited from
|
|
453
|
+
|
|
454
|
+
[`ResClientTools`](ResClientTools.md).[`title`](ResClientTools.md#title)
|
|
455
|
+
|
|
456
|
+
***
|
|
457
|
+
|
|
458
|
+
### \_pubSubTransport
|
|
459
|
+
|
|
460
|
+
> `static` **\_pubSubTransport**: `undefined` \| [`IPubSubClientTransport`](../interfaces/IPubSubClientTransport.md)
|
|
461
|
+
|
|
462
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-client.ts:14](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/funcs/event-client.ts#L14)
|
|
463
|
+
|
|
464
|
+
***
|
|
465
|
+
|
|
466
|
+
### action?
|
|
467
|
+
|
|
468
|
+
> `static` `optional` **action**: `string`
|
|
469
|
+
|
|
470
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:32](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/client-tools.ts#L32)
|
|
471
|
+
|
|
472
|
+
#### Inherited from
|
|
473
|
+
|
|
474
|
+
[`ResClientTools`](ResClientTools.md).[`action`](ResClientTools.md#action-1)
|
|
475
|
+
|
|
476
|
+
***
|
|
477
|
+
|
|
331
478
|
### aliases
|
|
332
479
|
|
|
333
480
|
> `static` **aliases**: `object` = `{}`
|
|
334
481
|
|
|
335
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
482
|
+
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)
|
|
483
|
+
|
|
484
|
+
A static map of aliases to their corresponding function names.
|
|
336
485
|
|
|
337
486
|
#### Index Signature
|
|
338
487
|
|
|
@@ -348,7 +497,11 @@ Defined in: [packages/ai-tool/src/tool-func.ts:58](https://github.com/isdk/ai-to
|
|
|
348
497
|
|
|
349
498
|
> `static` **dataPath**: `string`
|
|
350
499
|
|
|
351
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
500
|
+
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)
|
|
501
|
+
|
|
502
|
+
A conventional property to designate a file path for saving the registered `ToolFunc` data.
|
|
503
|
+
Note: The `ToolFunc` class itself does not implement persistence logic. It is up to the
|
|
504
|
+
developer to use this path to save and load the `ToolFunc.items` registry if needed.
|
|
352
505
|
|
|
353
506
|
#### Inherited from
|
|
354
507
|
|
|
@@ -360,7 +513,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:59](https://github.com/isdk/ai-to
|
|
|
360
513
|
|
|
361
514
|
> `static` **items**: [`Funcs`](../interfaces/Funcs.md) = `{}`
|
|
362
515
|
|
|
363
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
516
|
+
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)
|
|
517
|
+
|
|
518
|
+
A static registry of all `ToolFunc` instances, indexed by name.
|
|
364
519
|
|
|
365
520
|
#### Inherited from
|
|
366
521
|
|
|
@@ -374,7 +529,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:57](https://github.com/isdk/ai-to
|
|
|
374
529
|
|
|
375
530
|
> **get** **active**(): `boolean`
|
|
376
531
|
|
|
377
|
-
Defined in: [packages/ai-tool/src/funcs/event-client.ts:
|
|
532
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-client.ts:35](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/funcs/event-client.ts#L35)
|
|
378
533
|
|
|
379
534
|
##### Returns
|
|
380
535
|
|
|
@@ -384,7 +539,7 @@ Defined in: [packages/ai-tool/src/funcs/event-client.ts:29](https://github.com/i
|
|
|
384
539
|
|
|
385
540
|
> **set** **active**(`v`): `void`
|
|
386
541
|
|
|
387
|
-
Defined in: [packages/ai-tool/src/funcs/event-client.ts:
|
|
542
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-client.ts:39](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/funcs/event-client.ts#L39)
|
|
388
543
|
|
|
389
544
|
##### Parameters
|
|
390
545
|
|
|
@@ -398,17 +553,40 @@ Defined in: [packages/ai-tool/src/funcs/event-client.ts:33](https://github.com/i
|
|
|
398
553
|
|
|
399
554
|
***
|
|
400
555
|
|
|
556
|
+
### apiRoot
|
|
557
|
+
|
|
558
|
+
#### Get Signature
|
|
559
|
+
|
|
560
|
+
> **get** **apiRoot**(): `string`
|
|
561
|
+
|
|
562
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:109](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/client-tools.ts#L109)
|
|
563
|
+
|
|
564
|
+
##### Deprecated
|
|
565
|
+
|
|
566
|
+
This property is now mainly for informational purposes.
|
|
567
|
+
The actual endpoint is managed by the transport.
|
|
568
|
+
|
|
569
|
+
##### Returns
|
|
570
|
+
|
|
571
|
+
`string`
|
|
572
|
+
|
|
573
|
+
#### Inherited from
|
|
574
|
+
|
|
575
|
+
[`ResClientTools`](ResClientTools.md).[`apiRoot`](ResClientTools.md#apiroot)
|
|
576
|
+
|
|
577
|
+
***
|
|
578
|
+
|
|
401
579
|
### evtSource
|
|
402
580
|
|
|
403
581
|
#### Get Signature
|
|
404
582
|
|
|
405
|
-
> **get** **evtSource**(): `
|
|
583
|
+
> **get** **evtSource**(): [`PubSubClientStream`](../interfaces/PubSubClientStream.md)
|
|
406
584
|
|
|
407
|
-
Defined in: [packages/ai-tool/src/funcs/event-client.ts:
|
|
585
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-client.ts:27](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/funcs/event-client.ts#L27)
|
|
408
586
|
|
|
409
587
|
##### Returns
|
|
410
588
|
|
|
411
|
-
`
|
|
589
|
+
[`PubSubClientStream`](../interfaces/PubSubClientStream.md)
|
|
412
590
|
|
|
413
591
|
***
|
|
414
592
|
|
|
@@ -416,17 +594,54 @@ Defined in: [packages/ai-tool/src/funcs/event-client.ts:20](https://github.com/i
|
|
|
416
594
|
|
|
417
595
|
#### Get Signature
|
|
418
596
|
|
|
419
|
-
> **get** `static` **apiRoot**(): `
|
|
597
|
+
> **get** `static` **apiRoot**(): `string`
|
|
598
|
+
|
|
599
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:40](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/client-tools.ts#L40)
|
|
600
|
+
|
|
601
|
+
##### Deprecated
|
|
420
602
|
|
|
421
|
-
|
|
603
|
+
This property is now mainly for informational purposes.
|
|
604
|
+
The actual endpoint is managed by the transport.
|
|
422
605
|
|
|
423
606
|
##### Returns
|
|
424
607
|
|
|
425
|
-
`
|
|
608
|
+
`string`
|
|
426
609
|
|
|
427
610
|
#### Inherited from
|
|
428
611
|
|
|
429
|
-
[`ResClientTools`](ResClientTools.md).[`apiRoot`](ResClientTools.md#apiroot-
|
|
612
|
+
[`ResClientTools`](ResClientTools.md).[`apiRoot`](ResClientTools.md#apiroot-2)
|
|
613
|
+
|
|
614
|
+
***
|
|
615
|
+
|
|
616
|
+
### pubSubTransport
|
|
617
|
+
|
|
618
|
+
#### Get Signature
|
|
619
|
+
|
|
620
|
+
> **get** `static` **pubSubTransport**(): [`IPubSubClientTransport`](../interfaces/IPubSubClientTransport.md)
|
|
621
|
+
|
|
622
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-client.ts:16](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/funcs/event-client.ts#L16)
|
|
623
|
+
|
|
624
|
+
##### Returns
|
|
625
|
+
|
|
626
|
+
[`IPubSubClientTransport`](../interfaces/IPubSubClientTransport.md)
|
|
627
|
+
|
|
628
|
+
***
|
|
629
|
+
|
|
630
|
+
### transport
|
|
631
|
+
|
|
632
|
+
#### Get Signature
|
|
633
|
+
|
|
634
|
+
> **get** `static` **transport**(): [`IClientToolTransport`](../interfaces/IClientToolTransport.md)
|
|
635
|
+
|
|
636
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:60](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/client-tools.ts#L60)
|
|
637
|
+
|
|
638
|
+
##### Returns
|
|
639
|
+
|
|
640
|
+
[`IClientToolTransport`](../interfaces/IClientToolTransport.md)
|
|
641
|
+
|
|
642
|
+
#### Inherited from
|
|
643
|
+
|
|
644
|
+
[`ResClientTools`](ResClientTools.md).[`transport`](ResClientTools.md#transport)
|
|
430
645
|
|
|
431
646
|
## Methods
|
|
432
647
|
|
|
@@ -434,7 +649,7 @@ Defined in: [packages/ai-tool/src/client-tools.ts:19](https://github.com/isdk/ai
|
|
|
434
649
|
|
|
435
650
|
> **\_func**(`action`, `options`): `Promise`\<`any`\>
|
|
436
651
|
|
|
437
|
-
Defined in: [packages/ai-tool/src/rpc-methods-client-tool.ts:
|
|
652
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-client-tool.ts:19](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/rpc-methods-client-tool.ts#L19)
|
|
438
653
|
|
|
439
654
|
#### Parameters
|
|
440
655
|
|
|
@@ -460,7 +675,10 @@ Defined in: [packages/ai-tool/src/rpc-methods-client-tool.ts:10](https://github.
|
|
|
460
675
|
|
|
461
676
|
> **arr2ObjParams**(`params`): `any`[]
|
|
462
677
|
|
|
463
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
678
|
+
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)
|
|
679
|
+
|
|
680
|
+
Converts an array of positional arguments into a named parameters object.
|
|
681
|
+
This is used internally to support functions defined with named parameters.
|
|
464
682
|
|
|
465
683
|
#### Parameters
|
|
466
684
|
|
|
@@ -468,10 +686,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:269](https://github.com/isdk/ai-t
|
|
|
468
686
|
|
|
469
687
|
`any`[]
|
|
470
688
|
|
|
689
|
+
An array of positional arguments.
|
|
690
|
+
|
|
471
691
|
#### Returns
|
|
472
692
|
|
|
473
693
|
`any`[]
|
|
474
694
|
|
|
695
|
+
An array containing a single parameters object.
|
|
696
|
+
|
|
475
697
|
#### Inherited from
|
|
476
698
|
|
|
477
699
|
[`ResClientTools`](ResClientTools.md).[`arr2ObjParams`](ResClientTools.md#arr2objparams)
|
|
@@ -482,7 +704,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:269](https://github.com/isdk/ai-t
|
|
|
482
704
|
|
|
483
705
|
> **assign**(`src`, `options`?): `this`
|
|
484
706
|
|
|
485
|
-
Defined in:
|
|
707
|
+
Defined in: [property-manager.js/src/abstract.d.ts:106](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L106)
|
|
486
708
|
|
|
487
709
|
Assign the values from the src object.
|
|
488
710
|
|
|
@@ -514,7 +736,7 @@ this object
|
|
|
514
736
|
|
|
515
737
|
> **assignMethods**(`methods`): `void`
|
|
516
738
|
|
|
517
|
-
Defined in: [packages/ai-tool/src/rpc-methods-client-tool.ts:
|
|
739
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-client-tool.ts:32](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/rpc-methods-client-tool.ts#L32)
|
|
518
740
|
|
|
519
741
|
#### Parameters
|
|
520
742
|
|
|
@@ -536,7 +758,7 @@ Defined in: [packages/ai-tool/src/rpc-methods-client-tool.ts:27](https://github.
|
|
|
536
758
|
|
|
537
759
|
> **assignProperty**(`src`, `name`, `value`, `attrs`?, `options`?): `void`
|
|
538
760
|
|
|
539
|
-
Defined in:
|
|
761
|
+
Defined in: [property-manager.js/src/abstract.d.ts:117](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L117)
|
|
540
762
|
|
|
541
763
|
Assign a property of src to this object.
|
|
542
764
|
|
|
@@ -584,7 +806,7 @@ the attributes object
|
|
|
584
806
|
|
|
585
807
|
> `abstract` **assignPropertyTo**(`dest`, `src`, `name`, `value`, `attrs`?, `options`?): `void`
|
|
586
808
|
|
|
587
|
-
Defined in:
|
|
809
|
+
Defined in: [property-manager.js/src/abstract.d.ts:131](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L131)
|
|
588
810
|
|
|
589
811
|
Assign the property value from the src to destination object.
|
|
590
812
|
|
|
@@ -638,7 +860,7 @@ The attributes object of the property
|
|
|
638
860
|
|
|
639
861
|
> **assignTo**(`dest`?, `options`?): `any`
|
|
640
862
|
|
|
641
|
-
Defined in:
|
|
863
|
+
Defined in: [property-manager.js/src/abstract.d.ts:191](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L191)
|
|
642
864
|
|
|
643
865
|
Assign this attributes to the dest object
|
|
644
866
|
|
|
@@ -670,7 +892,7 @@ the dest object
|
|
|
670
892
|
|
|
671
893
|
> **clone**(`options`?): `any`
|
|
672
894
|
|
|
673
|
-
Defined in:
|
|
895
|
+
Defined in: [property-manager.js/src/abstract.d.ts:155](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L155)
|
|
674
896
|
|
|
675
897
|
Create a new object with the same values of attributes.
|
|
676
898
|
|
|
@@ -696,7 +918,7 @@ the new object
|
|
|
696
918
|
|
|
697
919
|
> **cloneTo**(`dest`, `options`?): `any`
|
|
698
920
|
|
|
699
|
-
Defined in:
|
|
921
|
+
Defined in: [property-manager.js/src/abstract.d.ts:148](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L148)
|
|
700
922
|
|
|
701
923
|
Create and assign the values to the destination object.
|
|
702
924
|
|
|
@@ -724,11 +946,23 @@ the new dest object
|
|
|
724
946
|
|
|
725
947
|
***
|
|
726
948
|
|
|
949
|
+
### close()
|
|
950
|
+
|
|
951
|
+
> **close**(): `void`
|
|
952
|
+
|
|
953
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-client.ts:177](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/funcs/event-client.ts#L177)
|
|
954
|
+
|
|
955
|
+
#### Returns
|
|
956
|
+
|
|
957
|
+
`void`
|
|
958
|
+
|
|
959
|
+
***
|
|
960
|
+
|
|
727
961
|
### defineProperties()
|
|
728
962
|
|
|
729
963
|
> `abstract` **defineProperties**(`aProperties`): `any`
|
|
730
964
|
|
|
731
|
-
Defined in:
|
|
965
|
+
Defined in: [property-manager.js/src/abstract.d.ts:89](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L89)
|
|
732
966
|
|
|
733
967
|
Define the attributes of this object.
|
|
734
968
|
|
|
@@ -754,7 +988,7 @@ the defined attributes of the object
|
|
|
754
988
|
|
|
755
989
|
> `optional` **delete**(`__namedParameters`): `any`
|
|
756
990
|
|
|
757
|
-
Defined in: [packages/ai-tool/src/res-client-tools.ts:13](https://github.com/isdk/ai-tool.js/blob/
|
|
991
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-client-tools.ts:13](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/res-client-tools.ts#L13)
|
|
758
992
|
|
|
759
993
|
#### Parameters
|
|
760
994
|
|
|
@@ -772,39 +1006,25 @@ Defined in: [packages/ai-tool/src/res-client-tools.ts:13](https://github.com/isd
|
|
|
772
1006
|
|
|
773
1007
|
***
|
|
774
1008
|
|
|
775
|
-
###
|
|
1009
|
+
### esListener()
|
|
776
1010
|
|
|
777
|
-
> **
|
|
1011
|
+
> **esListener**(`evtType`, `data`, `ctx`?): `void`
|
|
778
1012
|
|
|
779
|
-
Defined in: [packages/ai-tool/src/client
|
|
1013
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-client.ts:72](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/funcs/event-client.ts#L72)
|
|
780
1014
|
|
|
781
1015
|
#### Parameters
|
|
782
1016
|
|
|
783
|
-
#####
|
|
784
|
-
|
|
785
|
-
`Response`
|
|
786
|
-
|
|
787
|
-
#### Returns
|
|
788
|
-
|
|
789
|
-
`Promise`\<[`CommonError`](CommonError.md)\>
|
|
790
|
-
|
|
791
|
-
#### Inherited from
|
|
1017
|
+
##### evtType
|
|
792
1018
|
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
***
|
|
796
|
-
|
|
797
|
-
### esListener()
|
|
798
|
-
|
|
799
|
-
> **esListener**(`event`): `void`
|
|
1019
|
+
`string`
|
|
800
1020
|
|
|
801
|
-
|
|
1021
|
+
##### data
|
|
802
1022
|
|
|
803
|
-
|
|
1023
|
+
`any`
|
|
804
1024
|
|
|
805
|
-
#####
|
|
1025
|
+
##### ctx?
|
|
806
1026
|
|
|
807
|
-
`
|
|
1027
|
+
[`PubSubCtx`](../type-aliases/PubSubCtx.md)
|
|
808
1028
|
|
|
809
1029
|
#### Returns
|
|
810
1030
|
|
|
@@ -816,7 +1036,7 @@ Defined in: [packages/ai-tool/src/funcs/event-client.ts:69](https://github.com/i
|
|
|
816
1036
|
|
|
817
1037
|
> **exportTo**(`dest`, `options`?): `any`
|
|
818
1038
|
|
|
819
|
-
Defined in:
|
|
1039
|
+
Defined in: [property-manager.js/src/abstract.d.ts:173](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L173)
|
|
820
1040
|
|
|
821
1041
|
Export attributes to the dest json object.
|
|
822
1042
|
|
|
@@ -846,9 +1066,9 @@ the dest object.
|
|
|
846
1066
|
|
|
847
1067
|
### fetch()
|
|
848
1068
|
|
|
849
|
-
> **fetch**(`options`, `action`): `Promise`\<`
|
|
1069
|
+
> **fetch**(`options`, `action`): `Promise`\<`any`\>
|
|
850
1070
|
|
|
851
|
-
Defined in: [packages/ai-tool/src/res-client-tools.ts:18](https://github.com/isdk/ai-tool.js/blob/
|
|
1071
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-client-tools.ts:18](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/res-client-tools.ts#L18)
|
|
852
1072
|
|
|
853
1073
|
#### Parameters
|
|
854
1074
|
|
|
@@ -862,7 +1082,7 @@ Defined in: [packages/ai-tool/src/res-client-tools.ts:18](https://github.com/isd
|
|
|
862
1082
|
|
|
863
1083
|
#### Returns
|
|
864
1084
|
|
|
865
|
-
`Promise`\<`
|
|
1085
|
+
`Promise`\<`any`\>
|
|
866
1086
|
|
|
867
1087
|
#### Inherited from
|
|
868
1088
|
|
|
@@ -874,7 +1094,7 @@ Defined in: [packages/ai-tool/src/res-client-tools.ts:18](https://github.com/isd
|
|
|
874
1094
|
|
|
875
1095
|
> **forwardEvent**(`events`): `void`
|
|
876
1096
|
|
|
877
|
-
Defined in: [packages/ai-tool/src/funcs/event-client.ts:
|
|
1097
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-client.ts:138](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/funcs/event-client.ts#L138)
|
|
878
1098
|
|
|
879
1099
|
forward local event(s) to server
|
|
880
1100
|
|
|
@@ -898,7 +1118,11 @@ Note: pls backendEventable(ClientTools or EventClient) first
|
|
|
898
1118
|
|
|
899
1119
|
> **func**(`options`): `Promise`\<`any`\>
|
|
900
1120
|
|
|
901
|
-
Defined in: [packages/ai-tool/src/rpc-methods-client-tool.ts:
|
|
1121
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-client-tool.ts:24](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/rpc-methods-client-tool.ts#L24)
|
|
1122
|
+
|
|
1123
|
+
The core implementation for a client-side tool. When a `ClientTools` instance
|
|
1124
|
+
is "run", this `func` method is executed. It delegates the call to the
|
|
1125
|
+
configured transport, which handles the network communication.
|
|
902
1126
|
|
|
903
1127
|
#### Parameters
|
|
904
1128
|
|
|
@@ -910,6 +1134,8 @@ Defined in: [packages/ai-tool/src/rpc-methods-client-tool.ts:19](https://github.
|
|
|
910
1134
|
|
|
911
1135
|
`Promise`\<`any`\>
|
|
912
1136
|
|
|
1137
|
+
The result from the remote tool.
|
|
1138
|
+
|
|
913
1139
|
#### Inherited from
|
|
914
1140
|
|
|
915
1141
|
[`ResClientTools`](ResClientTools.md).[`func`](ResClientTools.md#func)
|
|
@@ -920,7 +1146,7 @@ Defined in: [packages/ai-tool/src/rpc-methods-client-tool.ts:19](https://github.
|
|
|
920
1146
|
|
|
921
1147
|
> `optional` **get**(`__namedParameters`): `any`
|
|
922
1148
|
|
|
923
|
-
Defined in: [packages/ai-tool/src/res-client-tools.ts:10](https://github.com/isdk/ai-tool.js/blob/
|
|
1149
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-client-tools.ts:10](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/res-client-tools.ts#L10)
|
|
924
1150
|
|
|
925
1151
|
#### Parameters
|
|
926
1152
|
|
|
@@ -942,7 +1168,11 @@ Defined in: [packages/ai-tool/src/res-client-tools.ts:10](https://github.com/isd
|
|
|
942
1168
|
|
|
943
1169
|
> **getFunc**(`name`?): `any`
|
|
944
1170
|
|
|
945
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1171
|
+
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)
|
|
1172
|
+
|
|
1173
|
+
Gets a bound function reference for execution with named parameters.
|
|
1174
|
+
If a name is provided, it retrieves a different function from the registry.
|
|
1175
|
+
Otherwise, it returns a bound version of this instance's `runSync`.
|
|
946
1176
|
|
|
947
1177
|
#### Parameters
|
|
948
1178
|
|
|
@@ -950,10 +1180,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:322](https://github.com/isdk/ai-t
|
|
|
950
1180
|
|
|
951
1181
|
`string`
|
|
952
1182
|
|
|
1183
|
+
Optional name of the function to retrieve.
|
|
1184
|
+
|
|
953
1185
|
#### Returns
|
|
954
1186
|
|
|
955
1187
|
`any`
|
|
956
1188
|
|
|
1189
|
+
A function reference or `undefined` if not found.
|
|
1190
|
+
|
|
957
1191
|
#### Inherited from
|
|
958
1192
|
|
|
959
1193
|
[`ResClientTools`](ResClientTools.md).[`getFunc`](ResClientTools.md#getfunc)
|
|
@@ -964,7 +1198,11 @@ Defined in: [packages/ai-tool/src/tool-func.ts:322](https://github.com/isdk/ai-t
|
|
|
964
1198
|
|
|
965
1199
|
> **getFuncWithPos**(`name`?): `any`
|
|
966
1200
|
|
|
967
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1201
|
+
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)
|
|
1202
|
+
|
|
1203
|
+
Gets a bound function reference suitable for positional argument execution.
|
|
1204
|
+
If a name is provided, it retrieves a different function from the registry.
|
|
1205
|
+
Otherwise, it returns a bound version of this instance's `runWithPosSync`.
|
|
968
1206
|
|
|
969
1207
|
#### Parameters
|
|
970
1208
|
|
|
@@ -972,10 +1210,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:346](https://github.com/isdk/ai-t
|
|
|
972
1210
|
|
|
973
1211
|
`string`
|
|
974
1212
|
|
|
1213
|
+
Optional name of the function to retrieve.
|
|
1214
|
+
|
|
975
1215
|
#### Returns
|
|
976
1216
|
|
|
977
1217
|
`any`
|
|
978
1218
|
|
|
1219
|
+
A function reference or `undefined` if not found.
|
|
1220
|
+
|
|
979
1221
|
#### Inherited from
|
|
980
1222
|
|
|
981
1223
|
[`ResClientTools`](ResClientTools.md).[`getFuncWithPos`](ResClientTools.md#getfuncwithpos)
|
|
@@ -986,7 +1228,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:346](https://github.com/isdk/ai-t
|
|
|
986
1228
|
|
|
987
1229
|
> `abstract` **getProperties**(): `PropDescriptors`
|
|
988
1230
|
|
|
989
|
-
Defined in:
|
|
1231
|
+
Defined in: [property-manager.js/src/abstract.d.ts:98](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L98)
|
|
990
1232
|
|
|
991
1233
|
Get the defined attributes.
|
|
992
1234
|
|
|
@@ -1002,33 +1244,13 @@ the descriptors of properties object
|
|
|
1002
1244
|
|
|
1003
1245
|
***
|
|
1004
1246
|
|
|
1005
|
-
### getUrlParams()
|
|
1006
|
-
|
|
1007
|
-
> **getUrlParams**(`objParam`): `string`
|
|
1008
|
-
|
|
1009
|
-
Defined in: [packages/ai-tool/src/client-tools.ts:63](https://github.com/isdk/ai-tool.js/blob/c084189f913fb955b91b492de68bd07ce78f8c82/src/client-tools.ts#L63)
|
|
1010
|
-
|
|
1011
|
-
#### Parameters
|
|
1012
|
-
|
|
1013
|
-
##### objParam
|
|
1014
|
-
|
|
1015
|
-
`any`
|
|
1016
|
-
|
|
1017
|
-
#### Returns
|
|
1018
|
-
|
|
1019
|
-
`string`
|
|
1020
|
-
|
|
1021
|
-
#### Inherited from
|
|
1022
|
-
|
|
1023
|
-
[`ResClientTools`](ResClientTools.md).[`getUrlParams`](ResClientTools.md#geturlparams)
|
|
1024
|
-
|
|
1025
|
-
***
|
|
1026
|
-
|
|
1027
1247
|
### hasAsyncFeature()
|
|
1028
1248
|
|
|
1029
1249
|
> **hasAsyncFeature**(`feature`): `boolean`
|
|
1030
1250
|
|
|
1031
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1251
|
+
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)
|
|
1252
|
+
|
|
1253
|
+
Checks if the current function instance supports a specific async feature.
|
|
1032
1254
|
|
|
1033
1255
|
#### Parameters
|
|
1034
1256
|
|
|
@@ -1036,10 +1258,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:351](https://github.com/isdk/ai-t
|
|
|
1036
1258
|
|
|
1037
1259
|
[`AsyncFeatureBits`](../enumerations/AsyncFeatureBits.md)
|
|
1038
1260
|
|
|
1261
|
+
The async feature bit to check for.
|
|
1262
|
+
|
|
1039
1263
|
#### Returns
|
|
1040
1264
|
|
|
1041
1265
|
`boolean`
|
|
1042
1266
|
|
|
1267
|
+
`true` if the feature is supported, otherwise `false`.
|
|
1268
|
+
|
|
1043
1269
|
#### Inherited from
|
|
1044
1270
|
|
|
1045
1271
|
[`ResClientTools`](ResClientTools.md).[`hasAsyncFeature`](ResClientTools.md#hasasyncfeature)
|
|
@@ -1050,7 +1276,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:351](https://github.com/isdk/ai-t
|
|
|
1050
1276
|
|
|
1051
1277
|
> **hasOwnProperty**(`v`): `boolean`
|
|
1052
1278
|
|
|
1053
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:140
|
|
1279
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:140
|
|
1054
1280
|
|
|
1055
1281
|
Determines whether an object has a property with the specified name.
|
|
1056
1282
|
|
|
@@ -1076,7 +1302,7 @@ A property name.
|
|
|
1076
1302
|
|
|
1077
1303
|
> **init**(`events`): `Promise`\<`any`\>
|
|
1078
1304
|
|
|
1079
|
-
Defined in: [packages/ai-tool/src/funcs/event-client.ts:
|
|
1305
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-client.ts:170](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/funcs/event-client.ts#L170)
|
|
1080
1306
|
|
|
1081
1307
|
#### Parameters
|
|
1082
1308
|
|
|
@@ -1090,11 +1316,11 @@ Defined in: [packages/ai-tool/src/funcs/event-client.ts:172](https://github.com/
|
|
|
1090
1316
|
|
|
1091
1317
|
***
|
|
1092
1318
|
|
|
1093
|
-
###
|
|
1319
|
+
### initEventStream()
|
|
1094
1320
|
|
|
1095
|
-
> **
|
|
1321
|
+
> **initEventStream**(`events`?): [`PubSubClientStream`](../interfaces/PubSubClientStream.md)
|
|
1096
1322
|
|
|
1097
|
-
Defined in: [packages/ai-tool/src/funcs/event-client.ts:
|
|
1323
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-client.ts:51](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/funcs/event-client.ts#L51)
|
|
1098
1324
|
|
|
1099
1325
|
#### Parameters
|
|
1100
1326
|
|
|
@@ -1104,7 +1330,7 @@ Defined in: [packages/ai-tool/src/funcs/event-client.ts:47](https://github.com/i
|
|
|
1104
1330
|
|
|
1105
1331
|
#### Returns
|
|
1106
1332
|
|
|
1107
|
-
`
|
|
1333
|
+
[`PubSubClientStream`](../interfaces/PubSubClientStream.md)
|
|
1108
1334
|
|
|
1109
1335
|
***
|
|
1110
1336
|
|
|
@@ -1112,7 +1338,7 @@ Defined in: [packages/ai-tool/src/funcs/event-client.ts:47](https://github.com/i
|
|
|
1112
1338
|
|
|
1113
1339
|
> **initialize**(`src`?): `this`
|
|
1114
1340
|
|
|
1115
|
-
Defined in:
|
|
1341
|
+
Defined in: [property-manager.js/src/abstract.d.ts:139](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L139)
|
|
1116
1342
|
|
|
1117
1343
|
Initialize object and assign attribute values from src if src exists.
|
|
1118
1344
|
|
|
@@ -1138,7 +1364,7 @@ this object.
|
|
|
1138
1364
|
|
|
1139
1365
|
> **isPrototypeOf**(`v`): `boolean`
|
|
1140
1366
|
|
|
1141
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:146
|
|
1367
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:146
|
|
1142
1368
|
|
|
1143
1369
|
Determines whether an object exists in another object's prototype chain.
|
|
1144
1370
|
|
|
@@ -1164,7 +1390,7 @@ Another object whose prototype chain is to be checked.
|
|
|
1164
1390
|
|
|
1165
1391
|
> **isSame**(`src`, `options`?): `boolean`
|
|
1166
1392
|
|
|
1167
|
-
Defined in:
|
|
1393
|
+
Defined in: [property-manager.js/src/abstract.d.ts:200](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L200)
|
|
1168
1394
|
|
|
1169
1395
|
Check the src object whether “equals” this object.
|
|
1170
1396
|
|
|
@@ -1194,7 +1420,15 @@ The source object
|
|
|
1194
1420
|
|
|
1195
1421
|
> **isStream**(`params`): `undefined` \| `boolean`
|
|
1196
1422
|
|
|
1197
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1423
|
+
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)
|
|
1424
|
+
|
|
1425
|
+
Determines if a function call should produce a stream.
|
|
1426
|
+
|
|
1427
|
+
The logic is as follows:
|
|
1428
|
+
1. It first checks if the function is generally capable of streaming (`this.stream`).
|
|
1429
|
+
2. If it is, it then checks if a `stream` parameter is formally declared in the function's `params` definition.
|
|
1430
|
+
3. If both are true, the method returns the value of the `stream` property from the runtime `params` object.
|
|
1431
|
+
Otherwise, it returns the function's static `stream` capability.
|
|
1198
1432
|
|
|
1199
1433
|
#### Parameters
|
|
1200
1434
|
|
|
@@ -1202,10 +1436,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:357](https://github.com/isdk/ai-t
|
|
|
1202
1436
|
|
|
1203
1437
|
`any`
|
|
1204
1438
|
|
|
1439
|
+
The runtime parameters passed to the function call.
|
|
1440
|
+
|
|
1205
1441
|
#### Returns
|
|
1206
1442
|
|
|
1207
1443
|
`undefined` \| `boolean`
|
|
1208
1444
|
|
|
1445
|
+
`true` if the call should be streamed, `false` or `undefined` otherwise.
|
|
1446
|
+
|
|
1209
1447
|
#### Inherited from
|
|
1210
1448
|
|
|
1211
1449
|
[`ResClientTools`](ResClientTools.md).[`isStream`](ResClientTools.md#isstream)
|
|
@@ -1214,13 +1452,13 @@ Defined in: [packages/ai-tool/src/tool-func.ts:357](https://github.com/isdk/ai-t
|
|
|
1214
1452
|
|
|
1215
1453
|
### list()?
|
|
1216
1454
|
|
|
1217
|
-
> `optional` **list**(`options
|
|
1455
|
+
> `optional` **list**(`options`?): `any`
|
|
1218
1456
|
|
|
1219
|
-
Defined in: [packages/ai-tool/src/res-client-tools.ts:14](https://github.com/isdk/ai-tool.js/blob/
|
|
1457
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-client-tools.ts:14](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/res-client-tools.ts#L14)
|
|
1220
1458
|
|
|
1221
1459
|
#### Parameters
|
|
1222
1460
|
|
|
1223
|
-
##### options
|
|
1461
|
+
##### options?
|
|
1224
1462
|
|
|
1225
1463
|
[`ResClientFuncParams`](../interfaces/ResClientFuncParams.md)
|
|
1226
1464
|
|
|
@@ -1238,7 +1476,7 @@ Defined in: [packages/ai-tool/src/res-client-tools.ts:14](https://github.com/isd
|
|
|
1238
1476
|
|
|
1239
1477
|
> **mergeTo**(`dest`, `options`?): `any`
|
|
1240
1478
|
|
|
1241
|
-
Defined in:
|
|
1479
|
+
Defined in: [property-manager.js/src/abstract.d.ts:164](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L164)
|
|
1242
1480
|
|
|
1243
1481
|
Merge this attributes to dest object.
|
|
1244
1482
|
|
|
@@ -1270,7 +1508,10 @@ the dest object.
|
|
|
1270
1508
|
|
|
1271
1509
|
> **obj2ArrParams**(`params`?): `any`[]
|
|
1272
1510
|
|
|
1273
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1511
|
+
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)
|
|
1512
|
+
|
|
1513
|
+
Converts a named parameters object into an array of positional arguments.
|
|
1514
|
+
This is used for functions defined with positional parameters.
|
|
1274
1515
|
|
|
1275
1516
|
#### Parameters
|
|
1276
1517
|
|
|
@@ -1278,10 +1519,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:282](https://github.com/isdk/ai-t
|
|
|
1278
1519
|
|
|
1279
1520
|
`any`
|
|
1280
1521
|
|
|
1522
|
+
A named parameters object.
|
|
1523
|
+
|
|
1281
1524
|
#### Returns
|
|
1282
1525
|
|
|
1283
1526
|
`any`[]
|
|
1284
1527
|
|
|
1528
|
+
An array of positional arguments.
|
|
1529
|
+
|
|
1285
1530
|
#### Inherited from
|
|
1286
1531
|
|
|
1287
1532
|
[`ResClientTools`](ResClientTools.md).[`obj2ArrParams`](ResClientTools.md#obj2arrparams)
|
|
@@ -1292,7 +1537,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:282](https://github.com/isdk/ai-t
|
|
|
1292
1537
|
|
|
1293
1538
|
> `optional` **post**(`options`): `any`
|
|
1294
1539
|
|
|
1295
|
-
Defined in: [packages/ai-tool/src/res-client-tools.ts:11](https://github.com/isdk/ai-tool.js/blob/
|
|
1540
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-client-tools.ts:11](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/res-client-tools.ts#L11)
|
|
1296
1541
|
|
|
1297
1542
|
#### Parameters
|
|
1298
1543
|
|
|
@@ -1314,7 +1559,7 @@ Defined in: [packages/ai-tool/src/res-client-tools.ts:11](https://github.com/isd
|
|
|
1314
1559
|
|
|
1315
1560
|
> **propertyIsEnumerable**(`v`): `boolean`
|
|
1316
1561
|
|
|
1317
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:152
|
|
1562
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:152
|
|
1318
1563
|
|
|
1319
1564
|
Determines whether a specified property is enumerable.
|
|
1320
1565
|
|
|
@@ -1340,7 +1585,7 @@ A property name.
|
|
|
1340
1585
|
|
|
1341
1586
|
> `optional` **put**(`__namedParameters`): `any`
|
|
1342
1587
|
|
|
1343
|
-
Defined in: [packages/ai-tool/src/res-client-tools.ts:12](https://github.com/isdk/ai-tool.js/blob/
|
|
1588
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-client-tools.ts:12](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/res-client-tools.ts#L12)
|
|
1344
1589
|
|
|
1345
1590
|
#### Parameters
|
|
1346
1591
|
|
|
@@ -1362,12 +1607,17 @@ Defined in: [packages/ai-tool/src/res-client-tools.ts:12](https://github.com/isd
|
|
|
1362
1607
|
|
|
1363
1608
|
> **register**(): `boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
1364
1609
|
|
|
1365
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1610
|
+
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)
|
|
1611
|
+
|
|
1612
|
+
Registers the current `ToolFunc` instance into the static registry.
|
|
1613
|
+
Also registers any declared dependencies.
|
|
1366
1614
|
|
|
1367
1615
|
#### Returns
|
|
1368
1616
|
|
|
1369
1617
|
`boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
1370
1618
|
|
|
1619
|
+
The instance itself upon successful registration, or `false` if it already exists.
|
|
1620
|
+
|
|
1371
1621
|
#### Inherited from
|
|
1372
1622
|
|
|
1373
1623
|
[`ResClientTools`](ResClientTools.md).[`register`](ResClientTools.md#register)
|
|
@@ -1378,7 +1628,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:252](https://github.com/isdk/ai-t
|
|
|
1378
1628
|
|
|
1379
1629
|
> **run**(`params`?): `Promise`\<`any`\>
|
|
1380
1630
|
|
|
1381
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1631
|
+
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)
|
|
1632
|
+
|
|
1633
|
+
Executes the function asynchronously with a named parameters object.
|
|
1382
1634
|
|
|
1383
1635
|
#### Parameters
|
|
1384
1636
|
|
|
@@ -1386,10 +1638,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:309](https://github.com/isdk/ai-t
|
|
|
1386
1638
|
|
|
1387
1639
|
`any`
|
|
1388
1640
|
|
|
1641
|
+
The parameters object for the function.
|
|
1642
|
+
|
|
1389
1643
|
#### Returns
|
|
1390
1644
|
|
|
1391
1645
|
`Promise`\<`any`\>
|
|
1392
1646
|
|
|
1647
|
+
A promise that resolves with the function's result.
|
|
1648
|
+
|
|
1393
1649
|
#### Inherited from
|
|
1394
1650
|
|
|
1395
1651
|
[`ResClientTools`](ResClientTools.md).[`run`](ResClientTools.md#run)
|
|
@@ -1400,7 +1656,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:309](https://github.com/isdk/ai-t
|
|
|
1400
1656
|
|
|
1401
1657
|
> **runAs**(`name`, `params`?): `Promise`\<`any`\>
|
|
1402
1658
|
|
|
1403
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1659
|
+
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)
|
|
1660
|
+
|
|
1661
|
+
Asynchronously executes another registered function by name.
|
|
1662
|
+
This method delegates to `runAsSync()` internally.
|
|
1404
1663
|
|
|
1405
1664
|
#### Parameters
|
|
1406
1665
|
|
|
@@ -1408,14 +1667,20 @@ Defined in: [packages/ai-tool/src/tool-func.ts:313](https://github.com/isdk/ai-t
|
|
|
1408
1667
|
|
|
1409
1668
|
`string`
|
|
1410
1669
|
|
|
1670
|
+
The name of the target function to run.
|
|
1671
|
+
|
|
1411
1672
|
##### params?
|
|
1412
1673
|
|
|
1413
1674
|
`any`
|
|
1414
1675
|
|
|
1676
|
+
Optional parameters to pass to the function.
|
|
1677
|
+
|
|
1415
1678
|
#### Returns
|
|
1416
1679
|
|
|
1417
1680
|
`Promise`\<`any`\>
|
|
1418
1681
|
|
|
1682
|
+
A promise that resolves with the result of the function execution.
|
|
1683
|
+
|
|
1419
1684
|
#### Inherited from
|
|
1420
1685
|
|
|
1421
1686
|
[`ResClientTools`](ResClientTools.md).[`runAs`](ResClientTools.md#runas)
|
|
@@ -1426,7 +1691,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:313](https://github.com/isdk/ai-t
|
|
|
1426
1691
|
|
|
1427
1692
|
> **runAsSync**(`name`, `params`?): `any`
|
|
1428
1693
|
|
|
1429
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1694
|
+
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)
|
|
1695
|
+
|
|
1696
|
+
Synchronously executes another registered function by name.
|
|
1697
|
+
This is a convenience method that forwards the call to the static `runSync()` method.
|
|
1430
1698
|
|
|
1431
1699
|
#### Parameters
|
|
1432
1700
|
|
|
@@ -1434,14 +1702,20 @@ Defined in: [packages/ai-tool/src/tool-func.ts:317](https://github.com/isdk/ai-t
|
|
|
1434
1702
|
|
|
1435
1703
|
`string`
|
|
1436
1704
|
|
|
1705
|
+
The name of the target function to run.
|
|
1706
|
+
|
|
1437
1707
|
##### params?
|
|
1438
1708
|
|
|
1439
1709
|
`any`
|
|
1440
1710
|
|
|
1711
|
+
Optional parameters to pass to the function.
|
|
1712
|
+
|
|
1441
1713
|
#### Returns
|
|
1442
1714
|
|
|
1443
1715
|
`any`
|
|
1444
1716
|
|
|
1717
|
+
The result of the function execution.
|
|
1718
|
+
|
|
1445
1719
|
#### Inherited from
|
|
1446
1720
|
|
|
1447
1721
|
[`ResClientTools`](ResClientTools.md).[`runAsSync`](ResClientTools.md#runassync)
|
|
@@ -1452,7 +1726,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:317](https://github.com/isdk/ai-t
|
|
|
1452
1726
|
|
|
1453
1727
|
> **runSync**(`params`?): `any`
|
|
1454
1728
|
|
|
1455
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1729
|
+
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)
|
|
1730
|
+
|
|
1731
|
+
Executes the function synchronously with a named parameters object.
|
|
1456
1732
|
|
|
1457
1733
|
#### Parameters
|
|
1458
1734
|
|
|
@@ -1460,10 +1736,18 @@ Defined in: [packages/ai-tool/src/tool-func.ts:295](https://github.com/isdk/ai-t
|
|
|
1460
1736
|
|
|
1461
1737
|
`any`
|
|
1462
1738
|
|
|
1739
|
+
The parameters object for the function.
|
|
1740
|
+
|
|
1463
1741
|
#### Returns
|
|
1464
1742
|
|
|
1465
1743
|
`any`
|
|
1466
1744
|
|
|
1745
|
+
The result of the function execution.
|
|
1746
|
+
|
|
1747
|
+
#### Throws
|
|
1748
|
+
|
|
1749
|
+
Will throw an error if an array of parameters is passed to a function that expects an object.
|
|
1750
|
+
|
|
1467
1751
|
#### Inherited from
|
|
1468
1752
|
|
|
1469
1753
|
[`ResClientTools`](ResClientTools.md).[`runSync`](ResClientTools.md#runsync)
|
|
@@ -1474,7 +1758,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:295](https://github.com/isdk/ai-t
|
|
|
1474
1758
|
|
|
1475
1759
|
> **runWithPos**(...`params`): `Promise`\<`any`\>
|
|
1476
1760
|
|
|
1477
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1761
|
+
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)
|
|
1762
|
+
|
|
1763
|
+
Executes the function asynchronously using positional arguments.
|
|
1764
|
+
Delegates to `runWithPosSync()` internally.
|
|
1478
1765
|
|
|
1479
1766
|
#### Parameters
|
|
1480
1767
|
|
|
@@ -1482,10 +1769,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:338](https://github.com/isdk/ai-t
|
|
|
1482
1769
|
|
|
1483
1770
|
...`any`[]
|
|
1484
1771
|
|
|
1772
|
+
Positional arguments passed to the function.
|
|
1773
|
+
|
|
1485
1774
|
#### Returns
|
|
1486
1775
|
|
|
1487
1776
|
`Promise`\<`any`\>
|
|
1488
1777
|
|
|
1778
|
+
A promise that resolves with the result of the function execution.
|
|
1779
|
+
|
|
1489
1780
|
#### Inherited from
|
|
1490
1781
|
|
|
1491
1782
|
[`ResClientTools`](ResClientTools.md).[`runWithPos`](ResClientTools.md#runwithpos)
|
|
@@ -1496,7 +1787,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:338](https://github.com/isdk/ai-t
|
|
|
1496
1787
|
|
|
1497
1788
|
> **runWithPosAs**(`name`, ...`params`): `Promise`\<`any`\>
|
|
1498
1789
|
|
|
1499
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1790
|
+
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)
|
|
1791
|
+
|
|
1792
|
+
Asynchronously executes another function by name using positional arguments.
|
|
1793
|
+
Delegates to `runWithPosAsSync()` internally.
|
|
1500
1794
|
|
|
1501
1795
|
#### Parameters
|
|
1502
1796
|
|
|
@@ -1504,14 +1798,20 @@ Defined in: [packages/ai-tool/src/tool-func.ts:342](https://github.com/isdk/ai-t
|
|
|
1504
1798
|
|
|
1505
1799
|
`string`
|
|
1506
1800
|
|
|
1801
|
+
The name of the target function to run.
|
|
1802
|
+
|
|
1507
1803
|
##### params
|
|
1508
1804
|
|
|
1509
1805
|
...`any`[]
|
|
1510
1806
|
|
|
1807
|
+
Positional arguments to pass to the function.
|
|
1808
|
+
|
|
1511
1809
|
#### Returns
|
|
1512
1810
|
|
|
1513
1811
|
`Promise`\<`any`\>
|
|
1514
1812
|
|
|
1813
|
+
A promise that resolves with the result of the function execution.
|
|
1814
|
+
|
|
1515
1815
|
#### Inherited from
|
|
1516
1816
|
|
|
1517
1817
|
[`ResClientTools`](ResClientTools.md).[`runWithPosAs`](ResClientTools.md#runwithposas)
|
|
@@ -1522,7 +1822,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:342](https://github.com/isdk/ai-t
|
|
|
1522
1822
|
|
|
1523
1823
|
> **runWithPosAsSync**(`name`, ...`params`): `any`
|
|
1524
1824
|
|
|
1525
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1825
|
+
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)
|
|
1826
|
+
|
|
1827
|
+
Synchronously executes another function by name using positional arguments.
|
|
1828
|
+
This is a convenience wrapper around the static `runWithPosSync()` method.
|
|
1526
1829
|
|
|
1527
1830
|
#### Parameters
|
|
1528
1831
|
|
|
@@ -1530,14 +1833,20 @@ Defined in: [packages/ai-tool/src/tool-func.ts:334](https://github.com/isdk/ai-t
|
|
|
1530
1833
|
|
|
1531
1834
|
`string`
|
|
1532
1835
|
|
|
1836
|
+
The name of the target function to run.
|
|
1837
|
+
|
|
1533
1838
|
##### params
|
|
1534
1839
|
|
|
1535
1840
|
...`any`[]
|
|
1536
1841
|
|
|
1842
|
+
Positional arguments to pass to the function.
|
|
1843
|
+
|
|
1537
1844
|
#### Returns
|
|
1538
1845
|
|
|
1539
1846
|
`any`
|
|
1540
1847
|
|
|
1848
|
+
The result of the function execution.
|
|
1849
|
+
|
|
1541
1850
|
#### Inherited from
|
|
1542
1851
|
|
|
1543
1852
|
[`ResClientTools`](ResClientTools.md).[`runWithPosAsSync`](ResClientTools.md#runwithposassync)
|
|
@@ -1548,7 +1857,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:334](https://github.com/isdk/ai-t
|
|
|
1548
1857
|
|
|
1549
1858
|
> **runWithPosSync**(...`params`): `any`
|
|
1550
1859
|
|
|
1551
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1860
|
+
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)
|
|
1861
|
+
|
|
1862
|
+
Executes the function synchronously using positional arguments.
|
|
1863
|
+
If the function expects named parameters, it converts the arguments automatically.
|
|
1552
1864
|
|
|
1553
1865
|
#### Parameters
|
|
1554
1866
|
|
|
@@ -1556,10 +1868,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:327](https://github.com/isdk/ai-t
|
|
|
1556
1868
|
|
|
1557
1869
|
...`any`[]
|
|
1558
1870
|
|
|
1871
|
+
Positional arguments passed to the function.
|
|
1872
|
+
|
|
1559
1873
|
#### Returns
|
|
1560
1874
|
|
|
1561
1875
|
`any`
|
|
1562
1876
|
|
|
1877
|
+
The result of the function execution.
|
|
1878
|
+
|
|
1563
1879
|
#### Inherited from
|
|
1564
1880
|
|
|
1565
1881
|
[`ResClientTools`](ResClientTools.md).[`runWithPosSync`](ResClientTools.md#runwithpossync)
|
|
@@ -1570,7 +1886,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:327](https://github.com/isdk/ai-t
|
|
|
1570
1886
|
|
|
1571
1887
|
> **subscribe**(`events`): `Promise`\<`any`\>
|
|
1572
1888
|
|
|
1573
|
-
Defined in: [packages/ai-tool/src/funcs/event-client.ts:
|
|
1889
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-client.ts:95](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/funcs/event-client.ts#L95)
|
|
1574
1890
|
|
|
1575
1891
|
subscribe server sent event(SSE)
|
|
1576
1892
|
|
|
@@ -1590,7 +1906,7 @@ subscribe server sent event(SSE)
|
|
|
1590
1906
|
|
|
1591
1907
|
> **toJSON**(): `any`
|
|
1592
1908
|
|
|
1593
|
-
Defined in:
|
|
1909
|
+
Defined in: [property-manager.js/src/abstract.d.ts:182](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L182)
|
|
1594
1910
|
|
|
1595
1911
|
#### Returns
|
|
1596
1912
|
|
|
@@ -1606,7 +1922,7 @@ Defined in: node\_modules/.pnpm/property-manager@2.0.0/node\_modules/property-ma
|
|
|
1606
1922
|
|
|
1607
1923
|
> **toLocaleString**(): `string`
|
|
1608
1924
|
|
|
1609
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:131
|
|
1925
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:131
|
|
1610
1926
|
|
|
1611
1927
|
Returns a date converted to a string using the current locale.
|
|
1612
1928
|
|
|
@@ -1624,7 +1940,7 @@ Returns a date converted to a string using the current locale.
|
|
|
1624
1940
|
|
|
1625
1941
|
> **toObject**(`options`?): `any`
|
|
1626
1942
|
|
|
1627
|
-
Defined in:
|
|
1943
|
+
Defined in: [property-manager.js/src/abstract.d.ts:181](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L181)
|
|
1628
1944
|
|
|
1629
1945
|
Convert the attributes to the json object
|
|
1630
1946
|
|
|
@@ -1650,7 +1966,7 @@ the json object.
|
|
|
1650
1966
|
|
|
1651
1967
|
> **toString**(): `string`
|
|
1652
1968
|
|
|
1653
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:128
|
|
1969
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:128
|
|
1654
1970
|
|
|
1655
1971
|
Returns a string representation of an object.
|
|
1656
1972
|
|
|
@@ -1668,7 +1984,7 @@ Returns a string representation of an object.
|
|
|
1668
1984
|
|
|
1669
1985
|
> **unforwardEvent**(`events`): `void`
|
|
1670
1986
|
|
|
1671
|
-
Defined in: [packages/ai-tool/src/funcs/event-client.ts:
|
|
1987
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-client.ts:158](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/funcs/event-client.ts#L158)
|
|
1672
1988
|
|
|
1673
1989
|
unforward local event(s) to server
|
|
1674
1990
|
|
|
@@ -1692,12 +2008,16 @@ Note: pls backendEventable(ClientTools or EventClient) first
|
|
|
1692
2008
|
|
|
1693
2009
|
> **unregister**(): `any`
|
|
1694
2010
|
|
|
1695
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2011
|
+
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)
|
|
2012
|
+
|
|
2013
|
+
Removes the current `ToolFunc` instance from the static registry.
|
|
1696
2014
|
|
|
1697
2015
|
#### Returns
|
|
1698
2016
|
|
|
1699
2017
|
`any`
|
|
1700
2018
|
|
|
2019
|
+
The instance that was unregistered.
|
|
2020
|
+
|
|
1701
2021
|
#### Inherited from
|
|
1702
2022
|
|
|
1703
2023
|
[`ResClientTools`](ResClientTools.md).[`unregister`](ResClientTools.md#unregister)
|
|
@@ -1708,7 +2028,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:265](https://github.com/isdk/ai-t
|
|
|
1708
2028
|
|
|
1709
2029
|
> **unsubscribe**(`events`): `Promise`\<`any`\>
|
|
1710
2030
|
|
|
1711
|
-
Defined in: [packages/ai-tool/src/funcs/event-client.ts:
|
|
2031
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-client.ts:114](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/funcs/event-client.ts#L114)
|
|
1712
2032
|
|
|
1713
2033
|
unsubscribe server sent event(SSE)
|
|
1714
2034
|
|
|
@@ -1728,7 +2048,7 @@ unsubscribe server sent event(SSE)
|
|
|
1728
2048
|
|
|
1729
2049
|
> **valueOf**(): `Object`
|
|
1730
2050
|
|
|
1731
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:134
|
|
2051
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:134
|
|
1732
2052
|
|
|
1733
2053
|
Returns the primitive value of the specified object.
|
|
1734
2054
|
|
|
@@ -1748,7 +2068,7 @@ Returns the primitive value of the specified object.
|
|
|
1748
2068
|
|
|
1749
2069
|
> `static` **assign**\<`T`, `U`\>(`target`, `source`): `T` & `U`
|
|
1750
2070
|
|
|
1751
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:286
|
|
2071
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:286
|
|
1752
2072
|
|
|
1753
2073
|
Copy the values of all of the enumerable own properties from one or more source objects to a
|
|
1754
2074
|
target object. Returns the target object.
|
|
@@ -1785,7 +2105,7 @@ The source object from which to copy properties.
|
|
|
1785
2105
|
|
|
1786
2106
|
> `static` **assign**\<`T`, `U`, `V`\>(`target`, `source1`, `source2`): `T` & `U` & `V`
|
|
1787
2107
|
|
|
1788
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:295
|
|
2108
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:295
|
|
1789
2109
|
|
|
1790
2110
|
Copy the values of all of the enumerable own properties from one or more source objects to a
|
|
1791
2111
|
target object. Returns the target object.
|
|
@@ -1830,7 +2150,7 @@ The second source object from which to copy properties.
|
|
|
1830
2150
|
|
|
1831
2151
|
> `static` **assign**\<`T`, `U`, `V`, `W`\>(`target`, `source1`, `source2`, `source3`): `T` & `U` & `V` & `W`
|
|
1832
2152
|
|
|
1833
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:305
|
|
2153
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:305
|
|
1834
2154
|
|
|
1835
2155
|
Copy the values of all of the enumerable own properties from one or more source objects to a
|
|
1836
2156
|
target object. Returns the target object.
|
|
@@ -1883,7 +2203,7 @@ The third source object from which to copy properties.
|
|
|
1883
2203
|
|
|
1884
2204
|
> `static` **assign**(`target`, ...`sources`): `any`
|
|
1885
2205
|
|
|
1886
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:313
|
|
2206
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:313
|
|
1887
2207
|
|
|
1888
2208
|
Copy the values of all of the enumerable own properties from one or more source objects to a
|
|
1889
2209
|
target object. Returns the target object.
|
|
@@ -1918,7 +2238,7 @@ One or more source objects from which to copy properties
|
|
|
1918
2238
|
|
|
1919
2239
|
> `static` **create**(`o`): `any`
|
|
1920
2240
|
|
|
1921
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:188
|
|
2241
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:188
|
|
1922
2242
|
|
|
1923
2243
|
Creates an object that has the specified prototype or that has null prototype.
|
|
1924
2244
|
|
|
@@ -1942,7 +2262,7 @@ Object to use as a prototype. May be null.
|
|
|
1942
2262
|
|
|
1943
2263
|
> `static` **create**(`o`, `properties`): `any`
|
|
1944
2264
|
|
|
1945
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:195
|
|
2265
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:195
|
|
1946
2266
|
|
|
1947
2267
|
Creates an object that has the specified prototype, and that optionally contains specified properties.
|
|
1948
2268
|
|
|
@@ -1974,7 +2294,7 @@ JavaScript object that contains one or more property descriptors.
|
|
|
1974
2294
|
|
|
1975
2295
|
> `static` **defineProperties**(`aTarget`, `aProperties`, `recreate`?): `any`
|
|
1976
2296
|
|
|
1977
|
-
Defined in:
|
|
2297
|
+
Defined in: [property-manager.js/src/advance.d.ts:11](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/advance.d.ts#L11)
|
|
1978
2298
|
|
|
1979
2299
|
Adds one or more properties to an object, and/or modifies attributes of existing properties.
|
|
1980
2300
|
|
|
@@ -2006,7 +2326,7 @@ Adds one or more properties to an object, and/or modifies attributes of existing
|
|
|
2006
2326
|
|
|
2007
2327
|
> `static` **defineProperty**\<`T`\>(`o`, `p`, `attributes`): `T`
|
|
2008
2328
|
|
|
2009
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:203
|
|
2329
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:203
|
|
2010
2330
|
|
|
2011
2331
|
Adds a property to an object, or modifies attributes of an existing property.
|
|
2012
2332
|
|
|
@@ -2050,7 +2370,7 @@ Descriptor for the property. It can be for a data property or an accessor proper
|
|
|
2050
2370
|
|
|
2051
2371
|
> `static` **entries**\<`T`\>(`o`): \[`string`, `T`\][]
|
|
2052
2372
|
|
|
2053
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:36
|
|
2373
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:36
|
|
2054
2374
|
|
|
2055
2375
|
Returns an array of key/values of the enumerable own properties of an object
|
|
2056
2376
|
|
|
@@ -2078,7 +2398,7 @@ Object that contains the properties and methods. This can be an object that you
|
|
|
2078
2398
|
|
|
2079
2399
|
> `static` **entries**(`o`): \[`string`, `any`\][]
|
|
2080
2400
|
|
|
2081
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:42
|
|
2401
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:42
|
|
2082
2402
|
|
|
2083
2403
|
Returns an array of key/values of the enumerable own properties of an object
|
|
2084
2404
|
|
|
@@ -2100,9 +2420,9 @@ Object that contains the properties and methods. This can be an object that you
|
|
|
2100
2420
|
|
|
2101
2421
|
### fetch()
|
|
2102
2422
|
|
|
2103
|
-
> `static` **fetch**(`name`, `objParam`?): `Promise`\<`any`\>
|
|
2423
|
+
> `static` **fetch**(`name`, `objParam`?, ...`args`?): `Promise`\<`any`\>
|
|
2104
2424
|
|
|
2105
|
-
Defined in: [packages/ai-tool/src/client-tools.ts:
|
|
2425
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:98](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/client-tools.ts#L98)
|
|
2106
2426
|
|
|
2107
2427
|
#### Parameters
|
|
2108
2428
|
|
|
@@ -2114,6 +2434,10 @@ Defined in: [packages/ai-tool/src/client-tools.ts:56](https://github.com/isdk/ai
|
|
|
2114
2434
|
|
|
2115
2435
|
`any`
|
|
2116
2436
|
|
|
2437
|
+
##### args?
|
|
2438
|
+
|
|
2439
|
+
...`any`[]
|
|
2440
|
+
|
|
2117
2441
|
#### Returns
|
|
2118
2442
|
|
|
2119
2443
|
`Promise`\<`any`\>
|
|
@@ -2130,7 +2454,7 @@ Defined in: [packages/ai-tool/src/client-tools.ts:56](https://github.com/isdk/ai
|
|
|
2130
2454
|
|
|
2131
2455
|
> `static` **freeze**\<`T`\>(`f`): `T`
|
|
2132
2456
|
|
|
2133
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:222
|
|
2457
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:222
|
|
2134
2458
|
|
|
2135
2459
|
Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
|
|
2136
2460
|
|
|
@@ -2158,7 +2482,7 @@ Object on which to lock the attributes.
|
|
|
2158
2482
|
|
|
2159
2483
|
> `static` **freeze**\<`T`, `U`\>(`o`): `Readonly`\<`T`\>
|
|
2160
2484
|
|
|
2161
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:228
|
|
2485
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:228
|
|
2162
2486
|
|
|
2163
2487
|
Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
|
|
2164
2488
|
|
|
@@ -2188,7 +2512,7 @@ Object on which to lock the attributes.
|
|
|
2188
2512
|
|
|
2189
2513
|
> `static` **freeze**\<`T`\>(`o`): `Readonly`\<`T`\>
|
|
2190
2514
|
|
|
2191
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:234
|
|
2515
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:234
|
|
2192
2516
|
|
|
2193
2517
|
Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
|
|
2194
2518
|
|
|
@@ -2220,7 +2544,7 @@ Object on which to lock the attributes.
|
|
|
2220
2544
|
|
|
2221
2545
|
> `static` **fromEntries**\<`T`\>(`entries`): `object`
|
|
2222
2546
|
|
|
2223
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2019.object.d.ts:26
|
|
2547
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2019.object.d.ts:26
|
|
2224
2548
|
|
|
2225
2549
|
Returns an object created by key-value entries for properties and methods
|
|
2226
2550
|
|
|
@@ -2248,7 +2572,7 @@ An iterable object that contains key-value entries for properties and methods.
|
|
|
2248
2572
|
|
|
2249
2573
|
> `static` **fromEntries**(`entries`): `any`
|
|
2250
2574
|
|
|
2251
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2019.object.d.ts:32
|
|
2575
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2019.object.d.ts:32
|
|
2252
2576
|
|
|
2253
2577
|
Returns an object created by key-value entries for properties and methods
|
|
2254
2578
|
|
|
@@ -2274,7 +2598,9 @@ An iterable object that contains key-value entries for properties and methods.
|
|
|
2274
2598
|
|
|
2275
2599
|
> `static` **get**(`name`): [`ToolFunc`](ToolFunc.md)
|
|
2276
2600
|
|
|
2277
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2601
|
+
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)
|
|
2602
|
+
|
|
2603
|
+
Retrieves a registered function by its name or alias.
|
|
2278
2604
|
|
|
2279
2605
|
#### Parameters
|
|
2280
2606
|
|
|
@@ -2282,10 +2608,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:61](https://github.com/isdk/ai-to
|
|
|
2282
2608
|
|
|
2283
2609
|
`string`
|
|
2284
2610
|
|
|
2611
|
+
The name or alias of the function to retrieve.
|
|
2612
|
+
|
|
2285
2613
|
#### Returns
|
|
2286
2614
|
|
|
2287
2615
|
[`ToolFunc`](ToolFunc.md)
|
|
2288
2616
|
|
|
2617
|
+
The `ToolFunc` instance if found, otherwise `undefined`.
|
|
2618
|
+
|
|
2289
2619
|
#### Inherited from
|
|
2290
2620
|
|
|
2291
2621
|
[`ResClientTools`](ResClientTools.md).[`get`](ResClientTools.md#get-2)
|
|
@@ -2296,7 +2626,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:61](https://github.com/isdk/ai-to
|
|
|
2296
2626
|
|
|
2297
2627
|
> `static` **getAllByTag**(`tagName`): [`ToolFunc`](ToolFunc.md)[]
|
|
2298
2628
|
|
|
2299
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2629
|
+
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)
|
|
2630
|
+
|
|
2631
|
+
Retrieves all registered functions that have a specific tag.
|
|
2300
2632
|
|
|
2301
2633
|
#### Parameters
|
|
2302
2634
|
|
|
@@ -2304,10 +2636,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:93](https://github.com/isdk/ai-to
|
|
|
2304
2636
|
|
|
2305
2637
|
`string`
|
|
2306
2638
|
|
|
2639
|
+
The tag to search for.
|
|
2640
|
+
|
|
2307
2641
|
#### Returns
|
|
2308
2642
|
|
|
2309
2643
|
[`ToolFunc`](ToolFunc.md)[]
|
|
2310
2644
|
|
|
2645
|
+
An array of matching `ToolFunc` instances.
|
|
2646
|
+
|
|
2311
2647
|
#### Inherited from
|
|
2312
2648
|
|
|
2313
2649
|
[`ResClientTools`](ResClientTools.md).[`getAllByTag`](ResClientTools.md#getallbytag)
|
|
@@ -2318,7 +2654,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:93](https://github.com/isdk/ai-to
|
|
|
2318
2654
|
|
|
2319
2655
|
> `static` **getByTag**(`tagName`): `undefined` \| [`ToolFunc`](ToolFunc.md)
|
|
2320
2656
|
|
|
2321
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2657
|
+
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)
|
|
2658
|
+
|
|
2659
|
+
Finds the first registered function that has a specific tag.
|
|
2322
2660
|
|
|
2323
2661
|
#### Parameters
|
|
2324
2662
|
|
|
@@ -2326,10 +2664,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:73](https://github.com/isdk/ai-to
|
|
|
2326
2664
|
|
|
2327
2665
|
`string`
|
|
2328
2666
|
|
|
2667
|
+
The tag to search for.
|
|
2668
|
+
|
|
2329
2669
|
#### Returns
|
|
2330
2670
|
|
|
2331
2671
|
`undefined` \| [`ToolFunc`](ToolFunc.md)
|
|
2332
2672
|
|
|
2673
|
+
The first matching `ToolFunc` instance, or `undefined` if none is found.
|
|
2674
|
+
|
|
2333
2675
|
#### Inherited from
|
|
2334
2676
|
|
|
2335
2677
|
[`ResClientTools`](ResClientTools.md).[`getByTag`](ResClientTools.md#getbytag)
|
|
@@ -2340,7 +2682,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:73](https://github.com/isdk/ai-to
|
|
|
2340
2682
|
|
|
2341
2683
|
> `static` **getFunc**(`name`): `any`
|
|
2342
2684
|
|
|
2343
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2685
|
+
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)
|
|
2686
|
+
|
|
2687
|
+
Retrieves a bound, runnable function reference for a registered function.
|
|
2688
|
+
This reference is suitable for execution with an object of named parameters.
|
|
2344
2689
|
|
|
2345
2690
|
#### Parameters
|
|
2346
2691
|
|
|
@@ -2348,10 +2693,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:134](https://github.com/isdk/ai-t
|
|
|
2348
2693
|
|
|
2349
2694
|
`string`
|
|
2350
2695
|
|
|
2696
|
+
The name of the function.
|
|
2697
|
+
|
|
2351
2698
|
#### Returns
|
|
2352
2699
|
|
|
2353
2700
|
`any`
|
|
2354
2701
|
|
|
2702
|
+
A bound function reference, or `undefined` if not found.
|
|
2703
|
+
|
|
2355
2704
|
#### Inherited from
|
|
2356
2705
|
|
|
2357
2706
|
[`ResClientTools`](ResClientTools.md).[`getFunc`](ResClientTools.md#getfunc-2)
|
|
@@ -2362,7 +2711,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:134](https://github.com/isdk/ai-t
|
|
|
2362
2711
|
|
|
2363
2712
|
> `static` **getFuncWithPos**(`name`): `any`
|
|
2364
2713
|
|
|
2365
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2714
|
+
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)
|
|
2715
|
+
|
|
2716
|
+
Retrieves a bound, runnable function reference for a registered function.
|
|
2717
|
+
This reference is suitable for execution with positional arguments.
|
|
2366
2718
|
|
|
2367
2719
|
#### Parameters
|
|
2368
2720
|
|
|
@@ -2370,10 +2722,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:155](https://github.com/isdk/ai-t
|
|
|
2370
2722
|
|
|
2371
2723
|
`string`
|
|
2372
2724
|
|
|
2725
|
+
The name of the function.
|
|
2726
|
+
|
|
2373
2727
|
#### Returns
|
|
2374
2728
|
|
|
2375
2729
|
`any`
|
|
2376
2730
|
|
|
2731
|
+
A bound function reference, or `undefined` if not found.
|
|
2732
|
+
|
|
2377
2733
|
#### Inherited from
|
|
2378
2734
|
|
|
2379
2735
|
[`ResClientTools`](ResClientTools.md).[`getFuncWithPos`](ResClientTools.md#getfuncwithpos-2)
|
|
@@ -2384,7 +2740,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:155](https://github.com/isdk/ai-t
|
|
|
2384
2740
|
|
|
2385
2741
|
> `static` **getOwnPropertyDescriptor**(`o`, `p`): `undefined` \| `PropertyDescriptor`
|
|
2386
2742
|
|
|
2387
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:175
|
|
2743
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:175
|
|
2388
2744
|
|
|
2389
2745
|
Gets the own property descriptor of the specified object.
|
|
2390
2746
|
An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.
|
|
@@ -2417,7 +2773,7 @@ Name of the property.
|
|
|
2417
2773
|
|
|
2418
2774
|
> `static` **getOwnPropertyDescriptors**\<`T`\>(`o`): \{ \[P in string \| number \| symbol\]: TypedPropertyDescriptor\<T\[P\]\> \} & `object`
|
|
2419
2775
|
|
|
2420
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:48
|
|
2776
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:48
|
|
2421
2777
|
|
|
2422
2778
|
Returns an object containing all own property descriptors of an object
|
|
2423
2779
|
|
|
@@ -2447,7 +2803,7 @@ Object that contains the properties and methods. This can be an object that you
|
|
|
2447
2803
|
|
|
2448
2804
|
> `static` **getOwnPropertyNames**(`o`): `string`[]
|
|
2449
2805
|
|
|
2450
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:182
|
|
2806
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:182
|
|
2451
2807
|
|
|
2452
2808
|
Returns the names of the own properties of an object. The own properties of an object are those that are defined directly
|
|
2453
2809
|
on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.
|
|
@@ -2474,7 +2830,7 @@ Object that contains the own properties.
|
|
|
2474
2830
|
|
|
2475
2831
|
> `static` **getOwnPropertySymbols**(`o`): `symbol`[]
|
|
2476
2832
|
|
|
2477
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:319
|
|
2833
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:319
|
|
2478
2834
|
|
|
2479
2835
|
Returns an array of all symbol properties found directly on object o.
|
|
2480
2836
|
|
|
@@ -2500,7 +2856,7 @@ Object to retrieve the symbols from.
|
|
|
2500
2856
|
|
|
2501
2857
|
> `static` **getProperties**(): `PropDescriptors`
|
|
2502
2858
|
|
|
2503
|
-
Defined in:
|
|
2859
|
+
Defined in: [property-manager.js/src/advance.d.ts:10](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/advance.d.ts#L10)
|
|
2504
2860
|
|
|
2505
2861
|
get all properties descriptor include inherited.
|
|
2506
2862
|
|
|
@@ -2518,7 +2874,7 @@ get all properties descriptor include inherited.
|
|
|
2518
2874
|
|
|
2519
2875
|
> `static` **getPrototypeOf**(`o`): `any`
|
|
2520
2876
|
|
|
2521
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:167
|
|
2877
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:167
|
|
2522
2878
|
|
|
2523
2879
|
Returns the prototype of an object.
|
|
2524
2880
|
|
|
@@ -2544,7 +2900,9 @@ The object that references the prototype.
|
|
|
2544
2900
|
|
|
2545
2901
|
> `static` **hasAsyncFeature**(`feature`): `boolean`
|
|
2546
2902
|
|
|
2547
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2903
|
+
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)
|
|
2904
|
+
|
|
2905
|
+
Checks if any registered function has a specific asynchronous feature.
|
|
2548
2906
|
|
|
2549
2907
|
#### Parameters
|
|
2550
2908
|
|
|
@@ -2552,10 +2910,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:111](https://github.com/isdk/ai-t
|
|
|
2552
2910
|
|
|
2553
2911
|
[`AsyncFeatureBits`](../enumerations/AsyncFeatureBits.md)
|
|
2554
2912
|
|
|
2913
|
+
The async feature bit to check for.
|
|
2914
|
+
|
|
2555
2915
|
#### Returns
|
|
2556
2916
|
|
|
2557
2917
|
`boolean`
|
|
2558
2918
|
|
|
2919
|
+
`true` if the feature is present in any function, otherwise `false`.
|
|
2920
|
+
|
|
2559
2921
|
#### Inherited from
|
|
2560
2922
|
|
|
2561
2923
|
[`ResClientTools`](ResClientTools.md).[`hasAsyncFeature`](ResClientTools.md#hasasyncfeature-2)
|
|
@@ -2566,7 +2928,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:111](https://github.com/isdk/ai-t
|
|
|
2566
2928
|
|
|
2567
2929
|
> `static` **hasOwn**(`o`, `v`): `boolean`
|
|
2568
2930
|
|
|
2569
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2022.object.d.ts:25
|
|
2931
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2022.object.d.ts:25
|
|
2570
2932
|
|
|
2571
2933
|
Determines whether an object has a property with the specified name.
|
|
2572
2934
|
|
|
@@ -2598,7 +2960,7 @@ A property name.
|
|
|
2598
2960
|
|
|
2599
2961
|
> `static` **is**(`value1`, `value2`): `boolean`
|
|
2600
2962
|
|
|
2601
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:332
|
|
2963
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:332
|
|
2602
2964
|
|
|
2603
2965
|
Returns true if the values are the same value, false otherwise.
|
|
2604
2966
|
|
|
@@ -2630,7 +2992,7 @@ The second value.
|
|
|
2630
2992
|
|
|
2631
2993
|
> `static` **isExtensible**(`o`): `boolean`
|
|
2632
2994
|
|
|
2633
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:258
|
|
2995
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:258
|
|
2634
2996
|
|
|
2635
2997
|
Returns a value that indicates whether new properties can be added to an object.
|
|
2636
2998
|
|
|
@@ -2656,7 +3018,7 @@ Object to test.
|
|
|
2656
3018
|
|
|
2657
3019
|
> `static` **isFrozen**(`o`): `boolean`
|
|
2658
3020
|
|
|
2659
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:252
|
|
3021
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:252
|
|
2660
3022
|
|
|
2661
3023
|
Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.
|
|
2662
3024
|
|
|
@@ -2682,7 +3044,7 @@ Object to test.
|
|
|
2682
3044
|
|
|
2683
3045
|
> `static` **isSealed**(`o`): `boolean`
|
|
2684
3046
|
|
|
2685
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:246
|
|
3047
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:246
|
|
2686
3048
|
|
|
2687
3049
|
Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.
|
|
2688
3050
|
|
|
@@ -2710,7 +3072,7 @@ Object to test.
|
|
|
2710
3072
|
|
|
2711
3073
|
> `static` **keys**(`o`): `string`[]
|
|
2712
3074
|
|
|
2713
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:264
|
|
3075
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:264
|
|
2714
3076
|
|
|
2715
3077
|
Returns the names of the enumerable string properties and methods of an object.
|
|
2716
3078
|
|
|
@@ -2734,7 +3096,7 @@ Object that contains the properties and methods. This can be an object that you
|
|
|
2734
3096
|
|
|
2735
3097
|
> `static` **keys**(`o`): `string`[]
|
|
2736
3098
|
|
|
2737
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:325
|
|
3099
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:325
|
|
2738
3100
|
|
|
2739
3101
|
Returns the names of the enumerable string properties and methods of an object.
|
|
2740
3102
|
|
|
@@ -2758,12 +3120,16 @@ Object that contains the properties and methods. This can be an object that you
|
|
|
2758
3120
|
|
|
2759
3121
|
> `static` **list**(): [`Funcs`](../interfaces/Funcs.md)
|
|
2760
3122
|
|
|
2761
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
3123
|
+
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)
|
|
3124
|
+
|
|
3125
|
+
Returns the complete map of all registered functions.
|
|
2762
3126
|
|
|
2763
3127
|
#### Returns
|
|
2764
3128
|
|
|
2765
3129
|
[`Funcs`](../interfaces/Funcs.md)
|
|
2766
3130
|
|
|
3131
|
+
The map of `ToolFunc` instances.
|
|
3132
|
+
|
|
2767
3133
|
#### Inherited from
|
|
2768
3134
|
|
|
2769
3135
|
[`ResClientTools`](ResClientTools.md).[`list`](ResClientTools.md#list-2)
|
|
@@ -2772,13 +3138,22 @@ Defined in: [packages/ai-tool/src/tool-func.ts:69](https://github.com/isdk/ai-to
|
|
|
2772
3138
|
|
|
2773
3139
|
### loadFrom()
|
|
2774
3140
|
|
|
2775
|
-
> `static` **loadFrom**(): `Promise
|
|
3141
|
+
> `static` **loadFrom**(`items`?): `Promise`\<[`Funcs`](../interfaces/Funcs.md)\>
|
|
2776
3142
|
|
|
2777
|
-
Defined in: [packages/ai-tool/src/client-tools.ts:
|
|
3143
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:68](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/client-tools.ts#L68)
|
|
3144
|
+
|
|
3145
|
+
Loads tool definitions from the remote server via the configured transport.
|
|
3146
|
+
This method populates the local `ToolFunc` registry with `ClientTools` stubs.
|
|
3147
|
+
|
|
3148
|
+
#### Parameters
|
|
3149
|
+
|
|
3150
|
+
##### items?
|
|
3151
|
+
|
|
3152
|
+
[`Funcs`](../interfaces/Funcs.md)
|
|
2778
3153
|
|
|
2779
3154
|
#### Returns
|
|
2780
3155
|
|
|
2781
|
-
`Promise
|
|
3156
|
+
`Promise`\<[`Funcs`](../interfaces/Funcs.md)\>
|
|
2782
3157
|
|
|
2783
3158
|
#### Inherited from
|
|
2784
3159
|
|
|
@@ -2790,7 +3165,10 @@ Defined in: [packages/ai-tool/src/client-tools.ts:29](https://github.com/isdk/ai
|
|
|
2790
3165
|
|
|
2791
3166
|
> `static` **loadFromSync**(`items`): `void`
|
|
2792
3167
|
|
|
2793
|
-
Defined in: [packages/ai-tool/src/client-tools.ts:
|
|
3168
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:84](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/client-tools.ts#L84)
|
|
3169
|
+
|
|
3170
|
+
Synchronously loads tool definitions from a provided object, registering
|
|
3171
|
+
each one as a `ClientTools` instance.
|
|
2794
3172
|
|
|
2795
3173
|
#### Parameters
|
|
2796
3174
|
|
|
@@ -2798,6 +3176,8 @@ Defined in: [packages/ai-tool/src/client-tools.ts:41](https://github.com/isdk/ai
|
|
|
2798
3176
|
|
|
2799
3177
|
[`Funcs`](../interfaces/Funcs.md)
|
|
2800
3178
|
|
|
3179
|
+
A map of tool function metadata, typically from a server.
|
|
3180
|
+
|
|
2801
3181
|
#### Returns
|
|
2802
3182
|
|
|
2803
3183
|
`void`
|
|
@@ -2812,7 +3192,7 @@ Defined in: [packages/ai-tool/src/client-tools.ts:41](https://github.com/isdk/ai
|
|
|
2812
3192
|
|
|
2813
3193
|
> `static` **preventExtensions**\<`T`\>(`o`): `T`
|
|
2814
3194
|
|
|
2815
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:240
|
|
3195
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:240
|
|
2816
3196
|
|
|
2817
3197
|
Prevents the addition of new properties to an object.
|
|
2818
3198
|
|
|
@@ -2844,7 +3224,9 @@ Object to make non-extensible.
|
|
|
2844
3224
|
|
|
2845
3225
|
> `static` **register**(`name`, `options`): `boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2846
3226
|
|
|
2847
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
3227
|
+
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)
|
|
3228
|
+
|
|
3229
|
+
Registers a new tool function.
|
|
2848
3230
|
|
|
2849
3231
|
##### Parameters
|
|
2850
3232
|
|
|
@@ -2852,14 +3234,24 @@ Defined in: [packages/ai-tool/src/tool-func.ts:160](https://github.com/isdk/ai-t
|
|
|
2852
3234
|
|
|
2853
3235
|
`string`
|
|
2854
3236
|
|
|
3237
|
+
The name of the function.
|
|
3238
|
+
|
|
2855
3239
|
###### options
|
|
2856
3240
|
|
|
2857
3241
|
[`FuncItem`](../interfaces/FuncItem.md)
|
|
2858
3242
|
|
|
3243
|
+
The function's configuration.
|
|
3244
|
+
|
|
2859
3245
|
##### Returns
|
|
2860
3246
|
|
|
2861
3247
|
`boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2862
3248
|
|
|
3249
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
3250
|
+
|
|
3251
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
3252
|
+
|
|
3253
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
3254
|
+
|
|
2863
3255
|
##### Inherited from
|
|
2864
3256
|
|
|
2865
3257
|
[`ResClientTools`](ResClientTools.md).[`register`](ResClientTools.md#register-2)
|
|
@@ -2868,7 +3260,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:160](https://github.com/isdk/ai-t
|
|
|
2868
3260
|
|
|
2869
3261
|
> `static` **register**(`func`, `options`): `boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2870
3262
|
|
|
2871
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
3263
|
+
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)
|
|
3264
|
+
|
|
3265
|
+
Registers a new tool function.
|
|
2872
3266
|
|
|
2873
3267
|
##### Parameters
|
|
2874
3268
|
|
|
@@ -2876,14 +3270,24 @@ Defined in: [packages/ai-tool/src/tool-func.ts:161](https://github.com/isdk/ai-t
|
|
|
2876
3270
|
|
|
2877
3271
|
`Function`
|
|
2878
3272
|
|
|
3273
|
+
The function implementation.
|
|
3274
|
+
|
|
2879
3275
|
###### options
|
|
2880
3276
|
|
|
2881
3277
|
[`FuncItem`](../interfaces/FuncItem.md)
|
|
2882
3278
|
|
|
3279
|
+
The function's configuration.
|
|
3280
|
+
|
|
2883
3281
|
##### Returns
|
|
2884
3282
|
|
|
2885
3283
|
`boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2886
3284
|
|
|
3285
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
3286
|
+
|
|
3287
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
3288
|
+
|
|
3289
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
3290
|
+
|
|
2887
3291
|
##### Inherited from
|
|
2888
3292
|
|
|
2889
3293
|
[`ResClientTools`](ResClientTools.md).[`register`](ResClientTools.md#register-2)
|
|
@@ -2892,22 +3296,34 @@ Defined in: [packages/ai-tool/src/tool-func.ts:161](https://github.com/isdk/ai-t
|
|
|
2892
3296
|
|
|
2893
3297
|
> `static` **register**(`name`, `options`?): `boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2894
3298
|
|
|
2895
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
3299
|
+
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)
|
|
3300
|
+
|
|
3301
|
+
Registers a new tool function.
|
|
2896
3302
|
|
|
2897
3303
|
##### Parameters
|
|
2898
3304
|
|
|
2899
3305
|
###### name
|
|
2900
3306
|
|
|
3307
|
+
The name of the function.
|
|
3308
|
+
|
|
2901
3309
|
`string` | `Function` | [`ToolFunc`](ToolFunc.md) | [`FuncItem`](../interfaces/FuncItem.md)
|
|
2902
3310
|
|
|
2903
3311
|
###### options?
|
|
2904
3312
|
|
|
2905
3313
|
[`FuncItem`](../interfaces/FuncItem.md)
|
|
2906
3314
|
|
|
3315
|
+
The function's configuration.
|
|
3316
|
+
|
|
2907
3317
|
##### Returns
|
|
2908
3318
|
|
|
2909
3319
|
`boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2910
3320
|
|
|
3321
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
3322
|
+
|
|
3323
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
3324
|
+
|
|
3325
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
3326
|
+
|
|
2911
3327
|
##### Inherited from
|
|
2912
3328
|
|
|
2913
3329
|
[`ResClientTools`](ResClientTools.md).[`register`](ResClientTools.md#register-2)
|
|
@@ -2918,7 +3334,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:162](https://github.com/isdk/ai-t
|
|
|
2918
3334
|
|
|
2919
3335
|
> `static` **run**(`name`, `params`?): `Promise`\<`any`\>
|
|
2920
3336
|
|
|
2921
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
3337
|
+
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)
|
|
3338
|
+
|
|
3339
|
+
Asynchronously executes a registered function by name with named parameters.
|
|
2922
3340
|
|
|
2923
3341
|
#### Parameters
|
|
2924
3342
|
|
|
@@ -2926,14 +3344,24 @@ Defined in: [packages/ai-tool/src/tool-func.ts:118](https://github.com/isdk/ai-t
|
|
|
2926
3344
|
|
|
2927
3345
|
`string`
|
|
2928
3346
|
|
|
3347
|
+
The name of the function to run.
|
|
3348
|
+
|
|
2929
3349
|
##### params?
|
|
2930
3350
|
|
|
2931
3351
|
`any`
|
|
2932
3352
|
|
|
3353
|
+
The parameters object for the function.
|
|
3354
|
+
|
|
2933
3355
|
#### Returns
|
|
2934
3356
|
|
|
2935
3357
|
`Promise`\<`any`\>
|
|
2936
3358
|
|
|
3359
|
+
A promise that resolves with the function's result.
|
|
3360
|
+
|
|
3361
|
+
#### Throws
|
|
3362
|
+
|
|
3363
|
+
If the function with the given name is not found.
|
|
3364
|
+
|
|
2937
3365
|
#### Inherited from
|
|
2938
3366
|
|
|
2939
3367
|
[`ResClientTools`](ResClientTools.md).[`run`](ResClientTools.md#run-2)
|
|
@@ -2944,7 +3372,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:118](https://github.com/isdk/ai-t
|
|
|
2944
3372
|
|
|
2945
3373
|
> `static` **runSync**(`name`, `params`?): `any`
|
|
2946
3374
|
|
|
2947
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
3375
|
+
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)
|
|
3376
|
+
|
|
3377
|
+
Synchronously executes a registered function by name with named parameters.
|
|
2948
3378
|
|
|
2949
3379
|
#### Parameters
|
|
2950
3380
|
|
|
@@ -2952,14 +3382,24 @@ Defined in: [packages/ai-tool/src/tool-func.ts:126](https://github.com/isdk/ai-t
|
|
|
2952
3382
|
|
|
2953
3383
|
`string`
|
|
2954
3384
|
|
|
3385
|
+
The name of the function to run.
|
|
3386
|
+
|
|
2955
3387
|
##### params?
|
|
2956
3388
|
|
|
2957
3389
|
`any`
|
|
2958
3390
|
|
|
3391
|
+
The parameters object for the function.
|
|
3392
|
+
|
|
2959
3393
|
#### Returns
|
|
2960
3394
|
|
|
2961
3395
|
`any`
|
|
2962
3396
|
|
|
3397
|
+
The result of the function's execution.
|
|
3398
|
+
|
|
3399
|
+
#### Throws
|
|
3400
|
+
|
|
3401
|
+
If the function with the given name is not found.
|
|
3402
|
+
|
|
2963
3403
|
#### Inherited from
|
|
2964
3404
|
|
|
2965
3405
|
[`ResClientTools`](ResClientTools.md).[`runSync`](ResClientTools.md#runsync-2)
|
|
@@ -2970,7 +3410,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:126](https://github.com/isdk/ai-t
|
|
|
2970
3410
|
|
|
2971
3411
|
> `static` **runWithPos**(`name`, ...`params`): `Promise`\<`any`\>
|
|
2972
3412
|
|
|
2973
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
3413
|
+
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)
|
|
3414
|
+
|
|
3415
|
+
Asynchronously executes a function using positional arguments.
|
|
2974
3416
|
|
|
2975
3417
|
#### Parameters
|
|
2976
3418
|
|
|
@@ -2978,14 +3420,24 @@ Defined in: [packages/ai-tool/src/tool-func.ts:139](https://github.com/isdk/ai-t
|
|
|
2978
3420
|
|
|
2979
3421
|
`string`
|
|
2980
3422
|
|
|
3423
|
+
The name of the function to run.
|
|
3424
|
+
|
|
2981
3425
|
##### params
|
|
2982
3426
|
|
|
2983
3427
|
...`any`[]
|
|
2984
3428
|
|
|
3429
|
+
Positional arguments to pass to the function.
|
|
3430
|
+
|
|
2985
3431
|
#### Returns
|
|
2986
3432
|
|
|
2987
3433
|
`Promise`\<`any`\>
|
|
2988
3434
|
|
|
3435
|
+
A promise that resolves with the function's result.
|
|
3436
|
+
|
|
3437
|
+
#### Throws
|
|
3438
|
+
|
|
3439
|
+
If the function with the given name is not found.
|
|
3440
|
+
|
|
2989
3441
|
#### Inherited from
|
|
2990
3442
|
|
|
2991
3443
|
[`ResClientTools`](ResClientTools.md).[`runWithPos`](ResClientTools.md#runwithpos-2)
|
|
@@ -2996,7 +3448,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:139](https://github.com/isdk/ai-t
|
|
|
2996
3448
|
|
|
2997
3449
|
> `static` **runWithPosSync**(`name`, ...`params`): `any`
|
|
2998
3450
|
|
|
2999
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
3451
|
+
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)
|
|
3452
|
+
|
|
3453
|
+
Synchronously executes a function using positional arguments.
|
|
3000
3454
|
|
|
3001
3455
|
#### Parameters
|
|
3002
3456
|
|
|
@@ -3004,14 +3458,24 @@ Defined in: [packages/ai-tool/src/tool-func.ts:147](https://github.com/isdk/ai-t
|
|
|
3004
3458
|
|
|
3005
3459
|
`string`
|
|
3006
3460
|
|
|
3461
|
+
The name of the function to run.
|
|
3462
|
+
|
|
3007
3463
|
##### params
|
|
3008
3464
|
|
|
3009
3465
|
...`any`[]
|
|
3010
3466
|
|
|
3467
|
+
Positional arguments to pass to the function.
|
|
3468
|
+
|
|
3011
3469
|
#### Returns
|
|
3012
3470
|
|
|
3013
3471
|
`any`
|
|
3014
3472
|
|
|
3473
|
+
The result of the function's execution.
|
|
3474
|
+
|
|
3475
|
+
#### Throws
|
|
3476
|
+
|
|
3477
|
+
If the function with the given name is not found.
|
|
3478
|
+
|
|
3015
3479
|
#### Inherited from
|
|
3016
3480
|
|
|
3017
3481
|
[`ResClientTools`](ResClientTools.md).[`runWithPosSync`](ResClientTools.md#runwithpossync-2)
|
|
@@ -3022,7 +3486,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:147](https://github.com/isdk/ai-t
|
|
|
3022
3486
|
|
|
3023
3487
|
> `static` **seal**\<`T`\>(`o`): `T`
|
|
3024
3488
|
|
|
3025
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:216
|
|
3489
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:216
|
|
3026
3490
|
|
|
3027
3491
|
Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
|
|
3028
3492
|
|
|
@@ -3048,57 +3512,80 @@ Object on which to lock the attributes.
|
|
|
3048
3512
|
|
|
3049
3513
|
***
|
|
3050
3514
|
|
|
3051
|
-
###
|
|
3515
|
+
### setPrototypeOf()
|
|
3052
3516
|
|
|
3053
|
-
> `static` **
|
|
3517
|
+
> `static` **setPrototypeOf**(`o`, `proto`): `any`
|
|
3054
3518
|
|
|
3055
|
-
Defined in:
|
|
3519
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:339
|
|
3520
|
+
|
|
3521
|
+
Sets the prototype of a specified object o to object proto or null. Returns the object o.
|
|
3056
3522
|
|
|
3057
3523
|
#### Parameters
|
|
3058
3524
|
|
|
3059
|
-
#####
|
|
3525
|
+
##### o
|
|
3060
3526
|
|
|
3061
|
-
`
|
|
3527
|
+
`any`
|
|
3528
|
+
|
|
3529
|
+
The object to change its prototype.
|
|
3530
|
+
|
|
3531
|
+
##### proto
|
|
3532
|
+
|
|
3533
|
+
The value of the new prototype or null.
|
|
3534
|
+
|
|
3535
|
+
`null` | `object`
|
|
3062
3536
|
|
|
3063
3537
|
#### Returns
|
|
3064
3538
|
|
|
3065
|
-
`
|
|
3539
|
+
`any`
|
|
3066
3540
|
|
|
3067
3541
|
#### Inherited from
|
|
3068
3542
|
|
|
3069
|
-
[`ResClientTools`](ResClientTools.md).[`
|
|
3543
|
+
[`ResClientTools`](ResClientTools.md).[`setPrototypeOf`](ResClientTools.md#setprototypeof)
|
|
3070
3544
|
|
|
3071
3545
|
***
|
|
3072
3546
|
|
|
3073
|
-
###
|
|
3074
|
-
|
|
3075
|
-
> `static` **setPrototypeOf**(`o`, `proto`): `any`
|
|
3547
|
+
### setPubSubTransport()
|
|
3076
3548
|
|
|
3077
|
-
|
|
3549
|
+
> `static` **setPubSubTransport**(`t`?): `void`
|
|
3078
3550
|
|
|
3079
|
-
|
|
3551
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-client.ts:15](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/funcs/event-client.ts#L15)
|
|
3080
3552
|
|
|
3081
3553
|
#### Parameters
|
|
3082
3554
|
|
|
3083
|
-
#####
|
|
3555
|
+
##### t?
|
|
3084
3556
|
|
|
3085
|
-
`
|
|
3557
|
+
[`IPubSubClientTransport`](../interfaces/IPubSubClientTransport.md)
|
|
3086
3558
|
|
|
3087
|
-
|
|
3559
|
+
#### Returns
|
|
3088
3560
|
|
|
3089
|
-
|
|
3561
|
+
`void`
|
|
3090
3562
|
|
|
3091
|
-
|
|
3563
|
+
***
|
|
3092
3564
|
|
|
3093
|
-
|
|
3565
|
+
### setTransport()
|
|
3566
|
+
|
|
3567
|
+
> `static` **setTransport**(`transport`): `void`
|
|
3568
|
+
|
|
3569
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:50](https://github.com/isdk/ai-tool.js/blob/209a87173b5eabb2f81db6ea9a6784f34c24e271/src/client-tools.ts#L50)
|
|
3570
|
+
|
|
3571
|
+
Injects the client-side transport implementation. This is a crucial step
|
|
3572
|
+
to enable communication with the server.
|
|
3573
|
+
|
|
3574
|
+
#### Parameters
|
|
3575
|
+
|
|
3576
|
+
##### transport
|
|
3577
|
+
|
|
3578
|
+
[`IClientToolTransport`](../interfaces/IClientToolTransport.md)
|
|
3579
|
+
|
|
3580
|
+
The transport instance to use for all client-server communication.
|
|
3094
3581
|
|
|
3095
3582
|
#### Returns
|
|
3096
3583
|
|
|
3097
|
-
`
|
|
3584
|
+
`void`
|
|
3098
3585
|
|
|
3099
3586
|
#### Inherited from
|
|
3100
3587
|
|
|
3101
|
-
[`ResClientTools`](ResClientTools.md).[`
|
|
3588
|
+
[`ResClientTools`](ResClientTools.md).[`setTransport`](ResClientTools.md#settransport)
|
|
3102
3589
|
|
|
3103
3590
|
***
|
|
3104
3591
|
|
|
@@ -3106,7 +3593,9 @@ The value of the new prototype or null.
|
|
|
3106
3593
|
|
|
3107
3594
|
> `static` **unregister**(`name`): `undefined` \| [`ToolFunc`](ToolFunc.md)
|
|
3108
3595
|
|
|
3109
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
3596
|
+
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)
|
|
3597
|
+
|
|
3598
|
+
Unregisters a function by its name, also removing any associated aliases.
|
|
3110
3599
|
|
|
3111
3600
|
#### Parameters
|
|
3112
3601
|
|
|
@@ -3114,10 +3603,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:207](https://github.com/isdk/ai-t
|
|
|
3114
3603
|
|
|
3115
3604
|
`string`
|
|
3116
3605
|
|
|
3606
|
+
The name of the function to unregister.
|
|
3607
|
+
|
|
3117
3608
|
#### Returns
|
|
3118
3609
|
|
|
3119
3610
|
`undefined` \| [`ToolFunc`](ToolFunc.md)
|
|
3120
3611
|
|
|
3612
|
+
The unregistered `ToolFunc` instance, or `undefined` if it was not found.
|
|
3613
|
+
|
|
3121
3614
|
#### Inherited from
|
|
3122
3615
|
|
|
3123
3616
|
[`ResClientTools`](ResClientTools.md).[`unregister`](ResClientTools.md#unregister-2)
|
|
@@ -3130,7 +3623,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:207](https://github.com/isdk/ai-t
|
|
|
3130
3623
|
|
|
3131
3624
|
> `static` **values**\<`T`\>(`o`): `T`[]
|
|
3132
3625
|
|
|
3133
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:24
|
|
3626
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:24
|
|
3134
3627
|
|
|
3135
3628
|
Returns an array of values of the enumerable own properties of an object
|
|
3136
3629
|
|
|
@@ -3158,7 +3651,7 @@ Object that contains the properties and methods. This can be an object that you
|
|
|
3158
3651
|
|
|
3159
3652
|
> `static` **values**(`o`): `any`[]
|
|
3160
3653
|
|
|
3161
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:30
|
|
3654
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:30
|
|
3162
3655
|
|
|
3163
3656
|
Returns an array of values of the enumerable own properties of an object
|
|
3164
3657
|
|