@soat/sdk 0.6.4 → 0.6.6

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.
@@ -1,103 +1,37 @@
1
1
  /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
- "use strict";
3
-
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __name = (target, value) => __defProp(target, "name", {
9
- value,
10
- configurable: true
2
+ Object.defineProperty(exports, Symbol.toStringTag, {
3
+ value: 'Module'
11
4
  });
12
- var __export = (target, all) => {
13
- for (var name in all) __defProp(target, name, {
14
- get: all[name],
15
- enumerable: true
16
- });
17
- };
18
- var __copyProps = (to, from, except, desc) => {
19
- if (from && typeof from === "object" || typeof from === "function") {
20
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
21
- get: () => from[key],
22
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
23
- });
24
- }
25
- return to;
26
- };
27
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
28
- value: true
29
- }), mod);
30
5
 
31
- // src/index.ts
32
- var index_exports = {};
33
- __export(index_exports, {
34
- Actors: () => Actors,
35
- Agents: () => Agents,
36
- AiProviders: () => AiProviders,
37
- ApiKeys: () => ApiKeys,
38
- Chats: () => Chats,
39
- Conversations: () => Conversations,
40
- Documents: () => Documents,
41
- Files: () => Files,
42
- Formations: () => Formations,
43
- Knowledge: () => Knowledge,
44
- Memories: () => Memories,
45
- MemoryEntries: () => MemoryEntries,
46
- Orchestrations: () => Orchestrations,
47
- Policies: () => Policies,
48
- Projects: () => Projects,
49
- Secrets: () => Secrets,
50
- Sessions: () => Sessions,
51
- SoatClient: () => SoatClient,
52
- Tools: () => Tools,
53
- Traces: () => Traces,
54
- Users: () => Users,
55
- Webhooks: () => Webhooks,
56
- createClient: () => createClient,
57
- createConfig: () => createConfig
58
- });
59
- module.exports = __toCommonJS(index_exports);
60
-
61
- // src/generated/core/bodySerializer.gen.ts
62
- var serializeFormDataPair = /* @__PURE__ */__name((data, key, value) => {
63
- if (typeof value === "string" || value instanceof Blob) {
64
- data.append(key, value);
65
- } else if (value instanceof Date) {
66
- data.append(key, value.toISOString());
67
- } else {
68
- data.append(key, JSON.stringify(value));
69
- }
70
- }, "serializeFormDataPair");
6
+ //#region src/generated/core/bodySerializer.gen.ts
7
+ var serializeFormDataPair = (data, key, value) => {
8
+ if (typeof value === "string" || value instanceof Blob) data.append(key, value);else if (value instanceof Date) data.append(key, value.toISOString());else data.append(key, JSON.stringify(value));
9
+ };
71
10
  var formDataBodySerializer = {
72
- bodySerializer: /* @__PURE__ */__name(body => {
11
+ bodySerializer: body => {
73
12
  const data = new FormData();
74
13
  Object.entries(body).forEach(([key, value]) => {
75
- if (value === void 0 || value === null) {
76
- return;
77
- }
78
- if (Array.isArray(value)) {
79
- value.forEach(v => serializeFormDataPair(data, key, v));
80
- } else {
81
- serializeFormDataPair(data, key, value);
82
- }
14
+ if (value === void 0 || value === null) return;
15
+ if (Array.isArray(value)) value.forEach(v => serializeFormDataPair(data, key, v));else serializeFormDataPair(data, key, value);
83
16
  });
84
17
  return data;
85
- }, "bodySerializer")
18
+ }
86
19
  };
87
20
  var jsonBodySerializer = {
88
- bodySerializer: /* @__PURE__ */__name(body => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value), "bodySerializer")
21
+ bodySerializer: body => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value)
89
22
  };
90
23
 
91
- // src/generated/core/params.gen.ts
92
- var extraPrefixesMap = {
24
+ //#endregion
25
+ //#region src/generated/core/params.gen.ts
26
+ var extraPrefixes = Object.entries({
93
27
  $body_: "body",
94
28
  $headers_: "headers",
95
29
  $path_: "path",
96
30
  $query_: "query"
97
- };
98
- var extraPrefixes = Object.entries(extraPrefixesMap);
31
+ });
99
32
 
100
- // src/generated/core/serverSentEvents.gen.ts
33
+ //#endregion
34
+ //#region src/generated/core/serverSentEvents.gen.ts
101
35
  function createSseClient({
102
36
  onRequest,
103
37
  onSseError,
@@ -113,7 +47,7 @@ function createSseClient({
113
47
  }) {
114
48
  let lastEventId;
115
49
  const sleep = sseSleepFn ?? (ms => new Promise(resolve => setTimeout(resolve, ms)));
116
- const createStream = /* @__PURE__ */__name(async function* () {
50
+ const createStream = async function* () {
117
51
  let retryDelay = sseDefaultRetryDelay ?? 3e3;
118
52
  let attempt = 0;
119
53
  const signal = options.signal ?? new AbortController().signal;
@@ -121,9 +55,7 @@ function createSseClient({
121
55
  if (signal.aborted) break;
122
56
  attempt++;
123
57
  const headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers);
124
- if (lastEventId !== void 0) {
125
- headers.set("Last-Event-ID", lastEventId);
126
- }
58
+ if (lastEventId !== void 0) headers.set("Last-Event-ID", lastEventId);
127
59
  try {
128
60
  const requestInit = {
129
61
  redirect: "follow",
@@ -133,20 +65,17 @@ function createSseClient({
133
65
  signal
134
66
  };
135
67
  let request = new Request(url, requestInit);
136
- if (onRequest) {
137
- request = await onRequest(url, requestInit);
138
- }
139
- const _fetch = options.fetch ?? globalThis.fetch;
140
- const response = await _fetch(request);
68
+ if (onRequest) request = await onRequest(url, requestInit);
69
+ const response = await (options.fetch ?? globalThis.fetch)(request);
141
70
  if (!response.ok) throw new Error(`SSE failed: ${response.status} ${response.statusText}`);
142
71
  if (!response.body) throw new Error("No body in SSE response");
143
72
  const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();
144
73
  let buffer = "";
145
- const abortHandler = /* @__PURE__ */__name(() => {
74
+ const abortHandler = () => {
146
75
  try {
147
76
  reader.cancel();
148
77
  } catch {}
149
- }, "abortHandler");
78
+ };
150
79
  signal.addEventListener("abort", abortHandler);
151
80
  try {
152
81
  while (true) {
@@ -163,19 +92,9 @@ function createSseClient({
163
92
  const lines = chunk.split("\n");
164
93
  const dataLines = [];
165
94
  let eventName;
166
- for (const line of lines) {
167
- if (line.startsWith("data:")) {
168
- dataLines.push(line.replace(/^data:\s*/, ""));
169
- } else if (line.startsWith("event:")) {
170
- eventName = line.replace(/^event:\s*/, "");
171
- } else if (line.startsWith("id:")) {
172
- lastEventId = line.replace(/^id:\s*/, "");
173
- } else if (line.startsWith("retry:")) {
174
- const parsed = Number.parseInt(line.replace(/^retry:\s*/, ""), 10);
175
- if (!Number.isNaN(parsed)) {
176
- retryDelay = parsed;
177
- }
178
- }
95
+ for (const line of lines) if (line.startsWith("data:")) dataLines.push(line.replace(/^data:\s*/, ""));else if (line.startsWith("event:")) eventName = line.replace(/^event:\s*/, "");else if (line.startsWith("id:")) lastEventId = line.replace(/^id:\s*/, "");else if (line.startsWith("retry:")) {
96
+ const parsed = Number.parseInt(line.replace(/^retry:\s*/, ""), 10);
97
+ if (!Number.isNaN(parsed)) retryDelay = parsed;
179
98
  }
180
99
  let data;
181
100
  let parsedJson = false;
@@ -189,12 +108,8 @@ function createSseClient({
189
108
  }
190
109
  }
191
110
  if (parsedJson) {
192
- if (responseValidator) {
193
- await responseValidator(data);
194
- }
195
- if (responseTransformer) {
196
- data = await responseTransformer(data);
197
- }
111
+ if (responseValidator) await responseValidator(data);
112
+ if (responseTransformer) data = await responseTransformer(data);
198
113
  }
199
114
  onSseEvent?.({
200
115
  data,
@@ -202,9 +117,7 @@ function createSseClient({
202
117
  id: lastEventId,
203
118
  retry: retryDelay
204
119
  });
205
- if (dataLines.length) {
206
- yield data;
207
- }
120
+ if (dataLines.length) yield data;
208
121
  }
209
122
  }
210
123
  } finally {
@@ -214,23 +127,19 @@ function createSseClient({
214
127
  break;
215
128
  } catch (error) {
216
129
  onSseError?.(error);
217
- if (sseMaxRetryAttempts !== void 0 && attempt >= sseMaxRetryAttempts) {
218
- break;
219
- }
220
- const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 3e4);
221
- await sleep(backoff);
130
+ if (sseMaxRetryAttempts !== void 0 && attempt >= sseMaxRetryAttempts) break;
131
+ await sleep(Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 3e4));
222
132
  }
223
133
  }
224
- }, "createStream");
225
- const stream = createStream();
134
+ };
226
135
  return {
227
- stream
136
+ stream: createStream()
228
137
  };
229
138
  }
230
- __name(createSseClient, "createSseClient");
231
139
 
232
- // src/generated/core/pathSerializer.gen.ts
233
- var separatorArrayExplode = /* @__PURE__ */__name(style => {
140
+ //#endregion
141
+ //#region src/generated/core/pathSerializer.gen.ts
142
+ var separatorArrayExplode = style => {
234
143
  switch (style) {
235
144
  case "label":
236
145
  return ".";
@@ -241,8 +150,8 @@ var separatorArrayExplode = /* @__PURE__ */__name(style => {
241
150
  default:
242
151
  return "&";
243
152
  }
244
- }, "separatorArrayExplode");
245
- var separatorArrayNoExplode = /* @__PURE__ */__name(style => {
153
+ };
154
+ var separatorArrayNoExplode = style => {
246
155
  switch (style) {
247
156
  case "form":
248
157
  return ",";
@@ -253,8 +162,8 @@ var separatorArrayNoExplode = /* @__PURE__ */__name(style => {
253
162
  default:
254
163
  return ",";
255
164
  }
256
- }, "separatorArrayNoExplode");
257
- var separatorObjectExplode = /* @__PURE__ */__name(style => {
165
+ };
166
+ var separatorObjectExplode = style => {
258
167
  switch (style) {
259
168
  case "label":
260
169
  return ".";
@@ -265,8 +174,8 @@ var separatorObjectExplode = /* @__PURE__ */__name(style => {
265
174
  default:
266
175
  return "&";
267
176
  }
268
- }, "separatorObjectExplode");
269
- var serializeArrayParam = /* @__PURE__ */__name(({
177
+ };
178
+ var serializeArrayParam = ({
270
179
  allowReserved,
271
180
  explode,
272
181
  name,
@@ -274,23 +183,21 @@ var serializeArrayParam = /* @__PURE__ */__name(({
274
183
  value
275
184
  }) => {
276
185
  if (!explode) {
277
- const joinedValues2 = (allowReserved ? value : value.map(v => encodeURIComponent(v))).join(separatorArrayNoExplode(style));
186
+ const joinedValues = (allowReserved ? value : value.map(v => encodeURIComponent(v))).join(separatorArrayNoExplode(style));
278
187
  switch (style) {
279
188
  case "label":
280
- return `.${joinedValues2}`;
189
+ return `.${joinedValues}`;
281
190
  case "matrix":
282
- return `;${name}=${joinedValues2}`;
191
+ return `;${name}=${joinedValues}`;
283
192
  case "simple":
284
- return joinedValues2;
193
+ return joinedValues;
285
194
  default:
286
- return `${name}=${joinedValues2}`;
195
+ return `${name}=${joinedValues}`;
287
196
  }
288
197
  }
289
198
  const separator = separatorArrayExplode(style);
290
199
  const joinedValues = value.map(v => {
291
- if (style === "label" || style === "simple") {
292
- return allowReserved ? v : encodeURIComponent(v);
293
- }
200
+ if (style === "label" || style === "simple") return allowReserved ? v : encodeURIComponent(v);
294
201
  return serializePrimitiveParam({
295
202
  allowReserved,
296
203
  name,
@@ -298,21 +205,17 @@ var serializeArrayParam = /* @__PURE__ */__name(({
298
205
  });
299
206
  }).join(separator);
300
207
  return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
301
- }, "serializeArrayParam");
302
- var serializePrimitiveParam = /* @__PURE__ */__name(({
208
+ };
209
+ var serializePrimitiveParam = ({
303
210
  allowReserved,
304
211
  name,
305
212
  value
306
213
  }) => {
307
- if (value === void 0 || value === null) {
308
- return "";
309
- }
310
- if (typeof value === "object") {
311
- throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");
312
- }
214
+ if (value === void 0 || value === null) return "";
215
+ if (typeof value === "object") throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");
313
216
  return `${name}=${allowReserved ? value : encodeURIComponent(value)}`;
314
- }, "serializePrimitiveParam");
315
- var serializeObjectParam = /* @__PURE__ */__name(({
217
+ };
218
+ var serializeObjectParam = ({
316
219
  allowReserved,
317
220
  explode,
318
221
  name,
@@ -320,24 +223,22 @@ var serializeObjectParam = /* @__PURE__ */__name(({
320
223
  value,
321
224
  valueOnly
322
225
  }) => {
323
- if (value instanceof Date) {
324
- return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`;
325
- }
226
+ if (value instanceof Date) return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`;
326
227
  if (style !== "deepObject" && !explode) {
327
228
  let values = [];
328
229
  Object.entries(value).forEach(([key, v]) => {
329
230
  values = [...values, key, allowReserved ? v : encodeURIComponent(v)];
330
231
  });
331
- const joinedValues2 = values.join(",");
232
+ const joinedValues = values.join(",");
332
233
  switch (style) {
333
234
  case "form":
334
- return `${name}=${joinedValues2}`;
235
+ return `${name}=${joinedValues}`;
335
236
  case "label":
336
- return `.${joinedValues2}`;
237
+ return `.${joinedValues}`;
337
238
  case "matrix":
338
- return `;${name}=${joinedValues2}`;
239
+ return `;${name}=${joinedValues}`;
339
240
  default:
340
- return joinedValues2;
241
+ return joinedValues;
341
242
  }
342
243
  }
343
244
  const separator = separatorObjectExplode(style);
@@ -347,69 +248,66 @@ var serializeObjectParam = /* @__PURE__ */__name(({
347
248
  value: v
348
249
  })).join(separator);
349
250
  return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
350
- }, "serializeObjectParam");
251
+ };
351
252
 
352
- // src/generated/core/utils.gen.ts
253
+ //#endregion
254
+ //#region src/generated/core/utils.gen.ts
353
255
  var PATH_PARAM_RE = /\{[^{}]+\}/g;
354
- var defaultPathSerializer = /* @__PURE__ */__name(({
256
+ var defaultPathSerializer = ({
355
257
  path,
356
258
  url: _url
357
259
  }) => {
358
260
  let url = _url;
359
261
  const matches = _url.match(PATH_PARAM_RE);
360
- if (matches) {
361
- for (const match of matches) {
362
- let explode = false;
363
- let name = match.substring(1, match.length - 1);
364
- let style = "simple";
365
- if (name.endsWith("*")) {
366
- explode = true;
367
- name = name.substring(0, name.length - 1);
368
- }
369
- if (name.startsWith(".")) {
370
- name = name.substring(1);
371
- style = "label";
372
- } else if (name.startsWith(";")) {
373
- name = name.substring(1);
374
- style = "matrix";
375
- }
376
- const value = path[name];
377
- if (value === void 0 || value === null) {
378
- continue;
379
- }
380
- if (Array.isArray(value)) {
381
- url = url.replace(match, serializeArrayParam({
382
- explode,
383
- name,
384
- style,
385
- value
386
- }));
387
- continue;
388
- }
389
- if (typeof value === "object") {
390
- url = url.replace(match, serializeObjectParam({
391
- explode,
392
- name,
393
- style,
394
- value,
395
- valueOnly: true
396
- }));
397
- continue;
398
- }
399
- if (style === "matrix") {
400
- url = url.replace(match, `;${serializePrimitiveParam({
401
- name,
402
- value
403
- })}`);
404
- continue;
405
- }
406
- const replaceValue = encodeURIComponent(style === "label" ? `.${value}` : value);
407
- url = url.replace(match, replaceValue);
262
+ if (matches) for (const match of matches) {
263
+ let explode = false;
264
+ let name = match.substring(1, match.length - 1);
265
+ let style = "simple";
266
+ if (name.endsWith("*")) {
267
+ explode = true;
268
+ name = name.substring(0, name.length - 1);
269
+ }
270
+ if (name.startsWith(".")) {
271
+ name = name.substring(1);
272
+ style = "label";
273
+ } else if (name.startsWith(";")) {
274
+ name = name.substring(1);
275
+ style = "matrix";
408
276
  }
277
+ const value = path[name];
278
+ if (value === void 0 || value === null) continue;
279
+ if (Array.isArray(value)) {
280
+ url = url.replace(match, serializeArrayParam({
281
+ explode,
282
+ name,
283
+ style,
284
+ value
285
+ }));
286
+ continue;
287
+ }
288
+ if (typeof value === "object") {
289
+ url = url.replace(match, serializeObjectParam({
290
+ explode,
291
+ name,
292
+ style,
293
+ value,
294
+ valueOnly: true
295
+ }));
296
+ continue;
297
+ }
298
+ if (style === "matrix") {
299
+ url = url.replace(match, `;${serializePrimitiveParam({
300
+ name,
301
+ value
302
+ })}`);
303
+ continue;
304
+ }
305
+ const replaceValue = encodeURIComponent(style === "label" ? `.${value}` : value);
306
+ url = url.replace(match, replaceValue);
409
307
  }
410
308
  return url;
411
- }, "defaultPathSerializer");
412
- var getUrl = /* @__PURE__ */__name(({
309
+ };
310
+ var getUrl = ({
413
311
  baseUrl,
414
312
  path,
415
313
  query,
@@ -418,230 +316,163 @@ var getUrl = /* @__PURE__ */__name(({
418
316
  }) => {
419
317
  const pathUrl = _url.startsWith("/") ? _url : `/${_url}`;
420
318
  let url = (baseUrl ?? "") + pathUrl;
421
- if (path) {
422
- url = defaultPathSerializer({
423
- path,
424
- url
425
- });
426
- }
319
+ if (path) url = defaultPathSerializer({
320
+ path,
321
+ url
322
+ });
427
323
  let search = query ? querySerializer(query) : "";
428
- if (search.startsWith("?")) {
429
- search = search.substring(1);
430
- }
431
- if (search) {
432
- url += `?${search}`;
433
- }
324
+ if (search.startsWith("?")) search = search.substring(1);
325
+ if (search) url += `?${search}`;
434
326
  return url;
435
- }, "getUrl");
327
+ };
436
328
  function getValidRequestBody(options) {
437
329
  const hasBody = options.body !== void 0;
438
- const isSerializedBody = hasBody && options.bodySerializer;
439
- if (isSerializedBody) {
440
- if ("serializedBody" in options) {
441
- const hasSerializedBody = options.serializedBody !== void 0 && options.serializedBody !== "";
442
- return hasSerializedBody ? options.serializedBody : null;
443
- }
330
+ if (hasBody && options.bodySerializer) {
331
+ if ("serializedBody" in options) return options.serializedBody !== void 0 && options.serializedBody !== "" ? options.serializedBody : null;
444
332
  return options.body !== "" ? options.body : null;
445
333
  }
446
- if (hasBody) {
447
- return options.body;
448
- }
449
- return void 0;
334
+ if (hasBody) return options.body;
450
335
  }
451
- __name(getValidRequestBody, "getValidRequestBody");
452
336
 
453
- // src/generated/core/auth.gen.ts
454
- var getAuthToken = /* @__PURE__ */__name(async (auth, callback) => {
337
+ //#endregion
338
+ //#region src/generated/core/auth.gen.ts
339
+ var getAuthToken = async (auth, callback) => {
455
340
  const token = typeof callback === "function" ? await callback(auth) : callback;
456
- if (!token) {
457
- return;
458
- }
459
- if (auth.scheme === "bearer") {
460
- return `Bearer ${token}`;
461
- }
462
- if (auth.scheme === "basic") {
463
- return `Basic ${btoa(token)}`;
464
- }
341
+ if (!token) return;
342
+ if (auth.scheme === "bearer") return `Bearer ${token}`;
343
+ if (auth.scheme === "basic") return `Basic ${btoa(token)}`;
465
344
  return token;
466
- }, "getAuthToken");
345
+ };
467
346
 
468
- // src/generated/client/utils.gen.ts
469
- var createQuerySerializer = /* @__PURE__ */__name(({
347
+ //#endregion
348
+ //#region src/generated/client/utils.gen.ts
349
+ var createQuerySerializer = ({
470
350
  parameters = {},
471
351
  ...args
472
352
  } = {}) => {
473
- const querySerializer = /* @__PURE__ */__name(queryParams => {
353
+ const querySerializer = queryParams => {
474
354
  const search = [];
475
- if (queryParams && typeof queryParams === "object") {
476
- for (const name in queryParams) {
477
- const value = queryParams[name];
478
- if (value === void 0 || value === null) {
479
- continue;
480
- }
481
- const options = parameters[name] || args;
482
- if (Array.isArray(value)) {
483
- const serializedArray = serializeArrayParam({
484
- allowReserved: options.allowReserved,
485
- explode: true,
486
- name,
487
- style: "form",
488
- value,
489
- ...options.array
490
- });
491
- if (serializedArray) search.push(serializedArray);
492
- } else if (typeof value === "object") {
493
- const serializedObject = serializeObjectParam({
494
- allowReserved: options.allowReserved,
495
- explode: true,
496
- name,
497
- style: "deepObject",
498
- value,
499
- ...options.object
500
- });
501
- if (serializedObject) search.push(serializedObject);
502
- } else {
503
- const serializedPrimitive = serializePrimitiveParam({
504
- allowReserved: options.allowReserved,
505
- name,
506
- value
507
- });
508
- if (serializedPrimitive) search.push(serializedPrimitive);
509
- }
355
+ if (queryParams && typeof queryParams === "object") for (const name in queryParams) {
356
+ const value = queryParams[name];
357
+ if (value === void 0 || value === null) continue;
358
+ const options = parameters[name] || args;
359
+ if (Array.isArray(value)) {
360
+ const serializedArray = serializeArrayParam({
361
+ allowReserved: options.allowReserved,
362
+ explode: true,
363
+ name,
364
+ style: "form",
365
+ value,
366
+ ...options.array
367
+ });
368
+ if (serializedArray) search.push(serializedArray);
369
+ } else if (typeof value === "object") {
370
+ const serializedObject = serializeObjectParam({
371
+ allowReserved: options.allowReserved,
372
+ explode: true,
373
+ name,
374
+ style: "deepObject",
375
+ value,
376
+ ...options.object
377
+ });
378
+ if (serializedObject) search.push(serializedObject);
379
+ } else {
380
+ const serializedPrimitive = serializePrimitiveParam({
381
+ allowReserved: options.allowReserved,
382
+ name,
383
+ value
384
+ });
385
+ if (serializedPrimitive) search.push(serializedPrimitive);
510
386
  }
511
387
  }
512
388
  return search.join("&");
513
- }, "querySerializer");
389
+ };
514
390
  return querySerializer;
515
- }, "createQuerySerializer");
516
- var getParseAs = /* @__PURE__ */__name(contentType => {
517
- if (!contentType) {
518
- return "stream";
519
- }
391
+ };
392
+ /**
393
+ * Infers parseAs value from provided Content-Type header.
394
+ */
395
+ var getParseAs = contentType => {
396
+ if (!contentType) return "stream";
520
397
  const cleanContent = contentType.split(";")[0]?.trim();
521
- if (!cleanContent) {
522
- return;
523
- }
524
- if (cleanContent.startsWith("application/json") || cleanContent.endsWith("+json")) {
525
- return "json";
526
- }
527
- if (cleanContent === "multipart/form-data") {
528
- return "formData";
529
- }
530
- if (["application/", "audio/", "image/", "video/"].some(type => cleanContent.startsWith(type))) {
531
- return "blob";
532
- }
533
- if (cleanContent.startsWith("text/")) {
534
- return "text";
535
- }
536
- return;
537
- }, "getParseAs");
538
- var checkForExistence = /* @__PURE__ */__name((options, name) => {
539
- if (!name) {
540
- return false;
541
- }
542
- if (options.headers.has(name) || options.query?.[name] || options.headers.get("Cookie")?.includes(`${name}=`)) {
543
- return true;
544
- }
398
+ if (!cleanContent) return;
399
+ if (cleanContent.startsWith("application/json") || cleanContent.endsWith("+json")) return "json";
400
+ if (cleanContent === "multipart/form-data") return "formData";
401
+ if (["application/", "audio/", "image/", "video/"].some(type => cleanContent.startsWith(type))) return "blob";
402
+ if (cleanContent.startsWith("text/")) return "text";
403
+ };
404
+ var checkForExistence = (options, name) => {
405
+ if (!name) return false;
406
+ if (options.headers.has(name) || options.query?.[name] || options.headers.get("Cookie")?.includes(`${name}=`)) return true;
545
407
  return false;
546
- }, "checkForExistence");
547
- var setAuthParams = /* @__PURE__ */__name(async ({
548
- security,
549
- ...options
550
- }) => {
551
- for (const auth of security) {
552
- if (checkForExistence(options, auth.name)) {
553
- continue;
554
- }
408
+ };
409
+ async function setAuthParams(options) {
410
+ for (const auth of options.security ?? []) {
411
+ if (checkForExistence(options, auth.name)) continue;
555
412
  const token = await getAuthToken(auth, options.auth);
556
- if (!token) {
557
- continue;
558
- }
413
+ if (!token) continue;
559
414
  const name = auth.name ?? "Authorization";
560
415
  switch (auth.in) {
561
416
  case "query":
562
- if (!options.query) {
563
- options.query = {};
564
- }
417
+ if (!options.query) options.query = {};
565
418
  options.query[name] = token;
566
419
  break;
567
420
  case "cookie":
568
421
  options.headers.append("Cookie", `${name}=${token}`);
569
422
  break;
570
- case "header":
571
423
  default:
572
424
  options.headers.set(name, token);
573
425
  break;
574
426
  }
575
427
  }
576
- }, "setAuthParams");
577
- var buildUrl = /* @__PURE__ */__name(options => getUrl({
428
+ }
429
+ var buildUrl = options => getUrl({
578
430
  baseUrl: options.baseUrl,
579
431
  path: options.path,
580
432
  query: options.query,
581
433
  querySerializer: typeof options.querySerializer === "function" ? options.querySerializer : createQuerySerializer(options.querySerializer),
582
434
  url: options.url
583
- }), "buildUrl");
584
- var mergeConfigs = /* @__PURE__ */__name((a, b) => {
435
+ });
436
+ var mergeConfigs = (a, b) => {
585
437
  const config = {
586
438
  ...a,
587
439
  ...b
588
440
  };
589
- if (config.baseUrl?.endsWith("/")) {
590
- config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1);
591
- }
441
+ if (config.baseUrl?.endsWith("/")) config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1);
592
442
  config.headers = mergeHeaders(a.headers, b.headers);
593
443
  return config;
594
- }, "mergeConfigs");
595
- var headersEntries = /* @__PURE__ */__name(headers => {
444
+ };
445
+ var headersEntries = headers => {
596
446
  const entries = [];
597
447
  headers.forEach((value, key) => {
598
448
  entries.push([key, value]);
599
449
  });
600
450
  return entries;
601
- }, "headersEntries");
602
- var mergeHeaders = /* @__PURE__ */__name((...headers) => {
451
+ };
452
+ var mergeHeaders = (...headers) => {
603
453
  const mergedHeaders = new Headers();
604
454
  for (const header of headers) {
605
- if (!header) {
606
- continue;
607
- }
455
+ if (!header) continue;
608
456
  const iterator = header instanceof Headers ? headersEntries(header) : Object.entries(header);
609
- for (const [key, value] of iterator) {
610
- if (value === null) {
611
- mergedHeaders.delete(key);
612
- } else if (Array.isArray(value)) {
613
- for (const v of value) {
614
- mergedHeaders.append(key, v);
615
- }
616
- } else if (value !== void 0) {
617
- mergedHeaders.set(key, typeof value === "object" ? JSON.stringify(value) : value);
618
- }
619
- }
457
+ for (const [key, value] of iterator) if (value === null) mergedHeaders.delete(key);else if (Array.isArray(value)) for (const v of value) mergedHeaders.append(key, v);else if (value !== void 0) mergedHeaders.set(key, typeof value === "object" ? JSON.stringify(value) : value);
620
458
  }
621
459
  return mergedHeaders;
622
- }, "mergeHeaders");
623
- var Interceptors = class Interceptors2 {
624
- static {
625
- __name(this, "Interceptors");
626
- }
460
+ };
461
+ var Interceptors = class {
627
462
  fns = [];
628
463
  clear() {
629
464
  this.fns = [];
630
465
  }
631
466
  eject(id) {
632
467
  const index = this.getInterceptorIndex(id);
633
- if (this.fns[index]) {
634
- this.fns[index] = null;
635
- }
468
+ if (this.fns[index]) this.fns[index] = null;
636
469
  }
637
470
  exists(id) {
638
471
  const index = this.getInterceptorIndex(id);
639
472
  return Boolean(this.fns[index]);
640
473
  }
641
474
  getInterceptorIndex(id) {
642
- if (typeof id === "number") {
643
- return this.fns[id] ? id : -1;
644
- }
475
+ if (typeof id === "number") return this.fns[id] ? id : -1;
645
476
  return this.fns.indexOf(id);
646
477
  }
647
478
  update(id, fn) {
@@ -657,11 +488,11 @@ var Interceptors = class Interceptors2 {
657
488
  return this.fns.length - 1;
658
489
  }
659
490
  };
660
- var createInterceptors = /* @__PURE__ */__name(() => ({
491
+ var createInterceptors = () => ({
661
492
  error: new Interceptors(),
662
493
  request: new Interceptors(),
663
494
  response: new Interceptors()
664
- }), "createInterceptors");
495
+ });
665
496
  var defaultQuerySerializer = createQuerySerializer({
666
497
  allowReserved: false,
667
498
  array: {
@@ -676,26 +507,27 @@ var defaultQuerySerializer = createQuerySerializer({
676
507
  var defaultHeaders = {
677
508
  "Content-Type": "application/json"
678
509
  };
679
- var createConfig = /* @__PURE__ */__name((override = {}) => ({
510
+ var createConfig = (override = {}) => ({
680
511
  ...jsonBodySerializer,
681
512
  headers: defaultHeaders,
682
513
  parseAs: "auto",
683
514
  querySerializer: defaultQuerySerializer,
684
515
  ...override
685
- }), "createConfig");
516
+ });
686
517
 
687
- // src/generated/client/client.gen.ts
688
- var createClient = /* @__PURE__ */__name((config = {}) => {
518
+ //#endregion
519
+ //#region src/generated/client/client.gen.ts
520
+ var createClient = (config = {}) => {
689
521
  let _config = mergeConfigs(createConfig(), config);
690
- const getConfig = /* @__PURE__ */__name(() => ({
522
+ const getConfig = () => ({
691
523
  ..._config
692
- }), "getConfig");
693
- const setConfig = /* @__PURE__ */__name(config2 => {
694
- _config = mergeConfigs(_config, config2);
524
+ });
525
+ const setConfig = config => {
526
+ _config = mergeConfigs(_config, config);
695
527
  return getConfig();
696
- }, "setConfig");
528
+ };
697
529
  const interceptors = createInterceptors();
698
- const beforeRequest = /* @__PURE__ */__name(async options => {
530
+ const beforeRequest = async options => {
699
531
  const opts = {
700
532
  ..._config,
701
533
  ...options,
@@ -703,159 +535,117 @@ var createClient = /* @__PURE__ */__name((config = {}) => {
703
535
  headers: mergeHeaders(_config.headers, options.headers),
704
536
  serializedBody: void 0
705
537
  };
706
- if (opts.security) {
707
- await setAuthParams({
708
- ...opts,
709
- security: opts.security
710
- });
711
- }
712
- if (opts.requestValidator) {
713
- await opts.requestValidator(opts);
714
- }
715
- if (opts.body !== void 0 && opts.bodySerializer) {
716
- opts.serializedBody = opts.bodySerializer(opts.body);
717
- }
718
- if (opts.body === void 0 || opts.serializedBody === "") {
719
- opts.headers.delete("Content-Type");
720
- }
538
+ if (opts.security) await setAuthParams(opts);
539
+ if (opts.requestValidator) await opts.requestValidator(opts);
540
+ if (opts.body !== void 0 && opts.bodySerializer) opts.serializedBody = opts.bodySerializer(opts.body);
541
+ if (opts.body === void 0 || opts.serializedBody === "") opts.headers.delete("Content-Type");
721
542
  const resolvedOpts = opts;
722
- const url = buildUrl(resolvedOpts);
723
543
  return {
724
544
  opts: resolvedOpts,
725
- url
545
+ url: buildUrl(resolvedOpts)
726
546
  };
727
- }, "beforeRequest");
728
- const request = /* @__PURE__ */__name(async options => {
729
- const {
730
- opts,
731
- url
732
- } = await beforeRequest(options);
733
- const requestInit = {
734
- redirect: "follow",
735
- ...opts,
736
- body: getValidRequestBody(opts)
737
- };
738
- let request2 = new Request(url, requestInit);
739
- for (const fn of interceptors.request.fns) {
740
- if (fn) {
741
- request2 = await fn(request2, opts);
742
- }
743
- }
744
- const _fetch = opts.fetch;
547
+ };
548
+ const request = async options => {
549
+ const throwOnError = options.throwOnError ?? _config.throwOnError;
550
+ const responseStyle = options.responseStyle ?? _config.responseStyle;
551
+ let request;
745
552
  let response;
746
553
  try {
747
- response = await _fetch(request2);
748
- } catch (error2) {
749
- let finalError2 = error2;
750
- for (const fn of interceptors.error.fns) {
751
- if (fn) {
752
- finalError2 = await fn(error2, void 0, request2, opts);
753
- }
754
- }
755
- finalError2 = finalError2 || {};
756
- if (opts.throwOnError) {
757
- throw finalError2;
758
- }
759
- return opts.responseStyle === "data" ? void 0 : {
760
- error: finalError2,
761
- request: request2,
762
- response: void 0
554
+ const {
555
+ opts,
556
+ url
557
+ } = await beforeRequest(options);
558
+ const requestInit = {
559
+ redirect: "follow",
560
+ ...opts,
561
+ body: getValidRequestBody(opts)
763
562
  };
764
- }
765
- for (const fn of interceptors.response.fns) {
766
- if (fn) {
767
- response = await fn(response, request2, opts);
768
- }
769
- }
770
- const result = {
771
- request: request2,
772
- response
773
- };
774
- if (response.ok) {
775
- const parseAs = (opts.parseAs === "auto" ? getParseAs(response.headers.get("Content-Type")) : opts.parseAs) ?? "json";
776
- if (response.status === 204 || response.headers.get("Content-Length") === "0") {
777
- let emptyData;
563
+ request = new Request(url, requestInit);
564
+ for (const fn of interceptors.request.fns) if (fn) request = await fn(request, opts);
565
+ const _fetch = opts.fetch;
566
+ response = await _fetch(request);
567
+ for (const fn of interceptors.response.fns) if (fn) response = await fn(response, request, opts);
568
+ const result = {
569
+ request,
570
+ response
571
+ };
572
+ if (response.ok) {
573
+ const parseAs = (opts.parseAs === "auto" ? getParseAs(response.headers.get("Content-Type")) : opts.parseAs) ?? "json";
574
+ if (response.status === 204 || response.headers.get("Content-Length") === "0") {
575
+ let emptyData;
576
+ switch (parseAs) {
577
+ case "arrayBuffer":
578
+ case "blob":
579
+ case "text":
580
+ emptyData = await response[parseAs]();
581
+ break;
582
+ case "formData":
583
+ emptyData = new FormData();
584
+ break;
585
+ case "stream":
586
+ emptyData = response.body;
587
+ break;
588
+ default:
589
+ emptyData = {};
590
+ break;
591
+ }
592
+ return opts.responseStyle === "data" ? emptyData : {
593
+ data: emptyData,
594
+ ...result
595
+ };
596
+ }
597
+ let data;
778
598
  switch (parseAs) {
779
599
  case "arrayBuffer":
780
600
  case "blob":
781
- case "text":
782
- emptyData = await response[parseAs]();
783
- break;
784
601
  case "formData":
785
- emptyData = new FormData();
786
- break;
787
- case "stream":
788
- emptyData = response.body;
602
+ case "text":
603
+ data = await response[parseAs]();
789
604
  break;
790
605
  case "json":
791
- default:
792
- emptyData = {};
793
- break;
606
+ {
607
+ const text = await response.text();
608
+ data = text ? JSON.parse(text) : {};
609
+ break;
610
+ }
611
+ case "stream":
612
+ return opts.responseStyle === "data" ? response.body : {
613
+ data: response.body,
614
+ ...result
615
+ };
794
616
  }
795
- return opts.responseStyle === "data" ? emptyData : {
796
- data: emptyData,
617
+ if (parseAs === "json") {
618
+ if (opts.responseValidator) await opts.responseValidator(data);
619
+ if (opts.responseTransformer) data = await opts.responseTransformer(data);
620
+ }
621
+ return opts.responseStyle === "data" ? data : {
622
+ data,
797
623
  ...result
798
624
  };
799
625
  }
800
- let data;
801
- switch (parseAs) {
802
- case "arrayBuffer":
803
- case "blob":
804
- case "formData":
805
- case "text":
806
- data = await response[parseAs]();
807
- break;
808
- case "json":
809
- {
810
- const text = await response.text();
811
- data = text ? JSON.parse(text) : {};
812
- break;
813
- }
814
- case "stream":
815
- return opts.responseStyle === "data" ? response.body : {
816
- data: response.body,
817
- ...result
818
- };
819
- }
820
- if (parseAs === "json") {
821
- if (opts.responseValidator) {
822
- await opts.responseValidator(data);
823
- }
824
- if (opts.responseTransformer) {
825
- data = await opts.responseTransformer(data);
826
- }
827
- }
828
- return opts.responseStyle === "data" ? data : {
829
- data,
830
- ...result
626
+ const textError = await response.text();
627
+ let jsonError;
628
+ try {
629
+ jsonError = JSON.parse(textError);
630
+ } catch {}
631
+ throw jsonError ?? textError;
632
+ } catch (error) {
633
+ let finalError = error;
634
+ for (const fn of interceptors.error.fns) if (fn) finalError = await fn(finalError, response, request, options);
635
+ finalError = finalError || {};
636
+ if (throwOnError) throw finalError;
637
+ return responseStyle === "data" ? void 0 : {
638
+ error: finalError,
639
+ request,
640
+ response
831
641
  };
832
642
  }
833
- const textError = await response.text();
834
- let jsonError;
835
- try {
836
- jsonError = JSON.parse(textError);
837
- } catch {}
838
- const error = jsonError ?? textError;
839
- let finalError = error;
840
- for (const fn of interceptors.error.fns) {
841
- if (fn) {
842
- finalError = await fn(error, response, request2, opts);
843
- }
844
- }
845
- finalError = finalError || {};
846
- if (opts.throwOnError) {
847
- throw finalError;
848
- }
849
- return opts.responseStyle === "data" ? void 0 : {
850
- error: finalError,
851
- ...result
852
- };
853
- }, "request");
854
- const makeMethodFn = /* @__PURE__ */__name(method => options => request({
643
+ };
644
+ const makeMethodFn = method => options => request({
855
645
  ...options,
856
646
  method
857
- }), "makeMethodFn");
858
- const makeSseFn = /* @__PURE__ */__name(method => async options => {
647
+ });
648
+ const makeSseFn = method => async options => {
859
649
  const {
860
650
  opts,
861
651
  url
@@ -863,25 +653,20 @@ var createClient = /* @__PURE__ */__name((config = {}) => {
863
653
  return createSseClient({
864
654
  ...opts,
865
655
  body: opts.body,
866
- headers: opts.headers,
867
656
  method,
868
- onRequest: /* @__PURE__ */__name(async (url2, init) => {
869
- let request2 = new Request(url2, init);
870
- for (const fn of interceptors.request.fns) {
871
- if (fn) {
872
- request2 = await fn(request2, opts);
873
- }
874
- }
875
- return request2;
876
- }, "onRequest"),
657
+ onRequest: async (url, init) => {
658
+ let request = new Request(url, init);
659
+ for (const fn of interceptors.request.fns) if (fn) request = await fn(request, opts);
660
+ return request;
661
+ },
877
662
  serializedBody: getValidRequestBody(opts),
878
663
  url
879
664
  });
880
- }, "makeSseFn");
881
- const _buildUrl = /* @__PURE__ */__name(options => buildUrl({
665
+ };
666
+ const _buildUrl = options => buildUrl({
882
667
  ..._config,
883
668
  ...options
884
- }), "_buildUrl");
669
+ });
885
670
  return {
886
671
  buildUrl: _buildUrl,
887
672
  connect: makeMethodFn("CONNECT"),
@@ -909,21 +694,20 @@ var createClient = /* @__PURE__ */__name((config = {}) => {
909
694
  },
910
695
  trace: makeMethodFn("TRACE")
911
696
  };
912
- }, "createClient");
697
+ };
913
698
 
914
- // src/generated/client.gen.ts
699
+ //#endregion
700
+ //#region src/generated/client.gen.ts
915
701
  var client = createClient(createConfig());
916
702
 
917
- // src/generated/sdk.gen.ts
703
+ //#endregion
704
+ //#region src/generated/sdk.gen.ts
918
705
  var Actors = class {
919
- static {
920
- __name(this, "Actors");
921
- }
922
706
  /**
923
- * List actors
924
- *
925
- * Returns all actors the caller has access to. If projectId is provided, returns only actors in that project. project keys are scoped to a single project automatically. JWT users without projectId receive actors across all their accessible projects.
926
- */
707
+ * List actors
708
+ *
709
+ * Returns all actors the caller has access to. If projectId is provided, returns only actors in that project. project keys are scoped to a single project automatically. JWT users without projectId receive actors across all their accessible projects.
710
+ */
927
711
  static listActors(options) {
928
712
  return (options?.client ?? client).get({
929
713
  url: "/api/v1/actors",
@@ -931,10 +715,10 @@ var Actors = class {
931
715
  });
932
716
  }
933
717
  /**
934
- * Create an actor
935
- *
936
- * Creates a new actor. project keys automatically infer the project from the key's scope; JWT callers must supply projectId.
937
- */
718
+ * Create an actor
719
+ *
720
+ * Creates a new actor. project keys automatically infer the project from the key's scope; JWT callers must supply projectId.
721
+ */
938
722
  static createActor(options) {
939
723
  return (options.client ?? client).post({
940
724
  url: "/api/v1/actors",
@@ -946,10 +730,10 @@ var Actors = class {
946
730
  });
947
731
  }
948
732
  /**
949
- * Delete an actor
950
- *
951
- * Deletes an actor by its ID
952
- */
733
+ * Delete an actor
734
+ *
735
+ * Deletes an actor by its ID
736
+ */
953
737
  static deleteActor(options) {
954
738
  return (options.client ?? client).delete({
955
739
  url: "/api/v1/actors/{actor_id}",
@@ -957,10 +741,10 @@ var Actors = class {
957
741
  });
958
742
  }
959
743
  /**
960
- * Get an actor by ID
961
- *
962
- * Returns an actor by its ID
963
- */
744
+ * Get an actor by ID
745
+ *
746
+ * Returns an actor by its ID
747
+ */
964
748
  static getActor(options) {
965
749
  return (options.client ?? client).get({
966
750
  url: "/api/v1/actors/{actor_id}",
@@ -968,10 +752,10 @@ var Actors = class {
968
752
  });
969
753
  }
970
754
  /**
971
- * Update an actor
972
- *
973
- * Updates an actor's properties
974
- */
755
+ * Update an actor
756
+ *
757
+ * Updates an actor's properties
758
+ */
975
759
  static updateActor(options) {
976
760
  return (options.client ?? client).patch({
977
761
  url: "/api/v1/actors/{actor_id}",
@@ -983,10 +767,10 @@ var Actors = class {
983
767
  });
984
768
  }
985
769
  /**
986
- * Get actor tags
987
- *
988
- * Returns all tags attached to the actor
989
- */
770
+ * Get actor tags
771
+ *
772
+ * Returns all tags attached to the actor
773
+ */
990
774
  static getActorTags(options) {
991
775
  return (options.client ?? client).get({
992
776
  url: "/api/v1/actors/{actor_id}/tags",
@@ -994,10 +778,10 @@ var Actors = class {
994
778
  });
995
779
  }
996
780
  /**
997
- * Merge actor tags
998
- *
999
- * Merges provided tags with existing tags (existing tags are preserved unless overridden)
1000
- */
781
+ * Merge actor tags
782
+ *
783
+ * Merges provided tags with existing tags (existing tags are preserved unless overridden)
784
+ */
1001
785
  static mergeActorTags(options) {
1002
786
  return (options.client ?? client).patch({
1003
787
  url: "/api/v1/actors/{actor_id}/tags",
@@ -1009,10 +793,10 @@ var Actors = class {
1009
793
  });
1010
794
  }
1011
795
  /**
1012
- * Replace actor tags
1013
- *
1014
- * Replaces all tags on the actor with the provided tags (not merged)
1015
- */
796
+ * Replace actor tags
797
+ *
798
+ * Replaces all tags on the actor with the provided tags (not merged)
799
+ */
1016
800
  static replaceActorTags(options) {
1017
801
  return (options.client ?? client).put({
1018
802
  url: "/api/v1/actors/{actor_id}/tags",
@@ -1025,14 +809,11 @@ var Actors = class {
1025
809
  }
1026
810
  };
1027
811
  var Agents = class {
1028
- static {
1029
- __name(this, "Agents");
1030
- }
1031
812
  /**
1032
- * List agents
1033
- *
1034
- * Returns all agents in the project.
1035
- */
813
+ * List agents
814
+ *
815
+ * Returns all agents in the project.
816
+ */
1036
817
  static listAgents(options) {
1037
818
  return (options?.client ?? client).get({
1038
819
  url: "/api/v1/agents",
@@ -1040,10 +821,10 @@ var Agents = class {
1040
821
  });
1041
822
  }
1042
823
  /**
1043
- * Create an agent
1044
- *
1045
- * Creates a new agent bound to an AI provider.
1046
- */
824
+ * Create an agent
825
+ *
826
+ * Creates a new agent bound to an AI provider.
827
+ */
1047
828
  static createAgent(options) {
1048
829
  return (options.client ?? client).post({
1049
830
  url: "/api/v1/agents",
@@ -1055,10 +836,10 @@ var Agents = class {
1055
836
  });
1056
837
  }
1057
838
  /**
1058
- * Delete an agent
1059
- *
1060
- * Deletes an agent by ID.
1061
- */
839
+ * Delete an agent
840
+ *
841
+ * Deletes an agent by ID.
842
+ */
1062
843
  static deleteAgent(options) {
1063
844
  return (options.client ?? client).delete({
1064
845
  url: "/api/v1/agents/{agent_id}",
@@ -1066,10 +847,10 @@ var Agents = class {
1066
847
  });
1067
848
  }
1068
849
  /**
1069
- * Get an agent
1070
- *
1071
- * Returns a single agent by ID.
1072
- */
850
+ * Get an agent
851
+ *
852
+ * Returns a single agent by ID.
853
+ */
1073
854
  static getAgent(options) {
1074
855
  return (options.client ?? client).get({
1075
856
  url: "/api/v1/agents/{agent_id}",
@@ -1077,10 +858,10 @@ var Agents = class {
1077
858
  });
1078
859
  }
1079
860
  /**
1080
- * Update an agent
1081
- *
1082
- * Updates an existing agent.
1083
- */
861
+ * Update an agent
862
+ *
863
+ * Updates an existing agent.
864
+ */
1084
865
  static updateAgent(options) {
1085
866
  return (options.client ?? client).put({
1086
867
  url: "/api/v1/agents/{agent_id}",
@@ -1092,11 +873,11 @@ var Agents = class {
1092
873
  });
1093
874
  }
1094
875
  /**
1095
- * Run an agent generation
1096
- *
1097
- * Sends messages to the agent, resolves its tools, and runs the AI model loop. Supports streaming via `stream: true`. Client tools pause the generation and return `requires_action`.
1098
- *
1099
- */
876
+ * Run an agent generation
877
+ *
878
+ * Sends messages to the agent, resolves its tools, and runs the AI model loop. Supports streaming via `stream: true`. Client tools pause the generation and return `requires_action`.
879
+ *
880
+ */
1100
881
  static createAgentGeneration(options) {
1101
882
  return (options.client ?? client).post({
1102
883
  url: "/api/v1/agents/{agent_id}/generate",
@@ -1108,11 +889,11 @@ var Agents = class {
1108
889
  });
1109
890
  }
1110
891
  /**
1111
- * Submit tool outputs for a paused generation
1112
- *
1113
- * Resumes a generation that was paused due to client tool calls. Provide tool outputs for each pending tool call.
1114
- *
1115
- */
892
+ * Submit tool outputs for a paused generation
893
+ *
894
+ * Resumes a generation that was paused due to client tool calls. Provide tool outputs for each pending tool call.
895
+ *
896
+ */
1116
897
  static submitAgentToolOutputs(options) {
1117
898
  return (options.client ?? client).post({
1118
899
  url: "/api/v1/agents/{agent_id}/generate/{generation_id}/tool-outputs",
@@ -1124,10 +905,10 @@ var Agents = class {
1124
905
  });
1125
906
  }
1126
907
  /**
1127
- * Create an actor for an agent
1128
- *
1129
- * Creates a new actor associated with the specified agent
1130
- */
908
+ * Create an actor for an agent
909
+ *
910
+ * Creates a new actor associated with the specified agent
911
+ */
1131
912
  static createAgentActor(options) {
1132
913
  return (options.client ?? client).post({
1133
914
  url: "/api/v1/agents/{agent_id}/actors",
@@ -1140,14 +921,11 @@ var Agents = class {
1140
921
  }
1141
922
  };
1142
923
  var AiProviders = class {
1143
- static {
1144
- __name(this, "AiProviders");
1145
- }
1146
924
  /**
1147
- * List AI providers
1148
- *
1149
- * Returns a list of AI provider configurations for a project
1150
- */
925
+ * List AI providers
926
+ *
927
+ * Returns a list of AI provider configurations for a project
928
+ */
1151
929
  static listAiProviders(options) {
1152
930
  return (options?.client ?? client).get({
1153
931
  url: "/api/v1/ai-providers",
@@ -1155,10 +933,10 @@ var AiProviders = class {
1155
933
  });
1156
934
  }
1157
935
  /**
1158
- * Create an AI provider
1159
- *
1160
- * Creates a new LLM provider configuration
1161
- */
936
+ * Create an AI provider
937
+ *
938
+ * Creates a new LLM provider configuration
939
+ */
1162
940
  static createAiProvider(options) {
1163
941
  return (options.client ?? client).post({
1164
942
  url: "/api/v1/ai-providers",
@@ -1170,10 +948,10 @@ var AiProviders = class {
1170
948
  });
1171
949
  }
1172
950
  /**
1173
- * Delete an AI provider
1174
- *
1175
- * Deletes an AI provider configuration
1176
- */
951
+ * Delete an AI provider
952
+ *
953
+ * Deletes an AI provider configuration
954
+ */
1177
955
  static deleteAiProvider(options) {
1178
956
  return (options.client ?? client).delete({
1179
957
  url: "/api/v1/ai-providers/{ai_provider_id}",
@@ -1181,10 +959,10 @@ var AiProviders = class {
1181
959
  });
1182
960
  }
1183
961
  /**
1184
- * Get an AI provider
1185
- *
1186
- * Returns a specific AI provider configuration
1187
- */
962
+ * Get an AI provider
963
+ *
964
+ * Returns a specific AI provider configuration
965
+ */
1188
966
  static getAiProvider(options) {
1189
967
  return (options.client ?? client).get({
1190
968
  url: "/api/v1/ai-providers/{ai_provider_id}",
@@ -1192,10 +970,10 @@ var AiProviders = class {
1192
970
  });
1193
971
  }
1194
972
  /**
1195
- * Update an AI provider
1196
- *
1197
- * Updates an AI provider configuration
1198
- */
973
+ * Update an AI provider
974
+ *
975
+ * Updates an AI provider configuration
976
+ */
1199
977
  static updateAiProvider(options) {
1200
978
  return (options.client ?? client).patch({
1201
979
  url: "/api/v1/ai-providers/{ai_provider_id}",
@@ -1208,15 +986,12 @@ var AiProviders = class {
1208
986
  }
1209
987
  };
1210
988
  var ApiKeys = class {
1211
- static {
1212
- __name(this, "ApiKeys");
1213
- }
1214
989
  /**
1215
- * List API keys
1216
- *
1217
- * Lists API keys accessible to the caller. - JWT admin: returns all API keys. - JWT regular user: returns only the user's own API keys. - API key scoped to a project: returns only API keys scoped to that project.
1218
- *
1219
- */
990
+ * List API keys
991
+ *
992
+ * Lists API keys accessible to the caller. - JWT admin: returns all API keys. - JWT regular user: returns only the user's own API keys. - API key scoped to a project: returns only API keys scoped to that project.
993
+ *
994
+ */
1220
995
  static listApiKeys(options) {
1221
996
  return (options?.client ?? client).get({
1222
997
  security: [{
@@ -1228,11 +1003,11 @@ var ApiKeys = class {
1228
1003
  });
1229
1004
  }
1230
1005
  /**
1231
- * Create an API key
1232
- *
1233
- * Creates a new API key for the authenticated user. - If `project_id` is provided, the key is scoped to that project. - If `policy_ids` is provided, the key's effective permissions are the intersection of the user's policies and the key's policies. - If neither is provided, the key inherits the user's full permissions.
1234
- *
1235
- */
1006
+ * Create an API key
1007
+ *
1008
+ * Creates a new API key for the authenticated user. - If `project_id` is provided, the key is scoped to that project. - If `policy_ids` is provided, the key's effective permissions are the intersection of the user's policies and the key's policies. - If neither is provided, the key inherits the user's full permissions.
1009
+ *
1010
+ */
1236
1011
  static createApiKey(options) {
1237
1012
  return (options.client ?? client).post({
1238
1013
  url: "/api/v1/api-keys",
@@ -1244,10 +1019,10 @@ var ApiKeys = class {
1244
1019
  });
1245
1020
  }
1246
1021
  /**
1247
- * Delete an API key
1248
- *
1249
- * Deletes an API key. Only the owner or an admin can delete it.
1250
- */
1022
+ * Delete an API key
1023
+ *
1024
+ * Deletes an API key. Only the owner or an admin can delete it.
1025
+ */
1251
1026
  static deleteApiKey(options) {
1252
1027
  return (options.client ?? client).delete({
1253
1028
  url: "/api/v1/api-keys/{api_key_id}",
@@ -1255,10 +1030,10 @@ var ApiKeys = class {
1255
1030
  });
1256
1031
  }
1257
1032
  /**
1258
- * Get an API key
1259
- *
1260
- * Returns details of an API key. Only the owner or an admin can access it.
1261
- */
1033
+ * Get an API key
1034
+ *
1035
+ * Returns details of an API key. Only the owner or an admin can access it.
1036
+ */
1262
1037
  static getApiKey(options) {
1263
1038
  return (options.client ?? client).get({
1264
1039
  url: "/api/v1/api-keys/{api_key_id}",
@@ -1266,10 +1041,10 @@ var ApiKeys = class {
1266
1041
  });
1267
1042
  }
1268
1043
  /**
1269
- * Update an API key
1270
- *
1271
- * Updates an API key's name, project scope, or policies. Only the owner or an admin can update it.
1272
- */
1044
+ * Update an API key
1045
+ *
1046
+ * Updates an API key's name, project scope, or policies. Only the owner or an admin can update it.
1047
+ */
1273
1048
  static updateApiKey(options) {
1274
1049
  return (options.client ?? client).put({
1275
1050
  url: "/api/v1/api-keys/{api_key_id}",
@@ -1282,14 +1057,11 @@ var ApiKeys = class {
1282
1057
  }
1283
1058
  };
1284
1059
  var Chats = class {
1285
- static {
1286
- __name(this, "Chats");
1287
- }
1288
1060
  /**
1289
- * List chats
1290
- *
1291
- * Returns all chats in the project.
1292
- */
1061
+ * List chats
1062
+ *
1063
+ * Returns all chats in the project.
1064
+ */
1293
1065
  static listChats(options) {
1294
1066
  return (options?.client ?? client).get({
1295
1067
  url: "/api/v1/chats",
@@ -1297,10 +1069,10 @@ var Chats = class {
1297
1069
  });
1298
1070
  }
1299
1071
  /**
1300
- * Create a chat
1301
- *
1302
- * Creates a new chat resource bound to an AI provider.
1303
- */
1072
+ * Create a chat
1073
+ *
1074
+ * Creates a new chat resource bound to an AI provider.
1075
+ */
1304
1076
  static createChat(options) {
1305
1077
  return (options.client ?? client).post({
1306
1078
  url: "/api/v1/chats",
@@ -1312,10 +1084,10 @@ var Chats = class {
1312
1084
  });
1313
1085
  }
1314
1086
  /**
1315
- * Delete a chat
1316
- *
1317
- * Deletes a chat by ID.
1318
- */
1087
+ * Delete a chat
1088
+ *
1089
+ * Deletes a chat by ID.
1090
+ */
1319
1091
  static deleteChat(options) {
1320
1092
  return (options.client ?? client).delete({
1321
1093
  url: "/api/v1/chats/{chat_id}",
@@ -1323,10 +1095,10 @@ var Chats = class {
1323
1095
  });
1324
1096
  }
1325
1097
  /**
1326
- * Get a chat
1327
- *
1328
- * Returns a single chat by ID.
1329
- */
1098
+ * Get a chat
1099
+ *
1100
+ * Returns a single chat by ID.
1101
+ */
1330
1102
  static getChat(options) {
1331
1103
  return (options.client ?? client).get({
1332
1104
  url: "/api/v1/chats/{chat_id}",
@@ -1334,11 +1106,11 @@ var Chats = class {
1334
1106
  });
1335
1107
  }
1336
1108
  /**
1337
- * Create a chat completion for a stored chat
1338
- *
1339
- * Runs a completion using the AI provider and settings stored in the chat. Pass `stream: true` for SSE streaming. A system message in `messages` overrides the chat's stored system message for this call only. Messages may use `documentId` instead of `content`.
1340
- *
1341
- */
1109
+ * Create a chat completion for a stored chat
1110
+ *
1111
+ * Runs a completion using the AI provider and settings stored in the chat. Pass `stream: true` for SSE streaming. A system message in `messages` overrides the chat's stored system message for this call only. Messages may use `documentId` instead of `content`.
1112
+ *
1113
+ */
1342
1114
  static createChatCompletionForChat(options) {
1343
1115
  return (options.client ?? client).post({
1344
1116
  url: "/api/v1/chats/{chat_id}/completions",
@@ -1350,11 +1122,11 @@ var Chats = class {
1350
1122
  });
1351
1123
  }
1352
1124
  /**
1353
- * Create a chat completion (stateless)
1354
- *
1355
- * OpenAI Chat Completions-compatible endpoint. Resolves the AI provider from `ai_provider_id`, decrypts its secret, and calls the appropriate Vercel AI SDK provider. `ai_provider_id` is required — there is no server-side model fallback.
1356
- *
1357
- */
1125
+ * Create a chat completion (stateless)
1126
+ *
1127
+ * OpenAI Chat Completions-compatible endpoint. Resolves the AI provider from `ai_provider_id`, decrypts its secret, and calls the appropriate Vercel AI SDK provider. `ai_provider_id` is required — there is no server-side model fallback.
1128
+ *
1129
+ */
1358
1130
  static createChatCompletion(options) {
1359
1131
  return (options.client ?? client).post({
1360
1132
  url: "/api/v1/chats/completions",
@@ -1366,10 +1138,10 @@ var Chats = class {
1366
1138
  });
1367
1139
  }
1368
1140
  /**
1369
- * Create an actor for a chat
1370
- *
1371
- * Creates a new actor associated with the specified chat
1372
- */
1141
+ * Create an actor for a chat
1142
+ *
1143
+ * Creates a new actor associated with the specified chat
1144
+ */
1373
1145
  static createChatActor(options) {
1374
1146
  return (options.client ?? client).post({
1375
1147
  url: "/api/v1/chats/{chat_id}/actors",
@@ -1382,14 +1154,11 @@ var Chats = class {
1382
1154
  }
1383
1155
  };
1384
1156
  var Conversations = class {
1385
- static {
1386
- __name(this, "Conversations");
1387
- }
1388
1157
  /**
1389
- * List conversations
1390
- *
1391
- * Returns all conversations the caller has access to. If projectId is provided, returns only conversations in that project. project keys are scoped to a single project automatically.
1392
- */
1158
+ * List conversations
1159
+ *
1160
+ * Returns all conversations the caller has access to. If projectId is provided, returns only conversations in that project. project keys are scoped to a single project automatically.
1161
+ */
1393
1162
  static listConversations(options) {
1394
1163
  return (options?.client ?? client).get({
1395
1164
  url: "/api/v1/conversations",
@@ -1397,10 +1166,10 @@ var Conversations = class {
1397
1166
  });
1398
1167
  }
1399
1168
  /**
1400
- * Create a conversation
1401
- *
1402
- * Creates a new conversation. project keys automatically infer the project from the key's scope; JWT callers must supply projectId.
1403
- */
1169
+ * Create a conversation
1170
+ *
1171
+ * Creates a new conversation. project keys automatically infer the project from the key's scope; JWT callers must supply projectId.
1172
+ */
1404
1173
  static createConversation(options) {
1405
1174
  return (options.client ?? client).post({
1406
1175
  url: "/api/v1/conversations",
@@ -1412,10 +1181,10 @@ var Conversations = class {
1412
1181
  });
1413
1182
  }
1414
1183
  /**
1415
- * Delete a conversation
1416
- *
1417
- * Deletes a conversation by its ID
1418
- */
1184
+ * Delete a conversation
1185
+ *
1186
+ * Deletes a conversation by its ID
1187
+ */
1419
1188
  static deleteConversation(options) {
1420
1189
  return (options.client ?? client).delete({
1421
1190
  url: "/api/v1/conversations/{conversation_id}",
@@ -1423,10 +1192,10 @@ var Conversations = class {
1423
1192
  });
1424
1193
  }
1425
1194
  /**
1426
- * Get a conversation by ID
1427
- *
1428
- * Returns a conversation by its ID
1429
- */
1195
+ * Get a conversation by ID
1196
+ *
1197
+ * Returns a conversation by its ID
1198
+ */
1430
1199
  static getConversation(options) {
1431
1200
  return (options.client ?? client).get({
1432
1201
  url: "/api/v1/conversations/{conversation_id}",
@@ -1434,10 +1203,10 @@ var Conversations = class {
1434
1203
  });
1435
1204
  }
1436
1205
  /**
1437
- * Update a conversation
1438
- *
1439
- * Updates the status of a conversation
1440
- */
1206
+ * Update a conversation
1207
+ *
1208
+ * Updates the status of a conversation
1209
+ */
1441
1210
  static updateConversation(options) {
1442
1211
  return (options.client ?? client).patch({
1443
1212
  url: "/api/v1/conversations/{conversation_id}",
@@ -1449,10 +1218,10 @@ var Conversations = class {
1449
1218
  });
1450
1219
  }
1451
1220
  /**
1452
- * List conversation messages
1453
- *
1454
- * Returns all messages (documents) attached to a conversation, ordered by position
1455
- */
1221
+ * List conversation messages
1222
+ *
1223
+ * Returns all messages (documents) attached to a conversation, ordered by position
1224
+ */
1456
1225
  static listConversationMessages(options) {
1457
1226
  return (options.client ?? client).get({
1458
1227
  url: "/api/v1/conversations/{conversation_id}/messages",
@@ -1460,10 +1229,10 @@ var Conversations = class {
1460
1229
  });
1461
1230
  }
1462
1231
  /**
1463
- * Add a message to a conversation
1464
- *
1465
- * Creates a document from the message text and attaches it to the conversation at the given position. If position is omitted, it is appended at the end.
1466
- */
1232
+ * Add a message to a conversation
1233
+ *
1234
+ * Creates a document from the message text and attaches it to the conversation at the given position. If position is omitted, it is appended at the end.
1235
+ */
1467
1236
  static addConversationMessage(options) {
1468
1237
  return (options.client ?? client).post({
1469
1238
  url: "/api/v1/conversations/{conversation_id}/messages",
@@ -1475,14 +1244,14 @@ var Conversations = class {
1475
1244
  });
1476
1245
  }
1477
1246
  /**
1478
- * Generate the next message in a conversation
1479
- *
1480
- * Generates the next message using the specified actor's linked agent or chat.
1481
- * On `completed`, the reply is persisted as a new ConversationMessage authored
1482
- * by that actor. On `requires_action`, nothing is persisted; the caller must
1483
- * submit tool outputs via the Agents module and re-invoke generate.
1484
- *
1485
- */
1247
+ * Generate the next message in a conversation
1248
+ *
1249
+ * Generates the next message using the specified actor's linked agent or chat.
1250
+ * On `completed`, the reply is persisted as a new ConversationMessage authored
1251
+ * by that actor. On `requires_action`, nothing is persisted; the caller must
1252
+ * submit tool outputs via the Agents module and re-invoke generate.
1253
+ *
1254
+ */
1486
1255
  static generateConversationMessage(options) {
1487
1256
  return (options.client ?? client).post({
1488
1257
  url: "/api/v1/conversations/{conversation_id}/generate",
@@ -1494,10 +1263,10 @@ var Conversations = class {
1494
1263
  });
1495
1264
  }
1496
1265
  /**
1497
- * List actors in a conversation
1498
- *
1499
- * Returns all distinct actors who have sent at least one message in the conversation
1500
- */
1266
+ * List actors in a conversation
1267
+ *
1268
+ * Returns all distinct actors who have sent at least one message in the conversation
1269
+ */
1501
1270
  static listConversationActors(options) {
1502
1271
  return (options.client ?? client).get({
1503
1272
  url: "/api/v1/conversations/{conversation_id}/actors",
@@ -1505,10 +1274,10 @@ var Conversations = class {
1505
1274
  });
1506
1275
  }
1507
1276
  /**
1508
- * Remove a message from a conversation
1509
- *
1510
- * Removes a document from a conversation
1511
- */
1277
+ * Remove a message from a conversation
1278
+ *
1279
+ * Removes a document from a conversation
1280
+ */
1512
1281
  static removeConversationMessage(options) {
1513
1282
  return (options.client ?? client).delete({
1514
1283
  url: "/api/v1/conversations/{conversation_id}/messages/{document_id}",
@@ -1516,10 +1285,10 @@ var Conversations = class {
1516
1285
  });
1517
1286
  }
1518
1287
  /**
1519
- * Get conversation tags
1520
- *
1521
- * Returns all tags attached to the conversation
1522
- */
1288
+ * Get conversation tags
1289
+ *
1290
+ * Returns all tags attached to the conversation
1291
+ */
1523
1292
  static getConversationTags(options) {
1524
1293
  return (options.client ?? client).get({
1525
1294
  url: "/api/v1/conversations/{conversation_id}/tags",
@@ -1527,10 +1296,10 @@ var Conversations = class {
1527
1296
  });
1528
1297
  }
1529
1298
  /**
1530
- * Merge conversation tags
1531
- *
1532
- * Merges provided tags with existing tags
1533
- */
1299
+ * Merge conversation tags
1300
+ *
1301
+ * Merges provided tags with existing tags
1302
+ */
1534
1303
  static mergeConversationTags(options) {
1535
1304
  return (options.client ?? client).patch({
1536
1305
  url: "/api/v1/conversations/{conversation_id}/tags",
@@ -1542,10 +1311,10 @@ var Conversations = class {
1542
1311
  });
1543
1312
  }
1544
1313
  /**
1545
- * Replace conversation tags
1546
- *
1547
- * Replaces all tags on the conversation with the provided tags
1548
- */
1314
+ * Replace conversation tags
1315
+ *
1316
+ * Replaces all tags on the conversation with the provided tags
1317
+ */
1549
1318
  static replaceConversationTags(options) {
1550
1319
  return (options.client ?? client).put({
1551
1320
  url: "/api/v1/conversations/{conversation_id}/tags",
@@ -1558,14 +1327,11 @@ var Conversations = class {
1558
1327
  }
1559
1328
  };
1560
1329
  var Documents = class {
1561
- static {
1562
- __name(this, "Documents");
1563
- }
1564
1330
  /**
1565
- * List documents
1566
- *
1567
- * Returns all documents the caller has access to. If projectId is provided, returns only documents in that project. project keys are scoped to a single project automatically. JWT users without projectId receive documents across all their accessible projects.
1568
- */
1331
+ * List documents
1332
+ *
1333
+ * Returns all documents the caller has access to. If projectId is provided, returns only documents in that project. project keys are scoped to a single project automatically. JWT users without projectId receive documents across all their accessible projects.
1334
+ */
1569
1335
  static listDocuments(options) {
1570
1336
  return (options?.client ?? client).get({
1571
1337
  url: "/api/v1/documents",
@@ -1573,10 +1339,10 @@ var Documents = class {
1573
1339
  });
1574
1340
  }
1575
1341
  /**
1576
- * Create a document
1577
- *
1578
- * Creates a new text document and generates an embedding vector for semantic search. project keys automatically infer the project from the key's scope; JWT callers must supply projectId.
1579
- */
1342
+ * Create a document
1343
+ *
1344
+ * Creates a new text document and generates an embedding vector for semantic search. project keys automatically infer the project from the key's scope; JWT callers must supply projectId.
1345
+ */
1580
1346
  static createDocument(options) {
1581
1347
  return (options.client ?? client).post({
1582
1348
  url: "/api/v1/documents",
@@ -1588,10 +1354,10 @@ var Documents = class {
1588
1354
  });
1589
1355
  }
1590
1356
  /**
1591
- * Delete a document
1592
- *
1593
- * Deletes a document and its underlying file
1594
- */
1357
+ * Delete a document
1358
+ *
1359
+ * Deletes a document and its underlying file
1360
+ */
1595
1361
  static deleteDocument(options) {
1596
1362
  return (options.client ?? client).delete({
1597
1363
  url: "/api/v1/documents/{document_id}",
@@ -1599,10 +1365,10 @@ var Documents = class {
1599
1365
  });
1600
1366
  }
1601
1367
  /**
1602
- * Get a document by ID
1603
- *
1604
- * Returns a document with its text content
1605
- */
1368
+ * Get a document by ID
1369
+ *
1370
+ * Returns a document with its text content
1371
+ */
1606
1372
  static getDocument(options) {
1607
1373
  return (options.client ?? client).get({
1608
1374
  url: "/api/v1/documents/{document_id}",
@@ -1610,10 +1376,10 @@ var Documents = class {
1610
1376
  });
1611
1377
  }
1612
1378
  /**
1613
- * Update a document
1614
- *
1615
- * Updates document content, title, path, metadata, or tags. Supplying `path` moves the document to a new logical path within the project.
1616
- */
1379
+ * Update a document
1380
+ *
1381
+ * Updates document content, title, path, metadata, or tags. Supplying `path` moves the document to a new logical path within the project.
1382
+ */
1617
1383
  static updateDocument(options) {
1618
1384
  return (options.client ?? client).patch({
1619
1385
  url: "/api/v1/documents/{document_id}",
@@ -1625,10 +1391,10 @@ var Documents = class {
1625
1391
  });
1626
1392
  }
1627
1393
  /**
1628
- * Get document tags
1629
- *
1630
- * Returns all tags attached to the document
1631
- */
1394
+ * Get document tags
1395
+ *
1396
+ * Returns all tags attached to the document
1397
+ */
1632
1398
  static getDocumentTags(options) {
1633
1399
  return (options.client ?? client).get({
1634
1400
  url: "/api/v1/documents/{document_id}/tags",
@@ -1636,10 +1402,10 @@ var Documents = class {
1636
1402
  });
1637
1403
  }
1638
1404
  /**
1639
- * Merge document tags
1640
- *
1641
- * Merges provided tags with existing tags (existing tags are preserved unless overridden)
1642
- */
1405
+ * Merge document tags
1406
+ *
1407
+ * Merges provided tags with existing tags (existing tags are preserved unless overridden)
1408
+ */
1643
1409
  static mergeDocumentTags(options) {
1644
1410
  return (options.client ?? client).patch({
1645
1411
  url: "/api/v1/documents/{document_id}/tags",
@@ -1651,10 +1417,10 @@ var Documents = class {
1651
1417
  });
1652
1418
  }
1653
1419
  /**
1654
- * Replace document tags
1655
- *
1656
- * Replaces all tags on the document with the provided tags (not merged)
1657
- */
1420
+ * Replace document tags
1421
+ *
1422
+ * Replaces all tags on the document with the provided tags (not merged)
1423
+ */
1658
1424
  static replaceDocumentTags(options) {
1659
1425
  return (options.client ?? client).put({
1660
1426
  url: "/api/v1/documents/{document_id}/tags",
@@ -1667,14 +1433,11 @@ var Documents = class {
1667
1433
  }
1668
1434
  };
1669
1435
  var Files = class {
1670
- static {
1671
- __name(this, "Files");
1672
- }
1673
1436
  /**
1674
- * List all files
1675
- *
1676
- * Returns a list of all stored files
1677
- */
1437
+ * List all files
1438
+ *
1439
+ * Returns a list of all stored files
1440
+ */
1678
1441
  static listFiles(options) {
1679
1442
  return (options?.client ?? client).get({
1680
1443
  url: "/api/v1/files",
@@ -1682,10 +1445,10 @@ var Files = class {
1682
1445
  });
1683
1446
  }
1684
1447
  /**
1685
- * Create a file
1686
- *
1687
- * Creates a new file record in the system
1688
- */
1448
+ * Create a file
1449
+ *
1450
+ * Creates a new file record in the system
1451
+ */
1689
1452
  static createFile(options) {
1690
1453
  return (options.client ?? client).post({
1691
1454
  url: "/api/v1/files",
@@ -1697,10 +1460,10 @@ var Files = class {
1697
1460
  });
1698
1461
  }
1699
1462
  /**
1700
- * Upload a file
1701
- *
1702
- * Uploads a file to the server and stores it in the configured storage directory
1703
- */
1463
+ * Upload a file
1464
+ *
1465
+ * Uploads a file to the server and stores it in the configured storage directory
1466
+ */
1704
1467
  static uploadFile(options) {
1705
1468
  return (options.client ?? client).post({
1706
1469
  ...formDataBodySerializer,
@@ -1713,10 +1476,10 @@ var Files = class {
1713
1476
  });
1714
1477
  }
1715
1478
  /**
1716
- * Upload a file using base64 encoding
1717
- *
1718
- * Uploads a file to the server using base64-encoded content
1719
- */
1479
+ * Upload a file using base64 encoding
1480
+ *
1481
+ * Uploads a file to the server using base64-encoded content
1482
+ */
1720
1483
  static uploadFileBase64(options) {
1721
1484
  return (options.client ?? client).post({
1722
1485
  url: "/api/v1/files/upload/base64",
@@ -1728,10 +1491,10 @@ var Files = class {
1728
1491
  });
1729
1492
  }
1730
1493
  /**
1731
- * Delete a file
1732
- *
1733
- * Removes a file from the system by ID
1734
- */
1494
+ * Delete a file
1495
+ *
1496
+ * Removes a file from the system by ID
1497
+ */
1735
1498
  static deleteFile(options) {
1736
1499
  return (options.client ?? client).delete({
1737
1500
  url: "/api/v1/files/{file_id}",
@@ -1739,10 +1502,10 @@ var Files = class {
1739
1502
  });
1740
1503
  }
1741
1504
  /**
1742
- * Get a file by ID
1743
- *
1744
- * Returns the data and metadata of a specific file
1745
- */
1505
+ * Get a file by ID
1506
+ *
1507
+ * Returns the data and metadata of a specific file
1508
+ */
1746
1509
  static getFile(options) {
1747
1510
  return (options.client ?? client).get({
1748
1511
  url: "/api/v1/files/{file_id}",
@@ -1750,10 +1513,10 @@ var Files = class {
1750
1513
  });
1751
1514
  }
1752
1515
  /**
1753
- * Download a file
1754
- *
1755
- * Streams the file content to the client
1756
- */
1516
+ * Download a file
1517
+ *
1518
+ * Streams the file content to the client
1519
+ */
1757
1520
  static downloadFile(options) {
1758
1521
  return (options.client ?? client).get({
1759
1522
  url: "/api/v1/files/{file_id}/download",
@@ -1761,10 +1524,10 @@ var Files = class {
1761
1524
  });
1762
1525
  }
1763
1526
  /**
1764
- * Update file metadata
1765
- *
1766
- * Updates the metadata field of a file
1767
- */
1527
+ * Update file metadata
1528
+ *
1529
+ * Updates the metadata field of a file
1530
+ */
1768
1531
  static updateFileMetadata(options) {
1769
1532
  return (options.client ?? client).patch({
1770
1533
  url: "/api/v1/files/{file_id}/metadata",
@@ -1776,10 +1539,10 @@ var Files = class {
1776
1539
  });
1777
1540
  }
1778
1541
  /**
1779
- * Download file as base64
1780
- *
1781
- * Returns the file content encoded as base64
1782
- */
1542
+ * Download file as base64
1543
+ *
1544
+ * Returns the file content encoded as base64
1545
+ */
1783
1546
  static downloadFileBase64(options) {
1784
1547
  return (options.client ?? client).get({
1785
1548
  url: "/api/v1/files/{file_id}/download/base64",
@@ -1787,10 +1550,10 @@ var Files = class {
1787
1550
  });
1788
1551
  }
1789
1552
  /**
1790
- * Get file tags
1791
- *
1792
- * Returns all tags attached to the file
1793
- */
1553
+ * Get file tags
1554
+ *
1555
+ * Returns all tags attached to the file
1556
+ */
1794
1557
  static getFileTags(options) {
1795
1558
  return (options.client ?? client).get({
1796
1559
  url: "/api/v1/files/{file_id}/tags",
@@ -1798,10 +1561,10 @@ var Files = class {
1798
1561
  });
1799
1562
  }
1800
1563
  /**
1801
- * Merge file tags
1802
- *
1803
- * Merges provided tags with existing tags
1804
- */
1564
+ * Merge file tags
1565
+ *
1566
+ * Merges provided tags with existing tags
1567
+ */
1805
1568
  static mergeFileTags(options) {
1806
1569
  return (options.client ?? client).patch({
1807
1570
  url: "/api/v1/files/{file_id}/tags",
@@ -1813,10 +1576,10 @@ var Files = class {
1813
1576
  });
1814
1577
  }
1815
1578
  /**
1816
- * Replace file tags
1817
- *
1818
- * Replaces all tags on the file with the provided tags
1819
- */
1579
+ * Replace file tags
1580
+ *
1581
+ * Replaces all tags on the file with the provided tags
1582
+ */
1820
1583
  static replaceFileTags(options) {
1821
1584
  return (options.client ?? client).put({
1822
1585
  url: "/api/v1/files/{file_id}/tags",
@@ -1829,15 +1592,12 @@ var Files = class {
1829
1592
  }
1830
1593
  };
1831
1594
  var Formations = class {
1832
- static {
1833
- __name(this, "Formations");
1834
- }
1835
1595
  /**
1836
- * Validate a formation template
1837
- *
1838
- * Validates a formation template without creating any resources. Returns a list of errors and warnings. Accepts the template as a JSON object or as a YAML/JSON string.
1839
- *
1840
- */
1596
+ * Validate a formation template
1597
+ *
1598
+ * Validates a formation template without creating any resources. Returns a list of errors and warnings. Accepts the template as a JSON object or as a YAML/JSON string.
1599
+ *
1600
+ */
1841
1601
  static validateFormation(options) {
1842
1602
  return (options.client ?? client).post({
1843
1603
  url: "/api/v1/formations/validate",
@@ -1849,11 +1609,11 @@ var Formations = class {
1849
1609
  });
1850
1610
  }
1851
1611
  /**
1852
- * Plan a formation deployment
1853
- *
1854
- * Computes a diff between the desired template and the current stack state without making any changes. Returns the list of planned actions.
1855
- *
1856
- */
1612
+ * Plan a formation deployment
1613
+ *
1614
+ * Computes a diff between the desired template and the current stack state without making any changes. Returns the list of planned actions.
1615
+ *
1616
+ */
1857
1617
  static planFormation(options) {
1858
1618
  return (options.client ?? client).post({
1859
1619
  url: "/api/v1/formations/plan",
@@ -1865,10 +1625,10 @@ var Formations = class {
1865
1625
  });
1866
1626
  }
1867
1627
  /**
1868
- * List formations
1869
- *
1870
- * Returns all formation stacks for a project
1871
- */
1628
+ * List formations
1629
+ *
1630
+ * Returns all formation stacks for a project
1631
+ */
1872
1632
  static listFormations(options) {
1873
1633
  return (options?.client ?? client).get({
1874
1634
  url: "/api/v1/formations",
@@ -1876,11 +1636,11 @@ var Formations = class {
1876
1636
  });
1877
1637
  }
1878
1638
  /**
1879
- * Create a new formation
1880
- *
1881
- * Validates the template, creates the formation record, then provisions all declared resources in dependency order.
1882
- *
1883
- */
1639
+ * Create a new formation
1640
+ *
1641
+ * Validates the template, creates the formation record, then provisions all declared resources in dependency order.
1642
+ *
1643
+ */
1884
1644
  static createFormation(options) {
1885
1645
  return (options.client ?? client).post({
1886
1646
  url: "/api/v1/formations",
@@ -1892,11 +1652,11 @@ var Formations = class {
1892
1652
  });
1893
1653
  }
1894
1654
  /**
1895
- * Delete an formation
1896
- *
1897
- * Deletes the formation stack and all its managed resources in reverse dependency order.
1898
- *
1899
- */
1655
+ * Delete an formation
1656
+ *
1657
+ * Deletes the formation stack and all its managed resources in reverse dependency order.
1658
+ *
1659
+ */
1900
1660
  static deleteFormation(options) {
1901
1661
  return (options.client ?? client).delete({
1902
1662
  url: "/api/v1/formations/{formation_id}",
@@ -1904,10 +1664,10 @@ var Formations = class {
1904
1664
  });
1905
1665
  }
1906
1666
  /**
1907
- * Get a specific formation
1908
- *
1909
- * Returns the formation stack including its current resources.
1910
- */
1667
+ * Get a specific formation
1668
+ *
1669
+ * Returns the formation stack including its current resources.
1670
+ */
1911
1671
  static getFormation(options) {
1912
1672
  return (options.client ?? client).get({
1913
1673
  url: "/api/v1/formations/{formation_id}",
@@ -1915,11 +1675,11 @@ var Formations = class {
1915
1675
  });
1916
1676
  }
1917
1677
  /**
1918
- * Update an formation
1919
- *
1920
- * Applies a new template to the formation. Resources are created, updated, or deleted to reconcile the current state with the desired state.
1921
- *
1922
- */
1678
+ * Update an formation
1679
+ *
1680
+ * Applies a new template to the formation. Resources are created, updated, or deleted to reconcile the current state with the desired state.
1681
+ *
1682
+ */
1923
1683
  static updateFormation(options) {
1924
1684
  return (options.client ?? client).put({
1925
1685
  url: "/api/v1/formations/{formation_id}",
@@ -1931,11 +1691,11 @@ var Formations = class {
1931
1691
  });
1932
1692
  }
1933
1693
  /**
1934
- * List formation operation events
1935
- *
1936
- * Returns all operations (create, update, delete) with their event logs for the formation, ordered chronologically.
1937
- *
1938
- */
1694
+ * List formation operation events
1695
+ *
1696
+ * Returns all operations (create, update, delete) with their event logs for the formation, ordered chronologically.
1697
+ *
1698
+ */
1939
1699
  static listFormationEvents(options) {
1940
1700
  return (options.client ?? client).get({
1941
1701
  url: "/api/v1/formations/{formation_id}/events",
@@ -1944,14 +1704,11 @@ var Formations = class {
1944
1704
  }
1945
1705
  };
1946
1706
  var Knowledge = class {
1947
- static {
1948
- __name(this, "Knowledge");
1949
- }
1950
1707
  /**
1951
- * Search knowledge
1952
- *
1953
- * Searches across documents and memory entries using semantic search, file paths, document IDs, or memory IDs/tags. At least one of `query`, `document_paths`, `document_ids`, `memory_ids`, or `memory_tags` must be provided.
1954
- */
1708
+ * Search knowledge
1709
+ *
1710
+ * Searches across documents and memory entries using semantic search, file paths, document IDs, or memory IDs/tags. At least one of `query`, `document_paths`, `document_ids`, `memory_ids`, or `memory_tags` must be provided.
1711
+ */
1955
1712
  static searchKnowledge(options) {
1956
1713
  return (options.client ?? client).post({
1957
1714
  url: "/api/v1/knowledge/search",
@@ -1964,14 +1721,11 @@ var Knowledge = class {
1964
1721
  }
1965
1722
  };
1966
1723
  var Memories = class {
1967
- static {
1968
- __name(this, "Memories");
1969
- }
1970
1724
  /**
1971
- * List memories
1972
- *
1973
- * Returns a list of memory configurations for a project
1974
- */
1725
+ * List memories
1726
+ *
1727
+ * Returns a list of memory configurations for a project
1728
+ */
1975
1729
  static listMemories(options) {
1976
1730
  return (options?.client ?? client).get({
1977
1731
  url: "/api/v1/memories",
@@ -1979,10 +1733,10 @@ var Memories = class {
1979
1733
  });
1980
1734
  }
1981
1735
  /**
1982
- * Create a memory
1983
- *
1984
- * Creates a new memory configuration in a project
1985
- */
1736
+ * Create a memory
1737
+ *
1738
+ * Creates a new memory configuration in a project
1739
+ */
1986
1740
  static createMemory(options) {
1987
1741
  return (options.client ?? client).post({
1988
1742
  url: "/api/v1/memories",
@@ -1994,10 +1748,10 @@ var Memories = class {
1994
1748
  });
1995
1749
  }
1996
1750
  /**
1997
- * Delete a memory
1998
- *
1999
- * Deletes a memory configuration
2000
- */
1751
+ * Delete a memory
1752
+ *
1753
+ * Deletes a memory configuration
1754
+ */
2001
1755
  static deleteMemory(options) {
2002
1756
  return (options.client ?? client).delete({
2003
1757
  url: "/api/v1/memories/{memory_id}",
@@ -2005,10 +1759,10 @@ var Memories = class {
2005
1759
  });
2006
1760
  }
2007
1761
  /**
2008
- * Get a memory
2009
- *
2010
- * Returns a single memory configuration by ID
2011
- */
1762
+ * Get a memory
1763
+ *
1764
+ * Returns a single memory configuration by ID
1765
+ */
2012
1766
  static getMemory(options) {
2013
1767
  return (options.client ?? client).get({
2014
1768
  url: "/api/v1/memories/{memory_id}",
@@ -2016,10 +1770,10 @@ var Memories = class {
2016
1770
  });
2017
1771
  }
2018
1772
  /**
2019
- * Update a memory
2020
- *
2021
- * Updates an existing memory configuration
2022
- */
1773
+ * Update a memory
1774
+ *
1775
+ * Updates an existing memory configuration
1776
+ */
2023
1777
  static updateMemory(options) {
2024
1778
  return (options.client ?? client).put({
2025
1779
  url: "/api/v1/memories/{memory_id}",
@@ -2032,14 +1786,11 @@ var Memories = class {
2032
1786
  }
2033
1787
  };
2034
1788
  var MemoryEntries = class {
2035
- static {
2036
- __name(this, "MemoryEntries");
2037
- }
2038
1789
  /**
2039
- * List memory entries
2040
- *
2041
- * Returns all entries in a memory container
2042
- */
1790
+ * List memory entries
1791
+ *
1792
+ * Returns all entries in a memory container
1793
+ */
2043
1794
  static listMemoryEntries(options) {
2044
1795
  return (options.client ?? client).get({
2045
1796
  url: "/api/v1/memories/{memory_id}/entries",
@@ -2047,10 +1798,10 @@ var MemoryEntries = class {
2047
1798
  });
2048
1799
  }
2049
1800
  /**
2050
- * Create a memory entry
2051
- *
2052
- * Creates a new entry in the specified memory container. Automatically generates an embedding for semantic search.
2053
- */
1801
+ * Create a memory entry
1802
+ *
1803
+ * Creates a new entry in the specified memory container. Automatically generates an embedding for semantic search.
1804
+ */
2054
1805
  static createMemoryEntry(options) {
2055
1806
  return (options.client ?? client).post({
2056
1807
  url: "/api/v1/memories/{memory_id}/entries",
@@ -2062,10 +1813,10 @@ var MemoryEntries = class {
2062
1813
  });
2063
1814
  }
2064
1815
  /**
2065
- * Delete a memory entry
2066
- *
2067
- * Deletes a memory entry
2068
- */
1816
+ * Delete a memory entry
1817
+ *
1818
+ * Deletes a memory entry
1819
+ */
2069
1820
  static deleteMemoryEntry(options) {
2070
1821
  return (options.client ?? client).delete({
2071
1822
  url: "/api/v1/memories/{memory_id}/entries/{entry_id}",
@@ -2073,10 +1824,10 @@ var MemoryEntries = class {
2073
1824
  });
2074
1825
  }
2075
1826
  /**
2076
- * Get a memory entry
2077
- *
2078
- * Returns a single memory entry by ID
2079
- */
1827
+ * Get a memory entry
1828
+ *
1829
+ * Returns a single memory entry by ID
1830
+ */
2080
1831
  static getMemoryEntry(options) {
2081
1832
  return (options.client ?? client).get({
2082
1833
  url: "/api/v1/memories/{memory_id}/entries/{entry_id}",
@@ -2084,10 +1835,10 @@ var MemoryEntries = class {
2084
1835
  });
2085
1836
  }
2086
1837
  /**
2087
- * Update a memory entry
2088
- *
2089
- * Updates an existing memory entry. Regenerates the embedding if content changes.
2090
- */
1838
+ * Update a memory entry
1839
+ *
1840
+ * Updates an existing memory entry. Regenerates the embedding if content changes.
1841
+ */
2091
1842
  static updateMemoryEntry(options) {
2092
1843
  return (options.client ?? client).put({
2093
1844
  url: "/api/v1/memories/{memory_id}/entries/{entry_id}",
@@ -2100,14 +1851,11 @@ var MemoryEntries = class {
2100
1851
  }
2101
1852
  };
2102
1853
  var Orchestrations = class {
2103
- static {
2104
- __name(this, "Orchestrations");
2105
- }
2106
1854
  /**
2107
- * List orchestrations
2108
- *
2109
- * Returns orchestrations accessible to the caller.
2110
- */
1855
+ * List orchestrations
1856
+ *
1857
+ * Returns orchestrations accessible to the caller.
1858
+ */
2111
1859
  static listOrchestrations(options) {
2112
1860
  return (options?.client ?? client).get({
2113
1861
  url: "/api/v1/orchestrations",
@@ -2115,10 +1863,10 @@ var Orchestrations = class {
2115
1863
  });
2116
1864
  }
2117
1865
  /**
2118
- * Create an orchestration
2119
- *
2120
- * Creates a new orchestration workflow definition in the project.
2121
- */
1866
+ * Create an orchestration
1867
+ *
1868
+ * Creates a new orchestration workflow definition in the project.
1869
+ */
2122
1870
  static createOrchestration(options) {
2123
1871
  return (options.client ?? client).post({
2124
1872
  url: "/api/v1/orchestrations",
@@ -2130,10 +1878,10 @@ var Orchestrations = class {
2130
1878
  });
2131
1879
  }
2132
1880
  /**
2133
- * Delete an orchestration
2134
- *
2135
- * Deletes an orchestration definition and all its runs.
2136
- */
1881
+ * Delete an orchestration
1882
+ *
1883
+ * Deletes an orchestration definition and all its runs.
1884
+ */
2137
1885
  static deleteOrchestration(options) {
2138
1886
  return (options.client ?? client).delete({
2139
1887
  url: "/api/v1/orchestrations/{orchestration_id}",
@@ -2141,10 +1889,10 @@ var Orchestrations = class {
2141
1889
  });
2142
1890
  }
2143
1891
  /**
2144
- * Get an orchestration
2145
- *
2146
- * Returns the orchestration with nodes and edges.
2147
- */
1892
+ * Get an orchestration
1893
+ *
1894
+ * Returns the orchestration with nodes and edges.
1895
+ */
2148
1896
  static getOrchestration(options) {
2149
1897
  return (options.client ?? client).get({
2150
1898
  url: "/api/v1/orchestrations/{orchestration_id}",
@@ -2152,10 +1900,10 @@ var Orchestrations = class {
2152
1900
  });
2153
1901
  }
2154
1902
  /**
2155
- * Update an orchestration
2156
- *
2157
- * Partially updates an orchestration definition.
2158
- */
1903
+ * Update an orchestration
1904
+ *
1905
+ * Partially updates an orchestration definition.
1906
+ */
2159
1907
  static updateOrchestration(options) {
2160
1908
  return (options.client ?? client).patch({
2161
1909
  url: "/api/v1/orchestrations/{orchestration_id}",
@@ -2167,10 +1915,10 @@ var Orchestrations = class {
2167
1915
  });
2168
1916
  }
2169
1917
  /**
2170
- * List orchestration runs
2171
- *
2172
- * Returns all runs for an orchestration.
2173
- */
1918
+ * List orchestration runs
1919
+ *
1920
+ * Returns all runs for an orchestration.
1921
+ */
2174
1922
  static listOrchestrationRuns(options) {
2175
1923
  return (options.client ?? client).get({
2176
1924
  url: "/api/v1/orchestrations/{orchestration_id}/runs",
@@ -2178,10 +1926,10 @@ var Orchestrations = class {
2178
1926
  });
2179
1927
  }
2180
1928
  /**
2181
- * Start an orchestration run
2182
- *
2183
- * Creates and immediately executes a new run for the orchestration.
2184
- */
1929
+ * Start an orchestration run
1930
+ *
1931
+ * Creates and immediately executes a new run for the orchestration.
1932
+ */
2185
1933
  static startOrchestrationRun(options) {
2186
1934
  return (options.client ?? client).post({
2187
1935
  url: "/api/v1/orchestrations/{orchestration_id}/runs",
@@ -2193,10 +1941,10 @@ var Orchestrations = class {
2193
1941
  });
2194
1942
  }
2195
1943
  /**
2196
- * Cancel an orchestration run
2197
- *
2198
- * Cancels a running or paused orchestration run.
2199
- */
1944
+ * Cancel an orchestration run
1945
+ *
1946
+ * Cancels a running or paused orchestration run.
1947
+ */
2200
1948
  static cancelOrchestrationRun(options) {
2201
1949
  return (options.client ?? client).post({
2202
1950
  url: "/api/v1/orchestrations/{orchestration_id}/runs/{run_id}/cancel",
@@ -2204,10 +1952,10 @@ var Orchestrations = class {
2204
1952
  });
2205
1953
  }
2206
1954
  /**
2207
- * Submit human input
2208
- *
2209
- * Provides human input to a paused orchestration run waiting at a human node.
2210
- */
1955
+ * Submit human input
1956
+ *
1957
+ * Provides human input to a paused orchestration run waiting at a human node.
1958
+ */
2211
1959
  static submitHumanInput(options) {
2212
1960
  return (options.client ?? client).post({
2213
1961
  url: "/api/v1/orchestrations/{orchestration_id}/runs/{run_id}/human-input",
@@ -2219,10 +1967,10 @@ var Orchestrations = class {
2219
1967
  });
2220
1968
  }
2221
1969
  /**
2222
- * Resume an orchestration run
2223
- *
2224
- * Resumes a paused orchestration run from its last checkpoint.
2225
- */
1970
+ * Resume an orchestration run
1971
+ *
1972
+ * Resumes a paused orchestration run from its last checkpoint.
1973
+ */
2226
1974
  static resumeOrchestrationRun(options) {
2227
1975
  return (options.client ?? client).post({
2228
1976
  url: "/api/v1/orchestrations/{orchestration_id}/runs/{run_id}/resume",
@@ -2230,10 +1978,10 @@ var Orchestrations = class {
2230
1978
  });
2231
1979
  }
2232
1980
  /**
2233
- * Get an orchestration run
2234
- *
2235
- * Returns the status, state, and artifacts of a specific run.
2236
- */
1981
+ * Get an orchestration run
1982
+ *
1983
+ * Returns the status, state, and artifacts of a specific run.
1984
+ */
2237
1985
  static getOrchestrationRun(options) {
2238
1986
  return (options.client ?? client).get({
2239
1987
  url: "/api/v1/orchestrations/{orchestration_id}/runs/{run_id}",
@@ -2242,14 +1990,11 @@ var Orchestrations = class {
2242
1990
  }
2243
1991
  };
2244
1992
  var Policies = class {
2245
- static {
2246
- __name(this, "Policies");
2247
- }
2248
1993
  /**
2249
- * List all policies
2250
- *
2251
- * Returns a list of all global policies. Requires admin role.
2252
- */
1994
+ * List all policies
1995
+ *
1996
+ * Returns a list of all global policies. Requires admin role.
1997
+ */
2253
1998
  static listPolicies(options) {
2254
1999
  return (options?.client ?? client).get({
2255
2000
  url: "/api/v1/policies",
@@ -2257,10 +2002,10 @@ var Policies = class {
2257
2002
  });
2258
2003
  }
2259
2004
  /**
2260
- * Create a policy
2261
- *
2262
- * Creates a new global policy. Requires admin role.
2263
- */
2005
+ * Create a policy
2006
+ *
2007
+ * Creates a new global policy. Requires admin role.
2008
+ */
2264
2009
  static createPolicy(options) {
2265
2010
  return (options.client ?? client).post({
2266
2011
  url: "/api/v1/policies",
@@ -2272,10 +2017,10 @@ var Policies = class {
2272
2017
  });
2273
2018
  }
2274
2019
  /**
2275
- * Delete a policy
2276
- *
2277
- * Deletes a global policy. Requires admin role.
2278
- */
2020
+ * Delete a policy
2021
+ *
2022
+ * Deletes a global policy. Requires admin role.
2023
+ */
2279
2024
  static deletePolicy(options) {
2280
2025
  return (options.client ?? client).delete({
2281
2026
  url: "/api/v1/policies/{policy_id}",
@@ -2283,10 +2028,10 @@ var Policies = class {
2283
2028
  });
2284
2029
  }
2285
2030
  /**
2286
- * Get a policy
2287
- *
2288
- * Returns details of a specific policy. Requires admin role.
2289
- */
2031
+ * Get a policy
2032
+ *
2033
+ * Returns details of a specific policy. Requires admin role.
2034
+ */
2290
2035
  static getPolicy(options) {
2291
2036
  return (options.client ?? client).get({
2292
2037
  url: "/api/v1/policies/{policy_id}",
@@ -2294,10 +2039,10 @@ var Policies = class {
2294
2039
  });
2295
2040
  }
2296
2041
  /**
2297
- * Update a policy
2298
- *
2299
- * Updates an existing global policy. Requires admin role.
2300
- */
2042
+ * Update a policy
2043
+ *
2044
+ * Updates an existing global policy. Requires admin role.
2045
+ */
2301
2046
  static updatePolicy(options) {
2302
2047
  return (options.client ?? client).put({
2303
2048
  url: "/api/v1/policies/{policy_id}",
@@ -2310,14 +2055,11 @@ var Policies = class {
2310
2055
  }
2311
2056
  };
2312
2057
  var Projects = class {
2313
- static {
2314
- __name(this, "Projects");
2315
- }
2316
2058
  /**
2317
- * Create a project
2318
- *
2319
- * Creates a new project. Requires admin role.
2320
- */
2059
+ * Create a project
2060
+ *
2061
+ * Creates a new project. Requires admin role.
2062
+ */
2321
2063
  static createProject(options) {
2322
2064
  return (options.client ?? client).post({
2323
2065
  url: "/api/v1/projects",
@@ -2329,10 +2071,10 @@ var Projects = class {
2329
2071
  });
2330
2072
  }
2331
2073
  /**
2332
- * Delete a project
2333
- *
2334
- * Deletes a project. Requires admin role.
2335
- */
2074
+ * Delete a project
2075
+ *
2076
+ * Deletes a project. Requires admin role.
2077
+ */
2336
2078
  static deleteProject(options) {
2337
2079
  return (options.client ?? client).delete({
2338
2080
  url: "/api/v1/projects/{project_id}",
@@ -2340,10 +2082,10 @@ var Projects = class {
2340
2082
  });
2341
2083
  }
2342
2084
  /**
2343
- * Get a project
2344
- *
2345
- * Returns details of a specific project.
2346
- */
2085
+ * Get a project
2086
+ *
2087
+ * Returns details of a specific project.
2088
+ */
2347
2089
  static getProject(options) {
2348
2090
  return (options.client ?? client).get({
2349
2091
  url: "/api/v1/projects/{project_id}",
@@ -2352,14 +2094,11 @@ var Projects = class {
2352
2094
  }
2353
2095
  };
2354
2096
  var Secrets = class {
2355
- static {
2356
- __name(this, "Secrets");
2357
- }
2358
2097
  /**
2359
- * List secrets
2360
- *
2361
- * Returns a list of secrets for a project
2362
- */
2098
+ * List secrets
2099
+ *
2100
+ * Returns a list of secrets for a project
2101
+ */
2363
2102
  static listSecrets(options) {
2364
2103
  return (options?.client ?? client).get({
2365
2104
  url: "/api/v1/secrets",
@@ -2367,10 +2106,10 @@ var Secrets = class {
2367
2106
  });
2368
2107
  }
2369
2108
  /**
2370
- * Create a secret
2371
- *
2372
- * Creates a new encrypted secret in a project
2373
- */
2109
+ * Create a secret
2110
+ *
2111
+ * Creates a new encrypted secret in a project
2112
+ */
2374
2113
  static createSecret(options) {
2375
2114
  return (options.client ?? client).post({
2376
2115
  url: "/api/v1/secrets",
@@ -2382,10 +2121,10 @@ var Secrets = class {
2382
2121
  });
2383
2122
  }
2384
2123
  /**
2385
- * Delete a secret
2386
- *
2387
- * Deletes a secret
2388
- */
2124
+ * Delete a secret
2125
+ *
2126
+ * Deletes a secret
2127
+ */
2389
2128
  static deleteSecret(options) {
2390
2129
  return (options.client ?? client).delete({
2391
2130
  url: "/api/v1/secrets/{secret_id}",
@@ -2393,10 +2132,10 @@ var Secrets = class {
2393
2132
  });
2394
2133
  }
2395
2134
  /**
2396
- * Get a secret
2397
- *
2398
- * Returns a specific secret
2399
- */
2135
+ * Get a secret
2136
+ *
2137
+ * Returns a specific secret
2138
+ */
2400
2139
  static getSecret(options) {
2401
2140
  return (options.client ?? client).get({
2402
2141
  url: "/api/v1/secrets/{secret_id}",
@@ -2404,10 +2143,10 @@ var Secrets = class {
2404
2143
  });
2405
2144
  }
2406
2145
  /**
2407
- * Update a secret
2408
- *
2409
- * Updates a secret's name and/or value
2410
- */
2146
+ * Update a secret
2147
+ *
2148
+ * Updates a secret's name and/or value
2149
+ */
2411
2150
  static updateSecret(options) {
2412
2151
  return (options.client ?? client).patch({
2413
2152
  url: "/api/v1/secrets/{secret_id}",
@@ -2420,14 +2159,11 @@ var Secrets = class {
2420
2159
  }
2421
2160
  };
2422
2161
  var Sessions = class {
2423
- static {
2424
- __name(this, "Sessions");
2425
- }
2426
2162
  /**
2427
- * List sessions
2428
- *
2429
- * Returns sessions for the specified agent, optionally filtered by actorId and status.
2430
- */
2163
+ * List sessions
2164
+ *
2165
+ * Returns sessions for the specified agent, optionally filtered by actorId and status.
2166
+ */
2431
2167
  static listAgentSessions(options) {
2432
2168
  return (options.client ?? client).get({
2433
2169
  url: "/api/v1/agents/{agent_id}/sessions",
@@ -2435,11 +2171,11 @@ var Sessions = class {
2435
2171
  });
2436
2172
  }
2437
2173
  /**
2438
- * Create a session
2439
- *
2440
- * Creates a new session for the specified agent. Internally creates a conversation and two actors (agent + user) so the caller only needs this single call to start interacting with the agent.
2441
- *
2442
- */
2174
+ * Create a session
2175
+ *
2176
+ * Creates a new session for the specified agent. Internally creates a conversation and two actors (agent + user) so the caller only needs this single call to start interacting with the agent.
2177
+ *
2178
+ */
2443
2179
  static createAgentSession(options) {
2444
2180
  return (options.client ?? client).post({
2445
2181
  url: "/api/v1/agents/{agent_id}/sessions",
@@ -2451,10 +2187,10 @@ var Sessions = class {
2451
2187
  });
2452
2188
  }
2453
2189
  /**
2454
- * Delete a session
2455
- *
2456
- * Deletes the session and its underlying conversation and actors.
2457
- */
2190
+ * Delete a session
2191
+ *
2192
+ * Deletes the session and its underlying conversation and actors.
2193
+ */
2458
2194
  static deleteAgentSession(options) {
2459
2195
  return (options.client ?? client).delete({
2460
2196
  url: "/api/v1/agents/{agent_id}/sessions/{session_id}",
@@ -2462,10 +2198,10 @@ var Sessions = class {
2462
2198
  });
2463
2199
  }
2464
2200
  /**
2465
- * Get a session
2466
- *
2467
- * Returns details of a single session.
2468
- */
2201
+ * Get a session
2202
+ *
2203
+ * Returns details of a single session.
2204
+ */
2469
2205
  static getAgentSession(options) {
2470
2206
  return (options.client ?? client).get({
2471
2207
  url: "/api/v1/agents/{agent_id}/sessions/{session_id}",
@@ -2473,10 +2209,10 @@ var Sessions = class {
2473
2209
  });
2474
2210
  }
2475
2211
  /**
2476
- * Update a session
2477
- *
2478
- * Updates the session name and/or status.
2479
- */
2212
+ * Update a session
2213
+ *
2214
+ * Updates the session name and/or status.
2215
+ */
2480
2216
  static updateSession(options) {
2481
2217
  return (options.client ?? client).patch({
2482
2218
  url: "/api/v1/agents/{agent_id}/sessions/{session_id}",
@@ -2488,11 +2224,11 @@ var Sessions = class {
2488
2224
  });
2489
2225
  }
2490
2226
  /**
2491
- * List session messages
2492
- *
2493
- * Returns messages in the session with simplified roles (user/assistant) instead of raw actor IDs.
2494
- *
2495
- */
2227
+ * List session messages
2228
+ *
2229
+ * Returns messages in the session with simplified roles (user/assistant) instead of raw actor IDs.
2230
+ *
2231
+ */
2496
2232
  static listAgentSessionMessages(options) {
2497
2233
  return (options.client ?? client).get({
2498
2234
  url: "/api/v1/agents/{agent_id}/sessions/{session_id}/messages",
@@ -2500,11 +2236,11 @@ var Sessions = class {
2500
2236
  });
2501
2237
  }
2502
2238
  /**
2503
- * Add a user message
2504
- *
2505
- * Saves a user message to the session. When autoGenerate is enabled on the session and no generation is currently in progress, generation is triggered automatically and the response mirrors GenerateSessionResponse. Otherwise returns the saved user message.
2506
- *
2507
- */
2239
+ * Add a user message
2240
+ *
2241
+ * Saves a user message to the session. When autoGenerate is enabled on the session and no generation is currently in progress, generation is triggered automatically and the response mirrors GenerateSessionResponse. Otherwise returns the saved user message.
2242
+ *
2243
+ */
2508
2244
  static addSessionMessage(options) {
2509
2245
  return (options.client ?? client).post({
2510
2246
  url: "/api/v1/agents/{agent_id}/sessions/{session_id}/messages",
@@ -2516,11 +2252,11 @@ var Sessions = class {
2516
2252
  });
2517
2253
  }
2518
2254
  /**
2519
- * Trigger agent generation
2520
- *
2521
- * Triggers the agent to generate a response based on the current conversation. Returns the assistant reply or a requires_action status if the agent needs client tool outputs. Pass ?async=true for a 202 accepted response when you do not need to wait for the result.
2522
- *
2523
- */
2255
+ * Trigger agent generation
2256
+ *
2257
+ * Triggers the agent to generate a response based on the current conversation. Returns the assistant reply or a requires_action status if the agent needs client tool outputs. Pass ?async=true for a 202 accepted response when you do not need to wait for the result.
2258
+ *
2259
+ */
2524
2260
  static generateSessionResponse(options) {
2525
2261
  return (options.client ?? client).post({
2526
2262
  url: "/api/v1/agents/{agent_id}/sessions/{session_id}/generate",
@@ -2532,11 +2268,11 @@ var Sessions = class {
2532
2268
  });
2533
2269
  }
2534
2270
  /**
2535
- * Submit tool outputs
2536
- *
2537
- * Submits client tool outputs for a generation that returned requires_action. The agent continues its loop and returns the final or next requires_action result.
2538
- *
2539
- */
2271
+ * Submit tool outputs
2272
+ *
2273
+ * Submits client tool outputs for a generation that returned requires_action. The agent continues its loop and returns the final or next requires_action result.
2274
+ *
2275
+ */
2540
2276
  static submitSessionToolOutputs(options) {
2541
2277
  return (options.client ?? client).post({
2542
2278
  url: "/api/v1/agents/{agent_id}/sessions/{session_id}/tool-outputs",
@@ -2548,10 +2284,10 @@ var Sessions = class {
2548
2284
  });
2549
2285
  }
2550
2286
  /**
2551
- * Get session tags
2552
- *
2553
- * Returns the session's tags object.
2554
- */
2287
+ * Get session tags
2288
+ *
2289
+ * Returns the session's tags object.
2290
+ */
2555
2291
  static getSessionTags(options) {
2556
2292
  return (options.client ?? client).get({
2557
2293
  url: "/api/v1/agents/{agent_id}/sessions/{session_id}/tags",
@@ -2559,10 +2295,10 @@ var Sessions = class {
2559
2295
  });
2560
2296
  }
2561
2297
  /**
2562
- * Merge session tags
2563
- *
2564
- * Merges the provided tags into the session's existing tags.
2565
- */
2298
+ * Merge session tags
2299
+ *
2300
+ * Merges the provided tags into the session's existing tags.
2301
+ */
2566
2302
  static mergeSessionTags(options) {
2567
2303
  return (options.client ?? client).patch({
2568
2304
  url: "/api/v1/agents/{agent_id}/sessions/{session_id}/tags",
@@ -2574,10 +2310,10 @@ var Sessions = class {
2574
2310
  });
2575
2311
  }
2576
2312
  /**
2577
- * Replace session tags
2578
- *
2579
- * Replaces all tags on the session.
2580
- */
2313
+ * Replace session tags
2314
+ *
2315
+ * Replaces all tags on the session.
2316
+ */
2581
2317
  static replaceSessionTags(options) {
2582
2318
  return (options.client ?? client).put({
2583
2319
  url: "/api/v1/agents/{agent_id}/sessions/{session_id}/tags",
@@ -2590,14 +2326,11 @@ var Sessions = class {
2590
2326
  }
2591
2327
  };
2592
2328
  var Tools = class {
2593
- static {
2594
- __name(this, "Tools");
2595
- }
2596
2329
  /**
2597
- * List tools
2598
- *
2599
- * Returns all tools in the project.
2600
- */
2330
+ * List tools
2331
+ *
2332
+ * Returns all tools in the project.
2333
+ */
2601
2334
  static listTools(options) {
2602
2335
  return (options?.client ?? client).get({
2603
2336
  url: "/api/v1/tools",
@@ -2605,10 +2338,10 @@ var Tools = class {
2605
2338
  });
2606
2339
  }
2607
2340
  /**
2608
- * Create a tool
2609
- *
2610
- * Creates a new tool in the project.
2611
- */
2341
+ * Create a tool
2342
+ *
2343
+ * Creates a new tool in the project.
2344
+ */
2612
2345
  static createTool(options) {
2613
2346
  return (options.client ?? client).post({
2614
2347
  url: "/api/v1/tools",
@@ -2620,10 +2353,10 @@ var Tools = class {
2620
2353
  });
2621
2354
  }
2622
2355
  /**
2623
- * Delete a tool
2624
- *
2625
- * Deletes a tool by ID.
2626
- */
2356
+ * Delete a tool
2357
+ *
2358
+ * Deletes a tool by ID.
2359
+ */
2627
2360
  static deleteTool(options) {
2628
2361
  return (options.client ?? client).delete({
2629
2362
  url: "/api/v1/tools/{tool_id}",
@@ -2631,10 +2364,10 @@ var Tools = class {
2631
2364
  });
2632
2365
  }
2633
2366
  /**
2634
- * Get a tool
2635
- *
2636
- * Returns a single tool by ID.
2637
- */
2367
+ * Get a tool
2368
+ *
2369
+ * Returns a single tool by ID.
2370
+ */
2638
2371
  static getTool(options) {
2639
2372
  return (options.client ?? client).get({
2640
2373
  url: "/api/v1/tools/{tool_id}",
@@ -2642,10 +2375,10 @@ var Tools = class {
2642
2375
  });
2643
2376
  }
2644
2377
  /**
2645
- * Update a tool
2646
- *
2647
- * Updates an existing tool.
2648
- */
2378
+ * Update a tool
2379
+ *
2380
+ * Updates an existing tool.
2381
+ */
2649
2382
  static updateTool(options) {
2650
2383
  return (options.client ?? client).patch({
2651
2384
  url: "/api/v1/tools/{tool_id}",
@@ -2657,13 +2390,13 @@ var Tools = class {
2657
2390
  });
2658
2391
  }
2659
2392
  /**
2660
- * Call a tool
2661
- *
2662
- * Directly invokes a tool and returns its output. Supported for `http`, `soat`, and `mcp` tools. `client` tools cannot be invoked server-side and will return 422.
2663
- * For `soat` and `mcp` tools the `action` field is required and identifies which action (SOAT) or tool name (MCP) to invoke. For `http` tools `action` is ignored.
2664
- * `preset_parameters` stored on the tool are merged with the caller-supplied `input` before execution; preset keys take lower precedence.
2665
- *
2666
- */
2393
+ * Call a tool
2394
+ *
2395
+ * Directly invokes a tool and returns its output. Supported for `http`, `soat`, and `mcp` tools. `client` tools cannot be invoked server-side and will return 422.
2396
+ * For `soat` and `mcp` tools the `action` field is required and identifies which action (SOAT) or tool name (MCP) to invoke. For `http` tools `action` is ignored.
2397
+ * `preset_parameters` stored on the tool are merged with the caller-supplied `input` before execution; preset keys take lower precedence.
2398
+ *
2399
+ */
2667
2400
  static callTool(options) {
2668
2401
  return (options.client ?? client).post({
2669
2402
  url: "/api/v1/tools/{tool_id}/call",
@@ -2676,14 +2409,11 @@ var Tools = class {
2676
2409
  }
2677
2410
  };
2678
2411
  var Traces = class {
2679
- static {
2680
- __name(this, "Traces");
2681
- }
2682
2412
  /**
2683
- * List traces
2684
- *
2685
- * Returns a paginated list of execution traces for the project.
2686
- */
2413
+ * List traces
2414
+ *
2415
+ * Returns a paginated list of execution traces for the project.
2416
+ */
2687
2417
  static listTraces(options) {
2688
2418
  return (options?.client ?? client).get({
2689
2419
  url: "/api/v1/traces",
@@ -2691,10 +2421,10 @@ var Traces = class {
2691
2421
  });
2692
2422
  }
2693
2423
  /**
2694
- * Get a trace
2695
- *
2696
- * Returns a single trace by ID.
2697
- */
2424
+ * Get a trace
2425
+ *
2426
+ * Returns a single trace by ID.
2427
+ */
2698
2428
  static getTrace(options) {
2699
2429
  return (options.client ?? client).get({
2700
2430
  url: "/api/v1/traces/{trace_id}",
@@ -2702,11 +2432,11 @@ var Traces = class {
2702
2432
  });
2703
2433
  }
2704
2434
  /**
2705
- * Get trace tree
2706
- *
2707
- * Returns the full execution tree rooted at the given trace (or its root if the given trace is a child). Each node represents one agent's execution session. The `children` array contains traces triggered by sub-agent tool calls from that trace.
2708
- *
2709
- */
2435
+ * Get trace tree
2436
+ *
2437
+ * Returns the full execution tree rooted at the given trace (or its root if the given trace is a child). Each node represents one agent's execution session. The `children` array contains traces triggered by sub-agent tool calls from that trace.
2438
+ *
2439
+ */
2710
2440
  static getTraceTree(options) {
2711
2441
  return (options.client ?? client).get({
2712
2442
  url: "/api/v1/traces/{trace_id}/tree",
@@ -2714,10 +2444,10 @@ var Traces = class {
2714
2444
  });
2715
2445
  }
2716
2446
  /**
2717
- * Get generation IDs for a trace
2718
- *
2719
- * Returns all generation IDs associated with the trace.
2720
- */
2447
+ * Get generation IDs for a trace
2448
+ *
2449
+ * Returns all generation IDs associated with the trace.
2450
+ */
2721
2451
  static getTraceGenerations(options) {
2722
2452
  return (options.client ?? client).get({
2723
2453
  url: "/api/v1/traces/{trace_id}/generations",
@@ -2726,14 +2456,11 @@ var Traces = class {
2726
2456
  }
2727
2457
  };
2728
2458
  var Users = class {
2729
- static {
2730
- __name(this, "Users");
2731
- }
2732
2459
  /**
2733
- * List all users
2734
- *
2735
- * Returns a list of all users
2736
- */
2460
+ * List all users
2461
+ *
2462
+ * Returns a list of all users
2463
+ */
2737
2464
  static listUsers(options) {
2738
2465
  return (options?.client ?? client).get({
2739
2466
  url: "/api/v1/users",
@@ -2741,10 +2468,10 @@ var Users = class {
2741
2468
  });
2742
2469
  }
2743
2470
  /**
2744
- * Create a user
2745
- *
2746
- * Creates a new user in the system
2747
- */
2471
+ * Create a user
2472
+ *
2473
+ * Creates a new user in the system
2474
+ */
2748
2475
  static createUser(options) {
2749
2476
  return (options.client ?? client).post({
2750
2477
  url: "/api/v1/users",
@@ -2756,10 +2483,10 @@ var Users = class {
2756
2483
  });
2757
2484
  }
2758
2485
  /**
2759
- * Delete a user by ID
2760
- *
2761
- * Deletes a specific user
2762
- */
2486
+ * Delete a user by ID
2487
+ *
2488
+ * Deletes a specific user
2489
+ */
2763
2490
  static deleteUser(options) {
2764
2491
  return (options.client ?? client).delete({
2765
2492
  url: "/api/v1/users/{user_id}",
@@ -2767,10 +2494,10 @@ var Users = class {
2767
2494
  });
2768
2495
  }
2769
2496
  /**
2770
- * Get a user by ID
2771
- *
2772
- * Returns the data of a specific user
2773
- */
2497
+ * Get a user by ID
2498
+ *
2499
+ * Returns the data of a specific user
2500
+ */
2774
2501
  static getUser(options) {
2775
2502
  return (options.client ?? client).get({
2776
2503
  url: "/api/v1/users/{user_id}",
@@ -2778,10 +2505,10 @@ var Users = class {
2778
2505
  });
2779
2506
  }
2780
2507
  /**
2781
- * Create the first admin user
2782
- *
2783
- * Creates the first admin user. Returns 409 if any user already exists.
2784
- */
2508
+ * Create the first admin user
2509
+ *
2510
+ * Creates the first admin user. Returns 409 if any user already exists.
2511
+ */
2785
2512
  static bootstrapUser(options) {
2786
2513
  return (options.client ?? client).post({
2787
2514
  url: "/api/v1/users/bootstrap",
@@ -2793,10 +2520,10 @@ var Users = class {
2793
2520
  });
2794
2521
  }
2795
2522
  /**
2796
- * Login user
2797
- *
2798
- * Authenticates a user and returns a JWT token
2799
- */
2523
+ * Login user
2524
+ *
2525
+ * Authenticates a user and returns a JWT token
2526
+ */
2800
2527
  static loginUser(options) {
2801
2528
  return (options.client ?? client).post({
2802
2529
  url: "/api/v1/users/login",
@@ -2808,10 +2535,10 @@ var Users = class {
2808
2535
  });
2809
2536
  }
2810
2537
  /**
2811
- * Get policies attached to a user
2812
- *
2813
- * Returns the list of policies attached to a user. Requires admin role.
2814
- */
2538
+ * Get policies attached to a user
2539
+ *
2540
+ * Returns the list of policies attached to a user. Requires admin role.
2541
+ */
2815
2542
  static getUserPolicies(options) {
2816
2543
  return (options.client ?? client).get({
2817
2544
  url: "/api/v1/users/{user_id}/policies",
@@ -2819,10 +2546,10 @@ var Users = class {
2819
2546
  });
2820
2547
  }
2821
2548
  /**
2822
- * Attach policies to a user
2823
- *
2824
- * Replaces the user's policy list with the provided policy IDs. Requires admin role.
2825
- */
2549
+ * Attach policies to a user
2550
+ *
2551
+ * Replaces the user's policy list with the provided policy IDs. Requires admin role.
2552
+ */
2826
2553
  static attachUserPolicies(options) {
2827
2554
  return (options.client ?? client).put({
2828
2555
  url: "/api/v1/users/{user_id}/policies",
@@ -2835,14 +2562,11 @@ var Users = class {
2835
2562
  }
2836
2563
  };
2837
2564
  var Webhooks = class {
2838
- static {
2839
- __name(this, "Webhooks");
2840
- }
2841
2565
  /**
2842
- * List webhooks for a project
2843
- *
2844
- * Lists all webhooks configured for the specified project
2845
- */
2566
+ * List webhooks for a project
2567
+ *
2568
+ * Lists all webhooks configured for the specified project
2569
+ */
2846
2570
  static listWebhooks(options) {
2847
2571
  return (options.client ?? client).get({
2848
2572
  url: "/api/v1/projects/{project_id}/webhooks",
@@ -2850,10 +2574,10 @@ var Webhooks = class {
2850
2574
  });
2851
2575
  }
2852
2576
  /**
2853
- * Create a webhook
2854
- *
2855
- * Creates a new webhook for the specified project
2856
- */
2577
+ * Create a webhook
2578
+ *
2579
+ * Creates a new webhook for the specified project
2580
+ */
2857
2581
  static createWebhook(options) {
2858
2582
  return (options.client ?? client).post({
2859
2583
  url: "/api/v1/projects/{project_id}/webhooks",
@@ -2865,10 +2589,10 @@ var Webhooks = class {
2865
2589
  });
2866
2590
  }
2867
2591
  /**
2868
- * Delete a webhook
2869
- *
2870
- * Deletes a webhook and stops all event deliveries
2871
- */
2592
+ * Delete a webhook
2593
+ *
2594
+ * Deletes a webhook and stops all event deliveries
2595
+ */
2872
2596
  static deleteWebhook(options) {
2873
2597
  return (options.client ?? client).delete({
2874
2598
  url: "/api/v1/projects/{project_id}/webhooks/{webhook_id}",
@@ -2876,10 +2600,10 @@ var Webhooks = class {
2876
2600
  });
2877
2601
  }
2878
2602
  /**
2879
- * Get a webhook
2880
- *
2881
- * Retrieves the details of a specific webhook
2882
- */
2603
+ * Get a webhook
2604
+ *
2605
+ * Retrieves the details of a specific webhook
2606
+ */
2883
2607
  static getWebhook(options) {
2884
2608
  return (options.client ?? client).get({
2885
2609
  url: "/api/v1/projects/{project_id}/webhooks/{webhook_id}",
@@ -2887,10 +2611,10 @@ var Webhooks = class {
2887
2611
  });
2888
2612
  }
2889
2613
  /**
2890
- * Update a webhook
2891
- *
2892
- * Updates an existing webhook's configuration
2893
- */
2614
+ * Update a webhook
2615
+ *
2616
+ * Updates an existing webhook's configuration
2617
+ */
2894
2618
  static updateWebhook(options) {
2895
2619
  return (options.client ?? client).put({
2896
2620
  url: "/api/v1/projects/{project_id}/webhooks/{webhook_id}",
@@ -2902,10 +2626,10 @@ var Webhooks = class {
2902
2626
  });
2903
2627
  }
2904
2628
  /**
2905
- * List deliveries for a webhook
2906
- *
2907
- * Lists all event deliveries for a specific webhook
2908
- */
2629
+ * List deliveries for a webhook
2630
+ *
2631
+ * Lists all event deliveries for a specific webhook
2632
+ */
2909
2633
  static listWebhookDeliveries(options) {
2910
2634
  return (options.client ?? client).get({
2911
2635
  url: "/api/v1/projects/{project_id}/webhooks/{webhook_id}/deliveries",
@@ -2913,10 +2637,10 @@ var Webhooks = class {
2913
2637
  });
2914
2638
  }
2915
2639
  /**
2916
- * Get a delivery
2917
- *
2918
- * Retrieves the details of a specific webhook delivery
2919
- */
2640
+ * Get a delivery
2641
+ *
2642
+ * Retrieves the details of a specific webhook delivery
2643
+ */
2920
2644
  static getWebhookDelivery(options) {
2921
2645
  return (options.client ?? client).get({
2922
2646
  url: "/api/v1/projects/{project_id}/webhooks/{webhook_id}/deliveries/{delivery_id}",
@@ -2924,10 +2648,10 @@ var Webhooks = class {
2924
2648
  });
2925
2649
  }
2926
2650
  /**
2927
- * Get webhook secret
2928
- *
2929
- * Retrieves the signing secret for the specified webhook
2930
- */
2651
+ * Get webhook secret
2652
+ *
2653
+ * Retrieves the signing secret for the specified webhook
2654
+ */
2931
2655
  static getWebhookSecret(options) {
2932
2656
  return (options.client ?? client).get({
2933
2657
  url: "/api/v1/projects/{project_id}/webhooks/{webhook_id}/secret",
@@ -2935,10 +2659,10 @@ var Webhooks = class {
2935
2659
  });
2936
2660
  }
2937
2661
  /**
2938
- * Rotate webhook secret
2939
- *
2940
- * Rotates the secret key for the specified webhook
2941
- */
2662
+ * Rotate webhook secret
2663
+ *
2664
+ * Rotates the secret key for the specified webhook
2665
+ */
2942
2666
  static rotateWebhookSecret(options) {
2943
2667
  return (options.client ?? client).post({
2944
2668
  url: "/api/v1/projects/{project_id}/webhooks/{webhook_id}/rotate-secret",
@@ -2947,27 +2671,52 @@ var Webhooks = class {
2947
2671
  }
2948
2672
  };
2949
2673
 
2950
- // src/soatClient.ts
2951
- var bindResource = /* @__PURE__ */__name((SdkClass, client2) => {
2674
+ //#endregion
2675
+ //#region src/soatClient.ts
2676
+ /**
2677
+ * Wraps a static SDK class so that all its methods are callable as instance
2678
+ * methods, with the given `client` automatically injected into every call.
2679
+ *
2680
+ * The return type is preserved as `T` (= `typeof <StaticClass>`), so callers
2681
+ * get full TypeScript auto-complete and type checking without having to pass
2682
+ * `client` themselves.
2683
+ */
2684
+ var bindResource = (SdkClass, client) => {
2952
2685
  return new Proxy(SdkClass, {
2953
- get: /* @__PURE__ */__name((target, prop) => {
2686
+ get: (target, prop) => {
2954
2687
  const value = target[prop];
2955
- if (typeof value === "function") {
2956
- return options => {
2957
- return value({
2958
- ...options,
2959
- client: client2
2960
- });
2961
- };
2962
- }
2688
+ if (typeof value === "function") return options => {
2689
+ return value({
2690
+ ...options,
2691
+ client
2692
+ });
2693
+ };
2963
2694
  return value;
2964
- }, "get")
2695
+ }
2965
2696
  });
2966
- }, "bindResource");
2697
+ };
2698
+ /**
2699
+ * Stripe-style SOAT client.
2700
+ *
2701
+ * Create an instance once and reuse it throughout your application:
2702
+ *
2703
+ * ```ts
2704
+ * import { SoatClient } from '@soat/sdk';
2705
+ *
2706
+ * const soat = new SoatClient({ baseUrl: 'https://api.example.com', token: 'sk_...' });
2707
+ *
2708
+ * const { data, error } = await soat.sessions.addSessionMessage({
2709
+ * path: { agent_id: AGENT_ID, session_id: SESSION_ID },
2710
+ * body: { message: 'What is the capital of France?' },
2711
+ * });
2712
+ * ```
2713
+ *
2714
+ * The instance exposes one property per API resource. Each property mirrors
2715
+ * the corresponding static class from the generated SDK, so all method
2716
+ * signatures, types, and return values are identical — the only difference
2717
+ * is that you never need to supply `client` yourself.
2718
+ */
2967
2719
  var SoatClient = class {
2968
- static {
2969
- __name(this, "SoatClient");
2970
- }
2971
2720
  actors;
2972
2721
  agents;
2973
2722
  aiProviders;
@@ -3025,30 +2774,29 @@ var SoatClient = class {
3025
2774
  this.webhooks = bindResource(Webhooks, httpClient);
3026
2775
  }
3027
2776
  };
3028
- // Annotate the CommonJS export names for ESM import in node:
3029
- 0 && (module.exports = {
3030
- Actors,
3031
- Agents,
3032
- AiProviders,
3033
- ApiKeys,
3034
- Chats,
3035
- Conversations,
3036
- Documents,
3037
- Files,
3038
- Formations,
3039
- Knowledge,
3040
- Memories,
3041
- MemoryEntries,
3042
- Orchestrations,
3043
- Policies,
3044
- Projects,
3045
- Secrets,
3046
- Sessions,
3047
- SoatClient,
3048
- Tools,
3049
- Traces,
3050
- Users,
3051
- Webhooks,
3052
- createClient,
3053
- createConfig
3054
- });
2777
+
2778
+ //#endregion
2779
+ exports.Actors = Actors;
2780
+ exports.Agents = Agents;
2781
+ exports.AiProviders = AiProviders;
2782
+ exports.ApiKeys = ApiKeys;
2783
+ exports.Chats = Chats;
2784
+ exports.Conversations = Conversations;
2785
+ exports.Documents = Documents;
2786
+ exports.Files = Files;
2787
+ exports.Formations = Formations;
2788
+ exports.Knowledge = Knowledge;
2789
+ exports.Memories = Memories;
2790
+ exports.MemoryEntries = MemoryEntries;
2791
+ exports.Orchestrations = Orchestrations;
2792
+ exports.Policies = Policies;
2793
+ exports.Projects = Projects;
2794
+ exports.Secrets = Secrets;
2795
+ exports.Sessions = Sessions;
2796
+ exports.SoatClient = SoatClient;
2797
+ exports.Tools = Tools;
2798
+ exports.Traces = Traces;
2799
+ exports.Users = Users;
2800
+ exports.Webhooks = Webhooks;
2801
+ exports.createClient = createClient;
2802
+ exports.createConfig = createConfig;