primcli 3.0.0-preview.2 → 3.0.0-preview.21

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.
Files changed (30) hide show
  1. package/README.md +100 -40
  2. package/bin/run.js +21 -2
  3. package/dist/api-command-Bab30eNp.js +61097 -0
  4. package/dist/cli-command-names-BYbYdipl.js +320 -0
  5. package/dist/help-inputs-NGARVZL_.js +109 -0
  6. package/dist/{json-output-BzSBR-KX.js → json-output-xgN0ZLWP.js} +31 -6
  7. package/dist/{listen-background-C0F9gNDD.js → listen-background-DyBYca28.js} +323 -36
  8. package/dist/{machine-session-g-xPd3X0.js → machine-session-cfgMKQ_U.js} +8 -8
  9. package/dist/{notify-session-Bo8WgG3q.js → notify-session-BRK9_xSb.js} +71 -32
  10. package/dist/oclif/auto-signal-worker.js +3 -3
  11. package/dist/oclif/auto-signals.js +1 -1
  12. package/dist/oclif/command-not-found.js +132 -0
  13. package/dist/oclif/command-stdin.js +9 -0
  14. package/dist/oclif/help.js +70 -13
  15. package/dist/oclif/index.js +3236 -104541
  16. package/dist/oclif/listen-supervisor.js +1 -1
  17. package/dist/oclif/proxy-auto-detect.js +1 -1
  18. package/dist/oclif/receiver-heal.js +4 -3
  19. package/dist/oclif/root-signup-hint.js +15 -15
  20. package/dist/receiver.d.ts +1 -1
  21. package/dist/{repeats-Dj_o6c-X-BzXj5ICh.js → repeats-Dj_o6c-X-CraZzs4t.js} +14615 -13905
  22. package/dist/retry-ids-04ZPJCZY.js +59 -0
  23. package/dist/{scoped-chat-TJlyUTi7.js → scoped-chat-YucNhX6U.js} +1 -1
  24. package/dist/{signal-command-BO93dM2Q.js → signal-command-AOnn_Him.js} +12 -6
  25. package/dist/skills/primitive-connect/references/contact-requests.md +4 -4
  26. package/dist/skills/primitive-connect/references/contacts.md +1 -1
  27. package/dist/skills/primitive-connect.json +4 -4
  28. package/man/primitive.1 +31 -15
  29. package/package.json +30 -14
  30. package/dist/api-command-B37DPKFA.js +0 -3634
@@ -0,0 +1,59 @@
1
+ import { randomUUID } from "node:crypto";
2
+ function object(value) {
3
+ return value !== null && typeof value === "object" && !Array.isArray(value);
4
+ }
5
+ /** Only explicit annotations on UUID input fields enable defaults. */
6
+ function retryIdFields(schema) {
7
+ if (!object(schema) || !object(schema.properties)) return [];
8
+ return Object.entries(schema.properties).filter(([, property]) => object(property) && property["x-primitive-retry-id"] === true && property.type === "string" && property.format === "uuid").map(([name]) => name);
9
+ }
10
+ function prepareRetryIds(schema, body, bodyFlagToProperty, generate = randomUUID) {
11
+ if (body !== void 0 && !object(body)) return {
12
+ body,
13
+ ids: []
14
+ };
15
+ const flags = new Map([...bodyFlagToProperty].map(([flag, property]) => [property, `--${flag}`]));
16
+ let prepared = body;
17
+ const ids = [];
18
+ for (const field of retryIdFields(schema)) {
19
+ if (object(prepared) && Object.hasOwn(prepared, field)) continue;
20
+ if (prepared === body) prepared = { ...object(body) ? body : {} };
21
+ const value = generate();
22
+ Object.defineProperty(prepared, field, {
23
+ value,
24
+ enumerable: true,
25
+ configurable: true,
26
+ writable: true
27
+ });
28
+ ids.push({
29
+ field,
30
+ flag: flags.get(field) ?? null,
31
+ json_path: /^[A-Za-z_][A-Za-z0-9_]*$/.test(field) ? `$.${field}` : `$[${JSON.stringify(field)}]`,
32
+ value,
33
+ source: "generated"
34
+ });
35
+ }
36
+ return {
37
+ body: prepared,
38
+ ids
39
+ };
40
+ }
41
+ const generatedIds = /* @__PURE__ */ new WeakMap();
42
+ /** Store metadata per invocation, never on a shared command class or alias. */
43
+ function rememberRetryIds(command, ids) {
44
+ if (ids.length) generatedIds.set(command, ids);
45
+ else generatedIds.delete(command);
46
+ }
47
+ function takeRetryIds(command) {
48
+ const ids = generatedIds.get(command) ?? [];
49
+ generatedIds.delete(command);
50
+ return ids;
51
+ }
52
+ function writeRetryIdNotice(ids) {
53
+ for (const id of ids) {
54
+ const reference = id.flag ?? id.json_path;
55
+ const retry = id.flag ? `with ${id.flag} ${id.value}` : `with ${id.json_path} set to this value in your JSON body`;
56
+ process.stderr.write(`Retry ID (${reference}): ${id.value}\nRetry the same operation and inputs ${retry}.\n`);
57
+ }
58
+ }
59
+ export { writeRetryIdNotice as a, takeRetryIds as i, rememberRetryIds as n, retryIdFields as r, prepareRetryIds as t };
@@ -1,4 +1,4 @@
1
- import { b as retryTransient, c as classifySignalContent, q as isTrustedSender } from "./repeats-Dj_o6c-X-BzXj5ICh.js";
1
+ import { T as retryTransient, _ as isTrustedSender, c as classifySignalContent } from "./repeats-Dj_o6c-X-CraZzs4t.js";
2
2
  // src/oclif/presence-provenance.ts
3
3
  function readPresenceProjection(detail) {
4
4
  if (!detail || typeof detail !== "object") return null;
@@ -1,15 +1,15 @@
1
- import { Lt as getEmail, Rn as sendEmail, _ as describeApiFailure, _n as listSentEmails, h as sendPreparedSignal, p as prepareSignalEmail, pt as createEndpoint } from "./repeats-Dj_o6c-X-BzXj5ICh.js";
2
- import { X as classifySendError, ft as successfulSendOutcome, g as bareAddress, o as extractErrorPayload } from "./api-command-B37DPKFA.js";
1
+ import { Gn as sendEmail, S as describeApiFailure, h as sendPreparedSignal, ht as createEndpoint, p as prepareSignalEmail, wn as listSentEmails, zt as getEmail } from "./repeats-Dj_o6c-X-CraZzs4t.js";
2
+ import { O as bareAddress, Tt as successfulSendOutcome, ct as classifySendError, o as extractErrorPayload } from "./api-command-Bab30eNp.js";
3
3
  import { recordSentSignal } from "./oclif/auto-signals.js";
4
4
  import { _ as acquireListenLock, c as mailTime, d as readMailJson, f as removeMailFile, h as writeMailJson, i as mailId, l as privateMailDirectory, m as withMailLock, n as invalidSharedMail, o as mailObject, p as syncMailDirectory, r as mailAddress, s as mailString, t as SharedMailStateError, v as compareListenProcessIdentity, x as listenProcessIdentity, y as listenIdentity } from "./shared-mail-files-BAQSGxxz.js";
5
- import { i as readApiBeforeDeadline, n as isPlainChatReply, o as scopedChatSenderTrust } from "./scoped-chat-TJlyUTi7.js";
5
+ import { i as readApiBeforeDeadline, n as isPlainChatReply, o as scopedChatSenderTrust } from "./scoped-chat-YucNhX6U.js";
6
6
  import { n as tryOwnSharedMail, r as waitForSharedMailChange, t as readSharedMailOwner } from "./shared-mail-watch-BAPMsFNv.js";
7
7
  import { Errors } from "@oclif/core";
8
8
  import { opendirSync } from "node:fs";
9
9
  import { createHash, randomUUID, scryptSync } from "node:crypto";
10
10
  import { dirname, join } from "node:path";
11
11
  import { setTimeout as setTimeout$1 } from "node:timers/promises";
12
- // ../sdk-node/dist/api-DWJSxvRV.js
12
+ // ../sdk-node/dist/api-fm03G7A3.js
13
13
  const jsonBodySerializer = { bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value) };
14
14
  function createSseClient({ onRequest, onSseError, onSseEvent, responseTransformer, responseValidator, sseDefaultRetryDelay, sseMaxRetryAttempts, sseMaxRetryDelay, sseSleepFn, url, ...options }) {
15
15
  let lastEventId;
@@ -1831,6 +1831,10 @@ async function openSharedMailStore(options) {
1831
1831
  /** The API's code for an account credential creating a pull subscription. */
1832
1832
  const AGENT_CONNECTION_REQUIRED = "pull_subscription_requires_agent_connection";
1833
1833
  const AGENT_CONNECTION_REQUIRED_MESSAGE = "primitive listen needs a connected agent credential, which limits the subscription to one address. Connect one with primitive agent connect and select its profile. With an account API key, watch mail with primitive emails watch or receive it at an HTTP webhook endpoint instead.";
1834
+ /** The API's code for a full API key that was revoked. */
1835
+ const KEY_REVOKED = "key_revoked";
1836
+ /** What a listener says when its agent's key was revoked: connect again, as signing in cannot bring it back. */
1837
+ const KEY_REVOKED_MESSAGE = "This agent's key was revoked, so it no longer works. Connect the agent again for a new one; signing in does not bring it back.";
1834
1838
  /** Connected-agent API keys are the only credentials that can create pull subscriptions. */
1835
1839
  function isConnectedAgentKey(apiKey) {
1836
1840
  return apiKey?.startsWith("pconn_") === true;
@@ -1855,7 +1859,9 @@ async function ensureSharedMailSubscription(options) {
1855
1859
  responseStyle: "fields"
1856
1860
  });
1857
1861
  if (result.error || !result.data?.data) {
1858
- if (result.error?.error?.code === "pull_subscription_requires_agent_connection") throw new EventReceiverError(AGENT_CONNECTION_REQUIRED_MESSAGE, AGENT_CONNECTION_REQUIRED, 403);
1862
+ const error = result.error;
1863
+ if (error?.error?.code === "pull_subscription_requires_agent_connection") throw new EventReceiverError(AGENT_CONNECTION_REQUIRED_MESSAGE, AGENT_CONNECTION_REQUIRED, 403);
1864
+ if (error?.error?.code === "key_revoked") throw new EventReceiverError(KEY_REVOKED_MESSAGE, KEY_REVOKED, 401);
1859
1865
  throw new EventReceiverError("Could not open the shared inbound subscription.", "subscription_failed", result.response?.status ?? 0);
1860
1866
  }
1861
1867
  const created = result.data.data;
@@ -2338,4 +2344,4 @@ async function sendSignal(context, options) {
2338
2344
  release();
2339
2345
  }
2340
2346
  }
2341
- export { ensureSharedMailSubscription as a, isConnectedAgentKey as c, reserveSharedMailSubscription as d, followEmailConversation as f, EventReceiverError as g, EventConnection as h, sharedMailScope as i, createSharedMailWaiter as l, otherParticipants as m, reconcileChatSend as n, AGENT_CONNECTION_REQUIRED as o, readConversationFollow as p, openSharedMailReceiver as r, AGENT_CONNECTION_REQUIRED_MESSAGE as s, sendSignal as t, openSharedMailStore as u };
2347
+ export { EventConnection as _, ensureSharedMailSubscription as a, KEY_REVOKED as c, createSharedMailWaiter as d, openSharedMailStore as f, otherParticipants as g, readConversationFollow as h, sharedMailScope as i, KEY_REVOKED_MESSAGE as l, followEmailConversation as m, reconcileChatSend as n, AGENT_CONNECTION_REQUIRED as o, reserveSharedMailSubscription as p, openSharedMailReceiver as r, AGENT_CONNECTION_REQUIRED_MESSAGE as s, sendSignal as t, isConnectedAgentKey as u, EventReceiverError as v };
@@ -145,10 +145,10 @@ email interactions; no separate interaction endpoint is required.
145
145
  The organization owner can manage broader rules through their normal CLI login:
146
146
 
147
147
  ```sh
148
- primitive contacts get-contact-policy
149
- primitive contacts put-contact-policy --body-file <policy-file>
150
- primitive contacts get-agent-contact-policy --agent-address agent@example.com
151
- primitive contacts put-agent-contact-policy --agent-address agent@example.com --body-file <policy-file>
148
+ primitive contacts get-policy
149
+ primitive contacts set-policy --body-file <policy-file>
150
+ primitive contacts get-agent-policy --agent-address agent@example.com
151
+ primitive contacts set-agent-policy --agent-address agent@example.com --body-file <policy-file>
152
152
  ```
153
153
 
154
154
  Writes replace the document's `rules` and `allow_contact_requests`, with exactly
@@ -31,7 +31,7 @@ CLI equivalents:
31
31
 
32
32
  ```sh
33
33
  primitive agent contacts list
34
- primitive agent contacts add person@example.com --purpose "Project coordination" --notify
34
+ primitive agent contacts create person@example.com --purpose "Project coordination" --notify
35
35
  primitive agent contacts update person@example.com --no-notify
36
36
  ```
37
37
 
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "primitive-connect",
3
- "version": "078bd8f84619ab6c",
3
+ "version": "a2e1e9de1cb60b4c",
4
4
  "source": {
5
5
  "repository": "https://github.com/primitivedotdev/skills",
6
6
  "path": "skills/primitive-connect",
7
- "commit": "46bd9ca38d9edea664d78d08a4cae0a8536438b3"
7
+ "commit": "a178a469ed1310b58bf4f5ce2a15c17c30799edc"
8
8
  },
9
9
  "files": {
10
10
  "SKILL.md": "37d40b66010319c6a176bc8eb66affd93cab0968c609ad523dac087d3077d29d",
@@ -13,8 +13,8 @@
13
13
  "references/collaboration.md": "b9c599bf66ae58ea8c779cdceddb11882cc9f0da2fba0e4ca363ad8d01d64d5b",
14
14
  "references/communication.md": "d9599e3c563a4cd1c7dd658f730306b669f7ad6522b3632dc55fd5feee60cd30",
15
15
  "references/connect.md": "46d3e62e6b021100a0ddf84269bcb59a1725a3da4e360c797f378ce13cf5c4ec",
16
- "references/contact-requests.md": "a6afb51ec2cd0bf807095e034942c6e81c82c8b8489a3e2464cd8ce9f4c28d43",
17
- "references/contacts.md": "f85c7feea0e426f4f33b45df25016130b5766265fe10cdbe79d6cd8c45361763",
16
+ "references/contact-requests.md": "f4931e611dfe95b988010fd4547b2b66e845f1f76c202719602ff6be9e6d7508",
17
+ "references/contacts.md": "353dff4497e703325d496bf7e48b8cd37ee64c3ef305f895f3d669ebd76ad2a2",
18
18
  "references/conversations.md": "c8a1125db76e40e8bf2e550223e4d4e1a86536ca43ccdd835024f6d6502098a7",
19
19
  "references/external-services.md": "211e03cec546d2f83c78bd38985cc64203272df47eb52cf1bdce885bceee3089",
20
20
  "references/manual-setup.md": "433f111c425cb976d153e22c851064e2e730f45229d8747ec91827f3a76b5d0e",
package/man/primitive.1 CHANGED
@@ -35,16 +35,20 @@ array; a failure adds
35
35
  .B error
36
36
  and
37
37
  .BR exit_code .
38
- Generated API commands keep their usual stdout shape with
38
+ Generated API commands print the API's response body with
39
39
  .BR --json :
40
- the data payload only. They do not print the
41
- .B next cursor:
42
- line then; add
43
- .B --envelope
44
- to get the full response envelope, with the pagination cursor in
40
+ .BR data ,
41
+ and
42
+ .B meta
43
+ with the pagination cursor in
45
44
  .B meta.cursor
46
- and empty-result hints in
45
+ where the route sends it, plus the CLI's own
47
46
  .BR summary .
47
+ Without
48
+ .BR --json ,
49
+ stdout is the data payload and the
50
+ .B next cursor:
51
+ line goes to stderr.
48
52
  .B primitive listen
49
53
  streams JSONL and is not covered by this rule.
50
54
  .SH LOCAL WEBHOOK EVENTS
@@ -116,9 +120,9 @@ Remove a destination using
116
120
  .SH LOCAL WEBHOOK API
117
121
  .PP
118
122
  The generated commands
119
- .B endpoints pull-webhook-event
123
+ .B endpoints pull-event
120
124
  and
121
- .B endpoints complete-webhook-event
125
+ .B endpoints complete-event
122
126
  expose local webhook delivery on API hosts where it is enabled. Each command
123
127
  makes one API request. Use their --help-full output for the input fields. Consumers
124
128
  deduplicate event IDs and report the outcome with the returned attempt and lease.
@@ -191,7 +195,7 @@ Run
191
195
  to remove local credentials, pending email-code auth state, and stale credential locks without contacting Primitive.
192
196
  .PP
193
197
  Where the server supports it, browser login logs you in as yourself. Run
194
- .B primitive orgs
198
+ .B primitive org list
195
199
  to list your organizations and whether the CLI may be used in each, and
196
200
  .B primitive org use ORG
197
201
  to switch by name or id. Pass
@@ -214,9 +218,15 @@ to see API keys and their permissions; neither shows a secret.
214
218
  .B rotate
215
219
  and
216
220
  .B update
217
- need your approval in the browser: the command prints the approval link and
218
- waits for the one-time token the page shows. A new secret is printed once and
219
- never saved.
221
+ run directly. If your organization requires approval, the command prints the
222
+ approval link and waits for the one-time token the page shows, or takes it with
223
+ .BR --step-up-token .
224
+ A new secret is printed once and never saved.
225
+ .B primitive keys update ID --expires-at TIME
226
+ extends a key before it expires; rotating keeps its expiry unless
227
+ .B rotate
228
+ is given
229
+ .BR --expires-at .
220
230
  .B primitive keys revoke ID
221
231
  revokes a key.
222
232
  .B primitive whoami --check PERMISSION
@@ -231,7 +241,8 @@ signed in with
231
241
  can leave; API keys are refused. The only owner of an organization cannot leave
232
242
  it. If the server asks for a dashboard confirmation, open the page it names and
233
243
  paste the token at the prompt, or pass it with --step-up-token. Refusals from
234
- the server are printed as returned.
244
+ the server are printed as returned. Without a terminal and without --yes, it
245
+ exits 2 before anything is sent.
235
246
  .PP
236
247
  Run
237
248
  .B primitive whoami
@@ -255,7 +266,7 @@ server decides which header names are allowed.
255
266
  Schedule the send for TIME (ISO 8601 with Z or a UTC offset). Cancel it before
256
267
  then with primitive sent cancel --id ID or --idempotency-key KEY.
257
268
  .TP
258
- .B primitive domains add DOMAIN
269
+ .B primitive domains create DOMAIN
259
270
  Start a custom-domain claim.
260
271
  .TP
261
272
  .B primitive domains verify --id DOMAIN_ID
@@ -312,6 +323,11 @@ Manage the repeating sends you created.
312
323
  As the recipient, stop a repeat. ID is the repeat id from the message footer
313
324
  or the id of a received message of the repeat.
314
325
  .TP
326
+ .B primitive skills install [NAME] --runtime claude|codex
327
+ Install the skills bundled with this CLI, or only NAME, into the runtime's
328
+ skills folder (--project for the current directory's). A copy already at the
329
+ bundled version is left unchanged.
330
+ .TP
315
331
  .B primitive list-operations
316
332
  Print the generated API operation manifest.
317
333
  .TP
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "primcli",
3
- "version": "3.0.0-preview.2",
3
+ "version": "3.0.0-preview.21",
4
4
  "publishConfig": {
5
5
  "tag": "preview"
6
6
  },
@@ -42,6 +42,10 @@
42
42
  "identifier": "COMMANDS"
43
43
  },
44
44
  "dirname": "primitive",
45
+ "hooks": {
46
+ "prerun": "./dist/oclif/command-stdin.js",
47
+ "command_not_found": "./dist/oclif/command-not-found.js"
48
+ },
45
49
  "plugins": [
46
50
  "@oclif/plugin-help",
47
51
  "@oclif/plugin-autocomplete",
@@ -70,6 +74,9 @@
70
74
  "machine": {
71
75
  "description": "Check and repair this machine's setup for coding agents. Use `primitive machine doctor --json` to inspect and `--fix` to repair."
72
76
  },
77
+ "skills": {
78
+ "description": "Install the agent skills bundled with this CLI. Use `primitive skills install --runtime claude` to install them all."
79
+ },
73
80
  "agent-connections": {
74
81
  "description": "Create, list, invite, revoke, and remove connected agents; claim private invitations through stdin."
75
82
  },
@@ -92,7 +99,7 @@
92
99
  "description": "Check inbound email setup and readiness, and work through mail awaiting your reply. Prefer `primitive inbox setup` for a guided setup path, `primitive inbox status` for the readiness table, and `primitive inbox next` for the oldest email awaiting your reply."
93
100
  },
94
101
  "emails": {
95
- "description": "List, inspect, and wait for received emails. Prefer task aliases like `primitive emails list`, `primitive emails get`, `primitive emails latest`, `primitive emails wait`, and `primitive emails watch`; generated API names remain available for compatibility."
102
+ "description": "List, inspect, and wait for received emails, and see what the classifier read from one. Prefer task aliases like `primitive emails list`, `primitive emails get`, `primitive emails latest`, `primitive emails facts`, `primitive emails wait`, and `primitive emails watch`. For a one-line-per-email table, `primitive emails latest --limit 100`."
96
103
  },
97
104
  "search": {
98
105
  "description": "Cross-corpus semantic search. Prefer `primitive search <query>` for lexical inbound search and `primitive semantic-search <query>` for meaning-aware ranking across inbound and outbound.",
@@ -102,10 +109,10 @@
102
109
  "description": "Send outbound emails. Prefer `primitive send` for fresh sends and `primitive reply --id <inbound-id>` for replies. Use `primitive domains list` or `primitive inbox status` to find usable sender domains for --from; `primitive sending permissions` lists recipient-scope destinations you may send to."
103
110
  },
104
111
  "signin": {
105
- "description": "Sign in to an existing Primitive account"
112
+ "description": "Sign in with browser approval or an emailed code"
106
113
  },
107
114
  "login": {
108
- "description": "Log in to an existing Primitive account"
115
+ "description": "Log in with browser approval or an emailed code"
109
116
  },
110
117
  "otp": {
111
118
  "description": "Authenticate with an emailed one-time code"
@@ -114,7 +121,7 @@
114
121
  "description": "Short aliases for outbound sent-email history: `primitive sent list`, `primitive sent get`, and `primitive sent delete --id <id>`. Deleting sender history does not recall delivery."
115
122
  },
116
123
  "threads": {
117
- "description": "Inspect conversation threads spanning received and sent emails. Prefer `primitive threads get --id <thread-id>`; generated API name `primitive threads get-thread --id <thread-id>` remains available."
124
+ "description": "Inspect conversation threads spanning received and sent emails. Prefer `primitive threads get --id <thread-id>`."
118
125
  },
119
126
  "endpoints": {
120
127
  "description": "Manage webhook endpoints that receive email events"
@@ -129,25 +136,25 @@
129
136
  "description": "Short aliases for webhook delivery attempts: `primitive deliveries list` and `primitive deliveries replay`."
130
137
  },
131
138
  "functions": {
132
- "description": "Deploy JavaScript handlers that run on inbound mail. Prefer `primitive functions templates`, `primitive functions init`, `primitive functions deploy`, `primitive functions redeploy`, `primitive functions list`, `primitive functions get`, `primitive functions logs`, and `primitive functions set-secret`; generated API names remain available for compatibility."
139
+ "description": "Deploy JavaScript handlers that run on inbound mail. Prefer `primitive functions templates`, `primitive functions init`, `primitive functions deploy`, `primitive functions redeploy`, `primitive functions list`, `primitive functions get`, `primitive functions logs`, and `primitive functions set-secret`."
133
140
  },
134
141
  "memories": {
135
142
  "description": "Store durable JSON memories by key. Use `primitive memories set|get|delete|search`; pass `--function <function-id>` for function-scoped memories."
136
143
  },
137
144
  "templates": {
138
- "description": "Browse and install Function templates. Use `primitive templates list-templates`, `primitive templates get-template`, `primitive templates install-template`, and `primitive templates get-template-install`."
145
+ "description": "Browse and install Function templates. Use `primitive templates list`, `primitive templates get`, `primitive templates install`, and `primitive templates get-install`."
139
146
  },
140
147
  "org": {
141
- "description": "Switch the CLI between your organizations (`primitive org use <org>`, list them with `primitive orgs`), manage org-level (global) resources shared across functions, or leave the organization"
148
+ "description": "Switch the CLI between your organizations (`primitive org use <org>`, list them with `primitive org list`), manage org-level (global) resources shared across functions, or leave the organization"
142
149
  },
143
150
  "org:secrets": {
144
- "description": "Global secrets shared across every function. Use `primitive org secrets list|set|remove`. Changes land in a function on its next redeploy; a function secret of the same name overrides the global."
151
+ "description": "Global secrets shared across every function. Use `primitive org secrets list|set|delete`. Changes land in a function on its next redeploy; a function secret of the same name overrides the global."
145
152
  },
146
153
  "keys": {
147
- "description": "Organization API keys: list and show them (metadata only, never secrets), create, rotate and change them after you approve each request in your browser, and revoke them."
154
+ "description": "Organization API keys: list and show them (metadata only, never secrets), create, rotate and change them (with browser approval where your organization requires it), and revoke them."
148
155
  },
149
156
  "roles": {
150
- "description": "Read roles, groups, mailbox access and the access mode. Use `primitive roles list|groups|mailbox-access|access-mode`; generated API names remain available."
157
+ "description": "Read roles, members, groups, mailbox access and the access mode. Use `primitive roles list|members|groups|mailbox-access|access-mode`."
151
158
  },
152
159
  "projects": {
153
160
  "description": "Organization people, shared projects and project invitations"
@@ -164,6 +171,9 @@
164
171
  "organization-settings": {
165
172
  "description": "Your connected apps and CLI logins, the organization's connected apps, name, logo, search settings and billing"
166
173
  },
174
+ "members": {
175
+ "description": "List the organization's members and their roles. Use `primitive members list` (the same as `primitive roles members`)."
176
+ },
167
177
  "roles-and-members": {
168
178
  "description": "Roles, member roles and removal, the mailbox access mode, break-glass, transfers and suspensions, and leaving the organization"
169
179
  },
@@ -179,11 +189,17 @@
179
189
  "stats": {
180
190
  "description": "Received and sent mail per hour, and how webhook deliveries ended"
181
191
  },
192
+ "activity": {
193
+ "description": "Where you learn what others asked of you and did to your mail: `primitive activity asked` (rule requests for your mail and objections to your rules), `primitive activity concerning` (other members' rules that started covering your mail or changed), and `primitive activity created` (what you created, including your requests and how they were decided). `primitive doctor` sums up what is waiting for you."
194
+ },
182
195
  "email-rules": {
183
196
  "description": "Rules written in plain English that pick out received mail"
184
197
  },
198
+ "email-rule-oversight": {
199
+ "description": "The email rules that reach your own mailboxes, whoever wrote them, read-only, and objections asking a rule's author to turn it off"
200
+ },
185
201
  "routes": {
186
- "description": "Manage recipient routes. Bind an address pattern to an endpoint or function: `primitive routes add alice@d --function <id>`, `primitive routes list`, `primitive routes test <recipient>`, `primitive routes remove <id>`."
202
+ "description": "Manage recipient routes. Bind an address pattern to an endpoint or function: `primitive routes create alice@d --function <id>`, `primitive routes list`, `primitive routes test <recipient>`, `primitive routes delete <id>`."
187
203
  },
188
204
  "repeat": {
189
205
  "description": "Act on a message that repeats to you. Use `primitive repeat stop --id <email-id>` when it is no longer needed."
@@ -192,7 +208,7 @@
192
208
  "description": "Manage repeating sends you created with `primitive send` or `primitive reply` and --repeat-every. Use `primitive repeats list|get|pause|resume|cancel`."
193
209
  },
194
210
  "changes": {
195
- "description": "Long-poll one replayable feed of what changed. Use `primitive changes list --since start` for a baseline, then `--since <next_cursor> --wait 20`; add `--expand message` to inline each message and `--address a@x,b@y` to keep only mail to or from those addresses."
211
+ "description": "Long-poll a replayable feed of mail, send, thread mute and read-state, agent and access changes, for a login or key with changes:read. Use `primitive changes list --since start` for a baseline, then `--since <next_cursor> --wait 20`; add `--expand message` to inline each message and `--address a@x,b@y` to keep only mail to or from those addresses. Rule requests and rules over your mail are in `primitive activity asked` and `primitive activity concerning`."
196
212
  },
197
213
  "repeating-sends": {
198
214
  "description": "Generated API operations for repeating sends. Prefer `primitive repeats ...` (sender) and `primitive repeat stop` (recipient)."
@@ -204,7 +220,7 @@
204
220
  "description": "Receive events locally as JSONL with JSON status responses by default; --json is accepted explicitly. Use --exec or --forward-to, or deliver external mail events as tool output, never user messages, to an exact loaded native session using --notify-session with --contacts or approved --sender addresses. Add --email-id to --status to explain one received email. Add --contact-requests for owner-enabled structured first-contact intake. Use --background for independent receiving, --status --notify-session for current receiver health and durable receipts, or --stop --notify-session to stop only that receiver. Verified presence controls use no model turns and do not consume --once or --number."
205
221
  },
206
222
  "contacts": {
207
- "description": "Shared organization contacts plus structured request, accept, and wait commands for connected agents. Directory list, get, add, update, and remove use conditional versions. Commands return JSON by default and accept explicit --json."
223
+ "description": "Shared organization contacts plus structured request, accept, and wait commands for connected agents. Directory list, get, create, update, and delete use conditional versions. Commands return JSON by default and accept explicit --json."
208
224
  },
209
225
  "agent:contacts": {
210
226
  "description": "Contacts and notification preferences for one agent address. Connected profiles default to their own address. Commands return JSON by default and accept explicit --json."