@deepdockai/cli 1.4.1 → 1.6.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,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.6.0
4
+
5
+ - The current device API: an action's `operation` in the action index can be `delete`, run with `DELETE` (the inputs go in the JSON body, as for `PATCH`; a write still needs an `Idempotency-Key`). The bundled TypeScript and Python clients and the skill accept it; before, the Python client refused `delete`.
6
+
7
+ ## 1.5.0
8
+
9
+ - The current device API: in `GET /v1/devices/{deviceId}/systems` an action is `active`, `paused` or `blocked`, and a blocked one carries a `reason` (`client_update`, `access_missing`, `access_not_set_up`, `access_reapproval`). The list now holds every action of yours on that system, blocked ones included. A system there no longer carries `lockedActions` (the device list still does), and the action index's `availability` value is `blocked_pending_access` (was `locked_pending_access`). The bundled TypeScript client and the skill describe the new states.
10
+ - `deepdock devices systems` counts blocked actions next to paused ones.
11
+ - The error code list gains `device_timeout` (exit 3, retry with the same key) and `too_many_rows` (exit 2: the write matched more records than it may change and was rolled back).
12
+
3
13
  ## 1.4.1
4
14
 
5
15
  - The package no longer ships Python bytecode from the bundled client.
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_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`, `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
@@ -10874,9 +10874,11 @@ var EXIT_CODES = {
10874
10874
  record_locked: 2,
10875
10875
  record_not_editable: 2,
10876
10876
  record_restricted: 2,
10877
+ too_many_rows: 2,
10877
10878
  payload_too_large: 2,
10878
10879
  version_not_covered: 2,
10879
10880
  device_offline: 3,
10881
+ device_timeout: 3,
10880
10882
  device_syncing: 3,
10881
10883
  device_outdated: 3,
10882
10884
  action_paused: 3,
@@ -11441,7 +11443,7 @@ import { spawn } from "node:child_process";
11441
11443
  import { homedir, hostname } from "node:os";
11442
11444
 
11443
11445
  // src/version.ts
11444
- var VERSION = "1.4.1";
11446
+ var VERSION = "1.6.0";
11445
11447
 
11446
11448
  // src/runtime.ts
11447
11449
  var DEFAULT_BASE_URL = "https://api.deepdock.ai";
@@ -12170,7 +12172,7 @@ var EXIT_CODES_HELP = `Exit codes
12170
12172
  0 done
12171
12173
  1 usage: something on the command line to fix (invalid_usage, org_required)
12172
12174
  2 the API refused the request; do not repeat it unchanged
12173
- 3 retry later (device_offline, device_syncing, device_outdated,
12175
+ 3 retry later (device_offline, device_timeout, device_syncing, device_outdated,
12174
12176
  action_paused, access_outdated, access_missing,
12175
12177
  credentials_rejected, certificate_changed,
12176
12178
  system_unavailable, target_busy, temporarily_unavailable, internal_error,
@@ -12977,14 +12979,13 @@ var renderSystems = (ctx, data) => {
12977
12979
  if (text === "")
12978
12980
  return "The device reports no systems.";
12979
12981
  const paused = countValue(data, "paused");
12980
- if (paused === 0)
12981
- return text;
12982
- return [
12983
- text,
12984
- paused === 1 ? "One action is paused." : `${paused} actions are paused.`,
12985
- "Only Deepdock resumes it; `deepdock incidents list` shows the incident.",
12986
- "Your code gets 503 action_paused from it until then."
12987
- ].join(`
12982
+ const blocked = countValue(data, "blocked");
12983
+ const lines = [text];
12984
+ if (paused > 0)
12985
+ lines.push(paused === 1 ? "One action is paused." : `${paused} actions are paused.`, "Only Deepdock resumes it; `deepdock incidents list` shows the incident.", "Your code gets 503 action_paused from it until then.");
12986
+ if (blocked > 0)
12987
+ lines.push(blocked === 1 ? "One action is blocked." : `${blocked} actions are blocked.`, "Its reason says what unblocks it: a client update or the customer setting up the access.");
12988
+ return lines.join(`
12988
12989
  `);
12989
12990
  };
12990
12991
  var systemsOf = async (ctx, id) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepdockai/cli",
3
- "version": "1.4.1",
3
+ "version": "1.6.0",
4
4
  "description": "Deepdock partner CLI: pair devices, see systems and actions, create the API key your code runs them with.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/skill/SKILL.md CHANGED
@@ -23,9 +23,9 @@ integration against a demo device. It is not for building or changing actions: D
23
23
  3. A device reports the **systems** it runs; each system has **actions**, deterministic operations
24
24
  that Deepdock builds and verifies before offering them.
25
25
  4. Every action takes a flat JSON body, never a value in the URL: `POST` for a read or create,
26
- `PATCH` for an update. A **read** (the
27
- action's `operation`) also takes `limit` and `cursor` in that body to page; a **write** (`create`
28
- or `update`) needs an `Idempotency-Key` as well.
26
+ `PATCH` for an update, `DELETE` for a delete. A **read** (the
27
+ action's `operation`) also takes `limit` and `cursor` in that body to page; a **write** (`create`,
28
+ `update` or `delete`) needs an `Idempotency-Key` as well.
29
29
  5. Every write needs an `Idempotency-Key`: a new key per intended write, the same key on every retry,
30
30
  and a repeat answers the stored result with `Idempotent-Replayed: true`, writing nothing twice.
31
31
  6. A write either fully applies or not: Deepdock checks its result before confirming, and a write
@@ -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 repeats "Erneut einrichten" in the Deepdock client) | `device_offline`, `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 repeats "Erneut einrichten" in the Deepdock client) | `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` |
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
 
@@ -199,12 +199,13 @@ class Deepdock:
199
199
 
200
200
  def write(self, device_id: str, system: str, action: str, operation: str, idempotency_key: str,
201
201
  body: Dict[str, InputValue]) -> WriteResult:
202
- """Runs a write action: POST for operation "create", PATCH for "update" (from the action index; any
202
+ """Runs a write action: POST for operation "create", PATCH for "update", DELETE for "delete" (inputs still go in the JSON body; from the action index; any
203
203
  other method answers 405 with `Allow` naming the right one). `body` values are typed as the
204
204
  action's schema declares. Any other `operation` raises ValueError before anything is sent."""
205
- if operation not in ("create", "update"):
206
- raise ValueError(f"operation must be 'create' or 'update', got {operation!r}")
207
- data, headers, _ = self._send("PATCH" if operation == "update" else "POST",
205
+ method = {"create": "POST", "update": "PATCH", "delete": "DELETE"}.get(operation)
206
+ if method is None:
207
+ raise ValueError(f"operation must be 'create', 'update' or 'delete', got {operation!r}")
208
+ data, headers, _ = self._send(method,
208
209
  self._action_path(device_id, system, action), json=body,
209
210
  headers={"Idempotency-Key": idempotency_key})
210
211
  return WriteResult(data=data, replayed=headers.get("Idempotent-Replayed") == "true")
@@ -236,7 +237,7 @@ class Deepdock:
236
237
 
237
238
  CONFLICT_RETRIES = 5 # a running write finishes within seconds; beyond this, treat it as unknown
238
239
 
239
- RETRY_SAME_KEY = {"device_offline", "device_syncing", "device_outdated",
240
+ RETRY_SAME_KEY = {"device_offline", "device_timeout", "device_syncing", "device_outdated",
240
241
  "target_busy", "temporarily_unavailable", "internal_error", "action_paused",
241
242
  "system_unavailable"}
242
243
 
@@ -52,8 +52,13 @@ export type Page<Item> = { items: Item[]; nextCursor: string | null }
52
52
  export type WriteResult<T> = { data: T; replayed: boolean }
53
53
  /** A flat JSON value as the action's schema declares it: a number is a number, never its text. */
54
54
  export type InputValue = string | number | boolean
55
- /** What a write action does, from `operation` in the action index: a create is POST, an update PATCH. */
56
- export type WriteOperation = 'create' | 'update'
55
+ /** What a write action does, from `operation` in the action index: a create is POST, an update PATCH, a delete DELETE. */
56
+ export type WriteOperation = 'create' | 'update' | 'delete'
57
+ const WRITE_METHOD: Record<WriteOperation, 'POST' | 'PATCH' | 'DELETE'> = {
58
+ create: 'POST',
59
+ update: 'PATCH',
60
+ delete: 'DELETE',
61
+ }
57
62
  export type ActionInput = Record<string, InputValue>
58
63
 
59
64
  /** `missing`: never found on the PC; `vanished`: found once and not any more. */
@@ -103,6 +108,11 @@ export type ActionState =
103
108
  reason: 'structure_changed' | 'readback_failed' | 'credentials_rejected' | 'certificate_changed'
104
109
  pausedAt: string
105
110
  }
111
+ | {
112
+ action: string
113
+ state: 'blocked'
114
+ reason: 'client_update' | 'access_missing' | 'access_not_set_up' | 'access_reapproval'
115
+ }
106
116
 
107
117
  export type DeviceSystem = {
108
118
  system: string
@@ -113,8 +123,6 @@ export type DeviceSystem = {
113
123
  access: SystemAccess
114
124
  /** Set when `access` is the last known value (the device could not read it): when it last did. */
115
125
  accessLastCheckedAt: string | null
116
- /** Actions the device reports locked because its database account lacks a right they need; `null` when there is no verdict for its current action set. */
117
- lockedActions: string[] | null
118
126
  actions: ActionState[]
119
127
  /** The connectors the device runs for this system, by name and kind. */
120
128
  connectors: { name: string; kind: 'database' | 'http' }[]
@@ -379,7 +387,7 @@ export class Deepdock {
379
387
  }
380
388
 
381
389
  /**
382
- * Runs a write action: POST for a `create`, PATCH for an `update`. Take `operation` from the
390
+ * Runs a write action: POST for a `create`, PATCH for an `update`, DELETE for a `delete` (the inputs still go in the JSON body). Take `operation` from the
383
391
  * action index; any other method answers 405 with `Allow` naming the right one. `input` values
384
392
  * are typed as the action's schema declares. `idempotencyKey` is new per intended write and the
385
393
  * same on every retry.
@@ -393,7 +401,7 @@ export class Deepdock {
393
401
  input: ActionInput,
394
402
  ): Promise<WriteResult<Result>> {
395
403
  const { data, headers } = await this.send<Result>(this.actionPath(deviceId, system, action), {
396
- method: operation === 'update' ? 'PATCH' : 'POST',
404
+ method: WRITE_METHOD[operation],
397
405
  headers: { 'Content-Type': 'application/json', 'Idempotency-Key': idempotencyKey },
398
406
  body: JSON.stringify(input),
399
407
  })
@@ -452,6 +460,7 @@ export const CONFLICT_RETRIES = 5
452
460
 
453
461
  const RETRY_SAME_KEY = new Set([
454
462
  'device_offline',
463
+ 'device_timeout',
455
464
  'device_syncing',
456
465
  'device_outdated',
457
466
  'target_busy',
@@ -57,10 +57,15 @@ has a display `label` (may be `null`), a `version` the device reported (may be a
57
57
  | system `access` | `ok`, `outdated`, `missing`, `password_missing`, `not_set_up`, or `null` | the database access the device last reported (`null`: none known yet) | `outdated` refuses the actions that need the missing right with `access_outdated`, `missing` (the account cannot log in) and `password_missing` (the account exists but its stored password is not on the PC) refuse every action with `access_missing`; the customer repeats "Erneut einrichten" in the Deepdock client, the incident closes by itself once `access` is `ok`, nothing to resume |
58
58
  | system `accessLastCheckedAt` | ISO time or `null` | set when `access` is the last known value because the device could not read it (its database stopped or unreachable): when it last read it. `null` when the latest report read it | show the access as last known, with this time; nothing to do until the device reads it again |
59
59
  | system `versionIssue` | `not_installed`, `not_found`, `unreadable`, or `null` | why `version` is missing, when the device says: its database service is not on the PC, its program file was not found, or the file carries no readable version. `null` (absent on `GET .../systems`) with a version, and from a device that does not say | show the reason beside the missing version; there is nothing to do on your side |
60
- | system `lockedActions` | list of action names or `null` | the actions the device reports locked because its database account lacks a right they need, under its current action set. `null`: no verdict yet, or the verdict is for an older action set | do not offer a locked action as available; it answers `access_outdated` until the customer repeats "Erneut einrichten" |
60
+ | system `lockedActions` (device list only) | list of action names or `null` | the actions blocked because the device's database account lacks a right they need, under its current action set; on `GET .../systems` they read `blocked` with `access_reapproval`. `null`: no verdict yet, or the verdict is for an older action set | do not offer a listed action as available; it answers `access_outdated` until the customer repeats "Erneut einrichten" |
61
61
  | system `blockedActions` | list of action names, or absent | the actions this device's Deepdock client cannot run yet, because they need something only a newer client can do. Absent: none | do not offer a listed action as available; a call answers `device_outdated` and nothing runs, until the client updates itself and the action leaves the list |
62
62
  | action state | `active` | the action can be called | normal |
63
63
  | action state | `paused` | the action is paused with a `reason` and `pausedAt` | calls answer `action_paused`; show the feature as paused, poll `GET .../systems` at a low rate |
64
+ | action state | `blocked` | the action cannot run on this device until its `reason` is resolved; one reason per action, the first that applies in the order below | do not offer it as available |
65
+ | block `reason` | `client_update` | the device's Deepdock client is too old for this action | calls answer `device_outdated`; the client updates itself |
66
+ | block `reason` | `access_missing` | the database access is gone (the account cannot log in, or its password is missing) | calls answer `access_missing`; the customer sets up the access again ("Erneut einrichten") |
67
+ | block `reason` | `access_not_set_up` | no database access is set up on this device | calls answer `action_not_configured`; the customer sets up the access ("Erneut einrichten") |
68
+ | block `reason` | `access_reapproval` | the database access lacks a right this action needs | calls answer `access_outdated`; the customer repeats "Erneut einrichten" |
64
69
  | pause `reason` | `structure_changed` | the system changed in a way the action depends on (for example a vendor update); Deepdock reviews and resumes | wait; nothing to do on your side |
65
70
  | pause `reason` | `readback_failed` | a write's result did not match, so nothing was saved | wait; tell the user the change was not saved |
66
71
  | 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" in the Deepdock client; the action resumes by itself once the new sign-in works, nothing to resume |
@@ -84,8 +89,8 @@ catalogue.
84
89
  `Idempotency-Key` header.
85
90
  - A write **either fully applies or not**: Deepdock checks the result before confirming, and if the check fails it saves nothing
86
91
  and pauses the action (`409 readback_failed`).
87
- - An action is **active** or **paused**. `GET /v1/devices/{deviceId}/systems` shows each action's
88
- state with `reason` and `pausedAt`.
92
+ - An action is **active**, **paused** or **blocked**. `GET /v1/devices/{deviceId}/systems` shows
93
+ each action's state: a paused one with `reason` and `pausedAt`, a blocked one with `reason`.
89
94
 
90
95
  ## Pause and incident
91
96
 
@@ -68,8 +68,10 @@ curl "$BASE/v1/devices/$DEVICE/systems" -H "Authorization: Bearer $DEEPDOCK_API_
68
68
  ```
69
69
 
70
70
  A live call to the device. A list; each entry has `system`, `label`, `version` (may be absent),
71
- `status`, `access` and `actions`, each with `action` and `state` (`active`, or `paused` with
72
- `reason` and `pausedAt`). Answers `503 device_offline` when the device is not
71
+ `status`, `access` and `actions`, each with `action` and `state`: `active`, `paused` with
72
+ `reason` and `pausedAt`, or `blocked` with `reason` (`client_update`, `access_missing`,
73
+ `access_not_set_up` or `access_reapproval`). `actions` lists every action of yours on that system,
74
+ including the blocked ones. Answers `503 device_offline` when the device is not
73
75
  connected: that is a normal state, not an error in your code. Do not poll it tightly; it reaches the
74
76
  customer's PC.
75
77
 
@@ -54,6 +54,7 @@ with the **same** `Idempotency-Key`); **Show** says what the end user should see
54
54
  | `record_locked` | 422 | the customer's system locks the record the write would change (for example one already finalised and closed). Nothing was written | no | "this record is locked in the customer's system" |
55
55
  | `record_not_editable` | 422 | the record is not locked but is stored in a form this action cannot edit (for example a note it cannot add to without rewriting it). Nothing was written | no | "this record cannot be edited through Deepdock" |
56
56
  | `record_restricted` | 422 | the customer's system restricts access to the record (for example a locked record): a read returned no data, so an empty answer would be wrong, and a write wrote nothing | no; the customer lifts the restriction in its system | "access to this record is restricted in the customer's system" |
57
+ | `too_many_rows` | 409 | the inputs match more records than this write may change; it was rolled back and nothing changed | no; narrow the inputs to the record you mean | "that matches more than one record; please be more specific" |
57
58
  | Action-specific refusals | 422 | an action can refuse with a code of its own (for example `unknown_author` when the write names a user the system does not list, or `no_matching_period`); its OpenAPI description names each such code and when it fires. Nothing was written | no; fix the reference or input | the missing precondition in the user's words |
58
59
 
59
60
  ## Device and system availability
@@ -61,6 +62,7 @@ with the **same** `Idempotency-Key`); **Show** says what the end user should see
61
62
  | Code | Status | Meaning | Retry | Show |
62
63
  |---|---|---|---|---|
63
64
  | `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" |
65
+ | `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" |
64
66
  | `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" |
65
67
  | `device_outdated` | 409 | the device's Deepdock client is too old for this call. It updates itself when a newer version is released for your organisation, once nobody is signed in on the PC. Nothing was written | after the update (on `GET /v1/devices/{deviceId}`, `outdated` turns `false` and the action leaves the system's `blockedActions`); retrying before it gets the same answer. A write keeps its key | "the Deepdock client on the customer PC needs an update" |
66
68
  | `version_not_covered` | 409 | the customer's installed version of the system is not yet approved by Deepdock for this action. Nothing was run. The message names the system, its version and the action | **no.** Retrying gets the same answer. It changes when Deepdock approves that version for the action, or when the customer runs an approved version | "this feature is not yet available for the customer's version of the software; Deepdock has to approve it first" |
@@ -105,12 +107,14 @@ const REACTION: Record<string, Reaction> = {
105
107
  record_locked: 'stop',
106
108
  record_not_editable: 'stop',
107
109
  record_restricted: 'stop',
110
+ too_many_rows: 'fix-input',
108
111
  payload_too_large: 'fix-code',
109
112
  access_outdated: 'wait-setup',
110
113
  access_missing: 'wait-setup',
111
114
  credentials_rejected: 'wait-setup',
112
115
  certificate_changed: 'wait-setup',
113
116
  device_offline: 'retry-same-key',
117
+ device_timeout: 'retry-same-key',
114
118
  device_syncing: 'retry-same-key',
115
119
  device_outdated: 'retry-later',
116
120
  version_not_covered: 'stop',
@@ -145,7 +145,7 @@ curl -sS -X DELETE "$BASE/v1/devices/$DEVICE" -H "$AUTH"
145
145
 
146
146
  A port in another language keeps the clients' shape: one `send` that sets the bearer header,
147
147
  parses the envelope, throws a typed error with `code` on `{ error }` and a transport error on no
148
- answer or non-JSON; `read` as a POST with `limit` and `cursor` in the body; `write` (POST for a create, PATCH for an update) with `Idempotency-Key` and the
148
+ answer or non-JSON; `read` as a POST with `limit` and `cursor` in the body; `write` (POST for a create, PATCH for an update, DELETE for a delete) with `Idempotency-Key` and the
149
149
  `Idempotent-Replayed` header; `attempt` over a persisted pending write.
150
150
 
151
151
  ## Mapping the user's intent to a call (checklist)
@@ -153,7 +153,7 @@ answer or non-JSON; `read` as a POST with `limit` and `cursor` in the body; `wri
153
153
  1. Which device? From your product's configuration for that customer site; never from the
154
154
  user's free text.
155
155
  2. Is the action active? `systems()` once per session; show paused features as paused.
156
- 3. Which action and operation (create is POST, update is PATCH)? From the stored index for that system.
156
+ 3. Which action and operation (create is POST, update is PATCH, delete is DELETE)? From the stored index for that system.
157
157
  4. Does the write need a reference (author user, open case, record id)? Read it first.
158
158
  5. Build the input in the types the schema declares; validate against the schema (`pattern`, `minLength`, `maxLength`,
159
159
  `enum`) before sending so the user sees the rule where they typed.