@fleetless/contracts 4.0.0 → 5.0.0-next.2
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 +39 -0
- package/artifacts/constants.json +4 -14
- package/artifacts/openapi.json +46 -13
- package/artifacts/routes.json +2 -2
- package/artifacts/schema/bridge-cancel-result.schema.json +86 -0
- package/artifacts/schema/bridge-job-status.schema.json +113 -0
- package/artifacts/schema/bridge-job-update.schema.json +20 -0
- package/artifacts/schema/busy-details.schema.json +12 -2
- package/artifacts/schema/cloud-cancel.schema.json +6 -0
- package/artifacts/schema/cloud-job-query.schema.json +29 -0
- package/artifacts/schema/command-result.schema.json +12 -2
- package/artifacts/schema/invoke-or-service-response.schema.json +12 -2
- package/artifacts/schema/invoke-response.schema.json +12 -2
- package/artifacts/schema/job-event.schema.json +12 -2
- package/artifacts/schema/job-response.schema.json +12 -2
- package/artifacts/schema/job-run-list-response.schema.json +4 -3
- package/artifacts/schema/job-run-query.schema.json +2 -1
- package/artifacts/schema/job-run.schema.json +4 -3
- package/artifacts/schema/job-state.schema.json +1 -0
- package/artifacts/schema/job.schema.json +12 -2
- package/artifacts/schema/robot-jobs-response.schema.json +12 -2
- package/artifacts/schema-outgoing/bridge-cancel-result.schema.json +89 -0
- package/artifacts/schema-outgoing/bridge-job-status.schema.json +116 -0
- package/artifacts/schema-outgoing/bridge-job-update.schema.json +20 -0
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +46 -7
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/jobs.d.ts +70 -6
- package/dist/jobs.js +51 -14
- package/dist/protocol.d.ts +233 -46
- package/dist/protocol.js +207 -62
- package/dist/realtime.d.ts +5 -0
- package/dist/rest.d.ts +20 -0
- package/dist/routes.js +6 -3
- package/package.json +1 -1
package/dist/protocol.d.ts
CHANGED
|
@@ -1,15 +1,29 @@
|
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
/**
|
|
4
|
-
* Bridge <-> cloud protocol, version
|
|
4
|
+
* Bridge <-> cloud protocol, version 5.
|
|
5
5
|
*
|
|
6
6
|
* The version is exchanged in the hello handshake. Since 2026-09 the cloud
|
|
7
7
|
* serves a **window** of versions, not one: every entry of
|
|
8
8
|
* `PROTOCOL_VERSIONS` whose sunset has not passed. A version is deprecated
|
|
9
9
|
* by the cloud release that supersedes it and sunset `PROTOCOL_SUNSET_DAYS`
|
|
10
|
-
* later. Outside the window the cloud refuses
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* later. Outside the window the cloud refuses the hello, and the refusal
|
|
11
|
+
* reaches the robot's detail view as `last_hello_error`: `bridge_too_old`,
|
|
12
|
+
* naming the bridge version to install, for a version below the window.
|
|
13
|
+
*
|
|
14
|
+
* **5 (2026-09-29):** a hard cut, not a window — protocols 2, 3 and 4 are
|
|
15
|
+
* unsupported from this release on, with no sunset (André, 2026-09-29: "we
|
|
16
|
+
* are still building up and need not take care"), so `PROTOCOL_VERSIONS`
|
|
17
|
+
* holds one entry. The bridge tracks every goal on a published action by
|
|
18
|
+
* goal id — its own and anyone else's — and reports them through
|
|
19
|
+
* `job_update`, which gains a required `origin` and `goal_id`: a goal it did
|
|
20
|
+
* not send arrives as `origin: 'external'` under a job id the bridge derives
|
|
21
|
+
* itself. `jobState` gains `unknown`, the cloud's non-terminal "I lost sight
|
|
22
|
+
* of it" (`bridge_disconnected`, `bridge_timeout`) that replaces settling
|
|
23
|
+
* `lost` on a guess; `lost` is final. While connected, the cloud asks about
|
|
24
|
+
* specific jobs with `job_query` and the bridge answers `job_status`. Goal
|
|
25
|
+
* state is reported once per `JOB_HEARTBEAT_INTERVAL_MS`, newest only; the
|
|
26
|
+
* end of a Fleetless job goes at once.
|
|
13
27
|
*
|
|
14
28
|
* **4 (2026-09-29):** the bridge sends a `job_update` heartbeat at
|
|
15
29
|
* `JOB_HEARTBEAT_INTERVAL_MS` for every running job, whether or not the
|
|
@@ -36,7 +50,7 @@ import { z } from 'zod';
|
|
|
36
50
|
* **2 (2026-08-21):** `config_applied.errors` entries gained `kind` and `code`
|
|
37
51
|
* beside `message`.
|
|
38
52
|
*/
|
|
39
|
-
export declare const PROTOCOL_VERSION =
|
|
53
|
+
export declare const PROTOCOL_VERSION = 5;
|
|
40
54
|
/** Days between a version's deprecation and its sunset. */
|
|
41
55
|
export declare const PROTOCOL_SUNSET_DAYS = 90;
|
|
42
56
|
export interface ProtocolVersionEntry {
|
|
@@ -47,17 +61,24 @@ export interface ProtocolVersionEntry {
|
|
|
47
61
|
deprecated_at: string | null;
|
|
48
62
|
}
|
|
49
63
|
/**
|
|
50
|
-
* Every protocol version the cloud
|
|
64
|
+
* Every protocol version the cloud serves, oldest first. A test keeps
|
|
51
65
|
* exactly one entry current and equal to `PROTOCOL_VERSION`; `test/changelog.test.ts`
|
|
52
66
|
* requires some CHANGELOG section — `[Unreleased]` or a dated one — to name
|
|
53
67
|
* the newest `bridge_from` together with the previous entry's `sunsetOf(...)`
|
|
54
68
|
* date, so the pull request that moves this window is the one that fails
|
|
55
69
|
* without saying so; and `scripts/verify-version-tag.mjs` requires a dated
|
|
56
70
|
* heading for the tag being released.
|
|
71
|
+
*
|
|
72
|
+
* **One entry since protocol 5**, which cut 2, 3 and 4 without a sunset
|
|
73
|
+
* rather than deprecating them. A version absent from the table is
|
|
74
|
+
* `unsupported`, which is exactly what a cut means, so the dropped entries
|
|
75
|
+
* are gone rather than kept with a past date. The changelog test's window
|
|
76
|
+
* check has no previous entry to read then; its hard-cut sibling holds the
|
|
77
|
+
* changelog to naming the cut instead.
|
|
57
78
|
*/
|
|
58
79
|
export declare const PROTOCOL_VERSIONS: readonly ProtocolVersionEntry[];
|
|
59
80
|
/** The newest bridge package. The cloud mails organisations still below it. */
|
|
60
|
-
export declare const LATEST_BRIDGE_VERSION = "
|
|
81
|
+
export declare const LATEST_BRIDGE_VERSION = "6.0.0";
|
|
61
82
|
export interface ProtocolStatus {
|
|
62
83
|
status: 'current' | 'deprecated' | 'unsupported';
|
|
63
84
|
/** ISO date, or null for a current or unknown version. */
|
|
@@ -144,37 +165,43 @@ export declare const MAX_PATIENCE_MS = 120000;
|
|
|
144
165
|
*/
|
|
145
166
|
export declare const MIN_PATIENCE_MS = 1000;
|
|
146
167
|
/**
|
|
147
|
-
* How often
|
|
148
|
-
*
|
|
149
|
-
*
|
|
168
|
+
* How often the bridge reports goal state: one `job_update` per active goal
|
|
169
|
+
* on a published action — its own and external ones — carrying the newest
|
|
170
|
+
* state and feedback, whether or not the action said anything new. Whatever
|
|
171
|
+
* happened in between is dropped, so an action that sends feedback at 100 Hz
|
|
172
|
+
* costs one frame a second; the end of a Fleetless job is the exception and
|
|
173
|
+
* goes at once. One second: often enough that `JOB_HEARTBEAT_TIMEOUT_MS`
|
|
150
174
|
* can be a small multiple of it and still absorb a missed beat or two, rare
|
|
151
175
|
* enough that it costs nothing next to the datapoint traffic a busy robot
|
|
152
176
|
* already sends.
|
|
153
177
|
*/
|
|
154
178
|
export declare const JOB_HEARTBEAT_INTERVAL_MS = 1000;
|
|
155
179
|
/**
|
|
156
|
-
* How long a
|
|
157
|
-
*
|
|
180
|
+
* How long a running job may go without a `job_update` — heartbeat or real
|
|
181
|
+
* progress, either counts — before the cloud marks it `unknown` with
|
|
158
182
|
* `bridge_timeout`, once the bridge is connected. Five heartbeats: enough
|
|
159
183
|
* slack for an ordinary scheduling jitter, small next to `patience_ms`
|
|
160
|
-
* because it
|
|
161
|
-
* bounds only the time from `invoke` to the *first* update
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
* `
|
|
165
|
-
*
|
|
184
|
+
* because it does not have to cover the acceptance gap too. `patience_ms`
|
|
185
|
+
* bounds only the time from `invoke` to the *first* update; every rearm after
|
|
186
|
+
* that uses this constant instead.
|
|
187
|
+
*
|
|
188
|
+
* `unknown`, not `lost`: silence is the cloud's guess, not the bridge's
|
|
189
|
+
* statement. The cloud then asks with `job_query`, and asks again after the
|
|
190
|
+
* same interval for as long as no `job_status` answers and the bridge stays
|
|
191
|
+
* connected.
|
|
166
192
|
*/
|
|
167
193
|
export declare const JOB_HEARTBEAT_TIMEOUT_MS = 5000;
|
|
168
194
|
/**
|
|
169
195
|
* How long a running job survives its robot going offline before the cloud
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
* result the cloud is waiting for is often still coming.
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
196
|
+
* marks it `unknown` with `bridge_disconnected`. Five minutes: long enough
|
|
197
|
+
* that an ordinary Wi-Fi dead zone — the case this constant exists for —
|
|
198
|
+
* never touches a job, since a robot with no safety layer of its own
|
|
199
|
+
* (§ Fleetless is not a safety layer) keeps driving through one and the
|
|
200
|
+
* result the cloud is waiting for is often still coming. Past it the job is
|
|
201
|
+
* still not given up: `unknown` keeps the slug occupied until the
|
|
202
|
+
* reconnecting bridge says how the job stands. A robot connected the whole
|
|
203
|
+
* time never reaches this bound at all: while online, silence is
|
|
204
|
+
* `JOB_HEARTBEAT_TIMEOUT_MS`'s question, never this one's.
|
|
178
205
|
*/
|
|
179
206
|
export declare const JOB_OFFLINE_GRACE_MS = 300000;
|
|
180
207
|
/** Re-exported so consumers keep importing wire names from one place. */
|
|
@@ -193,6 +220,14 @@ export { slug } from './common.js';
|
|
|
193
220
|
* `state` is the bridge's own current answer, not a history. A bridge that
|
|
194
221
|
* has a terminal result still in hand reports it here and the cloud writes it
|
|
195
222
|
* down, instead of publishing `lost` over a job that in fact succeeded.
|
|
223
|
+
* Never `unknown`: that is the cloud's word for not having heard, and a
|
|
224
|
+
* bridge listing a job has, by definition, something to say about it — the
|
|
225
|
+
* schema refuses it.
|
|
226
|
+
*
|
|
227
|
+
* Only the bridge's own jobs, never an external goal: this entry carries no
|
|
228
|
+
* `origin`, and a cloud adopting an external goal from it would take it for
|
|
229
|
+
* its own. An active external goal is reported by the next `job_update`
|
|
230
|
+
* tick, with its origin.
|
|
196
231
|
*/
|
|
197
232
|
export declare const activeJob: z.ZodObject<{
|
|
198
233
|
job_id: z.ZodUUID;
|
|
@@ -594,18 +629,79 @@ export type CloudInvoke = z.infer<typeof cloudInvoke>;
|
|
|
594
629
|
* wire had nowhere to put it.
|
|
595
630
|
*
|
|
596
631
|
* `null` keeps today's meaning and must be read as exactly that: *cancel
|
|
597
|
-
*
|
|
598
|
-
* hitting stop wants the robot stopped, not a lecture about job
|
|
599
|
-
* and it stays available for that.
|
|
600
|
-
*
|
|
601
|
-
* the
|
|
632
|
+
* every goal active on this slug's action*. It is a real request — an
|
|
633
|
+
* operator hitting stop wants the robot stopped, not a lecture about job
|
|
634
|
+
* identity — and it stays available for that.
|
|
635
|
+
*
|
|
636
|
+
* A `job_id` the bridge holds (its own job, or an external goal's derived
|
|
637
|
+
* id) cancels that goal alone. A `job_id` it does not hold is how the cloud
|
|
638
|
+
* cancels an `unknown` job: the bridge cancels every **external** goal
|
|
639
|
+
* active on the slug's action, since one of them may be that job, and never
|
|
640
|
+
* one of its own jobs, which the caller did not name.
|
|
641
|
+
*
|
|
642
|
+
* `request_id` correlates the bridge's `cancel_result`, which carries each
|
|
643
|
+
* goal's `CancelGoal` return code; the cloud answers its caller only from
|
|
644
|
+
* that.
|
|
602
645
|
*/
|
|
603
646
|
export declare const cloudCancel: z.ZodObject<{
|
|
604
647
|
type: z.ZodLiteral<"cancel">;
|
|
648
|
+
request_id: z.ZodString;
|
|
605
649
|
slug: z.ZodString;
|
|
606
650
|
job_id: z.ZodNullable<z.ZodUUID>;
|
|
607
651
|
}, z.core.$strip>;
|
|
608
652
|
export type CloudCancel = z.infer<typeof cloudCancel>;
|
|
653
|
+
/**
|
|
654
|
+
* The ROS 2 `action_msgs/srv/CancelGoal` return codes: `0` `ERROR_NONE` (the
|
|
655
|
+
* server accepted the cancel request), `1` `ERROR_REJECTED` (it refused),
|
|
656
|
+
* `2` `ERROR_UNKNOWN_GOAL_ID`, `3` `ERROR_GOAL_TERMINATED` (the goal had
|
|
657
|
+
* already ended). An accepted request is not an ended goal: whether the goal
|
|
658
|
+
* ends, and how, is what the action's status reports afterwards, and reaches
|
|
659
|
+
* the cloud as the goal's `job_update`.
|
|
660
|
+
*/
|
|
661
|
+
export declare const CANCEL_RETURN_CODES: {
|
|
662
|
+
readonly none: 0;
|
|
663
|
+
readonly rejected: 1;
|
|
664
|
+
readonly unknown_goal_id: 2;
|
|
665
|
+
readonly goal_terminated: 3;
|
|
666
|
+
};
|
|
667
|
+
export declare const cancelReturnCode: z.ZodNumber;
|
|
668
|
+
export type CancelReturnCode = z.infer<typeof cancelReturnCode>;
|
|
669
|
+
/** One goal a `cancel` reached, and what its action server answered. */
|
|
670
|
+
export declare const bridgeCancelResultEntry: z.ZodObject<{
|
|
671
|
+
job_id: z.ZodUUID;
|
|
672
|
+
goal_id: z.ZodString;
|
|
673
|
+
return_code: z.ZodNullable<z.ZodNumber>;
|
|
674
|
+
}, z.core.$strip>;
|
|
675
|
+
export type BridgeCancelResultEntry = z.infer<typeof bridgeCancelResultEntry>;
|
|
676
|
+
/**
|
|
677
|
+
* The bridge's answer to a `cancel`, once every goal it sent a cancel request
|
|
678
|
+
* for has answered — or `error` when it could not ask. `goals` is empty when
|
|
679
|
+
* nothing matched (a `job_id` the bridge does not hold, with no external goal
|
|
680
|
+
* on the action; or nothing active on the slug): the cancel reached nothing,
|
|
681
|
+
* which is an answer, not a failure.
|
|
682
|
+
*
|
|
683
|
+
* A goal whose server did not answer the cancel request within the bridge's
|
|
684
|
+
* own bound is listed with `return_code: null`, not left out.
|
|
685
|
+
*
|
|
686
|
+
* The cloud reports `return_code` `1` (`ERROR_REJECTED`) to the caller as a
|
|
687
|
+
* refusal (`cancel_rejected`), never as success, and writes the audit event
|
|
688
|
+
* of a cancel of an external goal from this frame, return code included.
|
|
689
|
+
*/
|
|
690
|
+
export declare const bridgeCancelResult: z.ZodObject<{
|
|
691
|
+
type: z.ZodLiteral<"cancel_result">;
|
|
692
|
+
request_id: z.ZodString;
|
|
693
|
+
slug: z.ZodString;
|
|
694
|
+
goals: z.ZodArray<z.ZodObject<{
|
|
695
|
+
job_id: z.ZodUUID;
|
|
696
|
+
goal_id: z.ZodString;
|
|
697
|
+
return_code: z.ZodNullable<z.ZodNumber>;
|
|
698
|
+
}, z.core.$strip>>;
|
|
699
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
700
|
+
code: z.ZodString;
|
|
701
|
+
message: z.ZodString;
|
|
702
|
+
}, z.core.$strip>>;
|
|
703
|
+
}, z.core.$strip>;
|
|
704
|
+
export type BridgeCancelResult = z.infer<typeof bridgeCancelResult>;
|
|
609
705
|
export declare const cloudPublish: z.ZodObject<{
|
|
610
706
|
type: z.ZodLiteral<"publish">;
|
|
611
707
|
slug: z.ZodString;
|
|
@@ -615,6 +711,20 @@ export type CloudPublish = z.infer<typeof cloudPublish>;
|
|
|
615
711
|
/**
|
|
616
712
|
* Progress on a job, bridge → cloud. `timestamp_ms` is capture time, so a
|
|
617
713
|
* burst delivered late after a reconnect is visibly late.
|
|
714
|
+
*
|
|
715
|
+
* Since protocol 5 this frame reports **every goal active on a published
|
|
716
|
+
* action**, not only the ones the bridge sent. A goal the bridge cannot
|
|
717
|
+
* attribute to a job of its own arrives with `origin: 'external'` and a
|
|
718
|
+
* `job_id` the bridge derives from robot, slug and goal id, the same id on
|
|
719
|
+
* every report of that goal — the cloud mints an external job the first time
|
|
720
|
+
* it sees one and never recomputes the id itself. `goal_id` is the ROS 2
|
|
721
|
+
* goal id, so a cancel can name the goal; `null` for a service job, which
|
|
722
|
+
* has no goal.
|
|
723
|
+
*
|
|
724
|
+
* Sent once per `JOB_HEARTBEAT_INTERVAL_MS` per active goal, newest state
|
|
725
|
+
* only. The end of a Fleetless job is sent at once; an external goal's end at
|
|
726
|
+
* the next tick, and an external goal that started and ended between two
|
|
727
|
+
* ticks is never reported at all.
|
|
618
728
|
*/
|
|
619
729
|
export declare const bridgeJobUpdate: z.ZodObject<{
|
|
620
730
|
type: z.ZodLiteral<"job_update">;
|
|
@@ -627,6 +737,11 @@ export declare const bridgeJobUpdate: z.ZodObject<{
|
|
|
627
737
|
cancelled: "cancelled";
|
|
628
738
|
lost: "lost";
|
|
629
739
|
}>;
|
|
740
|
+
origin: z.ZodEnum<{
|
|
741
|
+
fleetless: "fleetless";
|
|
742
|
+
external: "external";
|
|
743
|
+
}>;
|
|
744
|
+
goal_id: z.ZodNullable<z.ZodString>;
|
|
630
745
|
feedback: z.ZodNullable<z.ZodUnknown>;
|
|
631
746
|
progress: z.ZodNullable<z.ZodNumber>;
|
|
632
747
|
result: z.ZodNullable<z.ZodUnknown>;
|
|
@@ -639,23 +754,20 @@ export declare const bridgeJobUpdate: z.ZodObject<{
|
|
|
639
754
|
}, z.core.$strip>;
|
|
640
755
|
export type BridgeJobUpdate = z.infer<typeof bridgeJobUpdate>;
|
|
641
756
|
/**
|
|
642
|
-
*
|
|
643
|
-
*
|
|
644
|
-
* the honest answer is "I lost this" rather
|
|
757
|
+
* The bridge's own, definite statement **while connected** that it no longer
|
|
758
|
+
* knows these jobs — an action server that vanished mid-goal, a goal the
|
|
759
|
+
* server no longer knows — where the honest answer is "I lost this" rather
|
|
760
|
+
* than a state. The cloud settles each named job `lost`, final.
|
|
645
761
|
*
|
|
646
|
-
*
|
|
647
|
-
*
|
|
648
|
-
*
|
|
649
|
-
* leaving a job reading "running" because nobody contradicted it.
|
|
762
|
+
* Only the bridge says `lost` now. The cloud's own guesses — offline past
|
|
763
|
+
* `JOB_OFFLINE_GRACE_MS`, silent past `JOB_HEARTBEAT_TIMEOUT_MS` — make a
|
|
764
|
+
* job `unknown` instead, and a restart is answered by `hello.active_jobs`.
|
|
650
765
|
*
|
|
651
|
-
* **`error`
|
|
652
|
-
*
|
|
653
|
-
*
|
|
654
|
-
*
|
|
655
|
-
*
|
|
656
|
-
* the cloud settles the job `lost` with no specific code, the same as a
|
|
657
|
-
* protocol-3 bridge's frame, which carries no `error` at all and still
|
|
658
|
-
* parses under this schema unchanged.
|
|
766
|
+
* **`error` is optional and, when present, applies to every job named in
|
|
767
|
+
* `job_ids`.** A vanished action server is discovered once, by the bridge's
|
|
768
|
+
* own liveness check on that one action, so a frame naming several jobs at
|
|
769
|
+
* once always shares the same cause. Absent, the cloud settles the job
|
|
770
|
+
* `lost` with no specific code.
|
|
659
771
|
*/
|
|
660
772
|
export declare const bridgeJobLost: z.ZodObject<{
|
|
661
773
|
type: z.ZodLiteral<"job_lost">;
|
|
@@ -666,6 +778,81 @@ export declare const bridgeJobLost: z.ZodObject<{
|
|
|
666
778
|
}, z.core.$strip>>;
|
|
667
779
|
}, z.core.$strip>;
|
|
668
780
|
export type BridgeJobLost = z.infer<typeof bridgeJobLost>;
|
|
781
|
+
/**
|
|
782
|
+
* The cloud asks the bridge how specific jobs stand, while connected;
|
|
783
|
+
* `request_id` correlates the `job_status` answer.
|
|
784
|
+
*
|
|
785
|
+
* Sent for a job that went `unknown` with `bridge_timeout`: the bridge is
|
|
786
|
+
* connected but the cloud has not heard about the job, so it asks instead of
|
|
787
|
+
* guessing. Unanswered within `JOB_HEARTBEAT_TIMEOUT_MS`, the job stays
|
|
788
|
+
* `unknown` and the cloud asks again after the same interval.
|
|
789
|
+
*/
|
|
790
|
+
export declare const cloudJobQuery: z.ZodObject<{
|
|
791
|
+
type: z.ZodLiteral<"job_query">;
|
|
792
|
+
request_id: z.ZodString;
|
|
793
|
+
job_ids: z.ZodArray<z.ZodUUID>;
|
|
794
|
+
}, z.core.$strip>;
|
|
795
|
+
export type CloudJobQuery = z.infer<typeof cloudJobQuery>;
|
|
796
|
+
/**
|
|
797
|
+
* One job the bridge recognises, in a `job_status` answer: its state, feedback,
|
|
798
|
+
* progress, result and error, as a `job_update` would carry them. No `slug`,
|
|
799
|
+
* `origin`, `goal_id` or `timestamp_ms` — the cloud asked about a job it
|
|
800
|
+
* already holds, so it knows the first three, and the answer is current.
|
|
801
|
+
*/
|
|
802
|
+
export declare const bridgeJobStatusEntry: z.ZodObject<{
|
|
803
|
+
job_id: z.ZodUUID;
|
|
804
|
+
state: z.ZodEnum<{
|
|
805
|
+
failed: "failed";
|
|
806
|
+
running: "running";
|
|
807
|
+
succeeded: "succeeded";
|
|
808
|
+
cancelled: "cancelled";
|
|
809
|
+
lost: "lost";
|
|
810
|
+
}>;
|
|
811
|
+
feedback: z.ZodNullable<z.ZodUnknown>;
|
|
812
|
+
progress: z.ZodNullable<z.ZodNumber>;
|
|
813
|
+
result: z.ZodNullable<z.ZodUnknown>;
|
|
814
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
815
|
+
code: z.ZodString;
|
|
816
|
+
message: z.ZodString;
|
|
817
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
818
|
+
}, z.core.$strip>>;
|
|
819
|
+
}, z.core.$strip>;
|
|
820
|
+
export type BridgeJobStatusEntry = z.infer<typeof bridgeJobStatusEntry>;
|
|
821
|
+
/**
|
|
822
|
+
* The bridge's answer to a `job_query`. Every queried id lands in exactly
|
|
823
|
+
* one of the two lists.
|
|
824
|
+
*
|
|
825
|
+
* `unknown_job_ids` is an answer, not a failure — the same stance
|
|
826
|
+
* `type_definitions.unresolved` takes. It names the queried jobs the bridge
|
|
827
|
+
* does not recognise at all; the cloud settles one `lost` with
|
|
828
|
+
* `job_unknown_to_bridge` once no goal the bridge cannot attribute is active
|
|
829
|
+
* on its action (one of those may be that very job), and at once for a
|
|
830
|
+
* service job.
|
|
831
|
+
*/
|
|
832
|
+
export declare const bridgeJobStatus: z.ZodObject<{
|
|
833
|
+
type: z.ZodLiteral<"job_status">;
|
|
834
|
+
request_id: z.ZodString;
|
|
835
|
+
jobs: z.ZodArray<z.ZodObject<{
|
|
836
|
+
job_id: z.ZodUUID;
|
|
837
|
+
state: z.ZodEnum<{
|
|
838
|
+
failed: "failed";
|
|
839
|
+
running: "running";
|
|
840
|
+
succeeded: "succeeded";
|
|
841
|
+
cancelled: "cancelled";
|
|
842
|
+
lost: "lost";
|
|
843
|
+
}>;
|
|
844
|
+
feedback: z.ZodNullable<z.ZodUnknown>;
|
|
845
|
+
progress: z.ZodNullable<z.ZodNumber>;
|
|
846
|
+
result: z.ZodNullable<z.ZodUnknown>;
|
|
847
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
848
|
+
code: z.ZodString;
|
|
849
|
+
message: z.ZodString;
|
|
850
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
851
|
+
}, z.core.$strip>>;
|
|
852
|
+
}, z.core.$strip>>;
|
|
853
|
+
unknown_job_ids: z.ZodArray<z.ZodUUID>;
|
|
854
|
+
}, z.core.$strip>;
|
|
855
|
+
export type BridgeJobStatus = z.infer<typeof bridgeJobStatus>;
|
|
669
856
|
/** Cloud asks for a fresh ROS graph; `request_id` correlates the answer. */
|
|
670
857
|
export declare const cloudIntrospectRequest: z.ZodObject<{
|
|
671
858
|
type: z.ZodLiteral<"introspect_request">;
|