@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,101 @@
|
|
|
1
|
+
[**@isdk/ai-tool**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@isdk/ai-tool](../globals.md) / CmdArgSimplifyOptions
|
|
6
|
+
|
|
7
|
+
# Interface: CmdArgSimplifyOptions
|
|
8
|
+
|
|
9
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:147](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L147)
|
|
10
|
+
|
|
11
|
+
Detailed configuration for result simplification (convergence).
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
### identicalPairSingular?
|
|
16
|
+
|
|
17
|
+
> `optional` **identicalPairSingular**: `boolean`
|
|
18
|
+
|
|
19
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:163](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L163)
|
|
20
|
+
|
|
21
|
+
[Identical Pair Singularization]
|
|
22
|
+
If there are exactly two entries (index 0 and a named key) and their values are identical,
|
|
23
|
+
collapse them into a single value. This often happens when `idAsName` is enabled.
|
|
24
|
+
|
|
25
|
+
#### Example
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
parse("name=John") -> "John" (instead of {0: "John", name: "John"})
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
#### Default
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
true
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
***
|
|
38
|
+
|
|
39
|
+
### mode?
|
|
40
|
+
|
|
41
|
+
> `optional` **mode**: `"object"` \| `"auto"` \| `"map"` \| `"array"`
|
|
42
|
+
|
|
43
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:181](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L181)
|
|
44
|
+
|
|
45
|
+
[Output Mode]
|
|
46
|
+
- 'auto': Apply the simplification flags above (default).
|
|
47
|
+
- 'array': Always return an array of positional args. Named args are hidden in the '.namedArgs' property.
|
|
48
|
+
- 'object': Always return a merged object with both numeric and string keys.
|
|
49
|
+
- 'map': Always return the full structure { args: [], namedArgs: {}, flags: {} }.
|
|
50
|
+
|
|
51
|
+
#### Default
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
'auto'
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
***
|
|
58
|
+
|
|
59
|
+
### purePositionalAsArray?
|
|
60
|
+
|
|
61
|
+
> `optional` **purePositionalAsArray**: `boolean`
|
|
62
|
+
|
|
63
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:171](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L171)
|
|
64
|
+
|
|
65
|
+
[Pure Positional as Array]
|
|
66
|
+
If there are multiple positional arguments and no named arguments, return a pure array.
|
|
67
|
+
|
|
68
|
+
#### Example
|
|
69
|
+
|
|
70
|
+
```ts
|
|
71
|
+
parse("1, 2, 3") -> [1, 2, 3] (instead of {0: 1, 1: 2, 2: 3})
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
#### Default
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
true
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
***
|
|
81
|
+
|
|
82
|
+
### singleValue?
|
|
83
|
+
|
|
84
|
+
> `optional` **singleValue**: `boolean`
|
|
85
|
+
|
|
86
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:154](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L154)
|
|
87
|
+
|
|
88
|
+
[Single Value Simplification]
|
|
89
|
+
If there is exactly one positional argument and no named arguments, return the value directly.
|
|
90
|
+
|
|
91
|
+
#### Example
|
|
92
|
+
|
|
93
|
+
```ts
|
|
94
|
+
parse("123") -> 123 (instead of [123])
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
#### Default
|
|
98
|
+
|
|
99
|
+
```ts
|
|
100
|
+
true
|
|
101
|
+
```
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
[**@isdk/ai-tool**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@isdk/ai-tool](../globals.md) / CmdArgToken
|
|
6
|
+
|
|
7
|
+
# Interface: CmdArgToken
|
|
8
|
+
|
|
9
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:85](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L85)
|
|
10
|
+
|
|
11
|
+
Represents a lexical CmdArgToken with its type, value, and source position.
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
### end
|
|
16
|
+
|
|
17
|
+
> **end**: `number`
|
|
18
|
+
|
|
19
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:93](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L93)
|
|
20
|
+
|
|
21
|
+
Ending index in the input string
|
|
22
|
+
|
|
23
|
+
***
|
|
24
|
+
|
|
25
|
+
### start
|
|
26
|
+
|
|
27
|
+
> **start**: `number`
|
|
28
|
+
|
|
29
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:91](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L91)
|
|
30
|
+
|
|
31
|
+
Starting index in the input string
|
|
32
|
+
|
|
33
|
+
***
|
|
34
|
+
|
|
35
|
+
### type
|
|
36
|
+
|
|
37
|
+
> **type**: [`CmdArgTokenType`](../enumerations/CmdArgTokenType.md)
|
|
38
|
+
|
|
39
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:87](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L87)
|
|
40
|
+
|
|
41
|
+
The type of the CmdArgToken
|
|
42
|
+
|
|
43
|
+
***
|
|
44
|
+
|
|
45
|
+
### value
|
|
46
|
+
|
|
47
|
+
> **value**: `string`
|
|
48
|
+
|
|
49
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/command-parser/types.ts:89](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/command-parser/types.ts#L89)
|
|
50
|
+
|
|
51
|
+
The literal string value of the CmdArgToken
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: EventClientFuncParams
|
|
8
8
|
|
|
9
|
-
Defined in:
|
|
9
|
+
Defined in: @isdk/ai-tools/packages/tool-event/dist/index.d.ts:154
|
|
10
10
|
|
|
11
11
|
## Properties
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-client.ts:7](https:
|
|
|
14
14
|
|
|
15
15
|
> `optional` **act**: `"sub"` \| `"pub"` \| `"unsub"` \| `"init"`
|
|
16
16
|
|
|
17
|
-
Defined in:
|
|
17
|
+
Defined in: @isdk/ai-tools/packages/tool-event/dist/index.d.ts:157
|
|
18
18
|
|
|
19
19
|
***
|
|
20
20
|
|
|
@@ -22,7 +22,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-client.ts:10](https
|
|
|
22
22
|
|
|
23
23
|
> `optional` **data**: `any`
|
|
24
24
|
|
|
25
|
-
Defined in:
|
|
25
|
+
Defined in: @isdk/ai-tools/packages/tool-event/dist/index.d.ts:156
|
|
26
26
|
|
|
27
27
|
***
|
|
28
28
|
|
|
@@ -30,7 +30,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-client.ts:9](https:
|
|
|
30
30
|
|
|
31
31
|
> `optional` **event**: `string` \| `string`[]
|
|
32
32
|
|
|
33
|
-
Defined in:
|
|
33
|
+
Defined in: @isdk/ai-tools/packages/tool-event/dist/index.d.ts:155
|
|
34
34
|
|
|
35
35
|
***
|
|
36
36
|
|
|
@@ -38,7 +38,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-client.ts:8](https:
|
|
|
38
38
|
|
|
39
39
|
> `optional` **listener**: (...`args`) => `void`
|
|
40
40
|
|
|
41
|
-
Defined in:
|
|
41
|
+
Defined in: @isdk/ai-tools/packages/tool-event/dist/index.d.ts:158
|
|
42
42
|
|
|
43
43
|
#### Parameters
|
|
44
44
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: EventServerFuncParams
|
|
8
8
|
|
|
9
|
-
Defined in:
|
|
9
|
+
Defined in: @isdk/ai-tools/packages/tool-event/dist/index.d.ts:210
|
|
10
10
|
|
|
11
11
|
Defines the structure for parameters passed to a `ServerTools` function.
|
|
12
12
|
By convention, it includes optional `_req` and `_res` properties for direct
|
|
@@ -26,7 +26,7 @@ access to the underlying transport's request and response objects (e.g., from No
|
|
|
26
26
|
|
|
27
27
|
> `optional` **\_req**: `any`
|
|
28
28
|
|
|
29
|
-
Defined in:
|
|
29
|
+
Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index-359784IS.d.ts:295
|
|
30
30
|
|
|
31
31
|
The underlying request object from the transport layer (e.g., `IncomingMessage`).
|
|
32
32
|
|
|
@@ -40,7 +40,7 @@ The underlying request object from the transport layer (e.g., `IncomingMessage`)
|
|
|
40
40
|
|
|
41
41
|
> `optional` **\_res**: `any`
|
|
42
42
|
|
|
43
|
-
Defined in:
|
|
43
|
+
Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index-359784IS.d.ts:300
|
|
44
44
|
|
|
45
45
|
The underlying response or reply object from the transport layer (e.g., `ServerResponse`).
|
|
46
46
|
|
|
@@ -50,11 +50,25 @@ The underlying response or reply object from the transport layer (e.g., `ServerR
|
|
|
50
50
|
|
|
51
51
|
***
|
|
52
52
|
|
|
53
|
+
### \_signal?
|
|
54
|
+
|
|
55
|
+
> `optional` **\_signal**: `AbortSignal`
|
|
56
|
+
|
|
57
|
+
Defined in: @isdk/ai-tools/packages/tool-rpc/dist/index-359784IS.d.ts:305
|
|
58
|
+
|
|
59
|
+
The AbortSignal to monitor for cancellation or timeout.
|
|
60
|
+
|
|
61
|
+
#### Inherited from
|
|
62
|
+
|
|
63
|
+
[`ServerFuncParams`](ServerFuncParams.md).[`_signal`](ServerFuncParams.md#_signal)
|
|
64
|
+
|
|
65
|
+
***
|
|
66
|
+
|
|
53
67
|
### act?
|
|
54
68
|
|
|
55
69
|
> `optional` **act**: `"sub"` \| `"pub"` \| `"unsub"`
|
|
56
70
|
|
|
57
|
-
Defined in:
|
|
71
|
+
Defined in: @isdk/ai-tools/packages/tool-event/dist/index.d.ts:213
|
|
58
72
|
|
|
59
73
|
***
|
|
60
74
|
|
|
@@ -62,7 +76,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-server.ts:17](https
|
|
|
62
76
|
|
|
63
77
|
> `optional` **clientId**: `string`
|
|
64
78
|
|
|
65
|
-
Defined in:
|
|
79
|
+
Defined in: @isdk/ai-tools/packages/tool-event/dist/index.d.ts:214
|
|
66
80
|
|
|
67
81
|
***
|
|
68
82
|
|
|
@@ -70,7 +84,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-server.ts:18](https
|
|
|
70
84
|
|
|
71
85
|
> `optional` **data**: `any`
|
|
72
86
|
|
|
73
|
-
Defined in:
|
|
87
|
+
Defined in: @isdk/ai-tools/packages/tool-event/dist/index.d.ts:212
|
|
74
88
|
|
|
75
89
|
***
|
|
76
90
|
|
|
@@ -78,4 +92,4 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-server.ts:16](https
|
|
|
78
92
|
|
|
79
93
|
> `optional` **event**: `string` \| `string`[]
|
|
80
94
|
|
|
81
|
-
Defined in:
|
|
95
|
+
Defined in: @isdk/ai-tools/packages/tool-event/dist/index.d.ts:211
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: FewShotPromptTemplateOptions\<T\>
|
|
8
8
|
|
|
9
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/prompt/few-shot-prompt-template.ts:10](https://github.com/isdk/ai-tool.js/blob/
|
|
9
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/prompt/few-shot-prompt-template.ts:10](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/prompt/few-shot-prompt-template.ts#L10)
|
|
10
10
|
|
|
11
11
|
## Extends
|
|
12
12
|
|
|
@@ -52,7 +52,7 @@ Defined in: @isdk/ai-tools/packages/template-engines/dist/index.d.ts:15
|
|
|
52
52
|
|
|
53
53
|
> **examplePrompt**: [`PromptTemplateOptions`](PromptTemplateOptions.md) \| [`PromptTemplate`](../classes/PromptTemplate.md)
|
|
54
54
|
|
|
55
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/prompt/few-shot-prompt-template.ts:19](https://github.com/isdk/ai-tool.js/blob/
|
|
55
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/prompt/few-shot-prompt-template.ts:19](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/prompt/few-shot-prompt-template.ts#L19)
|
|
56
56
|
|
|
57
57
|
An [PromptTemplate](../classes/PromptTemplate.md) used to format a single example.
|
|
58
58
|
|
|
@@ -62,7 +62,7 @@ An [PromptTemplate](../classes/PromptTemplate.md) used to format a single exampl
|
|
|
62
62
|
|
|
63
63
|
> **examples**: [`PromptExamples`](../type-aliases/PromptExamples.md)\<`T`\>
|
|
64
64
|
|
|
65
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/prompt/few-shot-prompt-template.ts:14](https://github.com/isdk/ai-tool.js/blob/
|
|
65
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/prompt/few-shot-prompt-template.ts:14](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/prompt/few-shot-prompt-template.ts#L14)
|
|
66
66
|
|
|
67
67
|
The few shot examples to use in the prompt.
|
|
68
68
|
|
|
@@ -72,7 +72,7 @@ The few shot examples to use in the prompt.
|
|
|
72
72
|
|
|
73
73
|
> `optional` **exampleSeparator**: `string`
|
|
74
74
|
|
|
75
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/prompt/few-shot-prompt-template.ts:24](https://github.com/isdk/ai-tool.js/blob/
|
|
75
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/prompt/few-shot-prompt-template.ts:24](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/prompt/few-shot-prompt-template.ts#L24)
|
|
76
76
|
|
|
77
77
|
String separator used to join the prefix, the examples, and suffix.
|
|
78
78
|
|
|
@@ -118,7 +118,7 @@ Defined in: @isdk/ai-tools/packages/template-engines/dist/index.d.ts:17
|
|
|
118
118
|
|
|
119
119
|
> `optional` **prefix**: `string`
|
|
120
120
|
|
|
121
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/prompt/few-shot-prompt-template.ts:31](https://github.com/isdk/ai-tool.js/blob/
|
|
121
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/prompt/few-shot-prompt-template.ts:31](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/prompt/few-shot-prompt-template.ts#L31)
|
|
122
122
|
|
|
123
123
|
A prompt template string to put before the examples.
|
|
124
124
|
|
|
@@ -128,11 +128,23 @@ A prompt template string to put before the examples.
|
|
|
128
128
|
|
|
129
129
|
***
|
|
130
130
|
|
|
131
|
+
### raw?
|
|
132
|
+
|
|
133
|
+
> `optional` **raw**: `boolean`
|
|
134
|
+
|
|
135
|
+
Defined in: @isdk/ai-tools/packages/template-engines/dist/index.d.ts:21
|
|
136
|
+
|
|
137
|
+
#### Inherited from
|
|
138
|
+
|
|
139
|
+
[`PromptTemplateOptions`](PromptTemplateOptions.md).[`raw`](PromptTemplateOptions.md#raw)
|
|
140
|
+
|
|
141
|
+
***
|
|
142
|
+
|
|
131
143
|
### suffix?
|
|
132
144
|
|
|
133
145
|
> `optional` **suffix**: `string`
|
|
134
146
|
|
|
135
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/prompt/few-shot-prompt-template.ts:36](https://github.com/isdk/ai-tool.js/blob/
|
|
147
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/prompt/few-shot-prompt-template.ts:36](https://github.com/isdk/ai-tool.js/blob/d10fb4cda65fc1975152a2c3ab327ecab008dea1/src/utils/prompt/few-shot-prompt-template.ts#L36)
|
|
136
148
|
|
|
137
149
|
A prompt template string to put after the examples.
|
|
138
150
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: FuncItem
|
|
8
8
|
|
|
9
|
-
Defined in:
|
|
9
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:313
|
|
10
10
|
|
|
11
11
|
Extends `BaseFuncItem` to include the actual function implementation.
|
|
12
12
|
|
|
@@ -14,13 +14,17 @@ Extends `BaseFuncItem` to include the actual function implementation.
|
|
|
14
14
|
|
|
15
15
|
- [`BaseFuncItem`](BaseFuncItem.md)
|
|
16
16
|
|
|
17
|
+
## Extended by
|
|
18
|
+
|
|
19
|
+
- [`RegisterOptions`](RegisterOptions.md)
|
|
20
|
+
|
|
17
21
|
## Properties
|
|
18
22
|
|
|
19
23
|
### alias?
|
|
20
24
|
|
|
21
25
|
> `optional` **alias**: `string` \| `string`[]
|
|
22
26
|
|
|
23
|
-
Defined in:
|
|
27
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:258
|
|
24
28
|
|
|
25
29
|
Optional aliases for the function name.
|
|
26
30
|
|
|
@@ -34,7 +38,7 @@ Optional aliases for the function name.
|
|
|
34
38
|
|
|
35
39
|
> `optional` **asyncFeatures**: `number`
|
|
36
40
|
|
|
37
|
-
Defined in:
|
|
41
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:272
|
|
38
42
|
|
|
39
43
|
A bitmask representing asynchronous features supported by the function, built from `AsyncFeatureBits`.
|
|
40
44
|
This allows the system to understand if a function supports capabilities like cancellation or multi-tasking.
|
|
@@ -64,7 +68,7 @@ const func = new ToolFunc({
|
|
|
64
68
|
|
|
65
69
|
> `optional` **depends**: `object`
|
|
66
70
|
|
|
67
|
-
Defined in:
|
|
71
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:295
|
|
68
72
|
|
|
69
73
|
A map of dependencies this function has on other tool functions.
|
|
70
74
|
Declaring dependencies ensures that they are automatically registered when this function is registered.
|
|
@@ -103,7 +107,7 @@ mainFunc.register();
|
|
|
103
107
|
|
|
104
108
|
> `optional` **description**: `string`
|
|
105
109
|
|
|
106
|
-
Defined in:
|
|
110
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:302
|
|
107
111
|
|
|
108
112
|
A detailed description of what the function does.
|
|
109
113
|
|
|
@@ -117,7 +121,7 @@ A detailed description of what the function does.
|
|
|
117
121
|
|
|
118
122
|
> `optional` **func**: [`TFunc`](../type-aliases/TFunc.md)
|
|
119
123
|
|
|
120
|
-
Defined in:
|
|
124
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:318
|
|
121
125
|
|
|
122
126
|
The implementation of the tool function.
|
|
123
127
|
|
|
@@ -127,7 +131,7 @@ The implementation of the tool function.
|
|
|
127
131
|
|
|
128
132
|
> `optional` **isApi**: `boolean`
|
|
129
133
|
|
|
130
|
-
Defined in:
|
|
134
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:247
|
|
131
135
|
|
|
132
136
|
If true, indicates that this function should be treated as a server-side API.
|
|
133
137
|
|
|
@@ -141,7 +145,7 @@ If true, indicates that this function should be treated as a server-side API.
|
|
|
141
145
|
|
|
142
146
|
> `optional` **name**: `string`
|
|
143
147
|
|
|
144
|
-
Defined in:
|
|
148
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:204
|
|
145
149
|
|
|
146
150
|
The unique name of the function.
|
|
147
151
|
|
|
@@ -155,7 +159,7 @@ The unique name of the function.
|
|
|
155
159
|
|
|
156
160
|
> `optional` **params**: [`FuncParams`](FuncParams.md) \| [`FuncParam`](FuncParam.md)[]
|
|
157
161
|
|
|
158
|
-
Defined in:
|
|
162
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:209
|
|
159
163
|
|
|
160
164
|
Parameter definitions, which can be an object mapping names to definitions or an array for positional parameters.
|
|
161
165
|
|
|
@@ -169,7 +173,7 @@ Parameter definitions, which can be an object mapping names to definitions or an
|
|
|
169
173
|
|
|
170
174
|
> `optional` **result**: `string` \| `Record`\<`string`, `any`\>
|
|
171
175
|
|
|
172
|
-
Defined in:
|
|
176
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:214
|
|
173
177
|
|
|
174
178
|
The expected return type of the function, described as a string or a JSON schema object.
|
|
175
179
|
|
|
@@ -183,7 +187,7 @@ The expected return type of the function, described as a string or a JSON schema
|
|
|
183
187
|
|
|
184
188
|
> `optional` **scope**: `any`
|
|
185
189
|
|
|
186
|
-
Defined in:
|
|
190
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:219
|
|
187
191
|
|
|
188
192
|
The execution scope or context (`this`) for the function.
|
|
189
193
|
|
|
@@ -197,7 +201,7 @@ The execution scope or context (`this`) for the function.
|
|
|
197
201
|
|
|
198
202
|
> `optional` **setup**: (`this`, `options?`) => `void`
|
|
199
203
|
|
|
200
|
-
Defined in:
|
|
204
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:242
|
|
201
205
|
|
|
202
206
|
A lifecycle hook called once during the `ToolFunc` instance's initialization.
|
|
203
207
|
It allows for initial setup, state configuration, or property modification on the instance
|
|
@@ -243,7 +247,7 @@ console.log(myFunc.customState); // Outputs: 'configured'
|
|
|
243
247
|
|
|
244
248
|
> `optional` **stream**: `boolean`
|
|
245
249
|
|
|
246
|
-
Defined in:
|
|
250
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:253
|
|
247
251
|
|
|
248
252
|
If true, indicates that the function has the *capability* to stream its output.
|
|
249
253
|
Whether a specific call is streamed is determined by a `stream` property in the runtime parameters.
|
|
@@ -258,7 +262,7 @@ Whether a specific call is streamed is determined by a `stream` property in the
|
|
|
258
262
|
|
|
259
263
|
> `optional` **tags**: `string` \| `string`[]
|
|
260
264
|
|
|
261
|
-
Defined in:
|
|
265
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:224
|
|
262
266
|
|
|
263
267
|
Tags for grouping or filtering functions.
|
|
264
268
|
|
|
@@ -272,7 +276,7 @@ Tags for grouping or filtering functions.
|
|
|
272
276
|
|
|
273
277
|
> `optional` **title**: `string`
|
|
274
278
|
|
|
275
|
-
Defined in:
|
|
279
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:307
|
|
276
280
|
|
|
277
281
|
A concise, human-readable title for the function, often used in UI or by AI.
|
|
278
282
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: FuncParam
|
|
8
8
|
|
|
9
|
-
Defined in:
|
|
9
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:149
|
|
10
10
|
|
|
11
11
|
Describes a single function parameter, including its name, type, and description.
|
|
12
12
|
|
|
@@ -16,7 +16,7 @@ Describes a single function parameter, including its name, type, and description
|
|
|
16
16
|
|
|
17
17
|
> `optional` **description**: `string`
|
|
18
18
|
|
|
19
|
-
Defined in:
|
|
19
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:169
|
|
20
20
|
|
|
21
21
|
A description of the parameter, explaining its purpose and usage.
|
|
22
22
|
|
|
@@ -26,7 +26,7 @@ A description of the parameter, explaining its purpose and usage.
|
|
|
26
26
|
|
|
27
27
|
> `optional` **name**: `string`
|
|
28
28
|
|
|
29
|
-
Defined in:
|
|
29
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:154
|
|
30
30
|
|
|
31
31
|
The name of the parameter.
|
|
32
32
|
|
|
@@ -36,7 +36,7 @@ The name of the parameter.
|
|
|
36
36
|
|
|
37
37
|
> `optional` **required**: `boolean`
|
|
38
38
|
|
|
39
|
-
Defined in:
|
|
39
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:164
|
|
40
40
|
|
|
41
41
|
Indicates whether the parameter is required.
|
|
42
42
|
|
|
@@ -46,6 +46,6 @@ Indicates whether the parameter is required.
|
|
|
46
46
|
|
|
47
47
|
> `optional` **type**: `string`
|
|
48
48
|
|
|
49
|
-
Defined in:
|
|
49
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:159
|
|
50
50
|
|
|
51
51
|
The data type of the parameter, represented as a string identifier (e.g., 'string', 'number').
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: FuncParams
|
|
8
8
|
|
|
9
|
-
Defined in:
|
|
9
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:184
|
|
10
10
|
|
|
11
11
|
A map of function parameters, where each key is the parameter name.
|
|
12
12
|
The value can be either a detailed `FuncParam` object or a simple type string.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: Funcs
|
|
8
8
|
|
|
9
|
-
Defined in:
|
|
9
|
+
Defined in: @isdk/ai-tools/packages/tool-func/dist/index.d.ts:361
|
|
10
10
|
|
|
11
11
|
A map of registered `ToolFunc` instances, indexed by their names.
|
|
12
12
|
|
|
@@ -6,7 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: HashAlgoParams
|
|
8
8
|
|
|
9
|
-
Defined in:
|
|
9
|
+
Defined in: @isdk/ai-tools/packages/hash/dist/index.d.ts:153
|
|
10
|
+
|
|
11
|
+
Defines the parameters for a hashing operation.
|
|
12
|
+
|
|
13
|
+
HashAlgoParams
|
|
10
14
|
|
|
11
15
|
## Properties
|
|
12
16
|
|
|
@@ -14,15 +18,34 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/hash/hash.ts:10](https://
|
|
|
14
18
|
|
|
15
19
|
> `optional` **hashAlgo**: [`HashAlgorithm`](../enumerations/HashAlgorithm.md)
|
|
16
20
|
|
|
17
|
-
Defined in:
|
|
21
|
+
Defined in: @isdk/ai-tools/packages/hash/dist/index.d.ts:160
|
|
22
|
+
|
|
23
|
+
The hashing algorithm to use.
|
|
24
|
+
|
|
25
|
+
#### Default
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
HashAlgorithm.xxhash64
|
|
29
|
+
```
|
|
18
30
|
|
|
19
31
|
***
|
|
20
32
|
|
|
21
33
|
### outputType?
|
|
22
34
|
|
|
23
|
-
> `optional` **outputType**: `"string"` \| `"
|
|
35
|
+
> `optional` **outputType**: `"string"` \| `"binary"` \| `"hex"`
|
|
36
|
+
|
|
37
|
+
Defined in: @isdk/ai-tools/packages/hash/dist/index.d.ts:177
|
|
24
38
|
|
|
25
|
-
|
|
39
|
+
The desired output type for the hash.
|
|
40
|
+
- `hex`: A hexadecimal string.
|
|
41
|
+
- `binary`: A Uint8Array.
|
|
42
|
+
- `string`: A base32768 encoded string (default).
|
|
43
|
+
|
|
44
|
+
#### Default
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
'string'
|
|
48
|
+
```
|
|
26
49
|
|
|
27
50
|
***
|
|
28
51
|
|
|
@@ -30,4 +53,12 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/hash/hash.ts:13](https://
|
|
|
30
53
|
|
|
31
54
|
> `optional` **seed**: `number`
|
|
32
55
|
|
|
33
|
-
Defined in:
|
|
56
|
+
Defined in: @isdk/ai-tools/packages/hash/dist/index.d.ts:167
|
|
57
|
+
|
|
58
|
+
The seed for the hashing algorithm. Used by algorithms like xxhash.
|
|
59
|
+
|
|
60
|
+
#### Default
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
SEED
|
|
64
|
+
```
|