@fleetless/contracts 5.1.0 → 5.2.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 +15 -0
- package/artifacts/constants.json +1 -1
- package/artifacts/schema/cloud-cancel.schema.json +3 -0
- package/dist/protocol.d.ts +13 -1
- package/dist/protocol.js +13 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,21 @@ version.
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
+
## [5.2.0] — 2026-09-30
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- **A cancel can be limited to the bridge's own job.** `cancel`
|
|
17
|
+
(`cloudCancel`) gains an optional `own_only: boolean`; absent means
|
|
18
|
+
`false`, today's meaning. With `true` the bridge cancels the named job
|
|
19
|
+
only if it started it itself: a `job_id` it does not hold — typically an
|
|
20
|
+
`unknown` job — cancels nothing, where without the flag it cancels every
|
|
21
|
+
external goal on the action. The cloud sets it on the cancels it sends on
|
|
22
|
+
its own (a republish's reset and its resend at the next hello), so a
|
|
23
|
+
republish never stops a goal Fleetless did not start; a user's cancel
|
|
24
|
+
never sets it. `LATEST_BRIDGE_VERSION` is `6.1.0`, the first bridge that
|
|
25
|
+
honours it. The protocol stays 5.
|
|
26
|
+
|
|
12
27
|
## [5.1.0] — 2026-09-30
|
|
13
28
|
|
|
14
29
|
### Added
|
package/artifacts/constants.json
CHANGED
package/dist/protocol.d.ts
CHANGED
|
@@ -78,7 +78,7 @@ export interface ProtocolVersionEntry {
|
|
|
78
78
|
*/
|
|
79
79
|
export declare const PROTOCOL_VERSIONS: readonly ProtocolVersionEntry[];
|
|
80
80
|
/** The newest bridge package. The cloud mails organisations still below it. */
|
|
81
|
-
export declare const LATEST_BRIDGE_VERSION = "6.
|
|
81
|
+
export declare const LATEST_BRIDGE_VERSION = "6.1.0";
|
|
82
82
|
export interface ProtocolStatus {
|
|
83
83
|
status: 'current' | 'deprecated' | 'unsupported';
|
|
84
84
|
/** ISO date, or null for a current or unknown version. */
|
|
@@ -642,12 +642,24 @@ export type CloudInvoke = z.infer<typeof cloudInvoke>;
|
|
|
642
642
|
* `request_id` correlates the bridge's `cancel_result`, which carries each
|
|
643
643
|
* goal's `CancelGoal` return code; the cloud answers its caller only from
|
|
644
644
|
* that.
|
|
645
|
+
*
|
|
646
|
+
* `own_only` (fleetless#84) limits a cancel to a job the bridge started
|
|
647
|
+
* itself and holds. `true`: the bridge cancels the named job only if it is
|
|
648
|
+
* its own; a `job_id` it does not hold, or holds as an external goal,
|
|
649
|
+
* cancels **nothing** and is answered `goals: []`. The cloud sets it on the
|
|
650
|
+
* cancels it sends on its own — a republish's reset and that reset's resend
|
|
651
|
+
* at the next hello — so a republish never stops a goal Fleetless did not
|
|
652
|
+
* start. A user's cancel never sets it: only an explicit cancel may reach
|
|
653
|
+
* external goals. Absent means `false`, today's meaning. `true` needs a
|
|
654
|
+
* `job_id`: the bridge refuses `own_only: true` with `job_id: null` as
|
|
655
|
+
* unusable. Bridges before 6.1.0 ignore the key.
|
|
645
656
|
*/
|
|
646
657
|
export declare const cloudCancel: z.ZodObject<{
|
|
647
658
|
type: z.ZodLiteral<"cancel">;
|
|
648
659
|
request_id: z.ZodString;
|
|
649
660
|
slug: z.ZodString;
|
|
650
661
|
job_id: z.ZodNullable<z.ZodUUID>;
|
|
662
|
+
own_only: z.ZodOptional<z.ZodBoolean>;
|
|
651
663
|
}, z.core.$strip>;
|
|
652
664
|
export type CloudCancel = z.infer<typeof cloudCancel>;
|
|
653
665
|
/**
|
package/dist/protocol.js
CHANGED
|
@@ -79,7 +79,7 @@ export const PROTOCOL_VERSIONS = [
|
|
|
79
79
|
{ version: 5, bridge_from: '6.0.0', deprecated_at: null },
|
|
80
80
|
];
|
|
81
81
|
/** The newest bridge package. The cloud mails organisations still below it. */
|
|
82
|
-
export const LATEST_BRIDGE_VERSION = '6.
|
|
82
|
+
export const LATEST_BRIDGE_VERSION = '6.1.0';
|
|
83
83
|
const DAY_MS = 24 * 60 * 60 * 1000;
|
|
84
84
|
function isoDate(date) {
|
|
85
85
|
return date.toISOString().slice(0, 10);
|
|
@@ -481,12 +481,24 @@ export const cloudInvoke = z.object({
|
|
|
481
481
|
* `request_id` correlates the bridge's `cancel_result`, which carries each
|
|
482
482
|
* goal's `CancelGoal` return code; the cloud answers its caller only from
|
|
483
483
|
* that.
|
|
484
|
+
*
|
|
485
|
+
* `own_only` (fleetless#84) limits a cancel to a job the bridge started
|
|
486
|
+
* itself and holds. `true`: the bridge cancels the named job only if it is
|
|
487
|
+
* its own; a `job_id` it does not hold, or holds as an external goal,
|
|
488
|
+
* cancels **nothing** and is answered `goals: []`. The cloud sets it on the
|
|
489
|
+
* cancels it sends on its own — a republish's reset and that reset's resend
|
|
490
|
+
* at the next hello — so a republish never stops a goal Fleetless did not
|
|
491
|
+
* start. A user's cancel never sets it: only an explicit cancel may reach
|
|
492
|
+
* external goals. Absent means `false`, today's meaning. `true` needs a
|
|
493
|
+
* `job_id`: the bridge refuses `own_only: true` with `job_id: null` as
|
|
494
|
+
* unusable. Bridges before 6.1.0 ignore the key.
|
|
484
495
|
*/
|
|
485
496
|
export const cloudCancel = z.object({
|
|
486
497
|
type: z.literal('cancel'),
|
|
487
498
|
request_id: z.string().min(1).max(64),
|
|
488
499
|
slug,
|
|
489
500
|
job_id: z.uuid().nullable(),
|
|
501
|
+
own_only: z.boolean().optional(),
|
|
490
502
|
});
|
|
491
503
|
/**
|
|
492
504
|
* The ROS 2 `action_msgs/srv/CancelGoal` return codes: `0` `ERROR_NONE` (the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fleetless/contracts",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"description": "Fleetless wire contracts: the bridge-cloud protocol, the REST API schemas and the error codes, as zod schemas with generated JSON Schema and OpenAPI artifacts.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Dehne Robotik GmbH",
|