@soat/sdk 0.5.6 → 0.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -351,178 +351,6 @@ type ActorRecord = {
351
351
  type ErrorResponse = {
352
352
  error?: string;
353
353
  };
354
- /**
355
- * A formation template supplied as either a JSON object or a YAML/JSON string. When a string is provided the server parses it with a YAML parser (JSON is valid YAML) before processing.
356
- *
357
- */
358
- type FormationTemplateInput = FormationTemplate | string;
359
- type FormationTemplate = {
360
- /**
361
- * Declared parameters for this template. Each parameter may have a default value and an optional description. Parameters without a default must be supplied in the `parameters` field of the deploy request.
362
- *
363
- */
364
- parameters?: {
365
- [key: string]: ParameterDeclaration;
366
- } | null;
367
- /**
368
- * Map of logical resource IDs to resource declarations
369
- */
370
- resources: {
371
- [key: string]: ResourceDeclaration;
372
- };
373
- /**
374
- * Map of output names to values. Values may use `{ "ref": "logicalId" }` to reference physical IDs of created resources, or `{ "param": "ParamName" }` and `{ "sub": "text ${ParamName}" }` to embed parameter values.
375
- *
376
- */
377
- outputs?: {
378
- [key: string]: unknown;
379
- } | null;
380
- metadata?: {
381
- [key: string]: unknown;
382
- } | null;
383
- };
384
- type ParameterDeclaration = {
385
- /**
386
- * Parameter type (currently only 'string' is supported)
387
- */
388
- type?: string;
389
- /**
390
- * Default value used when the parameter is not supplied at deploy time
391
- */
392
- default?: string | null;
393
- /**
394
- * Human-readable description of what this parameter represents
395
- */
396
- description?: string | null;
397
- /**
398
- * When true, the parameter value should be treated as sensitive and not echoed in logs or UI. Analogous to NoEcho in CloudFormation.
399
- *
400
- */
401
- no_echo?: boolean | null;
402
- };
403
- type ResourceDeclaration = {
404
- /**
405
- * Resource type
406
- */
407
- type: 'ai_provider' | 'agent_tool' | 'agent' | 'document' | 'memory' | 'memory_entry' | 'webhook';
408
- /**
409
- * Resource properties. Values may use `{ "ref": "logicalId" }` to reference physical IDs of other resources in the template, `{ "param": "ParamName" }` to substitute a parameter value, or `{ "sub": "text ${ParamName}" }` to interpolate parameter values into a string.
410
- *
411
- */
412
- properties: {
413
- [key: string]: unknown;
414
- };
415
- /**
416
- * Explicit dependency list. In addition to implicit `ref` dependencies.
417
- */
418
- depends_on?: Array<string> | null;
419
- metadata?: {
420
- [key: string]: unknown;
421
- } | null;
422
- };
423
- type AgentFormationResource = {
424
- /**
425
- * Public ID of the resource record
426
- */
427
- id?: string;
428
- /**
429
- * Logical identifier from the template
430
- */
431
- logical_id?: string;
432
- /**
433
- * Resource type (e.g. agent, memory)
434
- */
435
- resource_type?: string;
436
- /**
437
- * Public ID of the physical SOAT resource
438
- */
439
- physical_resource_id?: string | null;
440
- /**
441
- * Current resource status
442
- */
443
- status?: 'pending' | 'created' | 'updated' | 'deleted' | 'failed';
444
- };
445
- type AgentFormation = {
446
- /**
447
- * Public ID of the formation
448
- */
449
- id?: string;
450
- /**
451
- * Project public ID
452
- */
453
- project_id?: string;
454
- /**
455
- * Human-readable formation name
456
- */
457
- name?: string;
458
- template?: FormationTemplate;
459
- /**
460
- * Resolved output values after stack deployment
461
- */
462
- outputs?: {
463
- [key: string]: string;
464
- } | null;
465
- /**
466
- * Formation status
467
- */
468
- status?: 'creating' | 'active' | 'updating' | 'failed' | 'deleting' | 'deleted' | 'delete_failed';
469
- metadata?: {
470
- [key: string]: unknown;
471
- } | null;
472
- /**
473
- * Resources managed by this formation (present on get/create/update)
474
- */
475
- resources?: Array<AgentFormationResource>;
476
- created_at?: Date;
477
- updated_at?: Date;
478
- };
479
- type ValidationError = {
480
- /**
481
- * JSON path to the field with the error
482
- */
483
- path?: string;
484
- /**
485
- * Error description
486
- */
487
- message?: string;
488
- };
489
- type ValidationResult = {
490
- valid?: boolean;
491
- errors?: Array<ValidationError>;
492
- warnings?: Array<ValidationError>;
493
- };
494
- type PlanChange = {
495
- logical_id?: string;
496
- resource_type?: string;
497
- action?: 'create' | 'update' | 'delete' | 'no-op';
498
- };
499
- type PlanResult = {
500
- changes?: Array<PlanChange>;
501
- };
502
- type FormationEvent = {
503
- timestamp?: Date;
504
- logical_id?: string;
505
- resource_type?: string;
506
- action?: string;
507
- status?: 'succeeded' | 'failed';
508
- physical_resource_id?: string | null;
509
- error?: string | null;
510
- };
511
- type FormationOperation = {
512
- /**
513
- * Public ID of the operation
514
- */
515
- id?: string;
516
- operation_type?: 'validate' | 'plan' | 'create' | 'update' | 'delete';
517
- status?: 'pending' | 'running' | 'succeeded' | 'failed';
518
- events?: Array<FormationEvent> | null;
519
- plan?: PlanResult | null;
520
- error?: {
521
- [key: string]: unknown;
522
- } | null;
523
- created_at?: Date;
524
- updated_at?: Date;
525
- };
526
354
  type AgentTool = {
527
355
  /**
528
356
  * Public ID of the agent tool
@@ -1268,78 +1096,740 @@ type FileRecord = {
1268
1096
  */
1269
1097
  updated_at?: Date;
1270
1098
  };
1271
- type KnowledgeResult = ({
1272
- source_type: 'document';
1273
- } & DocumentKnowledgeResult) | ({
1274
- source_type: 'memory';
1275
- } & MemoryKnowledgeResult);
1276
- type DocumentKnowledgeResult = {
1099
+ /**
1100
+ * A formation template supplied as either a JSON object or a YAML/JSON string. When a string is provided the server parses it with a YAML parser (JSON is valid YAML) before processing.
1101
+ *
1102
+ */
1103
+ type FormationTemplateInput = FormationTemplate | string;
1104
+ type FormationTemplate = {
1277
1105
  /**
1278
- * The type of knowledge source this result comes from
1106
+ * Declared parameters for this template. Each parameter may have a default value and an optional description. Parameters without a default must be supplied in the `parameters` field of the deploy request.
1107
+ *
1279
1108
  */
1280
- source_type: 'document';
1109
+ parameters?: {
1110
+ [key: string]: ParameterDeclaration;
1111
+ } | null;
1281
1112
  /**
1282
- * Public ID of the document
1113
+ * Map of logical resource IDs to resource declarations
1283
1114
  */
1284
- document_id: string;
1115
+ resources: {
1116
+ [key: string]: ResourceDeclaration;
1117
+ };
1285
1118
  /**
1286
- * Public ID of the underlying file
1119
+ * Map of output names to values. Values may use `{ "ref": "logicalId" }` to reference physical IDs of created resources, or `{ "param": "ParamName" }` and `{ "sub": "text ${ParamName}" }` to embed parameter values.
1120
+ *
1287
1121
  */
1288
- file_id?: string;
1122
+ outputs?: {
1123
+ [key: string]: unknown;
1124
+ } | null;
1125
+ metadata?: {
1126
+ [key: string]: unknown;
1127
+ } | null;
1128
+ };
1129
+ type ParameterDeclaration = {
1289
1130
  /**
1290
- * Public ID of the project the document belongs to
1131
+ * Parameter type (currently only 'string' is supported)
1291
1132
  */
1292
- project_id?: string;
1133
+ type?: string;
1293
1134
  /**
1294
- * Logical path of the file within the project
1135
+ * Default value used when the parameter is not supplied at deploy time
1295
1136
  */
1296
- path?: string;
1137
+ default?: string | null;
1297
1138
  /**
1298
- * Filename of the underlying file
1139
+ * Human-readable description of what this parameter represents
1299
1140
  */
1300
- filename?: string;
1141
+ description?: string | null;
1301
1142
  /**
1302
- * File size in bytes
1143
+ * When true, the parameter value should be treated as sensitive and not echoed in logs or UI. Analogous to NoEcho in CloudFormation.
1144
+ *
1303
1145
  */
1304
- size?: number;
1146
+ no_echo?: boolean | null;
1147
+ };
1148
+ /**
1149
+ * Creates an AI agent backed by a provider. The agent handles requests, runs tools, and can be attached to actors.
1150
+ */
1151
+ type AgentResourceProperties = {
1305
1152
  /**
1306
- * Document title
1153
+ * Public ID of the AI provider
1307
1154
  */
1308
- title?: string;
1155
+ ai_provider_id: string;
1309
1156
  /**
1310
- * Arbitrary metadata attached to the document
1157
+ * Agent display name
1311
1158
  */
1312
- metadata?: {
1313
- [key: string]: unknown;
1314
- };
1159
+ name?: string | null;
1315
1160
  /**
1316
- * Key-value tags
1161
+ * System instructions for the agent
1317
1162
  */
1318
- tags?: {
1319
- [key: string]: string;
1320
- };
1163
+ instructions?: string | null;
1321
1164
  /**
1322
- * Full text content of the document
1165
+ * Model identifier (overrides provider default)
1323
1166
  */
1324
- content: string | null;
1167
+ model?: string | null;
1325
1168
  /**
1326
- * Semantic similarity score (0–1). Only present when `query` was provided.
1169
+ * Agent tool IDs to attach
1327
1170
  */
1328
- score?: number;
1171
+ tool_ids?: Array<string> | null;
1329
1172
  /**
1330
- * Creation timestamp
1173
+ * Maximum number of agentic steps per generation
1331
1174
  */
1332
- created_at: Date;
1175
+ max_steps?: number | null;
1333
1176
  /**
1334
- * Last updated timestamp
1177
+ * Controls how the model selects tools. Examples: `{ "type": "auto" }`, `{ "type": "none" }`, `{ "type": "required" }`, or `{ "type": "tool", "name": "my_tool" }`.
1335
1178
  */
1336
- updated_at: Date;
1337
- };
1338
- type MemoryKnowledgeResult = {
1179
+ tool_choice?: {
1180
+ [key: string]: unknown;
1181
+ } | null;
1339
1182
  /**
1340
- * The type of knowledge source this result comes from
1183
+ * Conditions that stop multi-step generation early. The loop stops when any condition is met.
1341
1184
  */
1342
- source_type: 'memory';
1185
+ stop_conditions?: Array<{
1186
+ /**
1187
+ * Condition type — currently `hasToolCall`
1188
+ */
1189
+ type?: string;
1190
+ /**
1191
+ * Tool name to match when type is `hasToolCall`
1192
+ */
1193
+ tool_name?: string | null;
1194
+ }> | null;
1195
+ /**
1196
+ * Subset of tool_ids that are active
1197
+ */
1198
+ active_tool_ids?: Array<string> | null;
1199
+ /**
1200
+ * Per-step overrides applied during multi-step generation. Steps not covered by a rule use the agent defaults.
1201
+ */
1202
+ step_rules?: Array<{
1203
+ /**
1204
+ * 1-indexed step number this rule applies to
1205
+ */
1206
+ step?: number;
1207
+ /**
1208
+ * Tool choice override for this step, e.g. `auto`, `required`, or `{ type: tool, tool_name: search }`
1209
+ */
1210
+ tool_choice?: {
1211
+ [key: string]: unknown;
1212
+ } | null;
1213
+ /**
1214
+ * Tool IDs active on this step
1215
+ */
1216
+ active_tool_ids?: Array<string> | null;
1217
+ }> | null;
1218
+ /**
1219
+ * Restricts which SOAT actions the agent may invoke. Evaluated as the intersection with the caller's own policy.
1220
+ */
1221
+ boundary_policy?: {
1222
+ /**
1223
+ * List of IAM policy statements
1224
+ */
1225
+ statement?: Array<{
1226
+ /**
1227
+ * Effect — `Allow` or `Deny`
1228
+ */
1229
+ effect?: string;
1230
+ /**
1231
+ * IAM action strings, e.g. `memories:*` or `agents:DeleteAgent`
1232
+ */
1233
+ action?: Array<string>;
1234
+ /**
1235
+ * Resource SRN patterns (optional; omit to match all resources)
1236
+ */
1237
+ resource?: Array<string> | null;
1238
+ }>;
1239
+ } | null;
1240
+ /**
1241
+ * Sampling temperature
1242
+ */
1243
+ temperature?: number | null;
1244
+ /**
1245
+ * Knowledge retrieval configuration. When set, relevant documents and memory entries are injected into every generation.
1246
+ */
1247
+ knowledge_config?: {
1248
+ /**
1249
+ * Public IDs of memories to retrieve from
1250
+ */
1251
+ memory_ids?: Array<string>;
1252
+ /**
1253
+ * Retrieve from all memories matching these tags
1254
+ */
1255
+ memory_tags?: Array<string>;
1256
+ /**
1257
+ * Public IDs of documents to retrieve from
1258
+ */
1259
+ document_ids?: Array<string>;
1260
+ /**
1261
+ * Retrieve from all documents matching these path prefixes
1262
+ */
1263
+ document_paths?: Array<string>;
1264
+ /**
1265
+ * Minimum similarity score (0–1) for retrieved chunks
1266
+ */
1267
+ min_score?: number;
1268
+ /**
1269
+ * Maximum number of chunks to inject
1270
+ */
1271
+ limit?: number;
1272
+ /**
1273
+ * Public ID of the memory the agent can write to. When set, a `write_memory` tool is automatically available to the agent.
1274
+ */
1275
+ write_memory_id?: string | null;
1276
+ } | null;
1277
+ };
1278
+ /**
1279
+ * Creates a stateful conversation actor that wraps an agent or chat session and optionally links to a memory store.
1280
+ */
1281
+ type ActorResourceProperties = {
1282
+ /**
1283
+ * Actor display name
1284
+ */
1285
+ name: string;
1286
+ /**
1287
+ * External identifier for idempotent actor creation
1288
+ */
1289
+ external_id?: string | null;
1290
+ /**
1291
+ * Persona-specific instructions
1292
+ */
1293
+ instructions?: string | null;
1294
+ /**
1295
+ * Linked agent ID (mutually exclusive with chat_id)
1296
+ */
1297
+ agent_id?: string | null;
1298
+ /**
1299
+ * Linked chat ID (mutually exclusive with agent_id)
1300
+ */
1301
+ chat_id?: string | null;
1302
+ /**
1303
+ * Linked memory ID
1304
+ */
1305
+ memory_id?: string | null;
1306
+ /**
1307
+ * Whether to auto-create memory when actor is created
1308
+ */
1309
+ auto_create_memory?: boolean;
1310
+ };
1311
+ /**
1312
+ * Configures an LLM provider connection (API key, model, endpoint) that agents use to generate responses.
1313
+ */
1314
+ type AiProviderResourceProperties = {
1315
+ /**
1316
+ * Provider display name
1317
+ */
1318
+ name: string;
1319
+ /**
1320
+ * Provider type (e.g. openai, anthropic)
1321
+ */
1322
+ provider: string;
1323
+ /**
1324
+ * Default model identifier (e.g. gpt-4o, claude-3-7-sonnet)
1325
+ */
1326
+ default_model: string;
1327
+ /**
1328
+ * Public ID of the secret containing the API key
1329
+ */
1330
+ secret_id?: string | null;
1331
+ /**
1332
+ * Custom base URL for the provider API (self-hosted or proxy)
1333
+ */
1334
+ base_url?: string | null;
1335
+ /**
1336
+ * Provider-specific extra configuration
1337
+ */
1338
+ config?: {
1339
+ [key: string]: unknown;
1340
+ } | null;
1341
+ };
1342
+ /**
1343
+ * Defines a tool (HTTP endpoint, MCP server, or SOAT action) that agents can invoke during a generation.
1344
+ */
1345
+ type AgentToolResourceProperties = {
1346
+ /**
1347
+ * Tool display name
1348
+ */
1349
+ name: string;
1350
+ /**
1351
+ * Tool type hint (e.g. http, mcp, soat)
1352
+ */
1353
+ type?: string | null;
1354
+ /**
1355
+ * Tool description shown to the model
1356
+ */
1357
+ description?: string | null;
1358
+ /**
1359
+ * JSON Schema describing the tool's input parameters (free-form, user-defined)
1360
+ */
1361
+ parameters?: {
1362
+ [key: string]: unknown;
1363
+ } | null;
1364
+ /**
1365
+ * HTTP execution configuration. Required for `http` tools.
1366
+ */
1367
+ execute?: {
1368
+ /**
1369
+ * Endpoint URL. Supports `{param}` placeholders resolved from tool arguments.
1370
+ */
1371
+ url?: string;
1372
+ /**
1373
+ * HTTP method (default: `POST`)
1374
+ */
1375
+ method?: string | null;
1376
+ /**
1377
+ * Static headers included in every request
1378
+ */
1379
+ headers?: {
1380
+ [key: string]: unknown;
1381
+ } | null;
1382
+ } | null;
1383
+ /**
1384
+ * MCP server connection configuration. Required for `mcp` tools.
1385
+ */
1386
+ mcp?: {
1387
+ /**
1388
+ * MCP server URL
1389
+ */
1390
+ url?: string;
1391
+ /**
1392
+ * Headers included in every MCP request
1393
+ */
1394
+ headers?: {
1395
+ [key: string]: unknown;
1396
+ } | null;
1397
+ } | null;
1398
+ /**
1399
+ * IAM action strings the tool is permitted to call
1400
+ */
1401
+ actions?: Array<string> | null;
1402
+ /**
1403
+ * Pre-filled parameter values injected at execution time
1404
+ */
1405
+ preset_parameters?: {
1406
+ [key: string]: unknown;
1407
+ } | null;
1408
+ };
1409
+ /**
1410
+ * Stores a text document in a project, optionally indexing it for knowledge retrieval.
1411
+ */
1412
+ type DocumentResourceProperties = {
1413
+ /**
1414
+ * Document text content
1415
+ */
1416
+ content: string;
1417
+ /**
1418
+ * Virtual path for organising the document
1419
+ */
1420
+ path?: string | null;
1421
+ /**
1422
+ * Original filename
1423
+ */
1424
+ filename?: string | null;
1425
+ /**
1426
+ * Document title
1427
+ */
1428
+ title?: string | null;
1429
+ /**
1430
+ * Arbitrary metadata key-value pairs
1431
+ */
1432
+ metadata?: {
1433
+ [key: string]: unknown;
1434
+ } | null;
1435
+ /**
1436
+ * Tag key-value pairs for filtering
1437
+ */
1438
+ tags?: {
1439
+ [key: string]: unknown;
1440
+ } | null;
1441
+ };
1442
+ /**
1443
+ * Creates a named memory store that actors can read from and write to across conversations.
1444
+ */
1445
+ type MemoryResourceProperties = {
1446
+ /**
1447
+ * Memory display name
1448
+ */
1449
+ name: string;
1450
+ /**
1451
+ * What this memory stores
1452
+ */
1453
+ description?: string | null;
1454
+ /**
1455
+ * Tag strings for filtering
1456
+ */
1457
+ tags?: Array<string> | null;
1458
+ };
1459
+ /**
1460
+ * Adds a single text entry to a memory store.
1461
+ */
1462
+ type MemoryEntryResourceProperties = {
1463
+ /**
1464
+ * Public ID of the parent memory (or ref expression)
1465
+ */
1466
+ memory_id: string;
1467
+ /**
1468
+ * Text content of the memory entry
1469
+ */
1470
+ content: string;
1471
+ /**
1472
+ * Origin label (e.g. manual, document, import)
1473
+ */
1474
+ source?: string | null;
1475
+ };
1476
+ /**
1477
+ * Registers an HTTPS endpoint to receive SOAT platform event notifications.
1478
+ */
1479
+ type WebhookResourceProperties = {
1480
+ /**
1481
+ * Webhook display name
1482
+ */
1483
+ name: string;
1484
+ /**
1485
+ * Optional description
1486
+ */
1487
+ description?: string | null;
1488
+ /**
1489
+ * HTTPS endpoint that receives event payloads
1490
+ */
1491
+ url: string;
1492
+ /**
1493
+ * Event types to subscribe to (e.g. memory.updated)
1494
+ */
1495
+ events: Array<string>;
1496
+ };
1497
+ /**
1498
+ * Creates an API key scoped to the formation's project and optionally restricted by a set of policies. The key is owned by the project owner.
1499
+ */
1500
+ type ApiKeyResourceProperties = {
1501
+ /**
1502
+ * Human-readable label for the API key
1503
+ */
1504
+ name: string;
1505
+ /**
1506
+ * Optional list of policy public IDs that further restrict the key's permissions
1507
+ */
1508
+ policy_ids?: Array<string>;
1509
+ };
1510
+ /**
1511
+ * Creates a chat connected to an AI provider within the formation's project.
1512
+ */
1513
+ type ChatResourceProperties = {
1514
+ /**
1515
+ * Public ID of the AI provider to use for this chat
1516
+ */
1517
+ ai_provider_id: string;
1518
+ /**
1519
+ * Human-readable label for the chat
1520
+ */
1521
+ name?: string | null;
1522
+ /**
1523
+ * System message to set the assistant behaviour
1524
+ */
1525
+ system_message?: string | null;
1526
+ /**
1527
+ * Model override; defaults to the AI provider's default model
1528
+ */
1529
+ model?: string | null;
1530
+ };
1531
+ /**
1532
+ * Creates a conversation within the formation's project.
1533
+ */
1534
+ type ConversationResourceProperties = {
1535
+ /**
1536
+ * Human-readable label for the conversation
1537
+ */
1538
+ name?: string | null;
1539
+ /**
1540
+ * Initial status of the conversation (open or closed)
1541
+ */
1542
+ status?: string;
1543
+ /**
1544
+ * Public ID of an actor to associate with this conversation
1545
+ */
1546
+ actor_id?: string | null;
1547
+ };
1548
+ /**
1549
+ * Registers a file record within the formation's project.
1550
+ */
1551
+ type FileResourceProperties = {
1552
+ /**
1553
+ * Storage backend type
1554
+ */
1555
+ storage_type: 'local' | 's3' | 'gcs';
1556
+ /**
1557
+ * Path where the file is stored in the storage backend
1558
+ */
1559
+ storage_path: string;
1560
+ /**
1561
+ * Logical path of the file within the project
1562
+ */
1563
+ path?: string | null;
1564
+ /**
1565
+ * Name of the file
1566
+ */
1567
+ filename?: string | null;
1568
+ /**
1569
+ * MIME type of the file
1570
+ */
1571
+ content_type?: string | null;
1572
+ /**
1573
+ * File size in bytes
1574
+ */
1575
+ size?: number | null;
1576
+ /**
1577
+ * JSON string with additional metadata
1578
+ */
1579
+ metadata?: string | null;
1580
+ };
1581
+ /**
1582
+ * Creates an access-control policy within the formation's project.
1583
+ */
1584
+ type PolicyResourceProperties = {
1585
+ /**
1586
+ * Human-readable label for the policy
1587
+ */
1588
+ name?: string | null;
1589
+ /**
1590
+ * Description of what the policy grants
1591
+ */
1592
+ description?: string | null;
1593
+ /**
1594
+ * Policy document containing an array of statements
1595
+ */
1596
+ document: {
1597
+ [key: string]: unknown;
1598
+ };
1599
+ };
1600
+ /**
1601
+ * Creates an encrypted secret within the formation's project.
1602
+ */
1603
+ type SecretResourceProperties = {
1604
+ /**
1605
+ * Human-readable label for the secret
1606
+ */
1607
+ name: string;
1608
+ /**
1609
+ * The secret value to encrypt and store
1610
+ */
1611
+ value?: string | null;
1612
+ };
1613
+ /**
1614
+ * Creates a session attached to an agent within the formation's project.
1615
+ */
1616
+ type SessionResourceProperties = {
1617
+ /**
1618
+ * Public ID of the agent that owns this session
1619
+ */
1620
+ agent_id: string;
1621
+ /**
1622
+ * Human-readable label for the session
1623
+ */
1624
+ name?: string | null;
1625
+ /**
1626
+ * Public ID of an actor to associate with this session
1627
+ */
1628
+ actor_id?: string | null;
1629
+ /**
1630
+ * Whether to automatically generate a response when messages are sent
1631
+ */
1632
+ auto_generate?: boolean;
1633
+ /**
1634
+ * Optional context object passed to tool calls
1635
+ */
1636
+ tool_context?: {
1637
+ [key: string]: unknown;
1638
+ } | null;
1639
+ };
1640
+ type ResourceDeclaration = {
1641
+ /**
1642
+ * Resource type
1643
+ */
1644
+ type: 'ai_provider' | 'agent_tool' | 'agent' | 'actor' | 'api_key' | 'chat' | 'conversation' | 'document' | 'file' | 'memory' | 'memory_entry' | 'policy' | 'secret' | 'session' | 'webhook';
1645
+ /**
1646
+ * Resource properties. Values may use `{ "ref": "logicalId" }` to reference physical IDs of other resources in the template, `{ "param": "ParamName" }` to substitute a parameter value, or `{ "sub": "text ${ParamName}" }` to interpolate parameter values into a string.
1647
+ *
1648
+ */
1649
+ properties: AgentResourceProperties | ActorResourceProperties | AiProviderResourceProperties | AgentToolResourceProperties | ApiKeyResourceProperties | ChatResourceProperties | ConversationResourceProperties | DocumentResourceProperties | FileResourceProperties | MemoryResourceProperties | MemoryEntryResourceProperties | PolicyResourceProperties | SecretResourceProperties | SessionResourceProperties | WebhookResourceProperties;
1650
+ /**
1651
+ * Explicit dependency list. In addition to implicit `ref` dependencies.
1652
+ */
1653
+ depends_on?: Array<string> | null;
1654
+ metadata?: {
1655
+ [key: string]: unknown;
1656
+ } | null;
1657
+ };
1658
+ type FormationResource = {
1659
+ /**
1660
+ * Public ID of the resource record
1661
+ */
1662
+ id?: string;
1663
+ /**
1664
+ * Logical identifier from the template
1665
+ */
1666
+ logical_id?: string;
1667
+ /**
1668
+ * Resource type (e.g. agent, memory)
1669
+ */
1670
+ resource_type?: string;
1671
+ /**
1672
+ * Public ID of the physical SOAT resource
1673
+ */
1674
+ physical_resource_id?: string | null;
1675
+ /**
1676
+ * Current resource status
1677
+ */
1678
+ status?: 'pending' | 'created' | 'updated' | 'deleted' | 'failed';
1679
+ };
1680
+ type Formation = {
1681
+ /**
1682
+ * Public ID of the formation
1683
+ */
1684
+ id?: string;
1685
+ /**
1686
+ * Project public ID
1687
+ */
1688
+ project_id?: string;
1689
+ /**
1690
+ * Human-readable formation name
1691
+ */
1692
+ name?: string;
1693
+ template?: FormationTemplate;
1694
+ /**
1695
+ * Resolved output values after stack deployment
1696
+ */
1697
+ outputs?: {
1698
+ [key: string]: string;
1699
+ } | null;
1700
+ /**
1701
+ * Formation status
1702
+ */
1703
+ status?: 'creating' | 'active' | 'updating' | 'failed' | 'deleting' | 'deleted' | 'delete_failed';
1704
+ metadata?: {
1705
+ [key: string]: unknown;
1706
+ } | null;
1707
+ /**
1708
+ * Resources managed by this formation (present on get/create/update)
1709
+ */
1710
+ resources?: Array<FormationResource>;
1711
+ created_at?: Date;
1712
+ updated_at?: Date;
1713
+ };
1714
+ type ValidationError = {
1715
+ /**
1716
+ * JSON path to the field with the error
1717
+ */
1718
+ path?: string;
1719
+ /**
1720
+ * Error description
1721
+ */
1722
+ message?: string;
1723
+ };
1724
+ type ValidationResult = {
1725
+ valid?: boolean;
1726
+ errors?: Array<ValidationError>;
1727
+ warnings?: Array<ValidationError>;
1728
+ };
1729
+ type PlanChange = {
1730
+ logical_id?: string;
1731
+ resource_type?: string;
1732
+ action?: 'create' | 'update' | 'delete' | 'no-op';
1733
+ };
1734
+ type PlanResult = {
1735
+ changes?: Array<PlanChange>;
1736
+ };
1737
+ type FormationEvent = {
1738
+ timestamp?: Date;
1739
+ logical_id?: string;
1740
+ resource_type?: string;
1741
+ action?: string;
1742
+ status?: 'succeeded' | 'failed';
1743
+ physical_resource_id?: string | null;
1744
+ error?: string | null;
1745
+ };
1746
+ type FormationOperation = {
1747
+ /**
1748
+ * Public ID of the operation
1749
+ */
1750
+ id?: string;
1751
+ operation_type?: 'validate' | 'plan' | 'create' | 'update' | 'delete';
1752
+ status?: 'pending' | 'running' | 'succeeded' | 'failed';
1753
+ events?: Array<FormationEvent> | null;
1754
+ plan?: PlanResult | null;
1755
+ error?: {
1756
+ [key: string]: unknown;
1757
+ } | null;
1758
+ created_at?: Date;
1759
+ updated_at?: Date;
1760
+ };
1761
+ type KnowledgeResult = ({
1762
+ source_type: 'document';
1763
+ } & DocumentKnowledgeResult) | ({
1764
+ source_type: 'memory';
1765
+ } & MemoryKnowledgeResult);
1766
+ type DocumentKnowledgeResult = {
1767
+ /**
1768
+ * The type of knowledge source this result comes from
1769
+ */
1770
+ source_type: 'document';
1771
+ /**
1772
+ * Public ID of the document
1773
+ */
1774
+ document_id: string;
1775
+ /**
1776
+ * Public ID of the underlying file
1777
+ */
1778
+ file_id?: string;
1779
+ /**
1780
+ * Public ID of the project the document belongs to
1781
+ */
1782
+ project_id?: string;
1783
+ /**
1784
+ * Logical path of the file within the project
1785
+ */
1786
+ path?: string;
1787
+ /**
1788
+ * Filename of the underlying file
1789
+ */
1790
+ filename?: string;
1791
+ /**
1792
+ * File size in bytes
1793
+ */
1794
+ size?: number;
1795
+ /**
1796
+ * Document title
1797
+ */
1798
+ title?: string;
1799
+ /**
1800
+ * Arbitrary metadata attached to the document
1801
+ */
1802
+ metadata?: {
1803
+ [key: string]: unknown;
1804
+ };
1805
+ /**
1806
+ * Key-value tags
1807
+ */
1808
+ tags?: {
1809
+ [key: string]: string;
1810
+ };
1811
+ /**
1812
+ * Full text content of the document
1813
+ */
1814
+ content: string | null;
1815
+ /**
1816
+ * Semantic similarity score (0–1). Only present when `query` was provided.
1817
+ */
1818
+ score?: number;
1819
+ /**
1820
+ * Creation timestamp
1821
+ */
1822
+ created_at: Date;
1823
+ /**
1824
+ * Last updated timestamp
1825
+ */
1826
+ updated_at: Date;
1827
+ };
1828
+ type MemoryKnowledgeResult = {
1829
+ /**
1830
+ * The type of knowledge source this result comes from
1831
+ */
1832
+ source_type: 'memory';
1343
1833
  /**
1344
1834
  * Public ID of the memory entry
1345
1835
  */
@@ -1972,357 +2462,81 @@ type GetActorTagsResponses = {
1972
2462
  [key: string]: string;
1973
2463
  };
1974
2464
  };
1975
- type GetActorTagsResponse = GetActorTagsResponses[keyof GetActorTagsResponses];
1976
- type MergeActorTagsData = {
1977
- body: {
1978
- [key: string]: string;
1979
- };
1980
- path: {
1981
- /**
1982
- * Actor ID
1983
- */
1984
- actor_id: string;
1985
- };
1986
- query?: never;
1987
- url: '/api/v1/actors/{actor_id}/tags';
1988
- };
1989
- type MergeActorTagsErrors = {
1990
- /**
1991
- * Unauthorized
1992
- */
1993
- 401: ErrorResponse;
1994
- /**
1995
- * Forbidden
1996
- */
1997
- 403: ErrorResponse;
1998
- /**
1999
- * Actor not found
2000
- */
2001
- 404: ErrorResponse;
2002
- };
2003
- type MergeActorTagsError = MergeActorTagsErrors[keyof MergeActorTagsErrors];
2004
- type MergeActorTagsResponses = {
2005
- /**
2006
- * Tags merged
2007
- */
2008
- 200: {
2009
- [key: string]: string;
2010
- };
2011
- };
2012
- type MergeActorTagsResponse = MergeActorTagsResponses[keyof MergeActorTagsResponses];
2013
- type ReplaceActorTagsData = {
2014
- body: {
2015
- [key: string]: string;
2016
- };
2017
- path: {
2018
- /**
2019
- * Actor ID
2020
- */
2021
- actor_id: string;
2022
- };
2023
- query?: never;
2024
- url: '/api/v1/actors/{actor_id}/tags';
2025
- };
2026
- type ReplaceActorTagsErrors = {
2027
- /**
2028
- * Unauthorized
2029
- */
2030
- 401: ErrorResponse;
2031
- /**
2032
- * Forbidden
2033
- */
2034
- 403: ErrorResponse;
2035
- /**
2036
- * Actor not found
2037
- */
2038
- 404: ErrorResponse;
2039
- };
2040
- type ReplaceActorTagsError = ReplaceActorTagsErrors[keyof ReplaceActorTagsErrors];
2041
- type ReplaceActorTagsResponses = {
2042
- /**
2043
- * Tags replaced
2044
- */
2045
- 200: {
2046
- [key: string]: string;
2047
- };
2048
- };
2049
- type ReplaceActorTagsResponse = ReplaceActorTagsResponses[keyof ReplaceActorTagsResponses];
2050
- type ValidateAgentFormationData = {
2051
- body: {
2052
- template: FormationTemplateInput;
2053
- };
2054
- path?: never;
2055
- query?: never;
2056
- url: '/api/v1/agent-formations/validate';
2057
- };
2058
- type ValidateAgentFormationErrors = {
2059
- /**
2060
- * Unauthorized
2061
- */
2062
- 401: unknown;
2063
- };
2064
- type ValidateAgentFormationResponses = {
2065
- /**
2066
- * Validation result
2067
- */
2068
- 200: ValidationResult;
2069
- };
2070
- type ValidateAgentFormationResponse = ValidateAgentFormationResponses[keyof ValidateAgentFormationResponses];
2071
- type PlanAgentFormationData = {
2072
- body: {
2073
- /**
2074
- * Project ID
2075
- */
2076
- project_id: string;
2077
- /**
2078
- * Existing formation ID to compare against. Omit for new formation planning.
2079
- */
2080
- formation_id?: string;
2081
- template: FormationTemplateInput;
2082
- /**
2083
- * Runtime parameter values that override or supply template parameter defaults. Keys must match parameter names declared in `template.parameters`.
2084
- *
2085
- */
2086
- parameters?: {
2087
- [key: string]: string;
2088
- } | null;
2089
- };
2090
- path?: never;
2091
- query?: never;
2092
- url: '/api/v1/agent-formations/plan';
2093
- };
2094
- type PlanAgentFormationErrors = {
2095
- /**
2096
- * Bad Request
2097
- */
2098
- 400: unknown;
2099
- /**
2100
- * Unauthorized
2101
- */
2102
- 401: unknown;
2103
- /**
2104
- * Forbidden
2105
- */
2106
- 403: unknown;
2107
- };
2108
- type PlanAgentFormationResponses = {
2109
- /**
2110
- * Plan result
2111
- */
2112
- 200: PlanResult;
2113
- };
2114
- type PlanAgentFormationResponse = PlanAgentFormationResponses[keyof PlanAgentFormationResponses];
2115
- type ListAgentFormationsData = {
2116
- body?: never;
2117
- path?: never;
2118
- query?: {
2119
- /**
2120
- * Project ID (required if not using project key auth)
2121
- */
2122
- project_id?: string;
2123
- };
2124
- url: '/api/v1/agent-formations';
2125
- };
2126
- type ListAgentFormationsErrors = {
2127
- /**
2128
- * Unauthorized
2129
- */
2130
- 401: unknown;
2131
- /**
2132
- * Forbidden
2133
- */
2134
- 403: unknown;
2135
- };
2136
- type ListAgentFormationsResponses = {
2137
- /**
2138
- * List of formations
2139
- */
2140
- 200: Array<AgentFormation>;
2141
- };
2142
- type ListAgentFormationsResponse = ListAgentFormationsResponses[keyof ListAgentFormationsResponses];
2143
- type CreateAgentFormationData = {
2144
- body: {
2145
- /**
2146
- * Project ID
2147
- */
2148
- project_id: string;
2149
- /**
2150
- * Human-readable name for the formation stack
2151
- */
2152
- name: string;
2153
- template: FormationTemplateInput;
2154
- /**
2155
- * Runtime parameter values that override or supply template parameter defaults. Keys must match parameter names declared in `template.parameters`. Required parameters (those without a default) must be provided here.
2156
- *
2157
- */
2158
- parameters?: {
2159
- [key: string]: string;
2160
- } | null;
2161
- metadata?: {
2162
- [key: string]: unknown;
2163
- } | null;
2164
- };
2165
- path?: never;
2166
- query?: never;
2167
- url: '/api/v1/agent-formations';
2168
- };
2169
- type CreateAgentFormationErrors = {
2170
- /**
2171
- * Bad Request
2172
- */
2173
- 400: unknown;
2174
- /**
2175
- * Unauthorized
2176
- */
2177
- 401: unknown;
2178
- /**
2179
- * Forbidden
2180
- */
2181
- 403: unknown;
2182
- /**
2183
- * Formation with this name already exists
2184
- */
2185
- 409: unknown;
2186
- };
2187
- type CreateAgentFormationResponses = {
2188
- /**
2189
- * Formation created
2190
- */
2191
- 201: AgentFormation;
2192
- };
2193
- type CreateAgentFormationResponse = CreateAgentFormationResponses[keyof CreateAgentFormationResponses];
2194
- type DeleteAgentFormationData = {
2195
- body?: never;
2196
- path: {
2197
- formation_id: string;
2198
- };
2199
- query?: never;
2200
- url: '/api/v1/agent-formations/{formation_id}';
2201
- };
2202
- type DeleteAgentFormationErrors = {
2203
- /**
2204
- * Unauthorized
2205
- */
2206
- 401: unknown;
2207
- /**
2208
- * Forbidden
2209
- */
2210
- 403: unknown;
2211
- /**
2212
- * Not Found
2213
- */
2214
- 404: unknown;
2215
- };
2216
- type DeleteAgentFormationResponses = {
2217
- /**
2218
- * Deleted
2219
- */
2220
- 204: void;
2221
- };
2222
- type DeleteAgentFormationResponse = DeleteAgentFormationResponses[keyof DeleteAgentFormationResponses];
2223
- type GetAgentFormationData = {
2224
- body?: never;
2225
- path: {
2226
- formation_id: string;
2227
- };
2228
- query?: never;
2229
- url: '/api/v1/agent-formations/{formation_id}';
2230
- };
2231
- type GetAgentFormationErrors = {
2232
- /**
2233
- * Unauthorized
2234
- */
2235
- 401: unknown;
2236
- /**
2237
- * Forbidden
2238
- */
2239
- 403: unknown;
2240
- /**
2241
- * Not Found
2242
- */
2243
- 404: unknown;
2244
- };
2245
- type GetAgentFormationResponses = {
2246
- /**
2247
- * Formation details
2248
- */
2249
- 200: AgentFormation;
2250
- };
2251
- type GetAgentFormationResponse = GetAgentFormationResponses[keyof GetAgentFormationResponses];
2252
- type UpdateAgentFormationData = {
2253
- body?: {
2254
- template?: FormationTemplateInput;
2255
- /**
2256
- * Runtime parameter values that override or supply template parameter defaults. Keys must match parameter names declared in `template.parameters`. Required parameters (those without a default) must be provided here.
2257
- *
2258
- */
2259
- parameters?: {
2260
- [key: string]: string;
2261
- } | null;
2262
- metadata?: {
2263
- [key: string]: unknown;
2264
- } | null;
2465
+ type GetActorTagsResponse = GetActorTagsResponses[keyof GetActorTagsResponses];
2466
+ type MergeActorTagsData = {
2467
+ body: {
2468
+ [key: string]: string;
2265
2469
  };
2266
2470
  path: {
2267
- formation_id: string;
2471
+ /**
2472
+ * Actor ID
2473
+ */
2474
+ actor_id: string;
2268
2475
  };
2269
2476
  query?: never;
2270
- url: '/api/v1/agent-formations/{formation_id}';
2477
+ url: '/api/v1/actors/{actor_id}/tags';
2271
2478
  };
2272
- type UpdateAgentFormationErrors = {
2273
- /**
2274
- * Bad Request
2275
- */
2276
- 400: unknown;
2479
+ type MergeActorTagsErrors = {
2277
2480
  /**
2278
2481
  * Unauthorized
2279
2482
  */
2280
- 401: unknown;
2483
+ 401: ErrorResponse;
2281
2484
  /**
2282
2485
  * Forbidden
2283
2486
  */
2284
- 403: unknown;
2487
+ 403: ErrorResponse;
2285
2488
  /**
2286
- * Not Found
2489
+ * Actor not found
2287
2490
  */
2288
- 404: unknown;
2491
+ 404: ErrorResponse;
2289
2492
  };
2290
- type UpdateAgentFormationResponses = {
2493
+ type MergeActorTagsError = MergeActorTagsErrors[keyof MergeActorTagsErrors];
2494
+ type MergeActorTagsResponses = {
2291
2495
  /**
2292
- * Updated formation
2496
+ * Tags merged
2293
2497
  */
2294
- 200: AgentFormation;
2498
+ 200: {
2499
+ [key: string]: string;
2500
+ };
2295
2501
  };
2296
- type UpdateAgentFormationResponse = UpdateAgentFormationResponses[keyof UpdateAgentFormationResponses];
2297
- type ListAgentFormationEventsData = {
2298
- body?: never;
2502
+ type MergeActorTagsResponse = MergeActorTagsResponses[keyof MergeActorTagsResponses];
2503
+ type ReplaceActorTagsData = {
2504
+ body: {
2505
+ [key: string]: string;
2506
+ };
2299
2507
  path: {
2300
- formation_id: string;
2508
+ /**
2509
+ * Actor ID
2510
+ */
2511
+ actor_id: string;
2301
2512
  };
2302
2513
  query?: never;
2303
- url: '/api/v1/agent-formations/{formation_id}/events';
2514
+ url: '/api/v1/actors/{actor_id}/tags';
2304
2515
  };
2305
- type ListAgentFormationEventsErrors = {
2516
+ type ReplaceActorTagsErrors = {
2306
2517
  /**
2307
2518
  * Unauthorized
2308
2519
  */
2309
- 401: unknown;
2520
+ 401: ErrorResponse;
2310
2521
  /**
2311
2522
  * Forbidden
2312
2523
  */
2313
- 403: unknown;
2524
+ 403: ErrorResponse;
2314
2525
  /**
2315
- * Not Found
2526
+ * Actor not found
2316
2527
  */
2317
- 404: unknown;
2528
+ 404: ErrorResponse;
2318
2529
  };
2319
- type ListAgentFormationEventsResponses = {
2530
+ type ReplaceActorTagsError = ReplaceActorTagsErrors[keyof ReplaceActorTagsErrors];
2531
+ type ReplaceActorTagsResponses = {
2320
2532
  /**
2321
- * List of operations
2533
+ * Tags replaced
2322
2534
  */
2323
- 200: Array<FormationOperation>;
2535
+ 200: {
2536
+ [key: string]: string;
2537
+ };
2324
2538
  };
2325
- type ListAgentFormationEventsResponse = ListAgentFormationEventsResponses[keyof ListAgentFormationEventsResponses];
2539
+ type ReplaceActorTagsResponse = ReplaceActorTagsResponses[keyof ReplaceActorTagsResponses];
2326
2540
  type ListAgentToolsData = {
2327
2541
  body?: never;
2328
2542
  path?: never;
@@ -3011,151 +3225,387 @@ type CreateApiKeyData = {
3011
3225
  */
3012
3226
  policy_ids?: Array<string>;
3013
3227
  };
3014
- path?: never;
3228
+ path?: never;
3229
+ query?: never;
3230
+ url: '/api/v1/api-keys';
3231
+ };
3232
+ type CreateApiKeyErrors = {
3233
+ /**
3234
+ * Bad request (missing name, invalid project or policy IDs)
3235
+ */
3236
+ 400: ErrorResponse;
3237
+ /**
3238
+ * Unauthorized
3239
+ */
3240
+ 401: unknown;
3241
+ };
3242
+ type CreateApiKeyError = CreateApiKeyErrors[keyof CreateApiKeyErrors];
3243
+ type CreateApiKeyResponses = {
3244
+ /**
3245
+ * API key created successfully. The raw key value is only returned once.
3246
+ */
3247
+ 201: ApiKeyCreated;
3248
+ };
3249
+ type CreateApiKeyResponse = CreateApiKeyResponses[keyof CreateApiKeyResponses];
3250
+ type DeleteApiKeyData = {
3251
+ body?: never;
3252
+ path: {
3253
+ /**
3254
+ * API key public ID (key_ prefix)
3255
+ */
3256
+ api_key_id: string;
3257
+ };
3258
+ query?: never;
3259
+ url: '/api/v1/api-keys/{api_key_id}';
3260
+ };
3261
+ type DeleteApiKeyErrors = {
3262
+ /**
3263
+ * Unauthorized
3264
+ */
3265
+ 401: unknown;
3266
+ /**
3267
+ * Forbidden (not the key owner or admin)
3268
+ */
3269
+ 403: unknown;
3270
+ /**
3271
+ * API key not found
3272
+ */
3273
+ 404: unknown;
3274
+ };
3275
+ type DeleteApiKeyResponses = {
3276
+ /**
3277
+ * API key deleted successfully
3278
+ */
3279
+ 204: void;
3280
+ };
3281
+ type DeleteApiKeyResponse = DeleteApiKeyResponses[keyof DeleteApiKeyResponses];
3282
+ type GetApiKeyData = {
3283
+ body?: never;
3284
+ path: {
3285
+ /**
3286
+ * API key public ID (key_ prefix)
3287
+ */
3288
+ api_key_id: string;
3289
+ };
3290
+ query?: never;
3291
+ url: '/api/v1/api-keys/{api_key_id}';
3292
+ };
3293
+ type GetApiKeyErrors = {
3294
+ /**
3295
+ * Unauthorized
3296
+ */
3297
+ 401: unknown;
3298
+ /**
3299
+ * Forbidden (not the key owner or admin)
3300
+ */
3301
+ 403: unknown;
3302
+ /**
3303
+ * API key not found
3304
+ */
3305
+ 404: unknown;
3306
+ };
3307
+ type GetApiKeyResponses = {
3308
+ /**
3309
+ * API key details
3310
+ */
3311
+ 200: ApiKeyRecord;
3312
+ };
3313
+ type GetApiKeyResponse = GetApiKeyResponses[keyof GetApiKeyResponses];
3314
+ type UpdateApiKeyData = {
3315
+ body: {
3316
+ name?: string;
3317
+ /**
3318
+ * Set to null to remove project scope
3319
+ */
3320
+ project_id?: string | null;
3321
+ /**
3322
+ * Replace the key's policy list (empty array removes all)
3323
+ */
3324
+ policy_ids?: Array<string>;
3325
+ };
3326
+ path: {
3327
+ /**
3328
+ * API key public ID (key_ prefix)
3329
+ */
3330
+ api_key_id: string;
3331
+ };
3332
+ query?: never;
3333
+ url: '/api/v1/api-keys/{api_key_id}';
3334
+ };
3335
+ type UpdateApiKeyErrors = {
3336
+ /**
3337
+ * Bad request (invalid project or policy IDs)
3338
+ */
3339
+ 400: ErrorResponse;
3340
+ /**
3341
+ * Unauthorized
3342
+ */
3343
+ 401: unknown;
3344
+ /**
3345
+ * Forbidden (not the key owner or admin)
3346
+ */
3347
+ 403: unknown;
3348
+ /**
3349
+ * API key not found
3350
+ */
3351
+ 404: unknown;
3352
+ };
3353
+ type UpdateApiKeyError = UpdateApiKeyErrors[keyof UpdateApiKeyErrors];
3354
+ type UpdateApiKeyResponses = {
3355
+ /**
3356
+ * API key updated successfully
3357
+ */
3358
+ 200: ApiKeyRecord;
3359
+ };
3360
+ type UpdateApiKeyResponse = UpdateApiKeyResponses[keyof UpdateApiKeyResponses];
3361
+ type ListChatsData = {
3362
+ body?: never;
3363
+ path?: never;
3364
+ query?: {
3365
+ /**
3366
+ * Project public ID to filter by
3367
+ */
3368
+ project_id?: string;
3369
+ };
3370
+ url: '/api/v1/chats';
3371
+ };
3372
+ type ListChatsErrors = {
3373
+ /**
3374
+ * Unauthorized
3375
+ */
3376
+ 401: ErrorResponse;
3377
+ /**
3378
+ * Forbidden
3379
+ */
3380
+ 403: ErrorResponse;
3381
+ };
3382
+ type ListChatsError = ListChatsErrors[keyof ListChatsErrors];
3383
+ type ListChatsResponses = {
3384
+ /**
3385
+ * List of chats
3386
+ */
3387
+ 200: Array<Chat>;
3388
+ };
3389
+ type ListChatsResponse = ListChatsResponses[keyof ListChatsResponses];
3390
+ type CreateChatData = {
3391
+ body: CreateChatRequest;
3392
+ path?: never;
3393
+ query?: never;
3394
+ url: '/api/v1/chats';
3395
+ };
3396
+ type CreateChatErrors = {
3397
+ /**
3398
+ * Bad Request
3399
+ */
3400
+ 400: ErrorResponse;
3401
+ /**
3402
+ * Unauthorized
3403
+ */
3404
+ 401: ErrorResponse;
3405
+ /**
3406
+ * Forbidden
3407
+ */
3408
+ 403: ErrorResponse;
3409
+ /**
3410
+ * AI provider not found
3411
+ */
3412
+ 404: ErrorResponse;
3413
+ };
3414
+ type CreateChatError = CreateChatErrors[keyof CreateChatErrors];
3415
+ type CreateChatResponses = {
3416
+ /**
3417
+ * Chat created
3418
+ */
3419
+ 201: Chat;
3420
+ };
3421
+ type CreateChatResponse = CreateChatResponses[keyof CreateChatResponses];
3422
+ type DeleteChatData = {
3423
+ body?: never;
3424
+ path: {
3425
+ chat_id: string;
3426
+ };
3015
3427
  query?: never;
3016
- url: '/api/v1/api-keys';
3428
+ url: '/api/v1/chats/{chat_id}';
3017
3429
  };
3018
- type CreateApiKeyErrors = {
3430
+ type DeleteChatErrors = {
3019
3431
  /**
3020
- * Bad request (missing name, invalid project or policy IDs)
3432
+ * Unauthorized
3021
3433
  */
3022
- 400: ErrorResponse;
3434
+ 401: ErrorResponse;
3023
3435
  /**
3024
- * Unauthorized
3436
+ * Chat not found
3025
3437
  */
3026
- 401: unknown;
3438
+ 404: ErrorResponse;
3027
3439
  };
3028
- type CreateApiKeyError = CreateApiKeyErrors[keyof CreateApiKeyErrors];
3029
- type CreateApiKeyResponses = {
3440
+ type DeleteChatError = DeleteChatErrors[keyof DeleteChatErrors];
3441
+ type DeleteChatResponses = {
3030
3442
  /**
3031
- * API key created successfully. The raw key value is only returned once.
3443
+ * Chat deleted
3032
3444
  */
3033
- 201: ApiKeyCreated;
3445
+ 204: void;
3034
3446
  };
3035
- type CreateApiKeyResponse = CreateApiKeyResponses[keyof CreateApiKeyResponses];
3036
- type DeleteApiKeyData = {
3447
+ type DeleteChatResponse = DeleteChatResponses[keyof DeleteChatResponses];
3448
+ type GetChatData = {
3037
3449
  body?: never;
3038
3450
  path: {
3039
- /**
3040
- * API key public ID (key_ prefix)
3041
- */
3042
- api_key_id: string;
3451
+ chat_id: string;
3043
3452
  };
3044
3453
  query?: never;
3045
- url: '/api/v1/api-keys/{api_key_id}';
3454
+ url: '/api/v1/chats/{chat_id}';
3046
3455
  };
3047
- type DeleteApiKeyErrors = {
3456
+ type GetChatErrors = {
3048
3457
  /**
3049
3458
  * Unauthorized
3050
3459
  */
3051
- 401: unknown;
3052
- /**
3053
- * Forbidden (not the key owner or admin)
3054
- */
3055
- 403: unknown;
3460
+ 401: ErrorResponse;
3056
3461
  /**
3057
- * API key not found
3462
+ * Chat not found
3058
3463
  */
3059
- 404: unknown;
3464
+ 404: ErrorResponse;
3060
3465
  };
3061
- type DeleteApiKeyResponses = {
3466
+ type GetChatError = GetChatErrors[keyof GetChatErrors];
3467
+ type GetChatResponses = {
3062
3468
  /**
3063
- * API key deleted successfully
3469
+ * Chat record
3064
3470
  */
3065
- 204: void;
3471
+ 200: Chat;
3066
3472
  };
3067
- type DeleteApiKeyResponse = DeleteApiKeyResponses[keyof DeleteApiKeyResponses];
3068
- type GetApiKeyData = {
3069
- body?: never;
3473
+ type GetChatResponse = GetChatResponses[keyof GetChatResponses];
3474
+ type CreateChatCompletionForChatData = {
3475
+ body: ChatCompletionForChatRequest;
3070
3476
  path: {
3071
- /**
3072
- * API key public ID (key_ prefix)
3073
- */
3074
- api_key_id: string;
3477
+ chat_id: string;
3075
3478
  };
3076
3479
  query?: never;
3077
- url: '/api/v1/api-keys/{api_key_id}';
3480
+ url: '/api/v1/chats/{chat_id}/completions';
3078
3481
  };
3079
- type GetApiKeyErrors = {
3482
+ type CreateChatCompletionForChatErrors = {
3483
+ /**
3484
+ * Bad Request
3485
+ */
3486
+ 400: ErrorResponse;
3080
3487
  /**
3081
3488
  * Unauthorized
3082
3489
  */
3083
- 401: unknown;
3490
+ 401: ErrorResponse;
3084
3491
  /**
3085
- * Forbidden (not the key owner or admin)
3492
+ * Chat or AI provider not found
3086
3493
  */
3087
- 403: unknown;
3494
+ 404: ErrorResponse;
3495
+ };
3496
+ type CreateChatCompletionForChatError = CreateChatCompletionForChatErrors[keyof CreateChatCompletionForChatErrors];
3497
+ type CreateChatCompletionForChatResponses = {
3088
3498
  /**
3089
- * API key not found
3499
+ * Chat completion result (JSON or SSE stream)
3090
3500
  */
3091
- 404: unknown;
3501
+ 200: ChatCompletionResponse;
3092
3502
  };
3093
- type GetApiKeyResponses = {
3503
+ type CreateChatCompletionForChatResponse = CreateChatCompletionForChatResponses[keyof CreateChatCompletionForChatResponses];
3504
+ type CreateChatCompletionData = {
3505
+ body: ChatCompletionRequest;
3506
+ path?: never;
3507
+ query?: never;
3508
+ url: '/api/v1/chats/completions';
3509
+ };
3510
+ type CreateChatCompletionErrors = {
3094
3511
  /**
3095
- * API key details
3512
+ * Bad Request — `messages` is missing or empty, or `ai_provider_id` is missing
3096
3513
  */
3097
- 200: ApiKeyRecord;
3514
+ 400: ErrorResponse;
3515
+ /**
3516
+ * Unauthorized — missing or invalid bearer token
3517
+ */
3518
+ 401: ErrorResponse;
3519
+ /**
3520
+ * AI provider not found
3521
+ */
3522
+ 404: ErrorResponse;
3098
3523
  };
3099
- type GetApiKeyResponse = GetApiKeyResponses[keyof GetApiKeyResponses];
3100
- type UpdateApiKeyData = {
3524
+ type CreateChatCompletionError = CreateChatCompletionErrors[keyof CreateChatCompletionErrors];
3525
+ type CreateChatCompletionResponses = {
3526
+ /**
3527
+ * Chat completion result (JSON or SSE stream)
3528
+ */
3529
+ 200: ChatCompletionResponse;
3530
+ };
3531
+ type CreateChatCompletionResponse = CreateChatCompletionResponses[keyof CreateChatCompletionResponses];
3532
+ type CreateChatActorData = {
3101
3533
  body: {
3102
- name?: string;
3534
+ name: string;
3103
3535
  /**
3104
- * Set to null to remove project scope
3536
+ * Optional actor type
3105
3537
  */
3106
- project_id?: string | null;
3538
+ type?: string;
3107
3539
  /**
3108
- * Replace the key's policy list (empty array removes all)
3540
+ * Optional external identifier
3109
3541
  */
3110
- policy_ids?: Array<string>;
3542
+ external_id?: string;
3543
+ tags?: {
3544
+ [key: string]: string;
3545
+ };
3111
3546
  };
3112
3547
  path: {
3113
3548
  /**
3114
- * API key public ID (key_ prefix)
3549
+ * Chat ID
3115
3550
  */
3116
- api_key_id: string;
3551
+ chat_id: string;
3117
3552
  };
3118
3553
  query?: never;
3119
- url: '/api/v1/api-keys/{api_key_id}';
3554
+ url: '/api/v1/chats/{chat_id}/actors';
3120
3555
  };
3121
- type UpdateApiKeyErrors = {
3556
+ type CreateChatActorErrors = {
3122
3557
  /**
3123
- * Bad request (invalid project or policy IDs)
3558
+ * Bad request
3124
3559
  */
3125
3560
  400: ErrorResponse;
3126
3561
  /**
3127
3562
  * Unauthorized
3128
3563
  */
3129
- 401: unknown;
3564
+ 401: ErrorResponse;
3130
3565
  /**
3131
- * Forbidden (not the key owner or admin)
3566
+ * Forbidden
3132
3567
  */
3133
- 403: unknown;
3568
+ 403: ErrorResponse;
3134
3569
  /**
3135
- * API key not found
3570
+ * Chat not found
3136
3571
  */
3137
- 404: unknown;
3572
+ 404: ErrorResponse;
3138
3573
  };
3139
- type UpdateApiKeyError = UpdateApiKeyErrors[keyof UpdateApiKeyErrors];
3140
- type UpdateApiKeyResponses = {
3574
+ type CreateChatActorError = CreateChatActorErrors[keyof CreateChatActorErrors];
3575
+ type CreateChatActorResponses = {
3141
3576
  /**
3142
- * API key updated successfully
3577
+ * Actor created
3143
3578
  */
3144
- 200: ApiKeyRecord;
3579
+ 201: {
3580
+ id?: string;
3581
+ name?: string;
3582
+ };
3145
3583
  };
3146
- type UpdateApiKeyResponse = UpdateApiKeyResponses[keyof UpdateApiKeyResponses];
3147
- type ListChatsData = {
3584
+ type CreateChatActorResponse = CreateChatActorResponses[keyof CreateChatActorResponses];
3585
+ type ListConversationsData = {
3148
3586
  body?: never;
3149
3587
  path?: never;
3150
3588
  query?: {
3151
3589
  /**
3152
- * Project public ID to filter by
3590
+ * Project ID (optional)
3153
3591
  */
3154
3592
  project_id?: string;
3593
+ /**
3594
+ * Filter by actor ID
3595
+ */
3596
+ actor_id?: string;
3597
+ /**
3598
+ * Maximum number of results to return
3599
+ */
3600
+ limit?: number;
3601
+ /**
3602
+ * Number of results to skip
3603
+ */
3604
+ offset?: number;
3155
3605
  };
3156
- url: '/api/v1/chats';
3606
+ url: '/api/v1/conversations';
3157
3607
  };
3158
- type ListChatsErrors = {
3608
+ type ListConversationsErrors = {
3159
3609
  /**
3160
3610
  * Unauthorized
3161
3611
  */
@@ -3165,23 +3615,45 @@ type ListChatsErrors = {
3165
3615
  */
3166
3616
  403: ErrorResponse;
3167
3617
  };
3168
- type ListChatsError = ListChatsErrors[keyof ListChatsErrors];
3169
- type ListChatsResponses = {
3618
+ type ListConversationsError = ListConversationsErrors[keyof ListConversationsErrors];
3619
+ type ListConversationsResponses = {
3170
3620
  /**
3171
- * List of chats
3621
+ * List of conversations
3172
3622
  */
3173
- 200: Array<Chat>;
3623
+ 200: {
3624
+ data?: Array<ConversationRecord>;
3625
+ total?: number;
3626
+ limit?: number;
3627
+ offset?: number;
3628
+ };
3174
3629
  };
3175
- type ListChatsResponse = ListChatsResponses[keyof ListChatsResponses];
3176
- type CreateChatData = {
3177
- body: CreateChatRequest;
3630
+ type ListConversationsResponse = ListConversationsResponses[keyof ListConversationsResponses];
3631
+ type CreateConversationData = {
3632
+ body: {
3633
+ /**
3634
+ * Project ID. Required for JWT auth; omit when using an project key.
3635
+ */
3636
+ project_id?: string;
3637
+ /**
3638
+ * Initial conversation status
3639
+ */
3640
+ status?: 'open' | 'closed';
3641
+ /**
3642
+ * Optional name for the conversation
3643
+ */
3644
+ name?: string | null;
3645
+ /**
3646
+ * Actor ID to associate with this conversation
3647
+ */
3648
+ actor_id?: string | null;
3649
+ };
3178
3650
  path?: never;
3179
3651
  query?: never;
3180
- url: '/api/v1/chats';
3652
+ url: '/api/v1/conversations';
3181
3653
  };
3182
- type CreateChatErrors = {
3654
+ type CreateConversationErrors = {
3183
3655
  /**
3184
- * Bad Request
3656
+ * Invalid request body
3185
3657
  */
3186
3658
  400: ErrorResponse;
3187
3659
  /**
@@ -3192,82 +3664,100 @@ type CreateChatErrors = {
3192
3664
  * Forbidden
3193
3665
  */
3194
3666
  403: ErrorResponse;
3195
- /**
3196
- * AI provider not found
3197
- */
3198
- 404: ErrorResponse;
3199
3667
  };
3200
- type CreateChatError = CreateChatErrors[keyof CreateChatErrors];
3201
- type CreateChatResponses = {
3668
+ type CreateConversationError = CreateConversationErrors[keyof CreateConversationErrors];
3669
+ type CreateConversationResponses = {
3202
3670
  /**
3203
- * Chat created
3671
+ * Conversation created
3204
3672
  */
3205
- 201: Chat;
3673
+ 201: ConversationRecord;
3206
3674
  };
3207
- type CreateChatResponse = CreateChatResponses[keyof CreateChatResponses];
3208
- type DeleteChatData = {
3675
+ type CreateConversationResponse = CreateConversationResponses[keyof CreateConversationResponses];
3676
+ type DeleteConversationData = {
3209
3677
  body?: never;
3210
3678
  path: {
3211
- chat_id: string;
3679
+ /**
3680
+ * Conversation ID
3681
+ */
3682
+ conversation_id: string;
3212
3683
  };
3213
3684
  query?: never;
3214
- url: '/api/v1/chats/{chat_id}';
3685
+ url: '/api/v1/conversations/{conversation_id}';
3215
3686
  };
3216
- type DeleteChatErrors = {
3687
+ type DeleteConversationErrors = {
3217
3688
  /**
3218
3689
  * Unauthorized
3219
3690
  */
3220
3691
  401: ErrorResponse;
3221
3692
  /**
3222
- * Chat not found
3693
+ * Forbidden
3694
+ */
3695
+ 403: ErrorResponse;
3696
+ /**
3697
+ * Conversation not found
3223
3698
  */
3224
3699
  404: ErrorResponse;
3225
3700
  };
3226
- type DeleteChatError = DeleteChatErrors[keyof DeleteChatErrors];
3227
- type DeleteChatResponses = {
3701
+ type DeleteConversationError = DeleteConversationErrors[keyof DeleteConversationErrors];
3702
+ type DeleteConversationResponses = {
3228
3703
  /**
3229
- * Chat deleted
3704
+ * Conversation deleted
3230
3705
  */
3231
3706
  204: void;
3232
3707
  };
3233
- type DeleteChatResponse = DeleteChatResponses[keyof DeleteChatResponses];
3234
- type GetChatData = {
3708
+ type DeleteConversationResponse = DeleteConversationResponses[keyof DeleteConversationResponses];
3709
+ type GetConversationData = {
3235
3710
  body?: never;
3236
3711
  path: {
3237
- chat_id: string;
3712
+ /**
3713
+ * Conversation ID
3714
+ */
3715
+ conversation_id: string;
3238
3716
  };
3239
3717
  query?: never;
3240
- url: '/api/v1/chats/{chat_id}';
3718
+ url: '/api/v1/conversations/{conversation_id}';
3241
3719
  };
3242
- type GetChatErrors = {
3720
+ type GetConversationErrors = {
3243
3721
  /**
3244
3722
  * Unauthorized
3245
3723
  */
3246
3724
  401: ErrorResponse;
3247
3725
  /**
3248
- * Chat not found
3726
+ * Forbidden
3727
+ */
3728
+ 403: ErrorResponse;
3729
+ /**
3730
+ * Conversation not found
3249
3731
  */
3250
3732
  404: ErrorResponse;
3251
3733
  };
3252
- type GetChatError = GetChatErrors[keyof GetChatErrors];
3253
- type GetChatResponses = {
3734
+ type GetConversationError = GetConversationErrors[keyof GetConversationErrors];
3735
+ type GetConversationResponses = {
3254
3736
  /**
3255
- * Chat record
3737
+ * Conversation found
3256
3738
  */
3257
- 200: Chat;
3739
+ 200: ConversationRecord;
3258
3740
  };
3259
- type GetChatResponse = GetChatResponses[keyof GetChatResponses];
3260
- type CreateChatCompletionForChatData = {
3261
- body: ChatCompletionForChatRequest;
3741
+ type GetConversationResponse = GetConversationResponses[keyof GetConversationResponses];
3742
+ type UpdateConversationData = {
3743
+ body: {
3744
+ /**
3745
+ * New conversation status
3746
+ */
3747
+ status: 'open' | 'closed';
3748
+ };
3262
3749
  path: {
3263
- chat_id: string;
3750
+ /**
3751
+ * Conversation ID
3752
+ */
3753
+ conversation_id: string;
3264
3754
  };
3265
3755
  query?: never;
3266
- url: '/api/v1/chats/{chat_id}/completions';
3756
+ url: '/api/v1/conversations/{conversation_id}';
3267
3757
  };
3268
- type CreateChatCompletionForChatErrors = {
3758
+ type UpdateConversationErrors = {
3269
3759
  /**
3270
- * Bad Request
3760
+ * Invalid request body
3271
3761
  */
3272
3762
  400: ErrorResponse;
3273
3763
  /**
@@ -3275,73 +3765,106 @@ type CreateChatCompletionForChatErrors = {
3275
3765
  */
3276
3766
  401: ErrorResponse;
3277
3767
  /**
3278
- * Chat or AI provider not found
3768
+ * Forbidden
3769
+ */
3770
+ 403: ErrorResponse;
3771
+ /**
3772
+ * Conversation not found
3279
3773
  */
3280
3774
  404: ErrorResponse;
3281
3775
  };
3282
- type CreateChatCompletionForChatError = CreateChatCompletionForChatErrors[keyof CreateChatCompletionForChatErrors];
3283
- type CreateChatCompletionForChatResponses = {
3776
+ type UpdateConversationError = UpdateConversationErrors[keyof UpdateConversationErrors];
3777
+ type UpdateConversationResponses = {
3284
3778
  /**
3285
- * Chat completion result (JSON or SSE stream)
3779
+ * Conversation updated
3286
3780
  */
3287
- 200: ChatCompletionResponse;
3781
+ 200: ConversationRecord;
3288
3782
  };
3289
- type CreateChatCompletionForChatResponse = CreateChatCompletionForChatResponses[keyof CreateChatCompletionForChatResponses];
3290
- type CreateChatCompletionData = {
3291
- body: ChatCompletionRequest;
3292
- path?: never;
3293
- query?: never;
3294
- url: '/api/v1/chats/completions';
3783
+ type UpdateConversationResponse = UpdateConversationResponses[keyof UpdateConversationResponses];
3784
+ type ListConversationMessagesData = {
3785
+ body?: never;
3786
+ path: {
3787
+ /**
3788
+ * Conversation ID
3789
+ */
3790
+ conversation_id: string;
3791
+ };
3792
+ query?: {
3793
+ /**
3794
+ * Maximum number of results to return
3795
+ */
3796
+ limit?: number;
3797
+ /**
3798
+ * Number of results to skip
3799
+ */
3800
+ offset?: number;
3801
+ };
3802
+ url: '/api/v1/conversations/{conversation_id}/messages';
3295
3803
  };
3296
- type CreateChatCompletionErrors = {
3804
+ type ListConversationMessagesErrors = {
3297
3805
  /**
3298
- * Bad Request — `messages` is missing or empty, or `ai_provider_id` is missing
3806
+ * Unauthorized
3299
3807
  */
3300
- 400: ErrorResponse;
3808
+ 401: ErrorResponse;
3301
3809
  /**
3302
- * Unauthorized — missing or invalid bearer token
3810
+ * Forbidden
3303
3811
  */
3304
- 401: ErrorResponse;
3812
+ 403: ErrorResponse;
3305
3813
  /**
3306
- * AI provider not found
3814
+ * Conversation not found
3307
3815
  */
3308
3816
  404: ErrorResponse;
3309
3817
  };
3310
- type CreateChatCompletionError = CreateChatCompletionErrors[keyof CreateChatCompletionErrors];
3311
- type CreateChatCompletionResponses = {
3818
+ type ListConversationMessagesError = ListConversationMessagesErrors[keyof ListConversationMessagesErrors];
3819
+ type ListConversationMessagesResponses = {
3312
3820
  /**
3313
- * Chat completion result (JSON or SSE stream)
3821
+ * List of messages
3314
3822
  */
3315
- 200: ChatCompletionResponse;
3823
+ 200: {
3824
+ data?: Array<ConversationMessageRecord>;
3825
+ total?: number;
3826
+ limit?: number;
3827
+ offset?: number;
3828
+ };
3316
3829
  };
3317
- type CreateChatCompletionResponse = CreateChatCompletionResponses[keyof CreateChatCompletionResponses];
3318
- type CreateChatActorData = {
3830
+ type ListConversationMessagesResponse = ListConversationMessagesResponses[keyof ListConversationMessagesResponses];
3831
+ type AddConversationMessageData = {
3319
3832
  body: {
3320
- name: string;
3321
3833
  /**
3322
- * Optional actor type
3834
+ * Message text content to add to the conversation
3323
3835
  */
3324
- type?: string;
3836
+ message: string;
3325
3837
  /**
3326
- * Optional external identifier
3838
+ * Role of the message sender
3327
3839
  */
3328
- external_id?: string;
3329
- tags?: {
3330
- [key: string]: string;
3331
- };
3840
+ role: 'user' | 'assistant' | 'system';
3841
+ /**
3842
+ * Optional actor ID to associate with this message (user identity)
3843
+ */
3844
+ actor_id?: string | null;
3845
+ /**
3846
+ * Zero-based position. Defaults to MAX+1 (append).
3847
+ */
3848
+ position?: number;
3849
+ /**
3850
+ * Optional structured metadata to attach to the message (e.g. phone number, channel). Stored as-is and injected into the AI prompt context.
3851
+ */
3852
+ metadata?: {
3853
+ [key: string]: unknown;
3854
+ } | null;
3332
3855
  };
3333
3856
  path: {
3334
3857
  /**
3335
- * Chat ID
3858
+ * Conversation ID
3336
3859
  */
3337
- chat_id: string;
3860
+ conversation_id: string;
3338
3861
  };
3339
3862
  query?: never;
3340
- url: '/api/v1/chats/{chat_id}/actors';
3863
+ url: '/api/v1/conversations/{conversation_id}/messages';
3341
3864
  };
3342
- type CreateChatActorErrors = {
3865
+ type AddConversationMessageErrors = {
3343
3866
  /**
3344
- * Bad request
3867
+ * Invalid request body
3345
3868
  */
3346
3869
  400: ErrorResponse;
3347
3870
  /**
@@ -3353,45 +3876,50 @@ type CreateChatActorErrors = {
3353
3876
  */
3354
3877
  403: ErrorResponse;
3355
3878
  /**
3356
- * Chat not found
3879
+ * Conversation or actor not found
3357
3880
  */
3358
3881
  404: ErrorResponse;
3359
3882
  };
3360
- type CreateChatActorError = CreateChatActorErrors[keyof CreateChatActorErrors];
3361
- type CreateChatActorResponses = {
3883
+ type AddConversationMessageError = AddConversationMessageErrors[keyof AddConversationMessageErrors];
3884
+ type AddConversationMessageResponses = {
3362
3885
  /**
3363
- * Actor created
3886
+ * Message added
3364
3887
  */
3365
- 201: {
3366
- id?: string;
3367
- name?: string;
3368
- };
3888
+ 201: ConversationMessageRecord;
3369
3889
  };
3370
- type CreateChatActorResponse = CreateChatActorResponses[keyof CreateChatActorResponses];
3371
- type ListConversationsData = {
3372
- body?: never;
3373
- path?: never;
3374
- query?: {
3890
+ type AddConversationMessageResponse = AddConversationMessageResponses[keyof AddConversationMessageResponses];
3891
+ type GenerateConversationMessageData = {
3892
+ body: {
3375
3893
  /**
3376
- * Project ID (optional)
3894
+ * ID of the agent that will produce the next message.
3377
3895
  */
3378
- project_id?: string;
3896
+ agent_id: string;
3379
3897
  /**
3380
- * Filter by actor ID
3898
+ * Optional model override.
3381
3899
  */
3382
- actor_id?: string;
3900
+ model?: string;
3383
3901
  /**
3384
- * Maximum number of results to return
3902
+ * If true, stream tokens via SSE. NOT IMPLEMENTED in v1 — returns 501.
3385
3903
  */
3386
- limit?: number;
3904
+ stream?: boolean;
3387
3905
  /**
3388
- * Number of results to skip
3906
+ * Key-value pairs injected as context headers into all tool call requests made during this generation.
3389
3907
  */
3390
- offset?: number;
3908
+ tool_context?: {
3909
+ [key: string]: string;
3910
+ } | null;
3391
3911
  };
3392
- url: '/api/v1/conversations';
3912
+ path: {
3913
+ conversation_id: string;
3914
+ };
3915
+ query?: never;
3916
+ url: '/api/v1/conversations/{conversation_id}/generate';
3393
3917
  };
3394
- type ListConversationsErrors = {
3918
+ type GenerateConversationMessageErrors = {
3919
+ /**
3920
+ * Invalid request
3921
+ */
3922
+ 400: ErrorResponse;
3395
3923
  /**
3396
3924
  * Unauthorized
3397
3925
  */
@@ -3400,48 +3928,35 @@ type ListConversationsErrors = {
3400
3928
  * Forbidden
3401
3929
  */
3402
3930
  403: ErrorResponse;
3931
+ /**
3932
+ * Conversation or actor not found
3933
+ */
3934
+ 404: ErrorResponse;
3935
+ /**
3936
+ * Streaming not implemented
3937
+ */
3938
+ 501: ErrorResponse;
3403
3939
  };
3404
- type ListConversationsError = ListConversationsErrors[keyof ListConversationsErrors];
3405
- type ListConversationsResponses = {
3940
+ type GenerateConversationMessageError = GenerateConversationMessageErrors[keyof GenerateConversationMessageErrors];
3941
+ type GenerateConversationMessageResponses = {
3406
3942
  /**
3407
- * List of conversations
3943
+ * Generation completed or requires action
3408
3944
  */
3409
- 200: {
3410
- data?: Array<ConversationRecord>;
3411
- total?: number;
3412
- limit?: number;
3413
- offset?: number;
3414
- };
3945
+ 200: GenerateConversationMessageResponse;
3415
3946
  };
3416
- type ListConversationsResponse = ListConversationsResponses[keyof ListConversationsResponses];
3417
- type CreateConversationData = {
3418
- body: {
3419
- /**
3420
- * Project ID. Required for JWT auth; omit when using an project key.
3421
- */
3422
- project_id?: string;
3423
- /**
3424
- * Initial conversation status
3425
- */
3426
- status?: 'open' | 'closed';
3427
- /**
3428
- * Optional name for the conversation
3429
- */
3430
- name?: string | null;
3947
+ type GenerateConversationMessageResponse2 = GenerateConversationMessageResponses[keyof GenerateConversationMessageResponses];
3948
+ type ListConversationActorsData = {
3949
+ body?: never;
3950
+ path: {
3431
3951
  /**
3432
- * Actor ID to associate with this conversation
3952
+ * Conversation ID
3433
3953
  */
3434
- actor_id?: string | null;
3954
+ conversation_id: string;
3435
3955
  };
3436
- path?: never;
3437
3956
  query?: never;
3438
- url: '/api/v1/conversations';
3957
+ url: '/api/v1/conversations/{conversation_id}/actors';
3439
3958
  };
3440
- type CreateConversationErrors = {
3441
- /**
3442
- * Invalid request body
3443
- */
3444
- 400: ErrorResponse;
3959
+ type ListConversationActorsErrors = {
3445
3960
  /**
3446
3961
  * Unauthorized
3447
3962
  */
@@ -3450,27 +3965,35 @@ type CreateConversationErrors = {
3450
3965
  * Forbidden
3451
3966
  */
3452
3967
  403: ErrorResponse;
3968
+ /**
3969
+ * Conversation not found
3970
+ */
3971
+ 404: ErrorResponse;
3453
3972
  };
3454
- type CreateConversationError = CreateConversationErrors[keyof CreateConversationErrors];
3455
- type CreateConversationResponses = {
3973
+ type ListConversationActorsError = ListConversationActorsErrors[keyof ListConversationActorsErrors];
3974
+ type ListConversationActorsResponses = {
3456
3975
  /**
3457
- * Conversation created
3976
+ * List of actors
3458
3977
  */
3459
- 201: ConversationRecord;
3978
+ 200: Array<ConversationActorRecord>;
3460
3979
  };
3461
- type CreateConversationResponse = CreateConversationResponses[keyof CreateConversationResponses];
3462
- type DeleteConversationData = {
3980
+ type ListConversationActorsResponse = ListConversationActorsResponses[keyof ListConversationActorsResponses];
3981
+ type RemoveConversationMessageData = {
3463
3982
  body?: never;
3464
3983
  path: {
3465
3984
  /**
3466
3985
  * Conversation ID
3467
3986
  */
3468
3987
  conversation_id: string;
3988
+ /**
3989
+ * Document ID
3990
+ */
3991
+ document_id: string;
3469
3992
  };
3470
3993
  query?: never;
3471
- url: '/api/v1/conversations/{conversation_id}';
3994
+ url: '/api/v1/conversations/{conversation_id}/messages/{document_id}';
3472
3995
  };
3473
- type DeleteConversationErrors = {
3996
+ type RemoveConversationMessageErrors = {
3474
3997
  /**
3475
3998
  * Unauthorized
3476
3999
  */
@@ -3480,19 +4003,19 @@ type DeleteConversationErrors = {
3480
4003
  */
3481
4004
  403: ErrorResponse;
3482
4005
  /**
3483
- * Conversation not found
4006
+ * Conversation or message not found
3484
4007
  */
3485
4008
  404: ErrorResponse;
3486
4009
  };
3487
- type DeleteConversationError = DeleteConversationErrors[keyof DeleteConversationErrors];
3488
- type DeleteConversationResponses = {
4010
+ type RemoveConversationMessageError = RemoveConversationMessageErrors[keyof RemoveConversationMessageErrors];
4011
+ type RemoveConversationMessageResponses = {
3489
4012
  /**
3490
- * Conversation deleted
4013
+ * Message removed
3491
4014
  */
3492
4015
  204: void;
3493
4016
  };
3494
- type DeleteConversationResponse = DeleteConversationResponses[keyof DeleteConversationResponses];
3495
- type GetConversationData = {
4017
+ type RemoveConversationMessageResponse = RemoveConversationMessageResponses[keyof RemoveConversationMessageResponses];
4018
+ type GetConversationTagsData = {
3496
4019
  body?: never;
3497
4020
  path: {
3498
4021
  /**
@@ -3501,9 +4024,9 @@ type GetConversationData = {
3501
4024
  conversation_id: string;
3502
4025
  };
3503
4026
  query?: never;
3504
- url: '/api/v1/conversations/{conversation_id}';
4027
+ url: '/api/v1/conversations/{conversation_id}/tags';
3505
4028
  };
3506
- type GetConversationErrors = {
4029
+ type GetConversationTagsErrors = {
3507
4030
  /**
3508
4031
  * Unauthorized
3509
4032
  */
@@ -3517,20 +4040,19 @@ type GetConversationErrors = {
3517
4040
  */
3518
4041
  404: ErrorResponse;
3519
4042
  };
3520
- type GetConversationError = GetConversationErrors[keyof GetConversationErrors];
3521
- type GetConversationResponses = {
4043
+ type GetConversationTagsError = GetConversationTagsErrors[keyof GetConversationTagsErrors];
4044
+ type GetConversationTagsResponses = {
3522
4045
  /**
3523
- * Conversation found
4046
+ * Conversation tags
3524
4047
  */
3525
- 200: ConversationRecord;
4048
+ 200: {
4049
+ [key: string]: string;
4050
+ };
3526
4051
  };
3527
- type GetConversationResponse = GetConversationResponses[keyof GetConversationResponses];
3528
- type UpdateConversationData = {
4052
+ type GetConversationTagsResponse = GetConversationTagsResponses[keyof GetConversationTagsResponses];
4053
+ type MergeConversationTagsData = {
3529
4054
  body: {
3530
- /**
3531
- * New conversation status
3532
- */
3533
- status: 'open' | 'closed';
4055
+ [key: string]: string;
3534
4056
  };
3535
4057
  path: {
3536
4058
  /**
@@ -3539,13 +4061,9 @@ type UpdateConversationData = {
3539
4061
  conversation_id: string;
3540
4062
  };
3541
4063
  query?: never;
3542
- url: '/api/v1/conversations/{conversation_id}';
4064
+ url: '/api/v1/conversations/{conversation_id}/tags';
3543
4065
  };
3544
- type UpdateConversationErrors = {
3545
- /**
3546
- * Invalid request body
3547
- */
3548
- 400: ErrorResponse;
4066
+ type MergeConversationTagsErrors = {
3549
4067
  /**
3550
4068
  * Unauthorized
3551
4069
  */
@@ -3559,35 +4077,30 @@ type UpdateConversationErrors = {
3559
4077
  */
3560
4078
  404: ErrorResponse;
3561
4079
  };
3562
- type UpdateConversationError = UpdateConversationErrors[keyof UpdateConversationErrors];
3563
- type UpdateConversationResponses = {
4080
+ type MergeConversationTagsError = MergeConversationTagsErrors[keyof MergeConversationTagsErrors];
4081
+ type MergeConversationTagsResponses = {
3564
4082
  /**
3565
- * Conversation updated
4083
+ * Tags merged
3566
4084
  */
3567
- 200: ConversationRecord;
4085
+ 200: {
4086
+ [key: string]: string;
4087
+ };
3568
4088
  };
3569
- type UpdateConversationResponse = UpdateConversationResponses[keyof UpdateConversationResponses];
3570
- type ListConversationMessagesData = {
3571
- body?: never;
4089
+ type MergeConversationTagsResponse = MergeConversationTagsResponses[keyof MergeConversationTagsResponses];
4090
+ type ReplaceConversationTagsData = {
4091
+ body: {
4092
+ [key: string]: string;
4093
+ };
3572
4094
  path: {
3573
4095
  /**
3574
4096
  * Conversation ID
3575
4097
  */
3576
4098
  conversation_id: string;
3577
4099
  };
3578
- query?: {
3579
- /**
3580
- * Maximum number of results to return
3581
- */
3582
- limit?: number;
3583
- /**
3584
- * Number of results to skip
3585
- */
3586
- offset?: number;
3587
- };
3588
- url: '/api/v1/conversations/{conversation_id}/messages';
4100
+ query?: never;
4101
+ url: '/api/v1/conversations/{conversation_id}/tags';
3589
4102
  };
3590
- type ListConversationMessagesErrors = {
4103
+ type ReplaceConversationTagsErrors = {
3591
4104
  /**
3592
4105
  * Unauthorized
3593
4106
  */
@@ -3601,54 +4114,63 @@ type ListConversationMessagesErrors = {
3601
4114
  */
3602
4115
  404: ErrorResponse;
3603
4116
  };
3604
- type ListConversationMessagesError = ListConversationMessagesErrors[keyof ListConversationMessagesErrors];
3605
- type ListConversationMessagesResponses = {
4117
+ type ReplaceConversationTagsError = ReplaceConversationTagsErrors[keyof ReplaceConversationTagsErrors];
4118
+ type ReplaceConversationTagsResponses = {
3606
4119
  /**
3607
- * List of messages
4120
+ * Tags replaced
3608
4121
  */
3609
4122
  200: {
3610
- data?: Array<ConversationMessageRecord>;
3611
- total?: number;
3612
- limit?: number;
3613
- offset?: number;
4123
+ [key: string]: string;
3614
4124
  };
3615
4125
  };
3616
- type ListConversationMessagesResponse = ListConversationMessagesResponses[keyof ListConversationMessagesResponses];
3617
- type AddConversationMessageData = {
3618
- body: {
3619
- /**
3620
- * Message text content to add to the conversation
3621
- */
3622
- message: string;
3623
- /**
3624
- * Role of the message sender
3625
- */
3626
- role: 'user' | 'assistant' | 'system';
3627
- /**
3628
- * Optional actor ID to associate with this message (user identity)
3629
- */
3630
- actor_id?: string | null;
4126
+ type ReplaceConversationTagsResponse = ReplaceConversationTagsResponses[keyof ReplaceConversationTagsResponses];
4127
+ type ListDocumentsData = {
4128
+ body?: never;
4129
+ path?: never;
4130
+ query?: {
3631
4131
  /**
3632
- * Zero-based position. Defaults to MAX+1 (append).
4132
+ * Project ID (optional)
3633
4133
  */
3634
- position?: number;
4134
+ project_id?: string;
4135
+ };
4136
+ url: '/api/v1/documents';
4137
+ };
4138
+ type ListDocumentsErrors = {
4139
+ /**
4140
+ * Unauthorized
4141
+ */
4142
+ 401: ErrorResponse;
4143
+ /**
4144
+ * Forbidden
4145
+ */
4146
+ 403: ErrorResponse;
4147
+ };
4148
+ type ListDocumentsError = ListDocumentsErrors[keyof ListDocumentsErrors];
4149
+ type ListDocumentsResponses = {
4150
+ /**
4151
+ * List of documents
4152
+ */
4153
+ 200: Array<DocumentRecord>;
4154
+ };
4155
+ type ListDocumentsResponse = ListDocumentsResponses[keyof ListDocumentsResponses];
4156
+ type CreateDocumentData = {
4157
+ body: {
3635
4158
  /**
3636
- * Optional structured metadata to attach to the message (e.g. phone number, channel). Stored as-is and injected into the AI prompt context.
4159
+ * Project ID. Required for JWT auth; omit when using an project key.
3637
4160
  */
3638
- metadata?: {
3639
- [key: string]: unknown;
3640
- } | null;
3641
- };
3642
- path: {
4161
+ project_id?: string;
4162
+ content: string;
3643
4163
  /**
3644
- * Conversation ID
4164
+ * Logical path within the project (e.g. /reports/q1.txt). Defaults to /filename if omitted.
3645
4165
  */
3646
- conversation_id: string;
4166
+ path?: string;
4167
+ filename?: string;
3647
4168
  };
4169
+ path?: never;
3648
4170
  query?: never;
3649
- url: '/api/v1/conversations/{conversation_id}/messages';
4171
+ url: '/api/v1/documents';
3650
4172
  };
3651
- type AddConversationMessageErrors = {
4173
+ type CreateDocumentErrors = {
3652
4174
  /**
3653
4175
  * Invalid request body
3654
4176
  */
@@ -3661,51 +4183,27 @@ type AddConversationMessageErrors = {
3661
4183
  * Forbidden
3662
4184
  */
3663
4185
  403: ErrorResponse;
3664
- /**
3665
- * Conversation or actor not found
3666
- */
3667
- 404: ErrorResponse;
3668
4186
  };
3669
- type AddConversationMessageError = AddConversationMessageErrors[keyof AddConversationMessageErrors];
3670
- type AddConversationMessageResponses = {
4187
+ type CreateDocumentError = CreateDocumentErrors[keyof CreateDocumentErrors];
4188
+ type CreateDocumentResponses = {
3671
4189
  /**
3672
- * Message added
4190
+ * Document created
3673
4191
  */
3674
- 201: ConversationMessageRecord;
4192
+ 201: DocumentRecord;
3675
4193
  };
3676
- type AddConversationMessageResponse = AddConversationMessageResponses[keyof AddConversationMessageResponses];
3677
- type GenerateConversationMessageData = {
3678
- body: {
3679
- /**
3680
- * ID of the agent that will produce the next message.
3681
- */
3682
- agent_id: string;
3683
- /**
3684
- * Optional model override.
3685
- */
3686
- model?: string;
3687
- /**
3688
- * If true, stream tokens via SSE. NOT IMPLEMENTED in v1 — returns 501.
3689
- */
3690
- stream?: boolean;
4194
+ type CreateDocumentResponse = CreateDocumentResponses[keyof CreateDocumentResponses];
4195
+ type DeleteDocumentData = {
4196
+ body?: never;
4197
+ path: {
3691
4198
  /**
3692
- * Key-value pairs injected as context headers into all tool call requests made during this generation.
4199
+ * Document ID
3693
4200
  */
3694
- tool_context?: {
3695
- [key: string]: string;
3696
- } | null;
3697
- };
3698
- path: {
3699
- conversation_id: string;
4201
+ document_id: string;
3700
4202
  };
3701
4203
  query?: never;
3702
- url: '/api/v1/conversations/{conversation_id}/generate';
4204
+ url: '/api/v1/documents/{document_id}';
3703
4205
  };
3704
- type GenerateConversationMessageErrors = {
3705
- /**
3706
- * Invalid request
3707
- */
3708
- 400: ErrorResponse;
4206
+ type DeleteDocumentErrors = {
3709
4207
  /**
3710
4208
  * Unauthorized
3711
4209
  */
@@ -3715,34 +4213,30 @@ type GenerateConversationMessageErrors = {
3715
4213
  */
3716
4214
  403: ErrorResponse;
3717
4215
  /**
3718
- * Conversation or actor not found
4216
+ * Document not found
3719
4217
  */
3720
4218
  404: ErrorResponse;
3721
- /**
3722
- * Streaming not implemented
3723
- */
3724
- 501: ErrorResponse;
3725
4219
  };
3726
- type GenerateConversationMessageError = GenerateConversationMessageErrors[keyof GenerateConversationMessageErrors];
3727
- type GenerateConversationMessageResponses = {
4220
+ type DeleteDocumentError = DeleteDocumentErrors[keyof DeleteDocumentErrors];
4221
+ type DeleteDocumentResponses = {
3728
4222
  /**
3729
- * Generation completed or requires action
4223
+ * Document deleted
3730
4224
  */
3731
- 200: GenerateConversationMessageResponse;
4225
+ 204: void;
3732
4226
  };
3733
- type GenerateConversationMessageResponse2 = GenerateConversationMessageResponses[keyof GenerateConversationMessageResponses];
3734
- type ListConversationActorsData = {
4227
+ type DeleteDocumentResponse = DeleteDocumentResponses[keyof DeleteDocumentResponses];
4228
+ type GetDocumentData = {
3735
4229
  body?: never;
3736
4230
  path: {
3737
4231
  /**
3738
- * Conversation ID
4232
+ * Document ID
3739
4233
  */
3740
- conversation_id: string;
4234
+ document_id: string;
3741
4235
  };
3742
4236
  query?: never;
3743
- url: '/api/v1/conversations/{conversation_id}/actors';
4237
+ url: '/api/v1/documents/{document_id}';
3744
4238
  };
3745
- type ListConversationActorsErrors = {
4239
+ type GetDocumentErrors = {
3746
4240
  /**
3747
4241
  * Unauthorized
3748
4242
  */
@@ -3752,34 +4246,55 @@ type ListConversationActorsErrors = {
3752
4246
  */
3753
4247
  403: ErrorResponse;
3754
4248
  /**
3755
- * Conversation not found
4249
+ * Document not found
3756
4250
  */
3757
4251
  404: ErrorResponse;
3758
4252
  };
3759
- type ListConversationActorsError = ListConversationActorsErrors[keyof ListConversationActorsErrors];
3760
- type ListConversationActorsResponses = {
4253
+ type GetDocumentError = GetDocumentErrors[keyof GetDocumentErrors];
4254
+ type GetDocumentResponses = {
3761
4255
  /**
3762
- * List of actors
4256
+ * Document found
3763
4257
  */
3764
- 200: Array<ConversationActorRecord>;
4258
+ 200: DocumentRecord;
3765
4259
  };
3766
- type ListConversationActorsResponse = ListConversationActorsResponses[keyof ListConversationActorsResponses];
3767
- type RemoveConversationMessageData = {
3768
- body?: never;
3769
- path: {
4260
+ type GetDocumentResponse = GetDocumentResponses[keyof GetDocumentResponses];
4261
+ type UpdateDocumentData = {
4262
+ body: {
3770
4263
  /**
3771
- * Conversation ID
4264
+ * New text content
3772
4265
  */
3773
- conversation_id: string;
4266
+ content?: string;
4267
+ /**
4268
+ * New title
4269
+ */
4270
+ title?: string;
4271
+ /**
4272
+ * Logical path within the project (e.g. /reports/q1.txt). Pass null to clear.
4273
+ */
4274
+ path?: string | null;
4275
+ /**
4276
+ * Arbitrary metadata object
4277
+ */
4278
+ metadata?: {
4279
+ [key: string]: unknown;
4280
+ };
4281
+ /**
4282
+ * Key-value tags
4283
+ */
4284
+ tags?: {
4285
+ [key: string]: string;
4286
+ };
4287
+ };
4288
+ path: {
3774
4289
  /**
3775
4290
  * Document ID
3776
4291
  */
3777
4292
  document_id: string;
3778
4293
  };
3779
4294
  query?: never;
3780
- url: '/api/v1/conversations/{conversation_id}/messages/{document_id}';
4295
+ url: '/api/v1/documents/{document_id}';
3781
4296
  };
3782
- type RemoveConversationMessageErrors = {
4297
+ type UpdateDocumentErrors = {
3783
4298
  /**
3784
4299
  * Unauthorized
3785
4300
  */
@@ -3789,30 +4304,30 @@ type RemoveConversationMessageErrors = {
3789
4304
  */
3790
4305
  403: ErrorResponse;
3791
4306
  /**
3792
- * Conversation or message not found
4307
+ * Document not found
3793
4308
  */
3794
4309
  404: ErrorResponse;
3795
4310
  };
3796
- type RemoveConversationMessageError = RemoveConversationMessageErrors[keyof RemoveConversationMessageErrors];
3797
- type RemoveConversationMessageResponses = {
4311
+ type UpdateDocumentError = UpdateDocumentErrors[keyof UpdateDocumentErrors];
4312
+ type UpdateDocumentResponses = {
3798
4313
  /**
3799
- * Message removed
4314
+ * Document updated
3800
4315
  */
3801
- 204: void;
4316
+ 200: DocumentRecord;
3802
4317
  };
3803
- type RemoveConversationMessageResponse = RemoveConversationMessageResponses[keyof RemoveConversationMessageResponses];
3804
- type GetConversationTagsData = {
4318
+ type UpdateDocumentResponse = UpdateDocumentResponses[keyof UpdateDocumentResponses];
4319
+ type GetDocumentTagsData = {
3805
4320
  body?: never;
3806
4321
  path: {
3807
4322
  /**
3808
- * Conversation ID
4323
+ * Document ID
3809
4324
  */
3810
- conversation_id: string;
4325
+ document_id: string;
3811
4326
  };
3812
4327
  query?: never;
3813
- url: '/api/v1/conversations/{conversation_id}/tags';
4328
+ url: '/api/v1/documents/{document_id}/tags';
3814
4329
  };
3815
- type GetConversationTagsErrors = {
4330
+ type GetDocumentTagsErrors = {
3816
4331
  /**
3817
4332
  * Unauthorized
3818
4333
  */
@@ -3822,34 +4337,34 @@ type GetConversationTagsErrors = {
3822
4337
  */
3823
4338
  403: ErrorResponse;
3824
4339
  /**
3825
- * Conversation not found
4340
+ * Document not found
3826
4341
  */
3827
4342
  404: ErrorResponse;
3828
4343
  };
3829
- type GetConversationTagsError = GetConversationTagsErrors[keyof GetConversationTagsErrors];
3830
- type GetConversationTagsResponses = {
4344
+ type GetDocumentTagsError = GetDocumentTagsErrors[keyof GetDocumentTagsErrors];
4345
+ type GetDocumentTagsResponses = {
3831
4346
  /**
3832
- * Conversation tags
4347
+ * Document tags
3833
4348
  */
3834
4349
  200: {
3835
4350
  [key: string]: string;
3836
4351
  };
3837
4352
  };
3838
- type GetConversationTagsResponse = GetConversationTagsResponses[keyof GetConversationTagsResponses];
3839
- type MergeConversationTagsData = {
4353
+ type GetDocumentTagsResponse = GetDocumentTagsResponses[keyof GetDocumentTagsResponses];
4354
+ type MergeDocumentTagsData = {
3840
4355
  body: {
3841
4356
  [key: string]: string;
3842
4357
  };
3843
4358
  path: {
3844
4359
  /**
3845
- * Conversation ID
4360
+ * Document ID
3846
4361
  */
3847
- conversation_id: string;
4362
+ document_id: string;
3848
4363
  };
3849
4364
  query?: never;
3850
- url: '/api/v1/conversations/{conversation_id}/tags';
4365
+ url: '/api/v1/documents/{document_id}/tags';
3851
4366
  };
3852
- type MergeConversationTagsErrors = {
4367
+ type MergeDocumentTagsErrors = {
3853
4368
  /**
3854
4369
  * Unauthorized
3855
4370
  */
@@ -3859,12 +4374,12 @@ type MergeConversationTagsErrors = {
3859
4374
  */
3860
4375
  403: ErrorResponse;
3861
4376
  /**
3862
- * Conversation not found
4377
+ * Document not found
3863
4378
  */
3864
4379
  404: ErrorResponse;
3865
4380
  };
3866
- type MergeConversationTagsError = MergeConversationTagsErrors[keyof MergeConversationTagsErrors];
3867
- type MergeConversationTagsResponses = {
4381
+ type MergeDocumentTagsError = MergeDocumentTagsErrors[keyof MergeDocumentTagsErrors];
4382
+ type MergeDocumentTagsResponses = {
3868
4383
  /**
3869
4384
  * Tags merged
3870
4385
  */
@@ -3872,21 +4387,21 @@ type MergeConversationTagsResponses = {
3872
4387
  [key: string]: string;
3873
4388
  };
3874
4389
  };
3875
- type MergeConversationTagsResponse = MergeConversationTagsResponses[keyof MergeConversationTagsResponses];
3876
- type ReplaceConversationTagsData = {
4390
+ type MergeDocumentTagsResponse = MergeDocumentTagsResponses[keyof MergeDocumentTagsResponses];
4391
+ type ReplaceDocumentTagsData = {
3877
4392
  body: {
3878
4393
  [key: string]: string;
3879
4394
  };
3880
4395
  path: {
3881
4396
  /**
3882
- * Conversation ID
4397
+ * Document ID
3883
4398
  */
3884
- conversation_id: string;
4399
+ document_id: string;
3885
4400
  };
3886
4401
  query?: never;
3887
- url: '/api/v1/conversations/{conversation_id}/tags';
4402
+ url: '/api/v1/documents/{document_id}/tags';
3888
4403
  };
3889
- type ReplaceConversationTagsErrors = {
4404
+ type ReplaceDocumentTagsErrors = {
3890
4405
  /**
3891
4406
  * Unauthorized
3892
4407
  */
@@ -3896,12 +4411,12 @@ type ReplaceConversationTagsErrors = {
3896
4411
  */
3897
4412
  403: ErrorResponse;
3898
4413
  /**
3899
- * Conversation not found
4414
+ * Document not found
3900
4415
  */
3901
4416
  404: ErrorResponse;
3902
4417
  };
3903
- type ReplaceConversationTagsError = ReplaceConversationTagsErrors[keyof ReplaceConversationTagsErrors];
3904
- type ReplaceConversationTagsResponses = {
4418
+ type ReplaceDocumentTagsError = ReplaceDocumentTagsErrors[keyof ReplaceDocumentTagsErrors];
4419
+ type ReplaceDocumentTagsResponses = {
3905
4420
  /**
3906
4421
  * Tags replaced
3907
4422
  */
@@ -3909,423 +4424,399 @@ type ReplaceConversationTagsResponses = {
3909
4424
  [key: string]: string;
3910
4425
  };
3911
4426
  };
3912
- type ReplaceConversationTagsResponse = ReplaceConversationTagsResponses[keyof ReplaceConversationTagsResponses];
3913
- type ListDocumentsData = {
4427
+ type ReplaceDocumentTagsResponse = ReplaceDocumentTagsResponses[keyof ReplaceDocumentTagsResponses];
4428
+ type ListFilesData = {
3914
4429
  body?: never;
3915
4430
  path?: never;
3916
4431
  query?: {
3917
4432
  /**
3918
- * Project ID (optional)
4433
+ * Filter files by project ID
3919
4434
  */
3920
4435
  project_id?: string;
4436
+ /**
4437
+ * Maximum number of results to return
4438
+ */
4439
+ limit?: number;
4440
+ /**
4441
+ * Number of results to skip
4442
+ */
4443
+ offset?: number;
3921
4444
  };
3922
- url: '/api/v1/documents';
4445
+ url: '/api/v1/files';
3923
4446
  };
3924
- type ListDocumentsErrors = {
3925
- /**
3926
- * Unauthorized
3927
- */
3928
- 401: ErrorResponse;
4447
+ type ListFilesErrors = {
3929
4448
  /**
3930
- * Forbidden
4449
+ * Internal server error
3931
4450
  */
3932
- 403: ErrorResponse;
4451
+ 500: ErrorResponse;
3933
4452
  };
3934
- type ListDocumentsError = ListDocumentsErrors[keyof ListDocumentsErrors];
3935
- type ListDocumentsResponses = {
4453
+ type ListFilesError = ListFilesErrors[keyof ListFilesErrors];
4454
+ type ListFilesResponses = {
3936
4455
  /**
3937
- * List of documents
4456
+ * List of files returned successfully
3938
4457
  */
3939
- 200: Array<DocumentRecord>;
4458
+ 200: {
4459
+ data?: Array<FileRecord>;
4460
+ total?: number;
4461
+ limit?: number;
4462
+ offset?: number;
4463
+ };
3940
4464
  };
3941
- type ListDocumentsResponse = ListDocumentsResponses[keyof ListDocumentsResponses];
3942
- type CreateDocumentData = {
4465
+ type ListFilesResponse = ListFilesResponses[keyof ListFilesResponses];
4466
+ type CreateFileData = {
3943
4467
  body: {
3944
4468
  /**
3945
- * Project ID. Required for JWT auth; omit when using an project key.
4469
+ * Public ID of the project
3946
4470
  */
3947
- project_id?: string;
3948
- content: string;
4471
+ project_id: string;
3949
4472
  /**
3950
- * Logical path within the project (e.g. /reports/q1.txt). Defaults to /filename if omitted.
4473
+ * Logical path within the project (e.g. /images/logo.png). Defaults to /filename if omitted.
3951
4474
  */
3952
4475
  path?: string;
4476
+ /**
4477
+ * Name of the file
4478
+ */
3953
4479
  filename?: string;
4480
+ /**
4481
+ * MIME type of the file
4482
+ */
4483
+ content_type?: string;
4484
+ /**
4485
+ * File size in bytes
4486
+ */
4487
+ size?: number;
4488
+ /**
4489
+ * Storage backend type
4490
+ */
4491
+ storage_type: 'local' | 's3' | 'gcs';
4492
+ /**
4493
+ * Path where the file is stored
4494
+ */
4495
+ storage_path: string;
4496
+ /**
4497
+ * JSON string with additional metadata
4498
+ */
4499
+ metadata?: string;
3954
4500
  };
3955
4501
  path?: never;
3956
4502
  query?: never;
3957
- url: '/api/v1/documents';
4503
+ url: '/api/v1/files';
3958
4504
  };
3959
- type CreateDocumentErrors = {
4505
+ type CreateFileErrors = {
3960
4506
  /**
3961
- * Invalid request body
4507
+ * Internal server error
4508
+ */
4509
+ 500: ErrorResponse;
4510
+ };
4511
+ type CreateFileError = CreateFileErrors[keyof CreateFileErrors];
4512
+ type CreateFileResponses = {
4513
+ /**
4514
+ * File created successfully
4515
+ */
4516
+ 201: FileRecord;
4517
+ };
4518
+ type CreateFileResponse = CreateFileResponses[keyof CreateFileResponses];
4519
+ type UploadFileData = {
4520
+ body: {
4521
+ /**
4522
+ * File content
4523
+ */
4524
+ file: Blob | File;
4525
+ /**
4526
+ * Project ID to associate the file with
4527
+ */
4528
+ project_id: string;
4529
+ /**
4530
+ * Additional metadata as a JSON string
4531
+ */
4532
+ metadata?: string;
4533
+ };
4534
+ path?: never;
4535
+ query?: never;
4536
+ url: '/api/v1/files/upload';
4537
+ };
4538
+ type UploadFileErrors = {
4539
+ /**
4540
+ * Missing file or invalid project
3962
4541
  */
3963
4542
  400: ErrorResponse;
3964
4543
  /**
3965
- * Unauthorized
4544
+ * Authentication required
3966
4545
  */
3967
4546
  401: ErrorResponse;
3968
4547
  /**
3969
- * Forbidden
4548
+ * Insufficient permissions
3970
4549
  */
3971
4550
  403: ErrorResponse;
3972
4551
  };
3973
- type CreateDocumentError = CreateDocumentErrors[keyof CreateDocumentErrors];
3974
- type CreateDocumentResponses = {
4552
+ type UploadFileError = UploadFileErrors[keyof UploadFileErrors];
4553
+ type UploadFileResponses = {
3975
4554
  /**
3976
- * Document created
4555
+ * File uploaded successfully
3977
4556
  */
3978
- 201: DocumentRecord;
4557
+ 201: FileRecord;
3979
4558
  };
3980
- type CreateDocumentResponse = CreateDocumentResponses[keyof CreateDocumentResponses];
3981
- type DeleteDocumentData = {
3982
- body?: never;
3983
- path: {
3984
- /**
3985
- * Document ID
3986
- */
3987
- document_id: string;
3988
- };
4559
+ type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];
4560
+ type UploadFileBase64Data = {
4561
+ body: UploadFileBase64Request;
4562
+ path?: never;
3989
4563
  query?: never;
3990
- url: '/api/v1/documents/{document_id}';
4564
+ url: '/api/v1/files/upload/base64';
3991
4565
  };
3992
- type DeleteDocumentErrors = {
4566
+ type UploadFileBase64Errors = {
3993
4567
  /**
3994
- * Unauthorized
4568
+ * Missing content or invalid project
3995
4569
  */
3996
- 401: ErrorResponse;
4570
+ 400: ErrorResponse;
3997
4571
  /**
3998
- * Forbidden
4572
+ * Authentication required
3999
4573
  */
4000
- 403: ErrorResponse;
4574
+ 401: ErrorResponse;
4001
4575
  /**
4002
- * Document not found
4576
+ * Insufficient permissions
4003
4577
  */
4004
- 404: ErrorResponse;
4578
+ 403: ErrorResponse;
4005
4579
  };
4006
- type DeleteDocumentError = DeleteDocumentErrors[keyof DeleteDocumentErrors];
4007
- type DeleteDocumentResponses = {
4580
+ type UploadFileBase64Error = UploadFileBase64Errors[keyof UploadFileBase64Errors];
4581
+ type UploadFileBase64Responses = {
4008
4582
  /**
4009
- * Document deleted
4583
+ * File uploaded successfully
4010
4584
  */
4011
- 204: void;
4585
+ 201: FileRecord;
4012
4586
  };
4013
- type DeleteDocumentResponse = DeleteDocumentResponses[keyof DeleteDocumentResponses];
4014
- type GetDocumentData = {
4587
+ type UploadFileBase64Response = UploadFileBase64Responses[keyof UploadFileBase64Responses];
4588
+ type DeleteFileData = {
4015
4589
  body?: never;
4016
4590
  path: {
4017
4591
  /**
4018
- * Document ID
4592
+ * ID of the file to delete
4019
4593
  */
4020
- document_id: string;
4594
+ file_id: string;
4021
4595
  };
4022
4596
  query?: never;
4023
- url: '/api/v1/documents/{document_id}';
4597
+ url: '/api/v1/files/{file_id}';
4024
4598
  };
4025
- type GetDocumentErrors = {
4026
- /**
4027
- * Unauthorized
4028
- */
4029
- 401: ErrorResponse;
4599
+ type DeleteFileErrors = {
4030
4600
  /**
4031
- * Forbidden
4601
+ * File not found
4032
4602
  */
4033
- 403: ErrorResponse;
4603
+ 404: ErrorResponse;
4034
4604
  /**
4035
- * Document not found
4605
+ * Internal server error
4036
4606
  */
4037
- 404: ErrorResponse;
4607
+ 500: ErrorResponse;
4038
4608
  };
4039
- type GetDocumentError = GetDocumentErrors[keyof GetDocumentErrors];
4040
- type GetDocumentResponses = {
4609
+ type DeleteFileError = DeleteFileErrors[keyof DeleteFileErrors];
4610
+ type DeleteFileResponses = {
4041
4611
  /**
4042
- * Document found
4612
+ * File deleted successfully
4043
4613
  */
4044
- 200: DocumentRecord;
4614
+ 204: void;
4045
4615
  };
4046
- type GetDocumentResponse = GetDocumentResponses[keyof GetDocumentResponses];
4047
- type UpdateDocumentData = {
4048
- body: {
4049
- /**
4050
- * New text content
4051
- */
4052
- content?: string;
4053
- /**
4054
- * New title
4055
- */
4056
- title?: string;
4057
- /**
4058
- * Logical path within the project (e.g. /reports/q1.txt). Pass null to clear.
4059
- */
4060
- path?: string | null;
4061
- /**
4062
- * Arbitrary metadata object
4063
- */
4064
- metadata?: {
4065
- [key: string]: unknown;
4066
- };
4067
- /**
4068
- * Key-value tags
4069
- */
4070
- tags?: {
4071
- [key: string]: string;
4072
- };
4073
- };
4616
+ type DeleteFileResponse = DeleteFileResponses[keyof DeleteFileResponses];
4617
+ type GetFileData = {
4618
+ body?: never;
4074
4619
  path: {
4075
4620
  /**
4076
- * Document ID
4621
+ * File ID
4077
4622
  */
4078
- document_id: string;
4623
+ file_id: string;
4079
4624
  };
4080
4625
  query?: never;
4081
- url: '/api/v1/documents/{document_id}';
4626
+ url: '/api/v1/files/{file_id}';
4082
4627
  };
4083
- type UpdateDocumentErrors = {
4084
- /**
4085
- * Unauthorized
4086
- */
4087
- 401: ErrorResponse;
4628
+ type GetFileErrors = {
4088
4629
  /**
4089
- * Forbidden
4630
+ * File not found
4090
4631
  */
4091
- 403: ErrorResponse;
4632
+ 404: ErrorResponse;
4092
4633
  /**
4093
- * Document not found
4634
+ * Internal server error
4094
4635
  */
4095
- 404: ErrorResponse;
4636
+ 500: ErrorResponse;
4096
4637
  };
4097
- type UpdateDocumentError = UpdateDocumentErrors[keyof UpdateDocumentErrors];
4098
- type UpdateDocumentResponses = {
4638
+ type GetFileError = GetFileErrors[keyof GetFileErrors];
4639
+ type GetFileResponses = {
4099
4640
  /**
4100
- * Document updated
4641
+ * File found
4101
4642
  */
4102
- 200: DocumentRecord;
4643
+ 200: FileRecord;
4103
4644
  };
4104
- type UpdateDocumentResponse = UpdateDocumentResponses[keyof UpdateDocumentResponses];
4105
- type GetDocumentTagsData = {
4645
+ type GetFileResponse = GetFileResponses[keyof GetFileResponses];
4646
+ type DownloadFileData = {
4106
4647
  body?: never;
4107
4648
  path: {
4108
4649
  /**
4109
- * Document ID
4650
+ * File ID
4110
4651
  */
4111
- document_id: string;
4652
+ file_id: string;
4112
4653
  };
4113
4654
  query?: never;
4114
- url: '/api/v1/documents/{document_id}/tags';
4655
+ url: '/api/v1/files/{file_id}/download';
4115
4656
  };
4116
- type GetDocumentTagsErrors = {
4657
+ type DownloadFileErrors = {
4117
4658
  /**
4118
- * Unauthorized
4659
+ * Authentication required
4119
4660
  */
4120
4661
  401: ErrorResponse;
4121
4662
  /**
4122
- * Forbidden
4663
+ * Insufficient permissions
4123
4664
  */
4124
4665
  403: ErrorResponse;
4125
4666
  /**
4126
- * Document not found
4667
+ * File not found
4127
4668
  */
4128
4669
  404: ErrorResponse;
4129
4670
  };
4130
- type GetDocumentTagsError = GetDocumentTagsErrors[keyof GetDocumentTagsErrors];
4131
- type GetDocumentTagsResponses = {
4671
+ type DownloadFileError = DownloadFileErrors[keyof DownloadFileErrors];
4672
+ type DownloadFileResponses = {
4132
4673
  /**
4133
- * Document tags
4674
+ * File content
4134
4675
  */
4135
- 200: {
4136
- [key: string]: string;
4137
- };
4676
+ 200: Blob | File;
4138
4677
  };
4139
- type GetDocumentTagsResponse = GetDocumentTagsResponses[keyof GetDocumentTagsResponses];
4140
- type MergeDocumentTagsData = {
4678
+ type DownloadFileResponse = DownloadFileResponses[keyof DownloadFileResponses];
4679
+ type UpdateFileMetadataData = {
4141
4680
  body: {
4142
- [key: string]: string;
4681
+ /**
4682
+ * New metadata as a JSON string
4683
+ */
4684
+ metadata?: string;
4685
+ /**
4686
+ * New filename for the file
4687
+ */
4688
+ filename?: string;
4143
4689
  };
4144
4690
  path: {
4145
4691
  /**
4146
- * Document ID
4692
+ * File ID
4147
4693
  */
4148
- document_id: string;
4694
+ file_id: string;
4149
4695
  };
4150
4696
  query?: never;
4151
- url: '/api/v1/documents/{document_id}/tags';
4697
+ url: '/api/v1/files/{file_id}/metadata';
4152
4698
  };
4153
- type MergeDocumentTagsErrors = {
4699
+ type UpdateFileMetadataErrors = {
4154
4700
  /**
4155
- * Unauthorized
4701
+ * Authentication required
4156
4702
  */
4157
4703
  401: ErrorResponse;
4158
4704
  /**
4159
- * Forbidden
4705
+ * Insufficient permissions
4160
4706
  */
4161
4707
  403: ErrorResponse;
4162
4708
  /**
4163
- * Document not found
4709
+ * File not found
4164
4710
  */
4165
4711
  404: ErrorResponse;
4166
4712
  };
4167
- type MergeDocumentTagsError = MergeDocumentTagsErrors[keyof MergeDocumentTagsErrors];
4168
- type MergeDocumentTagsResponses = {
4713
+ type UpdateFileMetadataError = UpdateFileMetadataErrors[keyof UpdateFileMetadataErrors];
4714
+ type UpdateFileMetadataResponses = {
4169
4715
  /**
4170
- * Tags merged
4716
+ * Metadata updated successfully
4171
4717
  */
4172
- 200: {
4173
- [key: string]: string;
4174
- };
4718
+ 200: FileRecord;
4175
4719
  };
4176
- type MergeDocumentTagsResponse = MergeDocumentTagsResponses[keyof MergeDocumentTagsResponses];
4177
- type ReplaceDocumentTagsData = {
4178
- body: {
4179
- [key: string]: string;
4180
- };
4720
+ type UpdateFileMetadataResponse = UpdateFileMetadataResponses[keyof UpdateFileMetadataResponses];
4721
+ type DownloadFileBase64Data = {
4722
+ body?: never;
4181
4723
  path: {
4182
4724
  /**
4183
- * Document ID
4725
+ * File ID
4184
4726
  */
4185
- document_id: string;
4727
+ file_id: string;
4186
4728
  };
4187
4729
  query?: never;
4188
- url: '/api/v1/documents/{document_id}/tags';
4730
+ url: '/api/v1/files/{file_id}/download/base64';
4189
4731
  };
4190
- type ReplaceDocumentTagsErrors = {
4732
+ type DownloadFileBase64Errors = {
4191
4733
  /**
4192
- * Unauthorized
4734
+ * Authentication required
4193
4735
  */
4194
4736
  401: ErrorResponse;
4195
4737
  /**
4196
- * Forbidden
4738
+ * Insufficient permissions
4197
4739
  */
4198
4740
  403: ErrorResponse;
4199
4741
  /**
4200
- * Document not found
4742
+ * File not found
4201
4743
  */
4202
4744
  404: ErrorResponse;
4203
4745
  };
4204
- type ReplaceDocumentTagsError = ReplaceDocumentTagsErrors[keyof ReplaceDocumentTagsErrors];
4205
- type ReplaceDocumentTagsResponses = {
4206
- /**
4207
- * Tags replaced
4208
- */
4209
- 200: {
4210
- [key: string]: string;
4211
- };
4212
- };
4213
- type ReplaceDocumentTagsResponse = ReplaceDocumentTagsResponses[keyof ReplaceDocumentTagsResponses];
4214
- type ListFilesData = {
4215
- body?: never;
4216
- path?: never;
4217
- query?: {
4218
- /**
4219
- * Filter files by project ID
4220
- */
4221
- project_id?: string;
4222
- /**
4223
- * Maximum number of results to return
4224
- */
4225
- limit?: number;
4226
- /**
4227
- * Number of results to skip
4228
- */
4229
- offset?: number;
4230
- };
4231
- url: '/api/v1/files';
4232
- };
4233
- type ListFilesErrors = {
4234
- /**
4235
- * Internal server error
4236
- */
4237
- 500: ErrorResponse;
4238
- };
4239
- type ListFilesError = ListFilesErrors[keyof ListFilesErrors];
4240
- type ListFilesResponses = {
4746
+ type DownloadFileBase64Error = DownloadFileBase64Errors[keyof DownloadFileBase64Errors];
4747
+ type DownloadFileBase64Responses = {
4241
4748
  /**
4242
- * List of files returned successfully
4749
+ * File content as base64
4243
4750
  */
4244
4751
  200: {
4245
- data?: Array<FileRecord>;
4246
- total?: number;
4247
- limit?: number;
4248
- offset?: number;
4249
- };
4250
- };
4251
- type ListFilesResponse = ListFilesResponses[keyof ListFilesResponses];
4252
- type CreateFileData = {
4253
- body: {
4254
- /**
4255
- * Public ID of the project
4256
- */
4257
- project_id: string;
4258
4752
  /**
4259
- * Logical path within the project (e.g. /images/logo.png). Defaults to /filename if omitted.
4753
+ * Base64-encoded file content
4260
4754
  */
4261
- path?: string;
4755
+ content?: string;
4262
4756
  /**
4263
- * Name of the file
4757
+ * Original filename
4264
4758
  */
4265
4759
  filename?: string;
4266
4760
  /**
4267
4761
  * MIME type of the file
4268
4762
  */
4269
- content_type?: string;
4763
+ contentType?: string;
4270
4764
  /**
4271
4765
  * File size in bytes
4272
4766
  */
4273
4767
  size?: number;
4768
+ };
4769
+ };
4770
+ type DownloadFileBase64Response = DownloadFileBase64Responses[keyof DownloadFileBase64Responses];
4771
+ type GetFileTagsData = {
4772
+ body?: never;
4773
+ path: {
4274
4774
  /**
4275
- * Storage backend type
4276
- */
4277
- storage_type: 'local' | 's3' | 'gcs';
4278
- /**
4279
- * Path where the file is stored
4280
- */
4281
- storage_path: string;
4282
- /**
4283
- * JSON string with additional metadata
4775
+ * File ID
4284
4776
  */
4285
- metadata?: string;
4777
+ file_id: string;
4286
4778
  };
4287
- path?: never;
4288
4779
  query?: never;
4289
- url: '/api/v1/files';
4780
+ url: '/api/v1/files/{file_id}/tags';
4290
4781
  };
4291
- type CreateFileErrors = {
4782
+ type GetFileTagsErrors = {
4292
4783
  /**
4293
- * Internal server error
4784
+ * Authentication required
4294
4785
  */
4295
- 500: ErrorResponse;
4786
+ 401: ErrorResponse;
4787
+ /**
4788
+ * Insufficient permissions
4789
+ */
4790
+ 403: ErrorResponse;
4791
+ /**
4792
+ * File not found
4793
+ */
4794
+ 404: ErrorResponse;
4296
4795
  };
4297
- type CreateFileError = CreateFileErrors[keyof CreateFileErrors];
4298
- type CreateFileResponses = {
4796
+ type GetFileTagsError = GetFileTagsErrors[keyof GetFileTagsErrors];
4797
+ type GetFileTagsResponses = {
4299
4798
  /**
4300
- * File created successfully
4799
+ * File tags
4301
4800
  */
4302
- 201: FileRecord;
4801
+ 200: {
4802
+ [key: string]: string;
4803
+ };
4303
4804
  };
4304
- type CreateFileResponse = CreateFileResponses[keyof CreateFileResponses];
4305
- type UploadFileData = {
4805
+ type GetFileTagsResponse = GetFileTagsResponses[keyof GetFileTagsResponses];
4806
+ type MergeFileTagsData = {
4306
4807
  body: {
4808
+ [key: string]: string;
4809
+ };
4810
+ path: {
4307
4811
  /**
4308
- * File content
4309
- */
4310
- file: Blob | File;
4311
- /**
4312
- * Project ID to associate the file with
4313
- */
4314
- project_id: string;
4315
- /**
4316
- * Additional metadata as a JSON string
4812
+ * File ID
4317
4813
  */
4318
- metadata?: string;
4814
+ file_id: string;
4319
4815
  };
4320
- path?: never;
4321
4816
  query?: never;
4322
- url: '/api/v1/files/upload';
4817
+ url: '/api/v1/files/{file_id}/tags';
4323
4818
  };
4324
- type UploadFileErrors = {
4325
- /**
4326
- * Missing file or invalid project
4327
- */
4328
- 400: ErrorResponse;
4819
+ type MergeFileTagsErrors = {
4329
4820
  /**
4330
4821
  * Authentication required
4331
4822
  */
@@ -4334,26 +4825,35 @@ type UploadFileErrors = {
4334
4825
  * Insufficient permissions
4335
4826
  */
4336
4827
  403: ErrorResponse;
4828
+ /**
4829
+ * File not found
4830
+ */
4831
+ 404: ErrorResponse;
4337
4832
  };
4338
- type UploadFileError = UploadFileErrors[keyof UploadFileErrors];
4339
- type UploadFileResponses = {
4833
+ type MergeFileTagsError = MergeFileTagsErrors[keyof MergeFileTagsErrors];
4834
+ type MergeFileTagsResponses = {
4340
4835
  /**
4341
- * File uploaded successfully
4836
+ * Tags merged
4342
4837
  */
4343
- 201: FileRecord;
4838
+ 200: {
4839
+ [key: string]: string;
4840
+ };
4344
4841
  };
4345
- type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];
4346
- type UploadFileBase64Data = {
4347
- body: UploadFileBase64Request;
4348
- path?: never;
4842
+ type MergeFileTagsResponse = MergeFileTagsResponses[keyof MergeFileTagsResponses];
4843
+ type ReplaceFileTagsData = {
4844
+ body: {
4845
+ [key: string]: string;
4846
+ };
4847
+ path: {
4848
+ /**
4849
+ * File ID
4850
+ */
4851
+ file_id: string;
4852
+ };
4349
4853
  query?: never;
4350
- url: '/api/v1/files/upload/base64';
4854
+ url: '/api/v1/files/{file_id}/tags';
4351
4855
  };
4352
- type UploadFileBase64Errors = {
4353
- /**
4354
- * Missing content or invalid project
4355
- */
4356
- 400: ErrorResponse;
4856
+ type ReplaceFileTagsErrors = {
4357
4857
  /**
4358
4858
  * Authentication required
4359
4859
  */
@@ -4362,307 +4862,297 @@ type UploadFileBase64Errors = {
4362
4862
  * Insufficient permissions
4363
4863
  */
4364
4864
  403: ErrorResponse;
4865
+ /**
4866
+ * File not found
4867
+ */
4868
+ 404: ErrorResponse;
4365
4869
  };
4366
- type UploadFileBase64Error = UploadFileBase64Errors[keyof UploadFileBase64Errors];
4367
- type UploadFileBase64Responses = {
4870
+ type ReplaceFileTagsError = ReplaceFileTagsErrors[keyof ReplaceFileTagsErrors];
4871
+ type ReplaceFileTagsResponses = {
4368
4872
  /**
4369
- * File uploaded successfully
4873
+ * Tags replaced
4370
4874
  */
4371
- 201: FileRecord;
4875
+ 200: {
4876
+ [key: string]: string;
4877
+ };
4372
4878
  };
4373
- type UploadFileBase64Response = UploadFileBase64Responses[keyof UploadFileBase64Responses];
4374
- type DeleteFileData = {
4375
- body?: never;
4376
- path: {
4377
- /**
4378
- * ID of the file to delete
4379
- */
4380
- file_id: string;
4879
+ type ReplaceFileTagsResponse = ReplaceFileTagsResponses[keyof ReplaceFileTagsResponses];
4880
+ type ValidateFormationData = {
4881
+ body: {
4882
+ template: FormationTemplateInput;
4381
4883
  };
4884
+ path?: never;
4382
4885
  query?: never;
4383
- url: '/api/v1/files/{file_id}';
4886
+ url: '/api/v1/formations/validate';
4384
4887
  };
4385
- type DeleteFileErrors = {
4888
+ type ValidateFormationErrors = {
4386
4889
  /**
4387
- * File not found
4388
- */
4389
- 404: ErrorResponse;
4390
- /**
4391
- * Internal server error
4890
+ * Unauthorized
4392
4891
  */
4393
- 500: ErrorResponse;
4892
+ 401: unknown;
4394
4893
  };
4395
- type DeleteFileError = DeleteFileErrors[keyof DeleteFileErrors];
4396
- type DeleteFileResponses = {
4894
+ type ValidateFormationResponses = {
4397
4895
  /**
4398
- * File deleted successfully
4896
+ * Validation result
4399
4897
  */
4400
- 204: void;
4898
+ 200: ValidationResult;
4401
4899
  };
4402
- type DeleteFileResponse = DeleteFileResponses[keyof DeleteFileResponses];
4403
- type GetFileData = {
4404
- body?: never;
4405
- path: {
4900
+ type ValidateFormationResponse = ValidateFormationResponses[keyof ValidateFormationResponses];
4901
+ type PlanFormationData = {
4902
+ body: {
4406
4903
  /**
4407
- * File ID
4904
+ * Project ID
4408
4905
  */
4409
- file_id: string;
4906
+ project_id: string;
4907
+ /**
4908
+ * Existing formation ID to compare against. Omit for new formation planning.
4909
+ */
4910
+ formation_id?: string;
4911
+ template: FormationTemplateInput;
4912
+ /**
4913
+ * Runtime parameter values that override or supply template parameter defaults. Keys must match parameter names declared in `template.parameters`.
4914
+ *
4915
+ */
4916
+ parameters?: {
4917
+ [key: string]: string;
4918
+ } | null;
4410
4919
  };
4920
+ path?: never;
4411
4921
  query?: never;
4412
- url: '/api/v1/files/{file_id}';
4922
+ url: '/api/v1/formations/plan';
4413
4923
  };
4414
- type GetFileErrors = {
4924
+ type PlanFormationErrors = {
4415
4925
  /**
4416
- * File not found
4926
+ * Bad Request
4417
4927
  */
4418
- 404: ErrorResponse;
4928
+ 400: unknown;
4419
4929
  /**
4420
- * Internal server error
4930
+ * Unauthorized
4421
4931
  */
4422
- 500: ErrorResponse;
4932
+ 401: unknown;
4933
+ /**
4934
+ * Forbidden
4935
+ */
4936
+ 403: unknown;
4423
4937
  };
4424
- type GetFileError = GetFileErrors[keyof GetFileErrors];
4425
- type GetFileResponses = {
4938
+ type PlanFormationResponses = {
4426
4939
  /**
4427
- * File found
4940
+ * Plan result
4428
4941
  */
4429
- 200: FileRecord;
4942
+ 200: PlanResult;
4430
4943
  };
4431
- type GetFileResponse = GetFileResponses[keyof GetFileResponses];
4432
- type DownloadFileData = {
4944
+ type PlanFormationResponse = PlanFormationResponses[keyof PlanFormationResponses];
4945
+ type ListFormationsData = {
4433
4946
  body?: never;
4434
- path: {
4947
+ path?: never;
4948
+ query?: {
4435
4949
  /**
4436
- * File ID
4950
+ * Project ID (required if not using project key auth)
4437
4951
  */
4438
- file_id: string;
4952
+ project_id?: string;
4439
4953
  };
4440
- query?: never;
4441
- url: '/api/v1/files/{file_id}/download';
4954
+ url: '/api/v1/formations';
4442
4955
  };
4443
- type DownloadFileErrors = {
4444
- /**
4445
- * Authentication required
4446
- */
4447
- 401: ErrorResponse;
4956
+ type ListFormationsErrors = {
4448
4957
  /**
4449
- * Insufficient permissions
4958
+ * Unauthorized
4450
4959
  */
4451
- 403: ErrorResponse;
4960
+ 401: unknown;
4452
4961
  /**
4453
- * File not found
4962
+ * Forbidden
4454
4963
  */
4455
- 404: ErrorResponse;
4964
+ 403: unknown;
4456
4965
  };
4457
- type DownloadFileError = DownloadFileErrors[keyof DownloadFileErrors];
4458
- type DownloadFileResponses = {
4966
+ type ListFormationsResponses = {
4459
4967
  /**
4460
- * File content
4968
+ * List of formations
4461
4969
  */
4462
- 200: Blob | File;
4970
+ 200: Array<Formation>;
4463
4971
  };
4464
- type DownloadFileResponse = DownloadFileResponses[keyof DownloadFileResponses];
4465
- type UpdateFileMetadataData = {
4972
+ type ListFormationsResponse = ListFormationsResponses[keyof ListFormationsResponses];
4973
+ type CreateFormationData = {
4466
4974
  body: {
4467
4975
  /**
4468
- * New metadata as a JSON string
4976
+ * Project ID
4469
4977
  */
4470
- metadata?: string;
4978
+ project_id: string;
4471
4979
  /**
4472
- * New filename for the file
4980
+ * Human-readable name for the formation stack
4473
4981
  */
4474
- filename?: string;
4475
- };
4476
- path: {
4982
+ name: string;
4983
+ template: FormationTemplateInput;
4477
4984
  /**
4478
- * File ID
4985
+ * Runtime parameter values that override or supply template parameter defaults. Keys must match parameter names declared in `template.parameters`. Required parameters (those without a default) must be provided here.
4986
+ *
4479
4987
  */
4480
- file_id: string;
4988
+ parameters?: {
4989
+ [key: string]: string;
4990
+ } | null;
4991
+ metadata?: {
4992
+ [key: string]: unknown;
4993
+ } | null;
4481
4994
  };
4995
+ path?: never;
4482
4996
  query?: never;
4483
- url: '/api/v1/files/{file_id}/metadata';
4997
+ url: '/api/v1/formations';
4484
4998
  };
4485
- type UpdateFileMetadataErrors = {
4999
+ type CreateFormationErrors = {
5000
+ /**
5001
+ * Bad Request
5002
+ */
5003
+ 400: unknown;
4486
5004
  /**
4487
- * Authentication required
5005
+ * Unauthorized
4488
5006
  */
4489
- 401: ErrorResponse;
5007
+ 401: unknown;
4490
5008
  /**
4491
- * Insufficient permissions
5009
+ * Forbidden
4492
5010
  */
4493
- 403: ErrorResponse;
5011
+ 403: unknown;
4494
5012
  /**
4495
- * File not found
5013
+ * Formation with this name already exists
4496
5014
  */
4497
- 404: ErrorResponse;
5015
+ 409: unknown;
4498
5016
  };
4499
- type UpdateFileMetadataError = UpdateFileMetadataErrors[keyof UpdateFileMetadataErrors];
4500
- type UpdateFileMetadataResponses = {
5017
+ type CreateFormationResponses = {
4501
5018
  /**
4502
- * Metadata updated successfully
5019
+ * Formation created
4503
5020
  */
4504
- 200: FileRecord;
5021
+ 201: Formation;
4505
5022
  };
4506
- type UpdateFileMetadataResponse = UpdateFileMetadataResponses[keyof UpdateFileMetadataResponses];
4507
- type DownloadFileBase64Data = {
5023
+ type CreateFormationResponse = CreateFormationResponses[keyof CreateFormationResponses];
5024
+ type DeleteFormationData = {
4508
5025
  body?: never;
4509
5026
  path: {
4510
- /**
4511
- * File ID
4512
- */
4513
- file_id: string;
5027
+ formation_id: string;
4514
5028
  };
4515
5029
  query?: never;
4516
- url: '/api/v1/files/{file_id}/download/base64';
5030
+ url: '/api/v1/formations/{formation_id}';
4517
5031
  };
4518
- type DownloadFileBase64Errors = {
5032
+ type DeleteFormationErrors = {
4519
5033
  /**
4520
- * Authentication required
5034
+ * Unauthorized
4521
5035
  */
4522
- 401: ErrorResponse;
5036
+ 401: unknown;
4523
5037
  /**
4524
- * Insufficient permissions
5038
+ * Forbidden
4525
5039
  */
4526
- 403: ErrorResponse;
5040
+ 403: unknown;
4527
5041
  /**
4528
- * File not found
5042
+ * Not Found
4529
5043
  */
4530
- 404: ErrorResponse;
5044
+ 404: unknown;
4531
5045
  };
4532
- type DownloadFileBase64Error = DownloadFileBase64Errors[keyof DownloadFileBase64Errors];
4533
- type DownloadFileBase64Responses = {
5046
+ type DeleteFormationResponses = {
4534
5047
  /**
4535
- * File content as base64
5048
+ * Deleted
4536
5049
  */
4537
- 200: {
4538
- /**
4539
- * Base64-encoded file content
4540
- */
4541
- content?: string;
4542
- /**
4543
- * Original filename
4544
- */
4545
- filename?: string;
4546
- /**
4547
- * MIME type of the file
4548
- */
4549
- contentType?: string;
4550
- /**
4551
- * File size in bytes
4552
- */
4553
- size?: number;
4554
- };
5050
+ 204: void;
4555
5051
  };
4556
- type DownloadFileBase64Response = DownloadFileBase64Responses[keyof DownloadFileBase64Responses];
4557
- type GetFileTagsData = {
5052
+ type DeleteFormationResponse = DeleteFormationResponses[keyof DeleteFormationResponses];
5053
+ type GetFormationData = {
4558
5054
  body?: never;
4559
5055
  path: {
4560
- /**
4561
- * File ID
4562
- */
4563
- file_id: string;
5056
+ formation_id: string;
4564
5057
  };
4565
5058
  query?: never;
4566
- url: '/api/v1/files/{file_id}/tags';
5059
+ url: '/api/v1/formations/{formation_id}';
4567
5060
  };
4568
- type GetFileTagsErrors = {
5061
+ type GetFormationErrors = {
4569
5062
  /**
4570
- * Authentication required
5063
+ * Unauthorized
4571
5064
  */
4572
- 401: ErrorResponse;
5065
+ 401: unknown;
4573
5066
  /**
4574
- * Insufficient permissions
5067
+ * Forbidden
4575
5068
  */
4576
- 403: ErrorResponse;
5069
+ 403: unknown;
4577
5070
  /**
4578
- * File not found
5071
+ * Not Found
4579
5072
  */
4580
- 404: ErrorResponse;
5073
+ 404: unknown;
4581
5074
  };
4582
- type GetFileTagsError = GetFileTagsErrors[keyof GetFileTagsErrors];
4583
- type GetFileTagsResponses = {
5075
+ type GetFormationResponses = {
4584
5076
  /**
4585
- * File tags
5077
+ * Formation details
4586
5078
  */
4587
- 200: {
4588
- [key: string]: string;
4589
- };
5079
+ 200: Formation;
4590
5080
  };
4591
- type GetFileTagsResponse = GetFileTagsResponses[keyof GetFileTagsResponses];
4592
- type MergeFileTagsData = {
4593
- body: {
4594
- [key: string]: string;
4595
- };
4596
- path: {
5081
+ type GetFormationResponse = GetFormationResponses[keyof GetFormationResponses];
5082
+ type UpdateFormationData = {
5083
+ body?: {
5084
+ template?: FormationTemplateInput;
4597
5085
  /**
4598
- * File ID
5086
+ * Runtime parameter values that override or supply template parameter defaults. Keys must match parameter names declared in `template.parameters`. Required parameters (those without a default) must be provided here.
5087
+ *
4599
5088
  */
4600
- file_id: string;
5089
+ parameters?: {
5090
+ [key: string]: string;
5091
+ } | null;
5092
+ metadata?: {
5093
+ [key: string]: unknown;
5094
+ } | null;
5095
+ };
5096
+ path: {
5097
+ formation_id: string;
4601
5098
  };
4602
5099
  query?: never;
4603
- url: '/api/v1/files/{file_id}/tags';
5100
+ url: '/api/v1/formations/{formation_id}';
4604
5101
  };
4605
- type MergeFileTagsErrors = {
5102
+ type UpdateFormationErrors = {
4606
5103
  /**
4607
- * Authentication required
5104
+ * Bad Request
4608
5105
  */
4609
- 401: ErrorResponse;
5106
+ 400: unknown;
4610
5107
  /**
4611
- * Insufficient permissions
5108
+ * Unauthorized
4612
5109
  */
4613
- 403: ErrorResponse;
5110
+ 401: unknown;
4614
5111
  /**
4615
- * File not found
5112
+ * Forbidden
4616
5113
  */
4617
- 404: ErrorResponse;
5114
+ 403: unknown;
5115
+ /**
5116
+ * Not Found
5117
+ */
5118
+ 404: unknown;
4618
5119
  };
4619
- type MergeFileTagsError = MergeFileTagsErrors[keyof MergeFileTagsErrors];
4620
- type MergeFileTagsResponses = {
5120
+ type UpdateFormationResponses = {
4621
5121
  /**
4622
- * Tags merged
5122
+ * Updated formation
4623
5123
  */
4624
- 200: {
4625
- [key: string]: string;
4626
- };
5124
+ 200: Formation;
4627
5125
  };
4628
- type MergeFileTagsResponse = MergeFileTagsResponses[keyof MergeFileTagsResponses];
4629
- type ReplaceFileTagsData = {
4630
- body: {
4631
- [key: string]: string;
4632
- };
5126
+ type UpdateFormationResponse = UpdateFormationResponses[keyof UpdateFormationResponses];
5127
+ type ListFormationEventsData = {
5128
+ body?: never;
4633
5129
  path: {
4634
- /**
4635
- * File ID
4636
- */
4637
- file_id: string;
5130
+ formation_id: string;
4638
5131
  };
4639
5132
  query?: never;
4640
- url: '/api/v1/files/{file_id}/tags';
5133
+ url: '/api/v1/formations/{formation_id}/events';
4641
5134
  };
4642
- type ReplaceFileTagsErrors = {
5135
+ type ListFormationEventsErrors = {
4643
5136
  /**
4644
- * Authentication required
5137
+ * Unauthorized
4645
5138
  */
4646
- 401: ErrorResponse;
5139
+ 401: unknown;
4647
5140
  /**
4648
- * Insufficient permissions
5141
+ * Forbidden
4649
5142
  */
4650
- 403: ErrorResponse;
5143
+ 403: unknown;
4651
5144
  /**
4652
- * File not found
5145
+ * Not Found
4653
5146
  */
4654
- 404: ErrorResponse;
5147
+ 404: unknown;
4655
5148
  };
4656
- type ReplaceFileTagsError = ReplaceFileTagsErrors[keyof ReplaceFileTagsErrors];
4657
- type ReplaceFileTagsResponses = {
5149
+ type ListFormationEventsResponses = {
4658
5150
  /**
4659
- * Tags replaced
5151
+ * List of operations
4660
5152
  */
4661
- 200: {
4662
- [key: string]: string;
4663
- };
5153
+ 200: Array<FormationOperation>;
4664
5154
  };
4665
- type ReplaceFileTagsResponse = ReplaceFileTagsResponses[keyof ReplaceFileTagsResponses];
5155
+ type ListFormationEventsResponse = ListFormationEventsResponses[keyof ListFormationEventsResponses];
4666
5156
  type SearchKnowledgeData = {
4667
5157
  body: {
4668
5158
  /**
@@ -6722,62 +7212,6 @@ declare class Actors {
6722
7212
  */
6723
7213
  static replaceActorTags<ThrowOnError extends boolean = false>(options: Options<ReplaceActorTagsData, ThrowOnError>): RequestResult<ReplaceActorTagsResponses, ReplaceActorTagsErrors, ThrowOnError, "fields">;
6724
7214
  }
6725
- declare class AgentFormations {
6726
- /**
6727
- * Validate a formation template
6728
- *
6729
- * 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.
6730
- *
6731
- */
6732
- static validateAgentFormation<ThrowOnError extends boolean = false>(options: Options<ValidateAgentFormationData, ThrowOnError>): RequestResult<ValidateAgentFormationResponses, ValidateAgentFormationErrors, ThrowOnError, "fields">;
6733
- /**
6734
- * Plan a formation deployment
6735
- *
6736
- * Computes a diff between the desired template and the current stack state without making any changes. Returns the list of planned actions.
6737
- *
6738
- */
6739
- static planAgentFormation<ThrowOnError extends boolean = false>(options: Options<PlanAgentFormationData, ThrowOnError>): RequestResult<PlanAgentFormationResponses, PlanAgentFormationErrors, ThrowOnError, "fields">;
6740
- /**
6741
- * List agent formations
6742
- *
6743
- * Returns all formation stacks for a project
6744
- */
6745
- static listAgentFormations<ThrowOnError extends boolean = false>(options?: Options<ListAgentFormationsData, ThrowOnError>): RequestResult<ListAgentFormationsResponses, ListAgentFormationsErrors, ThrowOnError, "fields">;
6746
- /**
6747
- * Create a new agent formation
6748
- *
6749
- * Validates the template, creates the formation record, then provisions all declared resources in dependency order.
6750
- *
6751
- */
6752
- static createAgentFormation<ThrowOnError extends boolean = false>(options: Options<CreateAgentFormationData, ThrowOnError>): RequestResult<CreateAgentFormationResponses, CreateAgentFormationErrors, ThrowOnError, "fields">;
6753
- /**
6754
- * Delete an agent formation
6755
- *
6756
- * Deletes the formation stack and all its managed resources in reverse dependency order.
6757
- *
6758
- */
6759
- static deleteAgentFormation<ThrowOnError extends boolean = false>(options: Options<DeleteAgentFormationData, ThrowOnError>): RequestResult<DeleteAgentFormationResponses, DeleteAgentFormationErrors, ThrowOnError, "fields">;
6760
- /**
6761
- * Get a specific agent formation
6762
- *
6763
- * Returns the formation stack including its current resources.
6764
- */
6765
- static getAgentFormation<ThrowOnError extends boolean = false>(options: Options<GetAgentFormationData, ThrowOnError>): RequestResult<GetAgentFormationResponses, GetAgentFormationErrors, ThrowOnError, "fields">;
6766
- /**
6767
- * Update an agent formation
6768
- *
6769
- * Applies a new template to the formation. Resources are created, updated, or deleted to reconcile the current state with the desired state.
6770
- *
6771
- */
6772
- static updateAgentFormation<ThrowOnError extends boolean = false>(options: Options<UpdateAgentFormationData, ThrowOnError>): RequestResult<UpdateAgentFormationResponses, UpdateAgentFormationErrors, ThrowOnError, "fields">;
6773
- /**
6774
- * List formation operation events
6775
- *
6776
- * Returns all operations (create, update, delete) with their event logs for the formation, ordered chronologically.
6777
- *
6778
- */
6779
- static listAgentFormationEvents<ThrowOnError extends boolean = false>(options: Options<ListAgentFormationEventsData, ThrowOnError>): RequestResult<ListAgentFormationEventsResponses, ListAgentFormationEventsErrors, ThrowOnError, "fields">;
6780
- }
6781
7215
  declare class AgentTools {
6782
7216
  /**
6783
7217
  * List agent tools
@@ -7182,6 +7616,62 @@ declare class Files {
7182
7616
  */
7183
7617
  static replaceFileTags<ThrowOnError extends boolean = false>(options: Options<ReplaceFileTagsData, ThrowOnError>): RequestResult<ReplaceFileTagsResponses, ReplaceFileTagsErrors, ThrowOnError, "fields">;
7184
7618
  }
7619
+ declare class Formations {
7620
+ /**
7621
+ * Validate a formation template
7622
+ *
7623
+ * 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.
7624
+ *
7625
+ */
7626
+ static validateFormation<ThrowOnError extends boolean = false>(options: Options<ValidateFormationData, ThrowOnError>): RequestResult<ValidateFormationResponses, ValidateFormationErrors, ThrowOnError, "fields">;
7627
+ /**
7628
+ * Plan a formation deployment
7629
+ *
7630
+ * Computes a diff between the desired template and the current stack state without making any changes. Returns the list of planned actions.
7631
+ *
7632
+ */
7633
+ static planFormation<ThrowOnError extends boolean = false>(options: Options<PlanFormationData, ThrowOnError>): RequestResult<PlanFormationResponses, PlanFormationErrors, ThrowOnError, "fields">;
7634
+ /**
7635
+ * List formations
7636
+ *
7637
+ * Returns all formation stacks for a project
7638
+ */
7639
+ static listFormations<ThrowOnError extends boolean = false>(options?: Options<ListFormationsData, ThrowOnError>): RequestResult<ListFormationsResponses, ListFormationsErrors, ThrowOnError, "fields">;
7640
+ /**
7641
+ * Create a new formation
7642
+ *
7643
+ * Validates the template, creates the formation record, then provisions all declared resources in dependency order.
7644
+ *
7645
+ */
7646
+ static createFormation<ThrowOnError extends boolean = false>(options: Options<CreateFormationData, ThrowOnError>): RequestResult<CreateFormationResponses, CreateFormationErrors, ThrowOnError, "fields">;
7647
+ /**
7648
+ * Delete an formation
7649
+ *
7650
+ * Deletes the formation stack and all its managed resources in reverse dependency order.
7651
+ *
7652
+ */
7653
+ static deleteFormation<ThrowOnError extends boolean = false>(options: Options<DeleteFormationData, ThrowOnError>): RequestResult<DeleteFormationResponses, DeleteFormationErrors, ThrowOnError, "fields">;
7654
+ /**
7655
+ * Get a specific formation
7656
+ *
7657
+ * Returns the formation stack including its current resources.
7658
+ */
7659
+ static getFormation<ThrowOnError extends boolean = false>(options: Options<GetFormationData, ThrowOnError>): RequestResult<GetFormationResponses, GetFormationErrors, ThrowOnError, "fields">;
7660
+ /**
7661
+ * Update an formation
7662
+ *
7663
+ * Applies a new template to the formation. Resources are created, updated, or deleted to reconcile the current state with the desired state.
7664
+ *
7665
+ */
7666
+ static updateFormation<ThrowOnError extends boolean = false>(options: Options<UpdateFormationData, ThrowOnError>): RequestResult<UpdateFormationResponses, UpdateFormationErrors, ThrowOnError, "fields">;
7667
+ /**
7668
+ * List formation operation events
7669
+ *
7670
+ * Returns all operations (create, update, delete) with their event logs for the formation, ordered chronologically.
7671
+ *
7672
+ */
7673
+ static listFormationEvents<ThrowOnError extends boolean = false>(options: Options<ListFormationEventsData, ThrowOnError>): RequestResult<ListFormationEventsResponses, ListFormationEventsErrors, ThrowOnError, "fields">;
7674
+ }
7185
7675
  declare class Knowledge {
7186
7676
  /**
7187
7677
  * Search knowledge
@@ -7599,4 +8089,4 @@ declare class SoatClient {
7599
8089
  constructor({ baseUrl, token, headers }?: SoatClientOptions);
7600
8090
  }
7601
8091
 
7602
- export { type ActorRecord, Actors, type AddConversationMessageData, type AddConversationMessageError, type AddConversationMessageErrors, type AddConversationMessageResponse, type AddConversationMessageResponses, type AddSessionMessageData, type AddSessionMessageError, type AddSessionMessageErrors, type AddSessionMessageRequest, type AddSessionMessageResponse, type AddSessionMessageResponse2, type AddSessionMessageResponses, type AddSessionMessageSaved, type Agent, type AgentFormation, type AgentFormationResource, AgentFormations, type AgentGenerationResponse, type AgentId, type AgentTool, AgentTools, Agents, AiProviders, type ApiKeyCreated, type ApiKeyRecord, ApiKeys, type AttachUserPoliciesData, type AttachUserPoliciesError, type AttachUserPoliciesErrors, type AttachUserPoliciesResponse, type AttachUserPoliciesResponses, type BootstrapUserData, type BootstrapUserError, type BootstrapUserErrors, type BootstrapUserResponse, type BootstrapUserResponses, type Chat, type ChatCompletionChoice, type ChatCompletionForChatRequest, type ChatCompletionRequest, type ChatCompletionResponse, type ChatCompletionResponseMessage, type ChatMessage, type ChatMessageInput, Chats, type ClientOptions, type ConversationActorRecord, type ConversationMessageRecord, type ConversationRecord, Conversations, type CreateActorData, type CreateActorError, type CreateActorErrors, type CreateActorResponse, type CreateActorResponses, type CreateAgentActorData, type CreateAgentActorError, type CreateAgentActorErrors, type CreateAgentActorResponse, type CreateAgentActorResponses, type CreateAgentData, type CreateAgentError, type CreateAgentErrors, type CreateAgentFormationData, type CreateAgentFormationErrors, type CreateAgentFormationResponse, type CreateAgentFormationResponses, type CreateAgentGenerationData, type CreateAgentGenerationError, type CreateAgentGenerationErrors, type CreateAgentGenerationRequest, type CreateAgentGenerationResponse, type CreateAgentGenerationResponses, type CreateAgentRequest, type CreateAgentResponse, type CreateAgentResponses, type CreateAgentSessionData, type CreateAgentSessionError, type CreateAgentSessionErrors, type CreateAgentSessionResponse, type CreateAgentSessionResponses, type CreateAgentToolData, type CreateAgentToolError, type CreateAgentToolErrors, type CreateAgentToolRequest, type CreateAgentToolResponse, type CreateAgentToolResponses, type CreateAiProviderData, type CreateAiProviderErrors, type CreateAiProviderResponse, type CreateAiProviderResponses, type CreateApiKeyData, type CreateApiKeyError, type CreateApiKeyErrors, type CreateApiKeyResponse, type CreateApiKeyResponses, type CreateChatActorData, type CreateChatActorError, type CreateChatActorErrors, type CreateChatActorResponse, type CreateChatActorResponses, type CreateChatCompletionData, type CreateChatCompletionError, type CreateChatCompletionErrors, type CreateChatCompletionForChatData, type CreateChatCompletionForChatError, type CreateChatCompletionForChatErrors, type CreateChatCompletionForChatResponse, type CreateChatCompletionForChatResponses, type CreateChatCompletionResponse, type CreateChatCompletionResponses, type CreateChatData, type CreateChatError, type CreateChatErrors, type CreateChatRequest, type CreateChatResponse, type CreateChatResponses, type CreateConversationData, type CreateConversationError, type CreateConversationErrors, type CreateConversationResponse, type CreateConversationResponses, type CreateDocumentData, type CreateDocumentError, type CreateDocumentErrors, type CreateDocumentResponse, type CreateDocumentResponses, type CreateFileData, type CreateFileError, type CreateFileErrors, type CreateFileResponse, type CreateFileResponses, type CreateMemoryData, type CreateMemoryEntryData, type CreateMemoryEntryErrors, type CreateMemoryEntryResponse, type CreateMemoryEntryResponses, type CreateMemoryErrors, type CreateMemoryResponse, type CreateMemoryResponses, type CreatePolicyData, type CreatePolicyError, type CreatePolicyErrors, type CreatePolicyResponse, type CreatePolicyResponses, type CreateProjectData, type CreateProjectErrors, type CreateProjectResponse, type CreateProjectResponses, type CreateSecretData, type CreateSecretErrors, type CreateSecretResponse, type CreateSecretResponses, type CreateSessionRequest, type CreateUserData, type CreateUserError, type CreateUserErrors, type CreateUserResponse, type CreateUserResponses, type CreateWebhookData, type CreateWebhookErrors, type CreateWebhookRequest, type CreateWebhookResponse, type CreateWebhookResponses, type DeleteActorData, type DeleteActorError, type DeleteActorErrors, type DeleteActorResponse, type DeleteActorResponses, type DeleteAgentData, type DeleteAgentError, type DeleteAgentErrors, type DeleteAgentFormationData, type DeleteAgentFormationErrors, type DeleteAgentFormationResponse, type DeleteAgentFormationResponses, type DeleteAgentResponse, type DeleteAgentResponses, type DeleteAgentSessionData, type DeleteAgentSessionError, type DeleteAgentSessionErrors, type DeleteAgentSessionResponse, type DeleteAgentSessionResponses, type DeleteAgentToolData, type DeleteAgentToolError, type DeleteAgentToolErrors, type DeleteAgentToolResponse, type DeleteAgentToolResponses, type DeleteAiProviderData, type DeleteAiProviderErrors, type DeleteAiProviderResponses, type DeleteApiKeyData, type DeleteApiKeyErrors, type DeleteApiKeyResponse, type DeleteApiKeyResponses, type DeleteChatData, type DeleteChatError, type DeleteChatErrors, type DeleteChatResponse, type DeleteChatResponses, type DeleteConversationData, type DeleteConversationError, type DeleteConversationErrors, type DeleteConversationResponse, type DeleteConversationResponses, type DeleteDocumentData, type DeleteDocumentError, type DeleteDocumentErrors, type DeleteDocumentResponse, type DeleteDocumentResponses, type DeleteFileData, type DeleteFileError, type DeleteFileErrors, type DeleteFileResponse, type DeleteFileResponses, type DeleteMemoryData, type DeleteMemoryEntryData, type DeleteMemoryEntryErrors, type DeleteMemoryEntryResponse, type DeleteMemoryEntryResponses, type DeleteMemoryErrors, type DeleteMemoryResponse, type DeleteMemoryResponses, type DeletePolicyData, type DeletePolicyErrors, type DeletePolicyResponse, type DeletePolicyResponses, type DeleteProjectData, type DeleteProjectErrors, type DeleteProjectResponse, type DeleteProjectResponses, type DeleteSecretData, type DeleteSecretErrors, type DeleteSecretResponses, type DeleteUserData, type DeleteUserError, type DeleteUserErrors, type DeleteUserResponse, type DeleteUserResponses, type DeleteWebhookData, type DeleteWebhookErrors, type DeleteWebhookResponse, type DeleteWebhookResponses, type Delivery, type DeliveryListResponse, type DocumentKnowledgeResult, type DocumentRecord, Documents, type DownloadFileBase64Data, type DownloadFileBase64Error, type DownloadFileBase64Errors, type DownloadFileBase64Response, type DownloadFileBase64Responses, type DownloadFileData, type DownloadFileError, type DownloadFileErrors, type DownloadFileResponse, type DownloadFileResponses, type ErrorResponse, type FileRecord, Files, type FormationEvent, type FormationOperation, type FormationTemplate, type FormationTemplateInput, type GenerateConversationMessageCompleted, type GenerateConversationMessageData, type GenerateConversationMessageError, type GenerateConversationMessageErrors, type GenerateConversationMessageRequiresAction, type GenerateConversationMessageResponse, type GenerateConversationMessageResponse2, type GenerateConversationMessageResponses, type GenerateSessionRequest, type GenerateSessionResponse, type GenerateSessionResponseData, type GenerateSessionResponseError, type GenerateSessionResponseErrors, type GenerateSessionResponseResponse, type GenerateSessionResponseResponses, type GetActorData, type GetActorError, type GetActorErrors, type GetActorResponse, type GetActorResponses, type GetActorTagsData, type GetActorTagsError, type GetActorTagsErrors, type GetActorTagsResponse, type GetActorTagsResponses, type GetAgentData, type GetAgentError, type GetAgentErrors, type GetAgentFormationData, type GetAgentFormationErrors, type GetAgentFormationResponse, type GetAgentFormationResponses, type GetAgentResponse, type GetAgentResponses, type GetAgentSessionData, type GetAgentSessionError, type GetAgentSessionErrors, type GetAgentSessionResponse, type GetAgentSessionResponses, type GetAgentToolData, type GetAgentToolError, type GetAgentToolErrors, type GetAgentToolResponse, type GetAgentToolResponses, type GetAiProviderData, type GetAiProviderErrors, type GetAiProviderResponse, type GetAiProviderResponses, type GetApiKeyData, type GetApiKeyErrors, type GetApiKeyResponse, type GetApiKeyResponses, type GetChatData, type GetChatError, type GetChatErrors, type GetChatResponse, type GetChatResponses, type GetConversationData, type GetConversationError, type GetConversationErrors, type GetConversationResponse, type GetConversationResponses, type GetConversationTagsData, type GetConversationTagsError, type GetConversationTagsErrors, type GetConversationTagsResponse, type GetConversationTagsResponses, type GetDocumentData, type GetDocumentError, type GetDocumentErrors, type GetDocumentResponse, type GetDocumentResponses, type GetDocumentTagsData, type GetDocumentTagsError, type GetDocumentTagsErrors, type GetDocumentTagsResponse, type GetDocumentTagsResponses, type GetFileData, type GetFileError, type GetFileErrors, type GetFileResponse, type GetFileResponses, type GetFileTagsData, type GetFileTagsError, type GetFileTagsErrors, type GetFileTagsResponse, type GetFileTagsResponses, type GetMemoryData, type GetMemoryEntryData, type GetMemoryEntryErrors, type GetMemoryEntryResponse, type GetMemoryEntryResponses, type GetMemoryErrors, type GetMemoryResponse, type GetMemoryResponses, type GetPolicyData, type GetPolicyErrors, type GetPolicyResponse, type GetPolicyResponses, type GetProjectData, type GetProjectErrors, type GetProjectResponse, type GetProjectResponses, type GetSecretData, type GetSecretErrors, type GetSecretResponse, type GetSecretResponses, type GetSessionTagsData, type GetSessionTagsError, type GetSessionTagsErrors, type GetSessionTagsResponse, type GetSessionTagsResponses, type GetTraceData, type GetTraceError, type GetTraceErrors, type GetTraceResponse, type GetTraceResponses, type GetTraceTreeData, type GetTraceTreeError, type GetTraceTreeErrors, type GetTraceTreeResponse, type GetTraceTreeResponses, type GetUserData, type GetUserError, type GetUserErrors, type GetUserPoliciesData, type GetUserPoliciesErrors, type GetUserPoliciesResponse, type GetUserPoliciesResponses, type GetUserResponse, type GetUserResponses, type GetWebhookData, type GetWebhookDeliveryData, type GetWebhookDeliveryErrors, type GetWebhookDeliveryResponse, type GetWebhookDeliveryResponses, type GetWebhookErrors, type GetWebhookResponse, type GetWebhookResponses, Knowledge, type KnowledgeResult, type ListActorsData, type ListActorsError, type ListActorsErrors, type ListActorsResponse, type ListActorsResponses, type ListAgentFormationEventsData, type ListAgentFormationEventsErrors, type ListAgentFormationEventsResponse, type ListAgentFormationEventsResponses, type ListAgentFormationsData, type ListAgentFormationsErrors, type ListAgentFormationsResponse, type ListAgentFormationsResponses, type ListAgentSessionMessagesData, type ListAgentSessionMessagesError, type ListAgentSessionMessagesErrors, type ListAgentSessionMessagesResponse, type ListAgentSessionMessagesResponses, type ListAgentSessionsData, type ListAgentSessionsError, type ListAgentSessionsErrors, type ListAgentSessionsResponse, type ListAgentSessionsResponses, type ListAgentToolsData, type ListAgentToolsError, type ListAgentToolsErrors, type ListAgentToolsResponse, type ListAgentToolsResponses, type ListAgentsData, type ListAgentsError, type ListAgentsErrors, type ListAgentsResponse, type ListAgentsResponses, type ListAiProvidersData, type ListAiProvidersErrors, type ListAiProvidersResponse, type ListAiProvidersResponses, type ListApiKeysData, type ListApiKeysErrors, type ListApiKeysResponse, type ListApiKeysResponses, type ListChatsData, type ListChatsError, type ListChatsErrors, type ListChatsResponse, type ListChatsResponses, type ListConversationActorsData, type ListConversationActorsError, type ListConversationActorsErrors, type ListConversationActorsResponse, type ListConversationActorsResponses, type ListConversationMessagesData, type ListConversationMessagesError, type ListConversationMessagesErrors, type ListConversationMessagesResponse, type ListConversationMessagesResponses, type ListConversationsData, type ListConversationsError, type ListConversationsErrors, type ListConversationsResponse, type ListConversationsResponses, type ListDocumentsData, type ListDocumentsError, type ListDocumentsErrors, type ListDocumentsResponse, type ListDocumentsResponses, type ListFilesData, type ListFilesError, type ListFilesErrors, type ListFilesResponse, type ListFilesResponses, type ListMemoriesData, type ListMemoriesErrors, type ListMemoriesResponse, type ListMemoriesResponses, type ListMemoryEntriesData, type ListMemoryEntriesErrors, type ListMemoryEntriesResponse, type ListMemoryEntriesResponses, type ListPoliciesData, type ListPoliciesErrors, type ListPoliciesResponse, type ListPoliciesResponses, type ListSecretsData, type ListSecretsErrors, type ListSecretsResponse, type ListSecretsResponses, type ListTracesData, type ListTracesError, type ListTracesErrors, type ListTracesResponse, type ListTracesResponses, type ListUsersData, type ListUsersError, type ListUsersErrors, type ListUsersResponse, type ListUsersResponses, type ListWebhookDeliveriesData, type ListWebhookDeliveriesErrors, type ListWebhookDeliveriesResponse, type ListWebhookDeliveriesResponses, type ListWebhooksData, type ListWebhooksErrors, type ListWebhooksResponse, type ListWebhooksResponses, type LoginResponse, type LoginUserData, type LoginUserError, type LoginUserErrors, type LoginUserResponse, type LoginUserResponses, Memories, type Memory, MemoryEntries, type MemoryEntry, type MemoryEntryWriteResult, type MemoryKnowledgeResult, type MergeActorTagsData, type MergeActorTagsError, type MergeActorTagsErrors, type MergeActorTagsResponse, type MergeActorTagsResponses, type MergeConversationTagsData, type MergeConversationTagsError, type MergeConversationTagsErrors, type MergeConversationTagsResponse, type MergeConversationTagsResponses, type MergeDocumentTagsData, type MergeDocumentTagsError, type MergeDocumentTagsErrors, type MergeDocumentTagsResponse, type MergeDocumentTagsResponses, type MergeFileTagsData, type MergeFileTagsError, type MergeFileTagsErrors, type MergeFileTagsResponse, type MergeFileTagsResponses, type MergeSessionTagsData, type MergeSessionTagsError, type MergeSessionTagsErrors, type MergeSessionTagsResponse, type MergeSessionTagsResponses, type Options, type ParameterDeclaration, type PlanAgentFormationData, type PlanAgentFormationErrors, type PlanAgentFormationResponse, type PlanAgentFormationResponses, type PlanChange, type PlanResult, Policies, type PolicyDocument, type PolicyRecord, type PolicyStatement, type ProjectRecord, Projects, type RemoveConversationMessageData, type RemoveConversationMessageError, type RemoveConversationMessageErrors, type RemoveConversationMessageResponse, type RemoveConversationMessageResponses, type ReplaceActorTagsData, type ReplaceActorTagsError, type ReplaceActorTagsErrors, type ReplaceActorTagsResponse, type ReplaceActorTagsResponses, type ReplaceConversationTagsData, type ReplaceConversationTagsError, type ReplaceConversationTagsErrors, type ReplaceConversationTagsResponse, type ReplaceConversationTagsResponses, type ReplaceDocumentTagsData, type ReplaceDocumentTagsError, type ReplaceDocumentTagsErrors, type ReplaceDocumentTagsResponse, type ReplaceDocumentTagsResponses, type ReplaceFileTagsData, type ReplaceFileTagsError, type ReplaceFileTagsErrors, type ReplaceFileTagsResponse, type ReplaceFileTagsResponses, type ReplaceSessionTagsData, type ReplaceSessionTagsError, type ReplaceSessionTagsErrors, type ReplaceSessionTagsResponse, type ReplaceSessionTagsResponses, type ResourceDeclaration, type RotateWebhookSecretData, type RotateWebhookSecretErrors, type RotateWebhookSecretResponse, type RotateWebhookSecretResponses, type SearchKnowledgeData, type SearchKnowledgeError, type SearchKnowledgeErrors, type SearchKnowledgeResponse, type SearchKnowledgeResponses, Secrets, type SendSessionMessageResponse, type SessionId, type SessionMessage, type SessionRecord, Sessions, SoatClient, type SoatClientOptions, type SubmitAgentToolOutputsData, type SubmitAgentToolOutputsError, type SubmitAgentToolOutputsErrors, type SubmitAgentToolOutputsResponse, type SubmitAgentToolOutputsResponses, type SubmitSessionToolOutputsData, type SubmitSessionToolOutputsError, type SubmitSessionToolOutputsErrors, type SubmitSessionToolOutputsRequest, type SubmitSessionToolOutputsResponse, type SubmitSessionToolOutputsResponses, type SubmitToolOutputsRequest, type Trace, type TraceTreeNode, Traces, type UpdateActorData, type UpdateActorError, type UpdateActorErrors, type UpdateActorResponse, type UpdateActorResponses, type UpdateAgentData, type UpdateAgentError, type UpdateAgentErrors, type UpdateAgentFormationData, type UpdateAgentFormationErrors, type UpdateAgentFormationResponse, type UpdateAgentFormationResponses, type UpdateAgentRequest, type UpdateAgentResponse, type UpdateAgentResponses, type UpdateAgentToolData, type UpdateAgentToolError, type UpdateAgentToolErrors, type UpdateAgentToolRequest, type UpdateAgentToolResponse, type UpdateAgentToolResponses, type UpdateAiProviderData, type UpdateAiProviderErrors, type UpdateAiProviderResponses, type UpdateApiKeyData, type UpdateApiKeyError, type UpdateApiKeyErrors, type UpdateApiKeyResponse, type UpdateApiKeyResponses, type UpdateConversationData, type UpdateConversationError, type UpdateConversationErrors, type UpdateConversationResponse, type UpdateConversationResponses, type UpdateDocumentData, type UpdateDocumentError, type UpdateDocumentErrors, type UpdateDocumentResponse, type UpdateDocumentResponses, type UpdateFileMetadataData, type UpdateFileMetadataError, type UpdateFileMetadataErrors, type UpdateFileMetadataResponse, type UpdateFileMetadataResponses, type UpdateMemoryData, type UpdateMemoryEntryData, type UpdateMemoryEntryErrors, type UpdateMemoryEntryResponse, type UpdateMemoryEntryResponses, type UpdateMemoryErrors, type UpdateMemoryResponse, type UpdateMemoryResponses, type UpdatePolicyData, type UpdatePolicyError, type UpdatePolicyErrors, type UpdatePolicyResponse, type UpdatePolicyResponses, type UpdateSecretData, type UpdateSecretErrors, type UpdateSecretResponses, type UpdateSessionData, type UpdateSessionError, type UpdateSessionErrors, type UpdateSessionRequest, type UpdateSessionResponse, type UpdateSessionResponses, type UpdateWebhookData, type UpdateWebhookErrors, type UpdateWebhookRequest, type UpdateWebhookResponse, type UpdateWebhookResponses, type UploadFileBase64Data, type UploadFileBase64Error, type UploadFileBase64Errors, type UploadFileBase64Request, type UploadFileBase64Response, type UploadFileBase64Responses, type UploadFileData, type UploadFileError, type UploadFileErrors, type UploadFileResponse, type UploadFileResponses, type UserRecord, Users, type ValidateAgentFormationData, type ValidateAgentFormationErrors, type ValidateAgentFormationResponse, type ValidateAgentFormationResponses, type ValidationError, type ValidationResult, type Webhook, type WebhookWithSecret, Webhooks, createClient, createConfig };
8092
+ export { type ActorRecord, type ActorResourceProperties, Actors, type AddConversationMessageData, type AddConversationMessageError, type AddConversationMessageErrors, type AddConversationMessageResponse, type AddConversationMessageResponses, type AddSessionMessageData, type AddSessionMessageError, type AddSessionMessageErrors, type AddSessionMessageRequest, type AddSessionMessageResponse, type AddSessionMessageResponse2, type AddSessionMessageResponses, type AddSessionMessageSaved, type Agent, type AgentGenerationResponse, type AgentId, type AgentResourceProperties, type AgentTool, type AgentToolResourceProperties, AgentTools, Agents, type AiProviderResourceProperties, AiProviders, type ApiKeyCreated, type ApiKeyRecord, type ApiKeyResourceProperties, ApiKeys, type AttachUserPoliciesData, type AttachUserPoliciesError, type AttachUserPoliciesErrors, type AttachUserPoliciesResponse, type AttachUserPoliciesResponses, type BootstrapUserData, type BootstrapUserError, type BootstrapUserErrors, type BootstrapUserResponse, type BootstrapUserResponses, type Chat, type ChatCompletionChoice, type ChatCompletionForChatRequest, type ChatCompletionRequest, type ChatCompletionResponse, type ChatCompletionResponseMessage, type ChatMessage, type ChatMessageInput, type ChatResourceProperties, Chats, type ClientOptions, type ConversationActorRecord, type ConversationMessageRecord, type ConversationRecord, type ConversationResourceProperties, Conversations, type CreateActorData, type CreateActorError, type CreateActorErrors, type CreateActorResponse, type CreateActorResponses, type CreateAgentActorData, type CreateAgentActorError, type CreateAgentActorErrors, type CreateAgentActorResponse, type CreateAgentActorResponses, type CreateAgentData, type CreateAgentError, type CreateAgentErrors, type CreateAgentGenerationData, type CreateAgentGenerationError, type CreateAgentGenerationErrors, type CreateAgentGenerationRequest, type CreateAgentGenerationResponse, type CreateAgentGenerationResponses, type CreateAgentRequest, type CreateAgentResponse, type CreateAgentResponses, type CreateAgentSessionData, type CreateAgentSessionError, type CreateAgentSessionErrors, type CreateAgentSessionResponse, type CreateAgentSessionResponses, type CreateAgentToolData, type CreateAgentToolError, type CreateAgentToolErrors, type CreateAgentToolRequest, type CreateAgentToolResponse, type CreateAgentToolResponses, type CreateAiProviderData, type CreateAiProviderErrors, type CreateAiProviderResponse, type CreateAiProviderResponses, type CreateApiKeyData, type CreateApiKeyError, type CreateApiKeyErrors, type CreateApiKeyResponse, type CreateApiKeyResponses, type CreateChatActorData, type CreateChatActorError, type CreateChatActorErrors, type CreateChatActorResponse, type CreateChatActorResponses, type CreateChatCompletionData, type CreateChatCompletionError, type CreateChatCompletionErrors, type CreateChatCompletionForChatData, type CreateChatCompletionForChatError, type CreateChatCompletionForChatErrors, type CreateChatCompletionForChatResponse, type CreateChatCompletionForChatResponses, type CreateChatCompletionResponse, type CreateChatCompletionResponses, type CreateChatData, type CreateChatError, type CreateChatErrors, type CreateChatRequest, type CreateChatResponse, type CreateChatResponses, type CreateConversationData, type CreateConversationError, type CreateConversationErrors, type CreateConversationResponse, type CreateConversationResponses, type CreateDocumentData, type CreateDocumentError, type CreateDocumentErrors, type CreateDocumentResponse, type CreateDocumentResponses, type CreateFileData, type CreateFileError, type CreateFileErrors, type CreateFileResponse, type CreateFileResponses, type CreateFormationData, type CreateFormationErrors, type CreateFormationResponse, type CreateFormationResponses, type CreateMemoryData, type CreateMemoryEntryData, type CreateMemoryEntryErrors, type CreateMemoryEntryResponse, type CreateMemoryEntryResponses, type CreateMemoryErrors, type CreateMemoryResponse, type CreateMemoryResponses, type CreatePolicyData, type CreatePolicyError, type CreatePolicyErrors, type CreatePolicyResponse, type CreatePolicyResponses, type CreateProjectData, type CreateProjectErrors, type CreateProjectResponse, type CreateProjectResponses, type CreateSecretData, type CreateSecretErrors, type CreateSecretResponse, type CreateSecretResponses, type CreateSessionRequest, type CreateUserData, type CreateUserError, type CreateUserErrors, type CreateUserResponse, type CreateUserResponses, type CreateWebhookData, type CreateWebhookErrors, type CreateWebhookRequest, type CreateWebhookResponse, type CreateWebhookResponses, type DeleteActorData, type DeleteActorError, type DeleteActorErrors, type DeleteActorResponse, type DeleteActorResponses, type DeleteAgentData, type DeleteAgentError, type DeleteAgentErrors, type DeleteAgentResponse, type DeleteAgentResponses, type DeleteAgentSessionData, type DeleteAgentSessionError, type DeleteAgentSessionErrors, type DeleteAgentSessionResponse, type DeleteAgentSessionResponses, type DeleteAgentToolData, type DeleteAgentToolError, type DeleteAgentToolErrors, type DeleteAgentToolResponse, type DeleteAgentToolResponses, type DeleteAiProviderData, type DeleteAiProviderErrors, type DeleteAiProviderResponses, type DeleteApiKeyData, type DeleteApiKeyErrors, type DeleteApiKeyResponse, type DeleteApiKeyResponses, type DeleteChatData, type DeleteChatError, type DeleteChatErrors, type DeleteChatResponse, type DeleteChatResponses, type DeleteConversationData, type DeleteConversationError, type DeleteConversationErrors, type DeleteConversationResponse, type DeleteConversationResponses, type DeleteDocumentData, type DeleteDocumentError, type DeleteDocumentErrors, type DeleteDocumentResponse, type DeleteDocumentResponses, type DeleteFileData, type DeleteFileError, type DeleteFileErrors, type DeleteFileResponse, type DeleteFileResponses, type DeleteFormationData, type DeleteFormationErrors, type DeleteFormationResponse, type DeleteFormationResponses, type DeleteMemoryData, type DeleteMemoryEntryData, type DeleteMemoryEntryErrors, type DeleteMemoryEntryResponse, type DeleteMemoryEntryResponses, type DeleteMemoryErrors, type DeleteMemoryResponse, type DeleteMemoryResponses, type DeletePolicyData, type DeletePolicyErrors, type DeletePolicyResponse, type DeletePolicyResponses, type DeleteProjectData, type DeleteProjectErrors, type DeleteProjectResponse, type DeleteProjectResponses, type DeleteSecretData, type DeleteSecretErrors, type DeleteSecretResponses, type DeleteUserData, type DeleteUserError, type DeleteUserErrors, type DeleteUserResponse, type DeleteUserResponses, type DeleteWebhookData, type DeleteWebhookErrors, type DeleteWebhookResponse, type DeleteWebhookResponses, type Delivery, type DeliveryListResponse, type DocumentKnowledgeResult, type DocumentRecord, type DocumentResourceProperties, Documents, type DownloadFileBase64Data, type DownloadFileBase64Error, type DownloadFileBase64Errors, type DownloadFileBase64Response, type DownloadFileBase64Responses, type DownloadFileData, type DownloadFileError, type DownloadFileErrors, type DownloadFileResponse, type DownloadFileResponses, type ErrorResponse, type FileRecord, type FileResourceProperties, Files, type Formation, type FormationEvent, type FormationOperation, type FormationResource, type FormationTemplate, type FormationTemplateInput, Formations, type GenerateConversationMessageCompleted, type GenerateConversationMessageData, type GenerateConversationMessageError, type GenerateConversationMessageErrors, type GenerateConversationMessageRequiresAction, type GenerateConversationMessageResponse, type GenerateConversationMessageResponse2, type GenerateConversationMessageResponses, type GenerateSessionRequest, type GenerateSessionResponse, type GenerateSessionResponseData, type GenerateSessionResponseError, type GenerateSessionResponseErrors, type GenerateSessionResponseResponse, type GenerateSessionResponseResponses, type GetActorData, type GetActorError, type GetActorErrors, type GetActorResponse, type GetActorResponses, type GetActorTagsData, type GetActorTagsError, type GetActorTagsErrors, type GetActorTagsResponse, type GetActorTagsResponses, type GetAgentData, type GetAgentError, type GetAgentErrors, type GetAgentResponse, type GetAgentResponses, type GetAgentSessionData, type GetAgentSessionError, type GetAgentSessionErrors, type GetAgentSessionResponse, type GetAgentSessionResponses, type GetAgentToolData, type GetAgentToolError, type GetAgentToolErrors, type GetAgentToolResponse, type GetAgentToolResponses, type GetAiProviderData, type GetAiProviderErrors, type GetAiProviderResponse, type GetAiProviderResponses, type GetApiKeyData, type GetApiKeyErrors, type GetApiKeyResponse, type GetApiKeyResponses, type GetChatData, type GetChatError, type GetChatErrors, type GetChatResponse, type GetChatResponses, type GetConversationData, type GetConversationError, type GetConversationErrors, type GetConversationResponse, type GetConversationResponses, type GetConversationTagsData, type GetConversationTagsError, type GetConversationTagsErrors, type GetConversationTagsResponse, type GetConversationTagsResponses, type GetDocumentData, type GetDocumentError, type GetDocumentErrors, type GetDocumentResponse, type GetDocumentResponses, type GetDocumentTagsData, type GetDocumentTagsError, type GetDocumentTagsErrors, type GetDocumentTagsResponse, type GetDocumentTagsResponses, type GetFileData, type GetFileError, type GetFileErrors, type GetFileResponse, type GetFileResponses, type GetFileTagsData, type GetFileTagsError, type GetFileTagsErrors, type GetFileTagsResponse, type GetFileTagsResponses, type GetFormationData, type GetFormationErrors, type GetFormationResponse, type GetFormationResponses, type GetMemoryData, type GetMemoryEntryData, type GetMemoryEntryErrors, type GetMemoryEntryResponse, type GetMemoryEntryResponses, type GetMemoryErrors, type GetMemoryResponse, type GetMemoryResponses, type GetPolicyData, type GetPolicyErrors, type GetPolicyResponse, type GetPolicyResponses, type GetProjectData, type GetProjectErrors, type GetProjectResponse, type GetProjectResponses, type GetSecretData, type GetSecretErrors, type GetSecretResponse, type GetSecretResponses, type GetSessionTagsData, type GetSessionTagsError, type GetSessionTagsErrors, type GetSessionTagsResponse, type GetSessionTagsResponses, type GetTraceData, type GetTraceError, type GetTraceErrors, type GetTraceResponse, type GetTraceResponses, type GetTraceTreeData, type GetTraceTreeError, type GetTraceTreeErrors, type GetTraceTreeResponse, type GetTraceTreeResponses, type GetUserData, type GetUserError, type GetUserErrors, type GetUserPoliciesData, type GetUserPoliciesErrors, type GetUserPoliciesResponse, type GetUserPoliciesResponses, type GetUserResponse, type GetUserResponses, type GetWebhookData, type GetWebhookDeliveryData, type GetWebhookDeliveryErrors, type GetWebhookDeliveryResponse, type GetWebhookDeliveryResponses, type GetWebhookErrors, type GetWebhookResponse, type GetWebhookResponses, Knowledge, type KnowledgeResult, type ListActorsData, type ListActorsError, type ListActorsErrors, type ListActorsResponse, type ListActorsResponses, type ListAgentSessionMessagesData, type ListAgentSessionMessagesError, type ListAgentSessionMessagesErrors, type ListAgentSessionMessagesResponse, type ListAgentSessionMessagesResponses, type ListAgentSessionsData, type ListAgentSessionsError, type ListAgentSessionsErrors, type ListAgentSessionsResponse, type ListAgentSessionsResponses, type ListAgentToolsData, type ListAgentToolsError, type ListAgentToolsErrors, type ListAgentToolsResponse, type ListAgentToolsResponses, type ListAgentsData, type ListAgentsError, type ListAgentsErrors, type ListAgentsResponse, type ListAgentsResponses, type ListAiProvidersData, type ListAiProvidersErrors, type ListAiProvidersResponse, type ListAiProvidersResponses, type ListApiKeysData, type ListApiKeysErrors, type ListApiKeysResponse, type ListApiKeysResponses, type ListChatsData, type ListChatsError, type ListChatsErrors, type ListChatsResponse, type ListChatsResponses, type ListConversationActorsData, type ListConversationActorsError, type ListConversationActorsErrors, type ListConversationActorsResponse, type ListConversationActorsResponses, type ListConversationMessagesData, type ListConversationMessagesError, type ListConversationMessagesErrors, type ListConversationMessagesResponse, type ListConversationMessagesResponses, type ListConversationsData, type ListConversationsError, type ListConversationsErrors, type ListConversationsResponse, type ListConversationsResponses, type ListDocumentsData, type ListDocumentsError, type ListDocumentsErrors, type ListDocumentsResponse, type ListDocumentsResponses, type ListFilesData, type ListFilesError, type ListFilesErrors, type ListFilesResponse, type ListFilesResponses, type ListFormationEventsData, type ListFormationEventsErrors, type ListFormationEventsResponse, type ListFormationEventsResponses, type ListFormationsData, type ListFormationsErrors, type ListFormationsResponse, type ListFormationsResponses, type ListMemoriesData, type ListMemoriesErrors, type ListMemoriesResponse, type ListMemoriesResponses, type ListMemoryEntriesData, type ListMemoryEntriesErrors, type ListMemoryEntriesResponse, type ListMemoryEntriesResponses, type ListPoliciesData, type ListPoliciesErrors, type ListPoliciesResponse, type ListPoliciesResponses, type ListSecretsData, type ListSecretsErrors, type ListSecretsResponse, type ListSecretsResponses, type ListTracesData, type ListTracesError, type ListTracesErrors, type ListTracesResponse, type ListTracesResponses, type ListUsersData, type ListUsersError, type ListUsersErrors, type ListUsersResponse, type ListUsersResponses, type ListWebhookDeliveriesData, type ListWebhookDeliveriesErrors, type ListWebhookDeliveriesResponse, type ListWebhookDeliveriesResponses, type ListWebhooksData, type ListWebhooksErrors, type ListWebhooksResponse, type ListWebhooksResponses, type LoginResponse, type LoginUserData, type LoginUserError, type LoginUserErrors, type LoginUserResponse, type LoginUserResponses, Memories, type Memory, MemoryEntries, type MemoryEntry, type MemoryEntryResourceProperties, type MemoryEntryWriteResult, type MemoryKnowledgeResult, type MemoryResourceProperties, type MergeActorTagsData, type MergeActorTagsError, type MergeActorTagsErrors, type MergeActorTagsResponse, type MergeActorTagsResponses, type MergeConversationTagsData, type MergeConversationTagsError, type MergeConversationTagsErrors, type MergeConversationTagsResponse, type MergeConversationTagsResponses, type MergeDocumentTagsData, type MergeDocumentTagsError, type MergeDocumentTagsErrors, type MergeDocumentTagsResponse, type MergeDocumentTagsResponses, type MergeFileTagsData, type MergeFileTagsError, type MergeFileTagsErrors, type MergeFileTagsResponse, type MergeFileTagsResponses, type MergeSessionTagsData, type MergeSessionTagsError, type MergeSessionTagsErrors, type MergeSessionTagsResponse, type MergeSessionTagsResponses, type Options, type ParameterDeclaration, type PlanChange, type PlanFormationData, type PlanFormationErrors, type PlanFormationResponse, type PlanFormationResponses, type PlanResult, Policies, type PolicyDocument, type PolicyRecord, type PolicyResourceProperties, type PolicyStatement, type ProjectRecord, Projects, type RemoveConversationMessageData, type RemoveConversationMessageError, type RemoveConversationMessageErrors, type RemoveConversationMessageResponse, type RemoveConversationMessageResponses, type ReplaceActorTagsData, type ReplaceActorTagsError, type ReplaceActorTagsErrors, type ReplaceActorTagsResponse, type ReplaceActorTagsResponses, type ReplaceConversationTagsData, type ReplaceConversationTagsError, type ReplaceConversationTagsErrors, type ReplaceConversationTagsResponse, type ReplaceConversationTagsResponses, type ReplaceDocumentTagsData, type ReplaceDocumentTagsError, type ReplaceDocumentTagsErrors, type ReplaceDocumentTagsResponse, type ReplaceDocumentTagsResponses, type ReplaceFileTagsData, type ReplaceFileTagsError, type ReplaceFileTagsErrors, type ReplaceFileTagsResponse, type ReplaceFileTagsResponses, type ReplaceSessionTagsData, type ReplaceSessionTagsError, type ReplaceSessionTagsErrors, type ReplaceSessionTagsResponse, type ReplaceSessionTagsResponses, type ResourceDeclaration, type RotateWebhookSecretData, type RotateWebhookSecretErrors, type RotateWebhookSecretResponse, type RotateWebhookSecretResponses, type SearchKnowledgeData, type SearchKnowledgeError, type SearchKnowledgeErrors, type SearchKnowledgeResponse, type SearchKnowledgeResponses, type SecretResourceProperties, Secrets, type SendSessionMessageResponse, type SessionId, type SessionMessage, type SessionRecord, type SessionResourceProperties, Sessions, SoatClient, type SoatClientOptions, type SubmitAgentToolOutputsData, type SubmitAgentToolOutputsError, type SubmitAgentToolOutputsErrors, type SubmitAgentToolOutputsResponse, type SubmitAgentToolOutputsResponses, type SubmitSessionToolOutputsData, type SubmitSessionToolOutputsError, type SubmitSessionToolOutputsErrors, type SubmitSessionToolOutputsRequest, type SubmitSessionToolOutputsResponse, type SubmitSessionToolOutputsResponses, type SubmitToolOutputsRequest, type Trace, type TraceTreeNode, Traces, type UpdateActorData, type UpdateActorError, type UpdateActorErrors, type UpdateActorResponse, type UpdateActorResponses, type UpdateAgentData, type UpdateAgentError, type UpdateAgentErrors, type UpdateAgentRequest, type UpdateAgentResponse, type UpdateAgentResponses, type UpdateAgentToolData, type UpdateAgentToolError, type UpdateAgentToolErrors, type UpdateAgentToolRequest, type UpdateAgentToolResponse, type UpdateAgentToolResponses, type UpdateAiProviderData, type UpdateAiProviderErrors, type UpdateAiProviderResponses, type UpdateApiKeyData, type UpdateApiKeyError, type UpdateApiKeyErrors, type UpdateApiKeyResponse, type UpdateApiKeyResponses, type UpdateConversationData, type UpdateConversationError, type UpdateConversationErrors, type UpdateConversationResponse, type UpdateConversationResponses, type UpdateDocumentData, type UpdateDocumentError, type UpdateDocumentErrors, type UpdateDocumentResponse, type UpdateDocumentResponses, type UpdateFileMetadataData, type UpdateFileMetadataError, type UpdateFileMetadataErrors, type UpdateFileMetadataResponse, type UpdateFileMetadataResponses, type UpdateFormationData, type UpdateFormationErrors, type UpdateFormationResponse, type UpdateFormationResponses, type UpdateMemoryData, type UpdateMemoryEntryData, type UpdateMemoryEntryErrors, type UpdateMemoryEntryResponse, type UpdateMemoryEntryResponses, type UpdateMemoryErrors, type UpdateMemoryResponse, type UpdateMemoryResponses, type UpdatePolicyData, type UpdatePolicyError, type UpdatePolicyErrors, type UpdatePolicyResponse, type UpdatePolicyResponses, type UpdateSecretData, type UpdateSecretErrors, type UpdateSecretResponses, type UpdateSessionData, type UpdateSessionError, type UpdateSessionErrors, type UpdateSessionRequest, type UpdateSessionResponse, type UpdateSessionResponses, type UpdateWebhookData, type UpdateWebhookErrors, type UpdateWebhookRequest, type UpdateWebhookResponse, type UpdateWebhookResponses, type UploadFileBase64Data, type UploadFileBase64Error, type UploadFileBase64Errors, type UploadFileBase64Request, type UploadFileBase64Response, type UploadFileBase64Responses, type UploadFileData, type UploadFileError, type UploadFileErrors, type UploadFileResponse, type UploadFileResponses, type UserRecord, Users, type ValidateFormationData, type ValidateFormationErrors, type ValidateFormationResponse, type ValidateFormationResponses, type ValidationError, type ValidationResult, type Webhook, type WebhookResourceProperties, type WebhookWithSecret, Webhooks, createClient, createConfig };