primcli 1.27.0 → 1.30.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 +162 -0
- package/dist/{cli-config-BKso8oJu.js → cli-config-ikgszTi0.js} +2 -2
- package/dist/oclif/index.js +16871 -2693
- package/dist/oclif/root-signup-hint.js +1 -1
- package/man/primitive.1 +80 -0
- package/package.json +8 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as normalizeApiBaseUrl, c as resolveConfigEnvironment, i as loadCliConfig } from "../cli-config-
|
|
1
|
+
import { S as normalizeApiBaseUrl, c as resolveConfigEnvironment, i as loadCliConfig } from "../cli-config-ikgszTi0.js";
|
|
2
2
|
import { existsSync, readFileSync } from "node:fs";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { homedir } from "node:os";
|
package/man/primitive.1
CHANGED
|
@@ -27,6 +27,30 @@ receives existing webhook events without a public endpoint. It prints complete
|
|
|
27
27
|
JSONL bodies on stdout and status on stderr. Use saved login credentials or
|
|
28
28
|
PRIMITIVE_API_KEY. A private default destination is saved per API host and account.
|
|
29
29
|
.PP
|
|
30
|
+
.B primitive listen --notify-session UUID --sender person@example.com
|
|
31
|
+
queues external email metadata into one exact loaded native Codex session.
|
|
32
|
+
Requires an existing private native local-session Unix socket and a connected-agent
|
|
33
|
+
credential. This mode requires WebSocket and the shared saved subscription;
|
|
34
|
+
--transport poll and a custom --subscription are rejected. The local-mail-*
|
|
35
|
+
subscription namespace is reserved for shared receiving. No runtime is launched. Repeat --sender or use comma-separated exact
|
|
36
|
+
addresses. Routine authenticated status interactions do not notify the session.
|
|
37
|
+
.PP
|
|
38
|
+
.B primitive listen --status --notify-session UUID
|
|
39
|
+
inspects local notification receipts without receiving mail or connecting to a
|
|
40
|
+
session. Accepted means queued; unknown outcomes are held across restarts and are
|
|
41
|
+
never automatically resent. Inspect the exact session before a manual resend.
|
|
42
|
+
Use --limit (default 100, maximum 1000) and --cursor with the returned nextCursor
|
|
43
|
+
to page through receipts. Notification subscriptions accept email.received only;
|
|
44
|
+
--once counts a candidate processed during this invocation, including filtered
|
|
45
|
+
or routine email, not a model wake. Waiter-owned replies and existing accepted
|
|
46
|
+
notification receipts do not count. Inbound IDs are saved before server
|
|
47
|
+
acknowledgement; pending authentication or parsing retries exact IDs locally.
|
|
48
|
+
.PP
|
|
49
|
+
Connected chat, exact-parent emails wait, and native notifications share one
|
|
50
|
+
receiver per local installation, API environment, and credential. A remaining
|
|
51
|
+
foreground participant can resume receiving after the owner exits. Generic
|
|
52
|
+
stdout, exec, forwarding, and emails watch remain separate consumers.
|
|
53
|
+
.PP
|
|
30
54
|
.B primitive listen init --language python
|
|
31
55
|
creates a Python starter in a new primitive-listener directory. Generation is
|
|
32
56
|
offline and refuses to overwrite files. Change into that directory and run
|
|
@@ -133,11 +157,34 @@ Read a durable memory by key.
|
|
|
133
157
|
.B primitive memories search PREFIX
|
|
134
158
|
List memories by key prefix.
|
|
135
159
|
.TP
|
|
160
|
+
.B primitive credits redeem CODE
|
|
161
|
+
Redeem a credit code for your organization.
|
|
162
|
+
.TP
|
|
163
|
+
.B primitive credits balance
|
|
164
|
+
Show the organization credit balance.
|
|
165
|
+
.TP
|
|
136
166
|
.B primitive list-operations
|
|
137
167
|
Print the generated API operation manifest.
|
|
138
168
|
.TP
|
|
139
169
|
.B primitive describe COMMAND_OR_OPERATION
|
|
140
170
|
Describe a generated API operation, including request and response schemas.
|
|
171
|
+
|
|
172
|
+
.SS Waiting with connected credentials
|
|
173
|
+
.B primitive emails wait --reply-to-sent-email-id <sent-id> --from peer@example.com
|
|
174
|
+
waits on an existing send without resending it. The receiving address comes
|
|
175
|
+
from the sent record; an optional --to must match. Existing replies are included
|
|
176
|
+
by default, and --since narrows the window. Only authenticated, exactly threaded
|
|
177
|
+
plain replies are returned; interaction attachments remain pending for inspection.
|
|
178
|
+
JSONL contains matching email details; --table prints compact rows. Timeout exits
|
|
179
|
+
1. Connected waits share one local address event receiver and use exact-parent
|
|
180
|
+
search for recovery; they never scan inbox history. Organization credentials
|
|
181
|
+
retain the existing search-based wait behavior.
|
|
182
|
+
.PP
|
|
183
|
+
Connected chat authenticates the reply receiver before sending and records a
|
|
184
|
+
stable idempotency key. After a lost send response, repeating the same command
|
|
185
|
+
looks up that key without sending again. Timed-out exact-parent waits retain
|
|
186
|
+
their claim for resume. A plain reply does not prove task completion.
|
|
187
|
+
|
|
141
188
|
.SH GLOBAL OPTIONS
|
|
142
189
|
.TP
|
|
143
190
|
.B --api-key KEY
|
|
@@ -148,6 +195,39 @@ Print command duration to standard error after completion.
|
|
|
148
195
|
.TP
|
|
149
196
|
.B --help
|
|
150
197
|
Show command help.
|
|
198
|
+
.SH EXIT STATUS
|
|
199
|
+
.B primitive chat,
|
|
200
|
+
.B primitive chat reply,
|
|
201
|
+
.B primitive send
|
|
202
|
+
and
|
|
203
|
+
.B primitive reply
|
|
204
|
+
share one outcome vocabulary. With
|
|
205
|
+
.B --json
|
|
206
|
+
the outcome is the
|
|
207
|
+
.B outcome
|
|
208
|
+
field of an envelope printed for every result.
|
|
209
|
+
.TP
|
|
210
|
+
.B 0
|
|
211
|
+
.BR replied ,
|
|
212
|
+
.B sent
|
|
213
|
+
(accepted for delivery; queued counts) or
|
|
214
|
+
.B already_sent
|
|
215
|
+
(an identical earlier send, including HTTP 410 sent_email_deleted; nothing new went out).
|
|
216
|
+
.TP
|
|
217
|
+
.B 1
|
|
218
|
+
.BR not_sent :
|
|
219
|
+
the API rejected the request, the command failed before sending, or the send record has status agent_failed, gate_denied or canceled.
|
|
220
|
+
.TP
|
|
221
|
+
.B 2
|
|
222
|
+
Invalid flags or arguments. Nothing was sent.
|
|
223
|
+
.TP
|
|
224
|
+
.B 3
|
|
225
|
+
.BR sent_awaiting_reply :
|
|
226
|
+
chat sent the message but no reply arrived before the timeout. Wait; do not resend.
|
|
227
|
+
.TP
|
|
228
|
+
.B 4
|
|
229
|
+
.BR uncertain :
|
|
230
|
+
transport error, conflict, server error, or a send record with status unknown. The message may have gone out; check sent history before retrying.
|
|
151
231
|
.SH ENVIRONMENT
|
|
152
232
|
.TP
|
|
153
233
|
.B PRIMITIVE_API_KEY
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "primcli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.30.0",
|
|
4
4
|
"description": "Official Primitive CLI: deploy Primitive Functions, send and inspect mail, manage endpoints, all from the terminal. Wraps the @primitivedotdev/sdk runtime client with one-shot commands.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -55,6 +55,9 @@
|
|
|
55
55
|
"agent": {
|
|
56
56
|
"description": "Agent signup and authentication API operations"
|
|
57
57
|
},
|
|
58
|
+
"credits": {
|
|
59
|
+
"description": "Redeem credit codes and check the organization credit balance"
|
|
60
|
+
},
|
|
58
61
|
"domains": {
|
|
59
62
|
"description": "Claim, verify, manage email domains, and download DNS zone files"
|
|
60
63
|
},
|
|
@@ -126,7 +129,7 @@
|
|
|
126
129
|
"description": "Schedule and send wake commands to your own functions over signed email, and manage which senders may wake them. Use `primitive wake schedules list|create|get|update|delete|run`, `primitive wake authorizations list|create|update|delete`, and `primitive wake dispatches list`."
|
|
127
130
|
},
|
|
128
131
|
"listen": {
|
|
129
|
-
"description": "Receive
|
|
132
|
+
"description": "Receive events locally as JSONL, use --exec or --forward-to, or notify an exact loaded native session with --notify-session and approved --sender addresses. Use --status --notify-session to inspect durable notification receipts."
|
|
130
133
|
}
|
|
131
134
|
},
|
|
132
135
|
"topicSeparator": " "
|
|
@@ -157,13 +160,15 @@
|
|
|
157
160
|
"@oclif/plugin-autocomplete": "^3.2.45",
|
|
158
161
|
"@oclif/plugin-help": "^6.2.44",
|
|
159
162
|
"@oclif/plugin-warn-if-update-available": "^3.1.65",
|
|
160
|
-
"viem": "^2.21.0"
|
|
163
|
+
"viem": "^2.21.0",
|
|
164
|
+
"ws": "^8.21.0"
|
|
161
165
|
},
|
|
162
166
|
"devDependencies": {
|
|
163
167
|
"@biomejs/biome": "^2.4.10",
|
|
164
168
|
"@primitivedotdev/api-core": "workspace:*",
|
|
165
169
|
"@primitivedotdev/sdk": "workspace:*",
|
|
166
170
|
"@types/node": "^22.10.2",
|
|
171
|
+
"@types/ws": "^8.18.1",
|
|
167
172
|
"@vitest/coverage-v8": "^4.1.11",
|
|
168
173
|
"oclif": "^4.23.0",
|
|
169
174
|
"tsdown": "^0.21.10",
|