@isdk/ai-tool 0.8.0 → 0.8.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/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 +61 -61
- package/docs/api/classes/EventClient.md +88 -88
- package/docs/api/classes/EventServer.md +83 -83
- 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 +15 -15
- 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 +68 -68
- package/docs/api/classes/ResServerTools.md +69 -69
- package/docs/api/classes/RpcMethodsClientTool.md +63 -63
- package/docs/api/classes/RpcMethodsServerTool.md +64 -64
- package/docs/api/classes/SSEChannel.md +19 -19
- package/docs/api/classes/Semaphore.md +26 -26
- package/docs/api/classes/ServerToolTransport.md +13 -13
- package/docs/api/classes/ServerTools.md +57 -57
- package/docs/api/classes/SignalGate.md +9 -9
- package/docs/api/classes/SseClientPubSubTransport.md +4 -4
- package/docs/api/classes/SseServerPubSubTransport.md +10 -10
- 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/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/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/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/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 +7 -7
- 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 +4 -4
- package/docs/api/interfaces/IPubSubServerTransport.md +11 -11
- 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/PubSubClientStream.md +10 -10
- 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 +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 +5 -5
- package/docs/api/interfaces/ServerFuncItem.md +18 -18
- package/docs/api/interfaces/ServerFuncParams.md +3 -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 +6 -6
- package/docs/api/type-aliases/RpcMethodHandler.md +1 -1
- package/docs/api/type-aliases/SSEClient.md +5 -5
- package/docs/api/type-aliases/SemaphoreIsReadyFuncType.md +1 -1
- package/docs/api/type-aliases/TFunc.md +1 -1
- package/docs/api/type-aliases/UUIDVersions.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/ClientEventPrefix.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 +1 -1
- package/docs/api/variables/RpcMethodsServerToolSchema.md +1 -1
- 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/backendEventable.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/docs/api/variables/makeToolFuncCancelable.md +1 -1
- package/docs/api/variables/wait.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:10](https://github.com/isdk/ai-tool.js/blob/
|
|
9
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:10](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/client-tools.ts#L10)
|
|
10
10
|
|
|
11
11
|
Represents a client-side proxy for a remote tool function.
|
|
12
12
|
|
|
@@ -35,7 +35,7 @@ These tools are typically created dynamically by loading definitions from a serv
|
|
|
35
35
|
|
|
36
36
|
> **new ClientTools**(`name`, `options?`): `ClientTools`
|
|
37
37
|
|
|
38
|
-
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/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L571)
|
|
39
39
|
|
|
40
40
|
Initializes a new `ToolFunc` instance.
|
|
41
41
|
|
|
@@ -79,7 +79,7 @@ Defined in: [property-manager.js/src/advance.d.ts:5](https://github.com/snowyu/p
|
|
|
79
79
|
|
|
80
80
|
> `optional` **action**: `"get"` \| `"post"` \| `"put"` \| `"delete"` \| `"patch"` \| `"list"` \| `"res"`
|
|
81
81
|
|
|
82
|
-
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/fb1809b53cc75a30928176c26910792b6b8a96e1/src/utils/consts.ts#L95)
|
|
83
83
|
|
|
84
84
|
The action to be used for the remote call. This typically represents an RPC method name.
|
|
85
85
|
Only for RESTful HTTP transports, it might be mapped to a standard HTTP method (e.g., GET, POST)
|
|
@@ -94,7 +94,7 @@ Only for RESTful HTTP transports, it might be mapped to a standard HTTP method (
|
|
|
94
94
|
|
|
95
95
|
> `optional` **alias**: `string` \| `string`[]
|
|
96
96
|
|
|
97
|
-
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/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L130)
|
|
98
98
|
|
|
99
99
|
Optional aliases for the function name.
|
|
100
100
|
|
|
@@ -108,7 +108,7 @@ Optional aliases for the function name.
|
|
|
108
108
|
|
|
109
109
|
> `optional` **asyncFeatures**: `number`
|
|
110
110
|
|
|
111
|
-
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/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L144)
|
|
112
112
|
|
|
113
113
|
A bitmask representing asynchronous features supported by the function, built from `AsyncFeatureBits`.
|
|
114
114
|
This allows the system to understand if a function supports capabilities like cancellation or multi-tasking.
|
|
@@ -170,7 +170,7 @@ The default options for export and assign
|
|
|
170
170
|
|
|
171
171
|
> `optional` **depends**: `object`
|
|
172
172
|
|
|
173
|
-
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/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L167)
|
|
174
174
|
|
|
175
175
|
A map of dependencies this function has on other tool functions.
|
|
176
176
|
Declaring dependencies ensures that they are automatically registered when this function is registered.
|
|
@@ -209,7 +209,7 @@ mainFunc.register();
|
|
|
209
209
|
|
|
210
210
|
> `optional` **description**: `string`
|
|
211
211
|
|
|
212
|
-
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/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L172)
|
|
213
213
|
|
|
214
214
|
A detailed description of what the function does.
|
|
215
215
|
|
|
@@ -223,7 +223,7 @@ A detailed description of what the function does.
|
|
|
223
223
|
|
|
224
224
|
> `optional` **fetchOptions**: `any`
|
|
225
225
|
|
|
226
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/consts.ts:100](https://github.com/isdk/ai-tool.js/blob/
|
|
226
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/consts.ts:100](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/utils/consts.ts#L100)
|
|
227
227
|
|
|
228
228
|
Addtional options to be passed to the underlying `fetch` call in a transport.
|
|
229
229
|
|
|
@@ -237,7 +237,7 @@ Addtional options to be passed to the underlying `fetch` call in a transport.
|
|
|
237
237
|
|
|
238
238
|
> `optional` **isApi**: `boolean`
|
|
239
239
|
|
|
240
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:119](https://github.com/isdk/ai-tool.js/blob/
|
|
240
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:119](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L119)
|
|
241
241
|
|
|
242
242
|
If true, indicates that this function should be treated as a server-side API.
|
|
243
243
|
|
|
@@ -251,7 +251,7 @@ If true, indicates that this function should be treated as a server-side API.
|
|
|
251
251
|
|
|
252
252
|
> `optional` **name**: `string`
|
|
253
253
|
|
|
254
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:76](https://github.com/isdk/ai-tool.js/blob/
|
|
254
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:76](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L76)
|
|
255
255
|
|
|
256
256
|
The unique name of the function.
|
|
257
257
|
|
|
@@ -279,7 +279,7 @@ the property with the default prefix '$' will not be exported.
|
|
|
279
279
|
|
|
280
280
|
> `optional` **params**: [`FuncParams`](../interfaces/FuncParams.md) \| [`FuncParam`](../interfaces/FuncParam.md)[]
|
|
281
281
|
|
|
282
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:81](https://github.com/isdk/ai-tool.js/blob/
|
|
282
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:81](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L81)
|
|
283
283
|
|
|
284
284
|
Parameter definitions, which can be an object mapping names to definitions or an array for positional parameters.
|
|
285
285
|
|
|
@@ -293,7 +293,7 @@ Parameter definitions, which can be an object mapping names to definitions or an
|
|
|
293
293
|
|
|
294
294
|
> `optional` **result**: `string` \| `Record`\<`string`, `any`\>
|
|
295
295
|
|
|
296
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:86](https://github.com/isdk/ai-tool.js/blob/
|
|
296
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:86](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L86)
|
|
297
297
|
|
|
298
298
|
The expected return type of the function, described as a string or a JSON schema object.
|
|
299
299
|
|
|
@@ -307,7 +307,7 @@ The expected return type of the function, described as a string or a JSON schema
|
|
|
307
307
|
|
|
308
308
|
> `optional` **scope**: `any`
|
|
309
309
|
|
|
310
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:91](https://github.com/isdk/ai-tool.js/blob/
|
|
310
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:91](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L91)
|
|
311
311
|
|
|
312
312
|
The execution scope or context (`this`) for the function.
|
|
313
313
|
|
|
@@ -321,7 +321,7 @@ The execution scope or context (`this`) for the function.
|
|
|
321
321
|
|
|
322
322
|
> `optional` **setup**: (`this`, `options?`) => `void`
|
|
323
323
|
|
|
324
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:114](https://github.com/isdk/ai-tool.js/blob/
|
|
324
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:114](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L114)
|
|
325
325
|
|
|
326
326
|
A lifecycle hook called once during the `ToolFunc` instance's initialization.
|
|
327
327
|
It allows for initial setup, state configuration, or property modification on the instance
|
|
@@ -367,7 +367,7 @@ console.log(myFunc.customState); // Outputs: 'configured'
|
|
|
367
367
|
|
|
368
368
|
> `optional` **stream**: `boolean`
|
|
369
369
|
|
|
370
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:125](https://github.com/isdk/ai-tool.js/blob/
|
|
370
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:125](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L125)
|
|
371
371
|
|
|
372
372
|
If true, indicates that the function has the *capability* to stream its output.
|
|
373
373
|
Whether a specific call is streamed is determined by a `stream` property in the runtime parameters.
|
|
@@ -382,7 +382,7 @@ Whether a specific call is streamed is determined by a `stream` property in the
|
|
|
382
382
|
|
|
383
383
|
> `optional` **tags**: `string` \| `string`[]
|
|
384
384
|
|
|
385
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:96](https://github.com/isdk/ai-tool.js/blob/
|
|
385
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:96](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L96)
|
|
386
386
|
|
|
387
387
|
Tags for grouping or filtering functions.
|
|
388
388
|
|
|
@@ -396,7 +396,7 @@ Tags for grouping or filtering functions.
|
|
|
396
396
|
|
|
397
397
|
> `optional` **title**: `string`
|
|
398
398
|
|
|
399
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:177](https://github.com/isdk/ai-tool.js/blob/
|
|
399
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:177](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L177)
|
|
400
400
|
|
|
401
401
|
A concise, human-readable title for the function, often used in UI or by AI.
|
|
402
402
|
|
|
@@ -410,7 +410,7 @@ A concise, human-readable title for the function, often used in UI or by AI.
|
|
|
410
410
|
|
|
411
411
|
> `static` `optional` **action**: `string`
|
|
412
412
|
|
|
413
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:33](https://github.com/isdk/ai-tool.js/blob/
|
|
413
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:33](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/client-tools.ts#L33)
|
|
414
414
|
|
|
415
415
|
#### Inherited from
|
|
416
416
|
|
|
@@ -422,7 +422,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:33](https://git
|
|
|
422
422
|
|
|
423
423
|
> `static` **aliases**: `object` = `{}`
|
|
424
424
|
|
|
425
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:305](https://github.com/isdk/ai-tool.js/blob/
|
|
425
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:305](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L305)
|
|
426
426
|
|
|
427
427
|
A static map of aliases to their corresponding function names.
|
|
428
428
|
|
|
@@ -440,7 +440,7 @@ A static map of aliases to their corresponding function names.
|
|
|
440
440
|
|
|
441
441
|
> `static` **dataPath**: `string`
|
|
442
442
|
|
|
443
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:312](https://github.com/isdk/ai-tool.js/blob/
|
|
443
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:312](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L312)
|
|
444
444
|
|
|
445
445
|
A conventional property to designate a file path for saving the registered `ToolFunc` data.
|
|
446
446
|
Note: The `ToolFunc` class itself does not implement persistence logic. It is up to the
|
|
@@ -456,7 +456,7 @@ developer to use this path to save and load the `ToolFunc.items` registry if nee
|
|
|
456
456
|
|
|
457
457
|
> `static` **items**: [`Funcs`](../interfaces/Funcs.md) = `{}`
|
|
458
458
|
|
|
459
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:300](https://github.com/isdk/ai-tool.js/blob/
|
|
459
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:300](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L300)
|
|
460
460
|
|
|
461
461
|
A static registry of all `ToolFunc` instances, indexed by name.
|
|
462
462
|
|
|
@@ -472,7 +472,7 @@ A static registry of all `ToolFunc` instances, indexed by name.
|
|
|
472
472
|
|
|
473
473
|
> **get** **apiRoot**(): `string`
|
|
474
474
|
|
|
475
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:110](https://github.com/isdk/ai-tool.js/blob/
|
|
475
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:110](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/client-tools.ts#L110)
|
|
476
476
|
|
|
477
477
|
Gets the root URL for API endpoints from the configured transport.
|
|
478
478
|
This is used as the base for constructing request URLs.
|
|
@@ -499,7 +499,7 @@ Use `transport` instead.
|
|
|
499
499
|
|
|
500
500
|
> **get** `static` **apiRoot**(): `string`
|
|
501
501
|
|
|
502
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:41](https://github.com/isdk/ai-tool.js/blob/
|
|
502
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:41](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/client-tools.ts#L41)
|
|
503
503
|
|
|
504
504
|
Gets the root URL for API endpoints from the configured transport.
|
|
505
505
|
This is used as the base for constructing request URLs.
|
|
@@ -520,7 +520,7 @@ This is used as the base for constructing request URLs.
|
|
|
520
520
|
|
|
521
521
|
> **get** `static` **transport**(): [`IClientToolTransport`](../interfaces/IClientToolTransport.md)
|
|
522
522
|
|
|
523
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:61](https://github.com/isdk/ai-tool.js/blob/
|
|
523
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:61](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/client-tools.ts#L61)
|
|
524
524
|
|
|
525
525
|
##### Returns
|
|
526
526
|
|
|
@@ -532,7 +532,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:61](https://git
|
|
|
532
532
|
|
|
533
533
|
> **arr2ObjParams**(`params`): `any`[]
|
|
534
534
|
|
|
535
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:629](https://github.com/isdk/ai-tool.js/blob/
|
|
535
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:629](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L629)
|
|
536
536
|
|
|
537
537
|
Converts an array of positional arguments into a named parameters object.
|
|
538
538
|
This is used internally to support functions defined with named parameters.
|
|
@@ -843,7 +843,7 @@ the dest object.
|
|
|
843
843
|
|
|
844
844
|
> **fetch**(`objParam?`, `act?`, `subName?`, `fetchOptions?`): `Promise`\<`any`\>
|
|
845
845
|
|
|
846
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:115](https://github.com/isdk/ai-tool.js/blob/
|
|
846
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:115](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/client-tools.ts#L115)
|
|
847
847
|
|
|
848
848
|
#### Parameters
|
|
849
849
|
|
|
@@ -873,7 +873,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:115](https://gi
|
|
|
873
873
|
|
|
874
874
|
> **func**(`objParam`): `Promise`\<`any`\>
|
|
875
875
|
|
|
876
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:134](https://github.com/isdk/ai-tool.js/blob/
|
|
876
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:134](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/client-tools.ts#L134)
|
|
877
877
|
|
|
878
878
|
The core implementation for a client-side tool. When a `ClientTools` instance
|
|
879
879
|
is "run", this `func` method is executed. It delegates the call to the
|
|
@@ -903,7 +903,7 @@ The result from the remote tool.
|
|
|
903
903
|
|
|
904
904
|
> **getFunc**(`name?`): `any`
|
|
905
905
|
|
|
906
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:720](https://github.com/isdk/ai-tool.js/blob/
|
|
906
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:720](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L720)
|
|
907
907
|
|
|
908
908
|
Gets a bound function reference for execution with named parameters.
|
|
909
909
|
If a name is provided, it retrieves a different function from the registry.
|
|
@@ -933,7 +933,7 @@ A function reference or `undefined` if not found.
|
|
|
933
933
|
|
|
934
934
|
> **getFuncWithPos**(`name?`): `any`
|
|
935
935
|
|
|
936
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:777](https://github.com/isdk/ai-tool.js/blob/
|
|
936
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:777](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L777)
|
|
937
937
|
|
|
938
938
|
Gets a bound function reference suitable for positional argument execution.
|
|
939
939
|
If a name is provided, it retrieves a different function from the registry.
|
|
@@ -983,7 +983,7 @@ the descriptors of properties object
|
|
|
983
983
|
|
|
984
984
|
> **hasAsyncFeature**(`feature`): `boolean`
|
|
985
985
|
|
|
986
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:787](https://github.com/isdk/ai-tool.js/blob/
|
|
986
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:787](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L787)
|
|
987
987
|
|
|
988
988
|
Checks if the current function instance supports a specific async feature.
|
|
989
989
|
|
|
@@ -1119,7 +1119,7 @@ The source object
|
|
|
1119
1119
|
|
|
1120
1120
|
> **isStream**(`params`): `undefined` \| `boolean`
|
|
1121
1121
|
|
|
1122
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:805](https://github.com/isdk/ai-tool.js/blob/
|
|
1122
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:805](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L805)
|
|
1123
1123
|
|
|
1124
1124
|
Determines if a function call should produce a stream.
|
|
1125
1125
|
|
|
@@ -1185,7 +1185,7 @@ the dest object.
|
|
|
1185
1185
|
|
|
1186
1186
|
> **obj2ArrParams**(`params?`): `any`[]
|
|
1187
1187
|
|
|
1188
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:648](https://github.com/isdk/ai-tool.js/blob/
|
|
1188
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:648](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L648)
|
|
1189
1189
|
|
|
1190
1190
|
Converts a named parameters object into an array of positional arguments.
|
|
1191
1191
|
This is used for functions defined with positional parameters.
|
|
@@ -1240,7 +1240,7 @@ A property name.
|
|
|
1240
1240
|
|
|
1241
1241
|
> **register**(): `boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
1242
1242
|
|
|
1243
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:602](https://github.com/isdk/ai-tool.js/blob/
|
|
1243
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:602](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L602)
|
|
1244
1244
|
|
|
1245
1245
|
Registers the current `ToolFunc` instance into the static registry.
|
|
1246
1246
|
Also registers any declared dependencies.
|
|
@@ -1261,7 +1261,7 @@ The instance itself upon successful registration, or `false` if it already exist
|
|
|
1261
1261
|
|
|
1262
1262
|
> **run**(`params?`): `Promise`\<`any`\>
|
|
1263
1263
|
|
|
1264
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:686](https://github.com/isdk/ai-tool.js/blob/
|
|
1264
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:686](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L686)
|
|
1265
1265
|
|
|
1266
1266
|
Executes the function asynchronously with a named parameters object.
|
|
1267
1267
|
|
|
@@ -1289,7 +1289,7 @@ A promise that resolves with the function's result.
|
|
|
1289
1289
|
|
|
1290
1290
|
> **runAs**(`name`, `params?`): `Promise`\<`any`\>
|
|
1291
1291
|
|
|
1292
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:697](https://github.com/isdk/ai-tool.js/blob/
|
|
1292
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:697](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L697)
|
|
1293
1293
|
|
|
1294
1294
|
Asynchronously executes another registered function by name.
|
|
1295
1295
|
This method delegates to `runAsSync()` internally.
|
|
@@ -1324,7 +1324,7 @@ A promise that resolves with the result of the function execution.
|
|
|
1324
1324
|
|
|
1325
1325
|
> **runAsSync**(`name`, `params?`): `any`
|
|
1326
1326
|
|
|
1327
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:708](https://github.com/isdk/ai-tool.js/blob/
|
|
1327
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:708](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L708)
|
|
1328
1328
|
|
|
1329
1329
|
Synchronously executes another registered function by name.
|
|
1330
1330
|
This is a convenience method that forwards the call to the static `runSync()` method.
|
|
@@ -1359,7 +1359,7 @@ The result of the function execution.
|
|
|
1359
1359
|
|
|
1360
1360
|
> **runSync**(`params?`): `any`
|
|
1361
1361
|
|
|
1362
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:667](https://github.com/isdk/ai-tool.js/blob/
|
|
1362
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:667](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L667)
|
|
1363
1363
|
|
|
1364
1364
|
Executes the function synchronously with a named parameters object.
|
|
1365
1365
|
|
|
@@ -1391,7 +1391,7 @@ Will throw an error if an array of parameters is passed to a function that expec
|
|
|
1391
1391
|
|
|
1392
1392
|
> **runWithPos**(...`params`): `Promise`\<`any`\>
|
|
1393
1393
|
|
|
1394
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:755](https://github.com/isdk/ai-tool.js/blob/
|
|
1394
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:755](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L755)
|
|
1395
1395
|
|
|
1396
1396
|
Executes the function asynchronously using positional arguments.
|
|
1397
1397
|
Delegates to `runWithPosSync()` internally.
|
|
@@ -1420,7 +1420,7 @@ A promise that resolves with the result of the function execution.
|
|
|
1420
1420
|
|
|
1421
1421
|
> **runWithPosAs**(`name`, ...`params`): `Promise`\<`any`\>
|
|
1422
1422
|
|
|
1423
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:766](https://github.com/isdk/ai-tool.js/blob/
|
|
1423
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:766](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L766)
|
|
1424
1424
|
|
|
1425
1425
|
Asynchronously executes another function by name using positional arguments.
|
|
1426
1426
|
Delegates to `runWithPosAsSync()` internally.
|
|
@@ -1455,7 +1455,7 @@ A promise that resolves with the result of the function execution.
|
|
|
1455
1455
|
|
|
1456
1456
|
> **runWithPosAsSync**(`name`, ...`params`): `any`
|
|
1457
1457
|
|
|
1458
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:745](https://github.com/isdk/ai-tool.js/blob/
|
|
1458
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:745](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L745)
|
|
1459
1459
|
|
|
1460
1460
|
Synchronously executes another function by name using positional arguments.
|
|
1461
1461
|
This is a convenience wrapper around the static `runWithPosSync()` method.
|
|
@@ -1490,7 +1490,7 @@ The result of the function execution.
|
|
|
1490
1490
|
|
|
1491
1491
|
> **runWithPosSync**(...`params`): `any`
|
|
1492
1492
|
|
|
1493
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:731](https://github.com/isdk/ai-tool.js/blob/
|
|
1493
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:731](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L731)
|
|
1494
1494
|
|
|
1495
1495
|
Executes the function synchronously using positional arguments.
|
|
1496
1496
|
If the function expects named parameters, it converts the arguments automatically.
|
|
@@ -1597,7 +1597,7 @@ Returns a string representation of an object.
|
|
|
1597
1597
|
|
|
1598
1598
|
> **unregister**(): `any`
|
|
1599
1599
|
|
|
1600
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:619](https://github.com/isdk/ai-tool.js/blob/
|
|
1600
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:619](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L619)
|
|
1601
1601
|
|
|
1602
1602
|
Removes the current `ToolFunc` instance from the static registry.
|
|
1603
1603
|
|
|
@@ -2013,7 +2013,7 @@ Object that contains the properties and methods. This can be an object that you
|
|
|
2013
2013
|
|
|
2014
2014
|
> `static` **fetch**(`name`, `objParam?`, ...`args?`): `Promise`\<`any`\>
|
|
2015
2015
|
|
|
2016
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:99](https://github.com/isdk/ai-tool.js/blob/
|
|
2016
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:99](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/client-tools.ts#L99)
|
|
2017
2017
|
|
|
2018
2018
|
#### Parameters
|
|
2019
2019
|
|
|
@@ -2195,7 +2195,7 @@ An iterable object that contains key-value entries for properties and methods.
|
|
|
2195
2195
|
|
|
2196
2196
|
> `static` **get**(`name`): [`ToolFunc`](ToolFunc.md)
|
|
2197
2197
|
|
|
2198
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:319](https://github.com/isdk/ai-tool.js/blob/
|
|
2198
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:319](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L319)
|
|
2199
2199
|
|
|
2200
2200
|
Retrieves a registered function by its name or alias.
|
|
2201
2201
|
|
|
@@ -2223,7 +2223,7 @@ The `ToolFunc` instance if found, otherwise `undefined`.
|
|
|
2223
2223
|
|
|
2224
2224
|
> `static` **getAllByTag**(`tagName`): [`ToolFunc`](ToolFunc.md)[]
|
|
2225
2225
|
|
|
2226
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:365](https://github.com/isdk/ai-tool.js/blob/
|
|
2226
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:365](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L365)
|
|
2227
2227
|
|
|
2228
2228
|
Retrieves all registered functions that have a specific tag.
|
|
2229
2229
|
|
|
@@ -2251,7 +2251,7 @@ An array of matching `ToolFunc` instances.
|
|
|
2251
2251
|
|
|
2252
2252
|
> `static` **getByTag**(`tagName`): `undefined` \| [`ToolFunc`](ToolFunc.md)
|
|
2253
2253
|
|
|
2254
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:340](https://github.com/isdk/ai-tool.js/blob/
|
|
2254
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:340](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L340)
|
|
2255
2255
|
|
|
2256
2256
|
Finds the first registered function that has a specific tag.
|
|
2257
2257
|
|
|
@@ -2279,7 +2279,7 @@ The first matching `ToolFunc` instance, or `undefined` if none is found.
|
|
|
2279
2279
|
|
|
2280
2280
|
> `static` **getFunc**(`name`): `any`
|
|
2281
2281
|
|
|
2282
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:431](https://github.com/isdk/ai-tool.js/blob/
|
|
2282
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:431](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L431)
|
|
2283
2283
|
|
|
2284
2284
|
Retrieves a bound, runnable function reference for a registered function.
|
|
2285
2285
|
This reference is suitable for execution with an object of named parameters.
|
|
@@ -2308,7 +2308,7 @@ A bound function reference, or `undefined` if not found.
|
|
|
2308
2308
|
|
|
2309
2309
|
> `static` **getFuncWithPos**(`name`): `any`
|
|
2310
2310
|
|
|
2311
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:472](https://github.com/isdk/ai-tool.js/blob/
|
|
2311
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:472](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L472)
|
|
2312
2312
|
|
|
2313
2313
|
Retrieves a bound, runnable function reference for a registered function.
|
|
2314
2314
|
This reference is suitable for execution with positional arguments.
|
|
@@ -2499,7 +2499,7 @@ The object that references the prototype.
|
|
|
2499
2499
|
|
|
2500
2500
|
> `static` **hasAsyncFeature**(`feature`): `boolean`
|
|
2501
2501
|
|
|
2502
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:388](https://github.com/isdk/ai-tool.js/blob/
|
|
2502
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:388](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L388)
|
|
2503
2503
|
|
|
2504
2504
|
Checks if any registered function has a specific asynchronous feature.
|
|
2505
2505
|
|
|
@@ -2719,7 +2719,7 @@ Object that contains the properties and methods. This can be an object that you
|
|
|
2719
2719
|
|
|
2720
2720
|
> `static` **list**(): [`Funcs`](../interfaces/Funcs.md)
|
|
2721
2721
|
|
|
2722
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:331](https://github.com/isdk/ai-tool.js/blob/
|
|
2722
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:331](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L331)
|
|
2723
2723
|
|
|
2724
2724
|
Returns the complete map of all registered functions.
|
|
2725
2725
|
|
|
@@ -2739,7 +2739,7 @@ The map of `ToolFunc` instances.
|
|
|
2739
2739
|
|
|
2740
2740
|
> `static` **loadFrom**(`items?`): `Promise`\<[`Funcs`](../interfaces/Funcs.md)\>
|
|
2741
2741
|
|
|
2742
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:69](https://github.com/isdk/ai-tool.js/blob/
|
|
2742
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:69](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/client-tools.ts#L69)
|
|
2743
2743
|
|
|
2744
2744
|
Loads tool definitions from the remote server via the configured transport.
|
|
2745
2745
|
This method populates the local `ToolFunc` registry with `ClientTools` stubs.
|
|
@@ -2760,7 +2760,7 @@ This method populates the local `ToolFunc` registry with `ClientTools` stubs.
|
|
|
2760
2760
|
|
|
2761
2761
|
> `static` **loadFromSync**(`items`): `void`
|
|
2762
2762
|
|
|
2763
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:85](https://github.com/isdk/ai-tool.js/blob/
|
|
2763
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:85](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/client-tools.ts#L85)
|
|
2764
2764
|
|
|
2765
2765
|
Synchronously loads tool definitions from a provided object, registering
|
|
2766
2766
|
each one as a `ClientTools` instance.
|
|
@@ -2817,7 +2817,7 @@ Object to make non-extensible.
|
|
|
2817
2817
|
|
|
2818
2818
|
> `static` **register**(`name`, `options`): `boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2819
2819
|
|
|
2820
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:495](https://github.com/isdk/ai-tool.js/blob/
|
|
2820
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:495](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L495)
|
|
2821
2821
|
|
|
2822
2822
|
Registers a new tool function.
|
|
2823
2823
|
|
|
@@ -2849,7 +2849,7 @@ The new `ToolFunc` instance, or `false` if a function with that name already exi
|
|
|
2849
2849
|
|
|
2850
2850
|
> `static` **register**(`func`, `options`): `boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2851
2851
|
|
|
2852
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:496](https://github.com/isdk/ai-tool.js/blob/
|
|
2852
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:496](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L496)
|
|
2853
2853
|
|
|
2854
2854
|
Registers a new tool function.
|
|
2855
2855
|
|
|
@@ -2881,7 +2881,7 @@ The new `ToolFunc` instance, or `false` if a function with that name already exi
|
|
|
2881
2881
|
|
|
2882
2882
|
> `static` **register**(`name`, `options?`): `boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2883
2883
|
|
|
2884
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:497](https://github.com/isdk/ai-tool.js/blob/
|
|
2884
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:497](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L497)
|
|
2885
2885
|
|
|
2886
2886
|
Registers a new tool function.
|
|
2887
2887
|
|
|
@@ -2915,7 +2915,7 @@ The new `ToolFunc` instance, or `false` if a function with that name already exi
|
|
|
2915
2915
|
|
|
2916
2916
|
> `static` **run**(`name`, `params?`): `Promise`\<`any`\>
|
|
2917
2917
|
|
|
2918
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:402](https://github.com/isdk/ai-tool.js/blob/
|
|
2918
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:402](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L402)
|
|
2919
2919
|
|
|
2920
2920
|
Asynchronously executes a registered function by name with named parameters.
|
|
2921
2921
|
|
|
@@ -2953,7 +2953,7 @@ If the function with the given name is not found.
|
|
|
2953
2953
|
|
|
2954
2954
|
> `static` **runSync**(`name`, `params?`): `any`
|
|
2955
2955
|
|
|
2956
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:417](https://github.com/isdk/ai-tool.js/blob/
|
|
2956
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:417](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L417)
|
|
2957
2957
|
|
|
2958
2958
|
Synchronously executes a registered function by name with named parameters.
|
|
2959
2959
|
|
|
@@ -2991,7 +2991,7 @@ If the function with the given name is not found.
|
|
|
2991
2991
|
|
|
2992
2992
|
> `static` **runWithPos**(`name`, ...`params`): `Promise`\<`any`\>
|
|
2993
2993
|
|
|
2994
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:443](https://github.com/isdk/ai-tool.js/blob/
|
|
2994
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:443](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L443)
|
|
2995
2995
|
|
|
2996
2996
|
Asynchronously executes a function using positional arguments.
|
|
2997
2997
|
|
|
@@ -3029,7 +3029,7 @@ If the function with the given name is not found.
|
|
|
3029
3029
|
|
|
3030
3030
|
> `static` **runWithPosSync**(`name`, ...`params`): `any`
|
|
3031
3031
|
|
|
3032
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:458](https://github.com/isdk/ai-tool.js/blob/
|
|
3032
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:458](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L458)
|
|
3033
3033
|
|
|
3034
3034
|
Synchronously executes a function using positional arguments.
|
|
3035
3035
|
|
|
@@ -3131,7 +3131,7 @@ The value of the new prototype or null.
|
|
|
3131
3131
|
|
|
3132
3132
|
> `static` **setTransport**(`transport`): `void`
|
|
3133
3133
|
|
|
3134
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:51](https://github.com/isdk/ai-tool.js/blob/
|
|
3134
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/client-tools.ts:51](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/client-tools.ts#L51)
|
|
3135
3135
|
|
|
3136
3136
|
Injects the client-side transport implementation. This is a crucial step
|
|
3137
3137
|
to enable communication with the server.
|
|
@@ -3154,7 +3154,7 @@ The transport instance to use for all client-server communication.
|
|
|
3154
3154
|
|
|
3155
3155
|
> `static` **unregister**(`name`): `undefined` \| [`ToolFunc`](ToolFunc.md)
|
|
3156
3156
|
|
|
3157
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:547](https://github.com/isdk/ai-tool.js/blob/
|
|
3157
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:547](https://github.com/isdk/ai-tool.js/blob/fb1809b53cc75a30928176c26910792b6b8a96e1/src/tool-func.ts#L547)
|
|
3158
3158
|
|
|
3159
3159
|
Unregisters a function by its name, also removing any associated aliases.
|
|
3160
3160
|
|