@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
|
@@ -42,12 +42,21 @@
|
|
|
42
42
|
"type": "string",
|
|
43
43
|
"enum": [
|
|
44
44
|
"running",
|
|
45
|
+
"unknown",
|
|
45
46
|
"succeeded",
|
|
46
47
|
"failed",
|
|
47
48
|
"cancelled",
|
|
48
49
|
"lost"
|
|
49
50
|
],
|
|
50
|
-
"description": "Where the job stands: `running`, `succeeded`, `failed`, `cancelled` or `lost`. `
|
|
51
|
+
"description": "Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge's next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final: the bridge stated it does not know the job and nothing else runs on its action, or the action server vanished mid-goal."
|
|
52
|
+
},
|
|
53
|
+
"origin": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"enum": [
|
|
56
|
+
"fleetless",
|
|
57
|
+
"external"
|
|
58
|
+
],
|
|
59
|
+
"description": "Who started this job. `fleetless` for everything minted by the cloud; `external` for a goal the bridge found active on a published action without having sent it — no parameters, no starter, never written to `job_runs`."
|
|
51
60
|
},
|
|
52
61
|
"started_at": {
|
|
53
62
|
"type": "string",
|
|
@@ -104,7 +113,7 @@
|
|
|
104
113
|
"type": "null"
|
|
105
114
|
}
|
|
106
115
|
],
|
|
107
|
-
"description": "Why the job failed: a human `message`, a `code` where one exists, and `details` for the codes that carry a documented payload. `
|
|
116
|
+
"description": "Why the job failed, or why the cloud does not know how it stands: a human `message`, a `code` where one exists, and `details` for the codes that carry a documented payload. Set on `failed` and `lost`, and on `unknown` — where `code` is `bridge_disconnected` or `bridge_timeout`, the cloud's own reason for not knowing, cleared when the bridge reports the job running again."
|
|
108
117
|
}
|
|
109
118
|
},
|
|
110
119
|
"required": [
|
|
@@ -112,6 +121,7 @@
|
|
|
112
121
|
"robot_id",
|
|
113
122
|
"slug",
|
|
114
123
|
"state",
|
|
124
|
+
"origin",
|
|
115
125
|
"started_at",
|
|
116
126
|
"updated_at",
|
|
117
127
|
"seq",
|
|
@@ -30,12 +30,21 @@
|
|
|
30
30
|
"type": "string",
|
|
31
31
|
"enum": [
|
|
32
32
|
"running",
|
|
33
|
+
"unknown",
|
|
33
34
|
"succeeded",
|
|
34
35
|
"failed",
|
|
35
36
|
"cancelled",
|
|
36
37
|
"lost"
|
|
37
38
|
],
|
|
38
|
-
"description": "Where the job stands: `running`, `succeeded`, `failed`, `cancelled` or `lost`. `
|
|
39
|
+
"description": "Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge's next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final: the bridge stated it does not know the job and nothing else runs on its action, or the action server vanished mid-goal."
|
|
40
|
+
},
|
|
41
|
+
"origin": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"enum": [
|
|
44
|
+
"fleetless",
|
|
45
|
+
"external"
|
|
46
|
+
],
|
|
47
|
+
"description": "Who started this job. `fleetless` for everything minted by the cloud; `external` for a goal the bridge found active on a published action without having sent it — no parameters, no starter, never written to `job_runs`."
|
|
39
48
|
},
|
|
40
49
|
"started_at": {
|
|
41
50
|
"type": "string",
|
|
@@ -93,7 +102,7 @@
|
|
|
93
102
|
"type": "null"
|
|
94
103
|
}
|
|
95
104
|
],
|
|
96
|
-
"description": "Why the job failed: a human `message`, a `code` where one exists, and `details` for the codes that carry a documented payload. `
|
|
105
|
+
"description": "Why the job failed, or why the cloud does not know how it stands: a human `message`, a `code` where one exists, and `details` for the codes that carry a documented payload. Set on `failed` and `lost`, and on `unknown` — where `code` is `bridge_disconnected` or `bridge_timeout`, the cloud's own reason for not knowing, cleared when the bridge reports the job running again."
|
|
97
106
|
}
|
|
98
107
|
},
|
|
99
108
|
"required": [
|
|
@@ -101,6 +110,7 @@
|
|
|
101
110
|
"robot_id",
|
|
102
111
|
"slug",
|
|
103
112
|
"state",
|
|
113
|
+
"origin",
|
|
104
114
|
"started_at",
|
|
105
115
|
"updated_at",
|
|
106
116
|
"seq",
|
|
@@ -28,12 +28,21 @@
|
|
|
28
28
|
"type": "string",
|
|
29
29
|
"enum": [
|
|
30
30
|
"running",
|
|
31
|
+
"unknown",
|
|
31
32
|
"succeeded",
|
|
32
33
|
"failed",
|
|
33
34
|
"cancelled",
|
|
34
35
|
"lost"
|
|
35
36
|
],
|
|
36
|
-
"description": "Where the job stands: `running`, `succeeded`, `failed`, `cancelled` or `lost`. `
|
|
37
|
+
"description": "Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge's next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final: the bridge stated it does not know the job and nothing else runs on its action, or the action server vanished mid-goal."
|
|
38
|
+
},
|
|
39
|
+
"origin": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"enum": [
|
|
42
|
+
"fleetless",
|
|
43
|
+
"external"
|
|
44
|
+
],
|
|
45
|
+
"description": "Who started this job. `fleetless` for everything minted by the cloud; `external` for a goal the bridge found active on a published action without having sent it — no parameters, no starter, never written to `job_runs`."
|
|
37
46
|
},
|
|
38
47
|
"started_at": {
|
|
39
48
|
"type": "string",
|
|
@@ -91,7 +100,7 @@
|
|
|
91
100
|
"type": "null"
|
|
92
101
|
}
|
|
93
102
|
],
|
|
94
|
-
"description": "Why the job failed: a human `message`, a `code` where one exists, and `details` for the codes that carry a documented payload. `
|
|
103
|
+
"description": "Why the job failed, or why the cloud does not know how it stands: a human `message`, a `code` where one exists, and `details` for the codes that carry a documented payload. Set on `failed` and `lost`, and on `unknown` — where `code` is `bridge_disconnected` or `bridge_timeout`, the cloud's own reason for not knowing, cleared when the bridge reports the job running again."
|
|
95
104
|
}
|
|
96
105
|
},
|
|
97
106
|
"required": [
|
|
@@ -99,6 +108,7 @@
|
|
|
99
108
|
"robot_id",
|
|
100
109
|
"slug",
|
|
101
110
|
"state",
|
|
111
|
+
"origin",
|
|
102
112
|
"started_at",
|
|
103
113
|
"updated_at",
|
|
104
114
|
"seq",
|
|
@@ -43,12 +43,21 @@
|
|
|
43
43
|
"type": "string",
|
|
44
44
|
"enum": [
|
|
45
45
|
"running",
|
|
46
|
+
"unknown",
|
|
46
47
|
"succeeded",
|
|
47
48
|
"failed",
|
|
48
49
|
"cancelled",
|
|
49
50
|
"lost"
|
|
50
51
|
],
|
|
51
|
-
"description": "Where the job stands: `running`, `succeeded`, `failed`, `cancelled` or `lost`. `
|
|
52
|
+
"description": "Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge's next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final: the bridge stated it does not know the job and nothing else runs on its action, or the action server vanished mid-goal."
|
|
53
|
+
},
|
|
54
|
+
"origin": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"enum": [
|
|
57
|
+
"fleetless",
|
|
58
|
+
"external"
|
|
59
|
+
],
|
|
60
|
+
"description": "Who started this job. `fleetless` for everything minted by the cloud; `external` for a goal the bridge found active on a published action without having sent it — no parameters, no starter, never written to `job_runs`."
|
|
52
61
|
},
|
|
53
62
|
"started_at": {
|
|
54
63
|
"type": "string",
|
|
@@ -105,7 +114,7 @@
|
|
|
105
114
|
"type": "null"
|
|
106
115
|
}
|
|
107
116
|
],
|
|
108
|
-
"description": "Why the job failed: a human `message`, a `code` where one exists, and `details` for the codes that carry a documented payload. `
|
|
117
|
+
"description": "Why the job failed, or why the cloud does not know how it stands: a human `message`, a `code` where one exists, and `details` for the codes that carry a documented payload. Set on `failed` and `lost`, and on `unknown` — where `code` is `bridge_disconnected` or `bridge_timeout`, the cloud's own reason for not knowing, cleared when the bridge reports the job running again."
|
|
109
118
|
}
|
|
110
119
|
},
|
|
111
120
|
"required": [
|
|
@@ -113,6 +122,7 @@
|
|
|
113
122
|
"robot_id",
|
|
114
123
|
"slug",
|
|
115
124
|
"state",
|
|
125
|
+
"origin",
|
|
116
126
|
"started_at",
|
|
117
127
|
"updated_at",
|
|
118
128
|
"seq",
|
|
@@ -30,12 +30,21 @@
|
|
|
30
30
|
"type": "string",
|
|
31
31
|
"enum": [
|
|
32
32
|
"running",
|
|
33
|
+
"unknown",
|
|
33
34
|
"succeeded",
|
|
34
35
|
"failed",
|
|
35
36
|
"cancelled",
|
|
36
37
|
"lost"
|
|
37
38
|
],
|
|
38
|
-
"description": "Where the job stands: `running`, `succeeded`, `failed`, `cancelled` or `lost`. `
|
|
39
|
+
"description": "Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge's next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final: the bridge stated it does not know the job and nothing else runs on its action, or the action server vanished mid-goal."
|
|
40
|
+
},
|
|
41
|
+
"origin": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"enum": [
|
|
44
|
+
"fleetless",
|
|
45
|
+
"external"
|
|
46
|
+
],
|
|
47
|
+
"description": "Who started this job. `fleetless` for everything minted by the cloud; `external` for a goal the bridge found active on a published action without having sent it — no parameters, no starter, never written to `job_runs`."
|
|
39
48
|
},
|
|
40
49
|
"started_at": {
|
|
41
50
|
"type": "string",
|
|
@@ -93,7 +102,7 @@
|
|
|
93
102
|
"type": "null"
|
|
94
103
|
}
|
|
95
104
|
],
|
|
96
|
-
"description": "Why the job failed: a human `message`, a `code` where one exists, and `details` for the codes that carry a documented payload. `
|
|
105
|
+
"description": "Why the job failed, or why the cloud does not know how it stands: a human `message`, a `code` where one exists, and `details` for the codes that carry a documented payload. Set on `failed` and `lost`, and on `unknown` — where `code` is `bridge_disconnected` or `bridge_timeout`, the cloud's own reason for not knowing, cleared when the bridge reports the job running again."
|
|
97
106
|
}
|
|
98
107
|
},
|
|
99
108
|
"required": [
|
|
@@ -101,6 +110,7 @@
|
|
|
101
110
|
"robot_id",
|
|
102
111
|
"slug",
|
|
103
112
|
"state",
|
|
113
|
+
"origin",
|
|
104
114
|
"started_at",
|
|
105
115
|
"updated_at",
|
|
106
116
|
"seq",
|
|
@@ -38,12 +38,13 @@
|
|
|
38
38
|
"type": "string",
|
|
39
39
|
"enum": [
|
|
40
40
|
"running",
|
|
41
|
+
"unknown",
|
|
41
42
|
"succeeded",
|
|
42
43
|
"failed",
|
|
43
44
|
"cancelled",
|
|
44
45
|
"lost"
|
|
45
46
|
],
|
|
46
|
-
"description": "How the run ended, or `running` while it is still going. `lost`
|
|
47
|
+
"description": "How the run ended, or `running` while it is still going. `unknown` while the robot has not accounted for it — offline or silent — and updated once the bridge says how it stands. `lost` is final: the bridge did not know the run and nothing else ran on its action, so the outcome is unknowable rather than unknown."
|
|
47
48
|
},
|
|
48
49
|
"started_at": {
|
|
49
50
|
"type": "string",
|
|
@@ -62,7 +63,7 @@
|
|
|
62
63
|
"type": "null"
|
|
63
64
|
}
|
|
64
65
|
],
|
|
65
|
-
"description": "When the run finished, as an ISO 8601 timestamp. `null` while it is still `running` — a run has an end only once it has one."
|
|
66
|
+
"description": "When the run finished, as an ISO 8601 timestamp. `null` while it is still `running` or `unknown` — a run has an end only once it has one."
|
|
66
67
|
},
|
|
67
68
|
"duration_ms": {
|
|
68
69
|
"anyOf": [
|
|
@@ -75,7 +76,7 @@
|
|
|
75
76
|
"type": "null"
|
|
76
77
|
}
|
|
77
78
|
],
|
|
78
|
-
"description": "How long the run took, in milliseconds. `null` while it is still `running`, never `0` standing in for \"nothing so far\"."
|
|
79
|
+
"description": "How long the run took, in milliseconds. `null` while it is still `running` or `unknown`, never `0` standing in for \"nothing so far\"."
|
|
79
80
|
},
|
|
80
81
|
"result": {
|
|
81
82
|
"anyOf": [
|
|
@@ -44,10 +44,11 @@
|
|
|
44
44
|
"pattern": "^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
|
|
45
45
|
},
|
|
46
46
|
"state": {
|
|
47
|
-
"description": "Only runs in this state — `running`, `succeeded`, `failed`, `cancelled` or `lost`.",
|
|
47
|
+
"description": "Only runs in this state — `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`.",
|
|
48
48
|
"type": "string",
|
|
49
49
|
"enum": [
|
|
50
50
|
"running",
|
|
51
|
+
"unknown",
|
|
51
52
|
"succeeded",
|
|
52
53
|
"failed",
|
|
53
54
|
"cancelled",
|
|
@@ -33,12 +33,13 @@
|
|
|
33
33
|
"type": "string",
|
|
34
34
|
"enum": [
|
|
35
35
|
"running",
|
|
36
|
+
"unknown",
|
|
36
37
|
"succeeded",
|
|
37
38
|
"failed",
|
|
38
39
|
"cancelled",
|
|
39
40
|
"lost"
|
|
40
41
|
],
|
|
41
|
-
"description": "How the run ended, or `running` while it is still going. `lost`
|
|
42
|
+
"description": "How the run ended, or `running` while it is still going. `unknown` while the robot has not accounted for it — offline or silent — and updated once the bridge says how it stands. `lost` is final: the bridge did not know the run and nothing else ran on its action, so the outcome is unknowable rather than unknown."
|
|
42
43
|
},
|
|
43
44
|
"started_at": {
|
|
44
45
|
"type": "string",
|
|
@@ -57,7 +58,7 @@
|
|
|
57
58
|
"type": "null"
|
|
58
59
|
}
|
|
59
60
|
],
|
|
60
|
-
"description": "When the run finished, as an ISO 8601 timestamp. `null` while it is still `running` — a run has an end only once it has one."
|
|
61
|
+
"description": "When the run finished, as an ISO 8601 timestamp. `null` while it is still `running` or `unknown` — a run has an end only once it has one."
|
|
61
62
|
},
|
|
62
63
|
"duration_ms": {
|
|
63
64
|
"anyOf": [
|
|
@@ -70,7 +71,7 @@
|
|
|
70
71
|
"type": "null"
|
|
71
72
|
}
|
|
72
73
|
],
|
|
73
|
-
"description": "How long the run took, in milliseconds. `null` while it is still `running`, never `0` standing in for \"nothing so far\"."
|
|
74
|
+
"description": "How long the run took, in milliseconds. `null` while it is still `running` or `unknown`, never `0` standing in for \"nothing so far\"."
|
|
74
75
|
},
|
|
75
76
|
"result": {
|
|
76
77
|
"anyOf": [
|
|
@@ -25,12 +25,21 @@
|
|
|
25
25
|
"type": "string",
|
|
26
26
|
"enum": [
|
|
27
27
|
"running",
|
|
28
|
+
"unknown",
|
|
28
29
|
"succeeded",
|
|
29
30
|
"failed",
|
|
30
31
|
"cancelled",
|
|
31
32
|
"lost"
|
|
32
33
|
],
|
|
33
|
-
"description": "Where the job stands: `running`, `succeeded`, `failed`, `cancelled` or `lost`. `
|
|
34
|
+
"description": "Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge's next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final: the bridge stated it does not know the job and nothing else runs on its action, or the action server vanished mid-goal."
|
|
35
|
+
},
|
|
36
|
+
"origin": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"enum": [
|
|
39
|
+
"fleetless",
|
|
40
|
+
"external"
|
|
41
|
+
],
|
|
42
|
+
"description": "Who started this job. `fleetless` for everything minted by the cloud; `external` for a goal the bridge found active on a published action without having sent it — no parameters, no starter, never written to `job_runs`."
|
|
34
43
|
},
|
|
35
44
|
"started_at": {
|
|
36
45
|
"type": "string",
|
|
@@ -88,7 +97,7 @@
|
|
|
88
97
|
"type": "null"
|
|
89
98
|
}
|
|
90
99
|
],
|
|
91
|
-
"description": "Why the job failed: a human `message`, a `code` where one exists, and `details` for the codes that carry a documented payload. `
|
|
100
|
+
"description": "Why the job failed, or why the cloud does not know how it stands: a human `message`, a `code` where one exists, and `details` for the codes that carry a documented payload. Set on `failed` and `lost`, and on `unknown` — where `code` is `bridge_disconnected` or `bridge_timeout`, the cloud's own reason for not knowing, cleared when the bridge reports the job running again."
|
|
92
101
|
}
|
|
93
102
|
},
|
|
94
103
|
"required": [
|
|
@@ -96,6 +105,7 @@
|
|
|
96
105
|
"robot_id",
|
|
97
106
|
"slug",
|
|
98
107
|
"state",
|
|
108
|
+
"origin",
|
|
99
109
|
"started_at",
|
|
100
110
|
"updated_at",
|
|
101
111
|
"seq",
|
|
@@ -30,12 +30,21 @@
|
|
|
30
30
|
"type": "string",
|
|
31
31
|
"enum": [
|
|
32
32
|
"running",
|
|
33
|
+
"unknown",
|
|
33
34
|
"succeeded",
|
|
34
35
|
"failed",
|
|
35
36
|
"cancelled",
|
|
36
37
|
"lost"
|
|
37
38
|
],
|
|
38
|
-
"description": "Where the job stands: `running`, `succeeded`, `failed`, `cancelled` or `lost`. `
|
|
39
|
+
"description": "Where the job stands: `running`, `unknown`, `succeeded`, `failed`, `cancelled` or `lost`. `unknown` is not an outcome — the robot went offline or silent and the cloud does not know yet; the slug stays occupied and the bridge's next statement resolves it, `error` naming why the cloud lost sight of it. `lost` is final: the bridge stated it does not know the job and nothing else runs on its action, or the action server vanished mid-goal."
|
|
40
|
+
},
|
|
41
|
+
"origin": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"enum": [
|
|
44
|
+
"fleetless",
|
|
45
|
+
"external"
|
|
46
|
+
],
|
|
47
|
+
"description": "Who started this job. `fleetless` for everything minted by the cloud; `external` for a goal the bridge found active on a published action without having sent it — no parameters, no starter, never written to `job_runs`."
|
|
39
48
|
},
|
|
40
49
|
"started_at": {
|
|
41
50
|
"type": "string",
|
|
@@ -93,7 +102,7 @@
|
|
|
93
102
|
"type": "null"
|
|
94
103
|
}
|
|
95
104
|
],
|
|
96
|
-
"description": "Why the job failed: a human `message`, a `code` where one exists, and `details` for the codes that carry a documented payload. `
|
|
105
|
+
"description": "Why the job failed, or why the cloud does not know how it stands: a human `message`, a `code` where one exists, and `details` for the codes that carry a documented payload. Set on `failed` and `lost`, and on `unknown` — where `code` is `bridge_disconnected` or `bridge_timeout`, the cloud's own reason for not knowing, cleared when the bridge reports the job running again."
|
|
97
106
|
}
|
|
98
107
|
},
|
|
99
108
|
"required": [
|
|
@@ -101,6 +110,7 @@
|
|
|
101
110
|
"robot_id",
|
|
102
111
|
"slug",
|
|
103
112
|
"state",
|
|
113
|
+
"origin",
|
|
104
114
|
"started_at",
|
|
105
115
|
"updated_at",
|
|
106
116
|
"seq",
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"type": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"const": "cancel_result"
|
|
8
|
+
},
|
|
9
|
+
"request_id": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"minLength": 1,
|
|
12
|
+
"maxLength": 64
|
|
13
|
+
},
|
|
14
|
+
"slug": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"minLength": 2,
|
|
17
|
+
"maxLength": 63,
|
|
18
|
+
"pattern": "^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
|
|
19
|
+
},
|
|
20
|
+
"goals": {
|
|
21
|
+
"type": "array",
|
|
22
|
+
"items": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"properties": {
|
|
25
|
+
"job_id": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"format": "uuid",
|
|
28
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
29
|
+
},
|
|
30
|
+
"goal_id": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"minLength": 1
|
|
33
|
+
},
|
|
34
|
+
"return_code": {
|
|
35
|
+
"anyOf": [
|
|
36
|
+
{
|
|
37
|
+
"type": "integer",
|
|
38
|
+
"minimum": 0,
|
|
39
|
+
"maximum": 3
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"type": "null"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"required": [
|
|
48
|
+
"job_id",
|
|
49
|
+
"goal_id",
|
|
50
|
+
"return_code"
|
|
51
|
+
],
|
|
52
|
+
"additionalProperties": false
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"error": {
|
|
56
|
+
"anyOf": [
|
|
57
|
+
{
|
|
58
|
+
"type": "object",
|
|
59
|
+
"properties": {
|
|
60
|
+
"code": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"minLength": 1
|
|
63
|
+
},
|
|
64
|
+
"message": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"minLength": 1
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"required": [
|
|
70
|
+
"code",
|
|
71
|
+
"message"
|
|
72
|
+
],
|
|
73
|
+
"additionalProperties": false
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"type": "null"
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"required": [
|
|
82
|
+
"type",
|
|
83
|
+
"request_id",
|
|
84
|
+
"slug",
|
|
85
|
+
"goals",
|
|
86
|
+
"error"
|
|
87
|
+
],
|
|
88
|
+
"additionalProperties": false
|
|
89
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"type": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"const": "job_status"
|
|
8
|
+
},
|
|
9
|
+
"request_id": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"minLength": 1,
|
|
12
|
+
"maxLength": 64
|
|
13
|
+
},
|
|
14
|
+
"jobs": {
|
|
15
|
+
"type": "array",
|
|
16
|
+
"items": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"properties": {
|
|
19
|
+
"job_id": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"format": "uuid",
|
|
22
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
23
|
+
},
|
|
24
|
+
"state": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"enum": [
|
|
27
|
+
"running",
|
|
28
|
+
"succeeded",
|
|
29
|
+
"failed",
|
|
30
|
+
"cancelled",
|
|
31
|
+
"lost"
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"feedback": {
|
|
35
|
+
"anyOf": [
|
|
36
|
+
{},
|
|
37
|
+
{
|
|
38
|
+
"type": "null"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
"progress": {
|
|
43
|
+
"anyOf": [
|
|
44
|
+
{
|
|
45
|
+
"type": "number",
|
|
46
|
+
"minimum": 0,
|
|
47
|
+
"maximum": 1
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"type": "null"
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"result": {
|
|
55
|
+
"anyOf": [
|
|
56
|
+
{},
|
|
57
|
+
{
|
|
58
|
+
"type": "null"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
"error": {
|
|
63
|
+
"anyOf": [
|
|
64
|
+
{
|
|
65
|
+
"type": "object",
|
|
66
|
+
"properties": {
|
|
67
|
+
"code": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"minLength": 1
|
|
70
|
+
},
|
|
71
|
+
"message": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"minLength": 1
|
|
74
|
+
},
|
|
75
|
+
"details": {}
|
|
76
|
+
},
|
|
77
|
+
"required": [
|
|
78
|
+
"code",
|
|
79
|
+
"message"
|
|
80
|
+
],
|
|
81
|
+
"additionalProperties": false
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"type": "null"
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"required": [
|
|
90
|
+
"job_id",
|
|
91
|
+
"state",
|
|
92
|
+
"feedback",
|
|
93
|
+
"progress",
|
|
94
|
+
"result",
|
|
95
|
+
"error"
|
|
96
|
+
],
|
|
97
|
+
"additionalProperties": false
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"unknown_job_ids": {
|
|
101
|
+
"type": "array",
|
|
102
|
+
"items": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"format": "uuid",
|
|
105
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"required": [
|
|
110
|
+
"type",
|
|
111
|
+
"request_id",
|
|
112
|
+
"jobs",
|
|
113
|
+
"unknown_job_ids"
|
|
114
|
+
],
|
|
115
|
+
"additionalProperties": false
|
|
116
|
+
}
|
|
@@ -27,6 +27,24 @@
|
|
|
27
27
|
"lost"
|
|
28
28
|
]
|
|
29
29
|
},
|
|
30
|
+
"origin": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"enum": [
|
|
33
|
+
"fleetless",
|
|
34
|
+
"external"
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
"goal_id": {
|
|
38
|
+
"anyOf": [
|
|
39
|
+
{
|
|
40
|
+
"type": "string",
|
|
41
|
+
"minLength": 1
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"type": "null"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
},
|
|
30
48
|
"feedback": {
|
|
31
49
|
"anyOf": [
|
|
32
50
|
{},
|
|
@@ -92,6 +110,8 @@
|
|
|
92
110
|
"job_id",
|
|
93
111
|
"slug",
|
|
94
112
|
"state",
|
|
113
|
+
"origin",
|
|
114
|
+
"goal_id",
|
|
95
115
|
"feedback",
|
|
96
116
|
"progress",
|
|
97
117
|
"result",
|
package/dist/errors.d.ts
CHANGED
|
@@ -49,5 +49,5 @@ export type ParameterInvalidDetails = z.infer<typeof parameterInvalidDetails>;
|
|
|
49
49
|
* list is the shared vocabulary, not a closed set, so a new refusal never
|
|
50
50
|
* needs a contracts release before it can be reported honestly.
|
|
51
51
|
*/
|
|
52
|
-
export declare const ERROR_CODES: readonly ["not_found", "validation_error", "bad_request", "unknown_datapoint", "invalid_token", "protocol_mismatch", "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", "job_lost", "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", "target_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"];
|
|
52
|
+
export 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", "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", "target_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"];
|
|
53
53
|
export type ErrorCode = (typeof ERROR_CODES)[number];
|