@dudousxd/nestjs-agent 1.8.0 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { DynamicModule, OnModuleInit, Type, OnApplicationBootstrap } from '@nestjs/common';
2
- import { b as AgentModuleOptions, c as AgentModuleAsyncOptions, A as AgentDepsFactory, d as AgentSkillsOptions } from './agent-deps.factory-Cus_RqwJ.cjs';
3
- export { e as AGENT_TOOL_BRAND, f as AgentAttachmentsOptions, g as AgentDeps, h as AgentMemoryOptions, a as AgentSurface, F as FunctionalTool, L as LedgerQuotaProvider, Q as QuotaLimits, i as QuotaWindowLimits, j as delegateToolName, p as provideAgentTool, u as utcDay } from './agent-deps.factory-Cus_RqwJ.cjs';
2
+ import { b as AgentModuleOptions, c as AgentModuleAsyncOptions, A as AgentDepsFactory, d as AgentSkillsOptions } from './agent-deps.factory-DuTy1UyU.cjs';
3
+ export { e as AGENT_TOOL_BRAND, f as AgentAttachmentsOptions, g as AgentDeps, h as AgentMemoryOptions, a as AgentSurface, F as FunctionalTool, L as LedgerQuotaProvider, Q as QuotaLimits, i as QuotaWindowLimits, j as delegateToolName, p as provideAgentTool, k as provideAgentTools, u as utcDay } from './agent-deps.factory-DuTy1UyU.cjs';
4
4
  import { AgentRunner, AgentStore, QuotaStore, AttachmentStagingStore, ModelCatalog, QuotaProvider, Actor, QuotaReport, ModelCatalogView, AttachmentRef, PageContext, HumanReply, ThreadSummary, ThreadDetail, UpdateThreadInput, MessageFeedbackValue, MessageFeedback, StagedAttachment, QuotaView, AgentApprovalPort, ActorResolver, MessageAttachment, ToolPresentation, AgentHistoryWindow, AgentIntake, SkillContext, ToolRegistry, AgentRegistry, PromptContributor, SkillsConfig, SkillCatalogEntry, ToolCatalogEntry, MemoryConfig, MemoryDigestEntry, SkillProvider, AgentRunInput, TokenStreamSink, SinkWriter, QuotaState } from '@dudousxd/nestjs-agent-core';
5
5
  export * from '@dudousxd/nestjs-agent-core';
6
6
  import { Request } from 'express';
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { DynamicModule, OnModuleInit, Type, OnApplicationBootstrap } from '@nestjs/common';
2
- import { b as AgentModuleOptions, c as AgentModuleAsyncOptions, A as AgentDepsFactory, d as AgentSkillsOptions } from './agent-deps.factory-Cus_RqwJ.js';
3
- export { e as AGENT_TOOL_BRAND, f as AgentAttachmentsOptions, g as AgentDeps, h as AgentMemoryOptions, a as AgentSurface, F as FunctionalTool, L as LedgerQuotaProvider, Q as QuotaLimits, i as QuotaWindowLimits, j as delegateToolName, p as provideAgentTool, u as utcDay } from './agent-deps.factory-Cus_RqwJ.js';
2
+ import { b as AgentModuleOptions, c as AgentModuleAsyncOptions, A as AgentDepsFactory, d as AgentSkillsOptions } from './agent-deps.factory-DuTy1UyU.js';
3
+ export { e as AGENT_TOOL_BRAND, f as AgentAttachmentsOptions, g as AgentDeps, h as AgentMemoryOptions, a as AgentSurface, F as FunctionalTool, L as LedgerQuotaProvider, Q as QuotaLimits, i as QuotaWindowLimits, j as delegateToolName, p as provideAgentTool, k as provideAgentTools, u as utcDay } from './agent-deps.factory-DuTy1UyU.js';
4
4
  import { AgentRunner, AgentStore, QuotaStore, AttachmentStagingStore, ModelCatalog, QuotaProvider, Actor, QuotaReport, ModelCatalogView, AttachmentRef, PageContext, HumanReply, ThreadSummary, ThreadDetail, UpdateThreadInput, MessageFeedbackValue, MessageFeedback, StagedAttachment, QuotaView, AgentApprovalPort, ActorResolver, MessageAttachment, ToolPresentation, AgentHistoryWindow, AgentIntake, SkillContext, ToolRegistry, AgentRegistry, PromptContributor, SkillsConfig, SkillCatalogEntry, ToolCatalogEntry, MemoryConfig, MemoryDigestEntry, SkillProvider, AgentRunInput, TokenStreamSink, SinkWriter, QuotaState } from '@dudousxd/nestjs-agent-core';
5
5
  export * from '@dudousxd/nestjs-agent-core';
6
6
  import { Request } from 'express';
package/dist/index.js CHANGED
@@ -2692,6 +2692,14 @@ function provideAgentTool(factoryOrTool, inject) {
2692
2692
  };
2693
2693
  }
2694
2694
  __name(provideAgentTool, "provideAgentTool");
2695
+ function provideAgentTools(factory, inject) {
2696
+ return {
2697
+ provide: /* @__PURE__ */ Symbol("nestjs-agent:functional-tool-list"),
2698
+ useFactory: /* @__PURE__ */ __name(async (...deps) => (await factory(...deps)).map(brand), "useFactory"),
2699
+ inject: inject ?? []
2700
+ };
2701
+ }
2702
+ __name(provideAgentTools, "provideAgentTools");
2695
2703
 
2696
2704
  // src/discovery/ai-tool-discovery.service.ts
2697
2705
  function _ts_decorate16(decorators, target, key, desc) {
@@ -2743,6 +2751,14 @@ var AiToolDiscoveryService = class _AiToolDiscoveryService {
2743
2751
  if (instance === null || instance === void 0 || typeof instance !== "object") {
2744
2752
  continue;
2745
2753
  }
2754
+ if (Array.isArray(instance) && instance.length > 0 && instance.every((each) => typeof each === "object" && each !== null && isBrandedFunctionalTool(each))) {
2755
+ for (const tool of instance) {
2756
+ if (this.registerFunctionalTool(tool)) {
2757
+ functional += 1;
2758
+ }
2759
+ }
2760
+ continue;
2761
+ }
2746
2762
  if (isBrandedFunctionalTool(instance)) {
2747
2763
  if (this.registerFunctionalTool(instance)) {
2748
2764
  functional += 1;
@@ -2790,6 +2806,9 @@ var AiToolDiscoveryService = class _AiToolDiscoveryService {
2790
2806
  } : {},
2791
2807
  ...typeof handler.canUse === "function" ? {
2792
2808
  canUse: /* @__PURE__ */ __name((actor) => instance.canUse(actor), "canUse")
2809
+ } : {},
2810
+ ...typeof handler.describe === "function" ? {
2811
+ describe: /* @__PURE__ */ __name((scope) => instance.describe(scope), "describe")
2793
2812
  } : {}
2794
2813
  });
2795
2814
  count += 1;
@@ -3962,6 +3981,7 @@ export {
3962
3981
  declaredSkillProvider,
3963
3982
  delegateToolName,
3964
3983
  provideAgentTool,
3984
+ provideAgentTools,
3965
3985
  readAgentMetadata,
3966
3986
  readAiToolMetadata,
3967
3987
  readSkillMetadata,