@deepdockai/cli 1.9.0 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.11.0
|
|
4
|
+
|
|
5
|
+
- The current device API, three changes in the pinned device API, the bundled TypeScript client and the references:
|
|
6
|
+
- A paused action's `reason` can be `http_signin_changed` (the program's sign-in answered in a way the device's recorded sign-in does not describe; only Deepdock lifts it). The bundled client's `ActionState` type and the concepts reference gain it.
|
|
7
|
+
- The documented UUID pattern of the `id` fields (`PartnerDevice.id`, `ReleasedDevice.id`) accepts upper-case hex digits as well. The values the API accepts and answers are unchanged.
|
|
8
|
+
- `error.fields` of an `invalid_input` can name one element of a list input (`list[index].field`, or `list[index]` when no element field is named, with a zero-based index) when a write refuses that element with a refusal the action declares, or with `not_found` or `too_many_rows`. The errors reference describes it.
|
|
9
|
+
|
|
10
|
+
## 1.10.0
|
|
11
|
+
|
|
12
|
+
- The current device API: pairing a device answers `409 device_update_required` (exit 2) when its Deepdock client is too old for a system of your organisation, or has not reported its client yet. `error.reason` is `lacks` (update the client on the device, then pair again) or `unreported` (retry in a minute). The pinned device API, the error code list and the errors reference describe it.
|
|
13
|
+
|
|
3
14
|
## 1.9.0
|
|
4
15
|
|
|
5
16
|
- The current device API: every system in `GET /v1/devices` and `GET /v1/devices/{deviceId}` carries `actions`, one entry per action of yours on that system that Deepdock can serve: `{ action, available, reason }`, where `available` is `true` (admitted now), `false` (`reason` is the error code a call answers with now) or `null` (unknown, not unavailable: call it). A stopped system carries `execution` (`{ "status": "stopped", "reason": "device_outdated" | "internal_error" }`) in the device listing, in `GET /v1/devices/{deviceId}/systems` and on each of its actions in the action index. The pinned device API, the bundled TypeScript client's `Device` and `DeviceSystem` types (new `ActionAvailability`, `UnavailableReason` and `ExecutionStop`) and the concepts reference describe both.
|
package/dist/deepdock.js
CHANGED
|
@@ -10861,6 +10861,7 @@ var EXIT_CODES = {
|
|
|
10861
10861
|
invalid_input: 2,
|
|
10862
10862
|
pairing_code_invalid: 2,
|
|
10863
10863
|
other_partner_build: 2,
|
|
10864
|
+
device_update_required: 2,
|
|
10864
10865
|
device_learning_only: 2,
|
|
10865
10866
|
device_answer_unreadable: 2,
|
|
10866
10867
|
device_connected_twice: 2,
|
|
@@ -11445,7 +11446,7 @@ import { spawn } from "node:child_process";
|
|
|
11445
11446
|
import { homedir, hostname } from "node:os";
|
|
11446
11447
|
|
|
11447
11448
|
// src/version.ts
|
|
11448
|
-
var VERSION = "1.
|
|
11449
|
+
var VERSION = "1.11.0";
|
|
11449
11450
|
|
|
11450
11451
|
// src/runtime.ts
|
|
11451
11452
|
var DEFAULT_BASE_URL = "https://api.deepdock.ai";
|
package/package.json
CHANGED
|
@@ -99,6 +99,7 @@ Pairing answers:
|
|
|
99
99
|
| `invalid_request` | 400 | the code is malformed; fix the input |
|
|
100
100
|
| `pairing_code_invalid` | 404 | unknown, expired, replaced, already used, or the device is offline; ask for a fresh code |
|
|
101
101
|
| `other_partner_build` | 409 | the device runs another partner's branded client; only that partner can pair it |
|
|
102
|
+
| `device_update_required` | 409 | the device's Deepdock client is too old for a system of your organisation (`error.reason` `lacks`), or has not reported its client yet (`unreported`, retry in a minute); update the client on the device, then pair again |
|
|
102
103
|
| `rate_limited` | 429 | more than 5 failed pairing attempts in 60 seconds with this key; wait up to a minute |
|
|
103
104
|
|
|
104
105
|
Successful pairings do not count against the limit; malformed codes are refused before counting.
|
|
@@ -137,7 +137,12 @@ export type ActionState =
|
|
|
137
137
|
| {
|
|
138
138
|
action: string
|
|
139
139
|
state: 'paused'
|
|
140
|
-
reason:
|
|
140
|
+
reason:
|
|
141
|
+
| 'structure_changed'
|
|
142
|
+
| 'readback_failed'
|
|
143
|
+
| 'credentials_rejected'
|
|
144
|
+
| 'certificate_changed'
|
|
145
|
+
| 'http_signin_changed'
|
|
141
146
|
pausedAt: string
|
|
142
147
|
}
|
|
143
148
|
| {
|
|
@@ -72,6 +72,7 @@ has a display `label` (may be `null`), a `version` the device reported (may be a
|
|
|
72
72
|
| pause `reason` | `readback_failed` | a write's result did not match, so nothing was saved | wait; tell the user the change was not saved |
|
|
73
73
|
| pause `reason` | `credentials_rejected` | the program no longer accepts the sign-in the device stored for it (for example a changed password) | tell the user to choose "Anmeldung erneuern" (Renew sign-in) in the Deepdock client; the action resumes by itself once the new sign-in works, nothing to resume |
|
|
74
74
|
| pause `reason` | `certificate_changed` | the program's server certificate is not the one the device accepted at sign-in | tell the user to choose "Anmeldung erneuern" (Renew sign-in) in the Deepdock client, compare the fingerprint it shows and sign in again; the action resumes by itself, nothing to resume |
|
|
75
|
+
| pause `reason` | `http_signin_changed` | the program's sign-in answered in a way the device's recorded sign-in does not describe, and it is not a refused credential; the device stops signing in | wait; nothing to do on your side or the customer's: Deepdock reviews and resumes, and renewing the sign-in does not lift it |
|
|
75
76
|
| pause `reason` | `system_stopped`, `system_missing` | as the system statuses above; these need no resume and clear when the system is back | as above |
|
|
76
77
|
|
|
77
78
|
Switch on these values; any value you do not know is shown as it is.
|
|
@@ -10,6 +10,11 @@ An `invalid_input` that refuses an action call's input also carries `fields`: ev
|
|
|
10
10
|
failed, as `{ "field", "message" }`, sorted by name, at most 32. It is absent when the body is not
|
|
11
11
|
an object at all. No message holds the value you sent.
|
|
12
12
|
|
|
13
|
+
A write that refuses one element of a list input (with a refusal the action declares, or
|
|
14
|
+
`not_found` or `too_many_rows`) names that element in `fields`: `list[index].field` when the
|
|
15
|
+
refusing step names a field of the element, else `list[index]`, with a zero-based `index`. It is
|
|
16
|
+
absent when the refusal cannot name an input or an element.
|
|
17
|
+
|
|
13
18
|
Reaction columns: **Retry** says whether the same request may be sent again (for a write, always
|
|
14
19
|
with the **same** `Idempotency-Key`); **Show** says what the end user should see.
|
|
15
20
|
|
|
@@ -41,6 +46,7 @@ with the **same** `Idempotency-Key`); **Show** says what the end user should see
|
|
|
41
46
|
| `access_missing` | 409 | the device's database access is gone (a removed database account or a lost secret on the PC); every action of that system is refused. Nothing was run. **No `Retry-After`** | as `access_outdated` | as `access_outdated` |
|
|
42
47
|
| `pairing_code_invalid` | 404 | pairing: the code is unknown, expired, replaced, used, or its device is offline | with a fresh code | "read the code off the device screen again" |
|
|
43
48
|
| `other_partner_build` | 409 | pairing: the device runs another partner's client build | no | "this device is set up for another provider" |
|
|
49
|
+
| `device_update_required` | 409 | pairing: the device's Deepdock client is too old for a system of your organisation that has several database connectors, so pairing it would leave actions that cannot run. `error.reason` is `lacks` (the client is too old) or `unreported` (it has not reported its client yet) | `lacks`: no, until the Deepdock client on the PC is updated, then pair with a fresh code. `unreported`: yes, after a minute | "the Deepdock client on this PC needs an update before it can be paired" |
|
|
44
50
|
| `device_learning_only` | 409 | the PC runs the Deepdock client for learning only, which runs no actions; nothing was sent to it. Reads, writes and the systems list on it all answer this | no; it changes only when the Deepdock service is installed on that PC | "this PC needs the Deepdock service to run actions" |
|
|
45
51
|
| `device_connected_twice` | 409 | two PCs are connected with this device's identity (a copied PC or VM snapshot); nothing ran, so the `Idempotency-Key` is free | no; a person shuts the copy down, and calls work again about five minutes after only one PC is connected | "two PCs use this device; shut the copy down" |
|
|
46
52
|
| `device_answer_unreadable` | 502 | the device sent an answer Deepdock cannot read (for example from a client build with a fault); on a write the device may have applied it. The body carries `requestId` for support | no, and not with the same `Idempotency-Key` either; it changes only when the Deepdock client on that PC is updated. After a write, read the record back before writing again | "the connected PC sent an answer that could not be read; contact Deepdock with the request id" |
|
|
@@ -101,6 +107,7 @@ const REACTION: Record<string, Reaction> = {
|
|
|
101
107
|
action_not_configured: 'stop',
|
|
102
108
|
pairing_code_invalid: 'fix-input',
|
|
103
109
|
other_partner_build: 'stop',
|
|
110
|
+
device_update_required: 'stop', // reason `unreported`: retry after a minute
|
|
104
111
|
device_learning_only: 'stop',
|
|
105
112
|
device_connected_twice: 'stop',
|
|
106
113
|
device_answer_unreadable: 'stop',
|