@dudousxd/nestjs-agent 0.13.0 → 1.0.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-y2hvoQ6U.cjs';
3
- export { e as AGENT_TOOL_BRAND, f as AgentAttachmentsOptions, g as AgentDeps, h as AgentMemoryOptions, a as AgentSurface, F as FunctionalTool, i as delegateToolName, p as provideAgentTool, u as utcDay } from './agent-deps.factory-y2hvoQ6U.cjs';
2
+ import { b as AgentModuleOptions, c as AgentModuleAsyncOptions, A as AgentDepsFactory, d as AgentSkillsOptions } from './agent-deps.factory-OjrLyAZo.cjs';
3
+ export { e as AGENT_TOOL_BRAND, f as AgentAttachmentsOptions, g as AgentDeps, h as AgentMemoryOptions, a as AgentSurface, F as FunctionalTool, i as delegateToolName, p as provideAgentTool, u as utcDay } from './agent-deps.factory-OjrLyAZo.cjs';
4
4
  import { AgentRunner, AgentStore, QuotaStore, AttachmentStagingStore, Actor, AttachmentRef, PageContext, HumanReply, ThreadSummary, ThreadDetail, UpdateThreadInput, StagedAttachment, QuotaView, AgentApprovalPort, ActorResolver, MessageAttachment, AgentHistoryWindow, AgentIntake, SkillContext, ToolRegistry, AgentRegistry, PromptContributor, SkillsConfig, SkillCatalogEntry, 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';
@@ -472,7 +472,7 @@ interface SkillOptions {
472
472
  description: string;
473
473
  /**
474
474
  * The scope token this skill is published at. Omit → `'global'`, the deployment-wide default. Any
475
- * string a host's `ScopeResolver` can return works: `'tenant:base-7'`, `'sector:logistics'`.
475
+ * string a host's `ScopeResolver` can return works: `'tenant:berlin'`, `'sector:logistics'`.
476
476
  */
477
477
  scope?: string;
478
478
  /** A flat body. For one built per actor or per page, add a `body()` method instead. */
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-y2hvoQ6U.js';
3
- export { e as AGENT_TOOL_BRAND, f as AgentAttachmentsOptions, g as AgentDeps, h as AgentMemoryOptions, a as AgentSurface, F as FunctionalTool, i as delegateToolName, p as provideAgentTool, u as utcDay } from './agent-deps.factory-y2hvoQ6U.js';
2
+ import { b as AgentModuleOptions, c as AgentModuleAsyncOptions, A as AgentDepsFactory, d as AgentSkillsOptions } from './agent-deps.factory-OjrLyAZo.js';
3
+ export { e as AGENT_TOOL_BRAND, f as AgentAttachmentsOptions, g as AgentDeps, h as AgentMemoryOptions, a as AgentSurface, F as FunctionalTool, i as delegateToolName, p as provideAgentTool, u as utcDay } from './agent-deps.factory-OjrLyAZo.js';
4
4
  import { AgentRunner, AgentStore, QuotaStore, AttachmentStagingStore, Actor, AttachmentRef, PageContext, HumanReply, ThreadSummary, ThreadDetail, UpdateThreadInput, StagedAttachment, QuotaView, AgentApprovalPort, ActorResolver, MessageAttachment, AgentHistoryWindow, AgentIntake, SkillContext, ToolRegistry, AgentRegistry, PromptContributor, SkillsConfig, SkillCatalogEntry, 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';
@@ -472,7 +472,7 @@ interface SkillOptions {
472
472
  description: string;
473
473
  /**
474
474
  * The scope token this skill is published at. Omit → `'global'`, the deployment-wide default. Any
475
- * string a host's `ScopeResolver` can return works: `'tenant:base-7'`, `'sector:logistics'`.
475
+ * string a host's `ScopeResolver` can return works: `'tenant:berlin'`, `'sector:logistics'`.
476
476
  */
477
477
  scope?: string;
478
478
  /** A flat body. For one built per actor or per page, add a `body()` method instead. */
package/dist/index.js CHANGED
@@ -2993,18 +2993,11 @@ function routerFor(path) {
2993
2993
  ]);
2994
2994
  }
2995
2995
  __name(routerFor, "routerFor");
2996
- function assertDispatchedStepsRequiresDurable(dispatchedSteps, durable) {
2997
- if (dispatchedSteps && !durable) {
2998
- throw new Error("AgentModule dispatchedSteps: true requires durable: true \u2014 dispatched steps are routed durable steps (AgentRunSteps.llm/tool) with no in-process equivalent.");
2999
- }
3000
- }
3001
- __name(assertDispatchedStepsRequiresDurable, "assertDispatchedStepsRequiresDurable");
3002
2996
  var AgentModule = class _AgentModule {
3003
2997
  static {
3004
2998
  __name(this, "AgentModule");
3005
2999
  }
3006
3000
  static forRoot(options) {
3007
- assertDispatchedStepsRequiresDurable(options.dispatchedSteps ?? false, options.durable ?? false);
3008
3001
  const path = options.path ?? DEFAULT_PATH;
3009
3002
  const includeStore = options.store !== void 0;
3010
3003
  applyGuards(options.guards);
@@ -3028,7 +3021,6 @@ var AgentModule = class _AgentModule {
3028
3021
  };
3029
3022
  }
3030
3023
  static forRootAsync(options) {
3031
- assertDispatchedStepsRequiresDurable(options.dispatchedSteps ?? false, options.durable ?? false);
3032
3024
  const path = options.path ?? DEFAULT_PATH;
3033
3025
  const includeStore = options.externalStore !== true;
3034
3026
  applyGuards(options.guards);
@@ -3044,20 +3036,16 @@ var AgentModule = class _AgentModule {
3044
3036
  providers: [
3045
3037
  {
3046
3038
  provide: AGENT_OPTIONS4,
3047
- // Stamp the STATIC wiring flags onto the factory result: `durable`/`dispatchedSteps`/
3048
- // `surface` are authoritative on the async config object (they decided the actual wiring
3049
- // above), and `AgentDurableModule` derives the effective dispatched-steps value from
3050
- // AGENT_OPTIONS — without this stamp, an async host would get in-process localSteps
3051
- // despite durable: true. `surface` isn't read back by anything today (AgentDurableModule
3052
- // takes its own mirror option — see its doc for why), but it's stamped here too so the
3053
- // EFFECTIVE value is always observable off AGENT_OPTIONS, sync or async alike.
3039
+ // Stamp the STATIC wiring flags onto the factory result: `durable`/`surface` are
3040
+ // authoritative on the async config object (they decided the actual wiring above), and
3041
+ // the durable module reads `durable` back off AGENT_OPTIONS. `surface` isn't read back by
3042
+ // anything today (AgentDurableModule takes its own mirror option — see its doc for why),
3043
+ // but it's stamped here too so the EFFECTIVE value is always observable off
3044
+ // AGENT_OPTIONS, sync or async alike.
3054
3045
  useFactory: /* @__PURE__ */ __name(async (...args) => ({
3055
3046
  ...await options.useFactory(...args),
3056
3047
  durable: options.durable ?? false,
3057
- surface: options.surface ?? "both",
3058
- ...options.dispatchedSteps !== void 0 ? {
3059
- dispatchedSteps: options.dispatchedSteps
3060
- } : {}
3048
+ surface: options.surface ?? "both"
3061
3049
  }), "useFactory"),
3062
3050
  inject: options.inject ?? []
3063
3051
  },