@isdk/ai-tool 0.8.2 → 0.9.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-BIJ2JH4U.mjs +1 -0
- package/dist/chunk-OYMVHUDZ.mjs +1 -0
- package/dist/funcs.d.mts +16 -5
- package/dist/funcs.d.ts +16 -5
- package/dist/funcs.js +1 -1
- package/dist/funcs.mjs +1 -1
- package/dist/index.d.mts +839 -563
- package/dist/index.d.ts +839 -563
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/test/util.d.mts +1 -1
- package/dist/test/util.d.ts +1 -1
- package/dist/test/util.js +1 -1
- package/dist/test/util.mjs +1 -1
- package/docs/api/@isdk/namespaces/ClientTools/README.md +11 -0
- package/docs/api/@isdk/namespaces/ClientTools/functions/get.md +27 -0
- package/docs/api/@isdk/namespaces/EventStates/variables/ABORT.md +1 -1
- package/docs/api/@isdk/namespaces/EventStates/variables/CONTINUE.md +1 -1
- package/docs/api/@isdk/namespaces/EventStates/variables/DONE.md +1 -1
- package/docs/api/@isdk/namespaces/EventStates/variables/STOPPED.md +1 -1
- package/docs/api/classes/BinarySemaphore.md +148 -67
- package/docs/api/classes/CancelableAbility.md +95 -43
- package/docs/api/classes/ClientToolTransport.md +31 -16
- package/docs/api/classes/ClientTools.md +868 -158
- package/docs/api/classes/CmdArgLexer.md +82 -0
- package/docs/api/classes/CmdArgParser.md +56 -0
- package/docs/api/classes/ConfigFile.md +6 -6
- package/docs/api/classes/EnvPromptTemplate.md +224 -52
- package/docs/api/classes/EventClient.md +902 -192
- package/docs/api/classes/EventEmitter.md +62 -12
- package/docs/api/classes/EventServer.md +895 -182
- package/docs/api/classes/EventToolFunc.md +801 -123
- package/docs/api/classes/FStringPromptTemplate.md +224 -52
- package/docs/api/classes/FewShotPromptTemplate.md +231 -59
- package/docs/api/classes/GolangPromptTemplate.md +224 -52
- package/docs/api/classes/HttpClientToolTransport.md +33 -19
- package/docs/api/classes/HttpServerToolTransport.md +15 -15
- package/docs/api/classes/IntSet.md +21 -21
- package/docs/api/classes/MailboxClientTransport.md +398 -0
- package/docs/api/classes/MailboxServerTransport.md +433 -0
- package/docs/api/classes/PromptExampleSelector.md +11 -11
- package/docs/api/classes/PromptTemplate.md +199 -51
- package/docs/api/classes/ReadableStreamError.md +2 -2
- package/docs/api/classes/ResClientTools.md +875 -165
- package/docs/api/classes/ResServerTools.md +869 -156
- package/docs/api/classes/RpcMethodsClientTool.md +870 -160
- package/docs/api/classes/RpcMethodsServerTool.md +865 -152
- package/docs/api/classes/SSEChannel.md +23 -23
- package/docs/api/classes/Semaphore.md +148 -76
- package/docs/api/classes/ServerToolTransport.md +14 -13
- package/docs/api/classes/ServerTools.md +854 -138
- package/docs/api/classes/SignalGate.md +12 -12
- package/docs/api/classes/SseClientPubSubTransport.md +4 -4
- package/docs/api/classes/SseServerPubSubTransport.md +13 -13
- package/docs/api/classes/TaskAbortController.md +33 -11
- package/docs/api/classes/ToolFunc.md +725 -119
- 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/CmdArgTokenType.md +129 -0
- package/docs/api/enumerations/HashAlgorithm.md +38 -12
- package/docs/api/functions/AIArgProcessor.md +8 -17
- package/docs/api/functions/AIStream.md +1 -1
- package/docs/api/functions/ChoiceArgProcessor.md +13 -15
- package/docs/api/functions/DefaultDateFormat.md +1 -1
- package/docs/api/functions/ObjectArgsToArgsInfo.md +11 -9
- package/docs/api/functions/RateLimit.md +33 -6
- package/docs/api/functions/TemplateArgProcessor.md +13 -15
- package/docs/api/functions/assignDirs.md +1 -1
- package/docs/api/functions/beforeShutdown.md +3 -3
- package/docs/api/functions/calcPerplexity.md +3 -3
- package/docs/api/functions/calcPerplexitySimple.md +3 -3
- package/docs/api/functions/cmdArgEvaluate.md +28 -0
- package/docs/api/functions/cmdArgsToMergedObject.md +34 -0
- 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 +23 -19
- package/docs/api/functions/createEmptyReadableStream.md +1 -1
- package/docs/api/functions/createEndWithRepetitionDetector.md +4 -4
- package/docs/api/functions/createEventStreamTransformer.md +1 -1
- package/docs/api/functions/createHfValueFunc.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 +3 -1
- package/docs/api/functions/evaluateExpression.md +40 -0
- package/docs/api/functions/eventable.md +1 -1
- package/docs/api/functions/expandConfig.md +1 -1
- package/docs/api/functions/expandEnv.md +1 -1
- package/docs/api/functions/expandObjEnv.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/extNameLevel.md +1 -1
- package/docs/api/functions/extractCodeBlock.md +51 -0
- package/docs/api/functions/fileIsExists.md +3 -3
- package/docs/api/functions/filterValidFnScope.md +3 -3
- package/docs/api/functions/findIndexNonEmptyFrom.md +1 -1
- package/docs/api/functions/findPort.md +13 -5
- package/docs/api/functions/formatTextWithSpace.md +1 -1
- package/docs/api/functions/funcGetMeta.md +1 -1
- package/docs/api/functions/funcWithMeta.md +4 -4
- 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/getEnvVairables.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/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 +3 -3
- package/docs/api/functions/hash.md +25 -4
- package/docs/api/functions/hashFile.md +1 -1
- package/docs/api/functions/hashObject.md +23 -1
- package/docs/api/functions/hashStream.md +25 -4
- package/docs/api/functions/initShutdown.md +1 -1
- package/docs/api/functions/isIdentifier.md +30 -0
- package/docs/api/functions/isLangUsingSpaces.md +1 -1
- package/docs/api/functions/isListItemString.md +3 -3
- package/docs/api/functions/isModelNameMatched.md +3 -3
- package/docs/api/functions/isPathIdentifier.md +23 -0
- package/docs/api/functions/isPunctuationChar.md +1 -1
- package/docs/api/functions/isQuoted.md +4 -1
- package/docs/api/functions/isRegExp.md +20 -1
- package/docs/api/functions/isSameString.md +1 -1
- package/docs/api/functions/isSectionString.md +3 -3
- package/docs/api/functions/isSentenceEnding.md +1 -1
- package/docs/api/functions/isSepLineString.md +3 -3
- package/docs/api/functions/isStrWrapped.md +3 -1
- package/docs/api/functions/isSubdirectory.md +1 -1
- package/docs/api/functions/isTitleString.md +3 -3
- package/docs/api/functions/isValidFilename.md +1 -1
- package/docs/api/functions/isValidFilepath.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 +3 -3
- 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 +21 -4
- package/docs/api/functions/parseJsJson.md +1 -1
- package/docs/api/functions/parseJsJsonSimpleSync.md +1 -1
- package/docs/api/functions/parseObjectArguments.md +17 -33
- package/docs/api/functions/parseYaml.md +1 -1
- package/docs/api/functions/prependNewlineIfMultiline.md +39 -0
- package/docs/api/functions/pruneSubdirectories.md +1 -1
- package/docs/api/functions/pruneSubdirectoriesInPlace.md +1 -1
- package/docs/api/functions/quoteStr.md +4 -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/registerYamlTag.md +2 -2
- 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 +3 -18
- package/docs/api/functions/restoreFromPlacehoders.md +2 -20
- 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 +2 -2
- package/docs/api/functions/simplifyObjectArguments.md +4 -1
- package/docs/api/functions/simplifyResult.md +34 -0
- 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/stringifyYaml.md +1 -1
- package/docs/api/functions/stripConsoleColor.md +1 -1
- package/docs/api/functions/textToDate.md +1 -1
- package/docs/api/functions/textify.md +43 -0
- package/docs/api/functions/toDateTime.md +3 -3
- package/docs/api/functions/toRegExp.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/wrapEventEmitter.md +1 -1
- package/docs/api/functions/wrapFlagValue.md +29 -0
- package/docs/api/functions/xxhash.md +27 -6
- package/docs/api/functions/xxhash32.md +22 -4
- package/docs/api/functions/xxhash64.md +22 -4
- package/docs/api/functions/xxhashAsStr.md +27 -6
- package/docs/api/functions/yieldExec.md +1 -1
- package/docs/api/globals.md +51 -18
- package/docs/api/interfaces/AIChatAssistantMessageParam.md +14 -14
- package/docs/api/interfaces/AIChatContentPartBase.md +26 -0
- package/docs/api/interfaces/AIChatContentPartImage.md +15 -3
- package/docs/api/interfaces/AIChatContentPartText.md +15 -3
- package/docs/api/interfaces/AIChatMessageParamBase.md +9 -9
- package/docs/api/interfaces/AIChatMessageToolCall.md +12 -8
- package/docs/api/interfaces/AIChatSystemMessageParam.md +10 -10
- package/docs/api/interfaces/AIChatToolChoiceFuncObject.md +3 -3
- package/docs/api/interfaces/AIChatToolChoiceObject.md +2 -2
- package/docs/api/interfaces/AIChatToolDefinition.md +45 -0
- package/docs/api/interfaces/AIChatToolFunc.md +5 -5
- package/docs/api/interfaces/AIChatToolFuncParam.md +3 -3
- package/docs/api/interfaces/AIChatToolMessageParam.md +13 -13
- package/docs/api/interfaces/AIChatToolParam.md +2 -2
- package/docs/api/interfaces/AIChatToolTypeObject.md +2 -2
- package/docs/api/interfaces/AIChatUserMessageParam.md +14 -14
- package/docs/api/interfaces/AIResult.md +7 -7
- 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 +16 -16
- package/docs/api/interfaces/BinarySemaphoreAcquireOptions.md +9 -2
- package/docs/api/interfaces/BinarySemaphoreOptions.md +22 -5
- package/docs/api/interfaces/BinarySemaphoreReleaseOptions.md +7 -5
- package/docs/api/interfaces/CancelableAbilityOptions.md +4 -4
- package/docs/api/interfaces/ClientFuncItem.md +70 -19
- package/docs/api/interfaces/CmdArgAIChoiceConfig.md +97 -0
- package/docs/api/interfaces/CmdArgArgsInfo.md +31 -0
- package/docs/api/interfaces/CmdArgContext.md +103 -0
- package/docs/api/interfaces/CmdArgFlagMetadata.md +21 -0
- package/docs/api/interfaces/CmdArgMapResult.md +41 -0
- package/docs/api/interfaces/CmdArgParseResult.md +51 -0
- package/docs/api/interfaces/CmdArgParsedCommand.md +41 -0
- package/docs/api/interfaces/CmdArgParserOptions.md +225 -0
- package/docs/api/interfaces/CmdArgProcessorResultOptions.md +22 -0
- package/docs/api/interfaces/CmdArgSimplifyOptions.md +101 -0
- package/docs/api/interfaces/CmdArgToken.md +51 -0
- package/docs/api/interfaces/EventClientFuncParams.md +5 -5
- package/docs/api/interfaces/EventServerFuncParams.md +21 -7
- package/docs/api/interfaces/FewShotPromptTemplateOptions.md +18 -6
- package/docs/api/interfaces/FuncItem.md +19 -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 +36 -5
- package/docs/api/interfaces/IClientToolTransport.md +24 -10
- package/docs/api/interfaces/IFileMetaInfo.md +8 -8
- package/docs/api/interfaces/IPubSubClientTransport.md +4 -4
- package/docs/api/interfaces/IPubSubServerTransport.md +14 -14
- 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/MailboxClientOptions.md +74 -0
- package/docs/api/interfaces/MailboxServerOptions.md +69 -0
- package/docs/api/interfaces/ProbabilityItem.md +4 -4
- package/docs/api/interfaces/PromptExampleSelectorOptions.md +3 -3
- package/docs/api/interfaces/PromptTemplateOptions.md +8 -0
- package/docs/api/interfaces/PubSubClientStream.md +11 -11
- package/docs/api/interfaces/PubSubServerSession.md +8 -8
- package/docs/api/interfaces/RegisterOptions.md +298 -0
- package/docs/api/interfaces/RemoteFuncItem.md +63 -20
- package/docs/api/interfaces/ReplacePlacehoderOptions.md +5 -5
- package/docs/api/interfaces/ResClientFuncParams.md +3 -3
- package/docs/api/interfaces/ResServerFuncParams.md +20 -6
- package/docs/api/interfaces/RpcMethodsClientFuncParams.md +2 -2
- package/docs/api/interfaces/RpcMethodsServerFuncParams.md +18 -4
- package/docs/api/interfaces/SanitizeFilenameOptions.md +3 -3
- package/docs/api/interfaces/SectionStringOptions.md +3 -3
- package/docs/api/interfaces/SemaphoreOptions.md +30 -7
- package/docs/api/interfaces/SemaphoreTaskItem.md +18 -5
- package/docs/api/interfaces/ServerFuncItem.md +71 -20
- package/docs/api/interfaces/ServerFuncParams.md +14 -4
- package/docs/api/interfaces/SplitSentenceOptions.md +5 -5
- package/docs/api/interfaces/StreamCallbacksAndOptions.md +80 -7
- package/docs/api/interfaces/TaskAbortControllers.md +2 -2
- package/docs/api/interfaces/TaskPromise.md +6 -6
- package/docs/api/interfaces/TextifyInlineOptions.md +51 -0
- package/docs/api/interfaces/TextifyOptions.md +108 -0
- package/docs/api/interfaces/ToolFuncContext.md +73 -0
- package/docs/api/interfaces/ToolFuncPackage.md +4 -4
- package/docs/api/interfaces/ToolFuncRegistryIsolateOptions.md +41 -0
- package/docs/api/interfaces/UnregisterOptions.md +56 -0
- package/docs/api/type-aliases/AIChatContentPart.md +2 -2
- package/docs/api/type-aliases/AIChatMessageParam.md +1 -1
- package/docs/api/type-aliases/AIChatRole.md +2 -2
- package/docs/api/type-aliases/AIChatTemplateCaps.md +239 -0
- 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/ArgProcessor.md +24 -0
- 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/CmdArgFlagValue.md +14 -0
- package/docs/api/type-aliases/CmdArgFlagsRecord.md +13 -0
- 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 +4 -1
- package/docs/api/type-aliases/SimplifiedResultType.md +14 -0
- package/docs/api/type-aliases/StreamCloseStatus.md +16 -0
- package/docs/api/type-aliases/TFunc.md +1 -1
- package/docs/api/type-aliases/TextifyInlineStyleMode.md +16 -0
- package/docs/api/type-aliases/TextifyStringQuoting.md +16 -0
- package/docs/api/type-aliases/UUIDVersions.md +3 -1
- package/docs/api/variables/AIChatRoles.md +2 -2
- 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/CMD_ARG_FLAG_SYMBOL.md +21 -0
- package/docs/api/variables/CMD_ARG_PROCESSOR_RESULT.md +22 -0
- package/docs/api/variables/CMD_ARG_UNRESOLVED_SYMBOL.md +16 -0
- package/docs/api/variables/ClientEventPrefix.md +2 -2
- package/docs/api/variables/ClientToolFuncSchema.md +27 -17
- package/docs/api/variables/DEFAULT_CONFIG_NAME.md +1 -1
- package/docs/api/variables/DefaultAsyncSemaphoreCapacity.md +4 -1
- package/docs/api/variables/EventBusName.md +2 -2
- package/docs/api/variables/EventName.md +2 -2
- package/docs/api/variables/FilenameReservedRegex.md +1 -1
- package/docs/api/variables/FuncMetaSymbol.md +2 -2
- package/docs/api/variables/IDENTIFIER_REGEX.md +14 -0
- 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/PATH_IDENTIFIER_REGEX.md +13 -0
- package/docs/api/variables/RESERVED_WORDS.md +13 -0
- package/docs/api/variables/RStreamErrCode.md +1 -1
- package/docs/api/variables/RemoteToolFuncSchema.md +36 -4
- package/docs/api/variables/ResponseRStreamErrCode.md +1 -1
- package/docs/api/variables/RpcMethodsClientToolSchema.md +2 -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 +27 -17
- 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 +13 -13
- package/docs/api/variables/WindowsReservedNameRegex.md +1 -1
- package/docs/api/variables/backendEventable.md +23 -3
- package/docs/api/variables/base32768.md +2 -2
- 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 +23 -3
- package/docs/api/variables/wait.md +1 -1
- package/docs/transport.dev.md +206 -0
- package/package.json +12 -10
- package/dist/chunk-4FKBOPZI.mjs +0 -1
- package/dist/chunk-TGTHY57V.mjs +0 -1
- package/dist/find-port-qS1CZ9c-.d.mts +0 -3
- package/dist/find-port-qS1CZ9c-.d.ts +0 -3
- package/dist/index-BLW3R7VS.d.mts +0 -1826
- package/dist/index-BLW3R7VS.d.ts +0 -1826
- package/docs/api/@isdk/namespaces/uuidv5/README.md +0 -12
- package/docs/api/@isdk/namespaces/uuidv5/variables/DNS.md +0 -11
- package/docs/api/@isdk/namespaces/uuidv5/variables/URL.md +0 -11
- package/docs/api/functions/nanoid.md +0 -45
- package/docs/api/functions/parseObjectArgInfo.md +0 -33
- package/docs/api/functions/parseObjectArgumentInfos.md +0 -29
- package/docs/api/functions/parseObjectArgumentsAsArgInfos.md +0 -46
- package/docs/api/functions/uuidParse.md +0 -21
- package/docs/api/functions/uuidStringify.md +0 -25
- package/docs/api/functions/uuidValidate.md +0 -21
- package/docs/api/functions/uuidVersion.md +0 -21
- package/docs/api/functions/uuidv1.md +0 -61
- package/docs/api/functions/uuidv4.md +0 -61
- package/docs/api/functions/uuidv5.md +0 -69
- package/docs/api/functions/uuidv6.md +0 -61
- package/docs/api/functions/uuidv7.md +0 -61
- package/docs/api/interfaces/AIChoiceConfig.md +0 -65
- package/docs/api/interfaces/BinarySemaphoreReleaserFunc.md +0 -37
- package/docs/api/interfaces/ParseObjectArgumentOptions.md +0 -89
- package/docs/api/variables/uuidNIL.md +0 -11
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: BaseFunc
|
|
8
8
|
|
|
9
|
-
Defined in:
|
|
9
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:350
|
|
10
10
|
|
|
11
11
|
Represents a fully-defined tool function where the implementation is mandatory.
|
|
12
12
|
|
|
@@ -24,7 +24,7 @@ Represents a fully-defined tool function where the implementation is mandatory.
|
|
|
24
24
|
|
|
25
25
|
> `optional` **alias**: `string` \| `string`[]
|
|
26
26
|
|
|
27
|
-
Defined in:
|
|
27
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:258
|
|
28
28
|
|
|
29
29
|
Optional aliases for the function name.
|
|
30
30
|
|
|
@@ -38,7 +38,7 @@ Optional aliases for the function name.
|
|
|
38
38
|
|
|
39
39
|
> `optional` **asyncFeatures**: `number`
|
|
40
40
|
|
|
41
|
-
Defined in:
|
|
41
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:272
|
|
42
42
|
|
|
43
43
|
A bitmask representing asynchronous features supported by the function, built from `AsyncFeatureBits`.
|
|
44
44
|
This allows the system to understand if a function supports capabilities like cancellation or multi-tasking.
|
|
@@ -68,7 +68,7 @@ const func = new ToolFunc({
|
|
|
68
68
|
|
|
69
69
|
> `optional` **depends**: `object`
|
|
70
70
|
|
|
71
|
-
Defined in:
|
|
71
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:295
|
|
72
72
|
|
|
73
73
|
A map of dependencies this function has on other tool functions.
|
|
74
74
|
Declaring dependencies ensures that they are automatically registered when this function is registered.
|
|
@@ -107,7 +107,7 @@ mainFunc.register();
|
|
|
107
107
|
|
|
108
108
|
> `optional` **description**: `string`
|
|
109
109
|
|
|
110
|
-
Defined in:
|
|
110
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:302
|
|
111
111
|
|
|
112
112
|
A detailed description of what the function does.
|
|
113
113
|
|
|
@@ -121,7 +121,7 @@ A detailed description of what the function does.
|
|
|
121
121
|
|
|
122
122
|
> `optional` **isApi**: `boolean`
|
|
123
123
|
|
|
124
|
-
Defined in:
|
|
124
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:247
|
|
125
125
|
|
|
126
126
|
If true, indicates that this function should be treated as a server-side API.
|
|
127
127
|
|
|
@@ -135,7 +135,7 @@ If true, indicates that this function should be treated as a server-side API.
|
|
|
135
135
|
|
|
136
136
|
> `optional` **name**: `string`
|
|
137
137
|
|
|
138
|
-
Defined in:
|
|
138
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:204
|
|
139
139
|
|
|
140
140
|
The unique name of the function.
|
|
141
141
|
|
|
@@ -149,7 +149,7 @@ The unique name of the function.
|
|
|
149
149
|
|
|
150
150
|
> `optional` **params**: [`FuncParams`](FuncParams.md) \| [`FuncParam`](FuncParam.md)[]
|
|
151
151
|
|
|
152
|
-
Defined in:
|
|
152
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:209
|
|
153
153
|
|
|
154
154
|
Parameter definitions, which can be an object mapping names to definitions or an array for positional parameters.
|
|
155
155
|
|
|
@@ -163,7 +163,7 @@ Parameter definitions, which can be an object mapping names to definitions or an
|
|
|
163
163
|
|
|
164
164
|
> `optional` **result**: `string` \| `Record`\<`string`, `any`\>
|
|
165
165
|
|
|
166
|
-
Defined in:
|
|
166
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:214
|
|
167
167
|
|
|
168
168
|
The expected return type of the function, described as a string or a JSON schema object.
|
|
169
169
|
|
|
@@ -177,7 +177,7 @@ The expected return type of the function, described as a string or a JSON schema
|
|
|
177
177
|
|
|
178
178
|
> `optional` **scope**: `any`
|
|
179
179
|
|
|
180
|
-
Defined in:
|
|
180
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:219
|
|
181
181
|
|
|
182
182
|
The execution scope or context (`this`) for the function.
|
|
183
183
|
|
|
@@ -191,7 +191,7 @@ The execution scope or context (`this`) for the function.
|
|
|
191
191
|
|
|
192
192
|
> `optional` **setup**: (`this`, `options?`) => `void`
|
|
193
193
|
|
|
194
|
-
Defined in:
|
|
194
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:242
|
|
195
195
|
|
|
196
196
|
A lifecycle hook called once during the `ToolFunc` instance's initialization.
|
|
197
197
|
It allows for initial setup, state configuration, or property modification on the instance
|
|
@@ -237,7 +237,7 @@ console.log(myFunc.customState); // Outputs: 'configured'
|
|
|
237
237
|
|
|
238
238
|
> `optional` **stream**: `boolean`
|
|
239
239
|
|
|
240
|
-
Defined in:
|
|
240
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:253
|
|
241
241
|
|
|
242
242
|
If true, indicates that the function has the *capability* to stream its output.
|
|
243
243
|
Whether a specific call is streamed is determined by a `stream` property in the runtime parameters.
|
|
@@ -252,7 +252,7 @@ Whether a specific call is streamed is determined by a `stream` property in the
|
|
|
252
252
|
|
|
253
253
|
> `optional` **tags**: `string` \| `string`[]
|
|
254
254
|
|
|
255
|
-
Defined in:
|
|
255
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:224
|
|
256
256
|
|
|
257
257
|
Tags for grouping or filtering functions.
|
|
258
258
|
|
|
@@ -266,7 +266,7 @@ Tags for grouping or filtering functions.
|
|
|
266
266
|
|
|
267
267
|
> `optional` **title**: `string`
|
|
268
268
|
|
|
269
|
-
Defined in:
|
|
269
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:307
|
|
270
270
|
|
|
271
271
|
A concise, human-readable title for the function, often used in UI or by AI.
|
|
272
272
|
|
|
@@ -280,7 +280,7 @@ A concise, human-readable title for the function, often used in UI or by AI.
|
|
|
280
280
|
|
|
281
281
|
> **func**(...`params`): `any`
|
|
282
282
|
|
|
283
|
-
Defined in:
|
|
283
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:356
|
|
284
284
|
|
|
285
285
|
The actual function implementation.
|
|
286
286
|
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: BaseFuncItem
|
|
8
8
|
|
|
9
|
-
Defined in:
|
|
9
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:199
|
|
10
10
|
|
|
11
11
|
Base configuration for defining a tool function.
|
|
12
12
|
|
|
13
13
|
## Extended by
|
|
14
14
|
|
|
15
|
-
- [`RemoteFuncItem`](RemoteFuncItem.md)
|
|
16
|
-
- [`FuncItem`](FuncItem.md)
|
|
17
15
|
- [`BaseFunc`](BaseFunc.md)
|
|
16
|
+
- [`FuncItem`](FuncItem.md)
|
|
17
|
+
- [`RemoteFuncItem`](RemoteFuncItem.md)
|
|
18
18
|
|
|
19
19
|
## Properties
|
|
20
20
|
|
|
@@ -22,7 +22,7 @@ Base configuration for defining a tool function.
|
|
|
22
22
|
|
|
23
23
|
> `optional` **alias**: `string` \| `string`[]
|
|
24
24
|
|
|
25
|
-
Defined in:
|
|
25
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:258
|
|
26
26
|
|
|
27
27
|
Optional aliases for the function name.
|
|
28
28
|
|
|
@@ -32,7 +32,7 @@ Optional aliases for the function name.
|
|
|
32
32
|
|
|
33
33
|
> `optional` **asyncFeatures**: `number`
|
|
34
34
|
|
|
35
|
-
Defined in:
|
|
35
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:272
|
|
36
36
|
|
|
37
37
|
A bitmask representing asynchronous features supported by the function, built from `AsyncFeatureBits`.
|
|
38
38
|
This allows the system to understand if a function supports capabilities like cancellation or multi-tasking.
|
|
@@ -58,7 +58,7 @@ const func = new ToolFunc({
|
|
|
58
58
|
|
|
59
59
|
> `optional` **depends**: `object`
|
|
60
60
|
|
|
61
|
-
Defined in:
|
|
61
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:295
|
|
62
62
|
|
|
63
63
|
A map of dependencies this function has on other tool functions.
|
|
64
64
|
Declaring dependencies ensures that they are automatically registered when this function is registered.
|
|
@@ -93,7 +93,7 @@ mainFunc.register();
|
|
|
93
93
|
|
|
94
94
|
> `optional` **description**: `string`
|
|
95
95
|
|
|
96
|
-
Defined in:
|
|
96
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:302
|
|
97
97
|
|
|
98
98
|
A detailed description of what the function does.
|
|
99
99
|
|
|
@@ -103,7 +103,7 @@ A detailed description of what the function does.
|
|
|
103
103
|
|
|
104
104
|
> `optional` **isApi**: `boolean`
|
|
105
105
|
|
|
106
|
-
Defined in:
|
|
106
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:247
|
|
107
107
|
|
|
108
108
|
If true, indicates that this function should be treated as a server-side API.
|
|
109
109
|
|
|
@@ -113,7 +113,7 @@ If true, indicates that this function should be treated as a server-side API.
|
|
|
113
113
|
|
|
114
114
|
> `optional` **name**: `string`
|
|
115
115
|
|
|
116
|
-
Defined in:
|
|
116
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:204
|
|
117
117
|
|
|
118
118
|
The unique name of the function.
|
|
119
119
|
|
|
@@ -123,7 +123,7 @@ The unique name of the function.
|
|
|
123
123
|
|
|
124
124
|
> `optional` **params**: [`FuncParams`](FuncParams.md) \| [`FuncParam`](FuncParam.md)[]
|
|
125
125
|
|
|
126
|
-
Defined in:
|
|
126
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:209
|
|
127
127
|
|
|
128
128
|
Parameter definitions, which can be an object mapping names to definitions or an array for positional parameters.
|
|
129
129
|
|
|
@@ -133,7 +133,7 @@ Parameter definitions, which can be an object mapping names to definitions or an
|
|
|
133
133
|
|
|
134
134
|
> `optional` **result**: `string` \| `Record`\<`string`, `any`\>
|
|
135
135
|
|
|
136
|
-
Defined in:
|
|
136
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:214
|
|
137
137
|
|
|
138
138
|
The expected return type of the function, described as a string or a JSON schema object.
|
|
139
139
|
|
|
@@ -143,7 +143,7 @@ The expected return type of the function, described as a string or a JSON schema
|
|
|
143
143
|
|
|
144
144
|
> `optional` **scope**: `any`
|
|
145
145
|
|
|
146
|
-
Defined in:
|
|
146
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:219
|
|
147
147
|
|
|
148
148
|
The execution scope or context (`this`) for the function.
|
|
149
149
|
|
|
@@ -153,7 +153,7 @@ The execution scope or context (`this`) for the function.
|
|
|
153
153
|
|
|
154
154
|
> `optional` **setup**: (`this`, `options?`) => `void`
|
|
155
155
|
|
|
156
|
-
Defined in:
|
|
156
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:242
|
|
157
157
|
|
|
158
158
|
A lifecycle hook called once during the `ToolFunc` instance's initialization.
|
|
159
159
|
It allows for initial setup, state configuration, or property modification on the instance
|
|
@@ -195,7 +195,7 @@ console.log(myFunc.customState); // Outputs: 'configured'
|
|
|
195
195
|
|
|
196
196
|
> `optional` **stream**: `boolean`
|
|
197
197
|
|
|
198
|
-
Defined in:
|
|
198
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:253
|
|
199
199
|
|
|
200
200
|
If true, indicates that the function has the *capability* to stream its output.
|
|
201
201
|
Whether a specific call is streamed is determined by a `stream` property in the runtime parameters.
|
|
@@ -206,7 +206,7 @@ Whether a specific call is streamed is determined by a `stream` property in the
|
|
|
206
206
|
|
|
207
207
|
> `optional` **tags**: `string` \| `string`[]
|
|
208
208
|
|
|
209
|
-
Defined in:
|
|
209
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:224
|
|
210
210
|
|
|
211
211
|
Tags for grouping or filtering functions.
|
|
212
212
|
|
|
@@ -216,6 +216,6 @@ Tags for grouping or filtering functions.
|
|
|
216
216
|
|
|
217
217
|
> `optional` **title**: `string`
|
|
218
218
|
|
|
219
|
-
Defined in:
|
|
219
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:307
|
|
220
220
|
|
|
221
221
|
A concise, human-readable title for the function, often used in UI or by AI.
|
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: BinarySemaphoreAcquireOptions
|
|
8
8
|
|
|
9
|
-
Defined in:
|
|
9
|
+
Defined in: @isdk/util/dist/index.d.ts:659
|
|
10
|
+
|
|
11
|
+
获取信号量时的选项。
|
|
10
12
|
|
|
11
13
|
## Extended by
|
|
12
14
|
|
|
@@ -16,10 +18,15 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/async-semaphore.ts:28](ht
|
|
|
16
18
|
|
|
17
19
|
\[`n`: `string`\]: `any`
|
|
18
20
|
|
|
21
|
+
允许扩展其他自定义选项。
|
|
22
|
+
|
|
19
23
|
## Properties
|
|
20
24
|
|
|
21
25
|
### signal?
|
|
22
26
|
|
|
23
27
|
> `optional` **signal**: `AbortSignal`
|
|
24
28
|
|
|
25
|
-
Defined in:
|
|
29
|
+
Defined in: @isdk/util/dist/index.d.ts:664
|
|
30
|
+
|
|
31
|
+
可选的 AbortSignal,用于取消获取操作。
|
|
32
|
+
如果在获取到令牌前信号被中止,`acquire` 返回的 Promise 将被拒绝并抛出 `AbortError`。
|
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: BinarySemaphoreOptions
|
|
8
8
|
|
|
9
|
-
Defined in:
|
|
9
|
+
Defined in: @isdk/util/dist/index.d.ts:631
|
|
10
|
+
|
|
11
|
+
二进制信号量的配置选项。
|
|
10
12
|
|
|
11
13
|
## Extended by
|
|
12
14
|
|
|
@@ -18,7 +20,10 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/async-semaphore.ts:21](ht
|
|
|
18
20
|
|
|
19
21
|
> `optional` **capacity**: `number`
|
|
20
22
|
|
|
21
|
-
Defined in:
|
|
23
|
+
Defined in: @isdk/util/dist/index.d.ts:654
|
|
24
|
+
|
|
25
|
+
内部等待队列的初始预分配容量。
|
|
26
|
+
适用于高性能场景,开发者可以根据并发规模预估此值以减少动态扩容。
|
|
22
27
|
|
|
23
28
|
***
|
|
24
29
|
|
|
@@ -26,7 +31,11 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/async-semaphore.ts:25](ht
|
|
|
26
31
|
|
|
27
32
|
> `optional` **initFn**: () => `any`
|
|
28
33
|
|
|
29
|
-
Defined in:
|
|
34
|
+
Defined in: @isdk/util/dist/index.d.ts:637
|
|
35
|
+
|
|
36
|
+
用于初始化令牌的函数。
|
|
37
|
+
当信号量释放且没有等待任务时,如果未提供令牌,将调用此函数生成新令牌。
|
|
38
|
+
默认为 `() => '1'`。
|
|
30
39
|
|
|
31
40
|
#### Returns
|
|
32
41
|
|
|
@@ -38,7 +47,11 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/async-semaphore.ts:22](ht
|
|
|
38
47
|
|
|
39
48
|
> `optional` **pauseFn**: () => `void`
|
|
40
49
|
|
|
41
|
-
Defined in:
|
|
50
|
+
Defined in: @isdk/util/dist/index.d.ts:643
|
|
51
|
+
|
|
52
|
+
可选的暂停函数。
|
|
53
|
+
当等待队列开始积压(第一个任务进入队列)时调用,用于通知上游停止发送数据,
|
|
54
|
+
以避免产生过多的等待 Promise 导致内存溢出。
|
|
42
55
|
|
|
43
56
|
#### Returns
|
|
44
57
|
|
|
@@ -50,7 +63,11 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/async-semaphore.ts:23](ht
|
|
|
50
63
|
|
|
51
64
|
> `optional` **resumeFn**: () => `void`
|
|
52
65
|
|
|
53
|
-
Defined in:
|
|
66
|
+
Defined in: @isdk/util/dist/index.d.ts:649
|
|
67
|
+
|
|
68
|
+
可选的恢复函数。
|
|
69
|
+
当信号量有空闲槽位且之前已调用过 `pauseFn` 时调用。
|
|
70
|
+
如果定义了 `pauseFn`,则必须同时定义此函数。
|
|
54
71
|
|
|
55
72
|
#### Returns
|
|
56
73
|
|
|
@@ -6,20 +6,22 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: BinarySemaphoreReleaseOptions
|
|
8
8
|
|
|
9
|
-
Defined in:
|
|
9
|
+
Defined in: @isdk/util/dist/index.d.ts:673
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
- [`BinarySemaphoreReleaserFunc`](BinarySemaphoreReleaserFunc.md)
|
|
11
|
+
释放信号量时的选项。
|
|
14
12
|
|
|
15
13
|
## Indexable
|
|
16
14
|
|
|
17
15
|
\[`n`: `string`\]: `any`
|
|
18
16
|
|
|
17
|
+
允许扩展其他自定义选项。
|
|
18
|
+
|
|
19
19
|
## Properties
|
|
20
20
|
|
|
21
21
|
### token?
|
|
22
22
|
|
|
23
23
|
> `optional` **token**: `any`
|
|
24
24
|
|
|
25
|
-
Defined in:
|
|
25
|
+
Defined in: @isdk/util/dist/index.d.ts:677
|
|
26
|
+
|
|
27
|
+
可选的令牌。如果使用了自定义的 `initFn`,释放时应归还对应的令牌。
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: CancelableAbilityOptions
|
|
8
8
|
|
|
9
|
-
Defined in:
|
|
9
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:1004
|
|
10
10
|
|
|
11
11
|
## Extends
|
|
12
12
|
|
|
@@ -22,7 +22,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/cancelable-ability.ts:29]
|
|
|
22
22
|
|
|
23
23
|
> `optional` **asyncFeatures**: [`AsyncFeatures`](../enumerations/AsyncFeatures.md)
|
|
24
24
|
|
|
25
|
-
Defined in:
|
|
25
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:1005
|
|
26
26
|
|
|
27
27
|
***
|
|
28
28
|
|
|
@@ -78,7 +78,7 @@ Defined in: @isdk/ai-tools/node\_modules/.pnpm/custom-ability@2.0.1/node\_module
|
|
|
78
78
|
|
|
79
79
|
> `optional` **isReadyFn**: [`SemaphoreIsReadyFuncType`](../type-aliases/SemaphoreIsReadyFuncType.md)
|
|
80
80
|
|
|
81
|
-
Defined in:
|
|
81
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:1007
|
|
82
82
|
|
|
83
83
|
***
|
|
84
84
|
|
|
@@ -86,7 +86,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/cancelable-ability.ts:32]
|
|
|
86
86
|
|
|
87
87
|
> `optional` **maxTaskConcurrency**: `number`
|
|
88
88
|
|
|
89
|
-
Defined in:
|
|
89
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:1006
|
|
90
90
|
|
|
91
91
|
***
|
|
92
92
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: ClientFuncItem
|
|
8
8
|
|
|
9
|
-
Defined in:
|
|
9
|
+
Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index-359784IS.d.ts:191
|
|
10
10
|
|
|
11
11
|
Alias for `RemoteFuncItem` on the client side.
|
|
12
12
|
|
|
@@ -24,7 +24,7 @@ Alias for `RemoteFuncItem` on the client side.
|
|
|
24
24
|
|
|
25
25
|
> `optional` **action**: `"get"` \| `"post"` \| `"put"` \| `"delete"` \| `"patch"` \| `"list"` \| `"res"`
|
|
26
26
|
|
|
27
|
-
Defined in:
|
|
27
|
+
Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index-359784IS.d.ts:82
|
|
28
28
|
|
|
29
29
|
The action to be used for the remote call. This typically represents an RPC method name.
|
|
30
30
|
Only for RESTful HTTP transports, it might be mapped to a standard HTTP method (e.g., GET, POST)
|
|
@@ -39,7 +39,7 @@ Only for RESTful HTTP transports, it might be mapped to a standard HTTP method (
|
|
|
39
39
|
|
|
40
40
|
> `optional` **alias**: `string` \| `string`[]
|
|
41
41
|
|
|
42
|
-
Defined in:
|
|
42
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:258
|
|
43
43
|
|
|
44
44
|
Optional aliases for the function name.
|
|
45
45
|
|
|
@@ -53,7 +53,7 @@ Optional aliases for the function name.
|
|
|
53
53
|
|
|
54
54
|
> `optional` **apiRoot**: `string`
|
|
55
55
|
|
|
56
|
-
Defined in:
|
|
56
|
+
Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index-359784IS.d.ts:76
|
|
57
57
|
|
|
58
58
|
The root endpoint for the remote service.
|
|
59
59
|
|
|
@@ -71,7 +71,7 @@ Use `transport` instead.
|
|
|
71
71
|
|
|
72
72
|
> `optional` **asyncFeatures**: `number`
|
|
73
73
|
|
|
74
|
-
Defined in:
|
|
74
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:272
|
|
75
75
|
|
|
76
76
|
A bitmask representing asynchronous features supported by the function, built from `AsyncFeatureBits`.
|
|
77
77
|
This allows the system to understand if a function supports capabilities like cancellation or multi-tasking.
|
|
@@ -101,7 +101,7 @@ const func = new ToolFunc({
|
|
|
101
101
|
|
|
102
102
|
> `optional` **depends**: `object`
|
|
103
103
|
|
|
104
|
-
Defined in:
|
|
104
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:295
|
|
105
105
|
|
|
106
106
|
A map of dependencies this function has on other tool functions.
|
|
107
107
|
Declaring dependencies ensures that they are automatically registered when this function is registered.
|
|
@@ -140,7 +140,7 @@ mainFunc.register();
|
|
|
140
140
|
|
|
141
141
|
> `optional` **description**: `string`
|
|
142
142
|
|
|
143
|
-
Defined in:
|
|
143
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:302
|
|
144
144
|
|
|
145
145
|
A detailed description of what the function does.
|
|
146
146
|
|
|
@@ -150,11 +150,25 @@ A detailed description of what the function does.
|
|
|
150
150
|
|
|
151
151
|
***
|
|
152
152
|
|
|
153
|
+
### expectedDuration?
|
|
154
|
+
|
|
155
|
+
> `optional` **expectedDuration**: `number`
|
|
156
|
+
|
|
157
|
+
Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index-359784IS.d.ts:102
|
|
158
|
+
|
|
159
|
+
The expected duration of the remote call in milliseconds.
|
|
160
|
+
|
|
161
|
+
#### Inherited from
|
|
162
|
+
|
|
163
|
+
[`RemoteFuncItem`](RemoteFuncItem.md).[`expectedDuration`](RemoteFuncItem.md#expectedduration)
|
|
164
|
+
|
|
165
|
+
***
|
|
166
|
+
|
|
153
167
|
### fetchOptions?
|
|
154
168
|
|
|
155
169
|
> `optional` **fetchOptions**: `any`
|
|
156
170
|
|
|
157
|
-
Defined in:
|
|
171
|
+
Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index-359784IS.d.ts:87
|
|
158
172
|
|
|
159
173
|
Addtional options to be passed to the underlying `fetch` call in a transport.
|
|
160
174
|
|
|
@@ -168,7 +182,7 @@ Addtional options to be passed to the underlying `fetch` call in a transport.
|
|
|
168
182
|
|
|
169
183
|
> `optional` **isApi**: `boolean`
|
|
170
184
|
|
|
171
|
-
Defined in:
|
|
185
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:247
|
|
172
186
|
|
|
173
187
|
If true, indicates that this function should be treated as a server-side API.
|
|
174
188
|
|
|
@@ -182,7 +196,7 @@ If true, indicates that this function should be treated as a server-side API.
|
|
|
182
196
|
|
|
183
197
|
> `optional` **name**: `string`
|
|
184
198
|
|
|
185
|
-
Defined in:
|
|
199
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:204
|
|
186
200
|
|
|
187
201
|
The unique name of the function.
|
|
188
202
|
|
|
@@ -196,7 +210,7 @@ The unique name of the function.
|
|
|
196
210
|
|
|
197
211
|
> `optional` **params**: [`FuncParams`](FuncParams.md) \| [`FuncParam`](FuncParam.md)[]
|
|
198
212
|
|
|
199
|
-
Defined in:
|
|
213
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:209
|
|
200
214
|
|
|
201
215
|
Parameter definitions, which can be an object mapping names to definitions or an array for positional parameters.
|
|
202
216
|
|
|
@@ -210,7 +224,7 @@ Parameter definitions, which can be an object mapping names to definitions or an
|
|
|
210
224
|
|
|
211
225
|
> `optional` **result**: `string` \| `Record`\<`string`, `any`\>
|
|
212
226
|
|
|
213
|
-
Defined in:
|
|
227
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:214
|
|
214
228
|
|
|
215
229
|
The expected return type of the function, described as a string or a JSON schema object.
|
|
216
230
|
|
|
@@ -224,7 +238,7 @@ The expected return type of the function, described as a string or a JSON schema
|
|
|
224
238
|
|
|
225
239
|
> `optional` **scope**: `any`
|
|
226
240
|
|
|
227
|
-
Defined in:
|
|
241
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:219
|
|
228
242
|
|
|
229
243
|
The execution scope or context (`this`) for the function.
|
|
230
244
|
|
|
@@ -238,7 +252,7 @@ The execution scope or context (`this`) for the function.
|
|
|
238
252
|
|
|
239
253
|
> `optional` **setup**: (`this`, `options?`) => `void`
|
|
240
254
|
|
|
241
|
-
Defined in:
|
|
255
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:242
|
|
242
256
|
|
|
243
257
|
A lifecycle hook called once during the `ToolFunc` instance's initialization.
|
|
244
258
|
It allows for initial setup, state configuration, or property modification on the instance
|
|
@@ -284,10 +298,9 @@ console.log(myFunc.customState); // Outputs: 'configured'
|
|
|
284
298
|
|
|
285
299
|
> `optional` **stream**: `boolean`
|
|
286
300
|
|
|
287
|
-
Defined in:
|
|
301
|
+
Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index-359784IS.d.ts:106
|
|
288
302
|
|
|
289
|
-
|
|
290
|
-
Whether a specific call is streamed is determined by a `stream` property in the runtime parameters.
|
|
303
|
+
Whether the tool returns a stream.
|
|
291
304
|
|
|
292
305
|
#### Inherited from
|
|
293
306
|
|
|
@@ -299,7 +312,7 @@ Whether a specific call is streamed is determined by a `stream` property in the
|
|
|
299
312
|
|
|
300
313
|
> `optional` **tags**: `string` \| `string`[]
|
|
301
314
|
|
|
302
|
-
Defined in:
|
|
315
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:224
|
|
303
316
|
|
|
304
317
|
Tags for grouping or filtering functions.
|
|
305
318
|
|
|
@@ -309,11 +322,49 @@ Tags for grouping or filtering functions.
|
|
|
309
322
|
|
|
310
323
|
***
|
|
311
324
|
|
|
325
|
+
### timeout?
|
|
326
|
+
|
|
327
|
+
> `optional` **timeout**: `number` \| \{ `keepAliveOnTimeout?`: `boolean`; `streamIdleTimeout?`: `number`; `value`: `number`; \}
|
|
328
|
+
|
|
329
|
+
Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index-359784IS.d.ts:91
|
|
330
|
+
|
|
331
|
+
The timeout configuration for the remote call.
|
|
332
|
+
|
|
333
|
+
#### Type Declaration
|
|
334
|
+
|
|
335
|
+
`number`
|
|
336
|
+
|
|
337
|
+
\{ `keepAliveOnTimeout?`: `boolean`; `streamIdleTimeout?`: `number`; `value`: `number`; \}
|
|
338
|
+
|
|
339
|
+
#### keepAliveOnTimeout?
|
|
340
|
+
|
|
341
|
+
> `optional` **keepAliveOnTimeout**: `boolean`
|
|
342
|
+
|
|
343
|
+
Whether to keep the server-side function running after a timeout.
|
|
344
|
+
|
|
345
|
+
#### streamIdleTimeout?
|
|
346
|
+
|
|
347
|
+
> `optional` **streamIdleTimeout**: `number`
|
|
348
|
+
|
|
349
|
+
The idle timeout for streaming responses in milliseconds.
|
|
350
|
+
|
|
351
|
+
#### value
|
|
352
|
+
|
|
353
|
+
> **value**: `number`
|
|
354
|
+
|
|
355
|
+
The hard timeout in milliseconds.
|
|
356
|
+
|
|
357
|
+
#### Inherited from
|
|
358
|
+
|
|
359
|
+
[`RemoteFuncItem`](RemoteFuncItem.md).[`timeout`](RemoteFuncItem.md#timeout)
|
|
360
|
+
|
|
361
|
+
***
|
|
362
|
+
|
|
312
363
|
### title?
|
|
313
364
|
|
|
314
365
|
> `optional` **title**: `string`
|
|
315
366
|
|
|
316
|
-
Defined in:
|
|
367
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:307
|
|
317
368
|
|
|
318
369
|
A concise, human-readable title for the function, often used in UI or by AI.
|
|
319
370
|
|