@deepdockai/cli 1.7.0 → 1.8.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 +4 -0
- package/README.md +8 -8
- package/dist/deepdock.js +3 -2
- package/package.json +1 -1
- package/skill/references/cli.md +1 -1
- package/skill/references/clients/deepdock.py +1 -0
- package/skill/references/clients/deepdock.ts +1 -0
- package/skill/references/errors.md +2 -0
- package/skill/references/idempotency.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.8.0
|
|
4
|
+
|
|
5
|
+
- The current device API: the error code list gains `upload_incomplete` (400, exit 3: an upload broke off before the device had the whole file; this call wrote nothing, so send it again with the same file and the same `Idempotency-Key`).
|
|
6
|
+
|
|
3
7
|
## 1.7.0
|
|
4
8
|
|
|
5
9
|
- The current device API: the error code list gains `document_unreadable` (422, exit 2: a download's stored document is in an archive the device cannot read; a retry will not help). The action index's entry for an action that takes a file now carries `upload` (`field`, `maxBytes`, optional `mediaTypes` and `optional`). The 413 description names the action's file limit next to the 1 MiB body limit.
|
package/README.md
CHANGED
|
@@ -154,14 +154,14 @@ your code will receive; `auth`, `orgs select` and `keys create` build it from na
|
|
|
154
154
|
failure is one document on stderr, `{ "error": { "code", "message" }, "meta": { "hint" } }`,
|
|
155
155
|
with the API's error object unchanged. Switch on `code` or on the exit code, never on `message`.
|
|
156
156
|
|
|
157
|
-
| Exit | Meaning
|
|
158
|
-
| ---- |
|
|
159
|
-
| 0 | done
|
|
160
|
-
| 1 | something on the command line to fix (`invalid_usage`, `org_required`)
|
|
161
|
-
| 2 | the API refused the request; do not repeat it unchanged (`invalid_request`, `not_found`, `forbidden`, `rate_limited` and the other refusals)
|
|
162
|
-
| 3 | retry later (`device_offline`, `device_timeout`, `device_syncing`, `device_outdated`, `action_paused`, `access_outdated`, `access_missing`, `credentials_rejected`, `certificate_changed`, `system_unavailable`, `target_busy`, `temporarily_unavailable`, `internal_error`, `outcome_unknown`, `connection_lost`) |
|
|
163
|
-
| 4 | the CLI is too old for the API (`cli_outdated`): run `npx @deepdockai/cli@latest`
|
|
164
|
-
| 5 | sign-in needed (`sign_in_needed`, `approval_denied`, `approval_expired`); `auth status` when nobody is signed in
|
|
157
|
+
| Exit | Meaning |
|
|
158
|
+
| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
159
|
+
| 0 | done |
|
|
160
|
+
| 1 | something on the command line to fix (`invalid_usage`, `org_required`) |
|
|
161
|
+
| 2 | the API refused the request; do not repeat it unchanged (`invalid_request`, `not_found`, `forbidden`, `rate_limited` and the other refusals) |
|
|
162
|
+
| 3 | retry later (`device_offline`, `device_timeout`, `device_syncing`, `device_outdated`, `upload_incomplete`, `action_paused`, `access_outdated`, `access_missing`, `credentials_rejected`, `certificate_changed`, `system_unavailable`, `target_busy`, `temporarily_unavailable`, `internal_error`, `outcome_unknown`, `connection_lost`) |
|
|
163
|
+
| 4 | the CLI is too old for the API (`cli_outdated`): run `npx @deepdockai/cli@latest` |
|
|
164
|
+
| 5 | sign-in needed (`sign_in_needed`, `approval_denied`, `approval_expired`); `auth status` when nobody is signed in |
|
|
165
165
|
|
|
166
166
|
The CLI never retries on its own: exit 3 says retry, you decide when. `deepdock commands --json`
|
|
167
167
|
prints the whole command tree.
|
package/dist/deepdock.js
CHANGED
|
@@ -10878,6 +10878,7 @@ var EXIT_CODES = {
|
|
|
10878
10878
|
document_unreadable: 2,
|
|
10879
10879
|
payload_too_large: 2,
|
|
10880
10880
|
version_not_covered: 2,
|
|
10881
|
+
upload_incomplete: 3,
|
|
10881
10882
|
device_offline: 3,
|
|
10882
10883
|
device_timeout: 3,
|
|
10883
10884
|
device_syncing: 3,
|
|
@@ -11444,7 +11445,7 @@ import { spawn } from "node:child_process";
|
|
|
11444
11445
|
import { homedir, hostname } from "node:os";
|
|
11445
11446
|
|
|
11446
11447
|
// src/version.ts
|
|
11447
|
-
var VERSION = "1.
|
|
11448
|
+
var VERSION = "1.8.0";
|
|
11448
11449
|
|
|
11449
11450
|
// src/runtime.ts
|
|
11450
11451
|
var DEFAULT_BASE_URL = "https://api.deepdock.ai";
|
|
@@ -12173,7 +12174,7 @@ var EXIT_CODES_HELP = `Exit codes
|
|
|
12173
12174
|
0 done
|
|
12174
12175
|
1 usage: something on the command line to fix (invalid_usage, org_required)
|
|
12175
12176
|
2 the API refused the request; do not repeat it unchanged
|
|
12176
|
-
3 retry later (device_offline, device_timeout, device_syncing, device_outdated,
|
|
12177
|
+
3 retry later (device_offline, device_timeout, device_syncing, device_outdated, upload_incomplete,
|
|
12177
12178
|
action_paused, access_outdated, access_missing,
|
|
12178
12179
|
credentials_rejected, certificate_changed,
|
|
12179
12180
|
system_unavailable, target_busy, temporarily_unavailable, internal_error,
|
package/package.json
CHANGED
package/skill/references/cli.md
CHANGED
|
@@ -84,7 +84,7 @@ A failure is one document on stderr: the API's error object unchanged plus what
|
|
|
84
84
|
| 0 | done | |
|
|
85
85
|
| 1 | something on the command line to fix | `invalid_usage` (a bad flag, an unknown slug, a question with no terminal and no `--yes`, an env file git does not ignore), `org_required` |
|
|
86
86
|
| 2 | the API refused the request; do not repeat it unchanged | `invalid_request`, `not_found`, `device_not_found`, `pairing_code_invalid`, `other_partner_build`, `rate_limited`, `forbidden`, `conflict` and the other refusals (not `access_outdated` and `access_missing`, see exit 3) |
|
|
87
|
-
| 3 | retry later (`access_outdated` and `access_missing`: after the customer sets up the access again in the Deepdock client ("Zugang erneut einrichten", Set up access again)) | `device_offline`, `device_timeout`, `device_syncing`, `device_outdated`, `action_paused`, `access_outdated`, `access_missing`, `credentials_rejected`, `certificate_changed`, `system_unavailable`, `target_busy`, `temporarily_unavailable`, `internal_error`, `outcome_unknown`, `connection_lost` |
|
|
87
|
+
| 3 | retry later (`access_outdated` and `access_missing`: after the customer sets up the access again in the Deepdock client ("Zugang erneut einrichten", Set up access again)) | `device_offline`, `device_timeout`, `device_syncing`, `device_outdated`, `upload_incomplete`, `action_paused`, `access_outdated`, `access_missing`, `credentials_rejected`, `certificate_changed`, `system_unavailable`, `target_busy`, `temporarily_unavailable`, `internal_error`, `outcome_unknown`, `connection_lost` |
|
|
88
88
|
| 4 | the CLI is too old for the API: run `npx @deepdockai/cli@latest` | `cli_outdated` |
|
|
89
89
|
| 5 | sign-in needed: run `deepdock auth login` | `sign_in_needed`, `approval_denied`, `approval_expired` |
|
|
90
90
|
|
|
@@ -238,6 +238,7 @@ class Deepdock:
|
|
|
238
238
|
CONFLICT_RETRIES = 5 # a running write finishes within seconds; beyond this, treat it as unknown
|
|
239
239
|
|
|
240
240
|
RETRY_SAME_KEY = {"device_offline", "device_timeout", "device_syncing", "device_outdated",
|
|
241
|
+
"upload_incomplete",
|
|
241
242
|
"target_busy", "temporarily_unavailable", "internal_error", "action_paused",
|
|
242
243
|
"system_unavailable"}
|
|
243
244
|
|
|
@@ -62,6 +62,7 @@ with the **same** `Idempotency-Key`); **Show** says what the end user should see
|
|
|
62
62
|
|
|
63
63
|
| Code | Status | Meaning | Retry | Show |
|
|
64
64
|
|---|---|---|---|---|
|
|
65
|
+
| `upload_incomplete` | 400 | an upload broke off before the device had the whole file. This call wrote nothing | yes, at once: send it again with the same file and the same `Idempotency-Key` | "the upload was interrupted; we will send it again" |
|
|
65
66
|
| `device_offline` | 503 | the device is not connected, is shutting down, did not answer within 20 s, or the call was cut off inside Deepdock by a restart or deploy. **A write may still have landed** | yes, with backoff (seconds to minutes); a write only with the same key | "the customer PC is offline; we will retry" |
|
|
66
67
|
| `device_timeout` | 503 | the device ran out of its time budget before it began the call or before it committed. Nothing was written | yes, with backoff; a write with the same key | "the customer PC was too slow; retrying" |
|
|
67
68
|
| `device_syncing` | 503 | the device has not reported its Deepdock client yet (just paired, or its report did not come through); Deepdock asks it again. Nothing was written | yes, after `Retry-After` (5 s); a write with the same key | "the customer PC is connecting; retrying" |
|
|
@@ -115,6 +116,7 @@ const REACTION: Record<string, Reaction> = {
|
|
|
115
116
|
access_missing: 'wait-setup',
|
|
116
117
|
credentials_rejected: 'wait-setup',
|
|
117
118
|
certificate_changed: 'wait-setup',
|
|
119
|
+
upload_incomplete: 'retry-same-key',
|
|
118
120
|
device_offline: 'retry-same-key',
|
|
119
121
|
device_timeout: 'retry-same-key',
|
|
120
122
|
device_syncing: 'retry-same-key',
|
|
@@ -70,7 +70,7 @@ input, a status (`pending`, `sent`, `done`, `unknown`, `refused`) and the result
|
|
|
70
70
|
|
|
71
71
|
```
|
|
72
72
|
pending ──send──▶ sent ──2xx (fresh or replayed)──────────────▶ done
|
|
73
|
-
│ ──device_offline, device_syncing, device_outdated, timeout, network error, target_busy, temporarily_unavailable, internal_error ▶ sent (retry later, same key)
|
|
73
|
+
│ ──device_offline, device_syncing, device_outdated, upload_incomplete, timeout, network error, target_busy, temporarily_unavailable, internal_error ▶ sent (retry later, same key)
|
|
74
74
|
│ ──idempotency_conflict, retries left ───▶ sent (retry, same key, same input)
|
|
75
75
|
│ ──idempotency_conflict, retries spent ──▶ unknown (read back before anything else)
|
|
76
76
|
│ ──outcome_unknown ──────────────────────▶ unknown (read back before anything else)
|