@fleetless/contracts 9.0.0 → 9.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 +28 -0
- package/artifacts/openapi.json +281 -20
- package/artifacts/routes.json +65 -4
- package/artifacts/schema/action-config.schema.json +2 -2
- package/artifacts/schema/bridge-state.schema.json +14 -0
- package/artifacts/schema/client-robot-list-item.schema.json +14 -0
- package/artifacts/schema/client-robot-list-response.schema.json +14 -0
- package/artifacts/schema/cloud-config.schema.json +8 -8
- package/artifacts/schema/config-draft-response.schema.json +8 -8
- package/artifacts/schema/config-version-response.schema.json +8 -8
- package/artifacts/schema/datapoint-config.schema.json +3 -3
- package/artifacts/schema/parameter-spec.schema.json +1 -1
- package/artifacts/schema/publisher-config.schema.json +1 -1
- package/artifacts/schema/recover-held-job-request.schema.json +29 -0
- package/artifacts/schema/recover-held-job-response.schema.json +125 -0
- package/artifacts/schema/robot-config-doc.schema.json +8 -8
- package/artifacts/schema/robot-detail-response.schema.json +14 -0
- package/artifacts/schema/robot-list-item.schema.json +14 -0
- package/artifacts/schema/robot-list-response.schema.json +14 -0
- package/artifacts/schema/service-config.schema.json +1 -1
- package/artifacts/schema/support-renew-fail-refusal.schema.json +141 -0
- package/artifacts/schema/support-renew-fail-request.schema.json +28 -0
- package/dist/client-robots.d.ts +7 -1
- package/dist/client-robots.js +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.js +7 -7
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +31 -15
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/mcp.d.ts +13 -10
- package/dist/mcp.js +13 -10
- package/dist/protocol.d.ts +3 -0
- package/dist/protocol.js +1 -0
- package/dist/rest.d.ts +52 -0
- package/dist/rest.js +15 -0
- package/dist/routes.js +45 -7
- package/dist/support.d.ts +42 -0
- package/dist/support.js +15 -0
- package/package.json +1 -1
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"job": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"id": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"format": "uuid",
|
|
11
|
+
"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)$",
|
|
12
|
+
"description": "The job's id, minted by the cloud when the invocation is accepted. Informative — state is observed by slug; a cancel names this id to stop one specific job rather than whatever is running."
|
|
13
|
+
},
|
|
14
|
+
"robot_id": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"format": "uuid",
|
|
17
|
+
"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)$",
|
|
18
|
+
"description": "The robot this job is running on."
|
|
19
|
+
},
|
|
20
|
+
"slug": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"minLength": 2,
|
|
23
|
+
"maxLength": 63,
|
|
24
|
+
"pattern": "^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$",
|
|
25
|
+
"description": "The action or service this job is running, as the published configuration exposes it. One slug carries one job at a time, so every observer of that slug sees the same one."
|
|
26
|
+
},
|
|
27
|
+
"state": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"enum": [
|
|
30
|
+
"running",
|
|
31
|
+
"unknown",
|
|
32
|
+
"succeeded",
|
|
33
|
+
"failed",
|
|
34
|
+
"cancelled",
|
|
35
|
+
"lost"
|
|
36
|
+
],
|
|
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`."
|
|
46
|
+
},
|
|
47
|
+
"started_at": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"format": "date-time",
|
|
50
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
51
|
+
"description": "When the cloud minted this job, as an ISO 8601 timestamp. For a job adopted from a reconnecting bridge, this is **adoption time**, not the real start — the cloud never minted it."
|
|
52
|
+
},
|
|
53
|
+
"updated_at": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"format": "date-time",
|
|
56
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
57
|
+
"description": "When this job last changed, as an ISO 8601 timestamp."
|
|
58
|
+
},
|
|
59
|
+
"seq": {
|
|
60
|
+
"type": "integer",
|
|
61
|
+
"exclusiveMinimum": 0,
|
|
62
|
+
"maximum": 9007199254740991,
|
|
63
|
+
"description": "A monotonic counter ascending in mint order, and the named tiebreaker for any listing that claims one — `started_at` alone is not a total order. Scoped per cloud process and per run: job state lives in memory, so this restarts with the registry it orders."
|
|
64
|
+
},
|
|
65
|
+
"result": {
|
|
66
|
+
"anyOf": [
|
|
67
|
+
{},
|
|
68
|
+
{
|
|
69
|
+
"type": "null"
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"description": "What the call returned once it succeeded, shaped by the ROS action or service itself. `null` until then, and for a job that did not succeed."
|
|
73
|
+
},
|
|
74
|
+
"error": {
|
|
75
|
+
"anyOf": [
|
|
76
|
+
{
|
|
77
|
+
"type": "object",
|
|
78
|
+
"properties": {
|
|
79
|
+
"code": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"minLength": 1,
|
|
82
|
+
"description": "A machine-readable code for the failure, such as `job_queue_full`, where one exists for it."
|
|
83
|
+
},
|
|
84
|
+
"message": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"minLength": 1,
|
|
87
|
+
"description": "A human-readable sentence saying what went wrong."
|
|
88
|
+
},
|
|
89
|
+
"details": {
|
|
90
|
+
"description": "The structured payload belonging to `code`, for the codes that document one — `job_queue_full` carries its `limit` and its `queued` count here. Absent for a failure with nothing structured to add, which is most of them."
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"required": [
|
|
94
|
+
"code",
|
|
95
|
+
"message"
|
|
96
|
+
],
|
|
97
|
+
"additionalProperties": false
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"type": "null"
|
|
101
|
+
}
|
|
102
|
+
],
|
|
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."
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"required": [
|
|
107
|
+
"id",
|
|
108
|
+
"robot_id",
|
|
109
|
+
"slug",
|
|
110
|
+
"state",
|
|
111
|
+
"origin",
|
|
112
|
+
"started_at",
|
|
113
|
+
"updated_at",
|
|
114
|
+
"seq",
|
|
115
|
+
"result",
|
|
116
|
+
"error"
|
|
117
|
+
],
|
|
118
|
+
"additionalProperties": false
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"required": [
|
|
122
|
+
"job"
|
|
123
|
+
],
|
|
124
|
+
"additionalProperties": false
|
|
125
|
+
}
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
"const": "keep"
|
|
112
112
|
},
|
|
113
113
|
"description": {
|
|
114
|
-
"description": "Prose about what this value is, for whoever meets it in the console. It changes nothing the robot does, so a publish that touches only it pushes no configuration at all — but it is carried verbatim into `
|
|
114
|
+
"description": "Prose about what this value is, for whoever meets it in the console. It changes nothing the robot does, so a publish that touches only it pushes no configuration at all — but it is carried verbatim into `robots.describe`, where a model that has never seen this robot reads it. The datapoint is offered whenever the role grants it; without one it is offered with `description: null` and the model has less to go on, as for actions, services, publishers and cameras. Omission is the only way to say nothing; an empty string is refused, here and on all five.",
|
|
115
115
|
"examples": [
|
|
116
116
|
"What this value is, for whoever meets it in the console."
|
|
117
117
|
],
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"unit": {
|
|
140
140
|
"type": "string",
|
|
141
141
|
"maxLength": 32,
|
|
142
|
-
"description": "The unit of the value **after** `scale` and `offset`, not the robot's own. It is shown beside the value and carried by `
|
|
142
|
+
"description": "The unit of the value **after** `scale` and `offset`, not the robot's own. It is shown beside the value and carried by `robots.describe` as its own field, so a model does not have to guess whether 15 means percent, volts or minutes.",
|
|
143
143
|
"examples": [
|
|
144
144
|
"%"
|
|
145
145
|
]
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
"type": "integer",
|
|
149
149
|
"minimum": 0,
|
|
150
150
|
"maximum": 6,
|
|
151
|
-
"description": "How many fraction digits the console shows the value with — value tile, chart axis and tooltip, and the datapoint detail page — and the number `
|
|
151
|
+
"description": "How many fraction digits the console shows the value with — value tile, chart axis and tooltip, and the datapoint detail page — and the number `robots.describe` reports as its own field, so a model formats the value the way the console does. Presentation only: the stored value keeps the precision it arrived with, and absent means the console's own default rather than zero.",
|
|
152
152
|
"examples": [
|
|
153
153
|
1
|
|
154
154
|
]
|
|
@@ -609,7 +609,7 @@
|
|
|
609
609
|
]
|
|
610
610
|
},
|
|
611
611
|
"description": {
|
|
612
|
-
"description": "What this parameter means, in the developer's own words, and documentation only — the robot does nothing with it. It travels into the input schema `
|
|
612
|
+
"description": "What this parameter means, in the developer's own words, and documentation only — the robot does nothing with it. It travels into the input schema `robots.describe` publishes for this call, beside the bounds, so `type` and the range say what the value *is* and this is the only place that says what it *does*.",
|
|
613
613
|
"examples": [
|
|
614
614
|
"What a caller is choosing when they set this."
|
|
615
615
|
],
|
|
@@ -652,7 +652,7 @@
|
|
|
652
652
|
]
|
|
653
653
|
},
|
|
654
654
|
"description": {
|
|
655
|
-
"description": "What this action does, in the developer's own words — documentation for the console and for MCP clients, which is all it is: the robot does nothing with it. It is carried verbatim into `
|
|
655
|
+
"description": "What this action does, in the developer's own words — documentation for the console and for MCP clients, which is all it is: the robot does nothing with it. It is carried verbatim into `robots.describe` and read by a model that has never seen this robot. The action is offered whenever the role grants it; without one it is offered with `description: null`, and the model has nothing but the slug.",
|
|
656
656
|
"examples": [
|
|
657
657
|
"Drives to a target pose on the map."
|
|
658
658
|
],
|
|
@@ -830,7 +830,7 @@
|
|
|
830
830
|
]
|
|
831
831
|
},
|
|
832
832
|
"description": {
|
|
833
|
-
"description": "What this parameter means, in the developer's own words, and documentation only — the robot does nothing with it. It travels into the input schema `
|
|
833
|
+
"description": "What this parameter means, in the developer's own words, and documentation only — the robot does nothing with it. It travels into the input schema `robots.describe` publishes for this call, beside the bounds, so `type` and the range say what the value *is* and this is the only place that says what it *does*.",
|
|
834
834
|
"examples": [
|
|
835
835
|
"What a caller is choosing when they set this."
|
|
836
836
|
],
|
|
@@ -1051,7 +1051,7 @@
|
|
|
1051
1051
|
]
|
|
1052
1052
|
},
|
|
1053
1053
|
"description": {
|
|
1054
|
-
"description": "What this parameter means, in the developer's own words, and documentation only — the robot does nothing with it. It travels into the input schema `
|
|
1054
|
+
"description": "What this parameter means, in the developer's own words, and documentation only — the robot does nothing with it. It travels into the input schema `robots.describe` publishes for this call, beside the bounds, so `type` and the range say what the value *is* and this is the only place that says what it *does*.",
|
|
1055
1055
|
"examples": [
|
|
1056
1056
|
"What a caller is choosing when they set this."
|
|
1057
1057
|
],
|
|
@@ -1554,7 +1554,7 @@
|
|
|
1554
1554
|
]
|
|
1555
1555
|
},
|
|
1556
1556
|
"description": {
|
|
1557
|
-
"description": "What this camera shows, in the developer's own words — documentation for whoever reads the configuration, for the console and for MCP clients; the robot does nothing with it. A camera without one is still offered, with `description: null`, as for actions, services and publishers. What `
|
|
1557
|
+
"description": "What this camera shows, in the developer's own words — documentation for whoever reads the configuration, for the console and for MCP clients; the robot does nothing with it. A camera without one is still offered, with `description: null`, as for actions, services and publishers. What `camera.snapshot` serves is the latest snapshot with its age; a live session is never a tool.",
|
|
1558
1558
|
"examples": [
|
|
1559
1559
|
"Forward-facing camera on the mast."
|
|
1560
1560
|
],
|
|
@@ -40,6 +40,20 @@
|
|
|
40
40
|
"low_bandwidth": {
|
|
41
41
|
"type": "boolean",
|
|
42
42
|
"description": "Whether the bridge is in its low-bandwidth mode: datapoints capped, cameras reduced or stopped. Bridge-reported."
|
|
43
|
+
},
|
|
44
|
+
"health_reason": {
|
|
45
|
+
"description": "Cloud-observed connection health: `job_query_unanswered` after a bridge ignores held-job queries; `null` on an ordinary connect or disconnect. Optional for older observations.",
|
|
46
|
+
"anyOf": [
|
|
47
|
+
{
|
|
48
|
+
"type": "string",
|
|
49
|
+
"enum": [
|
|
50
|
+
"job_query_unanswered"
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"type": "null"
|
|
55
|
+
}
|
|
56
|
+
]
|
|
43
57
|
}
|
|
44
58
|
},
|
|
45
59
|
"required": [
|
|
@@ -40,6 +40,20 @@
|
|
|
40
40
|
"low_bandwidth": {
|
|
41
41
|
"type": "boolean",
|
|
42
42
|
"description": "Whether the bridge is in its low-bandwidth mode: datapoints capped, cameras reduced or stopped. Bridge-reported."
|
|
43
|
+
},
|
|
44
|
+
"health_reason": {
|
|
45
|
+
"description": "Cloud-observed connection health: `job_query_unanswered` after a bridge ignores held-job queries; `null` on an ordinary connect or disconnect. Optional for older observations.",
|
|
46
|
+
"anyOf": [
|
|
47
|
+
{
|
|
48
|
+
"type": "string",
|
|
49
|
+
"enum": [
|
|
50
|
+
"job_query_unanswered"
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"type": "null"
|
|
55
|
+
}
|
|
56
|
+
]
|
|
43
57
|
}
|
|
44
58
|
},
|
|
45
59
|
"required": [
|
|
@@ -45,6 +45,20 @@
|
|
|
45
45
|
"low_bandwidth": {
|
|
46
46
|
"type": "boolean",
|
|
47
47
|
"description": "Whether the bridge is in its low-bandwidth mode: datapoints capped, cameras reduced or stopped. Bridge-reported."
|
|
48
|
+
},
|
|
49
|
+
"health_reason": {
|
|
50
|
+
"description": "Cloud-observed connection health: `job_query_unanswered` after a bridge ignores held-job queries; `null` on an ordinary connect or disconnect. Optional for older observations.",
|
|
51
|
+
"anyOf": [
|
|
52
|
+
{
|
|
53
|
+
"type": "string",
|
|
54
|
+
"enum": [
|
|
55
|
+
"job_query_unanswered"
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"type": "null"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
48
62
|
}
|
|
49
63
|
},
|
|
50
64
|
"required": [
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
]
|
|
128
128
|
},
|
|
129
129
|
"description": {
|
|
130
|
-
"description": "What this parameter means, in the developer's own words, and documentation only — the robot does nothing with it. It travels into the input schema `
|
|
130
|
+
"description": "What this parameter means, in the developer's own words, and documentation only — the robot does nothing with it. It travels into the input schema `robots.describe` publishes for this call, beside the bounds, so `type` and the range say what the value *is* and this is the only place that says what it *does*.",
|
|
131
131
|
"examples": [
|
|
132
132
|
"What a caller is choosing when they set this."
|
|
133
133
|
],
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"anyOf": [
|
|
4
|
+
{
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"code": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"const": "validation_error"
|
|
10
|
+
},
|
|
11
|
+
"message": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"minLength": 1
|
|
14
|
+
},
|
|
15
|
+
"details": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"properties": {
|
|
18
|
+
"rule": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"const": "invalid_flow"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"required": [
|
|
24
|
+
"rule"
|
|
25
|
+
],
|
|
26
|
+
"additionalProperties": false
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"required": [
|
|
30
|
+
"code",
|
|
31
|
+
"message",
|
|
32
|
+
"details"
|
|
33
|
+
],
|
|
34
|
+
"additionalProperties": false
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"type": "object",
|
|
38
|
+
"properties": {
|
|
39
|
+
"code": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"const": "unauthorized"
|
|
42
|
+
},
|
|
43
|
+
"message": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"minLength": 1
|
|
46
|
+
},
|
|
47
|
+
"details": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"properties": {
|
|
50
|
+
"rule": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"const": "invalid_authority"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"required": [
|
|
56
|
+
"rule"
|
|
57
|
+
],
|
|
58
|
+
"additionalProperties": false
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"required": [
|
|
62
|
+
"code",
|
|
63
|
+
"message",
|
|
64
|
+
"details"
|
|
65
|
+
],
|
|
66
|
+
"additionalProperties": false
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"type": "object",
|
|
70
|
+
"properties": {
|
|
71
|
+
"code": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"const": "not_found"
|
|
74
|
+
},
|
|
75
|
+
"message": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"minLength": 1
|
|
78
|
+
},
|
|
79
|
+
"details": {
|
|
80
|
+
"type": "object",
|
|
81
|
+
"properties": {
|
|
82
|
+
"rule": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"enum": [
|
|
85
|
+
"invalid_flow",
|
|
86
|
+
"identity_mismatch"
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"required": [
|
|
91
|
+
"rule"
|
|
92
|
+
],
|
|
93
|
+
"additionalProperties": false
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"required": [
|
|
97
|
+
"code",
|
|
98
|
+
"message",
|
|
99
|
+
"details"
|
|
100
|
+
],
|
|
101
|
+
"additionalProperties": false
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"type": "object",
|
|
105
|
+
"properties": {
|
|
106
|
+
"code": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"const": "target_state_conflict"
|
|
109
|
+
},
|
|
110
|
+
"message": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"minLength": 1
|
|
113
|
+
},
|
|
114
|
+
"details": {
|
|
115
|
+
"type": "object",
|
|
116
|
+
"properties": {
|
|
117
|
+
"rule": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"enum": [
|
|
120
|
+
"expired",
|
|
121
|
+
"replayed",
|
|
122
|
+
"session_inactive",
|
|
123
|
+
"stale_generation"
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"required": [
|
|
128
|
+
"rule"
|
|
129
|
+
],
|
|
130
|
+
"additionalProperties": false
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"required": [
|
|
134
|
+
"code",
|
|
135
|
+
"message",
|
|
136
|
+
"details"
|
|
137
|
+
],
|
|
138
|
+
"additionalProperties": false
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"flow_id": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"format": "uuid",
|
|
8
|
+
"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)$",
|
|
9
|
+
"description": "The pending Cloud renewal flow created with the original support bearer."
|
|
10
|
+
},
|
|
11
|
+
"code_verifier": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"pattern": "^[A-Za-z0-9._~-]{43,128}$",
|
|
14
|
+
"description": "The server-held RFC 7636 verifier matching the flow's S256 challenge; never sent to the browser."
|
|
15
|
+
},
|
|
16
|
+
"reason": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"const": "authority_failed",
|
|
19
|
+
"description": "A fixed category; browser and IdP error text is not forwarded."
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"required": [
|
|
23
|
+
"flow_id",
|
|
24
|
+
"code_verifier",
|
|
25
|
+
"reason"
|
|
26
|
+
],
|
|
27
|
+
"additionalProperties": false
|
|
28
|
+
}
|
package/dist/client-robots.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
/**
|
|
4
4
|
* One robot as `GET /api/client/robots` lists it — the REST twin of the MCP
|
|
5
|
-
*
|
|
5
|
+
* action `robots.list`, and the one robot question no robot-scoped route can
|
|
6
6
|
* answer: which robots may I name at all.
|
|
7
7
|
*
|
|
8
8
|
* Deliberately not `robotListItem`: that one carries `exposes`, the per-kind
|
|
@@ -15,6 +15,9 @@ export declare const clientRobotListItem: z.ZodObject<{
|
|
|
15
15
|
online: z.ZodBoolean;
|
|
16
16
|
latency_ms: z.ZodNullable<z.ZodNumber>;
|
|
17
17
|
low_bandwidth: z.ZodBoolean;
|
|
18
|
+
health_reason: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
19
|
+
job_query_unanswered: "job_query_unanswered";
|
|
20
|
+
}>>>;
|
|
18
21
|
}, z.core.$strip>;
|
|
19
22
|
published_version: z.ZodNullable<z.ZodNumber>;
|
|
20
23
|
id: z.ZodUUID;
|
|
@@ -29,6 +32,9 @@ export declare const clientRobotListResponse: z.ZodObject<{
|
|
|
29
32
|
online: z.ZodBoolean;
|
|
30
33
|
latency_ms: z.ZodNullable<z.ZodNumber>;
|
|
31
34
|
low_bandwidth: z.ZodBoolean;
|
|
35
|
+
health_reason: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
36
|
+
job_query_unanswered: "job_query_unanswered";
|
|
37
|
+
}>>>;
|
|
32
38
|
}, z.core.$strip>;
|
|
33
39
|
published_version: z.ZodNullable<z.ZodNumber>;
|
|
34
40
|
id: z.ZodUUID;
|
package/dist/client-robots.js
CHANGED
|
@@ -5,7 +5,7 @@ import { robot } from './rest.js';
|
|
|
5
5
|
/* ------------------------------------------ the robots an app user reaches */
|
|
6
6
|
/**
|
|
7
7
|
* One robot as `GET /api/client/robots` lists it — the REST twin of the MCP
|
|
8
|
-
*
|
|
8
|
+
* action `robots.list`, and the one robot question no robot-scoped route can
|
|
9
9
|
* answer: which robots may I name at all.
|
|
10
10
|
*
|
|
11
11
|
* Deliberately not `robotListItem`: that one carries `exposes`, the per-kind
|
package/dist/config.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
|
|
3
3
|
/**
|
|
4
4
|
* What an exposed service *is*, in the developer's own words.
|
|
5
5
|
*
|
|
6
|
-
* This is what `
|
|
6
|
+
* This is what `robots.describe` carries verbatim, so it is read by a model
|
|
7
7
|
* that has never seen this robot and cannot ask a follow-up question.
|
|
8
8
|
* `unit` and `range` already say what a number *is*; this says what it
|
|
9
9
|
* *means*.
|
package/dist/config.js
CHANGED
|
@@ -362,7 +362,7 @@ const underSlug = (slugKey, snippet) => ({ ...snippet, body: { [slugKey]: snippe
|
|
|
362
362
|
/**
|
|
363
363
|
* What an exposed service *is*, in the developer's own words.
|
|
364
364
|
*
|
|
365
|
-
* This is what `
|
|
365
|
+
* This is what `robots.describe` carries verbatim, so it is read by a model
|
|
366
366
|
* that has never seen this robot and cannot ask a follow-up question.
|
|
367
367
|
* `unit` and `range` already say what a number *is*; this says what it
|
|
368
368
|
* *means*.
|
|
@@ -523,7 +523,7 @@ export const parameterSpec = strictObject({
|
|
|
523
523
|
examples: ['^[a-z_]+$'],
|
|
524
524
|
}).optional(),
|
|
525
525
|
description: parameterDescription.meta({
|
|
526
|
-
description: 'What this parameter means, in the developer\'s own words, and documentation only — the robot does nothing with it. It travels into the input schema `
|
|
526
|
+
description: 'What this parameter means, in the developer\'s own words, and documentation only — the robot does nothing with it. It travels into the input schema `robots.describe` publishes for this call, beside the bounds, so `type` and the range say what the value *is* and this is the only place that says what it *does*.',
|
|
527
527
|
/** The sentence `PARAMETER_SNIPPET` already places here, verbatim. */
|
|
528
528
|
examples: ['What a caller is choosing when they set this.'],
|
|
529
529
|
}),
|
|
@@ -832,11 +832,11 @@ export const datapointNumeric = strictObject({
|
|
|
832
832
|
examples: [-273.15],
|
|
833
833
|
}).optional(),
|
|
834
834
|
unit: z.string().max(32).meta({
|
|
835
|
-
description: 'The unit of the value **after** `scale` and `offset`, not the robot\'s own. It is shown beside the value and carried by `
|
|
835
|
+
description: 'The unit of the value **after** `scale` and `offset`, not the robot\'s own. It is shown beside the value and carried by `robots.describe` as its own field, so a model does not have to guess whether 15 means percent, volts or minutes.',
|
|
836
836
|
examples: ['%'],
|
|
837
837
|
}).optional(),
|
|
838
838
|
decimals: z.number().int().min(0).max(6).meta({
|
|
839
|
-
description: 'How many fraction digits the console shows the value with — value tile, chart axis and tooltip, and the datapoint detail page — and the number `
|
|
839
|
+
description: 'How many fraction digits the console shows the value with — value tile, chart axis and tooltip, and the datapoint detail page — and the number `robots.describe` reports as its own field, so a model formats the value the way the console does. Presentation only: the stored value keeps the precision it arrived with, and absent means the console\'s own default rather than zero.',
|
|
840
840
|
examples: [1],
|
|
841
841
|
}).optional(),
|
|
842
842
|
});
|
|
@@ -995,7 +995,7 @@ export const datapointConfig = strictObject({
|
|
|
995
995
|
description: '`keep` exempts this datapoint from the low-bandwidth rate cap; its backfill still pauses.',
|
|
996
996
|
}),
|
|
997
997
|
description: serviceDescription.meta({
|
|
998
|
-
description: 'Prose about what this value is, for whoever meets it in the console. It changes nothing the robot does, so a publish that touches only it pushes no configuration at all — but it is carried verbatim into `
|
|
998
|
+
description: 'Prose about what this value is, for whoever meets it in the console. It changes nothing the robot does, so a publish that touches only it pushes no configuration at all — but it is carried verbatim into `robots.describe`, where a model that has never seen this robot reads it. The datapoint is offered whenever the role grants it; without one it is offered with `description: null` and the model has less to go on, as for actions, services, publishers and cameras. Omission is the only way to say nothing; an empty string is refused, here and on all five.',
|
|
999
999
|
/**
|
|
1000
1000
|
* The sentence both datapoint snippets already place here, verbatim. Its
|
|
1001
1001
|
* four siblings — an action's, a service's, a publisher's, a camera's —
|
|
@@ -1352,7 +1352,7 @@ export const actionConfig = strictObject({
|
|
|
1352
1352
|
message: messageBody.optional(),
|
|
1353
1353
|
parameters: parameterMap.optional(),
|
|
1354
1354
|
description: serviceDescription.meta({
|
|
1355
|
-
description: 'What this action does, in the developer\'s own words — documentation for the console and for MCP clients, which is all it is: the robot does nothing with it. It is carried verbatim into `
|
|
1355
|
+
description: 'What this action does, in the developer\'s own words — documentation for the console and for MCP clients, which is all it is: the robot does nothing with it. It is carried verbatim into `robots.describe` and read by a model that has never seen this robot. The action is offered whenever the role grants it; without one it is offered with `description: null`, and the model has nothing but the slug.',
|
|
1356
1356
|
examples: ['Drives to a target pose on the map.'],
|
|
1357
1357
|
}),
|
|
1358
1358
|
}).meta({
|
|
@@ -1853,7 +1853,7 @@ export const cameraConfig = strictObject({
|
|
|
1853
1853
|
examples: [5],
|
|
1854
1854
|
}),
|
|
1855
1855
|
description: serviceDescription.meta({
|
|
1856
|
-
description: 'What this camera shows, in the developer\'s own words — documentation for whoever reads the configuration, for the console and for MCP clients; the robot does nothing with it. A camera without one is still offered, with `description: null`, as for actions, services and publishers. What `
|
|
1856
|
+
description: 'What this camera shows, in the developer\'s own words — documentation for whoever reads the configuration, for the console and for MCP clients; the robot does nothing with it. A camera without one is still offered, with `description: null`, as for actions, services and publishers. What `camera.snapshot` serves is the latest snapshot with its age; a live session is never a tool.',
|
|
1857
1857
|
examples: ['Forward-facing camera on the mast.'],
|
|
1858
1858
|
}),
|
|
1859
1859
|
}).meta({
|
package/dist/errors.d.ts
CHANGED
|
@@ -258,5 +258,5 @@ export type BillingDocumentsUnavailableDetails = z.infer<typeof billingDocuments
|
|
|
258
258
|
* list is the shared vocabulary, not a closed set, so a new refusal never
|
|
259
259
|
* needs a contracts release before it can be reported honestly.
|
|
260
260
|
*/
|
|
261
|
-
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", "role_name_taken", "role_in_use", "last_role", "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", "invalid_code", "method_not_allowed", "plan_limit", "plan_required", "org_locked", "file_too_large", "billing_unavailable", "payment_provider_unavailable", "history_migrating", "billing_documents_unavailable", "support_read_only", "support_forbidden"];
|
|
261
|
+
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", "operator_verified_stopped", "job_unknown_to_bridge", "action_server_lost", "action_failed", "goal_rejected", "goal_send_failed", "result_failed", "goal_uncontrollable", "bridge_disconnected", "config_changed", "publisher_busy", "unknown_command", "not_subscribable", "camera_offline", "no_snapshot_yet", "live_unavailable", "wrong_kind", "not_recorded", "not_aggregatable", "quota_exceeded", "credential_in_use", "goal_timeout", "robot_in_use", "robot_deletion_partial", "job_queue_full", "invalid_uuid", "rate_limited", "tier_required", "token_spent", "service_timeout", "asset_missing", "dynamic_registration_disabled", "client_limit_reached", "idp_unavailable", "mcp_disabled", "tool_not_available", "capability_required", "last_owner", "role_name_taken", "role_in_use", "last_role", "target_state_conflict", "job_state_conflict", "signup_closed", "draft_not_a_document", "internal_error", "not_cancellable", "unsupported_media_type", "wrong_browser", "invalid_yaml", "unstorable_yaml", "registration_closed", "domain_not_allowed", "email_unverified", "origin_not_allowed", "template_invalid", "provider_disabled", "provider_misconfigured", "invalid_redirect_uri", "interaction_expired", "invalid_code", "method_not_allowed", "plan_limit", "plan_required", "org_locked", "file_too_large", "billing_unavailable", "payment_provider_unavailable", "history_migrating", "billing_documents_unavailable", "support_read_only", "support_forbidden"];
|
|
262
262
|
export type ErrorCode = (typeof ERROR_CODES)[number];
|
package/dist/errors.js
CHANGED
|
@@ -307,28 +307,38 @@ export const ERROR_CODES = [
|
|
|
307
307
|
*/
|
|
308
308
|
'cancel_rejected',
|
|
309
309
|
/**
|
|
310
|
-
*
|
|
311
|
-
*
|
|
312
|
-
*
|
|
313
|
-
*
|
|
310
|
+
* `Job.error.code` on `lost` when a terminal goal status was observed but
|
|
311
|
+
* its result could not be recovered within the bounded wait, or when the
|
|
312
|
+
* bridge or cloud establishes loss without a more specific cause. The
|
|
313
|
+
* message says which path occurred. Distinct from `action_server_lost`
|
|
314
|
+
* (server disappearance before terminal status) and
|
|
315
|
+
* `job_unknown_to_bridge` (confirmed not-known job).
|
|
314
316
|
*/
|
|
315
317
|
'job_lost',
|
|
316
318
|
/**
|
|
317
|
-
*
|
|
318
|
-
*
|
|
319
|
-
*
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
319
|
+
* `Job.error.code` on `lost` after an org Owner explicitly verifies the
|
|
320
|
+
* robot is physically stopped and releases one held job. This records a
|
|
321
|
+
* human safety assertion, not a bridge statement or a timer decision.
|
|
322
|
+
*/
|
|
323
|
+
'operator_verified_stopped',
|
|
324
|
+
/**
|
|
325
|
+
* The bridge confirms it does not know this job after reconciliation,
|
|
326
|
+
* rather than merely omitting it from `hello.active_jobs`. For an action,
|
|
327
|
+
* no goal the bridge cannot attribute is active on the job's action any
|
|
328
|
+
* more, so none of them can be it. A `job.error.code` on `lost`, final:
|
|
329
|
+
* how an `unknown` job the bridge has no word about ends. A service job,
|
|
330
|
+
* which has no goals to look at, gets it as soon as the bridge does not
|
|
331
|
+
* know it; so does a job whose
|
|
323
332
|
* persisted goal the action server no longer knows (its result expired).
|
|
324
|
-
* Distinct from `job_lost`,
|
|
325
|
-
*
|
|
326
|
-
*
|
|
333
|
+
* Distinct from `job_lost`, which needs no more specific cause, and from
|
|
334
|
+
* `bridge_disconnected`/`bridge_timeout`, the cloud's guesses that make
|
|
335
|
+
* a job `unknown` in the first place.
|
|
327
336
|
*/
|
|
328
337
|
'job_unknown_to_bridge',
|
|
329
338
|
/**
|
|
330
|
-
* The robot's action server vanished
|
|
331
|
-
* check found `server_is_ready()` false for
|
|
339
|
+
* The robot's action server vanished before reporting terminal status —
|
|
340
|
+
* the bridge's own liveness check found `server_is_ready()` false for
|
|
341
|
+
* three seconds straight and
|
|
332
342
|
* gave up waiting for it to come back. A `job.error.code` on `lost`: the
|
|
333
343
|
* outcome the goal actually reached is unknown, so `lost` — not `failed` —
|
|
334
344
|
* is the honest state, and this code says why.
|
|
@@ -754,6 +764,12 @@ export const ERROR_CODES = [
|
|
|
754
764
|
*
|
|
755
765
|
*/
|
|
756
766
|
'target_state_conflict',
|
|
767
|
+
/**
|
|
768
|
+
* A held-job recovery cannot release the named job: its state changed, the
|
|
769
|
+
* bridge reconnected, or the id no longer matches. The Owner must read the
|
|
770
|
+
* current job and connection state before deciding whether to try again.
|
|
771
|
+
*/
|
|
772
|
+
'job_state_conflict',
|
|
757
773
|
// 2026-09-04 — the public site (closed beta).
|
|
758
774
|
/**
|
|
759
775
|
* `403` from the portal's sign-up pages while `SIGNUP_MODE=closed`. Not
|