primcli 1.70.0 → 1.72.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/README.md +115 -2
- package/dist/{api-command-C58Oh38I.js → api-command-BrwPbyPP.js} +286 -19
- package/dist/{cli-config-DMszFbGn.js → cli-config--YTRdJ3t.js} +15 -4
- package/dist/{json-output-CEskSQJi.js → json-output-Ce10AsSb.js} +71 -3
- package/dist/{machine-session-CKmn5bvB.js → machine-session-Be6j29GE.js} +8 -6
- package/dist/{notify-session-CVZtEboh.js → notify-session-Byt5sPWW.js} +2 -2
- package/dist/oclif/auto-signal-worker.js +2 -2
- package/dist/oclif/auto-signals.js +1 -1
- package/dist/oclif/index.js +5266 -112
- package/dist/oclif/listen-supervisor.js +1 -2
- package/dist/oclif/proxy-auto-detect.js +1 -1
- package/dist/oclif/receiver-heal.js +2 -2
- package/dist/oclif/root-signup-hint.js +1 -1
- package/dist/{repeats-BL7ZC-_6-BZ-MphTV.js → repeats-BL7ZC-_6-CKMKBlx7.js} +1 -1
- package/dist/{scoped-chat-Dsark9hm.js → scoped-chat-DTFkP360.js} +1 -1
- package/dist/{signal-command-Dy_oub7_.js → signal-command-DeEEZPbQ.js} +4 -4
- package/dist/skills/primitive-connect/SKILL.md +162 -355
- package/dist/skills/primitive-connect/references/collaboration.md +39 -2
- package/dist/skills/primitive-connect/references/communication.md +2 -2
- package/dist/skills/primitive-connect/references/connect.md +234 -0
- package/dist/skills/primitive-connect/references/contact-requests.md +3 -3
- package/dist/skills/primitive-connect/references/contacts.md +4 -4
- package/dist/skills/primitive-connect/references/conversations.md +4 -4
- package/dist/skills/primitive-connect/references/external-services.md +86 -0
- package/dist/skills/primitive-connect/references/manual-setup.md +2 -2
- package/dist/skills/primitive-connect/references/presence-and-receiving.md +5 -5
- package/dist/skills/primitive-connect/scripts/check-cli-capabilities.mjs +13 -4
- package/dist/skills/primitive-connect.json +13 -11
- package/man/primitive.1 +17 -3
- package/package.json +11 -8
package/README.md
CHANGED
|
@@ -142,6 +142,49 @@ primitive inbox next
|
|
|
142
142
|
|
|
143
143
|
Run `primitive --help` for the full command list. Per-command help (`primitive functions deploy --help`) carries enough detail that an agent can compose any operation without leaving the terminal.
|
|
144
144
|
|
|
145
|
+
## Verification codes and sign-in links
|
|
146
|
+
|
|
147
|
+
Your address works for signing up and logging in to other services. After you
|
|
148
|
+
enter it, wait for the email and take what you need from it:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
# Sign up with your address, then:
|
|
152
|
+
primitive wait --from github.com --code # prints 482913
|
|
153
|
+
primitive wait --from vercel.com --link # prints the sign-in link
|
|
154
|
+
primitive wait --subject "verify" --timeout 90s
|
|
155
|
+
primitive wait --from stripe.com --code --json
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
`primitive wait` waits for the next email to the identity the CLI resolves (a
|
|
159
|
+
connected agent profile's own address, or any inbound mail for a member login)
|
|
160
|
+
and prints it: sender, subject, time, the start of its text and its ID, ready
|
|
161
|
+
for `primitive reply --id <id>`. Only mail that arrives after the command starts
|
|
162
|
+
matches; `--include-existing` also lets one of the newest 50 emails match, for
|
|
163
|
+
a code that arrived before you started waiting.
|
|
164
|
+
|
|
165
|
+
- `--from` takes an address or a bare domain; `github.com` matches any sender at
|
|
166
|
+
it or its subdomains. It narrows the wait; it does not authenticate the sender.
|
|
167
|
+
- `--subject` matches text in the subject; `--thread <id>` and
|
|
168
|
+
`--reply-to <sent-email-id>` narrow to a conversation.
|
|
169
|
+
- `--timeout` takes `90s`, `5m`, `1h` or plain seconds (default `5m`, `0` waits
|
|
170
|
+
forever).
|
|
171
|
+
- `--code` prints only the one-time code, preferring numbers next to words like
|
|
172
|
+
code, verification or passcode and ignoring years, phone numbers, prices and
|
|
173
|
+
order numbers. A code split as `123 456` prints as `123456`.
|
|
174
|
+
- `--link` prints only the most likely verify, confirm, sign-in, magic or reset
|
|
175
|
+
link, skipping unsubscribe, privacy, help and social links and removing an
|
|
176
|
+
obvious click-tracking wrapper.
|
|
177
|
+
- `--json` prints one object: `id`, `thread_id`, `from`, `to`, `subject`,
|
|
178
|
+
`received_at`, `text` and, when asked, `code` and `link`.
|
|
179
|
+
|
|
180
|
+
| Exit | Meaning |
|
|
181
|
+
|---|---|
|
|
182
|
+
| 0 | A matching email arrived and was printed. |
|
|
183
|
+
| 1 | Error (API failure or authentication). |
|
|
184
|
+
| 2 | Invalid flags or arguments. |
|
|
185
|
+
| 5 | No matching email before `--timeout`. |
|
|
186
|
+
| 6 | The email arrived without a code (`--code`) or link (`--link`); its ID is on stderr. |
|
|
187
|
+
|
|
145
188
|
## Waiting with connected credentials
|
|
146
189
|
|
|
147
190
|
After sending, wait for the existing send's reply without sending again:
|
|
@@ -157,8 +200,9 @@ default, so fast replies are not missed; use `--since <timestamp>` to narrow the
|
|
|
157
200
|
window. They require an authenticated peer and the exact outbound parent.
|
|
158
201
|
Interaction attachments remain pending with inspection guidance. JSONL includes
|
|
159
202
|
matching email details, or use `--table` for compact output and `--number N` for
|
|
160
|
-
multiple replies.
|
|
161
|
-
|
|
203
|
+
multiple replies. `--json` prints the same JSONL and reports a timeout or error
|
|
204
|
+
as one final JSON line with `error` and `exit_code`. Timeout exits 1; repeat
|
|
205
|
+
the same wait to recover without resending. Connected waits share one local address event receiver and recover
|
|
162
206
|
through exact-parent search, without scanning inbox history. Additional content
|
|
163
207
|
filters on this command require organization credentials.
|
|
164
208
|
|
|
@@ -538,6 +582,31 @@ The sender sees the stop in the thread. `primitive emails get --id <email-id>
|
|
|
538
582
|
--context` marks a repeating message with its cadence and, when the recipient may
|
|
539
583
|
stop it, the exact stop command.
|
|
540
584
|
|
|
585
|
+
## Custom headers and scheduled sends
|
|
586
|
+
|
|
587
|
+
`send` and `reply` take `--header "Name: value"` (or `Name=value`), repeatable
|
|
588
|
+
once per name. The CLI checks only the shape and refuses a duplicate name; the
|
|
589
|
+
server decides which names are allowed and says why in a `validation_error`.
|
|
590
|
+
|
|
591
|
+
```bash
|
|
592
|
+
primitive send --to alice@example.com --body "Spring sale" --header "X-Campaign-Id: spring-sale" --header "Auto-Submitted=auto-generated"
|
|
593
|
+
primitive reply --id <email-id> --body "Ticket updated." --header "X-Ticket-Id: 4821"
|
|
594
|
+
```
|
|
595
|
+
|
|
596
|
+
`send --scheduled-at <time>` records the send with status `scheduled` and sends it
|
|
597
|
+
at that time. The time needs `Z` or a numeric UTC offset. It cannot be combined
|
|
598
|
+
with `--wait`, `--attachment`, `--fyi` or `--if-latest-message-id`. The summary
|
|
599
|
+
says the message is scheduled and how to cancel it, and the `--json` envelope
|
|
600
|
+
adds a `cancel_scheduled_send` follow-up command.
|
|
601
|
+
|
|
602
|
+
```bash
|
|
603
|
+
primitive send --to alice@example.com --body "Reminder: standup" --scheduled-at 2026-10-09T17:00:00Z --idempotency-key standup-2026-10-09
|
|
604
|
+
primitive sent cancel --idempotency-key standup-2026-10-09
|
|
605
|
+
```
|
|
606
|
+
|
|
607
|
+
Generated operation commands also expose the request headers the spec declares,
|
|
608
|
+
for example `primitive sending send-email --idempotency-key <key>`.
|
|
609
|
+
|
|
541
610
|
## Recipient routing
|
|
542
611
|
|
|
543
612
|
Bind a recipient address to a destination so inbound mail resolves to a single
|
|
@@ -1061,6 +1130,50 @@ stops running. Claude reports the same SessionEnd for a restart, a switch to
|
|
|
1061
1130
|
another session and a real exit, so the hook waits five minutes first, and a
|
|
1062
1131
|
start of the same session within that time cancels the end.
|
|
1063
1132
|
|
|
1133
|
+
#### Session agent identity in Claude Code
|
|
1134
|
+
|
|
1135
|
+
Claude Code gives SessionStart hooks a file named by `CLAUDE_ENV_FILE` and
|
|
1136
|
+
runs it before every later Bash command in the session. Once the session's
|
|
1137
|
+
profile is saved and connected (on the first start, on resume, or for a
|
|
1138
|
+
session whose agent already exists), the SessionStart hook appends two lines
|
|
1139
|
+
to it:
|
|
1140
|
+
|
|
1141
|
+
```sh
|
|
1142
|
+
export PRIMITIVE_AGENT_PROFILE=session-<session id>
|
|
1143
|
+
export PRIMITIVE_AGENT_ADDRESS=<the agent's email address>
|
|
1144
|
+
```
|
|
1145
|
+
|
|
1146
|
+
So every `primitive` command in the session, and any tool that runs
|
|
1147
|
+
`primitive`, acts as the session's agent without a prefix, and `send` and
|
|
1148
|
+
`reply` send from the agent's address without `--from`. Registration that
|
|
1149
|
+
finishes after the hook returns still writes the lines, and later commands
|
|
1150
|
+
pick them up. Nothing is written for a session that already sets
|
|
1151
|
+
`PRIMITIVE_AGENT_PROFILE` (including to an empty value), when the file already
|
|
1152
|
+
assigns either variable, while setup is still pending, while another connected
|
|
1153
|
+
profile is bound to or receives for the session, or for a profile that is not
|
|
1154
|
+
saved, so a session is never pointed at a profile that does not exist.
|
|
1155
|
+
|
|
1156
|
+
`PRIMITIVE_AGENT_ADDRESS` is for other tools in the session that need the
|
|
1157
|
+
agent's email address without running the CLI. It is set only together with
|
|
1158
|
+
`PRIMITIVE_AGENT_PROFILE` and always names that profile's address.
|
|
1159
|
+
`primitive whoami` prints the address alone on its first line, offline, and
|
|
1160
|
+
`primitive whoami --json` adds `address`, `profile` and `source`
|
|
1161
|
+
(`session_hook` for the session's own exported agent, `env` for any other
|
|
1162
|
+
`PRIMITIVE_AGENT_PROFILE`).
|
|
1163
|
+
|
|
1164
|
+
Commands that manage the member login (`login`, `logout`, `signup`,
|
|
1165
|
+
`agent enroll`, and the other commands that refuse a selected profile) still
|
|
1166
|
+
refuse. To run any command as the member login from inside such a session,
|
|
1167
|
+
put an empty `PRIMITIVE_AGENT_PROFILE=` in front of it, or run it under
|
|
1168
|
+
`env -u PRIMITIVE_AGENT_PROFILE`:
|
|
1169
|
+
|
|
1170
|
+
```sh
|
|
1171
|
+
PRIMITIVE_AGENT_PROFILE= primitive whoami
|
|
1172
|
+
```
|
|
1173
|
+
|
|
1174
|
+
Codex hooks have no equivalent of `CLAUDE_ENV_FILE`, so Codex sessions still
|
|
1175
|
+
select their profile with `PRIMITIVE_AGENT_PROFILE` on each command.
|
|
1176
|
+
|
|
1064
1177
|
An agent that `session-register` created is disconnected only when its session
|
|
1065
1178
|
has not started again for 30 days, by `machine doctor --fix` or the next
|
|
1066
1179
|
`session-register` on the machine, and only while the session's profile still
|