@sixb/client 0.1.24 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/README.md +1 -1
  2. package/dist/agent-streams.d.ts +9 -2
  3. package/dist/agent-streams.d.ts.map +1 -1
  4. package/dist/browser.js +2 -2
  5. package/dist/{chunk-1zthvcby.js → chunk-1wdszw1c.js} +12 -7
  6. package/dist/{chunk-1zthvcby.js.map → chunk-1wdszw1c.js.map} +3 -3
  7. package/dist/{chunk-14c2tg81.js → chunk-2qsekqcn.js} +52 -40
  8. package/dist/chunk-2qsekqcn.js.map +19 -0
  9. package/dist/{chunk-fzpxv5j5.js → chunk-fnd56xxz.js} +2 -2
  10. package/dist/{chunk-z28fxqd0.js → chunk-mk0w4zr1.js} +1 -1
  11. package/dist/{chunk-4xavy5bx.js → chunk-s2pagg09.js} +52 -4
  12. package/dist/chunk-s2pagg09.js.map +11 -0
  13. package/dist/{chunk-2ezmcce2.js → chunk-sh0f609h.js} +1 -1
  14. package/dist/connectors/queries.d.ts.map +1 -1
  15. package/dist/generated/@tanstack/react-query.gen.d.ts +2661 -432
  16. package/dist/generated/@tanstack/react-query.gen.d.ts.map +1 -1
  17. package/dist/generated/index.d.ts +2 -2
  18. package/dist/generated/index.d.ts.map +1 -1
  19. package/dist/generated/sdk.gen.d.ts +41 -15
  20. package/dist/generated/sdk.gen.d.ts.map +1 -1
  21. package/dist/generated/types.gen.d.ts +1003 -169
  22. package/dist/generated/types.gen.d.ts.map +1 -1
  23. package/dist/hooks.d.ts +2 -0
  24. package/dist/hooks.d.ts.map +1 -1
  25. package/dist/hooks.js +319 -77
  26. package/dist/hooks.js.map +8 -6
  27. package/dist/index.js +21 -15
  28. package/dist/index.js.map +1 -1
  29. package/dist/logs.js +3 -3
  30. package/dist/models.js +17 -11
  31. package/dist/models.js.map +1 -1
  32. package/dist/object-query-live-updates.d.ts +34 -0
  33. package/dist/object-query-live-updates.d.ts.map +1 -0
  34. package/dist/object-query-reads.d.ts +8 -0
  35. package/dist/object-query-reads.d.ts.map +1 -0
  36. package/dist/query.d.ts.map +1 -1
  37. package/dist/query.js +3 -3
  38. package/dist/useAgentActivityStream.d.ts +4 -1
  39. package/dist/useAgentActivityStream.d.ts.map +1 -1
  40. package/dist/useDesktop.d.ts +22 -0
  41. package/dist/useDesktop.d.ts.map +1 -0
  42. package/dist/users-hooks.d.ts.map +1 -1
  43. package/package.json +2 -2
  44. package/src/agent-streams.ts +16 -2
  45. package/src/generated/@tanstack/react-query.gen.ts +207 -105
  46. package/src/generated/index.ts +41 -24
  47. package/src/generated/sdk.gen.ts +149 -73
  48. package/src/generated/types.gen.ts +1187 -182
  49. package/src/hooks.ts +5 -0
  50. package/src/object-query-live-updates.ts +276 -0
  51. package/src/object-query-reads.ts +72 -0
  52. package/src/query.ts +5 -0
  53. package/src/useAgentActivityStream.ts +11 -0
  54. package/src/useDesktop.ts +50 -0
  55. package/dist/chunk-14c2tg81.js.map +0 -19
  56. package/dist/chunk-4xavy5bx.js.map +0 -10
  57. /package/dist/{chunk-fzpxv5j5.js.map → chunk-fnd56xxz.js.map} +0 -0
  58. /package/dist/{chunk-z28fxqd0.js.map → chunk-mk0w4zr1.js.map} +0 -0
  59. /package/dist/{chunk-2ezmcce2.js.map → chunk-sh0f609h.js.map} +0 -0
@@ -44,6 +44,10 @@ export type ObjectQueryIssue = {
44
44
  message: string;
45
45
  };
46
46
  export type ObjectQueryPlanSummary = {
47
+ /**
48
+ * Every object type the query reads: where it starts, and what it traverses or expands
49
+ */
50
+ readObjectTypeIds?: Array<string>;
47
51
  mode: "pushdown" | "fallback" | "pipeline" | "rejected";
48
52
  providerIssues: Array<ObjectQueryIssue>;
49
53
  fallbackIssues: Array<ObjectQueryIssue>;
@@ -368,7 +372,7 @@ export type AgentChild = {
368
372
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
369
373
  finishReason?: "stop" | "length" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "error" | "other" | "unknown";
370
374
  error?: {
371
- code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
375
+ code: "internal.unexpected" | "runtime.cancelled" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
372
376
  message: string;
373
377
  retryable: boolean;
374
378
  at: string;
@@ -435,7 +439,7 @@ export type AgentChildRun = {
435
439
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
436
440
  finishReason?: "stop" | "length" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "error" | "other" | "unknown";
437
441
  error?: {
438
- code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
442
+ code: "internal.unexpected" | "runtime.cancelled" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
439
443
  message: string;
440
444
  retryable: boolean;
441
445
  at: string;
@@ -635,6 +639,32 @@ export type GetAuthSessionResponses = {
635
639
  avatarUrl?: string;
636
640
  groupIds: Array<string>;
637
641
  };
642
+ access: {
643
+ /**
644
+ * Members: a membership policy lets them invite, assign groups or suspend
645
+ */
646
+ members: boolean;
647
+ /**
648
+ * Service accounts: a membership policy lets them manage them
649
+ */
650
+ serviceAccounts: boolean;
651
+ /**
652
+ * Usage: they hold can.observe(agent.usage)
653
+ */
654
+ usage: boolean;
655
+ /**
656
+ * Activity: they hold can.observe(project.activity)
657
+ */
658
+ activity: boolean;
659
+ /**
660
+ * The Console: they hold can.observe(project.console)
661
+ */
662
+ console: boolean;
663
+ /**
664
+ * Console › Logs: they hold can.observe(project.logs)
665
+ */
666
+ logs: boolean;
667
+ };
638
668
  session: {
639
669
  id: string;
640
670
  expiresAt: string;
@@ -1753,6 +1783,10 @@ export type ListAuthMembersResponses = {
1753
1783
  suspend: boolean;
1754
1784
  reactivate: boolean;
1755
1785
  };
1786
+ /**
1787
+ * Their latest session's last request, or its sign-in; absent if they never signed in
1788
+ */
1789
+ lastActiveAt?: string;
1756
1790
  }>;
1757
1791
  hasMore: boolean;
1758
1792
  total: number;
@@ -1943,6 +1977,18 @@ export type GetAiAccountingOverviewData = {
1943
1977
  to: string;
1944
1978
  providerId?: string;
1945
1979
  modelId?: string;
1980
+ /**
1981
+ * Calls one person or service account asked for, as user:<id> or serviceAccount:<id>, or none for those nobody did, such as a schedule's
1982
+ */
1983
+ person?: string;
1984
+ /**
1985
+ * Calls from agent conversations and their sub-agents, actions, workflows or one as workflow:<id>, or other
1986
+ */
1987
+ source?: string;
1988
+ /**
1989
+ * Calls to one kind of model
1990
+ */
1991
+ kind?: "language" | "image" | "video" | "embedding" | "decision" | "transcription" | "speech" | "reranking";
1946
1992
  bucket: "hour" | "day" | "week";
1947
1993
  };
1948
1994
  url: "/api/ai/accounting/overview";
@@ -2112,6 +2158,81 @@ export type GetAiAccountingOverviewResponses = {
2112
2158
  start: string;
2113
2159
  end: string;
2114
2160
  }>;
2161
+ /**
2162
+ * Each model's own series, every period included
2163
+ */
2164
+ modelSeries: Array<{
2165
+ providerId: string;
2166
+ modelId: string;
2167
+ series: Array<{
2168
+ modelCallCount: number;
2169
+ /**
2170
+ * Sums of reported meters; unreported meters are absent. totalTokens sums available input and output counts and is a lower bound when coverage is incomplete.
2171
+ */
2172
+ usage: {
2173
+ inputTokens?: number;
2174
+ outputTokens?: number;
2175
+ totalTokens?: number;
2176
+ uncachedInputTokens?: number;
2177
+ cacheReadInputTokens?: number;
2178
+ cacheWriteInputTokens?: number;
2179
+ textOutputTokens?: number;
2180
+ reasoningOutputTokens?: number;
2181
+ /**
2182
+ * Audio content duration in milliseconds; not billed duration.
2183
+ */
2184
+ audioDurationMs?: number;
2185
+ /**
2186
+ * Output tokens that encode generated images, within outputTokens.
2187
+ */
2188
+ imageOutputTokens?: number;
2189
+ /**
2190
+ * Output tokens that encode generated audio, within outputTokens.
2191
+ */
2192
+ audioOutputTokens?: number;
2193
+ /**
2194
+ * Images the call returned.
2195
+ */
2196
+ outputImages?: number;
2197
+ /**
2198
+ * Input characters, counted by the provider's own billing rule.
2199
+ */
2200
+ inputCharacters?: number;
2201
+ reportingStatus: "complete" | "partial" | "unavailable";
2202
+ };
2203
+ usageCoverage: {
2204
+ /**
2205
+ * Calls reporting both inputTokens and outputTokens.
2206
+ */
2207
+ completeCallCount: number;
2208
+ fieldCallCounts: {
2209
+ inputTokens: number;
2210
+ outputTokens: number;
2211
+ uncachedInputTokens: number;
2212
+ cacheReadInputTokens: number;
2213
+ cacheWriteInputTokens: number;
2214
+ textOutputTokens: number;
2215
+ reasoningOutputTokens: number;
2216
+ audioDurationMs: number;
2217
+ imageOutputTokens: number;
2218
+ audioOutputTokens: number;
2219
+ outputImages: number;
2220
+ inputCharacters: number;
2221
+ };
2222
+ };
2223
+ costs: {
2224
+ amounts: Array<{
2225
+ currency: string;
2226
+ amountNanos: string;
2227
+ }>;
2228
+ ratedCallCount: number;
2229
+ unpriceableCallCount: number;
2230
+ unvaluedCallCount: number;
2231
+ };
2232
+ start: string;
2233
+ end: string;
2234
+ }>;
2235
+ }>;
2115
2236
  models: Array<{
2116
2237
  modelCallCount: number;
2117
2238
  /**
@@ -2180,6 +2301,87 @@ export type GetAiAccountingOverviewResponses = {
2180
2301
  providerId: string;
2181
2302
  modelId: string;
2182
2303
  }>;
2304
+ /**
2305
+ * Who asked for the calls
2306
+ */
2307
+ people: Array<{
2308
+ modelCallCount: number;
2309
+ /**
2310
+ * Sums of reported meters; unreported meters are absent. totalTokens sums available input and output counts and is a lower bound when coverage is incomplete.
2311
+ */
2312
+ usage: {
2313
+ inputTokens?: number;
2314
+ outputTokens?: number;
2315
+ totalTokens?: number;
2316
+ uncachedInputTokens?: number;
2317
+ cacheReadInputTokens?: number;
2318
+ cacheWriteInputTokens?: number;
2319
+ textOutputTokens?: number;
2320
+ reasoningOutputTokens?: number;
2321
+ /**
2322
+ * Audio content duration in milliseconds; not billed duration.
2323
+ */
2324
+ audioDurationMs?: number;
2325
+ /**
2326
+ * Output tokens that encode generated images, within outputTokens.
2327
+ */
2328
+ imageOutputTokens?: number;
2329
+ /**
2330
+ * Output tokens that encode generated audio, within outputTokens.
2331
+ */
2332
+ audioOutputTokens?: number;
2333
+ /**
2334
+ * Images the call returned.
2335
+ */
2336
+ outputImages?: number;
2337
+ /**
2338
+ * Input characters, counted by the provider's own billing rule.
2339
+ */
2340
+ inputCharacters?: number;
2341
+ reportingStatus: "complete" | "partial" | "unavailable";
2342
+ };
2343
+ usageCoverage: {
2344
+ /**
2345
+ * Calls reporting both inputTokens and outputTokens.
2346
+ */
2347
+ completeCallCount: number;
2348
+ fieldCallCounts: {
2349
+ inputTokens: number;
2350
+ outputTokens: number;
2351
+ uncachedInputTokens: number;
2352
+ cacheReadInputTokens: number;
2353
+ cacheWriteInputTokens: number;
2354
+ textOutputTokens: number;
2355
+ reasoningOutputTokens: number;
2356
+ audioDurationMs: number;
2357
+ imageOutputTokens: number;
2358
+ audioOutputTokens: number;
2359
+ outputImages: number;
2360
+ inputCharacters: number;
2361
+ };
2362
+ };
2363
+ costs: {
2364
+ amounts: Array<{
2365
+ currency: string;
2366
+ amountNanos: string;
2367
+ }>;
2368
+ ratedCallCount: number;
2369
+ unpriceableCallCount: number;
2370
+ unvaluedCallCount: number;
2371
+ };
2372
+ /**
2373
+ * Absent for the calls nobody asked for, such as a schedule's
2374
+ */
2375
+ requester?: {
2376
+ type: "user" | "serviceAccount";
2377
+ id: string;
2378
+ /**
2379
+ * Their name, or a service account's
2380
+ */
2381
+ name?: string;
2382
+ email?: string;
2383
+ };
2384
+ }>;
2183
2385
  kinds: Array<{
2184
2386
  modelCallCount: number;
2185
2387
  /**
@@ -2463,6 +2665,18 @@ export type ListAiModelCallsData = {
2463
2665
  to: string;
2464
2666
  providerId?: string;
2465
2667
  modelId?: string;
2668
+ /**
2669
+ * Calls one person or service account asked for, as user:<id> or serviceAccount:<id>, or none for those nobody did, such as a schedule's
2670
+ */
2671
+ person?: string;
2672
+ /**
2673
+ * Calls from agent conversations and their sub-agents, actions, workflows or one as workflow:<id>, or other
2674
+ */
2675
+ source?: string;
2676
+ /**
2677
+ * Calls to one kind of model
2678
+ */
2679
+ kind?: "language" | "image" | "video" | "embedding" | "decision" | "transcription" | "speech" | "reranking";
2466
2680
  executionId?: string;
2467
2681
  valuationStatus?: "rated" | "unpriceable" | "unvalued";
2468
2682
  limit?: string;
@@ -3158,9 +3372,25 @@ export type ListAiModelCallGroupsData = {
3158
3372
  to: string;
3159
3373
  providerId?: string;
3160
3374
  modelId?: string;
3375
+ /**
3376
+ * Calls one person or service account asked for, as user:<id> or serviceAccount:<id>, or none for those nobody did, such as a schedule's
3377
+ */
3378
+ person?: string;
3379
+ /**
3380
+ * Calls from agent conversations and their sub-agents, actions, workflows or one as workflow:<id>, or other
3381
+ */
3382
+ source?: string;
3383
+ /**
3384
+ * Calls to one kind of model
3385
+ */
3386
+ kind?: "language" | "image" | "video" | "embedding" | "decision" | "transcription" | "speech" | "reranking";
3161
3387
  valuationStatus?: "rated" | "unpriceable" | "unvalued";
3162
3388
  limit?: string;
3163
3389
  offset?: string;
3390
+ /**
3391
+ * Most recent first, the default, or costliest first
3392
+ */
3393
+ sort?: "recent" | "cost";
3164
3394
  };
3165
3395
  url: "/api/ai/model-call-groups";
3166
3396
  };
@@ -3223,6 +3453,8 @@ export type ListAiModelCallGroupsResponses = {
3223
3453
  * Present when every call that reports tokens did; images and speech don't.
3224
3454
  */
3225
3455
  totalTokens?: number;
3456
+ inputTokens?: number;
3457
+ cacheReadInputTokens?: number;
3226
3458
  outputImages?: number;
3227
3459
  inputCharacters?: number;
3228
3460
  audioDurationMs?: number;
@@ -3238,6 +3470,9 @@ export type ListAiModelCallGroupsResponses = {
3238
3470
  firstCallAt: string;
3239
3471
  lastCallAt: string;
3240
3472
  label?: string;
3473
+ /**
3474
+ * A conversation's turns and sub-agents, or a workflow run's agent steps
3475
+ */
3241
3476
  executions: Array<{
3242
3477
  executionId: string;
3243
3478
  attribution?: {
@@ -3271,6 +3506,8 @@ export type ListAiModelCallGroupsResponses = {
3271
3506
  * Present when every call that reports tokens did; images and speech don't.
3272
3507
  */
3273
3508
  totalTokens?: number;
3509
+ inputTokens?: number;
3510
+ cacheReadInputTokens?: number;
3274
3511
  outputImages?: number;
3275
3512
  inputCharacters?: number;
3276
3513
  audioDurationMs?: number;
@@ -3288,10 +3525,36 @@ export type ListAiModelCallGroupsResponses = {
3288
3525
  models: Array<{
3289
3526
  providerId: string;
3290
3527
  modelId: string;
3528
+ modelCallCount: number;
3529
+ costs: {
3530
+ amounts: Array<{
3531
+ currency: string;
3532
+ amountNanos: string;
3533
+ }>;
3534
+ ratedCallCount: number;
3535
+ unpriceableCallCount: number;
3536
+ unvaluedCallCount: number;
3537
+ };
3291
3538
  }>;
3292
3539
  label?: string;
3540
+ /**
3541
+ * What a turn was asked, when the caller can read its conversation
3542
+ */
3543
+ prompt?: string;
3293
3544
  }>;
3294
3545
  canOpenThread: boolean;
3546
+ /**
3547
+ * Who started it
3548
+ */
3549
+ requester?: {
3550
+ type: "user" | "serviceAccount";
3551
+ id: string;
3552
+ /**
3553
+ * Their name, or a service account's
3554
+ */
3555
+ name?: string;
3556
+ email?: string;
3557
+ };
3295
3558
  }>;
3296
3559
  total: number;
3297
3560
  hasMore: boolean;
@@ -5236,6 +5499,7 @@ export type ListDatasetVersionsResponses = {
5236
5499
  kind: "sync" | "pipeline" | "ingest";
5237
5500
  id?: string;
5238
5501
  runId?: string;
5502
+ stepId?: string;
5239
5503
  };
5240
5504
  inputs?: Array<{
5241
5505
  datasetId: string;
@@ -5297,6 +5561,7 @@ export type GetDatasetVersionResponses = {
5297
5561
  kind: "sync" | "pipeline" | "ingest";
5298
5562
  id?: string;
5299
5563
  runId?: string;
5564
+ stepId?: string;
5300
5565
  };
5301
5566
  inputs?: Array<{
5302
5567
  datasetId: string;
@@ -5307,6 +5572,79 @@ export type GetDatasetVersionResponses = {
5307
5572
  };
5308
5573
  };
5309
5574
  export type GetDatasetVersionResponse = GetDatasetVersionResponses[keyof GetDatasetVersionResponses];
5575
+ export type GetDatasetVersionLineageData = {
5576
+ body?: never;
5577
+ path: {
5578
+ datasetId: string;
5579
+ versionId: string;
5580
+ };
5581
+ query?: {
5582
+ depth?: string;
5583
+ };
5584
+ url: "/api/datasets/{datasetId}/versions/{versionId}/lineage";
5585
+ };
5586
+ export type GetDatasetVersionLineageErrors = {
5587
+ /**
5588
+ * Response for status 400
5589
+ */
5590
+ 400: {
5591
+ error: string;
5592
+ };
5593
+ /**
5594
+ * Response for status 404
5595
+ */
5596
+ 404: {
5597
+ error: string;
5598
+ /**
5599
+ * Stable machine-readable failure code for programmatic handling.
5600
+ */
5601
+ code: "dataset.not_found" | "dataset.version_not_found";
5602
+ };
5603
+ };
5604
+ export type GetDatasetVersionLineageError = GetDatasetVersionLineageErrors[keyof GetDatasetVersionLineageErrors];
5605
+ export type GetDatasetVersionLineageResponses = {
5606
+ /**
5607
+ * Response for status 200
5608
+ */
5609
+ 200: {
5610
+ nodes: Array<{
5611
+ datasetId: string;
5612
+ versionId: string;
5613
+ parentVersionId?: string;
5614
+ mode: "snapshot" | "append" | "merge" | "schema";
5615
+ createdAt: string;
5616
+ producer?: {
5617
+ kind: "sync" | "pipeline" | "ingest";
5618
+ id?: string;
5619
+ runId?: string;
5620
+ stepId?: string;
5621
+ };
5622
+ } | {
5623
+ datasetId: string;
5624
+ versionId: string;
5625
+ expired: true;
5626
+ }>;
5627
+ edges: Array<{
5628
+ from: {
5629
+ datasetId: string;
5630
+ versionId: string;
5631
+ };
5632
+ to: {
5633
+ datasetId: string;
5634
+ versionId: string;
5635
+ };
5636
+ }>;
5637
+ /**
5638
+ * Versions left out because the caller cannot view their dataset.
5639
+ */
5640
+ restricted: number;
5641
+ /**
5642
+ * Whether the walk stopped at `depth` or at the node cap.
5643
+ */
5644
+ truncated: boolean;
5645
+ };
5646
+ };
5647
+ export type GetDatasetVersionLineageResponse = GetDatasetVersionLineageResponses[keyof GetDatasetVersionLineageResponses];
5310
5648
  export type ListDatasetRowsData = {
5311
5649
  body?: never;
5312
5650
  path: {
@@ -5363,6 +5701,7 @@ export type ListDatasetRowsResponses = {
5363
5701
  kind: "sync" | "pipeline" | "ingest";
5364
5702
  id?: string;
5365
5703
  runId?: string;
5704
+ stepId?: string;
5366
5705
  };
5367
5706
  inputs?: Array<{
5368
5707
  datasetId: string;
@@ -6982,7 +7321,7 @@ export type GetWorkflowAgentNodeExecutionResponses = {
6982
7321
  } | {
6983
7322
  kind: "error";
6984
7323
  error: {
6985
- code: "action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed";
7324
+ code: "action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed";
6986
7325
  message: string;
6987
7326
  retryable: boolean;
6988
7327
  at: string;
@@ -7088,6 +7427,17 @@ export type GetWorkflowAgentNodeExecutionResponses = {
7088
7427
  output: string | number | boolean | Array<unknown> | {
7089
7428
  [key: string]: unknown;
7090
7429
  } | null;
7430
+ outputFile?: {
7431
+ fileRef: {
7432
+ blobId: string;
7433
+ digest: string;
7434
+ sizeBytes: number;
7435
+ fileName?: string;
7436
+ mediaType?: string;
7437
+ logicalPath?: string;
7438
+ };
7439
+ path: string;
7440
+ };
7091
7441
  } | {
7092
7442
  type: "tool-call";
7093
7443
  toolCallId: string;
@@ -7122,7 +7472,7 @@ export type GetWorkflowAgentNodeExecutionResponses = {
7122
7472
  } | null>;
7123
7473
  failurePhase?: "agent-loop" | "structured-finalizer";
7124
7474
  error?: {
7125
- code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
7475
+ code: "internal.unexpected" | "runtime.cancelled" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
7126
7476
  message: string;
7127
7477
  retryable: boolean;
7128
7478
  at: string;
@@ -8761,71 +9111,177 @@ export type GetObjectResponses = {
8761
9111
  };
8762
9112
  };
8763
9113
  export type GetObjectResponse = GetObjectResponses[keyof GetObjectResponses];
8764
- export type UpsertObjectData = {
8765
- body: {
8766
- properties: {
8767
- [key: string]: unknown;
8768
- };
8769
- };
9114
+ export type GetObjectLineageData = {
9115
+ body?: never;
8770
9116
  path: {
8771
9117
  objectTypeId: string;
8772
9118
  objectId: string;
8773
9119
  };
8774
9120
  query?: never;
8775
- url: "/api/objects/{objectTypeId}/{objectId}";
9121
+ url: "/api/objects/{objectTypeId}/{objectId}/lineage";
8776
9122
  };
8777
- export type UpsertObjectErrors = {
8778
- /**
8779
- * Response for status 400
8780
- */
8781
- 400: {
8782
- error: string;
8783
- };
8784
- /**
8785
- * Response for status 403
8786
- */
8787
- 403: {
8788
- error: string;
8789
- };
9123
+ export type GetObjectLineageErrors = {
8790
9124
  /**
8791
9125
  * Response for status 404
8792
9126
  */
8793
9127
  404: {
8794
9128
  error: string;
8795
9129
  };
8796
- /**
8797
- * Response for status 409
8798
- */
8799
- 409: {
8800
- error: string;
8801
- /**
8802
- * Stable machine-readable failure code for programmatic handling.
8803
- */
8804
- code: "object.unique_violation";
8805
- };
8806
9130
  };
8807
- export type UpsertObjectError = UpsertObjectErrors[keyof UpsertObjectErrors];
8808
- export type UpsertObjectResponses = {
9131
+ export type GetObjectLineageError = GetObjectLineageErrors[keyof GetObjectLineageErrors];
9132
+ export type GetObjectLineageResponses = {
8809
9133
  /**
8810
9134
  * Response for status 200
8811
9135
  */
8812
9136
  200: {
8813
- score?: number;
8814
- primaryId: string;
8815
9137
  objectTypeId: string;
8816
- properties: {
8817
- [key: string]: unknown;
9138
+ primaryId: string;
9139
+ existence: {
9140
+ source: string;
8818
9141
  };
8819
- redactions?: {
9142
+ /**
9143
+ * Keyed `projection:<id>`, `commit:<id>`, `commit@<instant>` when the commit is unknown, `telemetry:<commitId>` and `identity`.
9144
+ */
9145
+ sources: {
8820
9146
  [key: string]: {
8821
- reason: "missing_clearance";
9147
+ kind: "projection";
9148
+ projectionId: string;
9149
+ /**
9150
+ * Absent for a caller who cannot view the projection's runs.
9151
+ */
9152
+ projectionRunId?: string;
9153
+ /**
9154
+ * The dataset version applied. Absent for a caller who cannot view the dataset.
9155
+ */
9156
+ datasetVersion?: {
9157
+ datasetId: string;
9158
+ versionId: string;
9159
+ };
9160
+ /**
9161
+ * Upstream columns that decide which rows the version holds, which every value depends on. Absent when the version records no lineage or the caller cannot view it.
9162
+ */
9163
+ rowOrigins?: Array<{
9164
+ datasetId: string;
9165
+ column: string;
9166
+ }>;
9167
+ } | {
9168
+ kind: "edit";
9169
+ /**
9170
+ * Null when the commits made at that instant cannot be told apart.
9171
+ */
9172
+ commitId: string | null;
9173
+ committedAt: string;
9174
+ /**
9175
+ * Principal on whose behalf the commit ran; absent for automatic or anonymous work.
9176
+ */
9177
+ requestedBy?: {
9178
+ type: "user" | "serviceAccount";
9179
+ id: string;
9180
+ };
9181
+ executor?: {
9182
+ type: "request";
9183
+ requestId: string;
9184
+ } | {
9185
+ type: "primitive";
9186
+ kind: "action" | "pipeline" | "projection" | "rule" | "sync" | "webhook" | "workflow";
9187
+ id: string;
9188
+ runId: string;
9189
+ } | {
9190
+ type: "agent";
9191
+ runId: string;
9192
+ } | {
9193
+ type: "kernel";
9194
+ operation: {
9195
+ type: "ontology.recover";
9196
+ recoveryId: string;
9197
+ } | {
9198
+ type: "ontology.indexVectors";
9199
+ indexingId: string;
9200
+ };
9201
+ };
9202
+ /**
9203
+ * Absent for a direct write, and for an Action run the caller cannot view.
9204
+ */
9205
+ action?: {
9206
+ actionId: string;
9207
+ runId: string;
9208
+ };
9209
+ } | {
9210
+ kind: "telemetry";
9211
+ commitId: string;
9212
+ committedAt: string;
9213
+ projectionId?: string;
9214
+ /**
9215
+ * Principal on whose behalf the commit ran; absent for automatic or anonymous work.
9216
+ */
9217
+ requestedBy?: {
9218
+ type: "user" | "serviceAccount";
9219
+ id: string;
9220
+ };
9221
+ executor?: {
9222
+ type: "request";
9223
+ requestId: string;
9224
+ } | {
9225
+ type: "primitive";
9226
+ kind: "action" | "pipeline" | "projection" | "rule" | "sync" | "webhook" | "workflow";
9227
+ id: string;
9228
+ runId: string;
9229
+ } | {
9230
+ type: "agent";
9231
+ runId: string;
9232
+ } | {
9233
+ type: "kernel";
9234
+ operation: {
9235
+ type: "ontology.recover";
9236
+ recoveryId: string;
9237
+ } | {
9238
+ type: "ontology.indexVectors";
9239
+ indexingId: string;
9240
+ };
9241
+ };
9242
+ } | {
9243
+ kind: "identity";
8822
9244
  };
8823
9245
  };
8824
- createdAt: string;
8825
- updatedAt: string;
9246
+ properties: {
9247
+ [key: string]: {
9248
+ /**
9249
+ * The source that decided the value: a key of `sources`.
9250
+ */
9251
+ source: string;
9252
+ column?: string;
9253
+ origins?: Array<{
9254
+ datasetId: string;
9255
+ column: string;
9256
+ }>;
9257
+ removed?: true;
9258
+ at?: string;
9259
+ replaced?: {
9260
+ source: string;
9261
+ column?: string;
9262
+ /**
9263
+ * Any JSON-compatible value.
9264
+ */
9265
+ value?: string | number | boolean | Array<unknown> | {
9266
+ [key: string]: unknown;
9267
+ } | null;
9268
+ };
9269
+ resolution?: {
9270
+ strategy: "editsWin";
9271
+ } | {
9272
+ strategy: "mostRecent";
9273
+ sourceUpdatedAt: string;
9274
+ editedAt?: string;
9275
+ };
9276
+ };
9277
+ };
9278
+ /**
9279
+ * Steps left out because the caller cannot view them.
9280
+ */
9281
+ restricted: number;
8826
9282
  };
8827
9283
  };
8828
- export type UpsertObjectResponse = UpsertObjectResponses[keyof UpsertObjectResponses];
9284
+ export type GetObjectLineageResponse = GetObjectLineageResponses[keyof GetObjectLineageResponses];
8829
9285
  export type GetObjectByUniquePropertyData = {
8830
9286
  body: {
8831
9287
  /**
@@ -9023,7 +9479,7 @@ export type RequestActionErrors = {
9023
9479
  /**
9024
9480
  * Stable machine-readable failure code for programmatic handling.
9025
9481
  */
9026
- code: "action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed";
9482
+ code: "action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed";
9027
9483
  };
9028
9484
  /**
9029
9485
  * Response for status 503
@@ -9820,7 +10276,13 @@ export type ListAgentThreadsResponses = {
9820
10276
  } | null;
9821
10277
  };
9822
10278
  runsOn?: "computer";
9823
- computerId?: string;
10279
+ computer?: {
10280
+ id: string;
10281
+ name: string;
10282
+ folder: string;
10283
+ online: boolean;
10284
+ };
10285
+ movedAt?: string;
9824
10286
  status: "active" | "archived";
9825
10287
  activeRunId: string | null;
9826
10288
  lastMessageAt?: string;
@@ -9845,6 +10307,11 @@ export type CreateAgentThreadData = {
9845
10307
  } | null;
9846
10308
  };
9847
10309
  runsOn?: "computer";
10310
+ computer?: {
10311
+ id: string;
10312
+ name: string;
10313
+ folder: string;
10314
+ };
9848
10315
  };
9849
10316
  path?: never;
9850
10317
  query?: never;
@@ -9924,7 +10391,13 @@ export type CreateAgentThreadResponses = {
9924
10391
  } | null;
9925
10392
  };
9926
10393
  runsOn?: "computer";
9927
- computerId?: string;
10394
+ computer?: {
10395
+ id: string;
10396
+ name: string;
10397
+ folder: string;
10398
+ online: boolean;
10399
+ };
10400
+ movedAt?: string;
9928
10401
  status: "active" | "archived";
9929
10402
  activeRunId: string | null;
9930
10403
  lastMessageAt?: string;
@@ -10012,7 +10485,13 @@ export type GetAgentThreadResponses = {
10012
10485
  } | null;
10013
10486
  };
10014
10487
  runsOn?: "computer";
10015
- computerId?: string;
10488
+ computer?: {
10489
+ id: string;
10490
+ name: string;
10491
+ folder: string;
10492
+ online: boolean;
10493
+ };
10494
+ movedAt?: string;
10016
10495
  status: "active" | "archived";
10017
10496
  activeRunId: string | null;
10018
10497
  lastMessageAt?: string;
@@ -10121,7 +10600,13 @@ export type AddAgentThreadParticipantsResponses = {
10121
10600
  } | null;
10122
10601
  };
10123
10602
  runsOn?: "computer";
10124
- computerId?: string;
10603
+ computer?: {
10604
+ id: string;
10605
+ name: string;
10606
+ folder: string;
10607
+ online: boolean;
10608
+ };
10609
+ movedAt?: string;
10125
10610
  status: "active" | "archived";
10126
10611
  activeRunId: string | null;
10127
10612
  lastMessageAt?: string;
@@ -10268,7 +10753,13 @@ export type ForkAgentThreadResponses = {
10268
10753
  } | null;
10269
10754
  };
10270
10755
  runsOn?: "computer";
10271
- computerId?: string;
10756
+ computer?: {
10757
+ id: string;
10758
+ name: string;
10759
+ folder: string;
10760
+ online: boolean;
10761
+ };
10762
+ movedAt?: string;
10272
10763
  status: "active" | "archived";
10273
10764
  activeRunId: string | null;
10274
10765
  lastMessageAt?: string;
@@ -10366,7 +10857,13 @@ export type RecreateAgentThreadSandboxResponses = {
10366
10857
  } | null;
10367
10858
  };
10368
10859
  runsOn?: "computer";
10369
- computerId?: string;
10860
+ computer?: {
10861
+ id: string;
10862
+ name: string;
10863
+ folder: string;
10864
+ online: boolean;
10865
+ };
10866
+ movedAt?: string;
10370
10867
  status: "active" | "archived";
10371
10868
  activeRunId: string | null;
10372
10869
  lastMessageAt?: string;
@@ -10482,7 +10979,7 @@ export type ListAgentThreadMessagesResponses = {
10482
10979
  } | {
10483
10980
  kind: "error";
10484
10981
  error: {
10485
- code: "action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed";
10982
+ code: "action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed";
10486
10983
  message: string;
10487
10984
  retryable: boolean;
10488
10985
  at: string;
@@ -10588,6 +11085,17 @@ export type ListAgentThreadMessagesResponses = {
10588
11085
  output: string | number | boolean | Array<unknown> | {
10589
11086
  [key: string]: unknown;
10590
11087
  } | null;
11088
+ outputFile?: {
11089
+ fileRef: {
11090
+ blobId: string;
11091
+ digest: string;
11092
+ sizeBytes: number;
11093
+ fileName?: string;
11094
+ mediaType?: string;
11095
+ logicalPath?: string;
11096
+ };
11097
+ path: string;
11098
+ };
10591
11099
  } | {
10592
11100
  type: "tool-call";
10593
11101
  toolCallId: string;
@@ -10625,6 +11133,10 @@ export type ListAgentThreadMessagesResponses = {
10625
11133
  }>;
10626
11134
  compaction?: {
10627
11135
  checkpointId: string;
11136
+ /**
11137
+ * `threshold`: the conversation reached its model's limit, or came back large after its cache expired. `overflow`: the provider refused a request as too long, and the turn went on condensed.
11138
+ */
11139
+ reason: "threshold" | "overflow";
10628
11140
  summary: string;
10629
11141
  createdAt: string;
10630
11142
  };
@@ -10831,7 +11343,7 @@ export type PostAgentThreadMessageResponses = {
10831
11343
  message: string;
10832
11344
  }>;
10833
11345
  error?: {
10834
- code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
11346
+ code: "internal.unexpected" | "runtime.cancelled" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
10835
11347
  message: string;
10836
11348
  retryable: boolean;
10837
11349
  at: string;
@@ -11067,7 +11579,7 @@ export type CancelAgentRunResponses = {
11067
11579
  message: string;
11068
11580
  }>;
11069
11581
  error?: {
11070
- code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
11582
+ code: "internal.unexpected" | "runtime.cancelled" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
11071
11583
  message: string;
11072
11584
  retryable: boolean;
11073
11585
  at: string;
@@ -11227,7 +11739,7 @@ export type RetryAgentRunResponses = {
11227
11739
  message: string;
11228
11740
  }>;
11229
11741
  error?: {
11230
- code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
11742
+ code: "internal.unexpected" | "runtime.cancelled" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
11231
11743
  message: string;
11232
11744
  retryable: boolean;
11233
11745
  at: string;
@@ -11250,6 +11762,82 @@ export type RetryAgentRunResponses = {
11250
11762
  };
11251
11763
  };
11252
11764
  export type RetryAgentRunResponse = RetryAgentRunResponses[keyof RetryAgentRunResponses];
11765
+ export type GetAgentThreadContextData = {
11766
+ body?: never;
11767
+ path: {
11768
+ threadId: string;
11769
+ };
11770
+ query?: {
11771
+ provider?: string;
11772
+ modelId?: string;
11773
+ };
11774
+ url: "/api/agent-threads/{threadId}/context";
11775
+ };
11776
+ export type GetAgentThreadContextErrors = {
11777
+ /**
11778
+ * Response for status 400
11779
+ */
11780
+ 400: {
11781
+ error: string;
11782
+ };
11783
+ /**
11784
+ * Response for status 404
11785
+ */
11786
+ 404: {
11787
+ error: string;
11788
+ };
11789
+ /**
11790
+ * Response for status 409
11791
+ */
11792
+ 409: {
11793
+ error: string;
11794
+ code?: string;
11795
+ };
11796
+ /**
11797
+ * Response for status 501
11798
+ */
11799
+ 501: {
11800
+ error: string;
11801
+ };
11802
+ };
11803
+ export type GetAgentThreadContextError = GetAgentThreadContextErrors[keyof GetAgentThreadContextErrors];
11804
+ export type GetAgentThreadContextResponses = {
11805
+ /**
11806
+ * Response for status 200
11807
+ */
11808
+ 200: {
11809
+ model: {
11810
+ provider: string;
11811
+ modelId: string;
11812
+ };
11813
+ windowTokens: number;
11814
+ limitTokens: number;
11815
+ usedTokens?: number;
11816
+ parts?: Array<{
11817
+ /**
11818
+ * `system`: Sixb's own prompt. `instructions`: the project's SIXB.md. `memory`, `skills`, `ontology`: their index in the prompt and the files the agent read. `tools`: the tool definitions. `summary`: what a condensed conversation keeps of its earlier part. `messages`: the conversation's text. `toolResults`: every other tool result. `files`: attachments and images.
11819
+ */
11820
+ part: "system" | "instructions" | "memory" | "skills" | "ontology" | "tools" | "summary" | "messages" | "toolResults" | "files";
11821
+ tokens: number;
11822
+ }>;
11823
+ lastCall?: {
11824
+ inputTokens: number;
11825
+ outputTokens?: number;
11826
+ cacheReadInputTokens?: number;
11827
+ occurredAt: string;
11828
+ };
11829
+ lastCompaction?: {
11830
+ /**
11831
+ * `threshold`: the conversation reached its model's limit, or came back large after its cache expired. `overflow`: the provider refused a request as too long, and the turn went on condensed.
11832
+ */
11833
+ reason: "threshold" | "overflow";
11834
+ createdAt: string;
11835
+ estimatedInputTokensBefore: number;
11836
+ estimatedInputTokensAfter: number;
11837
+ };
11838
+ };
11839
+ };
11840
+ export type GetAgentThreadContextResponse = GetAgentThreadContextResponses[keyof GetAgentThreadContextResponses];
11253
11841
  export type ListAgentThreadRunsData = {
11254
11842
  body?: never;
11255
11843
  path: {
@@ -11360,7 +11948,7 @@ export type ListAgentThreadRunsResponses = {
11360
11948
  message: string;
11361
11949
  }>;
11362
11950
  error?: {
11363
- code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
11951
+ code: "internal.unexpected" | "runtime.cancelled" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
11364
11952
  message: string;
11365
11953
  retryable: boolean;
11366
11954
  at: string;
@@ -11489,7 +12077,7 @@ export type GetAgentRunResponses = {
11489
12077
  message: string;
11490
12078
  }>;
11491
12079
  error?: {
11492
- code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
12080
+ code: "internal.unexpected" | "runtime.cancelled" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
11493
12081
  message: string;
11494
12082
  retryable: boolean;
11495
12083
  at: string;
@@ -11631,7 +12219,7 @@ export type CancelAgentRunByIdResponses = {
11631
12219
  message: string;
11632
12220
  }>;
11633
12221
  error?: {
11634
- code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
12222
+ code: "internal.unexpected" | "runtime.cancelled" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
11635
12223
  message: string;
11636
12224
  retryable: boolean;
11637
12225
  at: string;
@@ -11785,9 +12373,122 @@ export type HeadAgentChildFileContentResponses = {
11785
12373
  */
11786
12374
  206: unknown;
11787
12375
  };
12376
+ export type MoveAgentThreadToCloudData = {
12377
+ body?: never;
12378
+ path: {
12379
+ threadId: string;
12380
+ };
12381
+ query?: never;
12382
+ url: "/api/agent-threads/{threadId}/computer";
12383
+ };
12384
+ export type MoveAgentThreadToCloudErrors = {
12385
+ /**
12386
+ * Response for status 400
12387
+ */
12388
+ 400: {
12389
+ error: string;
12390
+ code?: string;
12391
+ };
12392
+ /**
12393
+ * Response for status 403
12394
+ */
12395
+ 403: {
12396
+ error: string;
12397
+ code?: string;
12398
+ };
12399
+ /**
12400
+ * Response for status 404
12401
+ */
12402
+ 404: {
12403
+ error: string;
12404
+ code?: string;
12405
+ };
12406
+ /**
12407
+ * Response for status 409
12408
+ */
12409
+ 409: {
12410
+ error: string;
12411
+ code?: string;
12412
+ };
12413
+ /**
12414
+ * Response for status 501
12415
+ */
12416
+ 501: {
12417
+ error: string;
12418
+ };
12419
+ };
12420
+ export type MoveAgentThreadToCloudError = MoveAgentThreadToCloudErrors[keyof MoveAgentThreadToCloudErrors];
12421
+ export type MoveAgentThreadToCloudResponses = {
12422
+ /**
12423
+ * Response for status 200
12424
+ */
12425
+ 200: {
12426
+ sandboxState?: {
12427
+ name: string;
12428
+ status: "new" | "busy" | "ready" | "blocked" | "unavailable";
12429
+ initialized: boolean;
12430
+ };
12431
+ id: string;
12432
+ projectId: string;
12433
+ kind: "conversation" | "subagent";
12434
+ parent?: {
12435
+ threadId: string;
12436
+ spawnedBy: string;
12437
+ key: string;
12438
+ };
12439
+ ownerPrincipal: {
12440
+ type: "user" | "serviceAccount" | "system";
12441
+ id: string;
12442
+ };
12443
+ owner: {
12444
+ type: "user" | "serviceAccount" | "system";
12445
+ id: string;
12446
+ displayName?: string;
12447
+ };
12448
+ participants: Array<{
12449
+ principal: {
12450
+ type: "user";
12451
+ id: string;
12452
+ displayName?: string;
12453
+ };
12454
+ addedAt: string;
12455
+ addedBy: {
12456
+ type: "user" | "serviceAccount" | "system";
12457
+ id: string;
12458
+ };
12459
+ }>;
12460
+ title?: string;
12461
+ sandboxParams?: {
12462
+ [key: string]: string | number | boolean | Array<unknown> | {
12463
+ [key: string]: unknown;
12464
+ } | null;
12465
+ };
12466
+ runsOn?: "computer";
12467
+ computer?: {
12468
+ id: string;
12469
+ name: string;
12470
+ folder: string;
12471
+ online: boolean;
12472
+ };
12473
+ movedAt?: string;
12474
+ status: "active" | "archived";
12475
+ activeRunId: string | null;
12476
+ lastMessageAt?: string;
12477
+ messageCount: number;
12478
+ createdAt: string;
12479
+ updatedAt: string;
12480
+ approvalMode?: "manual" | "accept-edits" | "auto";
12481
+ approvalModeSource?: "thread" | "default" | "fallback" | "run";
12482
+ };
12483
+ };
12484
+ export type MoveAgentThreadToCloudResponse = MoveAgentThreadToCloudResponses[keyof MoveAgentThreadToCloudResponses];
11788
12485
  export type MoveAgentThreadToComputerData = {
11789
12486
  body: {
11790
- computerId: string;
12487
+ computer: {
12488
+ id: string;
12489
+ name: string;
12490
+ folder: string;
12491
+ };
11791
12492
  };
11792
12493
  path: {
11793
12494
  threadId: string;
@@ -11817,6 +12518,13 @@ export type MoveAgentThreadToComputerErrors = {
11817
12518
  error: string;
11818
12519
  code?: string;
11819
12520
  };
12521
+ /**
12522
+ * Response for status 409
12523
+ */
12524
+ 409: {
12525
+ error: string;
12526
+ code?: string;
12527
+ };
11820
12528
  /**
11821
12529
  * Response for status 501
11822
12530
  */
@@ -11871,7 +12579,13 @@ export type MoveAgentThreadToComputerResponses = {
11871
12579
  } | null;
11872
12580
  };
11873
12581
  runsOn?: "computer";
11874
- computerId?: string;
12582
+ computer?: {
12583
+ id: string;
12584
+ name: string;
12585
+ folder: string;
12586
+ online: boolean;
12587
+ };
12588
+ movedAt?: string;
11875
12589
  status: "active" | "archived";
11876
12590
  activeRunId: string | null;
11877
12591
  lastMessageAt?: string;
@@ -11883,6 +12597,75 @@ export type MoveAgentThreadToComputerResponses = {
11883
12597
  };
11884
12598
  };
11885
12599
  export type MoveAgentThreadToComputerResponse = MoveAgentThreadToComputerResponses[keyof MoveAgentThreadToComputerResponses];
12600
+ export type ReleaseAgentComputerSessionData = {
12601
+ body?: never;
12602
+ path: {
12603
+ sessionId: string;
12604
+ };
12605
+ query?: never;
12606
+ url: "/api/agent-computers/sessions/{sessionId}";
12607
+ };
12608
+ export type ReleaseAgentComputerSessionErrors = {
12609
+ /**
12610
+ * Response for status 501
12611
+ */
12612
+ 501: {
12613
+ error: string;
12614
+ };
12615
+ };
12616
+ export type ReleaseAgentComputerSessionError = ReleaseAgentComputerSessionErrors[keyof ReleaseAgentComputerSessionErrors];
12617
+ export type ReleaseAgentComputerSessionResponses = {
12618
+ /**
12619
+ * Response for status 204
12620
+ */
12621
+ 204: unknown;
12622
+ };
12623
+ export type HoldAgentComputerSessionData = {
12624
+ body: {
12625
+ computer: {
12626
+ id: string;
12627
+ name: string;
12628
+ folder: string;
12629
+ };
12630
+ };
12631
+ path: {
12632
+ sessionId: string;
12633
+ };
12634
+ query?: never;
12635
+ url: "/api/agent-computers/sessions/{sessionId}";
12636
+ };
12637
+ export type HoldAgentComputerSessionErrors = {
12638
+ /**
12639
+ * Response for status 400
12640
+ */
12641
+ 400: {
12642
+ error: string;
12643
+ code?: string;
12644
+ };
12645
+ /**
12646
+ * Response for status 429
12647
+ */
12648
+ 429: {
12649
+ error: string;
12650
+ };
12651
+ /**
12652
+ * Response for status 501
12653
+ */
12654
+ 501: {
12655
+ error: string;
12656
+ };
12657
+ };
12658
+ export type HoldAgentComputerSessionError = HoldAgentComputerSessionErrors[keyof HoldAgentComputerSessionErrors];
12659
+ export type HoldAgentComputerSessionResponses = {
12660
+ /**
12661
+ * Response for status 200
12662
+ */
12663
+ 200: {
12664
+ expiresAt: string;
12665
+ waiting: Array<string>;
12666
+ };
12667
+ };
12668
+ export type HoldAgentComputerSessionResponse = HoldAgentComputerSessionResponses[keyof HoldAgentComputerSessionResponses];
11886
12669
  export type GetAgentPreferencesData = {
11887
12670
  body?: never;
11888
12671
  path?: never;
@@ -12042,7 +12825,13 @@ export type SetAgentThreadApprovalModeResponses = {
12042
12825
  } | null;
12043
12826
  };
12044
12827
  runsOn?: "computer";
12045
- computerId?: string;
12828
+ computer?: {
12829
+ id: string;
12830
+ name: string;
12831
+ folder: string;
12832
+ online: boolean;
12833
+ };
12834
+ movedAt?: string;
12046
12835
  status: "active" | "archived";
12047
12836
  activeRunId: string | null;
12048
12837
  lastMessageAt?: string;
@@ -12167,7 +12956,7 @@ export type ListAgentThreadApprovalsResponses = {
12167
12956
  } | {
12168
12957
  kind: "error";
12169
12958
  error: {
12170
- code: "action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed";
12959
+ code: "action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed";
12171
12960
  message: string;
12172
12961
  retryable: boolean;
12173
12962
  at: string;
@@ -12316,7 +13105,7 @@ export type DecideAgentApprovalResponses = {
12316
13105
  } | {
12317
13106
  kind: "error";
12318
13107
  error: {
12319
- code: "action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed";
13108
+ code: "action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed";
12320
13109
  message: string;
12321
13110
  retryable: boolean;
12322
13111
  at: string;
@@ -12404,7 +13193,7 @@ export type DecideAgentApprovalResponses = {
12404
13193
  message: string;
12405
13194
  }>;
12406
13195
  error?: {
12407
- code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
13196
+ code: "internal.unexpected" | "runtime.cancelled" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
12408
13197
  message: string;
12409
13198
  retryable: boolean;
12410
13199
  at: string;
@@ -12537,7 +13326,7 @@ export type ListAgentApprovalsResponses = {
12537
13326
  } | {
12538
13327
  kind: "error";
12539
13328
  error: {
12540
- code: "action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed";
13329
+ code: "action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed";
12541
13330
  message: string;
12542
13331
  retryable: boolean;
12543
13332
  at: string;
@@ -12640,7 +13429,13 @@ export type GetObservedAgentThreadResponses = {
12640
13429
  } | null;
12641
13430
  };
12642
13431
  runsOn?: "computer";
12643
- computerId?: string;
13432
+ computer?: {
13433
+ id: string;
13434
+ name: string;
13435
+ folder: string;
13436
+ online: boolean;
13437
+ };
13438
+ movedAt?: string;
12644
13439
  status: "active" | "archived";
12645
13440
  activeRunId: string | null;
12646
13441
  lastMessageAt?: string;
@@ -12762,7 +13557,7 @@ export type ListObservedAgentThreadMessagesResponses = {
12762
13557
  } | {
12763
13558
  kind: "error";
12764
13559
  error: {
12765
- code: "action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed";
13560
+ code: "action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed";
12766
13561
  message: string;
12767
13562
  retryable: boolean;
12768
13563
  at: string;
@@ -12868,6 +13663,17 @@ export type ListObservedAgentThreadMessagesResponses = {
12868
13663
  output: string | number | boolean | Array<unknown> | {
12869
13664
  [key: string]: unknown;
12870
13665
  } | null;
13666
+ outputFile?: {
13667
+ fileRef: {
13668
+ blobId: string;
13669
+ digest: string;
13670
+ sizeBytes: number;
13671
+ fileName?: string;
13672
+ mediaType?: string;
13673
+ logicalPath?: string;
13674
+ };
13675
+ path: string;
13676
+ };
12871
13677
  } | {
12872
13678
  type: "tool-call";
12873
13679
  toolCallId: string;
@@ -12905,6 +13711,10 @@ export type ListObservedAgentThreadMessagesResponses = {
12905
13711
  }>;
12906
13712
  compaction?: {
12907
13713
  checkpointId: string;
13714
+ /**
13715
+ * `threshold`: the conversation reached its model's limit, or came back large after its cache expired. `overflow`: the provider refused a request as too long, and the turn went on condensed.
13716
+ */
13717
+ reason: "threshold" | "overflow";
12908
13718
  summary: string;
12909
13719
  createdAt: string;
12910
13720
  };
@@ -13090,7 +13900,7 @@ export type ListObservedAgentThreadRunsResponses = {
13090
13900
  message: string;
13091
13901
  }>;
13092
13902
  error?: {
13093
- code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
13903
+ code: "internal.unexpected" | "runtime.cancelled" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
13094
13904
  message: string;
13095
13905
  retryable: boolean;
13096
13906
  at: string;
@@ -15590,7 +16400,7 @@ export type ListModelsResponses = {
15590
16400
  };
15591
16401
  };
15592
16402
  export type ListModelsResponse = ListModelsResponses[keyof ListModelsResponses];
15593
- export type RemoveObjectLinkData = {
16403
+ export type GetObjectLinkLineageData = {
15594
16404
  body?: never;
15595
16405
  path: {
15596
16406
  objectTypeId: string;
@@ -15601,21 +16411,15 @@ export type RemoveObjectLinkData = {
15601
16411
  targetTypeId: string;
15602
16412
  targetId: string;
15603
16413
  };
15604
- url: "/api/objects/{objectTypeId}/{objectId}/links/{linkId}";
16414
+ url: "/api/objects/{objectTypeId}/{objectId}/links/{linkId}/lineage";
15605
16415
  };
15606
- export type RemoveObjectLinkErrors = {
16416
+ export type GetObjectLinkLineageErrors = {
15607
16417
  /**
15608
16418
  * Response for status 400
15609
16419
  */
15610
16420
  400: {
15611
16421
  error: string;
15612
16422
  };
15613
- /**
15614
- * Response for status 403
15615
- */
15616
- 403: {
15617
- error: string;
15618
- };
15619
16423
  /**
15620
16424
  * Response for status 404
15621
16425
  */
@@ -15623,106 +16427,136 @@ export type RemoveObjectLinkErrors = {
15623
16427
  error: string;
15624
16428
  };
15625
16429
  };
15626
- export type RemoveObjectLinkError = RemoveObjectLinkErrors[keyof RemoveObjectLinkErrors];
15627
- export type RemoveObjectLinkResponses = {
16430
+ export type GetObjectLinkLineageError = GetObjectLinkLineageErrors[keyof GetObjectLinkLineageErrors];
16431
+ export type GetObjectLinkLineageResponses = {
15628
16432
  /**
15629
16433
  * Response for status 200
15630
16434
  */
15631
16435
  200: {
15632
- success: boolean;
15633
- };
15634
- };
15635
- export type RemoveObjectLinkResponse = RemoveObjectLinkResponses[keyof RemoveObjectLinkResponses];
15636
- export type UpsertObjectLinkData = {
15637
- body: {
16436
+ sourceTypeId: string;
16437
+ sourceId: string;
16438
+ linkId: string;
15638
16439
  targetTypeId: string;
15639
16440
  targetId: string;
15640
- properties?: {
15641
- [key: string]: unknown;
16441
+ existence: {
16442
+ source: string;
16443
+ columns?: Array<string>;
16444
+ origins?: Array<{
16445
+ datasetId: string;
16446
+ column: string;
16447
+ }>;
15642
16448
  };
15643
- };
15644
- path: {
15645
- objectTypeId: string;
15646
- objectId: string;
15647
- linkId: string;
15648
- };
15649
- query?: never;
15650
- url: "/api/objects/{objectTypeId}/{objectId}/links/{linkId}";
15651
- };
15652
- export type UpsertObjectLinkErrors = {
15653
- /**
15654
- * Response for status 400
15655
- */
15656
- 400: {
15657
- error: string;
15658
- };
15659
- /**
15660
- * Response for status 403
15661
- */
15662
- 403: {
15663
- error: string;
15664
- };
15665
- /**
15666
- * Response for status 404
15667
- */
15668
- 404: {
15669
- error: string;
15670
- };
15671
- };
15672
- export type UpsertObjectLinkError = UpsertObjectLinkErrors[keyof UpsertObjectLinkErrors];
15673
- export type UpsertObjectLinkResponses = {
15674
- /**
15675
- * Response for status 200
15676
- */
15677
- 200: {
15678
- success: boolean;
15679
- };
15680
- };
15681
- export type UpsertObjectLinkResponse = UpsertObjectLinkResponses[keyof UpsertObjectLinkResponses];
15682
- export type AppendTelemetryData = {
15683
- body: {
15684
- value?: unknown;
15685
- unit?: string;
15686
- at?: string;
15687
- };
15688
- path: {
15689
- objectTypeId: string;
15690
- objectId: string;
15691
- propertyId: string;
15692
- };
15693
- query?: never;
15694
- url: "/api/objects/{objectTypeId}/{objectId}/telemetry/{propertyId}";
15695
- };
15696
- export type AppendTelemetryErrors = {
15697
- /**
15698
- * Response for status 400
15699
- */
15700
- 400: {
15701
- error: string;
15702
- };
15703
- /**
15704
- * Response for status 403
15705
- */
15706
- 403: {
15707
- error: string;
15708
- };
15709
- /**
15710
- * Response for status 404
15711
- */
15712
- 404: {
15713
- error: string;
15714
- };
15715
- };
15716
- export type AppendTelemetryError = AppendTelemetryErrors[keyof AppendTelemetryErrors];
15717
- export type AppendTelemetryResponses = {
15718
- /**
15719
- * Response for status 200
15720
- */
15721
- 200: {
15722
- success: boolean;
16449
+ /**
16450
+ * Keyed `projection:<id>`, `commit:<id>`, `commit@<instant>` when the commit is unknown, `telemetry:<commitId>` and `identity`.
16451
+ */
16452
+ sources: {
16453
+ [key: string]: {
16454
+ kind: "projection";
16455
+ projectionId: string;
16456
+ /**
16457
+ * Absent for a caller who cannot view the projection's runs.
16458
+ */
16459
+ projectionRunId?: string;
16460
+ /**
16461
+ * The dataset version applied. Absent for a caller who cannot view the dataset.
16462
+ */
16463
+ datasetVersion?: {
16464
+ datasetId: string;
16465
+ versionId: string;
16466
+ };
16467
+ /**
16468
+ * Upstream columns that decide which rows the version holds, which every value depends on. Absent when the version records no lineage or the caller cannot view it.
16469
+ */
16470
+ rowOrigins?: Array<{
16471
+ datasetId: string;
16472
+ column: string;
16473
+ }>;
16474
+ } | {
16475
+ kind: "edit";
16476
+ /**
16477
+ * Null when the commits made at that instant cannot be told apart.
16478
+ */
16479
+ commitId: string | null;
16480
+ committedAt: string;
16481
+ /**
16482
+ * Principal on whose behalf the commit ran; absent for automatic or anonymous work.
16483
+ */
16484
+ requestedBy?: {
16485
+ type: "user" | "serviceAccount";
16486
+ id: string;
16487
+ };
16488
+ executor?: {
16489
+ type: "request";
16490
+ requestId: string;
16491
+ } | {
16492
+ type: "primitive";
16493
+ kind: "action" | "pipeline" | "projection" | "rule" | "sync" | "webhook" | "workflow";
16494
+ id: string;
16495
+ runId: string;
16496
+ } | {
16497
+ type: "agent";
16498
+ runId: string;
16499
+ } | {
16500
+ type: "kernel";
16501
+ operation: {
16502
+ type: "ontology.recover";
16503
+ recoveryId: string;
16504
+ } | {
16505
+ type: "ontology.indexVectors";
16506
+ indexingId: string;
16507
+ };
16508
+ };
16509
+ /**
16510
+ * Absent for a direct write, and for an Action run the caller cannot view.
16511
+ */
16512
+ action?: {
16513
+ actionId: string;
16514
+ runId: string;
16515
+ };
16516
+ } | {
16517
+ kind: "telemetry";
16518
+ commitId: string;
16519
+ committedAt: string;
16520
+ projectionId?: string;
16521
+ /**
16522
+ * Principal on whose behalf the commit ran; absent for automatic or anonymous work.
16523
+ */
16524
+ requestedBy?: {
16525
+ type: "user" | "serviceAccount";
16526
+ id: string;
16527
+ };
16528
+ executor?: {
16529
+ type: "request";
16530
+ requestId: string;
16531
+ } | {
16532
+ type: "primitive";
16533
+ kind: "action" | "pipeline" | "projection" | "rule" | "sync" | "webhook" | "workflow";
16534
+ id: string;
16535
+ runId: string;
16536
+ } | {
16537
+ type: "agent";
16538
+ runId: string;
16539
+ } | {
16540
+ type: "kernel";
16541
+ operation: {
16542
+ type: "ontology.recover";
16543
+ recoveryId: string;
16544
+ } | {
16545
+ type: "ontology.indexVectors";
16546
+ indexingId: string;
16547
+ };
16548
+ };
16549
+ } | {
16550
+ kind: "identity";
16551
+ };
16552
+ };
16553
+ /**
16554
+ * Steps left out because the caller cannot view them.
16555
+ */
16556
+ restricted: number;
15723
16557
  };
15724
16558
  };
15725
- export type AppendTelemetryResponse = AppendTelemetryResponses[keyof AppendTelemetryResponses];
16559
+ export type GetObjectLinkLineageResponse = GetObjectLinkLineageResponses[keyof GetObjectLinkLineageResponses];
15726
16560
  export type GetBulkTelemetryHistoryData = {
15727
16561
  body: {
15728
16562
  series: Array<{