@fleetless/contracts 13.3.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.
- package/CHANGELOG.md +141 -0
- package/artifacts/openapi.json +1983 -784
- package/artifacts/routes.json +224 -208
- package/artifacts/schema/access-warning.schema.json +51 -0
- package/artifacts/schema/action-config.schema.json +35 -0
- package/artifacts/schema/app-access-response.schema.json +136 -0
- package/artifacts/schema/app-access.schema.json +80 -0
- package/artifacts/schema/app-deletion-summary.schema.json +0 -7
- package/artifacts/schema/app-invitation-list-response.schema.json +13 -6
- package/artifacts/schema/app-invitation.schema.json +5 -5
- package/artifacts/schema/app-list-response.schema.json +6 -6
- package/artifacts/schema/app-lock.schema.json +30 -0
- package/artifacts/schema/app-user-list-response.schema.json +13 -6
- package/artifacts/schema/app-user.schema.json +13 -6
- package/artifacts/schema/app.schema.json +6 -6
- package/artifacts/schema/auth-ok.schema.json +20 -6
- package/artifacts/schema/camera-list-response.schema.json +1 -1
- package/artifacts/schema/client-identity.schema.json +21 -6
- package/artifacts/schema/cloud-config.schema.json +359 -5
- package/artifacts/schema/config-draft-response.schema.json +359 -5
- package/artifacts/schema/config-version-response.schema.json +359 -5
- package/artifacts/schema/create-app-invitation-request.schema.json +4 -4
- package/artifacts/schema/create-app-user-request.schema.json +4 -4
- package/artifacts/schema/create-org-role-request.schema.json +33 -0
- package/artifacts/schema/dangling-reference.schema.json +129 -0
- package/artifacts/schema/datapoint-config.schema.json +35 -0
- package/artifacts/schema/datapoint-list-response.schema.json +1 -1
- package/artifacts/schema/effective-capability.schema.json +104 -0
- package/artifacts/schema/effective-rights-query.schema.json +19 -0
- package/artifacts/schema/effective-rights-response.schema.json +310 -0
- package/artifacts/schema/effective-robot-rights.schema.json +266 -0
- package/artifacts/schema/invoke-or-service-response.schema.json +1 -1
- package/artifacts/schema/invoke-response.schema.json +1 -1
- package/artifacts/schema/journal-intent-v2-body.schema.json +74 -0
- package/artifacts/schema/journal-intent-v2.schema.json +84 -0
- package/artifacts/schema/journal-replay-receipt-body.schema.json +1 -0
- package/artifacts/schema/journal-replay-receipt.schema.json +1 -0
- package/artifacts/schema/mcp-robot-datasheet.schema.json +2 -2
- package/artifacts/schema/org-role-list-response.schema.json +205 -0
- package/artifacts/schema/org-role.schema.json +59 -0
- package/artifacts/schema/patch-app-user-request.schema.json +4 -4
- package/artifacts/schema/patch-org-role-request.schema.json +38 -0
- package/artifacts/schema/publish-config-response.schema.json +48 -1
- package/artifacts/schema/publisher-config.schema.json +35 -0
- package/artifacts/schema/put-role-defaults-request.schema.json +127 -0
- package/artifacts/schema/reference-place.schema.json +111 -0
- package/artifacts/schema/rename-slug-response.schema.json +4 -3
- package/artifacts/schema/robot-config-doc.schema.json +359 -5
- package/artifacts/schema/role-cycle-details.schema.json +18 -0
- package/artifacts/schema/role-defaults-response.schema.json +59 -0
- package/artifacts/schema/role-rename-preview.schema.json +146 -0
- package/artifacts/schema/service-config.schema.json +35 -0
- package/artifacts/schema/slug-usage-response.schema.json +4 -3
- package/artifacts/schema/update-app-request.schema.json +0 -12
- package/dist/app-users.d.ts +11 -8
- package/dist/app-users.js +18 -10
- package/dist/apps.d.ts +242 -71
- package/dist/apps.js +205 -151
- package/dist/audit.d.ts +3 -3
- package/dist/billing.d.ts +10 -10
- package/dist/client-auth.d.ts +5 -2
- package/dist/client-auth.js +11 -3
- package/dist/client-robots.d.ts +1 -1
- package/dist/client-robots.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/config-issues.d.ts +1 -1
- package/dist/config-issues.js +1 -1
- package/dist/config.d.ts +77 -11
- package/dist/config.js +108 -14
- package/dist/errors.d.ts +14 -5
- package/dist/errors.js +37 -24
- package/dist/index.d.ts +18 -8
- package/dist/index.js +14 -4
- package/dist/journal-intents.d.ts +30 -0
- package/dist/journal-intents.js +3 -0
- package/dist/legal-acceptances.d.ts +2 -2
- package/dist/mcp.d.ts +5 -37
- package/dist/mcp.js +4 -14
- package/dist/org-roles.d.ts +182 -0
- package/dist/org-roles.js +198 -0
- package/dist/plans.d.ts +6 -6
- package/dist/protocol.d.ts +19 -1
- package/dist/realtime.d.ts +6 -3
- package/dist/realtime.js +1 -1
- package/dist/rest.d.ts +76 -25
- package/dist/rest.js +41 -29
- package/dist/rights.d.ts +197 -0
- package/dist/rights.js +396 -0
- package/dist/routes.js +185 -134
- package/package.json +1 -1
- package/artifacts/schema/mcp-role-preview-response.schema.json +0 -134
- package/artifacts/schema/role-delete-query.schema.json +0 -13
- package/artifacts/schema/role-in-use-details.schema.json +0 -28
- package/artifacts/schema/role-list-response.schema.json +0 -48
- package/artifacts/schema/role-permissions.schema.json +0 -61
- package/artifacts/schema/role-rename-request.schema.json +0 -16
- 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
|
-
//
|
|
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
|
|
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 `
|
|
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
|
-
|
|
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
|
-
*
|
|
693
|
-
*
|
|
694
|
-
*
|
|
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
|
-
*
|
|
697
|
-
*
|
|
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
|
-
'
|
|
712
|
+
'role_cycle',
|
|
700
713
|
/**
|
|
701
|
-
*
|
|
702
|
-
*
|
|
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
|
-
'
|
|
717
|
+
'role_key_taken',
|
|
710
718
|
/**
|
|
711
|
-
*
|
|
712
|
-
*
|
|
713
|
-
*
|
|
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
|
-
*
|
|
716
|
-
*
|
|
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
|
-
'
|
|
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,
|
|
17
|
-
export type { McpAppPaths, McpToolKind, McpExposure, McpCapabilities, McpRobotDatasheet,
|
|
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,6 +31,16 @@ 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
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';
|
|
@@ -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,
|
|
51
|
-
export type { App, AppListResponse, AppDeletionSummary, CreateAppRequest, UpdateAppRequest, ServerKey, ServerKeyListResponse, CreateServerKeyResponse,
|
|
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';
|
|
@@ -65,8 +75,8 @@ export { auditActor, auditEvent, auditQuery, auditListResponse, AUDIT_CSV_COLUMN
|
|
|
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,
|
|
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,6 +25,14 @@ 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
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.
|
|
@@ -52,7 +60,7 @@ 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,
|
|
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';
|
|
@@ -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,
|
|
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<{
|
package/dist/journal-intents.js
CHANGED
|
@@ -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
|
|
146
|
-
*
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
101
|
-
*
|
|
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
|
|
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
|
-
|
|
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
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
/**
|
|
4
|
+
* A place that writes a role key, as the role list, the rename preview and
|
|
5
|
+
* the dangling-reference list all name it.
|
|
6
|
+
*
|
|
7
|
+
* One flat shape for every kind, with `null` for what a kind does not have,
|
|
8
|
+
* so a client renders a row without switching on `kind` to find a field.
|
|
9
|
+
*/
|
|
10
|
+
export declare const referencePlace: z.ZodObject<{
|
|
11
|
+
kind: z.ZodEnum<{
|
|
12
|
+
org_default: "org_default";
|
|
13
|
+
app_user: "app_user";
|
|
14
|
+
config: "config";
|
|
15
|
+
invitation: "invitation";
|
|
16
|
+
app_default: "app_default";
|
|
17
|
+
role_inherits: "role_inherits";
|
|
18
|
+
}>;
|
|
19
|
+
label: z.ZodString;
|
|
20
|
+
path: z.ZodNullable<z.ZodString>;
|
|
21
|
+
robot_id: z.ZodNullable<z.ZodUUID>;
|
|
22
|
+
app_id: z.ZodNullable<z.ZodUUID>;
|
|
23
|
+
user_id: z.ZodNullable<z.ZodUUID>;
|
|
24
|
+
document: z.ZodNullable<z.ZodEnum<{
|
|
25
|
+
published: "published";
|
|
26
|
+
draft: "draft";
|
|
27
|
+
}>>;
|
|
28
|
+
new_version: z.ZodNullable<z.ZodNumber>;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
export type ReferencePlace = z.infer<typeof referencePlace>;
|
|
31
|
+
/** One role as `GET /api/org/roles` lists it, with how much depends on it. */
|
|
32
|
+
export declare const orgRole: z.ZodObject<{
|
|
33
|
+
key: z.ZodString;
|
|
34
|
+
name: z.ZodString;
|
|
35
|
+
inherits: z.ZodArray<z.ZodString>;
|
|
36
|
+
users: z.ZodNumber;
|
|
37
|
+
invitations: z.ZodNumber;
|
|
38
|
+
app_defaults: z.ZodNumber;
|
|
39
|
+
references: z.ZodNumber;
|
|
40
|
+
}, z.core.$strip>;
|
|
41
|
+
export type OrgRole = z.infer<typeof orgRole>;
|
|
42
|
+
/** A key that is written somewhere and is no role, with every place that writes it. */
|
|
43
|
+
export declare const danglingReference: z.ZodObject<{
|
|
44
|
+
key: z.ZodString;
|
|
45
|
+
places: z.ZodArray<z.ZodObject<{
|
|
46
|
+
kind: z.ZodEnum<{
|
|
47
|
+
org_default: "org_default";
|
|
48
|
+
app_user: "app_user";
|
|
49
|
+
config: "config";
|
|
50
|
+
invitation: "invitation";
|
|
51
|
+
app_default: "app_default";
|
|
52
|
+
role_inherits: "role_inherits";
|
|
53
|
+
}>;
|
|
54
|
+
label: z.ZodString;
|
|
55
|
+
path: z.ZodNullable<z.ZodString>;
|
|
56
|
+
robot_id: z.ZodNullable<z.ZodUUID>;
|
|
57
|
+
app_id: z.ZodNullable<z.ZodUUID>;
|
|
58
|
+
user_id: z.ZodNullable<z.ZodUUID>;
|
|
59
|
+
document: z.ZodNullable<z.ZodEnum<{
|
|
60
|
+
published: "published";
|
|
61
|
+
draft: "draft";
|
|
62
|
+
}>>;
|
|
63
|
+
new_version: z.ZodNullable<z.ZodNumber>;
|
|
64
|
+
}, z.core.$strip>>;
|
|
65
|
+
}, z.core.$strip>;
|
|
66
|
+
export type DanglingReference = z.infer<typeof danglingReference>;
|
|
67
|
+
/** What `GET /api/org/roles` answers. */
|
|
68
|
+
export declare const orgRoleListResponse: z.ZodObject<{
|
|
69
|
+
roles: z.ZodArray<z.ZodObject<{
|
|
70
|
+
key: z.ZodString;
|
|
71
|
+
name: z.ZodString;
|
|
72
|
+
inherits: z.ZodArray<z.ZodString>;
|
|
73
|
+
users: z.ZodNumber;
|
|
74
|
+
invitations: z.ZodNumber;
|
|
75
|
+
app_defaults: z.ZodNumber;
|
|
76
|
+
references: z.ZodNumber;
|
|
77
|
+
}, z.core.$strip>>;
|
|
78
|
+
dangling: z.ZodArray<z.ZodObject<{
|
|
79
|
+
key: z.ZodString;
|
|
80
|
+
places: z.ZodArray<z.ZodObject<{
|
|
81
|
+
kind: z.ZodEnum<{
|
|
82
|
+
org_default: "org_default";
|
|
83
|
+
app_user: "app_user";
|
|
84
|
+
config: "config";
|
|
85
|
+
invitation: "invitation";
|
|
86
|
+
app_default: "app_default";
|
|
87
|
+
role_inherits: "role_inherits";
|
|
88
|
+
}>;
|
|
89
|
+
label: z.ZodString;
|
|
90
|
+
path: z.ZodNullable<z.ZodString>;
|
|
91
|
+
robot_id: z.ZodNullable<z.ZodUUID>;
|
|
92
|
+
app_id: z.ZodNullable<z.ZodUUID>;
|
|
93
|
+
user_id: z.ZodNullable<z.ZodUUID>;
|
|
94
|
+
document: z.ZodNullable<z.ZodEnum<{
|
|
95
|
+
published: "published";
|
|
96
|
+
draft: "draft";
|
|
97
|
+
}>>;
|
|
98
|
+
new_version: z.ZodNullable<z.ZodNumber>;
|
|
99
|
+
}, z.core.$strip>>;
|
|
100
|
+
}, z.core.$strip>>;
|
|
101
|
+
}, z.core.$strip>;
|
|
102
|
+
export type OrgRoleListResponse = z.infer<typeof orgRoleListResponse>;
|
|
103
|
+
/** `POST /api/org/roles`: a new role. Strict, so a field this route does not take is refused rather than dropped. */
|
|
104
|
+
export declare const createOrgRoleRequest: z.ZodObject<{
|
|
105
|
+
key: z.ZodString;
|
|
106
|
+
name: z.ZodString;
|
|
107
|
+
inherits: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
108
|
+
}, z.core.$strict>;
|
|
109
|
+
export type CreateOrgRoleRequest = z.infer<typeof createOrgRoleRequest>;
|
|
110
|
+
/**
|
|
111
|
+
* `PATCH /api/org/roles/:key`: change a role. Absent leaves a field alone.
|
|
112
|
+
*
|
|
113
|
+
* At least one field is required: an empty patch is a caller mistake, not a
|
|
114
|
+
* request to do nothing. `update_references` and `confirm` only mean something
|
|
115
|
+
* together with `key`.
|
|
116
|
+
*
|
|
117
|
+
* The one-field rule is a `.refine()`, which JSON Schema cannot express, so
|
|
118
|
+
* `patch-org-role-request.schema.json` describes five independent optional
|
|
119
|
+
* fields; the cloud is the only place an empty patch is refused.
|
|
120
|
+
*/
|
|
121
|
+
export declare const patchOrgRoleRequest: z.ZodObject<{
|
|
122
|
+
name: z.ZodOptional<z.ZodString>;
|
|
123
|
+
inherits: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
124
|
+
key: z.ZodOptional<z.ZodString>;
|
|
125
|
+
update_references: z.ZodOptional<z.ZodBoolean>;
|
|
126
|
+
confirm: z.ZodOptional<z.ZodString>;
|
|
127
|
+
}, z.core.$strict>;
|
|
128
|
+
export type PatchOrgRoleRequest = z.infer<typeof patchOrgRoleRequest>;
|
|
129
|
+
/**
|
|
130
|
+
* What a rename with `update_references` would rewrite: the `details` of the
|
|
131
|
+
* `409 confirmation_required` that answers it. Repeating the same request with
|
|
132
|
+
* `confirm` set to this token applies the rename.
|
|
133
|
+
*/
|
|
134
|
+
export declare const roleRenamePreview: z.ZodObject<{
|
|
135
|
+
from: z.ZodString;
|
|
136
|
+
to: z.ZodString;
|
|
137
|
+
references: z.ZodArray<z.ZodObject<{
|
|
138
|
+
kind: z.ZodEnum<{
|
|
139
|
+
org_default: "org_default";
|
|
140
|
+
app_user: "app_user";
|
|
141
|
+
config: "config";
|
|
142
|
+
invitation: "invitation";
|
|
143
|
+
app_default: "app_default";
|
|
144
|
+
role_inherits: "role_inherits";
|
|
145
|
+
}>;
|
|
146
|
+
label: z.ZodString;
|
|
147
|
+
path: z.ZodNullable<z.ZodString>;
|
|
148
|
+
robot_id: z.ZodNullable<z.ZodUUID>;
|
|
149
|
+
app_id: z.ZodNullable<z.ZodUUID>;
|
|
150
|
+
user_id: z.ZodNullable<z.ZodUUID>;
|
|
151
|
+
document: z.ZodNullable<z.ZodEnum<{
|
|
152
|
+
published: "published";
|
|
153
|
+
draft: "draft";
|
|
154
|
+
}>>;
|
|
155
|
+
new_version: z.ZodNullable<z.ZodNumber>;
|
|
156
|
+
}, z.core.$strip>>;
|
|
157
|
+
reference_count: z.ZodNumber;
|
|
158
|
+
confirm: z.ZodString;
|
|
159
|
+
}, z.core.$strip>;
|
|
160
|
+
export type RoleRenamePreview = z.infer<typeof roleRenamePreview>;
|
|
161
|
+
/** What `GET` and `PUT /api/org/roles/defaults` answer: who holds each kind of access when a robot's configuration says nothing. */
|
|
162
|
+
export declare const roleDefaultsResponse: z.ZodObject<{
|
|
163
|
+
defaults: z.ZodObject<{
|
|
164
|
+
read: z.ZodArray<z.ZodString>;
|
|
165
|
+
invoke: z.ZodArray<z.ZodString>;
|
|
166
|
+
publish: z.ZodArray<z.ZodString>;
|
|
167
|
+
assets: z.ZodArray<z.ZodString>;
|
|
168
|
+
job_history: z.ZodArray<z.ZodString>;
|
|
169
|
+
}, z.core.$strip>;
|
|
170
|
+
}, z.core.$strip>;
|
|
171
|
+
export type RoleDefaultsResponse = z.infer<typeof roleDefaultsResponse>;
|
|
172
|
+
/** `PUT /api/org/roles/defaults`: change some defaults and leave the others as they are. */
|
|
173
|
+
export declare const putRoleDefaultsRequest: z.ZodObject<{
|
|
174
|
+
defaults: z.ZodObject<{
|
|
175
|
+
read: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNull]>>;
|
|
176
|
+
invoke: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNull]>>;
|
|
177
|
+
publish: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNull]>>;
|
|
178
|
+
assets: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNull]>>;
|
|
179
|
+
job_history: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNull]>>;
|
|
180
|
+
}, z.core.$strict>;
|
|
181
|
+
}, z.core.$strict>;
|
|
182
|
+
export type PutRoleDefaultsRequest = z.infer<typeof putRoleDefaultsRequest>;
|