@fleetless/contracts 13.3.0 → 15.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 (182) hide show
  1. package/CHANGELOG.md +304 -0
  2. package/artifacts/openapi.json +20156 -10513
  3. package/artifacts/routes.json +1429 -292
  4. package/artifacts/schema/access-warning.schema.json +51 -0
  5. package/artifacts/schema/action-config.schema.json +35 -0
  6. package/artifacts/schema/addon-catalogue-entry.schema.json +3 -1
  7. package/artifacts/schema/admin-plan-change-request.schema.json +26 -0
  8. package/artifacts/schema/app-access-response.schema.json +136 -0
  9. package/artifacts/schema/app-access.schema.json +80 -0
  10. package/artifacts/schema/app-deletion-summary.schema.json +15 -8
  11. package/artifacts/schema/app-invitation-list-response.schema.json +13 -6
  12. package/artifacts/schema/app-invitation.schema.json +5 -5
  13. package/artifacts/schema/app-list-response.schema.json +6 -6
  14. package/artifacts/schema/app-lock.schema.json +30 -0
  15. package/artifacts/schema/app-user-list-response.schema.json +13 -6
  16. package/artifacts/schema/app-user.schema.json +13 -6
  17. package/artifacts/schema/app.schema.json +6 -6
  18. package/artifacts/schema/asset-plan-limit-details.schema.json +3 -1
  19. package/artifacts/schema/auth-ok.schema.json +20 -6
  20. package/artifacts/schema/camera-list-response.schema.json +1 -1
  21. package/artifacts/schema/client-identity.schema.json +21 -6
  22. package/artifacts/schema/cloud-config.schema.json +359 -5
  23. package/artifacts/schema/collection-actor.schema.json +35 -0
  24. package/artifacts/schema/collection-definitions-response.schema.json +612 -0
  25. package/artifacts/schema/collection-event.schema.json +216 -0
  26. package/artifacts/schema/collection-export-query.schema.json +56 -0
  27. package/artifacts/schema/collection-filter.schema.json +9 -0
  28. package/artifacts/schema/collection-import-preview.schema.json +143 -0
  29. package/artifacts/schema/collection-import-request.schema.json +105 -0
  30. package/artifacts/schema/collection-import-result.schema.json +38 -0
  31. package/artifacts/schema/collection-list-response.schema.json +119 -0
  32. package/artifacts/schema/collection-record-get-query.schema.json +12 -0
  33. package/artifacts/schema/collection-record-history-query.schema.json +35 -0
  34. package/artifacts/schema/collection-record-history-response.schema.json +389 -0
  35. package/artifacts/schema/collection-record-list-query.schema.json +67 -0
  36. package/artifacts/schema/collection-record-list-response.schema.json +212 -0
  37. package/artifacts/schema/collection-record-restore-request.schema.json +14 -0
  38. package/artifacts/schema/collection-record-write.schema.json +31 -0
  39. package/artifacts/schema/collection-record.schema.json +180 -0
  40. package/artifacts/schema/collection-revision.schema.json +295 -0
  41. package/artifacts/schema/collection-subscribe-error.schema.json +31 -0
  42. package/artifacts/schema/collection-subscribe.schema.json +48 -0
  43. package/artifacts/schema/collection-subscribed.schema.json +22 -0
  44. package/artifacts/schema/collection-summary.schema.json +92 -0
  45. package/artifacts/schema/collection-unsubscribe.schema.json +22 -0
  46. package/artifacts/schema/collections-access-change.schema.json +34 -0
  47. package/artifacts/schema/collections-document.schema.json +732 -0
  48. package/artifacts/schema/collections-draft-response.schema.json +845 -0
  49. package/artifacts/schema/collections-effect.schema.json +384 -0
  50. package/artifacts/schema/collections-issue.schema.json +36 -0
  51. package/artifacts/schema/collections-publish-request.schema.json +18 -0
  52. package/artifacts/schema/collections-publish-response.schema.json +450 -0
  53. package/artifacts/schema/collections-purge-preview.schema.json +60 -0
  54. package/artifacts/schema/collections-purge-request.schema.json +27 -0
  55. package/artifacts/schema/collections-purge-response.schema.json +30 -0
  56. package/artifacts/schema/collections-restore-preview-query.schema.json +20 -0
  57. package/artifacts/schema/collections-restore-preview.schema.json +581 -0
  58. package/artifacts/schema/collections-restore-request.schema.json +27 -0
  59. package/artifacts/schema/collections-restore-response.schema.json +455 -0
  60. package/artifacts/schema/collections-schema-preview.schema.json +519 -0
  61. package/artifacts/schema/collections-schema-published.schema.json +22 -0
  62. package/artifacts/schema/collections-version-response.schema.json +869 -0
  63. package/artifacts/schema/collections-version-summary.schema.json +139 -0
  64. package/artifacts/schema/collections-versions-response.schema.json +167 -0
  65. package/artifacts/schema/config-draft-response.schema.json +359 -5
  66. package/artifacts/schema/config-version-response.schema.json +359 -5
  67. package/artifacts/schema/confirmation-required-details.schema.json +13 -0
  68. package/artifacts/schema/create-app-invitation-request.schema.json +4 -4
  69. package/artifacts/schema/create-app-user-request.schema.json +4 -4
  70. package/artifacts/schema/create-org-role-request.schema.json +33 -0
  71. package/artifacts/schema/dangling-reference.schema.json +130 -0
  72. package/artifacts/schema/datapoint-config.schema.json +35 -0
  73. package/artifacts/schema/datapoint-list-response.schema.json +2 -2
  74. package/artifacts/schema/effective-capability.schema.json +104 -0
  75. package/artifacts/schema/effective-rights-query.schema.json +19 -0
  76. package/artifacts/schema/effective-rights-response.schema.json +396 -0
  77. package/artifacts/schema/effective-robot-rights.schema.json +266 -0
  78. package/artifacts/schema/invoke-or-service-response.schema.json +1 -1
  79. package/artifacts/schema/invoke-response.schema.json +1 -1
  80. package/artifacts/schema/journal-intent-v2-body.schema.json +74 -0
  81. package/artifacts/schema/journal-intent-v2.schema.json +84 -0
  82. package/artifacts/schema/journal-replay-receipt-body.schema.json +1 -0
  83. package/artifacts/schema/journal-replay-receipt.schema.json +1 -0
  84. package/artifacts/schema/mcp-robot-datasheet.schema.json +2 -2
  85. package/artifacts/schema/org-plan.schema.json +29 -1
  86. package/artifacts/schema/org-quota-usage-counts.schema.json +18 -0
  87. package/artifacts/schema/org-quota-usage.schema.json +47 -1
  88. package/artifacts/schema/org-quotas.schema.json +29 -1
  89. package/artifacts/schema/org-role-list-response.schema.json +206 -0
  90. package/artifacts/schema/org-role.schema.json +59 -0
  91. package/artifacts/schema/patch-app-user-request.schema.json +4 -4
  92. package/artifacts/schema/patch-org-role-request.schema.json +38 -0
  93. package/artifacts/schema/plan-catalogue-entry.schema.json +29 -1
  94. package/artifacts/schema/plan-change-decision-status-response.schema.json +29 -1
  95. package/artifacts/schema/plan-limit-details.schema.json +3 -1
  96. package/artifacts/schema/plan-limits.schema.json +29 -1
  97. package/artifacts/schema/plan-overrides.schema.json +26 -0
  98. package/artifacts/schema/publish-config-response.schema.json +48 -1
  99. package/artifacts/schema/publisher-config.schema.json +35 -0
  100. package/artifacts/schema/put-collections-draft-request.schema.json +16 -0
  101. package/artifacts/schema/put-role-defaults-request.schema.json +127 -0
  102. package/artifacts/schema/record-changed-details.schema.json +16 -0
  103. package/artifacts/schema/record-referenced-details.schema.json +35 -0
  104. package/artifacts/schema/reference-invalid-details.schema.json +25 -0
  105. package/artifacts/schema/reference-place.schema.json +112 -0
  106. package/artifacts/schema/rename-slug-response.schema.json +4 -3
  107. package/artifacts/schema/required-missing-details.schema.json +19 -0
  108. package/artifacts/schema/robot-config-doc.schema.json +359 -5
  109. package/artifacts/schema/robot-deletion-summary.schema.json +33 -1
  110. package/artifacts/schema/role-collection-rights.schema.json +82 -0
  111. package/artifacts/schema/role-cycle-details.schema.json +18 -0
  112. package/artifacts/schema/role-defaults-response.schema.json +59 -0
  113. package/artifacts/schema/role-rename-preview.schema.json +147 -0
  114. package/artifacts/schema/service-config.schema.json +35 -0
  115. package/artifacts/schema/slug-usage-response.schema.json +4 -3
  116. package/artifacts/schema/update-app-request.schema.json +0 -12
  117. package/dist/app-users.d.ts +11 -8
  118. package/dist/app-users.js +18 -10
  119. package/dist/apps.d.ts +258 -71
  120. package/dist/apps.js +215 -151
  121. package/dist/audit.d.ts +35 -5
  122. package/dist/audit.js +40 -2
  123. package/dist/billing.d.ts +10 -10
  124. package/dist/client-auth.d.ts +5 -2
  125. package/dist/client-auth.js +11 -3
  126. package/dist/client-robots.d.ts +1 -1
  127. package/dist/client-robots.js +1 -1
  128. package/dist/collections-issues.d.ts +67 -0
  129. package/dist/collections-issues.js +340 -0
  130. package/dist/collections-records.d.ts +562 -0
  131. package/dist/collections-records.js +525 -0
  132. package/dist/collections-rights.d.ts +17 -0
  133. package/dist/collections-rights.js +41 -0
  134. package/dist/collections-schema.d.ts +1064 -0
  135. package/dist/collections-schema.js +386 -0
  136. package/dist/collections-templates.d.ts +55 -0
  137. package/dist/collections-templates.js +137 -0
  138. package/dist/collections-transfer.d.ts +101 -0
  139. package/dist/collections-transfer.js +206 -0
  140. package/dist/collections-values.d.ts +67 -0
  141. package/dist/collections-values.js +284 -0
  142. package/dist/collections.d.ts +568 -0
  143. package/dist/collections.js +332 -0
  144. package/dist/common.d.ts +1 -1
  145. package/dist/common.js +1 -1
  146. package/dist/config-issues.d.ts +1 -1
  147. package/dist/config-issues.js +1 -1
  148. package/dist/config.d.ts +78 -12
  149. package/dist/config.js +109 -15
  150. package/dist/errors.d.ts +63 -5
  151. package/dist/errors.js +152 -24
  152. package/dist/index.d.ts +40 -14
  153. package/dist/index.js +27 -7
  154. package/dist/journal-intents.d.ts +30 -0
  155. package/dist/journal-intents.js +3 -0
  156. package/dist/legal-acceptances.d.ts +2 -2
  157. package/dist/mcp.d.ts +5 -37
  158. package/dist/mcp.js +4 -14
  159. package/dist/org-roles.d.ts +186 -0
  160. package/dist/org-roles.js +199 -0
  161. package/dist/plans.d.ts +25 -7
  162. package/dist/plans.js +21 -1
  163. package/dist/protocol.d.ts +19 -1
  164. package/dist/realtime.d.ts +172 -3
  165. package/dist/realtime.js +164 -1
  166. package/dist/rest.d.ts +104 -53
  167. package/dist/rest.js +79 -55
  168. package/dist/rights.d.ts +197 -0
  169. package/dist/rights.js +396 -0
  170. package/dist/routes.d.ts +1 -1
  171. package/dist/routes.js +675 -150
  172. package/package.json +1 -1
  173. package/artifacts/schema/mcp-role-preview-response.schema.json +0 -134
  174. package/artifacts/schema/put-robot-details-request.schema.json +0 -41
  175. package/artifacts/schema/put-robot-details-response.schema.json +0 -43
  176. package/artifacts/schema/robot-details-doc.schema.json +0 -33
  177. package/artifacts/schema/role-delete-query.schema.json +0 -13
  178. package/artifacts/schema/role-in-use-details.schema.json +0 -28
  179. package/artifacts/schema/role-list-response.schema.json +0 -48
  180. package/artifacts/schema/role-permissions.schema.json +0 -61
  181. package/artifacts/schema/role-rename-request.schema.json +0 -16
  182. package/artifacts/schema/role.schema.json +0 -35
package/CHANGELOG.md CHANGED
@@ -9,6 +9,310 @@ version.
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ## [15.0.0] — 2026-11-06
13
+
14
+ ### Added
15
+
16
+ - **App collections: structured records an app stores in the cloud.** A
17
+ developer describes them in one document, `collectionsDocument`
18
+ (`COLLECTIONS_FORMAT_VERSION` 1): up to 50 collections of up to 100 fields,
19
+ each field a `collectionFieldType` with its own bounds, a `display` template,
20
+ and an `access` rule per collection saying who may read and write.
21
+ `collectionsDocumentIssues` judges a document and `collectionsAccessWarnings`
22
+ names what its access rules allow; `checkCollectionValue` and
23
+ `normalizeCollectionValue` judge and normalise one value the same way on
24
+ every side, and `parseCollectionFilter` and `parseCollectionSort` read the
25
+ filter and sort of a list request and report every problem with a JSON
26
+ Pointer path. Four JSON templates (`pose2d`, `point2d`, `polygon2d`,
27
+ `range1d`) are built in, and a field may carry an inline JSON Schema.
28
+ `collections:` with nothing under it (YAML null) reads as no collections,
29
+ the form of a template for a new app. A `json` value may nest arrays and
30
+ objects 32 levels deep, and a `text` pattern is at most 1,000 characters;
31
+ the cloud may also refuse a pattern as too complex.
32
+ - **Records.** A record travels as an envelope, `collectionRecord`: its system
33
+ fields (id, robot, who and when, revision), the rendered display text and the
34
+ required fields it is missing, with its own values under `values`. Writes
35
+ send `values`, an optional robot and an optional expected revision, and a
36
+ stale revision is answered `record_changed`. Lists take a filter, a search, a
37
+ sort, `expand`, a page of 1 to 500 and a cursor, and reading one record
38
+ takes the same `expand` (`collectionRecordGetQuery`); a page ends at 4 MiB
39
+ of stored values, so only a `null` cursor says a list is at its end. The
40
+ list of deleted records marks each record with `deleted_at` and
41
+ `deleted_by`. Every change keeps a revision, `collectionRevision`, which the
42
+ history route lists (in pages that end at 4 MiB as well) and the restore
43
+ route can bring back. An actor is labelled by display name; an email
44
+ address is shown only to a developer or a server key and to the person
45
+ themselves.
46
+ - **Schema lifecycle.** Saving a draft, previewing it, publishing it, listing
47
+ and restoring versions, and purging old history are separate steps. A change
48
+ that would alter or remove data is previewed first: the preview lists its
49
+ effects (ten kinds) and a token that stands for exactly that list, and the
50
+ confirming request sends the token back as `confirm`; the preview also
51
+ carries `source_sha256`, the hash of the draft it is for, which a publish can
52
+ send back so that a draft saved again in between is not published unseen,
53
+ also when there are no effects and so no token. A version can be restored
54
+ together with its data for 90 days, and a version that a restore published
55
+ says whether it put records back (`with_data`) and how many
56
+ (`reverted_totals`).
57
+ - **Import and export.** An import is all or nothing and takes two requests, a
58
+ preview that lists at most 1,000 errors with row, column, value and reason,
59
+ and a confirmation with the preview's token; without a token the import
60
+ route answers the preview, and a token that no longer holds is `409
61
+ confirmation_required`. Modes are `upsert` and `mirror`, and a mirror's
62
+ `scope` names a filter or a robot. The export query takes the filter, search
63
+ and sort of a record list.
64
+ - **Realtime.** `collection_subscribe` and `collection_unsubscribe` open and
65
+ close a subscription on the client socket, `collection_event` carries
66
+ `created`, `updated`, `deleted`, `removed` and `entered` with the whole
67
+ record, and `collection_subscribe_error` and `collections_schema_published`
68
+ tell a client its subscription failed or its definitions changed. The cloud
69
+ answers an accepted subscription with `collection_subscribed`
70
+ (`collectionSubscribed`, carrying the `request_id`) once it is registered,
71
+ also after a reconnect and a new subscribe, and every change from that frame
72
+ on is delivered as an event: subscribe, wait for it, then list. There is no
73
+ first snapshot. A developer connection names the app in `app_id`; a socket
74
+ holds 50 subscriptions at most, and one that falls too far behind is closed
75
+ with 1013.
76
+ - **Limits.** `COLLECTION_LIMITS` names every bound in one place: record size
77
+ (1 MiB), text lengths, select options, filter depth and conditions, page
78
+ sizes, import size (10 MB, 50,000 rows), pattern length, `json` nesting
79
+ depth, the longest text an import error repeats and the write rates (600 a
80
+ minute for an app, 120 for one acting user or key).
81
+ - **Routes and codes.** A new route section, App collections, with the
82
+ developer routes under `/api/apps/:id/collections` and the same records,
83
+ import and export for app users and server keys under
84
+ `/api/client/collections`; only the two history purge routes need the Owner
85
+ tier. New error codes `record_referenced`, `record_changed`,
86
+ `collection_not_found`, `collection_removed`, `reference_invalid`,
87
+ `required_missing` and `robot_not_attached`, with their details, and the
88
+ audit actions listed as `COLLECTION_AUDIT_ACTIONS`. `confirmation_required`,
89
+ which organization roles have used since 14.0.0, now also answers a
90
+ publish, restore, purge or import that would change data. Its `details` is
91
+ `{ preview }` here (`confirmationRequiredDetails`, the token in
92
+ `details.preview.token`) and the rename preview itself for a role rename
93
+ (the token in `details.confirm`), so a client that handles both looks for
94
+ `details.preview` first.
95
+ - **Plan limits for collections.** `planLimitKey` gains `collection_records`
96
+ and `collection_bytes`, counted per organization across its apps over
97
+ current records only: 25,000 records and 1 GB on Basic, 250,000 and 10 GB on
98
+ Plus, 1,000,000 and 50 GB on Pro, by contract on Enterprise. No add-on
99
+ raises them. `GET /api/org/quotas` carries both as limits (`orgQuotas`,
100
+ `null` when by contract) and as usage, with `collection_history_bytes`
101
+ beside them for information (`orgQuotaUsageCounts`); a write or an import
102
+ that adds data past a limit is `409 plan_limit` naming the key.
103
+ - **Collection rights of a role.** `roleCollectionRights` says per collection
104
+ what a role may do: read, create, and update and delete on every record, on
105
+ the role's own only (`own`), or not at all. The effective-rights answer
106
+ (`GET /api/apps/:id/effective-rights`) lists one row per collection of the
107
+ published schema in `collections`, an empty list without one.
108
+
109
+ ### Changed
110
+
111
+ - **A role key can be written in an app's collections schema.** `referencePlace`
112
+ gains the kind `collection_schema`: the `access` of a collection in the
113
+ published schema or the draft of an app, with the app's id in `app_id`, the
114
+ place in `path` (such as `collections.notes.access.update.own[1]`), `document`
115
+ and, for the published schema, the `new_version` a rename with
116
+ `update_references` would give it. It appears in the role list's `dangling`
117
+ places and in the rename preview. The version such a rename appends is
118
+ audited as `collection_schema.published` with `role_rename` in its details.
119
+ **Breaking (major):** the enum of `kind`
120
+ widens, so an exhaustive `switch` over it needs the new case and a validator
121
+ built from the old artifacts refuses the new places.
122
+ - **A role rename can answer `429 rate_limited`.** `PATCH /api/org/roles/:key`
123
+ lists `rate_limited` among its errors: a rename with `update_references` that
124
+ has to rewrite the schema of an app whose collections are busy waits up to
125
+ two seconds, then answers `429` with `retry_after_ms` and changes nothing.
126
+ A schema text it cannot rewrite without losing it (an access rule that is an
127
+ alias, say) refuses the rename with `400 validation_error` naming
128
+ `update_references`, and changes nothing.
129
+ - **Deletion summaries count collections.** `appDeletionSummary` gains
130
+ `collection_count` and `record_count`, and `robotDeletionSummary` gains
131
+ `collection_records`, the records that go with the robot per app. All three
132
+ are required fields of responses the server sends, like the other counts.
133
+ A consumer that builds these objects itself (a test double, say) adds them.
134
+ - **Quota and effective-rights answers have new required fields.**
135
+ `orgQuotas` gains `collection_records` and `collection_bytes`, and
136
+ `effectiveRightsResponse` gains `collections`. A consumer that builds these
137
+ answers itself adds them, as above; one that only reads them is unaffected.
138
+ - **Breaking (major):** `planLimits` requires `collection_records` and
139
+ `collection_bytes`, like its other keys. That is the `limits` of `orgPlan`
140
+ (`GET /api/org/plan`), of every plan catalogue entry and of
141
+ `planChangeDecisionStatusResponse`, and the constant `PLANS`. A consumer
142
+ that builds plan limits itself, or keeps a `Record<PlanLimitKey, ...>`,
143
+ adds both keys, and a validator built from the old artifacts refuses the new
144
+ answers. A consumer that embeds `orgPlan` or `planLimits` in a schema of its
145
+ own (an admin or operator API, say) inherits the two required keys: its
146
+ parsed type changes, every fixture or stored sample of a plan needs
147
+ `collection_records` and `collection_bytes` (`null` is by contract), and a
148
+ plan written before this release, without them, no longer parses. A list of
149
+ limit keys written out by hand (an enum, or a table keyed by limit) does not
150
+ widen with `planLimitKey` and gets the two keys added by hand. The enums that
151
+ do follow it widen as well: `addonCatalogueEntry.raises`,
152
+ `assetPlanLimitDetails.limit` and `planLimitDetails.limit` accept the two new
153
+ keys. The last one is the `details.limit` of `409 plan_limit` for a
154
+ collection write; no add-on raises the keys and an asset refusal never names
155
+ them. An exhaustive `switch` over any of the three needs the two cases.
156
+ `planOverrides` and the `overrides` of an admin plan change accept the two
157
+ keys too, and a validator built from the older artifacts refuses a request
158
+ that names them.
159
+
160
+ ### Removed
161
+
162
+ - **Breaking (major):** The `robot_details` built-in. `robotDetailsDoc`,
163
+ `putRobotDetailsRequest` and `putRobotDetailsResponse` (with their types and
164
+ the three JSON Schema artifacts), the route `PUT /api/robots/:id/details`,
165
+ and the reserved slug are gone: `RESERVED_SLUGS` is now `bridge_state`,
166
+ `history`, `assets` and `job_history`, so `robot_details` is an ordinary slug
167
+ that a configuration may use. The descriptions of `datapointDescriptor`,
168
+ `datapointListResponse` and the configuration sections name `bridge_state`
169
+ as the only built-in datapoint. Nothing was deprecated first. To move over,
170
+ keep what a robot's details held in a collection with one record per robot
171
+ (`binding: one_per_robot`) in the app's collections document, and read and
172
+ write it with the collection routes; delete the calls of the removed route
173
+ and the code that parsed the removed schemas.
174
+
175
+ ## [14.0.0] — 2026-11-05
176
+
177
+ Per-app roles are replaced by organization roles. What follows is one major
178
+ release; every breaking item is named once, under Removed or Changed.
179
+
180
+ ### Removed
181
+
182
+ - **Breaking (major):** The per-app role routes: `POST` and `GET
183
+ /api/apps/:id/roles`, `PATCH` and `DELETE /api/apps/:id/roles/:roleId`,
184
+ `PUT` and `GET /api/apps/:id/roles/:roleId/permissions`, and `GET
185
+ /api/apps/:id/roles/:roleId/mcp-tools`. Roles belong to the organization
186
+ from here on. What a role may use is no longer a matrix kept per app: it is
187
+ written in each robot's `fleetless.yaml` (`role` on an entry, `access.rules`,
188
+ `access.assets` and `access.job_history`) and in the organization's defaults
189
+ (`PUT /api/org/roles/defaults`), and what an app takes away is its locks
190
+ (`PUT /api/apps/:id/access`). To carry a per-app role over, create an
191
+ organization role with the role's key, name the key where the matrix granted
192
+ access, and give the app's users and invitations that key.
193
+ - **Breaking (major):** The shapes of those routes, with their types and JSON
194
+ Schema artifacts: `role`, `roleListResponse`, `roleRenameRequest`,
195
+ `roleDeleteQuery`, `roleInUseDetails`, `rolePermissions` and
196
+ `mcpRolePreviewResponse`.
197
+ - **Breaking (major):** The error codes `role_name_taken`, `role_in_use` and
198
+ `last_role`.
199
+ - **Breaking (major):** `appDeletionSummary.role_count`. Deleting an app
200
+ deletes no role, so the preview counts five things, not six.
201
+
202
+ ### Changed
203
+
204
+ - **Breaking (major):** `clientIdentity.role_id` is replaced by `role`, an
205
+ object with the role's `key` and display `name`, or `null` when the caller
206
+ has no role to name (a developer, a server key, an app user whose key is no
207
+ role). It is part of the `GET /api/client/me` answer and of the realtime
208
+ `auth_ok` frame. A consumer that read `role_id` reads `role.key` now.
209
+ - **Breaking (major):** `mcpCapabilities.action_history` is renamed
210
+ `job_history`, without an alias. The capability names the same thing, the
211
+ past jobs of a robot (`GET /api/robots/:id/jobs/history`), and now matches
212
+ the `job_history` of the `fleetless.yaml` `access` section and of the
213
+ organization defaults. It travels in the `capabilities` of
214
+ `mcpRobotDatasheet` (`robots.describe` and `GET /api/robots/:id/datasheet`)
215
+ and is what `capability_required` names beside `assets`. A datasheet
216
+ without `job_history` no longer satisfies the schema, and a consumer that
217
+ read `action_history` reads `job_history` now.
218
+ - **Breaking (major):** `app.default_role_id` is replaced by `default_role`,
219
+ the role's key or `null` when the app has none, and `updateAppRequest` no
220
+ longer takes `default_role_id`: a patch that names it is refused. The default
221
+ role is set with `PUT /api/apps/:id/access`, together with the locks. A key
222
+ that names no role is shown as stored and warns. The `robot_ids`
223
+ description no longer says a role decides what an attached robot allows: that
224
+ follows the robot's `fleetless.yaml` and the organization's defaults, less
225
+ what the app locks.
226
+ - **Breaking (major):** app users and app invitations hold a role key.
227
+ `role_id` is replaced by `role`, a role key, in `appUser`,
228
+ `createAppUserRequest`, `patchAppUserRequest`, `createAppInvitationRequest`
229
+ and `appInvitation` (so also `pendingAppInvitation`). `role` is optional in
230
+ the three requests, and absent means the app's `default_role`; `appInvitation`
231
+ requires it. `appUser.role` and `pendingAppInvitation.role` are nullable: an
232
+ account, or a pending invitation whose app has no default role, left without a
233
+ key lists with `role: null` and reaches nothing. A malformed key is refused; a
234
+ key that names no role is accepted and grants nothing. `409
235
+ target_state_conflict` now names `default_role` (rule `not_set`) where it
236
+ named `default_role_id`, and a role of another app is no longer a `404`. A
237
+ consumer that sent or read `role_id` sends and reads the role's key now.
238
+ - **Breaking (major):** locks follow a slug rename where role grants used to.
239
+ `renameSlugResponse.rewritten_grants` is `rewritten_locks` and
240
+ `slugUsageResponse.grant_count` is `lock_count`: the app locks that list the
241
+ renamed slug now list the new name as well, in every app of the
242
+ organization. A rename that would push a lock past the most slugs it can hold
243
+ is refused with `409 target_state_conflict`, rule `lock_full`.
244
+ - **Breaking (major):** `publishConfigResponse` requires `warnings`: every
245
+ warning of the published document, `[]` when it has none. An answer from a
246
+ cloud that does not send it yet no longer satisfies the contract.
247
+ - **Breaking (major):** the slugs `assets` and `job_history` are reserved, like
248
+ `bridge_state`, `robot_details` and `history`: `RESERVED_SLUGS` lists them,
249
+ and a configured entry of either name is refused when the document is
250
+ validated. They name the robot-level capabilities, so an exposure of the same
251
+ name would have left the `name` of an `effectiveCapability` ambiguous.
252
+ - `POST /api/apps/:id/invitations/:invId/reissue` lists `target_state_conflict`:
253
+ an invitation that holds no role key, in an app with no default role, is
254
+ refused with it (rule `not_set`, field `default_role`) before the old link is
255
+ revoked.
256
+ - The mail template variable `role.name` is the display name of the
257
+ organization role the invitee is given.
258
+ - The journal kind `app_role.delete` is retired: no producer writes it any more,
259
+ and it stays in the contract so that journals written before still parse and
260
+ replay.
261
+
262
+ ### Added
263
+
264
+ - Roles in `fleetless.yaml`. `role` — one role key, or a list of keys — is an
265
+ optional field of every entry of `datapoints`, `actions`, `services`,
266
+ `publishers` and `cameras`, and the new optional `access` section holds
267
+ `rules` (each with a `match` glob over the entry's ROS name, optional
268
+ `kinds` and a `role`) and the robot-level `assets` and `job_history`.
269
+ `accessRule` and `accessSection` are exported. The bridge ignores both
270
+ fields.
271
+ - The helpers that resolve them, from the package root: `roleKey`, `roleRef`,
272
+ `accessKind`, `matchRosGlob`, `roleClosure`, `roleSatisfies`, `findCycle`,
273
+ `listExposures`, `requirementOf`, `collectRoleRefs` and `roleIssues`, with
274
+ `ROLE_KEY_PATTERN` and `ROLE_KEY_RULE` (the pattern a role key must match
275
+ and the sentence that says so), `ACCESS_KINDS`, `ENTRY_KINDS`,
276
+ `MAX_ORG_ROLES`, `ROLE_NAME_MAX`, `SEED_ROLES`, `SEED_DEFAULTS` and their
277
+ types. `RoleRef` is the type of a `role` field, one key or a list of keys;
278
+ `RoleRefUse`, the result of `collectRoleRefs`, is one place a document names
279
+ a key. `roleIssues` yields the two warnings a document can earn,
280
+ `unknown_role` and `rule_matches_nothing`.
281
+ - Organization roles on the wire. Six developer routes, none owner-only:
282
+ `GET` and `POST /api/org/roles`, `PATCH` and `DELETE /api/org/roles/:key`,
283
+ and `GET` and `PUT /api/org/roles/defaults`. The list answers each role with
284
+ its counts and the keys that are written somewhere but are no role; a rename
285
+ with `update_references` that has places to rewrite is two calls, the first
286
+ answered with a preview and a `confirm` token, and one with none applies at
287
+ once. The key `defaults` is reserved and is no role key. Shapes: `orgRole`,
288
+ `orgRoleListResponse`, `danglingReference`, `referencePlace`,
289
+ `createOrgRoleRequest`, `patchOrgRoleRequest`, `roleRenamePreview`,
290
+ `roleDefaultsResponse` and `putRoleDefaultsRequest`, each with its type and
291
+ JSON Schema artifact.
292
+ - The error codes `role_cycle` (`400`, `details` is `roleCycleDetails`),
293
+ `role_key_taken` (`409`) and `confirmation_required` (`409`, `details` is
294
+ the preview that carries the token to confirm with).
295
+ - The journal kind `org_role.delete`, recorded like `server_key.revoke`.
296
+ - App access and effective rights on the wire. `GET` and `PUT
297
+ /api/apps/:id/access` read and replace what an app locks (`locked_kinds` for
298
+ whole kinds of access, `locked` for single exposures of single robots) and
299
+ the role its users get by default; the answer carries `warnings` for what is
300
+ out of step. `GET /api/apps/:id/effective-rights` takes `role` or `user` and
301
+ answers, per attached robot, every capability with whether it is granted,
302
+ where its requirement came from, whether the robot is `reachable` at all and
303
+ the datasheet an MCP session of that role would get. Developer routes, none
304
+ owner-only. Shapes: `appAccess`, `appLock`, `accessWarning`,
305
+ `appAccessResponse`, `effectiveRightsQuery`, `effectiveCapability`,
306
+ `effectiveRobotRights` and `effectiveRightsResponse`.
307
+ The lists of an access name each kind, slug and robot once, and are bounded;
308
+ `MAX_LOCK_SLUGS` is the most slugs one lock can name.
309
+ - `revision` on the access of an app. `appAccessResponse` carries the revision
310
+ of the stored access, and the `PUT /api/apps/:id/access` body may send back
311
+ the one it was composed from: when the stored access has changed since (a
312
+ write, a slug rename that extended a lock, a robot detached), the write is
313
+ refused with `409 target_state_conflict`, rule `stale`, and nothing is
314
+ written. Without a `revision` the body replaces what is stored, as before.
315
+
12
316
  ## [13.3.0] — 2026-11-05
13
317
 
14
318
  ### Added