@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
|
# Class: SignalGate\<T\>
|
|
8
8
|
|
|
9
|
-
Defined in:
|
|
9
|
+
Defined in: @isdk/util/dist/index.d.ts:998
|
|
10
10
|
|
|
11
11
|
An asynchronous signal gate that blocks operations until a signal is emitted.
|
|
12
12
|
This class allows multiple awaiters to wait for a signal and resolves all pending promises with the emitted value.
|
|
@@ -44,25 +44,25 @@ valueGate.signal(42); // Must provide a number value
|
|
|
44
44
|
|
|
45
45
|
### \_isSignaled
|
|
46
46
|
|
|
47
|
-
> `protected` **\_isSignaled**: `boolean`
|
|
47
|
+
> `protected` **\_isSignaled**: `boolean`
|
|
48
48
|
|
|
49
|
-
Defined in:
|
|
49
|
+
Defined in: @isdk/util/dist/index.d.ts:999
|
|
50
50
|
|
|
51
51
|
***
|
|
52
52
|
|
|
53
53
|
### \_signalValue
|
|
54
54
|
|
|
55
|
-
> `protected` **\_signalValue**: `
|
|
55
|
+
> `protected` **\_signalValue**: `T` \| `undefined`
|
|
56
56
|
|
|
57
|
-
Defined in:
|
|
57
|
+
Defined in: @isdk/util/dist/index.d.ts:1000
|
|
58
58
|
|
|
59
59
|
***
|
|
60
60
|
|
|
61
61
|
### waitQueue
|
|
62
62
|
|
|
63
|
-
> `protected` **waitQueue**: `object`[]
|
|
63
|
+
> `protected` **waitQueue**: `object`[]
|
|
64
64
|
|
|
65
|
-
Defined in:
|
|
65
|
+
Defined in: @isdk/util/dist/index.d.ts:1001
|
|
66
66
|
|
|
67
67
|
#### reject()
|
|
68
68
|
|
|
@@ -100,7 +100,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/async-signal-gate.ts:23](
|
|
|
100
100
|
|
|
101
101
|
> **get** **signaled**(): `boolean`
|
|
102
102
|
|
|
103
|
-
Defined in:
|
|
103
|
+
Defined in: @isdk/util/dist/index.d.ts:1005
|
|
104
104
|
|
|
105
105
|
##### Returns
|
|
106
106
|
|
|
@@ -112,7 +112,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/async-signal-gate.ts:28](
|
|
|
112
112
|
|
|
113
113
|
> **abort**(`reason?`): `void`
|
|
114
114
|
|
|
115
|
-
Defined in:
|
|
115
|
+
Defined in: @isdk/util/dist/index.d.ts:1023
|
|
116
116
|
|
|
117
117
|
Aborts all pending waits, rejecting their promises with an error.
|
|
118
118
|
This does **not** reset the signal state (the gate remains signaled or unsignaled).
|
|
@@ -135,7 +135,7 @@ The reason for aborting the waits.
|
|
|
135
135
|
|
|
136
136
|
> **reset**(): `void`
|
|
137
137
|
|
|
138
|
-
Defined in:
|
|
138
|
+
Defined in: @isdk/util/dist/index.d.ts:1016
|
|
139
139
|
|
|
140
140
|
Resets the gate to its initial state, allowing a new signal to be emitted.
|
|
141
141
|
|
|
@@ -149,7 +149,7 @@ Resets the gate to its initial state, allowing a new signal to be emitted.
|
|
|
149
149
|
|
|
150
150
|
> **signal**(`value?`): `void`
|
|
151
151
|
|
|
152
|
-
Defined in:
|
|
152
|
+
Defined in: @isdk/util/dist/index.d.ts:1012
|
|
153
153
|
|
|
154
154
|
Emits the signal with an optional value, resolving all pending [wait](../variables/wait.md) promises.
|
|
155
155
|
Subsequent calls have no effect until [reset](#reset) is called.
|
|
@@ -172,7 +172,7 @@ The value to emit with the signal (only required if T is not void).
|
|
|
172
172
|
|
|
173
173
|
> **wait**(): `Promise`\<`T`\>
|
|
174
174
|
|
|
175
|
-
Defined in:
|
|
175
|
+
Defined in: @isdk/util/dist/index.d.ts:1030
|
|
176
176
|
|
|
177
177
|
Returns a promise that resolves with the emitted signal value.
|
|
178
178
|
If called after the signal has been emitted, resolves immediately with the stored value.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Class: SseClientPubSubTransport
|
|
8
8
|
|
|
9
|
-
Defined in:
|
|
9
|
+
Defined in: @isdk/ai-tools/packages/tool-event/dist/transports/pubsub.d.ts:272
|
|
10
10
|
|
|
11
11
|
Defines the interface for a client-side PubSub transport.
|
|
12
12
|
|
|
@@ -33,7 +33,7 @@ stream (`PubSubClientStream`) to the server.
|
|
|
33
33
|
|
|
34
34
|
> **connect**(`url`, `params?`): `Promise`\<[`PubSubClientStream`](../interfaces/PubSubClientStream.md)\>
|
|
35
35
|
|
|
36
|
-
Defined in:
|
|
36
|
+
Defined in: @isdk/ai-tools/packages/tool-event/dist/transports/pubsub.d.ts:275
|
|
37
37
|
|
|
38
38
|
Establishes a connection to a server endpoint.
|
|
39
39
|
|
|
@@ -68,7 +68,7 @@ A `PubSubClientStream` instance that represents the active connection.
|
|
|
68
68
|
|
|
69
69
|
> **disconnect**(`stream`): `void`
|
|
70
70
|
|
|
71
|
-
Defined in:
|
|
71
|
+
Defined in: @isdk/ai-tools/packages/tool-event/dist/transports/pubsub.d.ts:276
|
|
72
72
|
|
|
73
73
|
Optional. Disconnects a given stream.
|
|
74
74
|
While the `close` method exists on the stream itself, placing `disconnect`
|
|
@@ -97,7 +97,7 @@ The stream to disconnect.
|
|
|
97
97
|
|
|
98
98
|
> **setApiRoot**(`apiRoot`): `void`
|
|
99
99
|
|
|
100
|
-
Defined in:
|
|
100
|
+
Defined in: @isdk/ai-tools/packages/tool-event/dist/transports/pubsub.d.ts:274
|
|
101
101
|
|
|
102
102
|
Optional. Configures the transport with a base URL.
|
|
103
103
|
If implemented, this allows the transport to resolve relative paths
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Class: SseServerPubSubTransport
|
|
8
8
|
|
|
9
|
-
Defined in:
|
|
9
|
+
Defined in: @isdk/ai-tools/packages/tool-event/dist/transports/pubsub.d.ts:249
|
|
10
10
|
|
|
11
11
|
Defines the interface for a server-side PubSub transport layer.
|
|
12
12
|
|
|
@@ -33,9 +33,9 @@ connections, subscriptions, and message passing.
|
|
|
33
33
|
|
|
34
34
|
### name
|
|
35
35
|
|
|
36
|
-
> `readonly` **name**: `"sse"` = `
|
|
36
|
+
> `readonly` **name**: `"sse"` = `"sse"`
|
|
37
37
|
|
|
38
|
-
Defined in:
|
|
38
|
+
Defined in: @isdk/ai-tools/packages/tool-event/dist/transports/pubsub.d.ts:250
|
|
39
39
|
|
|
40
40
|
A unique, human-readable name for the transport (e.g., 'sse', 'websocket').
|
|
41
41
|
|
|
@@ -49,7 +49,7 @@ A unique, human-readable name for the transport (e.g., 'sse', 'websocket').
|
|
|
49
49
|
|
|
50
50
|
> `readonly` **protocol**: `"sse"`
|
|
51
51
|
|
|
52
|
-
Defined in:
|
|
52
|
+
Defined in: @isdk/ai-tools/packages/tool-event/dist/transports/pubsub.d.ts:251
|
|
53
53
|
|
|
54
54
|
The protocol identifier.
|
|
55
55
|
|
|
@@ -63,7 +63,7 @@ The protocol identifier.
|
|
|
63
63
|
|
|
64
64
|
> **connect**(`options?`): [`PubSubServerSession`](../interfaces/PubSubServerSession.md)
|
|
65
65
|
|
|
66
|
-
Defined in:
|
|
66
|
+
Defined in: @isdk/ai-tools/packages/tool-event/dist/transports/pubsub.d.ts:256
|
|
67
67
|
|
|
68
68
|
Connects a client, establishing a persistent communication channel.
|
|
69
69
|
|
|
@@ -107,9 +107,9 @@ A `PubSubServerSession` object representing the newly connected client session.
|
|
|
107
107
|
|
|
108
108
|
### getSessionFromReq()
|
|
109
109
|
|
|
110
|
-
> **getSessionFromReq**(`req`):
|
|
110
|
+
> **getSessionFromReq**(`req`): [`PubSubServerSession`](../interfaces/PubSubServerSession.md) \| `undefined`
|
|
111
111
|
|
|
112
|
-
Defined in:
|
|
112
|
+
Defined in: @isdk/ai-tools/packages/tool-event/dist/transports/pubsub.d.ts:262
|
|
113
113
|
|
|
114
114
|
Optional. Finds and returns a session based on a request object.
|
|
115
115
|
This is used by higher-level tools to find the correct session
|
|
@@ -125,7 +125,7 @@ The request object (e.g., http.IncomingMessage or Electron.IpcMainEvent).
|
|
|
125
125
|
|
|
126
126
|
#### Returns
|
|
127
127
|
|
|
128
|
-
|
|
128
|
+
[`PubSubServerSession`](../interfaces/PubSubServerSession.md) \| `undefined`
|
|
129
129
|
|
|
130
130
|
The corresponding session, or undefined if not found.
|
|
131
131
|
|
|
@@ -139,7 +139,7 @@ The corresponding session, or undefined if not found.
|
|
|
139
139
|
|
|
140
140
|
> **onConnection**(`cb`): `void`
|
|
141
141
|
|
|
142
|
-
Defined in:
|
|
142
|
+
Defined in: @isdk/ai-tools/packages/tool-event/dist/transports/pubsub.d.ts:268
|
|
143
143
|
|
|
144
144
|
Registers a callback to be invoked when a new client connection is established
|
|
145
145
|
and a session is created.
|
|
@@ -166,7 +166,7 @@ The callback function that receives the new `PubSubServerSession`.
|
|
|
166
166
|
|
|
167
167
|
> **onDisconnect**(`cb`): `void`
|
|
168
168
|
|
|
169
|
-
Defined in:
|
|
169
|
+
Defined in: @isdk/ai-tools/packages/tool-event/dist/transports/pubsub.d.ts:269
|
|
170
170
|
|
|
171
171
|
Registers a callback to be invoked when a client disconnects.
|
|
172
172
|
|
|
@@ -193,7 +193,7 @@ The callback function that receives the `PubSubServerSession` of the
|
|
|
193
193
|
|
|
194
194
|
> **publish**(`event`, `data`, `target?`): `void`
|
|
195
195
|
|
|
196
|
-
Defined in:
|
|
196
|
+
Defined in: @isdk/ai-tools/packages/tool-event/dist/transports/pubsub.d.ts:265
|
|
197
197
|
|
|
198
198
|
Publishes an event from the server to connected clients.
|
|
199
199
|
|
|
@@ -240,7 +240,7 @@ A single `PubSubClientId` or an array of IDs to
|
|
|
240
240
|
|
|
241
241
|
> **subscribe**(`session`, `events`): `void`
|
|
242
242
|
|
|
243
|
-
Defined in:
|
|
243
|
+
Defined in: @isdk/ai-tools/packages/tool-event/dist/transports/pubsub.d.ts:263
|
|
244
244
|
|
|
245
245
|
Subscribes a client session to one or more events.
|
|
246
246
|
|
|
@@ -276,7 +276,7 @@ An array of event names to subscribe to.
|
|
|
276
276
|
|
|
277
277
|
> **unsubscribe**(`session`, `events`): `void`
|
|
278
278
|
|
|
279
|
-
Defined in:
|
|
279
|
+
Defined in: @isdk/ai-tools/packages/tool-event/dist/transports/pubsub.d.ts:264
|
|
280
280
|
|
|
281
281
|
Unsubscribes a client session from one or more events.
|
|
282
282
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Class: TaskAbortController
|
|
8
8
|
|
|
9
|
-
Defined in:
|
|
9
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:1009
|
|
10
10
|
|
|
11
11
|
## Extends
|
|
12
12
|
|
|
@@ -18,7 +18,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/cancelable-ability.ts:35]
|
|
|
18
18
|
|
|
19
19
|
> **new TaskAbortController**(`parent`): `TaskAbortController`
|
|
20
20
|
|
|
21
|
-
Defined in:
|
|
21
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:1014
|
|
22
22
|
|
|
23
23
|
#### Parameters
|
|
24
24
|
|
|
@@ -40,7 +40,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/cancelable-ability.ts:41]
|
|
|
40
40
|
|
|
41
41
|
> `optional` **id**: [`AsyncTaskId`](../type-aliases/AsyncTaskId.md)
|
|
42
42
|
|
|
43
|
-
Defined in:
|
|
43
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:1010
|
|
44
44
|
|
|
45
45
|
***
|
|
46
46
|
|
|
@@ -48,7 +48,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/cancelable-ability.ts:36]
|
|
|
48
48
|
|
|
49
49
|
> **parent**: [`CancelableAbility`](CancelableAbility.md)
|
|
50
50
|
|
|
51
|
-
Defined in:
|
|
51
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:1013
|
|
52
52
|
|
|
53
53
|
***
|
|
54
54
|
|
|
@@ -72,7 +72,7 @@ Returns the AbortSignal object associated with this object.
|
|
|
72
72
|
|
|
73
73
|
> `optional` **streamController**: `ReadableStreamDefaultController`\<`any`\>
|
|
74
74
|
|
|
75
|
-
Defined in:
|
|
75
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:1012
|
|
76
76
|
|
|
77
77
|
***
|
|
78
78
|
|
|
@@ -80,7 +80,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/cancelable-ability.ts:38]
|
|
|
80
80
|
|
|
81
81
|
> `optional` **timeoutId**: `any`
|
|
82
82
|
|
|
83
|
-
Defined in:
|
|
83
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:1011
|
|
84
84
|
|
|
85
85
|
## Methods
|
|
86
86
|
|
|
@@ -88,7 +88,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/cancelable-ability.ts:37]
|
|
|
88
88
|
|
|
89
89
|
> **abort**(`reason?`, `data?`): `void`
|
|
90
90
|
|
|
91
|
-
Defined in:
|
|
91
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:1015
|
|
92
92
|
|
|
93
93
|
Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted.
|
|
94
94
|
|
|
@@ -114,11 +114,11 @@ Invoking this method will set this object's AbortSignal's aborted flag and signa
|
|
|
114
114
|
|
|
115
115
|
***
|
|
116
116
|
|
|
117
|
-
###
|
|
117
|
+
### throwIfAborted()
|
|
118
118
|
|
|
119
|
-
> **
|
|
119
|
+
> **throwIfAborted**(`alreadyRejected?`): `true` \| `undefined`
|
|
120
120
|
|
|
121
|
-
Defined in:
|
|
121
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:1016
|
|
122
122
|
|
|
123
123
|
#### Parameters
|
|
124
124
|
|
|
@@ -128,4 +128,26 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/cancelable-ability.ts:55]
|
|
|
128
128
|
|
|
129
129
|
#### Returns
|
|
130
130
|
|
|
131
|
-
`
|
|
131
|
+
`true` \| `undefined`
|
|
132
|
+
|
|
133
|
+
***
|
|
134
|
+
|
|
135
|
+
### ~~throwRejected()~~
|
|
136
|
+
|
|
137
|
+
> **throwRejected**(`alreadyRejected?`): `true` \| `undefined`
|
|
138
|
+
|
|
139
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:1020
|
|
140
|
+
|
|
141
|
+
#### Parameters
|
|
142
|
+
|
|
143
|
+
##### alreadyRejected?
|
|
144
|
+
|
|
145
|
+
`boolean`
|
|
146
|
+
|
|
147
|
+
#### Returns
|
|
148
|
+
|
|
149
|
+
`true` \| `undefined`
|
|
150
|
+
|
|
151
|
+
#### Deprecated
|
|
152
|
+
|
|
153
|
+
use throwIfAborted instead
|