primcli 1.26.0 → 1.29.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 +49 -0
- package/dist/oclif/index.js +2255 -373
- package/man/primitive.1 +6 -0
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -206,6 +206,24 @@ primitive memories get state --function <function-id>
|
|
|
206
206
|
Values must be valid JSON. Strings must be quoted as JSON strings, so use
|
|
207
207
|
`'"hello"'`, not `hello`.
|
|
208
208
|
|
|
209
|
+
## Credits
|
|
210
|
+
|
|
211
|
+
Redeem a credit code for your organization and check the credit balance.
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
primitive credits redeem LAUNCH50
|
|
215
|
+
primitive credits balance
|
|
216
|
+
primitive credits balance --json
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
`credits redeem` prints the credit added and its expiry. On a refusal it prints
|
|
220
|
+
the server's message (for example an invalid or already redeemed code) and
|
|
221
|
+
exits non-zero. Redeeming needs an organization owner or admin; with an API key,
|
|
222
|
+
the key's creator must currently be an owner or admin. Each run sends a new
|
|
223
|
+
Idempotency-Key; pass `--idempotency-key <key>` to retry the same redemption
|
|
224
|
+
safely. On any failure the command prints the key it used to stderr, so you can
|
|
225
|
+
run the same command again with `--idempotency-key <key>`.
|
|
226
|
+
|
|
209
227
|
## Recipient routing
|
|
210
228
|
|
|
211
229
|
Bind a recipient address to a destination so inbound mail resolves to a single
|
|
@@ -300,3 +318,34 @@ The CLI previously shipped inside `@primitivedotdev/sdk`. The shipped surface ar
|
|
|
300
318
|
## License
|
|
301
319
|
|
|
302
320
|
MIT
|
|
321
|
+
|
|
322
|
+
### Local event listening
|
|
323
|
+
|
|
324
|
+
```sh
|
|
325
|
+
primitive listen --forward-to localhost:3000
|
|
326
|
+
primitive listen --forward-to 3000 --events email.received
|
|
327
|
+
primitive listen --once --timeout 60
|
|
328
|
+
primitive listen --subscription my-agent --exec "python3 accept.py"
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
WebSocket is the default transport. Subscription registration and reconnects are
|
|
332
|
+
automatic; the saved default resumes the same durable queue. `--once` waits for
|
|
333
|
+
one successful, confirmed delivery. `--timeout` is in seconds and exits 2 on
|
|
334
|
+
timeout; Ctrl-C exits 130. Bare `primitive listen` prints one raw JSON event per
|
|
335
|
+
line. Use `--transport poll` explicitly for HTTP polling. Accept or enqueue each
|
|
336
|
+
event within 30 seconds. Closing preserves pending work, and retries can deliver
|
|
337
|
+
an event more than once.
|
|
338
|
+
|
|
339
|
+
### Connected-agent listeners
|
|
340
|
+
|
|
341
|
+
Use the agent's existing connected-address credential with the same listener API.
|
|
342
|
+
The server automatically restricts its private subscription to inbound email for
|
|
343
|
+
that address. No owner credential, recipient filter, or relay is required. Names
|
|
344
|
+
are isolated per credential. Revoking or replacing the credential removes its
|
|
345
|
+
subscriptions and queued deliveries; reconnect with the new credential to start
|
|
346
|
+
receiving new events.
|
|
347
|
+
|
|
348
|
+
Address-scoped events contain parsed message content in `email.parsed`.
|
|
349
|
+
`email.content.raw` and `email.content.download` are null. Signed download links,
|
|
350
|
+
account routing metadata, and other SMTP envelope recipients are not exposed.
|
|
351
|
+
Attachments can be fetched through the authenticated email attachment API.
|