@primitivedotdev/cli 3.0.0-preview.17 → 3.0.0-preview.19
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 +52 -14
- package/dist/{api-command-CgBNtNyD.js → api-command--2ZkNMvH.js} +3019 -4516
- package/dist/{json-output-ch756TXV.js → json-output-saHY68hr.js} +6 -4
- package/dist/{machine-session-CSqj4DmF.js → machine-session-ADcw9uJm.js} +5 -5
- package/dist/{notify-session-Pt4oRh0I.js → notify-session-06flGBgK.js} +70 -31
- package/dist/oclif/auto-signal-worker.js +3 -3
- package/dist/oclif/auto-signals.js +1 -1
- package/dist/oclif/command-not-found.js +1 -1
- package/dist/oclif/index.js +1815 -1884
- package/dist/oclif/proxy-auto-detect.js +1 -1
- package/dist/oclif/receiver-heal.js +2 -2
- package/dist/{repeats-Dj_o6c-X-DlfpQiUq.js → repeats-Dj_o6c-X-DTtFzwNd.js} +14259 -14225
- package/dist/{scoped-chat-Du-Bi0tC.js → scoped-chat-C7l2BSZr.js} +1 -1
- package/dist/{signal-command-DZuZbt-_.js → signal-command-D6oaza1W.js} +4 -4
- package/man/primitive.1 +17 -9
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -245,6 +245,21 @@ Against a server without organization switching, and for logins saved by earlier
|
|
|
245
245
|
|
|
246
246
|
`primitive login --permission <permission>` asks for a narrowed login. A server that does not offer narrowed CLI logins refuses it, and the CLI stops rather than logging in with a wider grant.
|
|
247
247
|
|
|
248
|
+
### Focusing on some domains
|
|
249
|
+
|
|
250
|
+
When a credential reads mail on more than one domain, a mail listing or search without a focus stops (exit 2, error code `focus_required`), names the domains and asks for a choice. It keeps stopping until a focus is chosen; the choice is saved, so it is made once. A credential with one domain never sees any of this.
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
primitive focus set support.example.com sales.example.com # list and search only these domains
|
|
254
|
+
primitive focus set --all # every domain
|
|
255
|
+
primitive focus # show the saved focus and the domains
|
|
256
|
+
primitive focus clear # forget it
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
The focus is saved per profile: for the member login in the CLI config directory, for a connected agent in its profile directory. It is never written to a credential file. `PRIMITIVE_FOCUS_DOMAINS=<name,...>` (or `all`) overrides it for a session, and `--domain <name>` or `--all-domains` for one command.
|
|
260
|
+
|
|
261
|
+
It applies to `emails list`, `emails latest`, `emails search`, `search`, `emails watch`, `inbox next`, `sent list` and `semantic-search`. Each prints one stderr line naming the focus, where it came from and how to widen it; `--json` carries `meta.focus` instead. An empty focused result also says how much matching mail is on the other domains. `sent list` filters by the sending domain. `semantic-search` with a focus searches received mail only; with `--corpus outbound` it covers every domain and says the focus was not applied. A command given its own scope (`--domain-ids` on `emails list` and `emails search`, `--domain-id` on `search` and `emails watch`, `--recipient`, `--to`, `--thread-id`, or a `domain:` or `to:` search filter) ignores the saved focus. Reads by id, notifications (`listen`, `wait`, `emails wait`, `agent check-mail`) and the CLI's own reply bookkeeping never follow it.
|
|
262
|
+
|
|
248
263
|
### Grants and keys
|
|
249
264
|
|
|
250
265
|
`primitive whoami` shows your member address, your organization, your built-in role and the credential's grant when the server reports them; only a person's own login has a role line. `primitive whoami --check mail:send` asks whether the current credential may use a permission, prints the decision, and exits 1 when it may not; nothing is enforced by asking. A request refused because the credential's grant lacks a permission fails with `grant_forbidden`, and the CLI names the permission.
|
|
@@ -361,7 +376,7 @@ primitive emails list
|
|
|
361
376
|
primitive emails get --id <inbound-email-id>
|
|
362
377
|
primitive emails get --id <inbound-email-id> --context
|
|
363
378
|
primitive emails get --id <inbound-email-id> --compact
|
|
364
|
-
primitive sent list
|
|
379
|
+
primitive sent list # your own sends; --all-senders for every send you can read
|
|
365
380
|
primitive sent delete --id <sent-email-id>
|
|
366
381
|
primitive domains list
|
|
367
382
|
primitive billing
|
|
@@ -493,16 +508,20 @@ With `--json`, stdout is exactly one JSON document, on success and on failure,
|
|
|
493
508
|
and stderr stays empty. Output merged with `2>&1` therefore still parses:
|
|
494
509
|
|
|
495
510
|
- Notices the command would otherwise print on stderr (hints, progress, prior
|
|
496
|
-
reply warnings) go in the document's `warnings` array
|
|
511
|
+
reply warnings) go in the document's `warnings` array, or in `cli_warnings`
|
|
512
|
+
when the document already has a `warnings` of its own.
|
|
497
513
|
- A failure adds `error` and `exit_code`. If the command printed no document of
|
|
498
|
-
its own, the CLI prints `{ "error": ..., "exit_code": ... }`.
|
|
514
|
+
its own, the CLI prints `{ "error": ..., "exit_code": ... }`. An error the
|
|
515
|
+
CLI raises itself carries a `code`: `usage_error` (exit 2) when it refused
|
|
516
|
+
before sending anything, such as a bad flag or an unreadable file, and
|
|
517
|
+
`cli_error` otherwise.
|
|
499
518
|
- Generated API commands (`primitive sent list`, `primitive emails list`, ...)
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
-
|
|
519
|
+
print the API's response body with `--json`: `data`, and `meta` with
|
|
520
|
+
`meta.cursor` for the next page where the route sends it, plus the CLI's own
|
|
521
|
+
`summary` (such as an empty-result hint). Read a list as `.data[]` and an
|
|
522
|
+
object's fields as `.data.<field>`. Without `--json`, stdout is the data
|
|
523
|
+
payload and the `next cursor: <cursor>` line goes to stderr.
|
|
524
|
+
- Hand-written commands whose `--json` output is a bare array keep that shape.
|
|
506
525
|
- `primitive listen` streams JSONL and is not covered by this rule.
|
|
507
526
|
|
|
508
527
|
## Searching mail
|
|
@@ -515,7 +534,7 @@ prints a table (header on stderr). Each result in `--json` output carries
|
|
|
515
534
|
primitive search "invoice" --from acme.com
|
|
516
535
|
primitive search "contract" --thread-id <thread-uuid> # one conversation
|
|
517
536
|
primitive search "quarterly invoi" --prefix # last word matches as a prefix
|
|
518
|
-
primitive search "a" --prefix --no-count
|
|
537
|
+
primitive search "a" --prefix --no-count # skip the total count
|
|
519
538
|
```
|
|
520
539
|
|
|
521
540
|
- `--thread-id <uuid>` only returns emails in that thread. It combines with
|
|
@@ -524,11 +543,11 @@ primitive search "a" --prefix --no-count --envelope # skip the total count
|
|
|
524
543
|
`invoi` matches invoice and invoicing. Only the final unquoted word is
|
|
525
544
|
affected.
|
|
526
545
|
- `--no-count` skips computing the total match count, which makes broad
|
|
527
|
-
queries cheaper. `meta.total` is then null in `--json` output, and
|
|
528
|
-
|
|
546
|
+
queries cheaper. `meta.total` is then null in `--json` output, and the
|
|
547
|
+
table's footer says `Total: not counted (--no-count)`. Use `meta.cursor`
|
|
529
548
|
to tell whether another page exists.
|
|
530
|
-
-
|
|
531
|
-
next-page cursor
|
|
549
|
+
- Below the table, stderr gives the total (with `+` when the count was capped)
|
|
550
|
+
and the next-page cursor.
|
|
532
551
|
|
|
533
552
|
These flags apply to the default lexical search only and are rejected with
|
|
534
553
|
`--mode`.
|
|
@@ -1145,6 +1164,25 @@ pass, immediately before claiming. To keep both on
|
|
|
1145
1164
|
purpose, rerun with `--keep-existing`. `--resume` continues a claim that
|
|
1146
1165
|
already happened and is never refused.
|
|
1147
1166
|
|
|
1167
|
+
### Install the bundled skills
|
|
1168
|
+
|
|
1169
|
+
`primitive skills install` copies the skills bundled in this package into a
|
|
1170
|
+
runtime's skills folder, for sessions that use a member login instead of
|
|
1171
|
+
`agent connect`:
|
|
1172
|
+
|
|
1173
|
+
```sh
|
|
1174
|
+
primitive skills install --runtime claude
|
|
1175
|
+
primitive skills install primitive-connect --runtime codex --json
|
|
1176
|
+
```
|
|
1177
|
+
|
|
1178
|
+
It installs every bundled skill, or only the one named, into the runtime's
|
|
1179
|
+
`skills` folder (`$CLAUDE_CONFIG_DIR` or `~/.claude` for Claude, `$CODEX_HOME`
|
|
1180
|
+
or `~/.codex` for Codex; `--project` uses `.claude/skills`
|
|
1181
|
+
or `.agents/skills` in the current directory), and reports each skill's path,
|
|
1182
|
+
state (`installed`, `updated`, `unchanged` or `failed`) and content version.
|
|
1183
|
+
A copy already at the bundled version is left unchanged, and a symlinked copy
|
|
1184
|
+
is replaced by a real directory. A name that is not bundled exits 2.
|
|
1185
|
+
|
|
1148
1186
|
### Set up a machine for every coding session
|
|
1149
1187
|
|
|
1150
1188
|
`primitive machine doctor` checks what lets each Claude Code, Codex and omp
|