@isdk/ai-tool 0.7.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-4FKBOPZI.mjs +1 -0
- package/dist/{chunk-VIG2GB47.mjs → chunk-TGTHY57V.mjs} +1 -1
- package/dist/funcs.d.mts +1 -2
- package/dist/funcs.d.ts +1 -2
- package/dist/funcs.js +1 -1
- package/dist/funcs.mjs +1 -1
- package/dist/{index-DEUnmyUq.d.mts → index-BLW3R7VS.d.mts} +103 -69
- package/dist/{index-DEUnmyUq.d.ts → index-BLW3R7VS.d.ts} +103 -69
- package/dist/index.d.mts +100 -37
- package/dist/index.d.ts +100 -37
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/test/util.js +1 -1
- package/dist/test/util.mjs +1 -1
- package/docs/api/{namespaces → @isdk/namespaces}/EventStates/README.md +2 -2
- package/docs/api/{namespaces → @isdk/namespaces}/EventStates/variables/ABORT.md +2 -2
- package/docs/api/{namespaces → @isdk/namespaces}/EventStates/variables/CONTINUE.md +2 -2
- package/docs/api/{namespaces → @isdk/namespaces}/EventStates/variables/DONE.md +2 -2
- package/docs/api/{namespaces → @isdk/namespaces}/EventStates/variables/STOPPED.md +2 -2
- package/docs/api/@isdk/namespaces/uuidv5/README.md +12 -0
- package/docs/api/{namespaces → @isdk/namespaces}/uuidv5/variables/DNS.md +2 -2
- package/docs/api/{namespaces → @isdk/namespaces}/uuidv5/variables/URL.md +2 -2
- package/docs/api/_media/pubsub.md +427 -105
- package/docs/api/_media/server_client_tools.md +5 -3
- package/docs/api/_media/toolFunc.md +3 -1
- package/docs/api/classes/AbortError.md +8 -8
- package/docs/api/classes/AlreadyExistsError.md +8 -8
- package/docs/api/classes/BaseError.md +14 -14
- package/docs/api/classes/BinarySemaphore.md +39 -39
- package/docs/api/classes/CancelableAbility.md +43 -39
- package/docs/api/classes/ClientToolTransport.md +22 -22
- package/docs/api/classes/ClientTools.md +178 -154
- package/docs/api/classes/CommonError.md +12 -12
- package/docs/api/classes/ConfigFile.md +6 -6
- package/docs/api/classes/EnvPromptTemplate.md +14 -14
- package/docs/api/classes/EventClient.md +240 -198
- package/docs/api/classes/EventEmitter.md +14 -14
- package/docs/api/classes/EventServer.md +208 -233
- package/docs/api/classes/EventToolFunc.md +144 -116
- package/docs/api/classes/FStringPromptTemplate.md +14 -14
- package/docs/api/classes/FewShotPromptTemplate.md +30 -26
- package/docs/api/classes/GolangPromptTemplate.md +13 -13
- package/docs/api/classes/HttpClientToolTransport.md +23 -23
- package/docs/api/classes/HttpServerToolTransport.md +32 -27
- package/docs/api/classes/IntSet.md +21 -21
- package/docs/api/classes/LRUCache.md +18 -18
- package/docs/api/classes/NotFoundError.md +8 -8
- package/docs/api/classes/NotImplementationError.md +8 -8
- package/docs/api/classes/PromptExampleSelector.md +17 -15
- package/docs/api/classes/PromptTemplate.md +15 -15
- package/docs/api/classes/ReadableStreamError.md +12 -12
- package/docs/api/classes/ResClientTools.md +180 -152
- package/docs/api/classes/ResServerTools.md +163 -139
- package/docs/api/classes/RpcMethodsClientTool.md +174 -146
- package/docs/api/classes/RpcMethodsServerTool.md +157 -133
- package/docs/api/classes/SSEChannel.md +142 -52
- package/docs/api/classes/Semaphore.md +40 -40
- package/docs/api/classes/ServerToolTransport.md +32 -27
- package/docs/api/classes/ServerTools.md +163 -139
- package/docs/api/classes/SignalGate.md +19 -17
- package/docs/api/classes/SseClientPubSubTransport.md +38 -10
- package/docs/api/classes/SseServerPubSubTransport.md +115 -42
- package/docs/api/classes/TaskAbortController.md +13 -13
- package/docs/api/classes/ToolFunc.md +157 -129
- package/docs/api/classes/ToolTransport.md +13 -13
- package/docs/api/classes/YamlTypeBaseObject.md +5 -5
- package/docs/api/enumerations/AsyncFeatureBits.md +4 -4
- package/docs/api/enumerations/AsyncFeatures.md +4 -4
- package/docs/api/enumerations/HashAlgorithm.md +12 -12
- package/docs/api/functions/AIArgProcessor.md +2 -2
- package/docs/api/functions/AIStream.md +8 -4
- package/docs/api/functions/ChoiceArgProcessor.md +2 -2
- package/docs/api/functions/DefaultDateFormat.md +2 -2
- package/docs/api/functions/ObjectArgsToArgsInfo.md +1 -1
- package/docs/api/functions/RateLimit.md +2 -2
- package/docs/api/functions/TemplateArgProcessor.md +2 -2
- package/docs/api/functions/addDate.md +7 -3
- package/docs/api/functions/assignDirs.md +1 -1
- package/docs/api/functions/beforeShutdown.md +1 -1
- package/docs/api/functions/calcPerplexity.md +2 -2
- package/docs/api/functions/calcPerplexitySimple.md +1 -1
- package/docs/api/functions/canonicalize.md +1 -1
- package/docs/api/functions/completeSentences.md +1 -1
- package/docs/api/functions/concatText.md +1 -1
- package/docs/api/functions/countLLMTokens.md +1 -1
- package/docs/api/functions/countRegexMatches.md +1 -1
- package/docs/api/functions/createAbilityInjector.md +16 -8
- package/docs/api/functions/createCallbacksTransformer.md +7 -3
- package/docs/api/functions/createEmptyReadableStream.md +1 -1
- package/docs/api/functions/createEndWithRepetitionDetector.md +2 -2
- package/docs/api/functions/createError.md +1 -1
- package/docs/api/functions/createEventStreamTransformer.md +8 -4
- package/docs/api/functions/createHfValueFunc.md +1 -1
- package/docs/api/functions/createLRUCache.md +2 -2
- package/docs/api/functions/createYamlObjectTag.md +1 -1
- package/docs/api/functions/dateToText.md +1 -1
- package/docs/api/functions/decodeCharset.md +2 -2
- package/docs/api/functions/defaultsWithConcat.md +1 -1
- package/docs/api/functions/detectCharset.md +2 -2
- package/docs/api/functions/encodeLLMTokens.md +1 -1
- package/docs/api/functions/ensureQuoted.md +1 -1
- package/docs/api/functions/eventable.md +6 -8
- package/docs/api/functions/expandConfig.md +2 -2
- package/docs/api/functions/expandObjEnv.md +1 -1
- package/docs/api/functions/expandPath.md +2 -2
- package/docs/api/functions/expandPathInObject.md +2 -2
- package/docs/api/functions/expandPaths.md +2 -2
- package/docs/api/functions/fileIsExists.md +1 -1
- package/docs/api/functions/filterValidFnScope.md +2 -2
- package/docs/api/functions/findIndexNonEmptyFrom.md +1 -1
- package/docs/api/functions/findPort.md +1 -1
- package/docs/api/functions/formatISO.md +1 -1
- package/docs/api/functions/formatTextWithSpace.md +2 -2
- package/docs/api/functions/funcGetMeta.md +1 -1
- package/docs/api/functions/funcWithMeta.md +2 -2
- package/docs/api/functions/genUrlParamsStr.md +8 -2
- package/docs/api/functions/getAllEnumKeys.md +4 -2
- package/docs/api/functions/getConfigFileNames.md +2 -2
- package/docs/api/functions/getConfigs.md +2 -2
- package/docs/api/functions/getFileMetaInfo.md +1 -1
- package/docs/api/functions/getHashAlgoBySize.md +1 -1
- package/docs/api/functions/getKeysPath.md +4 -2
- package/docs/api/functions/getLLMTokenizer.md +1 -1
- package/docs/api/functions/getMultiLevelExtname.md +1 -1
- package/docs/api/functions/getPackageDir.md +1 -1
- package/docs/api/functions/getRealFilepath.md +1 -1
- package/docs/api/functions/getResponseErrorReadableStream.md +2 -2
- package/docs/api/functions/getXDGConfigs.md +1 -1
- package/docs/api/functions/hasDirectoryIn.md +2 -2
- package/docs/api/functions/hash.md +1 -1
- package/docs/api/functions/hashFile.md +2 -2
- package/docs/api/functions/hashObject.md +2 -2
- package/docs/api/functions/hashStream.md +1 -1
- package/docs/api/functions/initShutdown.md +1 -1
- package/docs/api/functions/isLangUsingSpaces.md +1 -1
- package/docs/api/functions/isListItemString.md +1 -1
- package/docs/api/functions/isModelNameMatched.md +2 -2
- package/docs/api/functions/isPunctuationChar.md +1 -1
- package/docs/api/functions/isQuoted.md +1 -1
- package/docs/api/functions/isRegExp.md +1 -1
- package/docs/api/functions/isSameString.md +1 -1
- package/docs/api/functions/isSectionString.md +2 -2
- package/docs/api/functions/isSentenceEnding.md +1 -1
- package/docs/api/functions/isSepLineString.md +1 -1
- package/docs/api/functions/isStrWrapped.md +1 -1
- package/docs/api/functions/isSubdirectory.md +1 -1
- package/docs/api/functions/isTitleString.md +2 -2
- package/docs/api/functions/isWebStream.md +1 -1
- package/docs/api/functions/joinSplitWords.md +1 -1
- package/docs/api/functions/jsonFilterToWhere.md +2 -2
- package/docs/api/functions/jsonToMarkdownStr.md +2 -2
- package/docs/api/functions/loadAIConfig.md +1 -1
- package/docs/api/functions/loadConfig.md +1 -1
- package/docs/api/functions/loadConfigFile.md +1 -1
- package/docs/api/functions/loadFileFromPaths.md +2 -2
- package/docs/api/functions/loadTextFromPaths.md +3 -3
- package/docs/api/functions/lrucache.md +1 -1
- package/docs/api/functions/matchUrlProtocol.md +1 -1
- package/docs/api/functions/memoize.md +5 -3
- package/docs/api/functions/mergeArray.md +1 -1
- package/docs/api/functions/messagesToText.md +1 -1
- package/docs/api/functions/nanoid.md +45 -0
- package/docs/api/functions/normalizePath.md +1 -1
- package/docs/api/functions/paramsSizeToScaleStr.md +1 -1
- package/docs/api/functions/parseCommand.md +3 -3
- package/docs/api/functions/parseDateFormat.md +7 -3
- package/docs/api/functions/parseISO.md +7 -3
- package/docs/api/functions/parseJsJson.md +2 -2
- package/docs/api/functions/parseJsJsonSimpleSync.md +2 -2
- package/docs/api/functions/parseObjectArgInfo.md +2 -2
- package/docs/api/functions/parseObjectArgumentInfos.md +2 -2
- package/docs/api/functions/parseObjectArguments.md +2 -2
- package/docs/api/functions/parseObjectArgumentsAsArgInfos.md +2 -2
- package/docs/api/functions/parseYaml.md +1 -1
- package/docs/api/functions/pruneSubdirectories.md +1 -1
- package/docs/api/functions/pruneSubdirectoriesInPlace.md +1 -1
- package/docs/api/functions/quoteStr.md +1 -1
- package/docs/api/functions/readFilenamesRecursiveSync.md +2 -2
- package/docs/api/functions/readTextFileChunks.md +2 -2
- package/docs/api/functions/readTextFileChunksEx.md +2 -2
- package/docs/api/functions/readableFromAsyncIterable.md +4 -2
- package/docs/api/functions/registerCoreTools.md +1 -1
- package/docs/api/functions/removeMarkdownBold.md +2 -2
- package/docs/api/functions/removeMarkdownBoldAndItalic.md +2 -2
- package/docs/api/functions/removeMarkdownItalic.md +2 -2
- package/docs/api/functions/replaceWithPlaceholder.md +2 -2
- package/docs/api/functions/restoreFromPlacehoders.md +2 -2
- package/docs/api/functions/sanitizeFilename.md +1 -1
- package/docs/api/functions/sanitizeFilepath.md +1 -1
- package/docs/api/functions/saveConfigFile.md +1 -1
- package/docs/api/functions/scaleStrToParamsSize.md +1 -1
- package/docs/api/functions/shutdown.md +1 -1
- package/docs/api/functions/simplifyObjectArguments.md +1 -1
- package/docs/api/functions/sleep.md +1 -1
- package/docs/api/functions/sortedValues.md +4 -2
- package/docs/api/functions/splitChunks.md +2 -2
- package/docs/api/functions/splitParagraph.md +2 -2
- package/docs/api/functions/splitSentence.md +1 -1
- package/docs/api/functions/splitWords.md +1 -1
- package/docs/api/functions/stringifyYaml.md +1 -1
- package/docs/api/functions/stripConsoleColor.md +1 -1
- package/docs/api/functions/textToDate.md +1 -1
- package/docs/api/functions/throwError.md +1 -1
- package/docs/api/functions/toDate.md +7 -3
- package/docs/api/functions/toDateTime.md +1 -1
- package/docs/api/functions/trimStartOfStreamHelper.md +3 -3
- package/docs/api/functions/truncTo.md +1 -1
- package/docs/api/functions/truncateByToken.md +2 -2
- package/docs/api/functions/truncateToTokenLimit.md +2 -2
- package/docs/api/functions/truncateToTokenLimitEx.md +2 -2
- package/docs/api/functions/uuid.md +15 -6
- package/docs/api/functions/uuidStringify.md +1 -1
- package/docs/api/functions/uuidv1.md +5 -3
- package/docs/api/functions/uuidv4.md +5 -3
- package/docs/api/functions/uuidv5.md +5 -3
- package/docs/api/functions/uuidv6.md +61 -0
- package/docs/api/functions/uuidv7.md +61 -0
- package/docs/api/functions/wrapEventEmitter.md +1 -1
- package/docs/api/functions/xxhash.md +1 -1
- package/docs/api/functions/xxhash32.md +1 -1
- package/docs/api/functions/xxhash64.md +1 -1
- package/docs/api/functions/xxhashAsStr.md +1 -1
- package/docs/api/functions/yieldExec.md +1 -1
- package/docs/api/globals.md +11 -6
- package/docs/api/interfaces/AIChatAssistantMessageParam.md +12 -12
- package/docs/api/interfaces/AIChatContentPartImage.md +3 -3
- package/docs/api/interfaces/AIChatContentPartText.md +3 -3
- package/docs/api/interfaces/AIChatMessageParamBase.md +7 -7
- package/docs/api/interfaces/AIChatMessageToolCall.md +4 -4
- package/docs/api/interfaces/AIChatSystemMessageParam.md +9 -9
- package/docs/api/interfaces/AIChatToolChoiceFuncObject.md +3 -3
- package/docs/api/interfaces/AIChatToolChoiceObject.md +2 -2
- package/docs/api/interfaces/AIChatToolFunc.md +5 -5
- package/docs/api/interfaces/AIChatToolFuncParam.md +3 -3
- package/docs/api/interfaces/AIChatToolMessageParam.md +10 -10
- package/docs/api/interfaces/AIChatToolParam.md +2 -2
- package/docs/api/interfaces/AIChatToolTypeObject.md +2 -2
- package/docs/api/interfaces/AIChatUserMessageParam.md +13 -13
- package/docs/api/interfaces/AIChoiceConfig.md +8 -8
- package/docs/api/interfaces/AIResult.md +12 -8
- package/docs/api/interfaces/AIStreamParser.md +8 -6
- package/docs/api/interfaces/AIStreamParserOptions.md +2 -2
- package/docs/api/interfaces/BaseFunc.md +17 -17
- package/docs/api/interfaces/BaseFuncItem.md +15 -15
- package/docs/api/interfaces/BinarySemaphoreAcquireOptions.md +2 -2
- package/docs/api/interfaces/BinarySemaphoreOptions.md +5 -5
- package/docs/api/interfaces/BinarySemaphoreReleaseOptions.md +2 -2
- package/docs/api/interfaces/BinarySemaphoreReleaserFunc.md +3 -3
- package/docs/api/interfaces/CancelableAbilityOptions.md +4 -4
- package/docs/api/interfaces/ClientFuncItem.md +21 -25
- package/docs/api/interfaces/EventClientFuncParams.md +5 -5
- package/docs/api/interfaces/EventServerFuncParams.md +14 -6
- package/docs/api/interfaces/FewShotPromptTemplateOptions.md +9 -7
- package/docs/api/interfaces/FuncItem.md +18 -18
- package/docs/api/interfaces/FuncParam.md +5 -5
- package/docs/api/interfaces/FuncParams.md +1 -1
- package/docs/api/interfaces/Funcs.md +1 -1
- package/docs/api/interfaces/HashAlgoParams.md +4 -4
- package/docs/api/interfaces/IClientToolTransport.md +9 -9
- package/docs/api/interfaces/IFileMetaInfo.md +8 -8
- package/docs/api/interfaces/IPubSubClientTransport.md +31 -7
- package/docs/api/interfaces/IPubSubServerTransport.md +92 -47
- package/docs/api/interfaces/IReadTextFileChunksOptions.md +13 -13
- package/docs/api/interfaces/IServerToolTransport.md +19 -14
- package/docs/api/interfaces/IToolTransport.md +6 -6
- package/docs/api/interfaces/ITruncateToTokenLimitOptions.md +11 -11
- package/docs/api/interfaces/JsonFilter.md +1 -1
- package/docs/api/interfaces/ParseObjectArgumentOptions.md +11 -11
- package/docs/api/interfaces/ProbabilityItem.md +4 -4
- package/docs/api/interfaces/PromptExampleSelectorOptions.md +3 -3
- package/docs/api/interfaces/PubSubClientStream.md +26 -14
- package/docs/api/interfaces/PubSubServerSession.md +8 -8
- package/docs/api/interfaces/RemoteFuncItem.md +21 -25
- package/docs/api/interfaces/ReplacePlacehoderOptions.md +5 -5
- package/docs/api/interfaces/ResClientFuncParams.md +3 -3
- package/docs/api/interfaces/ResServerFuncParams.md +6 -6
- package/docs/api/interfaces/RpcMethodsClientFuncParams.md +2 -2
- package/docs/api/interfaces/RpcMethodsServerFuncParams.md +4 -4
- package/docs/api/interfaces/SectionStringOptions.md +3 -3
- package/docs/api/interfaces/SemaphoreOptions.md +7 -7
- package/docs/api/interfaces/SemaphoreTaskItem.md +6 -6
- package/docs/api/interfaces/ServerFuncItem.md +22 -26
- package/docs/api/interfaces/ServerFuncParams.md +3 -3
- package/docs/api/interfaces/SplitSentenceOptions.md +5 -5
- package/docs/api/interfaces/StreamCallbacksAndOptions.md +11 -7
- package/docs/api/interfaces/TaskAbortControllers.md +1 -1
- package/docs/api/interfaces/TaskPromise.md +17 -9
- package/docs/api/interfaces/ToolFuncPackage.md +5 -5
- package/docs/api/type-aliases/AIChatContentPart.md +2 -2
- package/docs/api/type-aliases/AIChatMessageParam.md +2 -2
- package/docs/api/type-aliases/AIChatRole.md +2 -2
- package/docs/api/type-aliases/AIChatToolChoiceParam.md +2 -2
- package/docs/api/type-aliases/AIMessageType.md +2 -2
- package/docs/api/type-aliases/AIModelNameRule.md +2 -2
- package/docs/api/type-aliases/AIModelNameRuleFn.md +2 -2
- package/docs/api/type-aliases/AIModelNameRules.md +2 -2
- package/docs/api/type-aliases/AITextGenerationFinishReason.md +2 -2
- package/docs/api/type-aliases/ActionName.md +2 -2
- package/docs/api/type-aliases/ArrayMergeWay.md +2 -2
- package/docs/api/type-aliases/AsyncTaskId.md +2 -2
- package/docs/api/type-aliases/BeforeShutdownListener.md +2 -2
- package/docs/api/type-aliases/EventErrorListenerFn.md +2 -2
- package/docs/api/type-aliases/EventListenerFn.md +2 -2
- package/docs/api/type-aliases/FuncParamType.md +2 -2
- package/docs/api/type-aliases/PromptExamples.md +5 -3
- package/docs/api/type-aliases/PubSubClientId.md +2 -2
- package/docs/api/type-aliases/PubSubCtx.md +24 -4
- package/docs/api/type-aliases/RpcMethodHandler.md +2 -2
- package/docs/api/type-aliases/SSEClient.md +53 -0
- package/docs/api/type-aliases/SemaphoreIsReadyFuncType.md +2 -2
- package/docs/api/type-aliases/TFunc.md +2 -2
- package/docs/api/type-aliases/UUIDVersions.md +11 -0
- package/docs/api/variables/AIChatRoles.md +1 -1
- package/docs/api/variables/AIMessageTypes.md +1 -1
- package/docs/api/variables/AITextGenerationFinishReasons.md +1 -1
- package/docs/api/variables/ActionNames.md +1 -1
- package/docs/api/variables/ArrayMergeWay.md +2 -2
- package/docs/api/variables/ArrayMergeWaySymbol.md +2 -2
- package/docs/api/variables/ClientEventPrefix.md +11 -0
- package/docs/api/variables/ClientToolFuncSchema.md +4 -2
- package/docs/api/variables/DEFAULT_CONFIG_NAME.md +1 -1
- package/docs/api/variables/DefaultAsyncSemaphoreCapacity.md +1 -1
- package/docs/api/variables/EventBusName.md +1 -1
- package/docs/api/variables/EventName.md +1 -1
- package/docs/api/variables/FuncMetaSymbol.md +2 -2
- package/docs/api/variables/LLM_TOKENIZER_NAMES.md +4 -4
- package/docs/api/variables/LLM_TOKENIZER_NAMES_MAP.md +1 -1
- package/docs/api/variables/PASSING_SCORE.md +1 -1
- package/docs/api/variables/RStreamErrCode.md +1 -1
- package/docs/api/variables/RemoteToolFuncSchema.md +4 -2
- package/docs/api/variables/ResponseRStreamErrCode.md +1 -1
- package/docs/api/variables/RpcMethodsClientToolSchema.md +4 -2
- package/docs/api/variables/RpcMethodsServerToolSchema.md +2 -2
- package/docs/api/variables/SHUTDOWN_SIGNALS.md +1 -1
- package/docs/api/variables/SSEChannelAlreadyClosedErrCode.md +1 -1
- package/docs/api/variables/SecondaryCache.md +1 -1
- package/docs/api/variables/ServerToolFuncSchema.md +4 -2
- package/docs/api/variables/StrangeHumanName.md +1 -1
- package/docs/api/variables/ToolAsyncCancelableBit.md +1 -1
- package/docs/api/variables/ToolAsyncMultiTaskBit.md +1 -1
- package/docs/api/variables/ToolAsyncPriorityBit.md +1 -1
- package/docs/api/variables/ToolFuncSchema.md +4 -2
- package/docs/api/variables/backendEventable.md +11 -0
- package/docs/api/variables/base32768.md +1 -1
- package/docs/api/variables/event.md +1 -1
- package/docs/api/variables/eventClient.md +1 -1
- package/docs/api/variables/eventServer.md +1 -1
- package/docs/api/variables/lrucache.md +1 -1
- package/docs/api/variables/makeToolFuncCancelable.md +11 -0
- package/docs/api/{functions → variables}/wait.md +16 -14
- package/docs/pubsub.md +427 -105
- package/docs/server_client_tools.md +5 -3
- package/docs/toolFunc.md +3 -1
- package/package.json +8 -7
- package/dist/chunk-4XRPAC7C.mjs +0 -1
- package/docs/api/functions/backendEventable.md +0 -29
- package/docs/api/functions/makeToolFuncCancelable.md +0 -29
- package/docs/api/interfaces/PubSubClient.md +0 -27
- package/docs/api/namespaces/uuidv5/README.md +0 -12
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Class: RpcMethodsServerTool
|
|
8
8
|
|
|
9
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:10](https://github.com/isdk/ai-tool.js/blob/
|
|
9
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:10](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/rpc-methods-server-tool.ts#L10)
|
|
10
10
|
|
|
11
11
|
Represents a function that runs on a server and can be exposed to clients.
|
|
12
12
|
|
|
@@ -28,11 +28,11 @@ server-side execution contexts. It is designed to work with a transport layer
|
|
|
28
28
|
|
|
29
29
|
## Constructors
|
|
30
30
|
|
|
31
|
-
###
|
|
31
|
+
### Constructor
|
|
32
32
|
|
|
33
|
-
> **new RpcMethodsServerTool**(`name`, `options`):
|
|
33
|
+
> **new RpcMethodsServerTool**(`name`, `options`): `RpcMethodsServerTool`
|
|
34
34
|
|
|
35
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:42](https://github.com/isdk/ai-tool.js/blob/
|
|
35
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:42](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/rpc-methods-server-tool.ts#L42)
|
|
36
36
|
|
|
37
37
|
The initial value of Object.prototype.constructor is the standard built-in Object constructor.
|
|
38
38
|
|
|
@@ -48,11 +48,11 @@ The initial value of Object.prototype.constructor is the standard built-in Objec
|
|
|
48
48
|
|
|
49
49
|
#### Returns
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
`RpcMethodsServerTool`
|
|
52
52
|
|
|
53
53
|
#### Inherited from
|
|
54
54
|
|
|
55
|
-
[`ServerTools`](ServerTools.md).[`constructor`](ServerTools.md#
|
|
55
|
+
[`ServerTools`](ServerTools.md).[`constructor`](ServerTools.md#constructor)
|
|
56
56
|
|
|
57
57
|
## Properties
|
|
58
58
|
|
|
@@ -64,7 +64,7 @@ Defined in: [property-manager.js/src/advance.d.ts:5](https://github.com/snowyu/p
|
|
|
64
64
|
|
|
65
65
|
#### Inherited from
|
|
66
66
|
|
|
67
|
-
[`ServerTools`](ServerTools.md).[`$attributes`](ServerTools.md
|
|
67
|
+
[`ServerTools`](ServerTools.md).[`$attributes`](ServerTools.md#attributes)
|
|
68
68
|
|
|
69
69
|
***
|
|
70
70
|
|
|
@@ -72,7 +72,7 @@ Defined in: [property-manager.js/src/advance.d.ts:5](https://github.com/snowyu/p
|
|
|
72
72
|
|
|
73
73
|
> `optional` **action**: `"get"` \| `"post"` \| `"put"` \| `"delete"` \| `"patch"` \| `"list"` \| `"res"`
|
|
74
74
|
|
|
75
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/consts.ts:95](https://github.com/isdk/ai-tool.js/blob/
|
|
75
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/consts.ts:95](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/consts.ts#L95)
|
|
76
76
|
|
|
77
77
|
The action to be used for the remote call. This typically represents an RPC method name.
|
|
78
78
|
Only for RESTful HTTP transports, it might be mapped to a standard HTTP method (e.g., GET, POST)
|
|
@@ -87,7 +87,7 @@ Only for RESTful HTTP transports, it might be mapped to a standard HTTP method (
|
|
|
87
87
|
|
|
88
88
|
> `optional` **alias**: `string` \| `string`[]
|
|
89
89
|
|
|
90
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:130](https://github.com/isdk/ai-tool.js/blob/
|
|
90
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:130](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L130)
|
|
91
91
|
|
|
92
92
|
Optional aliases for the function name.
|
|
93
93
|
|
|
@@ -101,7 +101,7 @@ Optional aliases for the function name.
|
|
|
101
101
|
|
|
102
102
|
> `optional` **allowExportFunc**: `boolean`
|
|
103
103
|
|
|
104
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/server-tools.ts:35](https://github.com/isdk/ai-tool.js/blob/
|
|
104
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/server-tools.ts:35](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/server-tools.ts#L35)
|
|
105
105
|
|
|
106
106
|
If set to true, the body of the function (`func`) will be serialized and sent
|
|
107
107
|
to the client when tools are loaded. This allows the client to execute the
|
|
@@ -117,7 +117,7 @@ function locally instead of making a remote call. Defaults to false.
|
|
|
117
117
|
|
|
118
118
|
> `optional` **apiRoot**: `string`
|
|
119
119
|
|
|
120
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/consts.ts:89](https://github.com/isdk/ai-tool.js/blob/
|
|
120
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/consts.ts:89](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/consts.ts#L89)
|
|
121
121
|
|
|
122
122
|
The root endpoint for the remote service.
|
|
123
123
|
|
|
@@ -135,7 +135,7 @@ Use `transport` instead.
|
|
|
135
135
|
|
|
136
136
|
> `optional` **asyncFeatures**: `number`
|
|
137
137
|
|
|
138
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:144](https://github.com/isdk/ai-tool.js/blob/
|
|
138
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:144](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L144)
|
|
139
139
|
|
|
140
140
|
A bitmask representing asynchronous features supported by the function, built from `AsyncFeatureBits`.
|
|
141
141
|
This allows the system to understand if a function supports capabilities like cancellation or multi-tasking.
|
|
@@ -197,7 +197,7 @@ The default options for export and assign
|
|
|
197
197
|
|
|
198
198
|
> `optional` **depends**: `object`
|
|
199
199
|
|
|
200
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:167](https://github.com/isdk/ai-tool.js/blob/
|
|
200
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:167](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L167)
|
|
201
201
|
|
|
202
202
|
A map of dependencies this function has on other tool functions.
|
|
203
203
|
Declaring dependencies ensures that they are automatically registered when this function is registered.
|
|
@@ -236,7 +236,7 @@ mainFunc.register();
|
|
|
236
236
|
|
|
237
237
|
> `optional` **description**: `string`
|
|
238
238
|
|
|
239
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:172](https://github.com/isdk/ai-tool.js/blob/
|
|
239
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:172](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L172)
|
|
240
240
|
|
|
241
241
|
A detailed description of what the function does.
|
|
242
242
|
|
|
@@ -246,17 +246,13 @@ A detailed description of what the function does.
|
|
|
246
246
|
|
|
247
247
|
***
|
|
248
248
|
|
|
249
|
-
###
|
|
249
|
+
### fetchOptions?
|
|
250
250
|
|
|
251
251
|
> `optional` **fetchOptions**: `any`
|
|
252
252
|
|
|
253
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/consts.ts:
|
|
253
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/consts.ts:100](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/consts.ts#L100)
|
|
254
254
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
#### Deprecated
|
|
258
|
-
|
|
259
|
-
Use `transport` instead.
|
|
255
|
+
Addtional options to be passed to the underlying `fetch` call in a transport.
|
|
260
256
|
|
|
261
257
|
#### Inherited from
|
|
262
258
|
|
|
@@ -268,7 +264,7 @@ Use `transport` instead.
|
|
|
268
264
|
|
|
269
265
|
> `optional` **isApi**: `boolean`
|
|
270
266
|
|
|
271
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:119](https://github.com/isdk/ai-tool.js/blob/
|
|
267
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:119](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L119)
|
|
272
268
|
|
|
273
269
|
If true, indicates that this function should be treated as a server-side API.
|
|
274
270
|
|
|
@@ -282,7 +278,7 @@ If true, indicates that this function should be treated as a server-side API.
|
|
|
282
278
|
|
|
283
279
|
> **methods**: `string`[]
|
|
284
280
|
|
|
285
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:11](https://github.com/isdk/ai-tool.js/blob/
|
|
281
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:11](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/rpc-methods-server-tool.ts#L11)
|
|
286
282
|
|
|
287
283
|
***
|
|
288
284
|
|
|
@@ -290,13 +286,13 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:11](
|
|
|
290
286
|
|
|
291
287
|
> `optional` **name**: `string`
|
|
292
288
|
|
|
293
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:76](https://github.com/isdk/ai-tool.js/blob/
|
|
289
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:76](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L76)
|
|
294
290
|
|
|
295
291
|
The unique name of the function.
|
|
296
292
|
|
|
297
293
|
#### Inherited from
|
|
298
294
|
|
|
299
|
-
[`ServerTools`](ServerTools.md).[`name`](ServerTools.md#name
|
|
295
|
+
[`ServerTools`](ServerTools.md).[`name`](ServerTools.md#name)
|
|
300
296
|
|
|
301
297
|
***
|
|
302
298
|
|
|
@@ -318,7 +314,7 @@ the property with the default prefix '$' will not be exported.
|
|
|
318
314
|
|
|
319
315
|
> **params**: [`FuncParams`](../interfaces/FuncParams.md)
|
|
320
316
|
|
|
321
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:17](https://github.com/isdk/ai-tool.js/blob/
|
|
317
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:17](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/rpc-methods-server-tool.ts#L17)
|
|
322
318
|
|
|
323
319
|
Parameter definitions, which can be an object mapping names to definitions or an array for positional parameters.
|
|
324
320
|
|
|
@@ -332,7 +328,7 @@ Parameter definitions, which can be an object mapping names to definitions or an
|
|
|
332
328
|
|
|
333
329
|
> `optional` **result**: `string` \| `Record`\<`string`, `any`\>
|
|
334
330
|
|
|
335
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:86](https://github.com/isdk/ai-tool.js/blob/
|
|
331
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:86](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L86)
|
|
336
332
|
|
|
337
333
|
The expected return type of the function, described as a string or a JSON schema object.
|
|
338
334
|
|
|
@@ -346,7 +342,7 @@ The expected return type of the function, described as a string or a JSON schema
|
|
|
346
342
|
|
|
347
343
|
> `optional` **scope**: `any`
|
|
348
344
|
|
|
349
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:91](https://github.com/isdk/ai-tool.js/blob/
|
|
345
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:91](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L91)
|
|
350
346
|
|
|
351
347
|
The execution scope or context (`this`) for the function.
|
|
352
348
|
|
|
@@ -358,9 +354,9 @@ The execution scope or context (`this`) for the function.
|
|
|
358
354
|
|
|
359
355
|
### setup()?
|
|
360
356
|
|
|
361
|
-
> `optional` **setup**: (`this`, `options
|
|
357
|
+
> `optional` **setup**: (`this`, `options?`) => `void`
|
|
362
358
|
|
|
363
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:114](https://github.com/isdk/ai-tool.js/blob/
|
|
359
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:114](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L114)
|
|
364
360
|
|
|
365
361
|
A lifecycle hook called once during the `ToolFunc` instance's initialization.
|
|
366
362
|
It allows for initial setup, state configuration, or property modification on the instance
|
|
@@ -406,7 +402,7 @@ console.log(myFunc.customState); // Outputs: 'configured'
|
|
|
406
402
|
|
|
407
403
|
> `optional` **stream**: `boolean`
|
|
408
404
|
|
|
409
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:125](https://github.com/isdk/ai-tool.js/blob/
|
|
405
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:125](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L125)
|
|
410
406
|
|
|
411
407
|
If true, indicates that the function has the *capability* to stream its output.
|
|
412
408
|
Whether a specific call is streamed is determined by a `stream` property in the runtime parameters.
|
|
@@ -421,7 +417,7 @@ Whether a specific call is streamed is determined by a `stream` property in the
|
|
|
421
417
|
|
|
422
418
|
> `optional` **tags**: `string` \| `string`[]
|
|
423
419
|
|
|
424
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:96](https://github.com/isdk/ai-tool.js/blob/
|
|
420
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:96](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L96)
|
|
425
421
|
|
|
426
422
|
Tags for grouping or filtering functions.
|
|
427
423
|
|
|
@@ -435,7 +431,7 @@ Tags for grouping or filtering functions.
|
|
|
435
431
|
|
|
436
432
|
> `optional` **title**: `string`
|
|
437
433
|
|
|
438
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:177](https://github.com/isdk/ai-tool.js/blob/
|
|
434
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:177](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L177)
|
|
439
435
|
|
|
440
436
|
A concise, human-readable title for the function, often used in UI or by AI.
|
|
441
437
|
|
|
@@ -449,7 +445,7 @@ A concise, human-readable title for the function, often used in UI or by AI.
|
|
|
449
445
|
|
|
450
446
|
> `static` **aliases**: `object` = `{}`
|
|
451
447
|
|
|
452
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:305](https://github.com/isdk/ai-tool.js/blob/
|
|
448
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:305](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L305)
|
|
453
449
|
|
|
454
450
|
A static map of aliases to their corresponding function names.
|
|
455
451
|
|
|
@@ -467,7 +463,7 @@ A static map of aliases to their corresponding function names.
|
|
|
467
463
|
|
|
468
464
|
> `static` **dataPath**: `string`
|
|
469
465
|
|
|
470
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:312](https://github.com/isdk/ai-tool.js/blob/
|
|
466
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:312](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L312)
|
|
471
467
|
|
|
472
468
|
A conventional property to designate a file path for saving the registered `ToolFunc` data.
|
|
473
469
|
Note: The `ToolFunc` class itself does not implement persistence logic. It is up to the
|
|
@@ -483,7 +479,7 @@ developer to use this path to save and load the `ToolFunc.items` registry if nee
|
|
|
483
479
|
|
|
484
480
|
> `static` **items**: [`Funcs`](../interfaces/Funcs.md) = `{}`
|
|
485
481
|
|
|
486
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:300](https://github.com/isdk/ai-tool.js/blob/
|
|
482
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:300](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L300)
|
|
487
483
|
|
|
488
484
|
A static registry of all `ToolFunc` instances, indexed by name.
|
|
489
485
|
|
|
@@ -497,7 +493,7 @@ A static registry of all `ToolFunc` instances, indexed by name.
|
|
|
497
493
|
|
|
498
494
|
> `static` `optional` **SpecialRpcMethodNames**: `string`[]
|
|
499
495
|
|
|
500
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:15](https://github.com/isdk/ai-tool.js/blob/
|
|
496
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:15](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/rpc-methods-server-tool.ts#L15)
|
|
501
497
|
|
|
502
498
|
## Accessors
|
|
503
499
|
|
|
@@ -507,7 +503,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:15](
|
|
|
507
503
|
|
|
508
504
|
> **get** **SpecialRpcMethodNames**(): `any`
|
|
509
505
|
|
|
510
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:22](https://github.com/isdk/ai-tool.js/blob/
|
|
506
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:22](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/rpc-methods-server-tool.ts#L22)
|
|
511
507
|
|
|
512
508
|
##### Returns
|
|
513
509
|
|
|
@@ -521,7 +517,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:22](
|
|
|
521
517
|
|
|
522
518
|
> **get** `static` **apiRoot**(): `undefined` \| `string`
|
|
523
519
|
|
|
524
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/server-tools.ts:57](https://github.com/isdk/ai-tool.js/blob/
|
|
520
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/server-tools.ts:57](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/server-tools.ts#L57)
|
|
525
521
|
|
|
526
522
|
The conventional root path for the API endpoint.
|
|
527
523
|
|
|
@@ -539,7 +535,7 @@ The conventional root path for the API endpoint.
|
|
|
539
535
|
|
|
540
536
|
> **arr2ObjParams**(`params`): `any`[]
|
|
541
537
|
|
|
542
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:629](https://github.com/isdk/ai-tool.js/blob/
|
|
538
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:629](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L629)
|
|
543
539
|
|
|
544
540
|
Converts an array of positional arguments into a named parameters object.
|
|
545
541
|
This is used internally to support functions defined with named parameters.
|
|
@@ -566,7 +562,7 @@ An array containing a single parameters object.
|
|
|
566
562
|
|
|
567
563
|
### assign()
|
|
568
564
|
|
|
569
|
-
> **assign**(`src`, `options
|
|
565
|
+
> **assign**(`src`, `options?`): `this`
|
|
570
566
|
|
|
571
567
|
Defined in: [property-manager.js/src/abstract.d.ts:106](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L106)
|
|
572
568
|
|
|
@@ -598,7 +594,7 @@ this object
|
|
|
598
594
|
|
|
599
595
|
### assignProperty()
|
|
600
596
|
|
|
601
|
-
> **assignProperty**(`src`, `name`, `value`, `attrs
|
|
597
|
+
> **assignProperty**(`src`, `name`, `value`, `attrs?`, `options?`): `void`
|
|
602
598
|
|
|
603
599
|
Defined in: [property-manager.js/src/abstract.d.ts:117](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L117)
|
|
604
600
|
|
|
@@ -646,7 +642,7 @@ the attributes object
|
|
|
646
642
|
|
|
647
643
|
### assignPropertyTo()
|
|
648
644
|
|
|
649
|
-
> `abstract` **assignPropertyTo**(`dest`, `src`, `name`, `value`, `attrs
|
|
645
|
+
> `abstract` **assignPropertyTo**(`dest`, `src`, `name`, `value`, `attrs?`, `options?`): `void`
|
|
650
646
|
|
|
651
647
|
Defined in: [property-manager.js/src/abstract.d.ts:131](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L131)
|
|
652
648
|
|
|
@@ -700,7 +696,7 @@ The attributes object of the property
|
|
|
700
696
|
|
|
701
697
|
### assignTo()
|
|
702
698
|
|
|
703
|
-
> **assignTo**(`dest
|
|
699
|
+
> **assignTo**(`dest?`, `options?`): `any`
|
|
704
700
|
|
|
705
701
|
Defined in: [property-manager.js/src/abstract.d.ts:191](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L191)
|
|
706
702
|
|
|
@@ -734,7 +730,7 @@ the dest object
|
|
|
734
730
|
|
|
735
731
|
> **cast**(`key`, `value`): `any`
|
|
736
732
|
|
|
737
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:48](https://github.com/isdk/ai-tool.js/blob/
|
|
733
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:48](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/rpc-methods-server-tool.ts#L48)
|
|
738
734
|
|
|
739
735
|
#### Parameters
|
|
740
736
|
|
|
@@ -756,7 +752,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:48](
|
|
|
756
752
|
|
|
757
753
|
> **castParams**(`params`): [`RpcMethodsServerFuncParams`](../interfaces/RpcMethodsServerFuncParams.md)
|
|
758
754
|
|
|
759
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:64](https://github.com/isdk/ai-tool.js/blob/
|
|
755
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:64](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/rpc-methods-server-tool.ts#L64)
|
|
760
756
|
|
|
761
757
|
#### Parameters
|
|
762
758
|
|
|
@@ -772,7 +768,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:64](
|
|
|
772
768
|
|
|
773
769
|
### clone()
|
|
774
770
|
|
|
775
|
-
> **clone**(`options
|
|
771
|
+
> **clone**(`options?`): `any`
|
|
776
772
|
|
|
777
773
|
Defined in: [property-manager.js/src/abstract.d.ts:155](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L155)
|
|
778
774
|
|
|
@@ -798,7 +794,7 @@ the new object
|
|
|
798
794
|
|
|
799
795
|
### cloneTo()
|
|
800
796
|
|
|
801
|
-
> **cloneTo**(`dest`, `options
|
|
797
|
+
> **cloneTo**(`dest`, `options?`): `any`
|
|
802
798
|
|
|
803
799
|
Defined in: [property-manager.js/src/abstract.d.ts:148](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L148)
|
|
804
800
|
|
|
@@ -856,7 +852,7 @@ the defined attributes of the object
|
|
|
856
852
|
|
|
857
853
|
### exportTo()
|
|
858
854
|
|
|
859
|
-
> **exportTo**(`dest`, `options
|
|
855
|
+
> **exportTo**(`dest`, `options?`): `any`
|
|
860
856
|
|
|
861
857
|
Defined in: [property-manager.js/src/abstract.d.ts:173](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L173)
|
|
862
858
|
|
|
@@ -890,7 +886,7 @@ the dest object.
|
|
|
890
886
|
|
|
891
887
|
> **func**(`params`): `any`
|
|
892
888
|
|
|
893
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:68](https://github.com/isdk/ai-tool.js/blob/
|
|
889
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:68](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/rpc-methods-server-tool.ts#L68)
|
|
894
890
|
|
|
895
891
|
Placeholder for the actual server-side function implementation.
|
|
896
892
|
This method is intended to be defined when a `ServerTools` instance is created.
|
|
@@ -917,9 +913,9 @@ The result of the function.
|
|
|
917
913
|
|
|
918
914
|
### getFunc()
|
|
919
915
|
|
|
920
|
-
> **getFunc**(`name
|
|
916
|
+
> **getFunc**(`name?`): `any`
|
|
921
917
|
|
|
922
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:720](https://github.com/isdk/ai-tool.js/blob/
|
|
918
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:720](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L720)
|
|
923
919
|
|
|
924
920
|
Gets a bound function reference for execution with named parameters.
|
|
925
921
|
If a name is provided, it retrieves a different function from the registry.
|
|
@@ -947,9 +943,9 @@ A function reference or `undefined` if not found.
|
|
|
947
943
|
|
|
948
944
|
### getFuncWithPos()
|
|
949
945
|
|
|
950
|
-
> **getFuncWithPos**(`name
|
|
946
|
+
> **getFuncWithPos**(`name?`): `any`
|
|
951
947
|
|
|
952
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:777](https://github.com/isdk/ai-tool.js/blob/
|
|
948
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:777](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L777)
|
|
953
949
|
|
|
954
950
|
Gets a bound function reference suitable for positional argument execution.
|
|
955
951
|
If a name is provided, it retrieves a different function from the registry.
|
|
@@ -979,7 +975,7 @@ A function reference or `undefined` if not found.
|
|
|
979
975
|
|
|
980
976
|
> **getMethodFromParams**(`params`): `undefined` \| `string`
|
|
981
977
|
|
|
982
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:59](https://github.com/isdk/ai-tool.js/blob/
|
|
978
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:59](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/rpc-methods-server-tool.ts#L59)
|
|
983
979
|
|
|
984
980
|
#### Parameters
|
|
985
981
|
|
|
@@ -1017,7 +1013,7 @@ the descriptors of properties object
|
|
|
1017
1013
|
|
|
1018
1014
|
> **hasAsyncFeature**(`feature`): `boolean`
|
|
1019
1015
|
|
|
1020
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:787](https://github.com/isdk/ai-tool.js/blob/
|
|
1016
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:787](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L787)
|
|
1021
1017
|
|
|
1022
1018
|
Checks if the current function instance supports a specific async feature.
|
|
1023
1019
|
|
|
@@ -1069,7 +1065,7 @@ A property name.
|
|
|
1069
1065
|
|
|
1070
1066
|
### initialize()
|
|
1071
1067
|
|
|
1072
|
-
> **initialize**(`src
|
|
1068
|
+
> **initialize**(`src?`): `this`
|
|
1073
1069
|
|
|
1074
1070
|
Defined in: [property-manager.js/src/abstract.d.ts:139](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L139)
|
|
1075
1071
|
|
|
@@ -1097,7 +1093,7 @@ this object.
|
|
|
1097
1093
|
|
|
1098
1094
|
> **initRpcMethods**(`methods`): `void`
|
|
1099
1095
|
|
|
1100
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:27](https://github.com/isdk/ai-tool.js/blob/
|
|
1096
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:27](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/rpc-methods-server-tool.ts#L27)
|
|
1101
1097
|
|
|
1102
1098
|
#### Parameters
|
|
1103
1099
|
|
|
@@ -1139,7 +1135,7 @@ Another object whose prototype chain is to be checked.
|
|
|
1139
1135
|
|
|
1140
1136
|
### isSame()
|
|
1141
1137
|
|
|
1142
|
-
> **isSame**(`src`, `options
|
|
1138
|
+
> **isSame**(`src`, `options?`): `boolean`
|
|
1143
1139
|
|
|
1144
1140
|
Defined in: [property-manager.js/src/abstract.d.ts:200](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L200)
|
|
1145
1141
|
|
|
@@ -1171,7 +1167,7 @@ The source object
|
|
|
1171
1167
|
|
|
1172
1168
|
> **isStream**(`params`): `undefined` \| `boolean`
|
|
1173
1169
|
|
|
1174
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:805](https://github.com/isdk/ai-tool.js/blob/
|
|
1170
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:805](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L805)
|
|
1175
1171
|
|
|
1176
1172
|
Determines if a function call should produce a stream.
|
|
1177
1173
|
|
|
@@ -1203,7 +1199,7 @@ The runtime parameters passed to the function call.
|
|
|
1203
1199
|
|
|
1204
1200
|
### mergeTo()
|
|
1205
1201
|
|
|
1206
|
-
> **mergeTo**(`dest`, `options
|
|
1202
|
+
> **mergeTo**(`dest`, `options?`): `any`
|
|
1207
1203
|
|
|
1208
1204
|
Defined in: [property-manager.js/src/abstract.d.ts:164](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L164)
|
|
1209
1205
|
|
|
@@ -1235,9 +1231,9 @@ the dest object.
|
|
|
1235
1231
|
|
|
1236
1232
|
### obj2ArrParams()
|
|
1237
1233
|
|
|
1238
|
-
> **obj2ArrParams**(`params
|
|
1234
|
+
> **obj2ArrParams**(`params?`): `any`[]
|
|
1239
1235
|
|
|
1240
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:648](https://github.com/isdk/ai-tool.js/blob/
|
|
1236
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:648](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L648)
|
|
1241
1237
|
|
|
1242
1238
|
Converts a named parameters object into an array of positional arguments.
|
|
1243
1239
|
This is used for functions defined with positional parameters.
|
|
@@ -1292,7 +1288,7 @@ A property name.
|
|
|
1292
1288
|
|
|
1293
1289
|
> **register**(): `boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
1294
1290
|
|
|
1295
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:602](https://github.com/isdk/ai-tool.js/blob/
|
|
1291
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:602](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L602)
|
|
1296
1292
|
|
|
1297
1293
|
Registers the current `ToolFunc` instance into the static registry.
|
|
1298
1294
|
Also registers any declared dependencies.
|
|
@@ -1311,9 +1307,9 @@ The instance itself upon successful registration, or `false` if it already exist
|
|
|
1311
1307
|
|
|
1312
1308
|
### run()
|
|
1313
1309
|
|
|
1314
|
-
> **run**(`params`, `context
|
|
1310
|
+
> **run**(`params`, `context?`): `Promise`\<`any`\>
|
|
1315
1311
|
|
|
1316
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/server-tools.ts:98](https://github.com/isdk/ai-tool.js/blob/
|
|
1312
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/server-tools.ts:98](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/server-tools.ts#L98)
|
|
1317
1313
|
|
|
1318
1314
|
Overrides the base `run` method to inject transport-specific context.
|
|
1319
1315
|
If a `context` object containing `req` and `reply` is provided, these are
|
|
@@ -1353,9 +1349,9 @@ The result of the function execution.
|
|
|
1353
1349
|
|
|
1354
1350
|
### runAs()
|
|
1355
1351
|
|
|
1356
|
-
> **runAs**(`name`, `params
|
|
1352
|
+
> **runAs**(`name`, `params?`): `Promise`\<`any`\>
|
|
1357
1353
|
|
|
1358
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:697](https://github.com/isdk/ai-tool.js/blob/
|
|
1354
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:697](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L697)
|
|
1359
1355
|
|
|
1360
1356
|
Asynchronously executes another registered function by name.
|
|
1361
1357
|
This method delegates to `runAsSync()` internally.
|
|
@@ -1388,9 +1384,9 @@ A promise that resolves with the result of the function execution.
|
|
|
1388
1384
|
|
|
1389
1385
|
### runAsSync()
|
|
1390
1386
|
|
|
1391
|
-
> **runAsSync**(`name`, `params
|
|
1387
|
+
> **runAsSync**(`name`, `params?`): `any`
|
|
1392
1388
|
|
|
1393
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:708](https://github.com/isdk/ai-tool.js/blob/
|
|
1389
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:708](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L708)
|
|
1394
1390
|
|
|
1395
1391
|
Synchronously executes another registered function by name.
|
|
1396
1392
|
This is a convenience method that forwards the call to the static `runSync()` method.
|
|
@@ -1423,9 +1419,9 @@ The result of the function execution.
|
|
|
1423
1419
|
|
|
1424
1420
|
### runSync()
|
|
1425
1421
|
|
|
1426
|
-
> **runSync**(`params
|
|
1422
|
+
> **runSync**(`params?`): `any`
|
|
1427
1423
|
|
|
1428
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:667](https://github.com/isdk/ai-tool.js/blob/
|
|
1424
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:667](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L667)
|
|
1429
1425
|
|
|
1430
1426
|
Executes the function synchronously with a named parameters object.
|
|
1431
1427
|
|
|
@@ -1457,7 +1453,7 @@ Will throw an error if an array of parameters is passed to a function that expec
|
|
|
1457
1453
|
|
|
1458
1454
|
> **runWithPos**(...`params`): `Promise`\<`any`\>
|
|
1459
1455
|
|
|
1460
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:755](https://github.com/isdk/ai-tool.js/blob/
|
|
1456
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:755](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L755)
|
|
1461
1457
|
|
|
1462
1458
|
Executes the function asynchronously using positional arguments.
|
|
1463
1459
|
Delegates to `runWithPosSync()` internally.
|
|
@@ -1486,7 +1482,7 @@ A promise that resolves with the result of the function execution.
|
|
|
1486
1482
|
|
|
1487
1483
|
> **runWithPosAs**(`name`, ...`params`): `Promise`\<`any`\>
|
|
1488
1484
|
|
|
1489
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:766](https://github.com/isdk/ai-tool.js/blob/
|
|
1485
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:766](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L766)
|
|
1490
1486
|
|
|
1491
1487
|
Asynchronously executes another function by name using positional arguments.
|
|
1492
1488
|
Delegates to `runWithPosAsSync()` internally.
|
|
@@ -1521,7 +1517,7 @@ A promise that resolves with the result of the function execution.
|
|
|
1521
1517
|
|
|
1522
1518
|
> **runWithPosAsSync**(`name`, ...`params`): `any`
|
|
1523
1519
|
|
|
1524
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:745](https://github.com/isdk/ai-tool.js/blob/
|
|
1520
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:745](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L745)
|
|
1525
1521
|
|
|
1526
1522
|
Synchronously executes another function by name using positional arguments.
|
|
1527
1523
|
This is a convenience wrapper around the static `runWithPosSync()` method.
|
|
@@ -1556,7 +1552,7 @@ The result of the function execution.
|
|
|
1556
1552
|
|
|
1557
1553
|
> **runWithPosSync**(...`params`): `any`
|
|
1558
1554
|
|
|
1559
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:731](https://github.com/isdk/ai-tool.js/blob/
|
|
1555
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:731](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L731)
|
|
1560
1556
|
|
|
1561
1557
|
Executes the function synchronously using positional arguments.
|
|
1562
1558
|
If the function expects named parameters, it converts the arguments automatically.
|
|
@@ -1617,7 +1613,7 @@ Returns a date converted to a string using the current locale.
|
|
|
1617
1613
|
|
|
1618
1614
|
### toObject()
|
|
1619
1615
|
|
|
1620
|
-
> **toObject**(`options
|
|
1616
|
+
> **toObject**(`options?`): `any`
|
|
1621
1617
|
|
|
1622
1618
|
Defined in: [property-manager.js/src/abstract.d.ts:181](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L181)
|
|
1623
1619
|
|
|
@@ -1663,7 +1659,7 @@ Returns a string representation of an object.
|
|
|
1663
1659
|
|
|
1664
1660
|
> **unregister**(): `any`
|
|
1665
1661
|
|
|
1666
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:619](https://github.com/isdk/ai-tool.js/blob/
|
|
1662
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:619](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L619)
|
|
1667
1663
|
|
|
1668
1664
|
Removes the current `ToolFunc` instance from the static registry.
|
|
1669
1665
|
|
|
@@ -1710,9 +1706,13 @@ target object. Returns the target object.
|
|
|
1710
1706
|
|
|
1711
1707
|
##### Type Parameters
|
|
1712
1708
|
|
|
1713
|
-
|
|
1709
|
+
###### T
|
|
1714
1710
|
|
|
1715
|
-
|
|
1711
|
+
`T` *extends* `object`
|
|
1712
|
+
|
|
1713
|
+
###### U
|
|
1714
|
+
|
|
1715
|
+
`U`
|
|
1716
1716
|
|
|
1717
1717
|
##### Parameters
|
|
1718
1718
|
|
|
@@ -1747,11 +1747,17 @@ target object. Returns the target object.
|
|
|
1747
1747
|
|
|
1748
1748
|
##### Type Parameters
|
|
1749
1749
|
|
|
1750
|
-
|
|
1750
|
+
###### T
|
|
1751
1751
|
|
|
1752
|
-
|
|
1752
|
+
`T` *extends* `object`
|
|
1753
1753
|
|
|
1754
|
-
|
|
1754
|
+
###### U
|
|
1755
|
+
|
|
1756
|
+
`U`
|
|
1757
|
+
|
|
1758
|
+
###### V
|
|
1759
|
+
|
|
1760
|
+
`V`
|
|
1755
1761
|
|
|
1756
1762
|
##### Parameters
|
|
1757
1763
|
|
|
@@ -1792,13 +1798,21 @@ target object. Returns the target object.
|
|
|
1792
1798
|
|
|
1793
1799
|
##### Type Parameters
|
|
1794
1800
|
|
|
1795
|
-
|
|
1801
|
+
###### T
|
|
1796
1802
|
|
|
1797
|
-
|
|
1803
|
+
`T` *extends* `object`
|
|
1798
1804
|
|
|
1799
|
-
|
|
1805
|
+
###### U
|
|
1800
1806
|
|
|
1801
|
-
|
|
1807
|
+
`U`
|
|
1808
|
+
|
|
1809
|
+
###### V
|
|
1810
|
+
|
|
1811
|
+
`V`
|
|
1812
|
+
|
|
1813
|
+
###### W
|
|
1814
|
+
|
|
1815
|
+
`W`
|
|
1802
1816
|
|
|
1803
1817
|
##### Parameters
|
|
1804
1818
|
|
|
@@ -1927,7 +1941,7 @@ JavaScript object that contains one or more property descriptors.
|
|
|
1927
1941
|
|
|
1928
1942
|
### defineProperties()
|
|
1929
1943
|
|
|
1930
|
-
> `static` **defineProperties**(`aTarget`, `aProperties`, `recreate
|
|
1944
|
+
> `static` **defineProperties**(`aTarget`, `aProperties`, `recreate?`): `any`
|
|
1931
1945
|
|
|
1932
1946
|
Defined in: [property-manager.js/src/advance.d.ts:11](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/advance.d.ts#L11)
|
|
1933
1947
|
|
|
@@ -1967,7 +1981,9 @@ Adds a property to an object, or modifies attributes of an existing property.
|
|
|
1967
1981
|
|
|
1968
1982
|
#### Type Parameters
|
|
1969
1983
|
|
|
1970
|
-
|
|
1984
|
+
##### T
|
|
1985
|
+
|
|
1986
|
+
`T`
|
|
1971
1987
|
|
|
1972
1988
|
#### Parameters
|
|
1973
1989
|
|
|
@@ -2011,7 +2027,9 @@ Returns an array of key/values of the enumerable own properties of an object
|
|
|
2011
2027
|
|
|
2012
2028
|
##### Type Parameters
|
|
2013
2029
|
|
|
2014
|
-
|
|
2030
|
+
###### T
|
|
2031
|
+
|
|
2032
|
+
`T`
|
|
2015
2033
|
|
|
2016
2034
|
##### Parameters
|
|
2017
2035
|
|
|
@@ -2019,7 +2037,7 @@ Returns an array of key/values of the enumerable own properties of an object
|
|
|
2019
2037
|
|
|
2020
2038
|
Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
|
|
2021
2039
|
|
|
2022
|
-
\{\} | `ArrayLike`\<`T`\>
|
|
2040
|
+
\{\[`s`: `string`\]: `T`; \} | `ArrayLike`\<`T`\>
|
|
2023
2041
|
|
|
2024
2042
|
##### Returns
|
|
2025
2043
|
|
|
@@ -2065,7 +2083,9 @@ Prevents the modification of existing property attributes and values, and preven
|
|
|
2065
2083
|
|
|
2066
2084
|
##### Type Parameters
|
|
2067
2085
|
|
|
2068
|
-
|
|
2086
|
+
###### T
|
|
2087
|
+
|
|
2088
|
+
`T` *extends* `Function`
|
|
2069
2089
|
|
|
2070
2090
|
##### Parameters
|
|
2071
2091
|
|
|
@@ -2093,9 +2113,13 @@ Prevents the modification of existing property attributes and values, and preven
|
|
|
2093
2113
|
|
|
2094
2114
|
##### Type Parameters
|
|
2095
2115
|
|
|
2096
|
-
|
|
2116
|
+
###### T
|
|
2117
|
+
|
|
2118
|
+
`T` *extends* `object`
|
|
2097
2119
|
|
|
2098
|
-
|
|
2120
|
+
###### U
|
|
2121
|
+
|
|
2122
|
+
`U` *extends* `string` \| `number` \| `bigint` \| `boolean` \| `symbol`
|
|
2099
2123
|
|
|
2100
2124
|
##### Parameters
|
|
2101
2125
|
|
|
@@ -2123,7 +2147,9 @@ Prevents the modification of existing property attributes and values, and preven
|
|
|
2123
2147
|
|
|
2124
2148
|
##### Type Parameters
|
|
2125
2149
|
|
|
2126
|
-
|
|
2150
|
+
###### T
|
|
2151
|
+
|
|
2152
|
+
`T`
|
|
2127
2153
|
|
|
2128
2154
|
##### Parameters
|
|
2129
2155
|
|
|
@@ -2155,7 +2181,9 @@ Returns an object created by key-value entries for properties and methods
|
|
|
2155
2181
|
|
|
2156
2182
|
##### Type Parameters
|
|
2157
2183
|
|
|
2158
|
-
|
|
2184
|
+
###### T
|
|
2185
|
+
|
|
2186
|
+
`T` = `any`
|
|
2159
2187
|
|
|
2160
2188
|
##### Parameters
|
|
2161
2189
|
|
|
@@ -2203,7 +2231,7 @@ An iterable object that contains key-value entries for properties and methods.
|
|
|
2203
2231
|
|
|
2204
2232
|
> `static` **get**(`name`): [`ToolFunc`](ToolFunc.md)
|
|
2205
2233
|
|
|
2206
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:319](https://github.com/isdk/ai-tool.js/blob/
|
|
2234
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:319](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L319)
|
|
2207
2235
|
|
|
2208
2236
|
Retrieves a registered function by its name or alias.
|
|
2209
2237
|
|
|
@@ -2231,7 +2259,7 @@ The `ToolFunc` instance if found, otherwise `undefined`.
|
|
|
2231
2259
|
|
|
2232
2260
|
> `static` **getAllByTag**(`tagName`): [`ToolFunc`](ToolFunc.md)[]
|
|
2233
2261
|
|
|
2234
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:365](https://github.com/isdk/ai-tool.js/blob/
|
|
2262
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:365](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L365)
|
|
2235
2263
|
|
|
2236
2264
|
Retrieves all registered functions that have a specific tag.
|
|
2237
2265
|
|
|
@@ -2259,7 +2287,7 @@ An array of matching `ToolFunc` instances.
|
|
|
2259
2287
|
|
|
2260
2288
|
> `static` **getByTag**(`tagName`): `undefined` \| [`ToolFunc`](ToolFunc.md)
|
|
2261
2289
|
|
|
2262
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:340](https://github.com/isdk/ai-tool.js/blob/
|
|
2290
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:340](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L340)
|
|
2263
2291
|
|
|
2264
2292
|
Finds the first registered function that has a specific tag.
|
|
2265
2293
|
|
|
@@ -2287,7 +2315,7 @@ The first matching `ToolFunc` instance, or `undefined` if none is found.
|
|
|
2287
2315
|
|
|
2288
2316
|
> `static` **getFunc**(`name`): `any`
|
|
2289
2317
|
|
|
2290
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:431](https://github.com/isdk/ai-tool.js/blob/
|
|
2318
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:431](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L431)
|
|
2291
2319
|
|
|
2292
2320
|
Retrieves a bound, runnable function reference for a registered function.
|
|
2293
2321
|
This reference is suitable for execution with an object of named parameters.
|
|
@@ -2316,7 +2344,7 @@ A bound function reference, or `undefined` if not found.
|
|
|
2316
2344
|
|
|
2317
2345
|
> `static` **getFuncWithPos**(`name`): `any`
|
|
2318
2346
|
|
|
2319
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:472](https://github.com/isdk/ai-tool.js/blob/
|
|
2347
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:472](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L472)
|
|
2320
2348
|
|
|
2321
2349
|
Retrieves a bound, runnable function reference for a registered function.
|
|
2322
2350
|
This reference is suitable for execution with positional arguments.
|
|
@@ -2384,7 +2412,9 @@ Returns an object containing all own property descriptors of an object
|
|
|
2384
2412
|
|
|
2385
2413
|
#### Type Parameters
|
|
2386
2414
|
|
|
2387
|
-
|
|
2415
|
+
##### T
|
|
2416
|
+
|
|
2417
|
+
`T`
|
|
2388
2418
|
|
|
2389
2419
|
#### Parameters
|
|
2390
2420
|
|
|
@@ -2505,7 +2535,7 @@ The object that references the prototype.
|
|
|
2505
2535
|
|
|
2506
2536
|
> `static` **hasAsyncFeature**(`feature`): `boolean`
|
|
2507
2537
|
|
|
2508
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:388](https://github.com/isdk/ai-tool.js/blob/
|
|
2538
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:388](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L388)
|
|
2509
2539
|
|
|
2510
2540
|
Checks if any registered function has a specific asynchronous feature.
|
|
2511
2541
|
|
|
@@ -2725,7 +2755,7 @@ Object that contains the properties and methods. This can be an object that you
|
|
|
2725
2755
|
|
|
2726
2756
|
> `static` **list**(): [`Funcs`](../interfaces/Funcs.md)
|
|
2727
2757
|
|
|
2728
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:331](https://github.com/isdk/ai-tool.js/blob/
|
|
2758
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:331](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L331)
|
|
2729
2759
|
|
|
2730
2760
|
Returns the complete map of all registered functions.
|
|
2731
2761
|
|
|
@@ -2751,7 +2781,9 @@ Prevents the addition of new properties to an object.
|
|
|
2751
2781
|
|
|
2752
2782
|
#### Type Parameters
|
|
2753
2783
|
|
|
2754
|
-
|
|
2784
|
+
##### T
|
|
2785
|
+
|
|
2786
|
+
`T`
|
|
2755
2787
|
|
|
2756
2788
|
#### Parameters
|
|
2757
2789
|
|
|
@@ -2777,7 +2809,7 @@ Object to make non-extensible.
|
|
|
2777
2809
|
|
|
2778
2810
|
> `static` **register**(`name`, `options`): `boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2779
2811
|
|
|
2780
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:495](https://github.com/isdk/ai-tool.js/blob/
|
|
2812
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:495](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L495)
|
|
2781
2813
|
|
|
2782
2814
|
Registers a new tool function.
|
|
2783
2815
|
|
|
@@ -2801,10 +2833,6 @@ The function's configuration.
|
|
|
2801
2833
|
|
|
2802
2834
|
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2803
2835
|
|
|
2804
|
-
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2805
|
-
|
|
2806
|
-
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2807
|
-
|
|
2808
2836
|
##### Inherited from
|
|
2809
2837
|
|
|
2810
2838
|
[`ServerTools`](ServerTools.md).[`register`](ServerTools.md#register-2)
|
|
@@ -2813,7 +2841,7 @@ The new `ToolFunc` instance, or `false` if a function with that name already exi
|
|
|
2813
2841
|
|
|
2814
2842
|
> `static` **register**(`func`, `options`): `boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2815
2843
|
|
|
2816
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:496](https://github.com/isdk/ai-tool.js/blob/
|
|
2844
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:496](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L496)
|
|
2817
2845
|
|
|
2818
2846
|
Registers a new tool function.
|
|
2819
2847
|
|
|
@@ -2837,19 +2865,15 @@ The function's configuration.
|
|
|
2837
2865
|
|
|
2838
2866
|
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2839
2867
|
|
|
2840
|
-
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2841
|
-
|
|
2842
|
-
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2843
|
-
|
|
2844
2868
|
##### Inherited from
|
|
2845
2869
|
|
|
2846
2870
|
[`ServerTools`](ServerTools.md).[`register`](ServerTools.md#register-2)
|
|
2847
2871
|
|
|
2848
2872
|
#### Call Signature
|
|
2849
2873
|
|
|
2850
|
-
> `static` **register**(`name`, `options
|
|
2874
|
+
> `static` **register**(`name`, `options?`): `boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2851
2875
|
|
|
2852
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:497](https://github.com/isdk/ai-tool.js/blob/
|
|
2876
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:497](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L497)
|
|
2853
2877
|
|
|
2854
2878
|
Registers a new tool function.
|
|
2855
2879
|
|
|
@@ -2873,10 +2897,6 @@ The function's configuration.
|
|
|
2873
2897
|
|
|
2874
2898
|
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2875
2899
|
|
|
2876
|
-
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2877
|
-
|
|
2878
|
-
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
2879
|
-
|
|
2880
2900
|
##### Inherited from
|
|
2881
2901
|
|
|
2882
2902
|
[`ServerTools`](ServerTools.md).[`register`](ServerTools.md#register-2)
|
|
@@ -2885,9 +2905,9 @@ The new `ToolFunc` instance, or `false` if a function with that name already exi
|
|
|
2885
2905
|
|
|
2886
2906
|
### run()
|
|
2887
2907
|
|
|
2888
|
-
> `static` **run**(`name`, `params
|
|
2908
|
+
> `static` **run**(`name`, `params?`): `Promise`\<`any`\>
|
|
2889
2909
|
|
|
2890
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:402](https://github.com/isdk/ai-tool.js/blob/
|
|
2910
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:402](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L402)
|
|
2891
2911
|
|
|
2892
2912
|
Asynchronously executes a registered function by name with named parameters.
|
|
2893
2913
|
|
|
@@ -2923,9 +2943,9 @@ If the function with the given name is not found.
|
|
|
2923
2943
|
|
|
2924
2944
|
### runSync()
|
|
2925
2945
|
|
|
2926
|
-
> `static` **runSync**(`name`, `params
|
|
2946
|
+
> `static` **runSync**(`name`, `params?`): `any`
|
|
2927
2947
|
|
|
2928
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:417](https://github.com/isdk/ai-tool.js/blob/
|
|
2948
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:417](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L417)
|
|
2929
2949
|
|
|
2930
2950
|
Synchronously executes a registered function by name with named parameters.
|
|
2931
2951
|
|
|
@@ -2963,7 +2983,7 @@ If the function with the given name is not found.
|
|
|
2963
2983
|
|
|
2964
2984
|
> `static` **runWithPos**(`name`, ...`params`): `Promise`\<`any`\>
|
|
2965
2985
|
|
|
2966
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:443](https://github.com/isdk/ai-tool.js/blob/
|
|
2986
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:443](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L443)
|
|
2967
2987
|
|
|
2968
2988
|
Asynchronously executes a function using positional arguments.
|
|
2969
2989
|
|
|
@@ -3001,7 +3021,7 @@ If the function with the given name is not found.
|
|
|
3001
3021
|
|
|
3002
3022
|
> `static` **runWithPosSync**(`name`, ...`params`): `any`
|
|
3003
3023
|
|
|
3004
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:458](https://github.com/isdk/ai-tool.js/blob/
|
|
3024
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:458](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L458)
|
|
3005
3025
|
|
|
3006
3026
|
Synchronously executes a function using positional arguments.
|
|
3007
3027
|
|
|
@@ -3045,7 +3065,9 @@ Prevents the modification of attributes of existing properties, and prevents the
|
|
|
3045
3065
|
|
|
3046
3066
|
#### Type Parameters
|
|
3047
3067
|
|
|
3048
|
-
|
|
3068
|
+
##### T
|
|
3069
|
+
|
|
3070
|
+
`T`
|
|
3049
3071
|
|
|
3050
3072
|
#### Parameters
|
|
3051
3073
|
|
|
@@ -3069,7 +3091,7 @@ Object on which to lock the attributes.
|
|
|
3069
3091
|
|
|
3070
3092
|
> `static` **setApiRoot**(`v`): `void`
|
|
3071
3093
|
|
|
3072
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/server-tools.ts:61](https://github.com/isdk/ai-tool.js/blob/
|
|
3094
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/server-tools.ts:61](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/server-tools.ts#L61)
|
|
3073
3095
|
|
|
3074
3096
|
#### Parameters
|
|
3075
3097
|
|
|
@@ -3123,7 +3145,7 @@ The value of the new prototype or null.
|
|
|
3123
3145
|
|
|
3124
3146
|
> `static` **toJSON**(): `object`
|
|
3125
3147
|
|
|
3126
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/server-tools.ts:74](https://github.com/isdk/ai-tool.js/blob/
|
|
3148
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/server-tools.ts:74](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/server-tools.ts#L74)
|
|
3127
3149
|
|
|
3128
3150
|
Serializes all registered `ServerTools` instances into a JSON object.
|
|
3129
3151
|
This method is typically called by a transport's discovery endpoint.
|
|
@@ -3147,7 +3169,7 @@ A map of serializable tool definitions.
|
|
|
3147
3169
|
|
|
3148
3170
|
> `static` **unregister**(`name`): `undefined` \| [`ToolFunc`](ToolFunc.md)
|
|
3149
3171
|
|
|
3150
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:547](https://github.com/isdk/ai-tool.js/blob/
|
|
3172
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:547](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/tool-func.ts#L547)
|
|
3151
3173
|
|
|
3152
3174
|
Unregisters a function by its name, also removing any associated aliases.
|
|
3153
3175
|
|
|
@@ -3183,7 +3205,9 @@ Returns an array of values of the enumerable own properties of an object
|
|
|
3183
3205
|
|
|
3184
3206
|
##### Type Parameters
|
|
3185
3207
|
|
|
3186
|
-
|
|
3208
|
+
###### T
|
|
3209
|
+
|
|
3210
|
+
`T`
|
|
3187
3211
|
|
|
3188
3212
|
##### Parameters
|
|
3189
3213
|
|
|
@@ -3191,7 +3215,7 @@ Returns an array of values of the enumerable own properties of an object
|
|
|
3191
3215
|
|
|
3192
3216
|
Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
|
|
3193
3217
|
|
|
3194
|
-
\{\} | `ArrayLike`\<`T`\>
|
|
3218
|
+
\{\[`s`: `string`\]: `T`; \} | `ArrayLike`\<`T`\>
|
|
3195
3219
|
|
|
3196
3220
|
##### Returns
|
|
3197
3221
|
|