@fleetless/contracts 13.2.0 → 14.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 (100) hide show
  1. package/CHANGELOG.md +169 -0
  2. package/artifacts/openapi.json +2092 -787
  3. package/artifacts/routes.json +229 -230
  4. package/artifacts/schema/access-warning.schema.json +51 -0
  5. package/artifacts/schema/action-config.schema.json +35 -0
  6. package/artifacts/schema/app-access-response.schema.json +136 -0
  7. package/artifacts/schema/app-access.schema.json +80 -0
  8. package/artifacts/schema/app-auth-config.schema.json +15 -0
  9. package/artifacts/schema/app-deletion-summary.schema.json +0 -7
  10. package/artifacts/schema/app-invitation-list-response.schema.json +13 -6
  11. package/artifacts/schema/app-invitation.schema.json +5 -5
  12. package/artifacts/schema/app-list-response.schema.json +6 -6
  13. package/artifacts/schema/app-lock.schema.json +30 -0
  14. package/artifacts/schema/app-user-list-response.schema.json +13 -6
  15. package/artifacts/schema/app-user.schema.json +13 -6
  16. package/artifacts/schema/app.schema.json +6 -6
  17. package/artifacts/schema/auth-ok.schema.json +20 -6
  18. package/artifacts/schema/camera-list-response.schema.json +1 -1
  19. package/artifacts/schema/client-identity.schema.json +21 -6
  20. package/artifacts/schema/cloud-config.schema.json +359 -5
  21. package/artifacts/schema/config-draft-response.schema.json +389 -5
  22. package/artifacts/schema/config-version-response.schema.json +389 -5
  23. package/artifacts/schema/config-versions-response.schema.json +30 -0
  24. package/artifacts/schema/create-app-invitation-request.schema.json +4 -4
  25. package/artifacts/schema/create-app-user-request.schema.json +4 -4
  26. package/artifacts/schema/create-org-role-request.schema.json +33 -0
  27. package/artifacts/schema/dangling-reference.schema.json +129 -0
  28. package/artifacts/schema/datapoint-config.schema.json +35 -0
  29. package/artifacts/schema/datapoint-list-response.schema.json +1 -1
  30. package/artifacts/schema/effective-capability.schema.json +104 -0
  31. package/artifacts/schema/effective-rights-query.schema.json +19 -0
  32. package/artifacts/schema/effective-rights-response.schema.json +310 -0
  33. package/artifacts/schema/effective-robot-rights.schema.json +266 -0
  34. package/artifacts/schema/invoke-or-service-response.schema.json +1 -1
  35. package/artifacts/schema/invoke-response.schema.json +1 -1
  36. package/artifacts/schema/journal-intent-v2-body.schema.json +74 -0
  37. package/artifacts/schema/journal-intent-v2.schema.json +84 -0
  38. package/artifacts/schema/journal-replay-receipt-body.schema.json +1 -0
  39. package/artifacts/schema/journal-replay-receipt.schema.json +1 -0
  40. package/artifacts/schema/mcp-robot-datasheet.schema.json +2 -2
  41. package/artifacts/schema/org-role-list-response.schema.json +205 -0
  42. package/artifacts/schema/org-role.schema.json +59 -0
  43. package/artifacts/schema/patch-app-user-request.schema.json +4 -4
  44. package/artifacts/schema/patch-org-role-request.schema.json +38 -0
  45. package/artifacts/schema/publish-config-response.schema.json +48 -1
  46. package/artifacts/schema/publisher-config.schema.json +35 -0
  47. package/artifacts/schema/put-role-defaults-request.schema.json +127 -0
  48. package/artifacts/schema/reference-place.schema.json +111 -0
  49. package/artifacts/schema/rename-slug-response.schema.json +4 -3
  50. package/artifacts/schema/robot-config-doc.schema.json +359 -5
  51. package/artifacts/schema/role-cycle-details.schema.json +18 -0
  52. package/artifacts/schema/role-defaults-response.schema.json +59 -0
  53. package/artifacts/schema/role-rename-preview.schema.json +146 -0
  54. package/artifacts/schema/service-config.schema.json +35 -0
  55. package/artifacts/schema/slug-usage-response.schema.json +4 -3
  56. package/artifacts/schema/update-app-request.schema.json +0 -12
  57. package/dist/app-users.d.ts +30 -10
  58. package/dist/app-users.js +32 -12
  59. package/dist/apps.d.ts +242 -71
  60. package/dist/apps.js +205 -151
  61. package/dist/audit.d.ts +3 -3
  62. package/dist/billing.d.ts +10 -10
  63. package/dist/client-auth.d.ts +5 -2
  64. package/dist/client-auth.js +11 -3
  65. package/dist/client-robots.d.ts +1 -1
  66. package/dist/client-robots.js +1 -1
  67. package/dist/common.d.ts +1 -1
  68. package/dist/common.js +1 -1
  69. package/dist/config-issues.d.ts +1 -1
  70. package/dist/config-issues.js +1 -1
  71. package/dist/config.d.ts +77 -11
  72. package/dist/config.js +108 -14
  73. package/dist/errors.d.ts +14 -5
  74. package/dist/errors.js +37 -24
  75. package/dist/index.d.ts +22 -12
  76. package/dist/index.js +16 -6
  77. package/dist/journal-intents.d.ts +30 -0
  78. package/dist/journal-intents.js +3 -0
  79. package/dist/legal-acceptances.d.ts +2 -2
  80. package/dist/mcp.d.ts +5 -37
  81. package/dist/mcp.js +4 -14
  82. package/dist/org-roles.d.ts +182 -0
  83. package/dist/org-roles.js +198 -0
  84. package/dist/plans.d.ts +6 -6
  85. package/dist/protocol.d.ts +19 -1
  86. package/dist/realtime.d.ts +6 -3
  87. package/dist/realtime.js +1 -1
  88. package/dist/rest.d.ts +104 -25
  89. package/dist/rest.js +67 -29
  90. package/dist/rights.d.ts +197 -0
  91. package/dist/rights.js +396 -0
  92. package/dist/routes.js +190 -148
  93. package/package.json +1 -1
  94. package/artifacts/schema/mcp-role-preview-response.schema.json +0 -134
  95. package/artifacts/schema/role-delete-query.schema.json +0 -13
  96. package/artifacts/schema/role-in-use-details.schema.json +0 -28
  97. package/artifacts/schema/role-list-response.schema.json +0 -48
  98. package/artifacts/schema/role-permissions.schema.json +0 -61
  99. package/artifacts/schema/role-rename-request.schema.json +0 -16
  100. package/artifacts/schema/role.schema.json +0 -35
package/dist/errors.js CHANGED
@@ -164,6 +164,16 @@ export const billingDocumentsUnavailableDetails = z.object({
164
164
  'its account check, so every Lexware read stays closed).',
165
165
  }),
166
166
  }).strict();
167
+ /**
168
+ * The `details` of a `400 role_cycle` refusal: the loop the change would have
169
+ * made, along the `inherits` edges, as `[a, b, a]` — the first key again at
170
+ * the end. A role that inherits from itself is `[a, a]`.
171
+ */
172
+ export const roleCycleDetails = z.object({
173
+ cycle: z.array(z.string()).min(2).meta({
174
+ description: 'The keys along the loop, in order, ending with the key the loop started from: `["a", "b", "a"]`.',
175
+ }),
176
+ });
167
177
  /**
168
178
  * The codes in use today. The wire deliberately allows any string — this
169
179
  * list is the shared vocabulary, not a closed set, so a new refusal never
@@ -218,7 +228,7 @@ export const ERROR_CODES = [
218
228
  'bridge_timeout',
219
229
  // Identity and rights. `forbidden` is deliberately the answer both
220
230
  // for "your role does not grant this" and for "there is no such slug":
221
- // roles are the only filter, and a caller must not be able to map
231
+ // rights are the only filter, and a caller must not be able to map
222
232
  // the configuration of an app they have no rights in.
223
233
  'unauthorized',
224
234
  'forbidden',
@@ -647,14 +657,14 @@ export const ERROR_CODES = [
647
657
  * the role's datasheet (`mcpRobotDatasheet`) already lists every exposure
648
658
  * the role does grant, so a second code would split an outcome nobody acts
649
659
  * on differently. To anyone else the two must be indistinguishable anyway,
650
- * because roles are the only filter.
660
+ * because rights are the only filter.
651
661
  */
652
662
  'tool_not_available',
653
663
  // Capabilities.
654
664
  /**
655
665
  * An app-wide **capability** the caller's role does not grant — today
656
666
  * `assets` (`GET /api/robots/:id/assets` and the URDF/by-id byte routes)
657
- * and `action_history` (`GET /api/robots/:id/jobs/history`). The message
667
+ * and `job_history` (`GET /api/robots/:id/jobs/history`). The message
658
668
  * names which one.
659
669
  *
660
670
  * **Distinct from `forbidden`, and the distinction is the point.**
@@ -687,35 +697,38 @@ export const ERROR_CODES = [
687
697
  * caller could infer from a silence about existence.
688
698
  */
689
699
  'last_owner',
690
- // App roles.
700
+ /* `role_name_taken`, `role_in_use` and `last_role` are gone with the per-app
701
+ * role routes they answered; organization roles bring their own refusals. */
702
+ // Organization roles.
691
703
  /**
692
- * **Another role of this app already has that name.** 409, on
693
- * `PATCH /api/apps/:id/roles/:roleId`. Names are unique per app, compared
694
- * exactly as stored after trimming.
704
+ * `400`: the change would make a role inherit from itself, directly or
705
+ * through other roles. Nothing was written. `details` is `roleCycleDetails`,
706
+ * the loop as `[a, b, a]`.
695
707
  *
696
- * Not `validation_error`: the name is well-formed, and the remedy — pick
697
- * another — depends on the app's other roles, not on the body.
708
+ * Raised when a role is created or its `inherits` changes. Renaming and
709
+ * deleting a role are never refused for the roles that depend on it: what is
710
+ * left dangling turns into a warning.
698
711
  */
699
- 'role_name_taken',
712
+ 'role_cycle',
700
713
  /**
701
- * **The role is still held**, by app users, by pending invitations, or as
702
- * the app's default role. 409, on `DELETE /api/apps/:id/roles/:roleId`
703
- * without `move_to`. `details` is `roleInUseDetails`:
704
- * `{ users, invitations, is_default }`.
705
- *
706
- * Not `conflict`: the details tell the console what to offer — a role to
707
- * move them to — and a generic code would leave it guessing.
714
+ * `409`: the organization already has a role with that key, on a create or on
715
+ * a rename to a key that is in use. Nothing was written; pick another key.
708
716
  */
709
- 'role_in_use',
717
+ 'role_key_taken',
710
718
  /**
711
- * **An app must keep at least one role.** 409, on
712
- * `DELETE /api/apps/:id/roles/:roleId` for the app's only role: every app
713
- * user holds exactly one role, so an app without roles could hold no users.
719
+ * `409`: the call changes many places at once and has to be confirmed with
720
+ * the token of its current preview. `details` is that preview, with the
721
+ * token in its `confirm` field; repeat the same request with `confirm` set
722
+ * to it and the call applies. The shape of the preview belongs to the call
723
+ * that answers it: for renaming an organization role with
724
+ * `update_references` it is `roleRenamePreview`.
714
725
  *
715
- * The same shape of refusal as `last_owner`: the caller may delete roles;
716
- * the app's remaining state is what refuses this one.
726
+ * A token fits the effects its preview lists and nothing else. When
727
+ * anything those effects cover has changed since, the call answers a new
728
+ * preview instead of applying on a stale token, so what is applied is always
729
+ * what the caller was shown.
717
730
  */
718
- 'last_role',
731
+ 'confirmation_required',
719
732
  // OIDC federation.
720
733
  /**
721
734
  * **The target is in a state that refuses the operation** — not the caller's
package/dist/index.d.ts CHANGED
@@ -13,17 +13,17 @@ export { legalOfferListQuery, legalOfferSummary, legalOfferListResponse, legalOf
13
13
  export type { LegalOfferListQuery, LegalOfferSummary, LegalOfferListResponse, LegalOfferDisplayRequest, LegalOfferDecisionRequest, LegalOfferDecisionLookupQuery, LegalOfferDecisionSnapshot, LegalOfferDisplayResponse, LegalOfferDecisionResult, LegalOfferConflictDetails, } from './legal-offers.js';
14
14
  export { SLUG_RULE, ROS_NAME_RULE, ROS_TYPE_NAME_RULE, FIELD_PATH_RULE, slug, rosName, rosTypeName, fieldPath, wireSeqCursor, wireTimestampMs, applyErrorKind, applyError, } from './common.js';
15
15
  export type { ApplyErrorKind, ApplyError } from './common.js';
16
- export { MCP_PROTOCOL_VERSION, MCP_ENDPOINT_PATH, mcpAppEndpointPath, MCP_APP_PATHS, MCP_TOOL_NAME_MAX, MCP_ASSET_LINK_PATH, MCP_ASSET_LINK_TTL_MS, mcpToolNamePattern, mcpToolKind, mcpExposure, mcpCapabilities, mcpRobotDatasheet, mcpRolePreviewResponse, } from './mcp.js';
17
- export type { McpAppPaths, McpToolKind, McpExposure, McpCapabilities, McpRobotDatasheet, McpRolePreviewResponse, } from './mcp.js';
16
+ export { MCP_PROTOCOL_VERSION, MCP_ENDPOINT_PATH, mcpAppEndpointPath, MCP_APP_PATHS, MCP_TOOL_NAME_MAX, MCP_ASSET_LINK_PATH, MCP_ASSET_LINK_TTL_MS, mcpToolNamePattern, mcpToolKind, mcpExposure, mcpCapabilities, mcpRobotDatasheet, } from './mcp.js';
17
+ export type { McpAppPaths, McpToolKind, McpExposure, McpCapabilities, McpRobotDatasheet, } from './mcp.js';
18
18
  export { PROTOCOL_VERSION, PROTOCOL_VERSIONS, PROTOCOL_SUNSET_DAYS, LATEST_BRIDGE_VERSION, protocolStatus, minimumProtocolVersion, sunsetOf, statusFromTable, bridgeHello, cloudHelloOk, cloudHelloError, cloudPing, bridgePong, bridgeLinkMode, datapointFrame, bridgeState, cloudConfig, bridgeConfigApplied, cloudIntrospectRequest, bridgeIntrospect, cloudTypeRequest, bridgeTypeDefinitions, cloudInvoke, cloudCancel, CANCEL_RETURN_CODES, cancelReturnCode, bridgeCancelResultEntry, bridgeCancelResult, cloudPublish, bridgeJobUpdate, bridgeJobLost, cloudJobQuery, bridgeJobStatusEntry, bridgeJobStatus, snapshotHeader, cloudCameraStart, cloudCameraStop, bridgeCameraState, SNAPSHOT_MAX_BYTES, CLOSE_ROBOT_DELETED, CLOSE_TOKEN_ROTATED, bridgeAssetsAvailable, cloudAssetRequest, bridgeAssetProgress, activeJob, DEFAULT_PATIENCE_MS, MAX_PATIENCE_MS, MIN_PATIENCE_MS, JOB_HEARTBEAT_INTERVAL_MS, JOB_HEARTBEAT_TIMEOUT_MS, JOB_OFFLINE_GRACE_MS, } from './protocol.js';
19
19
  export type { ProtocolVersionEntry, ProtocolStatus, BridgeHello, CloudHelloOk, CloudHelloError, CloudPing, BridgePong, BridgeLinkMode, DatapointFrame, BridgeState, CloudConfig, BridgeConfigApplied, CloudIntrospectRequest, BridgeIntrospect, CloudTypeRequest, BridgeTypeDefinitions, CloudInvoke, CloudCancel, CancelReturnCode, BridgeCancelResultEntry, BridgeCancelResult, CloudPublish, BridgeJobUpdate, BridgeJobLost, CloudJobQuery, BridgeJobStatusEntry, BridgeJobStatus, SnapshotHeader, CloudCameraStart, CloudCameraStop, BridgeCameraState, ActiveJob, BridgeAssetsAvailable, CloudAssetRequest, BridgeAssetProgress, } from './protocol.js';
20
20
  export { jobState, reportedJobState, jobOrigin, job, jobEvent, busyDetails, publisherBusyDetails, jobQueueFullDetails } from './jobs.js';
21
21
  export type { JobState, ReportedJobState, JobOrigin, Job, JobEvent, BusyDetails, PublisherBusyDetails, JobQueueFullDetails, } from './jobs.js';
22
22
  export { JOB_RUN_PAGE_MAX, JOB_RUN_RETENTION_DAYS, jobActor, jobRunKind, jobRun, jobRunQuery, jobRunListResponse, jobRunSummaryQuery, jobRunSummary, } from './jobs.js';
23
23
  export type { JobActor, JobRunKind, JobRun, JobRunQuery, JobRunListResponse, JobRunSummary } from './jobs.js';
24
- export { FLEETLESS_FORMAT_VERSION, RESERVED_SLUGS, parameterType, parameterSpec, parameterMap, serviceDescription, parameterDescription, messageTemplate, messageRef, messageBody, messageMap, PLACEHOLDER_RE, placeholderNames, actionConfig, serviceConfig, publisherConfig, cameraConfig, alertCondition, datapointAlert, rateThrottleHz, datapointNumeric, datapointRetention, datapointChart, datapointConfig, lowBandwidthSection, LOW_BANDWIDTH_DEFAULTS, robotConfigDoc, validationIssue, configState, snapshotIntervalSeconds, ALERT_SEVERITY_DEFAULT, ALERT_ENABLED_DEFAULT, RETENTION_INTERVAL_SECONDS_DEFAULT, CHART_WINDOW_MINUTES_DEFAULT, cameraSource, cameraCredentials, } from './config.js';
24
+ export { FLEETLESS_FORMAT_VERSION, RESERVED_SLUGS, parameterType, parameterSpec, parameterMap, serviceDescription, parameterDescription, messageTemplate, messageRef, messageBody, messageMap, PLACEHOLDER_RE, placeholderNames, actionConfig, serviceConfig, publisherConfig, cameraConfig, alertCondition, datapointAlert, rateThrottleHz, datapointNumeric, datapointRetention, datapointChart, datapointConfig, lowBandwidthSection, LOW_BANDWIDTH_DEFAULTS, robotConfigDoc, accessRule, accessSection, validationIssue, configState, snapshotIntervalSeconds, ALERT_SEVERITY_DEFAULT, ALERT_ENABLED_DEFAULT, RETENTION_INTERVAL_SECONDS_DEFAULT, CHART_WINDOW_MINUTES_DEFAULT, cameraSource, cameraCredentials, } from './config.js';
25
25
  export type { CameraSource } from './config.js';
26
- export type { ParameterType, ParameterSpec, ActionConfig, ServiceConfig, PublisherConfig, CameraConfig, CameraCredentials, AlertCondition, DatapointAlert, DatapointNumeric, DatapointRetention, DatapointChart, DatapointConfig, LowBandwidthSection, RobotConfigDoc, ValidationIssue, ConfigState, } from './config.js';
26
+ export type { ParameterType, ParameterSpec, ActionConfig, ServiceConfig, PublisherConfig, CameraConfig, CameraCredentials, AlertCondition, DatapointAlert, DatapointNumeric, DatapointRetention, DatapointChart, DatapointConfig, LowBandwidthSection, RobotConfigDoc, AccessRule, AccessSection, ValidationIssue, ConfigState, } from './config.js';
27
27
  /**
28
28
  * The one account of what is wrong with a configuration document, shared by
29
29
  * every layer that reports on one. See `config-issues.ts`'s header for why a
@@ -31,14 +31,24 @@ export type { ParameterType, ParameterSpec, ActionConfig, ServiceConfig, Publish
31
31
  */
32
32
  export { DOCUMENT_ROOT_PATH, EXPOSURE_SECTIONS, schemaIssues, formatPath, splitFormatPath, configSchemaHash, } from './config-issues.js';
33
33
  export type { SchemaIssue, ExposureSection } from './config-issues.js';
34
+ /**
35
+ * Roles and the rights a document resolves to — one implementation for the
36
+ * cloud, the console editor and anything else that has to answer "who may use
37
+ * this?" the same way. See `rights.ts`.
38
+ */
39
+ export { ROLE_KEY_PATTERN, ROLE_KEY_RULE, roleKey, roleRef, ACCESS_KINDS, accessKind, ENTRY_KINDS, MAX_ORG_ROLES, ROLE_NAME_MAX, SEED_ROLES, SEED_DEFAULTS, matchRosGlob, roleClosure, roleSatisfies, listExposures, requirementOf, findCycle, collectRoleRefs, roleIssues, } from './rights.js';
40
+ export type { RoleKey, RoleRef, RoleRefUse, AccessKind, EntryKind, RoleNode, RoleGraph, RoleDefaults, RequirementSource, Requirement, ExposureRef, RightsTarget, } from './rights.js';
41
+ /** Organization roles on the wire: the role list, create and change, the rename preview and the organization's defaults. See `org-roles.ts`. */
42
+ export { referencePlace, orgRole, danglingReference, orgRoleListResponse, createOrgRoleRequest, patchOrgRoleRequest, roleRenamePreview, roleDefaultsResponse, putRoleDefaultsRequest, } from './org-roles.js';
43
+ export type { ReferencePlace, OrgRole, DanglingReference, OrgRoleListResponse, CreateOrgRoleRequest, PatchOrgRoleRequest, RoleRenamePreview, RoleDefaultsResponse, PutRoleDefaultsRequest, } from './org-roles.js';
34
44
  export { rosGraphEntry, rosGraph, typeField, typeDefinition, parameterFieldsOf } from './introspection.js';
35
45
  export type { RosGraphEntry, RosGraph, TypeField, TypeDefinition } from './introspection.js';
36
- export { robot, patchRobotResponse, robotToken, createRobotRequest, createRobotResponse, robotTokenRotateResponse, jointStatePutRequest, jointStatePutResponse, exposureCounts, protocolStatusValue, robotListItem, robotListResponse, datapointValue, robotDetailResponse, configDraftResponse, putConfigDraftRequest, publishConfigResponse, configVersionsResponse, configVersionResponse, introspectionResponse, typesResponse, fetchTypesRequest, fetchTypesResponse, datapointDescriptor, datapointListResponse, robotDetailsDoc, putRobotDetailsResponse, putRobotDetailsRequest, invokeRequest, invokeResponse, cancelRequest, recoverHeldJobRequest, recoverHeldJobResponse, releaseLiveQuery, serviceCallResponse, invokeOrServiceResponse, publishRequest, jobResponse, robotJobsResponse, rateLimitDetails, exposure, exposureListResponse, SNAPSHOT_HEADERS, ASSET_UPLOAD_HEADERS, cameraDescriptor, cameraListResponse, liveSessionResponse, snapshotMetaResponse, historyQuery, historySamplesResponse, historyBucketsResponse, historyResponse, orgQuotas, orgQuotaUsage, orgQuotaUsageCounts, robotDeletionSummary, RESOURCE_HEALTH_STATES, resourceHealthState, resourceHealthListResponse, orgHealthQuery, robotDeleteQuery, patchRobotRequest, renameSlugRequest, renameSlugResponse, slugUsageResponse, } from './rest.js';
46
+ export { robot, patchRobotResponse, robotToken, createRobotRequest, createRobotResponse, robotTokenRotateResponse, jointStatePutRequest, jointStatePutResponse, exposureCounts, protocolStatusValue, robotListItem, robotListResponse, datapointValue, robotDetailResponse, configAuthor, configDraftResponse, putConfigDraftRequest, publishConfigResponse, configVersionsResponse, configVersionResponse, introspectionResponse, typesResponse, fetchTypesRequest, fetchTypesResponse, datapointDescriptor, datapointListResponse, robotDetailsDoc, putRobotDetailsResponse, putRobotDetailsRequest, invokeRequest, invokeResponse, cancelRequest, recoverHeldJobRequest, recoverHeldJobResponse, releaseLiveQuery, serviceCallResponse, invokeOrServiceResponse, publishRequest, jobResponse, robotJobsResponse, rateLimitDetails, exposure, exposureListResponse, SNAPSHOT_HEADERS, ASSET_UPLOAD_HEADERS, cameraDescriptor, cameraListResponse, liveSessionResponse, snapshotMetaResponse, historyQuery, historySamplesResponse, historyBucketsResponse, historyResponse, orgQuotas, orgQuotaUsage, orgQuotaUsageCounts, robotDeletionSummary, RESOURCE_HEALTH_STATES, resourceHealthState, resourceHealthListResponse, orgHealthQuery, robotDeleteQuery, patchRobotRequest, renameSlugRequest, renameSlugResponse, slugUsageResponse, } from './rest.js';
37
47
  export type { HistoryQuery, HistorySamplesResponse, HistoryResponse, HistoryBucketsResponse, OrgQuotas, OrgQuotaUsage, OrgQuotaUsageCounts, RobotDeletionSummary, ResourceHealthState, ResourceHealthListResponse, OrgHealthQuery, RobotDeleteQuery, PatchRobotRequest, RenameSlugRequest, RenameSlugResponse, SlugUsageResponse, } from './rest.js';
38
48
  export { LATENCY_BUCKET_MS, BRIDGE_LATENCY_RETENTION_DAYS, MAX_LATENCY_BUCKETS_PER_RESPONSE, latencyBucket, robotLatencySeries, orgLatencyQuery, orgLatencyResponse, USAGE_WINDOW_MAX_DAYS, usageMetric, usageDay, orgUsageQuery, usageRow, orgUsageResponse, } from './rest.js';
39
49
  export type { LatencyBucket, RobotLatencySeries, OrgLatencyResponse } from './rest.js';
40
50
  export type { UsageMetric, OrgUsageQuery, UsageRow, OrgUsageResponse } from './rest.js';
41
- export type { Robot, PatchRobotResponse, CreateRobotRequest, CreateRobotResponse, RobotTokenRotateResponse, JointStatePutRequest, JointStatePutResponse, ExposureCounts, ProtocolStatusValue, RobotListItem, RobotListResponse, DatapointValue, RobotDetailResponse, ConfigDraftResponse, PutConfigDraftRequest, PublishConfigResponse, ConfigVersionsResponse, ConfigVersionResponse, IntrospectionResponse, TypesResponse, FetchTypesRequest, FetchTypesResponse, DatapointDescriptor, DatapointListResponse, RobotDetailsDoc, PutRobotDetailsResponse, PutRobotDetailsRequest, InvokeRequest, InvokeResponse, CancelRequest, RecoverHeldJobRequest, RecoverHeldJobResponse, ReleaseLiveQuery, ServiceCallResponse, InvokeOrServiceResponse, PublishRequest, JobResponse, RobotJobsResponse, RateLimitDetails, Exposure, ExposureListResponse, CameraDescriptor, CameraListResponse, LiveSessionResponse, SnapshotMetaResponse, } from './rest.js';
51
+ export type { Robot, PatchRobotResponse, CreateRobotRequest, CreateRobotResponse, RobotTokenRotateResponse, JointStatePutRequest, JointStatePutResponse, ExposureCounts, ProtocolStatusValue, RobotListItem, RobotListResponse, DatapointValue, RobotDetailResponse, ConfigAuthor, ConfigDraftResponse, PutConfigDraftRequest, PublishConfigResponse, ConfigVersionsResponse, ConfigVersionResponse, IntrospectionResponse, TypesResponse, FetchTypesRequest, FetchTypesResponse, DatapointDescriptor, DatapointListResponse, RobotDetailsDoc, PutRobotDetailsResponse, PutRobotDetailsRequest, InvokeRequest, InvokeResponse, CancelRequest, RecoverHeldJobRequest, RecoverHeldJobResponse, ReleaseLiveQuery, ServiceCallResponse, InvokeOrServiceResponse, PublishRequest, JobResponse, RobotJobsResponse, RateLimitDetails, Exposure, ExposureListResponse, CameraDescriptor, CameraListResponse, LiveSessionResponse, SnapshotMetaResponse, } from './rest.js';
42
52
  export { clientAuth, authOk, authError, clientInvoke, clientCancel, clientPublish, commandResult, errorFrame, clientSubscribe, clientUnsubscribe, subscribeError, datapointEvent, resourceHealthEvent, resourceHealthCleared, liveSessionEndReason, liveSessionEvent, ORG_EVENT_SAMPLE_INTERVAL_MS, ORG_EVENT_ORG_CEILING_PER_SECOND, ORG_EVENT_BUFFER_SIZE, ORG_EVENT_BUFFER_IDLE_MS, ORG_EVENT_DETAIL_MAX_BYTES, orgEventKind, orgEventSeverity, orgEvent, orgEventSubscribe, orgEventUnsubscribe, orgEventReplay, orgEventDropped, } from './realtime.js';
43
53
  export type { ClientAuth, AuthOk, AuthError, ClientInvoke, ClientCancel, ClientPublish, CommandResult, ErrorFrame, ClientSubscribe, ClientUnsubscribe, SubscribeError, DatapointEvent, ResourceHealthEvent, ResourceHealthCleared, LiveSessionEndReason, LiveSessionEvent, OrgEventKind, OrgEventSeverity, OrgEvent, OrgEventSubscribe, OrgEventUnsubscribe, OrgEventReplay, OrgEventDropped, } from './realtime.js';
44
54
  export { password, org, patchOrgResponse, sessionTokens, refreshRequest, WAITLIST_F1_TEXT_VERSION, waitlistRequest, USER_DISPLAY_NAME_MAX, orgAdminTier, fleetlessUser, fleetlessUserListResponse, createTeamInviteRequest, teamInvite, pendingTeamInvite, pendingTeamInviteListResponse, acceptTeamInviteRequest, patchFleetlessUserRequest, tierChangeRequest, mailStatus, tierRequiredDetails, passwordChangeRequest, idpIssuer, loginCode, totpCode, recoveryCode, recoveryCodesList, twoFactorSetupResponse, webauthnJson, webauthnOptionsResponse, developerPasskey, developerTwoFactor, createPasskeyRequest, createPasskeyResponse, renamePasskeyRequest, totpConfirmRequest, totpConfirmResponse, recoveryCodesResponse, authMeResponse, patchOrgRequest, patchAuthMeRequest, } from './identity.js';
@@ -47,8 +57,8 @@ export { FEEDBACK_KINDS, FEEDBACK_MESSAGE_MAX, feedbackKind, feedbackRequest, fe
47
57
  export type { FeedbackKind, FeedbackRequest, FeedbackResponse } from './feedback.js';
48
58
  export { supportSessionInfo, supportTokenRequest, supportTokenResponse, supportRenewFailRequest, supportRenewFailRefusal, authMeSupportResponse } from './support.js';
49
59
  export type { SupportSessionInfo, SupportTokenRequest, SupportTokenResponse, SupportRenewFailRequest, SupportRenewFailRefusal, AuthMeSupportResponse } from './support.js';
50
- export { appIdentifier, app, appListResponse, appDeletionSummary, createAppRequest, updateAppRequest, serverKeyToken, serverKey, serverKeyListResponse, createServerKeyResponse, role, roleListResponse, rolePermissions, roleRenameRequest, roleDeleteQuery, roleInUseDetails, } from './apps.js';
51
- export type { App, AppListResponse, AppDeletionSummary, CreateAppRequest, UpdateAppRequest, ServerKey, ServerKeyListResponse, CreateServerKeyResponse, Role, RoleListResponse, RolePermissions, RoleRenameRequest, RoleDeleteQuery, RoleInUseDetails, } from './apps.js';
60
+ export { appIdentifier, app, appListResponse, appDeletionSummary, createAppRequest, updateAppRequest, serverKeyToken, serverKey, serverKeyListResponse, createServerKeyResponse, appLock, MAX_LOCK_SLUGS, appAccess, accessWarning, appAccessResponse, effectiveRightsQuery, effectiveCapability, effectiveRobotRights, effectiveRightsResponse, } from './apps.js';
61
+ export type { App, AppListResponse, AppDeletionSummary, CreateAppRequest, UpdateAppRequest, ServerKey, ServerKeyListResponse, CreateServerKeyResponse, AppLock, AppAccess, AccessWarning, AppAccessResponse, EffectiveRightsQuery, EffectiveCapability, EffectiveRobotRights, EffectiveRightsResponse, } from './apps.js';
52
62
  export { clientLoginRequest, clientRefreshRequest, clientLogoutRequest, clientRegisterRequest, clientVerifyEmailRequest, clientResendVerificationRequest, clientPasswordResetRequest, clientPasswordResetConfirmRequest, clientAcceptInvitationRequest, CLIENT_OIDC_CALLBACK_PATH, clientProviderListQuery, clientProviderListResponse, clientOidcStartQuery, clientOidcCallbackQuery, clientOidcExchangeRequest, clientOidcErrorCode, clientMcpInteraction, clientMcpInteractionDecisionResponse, mcpConsentGrant, mcpConsentGrantListResponse, clientIdentity, clientLoginCodeRequest, clientLoginCodeVerifyRequest, twoFactorChallenge, clientSignInResult, clientTwoFactorVerifyRequest, clientTwoFactorSetupRequest, clientTwoFactorSetupConfirmRequest, clientTwoFactorSetupConfirmResponse, clientTwoFactorDisableRequest, } from './client-auth.js';
53
63
  export type { ClientLoginRequest, ClientRefreshRequest, ClientLogoutRequest, ClientRegisterRequest, ClientVerifyEmailRequest, ClientResendVerificationRequest, ClientPasswordResetRequest, ClientPasswordResetConfirmRequest, ClientAcceptInvitationRequest, ClientProviderListQuery, ClientProviderListResponse, ClientOidcStartQuery, ClientOidcCallbackQuery, ClientOidcExchangeRequest, ClientOidcErrorCode, ClientMcpInteraction, ClientMcpInteractionDecisionResponse, McpConsentGrant, McpConsentGrantListResponse, ClientIdentity, ClientLoginCodeRequest, ClientLoginCodeVerifyRequest, TwoFactorChallenge, ClientSignInResult, ClientTwoFactorVerifyRequest, ClientTwoFactorSetupRequest, ClientTwoFactorSetupConfirmRequest, ClientTwoFactorSetupConfirmResponse, ClientTwoFactorDisableRequest, } from './client-auth.js';
54
64
  export { clientRobotListItem, clientRobotListResponse } from './client-robots.js';
@@ -57,16 +67,16 @@ export { httpsLegalUrl, legalDocumentReference, legalTextReferences, TERMS_VERSI
57
67
  export type { LegalDocumentReference, LegalTextReferences } from './legal.js';
58
68
  export { legalAcceptanceListQuery, legalAcceptanceVersionRow, legalAcceptanceListResponse } from './legal-acceptances.js';
59
69
  export type { LegalAcceptanceListQuery, LegalAcceptanceVersionRow, LegalAcceptanceListResponse } from './legal-acceptances.js';
60
- export { APP_USER_DISPLAY_NAME_MAX, APP_URL_PLACEHOLDERS, MAIL_TEMPLATE_VARIABLES, DEFAULT_MAIL_TEMPLATES, providerSlug, appUserStatus, appUser, appUserListResponse, createAppUserRequest, patchAppUserRequest, createAppInvitationRequest, appInvitation, pendingAppInvitation, appInvitationListResponse, appOidcProvider, appOidcProviderListResponse, createAppOidcProviderRequest, patchAppOidcProviderRequest, appUrlTemplate, allowedOrigin, emailDomain, appAuthConfig, appSignInMethods, appTwoFactorPolicy, appHomeUrl, hostedAccent, HOSTED_LOGO_MAX_BYTES, HOSTED_LOGO_TYPES, appHostedPages, putAppAuthRegistrationRequest, putAppAuthSignInRequest, putAppAuthUrlsRequest, putAppAuthMcpRequest, putAppAuthLookRequest, mailTemplateKind, appMailTemplate, appMailTemplateListResponse, putAppMailTemplateRequest, mailTemplatePreviewRequest, mailTemplatePreviewResponse, mailTemplateProblemDetails, mailOutcome, } from './app-users.js';
61
- export type { AppUserStatus, AppUser, AppUserListResponse, CreateAppUserRequest, PatchAppUserRequest, CreateAppInvitationRequest, AppInvitation, PendingAppInvitation, AppInvitationListResponse, AppOidcProvider, AppOidcProviderListResponse, CreateAppOidcProviderRequest, PatchAppOidcProviderRequest, AppAuthConfig, AppSignInMethods, AppTwoFactorPolicy, AppHostedPages, PutAppAuthRegistrationRequest, PutAppAuthSignInRequest, PutAppAuthUrlsRequest, PutAppAuthMcpRequest, PutAppAuthLookRequest, MailTemplateKind, AppMailTemplate, AppMailTemplateListResponse, PutAppMailTemplateRequest, MailTemplatePreviewRequest, MailTemplatePreviewResponse, MailTemplateProblemDetails, MailOutcome, } from './app-users.js';
70
+ export { APP_USER_DISPLAY_NAME_MAX, APP_URL_PLACEHOLDERS, MAIL_TEMPLATE_VARIABLES, DEFAULT_MAIL_TEMPLATES, providerSlug, appUserStatus, appUser, appUserListResponse, createAppUserRequest, patchAppUserRequest, createAppInvitationRequest, appInvitation, pendingAppInvitation, appInvitationListResponse, appOidcProvider, appOidcProviderListResponse, createAppOidcProviderRequest, patchAppOidcProviderRequest, appUrlTemplate, allowedOrigin, emailDomain, appAuthConfig, appSignInMethods, appTwoFactorPolicy, appHomeUrl, hostedAccent, hostedLogoShape, HOSTED_LOGO_MAX_BYTES, HOSTED_LOGO_TYPES, appHostedPages, putAppAuthRegistrationRequest, putAppAuthSignInRequest, putAppAuthUrlsRequest, putAppAuthMcpRequest, putAppAuthLookRequest, mailTemplateKind, appMailTemplate, appMailTemplateListResponse, putAppMailTemplateRequest, mailTemplatePreviewRequest, mailTemplatePreviewResponse, mailTemplateProblemDetails, mailOutcome, } from './app-users.js';
71
+ export type { AppUserStatus, AppUser, AppUserListResponse, CreateAppUserRequest, PatchAppUserRequest, CreateAppInvitationRequest, AppInvitation, PendingAppInvitation, AppInvitationListResponse, AppOidcProvider, AppOidcProviderListResponse, CreateAppOidcProviderRequest, PatchAppOidcProviderRequest, AppAuthConfig, AppSignInMethods, AppTwoFactorPolicy, AppHostedPages, HostedLogoShape, PutAppAuthRegistrationRequest, PutAppAuthSignInRequest, PutAppAuthUrlsRequest, PutAppAuthMcpRequest, PutAppAuthLookRequest, MailTemplateKind, AppMailTemplate, AppMailTemplateListResponse, PutAppMailTemplateRequest, MailTemplatePreviewRequest, MailTemplatePreviewResponse, MailTemplateProblemDetails, MailOutcome, } from './app-users.js';
62
72
  export { assetKind, URDF_ASSET_NAME, asset, urdfCompleteness, assetListResponse, assetsClearResponse, missingAssetQuery, assetSyncRequest, assetSyncResponse, assetSyncState, assetSyncStatus, assetFailure, assetFailureKind, assetStoreRefusedDetails, assetSyncBusyDetails, ROBOT_ASSET_STORE_BYTES, ASSET_FILE_MAX_BYTES, } from './assets.js';
63
73
  export type { AssetKind, Asset, UrdfCompleteness, AssetListResponse, AssetsClearResponse, MissingAssetQuery, AssetSyncRequest, AssetSyncResponse, AssetSyncState, AssetSyncStatus, AssetFailure, AssetFailureKind, AssetStoreRefusedDetails, AssetSyncBusyDetails, } from './assets.js';
64
74
  export { auditActor, auditEvent, auditQuery, auditListResponse, AUDIT_CSV_COLUMNS, AUDIT_RETENTION_DAYS } from './audit.js';
65
75
  export type { AuditActor, AuditEvent, AuditQuery, AuditListResponse } from './audit.js';
66
76
  export { alertRowCondition, alertSeverity, alertState, datapointAlertRow, alertListResponse, orgFiringAlertsResponse, orgAlertsQuery, datapointDisplay, putDatapointDisplayRequest, } from './alerts.js';
67
77
  export type { AlertRowCondition, AlertSeverity, AlertState, DatapointAlertRow, AlertListResponse, OrgFiringAlertsResponse, OrgAlertsQuery, DatapointDisplay, PutDatapointDisplayRequest, } from './alerts.js';
68
- export { apiError, parameterViolation, parameterInvalidDetails, cancelRejectedDetails, invalidCodeDetails, ERROR_CODES, planLimitDetails, assetPlanLimitDetails, planRequiredDetails, orgLockedDetails, fileTooLargeDetails, paymentProviderUnavailableDetails, billingDocumentsUnavailableDetails, } from './errors.js';
69
- export type { ApiError, ParameterViolation, ParameterInvalidDetails, CancelRejectedDetails, InvalidCodeDetails, ErrorCode, PlanLimitDetails, AssetPlanLimitDetails, PlanRequiredDetails, OrgLockedDetails, FileTooLargeDetails, PaymentProviderUnavailableDetails, BillingDocumentsUnavailableDetails, } from './errors.js';
78
+ export { apiError, parameterViolation, parameterInvalidDetails, cancelRejectedDetails, invalidCodeDetails, ERROR_CODES, planLimitDetails, assetPlanLimitDetails, planRequiredDetails, orgLockedDetails, fileTooLargeDetails, paymentProviderUnavailableDetails, billingDocumentsUnavailableDetails, roleCycleDetails, } from './errors.js';
79
+ export type { ApiError, ParameterViolation, ParameterInvalidDetails, CancelRejectedDetails, InvalidCodeDetails, ErrorCode, PlanLimitDetails, AssetPlanLimitDetails, PlanRequiredDetails, OrgLockedDetails, FileTooLargeDetails, PaymentProviderUnavailableDetails, BillingDocumentsUnavailableDetails, RoleCycleDetails, } from './errors.js';
70
80
  export { oauthErrorCode, oauthError, oauthRedirectResponse, oauthCodeTokenRequest, oauthRefreshTokenRequest, oauthTokenRequest, oauthTokenResponse, redirectUri, codeChallengeMethod, oauthAuthorizeQuery, dynamicClientRegistrationRequest, MCP_DCR_MAX_REDIRECT_URIS, dynamicClientRegistrationResponse, authorizationServerMetadata, protectedResourceMetadata, } from './oauth.js';
71
81
  export type { OauthErrorCode, OauthError, OauthRedirectResponse, OauthCodeTokenRequest, OauthRefreshTokenRequest, OauthTokenRequest, OauthTokenResponse, RedirectUri, OauthAuthorizeQuery, DynamicClientRegistrationRequest, DynamicClientRegistrationResponse, AuthorizationServerMetadata, ProtectedResourceMetadata, } from './oauth.js';
72
82
  export { ROUTES, ROUTE_SECTIONS, IN_HANDLER_ROUTES, developerSignInRoutes } from './routes.js';
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ export { journalIntentV2Body, journalIntentV2 } from './journal-intents.js';
6
6
  export { journalFirstCheckpointBody, journalFirstCheckpoint, journalRegistryTransitionBody, journalRegistryTransition, journalRegistryActivationReceiptBody, journalRegistryActivationReceipt, } from './journal-controls.js';
7
7
  export { legalOfferListQuery, legalOfferSummary, legalOfferListResponse, legalOfferDisplayRequest, legalOfferDecisionRequest, legalOfferDecisionLookupQuery, legalOfferDecisionSnapshot, legalOfferDisplayResponse, legalOfferDecisionResult, legalOfferConflictDetails, } from './legal-offers.js';
8
8
  export { SLUG_RULE, ROS_NAME_RULE, ROS_TYPE_NAME_RULE, FIELD_PATH_RULE, slug, rosName, rosTypeName, fieldPath, wireSeqCursor, wireTimestampMs, applyErrorKind, applyError, } from './common.js';
9
- export { MCP_PROTOCOL_VERSION, MCP_ENDPOINT_PATH, mcpAppEndpointPath, MCP_APP_PATHS, MCP_TOOL_NAME_MAX, MCP_ASSET_LINK_PATH, MCP_ASSET_LINK_TTL_MS, mcpToolNamePattern, mcpToolKind, mcpExposure, mcpCapabilities, mcpRobotDatasheet, mcpRolePreviewResponse, } from './mcp.js';
9
+ export { MCP_PROTOCOL_VERSION, MCP_ENDPOINT_PATH, mcpAppEndpointPath, MCP_APP_PATHS, MCP_TOOL_NAME_MAX, MCP_ASSET_LINK_PATH, MCP_ASSET_LINK_TTL_MS, mcpToolNamePattern, mcpToolKind, mcpExposure, mcpCapabilities, mcpRobotDatasheet, } from './mcp.js';
10
10
  export { PROTOCOL_VERSION, PROTOCOL_VERSIONS, PROTOCOL_SUNSET_DAYS, LATEST_BRIDGE_VERSION, protocolStatus, minimumProtocolVersion, sunsetOf, statusFromTable, bridgeHello, cloudHelloOk, cloudHelloError, cloudPing, bridgePong, bridgeLinkMode, datapointFrame, bridgeState, cloudConfig, bridgeConfigApplied, cloudIntrospectRequest, bridgeIntrospect, cloudTypeRequest, bridgeTypeDefinitions, cloudInvoke, cloudCancel, CANCEL_RETURN_CODES, cancelReturnCode, bridgeCancelResultEntry, bridgeCancelResult, cloudPublish, bridgeJobUpdate, bridgeJobLost, cloudJobQuery, bridgeJobStatusEntry, bridgeJobStatus, snapshotHeader, cloudCameraStart, cloudCameraStop, bridgeCameraState, SNAPSHOT_MAX_BYTES, CLOSE_ROBOT_DELETED, CLOSE_TOKEN_ROTATED,
11
11
  // Assets.
12
12
  bridgeAssetsAvailable, cloudAssetRequest, bridgeAssetProgress,
@@ -14,7 +14,7 @@ bridgeAssetsAvailable, cloudAssetRequest, bridgeAssetProgress,
14
14
  activeJob, DEFAULT_PATIENCE_MS, MAX_PATIENCE_MS, MIN_PATIENCE_MS, JOB_HEARTBEAT_INTERVAL_MS, JOB_HEARTBEAT_TIMEOUT_MS, JOB_OFFLINE_GRACE_MS, } from './protocol.js';
15
15
  export { jobState, reportedJobState, jobOrigin, job, jobEvent, busyDetails, publisherBusyDetails, jobQueueFullDetails } from './jobs.js';
16
16
  export { JOB_RUN_PAGE_MAX, JOB_RUN_RETENTION_DAYS, jobActor, jobRunKind, jobRun, jobRunQuery, jobRunListResponse, jobRunSummaryQuery, jobRunSummary, } from './jobs.js';
17
- export { FLEETLESS_FORMAT_VERSION, RESERVED_SLUGS, parameterType, parameterSpec, parameterMap, serviceDescription, parameterDescription, messageTemplate, messageRef, messageBody, messageMap, PLACEHOLDER_RE, placeholderNames, actionConfig, serviceConfig, publisherConfig, cameraConfig, alertCondition, datapointAlert, rateThrottleHz, datapointNumeric, datapointRetention, datapointChart, datapointConfig, lowBandwidthSection, LOW_BANDWIDTH_DEFAULTS, robotConfigDoc, validationIssue, configState, snapshotIntervalSeconds,
17
+ export { FLEETLESS_FORMAT_VERSION, RESERVED_SLUGS, parameterType, parameterSpec, parameterMap, serviceDescription, parameterDescription, messageTemplate, messageRef, messageBody, messageMap, PLACEHOLDER_RE, placeholderNames, actionConfig, serviceConfig, publisherConfig, cameraConfig, alertCondition, datapointAlert, rateThrottleHz, datapointNumeric, datapointRetention, datapointChart, datapointConfig, lowBandwidthSection, LOW_BANDWIDTH_DEFAULTS, robotConfigDoc, accessRule, accessSection, validationIssue, configState, snapshotIntervalSeconds,
18
18
  // The defaults the format names, so nobody invents them twice.
19
19
  ALERT_SEVERITY_DEFAULT, ALERT_ENABLED_DEFAULT, RETENTION_INTERVAL_SECONDS_DEFAULT, CHART_WINDOW_MINUTES_DEFAULT,
20
20
  // Retention, history and quotas.
@@ -25,8 +25,16 @@ cameraSource, cameraCredentials, } from './config.js';
25
25
  * second copy of this vocabulary is a defect, not a convenience.
26
26
  */
27
27
  export { DOCUMENT_ROOT_PATH, EXPOSURE_SECTIONS, schemaIssues, formatPath, splitFormatPath, configSchemaHash, } from './config-issues.js';
28
+ /**
29
+ * Roles and the rights a document resolves to — one implementation for the
30
+ * cloud, the console editor and anything else that has to answer "who may use
31
+ * this?" the same way. See `rights.ts`.
32
+ */
33
+ export { ROLE_KEY_PATTERN, ROLE_KEY_RULE, roleKey, roleRef, ACCESS_KINDS, accessKind, ENTRY_KINDS, MAX_ORG_ROLES, ROLE_NAME_MAX, SEED_ROLES, SEED_DEFAULTS, matchRosGlob, roleClosure, roleSatisfies, listExposures, requirementOf, findCycle, collectRoleRefs, roleIssues, } from './rights.js';
34
+ /** Organization roles on the wire: the role list, create and change, the rename preview and the organization's defaults. See `org-roles.ts`. */
35
+ export { referencePlace, orgRole, danglingReference, orgRoleListResponse, createOrgRoleRequest, patchOrgRoleRequest, roleRenamePreview, roleDefaultsResponse, putRoleDefaultsRequest, } from './org-roles.js';
28
36
  export { rosGraphEntry, rosGraph, typeField, typeDefinition, parameterFieldsOf } from './introspection.js';
29
- export { robot, patchRobotResponse, robotToken, createRobotRequest, createRobotResponse, robotTokenRotateResponse, jointStatePutRequest, jointStatePutResponse, exposureCounts, protocolStatusValue, robotListItem, robotListResponse, datapointValue, robotDetailResponse, configDraftResponse, putConfigDraftRequest, publishConfigResponse, configVersionsResponse, configVersionResponse, introspectionResponse, typesResponse, fetchTypesRequest, fetchTypesResponse, datapointDescriptor, datapointListResponse, robotDetailsDoc, putRobotDetailsResponse, putRobotDetailsRequest, invokeRequest, invokeResponse,
37
+ export { robot, patchRobotResponse, robotToken, createRobotRequest, createRobotResponse, robotTokenRotateResponse, jointStatePutRequest, jointStatePutResponse, exposureCounts, protocolStatusValue, robotListItem, robotListResponse, datapointValue, robotDetailResponse, configAuthor, configDraftResponse, putConfigDraftRequest, publishConfigResponse, configVersionsResponse, configVersionResponse, introspectionResponse, typesResponse, fetchTypesRequest, fetchTypesResponse, datapointDescriptor, datapointListResponse, robotDetailsDoc, putRobotDetailsResponse, putRobotDetailsRequest, invokeRequest, invokeResponse,
30
38
  // Addressing.
31
39
  cancelRequest, recoverHeldJobRequest, recoverHeldJobResponse, releaseLiveQuery, serviceCallResponse, invokeOrServiceResponse, publishRequest, jobResponse, robotJobsResponse, rateLimitDetails, exposure, exposureListResponse, SNAPSHOT_HEADERS, ASSET_UPLOAD_HEADERS, cameraDescriptor, cameraListResponse, liveSessionResponse, snapshotMetaResponse,
32
40
  // Retention, history, quotas.
@@ -52,13 +60,13 @@ authMeResponse, patchOrgRequest, patchAuthMeRequest, } from './identity.js';
52
60
  export { FEEDBACK_KINDS, FEEDBACK_MESSAGE_MAX, feedbackKind, feedbackRequest, feedbackResponse } from './feedback.js';
53
61
  // Support sessions: an operator temporarily holding a console session for one org (internal, additive).
54
62
  export { supportSessionInfo, supportTokenRequest, supportTokenResponse, supportRenewFailRequest, supportRenewFailRefusal, authMeSupportResponse } from './support.js';
55
- export { appIdentifier, app, appListResponse, appDeletionSummary, createAppRequest, updateAppRequest, serverKeyToken, serverKey, serverKeyListResponse, createServerKeyResponse, role, roleListResponse, rolePermissions, roleRenameRequest, roleDeleteQuery, roleInUseDetails, } from './apps.js';
63
+ export { appIdentifier, app, appListResponse, appDeletionSummary, createAppRequest, updateAppRequest, serverKeyToken, serverKey, serverKeyListResponse, createServerKeyResponse, appLock, MAX_LOCK_SLUGS, appAccess, accessWarning, appAccessResponse, effectiveRightsQuery, effectiveCapability, effectiveRobotRights, effectiveRightsResponse, } from './apps.js';
56
64
  export { clientLoginRequest, clientRefreshRequest, clientLogoutRequest, clientRegisterRequest, clientVerifyEmailRequest, clientResendVerificationRequest, clientPasswordResetRequest, clientPasswordResetConfirmRequest, clientAcceptInvitationRequest, CLIENT_OIDC_CALLBACK_PATH, clientProviderListQuery, clientProviderListResponse, clientOidcStartQuery, clientOidcCallbackQuery, clientOidcExchangeRequest, clientOidcErrorCode, clientMcpInteraction, clientMcpInteractionDecisionResponse, mcpConsentGrant, mcpConsentGrantListResponse, clientIdentity, clientLoginCodeRequest, clientLoginCodeVerifyRequest, twoFactorChallenge, clientSignInResult, clientTwoFactorVerifyRequest, clientTwoFactorSetupRequest, clientTwoFactorSetupConfirmRequest, clientTwoFactorSetupConfirmResponse, clientTwoFactorDisableRequest, } from './client-auth.js';
57
65
  export { clientRobotListItem, clientRobotListResponse } from './client-robots.js';
58
66
  export { httpsLegalUrl, legalDocumentReference, legalTextReferences, TERMS_VERSION, TERMS_VERSION_DATE, TERMS_VERSION_URL, DPA_VERSION, DPA_VERSION_DATE, DPA_VERSION_URL, } from './legal.js';
59
67
  export { legalAcceptanceListQuery, legalAcceptanceVersionRow, legalAcceptanceListResponse } from './legal-acceptances.js';
60
68
  // The per-app identity space.
61
- export { APP_USER_DISPLAY_NAME_MAX, APP_URL_PLACEHOLDERS, MAIL_TEMPLATE_VARIABLES, DEFAULT_MAIL_TEMPLATES, providerSlug, appUserStatus, appUser, appUserListResponse, createAppUserRequest, patchAppUserRequest, createAppInvitationRequest, appInvitation, pendingAppInvitation, appInvitationListResponse, appOidcProvider, appOidcProviderListResponse, createAppOidcProviderRequest, patchAppOidcProviderRequest, appUrlTemplate, allowedOrigin, emailDomain, appAuthConfig, appSignInMethods, appTwoFactorPolicy, appHomeUrl, hostedAccent, HOSTED_LOGO_MAX_BYTES, HOSTED_LOGO_TYPES, appHostedPages, putAppAuthRegistrationRequest, putAppAuthSignInRequest, putAppAuthUrlsRequest, putAppAuthMcpRequest, putAppAuthLookRequest, mailTemplateKind, appMailTemplate, appMailTemplateListResponse, putAppMailTemplateRequest, mailTemplatePreviewRequest, mailTemplatePreviewResponse, mailTemplateProblemDetails, mailOutcome, } from './app-users.js';
69
+ export { APP_USER_DISPLAY_NAME_MAX, APP_URL_PLACEHOLDERS, MAIL_TEMPLATE_VARIABLES, DEFAULT_MAIL_TEMPLATES, providerSlug, appUserStatus, appUser, appUserListResponse, createAppUserRequest, patchAppUserRequest, createAppInvitationRequest, appInvitation, pendingAppInvitation, appInvitationListResponse, appOidcProvider, appOidcProviderListResponse, createAppOidcProviderRequest, patchAppOidcProviderRequest, appUrlTemplate, allowedOrigin, emailDomain, appAuthConfig, appSignInMethods, appTwoFactorPolicy, appHomeUrl, hostedAccent, hostedLogoShape, HOSTED_LOGO_MAX_BYTES, HOSTED_LOGO_TYPES, appHostedPages, putAppAuthRegistrationRequest, putAppAuthSignInRequest, putAppAuthUrlsRequest, putAppAuthMcpRequest, putAppAuthLookRequest, mailTemplateKind, appMailTemplate, appMailTemplateListResponse, putAppMailTemplateRequest, mailTemplatePreviewRequest, mailTemplatePreviewResponse, mailTemplateProblemDetails, mailOutcome, } from './app-users.js';
62
70
  export { assetKind, URDF_ASSET_NAME, asset, urdfCompleteness, assetListResponse, assetsClearResponse, missingAssetQuery, assetSyncRequest, assetSyncResponse, assetSyncState, assetSyncStatus, assetFailure, assetFailureKind, assetStoreRefusedDetails, assetSyncBusyDetails, ROBOT_ASSET_STORE_BYTES, ASSET_FILE_MAX_BYTES, } from './assets.js';
63
71
  export { auditActor, auditEvent, auditQuery, auditListResponse, AUDIT_CSV_COLUMNS, AUDIT_RETENTION_DAYS } from './audit.js';
64
72
  export { alertRowCondition, alertSeverity, alertState, datapointAlertRow, alertListResponse, orgFiringAlertsResponse, orgAlertsQuery, datapointDisplay, putDatapointDisplayRequest, } from './alerts.js';
@@ -70,7 +78,9 @@ fileTooLargeDetails,
70
78
  // 2026-10-04 — billing through Mollie (#104).
71
79
  paymentProviderUnavailableDetails,
72
80
  // 2026-10-19 — Lexware billing documents (fleetless/fleetless#544).
73
- billingDocumentsUnavailableDetails, } from './errors.js';
81
+ billingDocumentsUnavailableDetails,
82
+ // Organization roles.
83
+ roleCycleDetails, } from './errors.js';
74
84
  export { oauthErrorCode, oauthError, oauthRedirectResponse, oauthCodeTokenRequest, oauthRefreshTokenRequest, oauthTokenRequest, oauthTokenResponse, redirectUri, codeChallengeMethod, oauthAuthorizeQuery, dynamicClientRegistrationRequest, MCP_DCR_MAX_REDIRECT_URIS, dynamicClientRegistrationResponse, authorizationServerMetadata, protectedResourceMetadata, } from './oauth.js';
75
85
  export { ROUTES, ROUTE_SECTIONS, IN_HANDLER_ROUTES, developerSignInRoutes } from './routes.js';
76
86
  // 2026-10-02 — plans (#103). The catalogue (I-1) only: `PLANS` and `ADDONS`
@@ -144,6 +144,20 @@ export declare const journalIntentV2Body: z.ZodDiscriminatedUnion<readonly [z.Zo
144
144
  intent_at: z.ZodISODateTime;
145
145
  previous_hash: z.ZodString;
146
146
  signing_key_id: z.ZodString;
147
+ }, z.core.$strict>, z.ZodObject<{
148
+ kind: z.ZodLiteral<"org_role.delete">;
149
+ ids: z.ZodObject<{
150
+ role_id: z.ZodString;
151
+ org_id: z.ZodString;
152
+ }, z.core.$strict>;
153
+ schema: z.ZodLiteral<"fleetless.deletion-intent.v2">;
154
+ environment: z.ZodString;
155
+ generation: z.ZodString;
156
+ sequence: z.ZodNumber;
157
+ operation_id: z.ZodString;
158
+ intent_at: z.ZodISODateTime;
159
+ previous_hash: z.ZodString;
160
+ signing_key_id: z.ZodString;
147
161
  }, z.core.$strict>, z.ZodObject<{
148
162
  kind: z.ZodLiteral<"billing_document_link.remove">;
149
163
  ids: z.ZodObject<{
@@ -970,6 +984,22 @@ export declare const journalIntentV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
970
984
  signing_key_id: z.ZodString;
971
985
  record_hash: z.ZodString;
972
986
  signature: z.ZodString;
987
+ }, z.core.$strict> | z.ZodObject<{
988
+ kind: z.ZodLiteral<"org_role.delete">;
989
+ ids: z.ZodObject<{
990
+ role_id: z.ZodString;
991
+ org_id: z.ZodString;
992
+ }, z.core.$strict>;
993
+ schema: z.ZodLiteral<"fleetless.deletion-intent.v2">;
994
+ environment: z.ZodString;
995
+ generation: z.ZodString;
996
+ sequence: z.ZodNumber;
997
+ operation_id: z.ZodString;
998
+ intent_at: z.ZodISODateTime;
999
+ previous_hash: z.ZodString;
1000
+ signing_key_id: z.ZodString;
1001
+ record_hash: z.ZodString;
1002
+ signature: z.ZodString;
973
1003
  }, z.core.$strict> | z.ZodObject<{
974
1004
  kind: z.ZodLiteral<"billing_document_link.remove">;
975
1005
  ids: z.ZodObject<{
@@ -40,11 +40,14 @@ const branches = [
40
40
  captured('app.delete', z.strictObject(app)),
41
41
  captured('member.remove', z.strictObject({ ...org, user_id: uuid })),
42
42
  captured('app_user.remove', z.strictObject({ ...app, app_user_id: uuid })),
43
+ // Retired: per-app roles no longer exist, so nothing writes this kind. It stays so
44
+ // journals written before still parse and replay (as a no-op).
43
45
  captured('app_role.delete', z.discriminatedUnion('move_mode', [
44
46
  z.strictObject({ ...app, role_id: uuid, move_mode: z.literal('none') }),
45
47
  z.strictObject({ ...app, role_id: uuid, move_mode: z.literal('reassign'), move_to_role_id: uuid }),
46
48
  ])),
47
49
  plain('server_key.revoke', z.strictObject({ ...app, key_id: uuid })),
50
+ plain('org_role.delete', z.strictObject({ ...org, role_id: uuid })),
48
51
  plain('billing_document_link.remove', z.strictObject({ ...org, link_id: uuid })),
49
52
  captured('app_oidc_provider.delete', z.strictObject({ ...app, provider_id: uuid })),
50
53
  plain('team_invitation.revoke', z.strictObject({ ...org, invitation_id: uuid })),
@@ -8,8 +8,8 @@ export type LegalAcceptanceListQuery = z.infer<typeof legalAcceptanceListQuery>;
8
8
  export declare const legalAcceptanceVersionRow: z.ZodObject<{
9
9
  id: z.ZodUUID;
10
10
  context: z.ZodEnum<{
11
- registration: "registration";
12
11
  invitation: "invitation";
12
+ registration: "registration";
13
13
  order: "order";
14
14
  existing_org: "existing_org";
15
15
  amendment: "amendment";
@@ -33,8 +33,8 @@ export declare const legalAcceptanceListResponse: z.ZodObject<{
33
33
  acceptances: z.ZodArray<z.ZodObject<{
34
34
  id: z.ZodUUID;
35
35
  context: z.ZodEnum<{
36
- registration: "registration";
37
36
  invitation: "invitation";
37
+ registration: "registration";
38
38
  order: "order";
39
39
  existing_org: "existing_org";
40
40
  amendment: "amendment";
package/dist/mcp.d.ts CHANGED
@@ -142,8 +142,8 @@ export type McpToolKind = z.infer<typeof mcpToolKind>;
142
142
  export declare const MCP_TOOL_NAME_MAX = 128;
143
143
  export declare const mcpToolNamePattern: RegExp;
144
144
  /**
145
- * One exposure of a robot, as `robots.describe` and the console's per-role
146
- * preview list it. Every exposure the role grants is listed —
145
+ * One exposure of a robot, as `robots.describe` and `GET /api/robots/:id/datasheet`
146
+ * list it. Every exposure the caller's role grants is listed —
147
147
  * a missing `description` is shown as `null`, never used to hide the entry.
148
148
  *
149
149
  * `input_schema` is a JSON Schema document generated from an action's,
@@ -166,9 +166,9 @@ export declare const mcpExposure: z.ZodObject<{
166
166
  input_schema: z.ZodNullable<z.ZodUnknown>;
167
167
  }, z.core.$strip>;
168
168
  export type McpExposure = z.infer<typeof mcpExposure>;
169
- /** The two role capabilities a robot tool can need beyond a slug grant. `presence` is a stream and has no tool. */
169
+ /** The two capabilities of a robot as a whole that a tool can need beyond a slug: its past jobs and its asset files. */
170
170
  export declare const mcpCapabilities: z.ZodObject<{
171
- action_history: z.ZodBoolean;
171
+ job_history: z.ZodBoolean;
172
172
  assets: z.ZodBoolean;
173
173
  }, z.core.$strip>;
174
174
  export type McpCapabilities = z.infer<typeof mcpCapabilities>;
@@ -182,7 +182,7 @@ export declare const mcpRobotDatasheet: z.ZodObject<{
182
182
  robot_id: z.ZodUUID;
183
183
  robot_name: z.ZodString;
184
184
  capabilities: z.ZodObject<{
185
- action_history: z.ZodBoolean;
185
+ job_history: z.ZodBoolean;
186
186
  assets: z.ZodBoolean;
187
187
  }, z.core.$strip>;
188
188
  exposures: z.ZodArray<z.ZodObject<{
@@ -201,38 +201,6 @@ export declare const mcpRobotDatasheet: z.ZodObject<{
201
201
  }, z.core.$strip>>;
202
202
  }, z.core.$strip>;
203
203
  export type McpRobotDatasheet = z.infer<typeof mcpRobotDatasheet>;
204
- /**
205
- * What a developer sees before an end user connects: the datasheet each
206
- * robot of the app would answer for one role. Replaces the per-slug tool
207
- * preview and its `omitted` list — with a fixed catalog there is no tool to
208
- * omit, only exposures to grant.
209
- */
210
- export declare const mcpRolePreviewResponse: z.ZodObject<{
211
- role_id: z.ZodUUID;
212
- robots: z.ZodArray<z.ZodObject<{
213
- robot_id: z.ZodUUID;
214
- robot_name: z.ZodString;
215
- capabilities: z.ZodObject<{
216
- action_history: z.ZodBoolean;
217
- assets: z.ZodBoolean;
218
- }, z.core.$strip>;
219
- exposures: z.ZodArray<z.ZodObject<{
220
- slug: z.ZodString;
221
- kind: z.ZodEnum<{
222
- datapoint: "datapoint";
223
- action: "action";
224
- service: "service";
225
- publisher: "publisher";
226
- camera: "camera";
227
- }>;
228
- description: z.ZodNullable<z.ZodString>;
229
- unit: z.ZodNullable<z.ZodString>;
230
- decimals: z.ZodNullable<z.ZodNumber>;
231
- input_schema: z.ZodNullable<z.ZodUnknown>;
232
- }, z.core.$strip>>;
233
- }, z.core.$strip>>;
234
- }, z.core.$strip>;
235
- export type McpRolePreviewResponse = z.infer<typeof mcpRolePreviewResponse>;
236
204
  /**
237
205
  * Where a signed asset link is served. An MCP session token is refused on
238
206
  * REST by design, so `assets.get`/`assets.urdf` mint a bearer-free link the agent
package/dist/mcp.js CHANGED
@@ -97,8 +97,8 @@ export const mcpToolKind = z.enum(['datapoint', 'service', 'action', 'publisher'
97
97
  export const MCP_TOOL_NAME_MAX = 128;
98
98
  export const mcpToolNamePattern = /^[a-z0-9][a-z0-9_-]*$/;
99
99
  /**
100
- * One exposure of a robot, as `robots.describe` and the console's per-role
101
- * preview list it. Every exposure the role grants is listed —
100
+ * One exposure of a robot, as `robots.describe` and `GET /api/robots/:id/datasheet`
101
+ * list it. Every exposure the caller's role grants is listed —
102
102
  * a missing `description` is shown as `null`, never used to hide the entry.
103
103
  *
104
104
  * `input_schema` is a JSON Schema document generated from an action's,
@@ -122,9 +122,9 @@ export const mcpExposure = z.object({
122
122
  decimals: z.number().int().min(0).max(6).nullable(),
123
123
  input_schema: z.unknown().nullable(),
124
124
  });
125
- /** The two role capabilities a robot tool can need beyond a slug grant. `presence` is a stream and has no tool. */
125
+ /** The two capabilities of a robot as a whole that a tool can need beyond a slug: its past jobs and its asset files. */
126
126
  export const mcpCapabilities = z.object({
127
- action_history: z.boolean(),
127
+ job_history: z.boolean(),
128
128
  assets: z.boolean(),
129
129
  });
130
130
  /**
@@ -139,16 +139,6 @@ export const mcpRobotDatasheet = z.object({
139
139
  capabilities: mcpCapabilities,
140
140
  exposures: z.array(mcpExposure).max(2000),
141
141
  });
142
- /**
143
- * What a developer sees before an end user connects: the datasheet each
144
- * robot of the app would answer for one role. Replaces the per-slug tool
145
- * preview and its `omitted` list — with a fixed catalog there is no tool to
146
- * omit, only exposures to grant.
147
- */
148
- export const mcpRolePreviewResponse = z.object({
149
- role_id: z.uuid(),
150
- robots: z.array(mcpRobotDatasheet).max(500),
151
- });
152
142
  /**
153
143
  * Where a signed asset link is served. An MCP session token is refused on
154
144
  * REST by design, so `assets.get`/`assets.urdf` mint a bearer-free link the agent