@dudousxd/nestjs-agent 1.36.2 → 1.37.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/a2ui/index.d.cts +1 -1
- package/dist/a2ui/index.d.ts +1 -1
- package/dist/durable/index.cjs +22 -3
- package/dist/durable/index.cjs.map +1 -1
- package/dist/durable/index.js +22 -3
- package/dist/durable/index.js.map +1 -1
- package/dist/{index-CJdTomOT.d.cts → index-4caNqEQ-.d.cts} +23 -2
- package/dist/{index-D1xRrnCq.d.ts → index-yC_Ra3CE.d.ts} +23 -2
- package/dist/index.cjs +22 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +22 -3
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -7,8 +7,8 @@ export * from '@dudousxd/nestjs-agent-core';
|
|
|
7
7
|
export { FunctionalToolDefinition } from '@dudousxd/nestjs-agent-core';
|
|
8
8
|
import { A2uiOptions } from '@dudousxd/nestjs-agent-core/a2ui';
|
|
9
9
|
import { Request, Response } from 'express';
|
|
10
|
-
import { A as AgentService, a as ActionProposalService } from './index-
|
|
11
|
-
export { b as A2uiAdapterOptions, c as A2uiRunHandler, d as AttachmentLimits, C as ChatParams, e as ChatSendMode, f as ChatSendResult, D as DEFAULT_ALLOWED_ATTACHMENT_CONTENT_TYPES, g as DEFAULT_MAX_ATTACHMENT_BYTES, M as MAX_ATTACHMENTS_PER_MESSAGE, N as NO_USER_MESSAGE_CODE, Q as QueuedSend, T as ThreadDefaultAgentReader, h as ThreadModelReader, i as a2uiAdapter, j as attachmentLimits } from './index-
|
|
10
|
+
import { A as AgentService, a as ActionProposalService } from './index-4caNqEQ-.cjs';
|
|
11
|
+
export { b as A2uiAdapterOptions, c as A2uiRunHandler, d as AttachmentLimits, C as ChatParams, e as ChatSendMode, f as ChatSendResult, D as DEFAULT_ALLOWED_ATTACHMENT_CONTENT_TYPES, g as DEFAULT_MAX_ATTACHMENT_BYTES, F as ForkThreadParams, M as MAX_ATTACHMENTS_PER_MESSAGE, N as NO_USER_MESSAGE_CODE, Q as QueuedSend, T as ThreadDefaultAgentReader, h as ThreadModelReader, i as a2uiAdapter, j as attachmentLimits } from './index-4caNqEQ-.cjs';
|
|
12
12
|
import { AgentGenui } from './genui/index.cjs';
|
|
13
13
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
14
14
|
import { DiscoveryService, MetadataScanner } from '@nestjs/core';
|
package/dist/index.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ export * from '@dudousxd/nestjs-agent-core';
|
|
|
7
7
|
export { FunctionalToolDefinition } from '@dudousxd/nestjs-agent-core';
|
|
8
8
|
import { A2uiOptions } from '@dudousxd/nestjs-agent-core/a2ui';
|
|
9
9
|
import { Request, Response } from 'express';
|
|
10
|
-
import { A as AgentService, a as ActionProposalService } from './index-
|
|
11
|
-
export { b as A2uiAdapterOptions, c as A2uiRunHandler, d as AttachmentLimits, C as ChatParams, e as ChatSendMode, f as ChatSendResult, D as DEFAULT_ALLOWED_ATTACHMENT_CONTENT_TYPES, g as DEFAULT_MAX_ATTACHMENT_BYTES, M as MAX_ATTACHMENTS_PER_MESSAGE, N as NO_USER_MESSAGE_CODE, Q as QueuedSend, T as ThreadDefaultAgentReader, h as ThreadModelReader, i as a2uiAdapter, j as attachmentLimits } from './index-
|
|
10
|
+
import { A as AgentService, a as ActionProposalService } from './index-yC_Ra3CE.js';
|
|
11
|
+
export { b as A2uiAdapterOptions, c as A2uiRunHandler, d as AttachmentLimits, C as ChatParams, e as ChatSendMode, f as ChatSendResult, D as DEFAULT_ALLOWED_ATTACHMENT_CONTENT_TYPES, g as DEFAULT_MAX_ATTACHMENT_BYTES, F as ForkThreadParams, M as MAX_ATTACHMENTS_PER_MESSAGE, N as NO_USER_MESSAGE_CODE, Q as QueuedSend, T as ThreadDefaultAgentReader, h as ThreadModelReader, i as a2uiAdapter, j as attachmentLimits } from './index-yC_Ra3CE.js';
|
|
12
12
|
import { AgentGenui } from './genui/index.js';
|
|
13
13
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
14
14
|
import { DiscoveryService, MetadataScanner } from '@nestjs/core';
|
package/dist/index.js
CHANGED
|
@@ -2458,9 +2458,28 @@ var AgentService2 = class {
|
|
|
2458
2458
|
await this.assertOwnsThread(actor, threadId);
|
|
2459
2459
|
return this.store.softDeleteThread(threadId);
|
|
2460
2460
|
}
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2461
|
+
/**
|
|
2462
|
+
* Copy a thread up to `fromMessageId` (inclusive) into a new one. By default only the thread's
|
|
2463
|
+
* owner may, and the copy is theirs. With `params.authorized`, the host has vouched for `actor`
|
|
2464
|
+
* (a share link it checked) and the copy is `actor`'s — see {@link ForkThreadParams}.
|
|
2465
|
+
*/
|
|
2466
|
+
async forkThread(actor, threadId, fromMessageId, params = {}) {
|
|
2467
|
+
if (params.authorized === true) {
|
|
2468
|
+
if (await this.store.ownerOfThread(threadId) === null) {
|
|
2469
|
+
throw new NotFoundException2(`thread ${threadId} not found`);
|
|
2470
|
+
}
|
|
2471
|
+
} else {
|
|
2472
|
+
await this.assertOwnsThread(actor, threadId);
|
|
2473
|
+
}
|
|
2474
|
+
const options = {
|
|
2475
|
+
...params.authorized === true ? {
|
|
2476
|
+
actorRef: actor.id
|
|
2477
|
+
} : {},
|
|
2478
|
+
...params.tenantRef !== void 0 ? {
|
|
2479
|
+
tenantRef: params.tenantRef
|
|
2480
|
+
} : {}
|
|
2481
|
+
};
|
|
2482
|
+
return this.store.forkThread(threadId, fromMessageId, options);
|
|
2464
2483
|
}
|
|
2465
2484
|
/** Kept for source compatibility — a thin wrapper over the more general `updateThread`. */
|
|
2466
2485
|
async renameThread(actor, threadId, title) {
|