@primitivedotdev/cli 3.0.0-preview.16 → 3.0.0-preview.18

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/README.md CHANGED
@@ -361,7 +361,7 @@ primitive emails list
361
361
  primitive emails get --id <inbound-email-id>
362
362
  primitive emails get --id <inbound-email-id> --context
363
363
  primitive emails get --id <inbound-email-id> --compact
364
- primitive sent list
364
+ primitive sent list # your own sends; --all-senders for every send you can read
365
365
  primitive sent delete --id <sent-email-id>
366
366
  primitive domains list
367
367
  primitive billing
@@ -493,16 +493,20 @@ With `--json`, stdout is exactly one JSON document, on success and on failure,
493
493
  and stderr stays empty. Output merged with `2>&1` therefore still parses:
494
494
 
495
495
  - Notices the command would otherwise print on stderr (hints, progress, prior
496
- reply warnings) go in the document's `warnings` array.
496
+ reply warnings) go in the document's `warnings` array, or in `cli_warnings`
497
+ when the document already has a `warnings` of its own.
497
498
  - A failure adds `error` and `exit_code`. If the command printed no document of
498
- its own, the CLI prints `{ "error": ..., "exit_code": ... }`.
499
+ its own, the CLI prints `{ "error": ..., "exit_code": ... }`. An error the
500
+ CLI raises itself carries a `code`: `usage_error` (exit 2) when it refused
501
+ before sending anything, such as a bad flag or an unreadable file, and
502
+ `cli_error` otherwise.
499
503
  - Generated API commands (`primitive sent list`, `primitive emails list`, ...)
500
- keep printing only the data payload with `--json`, the same stdout as
501
- without it, but do not write the `next cursor: <cursor>` line to stderr. To
502
- page, add `--envelope`: it prints the full response envelope, with
503
- `meta.cursor` for the next page and, in `summary`, empty-result hints and
504
- what a list's default filters left out.
505
- - Commands whose `--json` output is a bare array keep that shape.
504
+ print the API's response body with `--json`: `data`, and `meta` with
505
+ `meta.cursor` for the next page where the route sends it, plus the CLI's own
506
+ `summary` (such as an empty-result hint). Read a list as `.data[]` and an
507
+ object's fields as `.data.<field>`. Without `--json`, stdout is the data
508
+ payload and the `next cursor: <cursor>` line goes to stderr.
509
+ - Hand-written commands whose `--json` output is a bare array keep that shape.
506
510
  - `primitive listen` streams JSONL and is not covered by this rule.
507
511
 
508
512
  ## Searching mail
@@ -515,7 +519,7 @@ prints a table (header on stderr). Each result in `--json` output carries
515
519
  primitive search "invoice" --from acme.com
516
520
  primitive search "contract" --thread-id <thread-uuid> # one conversation
517
521
  primitive search "quarterly invoi" --prefix # last word matches as a prefix
518
- primitive search "a" --prefix --no-count --envelope # skip the total count
522
+ primitive search "a" --prefix --no-count # skip the total count
519
523
  ```
520
524
 
521
525
  - `--thread-id <uuid>` only returns emails in that thread. It combines with
@@ -524,11 +528,11 @@ primitive search "a" --prefix --no-count --envelope # skip the total count
524
528
  `invoi` matches invoice and invoicing. Only the final unquoted word is
525
529
  affected.
526
530
  - `--no-count` skips computing the total match count, which makes broad
527
- queries cheaper. `meta.total` is then null in `--json` output, and
528
- `--envelope` prints `Total: not counted (--no-count)`. Use `meta.cursor`
531
+ queries cheaper. `meta.total` is then null in `--json` output, and the
532
+ table's footer says `Total: not counted (--no-count)`. Use `meta.cursor`
529
533
  to tell whether another page exists.
530
- - `--envelope` prints the total (with `+` when the count was capped) and the
531
- next-page cursor on stderr below the table.
534
+ - Below the table, stderr gives the total (with `+` when the count was capped)
535
+ and the next-page cursor.
532
536
 
533
537
  These flags apply to the default lexical search only and are rejected with
534
538
  `--mode`.
@@ -1145,6 +1149,25 @@ pass, immediately before claiming. To keep both on
1145
1149
  purpose, rerun with `--keep-existing`. `--resume` continues a claim that
1146
1150
  already happened and is never refused.
1147
1151
 
1152
+ ### Install the bundled skills
1153
+
1154
+ `primitive skills install` copies the skills bundled in this package into a
1155
+ runtime's skills folder, for sessions that use a member login instead of
1156
+ `agent connect`:
1157
+
1158
+ ```sh
1159
+ primitive skills install --runtime claude
1160
+ primitive skills install primitive-connect --runtime codex --json
1161
+ ```
1162
+
1163
+ It installs every bundled skill, or only the one named, into the runtime's
1164
+ `skills` folder (`$CLAUDE_CONFIG_DIR` or `~/.claude` for Claude, `$CODEX_HOME`
1165
+ or `~/.codex` for Codex; `--project` uses `.claude/skills`
1166
+ or `.agents/skills` in the current directory), and reports each skill's path,
1167
+ state (`installed`, `updated`, `unchanged` or `failed`) and content version.
1168
+ A copy already at the bundled version is left unchanged, and a symlinked copy
1169
+ is replaced by a real directory. A name that is not bundled exits 2.
1170
+
1148
1171
  ### Set up a machine for every coding session
1149
1172
 
1150
1173
  `primitive machine doctor` checks what lets each Claude Code, Codex and omp