@fleetless/sdk 4.6.1 → 5.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/dist/index.d.cts CHANGED
@@ -3,8 +3,8 @@ import { z } from 'zod';
3
3
 
4
4
 
5
5
  /**
6
- * One exposure of a robot, as `robots.describe` and the console's per-role
7
- * preview list it. Every exposure the role grants is listed —
6
+ * One exposure of a robot, as `robots.describe` and `GET /api/robots/:id/datasheet`
7
+ * list it. Every exposure the caller's role grants is listed —
8
8
  * a missing `description` is shown as `null`, never used to hide the entry.
9
9
  *
10
10
  * `input_schema` is a JSON Schema document generated from an action's,
@@ -27,9 +27,9 @@ declare const mcpExposure: z.ZodObject<{
27
27
  input_schema: z.ZodNullable<z.ZodUnknown>;
28
28
  }, z.core.$strip>;
29
29
  type McpExposure$1 = z.infer<typeof mcpExposure>;
30
- /** The two role capabilities a robot tool can need beyond a slug grant. `presence` is a stream and has no tool. */
30
+ /** The two capabilities of a robot as a whole that a tool can need beyond a slug: its past jobs and its asset files. */
31
31
  declare const mcpCapabilities: z.ZodObject<{
32
- action_history: z.ZodBoolean;
32
+ job_history: z.ZodBoolean;
33
33
  assets: z.ZodBoolean;
34
34
  }, z.core.$strip>;
35
35
  type McpCapabilities$1 = z.infer<typeof mcpCapabilities>;
@@ -43,7 +43,7 @@ declare const mcpRobotDatasheet: z.ZodObject<{
43
43
  robot_id: z.ZodUUID;
44
44
  robot_name: z.ZodString;
45
45
  capabilities: z.ZodObject<{
46
- action_history: z.ZodBoolean;
46
+ job_history: z.ZodBoolean;
47
47
  assets: z.ZodBoolean;
48
48
  }, z.core.$strip>;
49
49
  exposures: z.ZodArray<z.ZodObject<{
@@ -608,7 +608,7 @@ type McpConsentGrant = z.infer<typeof mcpConsentGrant>;
608
608
  * client API and appears in the audit as the developer, and the console's own
609
609
  * live views subscribe on `/realtime` as one. A developer is **org-scoped, not
610
610
  * app-scoped** — they own the configuration of every robot in their org — so
611
- * `app_id` and `role_id` are null for them, and roles do not filter what they
611
+ * `app_id` and `role` are null for them, and roles do not filter what they
612
612
  * see. `kind` states this explicitly rather than leaving it to be inferred from
613
613
  * which id happens to be set.
614
614
  *
@@ -635,7 +635,10 @@ declare const clientIdentity: z.ZodObject<{
635
635
  app_user_id: z.ZodNullable<z.ZodUUID>;
636
636
  server_key_id: z.ZodNullable<z.ZodUUID>;
637
637
  app_id: z.ZodNullable<z.ZodUUID>;
638
- role_id: z.ZodNullable<z.ZodUUID>;
638
+ role: z.ZodNullable<z.ZodObject<{
639
+ key: z.ZodString;
640
+ name: z.ZodString;
641
+ }, z.core.$strip>>;
639
642
  email: z.ZodNullable<z.ZodEmail>;
640
643
  two_factor_enabled: z.ZodNullable<z.ZodBoolean>;
641
644
  }, z.core.$strip>;
@@ -649,7 +652,7 @@ type ClientIdentity = z.infer<typeof clientIdentity>;
649
652
  *
650
653
  * Deliberately not `robotListItem`: that one carries `exposes`, the per-kind
651
654
  * counts a developer's list shows, which are a configuration fact rather than
652
- * something an app user's role grants. What an app user is entitled to is the
655
+ * something an app user's role decides. What an app user is entitled to is the
653
656
  * robot, its bridge state, and whether anything is published on it yet.
654
657
  */
655
658
  declare const clientRobotListItem: z.ZodObject<{
@@ -737,6 +740,10 @@ declare const assetSyncStatus: z.ZodObject<{
737
740
  used_bytes: z.ZodNumber;
738
741
  size_bytes: z.ZodNumber;
739
742
  }, z.core.$strip>>>;
743
+ file_limit: z.ZodOptional<z.ZodNullable<z.ZodObject<{
744
+ max_bytes: z.ZodNumber;
745
+ size_bytes: z.ZodNullable<z.ZodNumber>;
746
+ }, z.core.$strip>>>;
740
747
  }, z.core.$strip>>;
741
748
  reason: z.ZodNullable<z.ZodString>;
742
749
  stored: z.ZodNullable<z.ZodNumber>;
@@ -782,6 +789,10 @@ declare const assetListResponse: z.ZodObject<{
782
789
  used_bytes: z.ZodNumber;
783
790
  size_bytes: z.ZodNumber;
784
791
  }, z.core.$strip>>>;
792
+ file_limit: z.ZodOptional<z.ZodNullable<z.ZodObject<{
793
+ max_bytes: z.ZodNumber;
794
+ size_bytes: z.ZodNullable<z.ZodNumber>;
795
+ }, z.core.$strip>>>;
785
796
  }, z.core.$strip>>;
786
797
  reason: z.ZodNullable<z.ZodString>;
787
798
  stored: z.ZodNullable<z.ZodNumber>;
@@ -867,7 +878,7 @@ type CancelRejectedDetails = z.infer<typeof cancelRejectedDetails>;
867
878
  * list is the shared vocabulary, not a closed set, so a new refusal never
868
879
  * needs a contracts release before it can be reported honestly.
869
880
  */
870
- declare const ERROR_CODES: readonly ["not_found", "validation_error", "bad_request", "unknown_datapoint", "invalid_token", "protocol_mismatch", "bridge_too_old", "invalid_frame", "duplicate_slug", "reserved_slug", "unknown_slug", "unknown_field_path", "unknown_type", "unknown_topic", "invalid_rate", "invalid_range", "config_conflict", "no_data", "robot_offline", "bridge_timeout", "unauthorized", "forbidden", "invalid_credentials", "token_expired", "token_revoked", "email_taken", "identifier_taken", "weak_password", "account_blocked", "busy", "parameter_invalid", "cancel_rejected", "job_lost", "operator_verified_stopped", "job_unknown_to_bridge", "action_server_lost", "action_failed", "goal_rejected", "goal_send_failed", "result_failed", "goal_uncontrollable", "bridge_disconnected", "config_changed", "publisher_busy", "unknown_command", "not_subscribable", "camera_offline", "no_snapshot_yet", "live_unavailable", "wrong_kind", "not_recorded", "not_aggregatable", "quota_exceeded", "credential_in_use", "goal_timeout", "robot_in_use", "robot_deletion_partial", "job_queue_full", "invalid_uuid", "rate_limited", "tier_required", "token_spent", "service_timeout", "asset_missing", "dynamic_registration_disabled", "client_limit_reached", "idp_unavailable", "mcp_disabled", "tool_not_available", "capability_required", "last_owner", "role_name_taken", "role_in_use", "last_role", "target_state_conflict", "job_state_conflict", "signup_closed", "draft_not_a_document", "internal_error", "not_cancellable", "unsupported_media_type", "wrong_browser", "invalid_yaml", "unstorable_yaml", "registration_closed", "domain_not_allowed", "email_unverified", "origin_not_allowed", "template_invalid", "provider_disabled", "provider_misconfigured", "invalid_redirect_uri", "interaction_expired", "invalid_code", "method_not_allowed", "plan_limit", "plan_required", "org_locked", "file_too_large", "billing_unavailable", "payment_provider_unavailable", "history_migrating", "billing_documents_unavailable", "support_read_only", "support_forbidden"];
881
+ declare const ERROR_CODES: readonly ["not_found", "validation_error", "bad_request", "unknown_datapoint", "invalid_token", "protocol_mismatch", "bridge_too_old", "invalid_frame", "duplicate_slug", "reserved_slug", "unknown_slug", "unknown_field_path", "unknown_type", "unknown_topic", "invalid_rate", "invalid_range", "config_conflict", "no_data", "robot_offline", "bridge_timeout", "unauthorized", "forbidden", "invalid_credentials", "token_expired", "token_revoked", "email_taken", "identifier_taken", "weak_password", "account_blocked", "busy", "parameter_invalid", "cancel_rejected", "job_lost", "operator_verified_stopped", "job_unknown_to_bridge", "action_server_lost", "action_failed", "goal_rejected", "goal_send_failed", "result_failed", "goal_uncontrollable", "bridge_disconnected", "config_changed", "publisher_busy", "unknown_command", "not_subscribable", "camera_offline", "no_snapshot_yet", "live_unavailable", "wrong_kind", "not_recorded", "not_aggregatable", "quota_exceeded", "credential_in_use", "goal_timeout", "robot_in_use", "robot_deletion_partial", "job_queue_full", "invalid_uuid", "rate_limited", "tier_required", "token_spent", "service_timeout", "asset_missing", "dynamic_registration_disabled", "client_limit_reached", "idp_unavailable", "mcp_disabled", "tool_not_available", "capability_required", "last_owner", "role_cycle", "role_key_taken", "confirmation_required", "target_state_conflict", "job_state_conflict", "signup_closed", "draft_not_a_document", "internal_error", "not_cancellable", "unsupported_media_type", "wrong_browser", "invalid_yaml", "unstorable_yaml", "registration_closed", "domain_not_allowed", "email_unverified", "origin_not_allowed", "template_invalid", "provider_disabled", "provider_misconfigured", "invalid_redirect_uri", "interaction_expired", "invalid_code", "method_not_allowed", "plan_limit", "plan_required", "org_locked", "file_too_large", "billing_unavailable", "legal_offer_unavailable", "payment_provider_unavailable", "history_migrating", "billing_documents_unavailable", "support_read_only", "support_forbidden"];
871
882
  type ErrorCode = (typeof ERROR_CODES)[number];
872
883
 
873
884
  /**
@@ -890,12 +901,13 @@ type ErrorCode = (typeof ERROR_CODES)[number];
890
901
  * to wait forever for that.
891
902
  * - `command_outcome_unknown`: worse than a timeout, and told apart from it
892
903
  * on purpose — the connection that carried the command was replaced by a
893
- * new one (a reconnect) before any reply arrived. The server, if it
894
- * answered at all, answered a socket that no longer exists, so the
895
- * command may or may not have run. Never retried automatically — that
896
- * could run an action twice — the caller recovers by reading the job
897
- * (e.g. `actions.subscribe`), since state is observed by slug regardless
898
- * of which connection asked for it.
904
+ * new one (a reconnect), or ended because its credential is no longer
905
+ * valid, before any reply arrived. The server, if it answered at all,
906
+ * answered a socket that no longer exists, so the command may or may not
907
+ * have run. Never retried automatically — that could run an action
908
+ * twice — the caller recovers by reading the job (e.g.
909
+ * `actions.subscribe`), since state is observed by slug regardless of which
910
+ * connection asked for it.
899
911
  * - `unexpected_response`: the server answered `ok:true` but left out
900
912
  * something the command is defined to always return (e.g. no `job` on a
901
913
  * successful `invoke`) — a contract violation the SDK noticed, not a
@@ -1926,6 +1938,11 @@ interface AuthApi {
1926
1938
  * Who the caller turned out to be, without decoding a token client-side —
1927
1939
  * which is how apps end up trusting claims nobody verified.
1928
1940
  *
1941
+ * `role` is `{ key, name }` of the organization role the caller holds, and
1942
+ * `null` when there is none to name: a developer, a server key, and an app
1943
+ * user whose role has since been deleted, who can still sign in but reaches
1944
+ * nothing. Show `name`; compare `key`.
1945
+ *
1929
1946
  * Throws the SDK's own `no_session` **before any request is sent** when
1930
1947
  * nothing is stored — which is exactly the state a sign-in step leaves a
1931
1948
  * caller in while a second factor is still pending (see `SignInResult`):
@@ -2470,10 +2487,10 @@ interface JobsApi {
2470
2487
  *
2471
2488
  * At most one entry per slug: the current job there, same as a per-slug
2472
2489
  * read would answer. Not a history endpoint — that is `history` below.
2473
- * Grant-filtered same as `cameras.list`/`datapoints` — an end user or
2474
- * server key sees only jobs on slugs their role grants, a developer
2475
- * session sees every job on the robot. Never empty-vs-missing ambiguity:
2476
- * a robot doing nothing resolves `[]`.
2490
+ * Grant-filtered same as `cameras.list`/`datapoints` — an end user sees
2491
+ * only jobs on slugs their role grants, a server key every job on slugs its
2492
+ * app does not lock, a developer session every job on the robot. Never
2493
+ * empty-vs-missing ambiguity: a robot doing nothing resolves `[]`.
2477
2494
  *
2478
2495
  * **Ordered newest first by `started_at`, with `job.seq` as the
2479
2496
  * tiebreaker** (`started_at` alone is not a total order — two jobs minted
@@ -2491,7 +2508,7 @@ interface JobsApi {
2491
2508
  * durable `seq`, with its actor, its outcome and its `duration_ms`, kept
2492
2509
  * for 90 days. The durable counterpart of `list`.
2493
2510
  *
2494
- * **Needs the `action_history` capability** on the caller's role, or it
2511
+ * **Needs the `job_history` capability** for the caller's role, or it
2495
2512
  * rejects `capability_required`. An app user sees only runs on the slugs
2496
2513
  * their role grants; a developer session sees the whole robot.
2497
2514
  *
@@ -2543,9 +2560,11 @@ interface PublishersApi {
2543
2560
  */
2544
2561
  type McpExposure = McpExposure$1;
2545
2562
  /**
2546
- * The two role capabilities a datasheet names beyond slugs: `action_history`
2547
- * (may `jobs.history` be read) and `assets` (may the URDF and meshes be read).
2548
- * The wire shape is contracts' `mcpCapabilities`.
2563
+ * The two capabilities of a robot as a whole that a datasheet names beyond
2564
+ * slugs: `job_history` (may `jobs.history` be read) and `assets` (may the URDF
2565
+ * and meshes be read). The robot's `access` section decides which roles hold
2566
+ * them, else the organization's defaults, less what the app locks. The wire
2567
+ * shape is contracts' `mcpCapabilities`.
2549
2568
  */
2550
2569
  type McpCapabilities = McpCapabilities$1;
2551
2570
  /**
@@ -2563,18 +2582,19 @@ interface RobotsApi {
2563
2582
  * The robots this caller reaches, in name order with the id as the tiebreak.
2564
2583
  *
2565
2584
  * An app user reaches the robots their app attaches on which their role
2566
- * grants at least one slug or capability; a server key reaches every robot
2567
- * its app attaches. A robot the role grants nothing on is absent rather
2568
- * than listed empty — reach is a grant, not an attachment — so a new app
2569
- * whose built-in roles grant nothing yet resolves `[]`, and that is the
2570
- * console's Roles tab talking, not a broken login.
2585
+ * holds at least one slug or capability once the app's locks are taken off;
2586
+ * a server key reaches every robot its app attaches that the locks leave
2587
+ * something on. A robot nothing is granted on is absent rather than listed
2588
+ * empty — reach is a grant, not an attachment — so an app user whose role
2589
+ * holds nothing resolves `[]`, which is the robots' access rules talking, not
2590
+ * a broken login.
2571
2591
  */
2572
2592
  list(): Promise<ClientRobotListItem[]>;
2573
2593
  /**
2574
2594
  * Everything the caller's role lets them do on one robot: every granted
2575
2595
  * datapoint (with `unit` and `decimals`), action, service and publisher
2576
2596
  * (with the parameter JSON Schema under `input_schema`) and camera, plus
2577
- * the two capabilities that gate whole features, `action_history` and
2597
+ * the two capabilities that gate whole features, `job_history` and
2578
2598
  * `assets`. A robot with nothing published resolves an empty `exposures`
2579
2599
  * list. One the caller does not reach rejects `not_found`, exactly as a
2580
2600
  * robot that does not exist — never `forbidden`, which would say it exists.
package/dist/index.d.ts CHANGED
@@ -3,8 +3,8 @@ import { z } from 'zod';
3
3
 
4
4
 
5
5
  /**
6
- * One exposure of a robot, as `robots.describe` and the console's per-role
7
- * preview list it. Every exposure the role grants is listed —
6
+ * One exposure of a robot, as `robots.describe` and `GET /api/robots/:id/datasheet`
7
+ * list it. Every exposure the caller's role grants is listed —
8
8
  * a missing `description` is shown as `null`, never used to hide the entry.
9
9
  *
10
10
  * `input_schema` is a JSON Schema document generated from an action's,
@@ -27,9 +27,9 @@ declare const mcpExposure: z.ZodObject<{
27
27
  input_schema: z.ZodNullable<z.ZodUnknown>;
28
28
  }, z.core.$strip>;
29
29
  type McpExposure$1 = z.infer<typeof mcpExposure>;
30
- /** The two role capabilities a robot tool can need beyond a slug grant. `presence` is a stream and has no tool. */
30
+ /** The two capabilities of a robot as a whole that a tool can need beyond a slug: its past jobs and its asset files. */
31
31
  declare const mcpCapabilities: z.ZodObject<{
32
- action_history: z.ZodBoolean;
32
+ job_history: z.ZodBoolean;
33
33
  assets: z.ZodBoolean;
34
34
  }, z.core.$strip>;
35
35
  type McpCapabilities$1 = z.infer<typeof mcpCapabilities>;
@@ -43,7 +43,7 @@ declare const mcpRobotDatasheet: z.ZodObject<{
43
43
  robot_id: z.ZodUUID;
44
44
  robot_name: z.ZodString;
45
45
  capabilities: z.ZodObject<{
46
- action_history: z.ZodBoolean;
46
+ job_history: z.ZodBoolean;
47
47
  assets: z.ZodBoolean;
48
48
  }, z.core.$strip>;
49
49
  exposures: z.ZodArray<z.ZodObject<{
@@ -608,7 +608,7 @@ type McpConsentGrant = z.infer<typeof mcpConsentGrant>;
608
608
  * client API and appears in the audit as the developer, and the console's own
609
609
  * live views subscribe on `/realtime` as one. A developer is **org-scoped, not
610
610
  * app-scoped** — they own the configuration of every robot in their org — so
611
- * `app_id` and `role_id` are null for them, and roles do not filter what they
611
+ * `app_id` and `role` are null for them, and roles do not filter what they
612
612
  * see. `kind` states this explicitly rather than leaving it to be inferred from
613
613
  * which id happens to be set.
614
614
  *
@@ -635,7 +635,10 @@ declare const clientIdentity: z.ZodObject<{
635
635
  app_user_id: z.ZodNullable<z.ZodUUID>;
636
636
  server_key_id: z.ZodNullable<z.ZodUUID>;
637
637
  app_id: z.ZodNullable<z.ZodUUID>;
638
- role_id: z.ZodNullable<z.ZodUUID>;
638
+ role: z.ZodNullable<z.ZodObject<{
639
+ key: z.ZodString;
640
+ name: z.ZodString;
641
+ }, z.core.$strip>>;
639
642
  email: z.ZodNullable<z.ZodEmail>;
640
643
  two_factor_enabled: z.ZodNullable<z.ZodBoolean>;
641
644
  }, z.core.$strip>;
@@ -649,7 +652,7 @@ type ClientIdentity = z.infer<typeof clientIdentity>;
649
652
  *
650
653
  * Deliberately not `robotListItem`: that one carries `exposes`, the per-kind
651
654
  * counts a developer's list shows, which are a configuration fact rather than
652
- * something an app user's role grants. What an app user is entitled to is the
655
+ * something an app user's role decides. What an app user is entitled to is the
653
656
  * robot, its bridge state, and whether anything is published on it yet.
654
657
  */
655
658
  declare const clientRobotListItem: z.ZodObject<{
@@ -737,6 +740,10 @@ declare const assetSyncStatus: z.ZodObject<{
737
740
  used_bytes: z.ZodNumber;
738
741
  size_bytes: z.ZodNumber;
739
742
  }, z.core.$strip>>>;
743
+ file_limit: z.ZodOptional<z.ZodNullable<z.ZodObject<{
744
+ max_bytes: z.ZodNumber;
745
+ size_bytes: z.ZodNullable<z.ZodNumber>;
746
+ }, z.core.$strip>>>;
740
747
  }, z.core.$strip>>;
741
748
  reason: z.ZodNullable<z.ZodString>;
742
749
  stored: z.ZodNullable<z.ZodNumber>;
@@ -782,6 +789,10 @@ declare const assetListResponse: z.ZodObject<{
782
789
  used_bytes: z.ZodNumber;
783
790
  size_bytes: z.ZodNumber;
784
791
  }, z.core.$strip>>>;
792
+ file_limit: z.ZodOptional<z.ZodNullable<z.ZodObject<{
793
+ max_bytes: z.ZodNumber;
794
+ size_bytes: z.ZodNullable<z.ZodNumber>;
795
+ }, z.core.$strip>>>;
785
796
  }, z.core.$strip>>;
786
797
  reason: z.ZodNullable<z.ZodString>;
787
798
  stored: z.ZodNullable<z.ZodNumber>;
@@ -867,7 +878,7 @@ type CancelRejectedDetails = z.infer<typeof cancelRejectedDetails>;
867
878
  * list is the shared vocabulary, not a closed set, so a new refusal never
868
879
  * needs a contracts release before it can be reported honestly.
869
880
  */
870
- declare const ERROR_CODES: readonly ["not_found", "validation_error", "bad_request", "unknown_datapoint", "invalid_token", "protocol_mismatch", "bridge_too_old", "invalid_frame", "duplicate_slug", "reserved_slug", "unknown_slug", "unknown_field_path", "unknown_type", "unknown_topic", "invalid_rate", "invalid_range", "config_conflict", "no_data", "robot_offline", "bridge_timeout", "unauthorized", "forbidden", "invalid_credentials", "token_expired", "token_revoked", "email_taken", "identifier_taken", "weak_password", "account_blocked", "busy", "parameter_invalid", "cancel_rejected", "job_lost", "operator_verified_stopped", "job_unknown_to_bridge", "action_server_lost", "action_failed", "goal_rejected", "goal_send_failed", "result_failed", "goal_uncontrollable", "bridge_disconnected", "config_changed", "publisher_busy", "unknown_command", "not_subscribable", "camera_offline", "no_snapshot_yet", "live_unavailable", "wrong_kind", "not_recorded", "not_aggregatable", "quota_exceeded", "credential_in_use", "goal_timeout", "robot_in_use", "robot_deletion_partial", "job_queue_full", "invalid_uuid", "rate_limited", "tier_required", "token_spent", "service_timeout", "asset_missing", "dynamic_registration_disabled", "client_limit_reached", "idp_unavailable", "mcp_disabled", "tool_not_available", "capability_required", "last_owner", "role_name_taken", "role_in_use", "last_role", "target_state_conflict", "job_state_conflict", "signup_closed", "draft_not_a_document", "internal_error", "not_cancellable", "unsupported_media_type", "wrong_browser", "invalid_yaml", "unstorable_yaml", "registration_closed", "domain_not_allowed", "email_unverified", "origin_not_allowed", "template_invalid", "provider_disabled", "provider_misconfigured", "invalid_redirect_uri", "interaction_expired", "invalid_code", "method_not_allowed", "plan_limit", "plan_required", "org_locked", "file_too_large", "billing_unavailable", "payment_provider_unavailable", "history_migrating", "billing_documents_unavailable", "support_read_only", "support_forbidden"];
881
+ declare const ERROR_CODES: readonly ["not_found", "validation_error", "bad_request", "unknown_datapoint", "invalid_token", "protocol_mismatch", "bridge_too_old", "invalid_frame", "duplicate_slug", "reserved_slug", "unknown_slug", "unknown_field_path", "unknown_type", "unknown_topic", "invalid_rate", "invalid_range", "config_conflict", "no_data", "robot_offline", "bridge_timeout", "unauthorized", "forbidden", "invalid_credentials", "token_expired", "token_revoked", "email_taken", "identifier_taken", "weak_password", "account_blocked", "busy", "parameter_invalid", "cancel_rejected", "job_lost", "operator_verified_stopped", "job_unknown_to_bridge", "action_server_lost", "action_failed", "goal_rejected", "goal_send_failed", "result_failed", "goal_uncontrollable", "bridge_disconnected", "config_changed", "publisher_busy", "unknown_command", "not_subscribable", "camera_offline", "no_snapshot_yet", "live_unavailable", "wrong_kind", "not_recorded", "not_aggregatable", "quota_exceeded", "credential_in_use", "goal_timeout", "robot_in_use", "robot_deletion_partial", "job_queue_full", "invalid_uuid", "rate_limited", "tier_required", "token_spent", "service_timeout", "asset_missing", "dynamic_registration_disabled", "client_limit_reached", "idp_unavailable", "mcp_disabled", "tool_not_available", "capability_required", "last_owner", "role_cycle", "role_key_taken", "confirmation_required", "target_state_conflict", "job_state_conflict", "signup_closed", "draft_not_a_document", "internal_error", "not_cancellable", "unsupported_media_type", "wrong_browser", "invalid_yaml", "unstorable_yaml", "registration_closed", "domain_not_allowed", "email_unverified", "origin_not_allowed", "template_invalid", "provider_disabled", "provider_misconfigured", "invalid_redirect_uri", "interaction_expired", "invalid_code", "method_not_allowed", "plan_limit", "plan_required", "org_locked", "file_too_large", "billing_unavailable", "legal_offer_unavailable", "payment_provider_unavailable", "history_migrating", "billing_documents_unavailable", "support_read_only", "support_forbidden"];
871
882
  type ErrorCode = (typeof ERROR_CODES)[number];
872
883
 
873
884
  /**
@@ -890,12 +901,13 @@ type ErrorCode = (typeof ERROR_CODES)[number];
890
901
  * to wait forever for that.
891
902
  * - `command_outcome_unknown`: worse than a timeout, and told apart from it
892
903
  * on purpose — the connection that carried the command was replaced by a
893
- * new one (a reconnect) before any reply arrived. The server, if it
894
- * answered at all, answered a socket that no longer exists, so the
895
- * command may or may not have run. Never retried automatically — that
896
- * could run an action twice — the caller recovers by reading the job
897
- * (e.g. `actions.subscribe`), since state is observed by slug regardless
898
- * of which connection asked for it.
904
+ * new one (a reconnect), or ended because its credential is no longer
905
+ * valid, before any reply arrived. The server, if it answered at all,
906
+ * answered a socket that no longer exists, so the command may or may not
907
+ * have run. Never retried automatically — that could run an action
908
+ * twice — the caller recovers by reading the job (e.g.
909
+ * `actions.subscribe`), since state is observed by slug regardless of which
910
+ * connection asked for it.
899
911
  * - `unexpected_response`: the server answered `ok:true` but left out
900
912
  * something the command is defined to always return (e.g. no `job` on a
901
913
  * successful `invoke`) — a contract violation the SDK noticed, not a
@@ -1926,6 +1938,11 @@ interface AuthApi {
1926
1938
  * Who the caller turned out to be, without decoding a token client-side —
1927
1939
  * which is how apps end up trusting claims nobody verified.
1928
1940
  *
1941
+ * `role` is `{ key, name }` of the organization role the caller holds, and
1942
+ * `null` when there is none to name: a developer, a server key, and an app
1943
+ * user whose role has since been deleted, who can still sign in but reaches
1944
+ * nothing. Show `name`; compare `key`.
1945
+ *
1929
1946
  * Throws the SDK's own `no_session` **before any request is sent** when
1930
1947
  * nothing is stored — which is exactly the state a sign-in step leaves a
1931
1948
  * caller in while a second factor is still pending (see `SignInResult`):
@@ -2470,10 +2487,10 @@ interface JobsApi {
2470
2487
  *
2471
2488
  * At most one entry per slug: the current job there, same as a per-slug
2472
2489
  * read would answer. Not a history endpoint — that is `history` below.
2473
- * Grant-filtered same as `cameras.list`/`datapoints` — an end user or
2474
- * server key sees only jobs on slugs their role grants, a developer
2475
- * session sees every job on the robot. Never empty-vs-missing ambiguity:
2476
- * a robot doing nothing resolves `[]`.
2490
+ * Grant-filtered same as `cameras.list`/`datapoints` — an end user sees
2491
+ * only jobs on slugs their role grants, a server key every job on slugs its
2492
+ * app does not lock, a developer session every job on the robot. Never
2493
+ * empty-vs-missing ambiguity: a robot doing nothing resolves `[]`.
2477
2494
  *
2478
2495
  * **Ordered newest first by `started_at`, with `job.seq` as the
2479
2496
  * tiebreaker** (`started_at` alone is not a total order — two jobs minted
@@ -2491,7 +2508,7 @@ interface JobsApi {
2491
2508
  * durable `seq`, with its actor, its outcome and its `duration_ms`, kept
2492
2509
  * for 90 days. The durable counterpart of `list`.
2493
2510
  *
2494
- * **Needs the `action_history` capability** on the caller's role, or it
2511
+ * **Needs the `job_history` capability** for the caller's role, or it
2495
2512
  * rejects `capability_required`. An app user sees only runs on the slugs
2496
2513
  * their role grants; a developer session sees the whole robot.
2497
2514
  *
@@ -2543,9 +2560,11 @@ interface PublishersApi {
2543
2560
  */
2544
2561
  type McpExposure = McpExposure$1;
2545
2562
  /**
2546
- * The two role capabilities a datasheet names beyond slugs: `action_history`
2547
- * (may `jobs.history` be read) and `assets` (may the URDF and meshes be read).
2548
- * The wire shape is contracts' `mcpCapabilities`.
2563
+ * The two capabilities of a robot as a whole that a datasheet names beyond
2564
+ * slugs: `job_history` (may `jobs.history` be read) and `assets` (may the URDF
2565
+ * and meshes be read). The robot's `access` section decides which roles hold
2566
+ * them, else the organization's defaults, less what the app locks. The wire
2567
+ * shape is contracts' `mcpCapabilities`.
2549
2568
  */
2550
2569
  type McpCapabilities = McpCapabilities$1;
2551
2570
  /**
@@ -2563,18 +2582,19 @@ interface RobotsApi {
2563
2582
  * The robots this caller reaches, in name order with the id as the tiebreak.
2564
2583
  *
2565
2584
  * An app user reaches the robots their app attaches on which their role
2566
- * grants at least one slug or capability; a server key reaches every robot
2567
- * its app attaches. A robot the role grants nothing on is absent rather
2568
- * than listed empty — reach is a grant, not an attachment — so a new app
2569
- * whose built-in roles grant nothing yet resolves `[]`, and that is the
2570
- * console's Roles tab talking, not a broken login.
2585
+ * holds at least one slug or capability once the app's locks are taken off;
2586
+ * a server key reaches every robot its app attaches that the locks leave
2587
+ * something on. A robot nothing is granted on is absent rather than listed
2588
+ * empty — reach is a grant, not an attachment — so an app user whose role
2589
+ * holds nothing resolves `[]`, which is the robots' access rules talking, not
2590
+ * a broken login.
2571
2591
  */
2572
2592
  list(): Promise<ClientRobotListItem[]>;
2573
2593
  /**
2574
2594
  * Everything the caller's role lets them do on one robot: every granted
2575
2595
  * datapoint (with `unit` and `decimals`), action, service and publisher
2576
2596
  * (with the parameter JSON Schema under `input_schema`) and camera, plus
2577
- * the two capabilities that gate whole features, `action_history` and
2597
+ * the two capabilities that gate whole features, `job_history` and
2578
2598
  * `assets`. A robot with nothing published resolves an empty `exposures`
2579
2599
  * list. One the caller does not reach rejects `not_found`, exactly as a
2580
2600
  * robot that does not exist — never `forbidden`, which would say it exists.