@isdk/ai-tool 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-4FKBOPZI.mjs +1 -0
- package/dist/{chunk-VIG2GB47.mjs → chunk-TGTHY57V.mjs} +1 -1
- package/dist/funcs.d.mts +1 -2
- package/dist/funcs.d.ts +1 -2
- package/dist/funcs.js +1 -1
- package/dist/funcs.mjs +1 -1
- package/dist/{index-BCco-g_I.d.mts → index-BLW3R7VS.d.mts} +114 -69
- package/dist/{index-BCco-g_I.d.ts → index-BLW3R7VS.d.ts} +114 -69
- package/dist/index.d.mts +101 -38
- package/dist/index.d.ts +101 -38
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/test/util.js +1 -1
- package/dist/test/util.mjs +1 -1
- package/docs/api/{namespaces → @isdk/namespaces}/EventStates/README.md +2 -2
- package/docs/api/{namespaces → @isdk/namespaces}/EventStates/variables/ABORT.md +2 -2
- package/docs/api/{namespaces → @isdk/namespaces}/EventStates/variables/CONTINUE.md +2 -2
- package/docs/api/{namespaces → @isdk/namespaces}/EventStates/variables/DONE.md +2 -2
- package/docs/api/{namespaces → @isdk/namespaces}/EventStates/variables/STOPPED.md +2 -2
- package/docs/api/@isdk/namespaces/uuidv5/README.md +12 -0
- package/docs/api/{namespaces → @isdk/namespaces}/uuidv5/variables/DNS.md +2 -2
- package/docs/api/{namespaces → @isdk/namespaces}/uuidv5/variables/URL.md +2 -2
- package/docs/api/_media/pubsub.md +427 -105
- package/docs/api/_media/server_client_tools.md +5 -3
- package/docs/api/_media/toolFunc.md +3 -1
- package/docs/api/classes/AbortError.md +8 -8
- package/docs/api/classes/AlreadyExistsError.md +8 -8
- package/docs/api/classes/BaseError.md +14 -14
- package/docs/api/classes/BinarySemaphore.md +39 -39
- package/docs/api/classes/CancelableAbility.md +43 -39
- package/docs/api/classes/ClientToolTransport.md +22 -22
- package/docs/api/classes/ClientTools.md +182 -154
- package/docs/api/classes/CommonError.md +12 -12
- package/docs/api/classes/ConfigFile.md +6 -6
- package/docs/api/classes/EnvPromptTemplate.md +14 -14
- package/docs/api/classes/EventClient.md +258 -201
- package/docs/api/classes/EventEmitter.md +14 -14
- package/docs/api/classes/EventServer.md +220 -237
- package/docs/api/classes/EventToolFunc.md +144 -116
- package/docs/api/classes/FStringPromptTemplate.md +14 -14
- package/docs/api/classes/FewShotPromptTemplate.md +30 -26
- package/docs/api/classes/GolangPromptTemplate.md +13 -13
- package/docs/api/classes/HttpClientToolTransport.md +23 -23
- package/docs/api/classes/HttpServerToolTransport.md +40 -27
- package/docs/api/classes/IntSet.md +21 -21
- package/docs/api/classes/LRUCache.md +18 -18
- package/docs/api/classes/NotFoundError.md +8 -8
- package/docs/api/classes/NotImplementationError.md +8 -8
- package/docs/api/classes/PromptExampleSelector.md +17 -15
- package/docs/api/classes/PromptTemplate.md +15 -15
- package/docs/api/classes/ReadableStreamError.md +12 -12
- package/docs/api/classes/ResClientTools.md +658 -143
- package/docs/api/classes/ResServerTools.md +643 -133
- package/docs/api/classes/RpcMethodsClientTool.md +3303 -0
- package/docs/api/classes/RpcMethodsServerTool.md +3248 -0
- package/docs/api/classes/SSEChannel.md +142 -52
- package/docs/api/classes/Semaphore.md +40 -40
- package/docs/api/classes/ServerToolTransport.md +32 -27
- package/docs/api/classes/ServerTools.md +167 -139
- package/docs/api/classes/SignalGate.md +19 -17
- package/docs/api/classes/SseClientPubSubTransport.md +38 -10
- package/docs/api/classes/SseServerPubSubTransport.md +115 -42
- package/docs/api/classes/TaskAbortController.md +13 -13
- package/docs/api/classes/ToolFunc.md +157 -129
- package/docs/api/classes/ToolTransport.md +13 -13
- package/docs/api/classes/YamlTypeBaseObject.md +5 -5
- package/docs/api/enumerations/AsyncFeatureBits.md +4 -4
- package/docs/api/enumerations/AsyncFeatures.md +4 -4
- package/docs/api/enumerations/HashAlgorithm.md +12 -12
- package/docs/api/functions/AIArgProcessor.md +2 -2
- package/docs/api/functions/AIStream.md +8 -4
- package/docs/api/functions/ChoiceArgProcessor.md +2 -2
- package/docs/api/functions/DefaultDateFormat.md +2 -2
- package/docs/api/functions/ObjectArgsToArgsInfo.md +1 -1
- package/docs/api/functions/RateLimit.md +2 -2
- package/docs/api/functions/TemplateArgProcessor.md +2 -2
- package/docs/api/functions/addDate.md +7 -3
- package/docs/api/functions/assignDirs.md +1 -1
- package/docs/api/functions/beforeShutdown.md +1 -1
- package/docs/api/functions/calcPerplexity.md +2 -2
- package/docs/api/functions/calcPerplexitySimple.md +1 -1
- package/docs/api/functions/canonicalize.md +1 -1
- package/docs/api/functions/completeSentences.md +1 -1
- package/docs/api/functions/concatText.md +1 -1
- package/docs/api/functions/countLLMTokens.md +1 -1
- package/docs/api/functions/countRegexMatches.md +1 -1
- package/docs/api/functions/createAbilityInjector.md +16 -8
- package/docs/api/functions/createCallbacksTransformer.md +7 -3
- package/docs/api/functions/createEmptyReadableStream.md +1 -1
- package/docs/api/functions/createEndWithRepetitionDetector.md +2 -2
- package/docs/api/functions/createError.md +1 -1
- package/docs/api/functions/createEventStreamTransformer.md +8 -4
- package/docs/api/functions/createHfValueFunc.md +1 -1
- package/docs/api/functions/createLRUCache.md +2 -2
- package/docs/api/functions/createYamlObjectTag.md +1 -1
- package/docs/api/functions/dateToText.md +1 -1
- package/docs/api/functions/decodeCharset.md +2 -2
- package/docs/api/functions/defaultsWithConcat.md +1 -1
- package/docs/api/functions/detectCharset.md +2 -2
- package/docs/api/functions/encodeLLMTokens.md +1 -1
- package/docs/api/functions/ensureQuoted.md +1 -1
- package/docs/api/functions/eventable.md +6 -8
- package/docs/api/functions/expandConfig.md +2 -2
- package/docs/api/functions/expandObjEnv.md +1 -1
- package/docs/api/functions/expandPath.md +2 -2
- package/docs/api/functions/expandPathInObject.md +2 -2
- package/docs/api/functions/expandPaths.md +2 -2
- package/docs/api/functions/fileIsExists.md +1 -1
- package/docs/api/functions/filterValidFnScope.md +2 -2
- package/docs/api/functions/findIndexNonEmptyFrom.md +1 -1
- package/docs/api/functions/findPort.md +1 -1
- package/docs/api/functions/formatISO.md +1 -1
- package/docs/api/functions/formatTextWithSpace.md +2 -2
- package/docs/api/functions/funcGetMeta.md +1 -1
- package/docs/api/functions/funcWithMeta.md +2 -2
- package/docs/api/functions/genUrlParamsStr.md +8 -2
- package/docs/api/functions/getAllEnumKeys.md +4 -2
- package/docs/api/functions/getConfigFileNames.md +2 -2
- package/docs/api/functions/getConfigs.md +2 -2
- package/docs/api/functions/getFileMetaInfo.md +1 -1
- package/docs/api/functions/getHashAlgoBySize.md +1 -1
- package/docs/api/functions/getKeysPath.md +4 -2
- package/docs/api/functions/getLLMTokenizer.md +1 -1
- package/docs/api/functions/getMultiLevelExtname.md +1 -1
- package/docs/api/functions/getPackageDir.md +1 -1
- package/docs/api/functions/getRealFilepath.md +1 -1
- package/docs/api/functions/getResponseErrorReadableStream.md +2 -2
- package/docs/api/functions/getXDGConfigs.md +1 -1
- package/docs/api/functions/hasDirectoryIn.md +2 -2
- package/docs/api/functions/hash.md +1 -1
- package/docs/api/functions/hashFile.md +2 -2
- package/docs/api/functions/hashObject.md +2 -2
- package/docs/api/functions/hashStream.md +1 -1
- package/docs/api/functions/initShutdown.md +1 -1
- package/docs/api/functions/isLangUsingSpaces.md +1 -1
- package/docs/api/functions/isListItemString.md +1 -1
- package/docs/api/functions/isModelNameMatched.md +2 -2
- package/docs/api/functions/isPunctuationChar.md +1 -1
- package/docs/api/functions/isQuoted.md +1 -1
- package/docs/api/functions/isRegExp.md +1 -1
- package/docs/api/functions/isSameString.md +1 -1
- package/docs/api/functions/isSectionString.md +2 -2
- package/docs/api/functions/isSentenceEnding.md +1 -1
- package/docs/api/functions/isSepLineString.md +1 -1
- package/docs/api/functions/isStrWrapped.md +1 -1
- package/docs/api/functions/isSubdirectory.md +1 -1
- package/docs/api/functions/isTitleString.md +2 -2
- package/docs/api/functions/isWebStream.md +1 -1
- package/docs/api/functions/joinSplitWords.md +1 -1
- package/docs/api/functions/jsonFilterToWhere.md +2 -2
- package/docs/api/functions/jsonToMarkdownStr.md +2 -2
- package/docs/api/functions/loadAIConfig.md +1 -1
- package/docs/api/functions/loadConfig.md +1 -1
- package/docs/api/functions/loadConfigFile.md +1 -1
- package/docs/api/functions/loadFileFromPaths.md +2 -2
- package/docs/api/functions/loadTextFromPaths.md +3 -3
- package/docs/api/functions/lrucache.md +1 -1
- package/docs/api/functions/matchUrlProtocol.md +1 -1
- package/docs/api/functions/memoize.md +5 -3
- package/docs/api/functions/mergeArray.md +1 -1
- package/docs/api/functions/messagesToText.md +1 -1
- package/docs/api/functions/nanoid.md +45 -0
- package/docs/api/functions/normalizePath.md +1 -1
- package/docs/api/functions/paramsSizeToScaleStr.md +1 -1
- package/docs/api/functions/parseCommand.md +3 -3
- package/docs/api/functions/parseDateFormat.md +7 -3
- package/docs/api/functions/parseISO.md +7 -3
- package/docs/api/functions/parseJsJson.md +2 -2
- package/docs/api/functions/parseJsJsonSimpleSync.md +2 -2
- package/docs/api/functions/parseObjectArgInfo.md +2 -2
- package/docs/api/functions/parseObjectArgumentInfos.md +2 -2
- package/docs/api/functions/parseObjectArguments.md +2 -2
- package/docs/api/functions/parseObjectArgumentsAsArgInfos.md +2 -2
- package/docs/api/functions/parseYaml.md +1 -1
- package/docs/api/functions/pruneSubdirectories.md +1 -1
- package/docs/api/functions/pruneSubdirectoriesInPlace.md +1 -1
- package/docs/api/functions/quoteStr.md +1 -1
- package/docs/api/functions/readFilenamesRecursiveSync.md +2 -2
- package/docs/api/functions/readTextFileChunks.md +2 -2
- package/docs/api/functions/readTextFileChunksEx.md +2 -2
- package/docs/api/functions/readableFromAsyncIterable.md +4 -2
- package/docs/api/functions/registerCoreTools.md +1 -1
- package/docs/api/functions/removeMarkdownBold.md +2 -2
- package/docs/api/functions/removeMarkdownBoldAndItalic.md +2 -2
- package/docs/api/functions/removeMarkdownItalic.md +2 -2
- package/docs/api/functions/replaceWithPlaceholder.md +2 -2
- package/docs/api/functions/restoreFromPlacehoders.md +2 -2
- package/docs/api/functions/sanitizeFilename.md +1 -1
- package/docs/api/functions/sanitizeFilepath.md +1 -1
- package/docs/api/functions/saveConfigFile.md +1 -1
- package/docs/api/functions/scaleStrToParamsSize.md +1 -1
- package/docs/api/functions/shutdown.md +1 -1
- package/docs/api/functions/simplifyObjectArguments.md +1 -1
- package/docs/api/functions/sleep.md +1 -1
- package/docs/api/functions/sortedValues.md +4 -2
- package/docs/api/functions/splitChunks.md +2 -2
- package/docs/api/functions/splitParagraph.md +2 -2
- package/docs/api/functions/splitSentence.md +1 -1
- package/docs/api/functions/splitWords.md +1 -1
- package/docs/api/functions/stringifyYaml.md +1 -1
- package/docs/api/functions/stripConsoleColor.md +1 -1
- package/docs/api/functions/textToDate.md +1 -1
- package/docs/api/functions/throwError.md +1 -1
- package/docs/api/functions/toDate.md +7 -3
- package/docs/api/functions/toDateTime.md +1 -1
- package/docs/api/functions/trimStartOfStreamHelper.md +3 -3
- package/docs/api/functions/truncTo.md +1 -1
- package/docs/api/functions/truncateByToken.md +2 -2
- package/docs/api/functions/truncateToTokenLimit.md +2 -2
- package/docs/api/functions/truncateToTokenLimitEx.md +2 -2
- package/docs/api/functions/uuid.md +15 -6
- package/docs/api/functions/uuidStringify.md +1 -1
- package/docs/api/functions/uuidv1.md +5 -3
- package/docs/api/functions/uuidv4.md +5 -3
- package/docs/api/functions/uuidv5.md +5 -3
- package/docs/api/functions/uuidv6.md +61 -0
- package/docs/api/functions/uuidv7.md +61 -0
- package/docs/api/functions/wrapEventEmitter.md +1 -1
- package/docs/api/functions/xxhash.md +1 -1
- package/docs/api/functions/xxhash32.md +1 -1
- package/docs/api/functions/xxhash64.md +1 -1
- package/docs/api/functions/xxhashAsStr.md +1 -1
- package/docs/api/functions/yieldExec.md +1 -1
- package/docs/api/globals.md +17 -6
- package/docs/api/interfaces/AIChatAssistantMessageParam.md +12 -12
- package/docs/api/interfaces/AIChatContentPartImage.md +3 -3
- package/docs/api/interfaces/AIChatContentPartText.md +3 -3
- package/docs/api/interfaces/AIChatMessageParamBase.md +7 -7
- package/docs/api/interfaces/AIChatMessageToolCall.md +4 -4
- package/docs/api/interfaces/AIChatSystemMessageParam.md +9 -9
- package/docs/api/interfaces/AIChatToolChoiceFuncObject.md +3 -3
- package/docs/api/interfaces/AIChatToolChoiceObject.md +2 -2
- package/docs/api/interfaces/AIChatToolFunc.md +5 -5
- package/docs/api/interfaces/AIChatToolFuncParam.md +3 -3
- package/docs/api/interfaces/AIChatToolMessageParam.md +10 -10
- package/docs/api/interfaces/AIChatToolParam.md +2 -2
- package/docs/api/interfaces/AIChatToolTypeObject.md +2 -2
- package/docs/api/interfaces/AIChatUserMessageParam.md +13 -13
- package/docs/api/interfaces/AIChoiceConfig.md +8 -8
- package/docs/api/interfaces/AIResult.md +12 -8
- package/docs/api/interfaces/AIStreamParser.md +8 -6
- package/docs/api/interfaces/AIStreamParserOptions.md +2 -2
- package/docs/api/interfaces/BaseFunc.md +17 -17
- package/docs/api/interfaces/BaseFuncItem.md +15 -15
- package/docs/api/interfaces/BinarySemaphoreAcquireOptions.md +2 -2
- package/docs/api/interfaces/BinarySemaphoreOptions.md +5 -5
- package/docs/api/interfaces/BinarySemaphoreReleaseOptions.md +2 -2
- package/docs/api/interfaces/BinarySemaphoreReleaserFunc.md +3 -3
- package/docs/api/interfaces/CancelableAbilityOptions.md +4 -4
- package/docs/api/interfaces/ClientFuncItem.md +21 -25
- package/docs/api/interfaces/EventClientFuncParams.md +5 -5
- package/docs/api/interfaces/EventServerFuncParams.md +14 -6
- package/docs/api/interfaces/FewShotPromptTemplateOptions.md +9 -7
- package/docs/api/interfaces/FuncItem.md +18 -18
- package/docs/api/interfaces/FuncParam.md +5 -5
- package/docs/api/interfaces/FuncParams.md +1 -1
- package/docs/api/interfaces/Funcs.md +1 -1
- package/docs/api/interfaces/HashAlgoParams.md +4 -4
- package/docs/api/interfaces/IClientToolTransport.md +9 -9
- package/docs/api/interfaces/IFileMetaInfo.md +8 -8
- package/docs/api/interfaces/IPubSubClientTransport.md +31 -7
- package/docs/api/interfaces/IPubSubServerTransport.md +92 -47
- package/docs/api/interfaces/IReadTextFileChunksOptions.md +13 -13
- package/docs/api/interfaces/IServerToolTransport.md +19 -14
- package/docs/api/interfaces/IToolTransport.md +6 -6
- package/docs/api/interfaces/ITruncateToTokenLimitOptions.md +11 -11
- package/docs/api/interfaces/JsonFilter.md +1 -1
- package/docs/api/interfaces/ParseObjectArgumentOptions.md +11 -11
- package/docs/api/interfaces/ProbabilityItem.md +4 -4
- package/docs/api/interfaces/PromptExampleSelectorOptions.md +3 -3
- package/docs/api/interfaces/PubSubClientStream.md +26 -14
- package/docs/api/interfaces/PubSubServerSession.md +8 -8
- package/docs/api/interfaces/RemoteFuncItem.md +21 -25
- package/docs/api/interfaces/ReplacePlacehoderOptions.md +5 -5
- package/docs/api/interfaces/ResClientFuncParams.md +5 -5
- package/docs/api/interfaces/ResServerFuncParams.md +14 -10
- package/docs/api/interfaces/RpcMethodsClientFuncParams.md +25 -0
- package/docs/api/interfaces/RpcMethodsServerFuncParams.md +61 -0
- package/docs/api/interfaces/SectionStringOptions.md +3 -3
- package/docs/api/interfaces/SemaphoreOptions.md +7 -7
- package/docs/api/interfaces/SemaphoreTaskItem.md +6 -6
- package/docs/api/interfaces/ServerFuncItem.md +22 -26
- package/docs/api/interfaces/ServerFuncParams.md +4 -3
- package/docs/api/interfaces/SplitSentenceOptions.md +5 -5
- package/docs/api/interfaces/StreamCallbacksAndOptions.md +11 -7
- package/docs/api/interfaces/TaskAbortControllers.md +1 -1
- package/docs/api/interfaces/TaskPromise.md +17 -9
- package/docs/api/interfaces/ToolFuncPackage.md +5 -5
- package/docs/api/type-aliases/AIChatContentPart.md +2 -2
- package/docs/api/type-aliases/AIChatMessageParam.md +2 -2
- package/docs/api/type-aliases/AIChatRole.md +2 -2
- package/docs/api/type-aliases/AIChatToolChoiceParam.md +2 -2
- package/docs/api/type-aliases/AIMessageType.md +2 -2
- package/docs/api/type-aliases/AIModelNameRule.md +2 -2
- package/docs/api/type-aliases/AIModelNameRuleFn.md +2 -2
- package/docs/api/type-aliases/AIModelNameRules.md +2 -2
- package/docs/api/type-aliases/AITextGenerationFinishReason.md +2 -2
- package/docs/api/type-aliases/ActionName.md +2 -2
- package/docs/api/type-aliases/ArrayMergeWay.md +2 -2
- package/docs/api/type-aliases/AsyncTaskId.md +2 -2
- package/docs/api/type-aliases/BeforeShutdownListener.md +2 -2
- package/docs/api/type-aliases/EventErrorListenerFn.md +2 -2
- package/docs/api/type-aliases/EventListenerFn.md +2 -2
- package/docs/api/type-aliases/FuncParamType.md +2 -2
- package/docs/api/type-aliases/PromptExamples.md +5 -3
- package/docs/api/type-aliases/PubSubClientId.md +2 -2
- package/docs/api/type-aliases/PubSubCtx.md +24 -4
- package/docs/api/type-aliases/RpcMethodHandler.md +2 -2
- package/docs/api/type-aliases/SSEClient.md +53 -0
- package/docs/api/type-aliases/SemaphoreIsReadyFuncType.md +2 -2
- package/docs/api/type-aliases/TFunc.md +2 -2
- package/docs/api/type-aliases/UUIDVersions.md +11 -0
- package/docs/api/variables/AIChatRoles.md +1 -1
- package/docs/api/variables/AIMessageTypes.md +1 -1
- package/docs/api/variables/AITextGenerationFinishReasons.md +1 -1
- package/docs/api/variables/ActionNames.md +1 -1
- package/docs/api/variables/ArrayMergeWay.md +2 -2
- package/docs/api/variables/ArrayMergeWaySymbol.md +2 -2
- package/docs/api/variables/ClientEventPrefix.md +11 -0
- package/docs/api/variables/ClientToolFuncSchema.md +4 -2
- package/docs/api/variables/DEFAULT_CONFIG_NAME.md +1 -1
- package/docs/api/variables/DefaultAsyncSemaphoreCapacity.md +1 -1
- package/docs/api/variables/EventBusName.md +1 -1
- package/docs/api/variables/EventName.md +1 -1
- package/docs/api/variables/FuncMetaSymbol.md +2 -2
- package/docs/api/variables/LLM_TOKENIZER_NAMES.md +4 -4
- package/docs/api/variables/LLM_TOKENIZER_NAMES_MAP.md +1 -1
- package/docs/api/variables/PASSING_SCORE.md +1 -1
- package/docs/api/variables/RStreamErrCode.md +1 -1
- package/docs/api/variables/RemoteToolFuncSchema.md +4 -2
- package/docs/api/variables/ResponseRStreamErrCode.md +1 -1
- package/docs/api/variables/RpcMethodsClientToolSchema.md +51 -0
- package/docs/api/variables/RpcMethodsServerToolSchema.md +21 -0
- package/docs/api/variables/SHUTDOWN_SIGNALS.md +1 -1
- package/docs/api/variables/SSEChannelAlreadyClosedErrCode.md +1 -1
- package/docs/api/variables/SecondaryCache.md +1 -1
- package/docs/api/variables/ServerToolFuncSchema.md +4 -2
- package/docs/api/variables/StrangeHumanName.md +1 -1
- package/docs/api/variables/ToolAsyncCancelableBit.md +1 -1
- package/docs/api/variables/ToolAsyncMultiTaskBit.md +1 -1
- package/docs/api/variables/ToolAsyncPriorityBit.md +1 -1
- package/docs/api/variables/ToolFuncSchema.md +4 -2
- package/docs/api/variables/backendEventable.md +11 -0
- package/docs/api/variables/base32768.md +1 -1
- package/docs/api/variables/event.md +1 -1
- package/docs/api/variables/eventClient.md +1 -1
- package/docs/api/variables/eventServer.md +1 -1
- package/docs/api/variables/lrucache.md +1 -1
- package/docs/api/variables/makeToolFuncCancelable.md +11 -0
- package/docs/api/{functions → variables}/wait.md +16 -14
- package/docs/pubsub.md +427 -105
- package/docs/server_client_tools.md +5 -3
- package/docs/toolFunc.md +3 -1
- package/package.json +10 -9
- package/dist/chunk-LNTIQQNN.mjs +0 -1
- package/docs/api/functions/backendEventable.md +0 -29
- package/docs/api/functions/makeToolFuncCancelable.md +0 -29
- package/docs/api/interfaces/PubSubClient.md +0 -27
- package/docs/api/namespaces/uuidv5/README.md +0 -12
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Class: HttpServerToolTransport
|
|
8
8
|
|
|
9
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/http-server.ts:12](https://github.com/isdk/ai-tool.js/blob/
|
|
9
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/http-server.ts:12](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/transports/http-server.ts#L12)
|
|
10
10
|
|
|
11
11
|
A concrete server transport implementation using Node.js's built-in HTTP server.
|
|
12
12
|
|
|
@@ -16,11 +16,11 @@ A concrete server transport implementation using Node.js's built-in HTTP server.
|
|
|
16
16
|
|
|
17
17
|
## Constructors
|
|
18
18
|
|
|
19
|
-
###
|
|
19
|
+
### Constructor
|
|
20
20
|
|
|
21
|
-
> **new HttpServerToolTransport**(`options
|
|
21
|
+
> **new HttpServerToolTransport**(`options?`): `HttpServerToolTransport`
|
|
22
22
|
|
|
23
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/http-server.ts:
|
|
23
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/http-server.ts:16](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/transports/http-server.ts#L16)
|
|
24
24
|
|
|
25
25
|
#### Parameters
|
|
26
26
|
|
|
@@ -30,11 +30,11 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/http-server.ts:17](h
|
|
|
30
30
|
|
|
31
31
|
#### Returns
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
`HttpServerToolTransport`
|
|
34
34
|
|
|
35
35
|
#### Overrides
|
|
36
36
|
|
|
37
|
-
[`ServerToolTransport`](ServerToolTransport.md).[`constructor`](ServerToolTransport.md#
|
|
37
|
+
[`ServerToolTransport`](ServerToolTransport.md).[`constructor`](ServerToolTransport.md#constructor)
|
|
38
38
|
|
|
39
39
|
## Properties
|
|
40
40
|
|
|
@@ -42,7 +42,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/http-server.ts:17](h
|
|
|
42
42
|
|
|
43
43
|
> **apiRoot**: `string`
|
|
44
44
|
|
|
45
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/server.ts:
|
|
45
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/server.ts:48](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/transports/server.ts#L48)
|
|
46
46
|
|
|
47
47
|
The root endpoint for the remote service.
|
|
48
48
|
For HTTP, this is a URL. For IPC, it could be a channel name.
|
|
@@ -57,7 +57,7 @@ For HTTP, this is a URL. For IPC, it could be a channel name.
|
|
|
57
57
|
|
|
58
58
|
> `optional` **options**: `any`
|
|
59
59
|
|
|
60
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/server.ts:
|
|
60
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/server.ts:50](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/transports/server.ts#L50)
|
|
61
61
|
|
|
62
62
|
Additional options for the transport start or fetch, passed by mount.
|
|
63
63
|
|
|
@@ -71,7 +71,7 @@ Additional options for the transport start or fetch, passed by mount.
|
|
|
71
71
|
|
|
72
72
|
> **server**: `Server`
|
|
73
73
|
|
|
74
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/http-server.ts:13](https://github.com/isdk/ai-tool.js/blob/
|
|
74
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/http-server.ts:13](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/transports/http-server.ts#L13)
|
|
75
75
|
|
|
76
76
|
***
|
|
77
77
|
|
|
@@ -79,7 +79,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/http-server.ts:13](h
|
|
|
79
79
|
|
|
80
80
|
> **Tools**: *typeof* [`ServerTools`](ServerTools.md)
|
|
81
81
|
|
|
82
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/server.ts:
|
|
82
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/server.ts:49](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/transports/server.ts#L49)
|
|
83
83
|
|
|
84
84
|
#### Inherited from
|
|
85
85
|
|
|
@@ -89,9 +89,9 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/server.ts:43](https:
|
|
|
89
89
|
|
|
90
90
|
### \_mount()
|
|
91
91
|
|
|
92
|
-
> **\_mount**(`Tools`, `apiPrefix`, `options
|
|
92
|
+
> **\_mount**(`Tools`, `apiPrefix`, `options?`): `void`
|
|
93
93
|
|
|
94
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/server.ts:
|
|
94
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/server.ts:52](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/transports/server.ts#L52)
|
|
95
95
|
|
|
96
96
|
#### Parameters
|
|
97
97
|
|
|
@@ -121,7 +121,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/server.ts:46](https:
|
|
|
121
121
|
|
|
122
122
|
> **\_start**(`options`): `Promise`\<`void`\>
|
|
123
123
|
|
|
124
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/http-server.ts:160](https://github.com/isdk/ai-tool.js/blob/
|
|
124
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/http-server.ts:160](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/transports/http-server.ts#L160)
|
|
125
125
|
|
|
126
126
|
#### Parameters
|
|
127
127
|
|
|
@@ -149,7 +149,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/http-server.ts:160](
|
|
|
149
149
|
|
|
150
150
|
> **addDiscoveryHandler**(`apiPrefix`, `handler`): `void`
|
|
151
151
|
|
|
152
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/http-server.ts:
|
|
152
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/http-server.ts:61](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/transports/http-server.ts#L61)
|
|
153
153
|
|
|
154
154
|
#### Parameters
|
|
155
155
|
|
|
@@ -173,9 +173,9 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/http-server.ts:62](h
|
|
|
173
173
|
|
|
174
174
|
### addRpcHandler()
|
|
175
175
|
|
|
176
|
-
> **addRpcHandler**(`serverTools`, `apiPrefix`, `options
|
|
176
|
+
> **addRpcHandler**(`serverTools`, `apiPrefix`, `options?`): `void`
|
|
177
177
|
|
|
178
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/http-server.ts:
|
|
178
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/http-server.ts:66](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/transports/http-server.ts#L66)
|
|
179
179
|
|
|
180
180
|
#### Parameters
|
|
181
181
|
|
|
@@ -205,7 +205,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/http-server.ts:67](h
|
|
|
205
205
|
|
|
206
206
|
> **getRaw**(): `Server`
|
|
207
207
|
|
|
208
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/http-server.ts:
|
|
208
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/http-server.ts:193](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/transports/http-server.ts#L193)
|
|
209
209
|
|
|
210
210
|
Gets the underlying raw server instance.
|
|
211
211
|
|
|
@@ -221,31 +221,36 @@ Gets the underlying raw server instance.
|
|
|
221
221
|
|
|
222
222
|
### mount()
|
|
223
223
|
|
|
224
|
-
> **mount**(`Tools`, `apiRoot
|
|
224
|
+
> **mount**(`Tools`, `apiRoot?`, `options?`): `any`
|
|
225
225
|
|
|
226
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/base.ts:42](https://github.com/isdk/ai-tool.js/blob/
|
|
226
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/base.ts:42](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/transports/base.ts#L42)
|
|
227
227
|
|
|
228
228
|
Mounts the ServerTools registry, creating the necessary API routes.
|
|
229
229
|
|
|
230
|
+
This method is responsible for integrating the tool-handling logic with a
|
|
231
|
+
running server instance.
|
|
232
|
+
|
|
230
233
|
#### Parameters
|
|
231
234
|
|
|
232
235
|
##### Tools
|
|
233
236
|
|
|
234
237
|
*typeof* [`ToolFunc`](ToolFunc.md)
|
|
235
238
|
|
|
236
|
-
The ServerTools class.
|
|
239
|
+
The ServerTools class containing the tool definitions.
|
|
237
240
|
|
|
238
241
|
##### apiRoot?
|
|
239
242
|
|
|
240
243
|
`string`
|
|
241
244
|
|
|
242
|
-
An optional prefix for all API routes.
|
|
245
|
+
An optional prefix for all API routes (e.g., '/api').
|
|
243
246
|
|
|
244
247
|
##### options?
|
|
245
248
|
|
|
246
249
|
`any`
|
|
247
250
|
|
|
248
|
-
|
|
251
|
+
A container for transport-specific options. For example,
|
|
252
|
+
an HTTP-based transport would expect an `{ server: http.Server }` object
|
|
253
|
+
to attach its route handlers to.
|
|
249
254
|
|
|
250
255
|
#### Returns
|
|
251
256
|
|
|
@@ -261,7 +266,7 @@ Additional options for the transport start.
|
|
|
261
266
|
|
|
262
267
|
> **setApiRoot**(`apiRoot`): `void`
|
|
263
268
|
|
|
264
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/base.ts:38](https://github.com/isdk/ai-tool.js/blob/
|
|
269
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/base.ts:38](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/transports/base.ts#L38)
|
|
265
270
|
|
|
266
271
|
#### Parameters
|
|
267
272
|
|
|
@@ -281,9 +286,9 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/base.ts:38](https://
|
|
|
281
286
|
|
|
282
287
|
### start()
|
|
283
288
|
|
|
284
|
-
> **start**(`options
|
|
289
|
+
> **start**(`options?`): `Promise`\<`any`\>
|
|
285
290
|
|
|
286
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/server.ts:
|
|
291
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/server.ts:58](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/transports/server.ts#L58)
|
|
287
292
|
|
|
288
293
|
Starts the transport layer, making it listen for incoming connections.
|
|
289
294
|
|
|
@@ -307,12 +312,20 @@ Protocol-specific options (e.g., { port, host }).
|
|
|
307
312
|
|
|
308
313
|
### stop()
|
|
309
314
|
|
|
310
|
-
> **stop**(): `Promise`\<`void`\>
|
|
315
|
+
> **stop**(`force?`): `Promise`\<`void`\>
|
|
311
316
|
|
|
312
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/http-server.ts:176](https://github.com/isdk/ai-tool.js/blob/
|
|
317
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/transports/http-server.ts:176](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/transports/http-server.ts#L176)
|
|
313
318
|
|
|
314
319
|
Stops the server instance gracefully.
|
|
315
320
|
|
|
321
|
+
#### Parameters
|
|
322
|
+
|
|
323
|
+
##### force?
|
|
324
|
+
|
|
325
|
+
`boolean`
|
|
326
|
+
|
|
327
|
+
Optional flag to force shutdown immediately
|
|
328
|
+
|
|
316
329
|
#### Returns
|
|
317
330
|
|
|
318
331
|
`Promise`\<`void`\>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Class: IntSet
|
|
8
8
|
|
|
9
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/intset.ts:6](https://github.com/isdk/ai-tool.js/blob/
|
|
9
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/intset.ts:6](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/intset.ts#L6)
|
|
10
10
|
|
|
11
11
|
Represents a set of integers using a bit field.
|
|
12
12
|
Each bit in the bit field represents an integer starting from 0,
|
|
@@ -14,11 +14,11 @@ where the flag value 0 represents the 0th bit, 1 represents the 1st bit, and so
|
|
|
14
14
|
|
|
15
15
|
## Constructors
|
|
16
16
|
|
|
17
|
-
###
|
|
17
|
+
### Constructor
|
|
18
18
|
|
|
19
|
-
> **new IntSet**(`bitField`):
|
|
19
|
+
> **new IntSet**(`bitField`): `IntSet`
|
|
20
20
|
|
|
21
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/intset.ts:21](https://github.com/isdk/ai-tool.js/blob/
|
|
21
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/intset.ts:21](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/intset.ts#L21)
|
|
22
22
|
|
|
23
23
|
#### Parameters
|
|
24
24
|
|
|
@@ -28,15 +28,15 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/intset.ts:21](https://git
|
|
|
28
28
|
|
|
29
29
|
#### Returns
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
`IntSet`
|
|
32
32
|
|
|
33
33
|
## Methods
|
|
34
34
|
|
|
35
35
|
### add()
|
|
36
36
|
|
|
37
|
-
> **add**(`flag`):
|
|
37
|
+
> **add**(`flag`): `IntSet`
|
|
38
38
|
|
|
39
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/intset.ts:29](https://github.com/isdk/ai-tool.js/blob/
|
|
39
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/intset.ts:29](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/intset.ts#L29)
|
|
40
40
|
|
|
41
41
|
Adds an element to the set.
|
|
42
42
|
|
|
@@ -51,29 +51,29 @@ The flag value representing the bit position to set.
|
|
|
51
51
|
|
|
52
52
|
#### Returns
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
`IntSet`
|
|
55
55
|
|
|
56
56
|
***
|
|
57
57
|
|
|
58
58
|
### clear()
|
|
59
59
|
|
|
60
|
-
> **clear**():
|
|
60
|
+
> **clear**(): `IntSet`
|
|
61
61
|
|
|
62
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/intset.ts:57](https://github.com/isdk/ai-tool.js/blob/
|
|
62
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/intset.ts:57](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/intset.ts#L57)
|
|
63
63
|
|
|
64
64
|
Clears all elements from the set.
|
|
65
65
|
|
|
66
66
|
#### Returns
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
`IntSet`
|
|
69
69
|
|
|
70
70
|
***
|
|
71
71
|
|
|
72
72
|
### delete()
|
|
73
73
|
|
|
74
|
-
> **delete**(`flag`):
|
|
74
|
+
> **delete**(`flag`): `IntSet`
|
|
75
75
|
|
|
76
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/intset.ts:39](https://github.com/isdk/ai-tool.js/blob/
|
|
76
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/intset.ts:39](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/intset.ts#L39)
|
|
77
77
|
|
|
78
78
|
Removes an element from the set.
|
|
79
79
|
|
|
@@ -87,7 +87,7 @@ The flag value representing the bit position to set. 0 represents the 0th bit
|
|
|
87
87
|
|
|
88
88
|
#### Returns
|
|
89
89
|
|
|
90
|
-
|
|
90
|
+
`IntSet`
|
|
91
91
|
|
|
92
92
|
***
|
|
93
93
|
|
|
@@ -95,7 +95,7 @@ The flag value representing the bit position to set. 0 represents the 0th bit
|
|
|
95
95
|
|
|
96
96
|
> **has**(`flag`): `boolean`
|
|
97
97
|
|
|
98
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/intset.ts:50](https://github.com/isdk/ai-tool.js/blob/
|
|
98
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/intset.ts:50](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/intset.ts#L50)
|
|
99
99
|
|
|
100
100
|
Determines whether an element is in the set.
|
|
101
101
|
|
|
@@ -119,7 +119,7 @@ true if the element is in the set; otherwise, false.
|
|
|
119
119
|
|
|
120
120
|
> **toJSON**(): `number`
|
|
121
121
|
|
|
122
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/intset.ts:70](https://github.com/isdk/ai-tool.js/blob/
|
|
122
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/intset.ts:70](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/intset.ts#L70)
|
|
123
123
|
|
|
124
124
|
#### Returns
|
|
125
125
|
|
|
@@ -131,7 +131,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/intset.ts:70](https://git
|
|
|
131
131
|
|
|
132
132
|
> **toString**(): `string`
|
|
133
133
|
|
|
134
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/intset.ts:66](https://github.com/isdk/ai-tool.js/blob/
|
|
134
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/intset.ts:66](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/intset.ts#L66)
|
|
135
135
|
|
|
136
136
|
#### Returns
|
|
137
137
|
|
|
@@ -143,7 +143,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/intset.ts:66](https://git
|
|
|
143
143
|
|
|
144
144
|
> **valueOf**(): `number`
|
|
145
145
|
|
|
146
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/intset.ts:62](https://github.com/isdk/ai-tool.js/blob/
|
|
146
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/intset.ts:62](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/intset.ts#L62)
|
|
147
147
|
|
|
148
148
|
#### Returns
|
|
149
149
|
|
|
@@ -155,7 +155,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/intset.ts:62](https://git
|
|
|
155
155
|
|
|
156
156
|
> `static` **add**(`bitField`, `flag`): `number`
|
|
157
157
|
|
|
158
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/intset.ts:12](https://github.com/isdk/ai-tool.js/blob/
|
|
158
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/intset.ts:12](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/intset.ts#L12)
|
|
159
159
|
|
|
160
160
|
#### Parameters
|
|
161
161
|
|
|
@@ -177,7 +177,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/intset.ts:12](https://git
|
|
|
177
177
|
|
|
178
178
|
> `static` **delete**(`bitField`, `flag`): `number`
|
|
179
179
|
|
|
180
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/intset.ts:16](https://github.com/isdk/ai-tool.js/blob/
|
|
180
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/intset.ts:16](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/intset.ts#L16)
|
|
181
181
|
|
|
182
182
|
#### Parameters
|
|
183
183
|
|
|
@@ -199,7 +199,7 @@ Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/intset.ts:16](https://git
|
|
|
199
199
|
|
|
200
200
|
> `static` **has**(`bitField`, `flag`): `boolean`
|
|
201
201
|
|
|
202
|
-
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/intset.ts:8](https://github.com/isdk/ai-tool.js/blob/
|
|
202
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/intset.ts:8](https://github.com/isdk/ai-tool.js/blob/d0765f898f217d97c57c6949502b4a7bef5dce5e/src/utils/intset.ts#L8)
|
|
203
203
|
|
|
204
204
|
#### Parameters
|
|
205
205
|
|
|
@@ -29,9 +29,9 @@ const cache = new LRUCache({
|
|
|
29
29
|
|
|
30
30
|
## Constructors
|
|
31
31
|
|
|
32
|
-
###
|
|
32
|
+
### Constructor
|
|
33
33
|
|
|
34
|
-
> **new LRUCache**(`options
|
|
34
|
+
> **new LRUCache**(`options?`): `LRUCache`
|
|
35
35
|
|
|
36
36
|
Defined in: @isdk/ai-tools/node\_modules/.pnpm/secondary-cache@2.0.1/node\_modules/secondary-cache/lib/lru-cache.d.ts:69
|
|
37
37
|
|
|
@@ -47,7 +47,7 @@ Optional the configuration options object for the cache or the max capacity numb
|
|
|
47
47
|
|
|
48
48
|
#### Returns
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
`LRUCache`
|
|
51
51
|
|
|
52
52
|
#### Example
|
|
53
53
|
|
|
@@ -110,7 +110,7 @@ Defined in: @isdk/ai-tools/node\_modules/.pnpm/secondary-cache@2.0.1/node\_modul
|
|
|
110
110
|
|
|
111
111
|
### clear()
|
|
112
112
|
|
|
113
|
-
> **clear**():
|
|
113
|
+
> **clear**(): `LRUCache`
|
|
114
114
|
|
|
115
115
|
Defined in: @isdk/ai-tools/node\_modules/.pnpm/secondary-cache@2.0.1/node\_modules/secondary-cache/lib/lru-cache.d.ts:154
|
|
116
116
|
|
|
@@ -118,7 +118,7 @@ Deletes all items from the cache.
|
|
|
118
118
|
|
|
119
119
|
#### Returns
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
`LRUCache`
|
|
122
122
|
|
|
123
123
|
- Returns the cache instance.
|
|
124
124
|
|
|
@@ -154,7 +154,7 @@ cache.clearExpires(); // removes all expires items from the cache
|
|
|
154
154
|
|
|
155
155
|
### del()
|
|
156
156
|
|
|
157
|
-
> **del**(`id`, `isInternal
|
|
157
|
+
> **del**(`id`, `isInternal?`): `boolean`
|
|
158
158
|
|
|
159
159
|
Defined in: @isdk/ai-tools/node\_modules/.pnpm/secondary-cache@2.0.1/node\_modules/secondary-cache/lib/lru-cache.d.ts:110
|
|
160
160
|
|
|
@@ -190,7 +190,7 @@ cache.del('key1'); // removes the item with key 'key1'
|
|
|
190
190
|
|
|
191
191
|
### delete()
|
|
192
192
|
|
|
193
|
-
> **delete**(`id`, `isInternal
|
|
193
|
+
> **delete**(`id`, `isInternal?`): `boolean`
|
|
194
194
|
|
|
195
195
|
Defined in: @isdk/ai-tools/node\_modules/.pnpm/secondary-cache@2.0.1/node\_modules/secondary-cache/lib/lru-cache.d.ts:100
|
|
196
196
|
|
|
@@ -226,7 +226,7 @@ cache.delete('key1'); // removes the item with key 'key1'
|
|
|
226
226
|
|
|
227
227
|
### delListener()
|
|
228
228
|
|
|
229
|
-
> **delListener**(`type`, `listener`):
|
|
229
|
+
> **delListener**(`type`, `listener`): `LRUCache`
|
|
230
230
|
|
|
231
231
|
Defined in: @isdk/ai-tools/node\_modules/.pnpm/secondary-cache@2.0.1/node\_modules/secondary-cache/lib/lru-cache.d.ts:70
|
|
232
232
|
|
|
@@ -242,13 +242,13 @@ Defined in: @isdk/ai-tools/node\_modules/.pnpm/secondary-cache@2.0.1/node\_modul
|
|
|
242
242
|
|
|
243
243
|
#### Returns
|
|
244
244
|
|
|
245
|
-
|
|
245
|
+
`LRUCache`
|
|
246
246
|
|
|
247
247
|
***
|
|
248
248
|
|
|
249
249
|
### forEach()
|
|
250
250
|
|
|
251
|
-
> **forEach**(`callback`, `thisArg
|
|
251
|
+
> **forEach**(`callback`, `thisArg?`): `void`
|
|
252
252
|
|
|
253
253
|
Defined in: @isdk/ai-tools/node\_modules/.pnpm/secondary-cache@2.0.1/node\_modules/secondary-cache/lib/lru-cache.d.ts:172
|
|
254
254
|
|
|
@@ -446,7 +446,7 @@ The number of items in the LRUCache.
|
|
|
446
446
|
|
|
447
447
|
### off()
|
|
448
448
|
|
|
449
|
-
> **off**(`type`, `listener`):
|
|
449
|
+
> **off**(`type`, `listener`): `LRUCache`
|
|
450
450
|
|
|
451
451
|
Defined in: @isdk/ai-tools/node\_modules/.pnpm/secondary-cache@2.0.1/node\_modules/secondary-cache/lib/lru-cache.d.ts:72
|
|
452
452
|
|
|
@@ -462,13 +462,13 @@ Defined in: @isdk/ai-tools/node\_modules/.pnpm/secondary-cache@2.0.1/node\_modul
|
|
|
462
462
|
|
|
463
463
|
#### Returns
|
|
464
464
|
|
|
465
|
-
|
|
465
|
+
`LRUCache`
|
|
466
466
|
|
|
467
467
|
***
|
|
468
468
|
|
|
469
469
|
### on()
|
|
470
470
|
|
|
471
|
-
> **on**(`type`, `listener`):
|
|
471
|
+
> **on**(`type`, `listener`): `LRUCache`
|
|
472
472
|
|
|
473
473
|
Defined in: @isdk/ai-tools/node\_modules/.pnpm/secondary-cache@2.0.1/node\_modules/secondary-cache/lib/lru-cache.d.ts:71
|
|
474
474
|
|
|
@@ -484,7 +484,7 @@ Defined in: @isdk/ai-tools/node\_modules/.pnpm/secondary-cache@2.0.1/node\_modul
|
|
|
484
484
|
|
|
485
485
|
#### Returns
|
|
486
486
|
|
|
487
|
-
|
|
487
|
+
`LRUCache`
|
|
488
488
|
|
|
489
489
|
***
|
|
490
490
|
|
|
@@ -520,7 +520,7 @@ const value = cache.peek('key1');
|
|
|
520
520
|
|
|
521
521
|
### reset()
|
|
522
522
|
|
|
523
|
-
> **reset**(`options
|
|
523
|
+
> **reset**(`options?`): `LRUCache`
|
|
524
524
|
|
|
525
525
|
Defined in: @isdk/ai-tools/node\_modules/.pnpm/secondary-cache@2.0.1/node\_modules/secondary-cache/lib/lru-cache.d.ts:155
|
|
526
526
|
|
|
@@ -532,13 +532,13 @@ Defined in: @isdk/ai-tools/node\_modules/.pnpm/secondary-cache@2.0.1/node\_modul
|
|
|
532
532
|
|
|
533
533
|
#### Returns
|
|
534
534
|
|
|
535
|
-
|
|
535
|
+
`LRUCache`
|
|
536
536
|
|
|
537
537
|
***
|
|
538
538
|
|
|
539
539
|
### set()
|
|
540
540
|
|
|
541
|
-
> **set**(`id`, `value`, `expires
|
|
541
|
+
> **set**(`id`, `value`, `expires?`): `any`
|
|
542
542
|
|
|
543
543
|
Defined in: @isdk/ai-tools/node\_modules/.pnpm/secondary-cache@2.0.1/node\_modules/secondary-cache/lib/lru-cache.d.ts:146
|
|
544
544
|
|
|
@@ -581,7 +581,7 @@ cache.set('key1', 'value1', 5000); // add an item with expiration time of 5 seco
|
|
|
581
581
|
|
|
582
582
|
### setDefaultOptions()
|
|
583
583
|
|
|
584
|
-
> **setDefaultOptions**(`options
|
|
584
|
+
> **setDefaultOptions**(`options?`): `any`
|
|
585
585
|
|
|
586
586
|
Defined in: @isdk/ai-tools/node\_modules/.pnpm/secondary-cache@2.0.1/node\_modules/secondary-cache/lib/lru-cache.d.ts:187
|
|
587
587
|
|
|
@@ -23,9 +23,9 @@ throw new NotFoundError('user', { id: 123 })
|
|
|
23
23
|
|
|
24
24
|
## Constructors
|
|
25
25
|
|
|
26
|
-
###
|
|
26
|
+
### Constructor
|
|
27
27
|
|
|
28
|
-
> **new NotFoundError**(`what`, `name
|
|
28
|
+
> **new NotFoundError**(`what`, `name?`): `NotFoundError`
|
|
29
29
|
|
|
30
30
|
Defined in: @isdk/ai-tools/node\_modules/.pnpm/@isdk+common-error@0.2.0/node\_modules/@isdk/common-error/dist/index.d.ts:138
|
|
31
31
|
|
|
@@ -41,11 +41,11 @@ Defined in: @isdk/ai-tools/node\_modules/.pnpm/@isdk+common-error@0.2.0/node\_mo
|
|
|
41
41
|
|
|
42
42
|
#### Returns
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
`NotFoundError`
|
|
45
45
|
|
|
46
46
|
#### Overrides
|
|
47
47
|
|
|
48
|
-
[`CommonError`](CommonError.md).[`constructor`](CommonError.md#
|
|
48
|
+
[`CommonError`](CommonError.md).[`constructor`](CommonError.md#constructor)
|
|
49
49
|
|
|
50
50
|
## Properties
|
|
51
51
|
|
|
@@ -111,7 +111,7 @@ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/ty
|
|
|
111
111
|
|
|
112
112
|
#### Inherited from
|
|
113
113
|
|
|
114
|
-
[`CommonError`](CommonError.md).[`message`](CommonError.md#message
|
|
114
|
+
[`CommonError`](CommonError.md).[`message`](CommonError.md#message)
|
|
115
115
|
|
|
116
116
|
***
|
|
117
117
|
|
|
@@ -123,7 +123,7 @@ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/ty
|
|
|
123
123
|
|
|
124
124
|
#### Inherited from
|
|
125
125
|
|
|
126
|
-
[`CommonError`](CommonError.md).[`name`](CommonError.md#name
|
|
126
|
+
[`CommonError`](CommonError.md).[`name`](CommonError.md#name)
|
|
127
127
|
|
|
128
128
|
***
|
|
129
129
|
|
|
@@ -219,7 +219,7 @@ A JSON representation of the error.
|
|
|
219
219
|
|
|
220
220
|
### captureStackTrace()
|
|
221
221
|
|
|
222
|
-
> `static` **captureStackTrace**(`targetObject`, `constructorOpt
|
|
222
|
+
> `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void`
|
|
223
223
|
|
|
224
224
|
Defined in: @isdk/ai-tools/node\_modules/.pnpm/@types+node@24.3.0/node\_modules/@types/node/globals.d.ts:146
|
|
225
225
|
|
|
@@ -325,7 +325,7 @@ Defined in: @isdk/ai-tools/node\_modules/.pnpm/@isdk+common-error@0.2.0/node\_mo
|
|
|
325
325
|
|
|
326
326
|
### createErrorClass()
|
|
327
327
|
|
|
328
|
-
> `static` **createErrorClass**(`aType`, `aErrorCode
|
|
328
|
+
> `static` **createErrorClass**(`aType`, `aErrorCode?`, `ParentErrorClass?`): *typeof* [`BaseError`](BaseError.md)
|
|
329
329
|
|
|
330
330
|
Defined in: @isdk/ai-tools/node\_modules/.pnpm/@isdk+common-error@0.2.0/node\_modules/@isdk/common-error/dist/index.d.ts:66
|
|
331
331
|
|
|
@@ -23,9 +23,9 @@ throw new NotImplementationError()
|
|
|
23
23
|
|
|
24
24
|
## Constructors
|
|
25
25
|
|
|
26
|
-
###
|
|
26
|
+
### Constructor
|
|
27
27
|
|
|
28
|
-
> **new NotImplementationError**(`msg
|
|
28
|
+
> **new NotImplementationError**(`msg?`, `name?`): `NotImplementationError`
|
|
29
29
|
|
|
30
30
|
Defined in: @isdk/ai-tools/node\_modules/.pnpm/@isdk+common-error@0.2.0/node\_modules/@isdk/common-error/dist/index.d.ts:125
|
|
31
31
|
|
|
@@ -41,11 +41,11 @@ Defined in: @isdk/ai-tools/node\_modules/.pnpm/@isdk+common-error@0.2.0/node\_mo
|
|
|
41
41
|
|
|
42
42
|
#### Returns
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
`NotImplementationError`
|
|
45
45
|
|
|
46
46
|
#### Overrides
|
|
47
47
|
|
|
48
|
-
[`CommonError`](CommonError.md).[`constructor`](CommonError.md#
|
|
48
|
+
[`CommonError`](CommonError.md).[`constructor`](CommonError.md#constructor)
|
|
49
49
|
|
|
50
50
|
## Properties
|
|
51
51
|
|
|
@@ -111,7 +111,7 @@ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/ty
|
|
|
111
111
|
|
|
112
112
|
#### Inherited from
|
|
113
113
|
|
|
114
|
-
[`CommonError`](CommonError.md).[`message`](CommonError.md#message
|
|
114
|
+
[`CommonError`](CommonError.md).[`message`](CommonError.md#message)
|
|
115
115
|
|
|
116
116
|
***
|
|
117
117
|
|
|
@@ -123,7 +123,7 @@ Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/ty
|
|
|
123
123
|
|
|
124
124
|
#### Inherited from
|
|
125
125
|
|
|
126
|
-
[`CommonError`](CommonError.md).[`name`](CommonError.md#name
|
|
126
|
+
[`CommonError`](CommonError.md).[`name`](CommonError.md#name)
|
|
127
127
|
|
|
128
128
|
***
|
|
129
129
|
|
|
@@ -219,7 +219,7 @@ A JSON representation of the error.
|
|
|
219
219
|
|
|
220
220
|
### captureStackTrace()
|
|
221
221
|
|
|
222
|
-
> `static` **captureStackTrace**(`targetObject`, `constructorOpt
|
|
222
|
+
> `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void`
|
|
223
223
|
|
|
224
224
|
Defined in: @isdk/ai-tools/node\_modules/.pnpm/@types+node@24.3.0/node\_modules/@types/node/globals.d.ts:146
|
|
225
225
|
|
|
@@ -325,7 +325,7 @@ Defined in: @isdk/ai-tools/node\_modules/.pnpm/@isdk+common-error@0.2.0/node\_mo
|
|
|
325
325
|
|
|
326
326
|
### createErrorClass()
|
|
327
327
|
|
|
328
|
-
> `static` **createErrorClass**(`aType`, `aErrorCode
|
|
328
|
+
> `static` **createErrorClass**(`aType`, `aErrorCode?`, `ParentErrorClass?`): *typeof* [`BaseError`](BaseError.md)
|
|
329
329
|
|
|
330
330
|
Defined in: @isdk/ai-tools/node\_modules/.pnpm/@isdk+common-error@0.2.0/node\_modules/@isdk/common-error/dist/index.d.ts:66
|
|
331
331
|
|