@isdk/ai-tool 0.7.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-4FKBOPZI.mjs +1 -0
- package/dist/{chunk-VIG2GB47.mjs → chunk-TGTHY57V.mjs} +1 -1
- package/dist/funcs.d.mts +1 -2
- package/dist/funcs.d.ts +1 -2
- package/dist/funcs.js +1 -1
- package/dist/funcs.mjs +1 -1
- package/dist/{index-DEUnmyUq.d.mts → index-BLW3R7VS.d.mts} +103 -69
- package/dist/{index-DEUnmyUq.d.ts → index-BLW3R7VS.d.ts} +103 -69
- package/dist/index.d.mts +100 -37
- package/dist/index.d.ts +100 -37
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/test/util.js +1 -1
- package/dist/test/util.mjs +1 -1
- package/docs/api/{namespaces → @isdk/namespaces}/EventStates/README.md +2 -2
- package/docs/api/{namespaces → @isdk/namespaces}/EventStates/variables/ABORT.md +2 -2
- package/docs/api/{namespaces → @isdk/namespaces}/EventStates/variables/CONTINUE.md +2 -2
- package/docs/api/{namespaces → @isdk/namespaces}/EventStates/variables/DONE.md +2 -2
- package/docs/api/{namespaces → @isdk/namespaces}/EventStates/variables/STOPPED.md +2 -2
- package/docs/api/@isdk/namespaces/uuidv5/README.md +12 -0
- package/docs/api/{namespaces → @isdk/namespaces}/uuidv5/variables/DNS.md +2 -2
- package/docs/api/{namespaces → @isdk/namespaces}/uuidv5/variables/URL.md +2 -2
- package/docs/api/_media/pubsub.md +427 -105
- package/docs/api/_media/server_client_tools.md +5 -3
- package/docs/api/_media/toolFunc.md +3 -1
- package/docs/api/classes/AbortError.md +8 -8
- package/docs/api/classes/AlreadyExistsError.md +8 -8
- package/docs/api/classes/BaseError.md +14 -14
- package/docs/api/classes/BinarySemaphore.md +39 -39
- package/docs/api/classes/CancelableAbility.md +43 -39
- package/docs/api/classes/ClientToolTransport.md +22 -22
- package/docs/api/classes/ClientTools.md +178 -154
- package/docs/api/classes/CommonError.md +12 -12
- package/docs/api/classes/ConfigFile.md +6 -6
- package/docs/api/classes/EnvPromptTemplate.md +14 -14
- package/docs/api/classes/EventClient.md +240 -198
- package/docs/api/classes/EventEmitter.md +14 -14
- package/docs/api/classes/EventServer.md +208 -233
- package/docs/api/classes/EventToolFunc.md +144 -116
- package/docs/api/classes/FStringPromptTemplate.md +14 -14
- package/docs/api/classes/FewShotPromptTemplate.md +30 -26
- package/docs/api/classes/GolangPromptTemplate.md +13 -13
- package/docs/api/classes/HttpClientToolTransport.md +23 -23
- package/docs/api/classes/HttpServerToolTransport.md +32 -27
- package/docs/api/classes/IntSet.md +21 -21
- package/docs/api/classes/LRUCache.md +18 -18
- package/docs/api/classes/NotFoundError.md +8 -8
- package/docs/api/classes/NotImplementationError.md +8 -8
- package/docs/api/classes/PromptExampleSelector.md +17 -15
- package/docs/api/classes/PromptTemplate.md +15 -15
- package/docs/api/classes/ReadableStreamError.md +12 -12
- package/docs/api/classes/ResClientTools.md +180 -152
- package/docs/api/classes/ResServerTools.md +163 -139
- package/docs/api/classes/RpcMethodsClientTool.md +174 -146
- package/docs/api/classes/RpcMethodsServerTool.md +157 -133
- package/docs/api/classes/SSEChannel.md +142 -52
- package/docs/api/classes/Semaphore.md +40 -40
- package/docs/api/classes/ServerToolTransport.md +32 -27
- package/docs/api/classes/ServerTools.md +163 -139
- package/docs/api/classes/SignalGate.md +19 -17
- package/docs/api/classes/SseClientPubSubTransport.md +38 -10
- package/docs/api/classes/SseServerPubSubTransport.md +115 -42
- package/docs/api/classes/TaskAbortController.md +13 -13
- package/docs/api/classes/ToolFunc.md +157 -129
- package/docs/api/classes/ToolTransport.md +13 -13
- package/docs/api/classes/YamlTypeBaseObject.md +5 -5
- package/docs/api/enumerations/AsyncFeatureBits.md +4 -4
- package/docs/api/enumerations/AsyncFeatures.md +4 -4
- package/docs/api/enumerations/HashAlgorithm.md +12 -12
- package/docs/api/functions/AIArgProcessor.md +2 -2
- package/docs/api/functions/AIStream.md +8 -4
- package/docs/api/functions/ChoiceArgProcessor.md +2 -2
- package/docs/api/functions/DefaultDateFormat.md +2 -2
- package/docs/api/functions/ObjectArgsToArgsInfo.md +1 -1
- package/docs/api/functions/RateLimit.md +2 -2
- package/docs/api/functions/TemplateArgProcessor.md +2 -2
- package/docs/api/functions/addDate.md +7 -3
- package/docs/api/functions/assignDirs.md +1 -1
- package/docs/api/functions/beforeShutdown.md +1 -1
- package/docs/api/functions/calcPerplexity.md +2 -2
- package/docs/api/functions/calcPerplexitySimple.md +1 -1
- package/docs/api/functions/canonicalize.md +1 -1
- package/docs/api/functions/completeSentences.md +1 -1
- package/docs/api/functions/concatText.md +1 -1
- package/docs/api/functions/countLLMTokens.md +1 -1
- package/docs/api/functions/countRegexMatches.md +1 -1
- package/docs/api/functions/createAbilityInjector.md +16 -8
- package/docs/api/functions/createCallbacksTransformer.md +7 -3
- package/docs/api/functions/createEmptyReadableStream.md +1 -1
- package/docs/api/functions/createEndWithRepetitionDetector.md +2 -2
- package/docs/api/functions/createError.md +1 -1
- package/docs/api/functions/createEventStreamTransformer.md +8 -4
- package/docs/api/functions/createHfValueFunc.md +1 -1
- package/docs/api/functions/createLRUCache.md +2 -2
- package/docs/api/functions/createYamlObjectTag.md +1 -1
- package/docs/api/functions/dateToText.md +1 -1
- package/docs/api/functions/decodeCharset.md +2 -2
- package/docs/api/functions/defaultsWithConcat.md +1 -1
- package/docs/api/functions/detectCharset.md +2 -2
- package/docs/api/functions/encodeLLMTokens.md +1 -1
- package/docs/api/functions/ensureQuoted.md +1 -1
- package/docs/api/functions/eventable.md +6 -8
- package/docs/api/functions/expandConfig.md +2 -2
- package/docs/api/functions/expandObjEnv.md +1 -1
- package/docs/api/functions/expandPath.md +2 -2
- package/docs/api/functions/expandPathInObject.md +2 -2
- package/docs/api/functions/expandPaths.md +2 -2
- package/docs/api/functions/fileIsExists.md +1 -1
- package/docs/api/functions/filterValidFnScope.md +2 -2
- package/docs/api/functions/findIndexNonEmptyFrom.md +1 -1
- package/docs/api/functions/findPort.md +1 -1
- package/docs/api/functions/formatISO.md +1 -1
- package/docs/api/functions/formatTextWithSpace.md +2 -2
- package/docs/api/functions/funcGetMeta.md +1 -1
- package/docs/api/functions/funcWithMeta.md +2 -2
- package/docs/api/functions/genUrlParamsStr.md +8 -2
- package/docs/api/functions/getAllEnumKeys.md +4 -2
- package/docs/api/functions/getConfigFileNames.md +2 -2
- package/docs/api/functions/getConfigs.md +2 -2
- package/docs/api/functions/getFileMetaInfo.md +1 -1
- package/docs/api/functions/getHashAlgoBySize.md +1 -1
- package/docs/api/functions/getKeysPath.md +4 -2
- package/docs/api/functions/getLLMTokenizer.md +1 -1
- package/docs/api/functions/getMultiLevelExtname.md +1 -1
- package/docs/api/functions/getPackageDir.md +1 -1
- package/docs/api/functions/getRealFilepath.md +1 -1
- package/docs/api/functions/getResponseErrorReadableStream.md +2 -2
- package/docs/api/functions/getXDGConfigs.md +1 -1
- package/docs/api/functions/hasDirectoryIn.md +2 -2
- package/docs/api/functions/hash.md +1 -1
- package/docs/api/functions/hashFile.md +2 -2
- package/docs/api/functions/hashObject.md +2 -2
- package/docs/api/functions/hashStream.md +1 -1
- package/docs/api/functions/initShutdown.md +1 -1
- package/docs/api/functions/isLangUsingSpaces.md +1 -1
- package/docs/api/functions/isListItemString.md +1 -1
- package/docs/api/functions/isModelNameMatched.md +2 -2
- package/docs/api/functions/isPunctuationChar.md +1 -1
- package/docs/api/functions/isQuoted.md +1 -1
- package/docs/api/functions/isRegExp.md +1 -1
- package/docs/api/functions/isSameString.md +1 -1
- package/docs/api/functions/isSectionString.md +2 -2
- package/docs/api/functions/isSentenceEnding.md +1 -1
- package/docs/api/functions/isSepLineString.md +1 -1
- package/docs/api/functions/isStrWrapped.md +1 -1
- package/docs/api/functions/isSubdirectory.md +1 -1
- package/docs/api/functions/isTitleString.md +2 -2
- package/docs/api/functions/isWebStream.md +1 -1
- package/docs/api/functions/joinSplitWords.md +1 -1
- package/docs/api/functions/jsonFilterToWhere.md +2 -2
- package/docs/api/functions/jsonToMarkdownStr.md +2 -2
- package/docs/api/functions/loadAIConfig.md +1 -1
- package/docs/api/functions/loadConfig.md +1 -1
- package/docs/api/functions/loadConfigFile.md +1 -1
- package/docs/api/functions/loadFileFromPaths.md +2 -2
- package/docs/api/functions/loadTextFromPaths.md +3 -3
- package/docs/api/functions/lrucache.md +1 -1
- package/docs/api/functions/matchUrlProtocol.md +1 -1
- package/docs/api/functions/memoize.md +5 -3
- package/docs/api/functions/mergeArray.md +1 -1
- package/docs/api/functions/messagesToText.md +1 -1
- package/docs/api/functions/nanoid.md +45 -0
- package/docs/api/functions/normalizePath.md +1 -1
- package/docs/api/functions/paramsSizeToScaleStr.md +1 -1
- package/docs/api/functions/parseCommand.md +3 -3
- package/docs/api/functions/parseDateFormat.md +7 -3
- package/docs/api/functions/parseISO.md +7 -3
- package/docs/api/functions/parseJsJson.md +2 -2
- package/docs/api/functions/parseJsJsonSimpleSync.md +2 -2
- package/docs/api/functions/parseObjectArgInfo.md +2 -2
- package/docs/api/functions/parseObjectArgumentInfos.md +2 -2
- package/docs/api/functions/parseObjectArguments.md +2 -2
- package/docs/api/functions/parseObjectArgumentsAsArgInfos.md +2 -2
- package/docs/api/functions/parseYaml.md +1 -1
- package/docs/api/functions/pruneSubdirectories.md +1 -1
- package/docs/api/functions/pruneSubdirectoriesInPlace.md +1 -1
- package/docs/api/functions/quoteStr.md +1 -1
- package/docs/api/functions/readFilenamesRecursiveSync.md +2 -2
- package/docs/api/functions/readTextFileChunks.md +2 -2
- package/docs/api/functions/readTextFileChunksEx.md +2 -2
- package/docs/api/functions/readableFromAsyncIterable.md +4 -2
- package/docs/api/functions/registerCoreTools.md +1 -1
- package/docs/api/functions/removeMarkdownBold.md +2 -2
- package/docs/api/functions/removeMarkdownBoldAndItalic.md +2 -2
- package/docs/api/functions/removeMarkdownItalic.md +2 -2
- package/docs/api/functions/replaceWithPlaceholder.md +2 -2
- package/docs/api/functions/restoreFromPlacehoders.md +2 -2
- package/docs/api/functions/sanitizeFilename.md +1 -1
- package/docs/api/functions/sanitizeFilepath.md +1 -1
- package/docs/api/functions/saveConfigFile.md +1 -1
- package/docs/api/functions/scaleStrToParamsSize.md +1 -1
- package/docs/api/functions/shutdown.md +1 -1
- package/docs/api/functions/simplifyObjectArguments.md +1 -1
- package/docs/api/functions/sleep.md +1 -1
- package/docs/api/functions/sortedValues.md +4 -2
- package/docs/api/functions/splitChunks.md +2 -2
- package/docs/api/functions/splitParagraph.md +2 -2
- package/docs/api/functions/splitSentence.md +1 -1
- package/docs/api/functions/splitWords.md +1 -1
- package/docs/api/functions/stringifyYaml.md +1 -1
- package/docs/api/functions/stripConsoleColor.md +1 -1
- package/docs/api/functions/textToDate.md +1 -1
- package/docs/api/functions/throwError.md +1 -1
- package/docs/api/functions/toDate.md +7 -3
- package/docs/api/functions/toDateTime.md +1 -1
- package/docs/api/functions/trimStartOfStreamHelper.md +3 -3
- package/docs/api/functions/truncTo.md +1 -1
- package/docs/api/functions/truncateByToken.md +2 -2
- package/docs/api/functions/truncateToTokenLimit.md +2 -2
- package/docs/api/functions/truncateToTokenLimitEx.md +2 -2
- package/docs/api/functions/uuid.md +15 -6
- package/docs/api/functions/uuidStringify.md +1 -1
- package/docs/api/functions/uuidv1.md +5 -3
- package/docs/api/functions/uuidv4.md +5 -3
- package/docs/api/functions/uuidv5.md +5 -3
- package/docs/api/functions/uuidv6.md +61 -0
- package/docs/api/functions/uuidv7.md +61 -0
- package/docs/api/functions/wrapEventEmitter.md +1 -1
- package/docs/api/functions/xxhash.md +1 -1
- package/docs/api/functions/xxhash32.md +1 -1
- package/docs/api/functions/xxhash64.md +1 -1
- package/docs/api/functions/xxhashAsStr.md +1 -1
- package/docs/api/functions/yieldExec.md +1 -1
- package/docs/api/globals.md +11 -6
- package/docs/api/interfaces/AIChatAssistantMessageParam.md +12 -12
- package/docs/api/interfaces/AIChatContentPartImage.md +3 -3
- package/docs/api/interfaces/AIChatContentPartText.md +3 -3
- package/docs/api/interfaces/AIChatMessageParamBase.md +7 -7
- package/docs/api/interfaces/AIChatMessageToolCall.md +4 -4
- package/docs/api/interfaces/AIChatSystemMessageParam.md +9 -9
- package/docs/api/interfaces/AIChatToolChoiceFuncObject.md +3 -3
- package/docs/api/interfaces/AIChatToolChoiceObject.md +2 -2
- package/docs/api/interfaces/AIChatToolFunc.md +5 -5
- package/docs/api/interfaces/AIChatToolFuncParam.md +3 -3
- package/docs/api/interfaces/AIChatToolMessageParam.md +10 -10
- package/docs/api/interfaces/AIChatToolParam.md +2 -2
- package/docs/api/interfaces/AIChatToolTypeObject.md +2 -2
- package/docs/api/interfaces/AIChatUserMessageParam.md +13 -13
- package/docs/api/interfaces/AIChoiceConfig.md +8 -8
- package/docs/api/interfaces/AIResult.md +12 -8
- package/docs/api/interfaces/AIStreamParser.md +8 -6
- package/docs/api/interfaces/AIStreamParserOptions.md +2 -2
- package/docs/api/interfaces/BaseFunc.md +17 -17
- package/docs/api/interfaces/BaseFuncItem.md +15 -15
- package/docs/api/interfaces/BinarySemaphoreAcquireOptions.md +2 -2
- package/docs/api/interfaces/BinarySemaphoreOptions.md +5 -5
- package/docs/api/interfaces/BinarySemaphoreReleaseOptions.md +2 -2
- package/docs/api/interfaces/BinarySemaphoreReleaserFunc.md +3 -3
- package/docs/api/interfaces/CancelableAbilityOptions.md +4 -4
- package/docs/api/interfaces/ClientFuncItem.md +21 -25
- package/docs/api/interfaces/EventClientFuncParams.md +5 -5
- package/docs/api/interfaces/EventServerFuncParams.md +14 -6
- package/docs/api/interfaces/FewShotPromptTemplateOptions.md +9 -7
- package/docs/api/interfaces/FuncItem.md +18 -18
- package/docs/api/interfaces/FuncParam.md +5 -5
- package/docs/api/interfaces/FuncParams.md +1 -1
- package/docs/api/interfaces/Funcs.md +1 -1
- package/docs/api/interfaces/HashAlgoParams.md +4 -4
- package/docs/api/interfaces/IClientToolTransport.md +9 -9
- package/docs/api/interfaces/IFileMetaInfo.md +8 -8
- package/docs/api/interfaces/IPubSubClientTransport.md +31 -7
- package/docs/api/interfaces/IPubSubServerTransport.md +92 -47
- package/docs/api/interfaces/IReadTextFileChunksOptions.md +13 -13
- package/docs/api/interfaces/IServerToolTransport.md +19 -14
- package/docs/api/interfaces/IToolTransport.md +6 -6
- package/docs/api/interfaces/ITruncateToTokenLimitOptions.md +11 -11
- package/docs/api/interfaces/JsonFilter.md +1 -1
- package/docs/api/interfaces/ParseObjectArgumentOptions.md +11 -11
- package/docs/api/interfaces/ProbabilityItem.md +4 -4
- package/docs/api/interfaces/PromptExampleSelectorOptions.md +3 -3
- package/docs/api/interfaces/PubSubClientStream.md +26 -14
- package/docs/api/interfaces/PubSubServerSession.md +8 -8
- package/docs/api/interfaces/RemoteFuncItem.md +21 -25
- package/docs/api/interfaces/ReplacePlacehoderOptions.md +5 -5
- package/docs/api/interfaces/ResClientFuncParams.md +3 -3
- package/docs/api/interfaces/ResServerFuncParams.md +6 -6
- package/docs/api/interfaces/RpcMethodsClientFuncParams.md +2 -2
- package/docs/api/interfaces/RpcMethodsServerFuncParams.md +4 -4
- package/docs/api/interfaces/SectionStringOptions.md +3 -3
- package/docs/api/interfaces/SemaphoreOptions.md +7 -7
- package/docs/api/interfaces/SemaphoreTaskItem.md +6 -6
- package/docs/api/interfaces/ServerFuncItem.md +22 -26
- package/docs/api/interfaces/ServerFuncParams.md +3 -3
- package/docs/api/interfaces/SplitSentenceOptions.md +5 -5
- package/docs/api/interfaces/StreamCallbacksAndOptions.md +11 -7
- package/docs/api/interfaces/TaskAbortControllers.md +1 -1
- package/docs/api/interfaces/TaskPromise.md +17 -9
- package/docs/api/interfaces/ToolFuncPackage.md +5 -5
- package/docs/api/type-aliases/AIChatContentPart.md +2 -2
- package/docs/api/type-aliases/AIChatMessageParam.md +2 -2
- package/docs/api/type-aliases/AIChatRole.md +2 -2
- package/docs/api/type-aliases/AIChatToolChoiceParam.md +2 -2
- package/docs/api/type-aliases/AIMessageType.md +2 -2
- package/docs/api/type-aliases/AIModelNameRule.md +2 -2
- package/docs/api/type-aliases/AIModelNameRuleFn.md +2 -2
- package/docs/api/type-aliases/AIModelNameRules.md +2 -2
- package/docs/api/type-aliases/AITextGenerationFinishReason.md +2 -2
- package/docs/api/type-aliases/ActionName.md +2 -2
- package/docs/api/type-aliases/ArrayMergeWay.md +2 -2
- package/docs/api/type-aliases/AsyncTaskId.md +2 -2
- package/docs/api/type-aliases/BeforeShutdownListener.md +2 -2
- package/docs/api/type-aliases/EventErrorListenerFn.md +2 -2
- package/docs/api/type-aliases/EventListenerFn.md +2 -2
- package/docs/api/type-aliases/FuncParamType.md +2 -2
- package/docs/api/type-aliases/PromptExamples.md +5 -3
- package/docs/api/type-aliases/PubSubClientId.md +2 -2
- package/docs/api/type-aliases/PubSubCtx.md +24 -4
- package/docs/api/type-aliases/RpcMethodHandler.md +2 -2
- package/docs/api/type-aliases/SSEClient.md +53 -0
- package/docs/api/type-aliases/SemaphoreIsReadyFuncType.md +2 -2
- package/docs/api/type-aliases/TFunc.md +2 -2
- package/docs/api/type-aliases/UUIDVersions.md +11 -0
- package/docs/api/variables/AIChatRoles.md +1 -1
- package/docs/api/variables/AIMessageTypes.md +1 -1
- package/docs/api/variables/AITextGenerationFinishReasons.md +1 -1
- package/docs/api/variables/ActionNames.md +1 -1
- package/docs/api/variables/ArrayMergeWay.md +2 -2
- package/docs/api/variables/ArrayMergeWaySymbol.md +2 -2
- package/docs/api/variables/ClientEventPrefix.md +11 -0
- package/docs/api/variables/ClientToolFuncSchema.md +4 -2
- package/docs/api/variables/DEFAULT_CONFIG_NAME.md +1 -1
- package/docs/api/variables/DefaultAsyncSemaphoreCapacity.md +1 -1
- package/docs/api/variables/EventBusName.md +1 -1
- package/docs/api/variables/EventName.md +1 -1
- package/docs/api/variables/FuncMetaSymbol.md +2 -2
- package/docs/api/variables/LLM_TOKENIZER_NAMES.md +4 -4
- package/docs/api/variables/LLM_TOKENIZER_NAMES_MAP.md +1 -1
- package/docs/api/variables/PASSING_SCORE.md +1 -1
- package/docs/api/variables/RStreamErrCode.md +1 -1
- package/docs/api/variables/RemoteToolFuncSchema.md +4 -2
- package/docs/api/variables/ResponseRStreamErrCode.md +1 -1
- package/docs/api/variables/RpcMethodsClientToolSchema.md +4 -2
- package/docs/api/variables/RpcMethodsServerToolSchema.md +2 -2
- package/docs/api/variables/SHUTDOWN_SIGNALS.md +1 -1
- package/docs/api/variables/SSEChannelAlreadyClosedErrCode.md +1 -1
- package/docs/api/variables/SecondaryCache.md +1 -1
- package/docs/api/variables/ServerToolFuncSchema.md +4 -2
- package/docs/api/variables/StrangeHumanName.md +1 -1
- package/docs/api/variables/ToolAsyncCancelableBit.md +1 -1
- package/docs/api/variables/ToolAsyncMultiTaskBit.md +1 -1
- package/docs/api/variables/ToolAsyncPriorityBit.md +1 -1
- package/docs/api/variables/ToolFuncSchema.md +4 -2
- package/docs/api/variables/backendEventable.md +11 -0
- package/docs/api/variables/base32768.md +1 -1
- package/docs/api/variables/event.md +1 -1
- package/docs/api/variables/eventClient.md +1 -1
- package/docs/api/variables/eventServer.md +1 -1
- package/docs/api/variables/lrucache.md +1 -1
- package/docs/api/variables/makeToolFuncCancelable.md +11 -0
- package/docs/api/{functions → variables}/wait.md +16 -14
- package/docs/pubsub.md +427 -105
- package/docs/server_client_tools.md +5 -3
- package/docs/toolFunc.md +3 -1
- package/package.json +8 -7
- package/dist/chunk-4XRPAC7C.mjs +0 -1
- package/docs/api/functions/backendEventable.md +0 -29
- package/docs/api/functions/makeToolFuncCancelable.md +0 -29
- package/docs/api/interfaces/PubSubClient.md +0 -27
- package/docs/api/namespaces/uuidv5/README.md +0 -12
|
@@ -8,14 +8,16 @@
|
|
|
8
8
|
|
|
9
9
|
> **readableFromAsyncIterable**\<`T`\>(`iterable`): `ReadableStream`\<`T`\>
|
|
10
10
|
|
|
11
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/stream/ai-stream.ts:164](https://github.com/isdk/ai-tool.js/blob/
|
|
11
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/stream/ai-stream.ts:164](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/stream/ai-stream.ts#L164)
|
|
12
12
|
|
|
13
13
|
Implements ReadableStream.from(asyncIterable), which isn't documented in MDN and isn't implemented in node.
|
|
14
14
|
https://github.com/whatwg/streams/commit/8d7a0bf26eb2cc23e884ddbaac7c1da4b91cf2bc
|
|
15
15
|
|
|
16
16
|
## Type Parameters
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
### T
|
|
19
|
+
|
|
20
|
+
`T`
|
|
19
21
|
|
|
20
22
|
## Parameters
|
|
21
23
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **registerCoreTools**(): `void`
|
|
10
10
|
|
|
11
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/index.ts:9](https://github.com/isdk/ai-tool.js/blob/
|
|
11
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/index.ts:9](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/funcs/index.ts#L9)
|
|
12
12
|
|
|
13
13
|
## Returns
|
|
14
14
|
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
# Function: removeMarkdownBold()
|
|
8
8
|
|
|
9
|
-
> **removeMarkdownBold**(`s`, `once
|
|
9
|
+
> **removeMarkdownBold**(`s`, `once?`): `string`
|
|
10
10
|
|
|
11
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/split-sentence.ts:292](https://github.com/isdk/ai-tool.js/blob/
|
|
11
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/split-sentence.ts:292](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/split-sentence.ts#L292)
|
|
12
12
|
|
|
13
13
|
## Parameters
|
|
14
14
|
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
# Function: removeMarkdownBoldAndItalic()
|
|
8
8
|
|
|
9
|
-
> **removeMarkdownBoldAndItalic**(`s`, `once
|
|
9
|
+
> **removeMarkdownBoldAndItalic**(`s`, `once?`): `string`
|
|
10
10
|
|
|
11
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/split-sentence.ts:312](https://github.com/isdk/ai-tool.js/blob/
|
|
11
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/split-sentence.ts:312](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/split-sentence.ts#L312)
|
|
12
12
|
|
|
13
13
|
## Parameters
|
|
14
14
|
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
# Function: removeMarkdownItalic()
|
|
8
8
|
|
|
9
|
-
> **removeMarkdownItalic**(`s`, `once
|
|
9
|
+
> **removeMarkdownItalic**(`s`, `once?`): `string`
|
|
10
10
|
|
|
11
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/split-sentence.ts:302](https://github.com/isdk/ai-tool.js/blob/
|
|
11
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/split-sentence.ts:302](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/split-sentence.ts#L302)
|
|
12
12
|
|
|
13
13
|
## Parameters
|
|
14
14
|
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
# Function: replaceWithPlaceholder()
|
|
8
8
|
|
|
9
|
-
> **replaceWithPlaceholder**(`content`, `options
|
|
9
|
+
> **replaceWithPlaceholder**(`content`, `options?`): \[`string`, `string`[]\]
|
|
10
10
|
|
|
11
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/parse-command.ts:487](https://github.com/isdk/ai-tool.js/blob/
|
|
11
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/parse-command.ts:487](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/parse-command.ts#L487)
|
|
12
12
|
|
|
13
13
|
Replaces substrings in the given content with placeholders.
|
|
14
14
|
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
# Function: restoreFromPlacehoders()
|
|
8
8
|
|
|
9
|
-
> **restoreFromPlacehoders**(`content`, `placehoders`, `options
|
|
9
|
+
> **restoreFromPlacehoders**(`content`, `placehoders`, `options?`): `string`
|
|
10
10
|
|
|
11
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/parse-command.ts:540](https://github.com/isdk/ai-tool.js/blob/
|
|
11
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/parse-command.ts:540](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/parse-command.ts#L540)
|
|
12
12
|
|
|
13
13
|
Restores the original substrings from placeholders in the given content.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **saveConfigFile**(`filename`, `config`, `extLevel`): `string`
|
|
10
10
|
|
|
11
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/config.ts:46](https://github.com/isdk/ai-tool.js/blob/
|
|
11
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/config.ts:46](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/config.ts#L46)
|
|
12
12
|
|
|
13
13
|
## Parameters
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **scaleStrToParamsSize**(`scale`): `number`
|
|
10
10
|
|
|
11
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/convert-params-size.ts:44](https://github.com/isdk/ai-tool.js/blob/
|
|
11
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/convert-params-size.ts:44](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/convert-params-size.ts#L44)
|
|
12
12
|
|
|
13
13
|
Converts a formatted parameters size string (with units T, B, M, or K) back to its byte value.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **shutdown**(`signalOrEvent`, `exitCode`): `Promise`\<`undefined`\>
|
|
10
10
|
|
|
11
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/node/before-shutdown.ts:64](https://github.com/isdk/ai-tool.js/blob/
|
|
11
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/node/before-shutdown.ts:64](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/node/before-shutdown.ts#L64)
|
|
12
12
|
|
|
13
13
|
Main process shutdown handler. Will invoke every previously registered async shutdown listener
|
|
14
14
|
in the queue and exit with a code of `0`. Any `Promise` rejections from any listener will
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **simplifyObjectArguments**(`args`): `any`
|
|
10
10
|
|
|
11
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/parse-command.ts:121](https://github.com/isdk/ai-tool.js/blob/
|
|
11
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/parse-command.ts:121](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/parse-command.ts#L121)
|
|
12
12
|
|
|
13
13
|
## Parameters
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **sleep**(`ms`): `Promise`\<`void`\>
|
|
10
10
|
|
|
11
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/wait.ts:12](https://github.com/isdk/ai-tool.js/blob/
|
|
11
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/wait.ts:12](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/wait.ts#L12)
|
|
12
12
|
|
|
13
13
|
Suspends execution for a specified number of milliseconds
|
|
14
14
|
|
|
@@ -8,11 +8,13 @@
|
|
|
8
8
|
|
|
9
9
|
> **sortedValues**\<`T`\>(`values`): `T`[]
|
|
10
10
|
|
|
11
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/prompt/few-shot-prompt-template.ts:4](https://github.com/isdk/ai-tool.js/blob/
|
|
11
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/prompt/few-shot-prompt-template.ts:4](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/prompt/few-shot-prompt-template.ts#L4)
|
|
12
12
|
|
|
13
13
|
## Type Parameters
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
### T
|
|
16
|
+
|
|
17
|
+
`T`
|
|
16
18
|
|
|
17
19
|
## Parameters
|
|
18
20
|
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
# Function: splitChunks()
|
|
8
8
|
|
|
9
|
-
> **splitChunks**(`content`, `options
|
|
9
|
+
> **splitChunks**(`content`, `options?`): `Promise`\<`string`[][]\>
|
|
10
10
|
|
|
11
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/read-text-file-chunks.ts:182](https://github.com/isdk/ai-tool.js/blob/
|
|
11
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/read-text-file-chunks.ts:182](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/read-text-file-chunks.ts#L182)
|
|
12
12
|
|
|
13
13
|
## Parameters
|
|
14
14
|
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
# Function: splitParagraph()
|
|
8
8
|
|
|
9
|
-
> **splitParagraph**(`value`, `options
|
|
9
|
+
> **splitParagraph**(`value`, `options?`): `string`[][]
|
|
10
10
|
|
|
11
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/split-paragraph.ts:12](https://github.com/isdk/ai-tool.js/blob/
|
|
11
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/split-paragraph.ts:12](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/split-paragraph.ts#L12)
|
|
12
12
|
|
|
13
13
|
Splits the input string into paragraphs based on empty lines and title lines.
|
|
14
14
|
Each paragraph is represented as an array of strings, where each string is a line in the paragraph.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **splitSentence**(`text`, `best`): `string`[]
|
|
10
10
|
|
|
11
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/split-sentence.ts:44](https://github.com/isdk/ai-tool.js/blob/
|
|
11
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/split-sentence.ts:44](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/split-sentence.ts#L44)
|
|
12
12
|
|
|
13
13
|
Splits a text into sentences.
|
|
14
14
|
This function is used to split a text into separate sentences, based on punctuation marks such as '.', '?', or '!' and other rules.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **splitWords**(`input`): `string`[]
|
|
10
10
|
|
|
11
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/split-words.ts:41](https://github.com/isdk/ai-tool.js/blob/
|
|
11
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/split-words.ts:41](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/split-words.ts#L41)
|
|
12
12
|
|
|
13
13
|
Splits a string into an array of words based on case changes, digit boundaries, and spaces.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **stripConsoleColor**(`str`): `any`
|
|
10
10
|
|
|
11
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/strip-console-color.ts:1](https://github.com/isdk/ai-tool.js/blob/
|
|
11
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/strip-console-color.ts:1](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/strip-console-color.ts#L1)
|
|
12
12
|
|
|
13
13
|
## Parameters
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **textToDate**(`date`, `format`): `Date`
|
|
10
10
|
|
|
11
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/to-datetime.ts:31](https://github.com/isdk/ai-tool.js/blob/
|
|
11
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/to-datetime.ts:31](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/to-datetime.ts#L31)
|
|
12
12
|
|
|
13
13
|
## Parameters
|
|
14
14
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Function: throwError()
|
|
8
8
|
|
|
9
|
-
> **throwError**(`message`, `name
|
|
9
|
+
> **throwError**(`message`, `name?`, `status?`): `never`
|
|
10
10
|
|
|
11
11
|
Defined in: @isdk/ai-tools/node\_modules/.pnpm/@isdk+common-error@0.2.0/node\_modules/@isdk/common-error/dist/index.d.ts:172
|
|
12
12
|
|
|
@@ -6,17 +6,21 @@
|
|
|
6
6
|
|
|
7
7
|
# Function: toDate()
|
|
8
8
|
|
|
9
|
-
> **toDate**\<`DateType`, `ResultDate`\>(`argument`, `context
|
|
9
|
+
> **toDate**\<`DateType`, `ResultDate`\>(`argument`, `context?`): `ResultDate`
|
|
10
10
|
|
|
11
11
|
Defined in: @isdk/ai-tools/node\_modules/.pnpm/date-fns@4.1.0/node\_modules/date-fns/toDate.d.ts:40
|
|
12
12
|
|
|
13
13
|
## Type Parameters
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
### DateType
|
|
16
|
+
|
|
17
|
+
`DateType` *extends* `Date` \| `ConstructableDate`
|
|
16
18
|
|
|
17
19
|
The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
### ResultDate
|
|
22
|
+
|
|
23
|
+
`ResultDate` *extends* `Date` = `DateType`
|
|
20
24
|
|
|
21
25
|
The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
22
26
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **toDateTime**(`date`): `undefined` \| `Date`
|
|
10
10
|
|
|
11
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/to-datetime.ts:15](https://github.com/isdk/ai-tool.js/blob/
|
|
11
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/to-datetime.ts:15](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/to-datetime.ts#L15)
|
|
12
12
|
|
|
13
13
|
## Parameters
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **trimStartOfStreamHelper**(): (`text`) => `string`
|
|
10
10
|
|
|
11
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/stream/ai-stream.ts:90](https://github.com/isdk/ai-tool.js/blob/
|
|
11
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/stream/ai-stream.ts:90](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/stream/ai-stream.ts#L90)
|
|
12
12
|
|
|
13
13
|
Returns a stateful function that, when invoked, trims leading whitespace
|
|
14
14
|
from the input text. The trimming only occurs on the first invocation, ensuring that
|
|
@@ -17,11 +17,11 @@ where a text stream is being processed and only the initial whitespace should be
|
|
|
17
17
|
|
|
18
18
|
## Returns
|
|
19
19
|
|
|
20
|
-
`Function`
|
|
21
|
-
|
|
22
20
|
A function that takes a string as input and returns a string
|
|
23
21
|
with leading whitespace removed if it is the first invocation; otherwise, it returns the input unchanged.
|
|
24
22
|
|
|
23
|
+
> (`text`): `string`
|
|
24
|
+
|
|
25
25
|
### Parameters
|
|
26
26
|
|
|
27
27
|
#### text
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **truncTo**(`n`, `dec`, `up`): `number`
|
|
10
10
|
|
|
11
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/trunc-to.ts:19](https://github.com/isdk/ai-tool.js/blob/
|
|
11
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/trunc-to.ts:19](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/trunc-to.ts#L19)
|
|
12
12
|
|
|
13
13
|
Truncates(Round) a number to a specified number of decimal places.
|
|
14
14
|
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
# Function: truncateByToken()
|
|
8
8
|
|
|
9
|
-
> **truncateByToken**(`content`, `options
|
|
9
|
+
> **truncateByToken**(`content`, `options?`): `Promise`\<`void`\>
|
|
10
10
|
|
|
11
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/truncate-to-token-limit.ts:164](https://github.com/isdk/ai-tool.js/blob/
|
|
11
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/truncate-to-token-limit.ts:164](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/truncate-to-token-limit.ts#L164)
|
|
12
12
|
|
|
13
13
|
## Parameters
|
|
14
14
|
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
# Function: truncateToTokenLimit()
|
|
8
8
|
|
|
9
|
-
> **truncateToTokenLimit**(`content`, `options
|
|
9
|
+
> **truncateToTokenLimit**(`content`, `options?`): `Promise`\<`string`\>
|
|
10
10
|
|
|
11
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/truncate-to-token-limit.ts:31](https://github.com/isdk/ai-tool.js/blob/
|
|
11
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/truncate-to-token-limit.ts:31](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/truncate-to-token-limit.ts#L31)
|
|
12
12
|
|
|
13
13
|
Truncates the given content to fit within a specified token limit by removing sentences from the end.
|
|
14
14
|
This function is suitable for text content with multiple sentences.
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
# Function: truncateToTokenLimitEx()
|
|
8
8
|
|
|
9
|
-
> **truncateToTokenLimitEx**(`sentences`, `options
|
|
9
|
+
> **truncateToTokenLimitEx**(`sentences`, `options?`): `Promise`\<`string`[]\>
|
|
10
10
|
|
|
11
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/truncate-to-token-limit.ts:111](https://github.com/isdk/ai-tool.js/blob/
|
|
11
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/truncate-to-token-limit.ts:111](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/truncate-to-token-limit.ts#L111)
|
|
12
12
|
|
|
13
13
|
## Parameters
|
|
14
14
|
|
|
@@ -6,20 +6,29 @@
|
|
|
6
6
|
|
|
7
7
|
# Function: uuid()
|
|
8
8
|
|
|
9
|
-
> **uuid**(`
|
|
9
|
+
> **uuid**(`encode?`): `string`
|
|
10
10
|
|
|
11
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/hash/uuid.ts:
|
|
11
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/hash/uuid.ts:21](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/hash/uuid.ts#L21)
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
### ver
|
|
13
|
+
Generates a UUID (Universally Unique Identifier) based on the specified version and encoding options.
|
|
16
14
|
|
|
17
|
-
|
|
15
|
+
## Parameters
|
|
18
16
|
|
|
19
17
|
### encode?
|
|
20
18
|
|
|
21
19
|
`boolean`
|
|
22
20
|
|
|
21
|
+
Whether to encode the generated UUID using Base32768 encoding. Defaults to `false`.
|
|
22
|
+
|
|
23
23
|
## Returns
|
|
24
24
|
|
|
25
25
|
`string`
|
|
26
|
+
|
|
27
|
+
A string representing the generated UUID. If `encode` is `true`, the UUID will be encoded in Base32768 format.
|
|
28
|
+
|
|
29
|
+
## Example
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
// Generate an encoded UUID version 1 using Base32768
|
|
33
|
+
const encodedUuid1 = uuid(true);
|
|
34
|
+
```
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
## Call Signature
|
|
10
10
|
|
|
11
|
-
> **uuidv1**(`options
|
|
11
|
+
> **uuidv1**(`options?`, `buf?`, `offset?`): `string`
|
|
12
12
|
|
|
13
13
|
Defined in: @isdk/ai-tools/node\_modules/.pnpm/uuid@11.1.0/node\_modules/uuid/dist/esm-browser/v1.d.ts:8
|
|
14
14
|
|
|
@@ -32,13 +32,15 @@ Defined in: @isdk/ai-tools/node\_modules/.pnpm/uuid@11.1.0/node\_modules/uuid/di
|
|
|
32
32
|
|
|
33
33
|
## Call Signature
|
|
34
34
|
|
|
35
|
-
> **uuidv1**\<`Buf`\>(`options`, `buf`, `offset
|
|
35
|
+
> **uuidv1**\<`Buf`\>(`options`, `buf`, `offset?`): `Buf`
|
|
36
36
|
|
|
37
37
|
Defined in: @isdk/ai-tools/node\_modules/.pnpm/uuid@11.1.0/node\_modules/uuid/dist/esm-browser/v1.d.ts:9
|
|
38
38
|
|
|
39
39
|
### Type Parameters
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
#### Buf
|
|
42
|
+
|
|
43
|
+
`Buf` *extends* `Uint8Array`\<`ArrayBufferLike`\> = `Uint8Array`\<`ArrayBufferLike`\>
|
|
42
44
|
|
|
43
45
|
### Parameters
|
|
44
46
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
## Call Signature
|
|
10
10
|
|
|
11
|
-
> **uuidv4**(`options
|
|
11
|
+
> **uuidv4**(`options?`, `buf?`, `offset?`): `string`
|
|
12
12
|
|
|
13
13
|
Defined in: @isdk/ai-tools/node\_modules/.pnpm/uuid@11.1.0/node\_modules/uuid/dist/esm-browser/v4.d.ts:2
|
|
14
14
|
|
|
@@ -32,13 +32,15 @@ Defined in: @isdk/ai-tools/node\_modules/.pnpm/uuid@11.1.0/node\_modules/uuid/di
|
|
|
32
32
|
|
|
33
33
|
## Call Signature
|
|
34
34
|
|
|
35
|
-
> **uuidv4**\<`TBuf`\>(`options`, `buf`, `offset
|
|
35
|
+
> **uuidv4**\<`TBuf`\>(`options`, `buf`, `offset?`): `TBuf`
|
|
36
36
|
|
|
37
37
|
Defined in: @isdk/ai-tools/node\_modules/.pnpm/uuid@11.1.0/node\_modules/uuid/dist/esm-browser/v4.d.ts:3
|
|
38
38
|
|
|
39
39
|
### Type Parameters
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
#### TBuf
|
|
42
|
+
|
|
43
|
+
`TBuf` *extends* `Uint8Array`\<`ArrayBufferLike`\> = `Uint8Array`\<`ArrayBufferLike`\>
|
|
42
44
|
|
|
43
45
|
### Parameters
|
|
44
46
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
## Call Signature
|
|
10
10
|
|
|
11
|
-
> **uuidv5**(`value`, `namespace`, `buf
|
|
11
|
+
> **uuidv5**(`value`, `namespace`, `buf?`, `offset?`): `string`
|
|
12
12
|
|
|
13
13
|
Defined in: @isdk/ai-tools/node\_modules/.pnpm/uuid@11.1.0/node\_modules/uuid/dist/esm-browser/v5.d.ts:3
|
|
14
14
|
|
|
@@ -36,13 +36,15 @@ Defined in: @isdk/ai-tools/node\_modules/.pnpm/uuid@11.1.0/node\_modules/uuid/di
|
|
|
36
36
|
|
|
37
37
|
## Call Signature
|
|
38
38
|
|
|
39
|
-
> **uuidv5**\<`TBuf`\>(`value`, `namespace`, `buf`, `offset
|
|
39
|
+
> **uuidv5**\<`TBuf`\>(`value`, `namespace`, `buf`, `offset?`): `TBuf`
|
|
40
40
|
|
|
41
41
|
Defined in: @isdk/ai-tools/node\_modules/.pnpm/uuid@11.1.0/node\_modules/uuid/dist/esm-browser/v5.d.ts:4
|
|
42
42
|
|
|
43
43
|
### Type Parameters
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
#### TBuf
|
|
46
|
+
|
|
47
|
+
`TBuf` *extends* `Uint8Array`\<`ArrayBufferLike`\> = `Uint8Array`\<`ArrayBufferLike`\>
|
|
46
48
|
|
|
47
49
|
### Parameters
|
|
48
50
|
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
[**@isdk/ai-tool**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@isdk/ai-tool](../globals.md) / uuidv6
|
|
6
|
+
|
|
7
|
+
# Function: uuidv6()
|
|
8
|
+
|
|
9
|
+
## Call Signature
|
|
10
|
+
|
|
11
|
+
> **uuidv6**(`options?`, `buf?`, `offset?`): `string`
|
|
12
|
+
|
|
13
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/uuid@11.1.0/node\_modules/uuid/dist/esm-browser/v6.d.ts:2
|
|
14
|
+
|
|
15
|
+
### Parameters
|
|
16
|
+
|
|
17
|
+
#### options?
|
|
18
|
+
|
|
19
|
+
`Version1Options`
|
|
20
|
+
|
|
21
|
+
#### buf?
|
|
22
|
+
|
|
23
|
+
`undefined`
|
|
24
|
+
|
|
25
|
+
#### offset?
|
|
26
|
+
|
|
27
|
+
`number`
|
|
28
|
+
|
|
29
|
+
### Returns
|
|
30
|
+
|
|
31
|
+
`string`
|
|
32
|
+
|
|
33
|
+
## Call Signature
|
|
34
|
+
|
|
35
|
+
> **uuidv6**\<`TBuf`\>(`options`, `buf`, `offset?`): `TBuf`
|
|
36
|
+
|
|
37
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/uuid@11.1.0/node\_modules/uuid/dist/esm-browser/v6.d.ts:3
|
|
38
|
+
|
|
39
|
+
### Type Parameters
|
|
40
|
+
|
|
41
|
+
#### TBuf
|
|
42
|
+
|
|
43
|
+
`TBuf` *extends* `Uint8Array`\<`ArrayBufferLike`\> = `Uint8Array`\<`ArrayBufferLike`\>
|
|
44
|
+
|
|
45
|
+
### Parameters
|
|
46
|
+
|
|
47
|
+
#### options
|
|
48
|
+
|
|
49
|
+
`undefined` | `Version1Options`
|
|
50
|
+
|
|
51
|
+
#### buf
|
|
52
|
+
|
|
53
|
+
`TBuf`
|
|
54
|
+
|
|
55
|
+
#### offset?
|
|
56
|
+
|
|
57
|
+
`number`
|
|
58
|
+
|
|
59
|
+
### Returns
|
|
60
|
+
|
|
61
|
+
`TBuf`
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
[**@isdk/ai-tool**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@isdk/ai-tool](../globals.md) / uuidv7
|
|
6
|
+
|
|
7
|
+
# Function: uuidv7()
|
|
8
|
+
|
|
9
|
+
## Call Signature
|
|
10
|
+
|
|
11
|
+
> **uuidv7**(`options?`, `buf?`, `offset?`): `string`
|
|
12
|
+
|
|
13
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/uuid@11.1.0/node\_modules/uuid/dist/esm-browser/v7.d.ts:6
|
|
14
|
+
|
|
15
|
+
### Parameters
|
|
16
|
+
|
|
17
|
+
#### options?
|
|
18
|
+
|
|
19
|
+
`Version7Options`
|
|
20
|
+
|
|
21
|
+
#### buf?
|
|
22
|
+
|
|
23
|
+
`undefined`
|
|
24
|
+
|
|
25
|
+
#### offset?
|
|
26
|
+
|
|
27
|
+
`number`
|
|
28
|
+
|
|
29
|
+
### Returns
|
|
30
|
+
|
|
31
|
+
`string`
|
|
32
|
+
|
|
33
|
+
## Call Signature
|
|
34
|
+
|
|
35
|
+
> **uuidv7**\<`TBuf`\>(`options`, `buf`, `offset?`): `TBuf`
|
|
36
|
+
|
|
37
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/uuid@11.1.0/node\_modules/uuid/dist/esm-browser/v7.d.ts:7
|
|
38
|
+
|
|
39
|
+
### Type Parameters
|
|
40
|
+
|
|
41
|
+
#### TBuf
|
|
42
|
+
|
|
43
|
+
`TBuf` *extends* `Uint8Array`\<`ArrayBufferLike`\> = `Uint8Array`\<`ArrayBufferLike`\>
|
|
44
|
+
|
|
45
|
+
### Parameters
|
|
46
|
+
|
|
47
|
+
#### options
|
|
48
|
+
|
|
49
|
+
`undefined` | `Version7Options`
|
|
50
|
+
|
|
51
|
+
#### buf
|
|
52
|
+
|
|
53
|
+
`TBuf`
|
|
54
|
+
|
|
55
|
+
#### offset?
|
|
56
|
+
|
|
57
|
+
`number`
|
|
58
|
+
|
|
59
|
+
### Returns
|
|
60
|
+
|
|
61
|
+
`TBuf`
|