@fleetless/contracts 11.0.0 → 11.1.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -9,6 +9,19 @@ version.
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ### Added
13
+
14
+ - `file_limit` on a `refused` asset sync failure carries the enforced per-file
15
+ limit and known file size through Bridge progress and Cloud sync status.
16
+ Store-full `details` stays separate; failure kinds are unchanged.
17
+
18
+ ### Fixed
19
+
20
+ - Corrected the exported `Job.state` and `JobRun.state` descriptions of final
21
+ `lost` causes, including terminal status without a recoverable result, and
22
+ the `job_lost` fallback for a bridge loss frame without an explicit error.
23
+ Wire shapes and error codes are unchanged.
24
+
12
25
  ## [11.0.0] — 2026-11-02
13
26
 
14
27
  ### Added
@@ -12306,10 +12306,10 @@
12306
12306
  "upload_failed",
12307
12307
  "refused"
12308
12308
  ],
12309
- "description": "Why it failed. `unresolvable` means the reference names nothing the producer can find or may read, and is **permanent** — the only kind reconciliation may treat as gone. `upload_failed` means the bytes exist and the transfer did not succeed, and `refused` means it was never attempted, either because the robot's asset store had no room — then `details` carries the three numbers — or because a producer-side ceiling was hit."
12309
+ "description": "Why it failed. `unresolvable` means the reference names nothing the producer can find or may read, and is **permanent** — the only kind reconciliation may treat as gone. `upload_failed` means the bytes exist and the transfer did not succeed. `refused` means the store or per-file limit refused the upload, or the producer did not examine the reference; it remains transient for reconciliation."
12310
12310
  },
12311
12311
  "details": {
12312
- "description": "The three numbers behind a `refused` entry the robot's store had no room for, and absent for every other kind — a forced `null` on every `unresolvable` entry buys nothing. A `refused` entry may also carry no details: the producer's own ceiling is the other half of that kind, and no store number describes it.",
12312
+ "description": "The three numbers behind a `refused` entry the robot's store had no room for. Absent for every other kind and exclusive with `file_limit`; a forced `null` on every other entry buys nothing.",
12313
12313
  "anyOf": [
12314
12314
  {
12315
12315
  "type": "object",
@@ -12344,13 +12344,93 @@
12344
12344
  "type": "null"
12345
12345
  }
12346
12346
  ]
12347
+ },
12348
+ "file_limit": {
12349
+ "description": "The enforced per-file limit and refused file size, if known, for a `refused` upload that received `413 file_too_large`. Exclusive with store-full `details`; absent on bare refusals and every other kind.",
12350
+ "anyOf": [
12351
+ {
12352
+ "type": "object",
12353
+ "properties": {
12354
+ "max_bytes": {
12355
+ "type": "integer",
12356
+ "exclusiveMinimum": 0,
12357
+ "maximum": 9007199254740991,
12358
+ "description": "The most one asset file can be, in bytes: `ASSET_FILE_MAX_BYTES`, the same on every plan."
12359
+ },
12360
+ "size_bytes": {
12361
+ "anyOf": [
12362
+ {
12363
+ "type": "integer",
12364
+ "exclusiveMinimum": 0,
12365
+ "maximum": 9007199254740991
12366
+ },
12367
+ {
12368
+ "type": "null"
12369
+ }
12370
+ ],
12371
+ "description": "The refused file's size, in bytes: the announced size, or the bytes that arrived when none (or a false one) was announced; `null` only when the body limit stopped the upload and nobody counted the bytes."
12372
+ }
12373
+ },
12374
+ "required": [
12375
+ "max_bytes",
12376
+ "size_bytes"
12377
+ ],
12378
+ "additionalProperties": false
12379
+ },
12380
+ {
12381
+ "type": "null"
12382
+ }
12383
+ ]
12347
12384
  }
12348
12385
  },
12349
12386
  "required": [
12350
12387
  "reference",
12351
12388
  "kind"
12352
12389
  ],
12353
- "additionalProperties": false
12390
+ "additionalProperties": false,
12391
+ "allOf": [
12392
+ {
12393
+ "if": {
12394
+ "properties": {
12395
+ "details": {
12396
+ "type": "object"
12397
+ }
12398
+ },
12399
+ "required": [
12400
+ "details"
12401
+ ]
12402
+ },
12403
+ "then": {
12404
+ "properties": {
12405
+ "kind": {
12406
+ "const": "refused"
12407
+ }
12408
+ }
12409
+ }
12410
+ },
12411
+ {
12412
+ "if": {
12413
+ "properties": {
12414
+ "file_limit": {
12415
+ "type": "object"
12416
+ }
12417
+ },
12418
+ "required": [
12419
+ "file_limit"
12420
+ ]
12421
+ },
12422
+ "then": {
12423
+ "properties": {
12424
+ "kind": {
12425
+ "const": "refused"
12426
+ },
12427
+ "details": {
12428
+ "type": "null"
12429
+ }
12430
+ }
12431
+ }
12432
+ }
12433
+ ]
12354
12434
  },
12355
12435
  "description": "What could not be provided, one entry per reference, each saying why. Required rather than optional: a sync that quietly drops three meshes and reports success moves the failure into somebody's renderer, where it shows up as a robot with missing limbs and no cause. At most `1000` entries — a producer at its own ceiling reports one entry saying so rather than growing the list."
12356
12436
  },
@@ -12614,10 +12694,10 @@
12614
12694
  "upload_failed",
12615
12695
  "refused"
12616
12696
  ],
12617
- "description": "Why it failed. `unresolvable` means the reference names nothing the producer can find or may read, and is **permanent** — the only kind reconciliation may treat as gone. `upload_failed` means the bytes exist and the transfer did not succeed, and `refused` means it was never attempted, either because the robot's asset store had no room — then `details` carries the three numbers — or because a producer-side ceiling was hit."
12697
+ "description": "Why it failed. `unresolvable` means the reference names nothing the producer can find or may read, and is **permanent** — the only kind reconciliation may treat as gone. `upload_failed` means the bytes exist and the transfer did not succeed. `refused` means the store or per-file limit refused the upload, or the producer did not examine the reference; it remains transient for reconciliation."
12618
12698
  },
12619
12699
  "details": {
12620
- "description": "The three numbers behind a `refused` entry the robot's store had no room for, and absent for every other kind — a forced `null` on every `unresolvable` entry buys nothing. A `refused` entry may also carry no details: the producer's own ceiling is the other half of that kind, and no store number describes it.",
12700
+ "description": "The three numbers behind a `refused` entry the robot's store had no room for. Absent for every other kind and exclusive with `file_limit`; a forced `null` on every other entry buys nothing.",
12621
12701
  "anyOf": [
12622
12702
  {
12623
12703
  "type": "object",
@@ -12652,13 +12732,93 @@
12652
12732
  "type": "null"
12653
12733
  }
12654
12734
  ]
12735
+ },
12736
+ "file_limit": {
12737
+ "description": "The enforced per-file limit and refused file size, if known, for a `refused` upload that received `413 file_too_large`. Exclusive with store-full `details`; absent on bare refusals and every other kind.",
12738
+ "anyOf": [
12739
+ {
12740
+ "type": "object",
12741
+ "properties": {
12742
+ "max_bytes": {
12743
+ "type": "integer",
12744
+ "exclusiveMinimum": 0,
12745
+ "maximum": 9007199254740991,
12746
+ "description": "The most one asset file can be, in bytes: `ASSET_FILE_MAX_BYTES`, the same on every plan."
12747
+ },
12748
+ "size_bytes": {
12749
+ "anyOf": [
12750
+ {
12751
+ "type": "integer",
12752
+ "exclusiveMinimum": 0,
12753
+ "maximum": 9007199254740991
12754
+ },
12755
+ {
12756
+ "type": "null"
12757
+ }
12758
+ ],
12759
+ "description": "The refused file's size, in bytes: the announced size, or the bytes that arrived when none (or a false one) was announced; `null` only when the body limit stopped the upload and nobody counted the bytes."
12760
+ }
12761
+ },
12762
+ "required": [
12763
+ "max_bytes",
12764
+ "size_bytes"
12765
+ ],
12766
+ "additionalProperties": false
12767
+ },
12768
+ {
12769
+ "type": "null"
12770
+ }
12771
+ ]
12655
12772
  }
12656
12773
  },
12657
12774
  "required": [
12658
12775
  "reference",
12659
12776
  "kind"
12660
12777
  ],
12661
- "additionalProperties": false
12778
+ "additionalProperties": false,
12779
+ "allOf": [
12780
+ {
12781
+ "if": {
12782
+ "properties": {
12783
+ "details": {
12784
+ "type": "object"
12785
+ }
12786
+ },
12787
+ "required": [
12788
+ "details"
12789
+ ]
12790
+ },
12791
+ "then": {
12792
+ "properties": {
12793
+ "kind": {
12794
+ "const": "refused"
12795
+ }
12796
+ }
12797
+ }
12798
+ },
12799
+ {
12800
+ "if": {
12801
+ "properties": {
12802
+ "file_limit": {
12803
+ "type": "object"
12804
+ }
12805
+ },
12806
+ "required": [
12807
+ "file_limit"
12808
+ ]
12809
+ },
12810
+ "then": {
12811
+ "properties": {
12812
+ "kind": {
12813
+ "const": "refused"
12814
+ },
12815
+ "details": {
12816
+ "type": "null"
12817
+ }
12818
+ }
12819
+ }
12820
+ }
12821
+ ]
12662
12822
  },
12663
12823
  "description": "What could not be provided, one entry per reference, each saying why. Required rather than optional: a sync that quietly drops three meshes and reports success moves the failure into somebody's renderer, where it shows up as a robot with missing limbs and no cause. At most `1000` entries — a producer at its own ceiling reports one entry saying so rather than growing the list."
12664
12824
  },
@@ -26327,7 +26487,7 @@
26327
26487
  "cancelled",
26328
26488
  "lost"
26329
26489
  ],
26330
- "description": "Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge's next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final: the bridge stated it does not know the job and nothing else runs on its action, or the action server vanished mid-goal."
26490
+ "description": "Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge's next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final after an action server disappears before terminal status (`action_server_lost`), a later query confirms the bridge does not know the job and no active goal accounts for it (`job_unknown_to_bridge`), or a terminal goal status is observed but its result cannot be recovered within the bounded wait (`job_lost`). An unqualified bridge loss report also uses `job_lost`, with a message distinguishing it from terminal-result loss. Cloud cleanup may settle a superseded job or a deleted robot's job as `lost` without an error code. A reconnect or omission from `hello.active_jobs` alone is not final."
26331
26491
  },
26332
26492
  "origin": {
26333
26493
  "type": "string",
@@ -26499,7 +26659,7 @@
26499
26659
  "cancelled",
26500
26660
  "lost"
26501
26661
  ],
26502
- "description": "Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge's next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final: the bridge stated it does not know the job and nothing else runs on its action, or the action server vanished mid-goal."
26662
+ "description": "Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge's next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final after an action server disappears before terminal status (`action_server_lost`), a later query confirms the bridge does not know the job and no active goal accounts for it (`job_unknown_to_bridge`), or a terminal goal status is observed but its result cannot be recovered within the bounded wait (`job_lost`). An unqualified bridge loss report also uses `job_lost`, with a message distinguishing it from terminal-result loss. Cloud cleanup may settle a superseded job or a deleted robot's job as `lost` without an error code. A reconnect or omission from `hello.active_jobs` alone is not final."
26503
26663
  },
26504
26664
  "origin": {
26505
26665
  "type": "string",
@@ -26639,7 +26799,7 @@
26639
26799
  "cancelled",
26640
26800
  "lost"
26641
26801
  ],
26642
- "description": "How the run ended, or `running` while it is still going. `unknown` while the robot has not accounted for it — offline or silent — and updated once the bridge says how it stands. `lost` is final: the bridge did not know the run and nothing else ran on its action, so the outcome is unknowable rather than unknown."
26802
+ "description": "How the run ended, or `running` while it is still going. `unknown` while the robot has not accounted for it — offline or silent — and updated once the bridge says how it stands. `lost` is final after an action server disappears before terminal status (`action_server_lost`), a later query confirms the bridge does not know the job and no active goal accounts for it (`job_unknown_to_bridge`), or a terminal goal status is observed but its result cannot be recovered within the bounded wait (`job_lost`). An unqualified bridge loss report also uses `job_lost`, with a message distinguishing it from terminal-result loss. Cloud cleanup may settle a superseded run or a deleted robot's run as `lost` without an error code. A reconnect or omission from `hello.active_jobs` alone is not final."
26643
26803
  },
26644
26804
  "started_at": {
26645
26805
  "type": "string",
@@ -36367,7 +36527,7 @@
36367
36527
  "cancelled",
36368
36528
  "lost"
36369
36529
  ],
36370
- "description": "Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge's next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final: the bridge stated it does not know the job and nothing else runs on its action, or the action server vanished mid-goal."
36530
+ "description": "Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge's next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final after an action server disappears before terminal status (`action_server_lost`), a later query confirms the bridge does not know the job and no active goal accounts for it (`job_unknown_to_bridge`), or a terminal goal status is observed but its result cannot be recovered within the bounded wait (`job_lost`). An unqualified bridge loss report also uses `job_lost`, with a message distinguishing it from terminal-result loss. Cloud cleanup may settle a superseded job or a deleted robot's job as `lost` without an error code. A reconnect or omission from `hello.active_jobs` alone is not final."
36371
36531
  },
36372
36532
  "origin": {
36373
36533
  "type": "string",
@@ -37062,7 +37222,7 @@
37062
37222
  "cancelled",
37063
37223
  "lost"
37064
37224
  ],
37065
- "description": "Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge's next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final: the bridge stated it does not know the job and nothing else runs on its action, or the action server vanished mid-goal."
37225
+ "description": "Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge's next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final after an action server disappears before terminal status (`action_server_lost`), a later query confirms the bridge does not know the job and no active goal accounts for it (`job_unknown_to_bridge`), or a terminal goal status is observed but its result cannot be recovered within the bounded wait (`job_lost`). An unqualified bridge loss report also uses `job_lost`, with a message distinguishing it from terminal-result loss. Cloud cleanup may settle a superseded job or a deleted robot's job as `lost` without an error code. A reconnect or omission from `hello.active_jobs` alone is not final."
37066
37226
  },
37067
37227
  "origin": {
37068
37228
  "type": "string",
@@ -129,10 +129,10 @@
129
129
  "upload_failed",
130
130
  "refused"
131
131
  ],
132
- "description": "Why it failed. `unresolvable` means the reference names nothing the producer can find or may read, and is **permanent** — the only kind reconciliation may treat as gone. `upload_failed` means the bytes exist and the transfer did not succeed, and `refused` means it was never attempted, either because the robot's asset store had no room — then `details` carries the three numbers — or because a producer-side ceiling was hit."
132
+ "description": "Why it failed. `unresolvable` means the reference names nothing the producer can find or may read, and is **permanent** — the only kind reconciliation may treat as gone. `upload_failed` means the bytes exist and the transfer did not succeed. `refused` means the store or per-file limit refused the upload, or the producer did not examine the reference; it remains transient for reconciliation."
133
133
  },
134
134
  "details": {
135
- "description": "The three numbers behind a `refused` entry the robot's store had no room for, and absent for every other kind — a forced `null` on every `unresolvable` entry buys nothing. A `refused` entry may also carry no details: the producer's own ceiling is the other half of that kind, and no store number describes it.",
135
+ "description": "The three numbers behind a `refused` entry the robot's store had no room for. Absent for every other kind and exclusive with `file_limit`; a forced `null` on every other entry buys nothing.",
136
136
  "anyOf": [
137
137
  {
138
138
  "type": "object",
@@ -167,13 +167,93 @@
167
167
  "type": "null"
168
168
  }
169
169
  ]
170
+ },
171
+ "file_limit": {
172
+ "description": "The enforced per-file limit and refused file size, if known, for a `refused` upload that received `413 file_too_large`. Exclusive with store-full `details`; absent on bare refusals and every other kind.",
173
+ "anyOf": [
174
+ {
175
+ "type": "object",
176
+ "properties": {
177
+ "max_bytes": {
178
+ "type": "integer",
179
+ "exclusiveMinimum": 0,
180
+ "maximum": 9007199254740991,
181
+ "description": "The most one asset file can be, in bytes: `ASSET_FILE_MAX_BYTES`, the same on every plan."
182
+ },
183
+ "size_bytes": {
184
+ "anyOf": [
185
+ {
186
+ "type": "integer",
187
+ "exclusiveMinimum": 0,
188
+ "maximum": 9007199254740991
189
+ },
190
+ {
191
+ "type": "null"
192
+ }
193
+ ],
194
+ "description": "The refused file's size, in bytes: the announced size, or the bytes that arrived when none (or a false one) was announced; `null` only when the body limit stopped the upload and nobody counted the bytes."
195
+ }
196
+ },
197
+ "required": [
198
+ "max_bytes",
199
+ "size_bytes"
200
+ ],
201
+ "additionalProperties": false
202
+ },
203
+ {
204
+ "type": "null"
205
+ }
206
+ ]
170
207
  }
171
208
  },
172
209
  "required": [
173
210
  "reference",
174
211
  "kind"
175
212
  ],
176
- "additionalProperties": false
213
+ "additionalProperties": false,
214
+ "allOf": [
215
+ {
216
+ "if": {
217
+ "properties": {
218
+ "details": {
219
+ "type": "object"
220
+ }
221
+ },
222
+ "required": [
223
+ "details"
224
+ ]
225
+ },
226
+ "then": {
227
+ "properties": {
228
+ "kind": {
229
+ "const": "refused"
230
+ }
231
+ }
232
+ }
233
+ },
234
+ {
235
+ "if": {
236
+ "properties": {
237
+ "file_limit": {
238
+ "type": "object"
239
+ }
240
+ },
241
+ "required": [
242
+ "file_limit"
243
+ ]
244
+ },
245
+ "then": {
246
+ "properties": {
247
+ "kind": {
248
+ "const": "refused"
249
+ },
250
+ "details": {
251
+ "type": "null"
252
+ }
253
+ }
254
+ }
255
+ }
256
+ ]
177
257
  },
178
258
  "description": "What could not be provided, one entry per reference, each saying why. Required rather than optional: a sync that quietly drops three meshes and reports success moves the failure into somebody's renderer, where it shows up as a robot with missing limbs and no cause. At most `1000` entries — a producer at its own ceiling reports one entry saying so rather than growing the list."
179
259
  },
@@ -54,10 +54,10 @@
54
54
  "upload_failed",
55
55
  "refused"
56
56
  ],
57
- "description": "Why it failed. `unresolvable` means the reference names nothing the producer can find or may read, and is **permanent** — the only kind reconciliation may treat as gone. `upload_failed` means the bytes exist and the transfer did not succeed, and `refused` means it was never attempted, either because the robot's asset store had no room — then `details` carries the three numbers — or because a producer-side ceiling was hit."
57
+ "description": "Why it failed. `unresolvable` means the reference names nothing the producer can find or may read, and is **permanent** — the only kind reconciliation may treat as gone. `upload_failed` means the bytes exist and the transfer did not succeed. `refused` means the store or per-file limit refused the upload, or the producer did not examine the reference; it remains transient for reconciliation."
58
58
  },
59
59
  "details": {
60
- "description": "The three numbers behind a `refused` entry the robot's store had no room for, and absent for every other kind — a forced `null` on every `unresolvable` entry buys nothing. A `refused` entry may also carry no details: the producer's own ceiling is the other half of that kind, and no store number describes it.",
60
+ "description": "The three numbers behind a `refused` entry the robot's store had no room for. Absent for every other kind and exclusive with `file_limit`; a forced `null` on every other entry buys nothing.",
61
61
  "anyOf": [
62
62
  {
63
63
  "type": "object",
@@ -92,13 +92,93 @@
92
92
  "type": "null"
93
93
  }
94
94
  ]
95
+ },
96
+ "file_limit": {
97
+ "description": "The enforced per-file limit and refused file size, if known, for a `refused` upload that received `413 file_too_large`. Exclusive with store-full `details`; absent on bare refusals and every other kind.",
98
+ "anyOf": [
99
+ {
100
+ "type": "object",
101
+ "properties": {
102
+ "max_bytes": {
103
+ "type": "integer",
104
+ "exclusiveMinimum": 0,
105
+ "maximum": 9007199254740991,
106
+ "description": "The most one asset file can be, in bytes: `ASSET_FILE_MAX_BYTES`, the same on every plan."
107
+ },
108
+ "size_bytes": {
109
+ "anyOf": [
110
+ {
111
+ "type": "integer",
112
+ "exclusiveMinimum": 0,
113
+ "maximum": 9007199254740991
114
+ },
115
+ {
116
+ "type": "null"
117
+ }
118
+ ],
119
+ "description": "The refused file's size, in bytes: the announced size, or the bytes that arrived when none (or a false one) was announced; `null` only when the body limit stopped the upload and nobody counted the bytes."
120
+ }
121
+ },
122
+ "required": [
123
+ "max_bytes",
124
+ "size_bytes"
125
+ ],
126
+ "additionalProperties": false
127
+ },
128
+ {
129
+ "type": "null"
130
+ }
131
+ ]
95
132
  }
96
133
  },
97
134
  "required": [
98
135
  "reference",
99
136
  "kind"
100
137
  ],
101
- "additionalProperties": false
138
+ "additionalProperties": false,
139
+ "allOf": [
140
+ {
141
+ "if": {
142
+ "properties": {
143
+ "details": {
144
+ "type": "object"
145
+ }
146
+ },
147
+ "required": [
148
+ "details"
149
+ ]
150
+ },
151
+ "then": {
152
+ "properties": {
153
+ "kind": {
154
+ "const": "refused"
155
+ }
156
+ }
157
+ }
158
+ },
159
+ {
160
+ "if": {
161
+ "properties": {
162
+ "file_limit": {
163
+ "type": "object"
164
+ }
165
+ },
166
+ "required": [
167
+ "file_limit"
168
+ ]
169
+ },
170
+ "then": {
171
+ "properties": {
172
+ "kind": {
173
+ "const": "refused"
174
+ },
175
+ "details": {
176
+ "type": "null"
177
+ }
178
+ }
179
+ }
180
+ }
181
+ ]
102
182
  },
103
183
  "description": "What could not be provided, one entry per reference, each saying why. Required rather than optional: a sync that quietly drops three meshes and reports success moves the failure into somebody's renderer, where it shows up as a robot with missing limbs and no cause. At most `1000` entries — a producer at its own ceiling reports one entry saying so rather than growing the list."
104
184
  },
@@ -40,10 +40,10 @@
40
40
  "upload_failed",
41
41
  "refused"
42
42
  ],
43
- "description": "Why it failed. `unresolvable` means the reference names nothing the producer can find or may read, and is **permanent** — the only kind reconciliation may treat as gone. `upload_failed` means the bytes exist and the transfer did not succeed, and `refused` means it was never attempted, either because the robot's asset store had no room — then `details` carries the three numbers — or because a producer-side ceiling was hit."
43
+ "description": "Why it failed. `unresolvable` means the reference names nothing the producer can find or may read, and is **permanent** — the only kind reconciliation may treat as gone. `upload_failed` means the bytes exist and the transfer did not succeed. `refused` means the store or per-file limit refused the upload, or the producer did not examine the reference; it remains transient for reconciliation."
44
44
  },
45
45
  "details": {
46
- "description": "The three numbers behind a `refused` entry the robot's store had no room for, and absent for every other kind — a forced `null` on every `unresolvable` entry buys nothing. A `refused` entry may also carry no details: the producer's own ceiling is the other half of that kind, and no store number describes it.",
46
+ "description": "The three numbers behind a `refused` entry the robot's store had no room for. Absent for every other kind and exclusive with `file_limit`; a forced `null` on every other entry buys nothing.",
47
47
  "anyOf": [
48
48
  {
49
49
  "type": "object",
@@ -77,11 +77,90 @@
77
77
  "type": "null"
78
78
  }
79
79
  ]
80
+ },
81
+ "file_limit": {
82
+ "description": "The enforced per-file limit and refused file size, if known, for a `refused` upload that received `413 file_too_large`. Exclusive with store-full `details`; absent on bare refusals and every other kind.",
83
+ "anyOf": [
84
+ {
85
+ "type": "object",
86
+ "properties": {
87
+ "max_bytes": {
88
+ "type": "integer",
89
+ "exclusiveMinimum": 0,
90
+ "maximum": 9007199254740991,
91
+ "description": "The most one asset file can be, in bytes: `ASSET_FILE_MAX_BYTES`, the same on every plan."
92
+ },
93
+ "size_bytes": {
94
+ "anyOf": [
95
+ {
96
+ "type": "integer",
97
+ "exclusiveMinimum": 0,
98
+ "maximum": 9007199254740991
99
+ },
100
+ {
101
+ "type": "null"
102
+ }
103
+ ],
104
+ "description": "The refused file's size, in bytes: the announced size, or the bytes that arrived when none (or a false one) was announced; `null` only when the body limit stopped the upload and nobody counted the bytes."
105
+ }
106
+ },
107
+ "required": [
108
+ "max_bytes",
109
+ "size_bytes"
110
+ ]
111
+ },
112
+ {
113
+ "type": "null"
114
+ }
115
+ ]
80
116
  }
81
117
  },
82
118
  "required": [
83
119
  "reference",
84
120
  "kind"
121
+ ],
122
+ "allOf": [
123
+ {
124
+ "if": {
125
+ "properties": {
126
+ "details": {
127
+ "type": "object"
128
+ }
129
+ },
130
+ "required": [
131
+ "details"
132
+ ]
133
+ },
134
+ "then": {
135
+ "properties": {
136
+ "kind": {
137
+ "const": "refused"
138
+ }
139
+ }
140
+ }
141
+ },
142
+ {
143
+ "if": {
144
+ "properties": {
145
+ "file_limit": {
146
+ "type": "object"
147
+ }
148
+ },
149
+ "required": [
150
+ "file_limit"
151
+ ]
152
+ },
153
+ "then": {
154
+ "properties": {
155
+ "kind": {
156
+ "const": "refused"
157
+ },
158
+ "details": {
159
+ "type": "null"
160
+ }
161
+ }
162
+ }
163
+ }
85
164
  ]
86
165
  }
87
166
  },
@@ -34,7 +34,7 @@
34
34
  "cancelled",
35
35
  "lost"
36
36
  ],
37
- "description": "Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge's next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final: the bridge stated it does not know the job and nothing else runs on its action, or the action server vanished mid-goal."
37
+ "description": "Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge's next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final after an action server disappears before terminal status (`action_server_lost`), a later query confirms the bridge does not know the job and no active goal accounts for it (`job_unknown_to_bridge`), or a terminal goal status is observed but its result cannot be recovered within the bounded wait (`job_lost`). An unqualified bridge loss report also uses `job_lost`, with a message distinguishing it from terminal-result loss. Cloud cleanup may settle a superseded job or a deleted robot's job as `lost` without an error code. A reconnect or omission from `hello.active_jobs` alone is not final."
38
38
  },
39
39
  "origin": {
40
40
  "type": "string",
@@ -48,7 +48,7 @@
48
48
  "cancelled",
49
49
  "lost"
50
50
  ],
51
- "description": "Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge's next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final: the bridge stated it does not know the job and nothing else runs on its action, or the action server vanished mid-goal."
51
+ "description": "Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge's next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final after an action server disappears before terminal status (`action_server_lost`), a later query confirms the bridge does not know the job and no active goal accounts for it (`job_unknown_to_bridge`), or a terminal goal status is observed but its result cannot be recovered within the bounded wait (`job_lost`). An unqualified bridge loss report also uses `job_lost`, with a message distinguishing it from terminal-result loss. Cloud cleanup may settle a superseded job or a deleted robot's job as `lost` without an error code. A reconnect or omission from `hello.active_jobs` alone is not final."
52
52
  },
53
53
  "origin": {
54
54
  "type": "string",
@@ -36,7 +36,7 @@
36
36
  "cancelled",
37
37
  "lost"
38
38
  ],
39
- "description": "Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge's next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final: the bridge stated it does not know the job and nothing else runs on its action, or the action server vanished mid-goal."
39
+ "description": "Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge's next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final after an action server disappears before terminal status (`action_server_lost`), a later query confirms the bridge does not know the job and no active goal accounts for it (`job_unknown_to_bridge`), or a terminal goal status is observed but its result cannot be recovered within the bounded wait (`job_lost`). An unqualified bridge loss report also uses `job_lost`, with a message distinguishing it from terminal-result loss. Cloud cleanup may settle a superseded job or a deleted robot's job as `lost` without an error code. A reconnect or omission from `hello.active_jobs` alone is not final."
40
40
  },
41
41
  "origin": {
42
42
  "type": "string",
@@ -34,7 +34,7 @@
34
34
  "cancelled",
35
35
  "lost"
36
36
  ],
37
- "description": "Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge's next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final: the bridge stated it does not know the job and nothing else runs on its action, or the action server vanished mid-goal."
37
+ "description": "Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge's next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final after an action server disappears before terminal status (`action_server_lost`), a later query confirms the bridge does not know the job and no active goal accounts for it (`job_unknown_to_bridge`), or a terminal goal status is observed but its result cannot be recovered within the bounded wait (`job_lost`). An unqualified bridge loss report also uses `job_lost`, with a message distinguishing it from terminal-result loss. Cloud cleanup may settle a superseded job or a deleted robot's job as `lost` without an error code. A reconnect or omission from `hello.active_jobs` alone is not final."
38
38
  },
39
39
  "origin": {
40
40
  "type": "string",
@@ -49,7 +49,7 @@
49
49
  "cancelled",
50
50
  "lost"
51
51
  ],
52
- "description": "Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge's next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final: the bridge stated it does not know the job and nothing else runs on its action, or the action server vanished mid-goal."
52
+ "description": "Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge's next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final after an action server disappears before terminal status (`action_server_lost`), a later query confirms the bridge does not know the job and no active goal accounts for it (`job_unknown_to_bridge`), or a terminal goal status is observed but its result cannot be recovered within the bounded wait (`job_lost`). An unqualified bridge loss report also uses `job_lost`, with a message distinguishing it from terminal-result loss. Cloud cleanup may settle a superseded job or a deleted robot's job as `lost` without an error code. A reconnect or omission from `hello.active_jobs` alone is not final."
53
53
  },
54
54
  "origin": {
55
55
  "type": "string",
@@ -36,7 +36,7 @@
36
36
  "cancelled",
37
37
  "lost"
38
38
  ],
39
- "description": "Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge's next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final: the bridge stated it does not know the job and nothing else runs on its action, or the action server vanished mid-goal."
39
+ "description": "Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge's next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final after an action server disappears before terminal status (`action_server_lost`), a later query confirms the bridge does not know the job and no active goal accounts for it (`job_unknown_to_bridge`), or a terminal goal status is observed but its result cannot be recovered within the bounded wait (`job_lost`). An unqualified bridge loss report also uses `job_lost`, with a message distinguishing it from terminal-result loss. Cloud cleanup may settle a superseded job or a deleted robot's job as `lost` without an error code. A reconnect or omission from `hello.active_jobs` alone is not final."
40
40
  },
41
41
  "origin": {
42
42
  "type": "string",
@@ -44,7 +44,7 @@
44
44
  "cancelled",
45
45
  "lost"
46
46
  ],
47
- "description": "How the run ended, or `running` while it is still going. `unknown` while the robot has not accounted for it — offline or silent — and updated once the bridge says how it stands. `lost` is final: the bridge did not know the run and nothing else ran on its action, so the outcome is unknowable rather than unknown."
47
+ "description": "How the run ended, or `running` while it is still going. `unknown` while the robot has not accounted for it — offline or silent — and updated once the bridge says how it stands. `lost` is final after an action server disappears before terminal status (`action_server_lost`), a later query confirms the bridge does not know the job and no active goal accounts for it (`job_unknown_to_bridge`), or a terminal goal status is observed but its result cannot be recovered within the bounded wait (`job_lost`). An unqualified bridge loss report also uses `job_lost`, with a message distinguishing it from terminal-result loss. Cloud cleanup may settle a superseded run or a deleted robot's run as `lost` without an error code. A reconnect or omission from `hello.active_jobs` alone is not final."
48
48
  },
49
49
  "started_at": {
50
50
  "type": "string",
@@ -39,7 +39,7 @@
39
39
  "cancelled",
40
40
  "lost"
41
41
  ],
42
- "description": "How the run ended, or `running` while it is still going. `unknown` while the robot has not accounted for it — offline or silent — and updated once the bridge says how it stands. `lost` is final: the bridge did not know the run and nothing else ran on its action, so the outcome is unknowable rather than unknown."
42
+ "description": "How the run ended, or `running` while it is still going. `unknown` while the robot has not accounted for it — offline or silent — and updated once the bridge says how it stands. `lost` is final after an action server disappears before terminal status (`action_server_lost`), a later query confirms the bridge does not know the job and no active goal accounts for it (`job_unknown_to_bridge`), or a terminal goal status is observed but its result cannot be recovered within the bounded wait (`job_lost`). An unqualified bridge loss report also uses `job_lost`, with a message distinguishing it from terminal-result loss. Cloud cleanup may settle a superseded run or a deleted robot's run as `lost` without an error code. A reconnect or omission from `hello.active_jobs` alone is not final."
43
43
  },
44
44
  "started_at": {
45
45
  "type": "string",
@@ -31,7 +31,7 @@
31
31
  "cancelled",
32
32
  "lost"
33
33
  ],
34
- "description": "Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge's next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final: the bridge stated it does not know the job and nothing else runs on its action, or the action server vanished mid-goal."
34
+ "description": "Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge's next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final after an action server disappears before terminal status (`action_server_lost`), a later query confirms the bridge does not know the job and no active goal accounts for it (`job_unknown_to_bridge`), or a terminal goal status is observed but its result cannot be recovered within the bounded wait (`job_lost`). An unqualified bridge loss report also uses `job_lost`, with a message distinguishing it from terminal-result loss. Cloud cleanup may settle a superseded job or a deleted robot's job as `lost` without an error code. A reconnect or omission from `hello.active_jobs` alone is not final."
35
35
  },
36
36
  "origin": {
37
37
  "type": "string",
@@ -34,7 +34,7 @@
34
34
  "cancelled",
35
35
  "lost"
36
36
  ],
37
- "description": "Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge's next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final: the bridge stated it does not know the job and nothing else runs on its action, or the action server vanished mid-goal."
37
+ "description": "Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge's next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final after an action server disappears before terminal status (`action_server_lost`), a later query confirms the bridge does not know the job and no active goal accounts for it (`job_unknown_to_bridge`), or a terminal goal status is observed but its result cannot be recovered within the bounded wait (`job_lost`). An unqualified bridge loss report also uses `job_lost`, with a message distinguishing it from terminal-result loss. Cloud cleanup may settle a superseded job or a deleted robot's job as `lost` without an error code. A reconnect or omission from `hello.active_jobs` alone is not final."
38
38
  },
39
39
  "origin": {
40
40
  "type": "string",
@@ -36,7 +36,7 @@
36
36
  "cancelled",
37
37
  "lost"
38
38
  ],
39
- "description": "Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge's next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final: the bridge stated it does not know the job and nothing else runs on its action, or the action server vanished mid-goal."
39
+ "description": "Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge's next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final after an action server disappears before terminal status (`action_server_lost`), a later query confirms the bridge does not know the job and no active goal accounts for it (`job_unknown_to_bridge`), or a terminal goal status is observed but its result cannot be recovered within the bounded wait (`job_lost`). An unqualified bridge loss report also uses `job_lost`, with a message distinguishing it from terminal-result loss. Cloud cleanup may settle a superseded job or a deleted robot's job as `lost` without an error code. A reconnect or omission from `hello.active_jobs` alone is not final."
40
40
  },
41
41
  "origin": {
42
42
  "type": "string",
@@ -40,10 +40,10 @@
40
40
  "upload_failed",
41
41
  "refused"
42
42
  ],
43
- "description": "Why it failed. `unresolvable` means the reference names nothing the producer can find or may read, and is **permanent** — the only kind reconciliation may treat as gone. `upload_failed` means the bytes exist and the transfer did not succeed, and `refused` means it was never attempted, either because the robot's asset store had no room — then `details` carries the three numbers — or because a producer-side ceiling was hit."
43
+ "description": "Why it failed. `unresolvable` means the reference names nothing the producer can find or may read, and is **permanent** — the only kind reconciliation may treat as gone. `upload_failed` means the bytes exist and the transfer did not succeed. `refused` means the store or per-file limit refused the upload, or the producer did not examine the reference; it remains transient for reconciliation."
44
44
  },
45
45
  "details": {
46
- "description": "The three numbers behind a `refused` entry the robot's store had no room for, and absent for every other kind — a forced `null` on every `unresolvable` entry buys nothing. A `refused` entry may also carry no details: the producer's own ceiling is the other half of that kind, and no store number describes it.",
46
+ "description": "The three numbers behind a `refused` entry the robot's store had no room for. Absent for every other kind and exclusive with `file_limit`; a forced `null` on every other entry buys nothing.",
47
47
  "anyOf": [
48
48
  {
49
49
  "type": "object",
@@ -78,13 +78,93 @@
78
78
  "type": "null"
79
79
  }
80
80
  ]
81
+ },
82
+ "file_limit": {
83
+ "description": "The enforced per-file limit and refused file size, if known, for a `refused` upload that received `413 file_too_large`. Exclusive with store-full `details`; absent on bare refusals and every other kind.",
84
+ "anyOf": [
85
+ {
86
+ "type": "object",
87
+ "properties": {
88
+ "max_bytes": {
89
+ "type": "integer",
90
+ "exclusiveMinimum": 0,
91
+ "maximum": 9007199254740991,
92
+ "description": "The most one asset file can be, in bytes: `ASSET_FILE_MAX_BYTES`, the same on every plan."
93
+ },
94
+ "size_bytes": {
95
+ "anyOf": [
96
+ {
97
+ "type": "integer",
98
+ "exclusiveMinimum": 0,
99
+ "maximum": 9007199254740991
100
+ },
101
+ {
102
+ "type": "null"
103
+ }
104
+ ],
105
+ "description": "The refused file's size, in bytes: the announced size, or the bytes that arrived when none (or a false one) was announced; `null` only when the body limit stopped the upload and nobody counted the bytes."
106
+ }
107
+ },
108
+ "required": [
109
+ "max_bytes",
110
+ "size_bytes"
111
+ ],
112
+ "additionalProperties": false
113
+ },
114
+ {
115
+ "type": "null"
116
+ }
117
+ ]
81
118
  }
82
119
  },
83
120
  "required": [
84
121
  "reference",
85
122
  "kind"
86
123
  ],
87
- "additionalProperties": false
124
+ "additionalProperties": false,
125
+ "allOf": [
126
+ {
127
+ "if": {
128
+ "properties": {
129
+ "details": {
130
+ "type": "object"
131
+ }
132
+ },
133
+ "required": [
134
+ "details"
135
+ ]
136
+ },
137
+ "then": {
138
+ "properties": {
139
+ "kind": {
140
+ "const": "refused"
141
+ }
142
+ }
143
+ }
144
+ },
145
+ {
146
+ "if": {
147
+ "properties": {
148
+ "file_limit": {
149
+ "type": "object"
150
+ }
151
+ },
152
+ "required": [
153
+ "file_limit"
154
+ ]
155
+ },
156
+ "then": {
157
+ "properties": {
158
+ "kind": {
159
+ "const": "refused"
160
+ },
161
+ "details": {
162
+ "type": "null"
163
+ }
164
+ }
165
+ }
166
+ }
167
+ ]
88
168
  }
89
169
  },
90
170
  "state": {
package/dist/assets.d.ts CHANGED
@@ -239,19 +239,17 @@ export type AssetStoreRefusedDetails = z.infer<typeof assetStoreRefusedDetails>;
239
239
  * reconciliation may treat as gone.
240
240
  * - **`upload_failed`** — the bytes exist and the transfer did not succeed.
241
241
  * **Transient.** The asset is still wanted; a later sync will carry it.
242
- * - **`refused`** — never attempted. Either the robot's asset store had no
243
- * room for it, in which case `details` carries the three numbers, or a
244
- * producer-side ceiling was hit (a `.dae` carrying more internal references
245
- * than one file or one sync will report), in which case it does not.
246
- * **Transient in the same sense**: nothing is known to be missing, only
247
- * unexamined.
242
+ * - **`refused`** — the receiver refused this file because the robot's store
243
+ * was full (`details`) or its per-file limit was exceeded (`file_limit`),
244
+ * or the producer never examined it. A `.dae` with too many internal
245
+ * references is one example of the latter. **Transient in the same
246
+ * sense**: reconciliation must not delete an asset still wanted.
248
247
  *
249
248
  * There was a fourth, `too_large`, for a file over a per-file ceiling. That
250
249
  * ceiling is gone from this enum, not from the cloud: a file over
251
- * `ASSET_FILE_MAX_BYTES` is refused by the cloud as `413 file_too_large`; a
252
- * producer that relays it reports `refused` with no details — so the kind
253
- * had no producer left here and one fewer thing to branch on is the whole of
254
- * the gain.
250
+ * `ASSET_FILE_MAX_BYTES` is refused by the cloud as `413 file_too_large`;
251
+ * a producer that relays it reports `refused` with `file_limit`, without a
252
+ * fourth kind.
255
253
  *
256
254
  * A consumer that cannot act on the distinction may still print `reference`
257
255
  * alone and lose nothing it had before.
@@ -274,6 +272,10 @@ export declare const assetFailure: z.ZodObject<{
274
272
  used_bytes: z.ZodNumber;
275
273
  size_bytes: z.ZodNumber;
276
274
  }, z.core.$strip>>>;
275
+ file_limit: z.ZodOptional<z.ZodNullable<z.ZodObject<{
276
+ max_bytes: z.ZodNumber;
277
+ size_bytes: z.ZodNullable<z.ZodNumber>;
278
+ }, z.core.$strip>>>;
277
279
  }, z.core.$strip>;
278
280
  export type AssetFailure = z.infer<typeof assetFailure>;
279
281
  export declare const assetSyncState: z.ZodEnum<{
@@ -304,6 +306,10 @@ export declare const assetSyncStatus: z.ZodObject<{
304
306
  used_bytes: z.ZodNumber;
305
307
  size_bytes: z.ZodNumber;
306
308
  }, z.core.$strip>>>;
309
+ file_limit: z.ZodOptional<z.ZodNullable<z.ZodObject<{
310
+ max_bytes: z.ZodNumber;
311
+ size_bytes: z.ZodNullable<z.ZodNumber>;
312
+ }, z.core.$strip>>>;
307
313
  }, z.core.$strip>>;
308
314
  reason: z.ZodNullable<z.ZodString>;
309
315
  stored: z.ZodNullable<z.ZodNumber>;
@@ -349,6 +355,10 @@ export declare const assetListResponse: z.ZodObject<{
349
355
  used_bytes: z.ZodNumber;
350
356
  size_bytes: z.ZodNumber;
351
357
  }, z.core.$strip>>>;
358
+ file_limit: z.ZodOptional<z.ZodNullable<z.ZodObject<{
359
+ max_bytes: z.ZodNumber;
360
+ size_bytes: z.ZodNullable<z.ZodNumber>;
361
+ }, z.core.$strip>>>;
352
362
  }, z.core.$strip>>;
353
363
  reason: z.ZodNullable<z.ZodString>;
354
364
  stored: z.ZodNullable<z.ZodNumber>;
package/dist/assets.js CHANGED
@@ -1,6 +1,7 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
2
  import { z } from 'zod';
3
3
  import { slug } from './common.js';
4
+ import { fileTooLargeDetails } from './file-too-large-details.js';
4
5
  /**
5
6
  * The asset store.
6
7
  *
@@ -299,19 +300,17 @@ export const assetStoreRefusedDetails = z.object({
299
300
  * reconciliation may treat as gone.
300
301
  * - **`upload_failed`** — the bytes exist and the transfer did not succeed.
301
302
  * **Transient.** The asset is still wanted; a later sync will carry it.
302
- * - **`refused`** — never attempted. Either the robot's asset store had no
303
- * room for it, in which case `details` carries the three numbers, or a
304
- * producer-side ceiling was hit (a `.dae` carrying more internal references
305
- * than one file or one sync will report), in which case it does not.
306
- * **Transient in the same sense**: nothing is known to be missing, only
307
- * unexamined.
303
+ * - **`refused`** — the receiver refused this file because the robot's store
304
+ * was full (`details`) or its per-file limit was exceeded (`file_limit`),
305
+ * or the producer never examined it. A `.dae` with too many internal
306
+ * references is one example of the latter. **Transient in the same
307
+ * sense**: reconciliation must not delete an asset still wanted.
308
308
  *
309
309
  * There was a fourth, `too_large`, for a file over a per-file ceiling. That
310
310
  * ceiling is gone from this enum, not from the cloud: a file over
311
- * `ASSET_FILE_MAX_BYTES` is refused by the cloud as `413 file_too_large`; a
312
- * producer that relays it reports `refused` with no details — so the kind
313
- * had no producer left here and one fewer thing to branch on is the whole of
314
- * the gain.
311
+ * `ASSET_FILE_MAX_BYTES` is refused by the cloud as `413 file_too_large`;
312
+ * a producer that relays it reports `refused` with `file_limit`, without a
313
+ * fourth kind.
315
314
  *
316
315
  * A consumer that cannot act on the distinction may still print `reference`
317
316
  * alone and lose nothing it had before.
@@ -329,7 +328,7 @@ export const assetFailure = z.object({
329
328
  description: 'What could not be provided, verbatim — the same string the asset would have been stored under, so a developer can match it against their own workspace by eye. For a failed URDF upload it is `robot_description`, which is **not** a mesh URI: a consumer must not assume every entry is one.',
330
329
  }),
331
330
  kind: assetFailureKind.meta({
332
- description: 'Why it failed. `unresolvable` means the reference names nothing the producer can find or may read, and is **permanent** — the only kind reconciliation may treat as gone. `upload_failed` means the bytes exist and the transfer did not succeed, and `refused` means it was never attempted, either because the robot\'s asset store had no room — then `details` carries the three numbers — or because a producer-side ceiling was hit.',
331
+ description: 'Why it failed. `unresolvable` means the reference names nothing the producer can find or may read, and is **permanent** — the only kind reconciliation may treat as gone. `upload_failed` means the bytes exist and the transfer did not succeed. `refused` means the store or per-file limit refused the upload, or the producer did not examine the reference; it remains transient for reconciliation.',
333
332
  }),
334
333
  /**
335
334
  * **The three numbers behind a full store.**
@@ -338,15 +337,17 @@ export const assetFailure = z.object({
338
337
  * not answer whether to delete an old sync or shrink the mesh;
339
338
  * `store_bytes`, `used_bytes` and `size_bytes` do.
340
339
  *
341
- * **Present only on `refused`, and not on every `refused`.** The other half
342
- * of that kind is the single collective entry a sync emits when it stops
343
- * naming individual failures, and no store number describes it — requiring
344
- * details there would mean inventing them. So the enforcement below is the
345
- * half that can be enforced: details belong to `refused` and to nothing
346
- * else. A forced `details: null` on every `unresolvable` buys nothing.
340
+ * **Present only on store-full `refused` entries.** A per-file refusal
341
+ * uses `file_limit`, while a producer that stops naming individual
342
+ * failures carries neither set of numbers. Requiring store details for
343
+ * either would mean inventing them. A forced `details: null` on every
344
+ * `unresolvable` buys nothing.
347
345
  */
348
346
  details: assetStoreRefusedDetails.nullish().meta({
349
- description: 'The three numbers behind a `refused` entry the robot\'s store had no room for, and absent for every other kind — a forced `null` on every `unresolvable` entry buys nothing. A `refused` entry may also carry no details: the producer\'s own ceiling is the other half of that kind, and no store number describes it.',
347
+ description: 'The three numbers behind a `refused` entry the robot\'s store had no room for. Absent for every other kind and exclusive with `file_limit`; a forced `null` on every other entry buys nothing.',
348
+ }),
349
+ file_limit: fileTooLargeDetails.nullish().meta({
350
+ description: 'The enforced per-file limit and refused file size, if known, for a `refused` upload that received `413 file_too_large`. Exclusive with store-full `details`; absent on bare refusals and every other kind.',
350
351
  }),
351
352
  }).superRefine((f, ctx) => {
352
353
  // Enforced here, not merely described above — a rule that lives only in a
@@ -354,6 +355,25 @@ export const assetFailure = z.object({
354
355
  if (f.kind !== 'refused' && f.details != null) {
355
356
  ctx.addIssue({ code: 'custom', path: ['details'], message: 'store details belong to `refused` only' });
356
357
  }
358
+ if (f.file_limit != null && f.kind !== 'refused') {
359
+ ctx.addIssue({ code: 'custom', path: ['file_limit'], message: 'file limit belongs to `refused` only' });
360
+ }
361
+ if (f.file_limit != null && f.details != null) {
362
+ ctx.addIssue({ code: 'custom', path: ['file_limit'], message: 'file limit and store details are exclusive' });
363
+ }
364
+ }).meta({
365
+ // Zod refinements do not survive JSON Schema export. Keep the same
366
+ // cross-field rules on the entry so every enclosing wire artifact gets them.
367
+ allOf: [
368
+ {
369
+ if: { properties: { details: { type: 'object' } }, required: ['details'] },
370
+ then: { properties: { kind: { const: 'refused' } } },
371
+ },
372
+ {
373
+ if: { properties: { file_limit: { type: 'object' } }, required: ['file_limit'] },
374
+ then: { properties: { kind: { const: 'refused' }, details: { type: 'null' } } },
375
+ },
376
+ ],
357
377
  });
358
378
  export const assetSyncState = z.enum(['running', 'succeeded', 'failed']);
359
379
  export const assetSyncStatus = z.object({
package/dist/errors.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
2
  import { z } from 'zod';
3
+ export { fileTooLargeDetails } from './file-too-large-details.js';
4
+ export type { FileTooLargeDetails } from './file-too-large-details.js';
3
5
  /**
4
6
  * The one error shape of the REST and realtime APIs: a stable
5
7
  * machine-readable code plus a human message; validation errors name the
@@ -209,22 +211,6 @@ export declare const orgLockedDetails: z.ZodObject<{
209
211
  }>;
210
212
  }, z.core.$strip>;
211
213
  export type OrgLockedDetails = z.infer<typeof orgLockedDetails>;
212
- /**
213
- * The `details` of a `413 file_too_large` refusal (2026-10-03,
214
- * fleetless/fleetless#136): one file is larger than `ASSET_FILE_MAX_BYTES`.
215
- * Not a store and not a plan limit — those are `409 plan_limit` and
216
- * `409 quota_exceeded`, and mean only "the store is full". `size_bytes` is
217
- * the file's size: the announced one when the refusal came before the body
218
- * was read, or the bytes that arrived when no size (or a false one) was
219
- * announced and the body still fit the server's body limit. It is `null` only
220
- * when the body limit stopped the upload, because then nobody counted the
221
- * bytes.
222
- */
223
- export declare const fileTooLargeDetails: z.ZodObject<{
224
- max_bytes: z.ZodNumber;
225
- size_bytes: z.ZodNullable<z.ZodNumber>;
226
- }, z.core.$strip>;
227
- export type FileTooLargeDetails = z.infer<typeof fileTooLargeDetails>;
228
214
  /**
229
215
  * The `details` of a `502 payment_provider_unavailable` refusal (2026-10-04,
230
216
  * fleetless/fleetless#104): Mollie did not answer, or answered with an
package/dist/errors.js CHANGED
@@ -3,6 +3,7 @@ import { z } from 'zod';
3
3
  import { assetStoreRefusedDetails } from './assets.js';
4
4
  import { addonKey, planFeature, planId, planLimitKey } from './plans.js';
5
5
  import { bridgeCancelResultEntry } from './protocol.js';
6
+ export { fileTooLargeDetails } from './file-too-large-details.js';
6
7
  /**
7
8
  * The one error shape of the REST and realtime APIs: a stable
8
9
  * machine-readable code plus a human message; validation errors name the
@@ -135,25 +136,6 @@ export const orgLockedDetails = z.object({
135
136
  description: '`payment`: a payment is missing. `migration`: the org did not choose what stays when the beta ended.',
136
137
  }),
137
138
  });
138
- /**
139
- * The `details` of a `413 file_too_large` refusal (2026-10-03,
140
- * fleetless/fleetless#136): one file is larger than `ASSET_FILE_MAX_BYTES`.
141
- * Not a store and not a plan limit — those are `409 plan_limit` and
142
- * `409 quota_exceeded`, and mean only "the store is full". `size_bytes` is
143
- * the file's size: the announced one when the refusal came before the body
144
- * was read, or the bytes that arrived when no size (or a false one) was
145
- * announced and the body still fit the server's body limit. It is `null` only
146
- * when the body limit stopped the upload, because then nobody counted the
147
- * bytes.
148
- */
149
- export const fileTooLargeDetails = z.object({
150
- max_bytes: z.number().int().positive().meta({
151
- description: 'The most one asset file can be, in bytes: `ASSET_FILE_MAX_BYTES`, the same on every plan.',
152
- }),
153
- size_bytes: z.number().int().positive().nullable().meta({
154
- description: 'The refused file\'s size, in bytes: the announced size, or the bytes that arrived when none (or a false one) was announced; `null` only when the body limit stopped the upload and nobody counted the bytes.',
155
- }),
156
- });
157
139
  /**
158
140
  * The `details` of a `502 payment_provider_unavailable` refusal (2026-10-04,
159
141
  * fleetless/fleetless#104): Mollie did not answer, or answered with an
@@ -0,0 +1,18 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ import { z } from 'zod';
3
+ /**
4
+ * The `details` of a `413 file_too_large` refusal (2026-10-03,
5
+ * fleetless/fleetless#136): one file is larger than `ASSET_FILE_MAX_BYTES`.
6
+ * Not a store and not a plan limit — those are `409 plan_limit` and
7
+ * `409 quota_exceeded`, and mean only "the store is full". `size_bytes` is
8
+ * the file's size: the announced one when the refusal came before the body
9
+ * was read, or the bytes that arrived when no size (or a false one) was
10
+ * announced and the body still fit the server's body limit. It is `null` only
11
+ * when the body limit stopped the upload, because then nobody counted the
12
+ * bytes.
13
+ */
14
+ export declare const fileTooLargeDetails: z.ZodObject<{
15
+ max_bytes: z.ZodNumber;
16
+ size_bytes: z.ZodNullable<z.ZodNumber>;
17
+ }, z.core.$strip>;
18
+ export type FileTooLargeDetails = z.infer<typeof fileTooLargeDetails>;
@@ -0,0 +1,21 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ import { z } from 'zod';
3
+ /**
4
+ * The `details` of a `413 file_too_large` refusal (2026-10-03,
5
+ * fleetless/fleetless#136): one file is larger than `ASSET_FILE_MAX_BYTES`.
6
+ * Not a store and not a plan limit — those are `409 plan_limit` and
7
+ * `409 quota_exceeded`, and mean only "the store is full". `size_bytes` is
8
+ * the file's size: the announced one when the refusal came before the body
9
+ * was read, or the bytes that arrived when no size (or a false one) was
10
+ * announced and the body still fit the server's body limit. It is `null` only
11
+ * when the body limit stopped the upload, because then nobody counted the
12
+ * bytes.
13
+ */
14
+ export const fileTooLargeDetails = z.object({
15
+ max_bytes: z.number().int().positive().meta({
16
+ description: 'The most one asset file can be, in bytes: `ASSET_FILE_MAX_BYTES`, the same on every plan.',
17
+ }),
18
+ size_bytes: z.number().int().positive().nullable().meta({
19
+ description: 'The refused file\'s size, in bytes: the announced size, or the bytes that arrived when none (or a false one) was announced; `null` only when the body limit stopped the upload and nobody counted the bytes.',
20
+ }),
21
+ });
package/dist/jobs.js CHANGED
@@ -57,7 +57,7 @@ export const job = z.object({
57
57
  description: 'The action or service this job is running, as the published configuration exposes it. One slug carries one job at a time, so every observer of that slug sees the same one.',
58
58
  }),
59
59
  state: jobState.meta({
60
- description: 'Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge\'s next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final: the bridge stated it does not know the job and nothing else runs on its action, or the action server vanished mid-goal.',
60
+ description: 'Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge\'s next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final after an action server disappears before terminal status (`action_server_lost`), a later query confirms the bridge does not know the job and no active goal accounts for it (`job_unknown_to_bridge`), or a terminal goal status is observed but its result cannot be recovered within the bounded wait (`job_lost`). An unqualified bridge loss report also uses `job_lost`, with a message distinguishing it from terminal-result loss. Cloud cleanup may settle a superseded job or a deleted robot\'s job as `lost` without an error code. A reconnect or omission from `hello.active_jobs` alone is not final.',
61
61
  }),
62
62
  origin: jobOrigin.meta({
63
63
  description: "Who started this job. `fleetless` for everything minted by the cloud; `external` for a goal the bridge found active on a published action without having sent it — no parameters, no starter, never written to `job_runs`.",
@@ -263,7 +263,7 @@ export const jobRun = z.object({
263
263
  description: 'Whether the slug was an `action` or a `service`.',
264
264
  }),
265
265
  state: jobState.meta({
266
- description: 'How the run ended, or `running` while it is still going. `unknown` while the robot has not accounted for it — offline or silent — and updated once the bridge says how it stands. `lost` is final: the bridge did not know the run and nothing else ran on its action, so the outcome is unknowable rather than unknown.',
266
+ description: 'How the run ended, or `running` while it is still going. `unknown` while the robot has not accounted for it — offline or silent — and updated once the bridge says how it stands. `lost` is final after an action server disappears before terminal status (`action_server_lost`), a later query confirms the bridge does not know the job and no active goal accounts for it (`job_unknown_to_bridge`), or a terminal goal status is observed but its result cannot be recovered within the bounded wait (`job_lost`). An unqualified bridge loss report also uses `job_lost`, with a message distinguishing it from terminal-result loss. Cloud cleanup may settle a superseded run or a deleted robot\'s run as `lost` without an error code. A reconnect or omission from `hello.active_jobs` alone is not final.',
267
267
  }),
268
268
  started_at: z.iso.datetime().meta({
269
269
  description: 'When the run started, as an ISO 8601 timestamp. Runs are listed and filtered by this instant.',
@@ -778,8 +778,8 @@ export type BridgeJobUpdate = z.infer<typeof bridgeJobUpdate>;
778
778
  * **`error` is optional and, when present, applies to every job named in
779
779
  * `job_ids`.** A vanished action server is discovered once, by the bridge's
780
780
  * own liveness check on that one action, so a frame naming several jobs at
781
- * once always shares the same cause. Absent, the cloud settles the job
782
- * `lost` with no specific code.
781
+ * once always shares the same cause. Without `error`, the cloud settles each
782
+ * job `lost` with the generic `job_lost` error code; explicit causes are kept.
783
783
  */
784
784
  export declare const bridgeJobLost: z.ZodObject<{
785
785
  type: z.ZodLiteral<"job_lost">;
@@ -1073,6 +1073,10 @@ export declare const bridgeAssetProgress: z.ZodObject<{
1073
1073
  used_bytes: z.ZodNumber;
1074
1074
  size_bytes: z.ZodNumber;
1075
1075
  }, z.core.$strip>>>;
1076
+ file_limit: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1077
+ max_bytes: z.ZodNumber;
1078
+ size_bytes: z.ZodNullable<z.ZodNumber>;
1079
+ }, z.core.$strip>>>;
1076
1080
  }, z.core.$strip>>;
1077
1081
  state: z.ZodEnum<{
1078
1082
  running: "running";
package/dist/protocol.js CHANGED
@@ -605,8 +605,8 @@ export const bridgeJobUpdate = z.object({
605
605
  * **`error` is optional and, when present, applies to every job named in
606
606
  * `job_ids`.** A vanished action server is discovered once, by the bridge's
607
607
  * own liveness check on that one action, so a frame naming several jobs at
608
- * once always shares the same cause. Absent, the cloud settles the job
609
- * `lost` with no specific code.
608
+ * once always shares the same cause. Without `error`, the cloud settles each
609
+ * job `lost` with the generic `job_lost` error code; explicit causes are kept.
610
610
  */
611
611
  export const bridgeJobLost = z.object({
612
612
  type: z.literal('job_lost'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fleetless/contracts",
3
- "version": "11.0.0",
3
+ "version": "11.1.0-next.1",
4
4
  "description": "Fleetless wire contracts: the bridge-cloud protocol, the REST API schemas and the error codes, as zod schemas with generated JSON Schema and OpenAPI artifacts.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Dehne Robotik GmbH",