@lumavox/client 0.1.1 → 0.2.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/README.md +8 -5
- package/dist/client.d.ts +36 -23
- package/dist/client.js +35 -25
- package/dist/conversation.d.ts +3 -2
- package/dist/conversation.js +18 -16
- package/dist/errors.d.ts +24 -16
- package/dist/errors.js +19 -39
- package/dist/events.d.ts +25 -20
- package/dist/gen/index.d.ts +1 -1
- package/dist/gen/types.gen.d.ts +203 -260
- package/dist/protocol.gen.d.ts +4 -4
- package/dist/protocol.gen.js +4 -4
- package/dist/token.d.ts +1 -1
- package/dist/transport.js +3 -3
- package/package.json +1 -1
package/dist/gen/types.gen.d.ts
CHANGED
|
@@ -5,25 +5,39 @@ export type ErrorResponse = {
|
|
|
5
5
|
error: ErrorInfo;
|
|
6
6
|
};
|
|
7
7
|
export type ErrorInfo = {
|
|
8
|
+
code: ErrorCode;
|
|
8
9
|
/**
|
|
9
|
-
*
|
|
10
|
-
*/
|
|
11
|
-
type: string;
|
|
12
|
-
/**
|
|
13
|
-
* Human-readable explanation
|
|
10
|
+
* What went wrong, in words
|
|
14
11
|
*/
|
|
15
12
|
message: string;
|
|
16
13
|
/**
|
|
17
|
-
* Echo of X-Request-Id — include when reporting
|
|
14
|
+
* Echo of `X-Request-Id` — include it when reporting a problem
|
|
18
15
|
*/
|
|
19
16
|
request_id: string;
|
|
20
17
|
/**
|
|
21
|
-
*
|
|
18
|
+
* Where the request failed validation; empty otherwise
|
|
19
|
+
*/
|
|
20
|
+
issues: Array<ValidationIssue>;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* What went wrong, for a client to switch on: one per HTTP status, except `waitlisted`, a 403 of its own. New codes may be added.
|
|
24
|
+
*/
|
|
25
|
+
export type ErrorCode = 'invalid_request' | 'unauthenticated' | 'insufficient_credits' | 'forbidden' | 'waitlisted' | 'not_found' | 'method_not_allowed' | 'conflict' | 'too_large' | 'validation_failed' | 'rate_limited' | 'internal' | 'provider_failed' | 'unavailable';
|
|
26
|
+
export type ValidationIssue = {
|
|
27
|
+
location: 'body' | 'query' | 'path' | 'header';
|
|
28
|
+
/**
|
|
29
|
+
* The dotted path to the field (`voice_config.sample_rate`, `agent_ids.2`); `null` for the whole body.
|
|
22
30
|
*/
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}> | null;
|
|
31
|
+
field: string | null;
|
|
32
|
+
message: string;
|
|
26
33
|
};
|
|
34
|
+
/**
|
|
35
|
+
* A conversation, and a page of it. `messages` is the conversation so far, oldest first.
|
|
36
|
+
*
|
|
37
|
+
* **The most recent 50 by default**, not the whole transcript — a long conversation is not something a caller can be handed in one response. `messages.next_cursor` reaches the older ones: pass it as `cursor` on `GET /v1/agent/sessions/{session_id}`, whose `limit` raises or lowers the page, up to 200. It is null once the page reaches the beginning of the conversation.
|
|
38
|
+
*
|
|
39
|
+
* **`messages` is empty on a new conversation, including for an agent that has an opening line**. The opening line — generated or scripted — is the first turn on `/v1/agent/stream`, so it is written when a client connects rather than when the session is created. Opening a session makes no model call and no speech call of any kind.
|
|
40
|
+
*/
|
|
27
41
|
export type SessionDetail = {
|
|
28
42
|
agent_id: string;
|
|
29
43
|
created_at: string;
|
|
@@ -32,22 +46,10 @@ export type SessionDetail = {
|
|
|
32
46
|
*/
|
|
33
47
|
end_user_id: string;
|
|
34
48
|
id: string;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
*
|
|
40
|
-
* **Empty on a new conversation, including for an agent that has an opening line**. The opening line — generated or scripted — is the first turn on `/v1/agent/stream`, so it is written when a client connects rather than when the session is created. Opening a session makes no model call and no speech call of any kind.
|
|
41
|
-
*/
|
|
42
|
-
messages: Array<MessageInfo>;
|
|
43
|
-
/**
|
|
44
|
-
* Pass as `before` on `GET /v1/agent/sessions/{session_id}` to read the page of **older** messages.
|
|
45
|
-
*
|
|
46
|
-
* Null when `messages` reaches the beginning of the conversation — so paging is `while (next_before) fetch(before: next_before)` and never ends on an empty page.
|
|
47
|
-
*
|
|
48
|
-
* It is a `seq`, the position of the oldest message returned, and `before` is exclusive. Positions are sparse — a conversation greeted twice has a gap — so nothing that counts rows can be substituted for it.
|
|
49
|
-
*/
|
|
50
|
-
next_before?: number | null;
|
|
49
|
+
title: string | null;
|
|
50
|
+
turn_seq: number;
|
|
51
|
+
updated_at: string;
|
|
52
|
+
messages: MessagePage;
|
|
51
53
|
/**
|
|
52
54
|
* How this agent stands with this person, as the conversation opens.
|
|
53
55
|
*
|
|
@@ -55,16 +57,20 @@ export type SessionDetail = {
|
|
|
55
57
|
*
|
|
56
58
|
* It belongs to the **person**, not the conversation, so it carries across every session with the same `end_user_id`. Here so that rendering it at conversation start needs no second call; `GET /v1/agent/relations` is still how you read it any other time, and the socket's `relation` event is how you learn it moved mid-turn — which is rare, and is the only time it changes.
|
|
57
59
|
*/
|
|
58
|
-
relation
|
|
60
|
+
relation: RelationInfo | null;
|
|
59
61
|
/**
|
|
60
62
|
* True when this is a conversation that already existed rather than a new one — see `resume` on the request.
|
|
61
63
|
*
|
|
62
64
|
* Worth branching on: a resumed session arrives with its `messages` already populated and its `turn_seq` past zero, so a client that assumed an empty transcript will render nothing until the next turn.
|
|
63
65
|
*/
|
|
64
|
-
resumed
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
resumed: boolean;
|
|
67
|
+
};
|
|
68
|
+
export type MessagePage = {
|
|
69
|
+
data: Array<MessageInfo>;
|
|
70
|
+
/**
|
|
71
|
+
* Pass as `cursor` for the next page; `null` when this is the last.
|
|
72
|
+
*/
|
|
73
|
+
next_cursor: string | null;
|
|
68
74
|
};
|
|
69
75
|
export type MessageInfo = {
|
|
70
76
|
content: string;
|
|
@@ -73,38 +79,35 @@ export type MessageInfo = {
|
|
|
73
79
|
/**
|
|
74
80
|
* On a reply: what the agent looked up in its knowledge for it — each lookup's query, outcome and the entries it found, with their scores. Null when nothing was looked up.
|
|
75
81
|
*/
|
|
76
|
-
knowledge
|
|
82
|
+
knowledge: MessageKnowledge | null;
|
|
77
83
|
/**
|
|
78
84
|
* How the agent said it felt when it wrote this reply, when the agent reports moods. Null on user messages, on agents with emotion off, and on any reply where the model did not report a usable one.
|
|
79
85
|
*/
|
|
80
|
-
mood
|
|
86
|
+
mood: string | null;
|
|
81
87
|
/**
|
|
82
88
|
* How strongly, 0 to 1. Null when the model gave a label without a number — the label is the half it gets right.
|
|
83
89
|
*/
|
|
84
|
-
mood_intensity
|
|
85
|
-
|
|
86
|
-
* `user` or `assistant`.
|
|
87
|
-
*/
|
|
88
|
-
role: string;
|
|
90
|
+
mood_intensity: number | null;
|
|
91
|
+
role: 'user' | 'assistant';
|
|
89
92
|
};
|
|
90
93
|
export type MessageKnowledge = {
|
|
91
|
-
lookups
|
|
94
|
+
lookups: Array<KnowledgeLookupInfo>;
|
|
92
95
|
/**
|
|
93
96
|
* How the agent read its knowledge on this turn: `lookup` or `prompt`.
|
|
94
97
|
*/
|
|
95
|
-
mode:
|
|
98
|
+
mode: 'lookup' | 'prompt';
|
|
96
99
|
};
|
|
97
100
|
export type KnowledgeLookupInfo = {
|
|
98
|
-
hits
|
|
101
|
+
hits: Array<KnowledgeCitation>;
|
|
99
102
|
/**
|
|
100
103
|
* `found`, `none` (nothing relevant enough), or `failed` (the lookup itself could not be done).
|
|
101
104
|
*/
|
|
102
|
-
outcome:
|
|
105
|
+
outcome: 'found' | 'none' | 'failed';
|
|
103
106
|
query: string;
|
|
104
107
|
/**
|
|
105
108
|
* `first` — looked up before the reply; `tool` — the model asked for it.
|
|
106
109
|
*/
|
|
107
|
-
via:
|
|
110
|
+
via: 'first' | 'tool';
|
|
108
111
|
};
|
|
109
112
|
export type KnowledgeCitation = {
|
|
110
113
|
entry_id: string;
|
|
@@ -131,12 +134,12 @@ export type RelationInfo = {
|
|
|
131
134
|
* The person, as `eu_...`.
|
|
132
135
|
*/
|
|
133
136
|
end_user_id: string;
|
|
134
|
-
first_met_at
|
|
135
|
-
last_seen_at
|
|
137
|
+
first_met_at: string | null;
|
|
138
|
+
last_seen_at: string | null;
|
|
136
139
|
/**
|
|
137
140
|
* One line the model wrote about them. **Replaced, not appended** — it is rendered into every future prompt for this pair, so it is bounded by design.
|
|
138
141
|
*/
|
|
139
|
-
note
|
|
142
|
+
note: string | null;
|
|
140
143
|
/**
|
|
141
144
|
* How many times the model has recorded a change. Zero on a long history means the tool is not being called, which is the first thing to check when a relationship is not moving.
|
|
142
145
|
*/
|
|
@@ -150,7 +153,7 @@ export type RelationInfo = {
|
|
|
150
153
|
*
|
|
151
154
|
* Derived on every read from the axes below and never stored, so it cannot go stale. The rule is one sentence: *warmth and trust set the direction, familiarity sets how far it can go* — a first conversation caps at Acquaintances however well it went, and the ceiling rises as they talk. Dislike is not capped: an agent can take against somebody on one remark.
|
|
152
155
|
*/
|
|
153
|
-
tier:
|
|
156
|
+
tier: 'Despised' | 'Disliked' | 'Acquaintances' | 'Friends' | 'Good Friends';
|
|
154
157
|
/**
|
|
155
158
|
* -1 to 1, on the same scale.
|
|
156
159
|
*/
|
|
@@ -170,9 +173,9 @@ export type SessionCreateRequest = {
|
|
|
170
173
|
*/
|
|
171
174
|
agent_id: string;
|
|
172
175
|
/**
|
|
173
|
-
* Optional, and only ever the
|
|
176
|
+
* Optional, and only ever the key's own end user — their id from `POST /v1/end-users`, or your own id for them.
|
|
174
177
|
*
|
|
175
|
-
* **A conversation is always the person the ephemeral
|
|
178
|
+
* **A conversation is always the person the ephemeral key was minted for**: the key says who is talking, so this can only confirm it, and naming anybody else is a **403**. What the agent remembers about them — durable facts and the standing relationship — is theirs, and carries into every conversation with any of your agents.
|
|
176
179
|
*
|
|
177
180
|
* Set once, when the session opens. It cannot change afterwards.
|
|
178
181
|
*/
|
|
@@ -194,6 +197,13 @@ export type SessionCreateRequest = {
|
|
|
194
197
|
*/
|
|
195
198
|
title?: string | null;
|
|
196
199
|
};
|
|
200
|
+
export type SessionPage = {
|
|
201
|
+
data: Array<SessionInfo>;
|
|
202
|
+
/**
|
|
203
|
+
* Pass as `cursor` for the next page; `null` when this is the last.
|
|
204
|
+
*/
|
|
205
|
+
next_cursor: string | null;
|
|
206
|
+
};
|
|
197
207
|
export type SessionInfo = {
|
|
198
208
|
agent_id: string;
|
|
199
209
|
created_at: string;
|
|
@@ -214,22 +224,22 @@ export type CompactionInfo = {
|
|
|
214
224
|
/**
|
|
215
225
|
* Durable facts written to long-term memory by this call. Zero when extraction was not asked for, or when there was nothing worth keeping.
|
|
216
226
|
*/
|
|
217
|
-
facts_stored
|
|
218
|
-
input_tokens
|
|
227
|
+
facts_stored: number;
|
|
228
|
+
input_tokens: number | null;
|
|
219
229
|
/**
|
|
220
230
|
* What produced the summary.
|
|
221
231
|
*/
|
|
222
|
-
model
|
|
223
|
-
output_tokens
|
|
232
|
+
model: string | null;
|
|
233
|
+
output_tokens: number | null;
|
|
224
234
|
session_id: string;
|
|
225
235
|
/**
|
|
226
236
|
* What the next turn will start from.
|
|
227
237
|
*/
|
|
228
238
|
summary: string;
|
|
229
239
|
/**
|
|
230
|
-
* `manual` or `
|
|
240
|
+
* `manual` (a client asked), `automatic` (a turn reached the agent's threshold) or `idle` (the conversation went quiet and its facts were extracted).
|
|
231
241
|
*/
|
|
232
|
-
trigger:
|
|
242
|
+
trigger: 'manual' | 'automatic' | 'idle';
|
|
233
243
|
};
|
|
234
244
|
export type CompactRequest = {
|
|
235
245
|
/**
|
|
@@ -239,61 +249,65 @@ export type CompactRequest = {
|
|
|
239
249
|
*/
|
|
240
250
|
extract_facts?: boolean | null;
|
|
241
251
|
};
|
|
242
|
-
export type
|
|
243
|
-
|
|
244
|
-
|
|
252
|
+
export type FactPage = {
|
|
253
|
+
data: Array<FactInfo>;
|
|
254
|
+
/**
|
|
255
|
+
* Pass as `cursor` for the next page; `null` when this is the last.
|
|
256
|
+
*/
|
|
257
|
+
next_cursor: string | null;
|
|
245
258
|
};
|
|
246
259
|
export type FactInfo = {
|
|
247
260
|
/**
|
|
248
261
|
* Which agent was being talked to when this was learned.
|
|
249
262
|
*/
|
|
250
|
-
agent_id
|
|
251
|
-
created_at
|
|
263
|
+
agent_id: string | null;
|
|
264
|
+
created_at: string;
|
|
252
265
|
id: string;
|
|
253
266
|
text: string;
|
|
254
|
-
|
|
267
|
+
/**
|
|
268
|
+
* A fact is never edited, only learned or forgotten: the same as `created_at`.
|
|
269
|
+
*/
|
|
270
|
+
updated_at: string;
|
|
255
271
|
};
|
|
256
|
-
export type
|
|
257
|
-
|
|
258
|
-
|
|
272
|
+
export type FactsDeleted = {
|
|
273
|
+
/**
|
|
274
|
+
* How many stored facts were deleted.
|
|
275
|
+
*/
|
|
276
|
+
facts_deleted: number;
|
|
259
277
|
};
|
|
260
|
-
export type
|
|
261
|
-
|
|
278
|
+
export type RelationPage = {
|
|
279
|
+
data: Array<RelationInfo>;
|
|
262
280
|
/**
|
|
263
|
-
*
|
|
281
|
+
* Pass as `cursor` for the next page; `null` when this is the last.
|
|
264
282
|
*/
|
|
265
|
-
|
|
283
|
+
next_cursor: string | null;
|
|
266
284
|
};
|
|
267
285
|
export type ListSessionsData = {
|
|
268
286
|
body?: never;
|
|
269
287
|
path?: never;
|
|
270
288
|
query?: {
|
|
289
|
+
/**
|
|
290
|
+
* How many to answer, 1 to 200.
|
|
291
|
+
*/
|
|
271
292
|
limit?: number;
|
|
272
|
-
|
|
293
|
+
/**
|
|
294
|
+
* The `next_cursor` of the page before.
|
|
295
|
+
*/
|
|
296
|
+
cursor?: string;
|
|
273
297
|
};
|
|
274
298
|
url: '/v1/agent/sessions';
|
|
275
299
|
};
|
|
276
300
|
export type ListSessionsErrors = {
|
|
277
301
|
/**
|
|
278
|
-
*
|
|
279
|
-
*/
|
|
280
|
-
400: {
|
|
281
|
-
status_code: number;
|
|
282
|
-
detail: string;
|
|
283
|
-
extra?: {
|
|
284
|
-
[key: string]: unknown;
|
|
285
|
-
} | Array<unknown> | null;
|
|
286
|
-
};
|
|
287
|
-
/**
|
|
288
|
-
* Missing or invalid API token
|
|
302
|
+
* Missing or invalid credentials
|
|
289
303
|
*/
|
|
290
304
|
401: ErrorResponse;
|
|
291
305
|
/**
|
|
292
|
-
* The
|
|
306
|
+
* The key is valid but its scopes do not cover this capability
|
|
293
307
|
*/
|
|
294
308
|
403: ErrorResponse;
|
|
295
309
|
/**
|
|
296
|
-
*
|
|
310
|
+
* The request failed validation
|
|
297
311
|
*/
|
|
298
312
|
422: ErrorResponse;
|
|
299
313
|
/**
|
|
@@ -304,9 +318,9 @@ export type ListSessionsErrors = {
|
|
|
304
318
|
export type ListSessionsError = ListSessionsErrors[keyof ListSessionsErrors];
|
|
305
319
|
export type ListSessionsResponses = {
|
|
306
320
|
/**
|
|
307
|
-
*
|
|
321
|
+
* One page of conversations, most recent first
|
|
308
322
|
*/
|
|
309
|
-
200:
|
|
323
|
+
200: SessionPage;
|
|
310
324
|
};
|
|
311
325
|
export type ListSessionsResponse = ListSessionsResponses[keyof ListSessionsResponses];
|
|
312
326
|
export type CreateSessionData = {
|
|
@@ -317,29 +331,23 @@ export type CreateSessionData = {
|
|
|
317
331
|
};
|
|
318
332
|
export type CreateSessionErrors = {
|
|
319
333
|
/**
|
|
320
|
-
*
|
|
334
|
+
* The request could not be read: malformed JSON
|
|
321
335
|
*/
|
|
322
|
-
400:
|
|
323
|
-
status_code: number;
|
|
324
|
-
detail: string;
|
|
325
|
-
extra?: {
|
|
326
|
-
[key: string]: unknown;
|
|
327
|
-
} | Array<unknown> | null;
|
|
328
|
-
};
|
|
336
|
+
400: ErrorResponse;
|
|
329
337
|
/**
|
|
330
|
-
* Missing or invalid
|
|
338
|
+
* Missing or invalid credentials
|
|
331
339
|
*/
|
|
332
340
|
401: ErrorResponse;
|
|
333
341
|
/**
|
|
334
|
-
*
|
|
342
|
+
* The key's scopes do not cover agents, or it is for another agent or person
|
|
335
343
|
*/
|
|
336
|
-
403:
|
|
344
|
+
403: ErrorResponse;
|
|
337
345
|
/**
|
|
338
346
|
* Unknown agent id
|
|
339
347
|
*/
|
|
340
|
-
404:
|
|
348
|
+
404: ErrorResponse;
|
|
341
349
|
/**
|
|
342
|
-
*
|
|
350
|
+
* The request failed validation
|
|
343
351
|
*/
|
|
344
352
|
422: ErrorResponse;
|
|
345
353
|
/**
|
|
@@ -365,29 +373,19 @@ export type DeleteSessionData = {
|
|
|
365
373
|
};
|
|
366
374
|
export type DeleteSessionErrors = {
|
|
367
375
|
/**
|
|
368
|
-
*
|
|
369
|
-
*/
|
|
370
|
-
400: {
|
|
371
|
-
status_code: number;
|
|
372
|
-
detail: string;
|
|
373
|
-
extra?: {
|
|
374
|
-
[key: string]: unknown;
|
|
375
|
-
} | Array<unknown> | null;
|
|
376
|
-
};
|
|
377
|
-
/**
|
|
378
|
-
* Missing or invalid API token
|
|
376
|
+
* Missing or invalid credentials
|
|
379
377
|
*/
|
|
380
378
|
401: ErrorResponse;
|
|
381
379
|
/**
|
|
382
|
-
* The
|
|
380
|
+
* The key is valid but its scopes do not cover this capability
|
|
383
381
|
*/
|
|
384
382
|
403: ErrorResponse;
|
|
385
383
|
/**
|
|
386
384
|
* Unknown session id
|
|
387
385
|
*/
|
|
388
|
-
404:
|
|
386
|
+
404: ErrorResponse;
|
|
389
387
|
/**
|
|
390
|
-
*
|
|
388
|
+
* The request failed validation
|
|
391
389
|
*/
|
|
392
390
|
422: ErrorResponse;
|
|
393
391
|
/**
|
|
@@ -400,51 +398,41 @@ export type DeleteSessionResponses = {
|
|
|
400
398
|
/**
|
|
401
399
|
* The session and its messages are gone
|
|
402
400
|
*/
|
|
403
|
-
|
|
401
|
+
204: void;
|
|
404
402
|
};
|
|
405
403
|
export type DeleteSessionResponse = DeleteSessionResponses[keyof DeleteSessionResponses];
|
|
406
|
-
export type
|
|
404
|
+
export type GetSessionData = {
|
|
407
405
|
body?: never;
|
|
408
406
|
path: {
|
|
409
407
|
session_id: string;
|
|
410
408
|
};
|
|
411
409
|
query?: {
|
|
412
410
|
/**
|
|
413
|
-
* How many messages
|
|
411
|
+
* How many messages, counting back from the newest, 1 to 200. The page itself is oldest first.
|
|
414
412
|
*/
|
|
415
413
|
limit?: number;
|
|
416
414
|
/**
|
|
417
|
-
*
|
|
415
|
+
* `messages.next_cursor` of the page before, for the older messages.
|
|
418
416
|
*/
|
|
419
|
-
|
|
417
|
+
cursor?: string;
|
|
420
418
|
};
|
|
421
419
|
url: '/v1/agent/sessions/{session_id}';
|
|
422
420
|
};
|
|
423
|
-
export type
|
|
421
|
+
export type GetSessionErrors = {
|
|
424
422
|
/**
|
|
425
|
-
*
|
|
426
|
-
*/
|
|
427
|
-
400: {
|
|
428
|
-
status_code: number;
|
|
429
|
-
detail: string;
|
|
430
|
-
extra?: {
|
|
431
|
-
[key: string]: unknown;
|
|
432
|
-
} | Array<unknown> | null;
|
|
433
|
-
};
|
|
434
|
-
/**
|
|
435
|
-
* Missing or invalid API token
|
|
423
|
+
* Missing or invalid credentials
|
|
436
424
|
*/
|
|
437
425
|
401: ErrorResponse;
|
|
438
426
|
/**
|
|
439
|
-
* The
|
|
427
|
+
* The key is valid but its scopes do not cover this capability
|
|
440
428
|
*/
|
|
441
429
|
403: ErrorResponse;
|
|
442
430
|
/**
|
|
443
431
|
* Unknown session id
|
|
444
432
|
*/
|
|
445
|
-
404:
|
|
433
|
+
404: ErrorResponse;
|
|
446
434
|
/**
|
|
447
|
-
*
|
|
435
|
+
* The request failed validation
|
|
448
436
|
*/
|
|
449
437
|
422: ErrorResponse;
|
|
450
438
|
/**
|
|
@@ -452,15 +440,15 @@ export type GetSessionDetailErrors = {
|
|
|
452
440
|
*/
|
|
453
441
|
429: ErrorResponse;
|
|
454
442
|
};
|
|
455
|
-
export type
|
|
456
|
-
export type
|
|
443
|
+
export type GetSessionError = GetSessionErrors[keyof GetSessionErrors];
|
|
444
|
+
export type GetSessionResponses = {
|
|
457
445
|
/**
|
|
458
446
|
* The conversation and one page of its messages
|
|
459
447
|
*/
|
|
460
448
|
200: SessionDetail;
|
|
461
449
|
};
|
|
462
|
-
export type
|
|
463
|
-
export type
|
|
450
|
+
export type GetSessionResponse = GetSessionResponses[keyof GetSessionResponses];
|
|
451
|
+
export type CompactSessionData = {
|
|
464
452
|
body: CompactRequest;
|
|
465
453
|
path: {
|
|
466
454
|
session_id: string;
|
|
@@ -468,35 +456,29 @@ export type CompactData = {
|
|
|
468
456
|
query?: never;
|
|
469
457
|
url: '/v1/agent/sessions/{session_id}/compact';
|
|
470
458
|
};
|
|
471
|
-
export type
|
|
459
|
+
export type CompactSessionErrors = {
|
|
472
460
|
/**
|
|
473
|
-
*
|
|
461
|
+
* The request could not be read: malformed JSON
|
|
474
462
|
*/
|
|
475
|
-
400:
|
|
476
|
-
status_code: number;
|
|
477
|
-
detail: string;
|
|
478
|
-
extra?: {
|
|
479
|
-
[key: string]: unknown;
|
|
480
|
-
} | Array<unknown> | null;
|
|
481
|
-
};
|
|
463
|
+
400: ErrorResponse;
|
|
482
464
|
/**
|
|
483
|
-
* Missing or invalid
|
|
465
|
+
* Missing or invalid credentials
|
|
484
466
|
*/
|
|
485
467
|
401: ErrorResponse;
|
|
486
468
|
/**
|
|
487
|
-
* The
|
|
469
|
+
* The key is valid but its scopes do not cover this capability
|
|
488
470
|
*/
|
|
489
471
|
403: ErrorResponse;
|
|
490
472
|
/**
|
|
491
473
|
* Unknown session id
|
|
492
474
|
*/
|
|
493
|
-
404:
|
|
475
|
+
404: ErrorResponse;
|
|
494
476
|
/**
|
|
495
|
-
*
|
|
477
|
+
* Another compaction of this conversation finished first
|
|
496
478
|
*/
|
|
497
|
-
409:
|
|
479
|
+
409: ErrorResponse;
|
|
498
480
|
/**
|
|
499
|
-
*
|
|
481
|
+
* The request failed validation
|
|
500
482
|
*/
|
|
501
483
|
422: ErrorResponse;
|
|
502
484
|
/**
|
|
@@ -506,21 +488,21 @@ export type CompactErrors = {
|
|
|
506
488
|
/**
|
|
507
489
|
* The model provider failed or timed out
|
|
508
490
|
*/
|
|
509
|
-
502:
|
|
491
|
+
502: ErrorResponse;
|
|
510
492
|
/**
|
|
511
|
-
*
|
|
493
|
+
* The model provider is not configured
|
|
512
494
|
*/
|
|
513
|
-
503:
|
|
495
|
+
503: ErrorResponse;
|
|
514
496
|
};
|
|
515
|
-
export type
|
|
516
|
-
export type
|
|
497
|
+
export type CompactSessionError = CompactSessionErrors[keyof CompactSessionErrors];
|
|
498
|
+
export type CompactSessionResponses = {
|
|
517
499
|
/**
|
|
518
500
|
* The summary that replaced the turns it covers
|
|
519
501
|
*/
|
|
520
502
|
200: CompactionInfo;
|
|
521
503
|
};
|
|
522
|
-
export type
|
|
523
|
-
export type
|
|
504
|
+
export type CompactSessionResponse = CompactSessionResponses[keyof CompactSessionResponses];
|
|
505
|
+
export type ExtractSessionFactsData = {
|
|
524
506
|
body?: never;
|
|
525
507
|
path: {
|
|
526
508
|
session_id: string;
|
|
@@ -528,35 +510,25 @@ export type ExtractData = {
|
|
|
528
510
|
query?: never;
|
|
529
511
|
url: '/v1/agent/sessions/{session_id}/extract';
|
|
530
512
|
};
|
|
531
|
-
export type
|
|
532
|
-
/**
|
|
533
|
-
* Validation Exception
|
|
534
|
-
*/
|
|
535
|
-
400: {
|
|
536
|
-
status_code: number;
|
|
537
|
-
detail: string;
|
|
538
|
-
extra?: {
|
|
539
|
-
[key: string]: unknown;
|
|
540
|
-
} | Array<unknown> | null;
|
|
541
|
-
};
|
|
513
|
+
export type ExtractSessionFactsErrors = {
|
|
542
514
|
/**
|
|
543
|
-
* Missing or invalid
|
|
515
|
+
* Missing or invalid credentials
|
|
544
516
|
*/
|
|
545
517
|
401: ErrorResponse;
|
|
546
518
|
/**
|
|
547
|
-
* The
|
|
519
|
+
* The key is valid but its scopes do not cover this capability
|
|
548
520
|
*/
|
|
549
521
|
403: ErrorResponse;
|
|
550
522
|
/**
|
|
551
523
|
* Unknown session id
|
|
552
524
|
*/
|
|
553
|
-
404:
|
|
525
|
+
404: ErrorResponse;
|
|
554
526
|
/**
|
|
555
|
-
*
|
|
527
|
+
* Another compaction of this conversation finished first
|
|
556
528
|
*/
|
|
557
|
-
409:
|
|
529
|
+
409: ErrorResponse;
|
|
558
530
|
/**
|
|
559
|
-
*
|
|
531
|
+
* The request failed validation
|
|
560
532
|
*/
|
|
561
533
|
422: ErrorResponse;
|
|
562
534
|
/**
|
|
@@ -566,53 +538,42 @@ export type ExtractErrors = {
|
|
|
566
538
|
/**
|
|
567
539
|
* The model provider failed or timed out
|
|
568
540
|
*/
|
|
569
|
-
502:
|
|
541
|
+
502: ErrorResponse;
|
|
570
542
|
/**
|
|
571
|
-
*
|
|
543
|
+
* The model provider is not configured
|
|
572
544
|
*/
|
|
573
|
-
503:
|
|
545
|
+
503: ErrorResponse;
|
|
574
546
|
};
|
|
575
|
-
export type
|
|
576
|
-
export type
|
|
547
|
+
export type ExtractSessionFactsError = ExtractSessionFactsErrors[keyof ExtractSessionFactsErrors];
|
|
548
|
+
export type ExtractSessionFactsResponses = {
|
|
577
549
|
/**
|
|
578
550
|
* The facts pulled out of the conversation and stored
|
|
579
551
|
*/
|
|
580
552
|
200: CompactionInfo;
|
|
581
553
|
};
|
|
582
|
-
export type
|
|
583
|
-
export type
|
|
554
|
+
export type ExtractSessionFactsResponse = ExtractSessionFactsResponses[keyof ExtractSessionFactsResponses];
|
|
555
|
+
export type DeleteAllFactsData = {
|
|
584
556
|
body?: never;
|
|
585
557
|
path?: never;
|
|
586
558
|
query?: {
|
|
559
|
+
/**
|
|
560
|
+
* Optional, and only ever the key's own end user — their `eu_...` id or your own id for them. Anybody else is a 403.
|
|
561
|
+
*/
|
|
587
562
|
end_user_id?: string;
|
|
588
563
|
};
|
|
589
564
|
url: '/v1/agent/facts';
|
|
590
565
|
};
|
|
591
|
-
export type
|
|
566
|
+
export type DeleteAllFactsErrors = {
|
|
592
567
|
/**
|
|
593
|
-
*
|
|
594
|
-
*/
|
|
595
|
-
400: {
|
|
596
|
-
status_code: number;
|
|
597
|
-
detail: string;
|
|
598
|
-
extra?: {
|
|
599
|
-
[key: string]: unknown;
|
|
600
|
-
} | Array<unknown> | null;
|
|
601
|
-
};
|
|
602
|
-
/**
|
|
603
|
-
* Missing or invalid API token
|
|
568
|
+
* Missing or invalid credentials
|
|
604
569
|
*/
|
|
605
570
|
401: ErrorResponse;
|
|
606
571
|
/**
|
|
607
|
-
* The
|
|
572
|
+
* The key is valid but its scopes do not cover this capability
|
|
608
573
|
*/
|
|
609
574
|
403: ErrorResponse;
|
|
610
575
|
/**
|
|
611
|
-
*
|
|
612
|
-
*/
|
|
613
|
-
404: unknown;
|
|
614
|
-
/**
|
|
615
|
-
* Request failed validation
|
|
576
|
+
* The request failed validation
|
|
616
577
|
*/
|
|
617
578
|
422: ErrorResponse;
|
|
618
579
|
/**
|
|
@@ -620,47 +581,36 @@ export type ForgetUserFactsErrors = {
|
|
|
620
581
|
*/
|
|
621
582
|
429: ErrorResponse;
|
|
622
583
|
};
|
|
623
|
-
export type
|
|
624
|
-
export type
|
|
584
|
+
export type DeleteAllFactsError = DeleteAllFactsErrors[keyof DeleteAllFactsErrors];
|
|
585
|
+
export type DeleteAllFactsResponses = {
|
|
625
586
|
/**
|
|
626
587
|
* How many stored facts were deleted
|
|
627
588
|
*/
|
|
628
|
-
200:
|
|
589
|
+
200: FactsDeleted;
|
|
629
590
|
};
|
|
630
|
-
export type
|
|
591
|
+
export type DeleteAllFactsResponse = DeleteAllFactsResponses[keyof DeleteAllFactsResponses];
|
|
631
592
|
export type ListFactsData = {
|
|
632
593
|
body?: never;
|
|
633
594
|
path?: never;
|
|
634
595
|
query?: {
|
|
596
|
+
/**
|
|
597
|
+
* Optional, and only ever the key's own end user — their `eu_...` id or your own id for them. Anybody else is a 403.
|
|
598
|
+
*/
|
|
635
599
|
end_user_id?: string;
|
|
636
600
|
};
|
|
637
601
|
url: '/v1/agent/facts';
|
|
638
602
|
};
|
|
639
603
|
export type ListFactsErrors = {
|
|
640
604
|
/**
|
|
641
|
-
*
|
|
642
|
-
*/
|
|
643
|
-
400: {
|
|
644
|
-
status_code: number;
|
|
645
|
-
detail: string;
|
|
646
|
-
extra?: {
|
|
647
|
-
[key: string]: unknown;
|
|
648
|
-
} | Array<unknown> | null;
|
|
649
|
-
};
|
|
650
|
-
/**
|
|
651
|
-
* Missing or invalid API token
|
|
605
|
+
* Missing or invalid credentials
|
|
652
606
|
*/
|
|
653
607
|
401: ErrorResponse;
|
|
654
608
|
/**
|
|
655
|
-
* The
|
|
609
|
+
* The key is valid but its scopes do not cover this capability
|
|
656
610
|
*/
|
|
657
611
|
403: ErrorResponse;
|
|
658
612
|
/**
|
|
659
|
-
*
|
|
660
|
-
*/
|
|
661
|
-
404: unknown;
|
|
662
|
-
/**
|
|
663
|
-
* Request failed validation
|
|
613
|
+
* The request failed validation
|
|
664
614
|
*/
|
|
665
615
|
422: ErrorResponse;
|
|
666
616
|
/**
|
|
@@ -673,10 +623,10 @@ export type ListFactsResponses = {
|
|
|
673
623
|
/**
|
|
674
624
|
* What the platform remembers about this end user
|
|
675
625
|
*/
|
|
676
|
-
200:
|
|
626
|
+
200: FactPage;
|
|
677
627
|
};
|
|
678
628
|
export type ListFactsResponse = ListFactsResponses[keyof ListFactsResponses];
|
|
679
|
-
export type
|
|
629
|
+
export type DeleteFactData = {
|
|
680
630
|
body?: never;
|
|
681
631
|
path: {
|
|
682
632
|
fact_id: string;
|
|
@@ -684,31 +634,21 @@ export type ForgetFactData = {
|
|
|
684
634
|
query?: never;
|
|
685
635
|
url: '/v1/agent/facts/{fact_id}';
|
|
686
636
|
};
|
|
687
|
-
export type
|
|
637
|
+
export type DeleteFactErrors = {
|
|
688
638
|
/**
|
|
689
|
-
*
|
|
690
|
-
*/
|
|
691
|
-
400: {
|
|
692
|
-
status_code: number;
|
|
693
|
-
detail: string;
|
|
694
|
-
extra?: {
|
|
695
|
-
[key: string]: unknown;
|
|
696
|
-
} | Array<unknown> | null;
|
|
697
|
-
};
|
|
698
|
-
/**
|
|
699
|
-
* Missing or invalid API token
|
|
639
|
+
* Missing or invalid credentials
|
|
700
640
|
*/
|
|
701
641
|
401: ErrorResponse;
|
|
702
642
|
/**
|
|
703
|
-
* The
|
|
643
|
+
* The key is valid but its scopes do not cover this capability
|
|
704
644
|
*/
|
|
705
645
|
403: ErrorResponse;
|
|
706
646
|
/**
|
|
707
|
-
*
|
|
647
|
+
* Unknown fact id
|
|
708
648
|
*/
|
|
709
|
-
404:
|
|
649
|
+
404: ErrorResponse;
|
|
710
650
|
/**
|
|
711
|
-
*
|
|
651
|
+
* The request failed validation
|
|
712
652
|
*/
|
|
713
653
|
422: ErrorResponse;
|
|
714
654
|
/**
|
|
@@ -716,49 +656,52 @@ export type ForgetFactErrors = {
|
|
|
716
656
|
*/
|
|
717
657
|
429: ErrorResponse;
|
|
718
658
|
};
|
|
719
|
-
export type
|
|
720
|
-
export type
|
|
659
|
+
export type DeleteFactError = DeleteFactErrors[keyof DeleteFactErrors];
|
|
660
|
+
export type DeleteFactResponses = {
|
|
721
661
|
/**
|
|
722
662
|
* The fact is gone
|
|
723
663
|
*/
|
|
724
|
-
|
|
664
|
+
204: void;
|
|
725
665
|
};
|
|
726
|
-
export type
|
|
666
|
+
export type DeleteFactResponse = DeleteFactResponses[keyof DeleteFactResponses];
|
|
727
667
|
export type ListRelationsData = {
|
|
728
668
|
body?: never;
|
|
729
669
|
path?: never;
|
|
730
670
|
query?: {
|
|
671
|
+
/**
|
|
672
|
+
* Only this agent's relationship.
|
|
673
|
+
*/
|
|
731
674
|
agent_id?: string;
|
|
675
|
+
/**
|
|
676
|
+
* Optional, and only ever the key's own end user — their `eu_...` id or your own id for them. Anybody else is a 403.
|
|
677
|
+
*/
|
|
732
678
|
end_user_id?: string;
|
|
733
|
-
|
|
679
|
+
/**
|
|
680
|
+
* How many to answer, 1 to 200.
|
|
681
|
+
*/
|
|
682
|
+
limit?: number;
|
|
683
|
+
/**
|
|
684
|
+
* The `next_cursor` of the page before.
|
|
685
|
+
*/
|
|
686
|
+
cursor?: string;
|
|
734
687
|
};
|
|
735
688
|
url: '/v1/agent/relations';
|
|
736
689
|
};
|
|
737
690
|
export type ListRelationsErrors = {
|
|
738
691
|
/**
|
|
739
|
-
*
|
|
740
|
-
*/
|
|
741
|
-
400: {
|
|
742
|
-
status_code: number;
|
|
743
|
-
detail: string;
|
|
744
|
-
extra?: {
|
|
745
|
-
[key: string]: unknown;
|
|
746
|
-
} | Array<unknown> | null;
|
|
747
|
-
};
|
|
748
|
-
/**
|
|
749
|
-
* Missing or invalid API token
|
|
692
|
+
* Missing or invalid credentials
|
|
750
693
|
*/
|
|
751
694
|
401: ErrorResponse;
|
|
752
695
|
/**
|
|
753
|
-
* The
|
|
696
|
+
* The key is valid but its scopes do not cover this capability
|
|
754
697
|
*/
|
|
755
698
|
403: ErrorResponse;
|
|
756
699
|
/**
|
|
757
|
-
* Unknown agent id
|
|
700
|
+
* Unknown agent id
|
|
758
701
|
*/
|
|
759
|
-
404:
|
|
702
|
+
404: ErrorResponse;
|
|
760
703
|
/**
|
|
761
|
-
*
|
|
704
|
+
* The request failed validation
|
|
762
705
|
*/
|
|
763
706
|
422: ErrorResponse;
|
|
764
707
|
/**
|
|
@@ -769,8 +712,8 @@ export type ListRelationsErrors = {
|
|
|
769
712
|
export type ListRelationsError = ListRelationsErrors[keyof ListRelationsErrors];
|
|
770
713
|
export type ListRelationsResponses = {
|
|
771
714
|
/**
|
|
772
|
-
* How
|
|
715
|
+
* How each agent feels about the person, most recent first
|
|
773
716
|
*/
|
|
774
|
-
200:
|
|
717
|
+
200: RelationPage;
|
|
775
718
|
};
|
|
776
719
|
export type ListRelationsResponse = ListRelationsResponses[keyof ListRelationsResponses];
|