@cubos/agent-sdk 0.0.1153286 → 0.0.1154105
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/admin/conversations.d.ts +20 -6
- package/dist/admin/users.d.ts +8 -0
- package/dist/client.d.ts +5 -0
- package/dist/generated/schema.d.ts +149 -9
- package/dist/index.js +8 -1
- package/dist/index.js.map +5 -5
- package/dist/mapping.d.ts +1 -0
- package/dist/types.d.ts +4 -0
- package/package.json +1 -1
|
@@ -14,6 +14,8 @@ export declare function conversationsAdminApi(t: Transport, tenantSlug: string):
|
|
|
14
14
|
limit?: number;
|
|
15
15
|
origin?: string;
|
|
16
16
|
user_id?: string;
|
|
17
|
+
/** Only conversations carrying this tag (exact, case included). */
|
|
18
|
+
tag?: string;
|
|
17
19
|
}, signal?: AbortSignal) => Promise<{
|
|
18
20
|
agent: import("../generated/schema.js").components["schemas"]["AgentRef"] | null;
|
|
19
21
|
archived_at: string | null;
|
|
@@ -31,6 +33,7 @@ export declare function conversationsAdminApi(t: Transport, tenantSlug: string):
|
|
|
31
33
|
origin: string;
|
|
32
34
|
parent_conversation: import("../generated/schema.js").components["schemas"]["ConversationRef"] | null;
|
|
33
35
|
retry_count: number;
|
|
36
|
+
tags: string[];
|
|
34
37
|
title: string | null;
|
|
35
38
|
total_cost_usd: number;
|
|
36
39
|
updated_at: string;
|
|
@@ -38,6 +41,12 @@ export declare function conversationsAdminApi(t: Transport, tenantSlug: string):
|
|
|
38
41
|
user_identifier: string | null;
|
|
39
42
|
user_identifier_label: string | null;
|
|
40
43
|
}[]>;
|
|
44
|
+
/** Every tag the tenant's conversations carry, with how many carry each —
|
|
45
|
+
* most used first. Tags have no registry: this is the vocabulary in use. */
|
|
46
|
+
listTags: (signal?: AbortSignal) => Promise<{
|
|
47
|
+
conversations: number;
|
|
48
|
+
tag: string;
|
|
49
|
+
}[]>;
|
|
41
50
|
get: (id: string, signal?: AbortSignal) => Promise<{
|
|
42
51
|
agent: import("../generated/schema.js").components["schemas"]["AgentRef"] | null;
|
|
43
52
|
archived_at: string | null;
|
|
@@ -55,6 +64,7 @@ export declare function conversationsAdminApi(t: Transport, tenantSlug: string):
|
|
|
55
64
|
origin: string;
|
|
56
65
|
parent_conversation: import("../generated/schema.js").components["schemas"]["ConversationRef"] | null;
|
|
57
66
|
retry_count: number;
|
|
67
|
+
tags: string[];
|
|
58
68
|
title: string | null;
|
|
59
69
|
total_cost_usd: number;
|
|
60
70
|
updated_at: string;
|
|
@@ -79,6 +89,7 @@ export declare function conversationsAdminApi(t: Transport, tenantSlug: string):
|
|
|
79
89
|
origin: string;
|
|
80
90
|
parent_conversation: import("../generated/schema.js").components["schemas"]["ConversationRef"] | null;
|
|
81
91
|
retry_count: number;
|
|
92
|
+
tags: string[];
|
|
82
93
|
title: string | null;
|
|
83
94
|
total_cost_usd: number;
|
|
84
95
|
updated_at: string;
|
|
@@ -103,6 +114,7 @@ export declare function conversationsAdminApi(t: Transport, tenantSlug: string):
|
|
|
103
114
|
origin: string;
|
|
104
115
|
parent_conversation: import("../generated/schema.js").components["schemas"]["ConversationRef"] | null;
|
|
105
116
|
retry_count: number;
|
|
117
|
+
tags: string[];
|
|
106
118
|
title: string | null;
|
|
107
119
|
total_cost_usd: number;
|
|
108
120
|
updated_at: string;
|
|
@@ -127,6 +139,7 @@ export declare function conversationsAdminApi(t: Transport, tenantSlug: string):
|
|
|
127
139
|
origin: string;
|
|
128
140
|
parent_conversation: import("../generated/schema.js").components["schemas"]["ConversationRef"] | null;
|
|
129
141
|
retry_count: number;
|
|
142
|
+
tags: string[];
|
|
130
143
|
title: string | null;
|
|
131
144
|
total_cost_usd: number;
|
|
132
145
|
updated_at: string;
|
|
@@ -152,6 +165,7 @@ export declare function conversationsAdminApi(t: Transport, tenantSlug: string):
|
|
|
152
165
|
origin: string;
|
|
153
166
|
parent_conversation: import("../generated/schema.js").components["schemas"]["ConversationRef"] | null;
|
|
154
167
|
retry_count: number;
|
|
168
|
+
tags: string[];
|
|
155
169
|
title: string | null;
|
|
156
170
|
total_cost_usd: number;
|
|
157
171
|
updated_at: string;
|
|
@@ -177,7 +191,7 @@ export declare function conversationsAdminApi(t: Transport, tenantSlug: string):
|
|
|
177
191
|
error: string | null;
|
|
178
192
|
id: string;
|
|
179
193
|
injected_by_conversation_id: string | null;
|
|
180
|
-
llm_call_data: import("../generated/schema.js").components["schemas"]["
|
|
194
|
+
llm_call_data: import("../generated/schema.js").components["schemas"]["LlmCall"] | null;
|
|
181
195
|
model: string | null;
|
|
182
196
|
parent_tool_call_id: string | null;
|
|
183
197
|
provider: import("../generated/schema.js").components["schemas"]["ProviderRef"] | null;
|
|
@@ -209,7 +223,7 @@ export declare function conversationsAdminApi(t: Transport, tenantSlug: string):
|
|
|
209
223
|
error: string | null;
|
|
210
224
|
id: string;
|
|
211
225
|
injected_by_conversation_id: string | null;
|
|
212
|
-
llm_call_data: import("../generated/schema.js").components["schemas"]["
|
|
226
|
+
llm_call_data: import("../generated/schema.js").components["schemas"]["LlmCall"] | null;
|
|
213
227
|
model: string | null;
|
|
214
228
|
parent_tool_call_id: string | null;
|
|
215
229
|
provider: import("../generated/schema.js").components["schemas"]["ProviderRef"] | null;
|
|
@@ -240,7 +254,7 @@ export declare function conversationsAdminApi(t: Transport, tenantSlug: string):
|
|
|
240
254
|
error: string | null;
|
|
241
255
|
id: string;
|
|
242
256
|
injected_by_conversation_id: string | null;
|
|
243
|
-
llm_call_data: import("../generated/schema.js").components["schemas"]["
|
|
257
|
+
llm_call_data: import("../generated/schema.js").components["schemas"]["LlmCall"] | null;
|
|
244
258
|
model: string | null;
|
|
245
259
|
parent_tool_call_id: string | null;
|
|
246
260
|
provider: import("../generated/schema.js").components["schemas"]["ProviderRef"] | null;
|
|
@@ -276,7 +290,7 @@ export declare function conversationsAdminApi(t: Transport, tenantSlug: string):
|
|
|
276
290
|
error: string | null;
|
|
277
291
|
id: string;
|
|
278
292
|
injected_by_conversation_id: string | null;
|
|
279
|
-
llm_call_data: import("../generated/schema.js").components["schemas"]["
|
|
293
|
+
llm_call_data: import("../generated/schema.js").components["schemas"]["LlmCall"] | null;
|
|
280
294
|
model: string | null;
|
|
281
295
|
parent_tool_call_id: string | null;
|
|
282
296
|
provider: import("../generated/schema.js").components["schemas"]["ProviderRef"] | null;
|
|
@@ -314,7 +328,7 @@ export declare function conversationsAdminApi(t: Transport, tenantSlug: string):
|
|
|
314
328
|
error: string | null;
|
|
315
329
|
id: string;
|
|
316
330
|
injected_by_conversation_id: string | null;
|
|
317
|
-
llm_call_data: import("../generated/schema.js").components["schemas"]["
|
|
331
|
+
llm_call_data: import("../generated/schema.js").components["schemas"]["LlmCall"] | null;
|
|
318
332
|
model: string | null;
|
|
319
333
|
parent_tool_call_id: string | null;
|
|
320
334
|
provider: import("../generated/schema.js").components["schemas"]["ProviderRef"] | null;
|
|
@@ -344,7 +358,7 @@ export declare function conversationsAdminApi(t: Transport, tenantSlug: string):
|
|
|
344
358
|
error: string | null;
|
|
345
359
|
id: string;
|
|
346
360
|
injected_by_conversation_id: string | null;
|
|
347
|
-
llm_call_data: import("../generated/schema.js").components["schemas"]["
|
|
361
|
+
llm_call_data: import("../generated/schema.js").components["schemas"]["LlmCall"] | null;
|
|
348
362
|
model: string | null;
|
|
349
363
|
parent_tool_call_id: string | null;
|
|
350
364
|
provider: import("../generated/schema.js").components["schemas"]["ProviderRef"] | null;
|
package/dist/admin/users.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export declare function usersApi(t: Transport, tenantSlug: string): {
|
|
|
7
7
|
}, signal?: AbortSignal) => Promise<{
|
|
8
8
|
created_at: string;
|
|
9
9
|
display_name: string | null;
|
|
10
|
+
external_id: string | null;
|
|
10
11
|
first_contact_at: string | null;
|
|
11
12
|
id: string;
|
|
12
13
|
primary_identifier: string | null;
|
|
@@ -17,6 +18,7 @@ export declare function usersApi(t: Transport, tenantSlug: string): {
|
|
|
17
18
|
get: (id: string, signal?: AbortSignal) => Promise<{
|
|
18
19
|
created_at: string;
|
|
19
20
|
display_name: string | null;
|
|
21
|
+
external_id: string | null;
|
|
20
22
|
first_contact_at: string | null;
|
|
21
23
|
id: string;
|
|
22
24
|
identities: import("../generated/schema.js").components["schemas"]["UserIdentity"][];
|
|
@@ -31,6 +33,7 @@ export declare function usersApi(t: Transport, tenantSlug: string): {
|
|
|
31
33
|
create: (input: Schemas["CreateUserInput"]) => Promise<{
|
|
32
34
|
created_at: string;
|
|
33
35
|
display_name: string | null;
|
|
36
|
+
external_id: string | null;
|
|
34
37
|
first_contact_at: string | null;
|
|
35
38
|
id: string;
|
|
36
39
|
identities: import("../generated/schema.js").components["schemas"]["UserIdentity"][];
|
|
@@ -45,6 +48,7 @@ export declare function usersApi(t: Transport, tenantSlug: string): {
|
|
|
45
48
|
update: (id: string, input: Schemas["UpdateUserInput"]) => Promise<{
|
|
46
49
|
created_at: string;
|
|
47
50
|
display_name: string | null;
|
|
51
|
+
external_id: string | null;
|
|
48
52
|
first_contact_at: string | null;
|
|
49
53
|
id: string;
|
|
50
54
|
identities: import("../generated/schema.js").components["schemas"]["UserIdentity"][];
|
|
@@ -60,6 +64,7 @@ export declare function usersApi(t: Transport, tenantSlug: string): {
|
|
|
60
64
|
approve: (id: string, input: Schemas["ApproveUserInput"]) => Promise<{
|
|
61
65
|
created_at: string;
|
|
62
66
|
display_name: string | null;
|
|
67
|
+
external_id: string | null;
|
|
63
68
|
first_contact_at: string | null;
|
|
64
69
|
id: string;
|
|
65
70
|
identities: import("../generated/schema.js").components["schemas"]["UserIdentity"][];
|
|
@@ -74,6 +79,7 @@ export declare function usersApi(t: Transport, tenantSlug: string): {
|
|
|
74
79
|
block: (id: string) => Promise<{
|
|
75
80
|
created_at: string;
|
|
76
81
|
display_name: string | null;
|
|
82
|
+
external_id: string | null;
|
|
77
83
|
first_contact_at: string | null;
|
|
78
84
|
id: string;
|
|
79
85
|
identities: import("../generated/schema.js").components["schemas"]["UserIdentity"][];
|
|
@@ -88,6 +94,7 @@ export declare function usersApi(t: Transport, tenantSlug: string): {
|
|
|
88
94
|
unblock: (id: string) => Promise<{
|
|
89
95
|
created_at: string;
|
|
90
96
|
display_name: string | null;
|
|
97
|
+
external_id: string | null;
|
|
91
98
|
first_contact_at: string | null;
|
|
92
99
|
id: string;
|
|
93
100
|
identities: import("../generated/schema.js").components["schemas"]["UserIdentity"][];
|
|
@@ -102,6 +109,7 @@ export declare function usersApi(t: Transport, tenantSlug: string): {
|
|
|
102
109
|
merge: (id: string, input: Schemas["MergeUserInput"]) => Promise<{
|
|
103
110
|
created_at: string;
|
|
104
111
|
display_name: string | null;
|
|
112
|
+
external_id: string | null;
|
|
105
113
|
first_contact_at: string | null;
|
|
106
114
|
id: string;
|
|
107
115
|
identities: import("../generated/schema.js").components["schemas"]["UserIdentity"][];
|
package/dist/client.d.ts
CHANGED
|
@@ -199,6 +199,11 @@ export declare class AgentClient {
|
|
|
199
199
|
listComponentLibraries(id: string, signal?: AbortSignal): Promise<EnabledComponents>;
|
|
200
200
|
getConversation(id: string, signal?: AbortSignal): Promise<Conversation>;
|
|
201
201
|
renameConversation(id: string, title: string, signal?: AbortSignal): Promise<Conversation>;
|
|
202
|
+
/**
|
|
203
|
+
* Replace the conversation's tags — the whole set; `[]` removes them all.
|
|
204
|
+
* The server trims, drops duplicates and sorts, and answers with the result.
|
|
205
|
+
*/
|
|
206
|
+
setConversationTags(id: string, tags: string[], signal?: AbortSignal): Promise<Conversation>;
|
|
202
207
|
archiveConversation(id: string, signal?: AbortSignal): Promise<Conversation>;
|
|
203
208
|
/** One page of history, oldest-first. `limit` counts events, so a page may
|
|
204
209
|
* hold fewer messages than you asked for — `iterateMessages` handles that. */
|
|
@@ -4559,6 +4559,65 @@ export interface paths {
|
|
|
4559
4559
|
};
|
|
4560
4560
|
trace?: never;
|
|
4561
4561
|
};
|
|
4562
|
+
"/api/v1/tenants/{tenantSlug}/conversation-tags": {
|
|
4563
|
+
parameters: {
|
|
4564
|
+
query?: never;
|
|
4565
|
+
header?: never;
|
|
4566
|
+
path?: never;
|
|
4567
|
+
cookie?: never;
|
|
4568
|
+
};
|
|
4569
|
+
/**
|
|
4570
|
+
* List conversation tags
|
|
4571
|
+
* @description Every tag carried by a conversation of the tenant, archived ones included, with how many conversations carry it — most used first, then by name. Capped at 500.
|
|
4572
|
+
*/
|
|
4573
|
+
get: {
|
|
4574
|
+
parameters: {
|
|
4575
|
+
query?: never;
|
|
4576
|
+
header?: never;
|
|
4577
|
+
path: {
|
|
4578
|
+
/** @description Tenant slug. */
|
|
4579
|
+
tenantSlug: string;
|
|
4580
|
+
};
|
|
4581
|
+
cookie?: never;
|
|
4582
|
+
};
|
|
4583
|
+
requestBody?: never;
|
|
4584
|
+
responses: {
|
|
4585
|
+
200: {
|
|
4586
|
+
headers: {
|
|
4587
|
+
[name: string]: unknown;
|
|
4588
|
+
};
|
|
4589
|
+
content: {
|
|
4590
|
+
"application/json": components["schemas"]["ConversationTagUsage"][];
|
|
4591
|
+
};
|
|
4592
|
+
};
|
|
4593
|
+
401: {
|
|
4594
|
+
headers: {
|
|
4595
|
+
[name: string]: unknown;
|
|
4596
|
+
};
|
|
4597
|
+
content?: never;
|
|
4598
|
+
};
|
|
4599
|
+
403: {
|
|
4600
|
+
headers: {
|
|
4601
|
+
[name: string]: unknown;
|
|
4602
|
+
};
|
|
4603
|
+
content?: never;
|
|
4604
|
+
};
|
|
4605
|
+
404: {
|
|
4606
|
+
headers: {
|
|
4607
|
+
[name: string]: unknown;
|
|
4608
|
+
};
|
|
4609
|
+
content?: never;
|
|
4610
|
+
};
|
|
4611
|
+
};
|
|
4612
|
+
};
|
|
4613
|
+
put?: never;
|
|
4614
|
+
post?: never;
|
|
4615
|
+
delete?: never;
|
|
4616
|
+
options?: never;
|
|
4617
|
+
head?: never;
|
|
4618
|
+
patch?: never;
|
|
4619
|
+
trace?: never;
|
|
4620
|
+
};
|
|
4562
4621
|
"/api/v1/tenants/{tenantSlug}/conversations": {
|
|
4563
4622
|
parameters: {
|
|
4564
4623
|
query?: never;
|
|
@@ -4579,6 +4638,8 @@ export interface paths {
|
|
|
4579
4638
|
limit?: number;
|
|
4580
4639
|
/** @description Filter by origin (`interactive`, `channel`, `subagent`, `background`); omitted excludes `background`. Invalid values return 400. */
|
|
4581
4640
|
origin?: string;
|
|
4641
|
+
/** @description Restrict to conversations carrying this tag (exact match, case included); omit for any. */
|
|
4642
|
+
tag?: string;
|
|
4582
4643
|
/** @description Restrict to conversations owned by this user id; omit for all users. */
|
|
4583
4644
|
user_id?: string;
|
|
4584
4645
|
};
|
|
@@ -4666,6 +4727,12 @@ export interface paths {
|
|
|
4666
4727
|
};
|
|
4667
4728
|
content?: never;
|
|
4668
4729
|
};
|
|
4730
|
+
422: {
|
|
4731
|
+
headers: {
|
|
4732
|
+
[name: string]: unknown;
|
|
4733
|
+
};
|
|
4734
|
+
content?: never;
|
|
4735
|
+
};
|
|
4669
4736
|
};
|
|
4670
4737
|
};
|
|
4671
4738
|
delete?: never;
|
|
@@ -4901,7 +4968,7 @@ export interface paths {
|
|
|
4901
4968
|
head?: never;
|
|
4902
4969
|
/**
|
|
4903
4970
|
* Update conversation
|
|
4904
|
-
* @description Partially updates `title`, `agent_slug`, and `
|
|
4971
|
+
* @description Partially updates `title`, `agent_slug`, `metadata` and `tags`; fields absent from the body keep their current value. An explicit `"title": null` clears the title, which makes the conversation fall back to its auto-generated one. `tags` replaces the whole set (422 when a tag is invalid, 409 on a sub-conversation).
|
|
4905
4972
|
*/
|
|
4906
4973
|
patch: {
|
|
4907
4974
|
parameters: {
|
|
@@ -4947,6 +5014,18 @@ export interface paths {
|
|
|
4947
5014
|
};
|
|
4948
5015
|
content?: never;
|
|
4949
5016
|
};
|
|
5017
|
+
409: {
|
|
5018
|
+
headers: {
|
|
5019
|
+
[name: string]: unknown;
|
|
5020
|
+
};
|
|
5021
|
+
content?: never;
|
|
5022
|
+
};
|
|
5023
|
+
422: {
|
|
5024
|
+
headers: {
|
|
5025
|
+
[name: string]: unknown;
|
|
5026
|
+
};
|
|
5027
|
+
content?: never;
|
|
5028
|
+
};
|
|
4950
5029
|
};
|
|
4951
5030
|
};
|
|
4952
5031
|
trace?: never;
|
|
@@ -7476,6 +7555,8 @@ export interface paths {
|
|
|
7476
7555
|
origin?: string;
|
|
7477
7556
|
/** @description Composite cursor `<rfc3339>|<uuid>`; streams only conversations newer than it. Overridden by `Last-Event-ID` when present; absent backfills from the epoch. */
|
|
7478
7557
|
since?: string;
|
|
7558
|
+
/** @description Restrict to conversations carrying this tag (exact match, case included); omit for any. */
|
|
7559
|
+
tag?: string;
|
|
7479
7560
|
/** @description Restrict to conversations owned by this user id; omit for all users. */
|
|
7480
7561
|
user_id?: string;
|
|
7481
7562
|
};
|
|
@@ -10773,7 +10854,7 @@ export interface paths {
|
|
|
10773
10854
|
};
|
|
10774
10855
|
/**
|
|
10775
10856
|
* List users
|
|
10776
|
-
* @description Lists the tenant's users, newest first contact first. Optionally filters by `status` and by `role` slug.
|
|
10857
|
+
* @description Lists the tenant's users, newest first contact first, each with the operator's own `external_id` when one is set. Optionally filters by `status` and by `role` slug.
|
|
10777
10858
|
*/
|
|
10778
10859
|
get: {
|
|
10779
10860
|
parameters: {
|
|
@@ -10823,7 +10904,7 @@ export interface paths {
|
|
|
10823
10904
|
put?: never;
|
|
10824
10905
|
/**
|
|
10825
10906
|
* Create user
|
|
10826
|
-
* @description Creates a user, optionally with role slugs
|
|
10907
|
+
* @description Creates a user, optionally with role slugs, channel identities and the operator's own `external_id`. Requires a `display_name` or at least one identity; `status` defaults to `active`. 409 when `external_id` is already taken in the tenant.
|
|
10827
10908
|
*/
|
|
10828
10909
|
post: {
|
|
10829
10910
|
parameters: {
|
|
@@ -10990,7 +11071,7 @@ export interface paths {
|
|
|
10990
11071
|
head?: never;
|
|
10991
11072
|
/**
|
|
10992
11073
|
* Update user
|
|
10993
|
-
* @description Patches `display_name`, `timezone` (IANA name, validated), and the `user_md` notepad (capped at 32 KB). Omitted fields stay unchanged; an empty `display_name` clears it to null.
|
|
11074
|
+
* @description Patches `display_name`, `external_id`, `timezone` (IANA name, validated), and the `user_md` notepad (capped at 32 KB). Omitted fields stay unchanged; an empty `display_name` or `external_id` clears it to null. 409 when `external_id` is already taken by another user of the tenant.
|
|
10994
11075
|
*/
|
|
10995
11076
|
patch: {
|
|
10996
11077
|
parameters: {
|
|
@@ -11036,6 +11117,12 @@ export interface paths {
|
|
|
11036
11117
|
};
|
|
11037
11118
|
content?: never;
|
|
11038
11119
|
};
|
|
11120
|
+
409: {
|
|
11121
|
+
headers: {
|
|
11122
|
+
[name: string]: unknown;
|
|
11123
|
+
};
|
|
11124
|
+
content?: never;
|
|
11125
|
+
};
|
|
11039
11126
|
422: {
|
|
11040
11127
|
headers: {
|
|
11041
11128
|
[name: string]: unknown;
|
|
@@ -12796,6 +12883,12 @@ export interface components {
|
|
|
12796
12883
|
* failed or after a successful close.
|
|
12797
12884
|
*/
|
|
12798
12885
|
retry_count: number;
|
|
12886
|
+
/**
|
|
12887
|
+
* @description Free-form labels, as a set: trimmed, without duplicates, sorted by byte.
|
|
12888
|
+
* Case is kept. Always empty on a sub-conversation, whose work belongs to
|
|
12889
|
+
* its root.
|
|
12890
|
+
*/
|
|
12891
|
+
tags: string[];
|
|
12799
12892
|
/**
|
|
12800
12893
|
* @description The name a human gave this conversation. Null until someone sets
|
|
12801
12894
|
* one, and never written by the engine — clients render
|
|
@@ -12915,7 +13008,7 @@ export interface components {
|
|
|
12915
13008
|
* authored it. The dashboard badges these as proactively delivered.
|
|
12916
13009
|
*/
|
|
12917
13010
|
injected_by_conversation_id: string | null;
|
|
12918
|
-
llm_call_data: components["schemas"]["
|
|
13011
|
+
llm_call_data: components["schemas"]["LlmCall"] | null;
|
|
12919
13012
|
model: string | null;
|
|
12920
13013
|
/**
|
|
12921
13014
|
* Format: uuid
|
|
@@ -13014,6 +13107,15 @@ export interface components {
|
|
|
13014
13107
|
output_tokens: number | null;
|
|
13015
13108
|
summary_text: string;
|
|
13016
13109
|
};
|
|
13110
|
+
/** @description One tag in use in the tenant, for suggesting and filtering. */
|
|
13111
|
+
ConversationTagUsage: {
|
|
13112
|
+
/**
|
|
13113
|
+
* Format: int64
|
|
13114
|
+
* @description Conversations carrying it, archived ones included.
|
|
13115
|
+
*/
|
|
13116
|
+
conversations: number;
|
|
13117
|
+
tag: string;
|
|
13118
|
+
};
|
|
13017
13119
|
CountTokensResponse: {
|
|
13018
13120
|
breakdown: components["schemas"]["Breakdown"] | null;
|
|
13019
13121
|
/**
|
|
@@ -13254,6 +13356,8 @@ export interface components {
|
|
|
13254
13356
|
*/
|
|
13255
13357
|
component_libraries?: string[] | null;
|
|
13256
13358
|
metadata?: unknown;
|
|
13359
|
+
/** @description Labels for the new conversation. Normalized like on `PATCH`. */
|
|
13360
|
+
tags?: string[] | null;
|
|
13257
13361
|
title?: string | null;
|
|
13258
13362
|
/**
|
|
13259
13363
|
* Format: uuid
|
|
@@ -13421,6 +13525,8 @@ export interface components {
|
|
|
13421
13525
|
};
|
|
13422
13526
|
CreateUserInput: {
|
|
13423
13527
|
display_name?: string | null;
|
|
13528
|
+
/** @description The operator's own id for this person. Unique per tenant; 409 if taken. */
|
|
13529
|
+
external_id?: string | null;
|
|
13424
13530
|
identities?: components["schemas"]["CreateIdentityInput"][] | null;
|
|
13425
13531
|
role_slugs?: string[] | null;
|
|
13426
13532
|
status?: string | null;
|
|
@@ -13901,10 +14007,14 @@ export interface components {
|
|
|
13901
14007
|
/** @description PascalCase name, as written in the message: `<PriceChart … />`. */
|
|
13902
14008
|
tag_name: string;
|
|
13903
14009
|
};
|
|
14010
|
+
/** @description One LLM round-trip whole: the prompt it was sent and what came of it. */
|
|
14011
|
+
LlmCall: components["schemas"]["LlmCallData"] & {
|
|
14012
|
+
request: components["schemas"]["LlmRequestSnapshot"];
|
|
14013
|
+
};
|
|
13904
14014
|
/**
|
|
13905
|
-
* @description
|
|
13906
|
-
*
|
|
13907
|
-
* exclusive in normal flow.
|
|
14015
|
+
* @description What came of one LLM round-trip, without the prompt it was sent (see
|
|
14016
|
+
* [`LlmCall`]); the typed payload behind the `llm_call_data` JSONB DOMAIN.
|
|
14017
|
+
* `error` and a populated `response` are mutually exclusive in normal flow.
|
|
13908
14018
|
*/
|
|
13909
14019
|
LlmCallData: {
|
|
13910
14020
|
coerced_call: components["schemas"]["CoercedCall"] | null;
|
|
@@ -13915,7 +14025,6 @@ export interface components {
|
|
|
13915
14025
|
error: string | null;
|
|
13916
14026
|
/** Format: int64 */
|
|
13917
14027
|
latency_ms: number;
|
|
13918
|
-
request: components["schemas"]["LlmRequestSnapshot"];
|
|
13919
14028
|
response: components["schemas"]["LlmResponseSnapshot"] | null;
|
|
13920
14029
|
/**
|
|
13921
14030
|
* Format: int64
|
|
@@ -13929,6 +14038,10 @@ export interface components {
|
|
|
13929
14038
|
*/
|
|
13930
14039
|
seen_pending_seq: number | null;
|
|
13931
14040
|
};
|
|
14041
|
+
/**
|
|
14042
|
+
* @description The prompt one LLM round-trip was sent; the typed payload behind the
|
|
14043
|
+
* `llm_request` JSONB DOMAIN.
|
|
14044
|
+
*/
|
|
13932
14045
|
LlmRequestSnapshot: {
|
|
13933
14046
|
messages: components["schemas"]["Message"][];
|
|
13934
14047
|
system: string;
|
|
@@ -15233,6 +15346,13 @@ export interface components {
|
|
|
15233
15346
|
UpdateConversationInput: {
|
|
15234
15347
|
agent_slug?: string | null;
|
|
15235
15348
|
metadata?: unknown;
|
|
15349
|
+
/**
|
|
15350
|
+
* @description Replaces the whole set; `[]` removes every tag. Each tag is trimmed,
|
|
15351
|
+
* duplicates are dropped and the set is sorted. 422 for an empty tag, one
|
|
15352
|
+
* longer than 64 characters or holding a control character, or more than
|
|
15353
|
+
* 20 tags; 409 on a sub-conversation, which takes its root's.
|
|
15354
|
+
*/
|
|
15355
|
+
tags?: string[] | null;
|
|
15236
15356
|
/**
|
|
15237
15357
|
* @description Tristate: absent leaves the title alone, a string sets it, and an
|
|
15238
15358
|
* explicit null clears it — which reveals `generated_title`
|
|
@@ -15426,6 +15546,13 @@ export interface components {
|
|
|
15426
15546
|
UpdateUserInput: {
|
|
15427
15547
|
/** @description Display name. Send an empty string to clear it back to null. */
|
|
15428
15548
|
display_name?: string | null;
|
|
15549
|
+
/**
|
|
15550
|
+
* @description The operator's own id for this person — what MCP servers get as
|
|
15551
|
+
* `_meta.cubos-agent.userExternalId`. Send an empty string to clear it
|
|
15552
|
+
* back to null and fall back to the channel identity. Unique per tenant;
|
|
15553
|
+
* 409 if taken.
|
|
15554
|
+
*/
|
|
15555
|
+
external_id?: string | null;
|
|
15429
15556
|
/** @description IANA timezone name (e.g. `America/Sao_Paulo`). 422 if not a known zone. */
|
|
15430
15557
|
timezone?: string | null;
|
|
15431
15558
|
/** @description Shared notepad (markdown). Capped at 32 KB, like the `update_user_md` tool. */
|
|
@@ -15454,6 +15581,13 @@ export interface components {
|
|
|
15454
15581
|
/** Format: date-time */
|
|
15455
15582
|
created_at: string;
|
|
15456
15583
|
display_name: string | null;
|
|
15584
|
+
/**
|
|
15585
|
+
* @description The operator's own id for this person, or null. Set only here; nothing
|
|
15586
|
+
* in the product ever fills it in. When set it is what MCP servers
|
|
15587
|
+
* receive as `_meta.cubos-agent.userExternalId`, in place of the
|
|
15588
|
+
* channel-native identifier.
|
|
15589
|
+
*/
|
|
15590
|
+
external_id: string | null;
|
|
15457
15591
|
/** Format: date-time */
|
|
15458
15592
|
first_contact_at: string | null;
|
|
15459
15593
|
/** Format: uuid */
|
|
@@ -15489,6 +15623,12 @@ export interface components {
|
|
|
15489
15623
|
/** Format: date-time */
|
|
15490
15624
|
created_at: string;
|
|
15491
15625
|
display_name: string | null;
|
|
15626
|
+
/**
|
|
15627
|
+
* @description The operator's own id for this person, or null. Set only through the
|
|
15628
|
+
* API; when set it is what MCP servers receive as
|
|
15629
|
+
* `_meta.cubos-agent.userExternalId` in place of the channel identity.
|
|
15630
|
+
*/
|
|
15631
|
+
external_id: string | null;
|
|
15492
15632
|
/** Format: date-time */
|
|
15493
15633
|
first_contact_at: string | null;
|
|
15494
15634
|
/** Format: uuid */
|
package/dist/index.js
CHANGED
|
@@ -804,6 +804,7 @@ function conversationsAdminApi(t, tenantSlug) {
|
|
|
804
804
|
};
|
|
805
805
|
return {
|
|
806
806
|
list: (query = {}, signal) => t.request("GET", base, { query, signal }),
|
|
807
|
+
listTags: (signal) => t.request("GET", `${tenantPath(tenantSlug)}/conversation-tags`, { signal }),
|
|
807
808
|
get: (id, signal) => t.request("GET", conv(id), { signal }),
|
|
808
809
|
create: (input) => t.request("POST", base, { body: input }),
|
|
809
810
|
update: (id, input) => t.request("PATCH", conv(id), { body: input }),
|
|
@@ -1254,6 +1255,7 @@ function toConversation(w) {
|
|
|
1254
1255
|
title: w.title ?? w.generated_title ?? null,
|
|
1255
1256
|
titleIsGenerated: w.title === null && w.generated_title !== null,
|
|
1256
1257
|
agentSlug: w.agent?.slug ?? null,
|
|
1258
|
+
tags: w.tags,
|
|
1257
1259
|
lastActivityAt: w.last_activity_at,
|
|
1258
1260
|
archived: w.archived_at !== null,
|
|
1259
1261
|
isProcessing: w.is_processing,
|
|
@@ -1600,6 +1602,7 @@ class AgentClient {
|
|
|
1600
1602
|
agent_slug: agentSlug,
|
|
1601
1603
|
title: opts.title,
|
|
1602
1604
|
metadata: opts.metadata,
|
|
1605
|
+
tags: opts.tags,
|
|
1603
1606
|
...opts.componentLibraries === undefined ? {} : { component_libraries: opts.componentLibraries }
|
|
1604
1607
|
},
|
|
1605
1608
|
signal: opts.signal
|
|
@@ -1626,6 +1629,10 @@ class AgentClient {
|
|
|
1626
1629
|
const row = await this.#transport.request("PATCH", `${await this.#base()}/${id}`, { body: { title }, signal });
|
|
1627
1630
|
return toConversation(row);
|
|
1628
1631
|
}
|
|
1632
|
+
async setConversationTags(id, tags, signal) {
|
|
1633
|
+
const row = await this.#transport.request("PATCH", `${await this.#base()}/${id}`, { body: { tags }, signal });
|
|
1634
|
+
return toConversation(row);
|
|
1635
|
+
}
|
|
1629
1636
|
async archiveConversation(id, signal) {
|
|
1630
1637
|
const row = await this.#transport.request("POST", `${await this.#base()}/${id}/archive`, { signal });
|
|
1631
1638
|
return toConversation(row);
|
|
@@ -2064,5 +2071,5 @@ export {
|
|
|
2064
2071
|
serveClientTools
|
|
2065
2072
|
};
|
|
2066
2073
|
|
|
2067
|
-
//# debugId=
|
|
2074
|
+
//# debugId=DA5368DD2353F7BE64756E2164756E21
|
|
2068
2075
|
//# sourceMappingURL=index.js.map
|