@fleetless/sdk 4.1.0 → 4.2.0-next.1

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 CHANGED
@@ -4,6 +4,16 @@ All notable changes to `@fleetless/sdk`. The format follows Keep a Changelog; th
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ Built against `@fleetless/contracts` 5.1.0 (pinned to its pre-release `5.1.0-next.1` until that ships).
8
+
9
+ ### Added
10
+
11
+ - **`cancelRejectedDetails`, `CANCEL_RETURN_CODES`, `CancelRejectedDetails` and `CancelReturnCode`** are re-exported, so a caller reads a `cancel_rejected` refusal without depending on `@fleetless/contracts`: `cancelRejectedDetails.parse(error.details).goals`, each goal's `return_code` compared against `CANCEL_RETURN_CODES` (`none`, `rejected`, `unknown_goal_id`, `goal_terminated`), or `null` when that goal's server did not answer.
12
+
13
+ ### Fixed
14
+
15
+ - **`JobOrigin` carries its description in the published types.** It was re-exported as a statement whose JSDoc the bundle dropped, so an editor showed it undescribed; it is now declared as an alias, the way `McpExposure` is.
16
+
7
17
  ## [4.1.0] — 2026-09-30
8
18
 
9
19
  Built against `@fleetless/contracts` 5.0.0. Two changes to `Job` a consumer's code sees, so the next release is a major.
package/dist/index.cjs CHANGED
@@ -21,9 +21,11 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  // src/index.ts
22
22
  var index_exports = {};
23
23
  __export(index_exports, {
24
+ CANCEL_RETURN_CODES: () => CANCEL_RETURN_CODES,
24
25
  FleetlessError: () => FleetlessError,
25
26
  InMemoryTokenStore: () => InMemoryTokenStore,
26
27
  SDK_ERROR_CODES: () => SDK_ERROR_CODES,
28
+ cancelRejectedDetails: () => cancelRejectedDetails,
27
29
  createClient: () => createClient,
28
30
  parameterInvalidDetails: () => parameterInvalidDetails
29
31
  });
@@ -440,7 +442,7 @@ function createAssetsApi(http) {
440
442
  };
441
443
  }
442
444
 
443
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/common.js
445
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/common.js
444
446
  var import_zod = require("zod");
445
447
  var SLUG_RULE = "A name is lower-case: it starts with a letter, continues with letters and digits, and joins further words with a single underscore \u2014 `battery_voltage`. Capitals, dashes, dots, spaces, a leading digit and a doubled or trailing underscore are all refused.";
446
448
  var slug = import_zod.z.string().min(2).max(63).regex(/^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$/, SLUG_RULE);
@@ -471,7 +473,7 @@ var applyError = import_zod.z.object({
471
473
  details: import_zod.z.record(import_zod.z.string(), import_zod.z.unknown()).optional()
472
474
  });
473
475
 
474
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/mcp.js
476
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/mcp.js
475
477
  var import_zod2 = require("zod");
476
478
  function mcpAppEndpointPath(appIdentifier2) {
477
479
  return `/mcp/${appIdentifier2}`;
@@ -520,10 +522,10 @@ var mcpRolePreviewResponse = import_zod2.z.object({
520
522
  });
521
523
  var MCP_ASSET_LINK_TTL_MS = 15 * 60 * 1e3;
522
524
 
523
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/protocol.js
525
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/protocol.js
524
526
  var import_zod8 = require("zod");
525
527
 
526
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/assets.js
528
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/assets.js
527
529
  var import_zod3 = require("zod");
528
530
  var assetKind = import_zod3.z.enum(["urdf", "mesh", "texture"]);
529
531
  var asset = import_zod3.z.object({
@@ -843,10 +845,10 @@ var assetSyncBusyDetails = import_zod3.z.object({
843
845
  started_at_ms: import_zod3.z.number().int().nonnegative()
844
846
  });
845
847
 
846
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/config.js
848
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/config.js
847
849
  var import_zod5 = require("zod");
848
850
 
849
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/alerts.js
851
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/alerts.js
850
852
  var import_zod4 = require("zod");
851
853
  var alertRowCondition = import_zod4.z.discriminatedUnion("kind", [
852
854
  import_zod4.z.strictObject({
@@ -916,7 +918,7 @@ var putDatapointDisplayRequest = import_zod4.z.object({
916
918
  y_max: import_zod4.z.number().finite().nullable()
917
919
  }).strict();
918
920
 
919
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/config.js
921
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/config.js
920
922
  var RTSP_URL_RULE = "The URL has to begin with `rtsp://` or `rtsps://` \u2014 `rtsp://cam-1.plant.local/stream1`. No other scheme is accepted: the bridge opens this with a library that would equally honour `file:`.";
921
923
  var MJPEG_URL_RULE = "The URL has to begin with `http://` or `https://` \u2014 `http://cam-1.plant.local/video.mjpg`. No other scheme is accepted: the bridge opens this with a library that would equally serve `file:`.";
922
924
  var DEVICE_PATH_RULE = "A capture device is a path under `/dev/`, and the character straight after it is a letter or a digit \u2014 `/dev/video0`, or a stable `/dev/v4l/by-id/...` symlink. Nothing outside `/dev/` is accepted: the string reaches OpenCV, which would as happily open an ordinary file.";
@@ -2008,7 +2010,7 @@ var configState = import_zod5.z.object({
2008
2010
  applied_errors: import_zod5.z.array(applyError).nullable()
2009
2011
  });
2010
2012
 
2011
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/introspection.js
2013
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/introspection.js
2012
2014
  var import_zod6 = require("zod");
2013
2015
  var rosGraphEntry = import_zod6.z.object({
2014
2016
  name: rosName,
@@ -2047,7 +2049,7 @@ var typeDefinition = import_zod6.z.discriminatedUnion("kind", [
2047
2049
  })
2048
2050
  ]);
2049
2051
 
2050
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/jobs.js
2052
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/jobs.js
2051
2053
  var import_zod7 = require("zod");
2052
2054
  var jobState = import_zod7.z.enum(["running", "unknown", "succeeded", "failed", "cancelled", "lost"]);
2053
2055
  var reportedJobState = jobState.exclude(["unknown"]);
@@ -2270,7 +2272,7 @@ var jobRunSummary = import_zod7.z.object({
2270
2272
  since_ms: import_zod7.z.number().int().nonnegative()
2271
2273
  });
2272
2274
 
2273
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/protocol.js
2275
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/protocol.js
2274
2276
  var DAY_MS = 24 * 60 * 60 * 1e3;
2275
2277
  var MAX_PATIENCE_MS = 12e4;
2276
2278
  var MIN_PATIENCE_MS = 1e3;
@@ -2405,6 +2407,7 @@ var cloudCancel = import_zod8.z.object({
2405
2407
  slug,
2406
2408
  job_id: import_zod8.z.uuid().nullable()
2407
2409
  });
2410
+ var CANCEL_RETURN_CODES = { none: 0, rejected: 1, unknown_goal_id: 2, goal_terminated: 3 };
2408
2411
  var cancelReturnCode = import_zod8.z.number().int().min(0).max(3);
2409
2412
  var bridgeCancelResultEntry = import_zod8.z.object({
2410
2413
  /** The job the goal belongs to — the bridge's own, or an external goal's derived id. */
@@ -2666,11 +2669,11 @@ var bridgeCameraState = import_zod8.z.object({
2666
2669
  request_id: import_zod8.z.string().min(1).max(64).nullable()
2667
2670
  });
2668
2671
 
2669
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/config-issues.js
2672
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/config-issues.js
2670
2673
  var EXPOSURE_SECTIONS = ["datapoints", "actions", "services", "publishers", "cameras"];
2671
2674
  var EXPOSURE_SECTION_NAMES = new Set(EXPOSURE_SECTIONS);
2672
2675
 
2673
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/rest.js
2676
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/rest.js
2674
2677
  var import_zod9 = require("zod");
2675
2678
  var robot = import_zod9.z.object({
2676
2679
  id: import_zod9.z.uuid().meta({
@@ -3435,13 +3438,13 @@ var slugUsageResponse = import_zod9.z.object({
3435
3438
  alert_count: import_zod9.z.number().int().nonnegative()
3436
3439
  });
3437
3440
 
3438
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/realtime.js
3441
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/realtime.js
3439
3442
  var import_zod14 = require("zod");
3440
3443
 
3441
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/client-auth.js
3444
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/client-auth.js
3442
3445
  var import_zod13 = require("zod");
3443
3446
 
3444
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/apps.js
3447
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/apps.js
3445
3448
  var import_zod10 = require("zod");
3446
3449
  var appIdentifier = slug;
3447
3450
  var app = import_zod10.z.object({
@@ -3643,10 +3646,10 @@ var rolePermissions = import_zod10.z.object({
3643
3646
  })
3644
3647
  });
3645
3648
 
3646
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/app-users.js
3649
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/app-users.js
3647
3650
  var import_zod12 = require("zod");
3648
3651
 
3649
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/identity.js
3652
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/identity.js
3650
3653
  var import_zod11 = require("zod");
3651
3654
  var password = import_zod11.z.string().min(12).max(256);
3652
3655
  var USER_DISPLAY_NAME_MAX = 120;
@@ -3808,7 +3811,7 @@ var authMeResponse = import_zod11.z.object({ org, user: fleetlessUser });
3808
3811
  var patchOrgRequest = import_zod11.z.object({ name: import_zod11.z.string().min(1).max(120) }).strict();
3809
3812
  var patchAuthMeRequest = import_zod11.z.object({ display_name: import_zod11.z.string().min(1).max(USER_DISPLAY_NAME_MAX).nullable() }).strict();
3810
3813
 
3811
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/app-users.js
3814
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/app-users.js
3812
3815
  var APP_USER_DISPLAY_NAME_MAX = 120;
3813
3816
  var providerSlug = import_zod12.z.string().max(40).regex(/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/, "must be lowercase and hyphen-separated, starting with a letter");
3814
3817
  var appUserStatus = import_zod12.z.enum(["pending_verification", "active", "blocked"]);
@@ -4061,7 +4064,7 @@ var mailOutcome = import_zod12.z.object({
4061
4064
  })
4062
4065
  });
4063
4066
 
4064
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/client-auth.js
4067
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/client-auth.js
4065
4068
  var clientLoginRequest = import_zod13.z.object({
4066
4069
  app_identifier: appIdentifier.meta({
4067
4070
  description: "The app being logged in to: its globally unique, lowercase, underscore-separated identifier, chosen by the developer at creation. There is no organisation context at login, so this is what decides which app the credentials are checked for."
@@ -4250,7 +4253,7 @@ var clientIdentity = import_zod13.z.object({
4250
4253
  })
4251
4254
  });
4252
4255
 
4253
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/realtime.js
4256
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/realtime.js
4254
4257
  var clientAuth = import_zod14.z.object({
4255
4258
  type: import_zod14.z.literal("auth"),
4256
4259
  token: import_zod14.z.string().min(1)
@@ -4528,7 +4531,7 @@ var orgEventDropped = import_zod14.z.object({
4528
4531
  dropped: import_zod14.z.number().int().positive()
4529
4532
  }).strict();
4530
4533
 
4531
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/client-robots.js
4534
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/client-robots.js
4532
4535
  var import_zod15 = require("zod");
4533
4536
  var clientRobotListItem = import_zod15.z.object({
4534
4537
  ...robot.shape,
@@ -4545,7 +4548,7 @@ var clientRobotListResponse = import_zod15.z.object({
4545
4548
  })
4546
4549
  });
4547
4550
 
4548
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/audit.js
4551
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/audit.js
4549
4552
  var import_zod16 = require("zod");
4550
4553
  var auditActor = import_zod16.z.object({
4551
4554
  kind: import_zod16.z.enum(["developer", "end_user", "app_user", "server_key", "bridge"]),
@@ -4675,7 +4678,7 @@ var auditListResponse = import_zod16.z.object({
4675
4678
  next_cursor: import_zod16.z.number().int().positive().nullable()
4676
4679
  });
4677
4680
 
4678
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/errors.js
4681
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/errors.js
4679
4682
  var import_zod17 = require("zod");
4680
4683
  var apiError = import_zod17.z.object({
4681
4684
  code: import_zod17.z.string().min(1),
@@ -4691,8 +4694,11 @@ var parameterViolation = import_zod17.z.object({
4691
4694
  var parameterInvalidDetails = import_zod17.z.object({
4692
4695
  violations: import_zod17.z.array(parameterViolation).min(1)
4693
4696
  });
4697
+ var cancelRejectedDetails = import_zod17.z.object({
4698
+ goals: import_zod17.z.array(bridgeCancelResultEntry).min(1)
4699
+ });
4694
4700
 
4695
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/oauth.js
4701
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/oauth.js
4696
4702
  var import_zod18 = require("zod");
4697
4703
  var oauthErrorCode = import_zod18.z.enum([
4698
4704
  "invalid_request",
@@ -4932,7 +4938,7 @@ var oauthAuthorizeQuery = import_zod18.z.object({
4932
4938
  description: "The authorization request an MCP client sends, per RFC 6749 \xA74.1.1 with mandatory PKCE. The handler reads it parameter by parameter rather than through one parse, because the answers differ: `client_id` and `redirect_uri` are refused flat, with no redirect, since until both are confirmed there is no trusted target to bounce a browser to, and everything after them is reported to the client's own callback as query parameters."
4933
4939
  });
4934
4940
 
4935
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/routes.js
4941
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/routes.js
4936
4942
  var MCP_APP = MCP_APP_PATHS(":appIdentifier");
4937
4943
  var APP_IDENTIFIER = {
4938
4944
  name: "appIdentifier",
@@ -9352,9 +9358,11 @@ function deriveRealtimeUrl(apiUrl) {
9352
9358
  }
9353
9359
  // Annotate the CommonJS export names for ESM import in node:
9354
9360
  0 && (module.exports = {
9361
+ CANCEL_RETURN_CODES,
9355
9362
  FleetlessError,
9356
9363
  InMemoryTokenStore,
9357
9364
  SDK_ERROR_CODES,
9365
+ cancelRejectedDetails,
9358
9366
  createClient,
9359
9367
  parameterInvalidDetails
9360
9368
  });
package/dist/index.d.cts CHANGED
@@ -63,6 +63,23 @@ declare const mcpRobotDatasheet: z.ZodObject<{
63
63
  }, z.core.$strip>;
64
64
  type McpRobotDatasheet = z.infer<typeof mcpRobotDatasheet>;
65
65
 
66
+ /**
67
+ * The ROS 2 `action_msgs/srv/CancelGoal` return codes: `0` `ERROR_NONE` (the
68
+ * server accepted the cancel request), `1` `ERROR_REJECTED` (it refused),
69
+ * `2` `ERROR_UNKNOWN_GOAL_ID`, `3` `ERROR_GOAL_TERMINATED` (the goal had
70
+ * already ended). An accepted request is not an ended goal: whether the goal
71
+ * ends, and how, is what the action's status reports afterwards, and reaches
72
+ * the cloud as the goal's `job_update`.
73
+ */
74
+ declare const CANCEL_RETURN_CODES: {
75
+ readonly none: 0;
76
+ readonly rejected: 1;
77
+ readonly unknown_goal_id: 2;
78
+ readonly goal_terminated: 3;
79
+ };
80
+ declare const cancelReturnCode: z.ZodNumber;
81
+ type CancelReturnCode$1 = z.infer<typeof cancelReturnCode>;
82
+
66
83
 
67
84
  /**
68
85
  * Jobs: one running unit of work on a robot — an action
@@ -110,7 +127,7 @@ declare const jobOrigin: z.ZodEnum<{
110
127
  fleetless: "fleetless";
111
128
  external: "external";
112
129
  }>;
113
- type JobOrigin = z.infer<typeof jobOrigin>;
130
+ type JobOrigin$1 = z.infer<typeof jobOrigin>;
114
131
  /**
115
132
  * One job, as the cloud tells every client about it — a Fleetless job or an
116
133
  * external goal alike, told apart only by `origin`.
@@ -809,6 +826,25 @@ declare const parameterInvalidDetails: z.ZodObject<{
809
826
  }, z.core.$strip>>;
810
827
  }, z.core.$strip>;
811
828
  type ParameterInvalidDetails = z.infer<typeof parameterInvalidDetails>;
829
+ /**
830
+ * The `details` of a `cancel_rejected` refusal: every goal the cancel reached,
831
+ * accepted ones included, each with the `CancelGoal` return code its action
832
+ * server answered — compare `return_code` against `CANCEL_RETURN_CODES`
833
+ * (`none`, `rejected`, `unknown_goal_id`, `goal_terminated`); it is `null`
834
+ * when that goal's server did not answer within the bridge's bound. Always at
835
+ * least one goal: the cloud refuses a cancel only because a goal's server
836
+ * answered `ERROR_REJECTED`. Pinned here for the reason
837
+ * `parameterInvalidDetails` is: a caller parses it instead of reading the
838
+ * shape from prose.
839
+ */
840
+ declare const cancelRejectedDetails: z.ZodObject<{
841
+ goals: z.ZodArray<z.ZodObject<{
842
+ job_id: z.ZodUUID;
843
+ goal_id: z.ZodString;
844
+ return_code: z.ZodNullable<z.ZodNumber>;
845
+ }, z.core.$strip>>;
846
+ }, z.core.$strip>;
847
+ type CancelRejectedDetails = z.infer<typeof cancelRejectedDetails>;
812
848
  /**
813
849
  * The codes in use today. The wire deliberately allows any string — this
814
850
  * list is the shared vocabulary, not a closed set, so a new refusal never
@@ -1067,6 +1103,17 @@ interface JobSubscription {
1067
1103
  unsubscribe(): void;
1068
1104
  }
1069
1105
 
1106
+ /**
1107
+ * One goal's answer to a cancel: the ROS 2 `CancelGoal` return code its action
1108
+ * server sent — `0` accepted (`CANCEL_RETURN_CODES.none`), `1` refused
1109
+ * (`rejected`), `2` unknown goal (`unknown_goal_id`), `3` already ended
1110
+ * (`goal_terminated`). The type of `return_code` in `CancelRejectedDetails`,
1111
+ * where it is `null` when that goal's server did not answer. The wire shape is
1112
+ * contracts' `cancelReturnCode`; the alias exists so the reference can
1113
+ * describe it — a JSDoc on an `export type { … } from` statement does not
1114
+ * survive bundling.
1115
+ */
1116
+ type CancelReturnCode = CancelReturnCode$1;
1070
1117
  /**
1071
1118
  * Long-running work on a robot, reachable as `client.actions`. An action is
1072
1119
  * a ROS action the developer exposed under a slug: it is invoked, runs as
@@ -1114,10 +1161,12 @@ interface ActionsApi {
1114
1161
  * from the action server's `CancelGoal` return codes, so a cancel can
1115
1162
  * also reject with:
1116
1163
  * - `cancel_rejected` — the server refused (`ERROR_REJECTED`) and the goal
1117
- * keeps running unless its job later says otherwise. `error.details.goals`
1118
- * lists every goal the cancel reached as `{ job_id, goal_id, return_code }`
1119
- * (`0` accepted, `1` rejected, `2` unknown goal, `3` already ended, `null`
1120
- * when that goal's server did not answer).
1164
+ * keeps running unless its job later says otherwise.
1165
+ * `cancelRejectedDetails.parse(error.details).goals` lists every goal the
1166
+ * cancel reached as `{ job_id, goal_id, return_code }`; compare
1167
+ * `return_code` against `CANCEL_RETURN_CODES`: `none` (`0`, accepted),
1168
+ * `rejected` (`1`), `unknown_goal_id` (`2`), `goal_terminated` (`3`,
1169
+ * already ended), or `null` when that goal's server did not answer.
1121
1170
  * - `bridge_timeout` — the robot's bridge did not answer in time; whether
1122
1171
  * the cancel reached the server is unknown.
1123
1172
  * - the bridge's own code when it could not ask at all (e.g.
@@ -2143,6 +2192,18 @@ interface DatapointsApi {
2143
2192
  }): Promise<HistorySamplesResponse>;
2144
2193
  }
2145
2194
 
2195
+ /**
2196
+ * Who started a job: `fleetless` for every job the cloud minted from an
2197
+ * invocation, `external` for a goal the bridge found active on a published
2198
+ * action without having sent it. An external job has no parameters and no
2199
+ * starter (ROS 2 publishes neither) and is never in `jobs.history`. The type
2200
+ * of `Job.origin`, which every job carries.
2201
+ *
2202
+ * The wire shape is contracts' `jobOrigin`; the alias exists so the reference
2203
+ * can describe it — a JSDoc on an `export type { … } from` statement does not
2204
+ * survive bundling.
2205
+ */
2206
+ type JobOrigin = JobOrigin$1;
2146
2207
  /**
2147
2208
  * The filters `jobs.history` reads. Every field is optional; the wire names
2148
2209
  * are snake_case and this SDK spells them the way its other options are
@@ -2454,4 +2515,4 @@ interface FleetlessClient {
2454
2515
  */
2455
2516
  declare function createClient(options: FleetlessClientOptions): FleetlessClient;
2456
2517
 
2457
- export { type AcceptInvitationOptions, type ActionsApi, type Asset, type AssetBytes, type AssetListResponse, type AssetsApi, type AuthApi, type BeginOidcLoginOptions, type BusyDetails, type CameraDescriptor, type CameraLiveSession, type CameraSnapshot, type CameraSnapshotMeta, type CamerasApi, type ClientIdentity, type ClientMcpInteraction, type ClientOidcErrorCode, type ClientRobotListItem, type CompleteOidcLoginOptions, type CreateMeshLoaderOptions, type CredentialSource, type DatapointEvent, type DatapointSubscription, type DatapointSubscriptionHandlers, type DatapointValue, type DatapointsApi, type FleetlessClient, type FleetlessClientConfig, type FleetlessClientOptions, FleetlessError, type FleetlessErrorCode, type FleetlessErrorOptions, type HistoryAggregation, type HistoryBucketsResponse, type HistoryOptions, type HistorySamplesResponse, InMemoryTokenStore, type InvokeOptions, type Job, type JobEvent, type JobHistoryOptions, type JobOrigin, type JobRun, type JobRunListResponse, type JobState, type JobSubscription, type JobSubscriptionHandlers, type JobsApi, type McpCapabilities, type McpConsentGrant, type McpExposure, type McpInteractionDecision, type McpRobotDatasheet, type MeshLoaderDelegate, type OidcLoginRequest, type ParameterInvalidDetails, type ParameterViolation, type PrepareUrdfSceneOptions, type ProviderButton, type PublishersApi, type RateLimitDetails, type RegisterOptions, type RobotsApi, SDK_ERROR_CODES, type SdkErrorCode, type SendCommandOptions, type ServicesApi, type StoredSession, type TokenStore, type UrdfCompleteness, type UrdfSceneManager, type UrdfSceneResources, createClient, parameterInvalidDetails };
2518
+ export { type AcceptInvitationOptions, type ActionsApi, type Asset, type AssetBytes, type AssetListResponse, type AssetsApi, type AuthApi, type BeginOidcLoginOptions, type BusyDetails, CANCEL_RETURN_CODES, type CameraDescriptor, type CameraLiveSession, type CameraSnapshot, type CameraSnapshotMeta, type CamerasApi, type CancelRejectedDetails, type CancelReturnCode, type ClientIdentity, type ClientMcpInteraction, type ClientOidcErrorCode, type ClientRobotListItem, type CompleteOidcLoginOptions, type CreateMeshLoaderOptions, type CredentialSource, type DatapointEvent, type DatapointSubscription, type DatapointSubscriptionHandlers, type DatapointValue, type DatapointsApi, type FleetlessClient, type FleetlessClientConfig, type FleetlessClientOptions, FleetlessError, type FleetlessErrorCode, type FleetlessErrorOptions, type HistoryAggregation, type HistoryBucketsResponse, type HistoryOptions, type HistorySamplesResponse, InMemoryTokenStore, type InvokeOptions, type Job, type JobEvent, type JobHistoryOptions, type JobOrigin, type JobRun, type JobRunListResponse, type JobState, type JobSubscription, type JobSubscriptionHandlers, type JobsApi, type McpCapabilities, type McpConsentGrant, type McpExposure, type McpInteractionDecision, type McpRobotDatasheet, type MeshLoaderDelegate, type OidcLoginRequest, type ParameterInvalidDetails, type ParameterViolation, type PrepareUrdfSceneOptions, type ProviderButton, type PublishersApi, type RateLimitDetails, type RegisterOptions, type RobotsApi, SDK_ERROR_CODES, type SdkErrorCode, type SendCommandOptions, type ServicesApi, type StoredSession, type TokenStore, type UrdfCompleteness, type UrdfSceneManager, type UrdfSceneResources, cancelRejectedDetails, createClient, parameterInvalidDetails };
package/dist/index.d.ts CHANGED
@@ -63,6 +63,23 @@ declare const mcpRobotDatasheet: z.ZodObject<{
63
63
  }, z.core.$strip>;
64
64
  type McpRobotDatasheet = z.infer<typeof mcpRobotDatasheet>;
65
65
 
66
+ /**
67
+ * The ROS 2 `action_msgs/srv/CancelGoal` return codes: `0` `ERROR_NONE` (the
68
+ * server accepted the cancel request), `1` `ERROR_REJECTED` (it refused),
69
+ * `2` `ERROR_UNKNOWN_GOAL_ID`, `3` `ERROR_GOAL_TERMINATED` (the goal had
70
+ * already ended). An accepted request is not an ended goal: whether the goal
71
+ * ends, and how, is what the action's status reports afterwards, and reaches
72
+ * the cloud as the goal's `job_update`.
73
+ */
74
+ declare const CANCEL_RETURN_CODES: {
75
+ readonly none: 0;
76
+ readonly rejected: 1;
77
+ readonly unknown_goal_id: 2;
78
+ readonly goal_terminated: 3;
79
+ };
80
+ declare const cancelReturnCode: z.ZodNumber;
81
+ type CancelReturnCode$1 = z.infer<typeof cancelReturnCode>;
82
+
66
83
 
67
84
  /**
68
85
  * Jobs: one running unit of work on a robot — an action
@@ -110,7 +127,7 @@ declare const jobOrigin: z.ZodEnum<{
110
127
  fleetless: "fleetless";
111
128
  external: "external";
112
129
  }>;
113
- type JobOrigin = z.infer<typeof jobOrigin>;
130
+ type JobOrigin$1 = z.infer<typeof jobOrigin>;
114
131
  /**
115
132
  * One job, as the cloud tells every client about it — a Fleetless job or an
116
133
  * external goal alike, told apart only by `origin`.
@@ -809,6 +826,25 @@ declare const parameterInvalidDetails: z.ZodObject<{
809
826
  }, z.core.$strip>>;
810
827
  }, z.core.$strip>;
811
828
  type ParameterInvalidDetails = z.infer<typeof parameterInvalidDetails>;
829
+ /**
830
+ * The `details` of a `cancel_rejected` refusal: every goal the cancel reached,
831
+ * accepted ones included, each with the `CancelGoal` return code its action
832
+ * server answered — compare `return_code` against `CANCEL_RETURN_CODES`
833
+ * (`none`, `rejected`, `unknown_goal_id`, `goal_terminated`); it is `null`
834
+ * when that goal's server did not answer within the bridge's bound. Always at
835
+ * least one goal: the cloud refuses a cancel only because a goal's server
836
+ * answered `ERROR_REJECTED`. Pinned here for the reason
837
+ * `parameterInvalidDetails` is: a caller parses it instead of reading the
838
+ * shape from prose.
839
+ */
840
+ declare const cancelRejectedDetails: z.ZodObject<{
841
+ goals: z.ZodArray<z.ZodObject<{
842
+ job_id: z.ZodUUID;
843
+ goal_id: z.ZodString;
844
+ return_code: z.ZodNullable<z.ZodNumber>;
845
+ }, z.core.$strip>>;
846
+ }, z.core.$strip>;
847
+ type CancelRejectedDetails = z.infer<typeof cancelRejectedDetails>;
812
848
  /**
813
849
  * The codes in use today. The wire deliberately allows any string — this
814
850
  * list is the shared vocabulary, not a closed set, so a new refusal never
@@ -1067,6 +1103,17 @@ interface JobSubscription {
1067
1103
  unsubscribe(): void;
1068
1104
  }
1069
1105
 
1106
+ /**
1107
+ * One goal's answer to a cancel: the ROS 2 `CancelGoal` return code its action
1108
+ * server sent — `0` accepted (`CANCEL_RETURN_CODES.none`), `1` refused
1109
+ * (`rejected`), `2` unknown goal (`unknown_goal_id`), `3` already ended
1110
+ * (`goal_terminated`). The type of `return_code` in `CancelRejectedDetails`,
1111
+ * where it is `null` when that goal's server did not answer. The wire shape is
1112
+ * contracts' `cancelReturnCode`; the alias exists so the reference can
1113
+ * describe it — a JSDoc on an `export type { … } from` statement does not
1114
+ * survive bundling.
1115
+ */
1116
+ type CancelReturnCode = CancelReturnCode$1;
1070
1117
  /**
1071
1118
  * Long-running work on a robot, reachable as `client.actions`. An action is
1072
1119
  * a ROS action the developer exposed under a slug: it is invoked, runs as
@@ -1114,10 +1161,12 @@ interface ActionsApi {
1114
1161
  * from the action server's `CancelGoal` return codes, so a cancel can
1115
1162
  * also reject with:
1116
1163
  * - `cancel_rejected` — the server refused (`ERROR_REJECTED`) and the goal
1117
- * keeps running unless its job later says otherwise. `error.details.goals`
1118
- * lists every goal the cancel reached as `{ job_id, goal_id, return_code }`
1119
- * (`0` accepted, `1` rejected, `2` unknown goal, `3` already ended, `null`
1120
- * when that goal's server did not answer).
1164
+ * keeps running unless its job later says otherwise.
1165
+ * `cancelRejectedDetails.parse(error.details).goals` lists every goal the
1166
+ * cancel reached as `{ job_id, goal_id, return_code }`; compare
1167
+ * `return_code` against `CANCEL_RETURN_CODES`: `none` (`0`, accepted),
1168
+ * `rejected` (`1`), `unknown_goal_id` (`2`), `goal_terminated` (`3`,
1169
+ * already ended), or `null` when that goal's server did not answer.
1121
1170
  * - `bridge_timeout` — the robot's bridge did not answer in time; whether
1122
1171
  * the cancel reached the server is unknown.
1123
1172
  * - the bridge's own code when it could not ask at all (e.g.
@@ -2143,6 +2192,18 @@ interface DatapointsApi {
2143
2192
  }): Promise<HistorySamplesResponse>;
2144
2193
  }
2145
2194
 
2195
+ /**
2196
+ * Who started a job: `fleetless` for every job the cloud minted from an
2197
+ * invocation, `external` for a goal the bridge found active on a published
2198
+ * action without having sent it. An external job has no parameters and no
2199
+ * starter (ROS 2 publishes neither) and is never in `jobs.history`. The type
2200
+ * of `Job.origin`, which every job carries.
2201
+ *
2202
+ * The wire shape is contracts' `jobOrigin`; the alias exists so the reference
2203
+ * can describe it — a JSDoc on an `export type { … } from` statement does not
2204
+ * survive bundling.
2205
+ */
2206
+ type JobOrigin = JobOrigin$1;
2146
2207
  /**
2147
2208
  * The filters `jobs.history` reads. Every field is optional; the wire names
2148
2209
  * are snake_case and this SDK spells them the way its other options are
@@ -2454,4 +2515,4 @@ interface FleetlessClient {
2454
2515
  */
2455
2516
  declare function createClient(options: FleetlessClientOptions): FleetlessClient;
2456
2517
 
2457
- export { type AcceptInvitationOptions, type ActionsApi, type Asset, type AssetBytes, type AssetListResponse, type AssetsApi, type AuthApi, type BeginOidcLoginOptions, type BusyDetails, type CameraDescriptor, type CameraLiveSession, type CameraSnapshot, type CameraSnapshotMeta, type CamerasApi, type ClientIdentity, type ClientMcpInteraction, type ClientOidcErrorCode, type ClientRobotListItem, type CompleteOidcLoginOptions, type CreateMeshLoaderOptions, type CredentialSource, type DatapointEvent, type DatapointSubscription, type DatapointSubscriptionHandlers, type DatapointValue, type DatapointsApi, type FleetlessClient, type FleetlessClientConfig, type FleetlessClientOptions, FleetlessError, type FleetlessErrorCode, type FleetlessErrorOptions, type HistoryAggregation, type HistoryBucketsResponse, type HistoryOptions, type HistorySamplesResponse, InMemoryTokenStore, type InvokeOptions, type Job, type JobEvent, type JobHistoryOptions, type JobOrigin, type JobRun, type JobRunListResponse, type JobState, type JobSubscription, type JobSubscriptionHandlers, type JobsApi, type McpCapabilities, type McpConsentGrant, type McpExposure, type McpInteractionDecision, type McpRobotDatasheet, type MeshLoaderDelegate, type OidcLoginRequest, type ParameterInvalidDetails, type ParameterViolation, type PrepareUrdfSceneOptions, type ProviderButton, type PublishersApi, type RateLimitDetails, type RegisterOptions, type RobotsApi, SDK_ERROR_CODES, type SdkErrorCode, type SendCommandOptions, type ServicesApi, type StoredSession, type TokenStore, type UrdfCompleteness, type UrdfSceneManager, type UrdfSceneResources, createClient, parameterInvalidDetails };
2518
+ export { type AcceptInvitationOptions, type ActionsApi, type Asset, type AssetBytes, type AssetListResponse, type AssetsApi, type AuthApi, type BeginOidcLoginOptions, type BusyDetails, CANCEL_RETURN_CODES, type CameraDescriptor, type CameraLiveSession, type CameraSnapshot, type CameraSnapshotMeta, type CamerasApi, type CancelRejectedDetails, type CancelReturnCode, type ClientIdentity, type ClientMcpInteraction, type ClientOidcErrorCode, type ClientRobotListItem, type CompleteOidcLoginOptions, type CreateMeshLoaderOptions, type CredentialSource, type DatapointEvent, type DatapointSubscription, type DatapointSubscriptionHandlers, type DatapointValue, type DatapointsApi, type FleetlessClient, type FleetlessClientConfig, type FleetlessClientOptions, FleetlessError, type FleetlessErrorCode, type FleetlessErrorOptions, type HistoryAggregation, type HistoryBucketsResponse, type HistoryOptions, type HistorySamplesResponse, InMemoryTokenStore, type InvokeOptions, type Job, type JobEvent, type JobHistoryOptions, type JobOrigin, type JobRun, type JobRunListResponse, type JobState, type JobSubscription, type JobSubscriptionHandlers, type JobsApi, type McpCapabilities, type McpConsentGrant, type McpExposure, type McpInteractionDecision, type McpRobotDatasheet, type MeshLoaderDelegate, type OidcLoginRequest, type ParameterInvalidDetails, type ParameterViolation, type PrepareUrdfSceneOptions, type ProviderButton, type PublishersApi, type RateLimitDetails, type RegisterOptions, type RobotsApi, SDK_ERROR_CODES, type SdkErrorCode, type SendCommandOptions, type ServicesApi, type StoredSession, type TokenStore, type UrdfCompleteness, type UrdfSceneManager, type UrdfSceneResources, cancelRejectedDetails, createClient, parameterInvalidDetails };
package/dist/index.js CHANGED
@@ -410,7 +410,7 @@ function createAssetsApi(http) {
410
410
  };
411
411
  }
412
412
 
413
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/common.js
413
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/common.js
414
414
  import { z } from "zod";
415
415
  var SLUG_RULE = "A name is lower-case: it starts with a letter, continues with letters and digits, and joins further words with a single underscore \u2014 `battery_voltage`. Capitals, dashes, dots, spaces, a leading digit and a doubled or trailing underscore are all refused.";
416
416
  var slug = z.string().min(2).max(63).regex(/^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$/, SLUG_RULE);
@@ -441,7 +441,7 @@ var applyError = z.object({
441
441
  details: z.record(z.string(), z.unknown()).optional()
442
442
  });
443
443
 
444
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/mcp.js
444
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/mcp.js
445
445
  import { z as z2 } from "zod";
446
446
  function mcpAppEndpointPath(appIdentifier2) {
447
447
  return `/mcp/${appIdentifier2}`;
@@ -490,10 +490,10 @@ var mcpRolePreviewResponse = z2.object({
490
490
  });
491
491
  var MCP_ASSET_LINK_TTL_MS = 15 * 60 * 1e3;
492
492
 
493
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/protocol.js
493
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/protocol.js
494
494
  import { z as z8 } from "zod";
495
495
 
496
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/assets.js
496
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/assets.js
497
497
  import { z as z3 } from "zod";
498
498
  var assetKind = z3.enum(["urdf", "mesh", "texture"]);
499
499
  var asset = z3.object({
@@ -813,10 +813,10 @@ var assetSyncBusyDetails = z3.object({
813
813
  started_at_ms: z3.number().int().nonnegative()
814
814
  });
815
815
 
816
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/config.js
816
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/config.js
817
817
  import { z as z5 } from "zod";
818
818
 
819
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/alerts.js
819
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/alerts.js
820
820
  import { z as z4 } from "zod";
821
821
  var alertRowCondition = z4.discriminatedUnion("kind", [
822
822
  z4.strictObject({
@@ -886,7 +886,7 @@ var putDatapointDisplayRequest = z4.object({
886
886
  y_max: z4.number().finite().nullable()
887
887
  }).strict();
888
888
 
889
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/config.js
889
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/config.js
890
890
  var RTSP_URL_RULE = "The URL has to begin with `rtsp://` or `rtsps://` \u2014 `rtsp://cam-1.plant.local/stream1`. No other scheme is accepted: the bridge opens this with a library that would equally honour `file:`.";
891
891
  var MJPEG_URL_RULE = "The URL has to begin with `http://` or `https://` \u2014 `http://cam-1.plant.local/video.mjpg`. No other scheme is accepted: the bridge opens this with a library that would equally serve `file:`.";
892
892
  var DEVICE_PATH_RULE = "A capture device is a path under `/dev/`, and the character straight after it is a letter or a digit \u2014 `/dev/video0`, or a stable `/dev/v4l/by-id/...` symlink. Nothing outside `/dev/` is accepted: the string reaches OpenCV, which would as happily open an ordinary file.";
@@ -1978,7 +1978,7 @@ var configState = z5.object({
1978
1978
  applied_errors: z5.array(applyError).nullable()
1979
1979
  });
1980
1980
 
1981
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/introspection.js
1981
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/introspection.js
1982
1982
  import { z as z6 } from "zod";
1983
1983
  var rosGraphEntry = z6.object({
1984
1984
  name: rosName,
@@ -2017,7 +2017,7 @@ var typeDefinition = z6.discriminatedUnion("kind", [
2017
2017
  })
2018
2018
  ]);
2019
2019
 
2020
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/jobs.js
2020
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/jobs.js
2021
2021
  import { z as z7 } from "zod";
2022
2022
  var jobState = z7.enum(["running", "unknown", "succeeded", "failed", "cancelled", "lost"]);
2023
2023
  var reportedJobState = jobState.exclude(["unknown"]);
@@ -2240,7 +2240,7 @@ var jobRunSummary = z7.object({
2240
2240
  since_ms: z7.number().int().nonnegative()
2241
2241
  });
2242
2242
 
2243
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/protocol.js
2243
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/protocol.js
2244
2244
  var DAY_MS = 24 * 60 * 60 * 1e3;
2245
2245
  var MAX_PATIENCE_MS = 12e4;
2246
2246
  var MIN_PATIENCE_MS = 1e3;
@@ -2375,6 +2375,7 @@ var cloudCancel = z8.object({
2375
2375
  slug,
2376
2376
  job_id: z8.uuid().nullable()
2377
2377
  });
2378
+ var CANCEL_RETURN_CODES = { none: 0, rejected: 1, unknown_goal_id: 2, goal_terminated: 3 };
2378
2379
  var cancelReturnCode = z8.number().int().min(0).max(3);
2379
2380
  var bridgeCancelResultEntry = z8.object({
2380
2381
  /** The job the goal belongs to — the bridge's own, or an external goal's derived id. */
@@ -2636,11 +2637,11 @@ var bridgeCameraState = z8.object({
2636
2637
  request_id: z8.string().min(1).max(64).nullable()
2637
2638
  });
2638
2639
 
2639
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/config-issues.js
2640
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/config-issues.js
2640
2641
  var EXPOSURE_SECTIONS = ["datapoints", "actions", "services", "publishers", "cameras"];
2641
2642
  var EXPOSURE_SECTION_NAMES = new Set(EXPOSURE_SECTIONS);
2642
2643
 
2643
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/rest.js
2644
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/rest.js
2644
2645
  import { z as z9 } from "zod";
2645
2646
  var robot = z9.object({
2646
2647
  id: z9.uuid().meta({
@@ -3405,13 +3406,13 @@ var slugUsageResponse = z9.object({
3405
3406
  alert_count: z9.number().int().nonnegative()
3406
3407
  });
3407
3408
 
3408
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/realtime.js
3409
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/realtime.js
3409
3410
  import { z as z14 } from "zod";
3410
3411
 
3411
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/client-auth.js
3412
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/client-auth.js
3412
3413
  import { z as z13 } from "zod";
3413
3414
 
3414
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/apps.js
3415
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/apps.js
3415
3416
  import { z as z10 } from "zod";
3416
3417
  var appIdentifier = slug;
3417
3418
  var app = z10.object({
@@ -3613,10 +3614,10 @@ var rolePermissions = z10.object({
3613
3614
  })
3614
3615
  });
3615
3616
 
3616
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/app-users.js
3617
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/app-users.js
3617
3618
  import { z as z12 } from "zod";
3618
3619
 
3619
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/identity.js
3620
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/identity.js
3620
3621
  import { z as z11 } from "zod";
3621
3622
  var password = z11.string().min(12).max(256);
3622
3623
  var USER_DISPLAY_NAME_MAX = 120;
@@ -3778,7 +3779,7 @@ var authMeResponse = z11.object({ org, user: fleetlessUser });
3778
3779
  var patchOrgRequest = z11.object({ name: z11.string().min(1).max(120) }).strict();
3779
3780
  var patchAuthMeRequest = z11.object({ display_name: z11.string().min(1).max(USER_DISPLAY_NAME_MAX).nullable() }).strict();
3780
3781
 
3781
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/app-users.js
3782
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/app-users.js
3782
3783
  var APP_USER_DISPLAY_NAME_MAX = 120;
3783
3784
  var providerSlug = z12.string().max(40).regex(/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/, "must be lowercase and hyphen-separated, starting with a letter");
3784
3785
  var appUserStatus = z12.enum(["pending_verification", "active", "blocked"]);
@@ -4031,7 +4032,7 @@ var mailOutcome = z12.object({
4031
4032
  })
4032
4033
  });
4033
4034
 
4034
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/client-auth.js
4035
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/client-auth.js
4035
4036
  var clientLoginRequest = z13.object({
4036
4037
  app_identifier: appIdentifier.meta({
4037
4038
  description: "The app being logged in to: its globally unique, lowercase, underscore-separated identifier, chosen by the developer at creation. There is no organisation context at login, so this is what decides which app the credentials are checked for."
@@ -4220,7 +4221,7 @@ var clientIdentity = z13.object({
4220
4221
  })
4221
4222
  });
4222
4223
 
4223
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/realtime.js
4224
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/realtime.js
4224
4225
  var clientAuth = z14.object({
4225
4226
  type: z14.literal("auth"),
4226
4227
  token: z14.string().min(1)
@@ -4498,7 +4499,7 @@ var orgEventDropped = z14.object({
4498
4499
  dropped: z14.number().int().positive()
4499
4500
  }).strict();
4500
4501
 
4501
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/client-robots.js
4502
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/client-robots.js
4502
4503
  import { z as z15 } from "zod";
4503
4504
  var clientRobotListItem = z15.object({
4504
4505
  ...robot.shape,
@@ -4515,7 +4516,7 @@ var clientRobotListResponse = z15.object({
4515
4516
  })
4516
4517
  });
4517
4518
 
4518
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/audit.js
4519
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/audit.js
4519
4520
  import { z as z16 } from "zod";
4520
4521
  var auditActor = z16.object({
4521
4522
  kind: z16.enum(["developer", "end_user", "app_user", "server_key", "bridge"]),
@@ -4645,7 +4646,7 @@ var auditListResponse = z16.object({
4645
4646
  next_cursor: z16.number().int().positive().nullable()
4646
4647
  });
4647
4648
 
4648
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/errors.js
4649
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/errors.js
4649
4650
  import { z as z17 } from "zod";
4650
4651
  var apiError = z17.object({
4651
4652
  code: z17.string().min(1),
@@ -4661,8 +4662,11 @@ var parameterViolation = z17.object({
4661
4662
  var parameterInvalidDetails = z17.object({
4662
4663
  violations: z17.array(parameterViolation).min(1)
4663
4664
  });
4665
+ var cancelRejectedDetails = z17.object({
4666
+ goals: z17.array(bridgeCancelResultEntry).min(1)
4667
+ });
4664
4668
 
4665
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/oauth.js
4669
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/oauth.js
4666
4670
  import { z as z18 } from "zod";
4667
4671
  var oauthErrorCode = z18.enum([
4668
4672
  "invalid_request",
@@ -4902,7 +4906,7 @@ var oauthAuthorizeQuery = z18.object({
4902
4906
  description: "The authorization request an MCP client sends, per RFC 6749 \xA74.1.1 with mandatory PKCE. The handler reads it parameter by parameter rather than through one parse, because the answers differ: `client_id` and `redirect_uri` are refused flat, with no redirect, since until both are confirmed there is no trusted target to bounce a browser to, and everything after them is reported to the client's own callback as query parameters."
4903
4907
  });
4904
4908
 
4905
- // node_modules/.pnpm/@fleetless+contracts@5.0.0/node_modules/@fleetless/contracts/dist/routes.js
4909
+ // node_modules/.pnpm/@fleetless+contracts@5.1.0-next.1/node_modules/@fleetless/contracts/dist/routes.js
4906
4910
  var MCP_APP = MCP_APP_PATHS(":appIdentifier");
4907
4911
  var APP_IDENTIFIER = {
4908
4912
  name: "appIdentifier",
@@ -9321,9 +9325,11 @@ function deriveRealtimeUrl(apiUrl) {
9321
9325
  return url.toString();
9322
9326
  }
9323
9327
  export {
9328
+ CANCEL_RETURN_CODES,
9324
9329
  FleetlessError,
9325
9330
  InMemoryTokenStore,
9326
9331
  SDK_ERROR_CODES,
9332
+ cancelRejectedDetails,
9327
9333
  createClient,
9328
9334
  parameterInvalidDetails
9329
9335
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fleetless/sdk",
3
- "version": "4.1.0",
3
+ "version": "4.2.0-next.1",
4
4
  "description": "The official TypeScript SDK for Fleetless client apps — a ROS 2 robot as a REST and realtime API, cameras, jobs, and the app's own user accounts, federated sign-in and MCP consent.",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -76,7 +76,7 @@
76
76
  "zod": "^4.0.0"
77
77
  },
78
78
  "devDependencies": {
79
- "@fleetless/contracts": "5.0.0",
79
+ "@fleetless/contracts": "5.1.0-next.1",
80
80
  "@types/node": "^22.20.1",
81
81
  "tsup": "^8.3.0",
82
82
  "typedoc": "0.28.20",