@dudousxd/nestjs-agent 1.17.0 → 1.18.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/{chat-queue.service-Bqq00NN1.d.cts → chat-queue.service-5LIogd9K.d.cts} +27 -1
- package/dist/{chat-queue.service-Bqq00NN1.d.ts → chat-queue.service-5LIogd9K.d.ts} +27 -1
- package/dist/durable/index.cjs +1015 -955
- package/dist/durable/index.cjs.map +1 -1
- package/dist/durable/index.d.cts +1 -1
- package/dist/durable/index.d.ts +1 -1
- package/dist/durable/index.js +968 -908
- package/dist/durable/index.js.map +1 -1
- package/dist/index.cjs +400 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +87 -5
- package/dist/index.d.ts +87 -5
- package/dist/index.js +392 -11
- package/dist/index.js.map +1 -1
- package/package.json +5 -2
|
@@ -130,6 +130,24 @@ declare class LedgerQuotaProvider implements QuotaProvider {
|
|
|
130
130
|
private window;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
+
/**
|
|
134
|
+
* A wire protocol other than the native one, served over the same runs — what `adapters` on
|
|
135
|
+
* `AgentModule.forRoot` takes. An adapter contributes controllers, mounted under the agent's
|
|
136
|
+
* `path` and guarded by its `guards` exactly like the native routes; the runs, the store, the
|
|
137
|
+
* approvals and the quota are the library's, unchanged.
|
|
138
|
+
*
|
|
139
|
+
* `agUiAdapter()` is the one that ships. Write your own the same way: a controller that injects
|
|
140
|
+
* `AgentService` (and `AGENT_ACTOR_RESOLVER`) and translates.
|
|
141
|
+
*/
|
|
142
|
+
interface AgentProtocolAdapter {
|
|
143
|
+
/** For logs and diagnostics. */
|
|
144
|
+
name: string;
|
|
145
|
+
/** Mounted under the agent's path. Not mounted at all on `surface: 'engine'`. */
|
|
146
|
+
controllers: Type<object>[];
|
|
147
|
+
/** Extra providers the controllers inject. */
|
|
148
|
+
providers?: Provider[];
|
|
149
|
+
}
|
|
150
|
+
|
|
133
151
|
/**
|
|
134
152
|
* Which half of the module this process mounts — the split that lets an API pod and a WORKER pod
|
|
135
153
|
* each load `AgentModule` without either one doing the other's job:
|
|
@@ -432,6 +450,12 @@ interface AgentModuleOptions {
|
|
|
432
450
|
* which controllers exist at module-build time, not something a request can flip.
|
|
433
451
|
*/
|
|
434
452
|
surface?: AgentSurface;
|
|
453
|
+
/**
|
|
454
|
+
* Wire protocols served alongside the native one, over the same runs — e.g. `[agUiAdapter()]`
|
|
455
|
+
* mounts `POST <path>/ag-ui` (AG-UI 1.0). Their controllers mount under `path`, behind `guards`,
|
|
456
|
+
* and not at all on `surface: 'engine'`. STATIC, like `surface`.
|
|
457
|
+
*/
|
|
458
|
+
adapters?: AgentProtocolAdapter[];
|
|
435
459
|
}
|
|
436
460
|
interface AgentModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
|
|
437
461
|
inject?: Array<InjectionToken | OptionalFactoryDependency>;
|
|
@@ -462,6 +486,8 @@ interface AgentModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
|
|
|
462
486
|
* which controllers exist. Omit → `'both'`, today's behavior with zero change.
|
|
463
487
|
*/
|
|
464
488
|
surface?: AgentSurface;
|
|
489
|
+
/** Wire protocols served alongside the native one — see `AgentModuleOptions.adapters`. STATIC. */
|
|
490
|
+
adapters?: AgentProtocolAdapter[];
|
|
465
491
|
}
|
|
466
492
|
|
|
467
493
|
/**
|
|
@@ -642,4 +668,4 @@ declare class ChatQueueService {
|
|
|
642
668
|
private freshAttachments;
|
|
643
669
|
}
|
|
644
670
|
|
|
645
|
-
export { AgentDepsFactory as A, ChatQueueService as C, type FunctionalTool as F, LedgerQuotaProvider as L, type QueuePlan as Q, type AgentSurface as a, type AgentModuleOptions as b, type AgentModuleAsyncOptions as c, type
|
|
671
|
+
export { AgentDepsFactory as A, ChatQueueService as C, type FunctionalTool as F, LedgerQuotaProvider as L, type QueuePlan as Q, type AgentSurface as a, type AgentModuleOptions as b, type AgentModuleAsyncOptions as c, type AgentProtocolAdapter as d, type AgentSkillsOptions as e, AGENT_TOOL_BRAND as f, type AgentAttachmentsOptions as g, type AgentDeps as h, type AgentMemoryOptions as i, type QueueSettleOutcome as j, type QueuedTurn as k, type QueuedTurnStarter as l, type QuotaLimits as m, type QuotaWindowLimits as n, delegateToolName as o, provideAgentTool as p, provideAgentTools as q, utcDay as u };
|
|
@@ -130,6 +130,24 @@ declare class LedgerQuotaProvider implements QuotaProvider {
|
|
|
130
130
|
private window;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
+
/**
|
|
134
|
+
* A wire protocol other than the native one, served over the same runs — what `adapters` on
|
|
135
|
+
* `AgentModule.forRoot` takes. An adapter contributes controllers, mounted under the agent's
|
|
136
|
+
* `path` and guarded by its `guards` exactly like the native routes; the runs, the store, the
|
|
137
|
+
* approvals and the quota are the library's, unchanged.
|
|
138
|
+
*
|
|
139
|
+
* `agUiAdapter()` is the one that ships. Write your own the same way: a controller that injects
|
|
140
|
+
* `AgentService` (and `AGENT_ACTOR_RESOLVER`) and translates.
|
|
141
|
+
*/
|
|
142
|
+
interface AgentProtocolAdapter {
|
|
143
|
+
/** For logs and diagnostics. */
|
|
144
|
+
name: string;
|
|
145
|
+
/** Mounted under the agent's path. Not mounted at all on `surface: 'engine'`. */
|
|
146
|
+
controllers: Type<object>[];
|
|
147
|
+
/** Extra providers the controllers inject. */
|
|
148
|
+
providers?: Provider[];
|
|
149
|
+
}
|
|
150
|
+
|
|
133
151
|
/**
|
|
134
152
|
* Which half of the module this process mounts — the split that lets an API pod and a WORKER pod
|
|
135
153
|
* each load `AgentModule` without either one doing the other's job:
|
|
@@ -432,6 +450,12 @@ interface AgentModuleOptions {
|
|
|
432
450
|
* which controllers exist at module-build time, not something a request can flip.
|
|
433
451
|
*/
|
|
434
452
|
surface?: AgentSurface;
|
|
453
|
+
/**
|
|
454
|
+
* Wire protocols served alongside the native one, over the same runs — e.g. `[agUiAdapter()]`
|
|
455
|
+
* mounts `POST <path>/ag-ui` (AG-UI 1.0). Their controllers mount under `path`, behind `guards`,
|
|
456
|
+
* and not at all on `surface: 'engine'`. STATIC, like `surface`.
|
|
457
|
+
*/
|
|
458
|
+
adapters?: AgentProtocolAdapter[];
|
|
435
459
|
}
|
|
436
460
|
interface AgentModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
|
|
437
461
|
inject?: Array<InjectionToken | OptionalFactoryDependency>;
|
|
@@ -462,6 +486,8 @@ interface AgentModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
|
|
|
462
486
|
* which controllers exist. Omit → `'both'`, today's behavior with zero change.
|
|
463
487
|
*/
|
|
464
488
|
surface?: AgentSurface;
|
|
489
|
+
/** Wire protocols served alongside the native one — see `AgentModuleOptions.adapters`. STATIC. */
|
|
490
|
+
adapters?: AgentProtocolAdapter[];
|
|
465
491
|
}
|
|
466
492
|
|
|
467
493
|
/**
|
|
@@ -642,4 +668,4 @@ declare class ChatQueueService {
|
|
|
642
668
|
private freshAttachments;
|
|
643
669
|
}
|
|
644
670
|
|
|
645
|
-
export { AgentDepsFactory as A, ChatQueueService as C, type FunctionalTool as F, LedgerQuotaProvider as L, type QueuePlan as Q, type AgentSurface as a, type AgentModuleOptions as b, type AgentModuleAsyncOptions as c, type
|
|
671
|
+
export { AgentDepsFactory as A, ChatQueueService as C, type FunctionalTool as F, LedgerQuotaProvider as L, type QueuePlan as Q, type AgentSurface as a, type AgentModuleOptions as b, type AgentModuleAsyncOptions as c, type AgentProtocolAdapter as d, type AgentSkillsOptions as e, AGENT_TOOL_BRAND as f, type AgentAttachmentsOptions as g, type AgentDeps as h, type AgentMemoryOptions as i, type QueueSettleOutcome as j, type QueuedTurn as k, type QueuedTurnStarter as l, type QuotaLimits as m, type QuotaWindowLimits as n, delegateToolName as o, provideAgentTool as p, provideAgentTools as q, utcDay as u };
|