@isdk/ai-tool 0.6.0 → 0.7.1
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/README.cn.md +103 -237
- package/README.md +101 -186
- package/dist/chunk-4XRPAC7C.mjs +1 -0
- package/dist/chunk-VIG2GB47.mjs +1 -1
- package/dist/funcs.d.mts +1 -1
- package/dist/funcs.d.ts +1 -1
- package/dist/funcs.js +1 -1
- package/dist/funcs.mjs +1 -1
- package/dist/index-DEUnmyUq.d.mts +1792 -0
- package/dist/index-DEUnmyUq.d.ts +1792 -0
- package/dist/index.d.mts +1068 -9
- package/dist/index.d.ts +1068 -9
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/test/util.js +1 -1
- package/docs/api/README.md +165 -0
- package/docs/{_media → api/_media}/CONTRIBUTING.md +3 -3
- package/docs/api/_media/pubsub.md +326 -0
- package/docs/api/_media/server_client_tools.md +88 -0
- package/docs/api/_media/toolFunc.md +183 -0
- package/docs/api/_media/transport.md +137 -0
- package/docs/{classes → api/classes}/AbortError.md +139 -54
- package/docs/api/classes/AlreadyExistsError.md +431 -0
- package/docs/api/classes/BaseError.md +440 -0
- package/docs/{classes → api/classes}/BinarySemaphore.md +25 -25
- package/docs/{classes → api/classes}/CancelableAbility.md +25 -25
- package/docs/api/classes/ClientToolTransport.md +310 -0
- package/docs/{classes → api/classes}/ClientTools.md +646 -180
- package/docs/{classes → api/classes}/CommonError.md +139 -54
- package/docs/{classes → api/classes}/ConfigFile.md +54 -5
- package/docs/{classes → api/classes}/EnvPromptTemplate.md +94 -48
- package/docs/{classes → api/classes}/EventClient.md +742 -234
- package/docs/{classes → api/classes}/EventEmitter.md +12 -12
- package/docs/{classes → api/classes}/EventServer.md +670 -209
- package/docs/{classes → api/classes}/EventToolFunc.md +561 -109
- package/docs/{classes → api/classes}/FStringPromptTemplate.md +94 -48
- package/docs/{classes → api/classes}/FewShotPromptTemplate.md +100 -52
- package/docs/{classes → api/classes}/GolangPromptTemplate.md +99 -53
- package/docs/api/classes/HttpClientToolTransport.md +324 -0
- package/docs/api/classes/HttpServerToolTransport.md +332 -0
- package/docs/{classes → api/classes}/IntSet.md +12 -12
- package/docs/{classes → api/classes}/LRUCache.md +26 -26
- package/docs/api/classes/NotFoundError.md +431 -0
- package/docs/api/classes/NotImplementationError.md +431 -0
- package/docs/{classes → api/classes}/PromptExampleSelector.md +9 -9
- package/docs/{classes → api/classes}/PromptTemplate.md +91 -47
- package/docs/api/classes/ReadableStreamError.md +451 -0
- package/docs/api/classes/ResClientTools.md +3365 -0
- package/docs/api/classes/ResServerTools.md +3342 -0
- package/docs/api/classes/RpcMethodsClientTool.md +3275 -0
- package/docs/api/classes/RpcMethodsServerTool.md +3224 -0
- package/docs/api/classes/SSEChannel.md +272 -0
- package/docs/{classes → api/classes}/Semaphore.md +26 -26
- package/docs/api/classes/ServerToolTransport.md +323 -0
- package/docs/{classes → api/classes}/ServerTools.md +583 -120
- package/docs/{classes → api/classes}/SignalGate.md +9 -9
- package/docs/api/classes/SseClientPubSubTransport.md +92 -0
- package/docs/api/classes/SseServerPubSubTransport.md +234 -0
- package/docs/{classes → api/classes}/TaskAbortController.md +9 -9
- package/docs/api/classes/ToolFunc.md +2665 -0
- package/docs/api/classes/ToolTransport.md +143 -0
- package/docs/api/classes/YamlTypeBaseObject.md +31 -0
- package/docs/api/enumerations/AsyncFeatureBits.md +33 -0
- package/docs/api/enumerations/AsyncFeatures.md +33 -0
- package/docs/api/enumerations/ErrorCode.md +177 -0
- package/docs/api/enumerations/HashAlgorithm.md +97 -0
- package/docs/{functions → api/functions}/AIArgProcessor.md +1 -1
- package/docs/{functions → api/functions}/AIStream.md +1 -1
- package/docs/{functions → api/functions}/ChoiceArgProcessor.md +1 -1
- package/docs/api/functions/DefaultDateFormat.md +21 -0
- package/docs/{functions → api/functions}/ObjectArgsToArgsInfo.md +1 -1
- package/docs/{functions → api/functions}/RateLimit.md +1 -1
- package/docs/{functions → api/functions}/TemplateArgProcessor.md +1 -1
- package/docs/api/functions/addDate.md +71 -0
- package/docs/{functions → api/functions}/assignDirs.md +1 -1
- package/docs/{functions → api/functions}/backendEventable.md +1 -1
- package/docs/{functions → api/functions}/beforeShutdown.md +1 -1
- package/docs/api/functions/calcPerplexity.md +60 -0
- package/docs/api/functions/calcPerplexitySimple.md +42 -0
- package/docs/api/functions/canonicalize.md +33 -0
- package/docs/{functions → api/functions}/completeSentences.md +1 -1
- package/docs/{functions → api/functions}/concatText.md +1 -1
- package/docs/{functions → api/functions}/countLLMTokens.md +1 -1
- package/docs/{functions → api/functions}/countRegexMatches.md +1 -1
- package/docs/{functions → api/functions}/createAbilityInjector.md +4 -4
- package/docs/{functions → api/functions}/createCallbacksTransformer.md +1 -1
- package/docs/{functions → api/functions}/createEmptyReadableStream.md +1 -1
- package/docs/{functions → api/functions}/createEndWithRepetitionDetector.md +1 -1
- package/docs/{functions → api/functions}/createError.md +1 -1
- package/docs/{functions → api/functions}/createEventStreamTransformer.md +1 -1
- package/docs/{functions → api/functions}/createHfValueFunc.md +1 -1
- package/docs/{functions → api/functions}/createLRUCache.md +1 -1
- package/docs/{functions → api/functions}/createYamlObjectTag.md +1 -1
- package/docs/{functions → api/functions}/dateToText.md +1 -1
- package/docs/{functions → api/functions}/decodeCharset.md +1 -1
- package/docs/api/functions/defaultsWithConcat.md +74 -0
- package/docs/{functions → api/functions}/detectCharset.md +1 -1
- package/docs/{functions → api/functions}/encodeLLMTokens.md +1 -1
- package/docs/{functions → api/functions}/ensureQuoted.md +1 -1
- package/docs/{functions → api/functions}/eventable.md +1 -1
- package/docs/{functions → api/functions}/expandConfig.md +1 -1
- package/docs/{functions → api/functions}/expandEnv.md +1 -1
- package/docs/{functions → api/functions}/expandObjEnv.md +1 -1
- package/docs/{functions → api/functions}/expandPath.md +1 -1
- package/docs/api/functions/expandPathInObject.md +29 -0
- package/docs/api/functions/expandPaths.md +25 -0
- package/docs/{functions → api/functions}/extNameLevel.md +1 -1
- package/docs/{functions → api/functions}/fileIsExists.md +1 -1
- package/docs/{functions → api/functions}/filterValidFnScope.md +1 -1
- package/docs/{functions → api/functions}/findIndexNonEmptyFrom.md +1 -1
- package/docs/{functions → api/functions}/findPort.md +1 -1
- package/docs/{functions → api/functions}/formatISO.md +1 -1
- package/docs/{functions → api/functions}/formatTextWithSpace.md +1 -1
- package/docs/api/functions/funcGetMeta.md +27 -0
- package/docs/api/functions/funcWithMeta.md +41 -0
- package/docs/api/functions/genUrlParamsStr.md +27 -0
- package/docs/{functions → api/functions}/getAllEnumKeys.md +1 -1
- package/docs/{functions → api/functions}/getConfigFileNames.md +1 -1
- package/docs/{functions → api/functions}/getConfigs.md +1 -1
- package/docs/{functions → api/functions}/getEnvVairables.md +1 -1
- package/docs/{functions → api/functions}/getFileMetaInfo.md +1 -1
- package/docs/{functions → api/functions}/getHashAlgoBySize.md +1 -1
- package/docs/{functions → api/functions}/getKeysPath.md +1 -1
- package/docs/{functions → api/functions}/getLLMTokenizer.md +1 -1
- package/docs/{functions → api/functions}/getMultiLevelExtname.md +1 -1
- package/docs/{functions → api/functions}/getPackageDir.md +1 -1
- package/docs/{functions → api/functions}/getRealFilepath.md +1 -1
- package/docs/{functions → api/functions}/getResponseErrorReadableStream.md +1 -1
- package/docs/{functions → api/functions}/getXDGConfigs.md +1 -1
- package/docs/{functions → api/functions}/hasDirectoryIn.md +1 -1
- package/docs/{functions → api/functions}/hash.md +1 -1
- package/docs/{functions → api/functions}/hashFile.md +1 -1
- package/docs/api/functions/hashObject.md +25 -0
- package/docs/{functions → api/functions}/hashStream.md +1 -1
- package/docs/api/functions/initShutdown.md +15 -0
- package/docs/{functions → api/functions}/isLangUsingSpaces.md +1 -1
- package/docs/{functions → api/functions}/isListItemString.md +1 -1
- package/docs/{functions → api/functions}/isModelNameMatched.md +1 -1
- package/docs/{functions → api/functions}/isPunctuationChar.md +1 -1
- package/docs/{functions → api/functions}/isQuoted.md +1 -1
- package/docs/{functions → api/functions}/isRegExp.md +1 -1
- package/docs/{functions → api/functions}/isSameString.md +1 -1
- package/docs/{functions → api/functions}/isSectionString.md +1 -1
- package/docs/{functions → api/functions}/isSentenceEnding.md +1 -1
- package/docs/{functions → api/functions}/isSepLineString.md +1 -1
- package/docs/{functions → api/functions}/isStrWrapped.md +1 -1
- package/docs/{functions → api/functions}/isSubdirectory.md +2 -2
- package/docs/{functions → api/functions}/isTitleString.md +1 -1
- package/docs/{functions → api/functions}/isValidFilename.md +1 -1
- package/docs/{functions → api/functions}/isValidFilepath.md +1 -1
- package/docs/{functions → api/functions}/isWebStream.md +1 -1
- package/docs/api/functions/joinSplitWords.md +46 -0
- package/docs/{functions → api/functions}/jsonFilterToWhere.md +1 -1
- package/docs/{functions → api/functions}/jsonToMarkdownStr.md +9 -1
- package/docs/{functions → api/functions}/loadAIConfig.md +1 -1
- package/docs/{functions → api/functions}/loadConfig.md +1 -1
- package/docs/{functions → api/functions}/loadConfigFile.md +1 -1
- package/docs/{functions → api/functions}/loadFileFromPaths.md +1 -1
- package/docs/{functions → api/functions}/loadTextFromPaths.md +1 -1
- package/docs/{functions → api/functions}/lrucache.md +1 -1
- package/docs/{functions → api/functions}/makeToolFuncCancelable.md +1 -1
- package/docs/{functions → api/functions}/matchUrlProtocol.md +1 -1
- package/docs/{functions → api/functions}/memoize.md +1 -1
- package/docs/api/functions/mergeArray.md +57 -0
- package/docs/{functions → api/functions}/messagesToText.md +1 -1
- package/docs/api/functions/normalizePath.md +21 -0
- package/docs/{functions → api/functions}/paramsSizeToScaleStr.md +1 -1
- package/docs/{functions → api/functions}/parseCommand.md +1 -1
- package/docs/{functions → api/functions}/parseDateFormat.md +1 -1
- package/docs/{functions → api/functions}/parseISO.md +1 -1
- package/docs/{functions → api/functions}/parseJsJson.md +1 -1
- package/docs/{functions → api/functions}/parseJsJsonSimpleSync.md +1 -1
- package/docs/{functions → api/functions}/parseObjectArgInfo.md +1 -1
- package/docs/{functions → api/functions}/parseObjectArgumentInfos.md +1 -1
- package/docs/{functions → api/functions}/parseObjectArguments.md +1 -1
- package/docs/{functions → api/functions}/parseObjectArgumentsAsArgInfos.md +1 -1
- package/docs/{functions → api/functions}/parseYaml.md +1 -1
- package/docs/api/functions/pruneSubdirectories.md +35 -0
- package/docs/api/functions/pruneSubdirectoriesInPlace.md +38 -0
- package/docs/{functions → api/functions}/quoteStr.md +1 -1
- package/docs/{functions → api/functions}/readFilenamesRecursiveSync.md +1 -1
- package/docs/{functions → api/functions}/readTextFileChunks.md +1 -1
- package/docs/{functions → api/functions}/readTextFileChunksEx.md +1 -1
- package/docs/{functions → api/functions}/readableFromAsyncIterable.md +1 -1
- package/docs/{functions → api/functions}/registerCoreTools.md +1 -1
- package/docs/{functions → api/functions}/registerYamlTag.md +1 -1
- package/docs/{functions → api/functions}/removeMarkdownBold.md +1 -1
- package/docs/{functions → api/functions}/removeMarkdownBoldAndItalic.md +1 -1
- package/docs/{functions → api/functions}/removeMarkdownItalic.md +1 -1
- package/docs/{functions → api/functions}/replaceWithPlaceholder.md +1 -1
- package/docs/{functions → api/functions}/restoreFromPlacehoders.md +1 -1
- package/docs/{functions → api/functions}/sanitizeFilename.md +1 -1
- package/docs/{functions → api/functions}/sanitizeFilepath.md +1 -1
- package/docs/{functions → api/functions}/saveConfigFile.md +1 -1
- package/docs/{functions → api/functions}/scaleStrToParamsSize.md +1 -1
- package/docs/{functions → api/functions}/shutdown.md +1 -1
- package/docs/{functions → api/functions}/simplifyObjectArguments.md +1 -1
- package/docs/api/functions/sleep.md +36 -0
- package/docs/{functions → api/functions}/sortedValues.md +1 -1
- package/docs/{functions → api/functions}/splitChunks.md +1 -1
- package/docs/{functions → api/functions}/splitParagraph.md +1 -1
- package/docs/{functions → api/functions}/splitSentence.md +1 -1
- package/docs/api/functions/splitWords.md +42 -0
- package/docs/{functions → api/functions}/stringifyYaml.md +1 -1
- package/docs/{functions → api/functions}/stripConsoleColor.md +1 -1
- package/docs/{functions → api/functions}/textToDate.md +1 -1
- package/docs/{functions → api/functions}/throwError.md +3 -3
- package/docs/{functions → api/functions}/toDate.md +1 -1
- package/docs/{functions → api/functions}/toDateTime.md +1 -1
- package/docs/{functions → api/functions}/toRegExp.md +1 -1
- package/docs/{functions → api/functions}/trimStartOfStreamHelper.md +1 -1
- package/docs/{functions → api/functions}/truncTo.md +1 -1
- package/docs/{functions → api/functions}/truncateByToken.md +1 -1
- package/docs/{functions → api/functions}/truncateToTokenLimit.md +1 -1
- package/docs/{functions → api/functions}/truncateToTokenLimitEx.md +1 -1
- package/docs/{functions → api/functions}/uuid.md +1 -1
- package/docs/{functions → api/functions}/uuidParse.md +1 -1
- package/docs/{functions → api/functions}/uuidStringify.md +1 -1
- package/docs/{functions → api/functions}/uuidValidate.md +1 -1
- package/docs/{functions → api/functions}/uuidVersion.md +1 -1
- package/docs/{functions → api/functions}/uuidv1.md +9 -5
- package/docs/{functions → api/functions}/uuidv4.md +9 -5
- package/docs/{functions → api/functions}/uuidv5.md +9 -5
- package/docs/api/functions/wait.md +45 -0
- package/docs/{functions → api/functions}/wrapEventEmitter.md +1 -1
- package/docs/{functions → api/functions}/xxhash.md +1 -1
- package/docs/{functions → api/functions}/xxhash32.md +1 -1
- package/docs/{functions → api/functions}/xxhash64.md +1 -1
- package/docs/{functions → api/functions}/xxhashAsStr.md +1 -1
- package/docs/api/functions/yieldExec.md +27 -0
- package/docs/{globals.md → api/globals.md} +50 -1
- package/docs/api/interfaces/AIChatAssistantMessageParam.md +129 -0
- package/docs/api/interfaces/AIChatContentPartImage.md +29 -0
- package/docs/api/interfaces/AIChatContentPartText.md +25 -0
- package/docs/api/interfaces/AIChatMessageParamBase.md +68 -0
- package/docs/api/interfaces/AIChatMessageToolCall.md +41 -0
- package/docs/{interfaces → api/interfaces}/AIChatSystemMessageParam.md +9 -9
- package/docs/api/interfaces/AIChatToolChoiceFuncObject.md +37 -0
- package/docs/api/interfaces/AIChatToolChoiceObject.md +25 -0
- package/docs/api/interfaces/AIChatToolFunc.md +41 -0
- package/docs/api/interfaces/AIChatToolFuncParam.md +37 -0
- package/docs/api/interfaces/AIChatToolMessageParam.md +113 -0
- package/docs/api/interfaces/AIChatToolParam.md +25 -0
- package/docs/api/interfaces/AIChatToolTypeObject.md +17 -0
- package/docs/api/interfaces/AIChatUserMessageParam.md +137 -0
- package/docs/api/interfaces/AIChoiceConfig.md +65 -0
- package/docs/api/interfaces/AIResult.md +65 -0
- package/docs/{interfaces → api/interfaces}/AIStreamParser.md +2 -2
- package/docs/api/interfaces/AIStreamParserOptions.md +21 -0
- package/docs/api/interfaces/BaseFunc.md +299 -0
- package/docs/api/interfaces/BaseFuncItem.md +221 -0
- package/docs/api/interfaces/BinarySemaphoreAcquireOptions.md +25 -0
- package/docs/api/interfaces/BinarySemaphoreOptions.md +57 -0
- package/docs/api/interfaces/BinarySemaphoreReleaseOptions.md +25 -0
- package/docs/api/interfaces/BinarySemaphoreReleaserFunc.md +37 -0
- package/docs/api/interfaces/CancelableAbilityOptions.md +113 -0
- package/docs/api/interfaces/ClientFuncItem.md +326 -0
- package/docs/api/interfaces/EventClientFuncParams.md +51 -0
- package/docs/api/interfaces/EventServerFuncParams.md +73 -0
- package/docs/{interfaces → api/interfaces}/FewShotPromptTemplateOptions.md +24 -12
- package/docs/api/interfaces/FuncItem.md +281 -0
- package/docs/api/interfaces/FuncParam.md +51 -0
- package/docs/api/interfaces/FuncParams.md +28 -0
- package/docs/api/interfaces/Funcs.md +15 -0
- package/docs/api/interfaces/HashAlgoParams.md +33 -0
- package/docs/api/interfaces/IClientToolTransport.md +155 -0
- package/docs/api/interfaces/IFileMetaInfo.md +65 -0
- package/docs/api/interfaces/IPubSubClientTransport.md +70 -0
- package/docs/api/interfaces/IPubSubServerTransport.md +241 -0
- package/docs/api/interfaces/IReadTextFileChunksOptions.md +143 -0
- package/docs/api/interfaces/IServerToolTransport.md +159 -0
- package/docs/api/interfaces/IToolTransport.md +73 -0
- package/docs/api/interfaces/ITruncateToTokenLimitOptions.md +99 -0
- package/docs/api/interfaces/JsonFilter.md +13 -0
- package/docs/api/interfaces/ParseObjectArgumentOptions.md +89 -0
- package/docs/api/interfaces/ProbabilityItem.md +41 -0
- package/docs/api/interfaces/PromptExampleSelectorOptions.md +34 -0
- package/docs/{interfaces → api/interfaces}/PromptTemplateOptions.md +15 -7
- package/docs/api/interfaces/PubSubClient.md +27 -0
- package/docs/api/interfaces/PubSubClientStream.md +196 -0
- package/docs/api/interfaces/PubSubServerSession.md +103 -0
- package/docs/api/interfaces/RemoteFuncItem.md +316 -0
- package/docs/api/interfaces/ReplacePlacehoderOptions.md +41 -0
- package/docs/api/interfaces/ResClientFuncParams.md +37 -0
- package/docs/api/interfaces/ResServerFuncParams.md +77 -0
- package/docs/api/interfaces/RpcMethodsClientFuncParams.md +25 -0
- package/docs/api/interfaces/RpcMethodsServerFuncParams.md +61 -0
- package/docs/api/interfaces/SanitizeFilenameOptions.md +25 -0
- package/docs/api/interfaces/SectionStringOptions.md +25 -0
- package/docs/api/interfaces/SemaphoreOptions.md +89 -0
- package/docs/api/interfaces/SemaphoreTaskItem.md +73 -0
- package/docs/api/interfaces/ServerFuncItem.md +339 -0
- package/docs/api/interfaces/ServerFuncParams.md +42 -0
- package/docs/api/interfaces/SplitSentenceOptions.md +41 -0
- package/docs/{interfaces → api/interfaces}/StreamCallbacksAndOptions.md +5 -5
- package/docs/{interfaces → api/interfaces}/TaskAbortControllers.md +1 -1
- package/docs/{interfaces → api/interfaces}/TaskPromise.md +6 -6
- package/docs/api/interfaces/ToolFuncPackage.md +57 -0
- package/docs/{namespaces → api/namespaces}/EventStates/variables/ABORT.md +1 -1
- package/docs/{namespaces → api/namespaces}/EventStates/variables/CONTINUE.md +1 -1
- package/docs/{namespaces → api/namespaces}/EventStates/variables/DONE.md +1 -1
- package/docs/{namespaces → api/namespaces}/EventStates/variables/STOPPED.md +1 -1
- package/docs/{namespaces → api/namespaces}/uuidv5/variables/DNS.md +1 -1
- package/docs/{namespaces → api/namespaces}/uuidv5/variables/URL.md +1 -1
- package/docs/{type-aliases → api/type-aliases}/AIChatContentPart.md +1 -1
- package/docs/{type-aliases → api/type-aliases}/AIChatMessageParam.md +1 -1
- package/docs/{type-aliases → api/type-aliases}/AIChatRole.md +1 -1
- package/docs/{type-aliases → api/type-aliases}/AIChatToolChoiceParam.md +1 -1
- package/docs/{type-aliases → api/type-aliases}/AIMessageType.md +1 -1
- package/docs/api/type-aliases/AIModelNameRule.md +14 -0
- package/docs/api/type-aliases/AIModelNameRuleFn.md +28 -0
- package/docs/api/type-aliases/AIModelNameRules.md +13 -0
- package/docs/{type-aliases → api/type-aliases}/AITextGenerationFinishReason.md +1 -1
- package/docs/api/type-aliases/ActionName.md +13 -0
- package/docs/api/type-aliases/ArrayMergeWay.md +11 -0
- package/docs/api/type-aliases/AsyncTaskId.md +11 -0
- package/docs/{type-aliases → api/type-aliases}/BeforeShutdownListener.md +1 -1
- package/docs/{type-aliases → api/type-aliases}/EventErrorListenerFn.md +1 -1
- package/docs/{type-aliases → api/type-aliases}/EventListenerFn.md +1 -1
- package/docs/api/type-aliases/FuncParamType.md +13 -0
- package/docs/{type-aliases → api/type-aliases}/PromptExamples.md +1 -1
- package/docs/api/type-aliases/PubSubClientId.md +14 -0
- package/docs/api/type-aliases/PubSubCtx.md +37 -0
- package/docs/api/type-aliases/RpcMethodHandler.md +34 -0
- package/docs/{type-aliases → api/type-aliases}/SemaphoreIsReadyFuncType.md +1 -1
- package/docs/api/type-aliases/TFunc.md +33 -0
- package/docs/{variables → api/variables}/AIChatRoles.md +1 -1
- package/docs/{variables → api/variables}/AIMessageTypes.md +1 -1
- package/docs/{variables → api/variables}/AITextGenerationFinishReasons.md +1 -1
- package/docs/{variables → api/variables}/AbortErrorCode.md +1 -1
- package/docs/api/variables/ActionNames.md +13 -0
- package/docs/{variables → api/variables}/AlreadyExistsErrorCode.md +1 -1
- package/docs/api/variables/ArrayMergeWay.md +25 -0
- package/docs/api/variables/ArrayMergeWaySymbol.md +11 -0
- package/docs/api/variables/ClientToolFuncSchema.md +83 -0
- package/docs/{variables → api/variables}/DEFAULT_CONFIG_NAME.md +1 -1
- package/docs/{variables → api/variables}/DefaultAsyncSemaphoreCapacity.md +1 -1
- package/docs/api/variables/EventBusName.md +11 -0
- package/docs/api/variables/EventName.md +11 -0
- package/docs/{variables → api/variables}/FilenameReservedRegex.md +1 -1
- package/docs/api/variables/FuncMetaSymbol.md +15 -0
- package/docs/{variables → api/variables}/InternalErrorCode.md +1 -1
- package/docs/{variables → api/variables}/LLM_TOKENIZER_NAMES.md +1 -1
- package/docs/{variables → api/variables}/LLM_TOKENIZER_NAMES_MAP.md +1 -1
- package/docs/{variables → api/variables}/NotFoundErrorCode.md +1 -1
- package/docs/{variables → api/variables}/NotImplementedErrorCode.md +1 -1
- package/docs/api/variables/PASSING_SCORE.md +13 -0
- package/docs/api/variables/RStreamErrCode.md +11 -0
- package/docs/api/variables/RemoteToolFuncSchema.md +84 -0
- package/docs/api/variables/ResponseRStreamErrCode.md +11 -0
- package/docs/api/variables/RpcMethodsClientToolSchema.md +49 -0
- package/docs/api/variables/RpcMethodsServerToolSchema.md +21 -0
- package/docs/{variables → api/variables}/SHUTDOWN_SIGNALS.md +1 -1
- package/docs/{variables → api/variables}/SSEChannelAlreadyClosedErrCode.md +1 -1
- package/docs/api/variables/SecondaryCache.md +11 -0
- package/docs/api/variables/ServerToolFuncSchema.md +83 -0
- package/docs/api/variables/StrangeHumanName.md +11 -0
- package/docs/api/variables/ToolAsyncCancelableBit.md +11 -0
- package/docs/api/variables/ToolAsyncMultiTaskBit.md +11 -0
- package/docs/api/variables/ToolAsyncPriorityBit.md +11 -0
- package/docs/{variables → api/variables}/ToolFuncSchema.md +14 -1
- package/docs/{variables → api/variables}/WindowsReservedNameRegex.md +1 -1
- package/docs/api/variables/base32768.md +11 -0
- package/docs/{variables → api/variables}/defaultTemplateFormat.md +1 -1
- package/docs/api/variables/event.md +11 -0
- package/docs/api/variables/eventClient.md +11 -0
- package/docs/api/variables/eventServer.md +11 -0
- package/docs/api/variables/lrucache.md +11 -0
- package/docs/{variables → api/variables}/mimeType.md +1 -1
- package/docs/{variables → api/variables}/uuidNIL.md +1 -1
- package/docs/pubsub.md +326 -0
- package/docs/server_client_tools.md +88 -0
- package/docs/toolFunc.md +183 -0
- package/docs/transport.md +137 -0
- package/package.json +37 -39
- package/dist/chunk-OYDBRUZJ.mjs +0 -1
- package/dist/index-BkwhCK1q.d.mts +0 -899
- package/dist/index-BkwhCK1q.d.ts +0 -899
- package/docs/README.md +0 -250
- package/docs/classes/AlreadyExistsError.md +0 -346
- package/docs/classes/BaseError.md +0 -359
- package/docs/classes/NotFoundError.md +0 -346
- package/docs/classes/NotImplementationError.md +0 -346
- package/docs/classes/ReadableStreamError.md +0 -366
- package/docs/classes/ResClientTools.md +0 -2451
- package/docs/classes/ResServerTools.md +0 -2427
- package/docs/classes/SSEChannel.md +0 -270
- package/docs/classes/ToolFunc.md +0 -2201
- package/docs/classes/YamlTypeBaseObject.md +0 -31
- package/docs/enumerations/AsyncFeatureBits.md +0 -33
- package/docs/enumerations/AsyncFeatures.md +0 -33
- package/docs/enumerations/ErrorCode.md +0 -177
- package/docs/enumerations/HashAlgorithm.md +0 -97
- package/docs/functions/canonicalize.md +0 -21
- package/docs/functions/initShutdown.md +0 -15
- package/docs/functions/wait.md +0 -21
- package/docs/interfaces/AIChatAssistantMessageParam.md +0 -129
- package/docs/interfaces/AIChatContentPartImage.md +0 -29
- package/docs/interfaces/AIChatContentPartText.md +0 -25
- package/docs/interfaces/AIChatMessageParamBase.md +0 -68
- package/docs/interfaces/AIChatMessageToolCall.md +0 -41
- package/docs/interfaces/AIChatToolChoiceFuncObject.md +0 -37
- package/docs/interfaces/AIChatToolChoiceObject.md +0 -25
- package/docs/interfaces/AIChatToolFunc.md +0 -41
- package/docs/interfaces/AIChatToolFuncParam.md +0 -37
- package/docs/interfaces/AIChatToolMessageParam.md +0 -113
- package/docs/interfaces/AIChatToolParam.md +0 -25
- package/docs/interfaces/AIChatToolTypeObject.md +0 -17
- package/docs/interfaces/AIChatUserMessageParam.md +0 -137
- package/docs/interfaces/AIChoiceConfig.md +0 -65
- package/docs/interfaces/AIResult.md +0 -65
- package/docs/interfaces/AIStreamParserOptions.md +0 -21
- package/docs/interfaces/BaseFunc.md +0 -157
- package/docs/interfaces/BaseFuncItem.md +0 -101
- package/docs/interfaces/BinarySemaphoreAcquireOptions.md +0 -25
- package/docs/interfaces/BinarySemaphoreOptions.md +0 -57
- package/docs/interfaces/BinarySemaphoreReleaseOptions.md +0 -25
- package/docs/interfaces/BinarySemaphoreReleaserFunc.md +0 -37
- package/docs/interfaces/CancelableAbilityOptions.md +0 -113
- package/docs/interfaces/ClientFuncItem.md +0 -175
- package/docs/interfaces/EventClientFuncParams.md +0 -51
- package/docs/interfaces/EventServerFuncParams.md +0 -67
- package/docs/interfaces/FuncItem.md +0 -143
- package/docs/interfaces/FuncParam.md +0 -61
- package/docs/interfaces/FuncParams.md +0 -13
- package/docs/interfaces/Funcs.md +0 -13
- package/docs/interfaces/HashAlgoParams.md +0 -33
- package/docs/interfaces/IFileMetaInfo.md +0 -65
- package/docs/interfaces/IReadTextFileChunksOptions.md +0 -143
- package/docs/interfaces/ITruncateToTokenLimitOptions.md +0 -99
- package/docs/interfaces/JsonFilter.md +0 -13
- package/docs/interfaces/ParseObjectArgumentOptions.md +0 -89
- package/docs/interfaces/PromptExampleSelectorOptions.md +0 -34
- package/docs/interfaces/RemoteFuncItem.md +0 -164
- package/docs/interfaces/ReplacePlacehoderOptions.md +0 -41
- package/docs/interfaces/ResClientFuncParams.md +0 -37
- package/docs/interfaces/ResServerFuncParams.md +0 -69
- package/docs/interfaces/SanitizeFilenameOptions.md +0 -25
- package/docs/interfaces/SectionStringOptions.md +0 -25
- package/docs/interfaces/SemaphoreOptions.md +0 -89
- package/docs/interfaces/SemaphoreTaskItem.md +0 -73
- package/docs/interfaces/ServerFuncItem.md +0 -183
- package/docs/interfaces/ServerFuncParams.md +0 -35
- package/docs/interfaces/SplitSentenceOptions.md +0 -41
- package/docs/interfaces/ToolFuncPackage.md +0 -47
- package/docs/type-aliases/AIModelNameRule.md +0 -11
- package/docs/type-aliases/AIModelNameRuleFn.md +0 -21
- package/docs/type-aliases/AIModelNameRules.md +0 -11
- package/docs/type-aliases/ActionName.md +0 -11
- package/docs/type-aliases/AsyncTaskId.md +0 -11
- package/docs/type-aliases/FuncParamType.md +0 -11
- package/docs/type-aliases/TFunc.md +0 -25
- package/docs/variables/ActionNames.md +0 -11
- package/docs/variables/ClientToolFuncSchema.md +0 -101
- package/docs/variables/EventBusName.md +0 -11
- package/docs/variables/EventName.md +0 -11
- package/docs/variables/PASSING_SCORE.md +0 -11
- package/docs/variables/RStreamErrCode.md +0 -11
- package/docs/variables/RemoteToolFuncSchema.md +0 -101
- package/docs/variables/ResponseRStreamErrCode.md +0 -11
- package/docs/variables/SecondaryCache.md +0 -11
- package/docs/variables/ServerToolFuncSchema.md +0 -101
- package/docs/variables/ToolAsyncCancelableBit.md +0 -11
- package/docs/variables/ToolAsyncMultiTaskBit.md +0 -11
- package/docs/variables/ToolAsyncPriorityBit.md +0 -11
- package/docs/variables/base32768.md +0 -11
- package/docs/variables/event.md +0 -11
- package/docs/variables/eventClient.md +0 -11
- package/docs/variables/eventServer.md +0 -11
- package/docs/variables/lrucache.md +0 -11
- /package/docs/{_media → api/_media}/LICENSE-MIT +0 -0
- /package/docs/{namespaces → api/namespaces}/EventStates/README.md +0 -0
- /package/docs/{namespaces → api/namespaces}/uuidv5/README.md +0 -0
|
@@ -6,7 +6,13 @@
|
|
|
6
6
|
|
|
7
7
|
# Class: EventServer
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/ai-tool/src/funcs/event-server.ts:
|
|
9
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-server.ts:20](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/funcs/event-server.ts#L20)
|
|
10
|
+
|
|
11
|
+
Represents a function that runs on a server and can be exposed to clients.
|
|
12
|
+
|
|
13
|
+
`ServerTools` extends `ToolFunc` by adding logic for serialization and handling
|
|
14
|
+
server-side execution contexts. It is designed to work with a transport layer
|
|
15
|
+
(see `transports`) to expose its registered functions over a network.
|
|
10
16
|
|
|
11
17
|
## Extends
|
|
12
18
|
|
|
@@ -22,7 +28,7 @@ Defined in: [packages/ai-tool/src/funcs/event-server.ts:18](https://github.com/i
|
|
|
22
28
|
|
|
23
29
|
> **new EventServer**(`name`, `options`): [`EventServer`](EventServer.md)
|
|
24
30
|
|
|
25
|
-
Defined in: [packages/ai-tool/src/res-server-tools.ts:27](https://github.com/isdk/ai-tool.js/blob/
|
|
31
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-server-tools.ts:27](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/res-server-tools.ts#L27)
|
|
26
32
|
|
|
27
33
|
The initial value of Object.prototype.constructor is the standard built-in Object constructor.
|
|
28
34
|
|
|
@@ -50,7 +56,7 @@ The initial value of Object.prototype.constructor is the standard built-in Objec
|
|
|
50
56
|
|
|
51
57
|
> **$attributes**: `Properties`
|
|
52
58
|
|
|
53
|
-
Defined in:
|
|
59
|
+
Defined in: [property-manager.js/src/advance.d.ts:5](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/advance.d.ts#L5)
|
|
54
60
|
|
|
55
61
|
#### Inherited from
|
|
56
62
|
|
|
@@ -62,7 +68,10 @@ Defined in: node\_modules/.pnpm/property-manager@2.0.0/node\_modules/property-ma
|
|
|
62
68
|
|
|
63
69
|
> **action**: `"get"` \| `"post"` \| `"put"` \| `"delete"` \| `"patch"` \| `"list"` \| `"res"` = `'res'`
|
|
64
70
|
|
|
65
|
-
Defined in: [packages/ai-tool/src/res-server-tools.ts:21](https://github.com/isdk/ai-tool.js/blob/
|
|
71
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-server-tools.ts:21](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/res-server-tools.ts#L21)
|
|
72
|
+
|
|
73
|
+
The action to be used for the remote call. This typically represents an RPC method name.
|
|
74
|
+
Only for RESTful HTTP transports, it might be mapped to a standard HTTP method (e.g., GET, POST)
|
|
66
75
|
|
|
67
76
|
#### Inherited from
|
|
68
77
|
|
|
@@ -74,7 +83,9 @@ Defined in: [packages/ai-tool/src/res-server-tools.ts:21](https://github.com/isd
|
|
|
74
83
|
|
|
75
84
|
> `optional` **alias**: `string` \| `string`[]
|
|
76
85
|
|
|
77
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
86
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:130](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L130)
|
|
87
|
+
|
|
88
|
+
Optional aliases for the function name.
|
|
78
89
|
|
|
79
90
|
#### Inherited from
|
|
80
91
|
|
|
@@ -86,7 +97,11 @@ Defined in: [packages/ai-tool/src/tool-func.ts:31](https://github.com/isdk/ai-to
|
|
|
86
97
|
|
|
87
98
|
> `optional` **allowExportFunc**: `boolean`
|
|
88
99
|
|
|
89
|
-
Defined in: [packages/ai-tool/src/server-tools.ts:
|
|
100
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/server-tools.ts:35](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/server-tools.ts#L35)
|
|
101
|
+
|
|
102
|
+
If set to true, the body of the function (`func`) will be serialized and sent
|
|
103
|
+
to the client when tools are loaded. This allows the client to execute the
|
|
104
|
+
function locally instead of making a remote call. Defaults to false.
|
|
90
105
|
|
|
91
106
|
#### Inherited from
|
|
92
107
|
|
|
@@ -94,11 +109,17 @@ Defined in: [packages/ai-tool/src/server-tools.ts:14](https://github.com/isdk/ai
|
|
|
94
109
|
|
|
95
110
|
***
|
|
96
111
|
|
|
97
|
-
### apiRoot
|
|
112
|
+
### ~~apiRoot?~~
|
|
98
113
|
|
|
99
114
|
> `optional` **apiRoot**: `string`
|
|
100
115
|
|
|
101
|
-
Defined in: [packages/ai-tool/src/utils/consts.ts:
|
|
116
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/consts.ts:89](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/utils/consts.ts#L89)
|
|
117
|
+
|
|
118
|
+
The root endpoint for the remote service.
|
|
119
|
+
|
|
120
|
+
#### Deprecated
|
|
121
|
+
|
|
122
|
+
Use `transport` instead.
|
|
102
123
|
|
|
103
124
|
#### Inherited from
|
|
104
125
|
|
|
@@ -106,11 +127,41 @@ Defined in: [packages/ai-tool/src/utils/consts.ts:34](https://github.com/isdk/ai
|
|
|
106
127
|
|
|
107
128
|
***
|
|
108
129
|
|
|
130
|
+
### asyncFeatures?
|
|
131
|
+
|
|
132
|
+
> `optional` **asyncFeatures**: `number`
|
|
133
|
+
|
|
134
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:144](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L144)
|
|
135
|
+
|
|
136
|
+
A bitmask representing asynchronous features supported by the function, built from `AsyncFeatureBits`.
|
|
137
|
+
This allows the system to understand if a function supports capabilities like cancellation or multi-tasking.
|
|
138
|
+
|
|
139
|
+
#### See
|
|
140
|
+
|
|
141
|
+
AsyncFeatureBits from `@src/utils/cancelable-ability.ts`
|
|
142
|
+
|
|
143
|
+
#### Example
|
|
144
|
+
|
|
145
|
+
```ts
|
|
146
|
+
import { AsyncFeatures } from './utils';
|
|
147
|
+
const func = new ToolFunc({
|
|
148
|
+
name: 'cancellableTask',
|
|
149
|
+
asyncFeatures: AsyncFeatures.Cancelable | AsyncFeatures.MultiTask,
|
|
150
|
+
// ...
|
|
151
|
+
});
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
#### Inherited from
|
|
155
|
+
|
|
156
|
+
[`ResServerTools`](ResServerTools.md).[`asyncFeatures`](ResServerTools.md#asyncfeatures)
|
|
157
|
+
|
|
158
|
+
***
|
|
159
|
+
|
|
109
160
|
### constructor
|
|
110
161
|
|
|
111
162
|
> **constructor**: `Function`
|
|
112
163
|
|
|
113
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:125
|
|
164
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:125
|
|
114
165
|
|
|
115
166
|
The initial value of Object.prototype.constructor is the standard built-in Object constructor.
|
|
116
167
|
|
|
@@ -124,7 +175,7 @@ The initial value of Object.prototype.constructor is the standard built-in Objec
|
|
|
124
175
|
|
|
125
176
|
> **defaultOptions**: `object`
|
|
126
177
|
|
|
127
|
-
Defined in:
|
|
178
|
+
Defined in: [property-manager.js/src/abstract.d.ts:74](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L74)
|
|
128
179
|
|
|
129
180
|
The default options for export and assign
|
|
130
181
|
|
|
@@ -146,27 +197,66 @@ The default options for export and assign
|
|
|
146
197
|
|
|
147
198
|
> **depends**: `object`
|
|
148
199
|
|
|
149
|
-
Defined in: [packages/ai-tool/src/funcs/event-server.ts:
|
|
200
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-server.ts:37](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/funcs/event-server.ts#L37)
|
|
201
|
+
|
|
202
|
+
A map of dependencies this function has on other tool functions.
|
|
203
|
+
Declaring dependencies ensures that they are automatically registered when this function is registered.
|
|
204
|
+
This is crucial for building modular functions that rely on each other without needing to manage registration order manually.
|
|
150
205
|
|
|
151
206
|
#### event-bus
|
|
152
207
|
|
|
153
208
|
> **event-bus**: [`EventToolFunc`](EventToolFunc.md) = `event`
|
|
154
209
|
|
|
210
|
+
#### Example
|
|
211
|
+
|
|
212
|
+
```ts
|
|
213
|
+
const helperFunc = new ToolFunc({ name: 'helper', func: () => 'world' });
|
|
214
|
+
const mainFunc = new ToolFunc({
|
|
215
|
+
name: 'main',
|
|
216
|
+
depends: {
|
|
217
|
+
helper: helperFunc,
|
|
218
|
+
},
|
|
219
|
+
func() {
|
|
220
|
+
// We can now safely run the dependency
|
|
221
|
+
const result = this.runSync('helper');
|
|
222
|
+
return `Hello, ${result}`;
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
// When mainFunc is registered, helperFunc will be registered automatically.
|
|
226
|
+
mainFunc.register();
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
#### Overrides
|
|
230
|
+
|
|
231
|
+
[`ResServerTools`](ResServerTools.md).[`depends`](ResServerTools.md#depends)
|
|
232
|
+
|
|
155
233
|
***
|
|
156
234
|
|
|
157
235
|
### description
|
|
158
236
|
|
|
159
|
-
> **description**: `string` = `'subscribe server
|
|
237
|
+
> **description**: `string` = `'subscribe server event'`
|
|
238
|
+
|
|
239
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-server.ts:35](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/funcs/event-server.ts#L35)
|
|
160
240
|
|
|
161
|
-
|
|
241
|
+
A detailed description of what the function does.
|
|
242
|
+
|
|
243
|
+
#### Overrides
|
|
244
|
+
|
|
245
|
+
[`ResServerTools`](ResServerTools.md).[`description`](ResServerTools.md#description)
|
|
162
246
|
|
|
163
247
|
***
|
|
164
248
|
|
|
165
|
-
### fetchOptions
|
|
249
|
+
### ~~fetchOptions?~~
|
|
166
250
|
|
|
167
251
|
> `optional` **fetchOptions**: `any`
|
|
168
252
|
|
|
169
|
-
Defined in: [packages/ai-tool/src/utils/consts.ts:
|
|
253
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/utils/consts.ts:101](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/utils/consts.ts#L101)
|
|
254
|
+
|
|
255
|
+
Options to be passed to the underlying `fetch` call in an HTTP transport.
|
|
256
|
+
|
|
257
|
+
#### Deprecated
|
|
258
|
+
|
|
259
|
+
Use `transport` instead.
|
|
170
260
|
|
|
171
261
|
#### Inherited from
|
|
172
262
|
|
|
@@ -178,7 +268,9 @@ Defined in: [packages/ai-tool/src/utils/consts.ts:36](https://github.com/isdk/ai
|
|
|
178
268
|
|
|
179
269
|
> `optional` **isApi**: `boolean`
|
|
180
270
|
|
|
181
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
271
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:119](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L119)
|
|
272
|
+
|
|
273
|
+
If true, indicates that this function should be treated as a server-side API.
|
|
182
274
|
|
|
183
275
|
#### Inherited from
|
|
184
276
|
|
|
@@ -190,7 +282,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:29](https://github.com/isdk/ai-to
|
|
|
190
282
|
|
|
191
283
|
> **methods**: `string`[]
|
|
192
284
|
|
|
193
|
-
Defined in: [packages/ai-tool/src/rpc-methods-server-tool.ts:11](https://github.com/isdk/ai-tool.js/blob/
|
|
285
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:11](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/rpc-methods-server-tool.ts#L11)
|
|
194
286
|
|
|
195
287
|
#### Inherited from
|
|
196
288
|
|
|
@@ -198,15 +290,17 @@ Defined in: [packages/ai-tool/src/rpc-methods-server-tool.ts:11](https://github.
|
|
|
198
290
|
|
|
199
291
|
***
|
|
200
292
|
|
|
201
|
-
### name
|
|
293
|
+
### name?
|
|
202
294
|
|
|
203
|
-
> **name**: `string`
|
|
295
|
+
> `optional` **name**: `string`
|
|
204
296
|
|
|
205
|
-
Defined in: [packages/ai-tool/src/
|
|
297
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:76](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L76)
|
|
206
298
|
|
|
207
|
-
|
|
299
|
+
The unique name of the function.
|
|
300
|
+
|
|
301
|
+
#### Inherited from
|
|
208
302
|
|
|
209
|
-
[`ResServerTools`](ResServerTools.md).[`name`](ResServerTools.md#name-
|
|
303
|
+
[`ResServerTools`](ResServerTools.md).[`name`](ResServerTools.md#name-3)
|
|
210
304
|
|
|
211
305
|
***
|
|
212
306
|
|
|
@@ -214,7 +308,7 @@ Defined in: [packages/ai-tool/src/funcs/event-server.ts:27](https://github.com/i
|
|
|
214
308
|
|
|
215
309
|
> **nonExported1stChar**: `string`
|
|
216
310
|
|
|
217
|
-
Defined in:
|
|
311
|
+
Defined in: [property-manager.js/src/abstract.d.ts:78](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L78)
|
|
218
312
|
|
|
219
313
|
the property with the default prefix '$' will not be exported.
|
|
220
314
|
|
|
@@ -228,7 +322,9 @@ the property with the default prefix '$' will not be exported.
|
|
|
228
322
|
|
|
229
323
|
> **params**: [`FuncParams`](../interfaces/FuncParams.md)
|
|
230
324
|
|
|
231
|
-
Defined in: [packages/ai-tool/src/res-server-tools.ts:22](https://github.com/isdk/ai-tool.js/blob/
|
|
325
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-server-tools.ts:22](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/res-server-tools.ts#L22)
|
|
326
|
+
|
|
327
|
+
Parameter definitions, which can be an object mapping names to definitions or an array for positional parameters.
|
|
232
328
|
|
|
233
329
|
#### Inherited from
|
|
234
330
|
|
|
@@ -240,7 +336,9 @@ Defined in: [packages/ai-tool/src/res-server-tools.ts:22](https://github.com/isd
|
|
|
240
336
|
|
|
241
337
|
> **result**: `string` = `'event'`
|
|
242
338
|
|
|
243
|
-
Defined in: [packages/ai-tool/src/funcs/event-server.ts:
|
|
339
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-server.ts:36](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/funcs/event-server.ts#L36)
|
|
340
|
+
|
|
341
|
+
The expected return type of the function, described as a string or a JSON schema object.
|
|
244
342
|
|
|
245
343
|
#### Overrides
|
|
246
344
|
|
|
@@ -252,7 +350,9 @@ Defined in: [packages/ai-tool/src/funcs/event-server.ts:29](https://github.com/i
|
|
|
252
350
|
|
|
253
351
|
> `optional` **scope**: `any`
|
|
254
352
|
|
|
255
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
353
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:91](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L91)
|
|
354
|
+
|
|
355
|
+
The execution scope or context (`this`) for the function.
|
|
256
356
|
|
|
257
357
|
#### Inherited from
|
|
258
358
|
|
|
@@ -264,7 +364,11 @@ Defined in: [packages/ai-tool/src/tool-func.ts:26](https://github.com/isdk/ai-to
|
|
|
264
364
|
|
|
265
365
|
> `optional` **setup**: (`this`, `options`?) => `void`
|
|
266
366
|
|
|
267
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
367
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:114](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L114)
|
|
368
|
+
|
|
369
|
+
A lifecycle hook called once during the `ToolFunc` instance's initialization.
|
|
370
|
+
It allows for initial setup, state configuration, or property modification on the instance
|
|
371
|
+
before it is used or registered. The `this` context is the `ToolFunc` instance itself.
|
|
268
372
|
|
|
269
373
|
#### Parameters
|
|
270
374
|
|
|
@@ -276,10 +380,26 @@ Defined in: [packages/ai-tool/src/tool-func.ts:28](https://github.com/isdk/ai-to
|
|
|
276
380
|
|
|
277
381
|
[`FuncItem`](../interfaces/FuncItem.md)
|
|
278
382
|
|
|
383
|
+
The configuration options for the function.
|
|
384
|
+
|
|
279
385
|
#### Returns
|
|
280
386
|
|
|
281
387
|
`void`
|
|
282
388
|
|
|
389
|
+
#### Example
|
|
390
|
+
|
|
391
|
+
```ts
|
|
392
|
+
const myFunc = new ToolFunc({
|
|
393
|
+
name: 'myFunc',
|
|
394
|
+
customState: 'initial',
|
|
395
|
+
setup() {
|
|
396
|
+
// `this` is the myFunc instance
|
|
397
|
+
this.customState = 'configured';
|
|
398
|
+
}
|
|
399
|
+
});
|
|
400
|
+
console.log(myFunc.customState); // Outputs: 'configured'
|
|
401
|
+
```
|
|
402
|
+
|
|
283
403
|
#### Inherited from
|
|
284
404
|
|
|
285
405
|
[`ResServerTools`](ResServerTools.md).[`setup`](ResServerTools.md#setup)
|
|
@@ -290,7 +410,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:28](https://github.com/isdk/ai-to
|
|
|
290
410
|
|
|
291
411
|
> `optional` **stream**: `boolean`
|
|
292
412
|
|
|
293
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
413
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:125](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L125)
|
|
414
|
+
|
|
415
|
+
If true, indicates that the function has the *capability* to stream its output.
|
|
416
|
+
Whether a specific call is streamed is determined by a `stream` property in the runtime parameters.
|
|
294
417
|
|
|
295
418
|
#### Inherited from
|
|
296
419
|
|
|
@@ -302,7 +425,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:30](https://github.com/isdk/ai-to
|
|
|
302
425
|
|
|
303
426
|
> `optional` **tags**: `string` \| `string`[]
|
|
304
427
|
|
|
305
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
428
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:96](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L96)
|
|
429
|
+
|
|
430
|
+
Tags for grouping or filtering functions.
|
|
306
431
|
|
|
307
432
|
#### Inherited from
|
|
308
433
|
|
|
@@ -310,11 +435,25 @@ Defined in: [packages/ai-tool/src/tool-func.ts:27](https://github.com/isdk/ai-to
|
|
|
310
435
|
|
|
311
436
|
***
|
|
312
437
|
|
|
313
|
-
###
|
|
438
|
+
### title?
|
|
439
|
+
|
|
440
|
+
> `optional` **title**: `string`
|
|
441
|
+
|
|
442
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:177](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L177)
|
|
443
|
+
|
|
444
|
+
A concise, human-readable title for the function, often used in UI or by AI.
|
|
445
|
+
|
|
446
|
+
#### Inherited from
|
|
447
|
+
|
|
448
|
+
[`ResServerTools`](ResServerTools.md).[`title`](ResServerTools.md#title)
|
|
449
|
+
|
|
450
|
+
***
|
|
451
|
+
|
|
452
|
+
### \_pubSubTransport
|
|
314
453
|
|
|
315
|
-
> `static` **\
|
|
454
|
+
> `static` **\_pubSubTransport**: `undefined` \| [`IPubSubServerTransport`](../interfaces/IPubSubServerTransport.md)
|
|
316
455
|
|
|
317
|
-
Defined in: [packages/ai-tool/src/funcs/event-server.ts:
|
|
456
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-server.ts:23](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/funcs/event-server.ts#L23)
|
|
318
457
|
|
|
319
458
|
***
|
|
320
459
|
|
|
@@ -322,7 +461,9 @@ Defined in: [packages/ai-tool/src/funcs/event-server.ts:19](https://github.com/i
|
|
|
322
461
|
|
|
323
462
|
> `static` **aliases**: `object` = `{}`
|
|
324
463
|
|
|
325
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
464
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:305](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L305)
|
|
465
|
+
|
|
466
|
+
A static map of aliases to their corresponding function names.
|
|
326
467
|
|
|
327
468
|
#### Index Signature
|
|
328
469
|
|
|
@@ -338,7 +479,11 @@ Defined in: [packages/ai-tool/src/tool-func.ts:58](https://github.com/isdk/ai-to
|
|
|
338
479
|
|
|
339
480
|
> `static` **dataPath**: `string`
|
|
340
481
|
|
|
341
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
482
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:312](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L312)
|
|
483
|
+
|
|
484
|
+
A conventional property to designate a file path for saving the registered `ToolFunc` data.
|
|
485
|
+
Note: The `ToolFunc` class itself does not implement persistence logic. It is up to the
|
|
486
|
+
developer to use this path to save and load the `ToolFunc.items` registry if needed.
|
|
342
487
|
|
|
343
488
|
#### Inherited from
|
|
344
489
|
|
|
@@ -346,33 +491,13 @@ Defined in: [packages/ai-tool/src/tool-func.ts:59](https://github.com/isdk/ai-to
|
|
|
346
491
|
|
|
347
492
|
***
|
|
348
493
|
|
|
349
|
-
### ebListener()
|
|
350
|
-
|
|
351
|
-
> `static` **ebListener**: (`this`, ...`data`) => `void`
|
|
352
|
-
|
|
353
|
-
Defined in: [packages/ai-tool/src/funcs/event-server.ts:42](https://github.com/isdk/ai-tool.js/blob/b0ee9498dddfa5222989cf00502bb34c601df743/src/funcs/event-server.ts#L42)
|
|
354
|
-
|
|
355
|
-
#### Parameters
|
|
356
|
-
|
|
357
|
-
##### this
|
|
358
|
-
|
|
359
|
-
`Event`
|
|
360
|
-
|
|
361
|
-
##### data
|
|
362
|
-
|
|
363
|
-
...`any`[]
|
|
364
|
-
|
|
365
|
-
#### Returns
|
|
366
|
-
|
|
367
|
-
`void`
|
|
368
|
-
|
|
369
|
-
***
|
|
370
|
-
|
|
371
494
|
### items
|
|
372
495
|
|
|
373
496
|
> `static` **items**: [`Funcs`](../interfaces/Funcs.md) = `{}`
|
|
374
497
|
|
|
375
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
498
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:300](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L300)
|
|
499
|
+
|
|
500
|
+
A static registry of all `ToolFunc` instances, indexed by name.
|
|
376
501
|
|
|
377
502
|
#### Inherited from
|
|
378
503
|
|
|
@@ -384,7 +509,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:57](https://github.com/isdk/ai-to
|
|
|
384
509
|
|
|
385
510
|
> `static` **SpecialRpcMethodNames**: `any`
|
|
386
511
|
|
|
387
|
-
Defined in: [packages/ai-tool/src/res-server-tools.ts:20](https://github.com/isdk/ai-tool.js/blob/
|
|
512
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-server-tools.ts:20](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/res-server-tools.ts#L20)
|
|
388
513
|
|
|
389
514
|
#### Inherited from
|
|
390
515
|
|
|
@@ -392,36 +517,36 @@ Defined in: [packages/ai-tool/src/res-server-tools.ts:20](https://github.com/isd
|
|
|
392
517
|
|
|
393
518
|
## Accessors
|
|
394
519
|
|
|
395
|
-
###
|
|
520
|
+
### pubSubTransport
|
|
396
521
|
|
|
397
522
|
#### Get Signature
|
|
398
523
|
|
|
399
|
-
> **get** **
|
|
524
|
+
> **get** **pubSubTransport**(): `undefined` \| [`IPubSubServerTransport`](../interfaces/IPubSubServerTransport.md)
|
|
400
525
|
|
|
401
|
-
Defined in: [packages/ai-tool/src/
|
|
526
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-server.ts:39](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/funcs/event-server.ts#L39)
|
|
402
527
|
|
|
403
528
|
##### Returns
|
|
404
529
|
|
|
405
|
-
`
|
|
406
|
-
|
|
407
|
-
#### Inherited from
|
|
408
|
-
|
|
409
|
-
[`ResServerTools`](ResServerTools.md).[`SpecialRpcMethodNames`](ResServerTools.md#specialrpcmethodnames-1)
|
|
530
|
+
`undefined` \| [`IPubSubServerTransport`](../interfaces/IPubSubServerTransport.md)
|
|
410
531
|
|
|
411
532
|
***
|
|
412
533
|
|
|
413
|
-
###
|
|
534
|
+
### SpecialRpcMethodNames
|
|
414
535
|
|
|
415
536
|
#### Get Signature
|
|
416
537
|
|
|
417
|
-
> **get** **
|
|
538
|
+
> **get** **SpecialRpcMethodNames**(): `any`
|
|
418
539
|
|
|
419
|
-
Defined in: [packages/ai-tool/src/
|
|
540
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:22](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/rpc-methods-server-tool.ts#L22)
|
|
420
541
|
|
|
421
542
|
##### Returns
|
|
422
543
|
|
|
423
544
|
`any`
|
|
424
545
|
|
|
546
|
+
#### Inherited from
|
|
547
|
+
|
|
548
|
+
[`ResServerTools`](ResServerTools.md).[`SpecialRpcMethodNames`](ResServerTools.md#specialrpcmethodnames-1)
|
|
549
|
+
|
|
425
550
|
***
|
|
426
551
|
|
|
427
552
|
### apiRoot
|
|
@@ -430,7 +555,9 @@ Defined in: [packages/ai-tool/src/funcs/event-server.ts:32](https://github.com/i
|
|
|
430
555
|
|
|
431
556
|
> **get** `static` **apiRoot**(): `undefined` \| `string`
|
|
432
557
|
|
|
433
|
-
Defined in: [packages/ai-tool/src/server-tools.ts:
|
|
558
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/server-tools.ts:57](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/server-tools.ts#L57)
|
|
559
|
+
|
|
560
|
+
The conventional root path for the API endpoint.
|
|
434
561
|
|
|
435
562
|
##### Returns
|
|
436
563
|
|
|
@@ -442,25 +569,25 @@ Defined in: [packages/ai-tool/src/server-tools.ts:26](https://github.com/isdk/ai
|
|
|
442
569
|
|
|
443
570
|
***
|
|
444
571
|
|
|
445
|
-
###
|
|
572
|
+
### pubSubTransport
|
|
446
573
|
|
|
447
574
|
#### Get Signature
|
|
448
575
|
|
|
449
|
-
> **get** `static` **
|
|
576
|
+
> **get** `static` **pubSubTransport**(): `undefined` \| [`IPubSubServerTransport`](../interfaces/IPubSubServerTransport.md)
|
|
450
577
|
|
|
451
|
-
Defined in: [packages/ai-tool/src/funcs/event-server.ts:
|
|
578
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-server.ts:25](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/funcs/event-server.ts#L25)
|
|
452
579
|
|
|
453
580
|
##### Returns
|
|
454
581
|
|
|
455
|
-
[`
|
|
582
|
+
`undefined` \| [`IPubSubServerTransport`](../interfaces/IPubSubServerTransport.md)
|
|
456
583
|
|
|
457
584
|
## Methods
|
|
458
585
|
|
|
459
586
|
### $publish()
|
|
460
587
|
|
|
461
|
-
> **$publish**(`__namedParameters`): `
|
|
588
|
+
> **$publish**(`__namedParameters`): `object`
|
|
462
589
|
|
|
463
|
-
Defined in: [packages/ai-tool/src/funcs/event-server.ts:
|
|
590
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-server.ts:130](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/funcs/event-server.ts#L130)
|
|
464
591
|
|
|
465
592
|
#### Parameters
|
|
466
593
|
|
|
@@ -470,15 +597,19 @@ Defined in: [packages/ai-tool/src/funcs/event-server.ts:113](https://github.com/
|
|
|
470
597
|
|
|
471
598
|
#### Returns
|
|
472
599
|
|
|
473
|
-
`
|
|
600
|
+
`object`
|
|
601
|
+
|
|
602
|
+
##### event
|
|
603
|
+
|
|
604
|
+
> **event**: `string`[] = `events`
|
|
474
605
|
|
|
475
606
|
***
|
|
476
607
|
|
|
477
608
|
### $sub()
|
|
478
609
|
|
|
479
|
-
> **$sub**(`__namedParameters`): `
|
|
610
|
+
> **$sub**(`__namedParameters`): `object`
|
|
480
611
|
|
|
481
|
-
Defined in: [packages/ai-tool/src/funcs/event-server.ts:
|
|
612
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-server.ts:112](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/funcs/event-server.ts#L112)
|
|
482
613
|
|
|
483
614
|
#### Parameters
|
|
484
615
|
|
|
@@ -488,15 +619,19 @@ Defined in: [packages/ai-tool/src/funcs/event-server.ts:95](https://github.com/i
|
|
|
488
619
|
|
|
489
620
|
#### Returns
|
|
490
621
|
|
|
491
|
-
`
|
|
622
|
+
`object`
|
|
623
|
+
|
|
624
|
+
##### event
|
|
625
|
+
|
|
626
|
+
> **event**: `string` \| `string`[]
|
|
492
627
|
|
|
493
628
|
***
|
|
494
629
|
|
|
495
630
|
### $unsub()
|
|
496
631
|
|
|
497
|
-
> **$unsub**(`__namedParameters`): `
|
|
632
|
+
> **$unsub**(`__namedParameters`): `object`
|
|
498
633
|
|
|
499
|
-
Defined in: [packages/ai-tool/src/funcs/event-server.ts:
|
|
634
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-server.ts:121](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/funcs/event-server.ts#L121)
|
|
500
635
|
|
|
501
636
|
#### Parameters
|
|
502
637
|
|
|
@@ -506,7 +641,11 @@ Defined in: [packages/ai-tool/src/funcs/event-server.ts:104](https://github.com/
|
|
|
506
641
|
|
|
507
642
|
#### Returns
|
|
508
643
|
|
|
509
|
-
`
|
|
644
|
+
`object`
|
|
645
|
+
|
|
646
|
+
##### event
|
|
647
|
+
|
|
648
|
+
> **event**: `string` \| `string`[]
|
|
510
649
|
|
|
511
650
|
***
|
|
512
651
|
|
|
@@ -514,7 +653,10 @@ Defined in: [packages/ai-tool/src/funcs/event-server.ts:104](https://github.com/
|
|
|
514
653
|
|
|
515
654
|
> **arr2ObjParams**(`params`): `any`[]
|
|
516
655
|
|
|
517
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
656
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:629](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L629)
|
|
657
|
+
|
|
658
|
+
Converts an array of positional arguments into a named parameters object.
|
|
659
|
+
This is used internally to support functions defined with named parameters.
|
|
518
660
|
|
|
519
661
|
#### Parameters
|
|
520
662
|
|
|
@@ -522,10 +664,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:269](https://github.com/isdk/ai-t
|
|
|
522
664
|
|
|
523
665
|
`any`[]
|
|
524
666
|
|
|
667
|
+
An array of positional arguments.
|
|
668
|
+
|
|
525
669
|
#### Returns
|
|
526
670
|
|
|
527
671
|
`any`[]
|
|
528
672
|
|
|
673
|
+
An array containing a single parameters object.
|
|
674
|
+
|
|
529
675
|
#### Inherited from
|
|
530
676
|
|
|
531
677
|
[`ResServerTools`](ResServerTools.md).[`arr2ObjParams`](ResServerTools.md#arr2objparams)
|
|
@@ -536,7 +682,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:269](https://github.com/isdk/ai-t
|
|
|
536
682
|
|
|
537
683
|
> **assign**(`src`, `options`?): `this`
|
|
538
684
|
|
|
539
|
-
Defined in:
|
|
685
|
+
Defined in: [property-manager.js/src/abstract.d.ts:106](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L106)
|
|
540
686
|
|
|
541
687
|
Assign the values from the src object.
|
|
542
688
|
|
|
@@ -568,7 +714,7 @@ this object
|
|
|
568
714
|
|
|
569
715
|
> **assignProperty**(`src`, `name`, `value`, `attrs`?, `options`?): `void`
|
|
570
716
|
|
|
571
|
-
Defined in:
|
|
717
|
+
Defined in: [property-manager.js/src/abstract.d.ts:117](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L117)
|
|
572
718
|
|
|
573
719
|
Assign a property of src to this object.
|
|
574
720
|
|
|
@@ -616,7 +762,7 @@ the attributes object
|
|
|
616
762
|
|
|
617
763
|
> `abstract` **assignPropertyTo**(`dest`, `src`, `name`, `value`, `attrs`?, `options`?): `void`
|
|
618
764
|
|
|
619
|
-
Defined in:
|
|
765
|
+
Defined in: [property-manager.js/src/abstract.d.ts:131](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L131)
|
|
620
766
|
|
|
621
767
|
Assign the property value from the src to destination object.
|
|
622
768
|
|
|
@@ -670,7 +816,7 @@ The attributes object of the property
|
|
|
670
816
|
|
|
671
817
|
> **assignTo**(`dest`?, `options`?): `any`
|
|
672
818
|
|
|
673
|
-
Defined in:
|
|
819
|
+
Defined in: [property-manager.js/src/abstract.d.ts:191](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L191)
|
|
674
820
|
|
|
675
821
|
Assign this attributes to the dest object
|
|
676
822
|
|
|
@@ -702,7 +848,7 @@ the dest object
|
|
|
702
848
|
|
|
703
849
|
> **cast**(`key`, `value`): `any`
|
|
704
850
|
|
|
705
|
-
Defined in: [packages/ai-tool/src/rpc-methods-server-tool.ts:48](https://github.com/isdk/ai-tool.js/blob/
|
|
851
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:48](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/rpc-methods-server-tool.ts#L48)
|
|
706
852
|
|
|
707
853
|
#### Parameters
|
|
708
854
|
|
|
@@ -726,19 +872,19 @@ Defined in: [packages/ai-tool/src/rpc-methods-server-tool.ts:48](https://github.
|
|
|
726
872
|
|
|
727
873
|
### castParams()
|
|
728
874
|
|
|
729
|
-
> **castParams**(`params`): `RpcMethodsServerFuncParams`
|
|
875
|
+
> **castParams**(`params`): [`RpcMethodsServerFuncParams`](../interfaces/RpcMethodsServerFuncParams.md)
|
|
730
876
|
|
|
731
|
-
Defined in: [packages/ai-tool/src/res-server-tools.ts:40](https://github.com/isdk/ai-tool.js/blob/
|
|
877
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-server-tools.ts:40](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/res-server-tools.ts#L40)
|
|
732
878
|
|
|
733
879
|
#### Parameters
|
|
734
880
|
|
|
735
881
|
##### params
|
|
736
882
|
|
|
737
|
-
`RpcMethodsServerFuncParams`
|
|
883
|
+
[`RpcMethodsServerFuncParams`](../interfaces/RpcMethodsServerFuncParams.md)
|
|
738
884
|
|
|
739
885
|
#### Returns
|
|
740
886
|
|
|
741
|
-
`RpcMethodsServerFuncParams`
|
|
887
|
+
[`RpcMethodsServerFuncParams`](../interfaces/RpcMethodsServerFuncParams.md)
|
|
742
888
|
|
|
743
889
|
#### Inherited from
|
|
744
890
|
|
|
@@ -750,7 +896,7 @@ Defined in: [packages/ai-tool/src/res-server-tools.ts:40](https://github.com/isd
|
|
|
750
896
|
|
|
751
897
|
> **clone**(`options`?): `any`
|
|
752
898
|
|
|
753
|
-
Defined in:
|
|
899
|
+
Defined in: [property-manager.js/src/abstract.d.ts:155](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L155)
|
|
754
900
|
|
|
755
901
|
Create a new object with the same values of attributes.
|
|
756
902
|
|
|
@@ -776,7 +922,7 @@ the new object
|
|
|
776
922
|
|
|
777
923
|
> **cloneTo**(`dest`, `options`?): `any`
|
|
778
924
|
|
|
779
|
-
Defined in:
|
|
925
|
+
Defined in: [property-manager.js/src/abstract.d.ts:148](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L148)
|
|
780
926
|
|
|
781
927
|
Create and assign the values to the destination object.
|
|
782
928
|
|
|
@@ -808,7 +954,7 @@ the new dest object
|
|
|
808
954
|
|
|
809
955
|
> `abstract` **defineProperties**(`aProperties`): `any`
|
|
810
956
|
|
|
811
|
-
Defined in:
|
|
957
|
+
Defined in: [property-manager.js/src/abstract.d.ts:89](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L89)
|
|
812
958
|
|
|
813
959
|
Define the attributes of this object.
|
|
814
960
|
|
|
@@ -834,7 +980,7 @@ the defined attributes of the object
|
|
|
834
980
|
|
|
835
981
|
> `optional` **delete**(`__namedParameters`): `any`
|
|
836
982
|
|
|
837
|
-
Defined in: [packages/ai-tool/src/res-server-tools.ts:15](https://github.com/isdk/ai-tool.js/blob/
|
|
983
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-server-tools.ts:15](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/res-server-tools.ts#L15)
|
|
838
984
|
|
|
839
985
|
#### Parameters
|
|
840
986
|
|
|
@@ -856,7 +1002,7 @@ Defined in: [packages/ai-tool/src/res-server-tools.ts:15](https://github.com/isd
|
|
|
856
1002
|
|
|
857
1003
|
> **exportTo**(`dest`, `options`?): `any`
|
|
858
1004
|
|
|
859
|
-
Defined in:
|
|
1005
|
+
Defined in: [property-manager.js/src/abstract.d.ts:173](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L173)
|
|
860
1006
|
|
|
861
1007
|
Export attributes to the dest json object.
|
|
862
1008
|
|
|
@@ -888,7 +1034,7 @@ the dest object.
|
|
|
888
1034
|
|
|
889
1035
|
> **forward**(`events`): `void`
|
|
890
1036
|
|
|
891
|
-
Defined in: [packages/ai-tool/src/funcs/event-server.ts:
|
|
1037
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-server.ts:77](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/funcs/event-server.ts#L77)
|
|
892
1038
|
|
|
893
1039
|
#### Parameters
|
|
894
1040
|
|
|
@@ -906,18 +1052,25 @@ Defined in: [packages/ai-tool/src/funcs/event-server.ts:69](https://github.com/i
|
|
|
906
1052
|
|
|
907
1053
|
> **func**(`params`): `any`
|
|
908
1054
|
|
|
909
|
-
Defined in: [packages/ai-tool/src/rpc-methods-server-tool.ts:68](https://github.com/isdk/ai-tool.js/blob/
|
|
1055
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:68](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/rpc-methods-server-tool.ts#L68)
|
|
1056
|
+
|
|
1057
|
+
Placeholder for the actual server-side function implementation.
|
|
1058
|
+
This method is intended to be defined when a `ServerTools` instance is created.
|
|
910
1059
|
|
|
911
1060
|
#### Parameters
|
|
912
1061
|
|
|
913
1062
|
##### params
|
|
914
1063
|
|
|
915
|
-
`RpcMethodsServerFuncParams`
|
|
1064
|
+
[`RpcMethodsServerFuncParams`](../interfaces/RpcMethodsServerFuncParams.md)
|
|
1065
|
+
|
|
1066
|
+
The parameters for the function.
|
|
916
1067
|
|
|
917
1068
|
#### Returns
|
|
918
1069
|
|
|
919
1070
|
`any`
|
|
920
1071
|
|
|
1072
|
+
The result of the function.
|
|
1073
|
+
|
|
921
1074
|
#### Inherited from
|
|
922
1075
|
|
|
923
1076
|
[`ResServerTools`](ResServerTools.md).[`func`](ResServerTools.md#func)
|
|
@@ -928,7 +1081,7 @@ Defined in: [packages/ai-tool/src/rpc-methods-server-tool.ts:68](https://github.
|
|
|
928
1081
|
|
|
929
1082
|
> `optional` **get**(`__namedParameters`): `any`
|
|
930
1083
|
|
|
931
|
-
Defined in: [packages/ai-tool/src/res-server-tools.ts:12](https://github.com/isdk/ai-tool.js/blob/
|
|
1084
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-server-tools.ts:12](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/res-server-tools.ts#L12)
|
|
932
1085
|
|
|
933
1086
|
#### Parameters
|
|
934
1087
|
|
|
@@ -950,7 +1103,11 @@ Defined in: [packages/ai-tool/src/res-server-tools.ts:12](https://github.com/isd
|
|
|
950
1103
|
|
|
951
1104
|
> **getFunc**(`name`?): `any`
|
|
952
1105
|
|
|
953
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1106
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:720](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L720)
|
|
1107
|
+
|
|
1108
|
+
Gets a bound function reference for execution with named parameters.
|
|
1109
|
+
If a name is provided, it retrieves a different function from the registry.
|
|
1110
|
+
Otherwise, it returns a bound version of this instance's `runSync`.
|
|
954
1111
|
|
|
955
1112
|
#### Parameters
|
|
956
1113
|
|
|
@@ -958,10 +1115,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:322](https://github.com/isdk/ai-t
|
|
|
958
1115
|
|
|
959
1116
|
`string`
|
|
960
1117
|
|
|
1118
|
+
Optional name of the function to retrieve.
|
|
1119
|
+
|
|
961
1120
|
#### Returns
|
|
962
1121
|
|
|
963
1122
|
`any`
|
|
964
1123
|
|
|
1124
|
+
A function reference or `undefined` if not found.
|
|
1125
|
+
|
|
965
1126
|
#### Inherited from
|
|
966
1127
|
|
|
967
1128
|
[`ResServerTools`](ResServerTools.md).[`getFunc`](ResServerTools.md#getfunc)
|
|
@@ -972,7 +1133,11 @@ Defined in: [packages/ai-tool/src/tool-func.ts:322](https://github.com/isdk/ai-t
|
|
|
972
1133
|
|
|
973
1134
|
> **getFuncWithPos**(`name`?): `any`
|
|
974
1135
|
|
|
975
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1136
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:777](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L777)
|
|
1137
|
+
|
|
1138
|
+
Gets a bound function reference suitable for positional argument execution.
|
|
1139
|
+
If a name is provided, it retrieves a different function from the registry.
|
|
1140
|
+
Otherwise, it returns a bound version of this instance's `runWithPosSync`.
|
|
976
1141
|
|
|
977
1142
|
#### Parameters
|
|
978
1143
|
|
|
@@ -980,10 +1145,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:346](https://github.com/isdk/ai-t
|
|
|
980
1145
|
|
|
981
1146
|
`string`
|
|
982
1147
|
|
|
1148
|
+
Optional name of the function to retrieve.
|
|
1149
|
+
|
|
983
1150
|
#### Returns
|
|
984
1151
|
|
|
985
1152
|
`any`
|
|
986
1153
|
|
|
1154
|
+
A function reference or `undefined` if not found.
|
|
1155
|
+
|
|
987
1156
|
#### Inherited from
|
|
988
1157
|
|
|
989
1158
|
[`ResServerTools`](ResServerTools.md).[`getFuncWithPos`](ResServerTools.md#getfuncwithpos)
|
|
@@ -992,9 +1161,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:346](https://github.com/isdk/ai-t
|
|
|
992
1161
|
|
|
993
1162
|
### getMethodFromParams()
|
|
994
1163
|
|
|
995
|
-
> **getMethodFromParams**(`params`): `
|
|
1164
|
+
> **getMethodFromParams**(`params`): `any`
|
|
996
1165
|
|
|
997
|
-
Defined in: [packages/ai-tool/src/res-server-tools.ts:31](https://github.com/isdk/ai-tool.js/blob/
|
|
1166
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-server-tools.ts:31](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/res-server-tools.ts#L31)
|
|
998
1167
|
|
|
999
1168
|
#### Parameters
|
|
1000
1169
|
|
|
@@ -1004,7 +1173,7 @@ Defined in: [packages/ai-tool/src/res-server-tools.ts:31](https://github.com/isd
|
|
|
1004
1173
|
|
|
1005
1174
|
#### Returns
|
|
1006
1175
|
|
|
1007
|
-
`
|
|
1176
|
+
`any`
|
|
1008
1177
|
|
|
1009
1178
|
#### Inherited from
|
|
1010
1179
|
|
|
@@ -1016,7 +1185,7 @@ Defined in: [packages/ai-tool/src/res-server-tools.ts:31](https://github.com/isd
|
|
|
1016
1185
|
|
|
1017
1186
|
> `abstract` **getProperties**(): `PropDescriptors`
|
|
1018
1187
|
|
|
1019
|
-
Defined in:
|
|
1188
|
+
Defined in: [property-manager.js/src/abstract.d.ts:98](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L98)
|
|
1020
1189
|
|
|
1021
1190
|
Get the defined attributes.
|
|
1022
1191
|
|
|
@@ -1036,7 +1205,9 @@ the descriptors of properties object
|
|
|
1036
1205
|
|
|
1037
1206
|
> **hasAsyncFeature**(`feature`): `boolean`
|
|
1038
1207
|
|
|
1039
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1208
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:787](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L787)
|
|
1209
|
+
|
|
1210
|
+
Checks if the current function instance supports a specific async feature.
|
|
1040
1211
|
|
|
1041
1212
|
#### Parameters
|
|
1042
1213
|
|
|
@@ -1044,10 +1215,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:351](https://github.com/isdk/ai-t
|
|
|
1044
1215
|
|
|
1045
1216
|
[`AsyncFeatureBits`](../enumerations/AsyncFeatureBits.md)
|
|
1046
1217
|
|
|
1218
|
+
The async feature bit to check for.
|
|
1219
|
+
|
|
1047
1220
|
#### Returns
|
|
1048
1221
|
|
|
1049
1222
|
`boolean`
|
|
1050
1223
|
|
|
1224
|
+
`true` if the feature is supported, otherwise `false`.
|
|
1225
|
+
|
|
1051
1226
|
#### Inherited from
|
|
1052
1227
|
|
|
1053
1228
|
[`ResServerTools`](ResServerTools.md).[`hasAsyncFeature`](ResServerTools.md#hasasyncfeature)
|
|
@@ -1058,7 +1233,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:351](https://github.com/isdk/ai-t
|
|
|
1058
1233
|
|
|
1059
1234
|
> **hasOwnProperty**(`v`): `boolean`
|
|
1060
1235
|
|
|
1061
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:140
|
|
1236
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:140
|
|
1062
1237
|
|
|
1063
1238
|
Determines whether an object has a property with the specified name.
|
|
1064
1239
|
|
|
@@ -1084,7 +1259,7 @@ A property name.
|
|
|
1084
1259
|
|
|
1085
1260
|
> **initialize**(`src`?): `this`
|
|
1086
1261
|
|
|
1087
|
-
Defined in:
|
|
1262
|
+
Defined in: [property-manager.js/src/abstract.d.ts:139](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L139)
|
|
1088
1263
|
|
|
1089
1264
|
Initialize object and assign attribute values from src if src exists.
|
|
1090
1265
|
|
|
@@ -1110,7 +1285,7 @@ this object.
|
|
|
1110
1285
|
|
|
1111
1286
|
> **initRpcMethods**(`methods`): `void`
|
|
1112
1287
|
|
|
1113
|
-
Defined in: [packages/ai-tool/src/rpc-methods-server-tool.ts:27](https://github.com/isdk/ai-tool.js/blob/
|
|
1288
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/rpc-methods-server-tool.ts:27](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/rpc-methods-server-tool.ts#L27)
|
|
1114
1289
|
|
|
1115
1290
|
#### Parameters
|
|
1116
1291
|
|
|
@@ -1132,7 +1307,7 @@ Defined in: [packages/ai-tool/src/rpc-methods-server-tool.ts:27](https://github.
|
|
|
1132
1307
|
|
|
1133
1308
|
> **isPrototypeOf**(`v`): `boolean`
|
|
1134
1309
|
|
|
1135
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:146
|
|
1310
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:146
|
|
1136
1311
|
|
|
1137
1312
|
Determines whether an object exists in another object's prototype chain.
|
|
1138
1313
|
|
|
@@ -1158,7 +1333,7 @@ Another object whose prototype chain is to be checked.
|
|
|
1158
1333
|
|
|
1159
1334
|
> **isSame**(`src`, `options`?): `boolean`
|
|
1160
1335
|
|
|
1161
|
-
Defined in:
|
|
1336
|
+
Defined in: [property-manager.js/src/abstract.d.ts:200](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L200)
|
|
1162
1337
|
|
|
1163
1338
|
Check the src object whether “equals” this object.
|
|
1164
1339
|
|
|
@@ -1188,7 +1363,15 @@ The source object
|
|
|
1188
1363
|
|
|
1189
1364
|
> **isStream**(`params`): `boolean`
|
|
1190
1365
|
|
|
1191
|
-
Defined in: [packages/ai-tool/src/funcs/event-server.ts:
|
|
1366
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-server.ts:144](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/funcs/event-server.ts#L144)
|
|
1367
|
+
|
|
1368
|
+
Determines if a function call should produce a stream.
|
|
1369
|
+
|
|
1370
|
+
The logic is as follows:
|
|
1371
|
+
1. It first checks if the function is generally capable of streaming (`this.stream`).
|
|
1372
|
+
2. If it is, it then checks if a `stream` parameter is formally declared in the function's `params` definition.
|
|
1373
|
+
3. If both are true, the method returns the value of the `stream` property from the runtime `params` object.
|
|
1374
|
+
Otherwise, it returns the function's static `stream` capability.
|
|
1192
1375
|
|
|
1193
1376
|
#### Parameters
|
|
1194
1377
|
|
|
@@ -1196,10 +1379,14 @@ Defined in: [packages/ai-tool/src/funcs/event-server.ts:127](https://github.com/
|
|
|
1196
1379
|
|
|
1197
1380
|
[`ServerFuncParams`](../interfaces/ServerFuncParams.md)
|
|
1198
1381
|
|
|
1382
|
+
The runtime parameters passed to the function call.
|
|
1383
|
+
|
|
1199
1384
|
#### Returns
|
|
1200
1385
|
|
|
1201
1386
|
`boolean`
|
|
1202
1387
|
|
|
1388
|
+
`true` if the call should be streamed, `false` or `undefined` otherwise.
|
|
1389
|
+
|
|
1203
1390
|
#### Overrides
|
|
1204
1391
|
|
|
1205
1392
|
[`ResServerTools`](ResServerTools.md).[`isStream`](ResServerTools.md#isstream)
|
|
@@ -1210,7 +1397,7 @@ Defined in: [packages/ai-tool/src/funcs/event-server.ts:127](https://github.com/
|
|
|
1210
1397
|
|
|
1211
1398
|
> **list**(`__namedParameters`): `void`
|
|
1212
1399
|
|
|
1213
|
-
Defined in: [packages/ai-tool/src/funcs/event-server.ts:
|
|
1400
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-server.ts:106](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/funcs/event-server.ts#L106)
|
|
1214
1401
|
|
|
1215
1402
|
#### Parameters
|
|
1216
1403
|
|
|
@@ -1232,7 +1419,7 @@ Defined in: [packages/ai-tool/src/funcs/event-server.ts:89](https://github.com/i
|
|
|
1232
1419
|
|
|
1233
1420
|
> **mergeTo**(`dest`, `options`?): `any`
|
|
1234
1421
|
|
|
1235
|
-
Defined in:
|
|
1422
|
+
Defined in: [property-manager.js/src/abstract.d.ts:164](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L164)
|
|
1236
1423
|
|
|
1237
1424
|
Merge this attributes to dest object.
|
|
1238
1425
|
|
|
@@ -1264,7 +1451,10 @@ the dest object.
|
|
|
1264
1451
|
|
|
1265
1452
|
> **obj2ArrParams**(`params`?): `any`[]
|
|
1266
1453
|
|
|
1267
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1454
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:648](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L648)
|
|
1455
|
+
|
|
1456
|
+
Converts a named parameters object into an array of positional arguments.
|
|
1457
|
+
This is used for functions defined with positional parameters.
|
|
1268
1458
|
|
|
1269
1459
|
#### Parameters
|
|
1270
1460
|
|
|
@@ -1272,10 +1462,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:282](https://github.com/isdk/ai-t
|
|
|
1272
1462
|
|
|
1273
1463
|
`any`
|
|
1274
1464
|
|
|
1465
|
+
A named parameters object.
|
|
1466
|
+
|
|
1275
1467
|
#### Returns
|
|
1276
1468
|
|
|
1277
1469
|
`any`[]
|
|
1278
1470
|
|
|
1471
|
+
An array of positional arguments.
|
|
1472
|
+
|
|
1279
1473
|
#### Inherited from
|
|
1280
1474
|
|
|
1281
1475
|
[`ResServerTools`](ResServerTools.md).[`obj2ArrParams`](ResServerTools.md#obj2arrparams)
|
|
@@ -1286,7 +1480,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:282](https://github.com/isdk/ai-t
|
|
|
1286
1480
|
|
|
1287
1481
|
> `optional` **post**(`options`): `any`
|
|
1288
1482
|
|
|
1289
|
-
Defined in: [packages/ai-tool/src/res-server-tools.ts:13](https://github.com/isdk/ai-tool.js/blob/
|
|
1483
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-server-tools.ts:13](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/res-server-tools.ts#L13)
|
|
1290
1484
|
|
|
1291
1485
|
#### Parameters
|
|
1292
1486
|
|
|
@@ -1308,7 +1502,7 @@ Defined in: [packages/ai-tool/src/res-server-tools.ts:13](https://github.com/isd
|
|
|
1308
1502
|
|
|
1309
1503
|
> **propertyIsEnumerable**(`v`): `boolean`
|
|
1310
1504
|
|
|
1311
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:152
|
|
1505
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:152
|
|
1312
1506
|
|
|
1313
1507
|
Determines whether a specified property is enumerable.
|
|
1314
1508
|
|
|
@@ -1334,7 +1528,7 @@ A property name.
|
|
|
1334
1528
|
|
|
1335
1529
|
> **publishSSE**(`data`, `event`): `any`
|
|
1336
1530
|
|
|
1337
|
-
Defined in: [packages/ai-tool/src/funcs/event-server.ts:
|
|
1531
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-server.ts:65](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/funcs/event-server.ts#L65)
|
|
1338
1532
|
|
|
1339
1533
|
#### Parameters
|
|
1340
1534
|
|
|
@@ -1356,7 +1550,7 @@ Defined in: [packages/ai-tool/src/funcs/event-server.ts:57](https://github.com/i
|
|
|
1356
1550
|
|
|
1357
1551
|
> `optional` **put**(`__namedParameters`): `any`
|
|
1358
1552
|
|
|
1359
|
-
Defined in: [packages/ai-tool/src/res-server-tools.ts:14](https://github.com/isdk/ai-tool.js/blob/
|
|
1553
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/res-server-tools.ts:14](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/res-server-tools.ts#L14)
|
|
1360
1554
|
|
|
1361
1555
|
#### Parameters
|
|
1362
1556
|
|
|
@@ -1378,12 +1572,17 @@ Defined in: [packages/ai-tool/src/res-server-tools.ts:14](https://github.com/isd
|
|
|
1378
1572
|
|
|
1379
1573
|
> **register**(): `boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
1380
1574
|
|
|
1381
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1575
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:602](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L602)
|
|
1576
|
+
|
|
1577
|
+
Registers the current `ToolFunc` instance into the static registry.
|
|
1578
|
+
Also registers any declared dependencies.
|
|
1382
1579
|
|
|
1383
1580
|
#### Returns
|
|
1384
1581
|
|
|
1385
1582
|
`boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
1386
1583
|
|
|
1584
|
+
The instance itself upon successful registration, or `false` if it already exists.
|
|
1585
|
+
|
|
1387
1586
|
#### Inherited from
|
|
1388
1587
|
|
|
1389
1588
|
[`ResServerTools`](ResServerTools.md).[`register`](ResServerTools.md#register)
|
|
@@ -1392,13 +1591,31 @@ Defined in: [packages/ai-tool/src/tool-func.ts:252](https://github.com/isdk/ai-t
|
|
|
1392
1591
|
|
|
1393
1592
|
### run()
|
|
1394
1593
|
|
|
1395
|
-
> **run**(`params`?): `Promise`\<`any`\>
|
|
1594
|
+
> **run**(`params`, `context`?): `Promise`\<`any`\>
|
|
1396
1595
|
|
|
1397
|
-
Defined in: [packages/ai-tool/src/
|
|
1596
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/server-tools.ts:98](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/server-tools.ts#L98)
|
|
1597
|
+
|
|
1598
|
+
Overrides the base `run` method to inject transport-specific context.
|
|
1599
|
+
If a `context` object containing `req` and `reply` is provided, these are
|
|
1600
|
+
added to the parameters as `_req` and `_res` before execution.
|
|
1398
1601
|
|
|
1399
1602
|
#### Parameters
|
|
1400
1603
|
|
|
1401
|
-
##### params
|
|
1604
|
+
##### params
|
|
1605
|
+
|
|
1606
|
+
[`ServerFuncParams`](../interfaces/ServerFuncParams.md)
|
|
1607
|
+
|
|
1608
|
+
The parameters for the function.
|
|
1609
|
+
|
|
1610
|
+
##### context?
|
|
1611
|
+
|
|
1612
|
+
The transport-level context.
|
|
1613
|
+
|
|
1614
|
+
###### reply
|
|
1615
|
+
|
|
1616
|
+
`any`
|
|
1617
|
+
|
|
1618
|
+
###### req
|
|
1402
1619
|
|
|
1403
1620
|
`any`
|
|
1404
1621
|
|
|
@@ -1406,6 +1623,8 @@ Defined in: [packages/ai-tool/src/tool-func.ts:309](https://github.com/isdk/ai-t
|
|
|
1406
1623
|
|
|
1407
1624
|
`Promise`\<`any`\>
|
|
1408
1625
|
|
|
1626
|
+
The result of the function execution.
|
|
1627
|
+
|
|
1409
1628
|
#### Inherited from
|
|
1410
1629
|
|
|
1411
1630
|
[`ResServerTools`](ResServerTools.md).[`run`](ResServerTools.md#run)
|
|
@@ -1416,7 +1635,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:309](https://github.com/isdk/ai-t
|
|
|
1416
1635
|
|
|
1417
1636
|
> **runAs**(`name`, `params`?): `Promise`\<`any`\>
|
|
1418
1637
|
|
|
1419
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1638
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:697](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L697)
|
|
1639
|
+
|
|
1640
|
+
Asynchronously executes another registered function by name.
|
|
1641
|
+
This method delegates to `runAsSync()` internally.
|
|
1420
1642
|
|
|
1421
1643
|
#### Parameters
|
|
1422
1644
|
|
|
@@ -1424,14 +1646,20 @@ Defined in: [packages/ai-tool/src/tool-func.ts:313](https://github.com/isdk/ai-t
|
|
|
1424
1646
|
|
|
1425
1647
|
`string`
|
|
1426
1648
|
|
|
1649
|
+
The name of the target function to run.
|
|
1650
|
+
|
|
1427
1651
|
##### params?
|
|
1428
1652
|
|
|
1429
1653
|
`any`
|
|
1430
1654
|
|
|
1655
|
+
Optional parameters to pass to the function.
|
|
1656
|
+
|
|
1431
1657
|
#### Returns
|
|
1432
1658
|
|
|
1433
1659
|
`Promise`\<`any`\>
|
|
1434
1660
|
|
|
1661
|
+
A promise that resolves with the result of the function execution.
|
|
1662
|
+
|
|
1435
1663
|
#### Inherited from
|
|
1436
1664
|
|
|
1437
1665
|
[`ResServerTools`](ResServerTools.md).[`runAs`](ResServerTools.md#runas)
|
|
@@ -1442,7 +1670,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:313](https://github.com/isdk/ai-t
|
|
|
1442
1670
|
|
|
1443
1671
|
> **runAsSync**(`name`, `params`?): `any`
|
|
1444
1672
|
|
|
1445
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1673
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:708](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L708)
|
|
1674
|
+
|
|
1675
|
+
Synchronously executes another registered function by name.
|
|
1676
|
+
This is a convenience method that forwards the call to the static `runSync()` method.
|
|
1446
1677
|
|
|
1447
1678
|
#### Parameters
|
|
1448
1679
|
|
|
@@ -1450,14 +1681,20 @@ Defined in: [packages/ai-tool/src/tool-func.ts:317](https://github.com/isdk/ai-t
|
|
|
1450
1681
|
|
|
1451
1682
|
`string`
|
|
1452
1683
|
|
|
1684
|
+
The name of the target function to run.
|
|
1685
|
+
|
|
1453
1686
|
##### params?
|
|
1454
1687
|
|
|
1455
1688
|
`any`
|
|
1456
1689
|
|
|
1690
|
+
Optional parameters to pass to the function.
|
|
1691
|
+
|
|
1457
1692
|
#### Returns
|
|
1458
1693
|
|
|
1459
1694
|
`any`
|
|
1460
1695
|
|
|
1696
|
+
The result of the function execution.
|
|
1697
|
+
|
|
1461
1698
|
#### Inherited from
|
|
1462
1699
|
|
|
1463
1700
|
[`ResServerTools`](ResServerTools.md).[`runAsSync`](ResServerTools.md#runassync)
|
|
@@ -1468,7 +1705,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:317](https://github.com/isdk/ai-t
|
|
|
1468
1705
|
|
|
1469
1706
|
> **runSync**(`params`?): `any`
|
|
1470
1707
|
|
|
1471
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1708
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:667](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L667)
|
|
1709
|
+
|
|
1710
|
+
Executes the function synchronously with a named parameters object.
|
|
1472
1711
|
|
|
1473
1712
|
#### Parameters
|
|
1474
1713
|
|
|
@@ -1476,10 +1715,18 @@ Defined in: [packages/ai-tool/src/tool-func.ts:295](https://github.com/isdk/ai-t
|
|
|
1476
1715
|
|
|
1477
1716
|
`any`
|
|
1478
1717
|
|
|
1718
|
+
The parameters object for the function.
|
|
1719
|
+
|
|
1479
1720
|
#### Returns
|
|
1480
1721
|
|
|
1481
1722
|
`any`
|
|
1482
1723
|
|
|
1724
|
+
The result of the function execution.
|
|
1725
|
+
|
|
1726
|
+
#### Throws
|
|
1727
|
+
|
|
1728
|
+
Will throw an error if an array of parameters is passed to a function that expects an object.
|
|
1729
|
+
|
|
1483
1730
|
#### Inherited from
|
|
1484
1731
|
|
|
1485
1732
|
[`ResServerTools`](ResServerTools.md).[`runSync`](ResServerTools.md#runsync)
|
|
@@ -1490,7 +1737,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:295](https://github.com/isdk/ai-t
|
|
|
1490
1737
|
|
|
1491
1738
|
> **runWithPos**(...`params`): `Promise`\<`any`\>
|
|
1492
1739
|
|
|
1493
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1740
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:755](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L755)
|
|
1741
|
+
|
|
1742
|
+
Executes the function asynchronously using positional arguments.
|
|
1743
|
+
Delegates to `runWithPosSync()` internally.
|
|
1494
1744
|
|
|
1495
1745
|
#### Parameters
|
|
1496
1746
|
|
|
@@ -1498,10 +1748,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:338](https://github.com/isdk/ai-t
|
|
|
1498
1748
|
|
|
1499
1749
|
...`any`[]
|
|
1500
1750
|
|
|
1751
|
+
Positional arguments passed to the function.
|
|
1752
|
+
|
|
1501
1753
|
#### Returns
|
|
1502
1754
|
|
|
1503
1755
|
`Promise`\<`any`\>
|
|
1504
1756
|
|
|
1757
|
+
A promise that resolves with the result of the function execution.
|
|
1758
|
+
|
|
1505
1759
|
#### Inherited from
|
|
1506
1760
|
|
|
1507
1761
|
[`ResServerTools`](ResServerTools.md).[`runWithPos`](ResServerTools.md#runwithpos)
|
|
@@ -1512,7 +1766,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:338](https://github.com/isdk/ai-t
|
|
|
1512
1766
|
|
|
1513
1767
|
> **runWithPosAs**(`name`, ...`params`): `Promise`\<`any`\>
|
|
1514
1768
|
|
|
1515
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1769
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:766](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L766)
|
|
1770
|
+
|
|
1771
|
+
Asynchronously executes another function by name using positional arguments.
|
|
1772
|
+
Delegates to `runWithPosAsSync()` internally.
|
|
1516
1773
|
|
|
1517
1774
|
#### Parameters
|
|
1518
1775
|
|
|
@@ -1520,14 +1777,20 @@ Defined in: [packages/ai-tool/src/tool-func.ts:342](https://github.com/isdk/ai-t
|
|
|
1520
1777
|
|
|
1521
1778
|
`string`
|
|
1522
1779
|
|
|
1780
|
+
The name of the target function to run.
|
|
1781
|
+
|
|
1523
1782
|
##### params
|
|
1524
1783
|
|
|
1525
1784
|
...`any`[]
|
|
1526
1785
|
|
|
1786
|
+
Positional arguments to pass to the function.
|
|
1787
|
+
|
|
1527
1788
|
#### Returns
|
|
1528
1789
|
|
|
1529
1790
|
`Promise`\<`any`\>
|
|
1530
1791
|
|
|
1792
|
+
A promise that resolves with the result of the function execution.
|
|
1793
|
+
|
|
1531
1794
|
#### Inherited from
|
|
1532
1795
|
|
|
1533
1796
|
[`ResServerTools`](ResServerTools.md).[`runWithPosAs`](ResServerTools.md#runwithposas)
|
|
@@ -1538,7 +1801,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:342](https://github.com/isdk/ai-t
|
|
|
1538
1801
|
|
|
1539
1802
|
> **runWithPosAsSync**(`name`, ...`params`): `any`
|
|
1540
1803
|
|
|
1541
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1804
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:745](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L745)
|
|
1805
|
+
|
|
1806
|
+
Synchronously executes another function by name using positional arguments.
|
|
1807
|
+
This is a convenience wrapper around the static `runWithPosSync()` method.
|
|
1542
1808
|
|
|
1543
1809
|
#### Parameters
|
|
1544
1810
|
|
|
@@ -1546,14 +1812,20 @@ Defined in: [packages/ai-tool/src/tool-func.ts:334](https://github.com/isdk/ai-t
|
|
|
1546
1812
|
|
|
1547
1813
|
`string`
|
|
1548
1814
|
|
|
1815
|
+
The name of the target function to run.
|
|
1816
|
+
|
|
1549
1817
|
##### params
|
|
1550
1818
|
|
|
1551
1819
|
...`any`[]
|
|
1552
1820
|
|
|
1821
|
+
Positional arguments to pass to the function.
|
|
1822
|
+
|
|
1553
1823
|
#### Returns
|
|
1554
1824
|
|
|
1555
1825
|
`any`
|
|
1556
1826
|
|
|
1827
|
+
The result of the function execution.
|
|
1828
|
+
|
|
1557
1829
|
#### Inherited from
|
|
1558
1830
|
|
|
1559
1831
|
[`ResServerTools`](ResServerTools.md).[`runWithPosAsSync`](ResServerTools.md#runwithposassync)
|
|
@@ -1564,7 +1836,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:334](https://github.com/isdk/ai-t
|
|
|
1564
1836
|
|
|
1565
1837
|
> **runWithPosSync**(...`params`): `any`
|
|
1566
1838
|
|
|
1567
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1839
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:731](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L731)
|
|
1840
|
+
|
|
1841
|
+
Executes the function synchronously using positional arguments.
|
|
1842
|
+
If the function expects named parameters, it converts the arguments automatically.
|
|
1568
1843
|
|
|
1569
1844
|
#### Parameters
|
|
1570
1845
|
|
|
@@ -1572,10 +1847,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:327](https://github.com/isdk/ai-t
|
|
|
1572
1847
|
|
|
1573
1848
|
...`any`[]
|
|
1574
1849
|
|
|
1850
|
+
Positional arguments passed to the function.
|
|
1851
|
+
|
|
1575
1852
|
#### Returns
|
|
1576
1853
|
|
|
1577
1854
|
`any`
|
|
1578
1855
|
|
|
1856
|
+
The result of the function execution.
|
|
1857
|
+
|
|
1579
1858
|
#### Inherited from
|
|
1580
1859
|
|
|
1581
1860
|
[`ResServerTools`](ResServerTools.md).[`runWithPosSync`](ResServerTools.md#runwithpossync)
|
|
@@ -1586,7 +1865,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:327](https://github.com/isdk/ai-t
|
|
|
1586
1865
|
|
|
1587
1866
|
> **subscribeSSE**(`req`, `res`, `events`?): `any`
|
|
1588
1867
|
|
|
1589
|
-
Defined in: [packages/ai-tool/src/funcs/event-server.ts:
|
|
1868
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-server.ts:69](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/funcs/event-server.ts#L69)
|
|
1590
1869
|
|
|
1591
1870
|
#### Parameters
|
|
1592
1871
|
|
|
@@ -1612,7 +1891,7 @@ Defined in: [packages/ai-tool/src/funcs/event-server.ts:61](https://github.com/i
|
|
|
1612
1891
|
|
|
1613
1892
|
> **toJSON**(): `any`
|
|
1614
1893
|
|
|
1615
|
-
Defined in:
|
|
1894
|
+
Defined in: [property-manager.js/src/abstract.d.ts:182](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L182)
|
|
1616
1895
|
|
|
1617
1896
|
#### Returns
|
|
1618
1897
|
|
|
@@ -1628,7 +1907,7 @@ Defined in: node\_modules/.pnpm/property-manager@2.0.0/node\_modules/property-ma
|
|
|
1628
1907
|
|
|
1629
1908
|
> **toLocaleString**(): `string`
|
|
1630
1909
|
|
|
1631
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:131
|
|
1910
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:131
|
|
1632
1911
|
|
|
1633
1912
|
Returns a date converted to a string using the current locale.
|
|
1634
1913
|
|
|
@@ -1646,7 +1925,7 @@ Returns a date converted to a string using the current locale.
|
|
|
1646
1925
|
|
|
1647
1926
|
> **toObject**(`options`?): `any`
|
|
1648
1927
|
|
|
1649
|
-
Defined in:
|
|
1928
|
+
Defined in: [property-manager.js/src/abstract.d.ts:181](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/abstract.d.ts#L181)
|
|
1650
1929
|
|
|
1651
1930
|
Convert the attributes to the json object
|
|
1652
1931
|
|
|
@@ -1672,7 +1951,7 @@ the json object.
|
|
|
1672
1951
|
|
|
1673
1952
|
> **toString**(): `string`
|
|
1674
1953
|
|
|
1675
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:128
|
|
1954
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:128
|
|
1676
1955
|
|
|
1677
1956
|
Returns a string representation of an object.
|
|
1678
1957
|
|
|
@@ -1690,7 +1969,7 @@ Returns a string representation of an object.
|
|
|
1690
1969
|
|
|
1691
1970
|
> **unforward**(`events`): `void`
|
|
1692
1971
|
|
|
1693
|
-
Defined in: [packages/ai-tool/src/funcs/event-server.ts:
|
|
1972
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-server.ts:94](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/funcs/event-server.ts#L94)
|
|
1694
1973
|
|
|
1695
1974
|
#### Parameters
|
|
1696
1975
|
|
|
@@ -1708,12 +1987,16 @@ Defined in: [packages/ai-tool/src/funcs/event-server.ts:80](https://github.com/i
|
|
|
1708
1987
|
|
|
1709
1988
|
> **unregister**(): `any`
|
|
1710
1989
|
|
|
1711
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
1990
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:619](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L619)
|
|
1991
|
+
|
|
1992
|
+
Removes the current `ToolFunc` instance from the static registry.
|
|
1712
1993
|
|
|
1713
1994
|
#### Returns
|
|
1714
1995
|
|
|
1715
1996
|
`any`
|
|
1716
1997
|
|
|
1998
|
+
The instance that was unregistered.
|
|
1999
|
+
|
|
1717
2000
|
#### Inherited from
|
|
1718
2001
|
|
|
1719
2002
|
[`ResServerTools`](ResServerTools.md).[`unregister`](ResServerTools.md#unregister)
|
|
@@ -1724,7 +2007,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:265](https://github.com/isdk/ai-t
|
|
|
1724
2007
|
|
|
1725
2008
|
> **valueOf**(): `Object`
|
|
1726
2009
|
|
|
1727
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:134
|
|
2010
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:134
|
|
1728
2011
|
|
|
1729
2012
|
Returns the primitive value of the specified object.
|
|
1730
2013
|
|
|
@@ -1742,7 +2025,7 @@ Returns the primitive value of the specified object.
|
|
|
1742
2025
|
|
|
1743
2026
|
> `static` **alreadyForward**(`event`): `undefined` \| `true`
|
|
1744
2027
|
|
|
1745
|
-
Defined in: [packages/ai-tool/src/funcs/event-server.ts:
|
|
2028
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-server.ts:58](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/funcs/event-server.ts#L58)
|
|
1746
2029
|
|
|
1747
2030
|
#### Parameters
|
|
1748
2031
|
|
|
@@ -1762,7 +2045,7 @@ Defined in: [packages/ai-tool/src/funcs/event-server.ts:50](https://github.com/i
|
|
|
1762
2045
|
|
|
1763
2046
|
> `static` **assign**\<`T`, `U`\>(`target`, `source`): `T` & `U`
|
|
1764
2047
|
|
|
1765
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:286
|
|
2048
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:286
|
|
1766
2049
|
|
|
1767
2050
|
Copy the values of all of the enumerable own properties from one or more source objects to a
|
|
1768
2051
|
target object. Returns the target object.
|
|
@@ -1799,7 +2082,7 @@ The source object from which to copy properties.
|
|
|
1799
2082
|
|
|
1800
2083
|
> `static` **assign**\<`T`, `U`, `V`\>(`target`, `source1`, `source2`): `T` & `U` & `V`
|
|
1801
2084
|
|
|
1802
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:295
|
|
2085
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:295
|
|
1803
2086
|
|
|
1804
2087
|
Copy the values of all of the enumerable own properties from one or more source objects to a
|
|
1805
2088
|
target object. Returns the target object.
|
|
@@ -1844,7 +2127,7 @@ The second source object from which to copy properties.
|
|
|
1844
2127
|
|
|
1845
2128
|
> `static` **assign**\<`T`, `U`, `V`, `W`\>(`target`, `source1`, `source2`, `source3`): `T` & `U` & `V` & `W`
|
|
1846
2129
|
|
|
1847
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:305
|
|
2130
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:305
|
|
1848
2131
|
|
|
1849
2132
|
Copy the values of all of the enumerable own properties from one or more source objects to a
|
|
1850
2133
|
target object. Returns the target object.
|
|
@@ -1897,7 +2180,7 @@ The third source object from which to copy properties.
|
|
|
1897
2180
|
|
|
1898
2181
|
> `static` **assign**(`target`, ...`sources`): `any`
|
|
1899
2182
|
|
|
1900
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:313
|
|
2183
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:313
|
|
1901
2184
|
|
|
1902
2185
|
Copy the values of all of the enumerable own properties from one or more source objects to a
|
|
1903
2186
|
target object. Returns the target object.
|
|
@@ -1932,7 +2215,7 @@ One or more source objects from which to copy properties
|
|
|
1932
2215
|
|
|
1933
2216
|
> `static` **create**(`o`): `any`
|
|
1934
2217
|
|
|
1935
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:188
|
|
2218
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:188
|
|
1936
2219
|
|
|
1937
2220
|
Creates an object that has the specified prototype or that has null prototype.
|
|
1938
2221
|
|
|
@@ -1956,7 +2239,7 @@ Object to use as a prototype. May be null.
|
|
|
1956
2239
|
|
|
1957
2240
|
> `static` **create**(`o`, `properties`): `any`
|
|
1958
2241
|
|
|
1959
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:195
|
|
2242
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:195
|
|
1960
2243
|
|
|
1961
2244
|
Creates an object that has the specified prototype, and that optionally contains specified properties.
|
|
1962
2245
|
|
|
@@ -1988,7 +2271,7 @@ JavaScript object that contains one or more property descriptors.
|
|
|
1988
2271
|
|
|
1989
2272
|
> `static` **defineProperties**(`aTarget`, `aProperties`, `recreate`?): `any`
|
|
1990
2273
|
|
|
1991
|
-
Defined in:
|
|
2274
|
+
Defined in: [property-manager.js/src/advance.d.ts:11](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/advance.d.ts#L11)
|
|
1992
2275
|
|
|
1993
2276
|
Adds one or more properties to an object, and/or modifies attributes of existing properties.
|
|
1994
2277
|
|
|
@@ -2020,7 +2303,7 @@ Adds one or more properties to an object, and/or modifies attributes of existing
|
|
|
2020
2303
|
|
|
2021
2304
|
> `static` **defineProperty**\<`T`\>(`o`, `p`, `attributes`): `T`
|
|
2022
2305
|
|
|
2023
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:203
|
|
2306
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:203
|
|
2024
2307
|
|
|
2025
2308
|
Adds a property to an object, or modifies attributes of an existing property.
|
|
2026
2309
|
|
|
@@ -2058,13 +2341,35 @@ Descriptor for the property. It can be for a data property or an accessor proper
|
|
|
2058
2341
|
|
|
2059
2342
|
***
|
|
2060
2343
|
|
|
2344
|
+
### ebListener()
|
|
2345
|
+
|
|
2346
|
+
> `static` **ebListener**(`eventType`, ...`data`): `void`
|
|
2347
|
+
|
|
2348
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-server.ts:50](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/funcs/event-server.ts#L50)
|
|
2349
|
+
|
|
2350
|
+
#### Parameters
|
|
2351
|
+
|
|
2352
|
+
##### eventType
|
|
2353
|
+
|
|
2354
|
+
`string`
|
|
2355
|
+
|
|
2356
|
+
##### data
|
|
2357
|
+
|
|
2358
|
+
...`any`[]
|
|
2359
|
+
|
|
2360
|
+
#### Returns
|
|
2361
|
+
|
|
2362
|
+
`void`
|
|
2363
|
+
|
|
2364
|
+
***
|
|
2365
|
+
|
|
2061
2366
|
### entries()
|
|
2062
2367
|
|
|
2063
2368
|
#### Call Signature
|
|
2064
2369
|
|
|
2065
2370
|
> `static` **entries**\<`T`\>(`o`): \[`string`, `T`\][]
|
|
2066
2371
|
|
|
2067
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:36
|
|
2372
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:36
|
|
2068
2373
|
|
|
2069
2374
|
Returns an array of key/values of the enumerable own properties of an object
|
|
2070
2375
|
|
|
@@ -2092,7 +2397,7 @@ Object that contains the properties and methods. This can be an object that you
|
|
|
2092
2397
|
|
|
2093
2398
|
> `static` **entries**(`o`): \[`string`, `any`\][]
|
|
2094
2399
|
|
|
2095
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:42
|
|
2400
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:42
|
|
2096
2401
|
|
|
2097
2402
|
Returns an array of key/values of the enumerable own properties of an object
|
|
2098
2403
|
|
|
@@ -2118,7 +2423,7 @@ Object that contains the properties and methods. This can be an object that you
|
|
|
2118
2423
|
|
|
2119
2424
|
> `static` **freeze**\<`T`\>(`f`): `T`
|
|
2120
2425
|
|
|
2121
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:222
|
|
2426
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:222
|
|
2122
2427
|
|
|
2123
2428
|
Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
|
|
2124
2429
|
|
|
@@ -2146,7 +2451,7 @@ Object on which to lock the attributes.
|
|
|
2146
2451
|
|
|
2147
2452
|
> `static` **freeze**\<`T`, `U`\>(`o`): `Readonly`\<`T`\>
|
|
2148
2453
|
|
|
2149
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:228
|
|
2454
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:228
|
|
2150
2455
|
|
|
2151
2456
|
Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
|
|
2152
2457
|
|
|
@@ -2176,7 +2481,7 @@ Object on which to lock the attributes.
|
|
|
2176
2481
|
|
|
2177
2482
|
> `static` **freeze**\<`T`\>(`o`): `Readonly`\<`T`\>
|
|
2178
2483
|
|
|
2179
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:234
|
|
2484
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:234
|
|
2180
2485
|
|
|
2181
2486
|
Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
|
|
2182
2487
|
|
|
@@ -2208,7 +2513,7 @@ Object on which to lock the attributes.
|
|
|
2208
2513
|
|
|
2209
2514
|
> `static` **fromEntries**\<`T`\>(`entries`): `object`
|
|
2210
2515
|
|
|
2211
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2019.object.d.ts:26
|
|
2516
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2019.object.d.ts:26
|
|
2212
2517
|
|
|
2213
2518
|
Returns an object created by key-value entries for properties and methods
|
|
2214
2519
|
|
|
@@ -2236,7 +2541,7 @@ An iterable object that contains key-value entries for properties and methods.
|
|
|
2236
2541
|
|
|
2237
2542
|
> `static` **fromEntries**(`entries`): `any`
|
|
2238
2543
|
|
|
2239
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2019.object.d.ts:32
|
|
2544
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2019.object.d.ts:32
|
|
2240
2545
|
|
|
2241
2546
|
Returns an object created by key-value entries for properties and methods
|
|
2242
2547
|
|
|
@@ -2262,7 +2567,9 @@ An iterable object that contains key-value entries for properties and methods.
|
|
|
2262
2567
|
|
|
2263
2568
|
> `static` **get**(`name`): [`ToolFunc`](ToolFunc.md)
|
|
2264
2569
|
|
|
2265
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2570
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:319](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L319)
|
|
2571
|
+
|
|
2572
|
+
Retrieves a registered function by its name or alias.
|
|
2266
2573
|
|
|
2267
2574
|
#### Parameters
|
|
2268
2575
|
|
|
@@ -2270,10 +2577,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:61](https://github.com/isdk/ai-to
|
|
|
2270
2577
|
|
|
2271
2578
|
`string`
|
|
2272
2579
|
|
|
2580
|
+
The name or alias of the function to retrieve.
|
|
2581
|
+
|
|
2273
2582
|
#### Returns
|
|
2274
2583
|
|
|
2275
2584
|
[`ToolFunc`](ToolFunc.md)
|
|
2276
2585
|
|
|
2586
|
+
The `ToolFunc` instance if found, otherwise `undefined`.
|
|
2587
|
+
|
|
2277
2588
|
#### Inherited from
|
|
2278
2589
|
|
|
2279
2590
|
[`ResServerTools`](ResServerTools.md).[`get`](ResServerTools.md#get-2)
|
|
@@ -2284,7 +2595,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:61](https://github.com/isdk/ai-to
|
|
|
2284
2595
|
|
|
2285
2596
|
> `static` **getAllByTag**(`tagName`): [`ToolFunc`](ToolFunc.md)[]
|
|
2286
2597
|
|
|
2287
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2598
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:365](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L365)
|
|
2599
|
+
|
|
2600
|
+
Retrieves all registered functions that have a specific tag.
|
|
2288
2601
|
|
|
2289
2602
|
#### Parameters
|
|
2290
2603
|
|
|
@@ -2292,10 +2605,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:93](https://github.com/isdk/ai-to
|
|
|
2292
2605
|
|
|
2293
2606
|
`string`
|
|
2294
2607
|
|
|
2608
|
+
The tag to search for.
|
|
2609
|
+
|
|
2295
2610
|
#### Returns
|
|
2296
2611
|
|
|
2297
2612
|
[`ToolFunc`](ToolFunc.md)[]
|
|
2298
2613
|
|
|
2614
|
+
An array of matching `ToolFunc` instances.
|
|
2615
|
+
|
|
2299
2616
|
#### Inherited from
|
|
2300
2617
|
|
|
2301
2618
|
[`ResServerTools`](ResServerTools.md).[`getAllByTag`](ResServerTools.md#getallbytag)
|
|
@@ -2306,7 +2623,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:93](https://github.com/isdk/ai-to
|
|
|
2306
2623
|
|
|
2307
2624
|
> `static` **getByTag**(`tagName`): `undefined` \| [`ToolFunc`](ToolFunc.md)
|
|
2308
2625
|
|
|
2309
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2626
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:340](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L340)
|
|
2627
|
+
|
|
2628
|
+
Finds the first registered function that has a specific tag.
|
|
2310
2629
|
|
|
2311
2630
|
#### Parameters
|
|
2312
2631
|
|
|
@@ -2314,10 +2633,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:73](https://github.com/isdk/ai-to
|
|
|
2314
2633
|
|
|
2315
2634
|
`string`
|
|
2316
2635
|
|
|
2636
|
+
The tag to search for.
|
|
2637
|
+
|
|
2317
2638
|
#### Returns
|
|
2318
2639
|
|
|
2319
2640
|
`undefined` \| [`ToolFunc`](ToolFunc.md)
|
|
2320
2641
|
|
|
2642
|
+
The first matching `ToolFunc` instance, or `undefined` if none is found.
|
|
2643
|
+
|
|
2321
2644
|
#### Inherited from
|
|
2322
2645
|
|
|
2323
2646
|
[`ResServerTools`](ResServerTools.md).[`getByTag`](ResServerTools.md#getbytag)
|
|
@@ -2328,7 +2651,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:73](https://github.com/isdk/ai-to
|
|
|
2328
2651
|
|
|
2329
2652
|
> `static` **getFunc**(`name`): `any`
|
|
2330
2653
|
|
|
2331
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2654
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:431](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L431)
|
|
2655
|
+
|
|
2656
|
+
Retrieves a bound, runnable function reference for a registered function.
|
|
2657
|
+
This reference is suitable for execution with an object of named parameters.
|
|
2332
2658
|
|
|
2333
2659
|
#### Parameters
|
|
2334
2660
|
|
|
@@ -2336,10 +2662,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:134](https://github.com/isdk/ai-t
|
|
|
2336
2662
|
|
|
2337
2663
|
`string`
|
|
2338
2664
|
|
|
2665
|
+
The name of the function.
|
|
2666
|
+
|
|
2339
2667
|
#### Returns
|
|
2340
2668
|
|
|
2341
2669
|
`any`
|
|
2342
2670
|
|
|
2671
|
+
A bound function reference, or `undefined` if not found.
|
|
2672
|
+
|
|
2343
2673
|
#### Inherited from
|
|
2344
2674
|
|
|
2345
2675
|
[`ResServerTools`](ResServerTools.md).[`getFunc`](ResServerTools.md#getfunc-2)
|
|
@@ -2350,7 +2680,10 @@ Defined in: [packages/ai-tool/src/tool-func.ts:134](https://github.com/isdk/ai-t
|
|
|
2350
2680
|
|
|
2351
2681
|
> `static` **getFuncWithPos**(`name`): `any`
|
|
2352
2682
|
|
|
2353
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2683
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:472](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L472)
|
|
2684
|
+
|
|
2685
|
+
Retrieves a bound, runnable function reference for a registered function.
|
|
2686
|
+
This reference is suitable for execution with positional arguments.
|
|
2354
2687
|
|
|
2355
2688
|
#### Parameters
|
|
2356
2689
|
|
|
@@ -2358,10 +2691,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:155](https://github.com/isdk/ai-t
|
|
|
2358
2691
|
|
|
2359
2692
|
`string`
|
|
2360
2693
|
|
|
2694
|
+
The name of the function.
|
|
2695
|
+
|
|
2361
2696
|
#### Returns
|
|
2362
2697
|
|
|
2363
2698
|
`any`
|
|
2364
2699
|
|
|
2700
|
+
A bound function reference, or `undefined` if not found.
|
|
2701
|
+
|
|
2365
2702
|
#### Inherited from
|
|
2366
2703
|
|
|
2367
2704
|
[`ResServerTools`](ResServerTools.md).[`getFuncWithPos`](ResServerTools.md#getfuncwithpos-2)
|
|
@@ -2372,7 +2709,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:155](https://github.com/isdk/ai-t
|
|
|
2372
2709
|
|
|
2373
2710
|
> `static` **getOwnPropertyDescriptor**(`o`, `p`): `undefined` \| `PropertyDescriptor`
|
|
2374
2711
|
|
|
2375
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:175
|
|
2712
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:175
|
|
2376
2713
|
|
|
2377
2714
|
Gets the own property descriptor of the specified object.
|
|
2378
2715
|
An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.
|
|
@@ -2405,7 +2742,7 @@ Name of the property.
|
|
|
2405
2742
|
|
|
2406
2743
|
> `static` **getOwnPropertyDescriptors**\<`T`\>(`o`): \{ \[P in string \| number \| symbol\]: TypedPropertyDescriptor\<T\[P\]\> \} & `object`
|
|
2407
2744
|
|
|
2408
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:48
|
|
2745
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:48
|
|
2409
2746
|
|
|
2410
2747
|
Returns an object containing all own property descriptors of an object
|
|
2411
2748
|
|
|
@@ -2435,7 +2772,7 @@ Object that contains the properties and methods. This can be an object that you
|
|
|
2435
2772
|
|
|
2436
2773
|
> `static` **getOwnPropertyNames**(`o`): `string`[]
|
|
2437
2774
|
|
|
2438
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:182
|
|
2775
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:182
|
|
2439
2776
|
|
|
2440
2777
|
Returns the names of the own properties of an object. The own properties of an object are those that are defined directly
|
|
2441
2778
|
on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.
|
|
@@ -2462,7 +2799,7 @@ Object that contains the own properties.
|
|
|
2462
2799
|
|
|
2463
2800
|
> `static` **getOwnPropertySymbols**(`o`): `symbol`[]
|
|
2464
2801
|
|
|
2465
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:319
|
|
2802
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:319
|
|
2466
2803
|
|
|
2467
2804
|
Returns an array of all symbol properties found directly on object o.
|
|
2468
2805
|
|
|
@@ -2488,7 +2825,7 @@ Object to retrieve the symbols from.
|
|
|
2488
2825
|
|
|
2489
2826
|
> `static` **getProperties**(): `PropDescriptors`
|
|
2490
2827
|
|
|
2491
|
-
Defined in:
|
|
2828
|
+
Defined in: [property-manager.js/src/advance.d.ts:10](https://github.com/snowyu/property-manager.js/blob/e9ebf4c62be9b6d84e5868ed098df041a53bb90a/src/advance.d.ts#L10)
|
|
2492
2829
|
|
|
2493
2830
|
get all properties descriptor include inherited.
|
|
2494
2831
|
|
|
@@ -2506,7 +2843,7 @@ get all properties descriptor include inherited.
|
|
|
2506
2843
|
|
|
2507
2844
|
> `static` **getPrototypeOf**(`o`): `any`
|
|
2508
2845
|
|
|
2509
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:167
|
|
2846
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:167
|
|
2510
2847
|
|
|
2511
2848
|
Returns the prototype of an object.
|
|
2512
2849
|
|
|
@@ -2532,7 +2869,9 @@ The object that references the prototype.
|
|
|
2532
2869
|
|
|
2533
2870
|
> `static` **hasAsyncFeature**(`feature`): `boolean`
|
|
2534
2871
|
|
|
2535
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
2872
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:388](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L388)
|
|
2873
|
+
|
|
2874
|
+
Checks if any registered function has a specific asynchronous feature.
|
|
2536
2875
|
|
|
2537
2876
|
#### Parameters
|
|
2538
2877
|
|
|
@@ -2540,10 +2879,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:111](https://github.com/isdk/ai-t
|
|
|
2540
2879
|
|
|
2541
2880
|
[`AsyncFeatureBits`](../enumerations/AsyncFeatureBits.md)
|
|
2542
2881
|
|
|
2882
|
+
The async feature bit to check for.
|
|
2883
|
+
|
|
2543
2884
|
#### Returns
|
|
2544
2885
|
|
|
2545
2886
|
`boolean`
|
|
2546
2887
|
|
|
2888
|
+
`true` if the feature is present in any function, otherwise `false`.
|
|
2889
|
+
|
|
2547
2890
|
#### Inherited from
|
|
2548
2891
|
|
|
2549
2892
|
[`ResServerTools`](ResServerTools.md).[`hasAsyncFeature`](ResServerTools.md#hasasyncfeature-2)
|
|
@@ -2554,7 +2897,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:111](https://github.com/isdk/ai-t
|
|
|
2554
2897
|
|
|
2555
2898
|
> `static` **hasOwn**(`o`, `v`): `boolean`
|
|
2556
2899
|
|
|
2557
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2022.object.d.ts:25
|
|
2900
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2022.object.d.ts:25
|
|
2558
2901
|
|
|
2559
2902
|
Determines whether an object has a property with the specified name.
|
|
2560
2903
|
|
|
@@ -2586,7 +2929,7 @@ A property name.
|
|
|
2586
2929
|
|
|
2587
2930
|
> `static` **is**(`value1`, `value2`): `boolean`
|
|
2588
2931
|
|
|
2589
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:332
|
|
2932
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:332
|
|
2590
2933
|
|
|
2591
2934
|
Returns true if the values are the same value, false otherwise.
|
|
2592
2935
|
|
|
@@ -2618,7 +2961,7 @@ The second value.
|
|
|
2618
2961
|
|
|
2619
2962
|
> `static` **isExtensible**(`o`): `boolean`
|
|
2620
2963
|
|
|
2621
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:258
|
|
2964
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:258
|
|
2622
2965
|
|
|
2623
2966
|
Returns a value that indicates whether new properties can be added to an object.
|
|
2624
2967
|
|
|
@@ -2644,7 +2987,7 @@ Object to test.
|
|
|
2644
2987
|
|
|
2645
2988
|
> `static` **isFrozen**(`o`): `boolean`
|
|
2646
2989
|
|
|
2647
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:252
|
|
2990
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:252
|
|
2648
2991
|
|
|
2649
2992
|
Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.
|
|
2650
2993
|
|
|
@@ -2670,7 +3013,7 @@ Object to test.
|
|
|
2670
3013
|
|
|
2671
3014
|
> `static` **isSealed**(`o`): `boolean`
|
|
2672
3015
|
|
|
2673
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:246
|
|
3016
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:246
|
|
2674
3017
|
|
|
2675
3018
|
Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.
|
|
2676
3019
|
|
|
@@ -2698,7 +3041,7 @@ Object to test.
|
|
|
2698
3041
|
|
|
2699
3042
|
> `static` **keys**(`o`): `string`[]
|
|
2700
3043
|
|
|
2701
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:264
|
|
3044
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:264
|
|
2702
3045
|
|
|
2703
3046
|
Returns the names of the enumerable string properties and methods of an object.
|
|
2704
3047
|
|
|
@@ -2722,7 +3065,7 @@ Object that contains the properties and methods. This can be an object that you
|
|
|
2722
3065
|
|
|
2723
3066
|
> `static` **keys**(`o`): `string`[]
|
|
2724
3067
|
|
|
2725
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:325
|
|
3068
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:325
|
|
2726
3069
|
|
|
2727
3070
|
Returns the names of the enumerable string properties and methods of an object.
|
|
2728
3071
|
|
|
@@ -2746,12 +3089,16 @@ Object that contains the properties and methods. This can be an object that you
|
|
|
2746
3089
|
|
|
2747
3090
|
> `static` **list**(): [`Funcs`](../interfaces/Funcs.md)
|
|
2748
3091
|
|
|
2749
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
3092
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:331](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L331)
|
|
3093
|
+
|
|
3094
|
+
Returns the complete map of all registered functions.
|
|
2750
3095
|
|
|
2751
3096
|
#### Returns
|
|
2752
3097
|
|
|
2753
3098
|
[`Funcs`](../interfaces/Funcs.md)
|
|
2754
3099
|
|
|
3100
|
+
The map of `ToolFunc` instances.
|
|
3101
|
+
|
|
2755
3102
|
#### Inherited from
|
|
2756
3103
|
|
|
2757
3104
|
[`ResServerTools`](ResServerTools.md).[`list`](ResServerTools.md#list-2)
|
|
@@ -2762,7 +3109,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:69](https://github.com/isdk/ai-to
|
|
|
2762
3109
|
|
|
2763
3110
|
> `static` **preventExtensions**\<`T`\>(`o`): `T`
|
|
2764
3111
|
|
|
2765
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:240
|
|
3112
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:240
|
|
2766
3113
|
|
|
2767
3114
|
Prevents the addition of new properties to an object.
|
|
2768
3115
|
|
|
@@ -2790,9 +3137,9 @@ Object to make non-extensible.
|
|
|
2790
3137
|
|
|
2791
3138
|
### publish()
|
|
2792
3139
|
|
|
2793
|
-
> `static` **publish**(`data`, `event`): `undefined` \| `
|
|
3140
|
+
> `static` **publish**(`data`, `event`, `target`?): `undefined` \| `void`
|
|
2794
3141
|
|
|
2795
|
-
Defined in: [packages/ai-tool/src/funcs/event-server.ts:
|
|
3142
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-server.ts:43](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/funcs/event-server.ts#L43)
|
|
2796
3143
|
|
|
2797
3144
|
#### Parameters
|
|
2798
3145
|
|
|
@@ -2804,9 +3151,15 @@ Defined in: [packages/ai-tool/src/funcs/event-server.ts:36](https://github.com/i
|
|
|
2804
3151
|
|
|
2805
3152
|
`string`
|
|
2806
3153
|
|
|
3154
|
+
##### target?
|
|
3155
|
+
|
|
3156
|
+
###### clientId?
|
|
3157
|
+
|
|
3158
|
+
`string` \| `string`[]
|
|
3159
|
+
|
|
2807
3160
|
#### Returns
|
|
2808
3161
|
|
|
2809
|
-
`undefined` \| `
|
|
3162
|
+
`undefined` \| `void`
|
|
2810
3163
|
|
|
2811
3164
|
***
|
|
2812
3165
|
|
|
@@ -2816,7 +3169,9 @@ Defined in: [packages/ai-tool/src/funcs/event-server.ts:36](https://github.com/i
|
|
|
2816
3169
|
|
|
2817
3170
|
> `static` **register**(`name`, `options`): `boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2818
3171
|
|
|
2819
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
3172
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:495](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L495)
|
|
3173
|
+
|
|
3174
|
+
Registers a new tool function.
|
|
2820
3175
|
|
|
2821
3176
|
##### Parameters
|
|
2822
3177
|
|
|
@@ -2824,14 +3179,24 @@ Defined in: [packages/ai-tool/src/tool-func.ts:160](https://github.com/isdk/ai-t
|
|
|
2824
3179
|
|
|
2825
3180
|
`string`
|
|
2826
3181
|
|
|
3182
|
+
The name of the function.
|
|
3183
|
+
|
|
2827
3184
|
###### options
|
|
2828
3185
|
|
|
2829
3186
|
[`FuncItem`](../interfaces/FuncItem.md)
|
|
2830
3187
|
|
|
3188
|
+
The function's configuration.
|
|
3189
|
+
|
|
2831
3190
|
##### Returns
|
|
2832
3191
|
|
|
2833
3192
|
`boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2834
3193
|
|
|
3194
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
3195
|
+
|
|
3196
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
3197
|
+
|
|
3198
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
3199
|
+
|
|
2835
3200
|
##### Inherited from
|
|
2836
3201
|
|
|
2837
3202
|
[`ResServerTools`](ResServerTools.md).[`register`](ResServerTools.md#register-2)
|
|
@@ -2840,7 +3205,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:160](https://github.com/isdk/ai-t
|
|
|
2840
3205
|
|
|
2841
3206
|
> `static` **register**(`func`, `options`): `boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2842
3207
|
|
|
2843
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
3208
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:496](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L496)
|
|
3209
|
+
|
|
3210
|
+
Registers a new tool function.
|
|
2844
3211
|
|
|
2845
3212
|
##### Parameters
|
|
2846
3213
|
|
|
@@ -2848,14 +3215,24 @@ Defined in: [packages/ai-tool/src/tool-func.ts:161](https://github.com/isdk/ai-t
|
|
|
2848
3215
|
|
|
2849
3216
|
`Function`
|
|
2850
3217
|
|
|
3218
|
+
The function implementation.
|
|
3219
|
+
|
|
2851
3220
|
###### options
|
|
2852
3221
|
|
|
2853
3222
|
[`FuncItem`](../interfaces/FuncItem.md)
|
|
2854
3223
|
|
|
3224
|
+
The function's configuration.
|
|
3225
|
+
|
|
2855
3226
|
##### Returns
|
|
2856
3227
|
|
|
2857
3228
|
`boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2858
3229
|
|
|
3230
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
3231
|
+
|
|
3232
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
3233
|
+
|
|
3234
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
3235
|
+
|
|
2859
3236
|
##### Inherited from
|
|
2860
3237
|
|
|
2861
3238
|
[`ResServerTools`](ResServerTools.md).[`register`](ResServerTools.md#register-2)
|
|
@@ -2864,22 +3241,34 @@ Defined in: [packages/ai-tool/src/tool-func.ts:161](https://github.com/isdk/ai-t
|
|
|
2864
3241
|
|
|
2865
3242
|
> `static` **register**(`name`, `options`?): `boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2866
3243
|
|
|
2867
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
3244
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:497](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L497)
|
|
3245
|
+
|
|
3246
|
+
Registers a new tool function.
|
|
2868
3247
|
|
|
2869
3248
|
##### Parameters
|
|
2870
3249
|
|
|
2871
3250
|
###### name
|
|
2872
3251
|
|
|
3252
|
+
The name of the function.
|
|
3253
|
+
|
|
2873
3254
|
`string` | `Function` | [`ToolFunc`](ToolFunc.md) | [`FuncItem`](../interfaces/FuncItem.md)
|
|
2874
3255
|
|
|
2875
3256
|
###### options?
|
|
2876
3257
|
|
|
2877
3258
|
[`FuncItem`](../interfaces/FuncItem.md)
|
|
2878
3259
|
|
|
3260
|
+
The function's configuration.
|
|
3261
|
+
|
|
2879
3262
|
##### Returns
|
|
2880
3263
|
|
|
2881
3264
|
`boolean` \| [`ToolFunc`](ToolFunc.md)
|
|
2882
3265
|
|
|
3266
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
3267
|
+
|
|
3268
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
3269
|
+
|
|
3270
|
+
The new `ToolFunc` instance, or `false` if a function with that name already exists.
|
|
3271
|
+
|
|
2883
3272
|
##### Inherited from
|
|
2884
3273
|
|
|
2885
3274
|
[`ResServerTools`](ResServerTools.md).[`register`](ResServerTools.md#register-2)
|
|
@@ -2890,7 +3279,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:162](https://github.com/isdk/ai-t
|
|
|
2890
3279
|
|
|
2891
3280
|
> `static` **run**(`name`, `params`?): `Promise`\<`any`\>
|
|
2892
3281
|
|
|
2893
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
3282
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:402](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L402)
|
|
3283
|
+
|
|
3284
|
+
Asynchronously executes a registered function by name with named parameters.
|
|
2894
3285
|
|
|
2895
3286
|
#### Parameters
|
|
2896
3287
|
|
|
@@ -2898,14 +3289,24 @@ Defined in: [packages/ai-tool/src/tool-func.ts:118](https://github.com/isdk/ai-t
|
|
|
2898
3289
|
|
|
2899
3290
|
`string`
|
|
2900
3291
|
|
|
3292
|
+
The name of the function to run.
|
|
3293
|
+
|
|
2901
3294
|
##### params?
|
|
2902
3295
|
|
|
2903
3296
|
`any`
|
|
2904
3297
|
|
|
3298
|
+
The parameters object for the function.
|
|
3299
|
+
|
|
2905
3300
|
#### Returns
|
|
2906
3301
|
|
|
2907
3302
|
`Promise`\<`any`\>
|
|
2908
3303
|
|
|
3304
|
+
A promise that resolves with the function's result.
|
|
3305
|
+
|
|
3306
|
+
#### Throws
|
|
3307
|
+
|
|
3308
|
+
If the function with the given name is not found.
|
|
3309
|
+
|
|
2909
3310
|
#### Inherited from
|
|
2910
3311
|
|
|
2911
3312
|
[`ResServerTools`](ResServerTools.md).[`run`](ResServerTools.md#run-2)
|
|
@@ -2916,7 +3317,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:118](https://github.com/isdk/ai-t
|
|
|
2916
3317
|
|
|
2917
3318
|
> `static` **runSync**(`name`, `params`?): `any`
|
|
2918
3319
|
|
|
2919
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
3320
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:417](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L417)
|
|
3321
|
+
|
|
3322
|
+
Synchronously executes a registered function by name with named parameters.
|
|
2920
3323
|
|
|
2921
3324
|
#### Parameters
|
|
2922
3325
|
|
|
@@ -2924,14 +3327,24 @@ Defined in: [packages/ai-tool/src/tool-func.ts:126](https://github.com/isdk/ai-t
|
|
|
2924
3327
|
|
|
2925
3328
|
`string`
|
|
2926
3329
|
|
|
3330
|
+
The name of the function to run.
|
|
3331
|
+
|
|
2927
3332
|
##### params?
|
|
2928
3333
|
|
|
2929
3334
|
`any`
|
|
2930
3335
|
|
|
3336
|
+
The parameters object for the function.
|
|
3337
|
+
|
|
2931
3338
|
#### Returns
|
|
2932
3339
|
|
|
2933
3340
|
`any`
|
|
2934
3341
|
|
|
3342
|
+
The result of the function's execution.
|
|
3343
|
+
|
|
3344
|
+
#### Throws
|
|
3345
|
+
|
|
3346
|
+
If the function with the given name is not found.
|
|
3347
|
+
|
|
2935
3348
|
#### Inherited from
|
|
2936
3349
|
|
|
2937
3350
|
[`ResServerTools`](ResServerTools.md).[`runSync`](ResServerTools.md#runsync-2)
|
|
@@ -2942,7 +3355,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:126](https://github.com/isdk/ai-t
|
|
|
2942
3355
|
|
|
2943
3356
|
> `static` **runWithPos**(`name`, ...`params`): `Promise`\<`any`\>
|
|
2944
3357
|
|
|
2945
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
3358
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:443](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L443)
|
|
3359
|
+
|
|
3360
|
+
Asynchronously executes a function using positional arguments.
|
|
2946
3361
|
|
|
2947
3362
|
#### Parameters
|
|
2948
3363
|
|
|
@@ -2950,14 +3365,24 @@ Defined in: [packages/ai-tool/src/tool-func.ts:139](https://github.com/isdk/ai-t
|
|
|
2950
3365
|
|
|
2951
3366
|
`string`
|
|
2952
3367
|
|
|
3368
|
+
The name of the function to run.
|
|
3369
|
+
|
|
2953
3370
|
##### params
|
|
2954
3371
|
|
|
2955
3372
|
...`any`[]
|
|
2956
3373
|
|
|
3374
|
+
Positional arguments to pass to the function.
|
|
3375
|
+
|
|
2957
3376
|
#### Returns
|
|
2958
3377
|
|
|
2959
3378
|
`Promise`\<`any`\>
|
|
2960
3379
|
|
|
3380
|
+
A promise that resolves with the function's result.
|
|
3381
|
+
|
|
3382
|
+
#### Throws
|
|
3383
|
+
|
|
3384
|
+
If the function with the given name is not found.
|
|
3385
|
+
|
|
2961
3386
|
#### Inherited from
|
|
2962
3387
|
|
|
2963
3388
|
[`ResServerTools`](ResServerTools.md).[`runWithPos`](ResServerTools.md#runwithpos-2)
|
|
@@ -2968,7 +3393,9 @@ Defined in: [packages/ai-tool/src/tool-func.ts:139](https://github.com/isdk/ai-t
|
|
|
2968
3393
|
|
|
2969
3394
|
> `static` **runWithPosSync**(`name`, ...`params`): `any`
|
|
2970
3395
|
|
|
2971
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
3396
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:458](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L458)
|
|
3397
|
+
|
|
3398
|
+
Synchronously executes a function using positional arguments.
|
|
2972
3399
|
|
|
2973
3400
|
#### Parameters
|
|
2974
3401
|
|
|
@@ -2976,14 +3403,24 @@ Defined in: [packages/ai-tool/src/tool-func.ts:147](https://github.com/isdk/ai-t
|
|
|
2976
3403
|
|
|
2977
3404
|
`string`
|
|
2978
3405
|
|
|
3406
|
+
The name of the function to run.
|
|
3407
|
+
|
|
2979
3408
|
##### params
|
|
2980
3409
|
|
|
2981
3410
|
...`any`[]
|
|
2982
3411
|
|
|
3412
|
+
Positional arguments to pass to the function.
|
|
3413
|
+
|
|
2983
3414
|
#### Returns
|
|
2984
3415
|
|
|
2985
3416
|
`any`
|
|
2986
3417
|
|
|
3418
|
+
The result of the function's execution.
|
|
3419
|
+
|
|
3420
|
+
#### Throws
|
|
3421
|
+
|
|
3422
|
+
If the function with the given name is not found.
|
|
3423
|
+
|
|
2987
3424
|
#### Inherited from
|
|
2988
3425
|
|
|
2989
3426
|
[`ResServerTools`](ResServerTools.md).[`runWithPosSync`](ResServerTools.md#runwithpossync-2)
|
|
@@ -2994,7 +3431,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:147](https://github.com/isdk/ai-t
|
|
|
2994
3431
|
|
|
2995
3432
|
> `static` **seal**\<`T`\>(`o`): `T`
|
|
2996
3433
|
|
|
2997
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:216
|
|
3434
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:216
|
|
2998
3435
|
|
|
2999
3436
|
Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
|
|
3000
3437
|
|
|
@@ -3024,7 +3461,7 @@ Object on which to lock the attributes.
|
|
|
3024
3461
|
|
|
3025
3462
|
> `static` **setApiRoot**(`v`): `void`
|
|
3026
3463
|
|
|
3027
|
-
Defined in: [packages/ai-tool/src/server-tools.ts:
|
|
3464
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/server-tools.ts:61](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/server-tools.ts#L61)
|
|
3028
3465
|
|
|
3029
3466
|
#### Parameters
|
|
3030
3467
|
|
|
@@ -3046,7 +3483,7 @@ Defined in: [packages/ai-tool/src/server-tools.ts:30](https://github.com/isdk/ai
|
|
|
3046
3483
|
|
|
3047
3484
|
> `static` **setPrototypeOf**(`o`, `proto`): `any`
|
|
3048
3485
|
|
|
3049
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:339
|
|
3486
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:339
|
|
3050
3487
|
|
|
3051
3488
|
Sets the prototype of a specified object o to object proto or null. Returns the object o.
|
|
3052
3489
|
|
|
@@ -3074,11 +3511,29 @@ The value of the new prototype or null.
|
|
|
3074
3511
|
|
|
3075
3512
|
***
|
|
3076
3513
|
|
|
3514
|
+
### setPubSubTransport()
|
|
3515
|
+
|
|
3516
|
+
> `static` **setPubSubTransport**(`t`?): `void`
|
|
3517
|
+
|
|
3518
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-server.ts:24](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/funcs/event-server.ts#L24)
|
|
3519
|
+
|
|
3520
|
+
#### Parameters
|
|
3521
|
+
|
|
3522
|
+
##### t?
|
|
3523
|
+
|
|
3524
|
+
[`IPubSubServerTransport`](../interfaces/IPubSubServerTransport.md)
|
|
3525
|
+
|
|
3526
|
+
#### Returns
|
|
3527
|
+
|
|
3528
|
+
`void`
|
|
3529
|
+
|
|
3530
|
+
***
|
|
3531
|
+
|
|
3077
3532
|
### subscribe()
|
|
3078
3533
|
|
|
3079
|
-
> `static` **subscribe**(`req`, `res`, `events`?): `
|
|
3534
|
+
> `static` **subscribe**(`req`, `res`, `events`?, `options`?): `undefined` \| [`PubSubClient`](../interfaces/PubSubClient.md)
|
|
3080
3535
|
|
|
3081
|
-
Defined in: [packages/ai-tool/src/funcs/event-server.ts:
|
|
3536
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/funcs/event-server.ts:54](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/funcs/event-server.ts#L54)
|
|
3082
3537
|
|
|
3083
3538
|
#### Parameters
|
|
3084
3539
|
|
|
@@ -3094,21 +3549,13 @@ Defined in: [packages/ai-tool/src/funcs/event-server.ts:46](https://github.com/i
|
|
|
3094
3549
|
|
|
3095
3550
|
`string`[]
|
|
3096
3551
|
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
`object`
|
|
3100
|
-
|
|
3101
|
-
##### events
|
|
3102
|
-
|
|
3103
|
-
> **events**: `undefined` \| `Events`
|
|
3104
|
-
|
|
3105
|
-
##### req
|
|
3552
|
+
##### options?
|
|
3106
3553
|
|
|
3107
|
-
|
|
3554
|
+
`any`
|
|
3108
3555
|
|
|
3109
|
-
|
|
3556
|
+
#### Returns
|
|
3110
3557
|
|
|
3111
|
-
|
|
3558
|
+
`undefined` \| [`PubSubClient`](../interfaces/PubSubClient.md)
|
|
3112
3559
|
|
|
3113
3560
|
***
|
|
3114
3561
|
|
|
@@ -3116,12 +3563,20 @@ Defined in: [packages/ai-tool/src/funcs/event-server.ts:46](https://github.com/i
|
|
|
3116
3563
|
|
|
3117
3564
|
> `static` **toJSON**(): `object`
|
|
3118
3565
|
|
|
3119
|
-
Defined in: [packages/ai-tool/src/server-tools.ts:
|
|
3566
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/server-tools.ts:74](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/server-tools.ts#L74)
|
|
3567
|
+
|
|
3568
|
+
Serializes all registered `ServerTools` instances into a JSON object.
|
|
3569
|
+
This method is typically called by a transport's discovery endpoint.
|
|
3570
|
+
|
|
3571
|
+
It filters for tools that are instances of `ServerTools` or marked as `isApi`.
|
|
3572
|
+
It omits the `func` body from the output unless `allowExportFunc` is true.
|
|
3120
3573
|
|
|
3121
3574
|
#### Returns
|
|
3122
3575
|
|
|
3123
3576
|
`object`
|
|
3124
3577
|
|
|
3578
|
+
A map of serializable tool definitions.
|
|
3579
|
+
|
|
3125
3580
|
#### Inherited from
|
|
3126
3581
|
|
|
3127
3582
|
[`ResServerTools`](ResServerTools.md).[`toJSON`](ResServerTools.md#tojson-2)
|
|
@@ -3132,7 +3587,9 @@ Defined in: [packages/ai-tool/src/server-tools.ts:44](https://github.com/isdk/ai
|
|
|
3132
3587
|
|
|
3133
3588
|
> `static` **unregister**(`name`): `undefined` \| [`ToolFunc`](ToolFunc.md)
|
|
3134
3589
|
|
|
3135
|
-
Defined in: [packages/ai-tool/src/tool-func.ts:
|
|
3590
|
+
Defined in: [@isdk/ai-tools/packages/ai-tool/src/tool-func.ts:547](https://github.com/isdk/ai-tool.js/blob/4ebf370aaec9c78535cb40ffc19656d7bddcb145/src/tool-func.ts#L547)
|
|
3591
|
+
|
|
3592
|
+
Unregisters a function by its name, also removing any associated aliases.
|
|
3136
3593
|
|
|
3137
3594
|
#### Parameters
|
|
3138
3595
|
|
|
@@ -3140,10 +3597,14 @@ Defined in: [packages/ai-tool/src/tool-func.ts:207](https://github.com/isdk/ai-t
|
|
|
3140
3597
|
|
|
3141
3598
|
`string`
|
|
3142
3599
|
|
|
3600
|
+
The name of the function to unregister.
|
|
3601
|
+
|
|
3143
3602
|
#### Returns
|
|
3144
3603
|
|
|
3145
3604
|
`undefined` \| [`ToolFunc`](ToolFunc.md)
|
|
3146
3605
|
|
|
3606
|
+
The unregistered `ToolFunc` instance, or `undefined` if it was not found.
|
|
3607
|
+
|
|
3147
3608
|
#### Inherited from
|
|
3148
3609
|
|
|
3149
3610
|
[`ResServerTools`](ResServerTools.md).[`unregister`](ResServerTools.md#unregister-2)
|
|
@@ -3156,7 +3617,7 @@ Defined in: [packages/ai-tool/src/tool-func.ts:207](https://github.com/isdk/ai-t
|
|
|
3156
3617
|
|
|
3157
3618
|
> `static` **values**\<`T`\>(`o`): `T`[]
|
|
3158
3619
|
|
|
3159
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:24
|
|
3620
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:24
|
|
3160
3621
|
|
|
3161
3622
|
Returns an array of values of the enumerable own properties of an object
|
|
3162
3623
|
|
|
@@ -3184,7 +3645,7 @@ Object that contains the properties and methods. This can be an object that you
|
|
|
3184
3645
|
|
|
3185
3646
|
> `static` **values**(`o`): `any`[]
|
|
3186
3647
|
|
|
3187
|
-
Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:30
|
|
3648
|
+
Defined in: @isdk/ai-tools/node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:30
|
|
3188
3649
|
|
|
3189
3650
|
Returns an array of values of the enumerable own properties of an object
|
|
3190
3651
|
|