@sixb/client 0.2.0 → 0.2.3

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 (90) hide show
  1. package/dist/artifact-live.d.ts +31 -0
  2. package/dist/artifact-live.d.ts.map +1 -0
  3. package/dist/artifact-live.js +67 -0
  4. package/dist/artifact-live.js.map +10 -0
  5. package/dist/browser.d.ts +5 -0
  6. package/dist/browser.d.ts.map +1 -1
  7. package/dist/browser.js +38 -17
  8. package/dist/browser.js.map +3 -3
  9. package/dist/{chunk-j9t5h44d.js → chunk-15ynvne0.js} +40 -28
  10. package/dist/{chunk-j9t5h44d.js.map → chunk-15ynvne0.js.map} +4 -4
  11. package/dist/{chunk-1wdszw1c.js → chunk-90q7wa43.js} +30 -21
  12. package/dist/chunk-90q7wa43.js.map +17 -0
  13. package/dist/{chunk-s2pagg09.js → chunk-bgpzb1fn.js} +6 -6
  14. package/dist/{chunk-s2pagg09.js.map → chunk-bgpzb1fn.js.map} +1 -1
  15. package/dist/{chunk-sh0f609h.js → chunk-br10prhs.js} +4 -4
  16. package/dist/{chunk-sh0f609h.js.map → chunk-br10prhs.js.map} +1 -1
  17. package/dist/chunk-hj4h6hw6.js +827 -0
  18. package/dist/chunk-hj4h6hw6.js.map +18 -0
  19. package/dist/{chunk-mk0w4zr1.js → chunk-ktqfenfd.js} +43 -11
  20. package/dist/chunk-ktqfenfd.js.map +10 -0
  21. package/dist/{chunk-fnd56xxz.js → chunk-seeyb9k9.js} +8 -6
  22. package/dist/{chunk-fnd56xxz.js.map → chunk-seeyb9k9.js.map} +2 -2
  23. package/dist/{chunk-m2rmbshc.js → chunk-y9mhb8x4.js} +3 -1
  24. package/dist/chunk-y9mhb8x4.js.map +10 -0
  25. package/dist/{chunk-2qsekqcn.js → chunk-zerhr00d.js} +167 -832
  26. package/dist/chunk-zerhr00d.js.map +10 -0
  27. package/dist/client-authority.d.ts +11 -0
  28. package/dist/client-authority.d.ts.map +1 -1
  29. package/dist/connectors/connection.d.ts +8 -3
  30. package/dist/connectors/connection.d.ts.map +1 -1
  31. package/dist/connectors/mutations.d.ts +4 -0
  32. package/dist/connectors/mutations.d.ts.map +1 -1
  33. package/dist/connectors/queries.d.ts +98 -0
  34. package/dist/connectors/queries.d.ts.map +1 -1
  35. package/dist/events-builder.d.ts +2 -0
  36. package/dist/events-builder.d.ts.map +1 -1
  37. package/dist/events-provider.d.ts.map +1 -1
  38. package/dist/events-transport.d.ts.map +1 -1
  39. package/dist/file.d.ts +8 -0
  40. package/dist/file.d.ts.map +1 -1
  41. package/dist/generated/@tanstack/react-query.gen.d.ts +1891 -486
  42. package/dist/generated/@tanstack/react-query.gen.d.ts.map +1 -1
  43. package/dist/generated/index.d.ts +2 -2
  44. package/dist/generated/index.d.ts.map +1 -1
  45. package/dist/generated/sdk.gen.d.ts +92 -6
  46. package/dist/generated/sdk.gen.d.ts.map +1 -1
  47. package/dist/generated/types.gen.d.ts +2957 -195
  48. package/dist/generated/types.gen.d.ts.map +1 -1
  49. package/dist/hooks.d.ts +1 -1
  50. package/dist/hooks.d.ts.map +1 -1
  51. package/dist/hooks.js +321 -57
  52. package/dist/hooks.js.map +9 -9
  53. package/dist/index.js +90 -56
  54. package/dist/index.js.map +1 -1
  55. package/dist/logs.js +6 -5
  56. package/dist/logs.js.map +1 -1
  57. package/dist/models.d.ts +5 -2
  58. package/dist/models.d.ts.map +1 -1
  59. package/dist/models.js +38 -6
  60. package/dist/models.js.map +1 -1
  61. package/dist/query.js +6 -5
  62. package/dist/query.js.map +1 -1
  63. package/dist/useDesktop.d.ts +25 -0
  64. package/dist/useDesktop.d.ts.map +1 -1
  65. package/dist/users-hooks.d.ts.map +1 -1
  66. package/dist/ws-socket.d.ts +17 -2
  67. package/dist/ws-socket.d.ts.map +1 -1
  68. package/package.json +8 -2
  69. package/src/artifact-live.ts +97 -0
  70. package/src/browser.ts +43 -5
  71. package/src/client-authority.ts +21 -0
  72. package/src/connectors/connection.ts +34 -12
  73. package/src/connectors/mutations.ts +8 -2
  74. package/src/connectors/queries.ts +6 -2
  75. package/src/events-builder.ts +9 -8
  76. package/src/events-provider.ts +13 -0
  77. package/src/events-transport.ts +3 -0
  78. package/src/file.ts +17 -0
  79. package/src/generated/@tanstack/react-query.gen.ts +492 -17
  80. package/src/generated/index.ts +96 -6
  81. package/src/generated/sdk.gen.ts +389 -12
  82. package/src/generated/types.gen.ts +3267 -300
  83. package/src/hooks.ts +7 -1
  84. package/src/models.ts +6 -2
  85. package/src/useDesktop.ts +27 -0
  86. package/src/ws-socket.ts +64 -10
  87. package/dist/chunk-1wdszw1c.js.map +0 -17
  88. package/dist/chunk-2qsekqcn.js.map +0 -19
  89. package/dist/chunk-m2rmbshc.js.map +0 -10
  90. package/dist/chunk-mk0w4zr1.js.map +0 -10
@@ -88,18 +88,23 @@ export type ObjectQueryFacetsResponse = {
88
88
  export type ArtifactErrorResponse = {
89
89
  error: string;
90
90
  /**
91
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
91
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
92
92
  */
93
93
  code?: string;
94
94
  /**
95
- * With artifact_moved: the latest version and who published it
95
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
96
96
  */
97
97
  latest?: {
98
98
  version: number;
99
+ revision: number;
99
100
  author: {
100
101
  type: "user" | "serviceAccount" | "system";
101
102
  id: string;
102
103
  };
104
+ frozenBy?: {
105
+ type: "user" | "serviceAccount" | "system";
106
+ id: string;
107
+ };
103
108
  };
104
109
  };
105
110
  export type ArtifactQueryResponse = {
@@ -167,7 +172,7 @@ export type ArtifactQueryProperty = {
167
172
  /**
168
173
  * The property's type, a value type resolved to the schema it names
169
174
  */
170
- type: "string" | "integer" | "double" | "decimal" | "boolean" | "date" | "timestamp" | "uuid" | "fileRef" | "userRef" | "enum" | "array" | "object" | "map";
175
+ type: "string" | "integer" | "double" | "decimal" | "boolean" | "date" | "timestamp" | "uuid" | "fileRef" | "userRef" | "artifactRef" | "enum" | "array" | "object" | "map";
171
176
  /**
172
177
  * What an enum's values are
173
178
  */
@@ -1988,7 +1993,7 @@ export type GetAiAccountingOverviewData = {
1988
1993
  /**
1989
1994
  * Calls to one kind of model
1990
1995
  */
1991
- kind?: "language" | "image" | "video" | "embedding" | "decision" | "transcription" | "speech" | "reranking";
1996
+ kind?: "language" | "image" | "video" | "embedding" | "decision" | "transcription" | "speech" | "reranking" | "web-search";
1992
1997
  bucket: "hour" | "day" | "week";
1993
1998
  };
1994
1999
  url: "/api/ai/accounting/overview";
@@ -2450,7 +2455,7 @@ export type GetAiAccountingOverviewResponses = {
2450
2455
  /**
2451
2456
  * Absent for calls recorded before their kind was captured.
2452
2457
  */
2453
- modelKind?: "language" | "image" | "video" | "embedding" | "decision" | "transcription" | "speech" | "reranking";
2458
+ modelKind?: "language" | "image" | "video" | "embedding" | "decision" | "transcription" | "speech" | "reranking" | "web-search";
2454
2459
  }>;
2455
2460
  agents: Array<{
2456
2461
  modelCallCount: number;
@@ -2676,7 +2681,7 @@ export type ListAiModelCallsData = {
2676
2681
  /**
2677
2682
  * Calls to one kind of model
2678
2683
  */
2679
- kind?: "language" | "image" | "video" | "embedding" | "decision" | "transcription" | "speech" | "reranking";
2684
+ kind?: "language" | "image" | "video" | "embedding" | "decision" | "transcription" | "speech" | "reranking" | "web-search";
2680
2685
  executionId?: string;
2681
2686
  valuationStatus?: "rated" | "unpriceable" | "unvalued";
2682
2687
  limit?: string;
@@ -2718,7 +2723,7 @@ export type ListAiModelCallsResponses = {
2718
2723
  callId: string;
2719
2724
  providerId: string;
2720
2725
  requestedModelId: string;
2721
- modelKind?: "language" | "image" | "video" | "embedding" | "decision" | "transcription" | "speech" | "reranking";
2726
+ modelKind?: "language" | "image" | "video" | "embedding" | "decision" | "transcription" | "speech" | "reranking" | "web-search";
2722
2727
  requestedReasoning?: "provider-default" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
2723
2728
  budgetTokens: number;
2724
2729
  };
@@ -3383,7 +3388,7 @@ export type ListAiModelCallGroupsData = {
3383
3388
  /**
3384
3389
  * Calls to one kind of model
3385
3390
  */
3386
- kind?: "language" | "image" | "video" | "embedding" | "decision" | "transcription" | "speech" | "reranking";
3391
+ kind?: "language" | "image" | "video" | "embedding" | "decision" | "transcription" | "speech" | "reranking" | "web-search";
3387
3392
  valuationStatus?: "rated" | "unpriceable" | "unvalued";
3388
3393
  limit?: string;
3389
3394
  offset?: string;
@@ -4126,27 +4131,23 @@ export type GetStatusResponses = {
4126
4131
  * Response for status 200
4127
4132
  */
4128
4133
  200: {
4129
- status: "ok" | "degraded";
4134
+ status: "ok" | "degraded" | "unknown";
4130
4135
  objectTypes: number;
4131
4136
  maintenance: {
4132
- running: boolean;
4133
- intervalMs: number;
4134
- lastStartedAt: string | null;
4135
- lastCompletedAt: string | null;
4136
- lastDurationMs: number | null;
4137
- consecutiveFailures: number;
4138
- lastError: string | null;
4137
+ owner: "orchestrator" | "embedded";
4138
+ beatAt: string | null;
4139
+ stale: boolean;
4140
+ passes: Array<{
4141
+ id: string;
4142
+ lastSucceededAt: string | null;
4143
+ consecutiveFailures: number;
4144
+ }>;
4139
4145
  outbox: {
4140
4146
  pendingCount: number;
4141
4147
  oldestPendingAt: string | null;
4142
4148
  retryingCount: number;
4143
4149
  maxAttempts: number;
4144
- } | null;
4145
- cleanup: {
4146
- publishedOutboxRowsDeleted: number;
4147
- terminalSourceRowsDeleted: number;
4148
- terminalSourceMaterializationsDeleted: number;
4149
- } | null;
4150
+ };
4150
4151
  };
4151
4152
  };
4152
4153
  };
@@ -4223,7 +4224,9 @@ export type ListConnectorConnectionsData = {
4223
4224
  path: {
4224
4225
  connectorId: string;
4225
4226
  };
4226
- query?: never;
4227
+ query?: {
4228
+ owner?: "project" | "me";
4229
+ };
4227
4230
  url: "/api/connectors/{connectorId}/connections";
4228
4231
  };
4229
4232
  export type ListConnectorConnectionsErrors = {
@@ -4274,6 +4277,9 @@ export type ListConnectorConnectionsResponses = {
4274
4277
  connectorId: string;
4275
4278
  owner: {
4276
4279
  type: "project";
4280
+ } | {
4281
+ type: "user";
4282
+ id: string;
4277
4283
  };
4278
4284
  slot: string;
4279
4285
  account: {
@@ -4441,6 +4447,9 @@ export type RevokeConnectorConnectionResponses = {
4441
4447
  connectorId: string;
4442
4448
  owner: {
4443
4449
  type: "project";
4450
+ } | {
4451
+ type: "user";
4452
+ id: string;
4444
4453
  };
4445
4454
  slot: string;
4446
4455
  account: {
@@ -4511,6 +4520,9 @@ export type ListPendingConnectorConnectionRunsResponses = {
4511
4520
  kind: "connect" | "reauthorize";
4512
4521
  owner: {
4513
4522
  type: "project";
4523
+ } | {
4524
+ type: "user";
4525
+ id: string;
4514
4526
  };
4515
4527
  slot: string;
4516
4528
  createdAt: string;
@@ -4524,6 +4536,9 @@ export type ListPendingConnectorConnectionRunsResponses = {
4524
4536
  kind: "connect" | "reauthorize";
4525
4537
  owner: {
4526
4538
  type: "project";
4539
+ } | {
4540
+ type: "user";
4541
+ id: string;
4527
4542
  };
4528
4543
  slot: string;
4529
4544
  createdAt: string;
@@ -4535,6 +4550,9 @@ export type ListPendingConnectorConnectionRunsResponses = {
4535
4550
  kind: "connect" | "reauthorize";
4536
4551
  owner: {
4537
4552
  type: "project";
4553
+ } | {
4554
+ type: "user";
4555
+ id: string;
4538
4556
  };
4539
4557
  slot: string;
4540
4558
  createdAt: string;
@@ -4553,6 +4571,9 @@ export type ListPendingConnectorConnectionRunsResponses = {
4553
4571
  kind: "connect" | "reauthorize";
4554
4572
  owner: {
4555
4573
  type: "project";
4574
+ } | {
4575
+ type: "user";
4576
+ id: string;
4556
4577
  };
4557
4578
  slot: string;
4558
4579
  createdAt: string;
@@ -4563,6 +4584,9 @@ export type ListPendingConnectorConnectionRunsResponses = {
4563
4584
  connectorId: string;
4564
4585
  owner: {
4565
4586
  type: "project";
4587
+ } | {
4588
+ type: "user";
4589
+ id: string;
4566
4590
  };
4567
4591
  slot: string;
4568
4592
  account: {
@@ -4580,6 +4604,9 @@ export type ListPendingConnectorConnectionRunsResponses = {
4580
4604
  kind: "connect" | "reauthorize";
4581
4605
  owner: {
4582
4606
  type: "project";
4607
+ } | {
4608
+ type: "user";
4609
+ id: string;
4583
4610
  };
4584
4611
  slot: string;
4585
4612
  createdAt: string;
@@ -4607,6 +4634,9 @@ export type ListPendingConnectorConnectionRunsResponses = {
4607
4634
  kind: "connect" | "reauthorize";
4608
4635
  owner: {
4609
4636
  type: "project";
4637
+ } | {
4638
+ type: "user";
4639
+ id: string;
4610
4640
  };
4611
4641
  slot: string;
4612
4642
  createdAt: string;
@@ -4618,6 +4648,7 @@ export type ListPendingConnectorConnectionRunsResponses = {
4618
4648
  export type ListPendingConnectorConnectionRunsResponse = ListPendingConnectorConnectionRunsResponses[keyof ListPendingConnectorConnectionRunsResponses];
4619
4649
  export type StartConnectorConnectionRunData = {
4620
4650
  body: {
4651
+ owner?: "project" | "me";
4621
4652
  slot: string;
4622
4653
  returnTo: string;
4623
4654
  };
@@ -4708,6 +4739,9 @@ export type StartConnectorConnectionRunResponses = {
4708
4739
  connectorId: string;
4709
4740
  owner: {
4710
4741
  type: "project";
4742
+ } | {
4743
+ type: "user";
4744
+ id: string;
4711
4745
  };
4712
4746
  slot: string;
4713
4747
  account: {
@@ -4779,6 +4813,9 @@ export type GetConnectorConnectionRunResponses = {
4779
4813
  kind: "connect" | "reauthorize";
4780
4814
  owner: {
4781
4815
  type: "project";
4816
+ } | {
4817
+ type: "user";
4818
+ id: string;
4782
4819
  };
4783
4820
  slot: string;
4784
4821
  createdAt: string;
@@ -4792,6 +4829,9 @@ export type GetConnectorConnectionRunResponses = {
4792
4829
  kind: "connect" | "reauthorize";
4793
4830
  owner: {
4794
4831
  type: "project";
4832
+ } | {
4833
+ type: "user";
4834
+ id: string;
4795
4835
  };
4796
4836
  slot: string;
4797
4837
  createdAt: string;
@@ -4803,6 +4843,9 @@ export type GetConnectorConnectionRunResponses = {
4803
4843
  kind: "connect" | "reauthorize";
4804
4844
  owner: {
4805
4845
  type: "project";
4846
+ } | {
4847
+ type: "user";
4848
+ id: string;
4806
4849
  };
4807
4850
  slot: string;
4808
4851
  createdAt: string;
@@ -4821,6 +4864,9 @@ export type GetConnectorConnectionRunResponses = {
4821
4864
  kind: "connect" | "reauthorize";
4822
4865
  owner: {
4823
4866
  type: "project";
4867
+ } | {
4868
+ type: "user";
4869
+ id: string;
4824
4870
  };
4825
4871
  slot: string;
4826
4872
  createdAt: string;
@@ -4831,6 +4877,9 @@ export type GetConnectorConnectionRunResponses = {
4831
4877
  connectorId: string;
4832
4878
  owner: {
4833
4879
  type: "project";
4880
+ } | {
4881
+ type: "user";
4882
+ id: string;
4834
4883
  };
4835
4884
  slot: string;
4836
4885
  account: {
@@ -4848,6 +4897,9 @@ export type GetConnectorConnectionRunResponses = {
4848
4897
  kind: "connect" | "reauthorize";
4849
4898
  owner: {
4850
4899
  type: "project";
4900
+ } | {
4901
+ type: "user";
4902
+ id: string;
4851
4903
  };
4852
4904
  slot: string;
4853
4905
  createdAt: string;
@@ -4875,6 +4927,9 @@ export type GetConnectorConnectionRunResponses = {
4875
4927
  kind: "connect" | "reauthorize";
4876
4928
  owner: {
4877
4929
  type: "project";
4930
+ } | {
4931
+ type: "user";
4932
+ id: string;
4878
4933
  };
4879
4934
  slot: string;
4880
4935
  createdAt: string;
@@ -4886,6 +4941,7 @@ export type GetConnectorConnectionRunResponses = {
4886
4941
  export type GetConnectorConnectionRunResponse = GetConnectorConnectionRunResponses[keyof GetConnectorConnectionRunResponses];
4887
4942
  export type AddConnectorConnectionData = {
4888
4943
  body: {
4944
+ owner?: "project" | "me";
4889
4945
  slot: string;
4890
4946
  };
4891
4947
  path: {
@@ -4954,6 +5010,9 @@ export type AddConnectorConnectionResponses = {
4954
5010
  kind: "connect" | "reauthorize";
4955
5011
  owner: {
4956
5012
  type: "project";
5013
+ } | {
5014
+ type: "user";
5015
+ id: string;
4957
5016
  };
4958
5017
  slot: string;
4959
5018
  createdAt: string;
@@ -4967,6 +5026,9 @@ export type AddConnectorConnectionResponses = {
4967
5026
  kind: "connect" | "reauthorize";
4968
5027
  owner: {
4969
5028
  type: "project";
5029
+ } | {
5030
+ type: "user";
5031
+ id: string;
4970
5032
  };
4971
5033
  slot: string;
4972
5034
  createdAt: string;
@@ -4978,6 +5040,9 @@ export type AddConnectorConnectionResponses = {
4978
5040
  kind: "connect" | "reauthorize";
4979
5041
  owner: {
4980
5042
  type: "project";
5043
+ } | {
5044
+ type: "user";
5045
+ id: string;
4981
5046
  };
4982
5047
  slot: string;
4983
5048
  createdAt: string;
@@ -4996,6 +5061,9 @@ export type AddConnectorConnectionResponses = {
4996
5061
  kind: "connect" | "reauthorize";
4997
5062
  owner: {
4998
5063
  type: "project";
5064
+ } | {
5065
+ type: "user";
5066
+ id: string;
4999
5067
  };
5000
5068
  slot: string;
5001
5069
  createdAt: string;
@@ -5006,6 +5074,9 @@ export type AddConnectorConnectionResponses = {
5006
5074
  connectorId: string;
5007
5075
  owner: {
5008
5076
  type: "project";
5077
+ } | {
5078
+ type: "user";
5079
+ id: string;
5009
5080
  };
5010
5081
  slot: string;
5011
5082
  account: {
@@ -5023,6 +5094,9 @@ export type AddConnectorConnectionResponses = {
5023
5094
  kind: "connect" | "reauthorize";
5024
5095
  owner: {
5025
5096
  type: "project";
5097
+ } | {
5098
+ type: "user";
5099
+ id: string;
5026
5100
  };
5027
5101
  slot: string;
5028
5102
  createdAt: string;
@@ -5050,6 +5124,9 @@ export type AddConnectorConnectionResponses = {
5050
5124
  kind: "connect" | "reauthorize";
5051
5125
  owner: {
5052
5126
  type: "project";
5127
+ } | {
5128
+ type: "user";
5129
+ id: string;
5053
5130
  };
5054
5131
  slot: string;
5055
5132
  createdAt: string;
@@ -5130,6 +5207,9 @@ export type SelectConnectorConnectionRunAccountResponses = {
5130
5207
  kind: "connect" | "reauthorize";
5131
5208
  owner: {
5132
5209
  type: "project";
5210
+ } | {
5211
+ type: "user";
5212
+ id: string;
5133
5213
  };
5134
5214
  slot: string;
5135
5215
  createdAt: string;
@@ -5143,6 +5223,9 @@ export type SelectConnectorConnectionRunAccountResponses = {
5143
5223
  kind: "connect" | "reauthorize";
5144
5224
  owner: {
5145
5225
  type: "project";
5226
+ } | {
5227
+ type: "user";
5228
+ id: string;
5146
5229
  };
5147
5230
  slot: string;
5148
5231
  createdAt: string;
@@ -5154,6 +5237,9 @@ export type SelectConnectorConnectionRunAccountResponses = {
5154
5237
  kind: "connect" | "reauthorize";
5155
5238
  owner: {
5156
5239
  type: "project";
5240
+ } | {
5241
+ type: "user";
5242
+ id: string;
5157
5243
  };
5158
5244
  slot: string;
5159
5245
  createdAt: string;
@@ -5172,6 +5258,9 @@ export type SelectConnectorConnectionRunAccountResponses = {
5172
5258
  kind: "connect" | "reauthorize";
5173
5259
  owner: {
5174
5260
  type: "project";
5261
+ } | {
5262
+ type: "user";
5263
+ id: string;
5175
5264
  };
5176
5265
  slot: string;
5177
5266
  createdAt: string;
@@ -5182,6 +5271,9 @@ export type SelectConnectorConnectionRunAccountResponses = {
5182
5271
  connectorId: string;
5183
5272
  owner: {
5184
5273
  type: "project";
5274
+ } | {
5275
+ type: "user";
5276
+ id: string;
5185
5277
  };
5186
5278
  slot: string;
5187
5279
  account: {
@@ -5199,6 +5291,9 @@ export type SelectConnectorConnectionRunAccountResponses = {
5199
5291
  kind: "connect" | "reauthorize";
5200
5292
  owner: {
5201
5293
  type: "project";
5294
+ } | {
5295
+ type: "user";
5296
+ id: string;
5202
5297
  };
5203
5298
  slot: string;
5204
5299
  createdAt: string;
@@ -5226,6 +5321,9 @@ export type SelectConnectorConnectionRunAccountResponses = {
5226
5321
  kind: "connect" | "reauthorize";
5227
5322
  owner: {
5228
5323
  type: "project";
5324
+ } | {
5325
+ type: "user";
5326
+ id: string;
5229
5327
  };
5230
5328
  slot: string;
5231
5329
  createdAt: string;
@@ -5327,6 +5425,9 @@ export type ReauthorizeConnectorConnectionResponses = {
5327
5425
  connectorId: string;
5328
5426
  owner: {
5329
5427
  type: "project";
5428
+ } | {
5429
+ type: "user";
5430
+ id: string;
5330
5431
  };
5331
5432
  slot: string;
5332
5433
  account: {
@@ -5727,6 +5828,99 @@ export type ListDatasetRowsResponses = {
5727
5828
  };
5728
5829
  };
5729
5830
  export type ListDatasetRowsResponse = ListDatasetRowsResponses[keyof ListDatasetRowsResponses];
5831
+ export type GetLakeHealthData = {
5832
+ body?: never;
5833
+ path?: never;
5834
+ query?: never;
5835
+ url: "/api/lake/health";
5836
+ };
5837
+ export type GetLakeHealthErrors = {
5838
+ /**
5839
+ * Response for status 400
5840
+ */
5841
+ 400: {
5842
+ error: string;
5843
+ };
5844
+ };
5845
+ export type GetLakeHealthError = GetLakeHealthErrors[keyof GetLakeHealthErrors];
5846
+ export type GetLakeHealthResponses = {
5847
+ /**
5848
+ * Response for status 200
5849
+ */
5850
+ 200: {
5851
+ /**
5852
+ * Whether the lake storage provider supports maintenance
5853
+ */
5854
+ available: boolean;
5855
+ cleanup: {
5856
+ /**
5857
+ * What actually happens: `not-requested` when no orchestrator asks, `no-worker` when no lake worker runs what it asks
5858
+ */
5859
+ state: "off" | "idle" | "not-requested" | "no-worker" | "failing" | "cleaning" | "ok";
5860
+ /**
5861
+ * When the orchestrator last asked for cleanup
5862
+ */
5863
+ lastRequestedAt: string | null;
5864
+ /**
5865
+ * When a lake worker last started a cleanup
5866
+ */
5867
+ lastRunAt: string | null;
5868
+ keepVersionsFor: string;
5869
+ deleteFilesAfter: string;
5870
+ cleanupEvery: string;
5871
+ };
5872
+ datasets: Array<{
5873
+ datasetId: string;
5874
+ /**
5875
+ * Whether the dataset has a table in the lake
5876
+ */
5877
+ materialized: boolean;
5878
+ rowCount: number;
5879
+ /**
5880
+ * Data files its current rows are read from
5881
+ */
5882
+ dataFiles: number;
5883
+ /**
5884
+ * Data files small enough that compaction merges them
5885
+ */
5886
+ smallDataFiles: number;
5887
+ dataBytes: number;
5888
+ /**
5889
+ * Files listing deleted rows, until compaction
5890
+ */
5891
+ deleteFiles: number;
5892
+ /**
5893
+ * Rows kept in the catalog rather than in files
5894
+ */
5895
+ inlinedRows: number;
5896
+ /**
5897
+ * Commits still in the dataset's history
5898
+ */
5899
+ retainedSnapshots: number;
5900
+ partitionBy: Array<string>;
5901
+ warnings: Array<{
5902
+ code: "partitioned-small-dataset";
5903
+ message: string;
5904
+ }>;
5905
+ /**
5906
+ * Ingested changes waiting or refused; null when there are none
5907
+ */
5908
+ ingest: {
5909
+ pendingDeliveries: number;
5910
+ pendingChanges: number;
5911
+ /**
5912
+ * When the oldest waiting delivery arrived
5913
+ */
5914
+ oldestReceivedAt: string | null;
5915
+ /**
5916
+ * Deliveries refused when written, kept for a week to read and send again
5917
+ */
5918
+ rejectedDeliveries: number;
5919
+ } | null;
5920
+ }>;
5921
+ };
5922
+ };
5923
+ export type GetLakeHealthResponse = GetLakeHealthResponses[keyof GetLakeHealthResponses];
5730
5924
  export type ListSyncsData = {
5731
5925
  body?: never;
5732
5926
  path?: never;
@@ -5772,6 +5966,7 @@ export type ListSyncsResponses = {
5772
5966
  datasetId: string;
5773
5967
  mode: "snapshot" | "append" | "merge";
5774
5968
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
5969
+ attempt: number;
5775
5970
  queuedAt: string;
5776
5971
  startedAt?: string;
5777
5972
  finishedAt?: string;
@@ -5857,6 +6052,7 @@ export type GetSyncResponses = {
5857
6052
  datasetId: string;
5858
6053
  mode: "snapshot" | "append" | "merge";
5859
6054
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
6055
+ attempt: number;
5860
6056
  queuedAt: string;
5861
6057
  startedAt?: string;
5862
6058
  finishedAt?: string;
@@ -5928,6 +6124,7 @@ export type ListSyncRunsResponses = {
5928
6124
  datasetId: string;
5929
6125
  mode: "snapshot" | "append" | "merge";
5930
6126
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
6127
+ attempt: number;
5931
6128
  queuedAt: string;
5932
6129
  startedAt?: string;
5933
6130
  finishedAt?: string;
@@ -6071,6 +6268,7 @@ export type ListPipelinesResponses = {
6071
6268
  projectId: string;
6072
6269
  pipelineId: string;
6073
6270
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
6271
+ attempt: number;
6074
6272
  queuedAt: string;
6075
6273
  startedAt?: string;
6076
6274
  finishedAt?: string;
@@ -6176,6 +6374,7 @@ export type GetPipelineResponses = {
6176
6374
  projectId: string;
6177
6375
  pipelineId: string;
6178
6376
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
6377
+ attempt: number;
6179
6378
  queuedAt: string;
6180
6379
  startedAt?: string;
6181
6380
  finishedAt?: string;
@@ -6241,6 +6440,7 @@ export type ListPipelineRunsResponses = {
6241
6440
  projectId: string;
6242
6441
  pipelineId: string;
6243
6442
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
6443
+ attempt: number;
6244
6444
  queuedAt: string;
6245
6445
  startedAt?: string;
6246
6446
  finishedAt?: string;
@@ -6308,6 +6508,7 @@ export type GetPipelineRunResponses = {
6308
6508
  projectId: string;
6309
6509
  pipelineId: string;
6310
6510
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
6511
+ attempt: number;
6311
6512
  queuedAt: string;
6312
6513
  startedAt?: string;
6313
6514
  finishedAt?: string;
@@ -7321,7 +7522,7 @@ export type GetWorkflowAgentNodeExecutionResponses = {
7321
7522
  } | {
7322
7523
  kind: "error";
7323
7524
  error: {
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";
7525
+ 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.change_refused" | "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";
7325
7526
  message: string;
7326
7527
  retryable: boolean;
7327
7528
  at: string;
@@ -8422,6 +8623,14 @@ export type ExchangeSharedAccessResponses = {
8422
8623
  expiresAt: string;
8423
8624
  absoluteExpiresAt: string;
8424
8625
  csrfToken: string;
8626
+ /**
8627
+ * Who the visitor is in this session: the author id of the comments they write as a guest
8628
+ */
8629
+ guestId: string;
8630
+ /**
8631
+ * The name the visitor gave, which their comments and live presence carry
8632
+ */
8633
+ guestName?: string;
8425
8634
  };
8426
8635
  };
8427
8636
  export type ExchangeSharedAccessResponse = ExchangeSharedAccessResponses[keyof ExchangeSharedAccessResponses];
@@ -8458,9 +8667,78 @@ export type GetSharedAccessSessionResponses = {
8458
8667
  expiresAt: string;
8459
8668
  absoluteExpiresAt: string;
8460
8669
  csrfToken: string;
8670
+ /**
8671
+ * Who the visitor is in this session: the author id of the comments they write as a guest
8672
+ */
8673
+ guestId: string;
8674
+ /**
8675
+ * The name the visitor gave, which their comments and live presence carry
8676
+ */
8677
+ guestName?: string;
8461
8678
  };
8462
8679
  };
8463
8680
  export type GetSharedAccessSessionResponse = GetSharedAccessSessionResponses[keyof GetSharedAccessSessionResponses];
8681
+ export type SetSharedAccessGuestNameData = {
8682
+ body: {
8683
+ /**
8684
+ * The visitor's name, on one line: 1 to 60 characters once its spaces are collapsed, without control or direction marks
8685
+ */
8686
+ name: string;
8687
+ };
8688
+ path: {
8689
+ grantId: string;
8690
+ };
8691
+ query?: never;
8692
+ url: "/api/shared-access/{grantId}/name";
8693
+ };
8694
+ export type SetSharedAccessGuestNameErrors = {
8695
+ /**
8696
+ * Response for status 400
8697
+ */
8698
+ 400: {
8699
+ error: string;
8700
+ };
8701
+ /**
8702
+ * Response for status 401
8703
+ */
8704
+ 401: {
8705
+ error: string;
8706
+ };
8707
+ /**
8708
+ * Response for status 403
8709
+ */
8710
+ 403: {
8711
+ error: string;
8712
+ };
8713
+ /**
8714
+ * Response for status 503
8715
+ */
8716
+ 503: {
8717
+ error: string;
8718
+ };
8719
+ };
8720
+ export type SetSharedAccessGuestNameError = SetSharedAccessGuestNameErrors[keyof SetSharedAccessGuestNameErrors];
8721
+ export type SetSharedAccessGuestNameResponses = {
8722
+ /**
8723
+ * Response for status 200
8724
+ */
8725
+ 200: {
8726
+ grantId: string;
8727
+ destinationPath: string;
8728
+ expiresAt: string;
8729
+ absoluteExpiresAt: string;
8730
+ csrfToken: string;
8731
+ /**
8732
+ * Who the visitor is in this session: the author id of the comments they write as a guest
8733
+ */
8734
+ guestId: string;
8735
+ /**
8736
+ * The name the visitor gave, which their comments and live presence carry
8737
+ */
8738
+ guestName?: string;
8739
+ };
8740
+ };
8741
+ export type SetSharedAccessGuestNameResponse = SetSharedAccessGuestNameResponses[keyof SetSharedAccessGuestNameResponses];
8464
8742
  export type SignOutSharedAccessData = {
8465
8743
  body?: never;
8466
8744
  path: {
@@ -9479,7 +9757,7 @@ export type RequestActionErrors = {
9479
9757
  /**
9480
9758
  * Stable machine-readable failure code for programmatic handling.
9481
9759
  */
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";
9760
+ 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.change_refused" | "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";
9483
9761
  };
9484
9762
  /**
9485
9763
  * Response for status 503
@@ -10282,6 +10560,16 @@ export type ListAgentThreadsResponses = {
10282
10560
  folder: string;
10283
10561
  online: boolean;
10284
10562
  };
10563
+ backgroundCommands?: Array<{
10564
+ threadId: string;
10565
+ id: string;
10566
+ command: string;
10567
+ status: "running" | "exited" | "stopped";
10568
+ exitCode?: number;
10569
+ startedAt: string;
10570
+ endedAt?: string;
10571
+ stopping?: boolean;
10572
+ }>;
10285
10573
  movedAt?: string;
10286
10574
  status: "active" | "archived";
10287
10575
  activeRunId: string | null;
@@ -10397,6 +10685,16 @@ export type CreateAgentThreadResponses = {
10397
10685
  folder: string;
10398
10686
  online: boolean;
10399
10687
  };
10688
+ backgroundCommands?: Array<{
10689
+ threadId: string;
10690
+ id: string;
10691
+ command: string;
10692
+ status: "running" | "exited" | "stopped";
10693
+ exitCode?: number;
10694
+ startedAt: string;
10695
+ endedAt?: string;
10696
+ stopping?: boolean;
10697
+ }>;
10400
10698
  movedAt?: string;
10401
10699
  status: "active" | "archived";
10402
10700
  activeRunId: string | null;
@@ -10491,6 +10789,16 @@ export type GetAgentThreadResponses = {
10491
10789
  folder: string;
10492
10790
  online: boolean;
10493
10791
  };
10792
+ backgroundCommands?: Array<{
10793
+ threadId: string;
10794
+ id: string;
10795
+ command: string;
10796
+ status: "running" | "exited" | "stopped";
10797
+ exitCode?: number;
10798
+ startedAt: string;
10799
+ endedAt?: string;
10800
+ stopping?: boolean;
10801
+ }>;
10494
10802
  movedAt?: string;
10495
10803
  status: "active" | "archived";
10496
10804
  activeRunId: string | null;
@@ -10606,6 +10914,16 @@ export type AddAgentThreadParticipantsResponses = {
10606
10914
  folder: string;
10607
10915
  online: boolean;
10608
10916
  };
10917
+ backgroundCommands?: Array<{
10918
+ threadId: string;
10919
+ id: string;
10920
+ command: string;
10921
+ status: "running" | "exited" | "stopped";
10922
+ exitCode?: number;
10923
+ startedAt: string;
10924
+ endedAt?: string;
10925
+ stopping?: boolean;
10926
+ }>;
10609
10927
  movedAt?: string;
10610
10928
  status: "active" | "archived";
10611
10929
  activeRunId: string | null;
@@ -10759,6 +11077,16 @@ export type ForkAgentThreadResponses = {
10759
11077
  folder: string;
10760
11078
  online: boolean;
10761
11079
  };
11080
+ backgroundCommands?: Array<{
11081
+ threadId: string;
11082
+ id: string;
11083
+ command: string;
11084
+ status: "running" | "exited" | "stopped";
11085
+ exitCode?: number;
11086
+ startedAt: string;
11087
+ endedAt?: string;
11088
+ stopping?: boolean;
11089
+ }>;
10762
11090
  movedAt?: string;
10763
11091
  status: "active" | "archived";
10764
11092
  activeRunId: string | null;
@@ -10863,6 +11191,16 @@ export type RecreateAgentThreadSandboxResponses = {
10863
11191
  folder: string;
10864
11192
  online: boolean;
10865
11193
  };
11194
+ backgroundCommands?: Array<{
11195
+ threadId: string;
11196
+ id: string;
11197
+ command: string;
11198
+ status: "running" | "exited" | "stopped";
11199
+ exitCode?: number;
11200
+ startedAt: string;
11201
+ endedAt?: string;
11202
+ stopping?: boolean;
11203
+ }>;
10866
11204
  movedAt?: string;
10867
11205
  status: "active" | "archived";
10868
11206
  activeRunId: string | null;
@@ -10979,7 +11317,7 @@ export type ListAgentThreadMessagesResponses = {
10979
11317
  } | {
10980
11318
  kind: "error";
10981
11319
  error: {
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";
11320
+ 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.change_refused" | "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";
10983
11321
  message: string;
10984
11322
  retryable: boolean;
10985
11323
  at: string;
@@ -12373,19 +12711,47 @@ export type HeadAgentChildFileContentResponses = {
12373
12711
  */
12374
12712
  206: unknown;
12375
12713
  };
12376
- export type MoveAgentThreadToCloudData = {
12714
+ export type ListAgentComputersData = {
12377
12715
  body?: never;
12378
- path: {
12379
- threadId: string;
12380
- };
12716
+ path?: never;
12381
12717
  query?: never;
12382
- url: "/api/agent-threads/{threadId}/computer";
12718
+ url: "/api/agent-computers";
12383
12719
  };
12384
- export type MoveAgentThreadToCloudErrors = {
12720
+ export type ListAgentComputersErrors = {
12385
12721
  /**
12386
- * Response for status 400
12722
+ * Response for status 501
12387
12723
  */
12388
- 400: {
12724
+ 501: {
12725
+ error: string;
12726
+ };
12727
+ };
12728
+ export type ListAgentComputersError = ListAgentComputersErrors[keyof ListAgentComputersErrors];
12729
+ export type ListAgentComputersResponses = {
12730
+ /**
12731
+ * Response for status 200
12732
+ */
12733
+ 200: {
12734
+ computers: Array<{
12735
+ id: string;
12736
+ name: string;
12737
+ folders: Array<string>;
12738
+ }>;
12739
+ };
12740
+ };
12741
+ export type ListAgentComputersResponse = ListAgentComputersResponses[keyof ListAgentComputersResponses];
12742
+ export type MoveAgentThreadToCloudData = {
12743
+ body?: never;
12744
+ path: {
12745
+ threadId: string;
12746
+ };
12747
+ query?: never;
12748
+ url: "/api/agent-threads/{threadId}/computer";
12749
+ };
12750
+ export type MoveAgentThreadToCloudErrors = {
12751
+ /**
12752
+ * Response for status 400
12753
+ */
12754
+ 400: {
12389
12755
  error: string;
12390
12756
  code?: string;
12391
12757
  };
@@ -12470,6 +12836,16 @@ export type MoveAgentThreadToCloudResponses = {
12470
12836
  folder: string;
12471
12837
  online: boolean;
12472
12838
  };
12839
+ backgroundCommands?: Array<{
12840
+ threadId: string;
12841
+ id: string;
12842
+ command: string;
12843
+ status: "running" | "exited" | "stopped";
12844
+ exitCode?: number;
12845
+ startedAt: string;
12846
+ endedAt?: string;
12847
+ stopping?: boolean;
12848
+ }>;
12473
12849
  movedAt?: string;
12474
12850
  status: "active" | "archived";
12475
12851
  activeRunId: string | null;
@@ -12585,6 +12961,16 @@ export type MoveAgentThreadToComputerResponses = {
12585
12961
  folder: string;
12586
12962
  online: boolean;
12587
12963
  };
12964
+ backgroundCommands?: Array<{
12965
+ threadId: string;
12966
+ id: string;
12967
+ command: string;
12968
+ status: "running" | "exited" | "stopped";
12969
+ exitCode?: number;
12970
+ startedAt: string;
12971
+ endedAt?: string;
12972
+ stopping?: boolean;
12973
+ }>;
12588
12974
  movedAt?: string;
12589
12975
  status: "active" | "archived";
12590
12976
  activeRunId: string | null;
@@ -12627,6 +13013,15 @@ export type HoldAgentComputerSessionData = {
12627
13013
  name: string;
12628
13014
  folder: string;
12629
13015
  };
13016
+ backgroundCommands?: Array<{
13017
+ threadId: string;
13018
+ id: string;
13019
+ command: string;
13020
+ status: "running" | "exited" | "stopped";
13021
+ exitCode?: number;
13022
+ startedAt: string;
13023
+ endedAt?: string;
13024
+ }>;
12630
13025
  };
12631
13026
  path: {
12632
13027
  sessionId: string;
@@ -12663,9 +13058,73 @@ export type HoldAgentComputerSessionResponses = {
12663
13058
  200: {
12664
13059
  expiresAt: string;
12665
13060
  waiting: Array<string>;
13061
+ stop?: Array<{
13062
+ threadId: string;
13063
+ id: string;
13064
+ startedAt: string;
13065
+ }>;
12666
13066
  };
12667
13067
  };
12668
13068
  export type HoldAgentComputerSessionResponse = HoldAgentComputerSessionResponses[keyof HoldAgentComputerSessionResponses];
13069
+ export type StopAgentBackgroundCommandData = {
13070
+ body: {
13071
+ startedAt: string;
13072
+ };
13073
+ path: {
13074
+ threadId: string;
13075
+ commandId: string;
13076
+ };
13077
+ query?: never;
13078
+ url: "/api/agent-threads/{threadId}/background-commands/{commandId}/stop";
13079
+ };
13080
+ export type StopAgentBackgroundCommandErrors = {
13081
+ /**
13082
+ * Response for status 400
13083
+ */
13084
+ 400: {
13085
+ error: string;
13086
+ code?: string;
13087
+ };
13088
+ /**
13089
+ * Response for status 403
13090
+ */
13091
+ 403: {
13092
+ error: string;
13093
+ code?: string;
13094
+ };
13095
+ /**
13096
+ * Response for status 404
13097
+ */
13098
+ 404: {
13099
+ error: string;
13100
+ code?: string;
13101
+ };
13102
+ /**
13103
+ * Response for status 501
13104
+ */
13105
+ 501: {
13106
+ error: string;
13107
+ };
13108
+ };
13109
+ export type StopAgentBackgroundCommandError = StopAgentBackgroundCommandErrors[keyof StopAgentBackgroundCommandErrors];
13110
+ export type StopAgentBackgroundCommandResponses = {
13111
+ /**
13112
+ * Response for status 202
13113
+ */
13114
+ 202: {
13115
+ command: {
13116
+ threadId: string;
13117
+ id: string;
13118
+ command: string;
13119
+ status: "running" | "exited" | "stopped";
13120
+ exitCode?: number;
13121
+ startedAt: string;
13122
+ endedAt?: string;
13123
+ stopping?: boolean;
13124
+ };
13125
+ };
13126
+ };
13127
+ export type StopAgentBackgroundCommandResponse = StopAgentBackgroundCommandResponses[keyof StopAgentBackgroundCommandResponses];
12669
13128
  export type GetAgentPreferencesData = {
12670
13129
  body?: never;
12671
13130
  path?: never;
@@ -12831,6 +13290,16 @@ export type SetAgentThreadApprovalModeResponses = {
12831
13290
  folder: string;
12832
13291
  online: boolean;
12833
13292
  };
13293
+ backgroundCommands?: Array<{
13294
+ threadId: string;
13295
+ id: string;
13296
+ command: string;
13297
+ status: "running" | "exited" | "stopped";
13298
+ exitCode?: number;
13299
+ startedAt: string;
13300
+ endedAt?: string;
13301
+ stopping?: boolean;
13302
+ }>;
12834
13303
  movedAt?: string;
12835
13304
  status: "active" | "archived";
12836
13305
  activeRunId: string | null;
@@ -12956,7 +13425,7 @@ export type ListAgentThreadApprovalsResponses = {
12956
13425
  } | {
12957
13426
  kind: "error";
12958
13427
  error: {
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";
13428
+ 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.change_refused" | "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";
12960
13429
  message: string;
12961
13430
  retryable: boolean;
12962
13431
  at: string;
@@ -13105,7 +13574,7 @@ export type DecideAgentApprovalResponses = {
13105
13574
  } | {
13106
13575
  kind: "error";
13107
13576
  error: {
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";
13577
+ 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.change_refused" | "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";
13109
13578
  message: string;
13110
13579
  retryable: boolean;
13111
13580
  at: string;
@@ -13326,7 +13795,7 @@ export type ListAgentApprovalsResponses = {
13326
13795
  } | {
13327
13796
  kind: "error";
13328
13797
  error: {
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";
13798
+ 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.change_refused" | "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";
13330
13799
  message: string;
13331
13800
  retryable: boolean;
13332
13801
  at: string;
@@ -13435,6 +13904,16 @@ export type GetObservedAgentThreadResponses = {
13435
13904
  folder: string;
13436
13905
  online: boolean;
13437
13906
  };
13907
+ backgroundCommands?: Array<{
13908
+ threadId: string;
13909
+ id: string;
13910
+ command: string;
13911
+ status: "running" | "exited" | "stopped";
13912
+ exitCode?: number;
13913
+ startedAt: string;
13914
+ endedAt?: string;
13915
+ stopping?: boolean;
13916
+ }>;
13438
13917
  movedAt?: string;
13439
13918
  status: "active" | "archived";
13440
13919
  activeRunId: string | null;
@@ -13557,7 +14036,7 @@ export type ListObservedAgentThreadMessagesResponses = {
13557
14036
  } | {
13558
14037
  kind: "error";
13559
14038
  error: {
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";
14039
+ 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.change_refused" | "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";
13561
14040
  message: string;
13562
14041
  retryable: boolean;
13563
14042
  at: string;
@@ -14331,7 +14810,7 @@ export type ListArtifactsData = {
14331
14810
  path?: never;
14332
14811
  query?: {
14333
14812
  /**
14334
- * Only artifacts with a version the Agent published in this thread
14813
+ * Only artifacts this conversation shares: the Agent wrote them in it
14335
14814
  */
14336
14815
  thread?: string;
14337
14816
  /**
@@ -14350,18 +14829,23 @@ export type ListArtifactsErrors = {
14350
14829
  400: {
14351
14830
  error: string;
14352
14831
  /**
14353
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
14832
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
14354
14833
  */
14355
14834
  code?: string;
14356
14835
  /**
14357
- * With artifact_moved: the latest version and who published it
14836
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
14358
14837
  */
14359
14838
  latest?: {
14360
14839
  version: number;
14840
+ revision: number;
14361
14841
  author: {
14362
14842
  type: "user" | "serviceAccount" | "system";
14363
14843
  id: string;
14364
14844
  };
14845
+ frozenBy?: {
14846
+ type: "user" | "serviceAccount" | "system";
14847
+ id: string;
14848
+ };
14365
14849
  };
14366
14850
  };
14367
14851
  /**
@@ -14370,18 +14854,23 @@ export type ListArtifactsErrors = {
14370
14854
  501: {
14371
14855
  error: string;
14372
14856
  /**
14373
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
14857
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
14374
14858
  */
14375
14859
  code?: string;
14376
14860
  /**
14377
- * With artifact_moved: the latest version and who published it
14861
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
14378
14862
  */
14379
14863
  latest?: {
14380
14864
  version: number;
14865
+ revision: number;
14381
14866
  author: {
14382
14867
  type: "user" | "serviceAccount" | "system";
14383
14868
  id: string;
14384
14869
  };
14870
+ frozenBy?: {
14871
+ type: "user" | "serviceAccount" | "system";
14872
+ id: string;
14873
+ };
14385
14874
  };
14386
14875
  };
14387
14876
  };
@@ -14401,7 +14890,14 @@ export type ListArtifactsResponses = {
14401
14890
  id: string;
14402
14891
  };
14403
14892
  latestVersion: number;
14893
+ /**
14894
+ * Counts the artifact's changes: a write, a version created, a restore. It only grows, so content read at one revision is that revision's for good
14895
+ */
14896
+ revision: number;
14404
14897
  createdAt: string;
14898
+ /**
14899
+ * When the artifact last changed
14900
+ */
14405
14901
  updatedAt: string;
14406
14902
  }>;
14407
14903
  hasMore: boolean;
@@ -14442,18 +14938,23 @@ export type CreateArtifactErrors = {
14442
14938
  400: {
14443
14939
  error: string;
14444
14940
  /**
14445
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
14941
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
14446
14942
  */
14447
14943
  code?: string;
14448
14944
  /**
14449
- * With artifact_moved: the latest version and who published it
14945
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
14450
14946
  */
14451
14947
  latest?: {
14452
14948
  version: number;
14949
+ revision: number;
14453
14950
  author: {
14454
14951
  type: "user" | "serviceAccount" | "system";
14455
14952
  id: string;
14456
14953
  };
14954
+ frozenBy?: {
14955
+ type: "user" | "serviceAccount" | "system";
14956
+ id: string;
14957
+ };
14457
14958
  };
14458
14959
  };
14459
14960
  /**
@@ -14462,18 +14963,23 @@ export type CreateArtifactErrors = {
14462
14963
  403: {
14463
14964
  error: string;
14464
14965
  /**
14465
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
14966
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
14466
14967
  */
14467
14968
  code?: string;
14468
14969
  /**
14469
- * With artifact_moved: the latest version and who published it
14970
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
14470
14971
  */
14471
14972
  latest?: {
14472
14973
  version: number;
14974
+ revision: number;
14473
14975
  author: {
14474
14976
  type: "user" | "serviceAccount" | "system";
14475
14977
  id: string;
14476
14978
  };
14979
+ frozenBy?: {
14980
+ type: "user" | "serviceAccount" | "system";
14981
+ id: string;
14982
+ };
14477
14983
  };
14478
14984
  };
14479
14985
  /**
@@ -14482,18 +14988,23 @@ export type CreateArtifactErrors = {
14482
14988
  404: {
14483
14989
  error: string;
14484
14990
  /**
14485
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
14991
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
14486
14992
  */
14487
14993
  code?: string;
14488
14994
  /**
14489
- * With artifact_moved: the latest version and who published it
14995
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
14490
14996
  */
14491
14997
  latest?: {
14492
14998
  version: number;
14999
+ revision: number;
14493
15000
  author: {
14494
15001
  type: "user" | "serviceAccount" | "system";
14495
15002
  id: string;
14496
15003
  };
15004
+ frozenBy?: {
15005
+ type: "user" | "serviceAccount" | "system";
15006
+ id: string;
15007
+ };
14497
15008
  };
14498
15009
  };
14499
15010
  /**
@@ -14502,18 +15013,23 @@ export type CreateArtifactErrors = {
14502
15013
  409: {
14503
15014
  error: string;
14504
15015
  /**
14505
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15016
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
14506
15017
  */
14507
15018
  code?: string;
14508
15019
  /**
14509
- * With artifact_moved: the latest version and who published it
15020
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
14510
15021
  */
14511
15022
  latest?: {
14512
15023
  version: number;
15024
+ revision: number;
14513
15025
  author: {
14514
15026
  type: "user" | "serviceAccount" | "system";
14515
15027
  id: string;
14516
15028
  };
15029
+ frozenBy?: {
15030
+ type: "user" | "serviceAccount" | "system";
15031
+ id: string;
15032
+ };
14517
15033
  };
14518
15034
  };
14519
15035
  /**
@@ -14522,18 +15038,23 @@ export type CreateArtifactErrors = {
14522
15038
  501: {
14523
15039
  error: string;
14524
15040
  /**
14525
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15041
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
14526
15042
  */
14527
15043
  code?: string;
14528
15044
  /**
14529
- * With artifact_moved: the latest version and who published it
15045
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
14530
15046
  */
14531
15047
  latest?: {
14532
15048
  version: number;
15049
+ revision: number;
14533
15050
  author: {
14534
15051
  type: "user" | "serviceAccount" | "system";
14535
15052
  id: string;
14536
15053
  };
15054
+ frozenBy?: {
15055
+ type: "user" | "serviceAccount" | "system";
15056
+ id: string;
15057
+ };
14537
15058
  };
14538
15059
  };
14539
15060
  };
@@ -14553,12 +15074,27 @@ export type CreateArtifactResponses = {
14553
15074
  id: string;
14554
15075
  };
14555
15076
  latestVersion: number;
15077
+ /**
15078
+ * Counts the artifact's changes: a write, a version created, a restore. It only grows, so content read at one revision is that revision's for good
15079
+ */
15080
+ revision: number;
14556
15081
  createdAt: string;
15082
+ /**
15083
+ * When the artifact last changed
15084
+ */
14557
15085
  updatedAt: string;
14558
15086
  };
14559
15087
  version: {
14560
15088
  artifactId: string;
14561
15089
  version: number;
15090
+ /**
15091
+ * The artifact's revision when this version last changed: the latest version's is the artifact's
15092
+ */
15093
+ revision: number;
15094
+ /**
15095
+ * Someone created this version: it never changes again. The latest version is open until then, and each write replaces its content
15096
+ */
15097
+ frozen: boolean;
14562
15098
  title: string;
14563
15099
  entry: string;
14564
15100
  files: Array<{
@@ -14614,11 +15150,19 @@ export type CreateArtifactResponses = {
14614
15150
  file: string;
14615
15151
  w: number;
14616
15152
  h: number;
15153
+ /**
15154
+ * What the board's preview is a picture of: a board kept as it was keeps it
15155
+ */
15156
+ renderKey?: string;
14617
15157
  } | {
14618
15158
  id: string;
14619
15159
  type: "section";
14620
15160
  title?: string;
14621
15161
  }>;
15162
+ /**
15163
+ * The modes each board has a preview in: both, or the one its theme.json pins
15164
+ */
15165
+ themes?: Array<"light" | "dark">;
14622
15166
  } | {
14623
15167
  kind: "file";
14624
15168
  mediaType: string;
@@ -14629,15 +15173,45 @@ export type CreateArtifactResponses = {
14629
15173
  at: string;
14630
15174
  resolvedVersion: number;
14631
15175
  }>;
15176
+ /**
15177
+ * Who last wrote its content
15178
+ */
14632
15179
  author: {
14633
15180
  type: "user" | "serviceAccount" | "system";
14634
15181
  id: string;
14635
15182
  };
15183
+ /**
15184
+ * The Agent turn and thread its content was last written from
15185
+ */
14636
15186
  origin?: {
14637
15187
  threadId: string;
14638
15188
  runId: string;
14639
15189
  };
15190
+ /**
15191
+ * When the version was opened
15192
+ */
14640
15193
  createdAt: string;
15194
+ /**
15195
+ * When its content was last written
15196
+ */
15197
+ updatedAt: string;
15198
+ /**
15199
+ * When it was created, which froze it
15200
+ */
15201
+ frozenAt?: string;
15202
+ /**
15203
+ * Who created it
15204
+ */
15205
+ frozenBy?: {
15206
+ type: "user" | "serviceAccount" | "system";
15207
+ id: string;
15208
+ };
15209
+ /**
15210
+ * A canvas's boards by id, as reading or publishing the version returns them: ready when its preview is, pending while it is rendered, none when none will come and the board shows its outline
15211
+ */
15212
+ boardPreviews?: {
15213
+ [key: string]: "ready" | "pending" | "none";
15214
+ };
14641
15215
  };
14642
15216
  warnings: Array<{
14643
15217
  code: string;
@@ -14662,18 +15236,23 @@ export type DeleteArtifactErrors = {
14662
15236
  403: {
14663
15237
  error: string;
14664
15238
  /**
14665
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15239
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
14666
15240
  */
14667
15241
  code?: string;
14668
15242
  /**
14669
- * With artifact_moved: the latest version and who published it
15243
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
14670
15244
  */
14671
15245
  latest?: {
14672
15246
  version: number;
15247
+ revision: number;
14673
15248
  author: {
14674
15249
  type: "user" | "serviceAccount" | "system";
14675
15250
  id: string;
14676
15251
  };
15252
+ frozenBy?: {
15253
+ type: "user" | "serviceAccount" | "system";
15254
+ id: string;
15255
+ };
14677
15256
  };
14678
15257
  };
14679
15258
  /**
@@ -14682,18 +15261,23 @@ export type DeleteArtifactErrors = {
14682
15261
  404: {
14683
15262
  error: string;
14684
15263
  /**
14685
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15264
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
14686
15265
  */
14687
15266
  code?: string;
14688
15267
  /**
14689
- * With artifact_moved: the latest version and who published it
15268
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
14690
15269
  */
14691
15270
  latest?: {
14692
15271
  version: number;
15272
+ revision: number;
14693
15273
  author: {
14694
15274
  type: "user" | "serviceAccount" | "system";
14695
15275
  id: string;
14696
15276
  };
15277
+ frozenBy?: {
15278
+ type: "user" | "serviceAccount" | "system";
15279
+ id: string;
15280
+ };
14697
15281
  };
14698
15282
  };
14699
15283
  /**
@@ -14702,18 +15286,23 @@ export type DeleteArtifactErrors = {
14702
15286
  501: {
14703
15287
  error: string;
14704
15288
  /**
14705
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15289
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
14706
15290
  */
14707
15291
  code?: string;
14708
15292
  /**
14709
- * With artifact_moved: the latest version and who published it
15293
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
14710
15294
  */
14711
15295
  latest?: {
14712
15296
  version: number;
15297
+ revision: number;
14713
15298
  author: {
14714
15299
  type: "user" | "serviceAccount" | "system";
14715
15300
  id: string;
14716
15301
  };
15302
+ frozenBy?: {
15303
+ type: "user" | "serviceAccount" | "system";
15304
+ id: string;
15305
+ };
14717
15306
  };
14718
15307
  };
14719
15308
  };
@@ -14742,18 +15331,23 @@ export type GetArtifactErrors = {
14742
15331
  403: {
14743
15332
  error: string;
14744
15333
  /**
14745
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15334
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
14746
15335
  */
14747
15336
  code?: string;
14748
15337
  /**
14749
- * With artifact_moved: the latest version and who published it
15338
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
14750
15339
  */
14751
15340
  latest?: {
14752
15341
  version: number;
15342
+ revision: number;
14753
15343
  author: {
14754
15344
  type: "user" | "serviceAccount" | "system";
14755
15345
  id: string;
14756
15346
  };
15347
+ frozenBy?: {
15348
+ type: "user" | "serviceAccount" | "system";
15349
+ id: string;
15350
+ };
14757
15351
  };
14758
15352
  };
14759
15353
  /**
@@ -14762,18 +15356,23 @@ export type GetArtifactErrors = {
14762
15356
  404: {
14763
15357
  error: string;
14764
15358
  /**
14765
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15359
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
14766
15360
  */
14767
15361
  code?: string;
14768
15362
  /**
14769
- * With artifact_moved: the latest version and who published it
15363
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
14770
15364
  */
14771
15365
  latest?: {
14772
15366
  version: number;
15367
+ revision: number;
14773
15368
  author: {
14774
15369
  type: "user" | "serviceAccount" | "system";
14775
15370
  id: string;
14776
15371
  };
15372
+ frozenBy?: {
15373
+ type: "user" | "serviceAccount" | "system";
15374
+ id: string;
15375
+ };
14777
15376
  };
14778
15377
  };
14779
15378
  /**
@@ -14782,18 +15381,23 @@ export type GetArtifactErrors = {
14782
15381
  501: {
14783
15382
  error: string;
14784
15383
  /**
14785
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15384
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
14786
15385
  */
14787
15386
  code?: string;
14788
15387
  /**
14789
- * With artifact_moved: the latest version and who published it
15388
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
14790
15389
  */
14791
15390
  latest?: {
14792
15391
  version: number;
15392
+ revision: number;
14793
15393
  author: {
14794
15394
  type: "user" | "serviceAccount" | "system";
14795
15395
  id: string;
14796
15396
  };
15397
+ frozenBy?: {
15398
+ type: "user" | "serviceAccount" | "system";
15399
+ id: string;
15400
+ };
14797
15401
  };
14798
15402
  };
14799
15403
  };
@@ -14813,7 +15417,14 @@ export type GetArtifactResponses = {
14813
15417
  id: string;
14814
15418
  };
14815
15419
  latestVersion: number;
15420
+ /**
15421
+ * Counts the artifact's changes: a write, a version created, a restore. It only grows, so content read at one revision is that revision's for good
15422
+ */
15423
+ revision: number;
14816
15424
  createdAt: string;
15425
+ /**
15426
+ * When the artifact last changed
15427
+ */
14817
15428
  updatedAt: string;
14818
15429
  };
14819
15430
  /**
@@ -14821,51 +15432,88 @@ export type GetArtifactResponses = {
14821
15432
  */
14822
15433
  versions: Array<{
14823
15434
  version: number;
15435
+ /**
15436
+ * The artifact's revision when this version last changed: the latest version's is the artifact's
15437
+ */
15438
+ revision: number;
15439
+ /**
15440
+ * Someone created this version: it never changes again. The latest version is open until then, and each write replaces its content
15441
+ */
15442
+ frozen: boolean;
14824
15443
  title: string;
15444
+ /**
15445
+ * Who last wrote its content
15446
+ */
14825
15447
  author: {
14826
15448
  type: "user" | "serviceAccount" | "system";
14827
15449
  id: string;
14828
15450
  };
15451
+ /**
15452
+ * The Agent turn and thread its content was last written from
15453
+ */
14829
15454
  origin?: {
14830
15455
  threadId: string;
14831
15456
  runId: string;
14832
15457
  };
15458
+ /**
15459
+ * When the version was opened
15460
+ */
14833
15461
  createdAt: string;
15462
+ /**
15463
+ * When its content was last written
15464
+ */
15465
+ updatedAt: string;
15466
+ /**
15467
+ * When it was created, which froze it
15468
+ */
15469
+ frozenAt?: string;
15470
+ /**
15471
+ * Who created it
15472
+ */
15473
+ frozenBy?: {
15474
+ type: "user" | "serviceAccount" | "system";
15475
+ id: string;
15476
+ };
14834
15477
  }>;
14835
15478
  /**
14836
- * What the caller may do with it: everything as its owner, publish and keep page data as a participant of a conversation that shares it, or only read as an observer of one
15479
+ * What the caller may do with it: everything as its owner, publish and keep page data as a participant of a conversation that shares it or an editor of an object that holds it, or only read as an observer of such a conversation or a reader of such an object
14837
15480
  */
14838
15481
  access: "owner" | "update" | "read";
14839
15482
  };
14840
15483
  };
14841
15484
  export type GetArtifactResponse = GetArtifactResponses[keyof GetArtifactResponses];
14842
- export type ClearArtifactStateData = {
15485
+ export type ListArtifactHoldersData = {
14843
15486
  body?: never;
14844
15487
  path: {
14845
15488
  artifactId: string;
14846
15489
  };
14847
15490
  query?: never;
14848
- url: "/api/artifacts/{artifactId}/state";
15491
+ url: "/api/artifacts/{artifactId}/holders";
14849
15492
  };
14850
- export type ClearArtifactStateErrors = {
15493
+ export type ListArtifactHoldersErrors = {
14851
15494
  /**
14852
15495
  * Response for status 403
14853
15496
  */
14854
15497
  403: {
14855
15498
  error: string;
14856
15499
  /**
14857
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15500
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
14858
15501
  */
14859
15502
  code?: string;
14860
15503
  /**
14861
- * With artifact_moved: the latest version and who published it
15504
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
14862
15505
  */
14863
15506
  latest?: {
14864
15507
  version: number;
15508
+ revision: number;
14865
15509
  author: {
14866
15510
  type: "user" | "serviceAccount" | "system";
14867
15511
  id: string;
14868
15512
  };
15513
+ frozenBy?: {
15514
+ type: "user" | "serviceAccount" | "system";
15515
+ id: string;
15516
+ };
14869
15517
  };
14870
15518
  };
14871
15519
  /**
@@ -14874,18 +15522,23 @@ export type ClearArtifactStateErrors = {
14874
15522
  404: {
14875
15523
  error: string;
14876
15524
  /**
14877
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15525
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
14878
15526
  */
14879
15527
  code?: string;
14880
15528
  /**
14881
- * With artifact_moved: the latest version and who published it
15529
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
14882
15530
  */
14883
15531
  latest?: {
14884
15532
  version: number;
15533
+ revision: number;
14885
15534
  author: {
14886
15535
  type: "user" | "serviceAccount" | "system";
14887
15536
  id: string;
14888
15537
  };
15538
+ frozenBy?: {
15539
+ type: "user" | "serviceAccount" | "system";
15540
+ id: string;
15541
+ };
14889
15542
  };
14890
15543
  };
14891
15544
  /**
@@ -14894,35 +15547,55 @@ export type ClearArtifactStateErrors = {
14894
15547
  501: {
14895
15548
  error: string;
14896
15549
  /**
14897
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15550
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
14898
15551
  */
14899
15552
  code?: string;
14900
15553
  /**
14901
- * With artifact_moved: the latest version and who published it
15554
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
14902
15555
  */
14903
15556
  latest?: {
14904
15557
  version: number;
15558
+ revision: number;
14905
15559
  author: {
14906
15560
  type: "user" | "serviceAccount" | "system";
14907
15561
  id: string;
14908
15562
  };
15563
+ frozenBy?: {
15564
+ type: "user" | "serviceAccount" | "system";
15565
+ id: string;
15566
+ };
14909
15567
  };
14910
15568
  };
14911
15569
  };
14912
- export type ClearArtifactStateError = ClearArtifactStateErrors[keyof ClearArtifactStateErrors];
14913
- export type ClearArtifactStateResponses = {
15570
+ export type ListArtifactHoldersError = ListArtifactHoldersErrors[keyof ListArtifactHoldersErrors];
15571
+ export type ListArtifactHoldersResponses = {
14914
15572
  /**
14915
15573
  * Response for status 200
14916
15574
  */
14917
15575
  200: {
14918
15576
  /**
14919
- * How many values were deleted
15577
+ * The first 20 objects you read that hold the artifact
14920
15578
  */
14921
- cleared: number;
15579
+ holders: Array<{
15580
+ objectTypeId: string;
15581
+ primaryId: string;
15582
+ /**
15583
+ * The property whose value holds the artifact
15584
+ */
15585
+ propertyId: string;
15586
+ /**
15587
+ * The object's value of its type's search title, when it has one you read
15588
+ */
15589
+ title?: string;
15590
+ }>;
15591
+ /**
15592
+ * More objects you read hold it
15593
+ */
15594
+ hasMore: boolean;
14922
15595
  };
14923
15596
  };
14924
- export type ClearArtifactStateResponse = ClearArtifactStateResponses[keyof ClearArtifactStateResponses];
14925
- export type GetArtifactStateData = {
15597
+ export type ListArtifactHoldersResponse = ListArtifactHoldersResponses[keyof ListArtifactHoldersResponses];
15598
+ export type ClearArtifactStateData = {
14926
15599
  body?: never;
14927
15600
  path: {
14928
15601
  artifactId: string;
@@ -14930,25 +15603,30 @@ export type GetArtifactStateData = {
14930
15603
  query?: never;
14931
15604
  url: "/api/artifacts/{artifactId}/state";
14932
15605
  };
14933
- export type GetArtifactStateErrors = {
15606
+ export type ClearArtifactStateErrors = {
14934
15607
  /**
14935
15608
  * Response for status 403
14936
15609
  */
14937
15610
  403: {
14938
15611
  error: string;
14939
15612
  /**
14940
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15613
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
14941
15614
  */
14942
15615
  code?: string;
14943
15616
  /**
14944
- * With artifact_moved: the latest version and who published it
15617
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
14945
15618
  */
14946
15619
  latest?: {
14947
15620
  version: number;
15621
+ revision: number;
14948
15622
  author: {
14949
15623
  type: "user" | "serviceAccount" | "system";
14950
15624
  id: string;
14951
15625
  };
15626
+ frozenBy?: {
15627
+ type: "user" | "serviceAccount" | "system";
15628
+ id: string;
15629
+ };
14952
15630
  };
14953
15631
  };
14954
15632
  /**
@@ -14957,18 +15635,23 @@ export type GetArtifactStateErrors = {
14957
15635
  404: {
14958
15636
  error: string;
14959
15637
  /**
14960
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15638
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
14961
15639
  */
14962
15640
  code?: string;
14963
15641
  /**
14964
- * With artifact_moved: the latest version and who published it
15642
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
14965
15643
  */
14966
15644
  latest?: {
14967
15645
  version: number;
15646
+ revision: number;
14968
15647
  author: {
14969
15648
  type: "user" | "serviceAccount" | "system";
14970
15649
  id: string;
14971
15650
  };
15651
+ frozenBy?: {
15652
+ type: "user" | "serviceAccount" | "system";
15653
+ id: string;
15654
+ };
14972
15655
  };
14973
15656
  };
14974
15657
  /**
@@ -14977,18 +15660,121 @@ export type GetArtifactStateErrors = {
14977
15660
  501: {
14978
15661
  error: string;
14979
15662
  /**
14980
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15663
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
14981
15664
  */
14982
15665
  code?: string;
14983
15666
  /**
14984
- * With artifact_moved: the latest version and who published it
15667
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
14985
15668
  */
14986
15669
  latest?: {
14987
15670
  version: number;
15671
+ revision: number;
15672
+ author: {
15673
+ type: "user" | "serviceAccount" | "system";
15674
+ id: string;
15675
+ };
15676
+ frozenBy?: {
15677
+ type: "user" | "serviceAccount" | "system";
15678
+ id: string;
15679
+ };
15680
+ };
15681
+ };
15682
+ };
15683
+ export type ClearArtifactStateError = ClearArtifactStateErrors[keyof ClearArtifactStateErrors];
15684
+ export type ClearArtifactStateResponses = {
15685
+ /**
15686
+ * Response for status 200
15687
+ */
15688
+ 200: {
15689
+ /**
15690
+ * How many values were deleted
15691
+ */
15692
+ cleared: number;
15693
+ };
15694
+ };
15695
+ export type ClearArtifactStateResponse = ClearArtifactStateResponses[keyof ClearArtifactStateResponses];
15696
+ export type GetArtifactStateData = {
15697
+ body?: never;
15698
+ path: {
15699
+ artifactId: string;
15700
+ };
15701
+ query?: never;
15702
+ url: "/api/artifacts/{artifactId}/state";
15703
+ };
15704
+ export type GetArtifactStateErrors = {
15705
+ /**
15706
+ * Response for status 403
15707
+ */
15708
+ 403: {
15709
+ error: string;
15710
+ /**
15711
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15712
+ */
15713
+ code?: string;
15714
+ /**
15715
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
15716
+ */
15717
+ latest?: {
15718
+ version: number;
15719
+ revision: number;
15720
+ author: {
15721
+ type: "user" | "serviceAccount" | "system";
15722
+ id: string;
15723
+ };
15724
+ frozenBy?: {
15725
+ type: "user" | "serviceAccount" | "system";
15726
+ id: string;
15727
+ };
15728
+ };
15729
+ };
15730
+ /**
15731
+ * Response for status 404
15732
+ */
15733
+ 404: {
15734
+ error: string;
15735
+ /**
15736
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15737
+ */
15738
+ code?: string;
15739
+ /**
15740
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
15741
+ */
15742
+ latest?: {
15743
+ version: number;
15744
+ revision: number;
15745
+ author: {
15746
+ type: "user" | "serviceAccount" | "system";
15747
+ id: string;
15748
+ };
15749
+ frozenBy?: {
15750
+ type: "user" | "serviceAccount" | "system";
15751
+ id: string;
15752
+ };
15753
+ };
15754
+ };
15755
+ /**
15756
+ * Response for status 501
15757
+ */
15758
+ 501: {
15759
+ error: string;
15760
+ /**
15761
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15762
+ */
15763
+ code?: string;
15764
+ /**
15765
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
15766
+ */
15767
+ latest?: {
15768
+ version: number;
15769
+ revision: number;
14988
15770
  author: {
14989
15771
  type: "user" | "serviceAccount" | "system";
14990
15772
  id: string;
14991
15773
  };
15774
+ frozenBy?: {
15775
+ type: "user" | "serviceAccount" | "system";
15776
+ id: string;
15777
+ };
14992
15778
  };
14993
15779
  };
14994
15780
  };
@@ -15031,18 +15817,23 @@ export type DeleteArtifactStateValueErrors = {
15031
15817
  400: {
15032
15818
  error: string;
15033
15819
  /**
15034
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15820
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15035
15821
  */
15036
15822
  code?: string;
15037
15823
  /**
15038
- * With artifact_moved: the latest version and who published it
15824
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
15039
15825
  */
15040
15826
  latest?: {
15041
15827
  version: number;
15828
+ revision: number;
15042
15829
  author: {
15043
15830
  type: "user" | "serviceAccount" | "system";
15044
15831
  id: string;
15045
15832
  };
15833
+ frozenBy?: {
15834
+ type: "user" | "serviceAccount" | "system";
15835
+ id: string;
15836
+ };
15046
15837
  };
15047
15838
  };
15048
15839
  /**
@@ -15051,18 +15842,23 @@ export type DeleteArtifactStateValueErrors = {
15051
15842
  403: {
15052
15843
  error: string;
15053
15844
  /**
15054
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15845
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15055
15846
  */
15056
15847
  code?: string;
15057
15848
  /**
15058
- * With artifact_moved: the latest version and who published it
15849
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
15059
15850
  */
15060
15851
  latest?: {
15061
15852
  version: number;
15853
+ revision: number;
15062
15854
  author: {
15063
15855
  type: "user" | "serviceAccount" | "system";
15064
15856
  id: string;
15065
15857
  };
15858
+ frozenBy?: {
15859
+ type: "user" | "serviceAccount" | "system";
15860
+ id: string;
15861
+ };
15066
15862
  };
15067
15863
  };
15068
15864
  /**
@@ -15071,18 +15867,23 @@ export type DeleteArtifactStateValueErrors = {
15071
15867
  404: {
15072
15868
  error: string;
15073
15869
  /**
15074
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15870
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15075
15871
  */
15076
15872
  code?: string;
15077
15873
  /**
15078
- * With artifact_moved: the latest version and who published it
15874
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
15079
15875
  */
15080
15876
  latest?: {
15081
15877
  version: number;
15878
+ revision: number;
15082
15879
  author: {
15083
15880
  type: "user" | "serviceAccount" | "system";
15084
15881
  id: string;
15085
15882
  };
15883
+ frozenBy?: {
15884
+ type: "user" | "serviceAccount" | "system";
15885
+ id: string;
15886
+ };
15086
15887
  };
15087
15888
  };
15088
15889
  /**
@@ -15091,18 +15892,23 @@ export type DeleteArtifactStateValueErrors = {
15091
15892
  501: {
15092
15893
  error: string;
15093
15894
  /**
15094
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15895
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15095
15896
  */
15096
15897
  code?: string;
15097
15898
  /**
15098
- * With artifact_moved: the latest version and who published it
15899
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
15099
15900
  */
15100
15901
  latest?: {
15101
15902
  version: number;
15903
+ revision: number;
15102
15904
  author: {
15103
15905
  type: "user" | "serviceAccount" | "system";
15104
15906
  id: string;
15105
15907
  };
15908
+ frozenBy?: {
15909
+ type: "user" | "serviceAccount" | "system";
15910
+ id: string;
15911
+ };
15106
15912
  };
15107
15913
  };
15108
15914
  };
@@ -15140,18 +15946,23 @@ export type SetArtifactStateErrors = {
15140
15946
  400: {
15141
15947
  error: string;
15142
15948
  /**
15143
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15949
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15144
15950
  */
15145
15951
  code?: string;
15146
15952
  /**
15147
- * With artifact_moved: the latest version and who published it
15953
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
15148
15954
  */
15149
15955
  latest?: {
15150
15956
  version: number;
15957
+ revision: number;
15151
15958
  author: {
15152
15959
  type: "user" | "serviceAccount" | "system";
15153
15960
  id: string;
15154
15961
  };
15962
+ frozenBy?: {
15963
+ type: "user" | "serviceAccount" | "system";
15964
+ id: string;
15965
+ };
15155
15966
  };
15156
15967
  };
15157
15968
  /**
@@ -15160,18 +15971,23 @@ export type SetArtifactStateErrors = {
15160
15971
  403: {
15161
15972
  error: string;
15162
15973
  /**
15163
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15974
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15164
15975
  */
15165
15976
  code?: string;
15166
15977
  /**
15167
- * With artifact_moved: the latest version and who published it
15978
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
15168
15979
  */
15169
15980
  latest?: {
15170
15981
  version: number;
15982
+ revision: number;
15171
15983
  author: {
15172
15984
  type: "user" | "serviceAccount" | "system";
15173
15985
  id: string;
15174
15986
  };
15987
+ frozenBy?: {
15988
+ type: "user" | "serviceAccount" | "system";
15989
+ id: string;
15990
+ };
15175
15991
  };
15176
15992
  };
15177
15993
  /**
@@ -15180,18 +15996,23 @@ export type SetArtifactStateErrors = {
15180
15996
  404: {
15181
15997
  error: string;
15182
15998
  /**
15183
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15999
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15184
16000
  */
15185
16001
  code?: string;
15186
16002
  /**
15187
- * With artifact_moved: the latest version and who published it
16003
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
15188
16004
  */
15189
16005
  latest?: {
15190
16006
  version: number;
16007
+ revision: number;
15191
16008
  author: {
15192
16009
  type: "user" | "serviceAccount" | "system";
15193
16010
  id: string;
15194
16011
  };
16012
+ frozenBy?: {
16013
+ type: "user" | "serviceAccount" | "system";
16014
+ id: string;
16015
+ };
15195
16016
  };
15196
16017
  };
15197
16018
  /**
@@ -15200,107 +16021,1828 @@ export type SetArtifactStateErrors = {
15200
16021
  413: {
15201
16022
  error: string;
15202
16023
  /**
15203
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
16024
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
16025
+ */
16026
+ code?: string;
16027
+ /**
16028
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
16029
+ */
16030
+ latest?: {
16031
+ version: number;
16032
+ revision: number;
16033
+ author: {
16034
+ type: "user" | "serviceAccount" | "system";
16035
+ id: string;
16036
+ };
16037
+ frozenBy?: {
16038
+ type: "user" | "serviceAccount" | "system";
16039
+ id: string;
16040
+ };
16041
+ };
16042
+ };
16043
+ /**
16044
+ * Response for status 501
16045
+ */
16046
+ 501: {
16047
+ error: string;
16048
+ /**
16049
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
16050
+ */
16051
+ code?: string;
16052
+ /**
16053
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
16054
+ */
16055
+ latest?: {
16056
+ version: number;
16057
+ revision: number;
16058
+ author: {
16059
+ type: "user" | "serviceAccount" | "system";
16060
+ id: string;
16061
+ };
16062
+ frozenBy?: {
16063
+ type: "user" | "serviceAccount" | "system";
16064
+ id: string;
16065
+ };
16066
+ };
16067
+ };
16068
+ };
16069
+ export type SetArtifactStateError = SetArtifactStateErrors[keyof SetArtifactStateErrors];
16070
+ export type SetArtifactStateResponses = {
16071
+ /**
16072
+ * Response for status 200
16073
+ */
16074
+ 200: {
16075
+ key: string;
16076
+ /**
16077
+ * The JSON value
16078
+ */
16079
+ value?: unknown;
16080
+ updatedAt: string;
16081
+ };
16082
+ };
16083
+ export type SetArtifactStateResponse = SetArtifactStateResponses[keyof SetArtifactStateResponses];
16084
+ export type UpdateArtifactData = {
16085
+ body: {
16086
+ kind: "document" | "sheet" | "slides" | "page" | "canvas" | "file";
16087
+ title: string;
16088
+ /**
16089
+ * Files stored with POST /api/files, at their paths in the artifact
16090
+ */
16091
+ files: Array<{
16092
+ /**
16093
+ * The file's path inside the artifact, such as figures/revenue.svg
16094
+ */
16095
+ path: string;
16096
+ file: {
16097
+ blobId: string;
16098
+ digest: string;
16099
+ sizeBytes: number;
16100
+ fileName?: string;
16101
+ mediaType?: string;
16102
+ logicalPath?: string;
16103
+ };
16104
+ }>;
16105
+ /**
16106
+ * The revision this was made from. When the artifact changed since, it is refused with 409 artifact_moved, naming the revision and who last wrote the latest version.
16107
+ */
16108
+ baseRevision?: number;
16109
+ };
16110
+ path: {
16111
+ artifactId: string;
16112
+ };
16113
+ query?: never;
16114
+ url: "/api/artifacts/{artifactId}/content";
16115
+ };
16116
+ export type UpdateArtifactErrors = {
16117
+ /**
16118
+ * Response for status 400
16119
+ */
16120
+ 400: {
16121
+ error: string;
16122
+ /**
16123
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
16124
+ */
16125
+ code?: string;
16126
+ /**
16127
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
16128
+ */
16129
+ latest?: {
16130
+ version: number;
16131
+ revision: number;
16132
+ author: {
16133
+ type: "user" | "serviceAccount" | "system";
16134
+ id: string;
16135
+ };
16136
+ frozenBy?: {
16137
+ type: "user" | "serviceAccount" | "system";
16138
+ id: string;
16139
+ };
16140
+ };
16141
+ };
16142
+ /**
16143
+ * Response for status 403
16144
+ */
16145
+ 403: {
16146
+ error: string;
16147
+ /**
16148
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
16149
+ */
16150
+ code?: string;
16151
+ /**
16152
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
16153
+ */
16154
+ latest?: {
16155
+ version: number;
16156
+ revision: number;
16157
+ author: {
16158
+ type: "user" | "serviceAccount" | "system";
16159
+ id: string;
16160
+ };
16161
+ frozenBy?: {
16162
+ type: "user" | "serviceAccount" | "system";
16163
+ id: string;
16164
+ };
16165
+ };
16166
+ };
16167
+ /**
16168
+ * Response for status 404
16169
+ */
16170
+ 404: {
16171
+ error: string;
16172
+ /**
16173
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15204
16174
  */
15205
16175
  code?: string;
15206
16176
  /**
15207
- * With artifact_moved: the latest version and who published it
16177
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
15208
16178
  */
15209
16179
  latest?: {
15210
16180
  version: number;
16181
+ revision: number;
15211
16182
  author: {
15212
16183
  type: "user" | "serviceAccount" | "system";
15213
16184
  id: string;
15214
16185
  };
16186
+ frozenBy?: {
16187
+ type: "user" | "serviceAccount" | "system";
16188
+ id: string;
16189
+ };
16190
+ };
16191
+ };
16192
+ /**
16193
+ * Response for status 409
16194
+ */
16195
+ 409: {
16196
+ error: string;
16197
+ /**
16198
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
16199
+ */
16200
+ code?: string;
16201
+ /**
16202
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
16203
+ */
16204
+ latest?: {
16205
+ version: number;
16206
+ revision: number;
16207
+ author: {
16208
+ type: "user" | "serviceAccount" | "system";
16209
+ id: string;
16210
+ };
16211
+ frozenBy?: {
16212
+ type: "user" | "serviceAccount" | "system";
16213
+ id: string;
16214
+ };
16215
+ };
16216
+ };
16217
+ /**
16218
+ * Response for status 501
16219
+ */
16220
+ 501: {
16221
+ error: string;
16222
+ /**
16223
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
16224
+ */
16225
+ code?: string;
16226
+ /**
16227
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
16228
+ */
16229
+ latest?: {
16230
+ version: number;
16231
+ revision: number;
16232
+ author: {
16233
+ type: "user" | "serviceAccount" | "system";
16234
+ id: string;
16235
+ };
16236
+ frozenBy?: {
16237
+ type: "user" | "serviceAccount" | "system";
16238
+ id: string;
16239
+ };
16240
+ };
16241
+ };
16242
+ };
16243
+ export type UpdateArtifactError = UpdateArtifactErrors[keyof UpdateArtifactErrors];
16244
+ export type UpdateArtifactResponses = {
16245
+ /**
16246
+ * Response for status 200
16247
+ */
16248
+ 200: {
16249
+ artifact: {
16250
+ id: string;
16251
+ projectId: string;
16252
+ kind: "document" | "sheet" | "slides" | "page" | "canvas" | "file";
16253
+ title: string;
16254
+ owner: {
16255
+ type: "user" | "serviceAccount" | "system";
16256
+ id: string;
16257
+ };
16258
+ latestVersion: number;
16259
+ /**
16260
+ * Counts the artifact's changes: a write, a version created, a restore. It only grows, so content read at one revision is that revision's for good
16261
+ */
16262
+ revision: number;
16263
+ createdAt: string;
16264
+ /**
16265
+ * When the artifact last changed
16266
+ */
16267
+ updatedAt: string;
16268
+ };
16269
+ version: {
16270
+ artifactId: string;
16271
+ version: number;
16272
+ /**
16273
+ * The artifact's revision when this version last changed: the latest version's is the artifact's
16274
+ */
16275
+ revision: number;
16276
+ /**
16277
+ * Someone created this version: it never changes again. The latest version is open until then, and each write replaces its content
16278
+ */
16279
+ frozen: boolean;
16280
+ title: string;
16281
+ entry: string;
16282
+ files: Array<{
16283
+ /**
16284
+ * The file's path inside the artifact, such as figures/revenue.svg
16285
+ */
16286
+ path: string;
16287
+ file: {
16288
+ blobId: string;
16289
+ digest: string;
16290
+ sizeBytes: number;
16291
+ fileName?: string;
16292
+ mediaType?: string;
16293
+ logicalPath?: string;
16294
+ };
16295
+ }>;
16296
+ outline: {
16297
+ kind: "document";
16298
+ headings: Array<{
16299
+ depth: number;
16300
+ text: string;
16301
+ slug: string;
16302
+ }>;
16303
+ } | {
16304
+ kind: "sheet";
16305
+ sheets: Array<{
16306
+ name: string;
16307
+ /**
16308
+ * The rows of its CSV; none for a live sheet
16309
+ */
16310
+ rows: number;
16311
+ columns: Array<string>;
16312
+ /**
16313
+ * A live sheet's query, queries/<name>.json, whose rows each reader reads
16314
+ */
16315
+ query?: string;
16316
+ }>;
16317
+ charts: Array<string>;
16318
+ } | {
16319
+ kind: "slides";
16320
+ slides: Array<{
16321
+ title?: string;
16322
+ }>;
16323
+ } | {
16324
+ kind: "page";
16325
+ title?: string;
16326
+ } | {
16327
+ kind: "canvas";
16328
+ items: Array<{
16329
+ id: string;
16330
+ type: "board";
16331
+ title?: string;
16332
+ file: string;
16333
+ w: number;
16334
+ h: number;
16335
+ /**
16336
+ * What the board's preview is a picture of: a board kept as it was keeps it
16337
+ */
16338
+ renderKey?: string;
16339
+ } | {
16340
+ id: string;
16341
+ type: "section";
16342
+ title?: string;
16343
+ }>;
16344
+ /**
16345
+ * The modes each board has a preview in: both, or the one its theme.json pins
16346
+ */
16347
+ themes?: Array<"light" | "dark">;
16348
+ } | {
16349
+ kind: "file";
16350
+ mediaType: string;
16351
+ };
16352
+ references: Array<{
16353
+ address: string;
16354
+ as: "embed" | "link";
16355
+ at: string;
16356
+ resolvedVersion: number;
16357
+ }>;
16358
+ /**
16359
+ * Who last wrote its content
16360
+ */
16361
+ author: {
16362
+ type: "user" | "serviceAccount" | "system";
16363
+ id: string;
16364
+ };
16365
+ /**
16366
+ * The Agent turn and thread its content was last written from
16367
+ */
16368
+ origin?: {
16369
+ threadId: string;
16370
+ runId: string;
16371
+ };
16372
+ /**
16373
+ * When the version was opened
16374
+ */
16375
+ createdAt: string;
16376
+ /**
16377
+ * When its content was last written
16378
+ */
16379
+ updatedAt: string;
16380
+ /**
16381
+ * When it was created, which froze it
16382
+ */
16383
+ frozenAt?: string;
16384
+ /**
16385
+ * Who created it
16386
+ */
16387
+ frozenBy?: {
16388
+ type: "user" | "serviceAccount" | "system";
16389
+ id: string;
16390
+ };
16391
+ /**
16392
+ * A canvas's boards by id, as reading or publishing the version returns them: ready when its preview is, pending while it is rendered, none when none will come and the board shows its outline
16393
+ */
16394
+ boardPreviews?: {
16395
+ [key: string]: "ready" | "pending" | "none";
16396
+ };
16397
+ };
16398
+ warnings: Array<{
16399
+ code: string;
16400
+ message: string;
16401
+ part?: string;
16402
+ }>;
16403
+ };
16404
+ };
16405
+ export type UpdateArtifactResponse = UpdateArtifactResponses[keyof UpdateArtifactResponses];
16406
+ export type FreezeArtifactVersionData = {
16407
+ body: {
16408
+ /**
16409
+ * The revision this was made from. When the artifact changed since, it is refused with 409 artifact_moved, naming the revision and who last wrote the latest version.
16410
+ */
16411
+ baseRevision?: number;
16412
+ };
16413
+ path: {
16414
+ artifactId: string;
16415
+ };
16416
+ query?: never;
16417
+ url: "/api/artifacts/{artifactId}/freeze";
16418
+ };
16419
+ export type FreezeArtifactVersionErrors = {
16420
+ /**
16421
+ * Response for status 400
16422
+ */
16423
+ 400: {
16424
+ error: string;
16425
+ /**
16426
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
16427
+ */
16428
+ code?: string;
16429
+ /**
16430
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
16431
+ */
16432
+ latest?: {
16433
+ version: number;
16434
+ revision: number;
16435
+ author: {
16436
+ type: "user" | "serviceAccount" | "system";
16437
+ id: string;
16438
+ };
16439
+ frozenBy?: {
16440
+ type: "user" | "serviceAccount" | "system";
16441
+ id: string;
16442
+ };
16443
+ };
16444
+ };
16445
+ /**
16446
+ * Response for status 403
16447
+ */
16448
+ 403: {
16449
+ error: string;
16450
+ /**
16451
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
16452
+ */
16453
+ code?: string;
16454
+ /**
16455
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
16456
+ */
16457
+ latest?: {
16458
+ version: number;
16459
+ revision: number;
16460
+ author: {
16461
+ type: "user" | "serviceAccount" | "system";
16462
+ id: string;
16463
+ };
16464
+ frozenBy?: {
16465
+ type: "user" | "serviceAccount" | "system";
16466
+ id: string;
16467
+ };
16468
+ };
16469
+ };
16470
+ /**
16471
+ * Response for status 404
16472
+ */
16473
+ 404: {
16474
+ error: string;
16475
+ /**
16476
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
16477
+ */
16478
+ code?: string;
16479
+ /**
16480
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
16481
+ */
16482
+ latest?: {
16483
+ version: number;
16484
+ revision: number;
16485
+ author: {
16486
+ type: "user" | "serviceAccount" | "system";
16487
+ id: string;
16488
+ };
16489
+ frozenBy?: {
16490
+ type: "user" | "serviceAccount" | "system";
16491
+ id: string;
16492
+ };
16493
+ };
16494
+ };
16495
+ /**
16496
+ * Response for status 409
16497
+ */
16498
+ 409: {
16499
+ error: string;
16500
+ /**
16501
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
16502
+ */
16503
+ code?: string;
16504
+ /**
16505
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
16506
+ */
16507
+ latest?: {
16508
+ version: number;
16509
+ revision: number;
16510
+ author: {
16511
+ type: "user" | "serviceAccount" | "system";
16512
+ id: string;
16513
+ };
16514
+ frozenBy?: {
16515
+ type: "user" | "serviceAccount" | "system";
16516
+ id: string;
16517
+ };
16518
+ };
16519
+ };
16520
+ /**
16521
+ * Response for status 501
16522
+ */
16523
+ 501: {
16524
+ error: string;
16525
+ /**
16526
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
16527
+ */
16528
+ code?: string;
16529
+ /**
16530
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
16531
+ */
16532
+ latest?: {
16533
+ version: number;
16534
+ revision: number;
16535
+ author: {
16536
+ type: "user" | "serviceAccount" | "system";
16537
+ id: string;
16538
+ };
16539
+ frozenBy?: {
16540
+ type: "user" | "serviceAccount" | "system";
16541
+ id: string;
16542
+ };
16543
+ };
16544
+ };
16545
+ };
16546
+ export type FreezeArtifactVersionError = FreezeArtifactVersionErrors[keyof FreezeArtifactVersionErrors];
16547
+ export type FreezeArtifactVersionResponses = {
16548
+ /**
16549
+ * Response for status 200
16550
+ */
16551
+ 200: {
16552
+ artifact: {
16553
+ id: string;
16554
+ projectId: string;
16555
+ kind: "document" | "sheet" | "slides" | "page" | "canvas" | "file";
16556
+ title: string;
16557
+ owner: {
16558
+ type: "user" | "serviceAccount" | "system";
16559
+ id: string;
16560
+ };
16561
+ latestVersion: number;
16562
+ /**
16563
+ * Counts the artifact's changes: a write, a version created, a restore. It only grows, so content read at one revision is that revision's for good
16564
+ */
16565
+ revision: number;
16566
+ createdAt: string;
16567
+ /**
16568
+ * When the artifact last changed
16569
+ */
16570
+ updatedAt: string;
16571
+ };
16572
+ version: {
16573
+ artifactId: string;
16574
+ version: number;
16575
+ /**
16576
+ * The artifact's revision when this version last changed: the latest version's is the artifact's
16577
+ */
16578
+ revision: number;
16579
+ /**
16580
+ * Someone created this version: it never changes again. The latest version is open until then, and each write replaces its content
16581
+ */
16582
+ frozen: boolean;
16583
+ title: string;
16584
+ entry: string;
16585
+ files: Array<{
16586
+ /**
16587
+ * The file's path inside the artifact, such as figures/revenue.svg
16588
+ */
16589
+ path: string;
16590
+ file: {
16591
+ blobId: string;
16592
+ digest: string;
16593
+ sizeBytes: number;
16594
+ fileName?: string;
16595
+ mediaType?: string;
16596
+ logicalPath?: string;
16597
+ };
16598
+ }>;
16599
+ outline: {
16600
+ kind: "document";
16601
+ headings: Array<{
16602
+ depth: number;
16603
+ text: string;
16604
+ slug: string;
16605
+ }>;
16606
+ } | {
16607
+ kind: "sheet";
16608
+ sheets: Array<{
16609
+ name: string;
16610
+ /**
16611
+ * The rows of its CSV; none for a live sheet
16612
+ */
16613
+ rows: number;
16614
+ columns: Array<string>;
16615
+ /**
16616
+ * A live sheet's query, queries/<name>.json, whose rows each reader reads
16617
+ */
16618
+ query?: string;
16619
+ }>;
16620
+ charts: Array<string>;
16621
+ } | {
16622
+ kind: "slides";
16623
+ slides: Array<{
16624
+ title?: string;
16625
+ }>;
16626
+ } | {
16627
+ kind: "page";
16628
+ title?: string;
16629
+ } | {
16630
+ kind: "canvas";
16631
+ items: Array<{
16632
+ id: string;
16633
+ type: "board";
16634
+ title?: string;
16635
+ file: string;
16636
+ w: number;
16637
+ h: number;
16638
+ /**
16639
+ * What the board's preview is a picture of: a board kept as it was keeps it
16640
+ */
16641
+ renderKey?: string;
16642
+ } | {
16643
+ id: string;
16644
+ type: "section";
16645
+ title?: string;
16646
+ }>;
16647
+ /**
16648
+ * The modes each board has a preview in: both, or the one its theme.json pins
16649
+ */
16650
+ themes?: Array<"light" | "dark">;
16651
+ } | {
16652
+ kind: "file";
16653
+ mediaType: string;
16654
+ };
16655
+ references: Array<{
16656
+ address: string;
16657
+ as: "embed" | "link";
16658
+ at: string;
16659
+ resolvedVersion: number;
16660
+ }>;
16661
+ /**
16662
+ * Who last wrote its content
16663
+ */
16664
+ author: {
16665
+ type: "user" | "serviceAccount" | "system";
16666
+ id: string;
16667
+ };
16668
+ /**
16669
+ * The Agent turn and thread its content was last written from
16670
+ */
16671
+ origin?: {
16672
+ threadId: string;
16673
+ runId: string;
16674
+ };
16675
+ /**
16676
+ * When the version was opened
16677
+ */
16678
+ createdAt: string;
16679
+ /**
16680
+ * When its content was last written
16681
+ */
16682
+ updatedAt: string;
16683
+ /**
16684
+ * When it was created, which froze it
16685
+ */
16686
+ frozenAt?: string;
16687
+ /**
16688
+ * Who created it
16689
+ */
16690
+ frozenBy?: {
16691
+ type: "user" | "serviceAccount" | "system";
16692
+ id: string;
16693
+ };
16694
+ /**
16695
+ * A canvas's boards by id, as reading or publishing the version returns them: ready when its preview is, pending while it is rendered, none when none will come and the board shows its outline
16696
+ */
16697
+ boardPreviews?: {
16698
+ [key: string]: "ready" | "pending" | "none";
16699
+ };
16700
+ };
16701
+ };
16702
+ };
16703
+ export type FreezeArtifactVersionResponse = FreezeArtifactVersionResponses[keyof FreezeArtifactVersionResponses];
16704
+ export type ListArtifactCommentsData = {
16705
+ body?: never;
16706
+ path: {
16707
+ artifactId: string;
16708
+ };
16709
+ query?: never;
16710
+ url: "/api/artifacts/{artifactId}/comments";
16711
+ };
16712
+ export type ListArtifactCommentsErrors = {
16713
+ /**
16714
+ * Response for status 403
16715
+ */
16716
+ 403: {
16717
+ error: string;
16718
+ /**
16719
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
16720
+ */
16721
+ code?: string;
16722
+ /**
16723
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
16724
+ */
16725
+ latest?: {
16726
+ version: number;
16727
+ revision: number;
16728
+ author: {
16729
+ type: "user" | "serviceAccount" | "system";
16730
+ id: string;
16731
+ };
16732
+ frozenBy?: {
16733
+ type: "user" | "serviceAccount" | "system";
16734
+ id: string;
16735
+ };
16736
+ };
16737
+ };
16738
+ /**
16739
+ * Response for status 404
16740
+ */
16741
+ 404: {
16742
+ error: string;
16743
+ /**
16744
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
16745
+ */
16746
+ code?: string;
16747
+ /**
16748
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
16749
+ */
16750
+ latest?: {
16751
+ version: number;
16752
+ revision: number;
16753
+ author: {
16754
+ type: "user" | "serviceAccount" | "system";
16755
+ id: string;
16756
+ };
16757
+ frozenBy?: {
16758
+ type: "user" | "serviceAccount" | "system";
16759
+ id: string;
16760
+ };
16761
+ };
16762
+ };
16763
+ /**
16764
+ * Response for status 501
16765
+ */
16766
+ 501: {
16767
+ error: string;
16768
+ /**
16769
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
16770
+ */
16771
+ code?: string;
16772
+ /**
16773
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
16774
+ */
16775
+ latest?: {
16776
+ version: number;
16777
+ revision: number;
16778
+ author: {
16779
+ type: "user" | "serviceAccount" | "system";
16780
+ id: string;
16781
+ };
16782
+ frozenBy?: {
16783
+ type: "user" | "serviceAccount" | "system";
16784
+ id: string;
16785
+ };
16786
+ };
16787
+ };
16788
+ };
16789
+ export type ListArtifactCommentsError = ListArtifactCommentsErrors[keyof ListArtifactCommentsErrors];
16790
+ export type ListArtifactCommentsResponses = {
16791
+ /**
16792
+ * Response for status 200
16793
+ */
16794
+ 200: {
16795
+ /**
16796
+ * Comments and replies, oldest first
16797
+ */
16798
+ comments: Array<{
16799
+ artifactId: string;
16800
+ id: string;
16801
+ /**
16802
+ * The comment it replies to, for a reply
16803
+ */
16804
+ parentId?: string;
16805
+ anchor: {
16806
+ /**
16807
+ * The id of the canvas's board it is about
16808
+ */
16809
+ board?: string;
16810
+ /**
16811
+ * The address of the board's element it is about, such as body>main:0>h1:0
16812
+ */
16813
+ element?: string;
16814
+ /**
16815
+ * The element's first words, which name it once it is gone; kept to 120 characters
16816
+ */
16817
+ label?: string;
16818
+ /**
16819
+ * Where on the board its pin is, as fractions of the board's width and height from its top left
16820
+ */
16821
+ point?: {
16822
+ x: number;
16823
+ y: number;
16824
+ };
16825
+ /**
16826
+ * The artifact's revision its author saw
16827
+ */
16828
+ revision: number;
16829
+ };
16830
+ /**
16831
+ * Plain text
16832
+ */
16833
+ body: string;
16834
+ /**
16835
+ * Who wrote it: a principal, or a guest, someone without an account who opened a shared link, whose id is their link's session
16836
+ */
16837
+ author: {
16838
+ type: "user" | "serviceAccount" | "system" | "guest";
16839
+ id: string;
16840
+ };
16841
+ /**
16842
+ * Its author's name: a member's profile name or email, the project's for its own code, or the name a guest gave; null for anyone the project cannot name. A guest reading it never gets a member's email
16843
+ */
16844
+ authorName: string | null;
16845
+ /**
16846
+ * The Agent's run that wrote it for its author, and that run's conversation
16847
+ */
16848
+ origin?: {
16849
+ threadId: string;
16850
+ runId: string;
16851
+ };
16852
+ createdAt: string;
16853
+ /**
16854
+ * When someone marked it resolved
16855
+ */
16856
+ resolvedAt?: string;
16857
+ /**
16858
+ * Who marked it resolved
16859
+ */
16860
+ resolvedBy?: {
16861
+ type: "user" | "serviceAccount" | "system";
16862
+ id: string;
16863
+ };
16864
+ }>;
16865
+ };
16866
+ };
16867
+ export type ListArtifactCommentsResponse = ListArtifactCommentsResponses[keyof ListArtifactCommentsResponses];
16868
+ export type AddArtifactCommentData = {
16869
+ body: {
16870
+ /**
16871
+ * Plain text
16872
+ */
16873
+ body: string;
16874
+ /**
16875
+ * What it is about: a board, an element of the board, or, without, the artifact; at the artifact's revision by default. A reply is about what it replies to.
16876
+ */
16877
+ anchor?: {
16878
+ /**
16879
+ * The id of the canvas's board it is about
16880
+ */
16881
+ board?: string;
16882
+ /**
16883
+ * The address of the board's element it is about, such as body>main:0>h1:0
16884
+ */
16885
+ element?: string;
16886
+ /**
16887
+ * The element's first words, which name it once it is gone; kept to 120 characters
16888
+ */
16889
+ label?: string;
16890
+ /**
16891
+ * Where on the board its pin is, as fractions of the board's width and height from its top left
16892
+ */
16893
+ point?: {
16894
+ x: number;
16895
+ y: number;
16896
+ };
16897
+ /**
16898
+ * The artifact's revision its author saw
16899
+ */
16900
+ revision?: number;
16901
+ };
16902
+ /**
16903
+ * The comment it replies to
16904
+ */
16905
+ parentId?: string;
16906
+ };
16907
+ path: {
16908
+ artifactId: string;
16909
+ };
16910
+ query?: never;
16911
+ url: "/api/artifacts/{artifactId}/comments";
16912
+ };
16913
+ export type AddArtifactCommentErrors = {
16914
+ /**
16915
+ * Response for status 400
16916
+ */
16917
+ 400: {
16918
+ error: string;
16919
+ /**
16920
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
16921
+ */
16922
+ code?: string;
16923
+ /**
16924
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
16925
+ */
16926
+ latest?: {
16927
+ version: number;
16928
+ revision: number;
16929
+ author: {
16930
+ type: "user" | "serviceAccount" | "system";
16931
+ id: string;
16932
+ };
16933
+ frozenBy?: {
16934
+ type: "user" | "serviceAccount" | "system";
16935
+ id: string;
16936
+ };
16937
+ };
16938
+ };
16939
+ /**
16940
+ * Response for status 403
16941
+ */
16942
+ 403: {
16943
+ error: string;
16944
+ /**
16945
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
16946
+ */
16947
+ code?: string;
16948
+ /**
16949
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
16950
+ */
16951
+ latest?: {
16952
+ version: number;
16953
+ revision: number;
16954
+ author: {
16955
+ type: "user" | "serviceAccount" | "system";
16956
+ id: string;
16957
+ };
16958
+ frozenBy?: {
16959
+ type: "user" | "serviceAccount" | "system";
16960
+ id: string;
16961
+ };
16962
+ };
16963
+ };
16964
+ /**
16965
+ * Response for status 404
16966
+ */
16967
+ 404: {
16968
+ error: string;
16969
+ /**
16970
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
16971
+ */
16972
+ code?: string;
16973
+ /**
16974
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
16975
+ */
16976
+ latest?: {
16977
+ version: number;
16978
+ revision: number;
16979
+ author: {
16980
+ type: "user" | "serviceAccount" | "system";
16981
+ id: string;
16982
+ };
16983
+ frozenBy?: {
16984
+ type: "user" | "serviceAccount" | "system";
16985
+ id: string;
16986
+ };
16987
+ };
16988
+ };
16989
+ /**
16990
+ * Response for status 413
16991
+ */
16992
+ 413: {
16993
+ error: string;
16994
+ /**
16995
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
16996
+ */
16997
+ code?: string;
16998
+ /**
16999
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
17000
+ */
17001
+ latest?: {
17002
+ version: number;
17003
+ revision: number;
17004
+ author: {
17005
+ type: "user" | "serviceAccount" | "system";
17006
+ id: string;
17007
+ };
17008
+ frozenBy?: {
17009
+ type: "user" | "serviceAccount" | "system";
17010
+ id: string;
17011
+ };
17012
+ };
17013
+ };
17014
+ /**
17015
+ * Response for status 501
17016
+ */
17017
+ 501: {
17018
+ error: string;
17019
+ /**
17020
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
17021
+ */
17022
+ code?: string;
17023
+ /**
17024
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
17025
+ */
17026
+ latest?: {
17027
+ version: number;
17028
+ revision: number;
17029
+ author: {
17030
+ type: "user" | "serviceAccount" | "system";
17031
+ id: string;
17032
+ };
17033
+ frozenBy?: {
17034
+ type: "user" | "serviceAccount" | "system";
17035
+ id: string;
17036
+ };
17037
+ };
17038
+ };
17039
+ };
17040
+ export type AddArtifactCommentError = AddArtifactCommentErrors[keyof AddArtifactCommentErrors];
17041
+ export type AddArtifactCommentResponses = {
17042
+ /**
17043
+ * Response for status 201
17044
+ */
17045
+ 201: {
17046
+ artifactId: string;
17047
+ id: string;
17048
+ /**
17049
+ * The comment it replies to, for a reply
17050
+ */
17051
+ parentId?: string;
17052
+ anchor: {
17053
+ /**
17054
+ * The id of the canvas's board it is about
17055
+ */
17056
+ board?: string;
17057
+ /**
17058
+ * The address of the board's element it is about, such as body>main:0>h1:0
17059
+ */
17060
+ element?: string;
17061
+ /**
17062
+ * The element's first words, which name it once it is gone; kept to 120 characters
17063
+ */
17064
+ label?: string;
17065
+ /**
17066
+ * Where on the board its pin is, as fractions of the board's width and height from its top left
17067
+ */
17068
+ point?: {
17069
+ x: number;
17070
+ y: number;
17071
+ };
17072
+ /**
17073
+ * The artifact's revision its author saw
17074
+ */
17075
+ revision: number;
17076
+ };
17077
+ /**
17078
+ * Plain text
17079
+ */
17080
+ body: string;
17081
+ /**
17082
+ * Who wrote it: a principal, or a guest, someone without an account who opened a shared link, whose id is their link's session
17083
+ */
17084
+ author: {
17085
+ type: "user" | "serviceAccount" | "system" | "guest";
17086
+ id: string;
17087
+ };
17088
+ /**
17089
+ * Its author's name: a member's profile name or email, the project's for its own code, or the name a guest gave; null for anyone the project cannot name. A guest reading it never gets a member's email
17090
+ */
17091
+ authorName: string | null;
17092
+ /**
17093
+ * The Agent's run that wrote it for its author, and that run's conversation
17094
+ */
17095
+ origin?: {
17096
+ threadId: string;
17097
+ runId: string;
17098
+ };
17099
+ createdAt: string;
17100
+ /**
17101
+ * When someone marked it resolved
17102
+ */
17103
+ resolvedAt?: string;
17104
+ /**
17105
+ * Who marked it resolved
17106
+ */
17107
+ resolvedBy?: {
17108
+ type: "user" | "serviceAccount" | "system";
17109
+ id: string;
17110
+ };
17111
+ };
17112
+ };
17113
+ export type AddArtifactCommentResponse = AddArtifactCommentResponses[keyof AddArtifactCommentResponses];
17114
+ export type ResolveArtifactCommentData = {
17115
+ body: {
17116
+ /**
17117
+ * False opens it again
17118
+ */
17119
+ resolved?: boolean;
17120
+ };
17121
+ path: {
17122
+ artifactId: string;
17123
+ commentId: string;
17124
+ };
17125
+ query?: never;
17126
+ url: "/api/artifacts/{artifactId}/comments/{commentId}/resolve";
17127
+ };
17128
+ export type ResolveArtifactCommentErrors = {
17129
+ /**
17130
+ * Response for status 400
17131
+ */
17132
+ 400: {
17133
+ error: string;
17134
+ /**
17135
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
17136
+ */
17137
+ code?: string;
17138
+ /**
17139
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
17140
+ */
17141
+ latest?: {
17142
+ version: number;
17143
+ revision: number;
17144
+ author: {
17145
+ type: "user" | "serviceAccount" | "system";
17146
+ id: string;
17147
+ };
17148
+ frozenBy?: {
17149
+ type: "user" | "serviceAccount" | "system";
17150
+ id: string;
17151
+ };
17152
+ };
17153
+ };
17154
+ /**
17155
+ * Response for status 403
17156
+ */
17157
+ 403: {
17158
+ error: string;
17159
+ /**
17160
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
17161
+ */
17162
+ code?: string;
17163
+ /**
17164
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
17165
+ */
17166
+ latest?: {
17167
+ version: number;
17168
+ revision: number;
17169
+ author: {
17170
+ type: "user" | "serviceAccount" | "system";
17171
+ id: string;
17172
+ };
17173
+ frozenBy?: {
17174
+ type: "user" | "serviceAccount" | "system";
17175
+ id: string;
17176
+ };
17177
+ };
17178
+ };
17179
+ /**
17180
+ * Response for status 404
17181
+ */
17182
+ 404: {
17183
+ error: string;
17184
+ /**
17185
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
17186
+ */
17187
+ code?: string;
17188
+ /**
17189
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
17190
+ */
17191
+ latest?: {
17192
+ version: number;
17193
+ revision: number;
17194
+ author: {
17195
+ type: "user" | "serviceAccount" | "system";
17196
+ id: string;
17197
+ };
17198
+ frozenBy?: {
17199
+ type: "user" | "serviceAccount" | "system";
17200
+ id: string;
17201
+ };
17202
+ };
17203
+ };
17204
+ /**
17205
+ * Response for status 501
17206
+ */
17207
+ 501: {
17208
+ error: string;
17209
+ /**
17210
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
17211
+ */
17212
+ code?: string;
17213
+ /**
17214
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
17215
+ */
17216
+ latest?: {
17217
+ version: number;
17218
+ revision: number;
17219
+ author: {
17220
+ type: "user" | "serviceAccount" | "system";
17221
+ id: string;
17222
+ };
17223
+ frozenBy?: {
17224
+ type: "user" | "serviceAccount" | "system";
17225
+ id: string;
17226
+ };
17227
+ };
17228
+ };
17229
+ };
17230
+ export type ResolveArtifactCommentError = ResolveArtifactCommentErrors[keyof ResolveArtifactCommentErrors];
17231
+ export type ResolveArtifactCommentResponses = {
17232
+ /**
17233
+ * Response for status 200
17234
+ */
17235
+ 200: {
17236
+ artifactId: string;
17237
+ id: string;
17238
+ /**
17239
+ * The comment it replies to, for a reply
17240
+ */
17241
+ parentId?: string;
17242
+ anchor: {
17243
+ /**
17244
+ * The id of the canvas's board it is about
17245
+ */
17246
+ board?: string;
17247
+ /**
17248
+ * The address of the board's element it is about, such as body>main:0>h1:0
17249
+ */
17250
+ element?: string;
17251
+ /**
17252
+ * The element's first words, which name it once it is gone; kept to 120 characters
17253
+ */
17254
+ label?: string;
17255
+ /**
17256
+ * Where on the board its pin is, as fractions of the board's width and height from its top left
17257
+ */
17258
+ point?: {
17259
+ x: number;
17260
+ y: number;
17261
+ };
17262
+ /**
17263
+ * The artifact's revision its author saw
17264
+ */
17265
+ revision: number;
17266
+ };
17267
+ /**
17268
+ * Plain text
17269
+ */
17270
+ body: string;
17271
+ /**
17272
+ * Who wrote it: a principal, or a guest, someone without an account who opened a shared link, whose id is their link's session
17273
+ */
17274
+ author: {
17275
+ type: "user" | "serviceAccount" | "system" | "guest";
17276
+ id: string;
17277
+ };
17278
+ /**
17279
+ * Its author's name: a member's profile name or email, the project's for its own code, or the name a guest gave; null for anyone the project cannot name. A guest reading it never gets a member's email
17280
+ */
17281
+ authorName: string | null;
17282
+ /**
17283
+ * The Agent's run that wrote it for its author, and that run's conversation
17284
+ */
17285
+ origin?: {
17286
+ threadId: string;
17287
+ runId: string;
17288
+ };
17289
+ createdAt: string;
17290
+ /**
17291
+ * When someone marked it resolved
17292
+ */
17293
+ resolvedAt?: string;
17294
+ /**
17295
+ * Who marked it resolved
17296
+ */
17297
+ resolvedBy?: {
17298
+ type: "user" | "serviceAccount" | "system";
17299
+ id: string;
17300
+ };
17301
+ };
17302
+ };
17303
+ export type ResolveArtifactCommentResponse = ResolveArtifactCommentResponses[keyof ResolveArtifactCommentResponses];
17304
+ export type DeleteArtifactCommentData = {
17305
+ body?: never;
17306
+ path: {
17307
+ artifactId: string;
17308
+ commentId: string;
17309
+ };
17310
+ query?: never;
17311
+ url: "/api/artifacts/{artifactId}/comments/{commentId}";
17312
+ };
17313
+ export type DeleteArtifactCommentErrors = {
17314
+ /**
17315
+ * Response for status 403
17316
+ */
17317
+ 403: {
17318
+ error: string;
17319
+ /**
17320
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
17321
+ */
17322
+ code?: string;
17323
+ /**
17324
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
17325
+ */
17326
+ latest?: {
17327
+ version: number;
17328
+ revision: number;
17329
+ author: {
17330
+ type: "user" | "serviceAccount" | "system";
17331
+ id: string;
17332
+ };
17333
+ frozenBy?: {
17334
+ type: "user" | "serviceAccount" | "system";
17335
+ id: string;
17336
+ };
17337
+ };
17338
+ };
17339
+ /**
17340
+ * Response for status 404
17341
+ */
17342
+ 404: {
17343
+ error: string;
17344
+ /**
17345
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
17346
+ */
17347
+ code?: string;
17348
+ /**
17349
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
17350
+ */
17351
+ latest?: {
17352
+ version: number;
17353
+ revision: number;
17354
+ author: {
17355
+ type: "user" | "serviceAccount" | "system";
17356
+ id: string;
17357
+ };
17358
+ frozenBy?: {
17359
+ type: "user" | "serviceAccount" | "system";
17360
+ id: string;
17361
+ };
17362
+ };
17363
+ };
17364
+ /**
17365
+ * Response for status 501
17366
+ */
17367
+ 501: {
17368
+ error: string;
17369
+ /**
17370
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
17371
+ */
17372
+ code?: string;
17373
+ /**
17374
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
17375
+ */
17376
+ latest?: {
17377
+ version: number;
17378
+ revision: number;
17379
+ author: {
17380
+ type: "user" | "serviceAccount" | "system";
17381
+ id: string;
17382
+ };
17383
+ frozenBy?: {
17384
+ type: "user" | "serviceAccount" | "system";
17385
+ id: string;
17386
+ };
17387
+ };
17388
+ };
17389
+ };
17390
+ export type DeleteArtifactCommentError = DeleteArtifactCommentErrors[keyof DeleteArtifactCommentErrors];
17391
+ export type DeleteArtifactCommentResponses = {
17392
+ /**
17393
+ * Response for status 200
17394
+ */
17395
+ 200: {
17396
+ deleted: true;
17397
+ };
17398
+ };
17399
+ export type DeleteArtifactCommentResponse = DeleteArtifactCommentResponses[keyof DeleteArtifactCommentResponses];
17400
+ export type ListArtifactRestorePointsData = {
17401
+ body?: never;
17402
+ path: {
17403
+ artifactId: string;
17404
+ };
17405
+ query?: never;
17406
+ url: "/api/artifacts/{artifactId}/restore-points";
17407
+ };
17408
+ export type ListArtifactRestorePointsErrors = {
17409
+ /**
17410
+ * Response for status 403
17411
+ */
17412
+ 403: {
17413
+ error: string;
17414
+ /**
17415
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
17416
+ */
17417
+ code?: string;
17418
+ /**
17419
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
17420
+ */
17421
+ latest?: {
17422
+ version: number;
17423
+ revision: number;
17424
+ author: {
17425
+ type: "user" | "serviceAccount" | "system";
17426
+ id: string;
17427
+ };
17428
+ frozenBy?: {
17429
+ type: "user" | "serviceAccount" | "system";
17430
+ id: string;
17431
+ };
17432
+ };
17433
+ };
17434
+ /**
17435
+ * Response for status 404
17436
+ */
17437
+ 404: {
17438
+ error: string;
17439
+ /**
17440
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
17441
+ */
17442
+ code?: string;
17443
+ /**
17444
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
17445
+ */
17446
+ latest?: {
17447
+ version: number;
17448
+ revision: number;
17449
+ author: {
17450
+ type: "user" | "serviceAccount" | "system";
17451
+ id: string;
17452
+ };
17453
+ frozenBy?: {
17454
+ type: "user" | "serviceAccount" | "system";
17455
+ id: string;
17456
+ };
17457
+ };
17458
+ };
17459
+ /**
17460
+ * Response for status 501
17461
+ */
17462
+ 501: {
17463
+ error: string;
17464
+ /**
17465
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
17466
+ */
17467
+ code?: string;
17468
+ /**
17469
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
17470
+ */
17471
+ latest?: {
17472
+ version: number;
17473
+ revision: number;
17474
+ author: {
17475
+ type: "user" | "serviceAccount" | "system";
17476
+ id: string;
17477
+ };
17478
+ frozenBy?: {
17479
+ type: "user" | "serviceAccount" | "system";
17480
+ id: string;
17481
+ };
17482
+ };
17483
+ };
17484
+ };
17485
+ export type ListArtifactRestorePointsError = ListArtifactRestorePointsErrors[keyof ListArtifactRestorePointsErrors];
17486
+ export type ListArtifactRestorePointsResponses = {
17487
+ /**
17488
+ * Response for status 200
17489
+ */
17490
+ 200: {
17491
+ /**
17492
+ * Newest first: an artifact keeps its last 20
17493
+ */
17494
+ restorePoints: Array<{
17495
+ artifactId: string;
17496
+ /**
17497
+ * The revision whose content it holds, which restores it
17498
+ */
17499
+ revision: number;
17500
+ /**
17501
+ * The version it was taken of
17502
+ */
17503
+ version: number;
17504
+ /**
17505
+ * Whether that version was already created, and so frozen, when the point was taken: its content is then that version's
17506
+ */
17507
+ frozen: boolean;
17508
+ title: string;
17509
+ /**
17510
+ * Who had last written that content
17511
+ */
17512
+ author: {
17513
+ type: "user" | "serviceAccount" | "system";
17514
+ id: string;
17515
+ };
17516
+ origin?: {
17517
+ threadId: string;
17518
+ runId: string;
17519
+ };
17520
+ /**
17521
+ * When that content was written
17522
+ */
17523
+ updatedAt: string;
17524
+ /**
17525
+ * Taken before an Agent turn's first write to the artifact, or before a restore
17526
+ */
17527
+ reason: "turn" | "restore";
17528
+ /**
17529
+ * With turn: the turn's run
17530
+ */
17531
+ turnRunId?: string;
17532
+ /**
17533
+ * When it was taken
17534
+ */
17535
+ createdAt: string;
17536
+ }>;
17537
+ };
17538
+ };
17539
+ export type ListArtifactRestorePointsResponse = ListArtifactRestorePointsResponses[keyof ListArtifactRestorePointsResponses];
17540
+ export type GetArtifactRestorePointData = {
17541
+ body?: never;
17542
+ path: {
17543
+ artifactId: string;
17544
+ /**
17545
+ * The revision whose content the restore point holds
17546
+ */
17547
+ revision: string;
17548
+ };
17549
+ query?: never;
17550
+ url: "/api/artifacts/{artifactId}/restore-points/{revision}";
17551
+ };
17552
+ export type GetArtifactRestorePointErrors = {
17553
+ /**
17554
+ * Response for status 403
17555
+ */
17556
+ 403: {
17557
+ error: string;
17558
+ /**
17559
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
17560
+ */
17561
+ code?: string;
17562
+ /**
17563
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
17564
+ */
17565
+ latest?: {
17566
+ version: number;
17567
+ revision: number;
17568
+ author: {
17569
+ type: "user" | "serviceAccount" | "system";
17570
+ id: string;
17571
+ };
17572
+ frozenBy?: {
17573
+ type: "user" | "serviceAccount" | "system";
17574
+ id: string;
17575
+ };
17576
+ };
17577
+ };
17578
+ /**
17579
+ * Response for status 404
17580
+ */
17581
+ 404: {
17582
+ error: string;
17583
+ /**
17584
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
17585
+ */
17586
+ code?: string;
17587
+ /**
17588
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
17589
+ */
17590
+ latest?: {
17591
+ version: number;
17592
+ revision: number;
17593
+ author: {
17594
+ type: "user" | "serviceAccount" | "system";
17595
+ id: string;
17596
+ };
17597
+ frozenBy?: {
17598
+ type: "user" | "serviceAccount" | "system";
17599
+ id: string;
17600
+ };
17601
+ };
17602
+ };
17603
+ /**
17604
+ * Response for status 501
17605
+ */
17606
+ 501: {
17607
+ error: string;
17608
+ /**
17609
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
17610
+ */
17611
+ code?: string;
17612
+ /**
17613
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
17614
+ */
17615
+ latest?: {
17616
+ version: number;
17617
+ revision: number;
17618
+ author: {
17619
+ type: "user" | "serviceAccount" | "system";
17620
+ id: string;
17621
+ };
17622
+ frozenBy?: {
17623
+ type: "user" | "serviceAccount" | "system";
17624
+ id: string;
17625
+ };
17626
+ };
17627
+ };
17628
+ };
17629
+ export type GetArtifactRestorePointError = GetArtifactRestorePointErrors[keyof GetArtifactRestorePointErrors];
17630
+ export type GetArtifactRestorePointResponses = {
17631
+ /**
17632
+ * Response for status 200
17633
+ */
17634
+ 200: {
17635
+ artifactId: string;
17636
+ /**
17637
+ * The revision whose content it holds, which restores it
17638
+ */
17639
+ revision: number;
17640
+ /**
17641
+ * The version it was taken of
17642
+ */
17643
+ version: number;
17644
+ /**
17645
+ * Whether that version was already created, and so frozen, when the point was taken: its content is then that version's
17646
+ */
17647
+ frozen: boolean;
17648
+ title: string;
17649
+ /**
17650
+ * Who had last written that content
17651
+ */
17652
+ author: {
17653
+ type: "user" | "serviceAccount" | "system";
17654
+ id: string;
17655
+ };
17656
+ origin?: {
17657
+ threadId: string;
17658
+ runId: string;
17659
+ };
17660
+ /**
17661
+ * When that content was written
17662
+ */
17663
+ updatedAt: string;
17664
+ /**
17665
+ * Taken before an Agent turn's first write to the artifact, or before a restore
17666
+ */
17667
+ reason: "turn" | "restore";
17668
+ /**
17669
+ * With turn: the turn's run
17670
+ */
17671
+ turnRunId?: string;
17672
+ /**
17673
+ * When it was taken
17674
+ */
17675
+ createdAt: string;
17676
+ entry: string;
17677
+ files: Array<{
17678
+ /**
17679
+ * The file's path inside the artifact, such as figures/revenue.svg
17680
+ */
17681
+ path: string;
17682
+ file: {
17683
+ blobId: string;
17684
+ digest: string;
17685
+ sizeBytes: number;
17686
+ fileName?: string;
17687
+ mediaType?: string;
17688
+ logicalPath?: string;
17689
+ };
17690
+ }>;
17691
+ outline: {
17692
+ kind: "document";
17693
+ headings: Array<{
17694
+ depth: number;
17695
+ text: string;
17696
+ slug: string;
17697
+ }>;
17698
+ } | {
17699
+ kind: "sheet";
17700
+ sheets: Array<{
17701
+ name: string;
17702
+ /**
17703
+ * The rows of its CSV; none for a live sheet
17704
+ */
17705
+ rows: number;
17706
+ columns: Array<string>;
17707
+ /**
17708
+ * A live sheet's query, queries/<name>.json, whose rows each reader reads
17709
+ */
17710
+ query?: string;
17711
+ }>;
17712
+ charts: Array<string>;
17713
+ } | {
17714
+ kind: "slides";
17715
+ slides: Array<{
17716
+ title?: string;
17717
+ }>;
17718
+ } | {
17719
+ kind: "page";
17720
+ title?: string;
17721
+ } | {
17722
+ kind: "canvas";
17723
+ items: Array<{
17724
+ id: string;
17725
+ type: "board";
17726
+ title?: string;
17727
+ file: string;
17728
+ w: number;
17729
+ h: number;
17730
+ /**
17731
+ * What the board's preview is a picture of: a board kept as it was keeps it
17732
+ */
17733
+ renderKey?: string;
17734
+ } | {
17735
+ id: string;
17736
+ type: "section";
17737
+ title?: string;
17738
+ }>;
17739
+ /**
17740
+ * The modes each board has a preview in: both, or the one its theme.json pins
17741
+ */
17742
+ themes?: Array<"light" | "dark">;
17743
+ } | {
17744
+ kind: "file";
17745
+ mediaType: string;
15215
17746
  };
17747
+ references: Array<{
17748
+ address: string;
17749
+ as: "embed" | "link";
17750
+ at: string;
17751
+ resolvedVersion: number;
17752
+ }>;
15216
17753
  };
15217
- /**
15218
- * Response for status 501
15219
- */
15220
- 501: {
15221
- error: string;
17754
+ };
17755
+ export type GetArtifactRestorePointResponse = GetArtifactRestorePointResponses[keyof GetArtifactRestorePointResponses];
17756
+ export type GetArtifactRestorePointFileContentData = {
17757
+ body?: never;
17758
+ path: {
17759
+ artifactId: string;
15222
17760
  /**
15223
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
17761
+ * The revision whose content the restore point holds
15224
17762
  */
15225
- code?: string;
17763
+ revision: string;
17764
+ };
17765
+ query: {
17766
+ path: string;
17767
+ disposition?: "inline" | "attachment";
15226
17768
  /**
15227
- * With artifact_moved: the latest version and who published it
17769
+ * Client cache key; the route still resolves the current file
15228
17770
  */
15229
- latest?: {
15230
- version: number;
15231
- author: {
15232
- type: "user" | "serviceAccount" | "system";
15233
- id: string;
15234
- };
15235
- };
17771
+ v?: string;
15236
17772
  };
17773
+ url: "/api/artifacts/{artifactId}/restore-points/{revision}/content";
15237
17774
  };
15238
- export type SetArtifactStateError = SetArtifactStateErrors[keyof SetArtifactStateErrors];
15239
- export type SetArtifactStateResponses = {
17775
+ export type GetArtifactRestorePointFileContentErrors = {
15240
17776
  /**
15241
- * Response for status 200
17777
+ * Response for status 400
15242
17778
  */
15243
- 200: {
15244
- key: string;
15245
- /**
15246
- * The JSON value
15247
- */
15248
- value?: unknown;
15249
- updatedAt: string;
15250
- };
17779
+ 400: ErrorResponse;
17780
+ /**
17781
+ * Response for status 404
17782
+ */
17783
+ 404: ErrorResponse;
17784
+ /**
17785
+ * Requested byte range is not satisfiable
17786
+ */
17787
+ 416: unknown;
17788
+ /**
17789
+ * The storage role backing this content is not configured
17790
+ */
17791
+ 501: ErrorResponse;
15251
17792
  };
15252
- export type SetArtifactStateResponse = SetArtifactStateResponses[keyof SetArtifactStateResponses];
15253
- export type PublishArtifactVersionData = {
17793
+ export type GetArtifactRestorePointFileContentError = GetArtifactRestorePointFileContentErrors[keyof GetArtifactRestorePointFileContentErrors];
17794
+ export type GetArtifactRestorePointFileContentResponses = {
17795
+ /**
17796
+ * File content
17797
+ */
17798
+ 200: Blob | File;
17799
+ /**
17800
+ * Partial file content
17801
+ */
17802
+ 206: Blob | File;
17803
+ };
17804
+ export type GetArtifactRestorePointFileContentResponse = GetArtifactRestorePointFileContentResponses[keyof GetArtifactRestorePointFileContentResponses];
17805
+ export type RestoreArtifactData = {
15254
17806
  body: {
15255
- kind: "document" | "sheet" | "slides" | "page" | "canvas" | "file";
15256
- title: string;
15257
- /**
15258
- * Files stored with POST /api/files, at their paths in the artifact
15259
- */
15260
- files: Array<{
15261
- /**
15262
- * The file's path inside the artifact, such as figures/revenue.svg
15263
- */
15264
- path: string;
15265
- file: {
15266
- blobId: string;
15267
- digest: string;
15268
- sizeBytes: number;
15269
- fileName?: string;
15270
- mediaType?: string;
15271
- logicalPath?: string;
15272
- };
15273
- }>;
15274
17807
  /**
15275
- * The version this one was made from. When another was published since, the publish is refused with 409 artifact_moved, naming the latest version.
17808
+ * The revision this was made from. When the artifact changed since, it is refused with 409 artifact_moved, naming the revision and who last wrote the latest version.
15276
17809
  */
15277
- baseVersion?: number;
17810
+ baseRevision?: number;
15278
17811
  };
15279
17812
  path: {
15280
17813
  artifactId: string;
17814
+ /**
17815
+ * The revision whose content the restore point holds
17816
+ */
17817
+ revision: string;
15281
17818
  };
15282
17819
  query?: never;
15283
- url: "/api/artifacts/{artifactId}/versions";
17820
+ url: "/api/artifacts/{artifactId}/restore-points/{revision}/restore";
15284
17821
  };
15285
- export type PublishArtifactVersionErrors = {
17822
+ export type RestoreArtifactErrors = {
15286
17823
  /**
15287
17824
  * Response for status 400
15288
17825
  */
15289
17826
  400: {
15290
17827
  error: string;
15291
17828
  /**
15292
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
17829
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15293
17830
  */
15294
17831
  code?: string;
15295
17832
  /**
15296
- * With artifact_moved: the latest version and who published it
17833
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
15297
17834
  */
15298
17835
  latest?: {
15299
17836
  version: number;
17837
+ revision: number;
15300
17838
  author: {
15301
17839
  type: "user" | "serviceAccount" | "system";
15302
17840
  id: string;
15303
17841
  };
17842
+ frozenBy?: {
17843
+ type: "user" | "serviceAccount" | "system";
17844
+ id: string;
17845
+ };
15304
17846
  };
15305
17847
  };
15306
17848
  /**
@@ -15309,18 +17851,23 @@ export type PublishArtifactVersionErrors = {
15309
17851
  403: {
15310
17852
  error: string;
15311
17853
  /**
15312
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
17854
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15313
17855
  */
15314
17856
  code?: string;
15315
17857
  /**
15316
- * With artifact_moved: the latest version and who published it
17858
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
15317
17859
  */
15318
17860
  latest?: {
15319
17861
  version: number;
17862
+ revision: number;
15320
17863
  author: {
15321
17864
  type: "user" | "serviceAccount" | "system";
15322
17865
  id: string;
15323
17866
  };
17867
+ frozenBy?: {
17868
+ type: "user" | "serviceAccount" | "system";
17869
+ id: string;
17870
+ };
15324
17871
  };
15325
17872
  };
15326
17873
  /**
@@ -15329,18 +17876,23 @@ export type PublishArtifactVersionErrors = {
15329
17876
  404: {
15330
17877
  error: string;
15331
17878
  /**
15332
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
17879
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15333
17880
  */
15334
17881
  code?: string;
15335
17882
  /**
15336
- * With artifact_moved: the latest version and who published it
17883
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
15337
17884
  */
15338
17885
  latest?: {
15339
17886
  version: number;
17887
+ revision: number;
15340
17888
  author: {
15341
17889
  type: "user" | "serviceAccount" | "system";
15342
17890
  id: string;
15343
17891
  };
17892
+ frozenBy?: {
17893
+ type: "user" | "serviceAccount" | "system";
17894
+ id: string;
17895
+ };
15344
17896
  };
15345
17897
  };
15346
17898
  /**
@@ -15349,18 +17901,23 @@ export type PublishArtifactVersionErrors = {
15349
17901
  409: {
15350
17902
  error: string;
15351
17903
  /**
15352
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
17904
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15353
17905
  */
15354
17906
  code?: string;
15355
17907
  /**
15356
- * With artifact_moved: the latest version and who published it
17908
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
15357
17909
  */
15358
17910
  latest?: {
15359
17911
  version: number;
17912
+ revision: number;
15360
17913
  author: {
15361
17914
  type: "user" | "serviceAccount" | "system";
15362
17915
  id: string;
15363
17916
  };
17917
+ frozenBy?: {
17918
+ type: "user" | "serviceAccount" | "system";
17919
+ id: string;
17920
+ };
15364
17921
  };
15365
17922
  };
15366
17923
  /**
@@ -15369,27 +17926,32 @@ export type PublishArtifactVersionErrors = {
15369
17926
  501: {
15370
17927
  error: string;
15371
17928
  /**
15372
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
17929
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15373
17930
  */
15374
17931
  code?: string;
15375
17932
  /**
15376
- * With artifact_moved: the latest version and who published it
17933
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
15377
17934
  */
15378
17935
  latest?: {
15379
17936
  version: number;
17937
+ revision: number;
15380
17938
  author: {
15381
17939
  type: "user" | "serviceAccount" | "system";
15382
17940
  id: string;
15383
17941
  };
17942
+ frozenBy?: {
17943
+ type: "user" | "serviceAccount" | "system";
17944
+ id: string;
17945
+ };
15384
17946
  };
15385
17947
  };
15386
17948
  };
15387
- export type PublishArtifactVersionError = PublishArtifactVersionErrors[keyof PublishArtifactVersionErrors];
15388
- export type PublishArtifactVersionResponses = {
17949
+ export type RestoreArtifactError = RestoreArtifactErrors[keyof RestoreArtifactErrors];
17950
+ export type RestoreArtifactResponses = {
15389
17951
  /**
15390
- * Response for status 201
17952
+ * Response for status 200
15391
17953
  */
15392
- 201: {
17954
+ 200: {
15393
17955
  artifact: {
15394
17956
  id: string;
15395
17957
  projectId: string;
@@ -15400,12 +17962,27 @@ export type PublishArtifactVersionResponses = {
15400
17962
  id: string;
15401
17963
  };
15402
17964
  latestVersion: number;
17965
+ /**
17966
+ * Counts the artifact's changes: a write, a version created, a restore. It only grows, so content read at one revision is that revision's for good
17967
+ */
17968
+ revision: number;
15403
17969
  createdAt: string;
17970
+ /**
17971
+ * When the artifact last changed
17972
+ */
15404
17973
  updatedAt: string;
15405
17974
  };
15406
17975
  version: {
15407
17976
  artifactId: string;
15408
17977
  version: number;
17978
+ /**
17979
+ * The artifact's revision when this version last changed: the latest version's is the artifact's
17980
+ */
17981
+ revision: number;
17982
+ /**
17983
+ * Someone created this version: it never changes again. The latest version is open until then, and each write replaces its content
17984
+ */
17985
+ frozen: boolean;
15409
17986
  title: string;
15410
17987
  entry: string;
15411
17988
  files: Array<{
@@ -15461,11 +18038,19 @@ export type PublishArtifactVersionResponses = {
15461
18038
  file: string;
15462
18039
  w: number;
15463
18040
  h: number;
18041
+ /**
18042
+ * What the board's preview is a picture of: a board kept as it was keeps it
18043
+ */
18044
+ renderKey?: string;
15464
18045
  } | {
15465
18046
  id: string;
15466
18047
  type: "section";
15467
18048
  title?: string;
15468
18049
  }>;
18050
+ /**
18051
+ * The modes each board has a preview in: both, or the one its theme.json pins
18052
+ */
18053
+ themes?: Array<"light" | "dark">;
15469
18054
  } | {
15470
18055
  kind: "file";
15471
18056
  mediaType: string;
@@ -15476,24 +18061,49 @@ export type PublishArtifactVersionResponses = {
15476
18061
  at: string;
15477
18062
  resolvedVersion: number;
15478
18063
  }>;
18064
+ /**
18065
+ * Who last wrote its content
18066
+ */
15479
18067
  author: {
15480
18068
  type: "user" | "serviceAccount" | "system";
15481
18069
  id: string;
15482
18070
  };
18071
+ /**
18072
+ * The Agent turn and thread its content was last written from
18073
+ */
15483
18074
  origin?: {
15484
18075
  threadId: string;
15485
18076
  runId: string;
15486
18077
  };
18078
+ /**
18079
+ * When the version was opened
18080
+ */
15487
18081
  createdAt: string;
18082
+ /**
18083
+ * When its content was last written
18084
+ */
18085
+ updatedAt: string;
18086
+ /**
18087
+ * When it was created, which froze it
18088
+ */
18089
+ frozenAt?: string;
18090
+ /**
18091
+ * Who created it
18092
+ */
18093
+ frozenBy?: {
18094
+ type: "user" | "serviceAccount" | "system";
18095
+ id: string;
18096
+ };
18097
+ /**
18098
+ * A canvas's boards by id, as reading or publishing the version returns them: ready when its preview is, pending while it is rendered, none when none will come and the board shows its outline
18099
+ */
18100
+ boardPreviews?: {
18101
+ [key: string]: "ready" | "pending" | "none";
18102
+ };
15488
18103
  };
15489
- warnings: Array<{
15490
- code: string;
15491
- message: string;
15492
- part?: string;
15493
- }>;
15494
18104
  };
15495
18105
  };
15496
- export type PublishArtifactVersionResponse = PublishArtifactVersionResponses[keyof PublishArtifactVersionResponses];
18106
+ export type RestoreArtifactResponse = RestoreArtifactResponses[keyof RestoreArtifactResponses];
15497
18107
  export type CreateArtifactFrameData = {
15498
18108
  body?: never;
15499
18109
  path: {
@@ -15513,18 +18123,23 @@ export type CreateArtifactFrameErrors = {
15513
18123
  403: {
15514
18124
  error: string;
15515
18125
  /**
15516
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
18126
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15517
18127
  */
15518
18128
  code?: string;
15519
18129
  /**
15520
- * With artifact_moved: the latest version and who published it
18130
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
15521
18131
  */
15522
18132
  latest?: {
15523
18133
  version: number;
18134
+ revision: number;
15524
18135
  author: {
15525
18136
  type: "user" | "serviceAccount" | "system";
15526
18137
  id: string;
15527
18138
  };
18139
+ frozenBy?: {
18140
+ type: "user" | "serviceAccount" | "system";
18141
+ id: string;
18142
+ };
15528
18143
  };
15529
18144
  };
15530
18145
  /**
@@ -15533,18 +18148,23 @@ export type CreateArtifactFrameErrors = {
15533
18148
  404: {
15534
18149
  error: string;
15535
18150
  /**
15536
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
18151
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15537
18152
  */
15538
18153
  code?: string;
15539
18154
  /**
15540
- * With artifact_moved: the latest version and who published it
18155
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
15541
18156
  */
15542
18157
  latest?: {
15543
18158
  version: number;
18159
+ revision: number;
15544
18160
  author: {
15545
18161
  type: "user" | "serviceAccount" | "system";
15546
18162
  id: string;
15547
18163
  };
18164
+ frozenBy?: {
18165
+ type: "user" | "serviceAccount" | "system";
18166
+ id: string;
18167
+ };
15548
18168
  };
15549
18169
  };
15550
18170
  /**
@@ -15553,18 +18173,23 @@ export type CreateArtifactFrameErrors = {
15553
18173
  409: {
15554
18174
  error: string;
15555
18175
  /**
15556
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
18176
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15557
18177
  */
15558
18178
  code?: string;
15559
18179
  /**
15560
- * With artifact_moved: the latest version and who published it
18180
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
15561
18181
  */
15562
18182
  latest?: {
15563
18183
  version: number;
18184
+ revision: number;
15564
18185
  author: {
15565
18186
  type: "user" | "serviceAccount" | "system";
15566
18187
  id: string;
15567
18188
  };
18189
+ frozenBy?: {
18190
+ type: "user" | "serviceAccount" | "system";
18191
+ id: string;
18192
+ };
15568
18193
  };
15569
18194
  };
15570
18195
  /**
@@ -15573,18 +18198,23 @@ export type CreateArtifactFrameErrors = {
15573
18198
  501: {
15574
18199
  error: string;
15575
18200
  /**
15576
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
18201
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15577
18202
  */
15578
18203
  code?: string;
15579
18204
  /**
15580
- * With artifact_moved: the latest version and who published it
18205
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
15581
18206
  */
15582
18207
  latest?: {
15583
18208
  version: number;
18209
+ revision: number;
15584
18210
  author: {
15585
18211
  type: "user" | "serviceAccount" | "system";
15586
18212
  id: string;
15587
18213
  };
18214
+ frozenBy?: {
18215
+ type: "user" | "serviceAccount" | "system";
18216
+ id: string;
18217
+ };
15588
18218
  };
15589
18219
  };
15590
18220
  };
@@ -15624,18 +18254,23 @@ export type GetArtifactVersionErrors = {
15624
18254
  403: {
15625
18255
  error: string;
15626
18256
  /**
15627
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
18257
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15628
18258
  */
15629
18259
  code?: string;
15630
18260
  /**
15631
- * With artifact_moved: the latest version and who published it
18261
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
15632
18262
  */
15633
18263
  latest?: {
15634
18264
  version: number;
18265
+ revision: number;
15635
18266
  author: {
15636
18267
  type: "user" | "serviceAccount" | "system";
15637
18268
  id: string;
15638
18269
  };
18270
+ frozenBy?: {
18271
+ type: "user" | "serviceAccount" | "system";
18272
+ id: string;
18273
+ };
15639
18274
  };
15640
18275
  };
15641
18276
  /**
@@ -15644,18 +18279,23 @@ export type GetArtifactVersionErrors = {
15644
18279
  404: {
15645
18280
  error: string;
15646
18281
  /**
15647
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
18282
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15648
18283
  */
15649
18284
  code?: string;
15650
18285
  /**
15651
- * With artifact_moved: the latest version and who published it
18286
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
15652
18287
  */
15653
18288
  latest?: {
15654
18289
  version: number;
18290
+ revision: number;
15655
18291
  author: {
15656
18292
  type: "user" | "serviceAccount" | "system";
15657
18293
  id: string;
15658
18294
  };
18295
+ frozenBy?: {
18296
+ type: "user" | "serviceAccount" | "system";
18297
+ id: string;
18298
+ };
15659
18299
  };
15660
18300
  };
15661
18301
  /**
@@ -15664,18 +18304,23 @@ export type GetArtifactVersionErrors = {
15664
18304
  501: {
15665
18305
  error: string;
15666
18306
  /**
15667
- * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, invalid_artifact, invalid_state, state_full, not_allowed, not_shared (it exists but no conversation you read shares it), read_only (you observe the conversation that shares it), query_not_found, query_invalid (the ontology no longer admits the query), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
18307
+ * Stable machine-readable failure code: artifact_not_found, artifact_kind_mismatch, artifact_moved, restore_point_not_found, comment_not_found, invalid_artifact, invalid_comment, invalid_state, name_required (a shared link's guest gives their name before commenting), state_full, comments_full, not_allowed, not_shared (it exists but neither a conversation nor an object you read shares it), read_only (you only read it), query_not_found, query_invalid (the ontology no longer admits the query), preview_not_found (the board has no preview yet, or will have none), execution_lost (a run token's run ended or moved to another runner), or storage_unavailable.
15668
18308
  */
15669
18309
  code?: string;
15670
18310
  /**
15671
- * With artifact_moved: the latest version and who published it
18311
+ * With artifact_moved: the artifact's latest version, its revision, who last wrote it, and who created it once it is frozen
15672
18312
  */
15673
18313
  latest?: {
15674
18314
  version: number;
18315
+ revision: number;
15675
18316
  author: {
15676
18317
  type: "user" | "serviceAccount" | "system";
15677
18318
  id: string;
15678
18319
  };
18320
+ frozenBy?: {
18321
+ type: "user" | "serviceAccount" | "system";
18322
+ id: string;
18323
+ };
15679
18324
  };
15680
18325
  };
15681
18326
  };
@@ -15687,6 +18332,14 @@ export type GetArtifactVersionResponses = {
15687
18332
  200: {
15688
18333
  artifactId: string;
15689
18334
  version: number;
18335
+ /**
18336
+ * The artifact's revision when this version last changed: the latest version's is the artifact's
18337
+ */
18338
+ revision: number;
18339
+ /**
18340
+ * Someone created this version: it never changes again. The latest version is open until then, and each write replaces its content
18341
+ */
18342
+ frozen: boolean;
15690
18343
  title: string;
15691
18344
  entry: string;
15692
18345
  files: Array<{
@@ -15742,11 +18395,19 @@ export type GetArtifactVersionResponses = {
15742
18395
  file: string;
15743
18396
  w: number;
15744
18397
  h: number;
18398
+ /**
18399
+ * What the board's preview is a picture of: a board kept as it was keeps it
18400
+ */
18401
+ renderKey?: string;
15745
18402
  } | {
15746
18403
  id: string;
15747
18404
  type: "section";
15748
18405
  title?: string;
15749
18406
  }>;
18407
+ /**
18408
+ * The modes each board has a preview in: both, or the one its theme.json pins
18409
+ */
18410
+ themes?: Array<"light" | "dark">;
15750
18411
  } | {
15751
18412
  kind: "file";
15752
18413
  mediaType: string;
@@ -15757,18 +18418,111 @@ export type GetArtifactVersionResponses = {
15757
18418
  at: string;
15758
18419
  resolvedVersion: number;
15759
18420
  }>;
18421
+ /**
18422
+ * Who last wrote its content
18423
+ */
15760
18424
  author: {
15761
18425
  type: "user" | "serviceAccount" | "system";
15762
18426
  id: string;
15763
18427
  };
18428
+ /**
18429
+ * The Agent turn and thread its content was last written from
18430
+ */
15764
18431
  origin?: {
15765
18432
  threadId: string;
15766
18433
  runId: string;
15767
18434
  };
18435
+ /**
18436
+ * When the version was opened
18437
+ */
15768
18438
  createdAt: string;
18439
+ /**
18440
+ * When its content was last written
18441
+ */
18442
+ updatedAt: string;
18443
+ /**
18444
+ * When it was created, which froze it
18445
+ */
18446
+ frozenAt?: string;
18447
+ /**
18448
+ * Who created it
18449
+ */
18450
+ frozenBy?: {
18451
+ type: "user" | "serviceAccount" | "system";
18452
+ id: string;
18453
+ };
18454
+ /**
18455
+ * A canvas's boards by id, as reading or publishing the version returns them: ready when its preview is, pending while it is rendered, none when none will come and the board shows its outline
18456
+ */
18457
+ boardPreviews?: {
18458
+ [key: string]: "ready" | "pending" | "none";
18459
+ };
15769
18460
  };
15770
18461
  };
15771
18462
  export type GetArtifactVersionResponse = GetArtifactVersionResponses[keyof GetArtifactVersionResponses];
18463
+ export type GetArtifactBoardPreviewData = {
18464
+ body?: never;
18465
+ path: {
18466
+ artifactId: string;
18467
+ /**
18468
+ * A version number, or "latest"
18469
+ */
18470
+ version: string;
18471
+ /**
18472
+ * The board's id in the canvas
18473
+ */
18474
+ board: string;
18475
+ };
18476
+ query?: {
18477
+ /**
18478
+ * The reader's mode; a canvas whose theme.json pins one is pictured only in it
18479
+ */
18480
+ theme?: "light" | "dark";
18481
+ /**
18482
+ * full, the default: a PNG of the board at its own size. small: a WebP at most 480 pixels wide, for a canvas that shows many boards at once
18483
+ */
18484
+ size?: "full" | "small";
18485
+ /**
18486
+ * The version's revision the picture is of. Another than the version's current one is 404 preview_not_found: the version changed, and says which pictures it has now. One that matches is cached for good
18487
+ */
18488
+ revision?: number;
18489
+ /**
18490
+ * The board's render key the picture is of, as the version's outline names it, in place of revision: the picture stays the same while the board shows the same, however often the canvas around it changes. Another than the board's current one is 404 preview_not_found. One that matches is cached for good
18491
+ */
18492
+ key?: string;
18493
+ /**
18494
+ * Share grant selector for elements that cannot send the x-sixb-share-grant header
18495
+ */
18496
+ shareGrant?: string;
18497
+ };
18498
+ url: "/api/artifacts/{artifactId}/versions/{version}/boards/{board}/preview";
18499
+ };
18500
+ export type GetArtifactBoardPreviewErrors = {
18501
+ /**
18502
+ * Response for status 400
18503
+ */
18504
+ 400: ArtifactErrorResponse;
18505
+ /**
18506
+ * Response for status 403
18507
+ */
18508
+ 403: ArtifactErrorResponse;
18509
+ /**
18510
+ * Response for status 404
18511
+ */
18512
+ 404: ArtifactErrorResponse;
18513
+ /**
18514
+ * Response for status 501
18515
+ */
18516
+ 501: ArtifactErrorResponse;
18517
+ };
18518
+ export type GetArtifactBoardPreviewError = GetArtifactBoardPreviewErrors[keyof GetArtifactBoardPreviewErrors];
18519
+ export type GetArtifactBoardPreviewResponses = {
18520
+ /**
18521
+ * The board's preview
18522
+ */
18523
+ 200: Blob | File;
18524
+ };
18525
+ export type GetArtifactBoardPreviewResponse = GetArtifactBoardPreviewResponses[keyof GetArtifactBoardPreviewResponses];
15772
18526
  export type GetArtifactQueryData = {
15773
18527
  body?: never;
15774
18528
  path: {
@@ -15831,6 +18585,10 @@ export type GetArtifactFileContentData = {
15831
18585
  * Client cache key; the route still resolves the current file
15832
18586
  */
15833
18587
  v?: string;
18588
+ /**
18589
+ * Share grant selector for elements that cannot send the x-sixb-share-grant header
18590
+ */
18591
+ shareGrant?: string;
15834
18592
  };
15835
18593
  url: "/api/artifacts/{artifactId}/versions/{version}/content";
15836
18594
  };
@@ -15880,6 +18638,10 @@ export type HeadArtifactFileContentData = {
15880
18638
  * Client cache key; the route still resolves the current file
15881
18639
  */
15882
18640
  v?: string;
18641
+ /**
18642
+ * Share grant selector for elements that cannot send the x-sixb-share-grant header
18643
+ */
18644
+ shareGrant?: string;
15883
18645
  };
15884
18646
  url: "/api/artifacts/{artifactId}/versions/{version}/content";
15885
18647
  };
@@ -16699,8 +19461,8 @@ export type ListEventsData = {
16699
19461
  body?: never;
16700
19462
  path?: never;
16701
19463
  query?: {
16702
- topic?: "objects" | "telemetry" | "links" | "schedules" | "syncs" | "pipelines" | "workflows" | "datasets" | "rules" | "users";
16703
- type?: "object.created" | "object.updated" | "object.deleted" | "telemetry.appended" | "link.created" | "link.updated" | "link.deleted" | "schedule.triggered" | "sync.run.started" | "sync.run.finished" | "pipeline.run.started" | "pipeline.run.step.started" | "pipeline.run.step.finished" | "pipeline.run.finished" | "workflow.run.queued" | "workflow.run.started" | "workflow.run.node.started" | "workflow.run.waiting" | "workflow.run.node.waiting" | "workflow.run.node.finished" | "workflow.run.finished" | "workflow.intervention.requested" | "workflow.intervention.submitted" | "workflow.intervention.cancelled" | "workflow.intervention.expired" | "dataset.version.committed" | "rule.triggered" | "rule.resolved" | "user.joined" | "user.suspended" | "user.reactivated" | "user.invited" | "user.profile.updated";
19464
+ topic?: "objects" | "telemetry" | "links" | "schedules" | "syncs" | "pipelines" | "workflows" | "datasets" | "rules" | "users" | "artifacts";
19465
+ type?: "object.created" | "object.updated" | "object.deleted" | "telemetry.appended" | "link.created" | "link.updated" | "link.deleted" | "schedule.triggered" | "sync.run.started" | "sync.run.finished" | "pipeline.run.started" | "pipeline.run.step.started" | "pipeline.run.step.finished" | "pipeline.run.finished" | "workflow.run.queued" | "workflow.run.started" | "workflow.run.node.started" | "workflow.run.waiting" | "workflow.run.node.waiting" | "workflow.run.node.finished" | "workflow.run.finished" | "workflow.intervention.requested" | "workflow.intervention.submitted" | "workflow.intervention.cancelled" | "workflow.intervention.expired" | "dataset.version.committed" | "rule.triggered" | "rule.resolved" | "user.joined" | "user.suspended" | "user.reactivated" | "user.invited" | "user.profile.updated" | "artifact.updated" | "artifact.commented";
16704
19466
  afterCursor?: string;
16705
19467
  limit?: string;
16706
19468
  };
@@ -17516,8 +20278,8 @@ export type ListEventsResponses = {
17516
20278
  [key: string]: unknown;
17517
20279
  } | null;
17518
20280
  };
17519
- type: "schedule.triggered" | "sync.run.started" | "sync.run.finished" | "pipeline.run.started" | "pipeline.run.step.started" | "pipeline.run.step.finished" | "pipeline.run.finished" | "workflow.run.queued" | "workflow.run.started" | "workflow.run.node.started" | "workflow.run.waiting" | "workflow.run.node.waiting" | "workflow.run.node.finished" | "workflow.run.finished" | "workflow.intervention.requested" | "workflow.intervention.submitted" | "workflow.intervention.cancelled" | "workflow.intervention.expired" | "dataset.version.committed" | "rule.triggered" | "rule.resolved" | "user.joined" | "user.suspended" | "user.reactivated" | "user.invited" | "user.profile.updated";
17520
- topic: "objects" | "telemetry" | "links" | "schedules" | "syncs" | "pipelines" | "workflows" | "datasets" | "rules" | "users";
20281
+ type: "schedule.triggered" | "sync.run.started" | "sync.run.finished" | "pipeline.run.started" | "pipeline.run.step.started" | "pipeline.run.step.finished" | "pipeline.run.finished" | "workflow.run.queued" | "workflow.run.started" | "workflow.run.node.started" | "workflow.run.waiting" | "workflow.run.node.waiting" | "workflow.run.node.finished" | "workflow.run.finished" | "workflow.intervention.requested" | "workflow.intervention.submitted" | "workflow.intervention.cancelled" | "workflow.intervention.expired" | "dataset.version.committed" | "rule.triggered" | "rule.resolved" | "user.joined" | "user.suspended" | "user.reactivated" | "user.invited" | "user.profile.updated" | "artifact.updated" | "artifact.commented";
20282
+ topic: "objects" | "telemetry" | "links" | "schedules" | "syncs" | "pipelines" | "workflows" | "datasets" | "rules" | "users" | "artifacts";
17521
20283
  payload: {
17522
20284
  [key: string]: unknown;
17523
20285
  };
@@ -18160,7 +20922,7 @@ export type ListProjectionsResponses = {
18160
20922
  [key: string]: string;
18161
20923
  };
18162
20924
  users?: {
18163
- [key: string]: "email";
20925
+ [key: string]: "email" | "id";
18164
20926
  };
18165
20927
  links: {
18166
20928
  [key: string]: {
@@ -18645,7 +21407,7 @@ export type GetProjectionResponses = {
18645
21407
  [key: string]: string;
18646
21408
  };
18647
21409
  users?: {
18648
- [key: string]: "email";
21410
+ [key: string]: "email" | "id";
18649
21411
  };
18650
21412
  links: {
18651
21413
  [key: string]: {