primcli 1.21.0 → 1.24.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 +105 -12
- package/dist/oclif/index.js +5613 -685
- package/man/primitive.1 +47 -0
- package/package.json +7 -4
package/man/primitive.1
CHANGED
|
@@ -20,7 +20,54 @@ Most commands print human-readable output by default. Commands that expose JSON
|
|
|
20
20
|
.B --json
|
|
21
21
|
flag or use generated operation output that can be piped into tools such as
|
|
22
22
|
.BR jq (1).
|
|
23
|
+
.SH LOCAL WEBHOOK EVENTS
|
|
24
|
+
.PP
|
|
25
|
+
.B primitive listen
|
|
26
|
+
receives existing webhook events without a public endpoint. It prints complete
|
|
27
|
+
JSONL bodies on stdout and status on stderr. Use saved login credentials or
|
|
28
|
+
PRIMITIVE_API_KEY. A private default destination is saved per API host and account.
|
|
29
|
+
.PP
|
|
30
|
+
.B primitive listen init --language python
|
|
31
|
+
creates a Python starter in a new primitive-listener directory. Generation is
|
|
32
|
+
offline and refuses to overwrite files. Change into that directory and run
|
|
33
|
+
.B primitive listen --subscription my-agent --exec 'python3 accept_event.py'
|
|
34
|
+
to save each event durably. Exit 0 means input accepted. Run agent processing
|
|
35
|
+
separately; hooks have a 30-second deadline and must not spawn a background agent.
|
|
36
|
+
Exec requires macOS or Linux; Windows users can use a local HTTP acceptance
|
|
37
|
+
handler with --forward-to.
|
|
38
|
+
Deduplicate using PRIMITIVE_EVENT_ID, not the per-attempt PRIMITIVE_DELIVERY_ID.
|
|
39
|
+
PRIMITIVE_EVENT_TYPE carries the canonical event type; stdin carries the body.
|
|
40
|
+
.PP
|
|
41
|
+
.B --forward-to http://localhost:3000/webhook
|
|
42
|
+
forwards exact signed bytes and existing webhook headers to a local handler.
|
|
43
|
+
Configure the existing webhook secret/verifier there. API credentials are not
|
|
44
|
+
forwarded. Redirects are not followed. Responses must finish within 30 seconds
|
|
45
|
+
and 1 MiB; existing confirmation headers preserve content-discard semantics.
|
|
46
|
+
.PP
|
|
47
|
+
.B --events email.received,interaction.ack.received
|
|
48
|
+
selects events for a new destination. Omit it on resume to preserve selection.
|
|
49
|
+
Ctrl-C keeps the destination; the same subscription name resumes pending work.
|
|
50
|
+
Concurrent local consumption of one destination is rejected. Across machines,
|
|
51
|
+
the same name shares consumption; distinct names receive independent copies.
|
|
52
|
+
.PP
|
|
53
|
+
.B --number N
|
|
54
|
+
counts successful server-confirmed completions. Bare stdout does not prove a
|
|
55
|
+
downstream consumer saved an event. Gaps are reported. Pending references expire
|
|
56
|
+
after 24 hours and do not extend source-content or attachment-link retention.
|
|
57
|
+
Remove a destination using
|
|
58
|
+
.BR "primitive endpoints delete --id DESTINATION_ID" .
|
|
59
|
+
.SH LOCAL WEBHOOK API
|
|
60
|
+
.PP
|
|
61
|
+
The generated commands
|
|
62
|
+
.B endpoints pull-webhook-event
|
|
63
|
+
and
|
|
64
|
+
.B endpoints complete-webhook-event
|
|
65
|
+
expose local webhook delivery on API hosts where it is enabled. Each command
|
|
66
|
+
makes one API request. Use their --help output for the input fields. Consumers
|
|
67
|
+
deduplicate event IDs and report the outcome with the returned attempt and lease.
|
|
68
|
+
Queue retention does not extend source-content retention; inspect gap counts.
|
|
23
69
|
.SH AUTHENTICATION
|
|
70
|
+
.PP
|
|
24
71
|
Commands use saved OAuth credentials from
|
|
25
72
|
.B primitive signin
|
|
26
73
|
or
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "primcli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.24.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,
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"timeoutInDays": 1,
|
|
34
34
|
"frequency": 1,
|
|
35
35
|
"frequencyUnit": "days",
|
|
36
|
-
"message": "Primitive CLI update available from <%= chalk.greenBright(config.version) %> to <%= chalk.greenBright(latest) %>. Run `npm install -g @
|
|
36
|
+
"message": "Primitive CLI update available from <%= chalk.greenBright(config.version) %> to <%= chalk.greenBright(latest) %>. Run `npm install -g primitive@latest` to update."
|
|
37
37
|
},
|
|
38
38
|
"topics": {
|
|
39
39
|
"chat": {
|
|
@@ -121,6 +121,9 @@
|
|
|
121
121
|
},
|
|
122
122
|
"wake": {
|
|
123
123
|
"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`."
|
|
124
|
+
},
|
|
125
|
+
"listen": {
|
|
126
|
+
"description": "Receive existing webhook events locally. Run primitive listen for JSONL, use --exec for a short durable acceptance hook, or --forward-to for an existing local webhook handler."
|
|
124
127
|
}
|
|
125
128
|
},
|
|
126
129
|
"topicSeparator": " "
|
|
@@ -158,12 +161,12 @@
|
|
|
158
161
|
"@primitivedotdev/api-core": "workspace:*",
|
|
159
162
|
"@primitivedotdev/sdk": "workspace:*",
|
|
160
163
|
"@types/node": "^22.10.2",
|
|
161
|
-
"@vitest/coverage-v8": "^4.1.
|
|
164
|
+
"@vitest/coverage-v8": "^4.1.11",
|
|
162
165
|
"oclif": "^4.23.0",
|
|
163
166
|
"tsdown": "^0.21.10",
|
|
164
167
|
"tsx": "^4.21.0",
|
|
165
168
|
"typescript": "^5.7.2",
|
|
166
169
|
"vite": "^8.0.8",
|
|
167
|
-
"vitest": "^4.1.
|
|
170
|
+
"vitest": "^4.1.11"
|
|
168
171
|
}
|
|
169
172
|
}
|