@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
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
[**@isdk/ai-tool**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@isdk/ai-tool](../globals.md) / CmdArgAIChoiceConfig
|
|
6
|
+
|
|
7
|
+
# Interface: CmdArgAIChoiceConfig
|
|
8
|
+
|
|
9
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:252](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L252)
|
|
10
|
+
|
|
11
|
+
Configuration for AI selection logic (used by ChoiceArgProcessor).
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
"|item1|item2:maxPick=2"
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Properties
|
|
20
|
+
|
|
21
|
+
### end?
|
|
22
|
+
|
|
23
|
+
> `optional` **end**: `string`
|
|
24
|
+
|
|
25
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:268](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L268)
|
|
26
|
+
|
|
27
|
+
Closing character/string for the selection UI
|
|
28
|
+
|
|
29
|
+
***
|
|
30
|
+
|
|
31
|
+
### items?
|
|
32
|
+
|
|
33
|
+
> `optional` **items**: `string`[]
|
|
34
|
+
|
|
35
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:254](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L254)
|
|
36
|
+
|
|
37
|
+
List of items to choose from
|
|
38
|
+
|
|
39
|
+
***
|
|
40
|
+
|
|
41
|
+
### maxPick?
|
|
42
|
+
|
|
43
|
+
> `optional` **maxPick**: `number`
|
|
44
|
+
|
|
45
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:256](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L256)
|
|
46
|
+
|
|
47
|
+
Maximum number of items that can be picked
|
|
48
|
+
|
|
49
|
+
***
|
|
50
|
+
|
|
51
|
+
### minPick?
|
|
52
|
+
|
|
53
|
+
> `optional` **minPick**: `number`
|
|
54
|
+
|
|
55
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:258](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L258)
|
|
56
|
+
|
|
57
|
+
Minimum number of items that must be picked
|
|
58
|
+
|
|
59
|
+
***
|
|
60
|
+
|
|
61
|
+
### prefix?
|
|
62
|
+
|
|
63
|
+
> `optional` **prefix**: `string`
|
|
64
|
+
|
|
65
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:262](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L262)
|
|
66
|
+
|
|
67
|
+
Prefix to add to the result
|
|
68
|
+
|
|
69
|
+
***
|
|
70
|
+
|
|
71
|
+
### separator?
|
|
72
|
+
|
|
73
|
+
> `optional` **separator**: `string`
|
|
74
|
+
|
|
75
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:260](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L260)
|
|
76
|
+
|
|
77
|
+
Separator for the resulting choice string
|
|
78
|
+
|
|
79
|
+
***
|
|
80
|
+
|
|
81
|
+
### suffix?
|
|
82
|
+
|
|
83
|
+
> `optional` **suffix**: `string`
|
|
84
|
+
|
|
85
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:264](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L264)
|
|
86
|
+
|
|
87
|
+
Suffix to add to the result
|
|
88
|
+
|
|
89
|
+
***
|
|
90
|
+
|
|
91
|
+
### type?
|
|
92
|
+
|
|
93
|
+
> `optional` **type**: `"ai"` \| `"random"`
|
|
94
|
+
|
|
95
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:266](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L266)
|
|
96
|
+
|
|
97
|
+
Selection strategy: 'random' for random pick, 'ai' for AI-assisted pick
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
[**@isdk/ai-tool**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@isdk/ai-tool](../globals.md) / CmdArgArgsInfo
|
|
6
|
+
|
|
7
|
+
# Interface: CmdArgArgsInfo
|
|
8
|
+
|
|
9
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:318](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L318)
|
|
10
|
+
|
|
11
|
+
Normalized argument information, typically used for final consumption.
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
### args
|
|
16
|
+
|
|
17
|
+
> **args**: `any`[]
|
|
18
|
+
|
|
19
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:320](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L320)
|
|
20
|
+
|
|
21
|
+
Positional arguments array
|
|
22
|
+
|
|
23
|
+
***
|
|
24
|
+
|
|
25
|
+
### namedArgs?
|
|
26
|
+
|
|
27
|
+
> `optional` **namedArgs**: `Record`\<`string`, `any`\>
|
|
28
|
+
|
|
29
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:322](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L322)
|
|
30
|
+
|
|
31
|
+
Named arguments map
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
[**@isdk/ai-tool**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@isdk/ai-tool](../globals.md) / CmdArgContext
|
|
6
|
+
|
|
7
|
+
# Interface: CmdArgContext
|
|
8
|
+
|
|
9
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:113](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L113)
|
|
10
|
+
|
|
11
|
+
Symbol used to mark a result object returned by an ArgProcessor.
|
|
12
|
+
...
|
|
13
|
+
|
|
14
|
+
## Properties
|
|
15
|
+
|
|
16
|
+
### CmdArgParser
|
|
17
|
+
|
|
18
|
+
> **CmdArgParser**: [`CmdArgParser`](../classes/CmdArgParser.md)
|
|
19
|
+
|
|
20
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:134](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L134)
|
|
21
|
+
|
|
22
|
+
Reference to the CmdArgParser instance for recursive parsing
|
|
23
|
+
|
|
24
|
+
***
|
|
25
|
+
|
|
26
|
+
### identifierAsName?
|
|
27
|
+
|
|
28
|
+
> `optional` **identifierAsName**: `string`
|
|
29
|
+
|
|
30
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:124](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L124)
|
|
31
|
+
|
|
32
|
+
If the argument is positional and its raw text is a valid identifier,
|
|
33
|
+
this holds that identifier name (used for auto-mapping).
|
|
34
|
+
|
|
35
|
+
***
|
|
36
|
+
|
|
37
|
+
### index
|
|
38
|
+
|
|
39
|
+
> **index**: `number`
|
|
40
|
+
|
|
41
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:128](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L128)
|
|
42
|
+
|
|
43
|
+
The 0-based index of this argument in the positional sequence
|
|
44
|
+
|
|
45
|
+
***
|
|
46
|
+
|
|
47
|
+
### isNamed
|
|
48
|
+
|
|
49
|
+
> **isNamed**: `boolean`
|
|
50
|
+
|
|
51
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:115](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L115)
|
|
52
|
+
|
|
53
|
+
True if the argument was explicitly assigned using an assigner (e.g., k=v)
|
|
54
|
+
|
|
55
|
+
***
|
|
56
|
+
|
|
57
|
+
### name?
|
|
58
|
+
|
|
59
|
+
> `optional` **name**: `string`
|
|
60
|
+
|
|
61
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:119](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L119)
|
|
62
|
+
|
|
63
|
+
The explicitly specified name (k) in a `k=v` pair
|
|
64
|
+
|
|
65
|
+
***
|
|
66
|
+
|
|
67
|
+
### options
|
|
68
|
+
|
|
69
|
+
> **options**: [`CmdArgParserOptions`](CmdArgParserOptions.md)
|
|
70
|
+
|
|
71
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:132](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L132)
|
|
72
|
+
|
|
73
|
+
The configuration options used by the CmdArgParser
|
|
74
|
+
|
|
75
|
+
***
|
|
76
|
+
|
|
77
|
+
### rawValue
|
|
78
|
+
|
|
79
|
+
> **rawValue**: `string`
|
|
80
|
+
|
|
81
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:117](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L117)
|
|
82
|
+
|
|
83
|
+
The raw input substring of this argument (after stripping the name and assigner if present)
|
|
84
|
+
|
|
85
|
+
***
|
|
86
|
+
|
|
87
|
+
### scope?
|
|
88
|
+
|
|
89
|
+
> `optional` **scope**: `Record`\<`string`, `any`\>
|
|
90
|
+
|
|
91
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:130](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L130)
|
|
92
|
+
|
|
93
|
+
The evaluation scope containing variables and functions
|
|
94
|
+
|
|
95
|
+
***
|
|
96
|
+
|
|
97
|
+
### tokens
|
|
98
|
+
|
|
99
|
+
> **tokens**: [`CmdArgToken`](CmdArgToken.md)[]
|
|
100
|
+
|
|
101
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:126](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L126)
|
|
102
|
+
|
|
103
|
+
All lexical tokens belonging to this argument
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[**@isdk/ai-tool**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@isdk/ai-tool](../globals.md) / CmdArgFlagMetadata
|
|
6
|
+
|
|
7
|
+
# Interface: CmdArgFlagMetadata
|
|
8
|
+
|
|
9
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:37](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L37)
|
|
10
|
+
|
|
11
|
+
Metadata attached to flag values.
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
### \[CMD\_ARG\_FLAG\_SYMBOL\]
|
|
16
|
+
|
|
17
|
+
> **\[CMD\_ARG\_FLAG\_SYMBOL\]**: `string`
|
|
18
|
+
|
|
19
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:39](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L39)
|
|
20
|
+
|
|
21
|
+
The prefix used to define this flag (e.g., '!', '#')
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
[**@isdk/ai-tool**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@isdk/ai-tool](../globals.md) / CmdArgMapResult
|
|
6
|
+
|
|
7
|
+
# Interface: CmdArgMapResult
|
|
8
|
+
|
|
9
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:294](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L294)
|
|
10
|
+
|
|
11
|
+
Result structure when mode is 'map'.
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
### args
|
|
16
|
+
|
|
17
|
+
> **args**: `any`[]
|
|
18
|
+
|
|
19
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:296](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L296)
|
|
20
|
+
|
|
21
|
+
Positional arguments array
|
|
22
|
+
|
|
23
|
+
***
|
|
24
|
+
|
|
25
|
+
### flags?
|
|
26
|
+
|
|
27
|
+
> `optional` **flags**: [`CmdArgFlagsRecord`](../type-aliases/CmdArgFlagsRecord.md)
|
|
28
|
+
|
|
29
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:300](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L300)
|
|
30
|
+
|
|
31
|
+
Special parameters (Flags) map
|
|
32
|
+
|
|
33
|
+
***
|
|
34
|
+
|
|
35
|
+
### namedArgs
|
|
36
|
+
|
|
37
|
+
> **namedArgs**: `Record`\<`string`, `any`\>
|
|
38
|
+
|
|
39
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:298](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L298)
|
|
40
|
+
|
|
41
|
+
Named arguments map
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
[**@isdk/ai-tool**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@isdk/ai-tool](../globals.md) / CmdArgParseResult
|
|
6
|
+
|
|
7
|
+
# Interface: CmdArgParseResult
|
|
8
|
+
|
|
9
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:274](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L274)
|
|
10
|
+
|
|
11
|
+
The internal structured result of the parsing process.
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
### args
|
|
16
|
+
|
|
17
|
+
> **args**: `any`[]
|
|
18
|
+
|
|
19
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:276](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L276)
|
|
20
|
+
|
|
21
|
+
Positional arguments array. Indices correspond to the appearance order.
|
|
22
|
+
|
|
23
|
+
***
|
|
24
|
+
|
|
25
|
+
### flags
|
|
26
|
+
|
|
27
|
+
> **flags**: [`CmdArgFlagsRecord`](../type-aliases/CmdArgFlagsRecord.md)
|
|
28
|
+
|
|
29
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:280](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L280)
|
|
30
|
+
|
|
31
|
+
Special parameters (Flags) map. Values are usually Boolean but can be any type.
|
|
32
|
+
|
|
33
|
+
***
|
|
34
|
+
|
|
35
|
+
### namedArgs
|
|
36
|
+
|
|
37
|
+
> **namedArgs**: `Record`\<`string`, `any`\>
|
|
38
|
+
|
|
39
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:278](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L278)
|
|
40
|
+
|
|
41
|
+
Named arguments map, combining explicit `k=v`, auto-mapped IDs, and Processor results.
|
|
42
|
+
|
|
43
|
+
***
|
|
44
|
+
|
|
45
|
+
### namedIndices
|
|
46
|
+
|
|
47
|
+
> **namedIndices**: `Set`\<`number`\>
|
|
48
|
+
|
|
49
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:282](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L282)
|
|
50
|
+
|
|
51
|
+
A set of numeric indices that were populated by explicitly named arguments.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
[**@isdk/ai-tool**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@isdk/ai-tool](../globals.md) / CmdArgParsedCommand
|
|
6
|
+
|
|
7
|
+
# Interface: CmdArgParsedCommand
|
|
8
|
+
|
|
9
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:306](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L306)
|
|
10
|
+
|
|
11
|
+
The full structure of a parsed command.
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
### args
|
|
16
|
+
|
|
17
|
+
> **args**: `any`
|
|
18
|
+
|
|
19
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:310](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L310)
|
|
20
|
+
|
|
21
|
+
The parsed arguments, either simplified or in map format
|
|
22
|
+
|
|
23
|
+
***
|
|
24
|
+
|
|
25
|
+
### command
|
|
26
|
+
|
|
27
|
+
> **command**: `string`
|
|
28
|
+
|
|
29
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:308](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L308)
|
|
30
|
+
|
|
31
|
+
The command name (the identifier before the parentheses)
|
|
32
|
+
|
|
33
|
+
***
|
|
34
|
+
|
|
35
|
+
### flags?
|
|
36
|
+
|
|
37
|
+
> `optional` **flags**: [`CmdArgFlagsRecord`](../type-aliases/CmdArgFlagsRecord.md)
|
|
38
|
+
|
|
39
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:312](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L312)
|
|
40
|
+
|
|
41
|
+
Special parameters (Flags) map (if present)
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
[**@isdk/ai-tool**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@isdk/ai-tool](../globals.md) / CmdArgParserOptions
|
|
6
|
+
|
|
7
|
+
# Interface: CmdArgParserOptions
|
|
8
|
+
|
|
9
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:187](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L187)
|
|
10
|
+
|
|
11
|
+
Configuration options for the CmdArgParser and main API functions.
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
### argProcessor?
|
|
16
|
+
|
|
17
|
+
> `optional` **argProcessor**: [`ArgProcessor`](../type-aliases/ArgProcessor.md)
|
|
18
|
+
|
|
19
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:206](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L206)
|
|
20
|
+
|
|
21
|
+
Custom logic to process each argument before standard evaluation
|
|
22
|
+
|
|
23
|
+
***
|
|
24
|
+
|
|
25
|
+
### assigner?
|
|
26
|
+
|
|
27
|
+
> `optional` **assigner**: `string`
|
|
28
|
+
|
|
29
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:199](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L199)
|
|
30
|
+
|
|
31
|
+
Character used for name-value assignment.
|
|
32
|
+
|
|
33
|
+
#### Example
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
assigner: ':' -> "key:value"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
#### Default
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
'='
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
***
|
|
46
|
+
|
|
47
|
+
### delimiter?
|
|
48
|
+
|
|
49
|
+
> `optional` **delimiter**: `string`
|
|
50
|
+
|
|
51
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:193](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L193)
|
|
52
|
+
|
|
53
|
+
Character used to separate arguments.
|
|
54
|
+
|
|
55
|
+
#### Example
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
delimiter: ';' -> "arg1; arg2"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
#### Default
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
','
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
***
|
|
68
|
+
|
|
69
|
+
### excludeAutoNamedFromPositional?
|
|
70
|
+
|
|
71
|
+
> `optional` **excludeAutoNamedFromPositional**: `boolean`
|
|
72
|
+
|
|
73
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:218](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L218)
|
|
74
|
+
|
|
75
|
+
If true, the positional index of an argument that has been automatically
|
|
76
|
+
mapped as a named argument (via `idAsName`) will be excluded from the
|
|
77
|
+
merged result object.
|
|
78
|
+
|
|
79
|
+
#### Example
|
|
80
|
+
|
|
81
|
+
```ts
|
|
82
|
+
parse("John") -> {John: "John"} (instead of {0: "John", John: "John"})
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
***
|
|
86
|
+
|
|
87
|
+
### flagPrefix?
|
|
88
|
+
|
|
89
|
+
> `optional` **flagPrefix**: `string` \| `string`[]
|
|
90
|
+
|
|
91
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:204](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L204)
|
|
92
|
+
|
|
93
|
+
Prefix(es) for special parameters (Flags).
|
|
94
|
+
|
|
95
|
+
#### Example
|
|
96
|
+
|
|
97
|
+
```ts
|
|
98
|
+
flagPrefix: '!' -> "!debug, !verbose=false"
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
***
|
|
102
|
+
|
|
103
|
+
### idAsName?
|
|
104
|
+
|
|
105
|
+
> `optional` **idAsName**: `boolean`
|
|
106
|
+
|
|
107
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:232](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L232)
|
|
108
|
+
|
|
109
|
+
If true, a positional argument that is a valid identifier (e.g., "John")
|
|
110
|
+
is automatically mapped as a named argument (e.g., {John: "John"}).
|
|
111
|
+
|
|
112
|
+
#### Default
|
|
113
|
+
|
|
114
|
+
```ts
|
|
115
|
+
true
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
***
|
|
119
|
+
|
|
120
|
+
### isInternal?
|
|
121
|
+
|
|
122
|
+
> `optional` **isInternal**: `boolean`
|
|
123
|
+
|
|
124
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:244](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L244)
|
|
125
|
+
|
|
126
|
+
**`Internal`**
|
|
127
|
+
|
|
128
|
+
Used to prevent infinite recursion in internal calls
|
|
129
|
+
|
|
130
|
+
***
|
|
131
|
+
|
|
132
|
+
### namedExcludePositional?
|
|
133
|
+
|
|
134
|
+
> `optional` **namedExcludePositional**: `boolean`
|
|
135
|
+
|
|
136
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:226](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L226)
|
|
137
|
+
|
|
138
|
+
If true, explicitly named arguments (e.g., `k=v`) do not occupy a slot
|
|
139
|
+
in the positional `args` array.
|
|
140
|
+
|
|
141
|
+
#### Default
|
|
142
|
+
|
|
143
|
+
```ts
|
|
144
|
+
true
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
***
|
|
148
|
+
|
|
149
|
+
### preserveUnresolvedName?
|
|
150
|
+
|
|
151
|
+
> `optional` **preserveUnresolvedName**: `boolean`
|
|
152
|
+
|
|
153
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:220](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L220)
|
|
154
|
+
|
|
155
|
+
If true, return the variable name as a string when it's not found in scope instead of undefined
|
|
156
|
+
|
|
157
|
+
***
|
|
158
|
+
|
|
159
|
+
### raiseError?
|
|
160
|
+
|
|
161
|
+
> `optional` **raiseError**: `boolean`
|
|
162
|
+
|
|
163
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:238](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L238)
|
|
164
|
+
|
|
165
|
+
If true, any parsing or evaluation error will be thrown
|
|
166
|
+
|
|
167
|
+
***
|
|
168
|
+
|
|
169
|
+
### raiseReferenceError?
|
|
170
|
+
|
|
171
|
+
> `optional` **raiseReferenceError**: `boolean`
|
|
172
|
+
|
|
173
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:240](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L240)
|
|
174
|
+
|
|
175
|
+
If true, ReferenceErrors (missing variables) will be thrown. Defaults to `raiseError`.
|
|
176
|
+
|
|
177
|
+
***
|
|
178
|
+
|
|
179
|
+
### scope?
|
|
180
|
+
|
|
181
|
+
> `optional` **scope**: `Record`\<`string`, `any`\>
|
|
182
|
+
|
|
183
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:242](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L242)
|
|
184
|
+
|
|
185
|
+
An object containing variables accessible to expressions in the input string
|
|
186
|
+
|
|
187
|
+
***
|
|
188
|
+
|
|
189
|
+
### simplify?
|
|
190
|
+
|
|
191
|
+
> `optional` **simplify**: `boolean` \| [`CmdArgSimplifyOptions`](CmdArgSimplifyOptions.md)
|
|
192
|
+
|
|
193
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:236](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L236)
|
|
194
|
+
|
|
195
|
+
Control the simplification of the final result. Set to `false` to disable (returns a merged object).
|
|
196
|
+
|
|
197
|
+
***
|
|
198
|
+
|
|
199
|
+
### skipExpression?
|
|
200
|
+
|
|
201
|
+
> `optional` **skipExpression**: `boolean`
|
|
202
|
+
|
|
203
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:234](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L234)
|
|
204
|
+
|
|
205
|
+
If true, JS expressions (like arithmetic or function calls) are not evaluated
|
|
206
|
+
|
|
207
|
+
***
|
|
208
|
+
|
|
209
|
+
### templateData?
|
|
210
|
+
|
|
211
|
+
> `optional` **templateData**: `Record`\<`string`, `any`\>
|
|
212
|
+
|
|
213
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:210](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L210)
|
|
214
|
+
|
|
215
|
+
Additional data for template variable substitution
|
|
216
|
+
|
|
217
|
+
***
|
|
218
|
+
|
|
219
|
+
### templateFormat?
|
|
220
|
+
|
|
221
|
+
> `optional` **templateFormat**: `string`
|
|
222
|
+
|
|
223
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:208](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L208)
|
|
224
|
+
|
|
225
|
+
Format used by TemplateArgProcessor (e.g., 'mustache')
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[**@isdk/ai-tool**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@isdk/ai-tool](../globals.md) / CmdArgProcessorResultOptions
|
|
6
|
+
|
|
7
|
+
# Interface: CmdArgProcessorResultOptions
|
|
8
|
+
|
|
9
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:99](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L99)
|
|
10
|
+
|
|
11
|
+
Options for processors to control how the parsed value is distributed in the final result.
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
### excludePositional?
|
|
16
|
+
|
|
17
|
+
> `optional` **excludePositional**: `boolean`
|
|
18
|
+
|
|
19
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:104](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L104)
|
|
20
|
+
|
|
21
|
+
If true, the argument will be excluded from the positional `args` array.
|
|
22
|
+
Useful when a positional argument is intended to be treated as a named parameter only.
|