@isdk/ai-tool 0.7.1 → 0.8.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/dist/chunk-4FKBOPZI.mjs +1 -0
- package/dist/{chunk-VIG2GB47.mjs → chunk-TGTHY57V.mjs} +1 -1
- package/dist/funcs.d.mts +1 -2
- package/dist/funcs.d.ts +1 -2
- package/dist/funcs.js +1 -1
- package/dist/funcs.mjs +1 -1
- package/dist/{index-DEUnmyUq.d.mts → index-BLW3R7VS.d.mts} +103 -69
- package/dist/{index-DEUnmyUq.d.ts → index-BLW3R7VS.d.ts} +103 -69
- package/dist/index.d.mts +100 -37
- package/dist/index.d.ts +100 -37
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/test/util.js +1 -1
- package/dist/test/util.mjs +1 -1
- package/docs/api/{namespaces → @isdk/namespaces}/EventStates/README.md +2 -2
- package/docs/api/{namespaces → @isdk/namespaces}/EventStates/variables/ABORT.md +2 -2
- package/docs/api/{namespaces → @isdk/namespaces}/EventStates/variables/CONTINUE.md +2 -2
- package/docs/api/{namespaces → @isdk/namespaces}/EventStates/variables/DONE.md +2 -2
- package/docs/api/{namespaces → @isdk/namespaces}/EventStates/variables/STOPPED.md +2 -2
- package/docs/api/@isdk/namespaces/uuidv5/README.md +12 -0
- package/docs/api/{namespaces → @isdk/namespaces}/uuidv5/variables/DNS.md +2 -2
- package/docs/api/{namespaces → @isdk/namespaces}/uuidv5/variables/URL.md +2 -2
- package/docs/api/_media/pubsub.md +427 -105
- package/docs/api/_media/server_client_tools.md +5 -3
- package/docs/api/_media/toolFunc.md +3 -1
- package/docs/api/classes/AbortError.md +8 -8
- package/docs/api/classes/AlreadyExistsError.md +8 -8
- package/docs/api/classes/BaseError.md +14 -14
- package/docs/api/classes/BinarySemaphore.md +39 -39
- package/docs/api/classes/CancelableAbility.md +43 -39
- package/docs/api/classes/ClientToolTransport.md +22 -22
- package/docs/api/classes/ClientTools.md +178 -154
- package/docs/api/classes/CommonError.md +12 -12
- package/docs/api/classes/ConfigFile.md +6 -6
- package/docs/api/classes/EnvPromptTemplate.md +14 -14
- package/docs/api/classes/EventClient.md +240 -198
- package/docs/api/classes/EventEmitter.md +14 -14
- package/docs/api/classes/EventServer.md +208 -233
- package/docs/api/classes/EventToolFunc.md +144 -116
- package/docs/api/classes/FStringPromptTemplate.md +14 -14
- package/docs/api/classes/FewShotPromptTemplate.md +30 -26
- package/docs/api/classes/GolangPromptTemplate.md +13 -13
- package/docs/api/classes/HttpClientToolTransport.md +23 -23
- package/docs/api/classes/HttpServerToolTransport.md +32 -27
- package/docs/api/classes/IntSet.md +21 -21
- package/docs/api/classes/LRUCache.md +18 -18
- package/docs/api/classes/NotFoundError.md +8 -8
- package/docs/api/classes/NotImplementationError.md +8 -8
- package/docs/api/classes/PromptExampleSelector.md +17 -15
- package/docs/api/classes/PromptTemplate.md +15 -15
- package/docs/api/classes/ReadableStreamError.md +12 -12
- package/docs/api/classes/ResClientTools.md +180 -152
- package/docs/api/classes/ResServerTools.md +163 -139
- package/docs/api/classes/RpcMethodsClientTool.md +174 -146
- package/docs/api/classes/RpcMethodsServerTool.md +157 -133
- package/docs/api/classes/SSEChannel.md +142 -52
- package/docs/api/classes/Semaphore.md +40 -40
- package/docs/api/classes/ServerToolTransport.md +32 -27
- package/docs/api/classes/ServerTools.md +163 -139
- package/docs/api/classes/SignalGate.md +19 -17
- package/docs/api/classes/SseClientPubSubTransport.md +38 -10
- package/docs/api/classes/SseServerPubSubTransport.md +115 -42
- package/docs/api/classes/TaskAbortController.md +13 -13
- package/docs/api/classes/ToolFunc.md +157 -129
- package/docs/api/classes/ToolTransport.md +13 -13
- package/docs/api/classes/YamlTypeBaseObject.md +5 -5
- package/docs/api/enumerations/AsyncFeatureBits.md +4 -4
- package/docs/api/enumerations/AsyncFeatures.md +4 -4
- package/docs/api/enumerations/HashAlgorithm.md +12 -12
- package/docs/api/functions/AIArgProcessor.md +2 -2
- package/docs/api/functions/AIStream.md +8 -4
- package/docs/api/functions/ChoiceArgProcessor.md +2 -2
- package/docs/api/functions/DefaultDateFormat.md +2 -2
- package/docs/api/functions/ObjectArgsToArgsInfo.md +1 -1
- package/docs/api/functions/RateLimit.md +2 -2
- package/docs/api/functions/TemplateArgProcessor.md +2 -2
- package/docs/api/functions/addDate.md +7 -3
- package/docs/api/functions/assignDirs.md +1 -1
- package/docs/api/functions/beforeShutdown.md +1 -1
- package/docs/api/functions/calcPerplexity.md +2 -2
- package/docs/api/functions/calcPerplexitySimple.md +1 -1
- package/docs/api/functions/canonicalize.md +1 -1
- package/docs/api/functions/completeSentences.md +1 -1
- package/docs/api/functions/concatText.md +1 -1
- package/docs/api/functions/countLLMTokens.md +1 -1
- package/docs/api/functions/countRegexMatches.md +1 -1
- package/docs/api/functions/createAbilityInjector.md +16 -8
- package/docs/api/functions/createCallbacksTransformer.md +7 -3
- package/docs/api/functions/createEmptyReadableStream.md +1 -1
- package/docs/api/functions/createEndWithRepetitionDetector.md +2 -2
- package/docs/api/functions/createError.md +1 -1
- package/docs/api/functions/createEventStreamTransformer.md +8 -4
- package/docs/api/functions/createHfValueFunc.md +1 -1
- package/docs/api/functions/createLRUCache.md +2 -2
- package/docs/api/functions/createYamlObjectTag.md +1 -1
- package/docs/api/functions/dateToText.md +1 -1
- package/docs/api/functions/decodeCharset.md +2 -2
- package/docs/api/functions/defaultsWithConcat.md +1 -1
- package/docs/api/functions/detectCharset.md +2 -2
- package/docs/api/functions/encodeLLMTokens.md +1 -1
- package/docs/api/functions/ensureQuoted.md +1 -1
- package/docs/api/functions/eventable.md +6 -8
- package/docs/api/functions/expandConfig.md +2 -2
- package/docs/api/functions/expandObjEnv.md +1 -1
- package/docs/api/functions/expandPath.md +2 -2
- package/docs/api/functions/expandPathInObject.md +2 -2
- package/docs/api/functions/expandPaths.md +2 -2
- package/docs/api/functions/fileIsExists.md +1 -1
- package/docs/api/functions/filterValidFnScope.md +2 -2
- package/docs/api/functions/findIndexNonEmptyFrom.md +1 -1
- package/docs/api/functions/findPort.md +1 -1
- package/docs/api/functions/formatISO.md +1 -1
- package/docs/api/functions/formatTextWithSpace.md +2 -2
- package/docs/api/functions/funcGetMeta.md +1 -1
- package/docs/api/functions/funcWithMeta.md +2 -2
- package/docs/api/functions/genUrlParamsStr.md +8 -2
- package/docs/api/functions/getAllEnumKeys.md +4 -2
- package/docs/api/functions/getConfigFileNames.md +2 -2
- package/docs/api/functions/getConfigs.md +2 -2
- package/docs/api/functions/getFileMetaInfo.md +1 -1
- package/docs/api/functions/getHashAlgoBySize.md +1 -1
- package/docs/api/functions/getKeysPath.md +4 -2
- package/docs/api/functions/getLLMTokenizer.md +1 -1
- package/docs/api/functions/getMultiLevelExtname.md +1 -1
- package/docs/api/functions/getPackageDir.md +1 -1
- package/docs/api/functions/getRealFilepath.md +1 -1
- package/docs/api/functions/getResponseErrorReadableStream.md +2 -2
- package/docs/api/functions/getXDGConfigs.md +1 -1
- package/docs/api/functions/hasDirectoryIn.md +2 -2
- package/docs/api/functions/hash.md +1 -1
- package/docs/api/functions/hashFile.md +2 -2
- package/docs/api/functions/hashObject.md +2 -2
- package/docs/api/functions/hashStream.md +1 -1
- package/docs/api/functions/initShutdown.md +1 -1
- package/docs/api/functions/isLangUsingSpaces.md +1 -1
- package/docs/api/functions/isListItemString.md +1 -1
- package/docs/api/functions/isModelNameMatched.md +2 -2
- package/docs/api/functions/isPunctuationChar.md +1 -1
- package/docs/api/functions/isQuoted.md +1 -1
- package/docs/api/functions/isRegExp.md +1 -1
- package/docs/api/functions/isSameString.md +1 -1
- package/docs/api/functions/isSectionString.md +2 -2
- package/docs/api/functions/isSentenceEnding.md +1 -1
- package/docs/api/functions/isSepLineString.md +1 -1
- package/docs/api/functions/isStrWrapped.md +1 -1
- package/docs/api/functions/isSubdirectory.md +1 -1
- package/docs/api/functions/isTitleString.md +2 -2
- package/docs/api/functions/isWebStream.md +1 -1
- package/docs/api/functions/joinSplitWords.md +1 -1
- package/docs/api/functions/jsonFilterToWhere.md +2 -2
- package/docs/api/functions/jsonToMarkdownStr.md +2 -2
- package/docs/api/functions/loadAIConfig.md +1 -1
- package/docs/api/functions/loadConfig.md +1 -1
- package/docs/api/functions/loadConfigFile.md +1 -1
- package/docs/api/functions/loadFileFromPaths.md +2 -2
- package/docs/api/functions/loadTextFromPaths.md +3 -3
- package/docs/api/functions/lrucache.md +1 -1
- package/docs/api/functions/matchUrlProtocol.md +1 -1
- package/docs/api/functions/memoize.md +5 -3
- package/docs/api/functions/mergeArray.md +1 -1
- package/docs/api/functions/messagesToText.md +1 -1
- package/docs/api/functions/nanoid.md +45 -0
- package/docs/api/functions/normalizePath.md +1 -1
- package/docs/api/functions/paramsSizeToScaleStr.md +1 -1
- package/docs/api/functions/parseCommand.md +3 -3
- package/docs/api/functions/parseDateFormat.md +7 -3
- package/docs/api/functions/parseISO.md +7 -3
- package/docs/api/functions/parseJsJson.md +2 -2
- package/docs/api/functions/parseJsJsonSimpleSync.md +2 -2
- package/docs/api/functions/parseObjectArgInfo.md +2 -2
- package/docs/api/functions/parseObjectArgumentInfos.md +2 -2
- package/docs/api/functions/parseObjectArguments.md +2 -2
- package/docs/api/functions/parseObjectArgumentsAsArgInfos.md +2 -2
- package/docs/api/functions/parseYaml.md +1 -1
- package/docs/api/functions/pruneSubdirectories.md +1 -1
- package/docs/api/functions/pruneSubdirectoriesInPlace.md +1 -1
- package/docs/api/functions/quoteStr.md +1 -1
- package/docs/api/functions/readFilenamesRecursiveSync.md +2 -2
- package/docs/api/functions/readTextFileChunks.md +2 -2
- package/docs/api/functions/readTextFileChunksEx.md +2 -2
- package/docs/api/functions/readableFromAsyncIterable.md +4 -2
- package/docs/api/functions/registerCoreTools.md +1 -1
- package/docs/api/functions/removeMarkdownBold.md +2 -2
- package/docs/api/functions/removeMarkdownBoldAndItalic.md +2 -2
- package/docs/api/functions/removeMarkdownItalic.md +2 -2
- package/docs/api/functions/replaceWithPlaceholder.md +2 -2
- package/docs/api/functions/restoreFromPlacehoders.md +2 -2
- package/docs/api/functions/sanitizeFilename.md +1 -1
- package/docs/api/functions/sanitizeFilepath.md +1 -1
- package/docs/api/functions/saveConfigFile.md +1 -1
- package/docs/api/functions/scaleStrToParamsSize.md +1 -1
- package/docs/api/functions/shutdown.md +1 -1
- package/docs/api/functions/simplifyObjectArguments.md +1 -1
- package/docs/api/functions/sleep.md +1 -1
- package/docs/api/functions/sortedValues.md +4 -2
- package/docs/api/functions/splitChunks.md +2 -2
- package/docs/api/functions/splitParagraph.md +2 -2
- package/docs/api/functions/splitSentence.md +1 -1
- package/docs/api/functions/splitWords.md +1 -1
- package/docs/api/functions/stringifyYaml.md +1 -1
- package/docs/api/functions/stripConsoleColor.md +1 -1
- package/docs/api/functions/textToDate.md +1 -1
- package/docs/api/functions/throwError.md +1 -1
- package/docs/api/functions/toDate.md +7 -3
- package/docs/api/functions/toDateTime.md +1 -1
- package/docs/api/functions/trimStartOfStreamHelper.md +3 -3
- package/docs/api/functions/truncTo.md +1 -1
- package/docs/api/functions/truncateByToken.md +2 -2
- package/docs/api/functions/truncateToTokenLimit.md +2 -2
- package/docs/api/functions/truncateToTokenLimitEx.md +2 -2
- package/docs/api/functions/uuid.md +15 -6
- package/docs/api/functions/uuidStringify.md +1 -1
- package/docs/api/functions/uuidv1.md +5 -3
- package/docs/api/functions/uuidv4.md +5 -3
- package/docs/api/functions/uuidv5.md +5 -3
- package/docs/api/functions/uuidv6.md +61 -0
- package/docs/api/functions/uuidv7.md +61 -0
- package/docs/api/functions/wrapEventEmitter.md +1 -1
- package/docs/api/functions/xxhash.md +1 -1
- package/docs/api/functions/xxhash32.md +1 -1
- package/docs/api/functions/xxhash64.md +1 -1
- package/docs/api/functions/xxhashAsStr.md +1 -1
- package/docs/api/functions/yieldExec.md +1 -1
- package/docs/api/globals.md +11 -6
- package/docs/api/interfaces/AIChatAssistantMessageParam.md +12 -12
- package/docs/api/interfaces/AIChatContentPartImage.md +3 -3
- package/docs/api/interfaces/AIChatContentPartText.md +3 -3
- package/docs/api/interfaces/AIChatMessageParamBase.md +7 -7
- package/docs/api/interfaces/AIChatMessageToolCall.md +4 -4
- package/docs/api/interfaces/AIChatSystemMessageParam.md +9 -9
- package/docs/api/interfaces/AIChatToolChoiceFuncObject.md +3 -3
- package/docs/api/interfaces/AIChatToolChoiceObject.md +2 -2
- package/docs/api/interfaces/AIChatToolFunc.md +5 -5
- package/docs/api/interfaces/AIChatToolFuncParam.md +3 -3
- package/docs/api/interfaces/AIChatToolMessageParam.md +10 -10
- package/docs/api/interfaces/AIChatToolParam.md +2 -2
- package/docs/api/interfaces/AIChatToolTypeObject.md +2 -2
- package/docs/api/interfaces/AIChatUserMessageParam.md +13 -13
- package/docs/api/interfaces/AIChoiceConfig.md +8 -8
- package/docs/api/interfaces/AIResult.md +12 -8
- package/docs/api/interfaces/AIStreamParser.md +8 -6
- package/docs/api/interfaces/AIStreamParserOptions.md +2 -2
- package/docs/api/interfaces/BaseFunc.md +17 -17
- package/docs/api/interfaces/BaseFuncItem.md +15 -15
- package/docs/api/interfaces/BinarySemaphoreAcquireOptions.md +2 -2
- package/docs/api/interfaces/BinarySemaphoreOptions.md +5 -5
- package/docs/api/interfaces/BinarySemaphoreReleaseOptions.md +2 -2
- package/docs/api/interfaces/BinarySemaphoreReleaserFunc.md +3 -3
- package/docs/api/interfaces/CancelableAbilityOptions.md +4 -4
- package/docs/api/interfaces/ClientFuncItem.md +21 -25
- package/docs/api/interfaces/EventClientFuncParams.md +5 -5
- package/docs/api/interfaces/EventServerFuncParams.md +14 -6
- package/docs/api/interfaces/FewShotPromptTemplateOptions.md +9 -7
- package/docs/api/interfaces/FuncItem.md +18 -18
- package/docs/api/interfaces/FuncParam.md +5 -5
- package/docs/api/interfaces/FuncParams.md +1 -1
- package/docs/api/interfaces/Funcs.md +1 -1
- package/docs/api/interfaces/HashAlgoParams.md +4 -4
- package/docs/api/interfaces/IClientToolTransport.md +9 -9
- package/docs/api/interfaces/IFileMetaInfo.md +8 -8
- package/docs/api/interfaces/IPubSubClientTransport.md +31 -7
- package/docs/api/interfaces/IPubSubServerTransport.md +92 -47
- package/docs/api/interfaces/IReadTextFileChunksOptions.md +13 -13
- package/docs/api/interfaces/IServerToolTransport.md +19 -14
- package/docs/api/interfaces/IToolTransport.md +6 -6
- package/docs/api/interfaces/ITruncateToTokenLimitOptions.md +11 -11
- package/docs/api/interfaces/JsonFilter.md +1 -1
- package/docs/api/interfaces/ParseObjectArgumentOptions.md +11 -11
- package/docs/api/interfaces/ProbabilityItem.md +4 -4
- package/docs/api/interfaces/PromptExampleSelectorOptions.md +3 -3
- package/docs/api/interfaces/PubSubClientStream.md +26 -14
- package/docs/api/interfaces/PubSubServerSession.md +8 -8
- package/docs/api/interfaces/RemoteFuncItem.md +21 -25
- package/docs/api/interfaces/ReplacePlacehoderOptions.md +5 -5
- package/docs/api/interfaces/ResClientFuncParams.md +3 -3
- package/docs/api/interfaces/ResServerFuncParams.md +6 -6
- package/docs/api/interfaces/RpcMethodsClientFuncParams.md +2 -2
- package/docs/api/interfaces/RpcMethodsServerFuncParams.md +4 -4
- package/docs/api/interfaces/SectionStringOptions.md +3 -3
- package/docs/api/interfaces/SemaphoreOptions.md +7 -7
- package/docs/api/interfaces/SemaphoreTaskItem.md +6 -6
- package/docs/api/interfaces/ServerFuncItem.md +22 -26
- package/docs/api/interfaces/ServerFuncParams.md +3 -3
- package/docs/api/interfaces/SplitSentenceOptions.md +5 -5
- package/docs/api/interfaces/StreamCallbacksAndOptions.md +11 -7
- package/docs/api/interfaces/TaskAbortControllers.md +1 -1
- package/docs/api/interfaces/TaskPromise.md +17 -9
- package/docs/api/interfaces/ToolFuncPackage.md +5 -5
- package/docs/api/type-aliases/AIChatContentPart.md +2 -2
- package/docs/api/type-aliases/AIChatMessageParam.md +2 -2
- package/docs/api/type-aliases/AIChatRole.md +2 -2
- package/docs/api/type-aliases/AIChatToolChoiceParam.md +2 -2
- package/docs/api/type-aliases/AIMessageType.md +2 -2
- package/docs/api/type-aliases/AIModelNameRule.md +2 -2
- package/docs/api/type-aliases/AIModelNameRuleFn.md +2 -2
- package/docs/api/type-aliases/AIModelNameRules.md +2 -2
- package/docs/api/type-aliases/AITextGenerationFinishReason.md +2 -2
- package/docs/api/type-aliases/ActionName.md +2 -2
- package/docs/api/type-aliases/ArrayMergeWay.md +2 -2
- package/docs/api/type-aliases/AsyncTaskId.md +2 -2
- package/docs/api/type-aliases/BeforeShutdownListener.md +2 -2
- package/docs/api/type-aliases/EventErrorListenerFn.md +2 -2
- package/docs/api/type-aliases/EventListenerFn.md +2 -2
- package/docs/api/type-aliases/FuncParamType.md +2 -2
- package/docs/api/type-aliases/PromptExamples.md +5 -3
- package/docs/api/type-aliases/PubSubClientId.md +2 -2
- package/docs/api/type-aliases/PubSubCtx.md +24 -4
- package/docs/api/type-aliases/RpcMethodHandler.md +2 -2
- package/docs/api/type-aliases/SSEClient.md +53 -0
- package/docs/api/type-aliases/SemaphoreIsReadyFuncType.md +2 -2
- package/docs/api/type-aliases/TFunc.md +2 -2
- package/docs/api/type-aliases/UUIDVersions.md +11 -0
- package/docs/api/variables/AIChatRoles.md +1 -1
- package/docs/api/variables/AIMessageTypes.md +1 -1
- package/docs/api/variables/AITextGenerationFinishReasons.md +1 -1
- package/docs/api/variables/ActionNames.md +1 -1
- package/docs/api/variables/ArrayMergeWay.md +2 -2
- package/docs/api/variables/ArrayMergeWaySymbol.md +2 -2
- package/docs/api/variables/ClientEventPrefix.md +11 -0
- package/docs/api/variables/ClientToolFuncSchema.md +4 -2
- package/docs/api/variables/DEFAULT_CONFIG_NAME.md +1 -1
- package/docs/api/variables/DefaultAsyncSemaphoreCapacity.md +1 -1
- package/docs/api/variables/EventBusName.md +1 -1
- package/docs/api/variables/EventName.md +1 -1
- package/docs/api/variables/FuncMetaSymbol.md +2 -2
- package/docs/api/variables/LLM_TOKENIZER_NAMES.md +4 -4
- package/docs/api/variables/LLM_TOKENIZER_NAMES_MAP.md +1 -1
- package/docs/api/variables/PASSING_SCORE.md +1 -1
- package/docs/api/variables/RStreamErrCode.md +1 -1
- package/docs/api/variables/RemoteToolFuncSchema.md +4 -2
- package/docs/api/variables/ResponseRStreamErrCode.md +1 -1
- package/docs/api/variables/RpcMethodsClientToolSchema.md +4 -2
- package/docs/api/variables/RpcMethodsServerToolSchema.md +2 -2
- package/docs/api/variables/SHUTDOWN_SIGNALS.md +1 -1
- package/docs/api/variables/SSEChannelAlreadyClosedErrCode.md +1 -1
- package/docs/api/variables/SecondaryCache.md +1 -1
- package/docs/api/variables/ServerToolFuncSchema.md +4 -2
- package/docs/api/variables/StrangeHumanName.md +1 -1
- package/docs/api/variables/ToolAsyncCancelableBit.md +1 -1
- package/docs/api/variables/ToolAsyncMultiTaskBit.md +1 -1
- package/docs/api/variables/ToolAsyncPriorityBit.md +1 -1
- package/docs/api/variables/ToolFuncSchema.md +4 -2
- package/docs/api/variables/backendEventable.md +11 -0
- package/docs/api/variables/base32768.md +1 -1
- package/docs/api/variables/event.md +1 -1
- package/docs/api/variables/eventClient.md +1 -1
- package/docs/api/variables/eventServer.md +1 -1
- package/docs/api/variables/lrucache.md +1 -1
- package/docs/api/variables/makeToolFuncCancelable.md +11 -0
- package/docs/api/{functions → variables}/wait.md +16 -14
- package/docs/pubsub.md +427 -105
- package/docs/server_client_tools.md +5 -3
- package/docs/toolFunc.md +3 -1
- package/package.json +8 -7
- package/dist/chunk-4XRPAC7C.mjs +0 -1
- package/docs/api/functions/backendEventable.md +0 -29
- package/docs/api/functions/makeToolFuncCancelable.md +0 -29
- package/docs/api/interfaces/PubSubClient.md +0 -27
- package/docs/api/namespaces/uuidv5/README.md +0 -12
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Class: EventToolFunc
|
|
8
8
|
|
|
9
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event.ts:6](https://github.com/isdk/ai-tool.js/blob/
|
|
9
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event.ts:6](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/funcs/event.ts#L6)
|
|
10
10
|
|
|
11
11
|
A manager for creating, registering, and executing reusable tool functions.
|
|
12
12
|
|
|
@@ -73,13 +73,13 @@ main();
|
|
|
73
73
|
|
|
74
74
|
## Constructors
|
|
75
75
|
|
|
76
|
-
###
|
|
76
|
+
### Constructor
|
|
77
77
|
|
|
78
|
-
> **new EventToolFunc**(`name`, `options
|
|
78
|
+
> **new EventToolFunc**(`name`, `options?`): `EventToolFunc`
|
|
79
79
|
|
|
80
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:571](https://github.com/isdk/ai-tool.js/blob/
|
|
80
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:571](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L571)
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
Initializes a new `ToolFunc` instance.
|
|
83
83
|
|
|
84
84
|
#### Parameters
|
|
85
85
|
|
|
@@ -97,11 +97,11 @@ Configuration options if not provided in the first argument.
|
|
|
97
97
|
|
|
98
98
|
#### Returns
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
`EventToolFunc`
|
|
101
101
|
|
|
102
102
|
#### Inherited from
|
|
103
103
|
|
|
104
|
-
[`ToolFunc`](ToolFunc.md).[`constructor`](ToolFunc.md#
|
|
104
|
+
[`ToolFunc`](ToolFunc.md).[`constructor`](ToolFunc.md#constructor)
|
|
105
105
|
|
|
106
106
|
## Properties
|
|
107
107
|
|
|
@@ -109,7 +109,7 @@ Configuration options if not provided in the first argument.
|
|
|
109
109
|
|
|
110
110
|
> **\_emitter**: [`EventEmitter`](EventEmitter.md)
|
|
111
111
|
|
|
112
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event.ts:7](https://github.com/isdk/ai-tool.js/blob/
|
|
112
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event.ts:7](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/funcs/event.ts#L7)
|
|
113
113
|
|
|
114
114
|
***
|
|
115
115
|
|
|
@@ -121,7 +121,7 @@ Defined in: [property-manager.js/src/advance.d.ts:5](https://github.com/snowyu/p
|
|
|
121
121
|
|
|
122
122
|
#### Inherited from
|
|
123
123
|
|
|
124
|
-
[`ToolFunc`](ToolFunc.md).[`$attributes`](ToolFunc.md
|
|
124
|
+
[`ToolFunc`](ToolFunc.md).[`$attributes`](ToolFunc.md#attributes)
|
|
125
125
|
|
|
126
126
|
***
|
|
127
127
|
|
|
@@ -129,7 +129,7 @@ Defined in: [property-manager.js/src/advance.d.ts:5](https://github.com/snowyu/p
|
|
|
129
129
|
|
|
130
130
|
> `optional` **alias**: `string` \| `string`[]
|
|
131
131
|
|
|
132
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:130](https://github.com/isdk/ai-tool.js/blob/
|
|
132
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:130](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L130)
|
|
133
133
|
|
|
134
134
|
Optional aliases for the function name.
|
|
135
135
|
|
|
@@ -143,7 +143,7 @@ Optional aliases for the function name.
|
|
|
143
143
|
|
|
144
144
|
> `optional` **asyncFeatures**: `number`
|
|
145
145
|
|
|
146
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:144](https://github.com/isdk/ai-tool.js/blob/
|
|
146
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:144](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L144)
|
|
147
147
|
|
|
148
148
|
A bitmask representing asynchronous features supported by the function, built from `AsyncFeatureBits`.
|
|
149
149
|
This allows the system to understand if a function supports capabilities like cancellation or multi-tasking.
|
|
@@ -209,7 +209,7 @@ The default options for export and assign
|
|
|
209
209
|
|
|
210
210
|
> `optional` **depends**: `object`
|
|
211
211
|
|
|
212
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:167](https://github.com/isdk/ai-tool.js/blob/
|
|
212
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:167](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L167)
|
|
213
213
|
|
|
214
214
|
A map of dependencies this function has on other tool functions.
|
|
215
215
|
Declaring dependencies ensures that they are automatically registered when this function is registered.
|
|
@@ -248,7 +248,7 @@ mainFunc.register();
|
|
|
248
248
|
|
|
249
249
|
> **description**: `string` = `'Return event bus'`
|
|
250
250
|
|
|
251
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event.ts:9](https://github.com/isdk/ai-tool.js/blob/
|
|
251
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event.ts:9](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/funcs/event.ts#L9)
|
|
252
252
|
|
|
253
253
|
A detailed description of what the function does.
|
|
254
254
|
|
|
@@ -262,7 +262,7 @@ A detailed description of what the function does.
|
|
|
262
262
|
|
|
263
263
|
> `optional` **isApi**: `boolean`
|
|
264
264
|
|
|
265
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:119](https://github.com/isdk/ai-tool.js/blob/
|
|
265
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:119](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L119)
|
|
266
266
|
|
|
267
267
|
If true, indicates that this function should be treated as a server-side API.
|
|
268
268
|
|
|
@@ -276,13 +276,13 @@ If true, indicates that this function should be treated as a server-side API.
|
|
|
276
276
|
|
|
277
277
|
> `optional` **name**: `string`
|
|
278
278
|
|
|
279
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:76](https://github.com/isdk/ai-tool.js/blob/
|
|
279
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:76](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L76)
|
|
280
280
|
|
|
281
281
|
The unique name of the function.
|
|
282
282
|
|
|
283
283
|
#### Inherited from
|
|
284
284
|
|
|
285
|
-
[`ToolFunc`](ToolFunc.md).[`name`](ToolFunc.md#name
|
|
285
|
+
[`ToolFunc`](ToolFunc.md).[`name`](ToolFunc.md#name)
|
|
286
286
|
|
|
287
287
|
***
|
|
288
288
|
|
|
@@ -304,7 +304,7 @@ the property with the default prefix '$' will not be exported.
|
|
|
304
304
|
|
|
305
305
|
> `optional` **params**: [`FuncParams`](../interfaces/FuncParams.md) \| [`FuncParam`](../interfaces/FuncParam.md)[]
|
|
306
306
|
|
|
307
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:81](https://github.com/isdk/ai-tool.js/blob/
|
|
307
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:81](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L81)
|
|
308
308
|
|
|
309
309
|
Parameter definitions, which can be an object mapping names to definitions or an array for positional parameters.
|
|
310
310
|
|
|
@@ -318,7 +318,7 @@ Parameter definitions, which can be an object mapping names to definitions or an
|
|
|
318
318
|
|
|
319
319
|
> **result**: `string` = `'event'`
|
|
320
320
|
|
|
321
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event.ts:10](https://github.com/isdk/ai-tool.js/blob/
|
|
321
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event.ts:10](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/funcs/event.ts#L10)
|
|
322
322
|
|
|
323
323
|
The expected return type of the function, described as a string or a JSON schema object.
|
|
324
324
|
|
|
@@ -332,7 +332,7 @@ The expected return type of the function, described as a string or a JSON schema
|
|
|
332
332
|
|
|
333
333
|
> `optional` **scope**: `any`
|
|
334
334
|
|
|
335
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:91](https://github.com/isdk/ai-tool.js/blob/
|
|
335
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:91](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L91)
|
|
336
336
|
|
|
337
337
|
The execution scope or context (`this`) for the function.
|
|
338
338
|
|
|
@@ -344,9 +344,9 @@ The execution scope or context (`this`) for the function.
|
|
|
344
344
|
|
|
345
345
|
### setup()?
|
|
346
346
|
|
|
347
|
-
> `optional` **setup**: (`this`, `options
|
|
347
|
+
> `optional` **setup**: (`this`, `options?`) => `void`
|
|
348
348
|
|
|
349
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:114](https://github.com/isdk/ai-tool.js/blob/
|
|
349
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:114](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L114)
|
|
350
350
|
|
|
351
351
|
A lifecycle hook called once during the `ToolFunc` instance's initialization.
|
|
352
352
|
It allows for initial setup, state configuration, or property modification on the instance
|
|
@@ -392,7 +392,7 @@ console.log(myFunc.customState); // Outputs: 'configured'
|
|
|
392
392
|
|
|
393
393
|
> `optional` **stream**: `boolean`
|
|
394
394
|
|
|
395
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:125](https://github.com/isdk/ai-tool.js/blob/
|
|
395
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:125](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L125)
|
|
396
396
|
|
|
397
397
|
If true, indicates that the function has the *capability* to stream its output.
|
|
398
398
|
Whether a specific call is streamed is determined by a `stream` property in the runtime parameters.
|
|
@@ -407,7 +407,7 @@ Whether a specific call is streamed is determined by a `stream` property in the
|
|
|
407
407
|
|
|
408
408
|
> `optional` **tags**: `string` \| `string`[]
|
|
409
409
|
|
|
410
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:96](https://github.com/isdk/ai-tool.js/blob/
|
|
410
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:96](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L96)
|
|
411
411
|
|
|
412
412
|
Tags for grouping or filtering functions.
|
|
413
413
|
|
|
@@ -421,7 +421,7 @@ Tags for grouping or filtering functions.
|
|
|
421
421
|
|
|
422
422
|
> `optional` **title**: `string`
|
|
423
423
|
|
|
424
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:177](https://github.com/isdk/ai-tool.js/blob/
|
|
424
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:177](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L177)
|
|
425
425
|
|
|
426
426
|
A concise, human-readable title for the function, often used in UI or by AI.
|
|
427
427
|
|
|
@@ -435,7 +435,7 @@ A concise, human-readable title for the function, often used in UI or by AI.
|
|
|
435
435
|
|
|
436
436
|
> `static` **aliases**: `object` = `{}`
|
|
437
437
|
|
|
438
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:305](https://github.com/isdk/ai-tool.js/blob/
|
|
438
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:305](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L305)
|
|
439
439
|
|
|
440
440
|
A static map of aliases to their corresponding function names.
|
|
441
441
|
|
|
@@ -453,7 +453,7 @@ A static map of aliases to their corresponding function names.
|
|
|
453
453
|
|
|
454
454
|
> `static` **dataPath**: `string`
|
|
455
455
|
|
|
456
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:312](https://github.com/isdk/ai-tool.js/blob/
|
|
456
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:312](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L312)
|
|
457
457
|
|
|
458
458
|
A conventional property to designate a file path for saving the registered `ToolFunc` data.
|
|
459
459
|
Note: The `ToolFunc` class itself does not implement persistence logic. It is up to the
|
|
@@ -469,7 +469,7 @@ developer to use this path to save and load the `ToolFunc.items` registry if nee
|
|
|
469
469
|
|
|
470
470
|
> `static` **items**: [`Funcs`](../interfaces/Funcs.md) = `{}`
|
|
471
471
|
|
|
472
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:300](https://github.com/isdk/ai-tool.js/blob/
|
|
472
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:300](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L300)
|
|
473
473
|
|
|
474
474
|
A static registry of all `ToolFunc` instances, indexed by name.
|
|
475
475
|
|
|
@@ -485,7 +485,7 @@ A static registry of all `ToolFunc` instances, indexed by name.
|
|
|
485
485
|
|
|
486
486
|
> **get** **emitter**(): [`EventEmitter`](EventEmitter.md)
|
|
487
487
|
|
|
488
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event.ts:12](https://github.com/isdk/ai-tool.js/blob/
|
|
488
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event.ts:12](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/funcs/event.ts#L12)
|
|
489
489
|
|
|
490
490
|
##### Returns
|
|
491
491
|
|
|
@@ -497,7 +497,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event.ts:12](https://gith
|
|
|
497
497
|
|
|
498
498
|
> **arr2ObjParams**(`params`): `any`[]
|
|
499
499
|
|
|
500
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:629](https://github.com/isdk/ai-tool.js/blob/
|
|
500
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:629](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L629)
|
|
501
501
|
|
|
502
502
|
Converts an array of positional arguments into a named parameters object.
|
|
503
503
|
This is used internally to support functions defined with named parameters.
|
|
@@ -524,7 +524,7 @@ An array containing a single parameters object.
|
|
|
524
524
|
|
|
525
525
|
### assign()
|
|
526
526
|
|
|
527
|
-
> **assign**(`src`, `options
|
|
527
|
+
> **assign**(`src`, `options?`): `this`
|
|
528
528
|
|
|
529
529
|
Defined in: [property-manager.js/src/abstract.d.ts:106](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L106)
|
|
530
530
|
|
|
@@ -556,7 +556,7 @@ this object
|
|
|
556
556
|
|
|
557
557
|
### assignProperty()
|
|
558
558
|
|
|
559
|
-
> **assignProperty**(`src`, `name`, `value`, `attrs
|
|
559
|
+
> **assignProperty**(`src`, `name`, `value`, `attrs?`, `options?`): `void`
|
|
560
560
|
|
|
561
561
|
Defined in: [property-manager.js/src/abstract.d.ts:117](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L117)
|
|
562
562
|
|
|
@@ -604,7 +604,7 @@ the attributes object
|
|
|
604
604
|
|
|
605
605
|
### assignPropertyTo()
|
|
606
606
|
|
|
607
|
-
> `abstract` **assignPropertyTo**(`dest`, `src`, `name`, `value`, `attrs
|
|
607
|
+
> `abstract` **assignPropertyTo**(`dest`, `src`, `name`, `value`, `attrs?`, `options?`): `void`
|
|
608
608
|
|
|
609
609
|
Defined in: [property-manager.js/src/abstract.d.ts:131](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L131)
|
|
610
610
|
|
|
@@ -658,7 +658,7 @@ The attributes object of the property
|
|
|
658
658
|
|
|
659
659
|
### assignTo()
|
|
660
660
|
|
|
661
|
-
> **assignTo**(`dest
|
|
661
|
+
> **assignTo**(`dest?`, `options?`): `any`
|
|
662
662
|
|
|
663
663
|
Defined in: [property-manager.js/src/abstract.d.ts:191](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L191)
|
|
664
664
|
|
|
@@ -690,7 +690,7 @@ the dest object
|
|
|
690
690
|
|
|
691
691
|
### clone()
|
|
692
692
|
|
|
693
|
-
> **clone**(`options
|
|
693
|
+
> **clone**(`options?`): `any`
|
|
694
694
|
|
|
695
695
|
Defined in: [property-manager.js/src/abstract.d.ts:155](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L155)
|
|
696
696
|
|
|
@@ -716,7 +716,7 @@ the new object
|
|
|
716
716
|
|
|
717
717
|
### cloneTo()
|
|
718
718
|
|
|
719
|
-
> **cloneTo**(`dest`, `options
|
|
719
|
+
> **cloneTo**(`dest`, `options?`): `any`
|
|
720
720
|
|
|
721
721
|
Defined in: [property-manager.js/src/abstract.d.ts:148](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L148)
|
|
722
722
|
|
|
@@ -774,7 +774,7 @@ the defined attributes of the object
|
|
|
774
774
|
|
|
775
775
|
### exportTo()
|
|
776
776
|
|
|
777
|
-
> **exportTo**(`dest`, `options
|
|
777
|
+
> **exportTo**(`dest`, `options?`): `any`
|
|
778
778
|
|
|
779
779
|
Defined in: [property-manager.js/src/abstract.d.ts:173](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L173)
|
|
780
780
|
|
|
@@ -808,7 +808,7 @@ the dest object.
|
|
|
808
808
|
|
|
809
809
|
> **func**(): [`EventEmitter`](EventEmitter.md)
|
|
810
810
|
|
|
811
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event.ts:16](https://github.com/isdk/ai-tool.js/blob/
|
|
811
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event.ts:16](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/funcs/event.ts#L16)
|
|
812
812
|
|
|
813
813
|
The actual function implementation.
|
|
814
814
|
|
|
@@ -826,9 +826,9 @@ The result of the function.
|
|
|
826
826
|
|
|
827
827
|
### getFunc()
|
|
828
828
|
|
|
829
|
-
> **getFunc**(`name
|
|
829
|
+
> **getFunc**(`name?`): `any`
|
|
830
830
|
|
|
831
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:720](https://github.com/isdk/ai-tool.js/blob/
|
|
831
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:720](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L720)
|
|
832
832
|
|
|
833
833
|
Gets a bound function reference for execution with named parameters.
|
|
834
834
|
If a name is provided, it retrieves a different function from the registry.
|
|
@@ -856,9 +856,9 @@ A function reference or `undefined` if not found.
|
|
|
856
856
|
|
|
857
857
|
### getFuncWithPos()
|
|
858
858
|
|
|
859
|
-
> **getFuncWithPos**(`name
|
|
859
|
+
> **getFuncWithPos**(`name?`): `any`
|
|
860
860
|
|
|
861
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:777](https://github.com/isdk/ai-tool.js/blob/
|
|
861
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:777](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L777)
|
|
862
862
|
|
|
863
863
|
Gets a bound function reference suitable for positional argument execution.
|
|
864
864
|
If a name is provided, it retrieves a different function from the registry.
|
|
@@ -908,7 +908,7 @@ the descriptors of properties object
|
|
|
908
908
|
|
|
909
909
|
> **hasAsyncFeature**(`feature`): `boolean`
|
|
910
910
|
|
|
911
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:787](https://github.com/isdk/ai-tool.js/blob/
|
|
911
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:787](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L787)
|
|
912
912
|
|
|
913
913
|
Checks if the current function instance supports a specific async feature.
|
|
914
914
|
|
|
@@ -960,7 +960,7 @@ A property name.
|
|
|
960
960
|
|
|
961
961
|
### initialize()
|
|
962
962
|
|
|
963
|
-
> **initialize**(`src
|
|
963
|
+
> **initialize**(`src?`): `this`
|
|
964
964
|
|
|
965
965
|
Defined in: [property-manager.js/src/abstract.d.ts:139](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L139)
|
|
966
966
|
|
|
@@ -1012,7 +1012,7 @@ Another object whose prototype chain is to be checked.
|
|
|
1012
1012
|
|
|
1013
1013
|
### isSame()
|
|
1014
1014
|
|
|
1015
|
-
> **isSame**(`src`, `options
|
|
1015
|
+
> **isSame**(`src`, `options?`): `boolean`
|
|
1016
1016
|
|
|
1017
1017
|
Defined in: [property-manager.js/src/abstract.d.ts:200](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L200)
|
|
1018
1018
|
|
|
@@ -1044,7 +1044,7 @@ The source object
|
|
|
1044
1044
|
|
|
1045
1045
|
> **isStream**(`params`): `undefined` \| `boolean`
|
|
1046
1046
|
|
|
1047
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:805](https://github.com/isdk/ai-tool.js/blob/
|
|
1047
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:805](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L805)
|
|
1048
1048
|
|
|
1049
1049
|
Determines if a function call should produce a stream.
|
|
1050
1050
|
|
|
@@ -1076,7 +1076,7 @@ The runtime parameters passed to the function call.
|
|
|
1076
1076
|
|
|
1077
1077
|
### mergeTo()
|
|
1078
1078
|
|
|
1079
|
-
> **mergeTo**(`dest`, `options
|
|
1079
|
+
> **mergeTo**(`dest`, `options?`): `any`
|
|
1080
1080
|
|
|
1081
1081
|
Defined in: [property-manager.js/src/abstract.d.ts:164](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L164)
|
|
1082
1082
|
|
|
@@ -1108,9 +1108,9 @@ the dest object.
|
|
|
1108
1108
|
|
|
1109
1109
|
### obj2ArrParams()
|
|
1110
1110
|
|
|
1111
|
-
> **obj2ArrParams**(`params
|
|
1111
|
+
> **obj2ArrParams**(`params?`): `any`[]
|
|
1112
1112
|
|
|
1113
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:648](https://github.com/isdk/ai-tool.js/blob/
|
|
1113
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:648](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L648)
|
|
1114
1114
|
|
|
1115
1115
|
Converts a named parameters object into an array of positional arguments.
|
|
1116
1116
|
This is used for functions defined with positional parameters.
|
|
@@ -1165,7 +1165,7 @@ A property name.
|
|
|
1165
1165
|
|
|
1166
1166
|
> **register**(): `boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
1167
1167
|
|
|
1168
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:602](https://github.com/isdk/ai-tool.js/blob/
|
|
1168
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:602](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L602)
|
|
1169
1169
|
|
|
1170
1170
|
Registers the current `ToolFunc` instance into the static registry.
|
|
1171
1171
|
Also registers any declared dependencies.
|
|
@@ -1184,9 +1184,9 @@ The instance itself upon successful registration, or `false` if it already exist
|
|
|
1184
1184
|
|
|
1185
1185
|
### run()
|
|
1186
1186
|
|
|
1187
|
-
> **run**(`params
|
|
1187
|
+
> **run**(`params?`): `Promise`\<`any`\>
|
|
1188
1188
|
|
|
1189
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:686](https://github.com/isdk/ai-tool.js/blob/
|
|
1189
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:686](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L686)
|
|
1190
1190
|
|
|
1191
1191
|
Executes the function asynchronously with a named parameters object.
|
|
1192
1192
|
|
|
@@ -1212,9 +1212,9 @@ A promise that resolves with the function's result.
|
|
|
1212
1212
|
|
|
1213
1213
|
### runAs()
|
|
1214
1214
|
|
|
1215
|
-
> **runAs**(`name`, `params
|
|
1215
|
+
> **runAs**(`name`, `params?`): `Promise`\<`any`\>
|
|
1216
1216
|
|
|
1217
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:697](https://github.com/isdk/ai-tool.js/blob/
|
|
1217
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:697](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L697)
|
|
1218
1218
|
|
|
1219
1219
|
Asynchronously executes another registered function by name.
|
|
1220
1220
|
This method delegates to `runAsSync()` internally.
|
|
@@ -1247,9 +1247,9 @@ A promise that resolves with the result of the function execution.
|
|
|
1247
1247
|
|
|
1248
1248
|
### runAsSync()
|
|
1249
1249
|
|
|
1250
|
-
> **runAsSync**(`name`, `params
|
|
1250
|
+
> **runAsSync**(`name`, `params?`): `any`
|
|
1251
1251
|
|
|
1252
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:708](https://github.com/isdk/ai-tool.js/blob/
|
|
1252
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:708](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L708)
|
|
1253
1253
|
|
|
1254
1254
|
Synchronously executes another registered function by name.
|
|
1255
1255
|
This is a convenience method that forwards the call to the static `runSync()` method.
|
|
@@ -1282,9 +1282,9 @@ The result of the function execution.
|
|
|
1282
1282
|
|
|
1283
1283
|
### runSync()
|
|
1284
1284
|
|
|
1285
|
-
> **runSync**(`params
|
|
1285
|
+
> **runSync**(`params?`): `any`
|
|
1286
1286
|
|
|
1287
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:667](https://github.com/isdk/ai-tool.js/blob/
|
|
1287
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:667](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L667)
|
|
1288
1288
|
|
|
1289
1289
|
Executes the function synchronously with a named parameters object.
|
|
1290
1290
|
|
|
@@ -1316,7 +1316,7 @@ Will throw an error if an array of parameters is passed to a function that expec
|
|
|
1316
1316
|
|
|
1317
1317
|
> **runWithPos**(...`params`): `Promise`\<`any`\>
|
|
1318
1318
|
|
|
1319
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:755](https://github.com/isdk/ai-tool.js/blob/
|
|
1319
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:755](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L755)
|
|
1320
1320
|
|
|
1321
1321
|
Executes the function asynchronously using positional arguments.
|
|
1322
1322
|
Delegates to `runWithPosSync()` internally.
|
|
@@ -1345,7 +1345,7 @@ A promise that resolves with the result of the function execution.
|
|
|
1345
1345
|
|
|
1346
1346
|
> **runWithPosAs**(`name`, ...`params`): `Promise`\<`any`\>
|
|
1347
1347
|
|
|
1348
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:766](https://github.com/isdk/ai-tool.js/blob/
|
|
1348
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:766](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L766)
|
|
1349
1349
|
|
|
1350
1350
|
Asynchronously executes another function by name using positional arguments.
|
|
1351
1351
|
Delegates to `runWithPosAsSync()` internally.
|
|
@@ -1380,7 +1380,7 @@ A promise that resolves with the result of the function execution.
|
|
|
1380
1380
|
|
|
1381
1381
|
> **runWithPosAsSync**(`name`, ...`params`): `any`
|
|
1382
1382
|
|
|
1383
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:745](https://github.com/isdk/ai-tool.js/blob/
|
|
1383
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:745](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L745)
|
|
1384
1384
|
|
|
1385
1385
|
Synchronously executes another function by name using positional arguments.
|
|
1386
1386
|
This is a convenience wrapper around the static `runWithPosSync()` method.
|
|
@@ -1415,7 +1415,7 @@ The result of the function execution.
|
|
|
1415
1415
|
|
|
1416
1416
|
> **runWithPosSync**(...`params`): `any`
|
|
1417
1417
|
|
|
1418
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:731](https://github.com/isdk/ai-tool.js/blob/
|
|
1418
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:731](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L731)
|
|
1419
1419
|
|
|
1420
1420
|
Executes the function synchronously using positional arguments.
|
|
1421
1421
|
If the function expects named parameters, it converts the arguments automatically.
|
|
@@ -1476,7 +1476,7 @@ Returns a date converted to a string using the current locale.
|
|
|
1476
1476
|
|
|
1477
1477
|
### toObject()
|
|
1478
1478
|
|
|
1479
|
-
> **toObject**(`options
|
|
1479
|
+
> **toObject**(`options?`): `any`
|
|
1480
1480
|
|
|
1481
1481
|
Defined in: [property-manager.js/src/abstract.d.ts:181](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L181)
|
|
1482
1482
|
|
|
@@ -1522,7 +1522,7 @@ Returns a string representation of an object.
|
|
|
1522
1522
|
|
|
1523
1523
|
> **unregister**(): `any`
|
|
1524
1524
|
|
|
1525
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:619](https://github.com/isdk/ai-tool.js/blob/
|
|
1525
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:619](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L619)
|
|
1526
1526
|
|
|
1527
1527
|
Removes the current `ToolFunc` instance from the static registry.
|
|
1528
1528
|
|
|
@@ -1569,9 +1569,13 @@ target object. Returns the target object.
|
|
|
1569
1569
|
|
|
1570
1570
|
##### Type Parameters
|
|
1571
1571
|
|
|
1572
|
-
|
|
1572
|
+
###### T
|
|
1573
|
+
|
|
1574
|
+
`T` *extends* `object`
|
|
1575
|
+
|
|
1576
|
+
###### U
|
|
1573
1577
|
|
|
1574
|
-
|
|
1578
|
+
`U`
|
|
1575
1579
|
|
|
1576
1580
|
##### Parameters
|
|
1577
1581
|
|
|
@@ -1606,11 +1610,17 @@ target object. Returns the target object.
|
|
|
1606
1610
|
|
|
1607
1611
|
##### Type Parameters
|
|
1608
1612
|
|
|
1609
|
-
|
|
1613
|
+
###### T
|
|
1614
|
+
|
|
1615
|
+
`T` *extends* `object`
|
|
1616
|
+
|
|
1617
|
+
###### U
|
|
1610
1618
|
|
|
1611
|
-
|
|
1619
|
+
`U`
|
|
1620
|
+
|
|
1621
|
+
###### V
|
|
1612
1622
|
|
|
1613
|
-
|
|
1623
|
+
`V`
|
|
1614
1624
|
|
|
1615
1625
|
##### Parameters
|
|
1616
1626
|
|
|
@@ -1651,13 +1661,21 @@ target object. Returns the target object.
|
|
|
1651
1661
|
|
|
1652
1662
|
##### Type Parameters
|
|
1653
1663
|
|
|
1654
|
-
|
|
1664
|
+
###### T
|
|
1655
1665
|
|
|
1656
|
-
|
|
1666
|
+
`T` *extends* `object`
|
|
1657
1667
|
|
|
1658
|
-
|
|
1668
|
+
###### U
|
|
1659
1669
|
|
|
1660
|
-
|
|
1670
|
+
`U`
|
|
1671
|
+
|
|
1672
|
+
###### V
|
|
1673
|
+
|
|
1674
|
+
`V`
|
|
1675
|
+
|
|
1676
|
+
###### W
|
|
1677
|
+
|
|
1678
|
+
`W`
|
|
1661
1679
|
|
|
1662
1680
|
##### Parameters
|
|
1663
1681
|
|
|
@@ -1786,7 +1804,7 @@ JavaScript object that contains one or more property descriptors.
|
|
|
1786
1804
|
|
|
1787
1805
|
### defineProperties()
|
|
1788
1806
|
|
|
1789
|
-
> `static` **defineProperties**(`aTarget`, `aProperties`, `recreate
|
|
1807
|
+
> `static` **defineProperties**(`aTarget`, `aProperties`, `recreate?`): `any`
|
|
1790
1808
|
|
|
1791
1809
|
Defined in: [property-manager.js/src/advance.d.ts:11](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/advance.d.ts#L11)
|
|
1792
1810
|
|
|
@@ -1826,7 +1844,9 @@ Adds a property to an object, or modifies attributes of an existing property.
|
|
|
1826
1844
|
|
|
1827
1845
|
#### Type Parameters
|
|
1828
1846
|
|
|
1829
|
-
|
|
1847
|
+
##### T
|
|
1848
|
+
|
|
1849
|
+
`T`
|
|
1830
1850
|
|
|
1831
1851
|
#### Parameters
|
|
1832
1852
|
|
|
@@ -1870,7 +1890,9 @@ Returns an array of key/values of the enumerable own properties of an object
|
|
|
1870
1890
|
|
|
1871
1891
|
##### Type Parameters
|
|
1872
1892
|
|
|
1873
|
-
|
|
1893
|
+
###### T
|
|
1894
|
+
|
|
1895
|
+
`T`
|
|
1874
1896
|
|
|
1875
1897
|
##### Parameters
|
|
1876
1898
|
|
|
@@ -1878,7 +1900,7 @@ Returns an array of key/values of the enumerable own properties of an object
|
|
|
1878
1900
|
|
|
1879
1901
|
Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
|
|
1880
1902
|
|
|
1881
|
-
\{\} | `ArrayLike`\<`T`\>
|
|
1903
|
+
\{\[`s`: `string`\]: `T`; \} | `ArrayLike`\<`T`\>
|
|
1882
1904
|
|
|
1883
1905
|
##### Returns
|
|
1884
1906
|
|
|
@@ -1924,7 +1946,9 @@ Prevents the modification of existing property attributes and values, and preven
|
|
|
1924
1946
|
|
|
1925
1947
|
##### Type Parameters
|
|
1926
1948
|
|
|
1927
|
-
|
|
1949
|
+
###### T
|
|
1950
|
+
|
|
1951
|
+
`T` *extends* `Function`
|
|
1928
1952
|
|
|
1929
1953
|
##### Parameters
|
|
1930
1954
|
|
|
@@ -1952,9 +1976,13 @@ Prevents the modification of existing property attributes and values, and preven
|
|
|
1952
1976
|
|
|
1953
1977
|
##### Type Parameters
|
|
1954
1978
|
|
|
1955
|
-
|
|
1979
|
+
###### T
|
|
1980
|
+
|
|
1981
|
+
`T` *extends* `object`
|
|
1982
|
+
|
|
1983
|
+
###### U
|
|
1956
1984
|
|
|
1957
|
-
|
|
1985
|
+
`U` *extends* `string` \| `number` \| `bigint` \| `boolean` \| `symbol`
|
|
1958
1986
|
|
|
1959
1987
|
##### Parameters
|
|
1960
1988
|
|
|
@@ -1982,7 +2010,9 @@ Prevents the modification of existing property attributes and values, and preven
|
|
|
1982
2010
|
|
|
1983
2011
|
##### Type Parameters
|
|
1984
2012
|
|
|
1985
|
-
|
|
2013
|
+
###### T
|
|
2014
|
+
|
|
2015
|
+
`T`
|
|
1986
2016
|
|
|
1987
2017
|
##### Parameters
|
|
1988
2018
|
|
|
@@ -2014,7 +2044,9 @@ Returns an object created by key-value entries for properties and methods
|
|
|
2014
2044
|
|
|
2015
2045
|
##### Type Parameters
|
|
2016
2046
|
|
|
2017
|
-
|
|
2047
|
+
###### T
|
|
2048
|
+
|
|
2049
|
+
`T` = `any`
|
|
2018
2050
|
|
|
2019
2051
|
##### Parameters
|
|
2020
2052
|
|
|
@@ -2062,7 +2094,7 @@ An iterable object that contains key-value entries for properties and methods.
|
|
|
2062
2094
|
|
|
2063
2095
|
> `static` **get**(`name`): [`ToolFunc`](ToolFunc.md)
|
|
2064
2096
|
|
|
2065
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:319](https://github.com/isdk/ai-tool.js/blob/
|
|
2097
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:319](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L319)
|
|
2066
2098
|
|
|
2067
2099
|
Retrieves a registered function by its name or alias.
|
|
2068
2100
|
|
|
@@ -2090,7 +2122,7 @@ The `ToolFunc` instance if found, otherwise `undefined`.
|
|
|
2090
2122
|
|
|
2091
2123
|
> `static` **getAllByTag**(`tagName`): [`ToolFunc`](ToolFunc.md)[]
|
|
2092
2124
|
|
|
2093
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:365](https://github.com/isdk/ai-tool.js/blob/
|
|
2125
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:365](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L365)
|
|
2094
2126
|
|
|
2095
2127
|
Retrieves all registered functions that have a specific tag.
|
|
2096
2128
|
|
|
@@ -2118,7 +2150,7 @@ An array of matching `ToolFunc` instances.
|
|
|
2118
2150
|
|
|
2119
2151
|
> `static` **getByTag**(`tagName`): `undefined` \| [`ToolFunc`](ToolFunc.md)
|
|
2120
2152
|
|
|
2121
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:340](https://github.com/isdk/ai-tool.js/blob/
|
|
2153
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:340](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L340)
|
|
2122
2154
|
|
|
2123
2155
|
Finds the first registered function that has a specific tag.
|
|
2124
2156
|
|
|
@@ -2146,7 +2178,7 @@ The first matching `ToolFunc` instance, or `undefined` if none is found.
|
|
|
2146
2178
|
|
|
2147
2179
|
> `static` **getFunc**(`name`): `any`
|
|
2148
2180
|
|
|
2149
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:431](https://github.com/isdk/ai-tool.js/blob/
|
|
2181
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:431](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L431)
|
|
2150
2182
|
|
|
2151
2183
|
Retrieves a bound, runnable function reference for a registered function.
|
|
2152
2184
|
This reference is suitable for execution with an object of named parameters.
|
|
@@ -2175,7 +2207,7 @@ A bound function reference, or `undefined` if not found.
|
|
|
2175
2207
|
|
|
2176
2208
|
> `static` **getFuncWithPos**(`name`): `any`
|
|
2177
2209
|
|
|
2178
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:472](https://github.com/isdk/ai-tool.js/blob/
|
|
2210
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:472](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L472)
|
|
2179
2211
|
|
|
2180
2212
|
Retrieves a bound, runnable function reference for a registered function.
|
|
2181
2213
|
This reference is suitable for execution with positional arguments.
|
|
@@ -2243,7 +2275,9 @@ Returns an object containing all own property descriptors of an object
|
|
|
2243
2275
|
|
|
2244
2276
|
#### Type Parameters
|
|
2245
2277
|
|
|
2246
|
-
|
|
2278
|
+
##### T
|
|
2279
|
+
|
|
2280
|
+
`T`
|
|
2247
2281
|
|
|
2248
2282
|
#### Parameters
|
|
2249
2283
|
|
|
@@ -2364,7 +2398,7 @@ The object that references the prototype.
|
|
|
2364
2398
|
|
|
2365
2399
|
> `static` **hasAsyncFeature**(`feature`): `boolean`
|
|
2366
2400
|
|
|
2367
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:388](https://github.com/isdk/ai-tool.js/blob/
|
|
2401
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:388](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L388)
|
|
2368
2402
|
|
|
2369
2403
|
Checks if any registered function has a specific asynchronous feature.
|
|
2370
2404
|
|
|
@@ -2584,7 +2618,7 @@ Object that contains the properties and methods. This can be an object that you
|
|
|
2584
2618
|
|
|
2585
2619
|
> `static` **list**(): [`Funcs`](../interfaces/Funcs.md)
|
|
2586
2620
|
|
|
2587
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:331](https://github.com/isdk/ai-tool.js/blob/
|
|
2621
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:331](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L331)
|
|
2588
2622
|
|
|
2589
2623
|
Returns the complete map of all registered functions.
|
|
2590
2624
|
|
|
@@ -2610,7 +2644,9 @@ Prevents the addition of new properties to an object.
|
|
|
2610
2644
|
|
|
2611
2645
|
#### Type Parameters
|
|
2612
2646
|
|
|
2613
|
-
|
|
2647
|
+
##### T
|
|
2648
|
+
|
|
2649
|
+
`T`
|
|
2614
2650
|
|
|
2615
2651
|
#### Parameters
|
|
2616
2652
|
|
|
@@ -2636,7 +2672,7 @@ Object to make non-extensible.
|
|
|
2636
2672
|
|
|
2637
2673
|
> `static` **register**(`name`, `options`): `boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2638
2674
|
|
|
2639
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:495](https://github.com/isdk/ai-tool.js/blob/
|
|
2675
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:495](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L495)
|
|
2640
2676
|
|
|
2641
2677
|
Registers a new tool function.
|
|
2642
2678
|
|
|
@@ -2660,10 +2696,6 @@ The function's configuration.
|
|
|
2660
2696
|
|
|
2661
2697
|
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2662
2698
|
|
|
2663
|
-
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2664
|
-
|
|
2665
|
-
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2666
|
-
|
|
2667
2699
|
##### Inherited from
|
|
2668
2700
|
|
|
2669
2701
|
[`ToolFunc`](ToolFunc.md).[`register`](ToolFunc.md#register-2)
|
|
@@ -2672,7 +2704,7 @@ The new `ToolFunc` instance, or `false` if a function with that name already exi
|
|
|
2672
2704
|
|
|
2673
2705
|
> `static` **register**(`func`, `options`): `boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2674
2706
|
|
|
2675
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:496](https://github.com/isdk/ai-tool.js/blob/
|
|
2707
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:496](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L496)
|
|
2676
2708
|
|
|
2677
2709
|
Registers a new tool function.
|
|
2678
2710
|
|
|
@@ -2696,19 +2728,15 @@ The function's configuration.
|
|
|
2696
2728
|
|
|
2697
2729
|
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2698
2730
|
|
|
2699
|
-
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2700
|
-
|
|
2701
|
-
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2702
|
-
|
|
2703
2731
|
##### Inherited from
|
|
2704
2732
|
|
|
2705
2733
|
[`ToolFunc`](ToolFunc.md).[`register`](ToolFunc.md#register-2)
|
|
2706
2734
|
|
|
2707
2735
|
#### Call Signature
|
|
2708
2736
|
|
|
2709
|
-
> `static` **register**(`name`, `options
|
|
2737
|
+
> `static` **register**(`name`, `options?`): `boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2710
2738
|
|
|
2711
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:497](https://github.com/isdk/ai-tool.js/blob/
|
|
2739
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:497](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L497)
|
|
2712
2740
|
|
|
2713
2741
|
Registers a new tool function.
|
|
2714
2742
|
|
|
@@ -2732,10 +2760,6 @@ The function's configuration.
|
|
|
2732
2760
|
|
|
2733
2761
|
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2734
2762
|
|
|
2735
|
-
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2736
|
-
|
|
2737
|
-
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2738
|
-
|
|
2739
2763
|
##### Inherited from
|
|
2740
2764
|
|
|
2741
2765
|
[`ToolFunc`](ToolFunc.md).[`register`](ToolFunc.md#register-2)
|
|
@@ -2744,9 +2768,9 @@ The new `ToolFunc` instance, or `false` if a function with that name already exi
|
|
|
2744
2768
|
|
|
2745
2769
|
### run()
|
|
2746
2770
|
|
|
2747
|
-
> `static` **run**(`name`, `params
|
|
2771
|
+
> `static` **run**(`name`, `params?`): `Promise`\<`any`\>
|
|
2748
2772
|
|
|
2749
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:402](https://github.com/isdk/ai-tool.js/blob/
|
|
2773
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:402](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L402)
|
|
2750
2774
|
|
|
2751
2775
|
Asynchronously executes a registered function by name with named parameters.
|
|
2752
2776
|
|
|
@@ -2782,9 +2806,9 @@ If the function with the given name is not found.
|
|
|
2782
2806
|
|
|
2783
2807
|
### runSync()
|
|
2784
2808
|
|
|
2785
|
-
> `static` **runSync**(`name`, `params
|
|
2809
|
+
> `static` **runSync**(`name`, `params?`): `any`
|
|
2786
2810
|
|
|
2787
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:417](https://github.com/isdk/ai-tool.js/blob/
|
|
2811
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:417](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L417)
|
|
2788
2812
|
|
|
2789
2813
|
Synchronously executes a registered function by name with named parameters.
|
|
2790
2814
|
|
|
@@ -2822,7 +2846,7 @@ If the function with the given name is not found.
|
|
|
2822
2846
|
|
|
2823
2847
|
> `static` **runWithPos**(`name`, ...`params`): `Promise`\<`any`\>
|
|
2824
2848
|
|
|
2825
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:443](https://github.com/isdk/ai-tool.js/blob/
|
|
2849
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:443](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L443)
|
|
2826
2850
|
|
|
2827
2851
|
Asynchronously executes a function using positional arguments.
|
|
2828
2852
|
|
|
@@ -2860,7 +2884,7 @@ If the function with the given name is not found.
|
|
|
2860
2884
|
|
|
2861
2885
|
> `static` **runWithPosSync**(`name`, ...`params`): `any`
|
|
2862
2886
|
|
|
2863
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:458](https://github.com/isdk/ai-tool.js/blob/
|
|
2887
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:458](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L458)
|
|
2864
2888
|
|
|
2865
2889
|
Synchronously executes a function using positional arguments.
|
|
2866
2890
|
|
|
@@ -2904,7 +2928,9 @@ Prevents the modification of attributes of existing properties, and prevents the
|
|
|
2904
2928
|
|
|
2905
2929
|
#### Type Parameters
|
|
2906
2930
|
|
|
2907
|
-
|
|
2931
|
+
##### T
|
|
2932
|
+
|
|
2933
|
+
`T`
|
|
2908
2934
|
|
|
2909
2935
|
#### Parameters
|
|
2910
2936
|
|
|
@@ -2960,7 +2986,7 @@ The value of the new prototype or null.
|
|
|
2960
2986
|
|
|
2961
2987
|
> `static` **unregister**(`name`): `undefined` \| [`ToolFunc`](ToolFunc.md)
|
|
2962
2988
|
|
|
2963
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:547](https://github.com/isdk/ai-tool.js/blob/
|
|
2989
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:547](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L547)
|
|
2964
2990
|
|
|
2965
2991
|
Unregisters a function by its name, also removing any associated aliases.
|
|
2966
2992
|
|
|
@@ -2996,7 +3022,9 @@ Returns an array of values of the enumerable own properties of an object
|
|
|
2996
3022
|
|
|
2997
3023
|
##### Type Parameters
|
|
2998
3024
|
|
|
2999
|
-
|
|
3025
|
+
###### T
|
|
3026
|
+
|
|
3027
|
+
`T`
|
|
3000
3028
|
|
|
3001
3029
|
##### Parameters
|
|
3002
3030
|
|
|
@@ -3004,7 +3032,7 @@ Returns an array of values of the enumerable own properties of an object
|
|
|
3004
3032
|
|
|
3005
3033
|
Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
|
|
3006
3034
|
|
|
3007
|
-
\{\} | `ArrayLike`\<`T`\>
|
|
3035
|
+
\{\[`s`: `string`\]: `T`; \} | `ArrayLike`\<`T`\>
|
|
3008
3036
|
|
|
3009
3037
|
##### Returns
|
|
3010
3038
|
|