@isdk/ai-tool 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-LNTIQQNN.mjs → chunk-4XRPAC7C.mjs} +1 -1
- package/dist/funcs.d.mts +1 -1
- package/dist/funcs.d.ts +1 -1
- package/dist/funcs.mjs +1 -1
- package/dist/{index-BCco-g_I.d.mts → index-DEUnmyUq.d.mts} +12 -1
- package/dist/{index-BCco-g_I.d.ts → index-DEUnmyUq.d.ts} +12 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/docs/api/classes/BinarySemaphore.md +25 -25
- package/docs/api/classes/CancelableAbility.md +25 -25
- package/docs/api/classes/ClientToolTransport.md +12 -12
- package/docs/api/classes/ClientTools.md +65 -61
- package/docs/api/classes/EventClient.md +105 -90
- package/docs/api/classes/EventServer.md +96 -88
- package/docs/api/classes/EventToolFunc.md +52 -52
- package/docs/api/classes/FewShotPromptTemplate.md +11 -11
- package/docs/api/classes/HttpClientToolTransport.md +13 -13
- package/docs/api/classes/HttpServerToolTransport.md +24 -16
- package/docs/api/classes/IntSet.md +12 -12
- package/docs/api/classes/PromptExampleSelector.md +9 -9
- package/docs/api/classes/ReadableStreamError.md +2 -2
- package/docs/api/classes/ResClientTools.md +560 -73
- package/docs/api/classes/ResServerTools.md +560 -74
- package/docs/api/classes/RpcMethodsClientTool.md +3275 -0
- package/docs/api/classes/RpcMethodsServerTool.md +3224 -0
- package/docs/api/classes/SSEChannel.md +16 -16
- package/docs/api/classes/Semaphore.md +26 -26
- package/docs/api/classes/ServerToolTransport.md +13 -13
- package/docs/api/classes/ServerTools.md +61 -57
- package/docs/api/classes/SignalGate.md +9 -9
- package/docs/api/classes/SseClientPubSubTransport.md +3 -3
- package/docs/api/classes/SseServerPubSubTransport.md +8 -8
- package/docs/api/classes/TaskAbortController.md +8 -8
- package/docs/api/classes/ToolFunc.md +50 -50
- package/docs/api/classes/ToolTransport.md +7 -7
- package/docs/api/classes/YamlTypeBaseObject.md +2 -2
- 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 +1 -1
- package/docs/api/functions/AIStream.md +1 -1
- package/docs/api/functions/ChoiceArgProcessor.md +1 -1
- package/docs/api/functions/DefaultDateFormat.md +1 -1
- package/docs/api/functions/ObjectArgsToArgsInfo.md +1 -1
- package/docs/api/functions/RateLimit.md +1 -1
- package/docs/api/functions/TemplateArgProcessor.md +1 -1
- package/docs/api/functions/assignDirs.md +1 -1
- package/docs/api/functions/backendEventable.md +1 -1
- package/docs/api/functions/beforeShutdown.md +1 -1
- package/docs/api/functions/calcPerplexity.md +1 -1
- package/docs/api/functions/calcPerplexitySimple.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/createCallbacksTransformer.md +1 -1
- package/docs/api/functions/createEmptyReadableStream.md +1 -1
- package/docs/api/functions/createEndWithRepetitionDetector.md +1 -1
- package/docs/api/functions/createEventStreamTransformer.md +1 -1
- package/docs/api/functions/createLRUCache.md +1 -1
- package/docs/api/functions/createYamlObjectTag.md +1 -1
- package/docs/api/functions/dateToText.md +1 -1
- package/docs/api/functions/decodeCharset.md +1 -1
- package/docs/api/functions/defaultsWithConcat.md +1 -1
- package/docs/api/functions/detectCharset.md +1 -1
- package/docs/api/functions/encodeLLMTokens.md +1 -1
- package/docs/api/functions/ensureQuoted.md +1 -1
- package/docs/api/functions/expandConfig.md +1 -1
- package/docs/api/functions/expandPath.md +1 -1
- package/docs/api/functions/expandPathInObject.md +1 -1
- package/docs/api/functions/expandPaths.md +1 -1
- package/docs/api/functions/fileIsExists.md +1 -1
- package/docs/api/functions/filterValidFnScope.md +1 -1
- package/docs/api/functions/findIndexNonEmptyFrom.md +1 -1
- package/docs/api/functions/findPort.md +1 -1
- package/docs/api/functions/formatTextWithSpace.md +1 -1
- package/docs/api/functions/funcGetMeta.md +1 -1
- package/docs/api/functions/funcWithMeta.md +1 -1
- package/docs/api/functions/genUrlParamsStr.md +1 -1
- package/docs/api/functions/getAllEnumKeys.md +1 -1
- package/docs/api/functions/getConfigFileNames.md +1 -1
- package/docs/api/functions/getConfigs.md +1 -1
- package/docs/api/functions/getFileMetaInfo.md +1 -1
- package/docs/api/functions/getHashAlgoBySize.md +1 -1
- package/docs/api/functions/getKeysPath.md +1 -1
- package/docs/api/functions/getLLMTokenizer.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 +1 -1
- package/docs/api/functions/getXDGConfigs.md +1 -1
- package/docs/api/functions/hasDirectoryIn.md +1 -1
- package/docs/api/functions/hash.md +1 -1
- package/docs/api/functions/hashFile.md +1 -1
- package/docs/api/functions/hashObject.md +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- package/docs/api/functions/isWebStream.md +1 -1
- package/docs/api/functions/joinSplitWords.md +1 -1
- package/docs/api/functions/jsonFilterToWhere.md +1 -1
- package/docs/api/functions/jsonToMarkdownStr.md +1 -1
- 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 +1 -1
- package/docs/api/functions/loadTextFromPaths.md +1 -1
- package/docs/api/functions/lrucache.md +1 -1
- package/docs/api/functions/makeToolFuncCancelable.md +1 -1
- package/docs/api/functions/matchUrlProtocol.md +1 -1
- package/docs/api/functions/memoize.md +1 -1
- package/docs/api/functions/mergeArray.md +1 -1
- package/docs/api/functions/messagesToText.md +1 -1
- package/docs/api/functions/normalizePath.md +1 -1
- package/docs/api/functions/paramsSizeToScaleStr.md +1 -1
- package/docs/api/functions/parseCommand.md +1 -1
- package/docs/api/functions/parseJsJson.md +1 -1
- package/docs/api/functions/parseJsJsonSimpleSync.md +1 -1
- package/docs/api/functions/parseObjectArgInfo.md +1 -1
- package/docs/api/functions/parseObjectArgumentInfos.md +1 -1
- package/docs/api/functions/parseObjectArguments.md +1 -1
- package/docs/api/functions/parseObjectArgumentsAsArgInfos.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 +1 -1
- package/docs/api/functions/readTextFileChunks.md +1 -1
- package/docs/api/functions/readTextFileChunksEx.md +1 -1
- package/docs/api/functions/readableFromAsyncIterable.md +1 -1
- package/docs/api/functions/registerCoreTools.md +1 -1
- package/docs/api/functions/removeMarkdownBold.md +1 -1
- package/docs/api/functions/removeMarkdownBoldAndItalic.md +1 -1
- package/docs/api/functions/removeMarkdownItalic.md +1 -1
- package/docs/api/functions/replaceWithPlaceholder.md +1 -1
- package/docs/api/functions/restoreFromPlacehoders.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 +1 -1
- package/docs/api/functions/splitChunks.md +1 -1
- package/docs/api/functions/splitParagraph.md +1 -1
- package/docs/api/functions/splitSentence.md +1 -1
- package/docs/api/functions/splitWords.md +1 -1
- package/docs/api/functions/stripConsoleColor.md +1 -1
- package/docs/api/functions/textToDate.md +1 -1
- package/docs/api/functions/toDateTime.md +1 -1
- package/docs/api/functions/trimStartOfStreamHelper.md +1 -1
- package/docs/api/functions/truncTo.md +1 -1
- package/docs/api/functions/truncateByToken.md +1 -1
- package/docs/api/functions/truncateToTokenLimit.md +1 -1
- package/docs/api/functions/truncateToTokenLimitEx.md +1 -1
- package/docs/api/functions/uuid.md +1 -1
- package/docs/api/functions/wait.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 +6 -0
- 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 +6 -6
- package/docs/api/interfaces/AIStreamParser.md +2 -2
- package/docs/api/interfaces/AIStreamParserOptions.md +2 -2
- package/docs/api/interfaces/BaseFunc.md +15 -15
- package/docs/api/interfaces/BaseFuncItem.md +14 -14
- 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 +17 -17
- package/docs/api/interfaces/EventClientFuncParams.md +5 -5
- package/docs/api/interfaces/EventServerFuncParams.md +6 -6
- package/docs/api/interfaces/FewShotPromptTemplateOptions.md +6 -6
- package/docs/api/interfaces/FuncItem.md +15 -15
- 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 +7 -7
- package/docs/api/interfaces/IFileMetaInfo.md +8 -8
- package/docs/api/interfaces/IPubSubClientTransport.md +3 -3
- package/docs/api/interfaces/IPubSubServerTransport.md +9 -9
- package/docs/api/interfaces/IReadTextFileChunksOptions.md +11 -11
- package/docs/api/interfaces/IServerToolTransport.md +8 -8
- package/docs/api/interfaces/IToolTransport.md +5 -5
- package/docs/api/interfaces/ITruncateToTokenLimitOptions.md +10 -10
- 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/PubSubClient.md +2 -2
- package/docs/api/interfaces/PubSubClientStream.md +9 -9
- package/docs/api/interfaces/PubSubServerSession.md +7 -7
- package/docs/api/interfaces/RemoteFuncItem.md +17 -17
- package/docs/api/interfaces/ReplacePlacehoderOptions.md +5 -5
- package/docs/api/interfaces/ResClientFuncParams.md +5 -5
- package/docs/api/interfaces/ResServerFuncParams.md +14 -10
- package/docs/api/interfaces/RpcMethodsClientFuncParams.md +25 -0
- package/docs/api/interfaces/RpcMethodsServerFuncParams.md +61 -0
- package/docs/api/interfaces/SectionStringOptions.md +3 -3
- package/docs/api/interfaces/SemaphoreOptions.md +7 -7
- package/docs/api/interfaces/SemaphoreTaskItem.md +5 -5
- package/docs/api/interfaces/ServerFuncItem.md +18 -18
- package/docs/api/interfaces/ServerFuncParams.md +4 -3
- package/docs/api/interfaces/SplitSentenceOptions.md +5 -5
- package/docs/api/interfaces/StreamCallbacksAndOptions.md +5 -5
- package/docs/api/interfaces/TaskAbortControllers.md +1 -1
- package/docs/api/interfaces/TaskPromise.md +2 -2
- package/docs/api/interfaces/ToolFuncPackage.md +4 -4
- package/docs/api/type-aliases/AIChatContentPart.md +1 -1
- package/docs/api/type-aliases/AIChatMessageParam.md +1 -1
- package/docs/api/type-aliases/AIChatRole.md +1 -1
- package/docs/api/type-aliases/AIChatToolChoiceParam.md +1 -1
- package/docs/api/type-aliases/AIMessageType.md +1 -1
- package/docs/api/type-aliases/AIModelNameRule.md +1 -1
- package/docs/api/type-aliases/AIModelNameRuleFn.md +1 -1
- package/docs/api/type-aliases/AIModelNameRules.md +1 -1
- package/docs/api/type-aliases/AITextGenerationFinishReason.md +1 -1
- package/docs/api/type-aliases/ActionName.md +1 -1
- package/docs/api/type-aliases/ArrayMergeWay.md +1 -1
- package/docs/api/type-aliases/AsyncTaskId.md +1 -1
- package/docs/api/type-aliases/BeforeShutdownListener.md +1 -1
- package/docs/api/type-aliases/EventErrorListenerFn.md +1 -1
- package/docs/api/type-aliases/EventListenerFn.md +1 -1
- package/docs/api/type-aliases/FuncParamType.md +1 -1
- package/docs/api/type-aliases/PromptExamples.md +1 -1
- package/docs/api/type-aliases/PubSubClientId.md +1 -1
- package/docs/api/type-aliases/PubSubCtx.md +1 -1
- package/docs/api/type-aliases/RpcMethodHandler.md +1 -1
- package/docs/api/type-aliases/SemaphoreIsReadyFuncType.md +1 -1
- package/docs/api/type-aliases/TFunc.md +1 -1
- 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 +1 -1
- package/docs/api/variables/ArrayMergeWaySymbol.md +1 -1
- package/docs/api/variables/ClientToolFuncSchema.md +1 -1
- 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 +1 -1
- package/docs/api/variables/LLM_TOKENIZER_NAMES.md +1 -1
- 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 +1 -1
- package/docs/api/variables/ResponseRStreamErrCode.md +1 -1
- package/docs/api/variables/RpcMethodsClientToolSchema.md +49 -0
- package/docs/api/variables/RpcMethodsServerToolSchema.md +21 -0
- 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 +1 -1
- 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 +1 -1
- 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/package.json +3 -3
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Class: ClientTools
|
|
8
8
|
|
|
9
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:9](https://github.com/isdk/ai-tool.js/blob/
|
|
9
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:9](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/client-tools.ts#L9)
|
|
10
10
|
|
|
11
11
|
Represents a client-side proxy for a remote tool function.
|
|
12
12
|
|
|
@@ -21,6 +21,10 @@ These tools are typically created dynamically by loading definitions from a serv
|
|
|
21
21
|
|
|
22
22
|
- [`ClientFuncItem`](../interfaces/ClientFuncItem.md).[`ToolFunc`](ToolFunc.md)
|
|
23
23
|
|
|
24
|
+
## Extended by
|
|
25
|
+
|
|
26
|
+
- [`RpcMethodsClientTool`](RpcMethodsClientTool.md)
|
|
27
|
+
|
|
24
28
|
## Indexable
|
|
25
29
|
|
|
26
30
|
\[`name`: `string`\]: `any`
|
|
@@ -31,7 +35,7 @@ These tools are typically created dynamically by loading definitions from a serv
|
|
|
31
35
|
|
|
32
36
|
> **new ClientTools**(`name`, `options`?): [`ClientTools`](ClientTools.md)
|
|
33
37
|
|
|
34
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:571](https://github.com/isdk/ai-tool.js/blob/
|
|
38
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:571](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L571)
|
|
35
39
|
|
|
36
40
|
The initial value of Object.prototype.constructor is the standard built-in Object constructor.
|
|
37
41
|
|
|
@@ -75,7 +79,7 @@ Defined in: [property-manager.js/src/advance.d.ts:5](https://github.com/snowyu/p
|
|
|
75
79
|
|
|
76
80
|
> `optional` **action**: `"get"` \| `"post"` \| `"put"` \| `"delete"` \| `"patch"` \| `"list"` \| `"res"`
|
|
77
81
|
|
|
78
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/consts.ts:95](https://github.com/isdk/ai-tool.js/blob/
|
|
82
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/consts.ts:95](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/utils/consts.ts#L95)
|
|
79
83
|
|
|
80
84
|
The action to be used for the remote call. This typically represents an RPC method name.
|
|
81
85
|
Only for RESTful HTTP transports, it might be mapped to a standard HTTP method (e.g., GET, POST)
|
|
@@ -90,7 +94,7 @@ Only for RESTful HTTP transports, it might be mapped to a standard HTTP method (
|
|
|
90
94
|
|
|
91
95
|
> `optional` **alias**: `string` \| `string`[]
|
|
92
96
|
|
|
93
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:130](https://github.com/isdk/ai-tool.js/blob/
|
|
97
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:130](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L130)
|
|
94
98
|
|
|
95
99
|
Optional aliases for the function name.
|
|
96
100
|
|
|
@@ -104,7 +108,7 @@ Optional aliases for the function name.
|
|
|
104
108
|
|
|
105
109
|
> `optional` **asyncFeatures**: `number`
|
|
106
110
|
|
|
107
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:144](https://github.com/isdk/ai-tool.js/blob/
|
|
111
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:144](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L144)
|
|
108
112
|
|
|
109
113
|
A bitmask representing asynchronous features supported by the function, built from `AsyncFeatureBits`.
|
|
110
114
|
This allows the system to understand if a function supports capabilities like cancellation or multi-tasking.
|
|
@@ -166,7 +170,7 @@ The default options for export and assign
|
|
|
166
170
|
|
|
167
171
|
> `optional` **depends**: `object`
|
|
168
172
|
|
|
169
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:167](https://github.com/isdk/ai-tool.js/blob/
|
|
173
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:167](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L167)
|
|
170
174
|
|
|
171
175
|
A map of dependencies this function has on other tool functions.
|
|
172
176
|
Declaring dependencies ensures that they are automatically registered when this function is registered.
|
|
@@ -205,7 +209,7 @@ mainFunc.register();
|
|
|
205
209
|
|
|
206
210
|
> `optional` **description**: `string`
|
|
207
211
|
|
|
208
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:172](https://github.com/isdk/ai-tool.js/blob/
|
|
212
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:172](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L172)
|
|
209
213
|
|
|
210
214
|
A detailed description of what the function does.
|
|
211
215
|
|
|
@@ -219,7 +223,7 @@ A detailed description of what the function does.
|
|
|
219
223
|
|
|
220
224
|
> `optional` **fetchOptions**: `any`
|
|
221
225
|
|
|
222
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/consts.ts:101](https://github.com/isdk/ai-tool.js/blob/
|
|
226
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/consts.ts:101](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/utils/consts.ts#L101)
|
|
223
227
|
|
|
224
228
|
Options to be passed to the underlying `fetch` call in an HTTP transport.
|
|
225
229
|
|
|
@@ -237,7 +241,7 @@ Use `transport` instead.
|
|
|
237
241
|
|
|
238
242
|
> `optional` **isApi**: `boolean`
|
|
239
243
|
|
|
240
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:119](https://github.com/isdk/ai-tool.js/blob/
|
|
244
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:119](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L119)
|
|
241
245
|
|
|
242
246
|
If true, indicates that this function should be treated as a server-side API.
|
|
243
247
|
|
|
@@ -251,7 +255,7 @@ If true, indicates that this function should be treated as a server-side API.
|
|
|
251
255
|
|
|
252
256
|
> `optional` **name**: `string`
|
|
253
257
|
|
|
254
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:76](https://github.com/isdk/ai-tool.js/blob/
|
|
258
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:76](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L76)
|
|
255
259
|
|
|
256
260
|
The unique name of the function.
|
|
257
261
|
|
|
@@ -279,7 +283,7 @@ the property with the default prefix '$' will not be exported.
|
|
|
279
283
|
|
|
280
284
|
> `optional` **params**: [`FuncParams`](../interfaces/FuncParams.md) \| [`FuncParam`](../interfaces/FuncParam.md)[]
|
|
281
285
|
|
|
282
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:81](https://github.com/isdk/ai-tool.js/blob/
|
|
286
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:81](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L81)
|
|
283
287
|
|
|
284
288
|
Parameter definitions, which can be an object mapping names to definitions or an array for positional parameters.
|
|
285
289
|
|
|
@@ -293,7 +297,7 @@ Parameter definitions, which can be an object mapping names to definitions or an
|
|
|
293
297
|
|
|
294
298
|
> `optional` **result**: `string` \| `Record`\<`string`, `any`\>
|
|
295
299
|
|
|
296
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:86](https://github.com/isdk/ai-tool.js/blob/
|
|
300
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:86](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L86)
|
|
297
301
|
|
|
298
302
|
The expected return type of the function, described as a string or a JSON schema object.
|
|
299
303
|
|
|
@@ -307,7 +311,7 @@ The expected return type of the function, described as a string or a JSON schema
|
|
|
307
311
|
|
|
308
312
|
> `optional` **scope**: `any`
|
|
309
313
|
|
|
310
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:91](https://github.com/isdk/ai-tool.js/blob/
|
|
314
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:91](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L91)
|
|
311
315
|
|
|
312
316
|
The execution scope or context (`this`) for the function.
|
|
313
317
|
|
|
@@ -321,7 +325,7 @@ The execution scope or context (`this`) for the function.
|
|
|
321
325
|
|
|
322
326
|
> `optional` **setup**: (`this`, `options`?) => `void`
|
|
323
327
|
|
|
324
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:114](https://github.com/isdk/ai-tool.js/blob/
|
|
328
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:114](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L114)
|
|
325
329
|
|
|
326
330
|
A lifecycle hook called once during the `ToolFunc` instance's initialization.
|
|
327
331
|
It allows for initial setup, state configuration, or property modification on the instance
|
|
@@ -367,7 +371,7 @@ console.log(myFunc.customState); // Outputs: 'configured'
|
|
|
367
371
|
|
|
368
372
|
> `optional` **stream**: `boolean`
|
|
369
373
|
|
|
370
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:125](https://github.com/isdk/ai-tool.js/blob/
|
|
374
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:125](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L125)
|
|
371
375
|
|
|
372
376
|
If true, indicates that the function has the *capability* to stream its output.
|
|
373
377
|
Whether a specific call is streamed is determined by a `stream` property in the runtime parameters.
|
|
@@ -382,7 +386,7 @@ Whether a specific call is streamed is determined by a `stream` property in the
|
|
|
382
386
|
|
|
383
387
|
> `optional` **tags**: `string` \| `string`[]
|
|
384
388
|
|
|
385
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:96](https://github.com/isdk/ai-tool.js/blob/
|
|
389
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:96](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L96)
|
|
386
390
|
|
|
387
391
|
Tags for grouping or filtering functions.
|
|
388
392
|
|
|
@@ -396,7 +400,7 @@ Tags for grouping or filtering functions.
|
|
|
396
400
|
|
|
397
401
|
> `optional` **title**: `string`
|
|
398
402
|
|
|
399
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:177](https://github.com/isdk/ai-tool.js/blob/
|
|
403
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:177](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L177)
|
|
400
404
|
|
|
401
405
|
A concise, human-readable title for the function, often used in UI or by AI.
|
|
402
406
|
|
|
@@ -410,7 +414,7 @@ A concise, human-readable title for the function, often used in UI or by AI.
|
|
|
410
414
|
|
|
411
415
|
> `static` `optional` **action**: `string`
|
|
412
416
|
|
|
413
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:32](https://github.com/isdk/ai-tool.js/blob/
|
|
417
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:32](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/client-tools.ts#L32)
|
|
414
418
|
|
|
415
419
|
#### Inherited from
|
|
416
420
|
|
|
@@ -422,7 +426,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:32](https://git
|
|
|
422
426
|
|
|
423
427
|
> `static` **aliases**: `object` = `{}`
|
|
424
428
|
|
|
425
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:305](https://github.com/isdk/ai-tool.js/blob/
|
|
429
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:305](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L305)
|
|
426
430
|
|
|
427
431
|
A static map of aliases to their corresponding function names.
|
|
428
432
|
|
|
@@ -440,7 +444,7 @@ A static map of aliases to their corresponding function names.
|
|
|
440
444
|
|
|
441
445
|
> `static` **dataPath**: `string`
|
|
442
446
|
|
|
443
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:312](https://github.com/isdk/ai-tool.js/blob/
|
|
447
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:312](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L312)
|
|
444
448
|
|
|
445
449
|
A conventional property to designate a file path for saving the registered `ToolFunc` data.
|
|
446
450
|
Note: The `ToolFunc` class itself does not implement persistence logic. It is up to the
|
|
@@ -456,7 +460,7 @@ developer to use this path to save and load the `ToolFunc.items` registry if nee
|
|
|
456
460
|
|
|
457
461
|
> `static` **items**: [`Funcs`](../interfaces/Funcs.md) = `{}`
|
|
458
462
|
|
|
459
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:300](https://github.com/isdk/ai-tool.js/blob/
|
|
463
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:300](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L300)
|
|
460
464
|
|
|
461
465
|
A static registry of all `ToolFunc` instances, indexed by name.
|
|
462
466
|
|
|
@@ -472,7 +476,7 @@ A static registry of all `ToolFunc` instances, indexed by name.
|
|
|
472
476
|
|
|
473
477
|
> **get** **apiRoot**(): `string`
|
|
474
478
|
|
|
475
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:109](https://github.com/isdk/ai-tool.js/blob/
|
|
479
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:109](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/client-tools.ts#L109)
|
|
476
480
|
|
|
477
481
|
##### Deprecated
|
|
478
482
|
|
|
@@ -501,7 +505,7 @@ Use `transport` instead.
|
|
|
501
505
|
|
|
502
506
|
> **get** `static` **apiRoot**(): `string`
|
|
503
507
|
|
|
504
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:40](https://github.com/isdk/ai-tool.js/blob/
|
|
508
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:40](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/client-tools.ts#L40)
|
|
505
509
|
|
|
506
510
|
##### Deprecated
|
|
507
511
|
|
|
@@ -524,7 +528,7 @@ The actual endpoint is managed by the transport.
|
|
|
524
528
|
|
|
525
529
|
> **get** `static` **transport**(): [`IClientToolTransport`](../interfaces/IClientToolTransport.md)
|
|
526
530
|
|
|
527
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:60](https://github.com/isdk/ai-tool.js/blob/
|
|
531
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:60](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/client-tools.ts#L60)
|
|
528
532
|
|
|
529
533
|
##### Returns
|
|
530
534
|
|
|
@@ -536,7 +540,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:60](https://git
|
|
|
536
540
|
|
|
537
541
|
> **arr2ObjParams**(`params`): `any`[]
|
|
538
542
|
|
|
539
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:629](https://github.com/isdk/ai-tool.js/blob/
|
|
543
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:629](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L629)
|
|
540
544
|
|
|
541
545
|
Converts an array of positional arguments into a named parameters object.
|
|
542
546
|
This is used internally to support functions defined with named parameters.
|
|
@@ -847,7 +851,7 @@ the dest object.
|
|
|
847
851
|
|
|
848
852
|
> **fetch**(`objParam`?, `act`?, `subName`?): `Promise`\<`any`\>
|
|
849
853
|
|
|
850
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:114](https://github.com/isdk/ai-tool.js/blob/
|
|
854
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:114](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/client-tools.ts#L114)
|
|
851
855
|
|
|
852
856
|
#### Parameters
|
|
853
857
|
|
|
@@ -873,7 +877,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:114](https://gi
|
|
|
873
877
|
|
|
874
878
|
> **func**(`objParam`): `Promise`\<`any`\>
|
|
875
879
|
|
|
876
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:132](https://github.com/isdk/ai-tool.js/blob/
|
|
880
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:132](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/client-tools.ts#L132)
|
|
877
881
|
|
|
878
882
|
The core implementation for a client-side tool. When a `ClientTools` instance
|
|
879
883
|
is "run", this `func` method is executed. It delegates the call to the
|
|
@@ -903,7 +907,7 @@ The result from the remote tool.
|
|
|
903
907
|
|
|
904
908
|
> **getFunc**(`name`?): `any`
|
|
905
909
|
|
|
906
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:720](https://github.com/isdk/ai-tool.js/blob/
|
|
910
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:720](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L720)
|
|
907
911
|
|
|
908
912
|
Gets a bound function reference for execution with named parameters.
|
|
909
913
|
If a name is provided, it retrieves a different function from the registry.
|
|
@@ -933,7 +937,7 @@ A function reference or `undefined` if not found.
|
|
|
933
937
|
|
|
934
938
|
> **getFuncWithPos**(`name`?): `any`
|
|
935
939
|
|
|
936
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:777](https://github.com/isdk/ai-tool.js/blob/
|
|
940
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:777](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L777)
|
|
937
941
|
|
|
938
942
|
Gets a bound function reference suitable for positional argument execution.
|
|
939
943
|
If a name is provided, it retrieves a different function from the registry.
|
|
@@ -983,7 +987,7 @@ the descriptors of properties object
|
|
|
983
987
|
|
|
984
988
|
> **hasAsyncFeature**(`feature`): `boolean`
|
|
985
989
|
|
|
986
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:787](https://github.com/isdk/ai-tool.js/blob/
|
|
990
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:787](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L787)
|
|
987
991
|
|
|
988
992
|
Checks if the current function instance supports a specific async feature.
|
|
989
993
|
|
|
@@ -1119,7 +1123,7 @@ The source object
|
|
|
1119
1123
|
|
|
1120
1124
|
> **isStream**(`params`): `undefined` \| `boolean`
|
|
1121
1125
|
|
|
1122
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:805](https://github.com/isdk/ai-tool.js/blob/
|
|
1126
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:805](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L805)
|
|
1123
1127
|
|
|
1124
1128
|
Determines if a function call should produce a stream.
|
|
1125
1129
|
|
|
@@ -1185,7 +1189,7 @@ the dest object.
|
|
|
1185
1189
|
|
|
1186
1190
|
> **obj2ArrParams**(`params`?): `any`[]
|
|
1187
1191
|
|
|
1188
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:648](https://github.com/isdk/ai-tool.js/blob/
|
|
1192
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:648](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L648)
|
|
1189
1193
|
|
|
1190
1194
|
Converts a named parameters object into an array of positional arguments.
|
|
1191
1195
|
This is used for functions defined with positional parameters.
|
|
@@ -1240,7 +1244,7 @@ A property name.
|
|
|
1240
1244
|
|
|
1241
1245
|
> **register**(): `boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
1242
1246
|
|
|
1243
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:602](https://github.com/isdk/ai-tool.js/blob/
|
|
1247
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:602](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L602)
|
|
1244
1248
|
|
|
1245
1249
|
Registers the current `ToolFunc` instance into the static registry.
|
|
1246
1250
|
Also registers any declared dependencies.
|
|
@@ -1261,7 +1265,7 @@ The instance itself upon successful registration, or `false` if it already exist
|
|
|
1261
1265
|
|
|
1262
1266
|
> **run**(`params`?): `Promise`\<`any`\>
|
|
1263
1267
|
|
|
1264
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:686](https://github.com/isdk/ai-tool.js/blob/
|
|
1268
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:686](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L686)
|
|
1265
1269
|
|
|
1266
1270
|
Executes the function asynchronously with a named parameters object.
|
|
1267
1271
|
|
|
@@ -1289,7 +1293,7 @@ A promise that resolves with the function's result.
|
|
|
1289
1293
|
|
|
1290
1294
|
> **runAs**(`name`, `params`?): `Promise`\<`any`\>
|
|
1291
1295
|
|
|
1292
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:697](https://github.com/isdk/ai-tool.js/blob/
|
|
1296
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:697](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L697)
|
|
1293
1297
|
|
|
1294
1298
|
Asynchronously executes another registered function by name.
|
|
1295
1299
|
This method delegates to `runAsSync()` internally.
|
|
@@ -1324,7 +1328,7 @@ A promise that resolves with the result of the function execution.
|
|
|
1324
1328
|
|
|
1325
1329
|
> **runAsSync**(`name`, `params`?): `any`
|
|
1326
1330
|
|
|
1327
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:708](https://github.com/isdk/ai-tool.js/blob/
|
|
1331
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:708](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L708)
|
|
1328
1332
|
|
|
1329
1333
|
Synchronously executes another registered function by name.
|
|
1330
1334
|
This is a convenience method that forwards the call to the static `runSync()` method.
|
|
@@ -1359,7 +1363,7 @@ The result of the function execution.
|
|
|
1359
1363
|
|
|
1360
1364
|
> **runSync**(`params`?): `any`
|
|
1361
1365
|
|
|
1362
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:667](https://github.com/isdk/ai-tool.js/blob/
|
|
1366
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:667](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L667)
|
|
1363
1367
|
|
|
1364
1368
|
Executes the function synchronously with a named parameters object.
|
|
1365
1369
|
|
|
@@ -1391,7 +1395,7 @@ Will throw an error if an array of parameters is passed to a function that expec
|
|
|
1391
1395
|
|
|
1392
1396
|
> **runWithPos**(...`params`): `Promise`\<`any`\>
|
|
1393
1397
|
|
|
1394
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:755](https://github.com/isdk/ai-tool.js/blob/
|
|
1398
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:755](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L755)
|
|
1395
1399
|
|
|
1396
1400
|
Executes the function asynchronously using positional arguments.
|
|
1397
1401
|
Delegates to `runWithPosSync()` internally.
|
|
@@ -1420,7 +1424,7 @@ A promise that resolves with the result of the function execution.
|
|
|
1420
1424
|
|
|
1421
1425
|
> **runWithPosAs**(`name`, ...`params`): `Promise`\<`any`\>
|
|
1422
1426
|
|
|
1423
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:766](https://github.com/isdk/ai-tool.js/blob/
|
|
1427
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:766](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L766)
|
|
1424
1428
|
|
|
1425
1429
|
Asynchronously executes another function by name using positional arguments.
|
|
1426
1430
|
Delegates to `runWithPosAsSync()` internally.
|
|
@@ -1455,7 +1459,7 @@ A promise that resolves with the result of the function execution.
|
|
|
1455
1459
|
|
|
1456
1460
|
> **runWithPosAsSync**(`name`, ...`params`): `any`
|
|
1457
1461
|
|
|
1458
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:745](https://github.com/isdk/ai-tool.js/blob/
|
|
1462
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:745](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L745)
|
|
1459
1463
|
|
|
1460
1464
|
Synchronously executes another function by name using positional arguments.
|
|
1461
1465
|
This is a convenience wrapper around the static `runWithPosSync()` method.
|
|
@@ -1490,7 +1494,7 @@ The result of the function execution.
|
|
|
1490
1494
|
|
|
1491
1495
|
> **runWithPosSync**(...`params`): `any`
|
|
1492
1496
|
|
|
1493
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:731](https://github.com/isdk/ai-tool.js/blob/
|
|
1497
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:731](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L731)
|
|
1494
1498
|
|
|
1495
1499
|
Executes the function synchronously using positional arguments.
|
|
1496
1500
|
If the function expects named parameters, it converts the arguments automatically.
|
|
@@ -1597,7 +1601,7 @@ Returns a string representation of an object.
|
|
|
1597
1601
|
|
|
1598
1602
|
> **unregister**(): `any`
|
|
1599
1603
|
|
|
1600
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:619](https://github.com/isdk/ai-tool.js/blob/
|
|
1604
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:619](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L619)
|
|
1601
1605
|
|
|
1602
1606
|
Removes the current `ToolFunc` instance from the static registry.
|
|
1603
1607
|
|
|
@@ -1991,7 +1995,7 @@ Object that contains the properties and methods. This can be an object that you
|
|
|
1991
1995
|
|
|
1992
1996
|
> `static` **fetch**(`name`, `objParam`?, ...`args`?): `Promise`\<`any`\>
|
|
1993
1997
|
|
|
1994
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:98](https://github.com/isdk/ai-tool.js/blob/
|
|
1998
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:98](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/client-tools.ts#L98)
|
|
1995
1999
|
|
|
1996
2000
|
#### Parameters
|
|
1997
2001
|
|
|
@@ -2163,7 +2167,7 @@ An iterable object that contains key-value entries for properties and methods.
|
|
|
2163
2167
|
|
|
2164
2168
|
> `static` **get**(`name`): [`ToolFunc`](ToolFunc.md)
|
|
2165
2169
|
|
|
2166
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:319](https://github.com/isdk/ai-tool.js/blob/
|
|
2170
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:319](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L319)
|
|
2167
2171
|
|
|
2168
2172
|
Retrieves a registered function by its name or alias.
|
|
2169
2173
|
|
|
@@ -2191,7 +2195,7 @@ The `ToolFunc` instance if found, otherwise `undefined`.
|
|
|
2191
2195
|
|
|
2192
2196
|
> `static` **getAllByTag**(`tagName`): [`ToolFunc`](ToolFunc.md)[]
|
|
2193
2197
|
|
|
2194
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:365](https://github.com/isdk/ai-tool.js/blob/
|
|
2198
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:365](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L365)
|
|
2195
2199
|
|
|
2196
2200
|
Retrieves all registered functions that have a specific tag.
|
|
2197
2201
|
|
|
@@ -2219,7 +2223,7 @@ An array of matching `ToolFunc` instances.
|
|
|
2219
2223
|
|
|
2220
2224
|
> `static` **getByTag**(`tagName`): `undefined` \| [`ToolFunc`](ToolFunc.md)
|
|
2221
2225
|
|
|
2222
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:340](https://github.com/isdk/ai-tool.js/blob/
|
|
2226
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:340](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L340)
|
|
2223
2227
|
|
|
2224
2228
|
Finds the first registered function that has a specific tag.
|
|
2225
2229
|
|
|
@@ -2247,7 +2251,7 @@ The first matching `ToolFunc` instance, or `undefined` if none is found.
|
|
|
2247
2251
|
|
|
2248
2252
|
> `static` **getFunc**(`name`): `any`
|
|
2249
2253
|
|
|
2250
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:431](https://github.com/isdk/ai-tool.js/blob/
|
|
2254
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:431](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L431)
|
|
2251
2255
|
|
|
2252
2256
|
Retrieves a bound, runnable function reference for a registered function.
|
|
2253
2257
|
This reference is suitable for execution with an object of named parameters.
|
|
@@ -2276,7 +2280,7 @@ A bound function reference, or `undefined` if not found.
|
|
|
2276
2280
|
|
|
2277
2281
|
> `static` **getFuncWithPos**(`name`): `any`
|
|
2278
2282
|
|
|
2279
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:472](https://github.com/isdk/ai-tool.js/blob/
|
|
2283
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:472](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L472)
|
|
2280
2284
|
|
|
2281
2285
|
Retrieves a bound, runnable function reference for a registered function.
|
|
2282
2286
|
This reference is suitable for execution with positional arguments.
|
|
@@ -2465,7 +2469,7 @@ The object that references the prototype.
|
|
|
2465
2469
|
|
|
2466
2470
|
> `static` **hasAsyncFeature**(`feature`): `boolean`
|
|
2467
2471
|
|
|
2468
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:388](https://github.com/isdk/ai-tool.js/blob/
|
|
2472
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:388](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L388)
|
|
2469
2473
|
|
|
2470
2474
|
Checks if any registered function has a specific asynchronous feature.
|
|
2471
2475
|
|
|
@@ -2685,7 +2689,7 @@ Object that contains the properties and methods. This can be an object that you
|
|
|
2685
2689
|
|
|
2686
2690
|
> `static` **list**(): [`Funcs`](../interfaces/Funcs.md)
|
|
2687
2691
|
|
|
2688
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:331](https://github.com/isdk/ai-tool.js/blob/
|
|
2692
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:331](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L331)
|
|
2689
2693
|
|
|
2690
2694
|
Returns the complete map of all registered functions.
|
|
2691
2695
|
|
|
@@ -2705,7 +2709,7 @@ The map of `ToolFunc` instances.
|
|
|
2705
2709
|
|
|
2706
2710
|
> `static` **loadFrom**(`items`?): `Promise`\<[`Funcs`](../interfaces/Funcs.md)\>
|
|
2707
2711
|
|
|
2708
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:68](https://github.com/isdk/ai-tool.js/blob/
|
|
2712
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:68](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/client-tools.ts#L68)
|
|
2709
2713
|
|
|
2710
2714
|
Loads tool definitions from the remote server via the configured transport.
|
|
2711
2715
|
This method populates the local `ToolFunc` registry with `ClientTools` stubs.
|
|
@@ -2726,7 +2730,7 @@ This method populates the local `ToolFunc` registry with `ClientTools` stubs.
|
|
|
2726
2730
|
|
|
2727
2731
|
> `static` **loadFromSync**(`items`): `void`
|
|
2728
2732
|
|
|
2729
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:84](https://github.com/isdk/ai-tool.js/blob/
|
|
2733
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:84](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/client-tools.ts#L84)
|
|
2730
2734
|
|
|
2731
2735
|
Synchronously loads tool definitions from a provided object, registering
|
|
2732
2736
|
each one as a `ClientTools` instance.
|
|
@@ -2781,7 +2785,7 @@ Object to make non-extensible.
|
|
|
2781
2785
|
|
|
2782
2786
|
> `static` **register**(`name`, `options`): `boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2783
2787
|
|
|
2784
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:495](https://github.com/isdk/ai-tool.js/blob/
|
|
2788
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:495](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L495)
|
|
2785
2789
|
|
|
2786
2790
|
Registers a new tool function.
|
|
2787
2791
|
|
|
@@ -2817,7 +2821,7 @@ The new `ToolFunc` instance, or `false` if a function with that name already exi
|
|
|
2817
2821
|
|
|
2818
2822
|
> `static` **register**(`func`, `options`): `boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2819
2823
|
|
|
2820
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:496](https://github.com/isdk/ai-tool.js/blob/
|
|
2824
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:496](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L496)
|
|
2821
2825
|
|
|
2822
2826
|
Registers a new tool function.
|
|
2823
2827
|
|
|
@@ -2853,7 +2857,7 @@ The new `ToolFunc` instance, or `false` if a function with that name already exi
|
|
|
2853
2857
|
|
|
2854
2858
|
> `static` **register**(`name`, `options`?): `boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2855
2859
|
|
|
2856
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:497](https://github.com/isdk/ai-tool.js/blob/
|
|
2860
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:497](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L497)
|
|
2857
2861
|
|
|
2858
2862
|
Registers a new tool function.
|
|
2859
2863
|
|
|
@@ -2891,7 +2895,7 @@ The new `ToolFunc` instance, or `false` if a function with that name already exi
|
|
|
2891
2895
|
|
|
2892
2896
|
> `static` **run**(`name`, `params`?): `Promise`\<`any`\>
|
|
2893
2897
|
|
|
2894
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:402](https://github.com/isdk/ai-tool.js/blob/
|
|
2898
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:402](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L402)
|
|
2895
2899
|
|
|
2896
2900
|
Asynchronously executes a registered function by name with named parameters.
|
|
2897
2901
|
|
|
@@ -2929,7 +2933,7 @@ If the function with the given name is not found.
|
|
|
2929
2933
|
|
|
2930
2934
|
> `static` **runSync**(`name`, `params`?): `any`
|
|
2931
2935
|
|
|
2932
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:417](https://github.com/isdk/ai-tool.js/blob/
|
|
2936
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:417](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L417)
|
|
2933
2937
|
|
|
2934
2938
|
Synchronously executes a registered function by name with named parameters.
|
|
2935
2939
|
|
|
@@ -2967,7 +2971,7 @@ If the function with the given name is not found.
|
|
|
2967
2971
|
|
|
2968
2972
|
> `static` **runWithPos**(`name`, ...`params`): `Promise`\<`any`\>
|
|
2969
2973
|
|
|
2970
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:443](https://github.com/isdk/ai-tool.js/blob/
|
|
2974
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:443](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L443)
|
|
2971
2975
|
|
|
2972
2976
|
Asynchronously executes a function using positional arguments.
|
|
2973
2977
|
|
|
@@ -3005,7 +3009,7 @@ If the function with the given name is not found.
|
|
|
3005
3009
|
|
|
3006
3010
|
> `static` **runWithPosSync**(`name`, ...`params`): `any`
|
|
3007
3011
|
|
|
3008
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:458](https://github.com/isdk/ai-tool.js/blob/
|
|
3012
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:458](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L458)
|
|
3009
3013
|
|
|
3010
3014
|
Synchronously executes a function using positional arguments.
|
|
3011
3015
|
|
|
@@ -3105,7 +3109,7 @@ The value of the new prototype or null.
|
|
|
3105
3109
|
|
|
3106
3110
|
> `static` **setTransport**(`transport`): `void`
|
|
3107
3111
|
|
|
3108
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:50](https://github.com/isdk/ai-tool.js/blob/
|
|
3112
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:50](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/client-tools.ts#L50)
|
|
3109
3113
|
|
|
3110
3114
|
Injects the client-side transport implementation. This is a crucial step
|
|
3111
3115
|
to enable communication with the server.
|
|
@@ -3128,7 +3132,7 @@ The transport instance to use for all client-server communication.
|
|
|
3128
3132
|
|
|
3129
3133
|
> `static` **unregister**(`name`): `undefined` \| [`ToolFunc`](ToolFunc.md)
|
|
3130
3134
|
|
|
3131
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:547](https://github.com/isdk/ai-tool.js/blob/
|
|
3135
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:547](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L547)
|
|
3132
3136
|
|
|
3133
3137
|
Unregisters a function by its name, also removing any associated aliases.
|
|
3134
3138
|
|