@fleetless/contracts 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (287) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/LICENSE +202 -0
  3. package/NOTICE +17 -0
  4. package/README.md +88 -0
  5. package/artifacts/constants.json +24 -0
  6. package/artifacts/openapi.json +17219 -0
  7. package/artifacts/routes.json +4605 -0
  8. package/artifacts/schema/accept-team-invite-request.schema.json +22 -0
  9. package/artifacts/schema/action-config.schema.json +198 -0
  10. package/artifacts/schema/alert-list-response.schema.json +172 -0
  11. package/artifacts/schema/api-error.schema.json +20 -0
  12. package/artifacts/schema/app-auth-config.schema.json +106 -0
  13. package/artifacts/schema/app-invitation-list-response.schema.json +57 -0
  14. package/artifacts/schema/app-invitation.schema.json +69 -0
  15. package/artifacts/schema/app-list-response.schema.json +82 -0
  16. package/artifacts/schema/app-mail-template-list-response.schema.json +68 -0
  17. package/artifacts/schema/app-mail-template.schema.json +54 -0
  18. package/artifacts/schema/app-oidc-provider-list-response.schema.json +93 -0
  19. package/artifacts/schema/app-oidc-provider.schema.json +80 -0
  20. package/artifacts/schema/app-user-list-response.schema.json +111 -0
  21. package/artifacts/schema/app-user.schema.json +98 -0
  22. package/artifacts/schema/app.schema.json +69 -0
  23. package/artifacts/schema/apply-error.schema.json +41 -0
  24. package/artifacts/schema/asset-list-response.schema.json +288 -0
  25. package/artifacts/schema/asset-sync-request.schema.json +17 -0
  26. package/artifacts/schema/asset-sync-response.schema.json +16 -0
  27. package/artifacts/schema/asset-sync-status.schema.json +136 -0
  28. package/artifacts/schema/asset.schema.json +68 -0
  29. package/artifacts/schema/audit-actor.schema.json +32 -0
  30. package/artifacts/schema/audit-event.schema.json +119 -0
  31. package/artifacts/schema/audit-list-response.schema.json +144 -0
  32. package/artifacts/schema/audit-query.schema.json +79 -0
  33. package/artifacts/schema/auth-error.schema.json +23 -0
  34. package/artifacts/schema/auth-me-response.schema.json +99 -0
  35. package/artifacts/schema/auth-ok.schema.json +115 -0
  36. package/artifacts/schema/authorization-server-metadata.schema.json +80 -0
  37. package/artifacts/schema/bridge-asset-progress.schema.json +99 -0
  38. package/artifacts/schema/bridge-assets-available.schema.json +25 -0
  39. package/artifacts/schema/bridge-camera-state.schema.json +78 -0
  40. package/artifacts/schema/bridge-config-applied.schema.json +67 -0
  41. package/artifacts/schema/bridge-hello.schema.json +65 -0
  42. package/artifacts/schema/bridge-introspect.schema.json +114 -0
  43. package/artifacts/schema/bridge-job-lost.schema.json +22 -0
  44. package/artifacts/schema/bridge-job-update.schema.json +100 -0
  45. package/artifacts/schema/bridge-pong.schema.json +19 -0
  46. package/artifacts/schema/bridge-pressure.schema.json +292 -0
  47. package/artifacts/schema/bridge-state.schema.json +24 -0
  48. package/artifacts/schema/bridge-type-definitions.schema.json +169 -0
  49. package/artifacts/schema/busy-details.schema.json +115 -0
  50. package/artifacts/schema/camera-descriptor.schema.json +45 -0
  51. package/artifacts/schema/camera-list-response.schema.json +58 -0
  52. package/artifacts/schema/camera-source.schema.json +240 -0
  53. package/artifacts/schema/cancel-request.schema.json +20 -0
  54. package/artifacts/schema/client-accept-invitation-request.schema.json +35 -0
  55. package/artifacts/schema/client-auth.schema.json +18 -0
  56. package/artifacts/schema/client-cancel.schema.json +45 -0
  57. package/artifacts/schema/client-identity.schema.json +103 -0
  58. package/artifacts/schema/client-invoke.schema.json +45 -0
  59. package/artifacts/schema/client-login-request.schema.json +29 -0
  60. package/artifacts/schema/client-logout-request.schema.json +14 -0
  61. package/artifacts/schema/client-mcp-interaction-decision-response.schema.json +15 -0
  62. package/artifacts/schema/client-mcp-interaction.schema.json +59 -0
  63. package/artifacts/schema/client-oidc-callback-query.schema.json +28 -0
  64. package/artifacts/schema/client-oidc-exchange-request.schema.json +21 -0
  65. package/artifacts/schema/client-oidc-start-query.schema.json +36 -0
  66. package/artifacts/schema/client-password-reset-confirm-request.schema.json +22 -0
  67. package/artifacts/schema/client-password-reset-request.schema.json +24 -0
  68. package/artifacts/schema/client-provider-list-query.schema.json +17 -0
  69. package/artifacts/schema/client-provider-list-response.schema.json +34 -0
  70. package/artifacts/schema/client-publish.schema.json +40 -0
  71. package/artifacts/schema/client-refresh-request.schema.json +14 -0
  72. package/artifacts/schema/client-register-request.schema.json +44 -0
  73. package/artifacts/schema/client-resend-verification-request.schema.json +24 -0
  74. package/artifacts/schema/client-subscribe.schema.json +43 -0
  75. package/artifacts/schema/client-unsubscribe.schema.json +26 -0
  76. package/artifacts/schema/client-verify-email-request.schema.json +15 -0
  77. package/artifacts/schema/cloud-asset-request.schema.json +37 -0
  78. package/artifacts/schema/cloud-camera-start.schema.json +41 -0
  79. package/artifacts/schema/cloud-camera-stop.schema.json +26 -0
  80. package/artifacts/schema/cloud-cancel.schema.json +33 -0
  81. package/artifacts/schema/cloud-config.schema.json +1635 -0
  82. package/artifacts/schema/cloud-hello-error.schema.json +23 -0
  83. package/artifacts/schema/cloud-hello-ok.schema.json +19 -0
  84. package/artifacts/schema/cloud-introspect-request.schema.json +19 -0
  85. package/artifacts/schema/cloud-invoke.schema.json +40 -0
  86. package/artifacts/schema/cloud-ping.schema.json +19 -0
  87. package/artifacts/schema/cloud-publish.schema.json +28 -0
  88. package/artifacts/schema/cloud-type-request.schema.json +30 -0
  89. package/artifacts/schema/command-result.schema.json +175 -0
  90. package/artifacts/schema/config-draft-response.schema.json +1695 -0
  91. package/artifacts/schema/config-state.schema.json +124 -0
  92. package/artifacts/schema/config-version-response.schema.json +1641 -0
  93. package/artifacts/schema/config-versions-response.schema.json +33 -0
  94. package/artifacts/schema/create-app-invitation-request.schema.json +40 -0
  95. package/artifacts/schema/create-app-oidc-provider-request.schema.json +70 -0
  96. package/artifacts/schema/create-app-request.schema.json +30 -0
  97. package/artifacts/schema/create-app-user-request.schema.json +42 -0
  98. package/artifacts/schema/create-robot-request.schema.json +14 -0
  99. package/artifacts/schema/create-robot-response.schema.json +44 -0
  100. package/artifacts/schema/create-server-key-response.schema.json +65 -0
  101. package/artifacts/schema/create-team-invite-request.schema.json +43 -0
  102. package/artifacts/schema/datapoint-alert-row.schema.json +160 -0
  103. package/artifacts/schema/datapoint-config.schema.json +366 -0
  104. package/artifacts/schema/datapoint-display.schema.json +31 -0
  105. package/artifacts/schema/datapoint-event.schema.json +34 -0
  106. package/artifacts/schema/datapoint-frame.schema.json +28 -0
  107. package/artifacts/schema/datapoint-list-response.schema.json +61 -0
  108. package/artifacts/schema/datapoint-value.schema.json +28 -0
  109. package/artifacts/schema/developer-login-request.schema.json +19 -0
  110. package/artifacts/schema/dynamic-client-registration-request.schema.json +60 -0
  111. package/artifacts/schema/dynamic-client-registration-response.schema.json +68 -0
  112. package/artifacts/schema/error-frame.schema.json +23 -0
  113. package/artifacts/schema/exposure-counts.schema.json +39 -0
  114. package/artifacts/schema/exposure-list-response.schema.json +43 -0
  115. package/artifacts/schema/fetch-types-request.schema.json +19 -0
  116. package/artifacts/schema/fetch-types-response.schema.json +163 -0
  117. package/artifacts/schema/fleetless-user-list-response.schema.json +73 -0
  118. package/artifacts/schema/fleetless-user.schema.json +60 -0
  119. package/artifacts/schema/history-buckets-response.schema.json +79 -0
  120. package/artifacts/schema/history-query.schema.json +58 -0
  121. package/artifacts/schema/history-response.schema.json +150 -0
  122. package/artifacts/schema/history-samples-response.schema.json +68 -0
  123. package/artifacts/schema/introspection-response.schema.json +118 -0
  124. package/artifacts/schema/invoke-or-service-response.schema.json +141 -0
  125. package/artifacts/schema/invoke-request.schema.json +23 -0
  126. package/artifacts/schema/invoke-response.schema.json +125 -0
  127. package/artifacts/schema/job-actor.schema.json +34 -0
  128. package/artifacts/schema/job-event.schema.json +158 -0
  129. package/artifacts/schema/job-response.schema.json +123 -0
  130. package/artifacts/schema/job-run-list-response.schema.json +222 -0
  131. package/artifacts/schema/job-run-query.schema.json +95 -0
  132. package/artifacts/schema/job-run-summary-query.schema.json +23 -0
  133. package/artifacts/schema/job-run-summary.schema.json +33 -0
  134. package/artifacts/schema/job-run.schema.json +195 -0
  135. package/artifacts/schema/job-state.schema.json +11 -0
  136. package/artifacts/schema/job.schema.json +106 -0
  137. package/artifacts/schema/latency-bucket.schema.json +63 -0
  138. package/artifacts/schema/live-session-response.schema.json +41 -0
  139. package/artifacts/schema/mail-outcome.schema.json +20 -0
  140. package/artifacts/schema/mail-template-preview-request.schema.json +35 -0
  141. package/artifacts/schema/mail-template-preview-response.schema.json +31 -0
  142. package/artifacts/schema/mail-template-problem-details.schema.json +24 -0
  143. package/artifacts/schema/mcp-consent-grant-list-response.schema.json +52 -0
  144. package/artifacts/schema/mcp-consent-grant.schema.json +39 -0
  145. package/artifacts/schema/mcp-robot-datasheet.schema.json +115 -0
  146. package/artifacts/schema/mcp-role-preview-response.schema.json +134 -0
  147. package/artifacts/schema/missing-asset-query.schema.json +11 -0
  148. package/artifacts/schema/oauth-authorize-query.schema.json +47 -0
  149. package/artifacts/schema/oauth-redirect-response.schema.json +15 -0
  150. package/artifacts/schema/oauth-token-request.schema.json +47 -0
  151. package/artifacts/schema/oauth-token-response.schema.json +38 -0
  152. package/artifacts/schema/org-alerts-query.schema.json +15 -0
  153. package/artifacts/schema/org-event-dropped.schema.json +26 -0
  154. package/artifacts/schema/org-event-replay.schema.json +97 -0
  155. package/artifacts/schema/org-event-subscribe.schema.json +14 -0
  156. package/artifacts/schema/org-event-unsubscribe.schema.json +14 -0
  157. package/artifacts/schema/org-event.schema.json +75 -0
  158. package/artifacts/schema/org-firing-alerts-response.schema.json +178 -0
  159. package/artifacts/schema/org-health-query.schema.json +13 -0
  160. package/artifacts/schema/org-latency-query.schema.json +42 -0
  161. package/artifacts/schema/org-latency-response.schema.json +124 -0
  162. package/artifacts/schema/org-quota-usage-counts.schema.json +42 -0
  163. package/artifacts/schema/org-quota-usage.schema.json +102 -0
  164. package/artifacts/schema/org-quotas.schema.json +51 -0
  165. package/artifacts/schema/org-usage-query.schema.json +19 -0
  166. package/artifacts/schema/org-usage-response.schema.json +77 -0
  167. package/artifacts/schema/org.schema.json +30 -0
  168. package/artifacts/schema/parameter-invalid-details.schema.json +37 -0
  169. package/artifacts/schema/parameter-spec.schema.json +120 -0
  170. package/artifacts/schema/parameter-violation.schema.json +24 -0
  171. package/artifacts/schema/password-change-request.schema.json +21 -0
  172. package/artifacts/schema/password-reset-confirm.schema.json +19 -0
  173. package/artifacts/schema/password-reset-request.schema.json +14 -0
  174. package/artifacts/schema/patch-app-oidc-provider-request.schema.json +50 -0
  175. package/artifacts/schema/patch-app-user-request.schema.json +34 -0
  176. package/artifacts/schema/patch-auth-me-request.schema.json +22 -0
  177. package/artifacts/schema/patch-fleetless-user-request.schema.json +20 -0
  178. package/artifacts/schema/patch-org-request.schema.json +15 -0
  179. package/artifacts/schema/patch-org-response.schema.json +40 -0
  180. package/artifacts/schema/patch-robot-request.schema.json +15 -0
  181. package/artifacts/schema/patch-robot-response.schema.json +40 -0
  182. package/artifacts/schema/pending-team-invite-list-response.schema.json +52 -0
  183. package/artifacts/schema/pending-team-invite.schema.json +39 -0
  184. package/artifacts/schema/protected-resource-metadata.schema.json +41 -0
  185. package/artifacts/schema/publish-config-response.schema.json +21 -0
  186. package/artifacts/schema/publish-request.schema.json +17 -0
  187. package/artifacts/schema/publisher-config.schema.json +285 -0
  188. package/artifacts/schema/put-app-auth-config-request.schema.json +93 -0
  189. package/artifacts/schema/put-app-mail-template-request.schema.json +35 -0
  190. package/artifacts/schema/put-config-draft-request.schema.json +13 -0
  191. package/artifacts/schema/put-datapoint-display-request.schema.json +31 -0
  192. package/artifacts/schema/put-robot-details-request.schema.json +41 -0
  193. package/artifacts/schema/put-robot-details-response.schema.json +43 -0
  194. package/artifacts/schema/rate-limit-details.schema.json +15 -0
  195. package/artifacts/schema/refresh-request.schema.json +13 -0
  196. package/artifacts/schema/release-live-query.schema.json +13 -0
  197. package/artifacts/schema/rename-slug-request.schema.json +23 -0
  198. package/artifacts/schema/rename-slug-response.schema.json +24 -0
  199. package/artifacts/schema/resource-health-event.schema.json +72 -0
  200. package/artifacts/schema/resource-health-list-response.schema.json +80 -0
  201. package/artifacts/schema/resource-health-state.schema.json +68 -0
  202. package/artifacts/schema/robot-config-doc.schema.json +1616 -0
  203. package/artifacts/schema/robot-delete-query.schema.json +12 -0
  204. package/artifacts/schema/robot-deletion-summary.schema.json +63 -0
  205. package/artifacts/schema/robot-detail-response.schema.json +262 -0
  206. package/artifacts/schema/robot-details-doc.schema.json +33 -0
  207. package/artifacts/schema/robot-jobs-response.schema.json +119 -0
  208. package/artifacts/schema/robot-latency-series.schema.json +81 -0
  209. package/artifacts/schema/robot-list-item.schema.json +94 -0
  210. package/artifacts/schema/robot-list-response.schema.json +106 -0
  211. package/artifacts/schema/robot.schema.json +30 -0
  212. package/artifacts/schema/role-list-response.schema.json +48 -0
  213. package/artifacts/schema/role-permissions.schema.json +61 -0
  214. package/artifacts/schema/role.schema.json +35 -0
  215. package/artifacts/schema/ros-graph.schema.json +99 -0
  216. package/artifacts/schema/server-key-list-response.schema.json +64 -0
  217. package/artifacts/schema/server-key.schema.json +51 -0
  218. package/artifacts/schema/service-call-response.schema.json +13 -0
  219. package/artifacts/schema/service-config.schema.json +198 -0
  220. package/artifacts/schema/session-tokens.schema.json +28 -0
  221. package/artifacts/schema/sign-up-request.schema.json +26 -0
  222. package/artifacts/schema/sign-up-response.schema.json +127 -0
  223. package/artifacts/schema/slug-usage-response.schema.json +32 -0
  224. package/artifacts/schema/snapshot-header.schema.json +44 -0
  225. package/artifacts/schema/snapshot-meta-response.schema.json +85 -0
  226. package/artifacts/schema/subscribe-error.schema.json +31 -0
  227. package/artifacts/schema/team-invite.schema.json +57 -0
  228. package/artifacts/schema/tier-change-request.schema.json +17 -0
  229. package/artifacts/schema/type-definition.schema.json +144 -0
  230. package/artifacts/schema/types-response.schema.json +156 -0
  231. package/artifacts/schema/update-app-request.schema.json +32 -0
  232. package/artifacts/schema/urdf-completeness.schema.json +50 -0
  233. package/artifacts/schema/validation-issue.schema.json +43 -0
  234. package/artifacts/schema/waitlist-request.schema.json +15 -0
  235. package/artifacts/schema-outgoing/bridge-asset-progress.schema.json +102 -0
  236. package/artifacts/schema-outgoing/bridge-assets-available.schema.json +26 -0
  237. package/artifacts/schema-outgoing/bridge-camera-state.schema.json +80 -0
  238. package/artifacts/schema-outgoing/bridge-config-applied.schema.json +69 -0
  239. package/artifacts/schema-outgoing/bridge-hello.schema.json +68 -0
  240. package/artifacts/schema-outgoing/bridge-introspect.schema.json +119 -0
  241. package/artifacts/schema-outgoing/bridge-job-lost.schema.json +23 -0
  242. package/artifacts/schema-outgoing/bridge-job-update.schema.json +102 -0
  243. package/artifacts/schema-outgoing/bridge-pong.schema.json +20 -0
  244. package/artifacts/schema-outgoing/bridge-type-definitions.schema.json +174 -0
  245. package/artifacts/schema-outgoing/datapoint-frame.schema.json +29 -0
  246. package/artifacts/schema-outgoing/snapshot-header.schema.json +45 -0
  247. package/dist/alerts.d.ts +255 -0
  248. package/dist/alerts.js +193 -0
  249. package/dist/app-users.d.ts +606 -0
  250. package/dist/app-users.js +696 -0
  251. package/dist/apps.d.ts +175 -0
  252. package/dist/apps.js +267 -0
  253. package/dist/assets.d.ts +434 -0
  254. package/dist/assets.js +546 -0
  255. package/dist/audit.d.ts +129 -0
  256. package/dist/audit.js +238 -0
  257. package/dist/client-auth.d.ts +409 -0
  258. package/dist/client-auth.js +487 -0
  259. package/dist/common.d.ts +186 -0
  260. package/dist/common.js +199 -0
  261. package/dist/config-issues.d.ts +175 -0
  262. package/dist/config-issues.js +339 -0
  263. package/dist/config.d.ts +862 -0
  264. package/dist/config.js +1988 -0
  265. package/dist/errors.d.ts +52 -0
  266. package/dist/errors.js +786 -0
  267. package/dist/identity.d.ts +549 -0
  268. package/dist/identity.js +503 -0
  269. package/dist/index.d.ts +51 -0
  270. package/dist/index.js +51 -0
  271. package/dist/introspection.d.ts +99 -0
  272. package/dist/introspection.js +97 -0
  273. package/dist/jobs.d.ts +334 -0
  274. package/dist/jobs.js +345 -0
  275. package/dist/mcp.d.ts +239 -0
  276. package/dist/mcp.js +153 -0
  277. package/dist/oauth.d.ts +344 -0
  278. package/dist/oauth.js +488 -0
  279. package/dist/protocol.d.ts +781 -0
  280. package/dist/protocol.js +715 -0
  281. package/dist/realtime.d.ts +494 -0
  282. package/dist/realtime.js +512 -0
  283. package/dist/rest.d.ts +1989 -0
  284. package/dist/rest.js +1963 -0
  285. package/dist/routes.d.ts +94 -0
  286. package/dist/routes.js +2298 -0
  287. package/package.json +61 -0
@@ -0,0 +1,434 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * The asset store (spec §4.6, W7).
4
+ *
5
+ * An **asset is an immutable file belonging to a robot**. It has a uuid and is
6
+ * fetched by it. There are no org-level assets and no public retrieval: every
7
+ * read is authenticated and role-checked (`assets`, §3.3).
8
+ *
9
+ * **One authorization model — the `Authorization` header.** Not a signed URL,
10
+ * not a cookie, not a token in a query string. The reason is not ergonomics
11
+ * but the number of mechanisms: a second credential would carry its own
12
+ * lifetime, its own renewal, its own rotation, and in every log the question
13
+ * of which token that was. Directus solves the same problem with a cookie and
14
+ * an `access_token` query parameter, and the cookie half does not transfer —
15
+ * Fleetless has no interface of its own (§1), so the consumers of a robot's
16
+ * assets sit on other origins.
17
+ *
18
+ * **The consequence, said out loud: this is not a CDN.** A shared cache must
19
+ * not store a response to a request carrying `Authorization`. Assets are
20
+ * immutable, so `Cache-Control: private, immutable` is correct and the
21
+ * browser's own cache works fully; nothing edge-caches. Calling it a CDN would
22
+ * promise something that does not happen. Signed URLs stay **additive** later —
23
+ * a second endpoint, not a migration — precisely because assets are immutable
24
+ * and uuid-addressed.
25
+ *
26
+ * ---
27
+ *
28
+ * **`texture` is its own member of `assetKind` and not `other` (W7a, D2).**
29
+ *
30
+ * Filing textures under `other` would be the catch-all this project has
31
+ * already split five times, and it costs a real capability: a client that
32
+ * renders a robot must know, from the asset list alone and before fetching
33
+ * anything, which bytes it has to pre-fetch. Every load in the browser goes
34
+ * through the SDK with the bearer token — there is no lazy second fetch a
35
+ * renderer can make on its own account — so "what must be in memory before
36
+ * anything renders" is a question the list has to be able to answer.
37
+ *
38
+ * A `texture` is an image referenced by the URDF's own `<material><texture>`
39
+ * **or** by a mesh file internally (a `.dae`'s `<init_from>`). Both are
40
+ * surfaces; neither is geometry; both must be resolvable by name.
41
+ */
42
+ export declare const assetKind: z.ZodEnum<{
43
+ urdf: "urdf";
44
+ mesh: "mesh";
45
+ texture: "texture";
46
+ other: "other";
47
+ }>;
48
+ export type AssetKind = z.infer<typeof assetKind>;
49
+ /**
50
+ * The `name` a URDF asset carries.
51
+ *
52
+ * A mesh names itself — its `package://` URI is the only string anyone can
53
+ * match against a workspace. A URDF has no such natural name, so producers
54
+ * agree on one: `robot_description`, after the topic it comes from.
55
+ *
56
+ * **Its job changed once the store stopped overwriting it.** It was pinned
57
+ * because the bridge and the cloud had settled on a value in conversation, and
58
+ * conversations drift — then the gate found the cloud renaming every URDF to
59
+ * `robot.urdf` regardless of what arrived, so the pinned value was decorative
60
+ * and the contract looked authoritative while being ignored. The store now
61
+ * keeps `asset.name` verbatim, which is what `asset.name`'s own comment
62
+ * already promised.
63
+ *
64
+ * So this is now a **convention among producers**, not an agreement the store
65
+ * enforces: it exists so two different bridges do not name the same thing two
66
+ * ways and leave a developer looking at an inconsistent fleet. Nothing
67
+ * validates it, and that is deliberate — the store's job is to record what it
68
+ * was told.
69
+ *
70
+ * Consumers must not match on it. `kind === 'urdf'` is the reliable test; the
71
+ * cloud identifies a robot's URDF row by kind alone, so a producer that sends
72
+ * a different string updates the same singleton rather than orphaning a second.
73
+ */
74
+ export declare const URDF_ASSET_NAME = "robot_description";
75
+ export declare const asset: z.ZodObject<{
76
+ id: z.ZodUUID;
77
+ robot_id: z.ZodUUID;
78
+ kind: z.ZodEnum<{
79
+ urdf: "urdf";
80
+ mesh: "mesh";
81
+ texture: "texture";
82
+ other: "other";
83
+ }>;
84
+ name: z.ZodString;
85
+ media_type: z.ZodString;
86
+ size_bytes: z.ZodNumber;
87
+ sha256: z.ZodString;
88
+ created_at: z.ZodISODateTime;
89
+ }, z.core.$strip>;
90
+ export type Asset = z.infer<typeof asset>;
91
+ /**
92
+ * Whether a URDF can actually be rendered, which is not the same as whether it
93
+ * was uploaded.
94
+ *
95
+ * `missing` carries **the reference, verbatim, that no asset answers** — for
96
+ * a `package://` mesh the URI the bridge could not resolve in the workspace,
97
+ * and since W7's security fix also the absolute paths and bare relative paths
98
+ * a URDF may carry, which the extractor sees and the sync deliberately never
99
+ * offers. The sentence used to say "the `package://` URIs" and the field
100
+ * carried three kinds of string (Momus-W7); it is widened here rather than
101
+ * narrowed, because a developer whose URDF names `/opt/meshes/arm.stl` is
102
+ * entitled to be told that nothing will ever fetch it.
103
+ *
104
+ * The spec's example is "2 Meshes fehlen" and that number alone is a dead
105
+ * end: it tells a developer to go looking through a workspace by hand. The
106
+ * references are what they can act on, so the references travel.
107
+ *
108
+ * **Every entry must be actionable, and that is a constraint on the
109
+ * producers, not on this field (W7a).** An entry a developer cannot make
110
+ * disappear by fixing what it names is a defect in whoever put it there: for
111
+ * a whole wave `<texture>` references were listed here and no sync would ever
112
+ * offer them, so the honest instruction behind the list was "fix this, it
113
+ * will not help".
114
+ */
115
+ export declare const urdfCompleteness: z.ZodObject<{
116
+ present: z.ZodBoolean;
117
+ mesh_count: z.ZodNumber;
118
+ missing: z.ZodArray<z.ZodObject<{
119
+ uri: z.ZodString;
120
+ element: z.ZodEnum<{
121
+ mesh: "mesh";
122
+ texture: "texture";
123
+ }>;
124
+ }, z.core.$strip>>;
125
+ }, z.core.$strip>;
126
+ export type UrdfCompleteness = z.infer<typeof urdfCompleteness>;
127
+ /**
128
+ * A sync is long-running and is therefore answered with something to watch,
129
+ * never with a status that was true at the moment of asking.
130
+ *
131
+ * **`source` has one value, and that is deliberate.** §4.6 also names a manual
132
+ * zip upload, and the first version of this shape had `'upload'` in the enum —
133
+ * with **no body defined for the bytes**. An enum value with no producer and
134
+ * no payload invites every consumer to guess a shape, and each guesses
135
+ * differently; that is a defect this project has deliberately refused to
136
+ * introduce before, when an error code was proposed whose payload had moved.
137
+ * The zip path stays a condition rather than sitting in the wire as a
138
+ * promise.
139
+ *
140
+ * A single-member enum rather than dropping the field: the second source is a
141
+ * question of when, not whether, and a caller that already names its source
142
+ * does not change shape when the second one arrives.
143
+ *
144
+ * Caught by Eve-W7 asking what body `'upload'` takes, rather than building
145
+ * against a guess.
146
+ */
147
+ export declare const assetSyncRequest: z.ZodObject<{
148
+ source: z.ZodEnum<{
149
+ bridge: "bridge";
150
+ }>;
151
+ }, z.core.$strict>;
152
+ /**
153
+ * **And the route must read it (W7a).** Through W7 it did not: `{source:
154
+ * 'bridge'}`, `{source:'upload'}`, `{nonsense:1}` and `{}` all behaved
155
+ * identically, so the argument above — that a caller naming its source does
156
+ * not change shape when the second one arrives — was true of the document and
157
+ * false of the system. A shape with no consumer is not a contract; it is a
158
+ * comment with a type.
159
+ *
160
+ * The decision is to keep the shape and **validate it, `.strict()`**, rather
161
+ * than delete it. Deleting removes the record of why the enum has one member,
162
+ * and the zip path is a question of when. Validation is what makes the single
163
+ * member mean something: a caller who sends `'upload'` today learns that it
164
+ * does not exist yet, instead of silently getting a bridge sync.
165
+ */
166
+ export type AssetSyncRequest = z.infer<typeof assetSyncRequest>;
167
+ export declare const assetSyncResponse: z.ZodObject<{
168
+ sync_id: z.ZodUUID;
169
+ }, z.core.$strip>;
170
+ export type AssetSyncResponse = z.infer<typeof assetSyncResponse>;
171
+ /**
172
+ * Progress of one sync.
173
+ *
174
+ * `failed` names the URIs that could not be resolved, and it is required
175
+ * rather than optional: a sync that drops three meshes and reports success is
176
+ * worse than one that fails outright, because the failure surfaces later, in a
177
+ * renderer, as a robot with missing limbs and no explanation.
178
+ *
179
+ * **`failed` carries per-reference facts and `reason` carries the sync's own,
180
+ * and that split is what M7 bought.** Three different kinds of string used to
181
+ * reach `failed`: unresolvable `package://` URIs (the documented meaning), the
182
+ * literal `robot_description` when a URDF *upload* failed, and English
183
+ * sentences written by the cloud — "the robot disconnected mid-sync". The
184
+ * console printed the array under *"these meshes could not be resolved"*, so a
185
+ * developer whose robot dropped was told to go find a mesh named *the robot
186
+ * disconnected mid-sync* (Momus-W7, M7).
187
+ *
188
+ * **Two of those three were defects and the third was not, which this
189
+ * paragraph used to get wrong** (Argus-W7a, W7a review, reading the file top to
190
+ * bottom). The cloud's English sentences do not belong here — that is what
191
+ * `reason` is for. But `robot_description` is a **legitimate** entry: the URDF
192
+ * is an asset that can fail to upload like any other, and W7a made that
193
+ * explicit rather than removing it — see `assetFailure.reference`, which says
194
+ * in as many words that not every entry is a mesh URI and a consumer must not
195
+ * assume one. Read together with the old sentence *"`failed` is URIs and
196
+ * nothing else"*, this file told a consumer the same value was both a defect
197
+ * and a documented case.
198
+ *
199
+ * So the rule is: **anything that is not about one specific reference goes in
200
+ * `reason`** — one human-readable sentence
201
+ * about why the sync ended as it did, `null` when the outcome speaks for
202
+ * itself. It also carries the distinction `bridgeAssetProgress.state` makes
203
+ * and this shape could not — a sync **refused** because another was in flight
204
+ * is not a sync that tried and failed.
205
+ *
206
+ * **`assetSyncState` was deliberately not widened to carry that.** Consumers
207
+ * switch on it, a new member silently changes what every existing switch
208
+ * covers, and "refused" is a *reason* for a terminal outcome rather than a
209
+ * different one. Adding a field is additive; adding an enum member is not.
210
+ */
211
+ /**
212
+ * **Der Deckel, den beide Seiten kennen müssen (W9b).**
213
+ *
214
+ * Bis hierher hatte die Bridge eine eigene Zahl und die Cloud eine eigene, und
215
+ * die Registerzeile dazu nannte die der Bridge beim Namen: *„a guess … chosen
216
+ * as a starting number with no measurement behind it"* (DEF-127). Eine Grenze,
217
+ * die der Sender rät und der Empfänger durchsetzt, ist keine Grenze — sie ist
218
+ * zwei Zahlen, die zufällig übereinstimmen, bis eine von beiden sich ändert.
219
+ *
220
+ * Hier steht sie einmal. Die Bridge liest sie, **bevor** sie eine Datei in den
221
+ * Speicher liest; die Cloud setzt sie durch. Ohne das kann die Bridge gar nicht
222
+ * ablehnen, ohne 194 MB zu puffern — was am 2026-08-18 auf rx1 genau so passiert
223
+ * ist (DEF-148).
224
+ *
225
+ * **Sie gilt je Datei, nicht je Sync**, und das steht hier, weil DEF-127 es
226
+ * ausdrücklich verlangt hat: acht Meshes zu je 30 MiB passen durch, eine Datei
227
+ * zu 65 MiB nicht. Wer sie für eine Obergrenze der Übertragung hält, rechnet
228
+ * mit einer Schranke, die es nicht gibt — die Summe eines Syncs bindet das
229
+ * Speicherkontingent der Organisation, und das ist eine andere Zahl an einer
230
+ * anderen Stelle.
231
+ *
232
+ * **Die Zahl ist bewusst unverändert, und die Begründung hat zwei Fassungen
233
+ * gebraucht — die Korrektur ist hier mehr wert als das Ergebnis.**
234
+ *
235
+ * Zuerst stand hier: *„rx1s echte Meshes sind gemessen — `base.dae`
236
+ * 193.886.766 Bytes, also das 2,9-fache"*, im Präsens, als stünde das über
237
+ * der heute laufenden Beschreibung. Gemessen am 2026-08-19 gegen die
238
+ * **laufende** `robot_description`: acht `package://`-Referenzen, zusammen
239
+ * 89.379.096 Bytes, die größte `RX1.dae` mit 38.229.621 — **keine über dem
240
+ * Deckel.**
241
+ *
242
+ * Daraus habe ich dann geschlossen, `base.dae` werde *von keiner* rx1-URDF
243
+ * referenziert. **Auch das war falsch, und zwar weil ich nur den aktuellen
244
+ * Workspace geprüft hatte.** `src.old-20260730/rx1` und `.../rx1_linac`
245
+ * referenzieren beide `base.dae` **und** `base.stl` und kennen `RX1.dae`
246
+ * nicht — das ist die Beschreibung, die rx1 am 2026-08-18 lief, als DEF-148
247
+ * gemessen wurde. Die Beobachtung von damals war korrekt und ihre Erklärung
248
+ * auch.
249
+ *
250
+ * Was heute gilt: **welche Beschreibung rx1 fährt, entscheidet, ob der Deckel
251
+ * reicht** — die aktuelle passt mit Abstand hinein, die vorherige um das
252
+ * 2,9-fache nicht. Das ist keine Vertragsfrage, sondern eine über Speicher,
253
+ * Übertragungszeit und Kontingente, und sie liegt bei André. Sie blockiert
254
+ * nichts: W9bs Gate-Schritt 6 ist gegen die heute laufende Beschreibung
255
+ * erreichbar, ohne dass jemand eine Zahl anfasst.
256
+ */
257
+ export declare const ASSET_UPLOAD_MAX_BYTES: number;
258
+ export declare const assetTooLargeDetails: z.ZodObject<{
259
+ limit_bytes: z.ZodNumber;
260
+ size_bytes: z.ZodNumber;
261
+ }, z.core.$strip>;
262
+ export type AssetTooLargeDetails = z.infer<typeof assetTooLargeDetails>;
263
+ /**
264
+ * Why one reference did not make it into the store.
265
+ *
266
+ * Three kinds because three things were already happening and only one word
267
+ * was available for them:
268
+ *
269
+ * - **`unresolvable`** — the reference names nothing the producer can find, or
270
+ * nothing it is allowed to read (a `package://` URI absent from the
271
+ * workspace, an absolute path, a `.dae`-internal reference escaping its own
272
+ * package). **Permanent.** No retry changes it, and it is the only kind a
273
+ * reconciliation may treat as gone.
274
+ * - **`upload_failed`** — the bytes exist and the transfer did not succeed.
275
+ * **Transient.** The asset is still wanted; a later sync will carry it.
276
+ * - **`refused`** — never attempted, because a producer-side ceiling was hit
277
+ * (R9: a `.dae` with more internal references than one file or one sync will
278
+ * report). **Transient in the same sense**: nothing is known to be missing,
279
+ * only unexamined.
280
+ *
281
+ * A consumer that cannot act on the distinction may still print `reference`
282
+ * alone and lose nothing it had before.
283
+ */
284
+ export declare const assetFailureKind: z.ZodEnum<{
285
+ unresolvable: "unresolvable";
286
+ upload_failed: "upload_failed";
287
+ refused: "refused";
288
+ too_large: "too_large";
289
+ }>;
290
+ export type AssetFailureKind = z.infer<typeof assetFailureKind>;
291
+ export declare const assetFailure: z.ZodObject<{
292
+ reference: z.ZodString;
293
+ kind: z.ZodEnum<{
294
+ unresolvable: "unresolvable";
295
+ upload_failed: "upload_failed";
296
+ refused: "refused";
297
+ too_large: "too_large";
298
+ }>;
299
+ details: z.ZodOptional<z.ZodNullable<z.ZodObject<{
300
+ limit_bytes: z.ZodNumber;
301
+ size_bytes: z.ZodNumber;
302
+ }, z.core.$strip>>>;
303
+ }, z.core.$strip>;
304
+ export type AssetFailure = z.infer<typeof assetFailure>;
305
+ export declare const assetSyncState: z.ZodEnum<{
306
+ failed: "failed";
307
+ running: "running";
308
+ succeeded: "succeeded";
309
+ }>;
310
+ export type AssetSyncState = z.infer<typeof assetSyncState>;
311
+ export declare const assetSyncStatus: z.ZodObject<{
312
+ sync_id: z.ZodUUID;
313
+ robot_id: z.ZodUUID;
314
+ state: z.ZodEnum<{
315
+ failed: "failed";
316
+ running: "running";
317
+ succeeded: "succeeded";
318
+ }>;
319
+ done: z.ZodNumber;
320
+ total: z.ZodNumber;
321
+ failed: z.ZodArray<z.ZodObject<{
322
+ reference: z.ZodString;
323
+ kind: z.ZodEnum<{
324
+ unresolvable: "unresolvable";
325
+ upload_failed: "upload_failed";
326
+ refused: "refused";
327
+ too_large: "too_large";
328
+ }>;
329
+ details: z.ZodOptional<z.ZodNullable<z.ZodObject<{
330
+ limit_bytes: z.ZodNumber;
331
+ size_bytes: z.ZodNumber;
332
+ }, z.core.$strip>>>;
333
+ }, z.core.$strip>>;
334
+ reason: z.ZodNullable<z.ZodString>;
335
+ started_at: z.ZodISODateTime;
336
+ updated_at: z.ZodISODateTime;
337
+ }, z.core.$strip>;
338
+ export type AssetSyncStatus = z.infer<typeof assetSyncStatus>;
339
+ export declare const assetListResponse: z.ZodObject<{
340
+ assets: z.ZodArray<z.ZodObject<{
341
+ id: z.ZodUUID;
342
+ robot_id: z.ZodUUID;
343
+ kind: z.ZodEnum<{
344
+ urdf: "urdf";
345
+ mesh: "mesh";
346
+ texture: "texture";
347
+ other: "other";
348
+ }>;
349
+ name: z.ZodString;
350
+ media_type: z.ZodString;
351
+ size_bytes: z.ZodNumber;
352
+ sha256: z.ZodString;
353
+ created_at: z.ZodISODateTime;
354
+ }, z.core.$strip>>;
355
+ active_sync: z.ZodNullable<z.ZodObject<{
356
+ sync_id: z.ZodUUID;
357
+ robot_id: z.ZodUUID;
358
+ state: z.ZodEnum<{
359
+ failed: "failed";
360
+ running: "running";
361
+ succeeded: "succeeded";
362
+ }>;
363
+ done: z.ZodNumber;
364
+ total: z.ZodNumber;
365
+ failed: z.ZodArray<z.ZodObject<{
366
+ reference: z.ZodString;
367
+ kind: z.ZodEnum<{
368
+ unresolvable: "unresolvable";
369
+ upload_failed: "upload_failed";
370
+ refused: "refused";
371
+ too_large: "too_large";
372
+ }>;
373
+ details: z.ZodOptional<z.ZodNullable<z.ZodObject<{
374
+ limit_bytes: z.ZodNumber;
375
+ size_bytes: z.ZodNumber;
376
+ }, z.core.$strip>>>;
377
+ }, z.core.$strip>>;
378
+ reason: z.ZodNullable<z.ZodString>;
379
+ started_at: z.ZodISODateTime;
380
+ updated_at: z.ZodISODateTime;
381
+ }, z.core.$strip>>;
382
+ urdf: z.ZodObject<{
383
+ present: z.ZodBoolean;
384
+ mesh_count: z.ZodNumber;
385
+ missing: z.ZodArray<z.ZodObject<{
386
+ uri: z.ZodString;
387
+ element: z.ZodEnum<{
388
+ mesh: "mesh";
389
+ texture: "texture";
390
+ }>;
391
+ }, z.core.$strip>>;
392
+ }, z.core.$strip>;
393
+ urdf_available: z.ZodNullable<z.ZodBoolean>;
394
+ }, z.core.$strip>;
395
+ export type AssetListResponse = z.infer<typeof assetListResponse>;
396
+ /**
397
+ * The query of `GET /api/robots/:id/assets/missing`, the placeholder a
398
+ * rewritten URDF points at for a mesh Fleetless does not hold.
399
+ *
400
+ * **The route answers `404` either way** — this parameter changes the sentence,
401
+ * never the outcome. It is echoed back into the refusal message so a developer
402
+ * reading a failed mesh load learns *which* reference did not resolve; absent,
403
+ * the message says `unknown`. Echoing it discloses nothing, since it is what
404
+ * the caller itself sent.
405
+ */
406
+ export declare const missingAssetQuery: z.ZodObject<{
407
+ name: z.ZodOptional<z.ZodString>;
408
+ }, z.core.$strip>;
409
+ export type MissingAssetQuery = z.infer<typeof missingAssetQuery>;
410
+ /**
411
+ * What an `asset_too_large` refusal tells the caller — the same discipline as
412
+ * `publisher_busy` and `job_queue_full`: a refusal that names a state and no
413
+ * number leaves the caller unable to decide anything.
414
+ */
415
+ /**
416
+ * Was eine `busy`-Absage beim Asset-Sync mitgeben muss (W9b, DEF-147).
417
+ *
418
+ * Vorher antwortete die Cloud *„Robot <id> already has a sync in progress"* —
419
+ * eine Absage, die einen **Zustand** benennt, aber nicht das **Ding** in diesem
420
+ * Zustand. Der laufende Sync ist serverseitig beobachtbar und über
421
+ * `GET .../assets/sync/<id>` abfragbar, nur erreichte ihn niemand mehr, der die
422
+ * id nicht aufgehoben hatte. Genau die Form, die W6b eine ganze Welle lang
423
+ * ausgeräumt hat: ein Abbruch ohne Job-Id, eine Freigabe ohne Session-Id.
424
+ *
425
+ * **Das allein genügt nicht**, und deshalb steht daneben `activeSync` auf der
426
+ * Asset-Liste: Diese Details helfen nur dem, der den Knopf noch einmal drückt.
427
+ * Wer die Seite neu lädt — der Fall, den André am 2026-08-18 hatte —, drückt
428
+ * gar nichts und braucht den laufenden Sync im ersten `GET`.
429
+ */
430
+ export declare const assetSyncBusyDetails: z.ZodObject<{
431
+ sync_id: z.ZodUUID;
432
+ started_at_ms: z.ZodNumber;
433
+ }, z.core.$strip>;
434
+ export type AssetSyncBusyDetails = z.infer<typeof assetSyncBusyDetails>;