@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
|
# Abstract Class: ToolTransport
|
|
8
8
|
|
|
9
|
-
Defined in:
|
|
9
|
+
Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index-359784IS.d.ts:135
|
|
10
10
|
|
|
11
11
|
## Extended by
|
|
12
12
|
|
|
@@ -33,7 +33,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/base.ts:33](https://
|
|
|
33
33
|
|
|
34
34
|
> **apiRoot**: `string`
|
|
35
35
|
|
|
36
|
-
Defined in:
|
|
36
|
+
Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index-359784IS.d.ts:136
|
|
37
37
|
|
|
38
38
|
The root endpoint for the remote service.
|
|
39
39
|
For HTTP, this is a URL. For IPC, it could be a channel name.
|
|
@@ -48,7 +48,7 @@ For HTTP, this is a URL. For IPC, it could be a channel name.
|
|
|
48
48
|
|
|
49
49
|
> `optional` **options**: `any`
|
|
50
50
|
|
|
51
|
-
Defined in:
|
|
51
|
+
Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index-359784IS.d.ts:138
|
|
52
52
|
|
|
53
53
|
Additional options for the transport start or fetch, passed by mount.
|
|
54
54
|
|
|
@@ -62,7 +62,7 @@ Additional options for the transport start or fetch, passed by mount.
|
|
|
62
62
|
|
|
63
63
|
> **Tools**: *typeof* [`ToolFunc`](ToolFunc.md)
|
|
64
64
|
|
|
65
|
-
Defined in:
|
|
65
|
+
Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index-359784IS.d.ts:137
|
|
66
66
|
|
|
67
67
|
#### Implementation of
|
|
68
68
|
|
|
@@ -74,7 +74,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/base.ts:35](https://
|
|
|
74
74
|
|
|
75
75
|
> `abstract` **\_mount**(`Tools`, `apiRoot`, `options?`): `any`
|
|
76
76
|
|
|
77
|
-
Defined in:
|
|
77
|
+
Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index-359784IS.d.ts:141
|
|
78
78
|
|
|
79
79
|
#### Parameters
|
|
80
80
|
|
|
@@ -100,7 +100,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/base.ts:57](https://
|
|
|
100
100
|
|
|
101
101
|
> **mount**(`Tools`, `apiRoot?`, `options?`): `any`
|
|
102
102
|
|
|
103
|
-
Defined in:
|
|
103
|
+
Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index-359784IS.d.ts:140
|
|
104
104
|
|
|
105
105
|
#### Parameters
|
|
106
106
|
|
|
@@ -130,7 +130,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/base.ts:42](https://
|
|
|
130
130
|
|
|
131
131
|
> **setApiRoot**(`apiRoot`): `void`
|
|
132
132
|
|
|
133
|
-
Defined in:
|
|
133
|
+
Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index-359784IS.d.ts:139
|
|
134
134
|
|
|
135
135
|
#### Parameters
|
|
136
136
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Class: YamlTypeBaseObject
|
|
8
8
|
|
|
9
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/yaml-type-base-object.ts:3](https://github.com/isdk/ai-tool.js/blob/
|
|
9
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/yaml-type-base-object.ts:3](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/yaml-type-base-object.ts#L3)
|
|
10
10
|
|
|
11
11
|
## Indexable
|
|
12
12
|
|
|
@@ -18,7 +18,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/yaml-type-base-object.ts:
|
|
|
18
18
|
|
|
19
19
|
> **new YamlTypeBaseObject**(`options?`): `YamlTypeBaseObject`
|
|
20
20
|
|
|
21
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/yaml-type-base-object.ts:5](https://github.com/isdk/ai-tool.js/blob/
|
|
21
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/yaml-type-base-object.ts:5](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/yaml-type-base-object.ts#L5)
|
|
22
22
|
|
|
23
23
|
#### Parameters
|
|
24
24
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Enumeration: AsyncFeatureBits
|
|
8
8
|
|
|
9
|
-
Defined in:
|
|
9
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:95
|
|
10
10
|
|
|
11
11
|
## Enumeration Members
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/cancelable-ability.ts:14]
|
|
|
14
14
|
|
|
15
15
|
> **Cancelable**: `1`
|
|
16
16
|
|
|
17
|
-
Defined in:
|
|
17
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:97
|
|
18
18
|
|
|
19
19
|
***
|
|
20
20
|
|
|
@@ -22,7 +22,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/cancelable-ability.ts:16]
|
|
|
22
22
|
|
|
23
23
|
> **MultiTask**: `0`
|
|
24
24
|
|
|
25
|
-
Defined in:
|
|
25
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:96
|
|
26
26
|
|
|
27
27
|
***
|
|
28
28
|
|
|
@@ -30,4 +30,4 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/cancelable-ability.ts:15]
|
|
|
30
30
|
|
|
31
31
|
> **Priority**: `2`
|
|
32
32
|
|
|
33
|
-
Defined in:
|
|
33
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:98
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Enumeration: AsyncFeatures
|
|
8
8
|
|
|
9
|
-
Defined in:
|
|
9
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:100
|
|
10
10
|
|
|
11
11
|
## Enumeration Members
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/cancelable-ability.ts:21]
|
|
|
14
14
|
|
|
15
15
|
> **Cancelable**: `2`
|
|
16
16
|
|
|
17
|
-
Defined in:
|
|
17
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:102
|
|
18
18
|
|
|
19
19
|
***
|
|
20
20
|
|
|
@@ -22,7 +22,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/cancelable-ability.ts:23]
|
|
|
22
22
|
|
|
23
23
|
> **MultiTask**: `1`
|
|
24
24
|
|
|
25
|
-
Defined in:
|
|
25
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:101
|
|
26
26
|
|
|
27
27
|
***
|
|
28
28
|
|
|
@@ -30,4 +30,4 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/cancelable-ability.ts:22]
|
|
|
30
30
|
|
|
31
31
|
> **Priority**: `4`
|
|
32
32
|
|
|
33
|
-
Defined in:
|
|
33
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:103
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
[**@isdk/ai-tool**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@isdk/ai-tool](../globals.md) / CmdArgTokenType
|
|
6
|
+
|
|
7
|
+
# Enumeration: CmdArgTokenType
|
|
8
|
+
|
|
9
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:56](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L56)
|
|
10
|
+
|
|
11
|
+
CmdArgToken types for lexical analysis.
|
|
12
|
+
|
|
13
|
+
## Enumeration Members
|
|
14
|
+
|
|
15
|
+
### ASSIGN
|
|
16
|
+
|
|
17
|
+
> **ASSIGN**: `"ASSIGN"`
|
|
18
|
+
|
|
19
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:61](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L61)
|
|
20
|
+
|
|
21
|
+
Assignment operator (default: '=' or ':')
|
|
22
|
+
|
|
23
|
+
***
|
|
24
|
+
|
|
25
|
+
### COMMA
|
|
26
|
+
|
|
27
|
+
> **COMMA**: `"COMMA"`
|
|
28
|
+
|
|
29
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:59](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L59)
|
|
30
|
+
|
|
31
|
+
Argument delimiter (default: ',')
|
|
32
|
+
|
|
33
|
+
***
|
|
34
|
+
|
|
35
|
+
### EOF
|
|
36
|
+
|
|
37
|
+
> **EOF**: `"EOF"`
|
|
38
|
+
|
|
39
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:57](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L57)
|
|
40
|
+
|
|
41
|
+
***
|
|
42
|
+
|
|
43
|
+
### IDENTIFIER
|
|
44
|
+
|
|
45
|
+
> **IDENTIFIER**: `"IDENTIFIER"`
|
|
46
|
+
|
|
47
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:77](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L77)
|
|
48
|
+
|
|
49
|
+
Valid JS identifier (excluding reserved words like true/false)
|
|
50
|
+
|
|
51
|
+
***
|
|
52
|
+
|
|
53
|
+
### L\_BRACE
|
|
54
|
+
|
|
55
|
+
> **L\_BRACE**: `"L_BRACE"`
|
|
56
|
+
|
|
57
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:71](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L71)
|
|
58
|
+
|
|
59
|
+
Left curly brace '{'
|
|
60
|
+
|
|
61
|
+
***
|
|
62
|
+
|
|
63
|
+
### L\_BRACKET
|
|
64
|
+
|
|
65
|
+
> **L\_BRACKET**: `"L_BRACKET"`
|
|
66
|
+
|
|
67
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:67](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L67)
|
|
68
|
+
|
|
69
|
+
Left square bracket '['
|
|
70
|
+
|
|
71
|
+
***
|
|
72
|
+
|
|
73
|
+
### L\_PAREN
|
|
74
|
+
|
|
75
|
+
> **L\_PAREN**: `"L_PAREN"`
|
|
76
|
+
|
|
77
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:63](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L63)
|
|
78
|
+
|
|
79
|
+
Left parenthesis '('
|
|
80
|
+
|
|
81
|
+
***
|
|
82
|
+
|
|
83
|
+
### R\_BRACE
|
|
84
|
+
|
|
85
|
+
> **R\_BRACE**: `"R_BRACE"`
|
|
86
|
+
|
|
87
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:73](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L73)
|
|
88
|
+
|
|
89
|
+
Right curly brace '}'
|
|
90
|
+
|
|
91
|
+
***
|
|
92
|
+
|
|
93
|
+
### R\_BRACKET
|
|
94
|
+
|
|
95
|
+
> **R\_BRACKET**: `"R_BRACKET"`
|
|
96
|
+
|
|
97
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:69](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L69)
|
|
98
|
+
|
|
99
|
+
Right square bracket ']'
|
|
100
|
+
|
|
101
|
+
***
|
|
102
|
+
|
|
103
|
+
### R\_PAREN
|
|
104
|
+
|
|
105
|
+
> **R\_PAREN**: `"R_PAREN"`
|
|
106
|
+
|
|
107
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:65](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L65)
|
|
108
|
+
|
|
109
|
+
Right parenthesis ')'
|
|
110
|
+
|
|
111
|
+
***
|
|
112
|
+
|
|
113
|
+
### RAW
|
|
114
|
+
|
|
115
|
+
> **RAW**: `"RAW"`
|
|
116
|
+
|
|
117
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:79](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L79)
|
|
118
|
+
|
|
119
|
+
Raw text segment, used for expressions or unquoted strings
|
|
120
|
+
|
|
121
|
+
***
|
|
122
|
+
|
|
123
|
+
### STRING
|
|
124
|
+
|
|
125
|
+
> **STRING**: `"STRING"`
|
|
126
|
+
|
|
127
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:75](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L75)
|
|
128
|
+
|
|
129
|
+
Quoted string "..." or '...' or `...`
|
|
@@ -6,7 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
# Enumeration: HashAlgorithm
|
|
8
8
|
|
|
9
|
-
Defined in:
|
|
9
|
+
Defined in: @isdk/ai-tools/packages/hash/dist/index.d.ts:41
|
|
10
|
+
|
|
11
|
+
Enum representing the supported hashing algorithms.
|
|
12
|
+
|
|
13
|
+
Each member is assigned a unique numeric value.
|
|
10
14
|
|
|
11
15
|
## Enumeration Members
|
|
12
16
|
|
|
@@ -14,7 +18,9 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/hash/const.ts:5](https://
|
|
|
14
18
|
|
|
15
19
|
> **md5**: `1`
|
|
16
20
|
|
|
17
|
-
Defined in:
|
|
21
|
+
Defined in: @isdk/ai-tools/packages/hash/dist/index.d.ts:43
|
|
22
|
+
|
|
23
|
+
MD5 (Message-Digest Algorithm 5)
|
|
18
24
|
|
|
19
25
|
***
|
|
20
26
|
|
|
@@ -22,7 +28,9 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/hash/const.ts:6](https://
|
|
|
22
28
|
|
|
23
29
|
> **ripemd**: `3`
|
|
24
30
|
|
|
25
|
-
Defined in:
|
|
31
|
+
Defined in: @isdk/ai-tools/packages/hash/dist/index.d.ts:47
|
|
32
|
+
|
|
33
|
+
RIPEMD-160 (RACE Integrity Primitives Evaluation Message Digest)
|
|
26
34
|
|
|
27
35
|
***
|
|
28
36
|
|
|
@@ -30,7 +38,9 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/hash/const.ts:8](https://
|
|
|
30
38
|
|
|
31
39
|
> **sha1**: `2`
|
|
32
40
|
|
|
33
|
-
Defined in:
|
|
41
|
+
Defined in: @isdk/ai-tools/packages/hash/dist/index.d.ts:45
|
|
42
|
+
|
|
43
|
+
SHA-1 (Secure Hash Algorithm 1)
|
|
34
44
|
|
|
35
45
|
***
|
|
36
46
|
|
|
@@ -38,7 +48,9 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/hash/const.ts:7](https://
|
|
|
38
48
|
|
|
39
49
|
> **sha224**: `11`
|
|
40
50
|
|
|
41
|
-
Defined in:
|
|
51
|
+
Defined in: @isdk/ai-tools/packages/hash/dist/index.d.ts:55
|
|
52
|
+
|
|
53
|
+
SHA-224 (Secure Hash Algorithm 224)
|
|
42
54
|
|
|
43
55
|
***
|
|
44
56
|
|
|
@@ -46,7 +58,9 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/hash/const.ts:12](https:/
|
|
|
46
58
|
|
|
47
59
|
> **sha256**: `8`
|
|
48
60
|
|
|
49
|
-
Defined in:
|
|
61
|
+
Defined in: @isdk/ai-tools/packages/hash/dist/index.d.ts:49
|
|
62
|
+
|
|
63
|
+
SHA-256 (Secure Hash Algorithm 256)
|
|
50
64
|
|
|
51
65
|
***
|
|
52
66
|
|
|
@@ -54,7 +68,9 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/hash/const.ts:9](https://
|
|
|
54
68
|
|
|
55
69
|
> **sha384**: `9`
|
|
56
70
|
|
|
57
|
-
Defined in:
|
|
71
|
+
Defined in: @isdk/ai-tools/packages/hash/dist/index.d.ts:51
|
|
72
|
+
|
|
73
|
+
SHA-384 (Secure Hash Algorithm 384)
|
|
58
74
|
|
|
59
75
|
***
|
|
60
76
|
|
|
@@ -62,7 +78,9 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/hash/const.ts:10](https:/
|
|
|
62
78
|
|
|
63
79
|
> **sha512**: `10`
|
|
64
80
|
|
|
65
|
-
Defined in:
|
|
81
|
+
Defined in: @isdk/ai-tools/packages/hash/dist/index.d.ts:53
|
|
82
|
+
|
|
83
|
+
SHA-512 (Secure Hash Algorithm 512)
|
|
66
84
|
|
|
67
85
|
***
|
|
68
86
|
|
|
@@ -70,7 +88,9 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/hash/const.ts:11](https:/
|
|
|
70
88
|
|
|
71
89
|
> **xxhash**: `111`
|
|
72
90
|
|
|
73
|
-
Defined in:
|
|
91
|
+
Defined in: @isdk/ai-tools/packages/hash/dist/index.d.ts:57
|
|
92
|
+
|
|
93
|
+
Generic XXHash (defaults to xxhash64 in some contexts)
|
|
74
94
|
|
|
75
95
|
***
|
|
76
96
|
|
|
@@ -78,7 +98,9 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/hash/const.ts:13](https:/
|
|
|
78
98
|
|
|
79
99
|
> **xxhash128**: `113`
|
|
80
100
|
|
|
81
|
-
Defined in:
|
|
101
|
+
Defined in: @isdk/ai-tools/packages/hash/dist/index.d.ts:63
|
|
102
|
+
|
|
103
|
+
XXHash128 (128-bit XXHash)
|
|
82
104
|
|
|
83
105
|
***
|
|
84
106
|
|
|
@@ -86,7 +108,9 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/hash/const.ts:16](https:/
|
|
|
86
108
|
|
|
87
109
|
> **xxhash32**: `112`
|
|
88
110
|
|
|
89
|
-
Defined in:
|
|
111
|
+
Defined in: @isdk/ai-tools/packages/hash/dist/index.d.ts:61
|
|
112
|
+
|
|
113
|
+
XXHash32 (32-bit XXHash)
|
|
90
114
|
|
|
91
115
|
***
|
|
92
116
|
|
|
@@ -94,4 +118,6 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/hash/const.ts:15](https:/
|
|
|
94
118
|
|
|
95
119
|
> **xxhash64**: `111`
|
|
96
120
|
|
|
97
|
-
Defined in:
|
|
121
|
+
Defined in: @isdk/ai-tools/packages/hash/dist/index.d.ts:59
|
|
122
|
+
|
|
123
|
+
XXHash64 (64-bit XXHash)
|
|
@@ -6,28 +6,19 @@
|
|
|
6
6
|
|
|
7
7
|
# Function: AIArgProcessor()
|
|
8
8
|
|
|
9
|
-
> **AIArgProcessor**(`
|
|
9
|
+
> **AIArgProcessor**(`ctx`): `Promise`\<\{ `[CMD_ARG_PROCESSOR_RESULT]`: (`string` \| [`CmdArgAIChoiceConfig`](../interfaces/CmdArgAIChoiceConfig.md) \| \{ `excludePositional`: `boolean`; \})[]; \} \| `undefined`\>
|
|
10
10
|
|
|
11
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/
|
|
11
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/processors.ts:87](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/processors.ts#L87)
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
### argInfo
|
|
16
|
-
|
|
17
|
-
`ArgInfo`
|
|
18
|
-
|
|
19
|
-
### ix
|
|
13
|
+
Combined AI processor (AIArgProcessor).
|
|
14
|
+
Sequentially attempts choice selection and template variable processing.
|
|
20
15
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
### scope?
|
|
24
|
-
|
|
25
|
-
`Record`\<`string`, `any`\>
|
|
16
|
+
## Parameters
|
|
26
17
|
|
|
27
|
-
###
|
|
18
|
+
### ctx
|
|
28
19
|
|
|
29
|
-
[`
|
|
20
|
+
[`CmdArgContext`](../interfaces/CmdArgContext.md)
|
|
30
21
|
|
|
31
22
|
## Returns
|
|
32
23
|
|
|
33
|
-
`Promise
|
|
24
|
+
`Promise`\<\{ `[CMD_ARG_PROCESSOR_RESULT]`: (`string` \| [`CmdArgAIChoiceConfig`](../interfaces/CmdArgAIChoiceConfig.md) \| \{ `excludePositional`: `boolean`; \})[]; \} \| `undefined`\>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **AIStream**\<`T`, `TOptions`\>(`response`, `customParser?`): `ReadableStream`\<[`AIResult`](../interfaces/AIResult.md)\<`T`, `TOptions`\>\>
|
|
10
10
|
|
|
11
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/stream/ai-stream.ts:120](https://github.com/isdk/ai-tool.js/blob/
|
|
11
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/stream/ai-stream.ts:120](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/stream/ai-stream.ts#L120)
|
|
12
12
|
|
|
13
13
|
Returns a ReadableStream created from the response, parsed and handled with custom logic.
|
|
14
14
|
The stream goes through two transformation stages, first parsing the events and then
|
|
@@ -6,28 +6,26 @@
|
|
|
6
6
|
|
|
7
7
|
# Function: ChoiceArgProcessor()
|
|
8
8
|
|
|
9
|
-
> **ChoiceArgProcessor**(`
|
|
9
|
+
> **ChoiceArgProcessor**(`ctx`): `Promise`\<\{ `[CMD_ARG_PROCESSOR_RESULT]`: (`string` \| [`CmdArgAIChoiceConfig`](../interfaces/CmdArgAIChoiceConfig.md) \| \{ `excludePositional`: `boolean`; \})[]; \} \| `undefined`\>
|
|
10
10
|
|
|
11
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/
|
|
11
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/processors.ts:19](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/processors.ts#L19)
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
### argInfo
|
|
16
|
-
|
|
17
|
-
`ArgInfo`
|
|
13
|
+
Choice argument processor (ChoiceArgProcessor).
|
|
18
14
|
|
|
19
|
-
|
|
15
|
+
Syntax: |item1|item2:maxPick=2:separator=";"
|
|
20
16
|
|
|
21
|
-
|
|
17
|
+
Logic:
|
|
18
|
+
1. Identifies positional arguments starting with '|'.
|
|
19
|
+
2. Recursively uses the CmdArgParser to parse subsequent configuration items (delimited by ':').
|
|
20
|
+
3. Constructs an CmdArgAIChoiceConfig object.
|
|
21
|
+
4. Returns the result using the Symbol Protocol, named 'choice' and excluded from positional indexing.
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
`Record`\<`string`, `any`\>
|
|
23
|
+
## Parameters
|
|
26
24
|
|
|
27
|
-
###
|
|
25
|
+
### ctx
|
|
28
26
|
|
|
29
|
-
[`
|
|
27
|
+
[`CmdArgContext`](../interfaces/CmdArgContext.md)
|
|
30
28
|
|
|
31
29
|
## Returns
|
|
32
30
|
|
|
33
|
-
`
|
|
31
|
+
`Promise`\<\{ `[CMD_ARG_PROCESSOR_RESULT]`: (`string` \| [`CmdArgAIChoiceConfig`](../interfaces/CmdArgAIChoiceConfig.md) \| \{ `excludePositional`: `boolean`; \})[]; \} \| `undefined`\>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **DefaultDateFormat**(`format?`): `string`
|
|
10
10
|
|
|
11
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/to-datetime.ts:10](https://github.com/isdk/ai-tool.js/blob/
|
|
11
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/to-datetime.ts:10](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/to-datetime.ts#L10)
|
|
12
12
|
|
|
13
13
|
## Parameters
|
|
14
14
|
|
|
@@ -6,9 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
# Function: ObjectArgsToArgsInfo()
|
|
8
8
|
|
|
9
|
-
> **ObjectArgsToArgsInfo**(`args`): `
|
|
9
|
+
> **ObjectArgsToArgsInfo**(`args`): [`CmdArgArgsInfo`](../interfaces/CmdArgArgsInfo.md)
|
|
10
10
|
|
|
11
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/
|
|
11
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/api.ts:206](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/api.ts#L206)
|
|
12
|
+
|
|
13
|
+
Normalizes various simplified result formats back into an `{args, namedArgs}` info structure.
|
|
12
14
|
|
|
13
15
|
## Parameters
|
|
14
16
|
|
|
@@ -18,12 +20,12 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/parse-command.ts:86](http
|
|
|
18
20
|
|
|
19
21
|
## Returns
|
|
20
22
|
|
|
21
|
-
`
|
|
22
|
-
|
|
23
|
-
### args
|
|
24
|
-
|
|
25
|
-
> **args**: `any`[]
|
|
23
|
+
[`CmdArgArgsInfo`](../interfaces/CmdArgArgsInfo.md)
|
|
26
24
|
|
|
27
|
-
|
|
25
|
+
## Example
|
|
28
26
|
|
|
29
|
-
|
|
27
|
+
```ts
|
|
28
|
+
ObjectArgsToArgsInfo("val") // returns {args: ["val"]}
|
|
29
|
+
ObjectArgsToArgsInfo([1, 2]) // returns {args: [1, 2]}
|
|
30
|
+
ObjectArgsToArgsInfo({name: "John"}) // returns {args: [], namedArgs: {name: "John"}}
|
|
31
|
+
```
|
|
@@ -6,11 +6,13 @@
|
|
|
6
6
|
|
|
7
7
|
# Function: RateLimit()
|
|
8
8
|
|
|
9
|
-
> **RateLimit**(`rps`, `
|
|
9
|
+
> **RateLimit**(`rps`, `options?`): () => `Promise`\<`void`\>
|
|
10
10
|
|
|
11
|
-
Defined in:
|
|
11
|
+
Defined in: @isdk/util/dist/index.d.ts:976
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
创建一个速率限制器函数(Rate Limiter)。
|
|
14
|
+
当调用频率超过设定的 `rps`(每秒请求数)时,该函数会通过 Promise 阻塞调用方,
|
|
15
|
+
并在调用率回到限制范围内时解析。
|
|
14
16
|
|
|
15
17
|
## Parameters
|
|
16
18
|
|
|
@@ -18,18 +20,43 @@ Creates a rate limiter function that blocks with a promise whenever the rate lim
|
|
|
18
20
|
|
|
19
21
|
`number`
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
限制的速率。默认单位时间内允许的请求数。
|
|
24
|
+
|
|
25
|
+
### options?
|
|
26
|
+
|
|
27
|
+
配置项。
|
|
22
28
|
|
|
23
29
|
#### timeUnit?
|
|
24
30
|
|
|
25
|
-
`number`
|
|
31
|
+
`number`
|
|
32
|
+
|
|
33
|
+
时间窗口大小(毫秒)。默认为 1000ms。
|
|
26
34
|
|
|
27
35
|
#### uniformDistribution?
|
|
28
36
|
|
|
29
|
-
`boolean`
|
|
37
|
+
`boolean`
|
|
38
|
+
|
|
39
|
+
是否强制离散均匀分布。
|
|
40
|
+
- 若为 `false`(默认):允许在时间窗口开始时立即耗尽所有配额,然后暂停直到窗口结束。
|
|
41
|
+
- 若为 `true`:将配额均匀分配到时间窗口内(例如 5 rps 会每 200ms 允许一次请求)。
|
|
42
|
+
在流量持续且快速的场景下(如读取文件)建议开启,以避免瞬时突发流量。
|
|
30
43
|
|
|
31
44
|
## Returns
|
|
32
45
|
|
|
46
|
+
返回一个异步限流函数,调用该函数即可实现限流。
|
|
47
|
+
|
|
48
|
+
示例:
|
|
49
|
+
```ts
|
|
50
|
+
const lim = RateLimit(5); // 限制为 5 次/秒
|
|
51
|
+
|
|
52
|
+
async function processItems(items) {
|
|
53
|
+
for (const item of items) {
|
|
54
|
+
await lim(); // 可能会在这里阻塞
|
|
55
|
+
await handle(item);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
33
60
|
> (): `Promise`\<`void`\>
|
|
34
61
|
|
|
35
62
|
### Returns
|
|
@@ -6,28 +6,26 @@
|
|
|
6
6
|
|
|
7
7
|
# Function: TemplateArgProcessor()
|
|
8
8
|
|
|
9
|
-
> **TemplateArgProcessor**(`
|
|
9
|
+
> **TemplateArgProcessor**(`ctx`): `Promise`\<\{ `[CMD_ARG_PROCESSOR_RESULT]`: `any`[]; \} \| `undefined`\>
|
|
10
10
|
|
|
11
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/
|
|
11
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/processors.ts:63](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/processors.ts#L63)
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
### \_\_namedParameters
|
|
16
|
-
|
|
17
|
-
`ArgInfo`
|
|
13
|
+
Template variable processor (TemplateArgProcessor).
|
|
18
14
|
|
|
19
|
-
|
|
15
|
+
Syntax: msg="Hello {{name}}"
|
|
20
16
|
|
|
21
|
-
|
|
17
|
+
Logic:
|
|
18
|
+
1. Calls PromptTemplate.formatIf for variable substitution.
|
|
19
|
+
2. If the substitution results in a bare string (no quotes and not JS literal source),
|
|
20
|
+
it is JSON-escaped to ensure it's recognized as a string literal in subsequent evaluation.
|
|
21
|
+
3. Returns the substituted source string for re-evaluation by the Evaluator.
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
`Record`\<`string`, `any`\>
|
|
23
|
+
## Parameters
|
|
26
24
|
|
|
27
|
-
###
|
|
25
|
+
### ctx
|
|
28
26
|
|
|
29
|
-
[`
|
|
27
|
+
[`CmdArgContext`](../interfaces/CmdArgContext.md)
|
|
30
28
|
|
|
31
29
|
## Returns
|
|
32
30
|
|
|
33
|
-
`Promise
|
|
31
|
+
`Promise`\<\{ `[CMD_ARG_PROCESSOR_RESULT]`: `any`[]; \} \| `undefined`\>
|