primcli 3.0.0-preview.20 → 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.
@@ -1,4 +1,5 @@
1
- import { $t as getThread, Bt as getEndpoint, C as parseRetryAfter, H as assertAwaitingFilterRows, J as isAwaitingRejectedError, U as awaitingRejectedError, V as ReplyStateUnsupportedError, Vn as sdk_gen_exports, W as ensureSearchReportsReplyState, X as replyStateSurfaceForOperation, Yt as getOwnGrant, at as expectedAutomatedVerdicts, et as AutomatedFilterUnsupportedError, it as ensureSearchReportsAutomated, nt as automatedRejectedError, pn as listEndpoints, rt as automatedSurfaceForOperation, st as isAutomatedRejectedError, tt as assertAutomatedVerdict, un as listDomains, zt as getEmail } from "./repeats-Dj_o6c-X-CliyH3ge.js";
1
+ import { $t as getThread, Bt as getEndpoint, C as parseRetryAfter, H as assertAwaitingFilterRows, J as isAwaitingRejectedError, U as awaitingRejectedError, V as ReplyStateUnsupportedError, Vn as sdk_gen_exports, W as ensureSearchReportsReplyState, X as replyStateSurfaceForOperation, Yt as getOwnGrant, at as expectedAutomatedVerdicts, et as AutomatedFilterUnsupportedError, it as ensureSearchReportsAutomated, nt as automatedRejectedError, pn as listEndpoints, rt as automatedSurfaceForOperation, st as isAutomatedRejectedError, tt as assertAutomatedVerdict, un as listDomains, zt as getEmail } from "./repeats-Dj_o6c-X-CraZzs4t.js";
2
+ import { i as canonicalCommandId, n as canonicalBodyFlagName, r as canonicalCliText } from "./cli-command-names-BYbYdipl.js";
2
3
  import { C as saveCliCredentials, F as agentProfilesDirectory, H as requireDefaultLoginProfile, N as agentProfileDirectory, R as loadConnectedAgentProfile, S as resolveCliAuth, W as PrimitiveApiClient, _ as deleteCliCredentials, b as loadCliCredentials, c as resolveConfigEnvironment, d as validateCliHeaderName, f as validateCliHeaderValue, i as loadCliConfig, j as AGENT_PROFILE_ENV, m as cliAccessTokenExpiresAt, p as acquireCliCredentialsLock, w as saveSignupCredentials, x as normalizeApiBaseUrl, y as detectPrimitiveKeyEnvMisname } from "./cli-config-Ms_0vNjq.js";
3
4
  import "./oclif/global-org-flag.js";
4
5
  import { a as assertRequiredBodyFields, i as operationHelpInputs } from "./help-inputs-NGARVZL_.js";
@@ -782,7 +783,7 @@ const operationManifest = [
782
783
  "binaryResponse": false,
783
784
  "bodyRequired": false,
784
785
  "command": "list-activity-objects",
785
- "description": "The objects the caller created, newest first, each with where it stands now, including ones since disabled, deleted or revoked where the object keeps a row: Functions, endpoints, Function triggers, pull subscriptions, recipient routes, filters, wake schedules, repeating sends and scheduled sends. An API key, an app or an agent sees what it created itself; a webhook given to an API key lists under that key. A person (a dashboard session, or their own Primitive CLI or app login) sees what they created through any credential of theirs, each item naming it, and also their API keys, personal agents, email rules, rule requests and objections to rules over their mail (objections only on the dashboard or the Primitive CLI). Each kind is listed only if the caller could list it through that kind's own route; a kind it could not is named in withheld, with no count. Ids, names and states only: never a webhook URL or mail content. Needs activity:read_self. With relation=asked it lists instead what other members asked of the person, open or answered: the rule requests made to them, and the objections to rules they wrote, under their current membership, each naming the member who asked or objected in created_through. A key, an app or an agent has none, and gets both kinds in withheld. With relation=concerning it lists instead what other members did that concerns the person's own mail: each time a rule started covering one of their mailboxes, saved a new version while covering it, or stopped covering it, named as the rule was then, naming its author in created_through, under their current membership; only on the dashboard or the Primitive CLI. A key, an app or an agent has none, and gets email_rule_coverage in withheld. A notice never reads as ended. Notices are written by a periodic job and can lag, a held new version by up to about 15 minutes; GET /v1/email-rules/covering-me is the live view. For what covers you now, read GET /email-rules/covering-me.",
786
+ "description": "The objects the caller created, newest first, each with where it stands now, including ones since disabled, deleted or revoked where the object keeps a row: Functions, endpoints, Function triggers, pull subscriptions, recipient routes, filters, wake schedules, repeating sends and scheduled sends. An API key, an app or an agent sees what it created itself; a webhook given to an API key lists under that key. A person (a dashboard session, or their own Primitive CLI or app login) sees what they created through any credential of theirs, each item naming it, and also their API keys, personal agents, email rules, rule requests and objections to rules over their mail (objections only on the dashboard or the Primitive CLI). Each kind is listed only if the caller could list it through that kind's own route; a kind it could not is named in withheld, with no count. Ids, names and states only: never a webhook URL or mail content. Needs activity:read_self. With relation=asked it lists instead what other members asked of the person, open or answered: the rule requests made to them, and the objections to rules they wrote, under their current membership, each naming the member who asked or objected in created_through. A key, an app or an agent has none, and gets both kinds in withheld. With relation=concerning it lists instead what other members did that concerns the person's own mail: each time a rule in observe or active started covering one of their mailboxes, turned active after they were told of it in observe, saved a new version while covering it, or stopped covering it, named as the rule was then, naming its author in created_through, under their current membership; only on the dashboard or the Primitive CLI. A key, an app or an agent has none, and gets email_rule_coverage in withheld. A notice never reads as ended. Notices are written by a periodic job and can lag, a held new version by up to about 15 minutes; GET /v1/email-rules/covering-me is the live view. For what covers you now, read GET /email-rules/covering-me.",
786
787
  "hasJsonBody": false,
787
788
  "method": "GET",
788
789
  "operationId": "listActivityObjects",
@@ -865,7 +866,7 @@ const operationManifest = [
865
866
  },
866
867
  "state": {
867
868
  "type": "string",
868
- "description": "Where it stands now: enabled, disabled, deleted or replaced (endpoints and routes), enabled or disabled (filters, wake schedules), live, suspended or deleted (Functions), active, paused or ended (repeating sends), scheduled (scheduled sends), active, suspended, expired or revoked (API keys), pending, claimed, connected or revoked (agents), draft, observe or active (email rules), pending, accepted, declined or withdrawn (rule requests and objections; an objection may also be amended or closed), and for a coverage notice what it told: started (a rule was made or turned active over your mailboxes, or an active rule came to reach you; once per rule, not per mailbox), new_version, stopped (it no longer covers you, why in stop_reason), or baseline (it already covered you when notices began)."
869
+ "description": "Where it stands now: enabled, disabled, deleted or replaced (endpoints and routes), enabled or disabled (filters, wake schedules), live, suspended or deleted (Functions), active, paused or ended (repeating sends), scheduled (scheduled sends), active, suspended, expired or revoked (API keys), pending, claimed, connected or revoked (agents), draft, observe, active or deleted (email rules), pending, accepted, declined or withdrawn (rule requests and objections; an objection may also be amended or closed), and for a coverage notice what it told: started (a rule in observe or active came to cover your mailboxes: made, turned on, or reaching you; once per rule, not per mailbox), activated (a rule you were told of while it was being tested in observe is now active), new_version, stopped (it no longer covers you, why in stop_reason), or baseline (it already covered you when notices began)."
869
870
  },
870
871
  "created_at": {
871
872
  "type": "string",
@@ -909,7 +910,7 @@ const operationManifest = [
909
910
  "format": "uuid"
910
911
  },
911
912
  "stop_reason": {
912
- "description": "For a stopped notice: deleted, turned_off (no longer active), or no_longer_covers (active, reaching none of your mailboxes now).",
913
+ "description": "For a stopped notice: deleted, turned_off (set to draft), or no_longer_covers (in observe or active, reaching none of your mailboxes now). A rule moved from active back to observe still covers you and is not stopped.",
913
914
  "type": "string",
914
915
  "enum": [
915
916
  "deleted",
@@ -14352,7 +14353,7 @@ const operationManifest = [
14352
14353
  "binaryResponse": false,
14353
14354
  "bodyRequired": false,
14354
14355
  "command": "get-email-rule-covering-me",
14355
- "description": "One rule that covers one of your own mailboxes, read-only, with its current version; or one that no longer does but decided on mail at your own mailbox (covers_now false), shown as the version that last decided on your mail, without its current name. You see its name, wording, current tree, state, kind and author, and which of your own mailboxes it reaches. Its wording and tree are shown as written, so they can name other addresses (a condition on who an email is from or to). While it covers you, you also see who receives what it matches (receivers): how many API keys, webhooks and shares, the member each belongs to (or the organization), and the sites the webhooks deliver to. You do not see which keys, webhooks or shares they are (no ids, names, prefixes, or URLs beyond the site), the other inboxes and domains its scope names, or its saved expectations. For what happened to one email of yours, every rule's decision on it and, for another member's rule covering you, who receives what it shares: GET /v1/emails/{id}/rule-results (primitive email-rules list-email-rule-results --email-id <email-id>). Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
14356
+ "description": "One rule that covers one of your own mailboxes, read-only, with its current version; or one that no longer does but decided on mail at your own mailbox (covers_now false), shown as the version that last decided on your mail, without its current name. You see its name, wording, current tree, state, kind and author, and which of your own mailboxes it reaches. Its wording and tree are shown as written, so they can name other addresses (a condition on who an email is from or to). While it covers you, you also see who receives what it matches (receivers): how many API keys, webhooks and shares, the member each belongs to (or the organization), and the sites the webhooks deliver to. You do not see which keys, webhooks or shares they are (no ids, names, prefixes, or URLs beyond the site), the other inboxes and domains its scope names, or its saved expectations. For what happened to one email of yours, every rule's decision on it and, for another member's rule covering you, who receives what it shares: GET /v1/emails/{id}/rule-results (primitive email-rules list-results --email-id <email-id>). Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
14356
14357
  "hasJsonBody": false,
14357
14358
  "method": "GET",
14358
14359
  "operationId": "getEmailRuleCoveringMe",
@@ -14406,7 +14407,7 @@ const operationManifest = [
14406
14407
  "type": ["string", "null"]
14407
14408
  },
14408
14409
  "email": {
14409
- "description": "Sign-in email; null unless you can list member emails or this is you.",
14410
+ "description": "Sign-in email: a rule over your mail always names who wrote it. Null only when they have none.",
14410
14411
  "type": ["string", "null"]
14411
14412
  }
14412
14413
  },
@@ -15293,7 +15294,7 @@ const operationManifest = [
15293
15294
  "binaryResponse": false,
15294
15295
  "bodyRequired": false,
15295
15296
  "command": "list-email-rules-covering-me",
15296
- "description": "Every email rule that covers one of your own mailboxes now, yours included, newest first, in any state. A rule covers you when the scope it runs with now reaches one of your own mailboxes (your member mailbox, or a personal agent's address), and covers.via says how: author_reach, it runs over everything its author can read, which includes your mail (an author who reads the organization's mail or holds an access entry for your mailbox); selected, it names your mailbox or its domain; own_mailboxes, it is your own rule over your own mail. Another member's own_mailboxes rule never covers you. You see its name, wording, current tree, state, kind and author, and which of your own mailboxes it reaches. Its wording and tree are shown as written, so they can name other addresses (a condition on who an email is from or to). While it covers you, you also see who receives what it matches (receivers): how many API keys, webhooks and shares, the member each belongs to (or the organization), and the sites the webhooks deliver to. You do not see which keys, webhooks or shares they are (no ids, names, prefixes, or URLs beyond the site), the other inboxes and domains its scope names, or its saved expectations. Each listed rule carries its current version's english and Primitive's reading of it (explanation); its tree is on GET /v1/email-rules/covering-me/{id}. A page can hold fewer rules than limit, or none, and still carry a cursor (one request reads a bounded number of rules): keep reading until meta.cursor is null. For what happened to one email of yours, every rule's decision on it and, for another member's rule covering you, who receives what it shares: GET /v1/emails/{id}/rule-results (primitive email-rules list-email-rule-results --email-id <email-id>). Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
15297
+ "description": "Every email rule that covers one of your own mailboxes now, yours included, newest first, in any state. A rule covers you when the scope it runs with now reaches one of your own mailboxes (your member mailbox, or a personal agent's address), and covers.via says how: author_reach, it runs over everything its author can read, which includes your mail (an author who reads the organization's mail or holds an access entry for your mailbox); selected, it names your mailbox or its domain; own_mailboxes, it is your own rule over your own mail. Another member's own_mailboxes rule never covers you. You see its name, wording, current tree, state, kind and author, and which of your own mailboxes it reaches. Its wording and tree are shown as written, so they can name other addresses (a condition on who an email is from or to). While it covers you, you also see who receives what it matches (receivers): how many API keys, webhooks and shares, the member each belongs to (or the organization), and the sites the webhooks deliver to. You do not see which keys, webhooks or shares they are (no ids, names, prefixes, or URLs beyond the site), the other inboxes and domains its scope names, or its saved expectations. Each listed rule carries its current version's english and Primitive's reading of it (explanation); its tree is on GET /v1/email-rules/covering-me/{id}. A page can hold fewer rules than limit, or none, and still carry a cursor (one request reads a bounded number of rules): keep reading until meta.cursor is null. For what happened to one email of yours, every rule's decision on it and, for another member's rule covering you, who receives what it shares: GET /v1/emails/{id}/rule-results (primitive email-rules list-results --email-id <email-id>). Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
15297
15298
  "hasJsonBody": false,
15298
15299
  "method": "GET",
15299
15300
  "operationId": "listEmailRulesCoveringMe",
@@ -15355,7 +15356,7 @@ const operationManifest = [
15355
15356
  "type": ["string", "null"]
15356
15357
  },
15357
15358
  "email": {
15358
- "description": "Sign-in email; null unless you can list member emails or this is you.",
15359
+ "description": "Sign-in email: a rule over your mail always names who wrote it. Null only when they have none.",
15359
15360
  "type": ["string", "null"]
15360
15361
  }
15361
15362
  },
@@ -16293,7 +16294,7 @@ const operationManifest = [
16293
16294
  "rule_deleted",
16294
16295
  null
16295
16296
  ],
16296
- "description": "Why it ended, once it has: stopped_by_granter, removed_by_beneficiary, stopped_by_admin or rule_deleted (the rule was deleted; the share keeps its record, and the rule is no longer shown). Null while it has not."
16297
+ "description": "Why it ended, once it has: stopped_by_granter, removed_by_beneficiary, stopped_by_admin or rule_deleted (the rule was deleted; the share keeps its record and rule_name, and the rule is no longer shown). Null while it has not."
16297
16298
  },
16298
16299
  "accepted_rule_version": {
16299
16300
  "type": "integer",
@@ -16303,6 +16304,22 @@ const operationManifest = [
16303
16304
  "type": "boolean",
16304
16305
  "description": "Whether the member who accepted changed the rule's English or tree before accepting (a new name does not count)."
16305
16306
  },
16307
+ "accept_changes": {
16308
+ "type": ["object", "null"],
16309
+ "properties": {
16310
+ "requested_english": {
16311
+ "type": "string",
16312
+ "description": "The English the member who asked asked for."
16313
+ },
16314
+ "accepted_english": {
16315
+ "type": "string",
16316
+ "description": "The English that was accepted. Can match requested_english when only the tree changed."
16317
+ }
16318
+ },
16319
+ "required": ["requested_english", "accepted_english"],
16320
+ "default": null,
16321
+ "description": "When edited_on_accept, for the member sharing their mail and the member it is shared with, live or not: what was asked for beside what was accepted. Null otherwise, and for anyone else."
16322
+ },
16306
16323
  "live": {
16307
16324
  "type": "boolean",
16308
16325
  "description": "Not ended, and both people are still members under the memberships that were recorded."
@@ -16346,7 +16363,7 @@ const operationManifest = [
16346
16363
  },
16347
16364
  "name": { "type": ["string", "null"] },
16348
16365
  "email": {
16349
- "description": "Sign-in email; null unless you can list member emails, this is you, or this is a live share with you.",
16366
+ "description": "Sign-in email; null unless you can list member emails, this is you, or the share is with you (live or not).",
16350
16367
  "type": ["string", "null"]
16351
16368
  },
16352
16369
  "active": {
@@ -16385,6 +16402,10 @@ const operationManifest = [
16385
16402
  "active"
16386
16403
  ]
16387
16404
  },
16405
+ "rule_name": {
16406
+ "description": "The rule's name, for anyone who can see the share. While the share is live, its current name; once it has ended, its name when it ended (a later rename is not shown), also after the rule is deleted. Null when the share is not live and no name was recorded as it ended (it ended before names were recorded, or one of its people is no longer a member), except for the member sharing their mail, who is told its current name.",
16407
+ "type": ["string", "null"]
16408
+ },
16388
16409
  "rule": {
16389
16410
  "type": ["object", "null"],
16390
16411
  "properties": {
@@ -16411,7 +16432,7 @@ const operationManifest = [
16411
16432
  "english",
16412
16433
  "updated_at"
16413
16434
  ],
16414
- "description": "The rule's name, state and description; null once the share is not live, except for the member sharing their mail."
16435
+ "description": "The rule's name, state and description; null once the share is not live, except for the member sharing their mail, and once the rule is deleted."
16415
16436
  },
16416
16437
  "rule_id": {
16417
16438
  "type": ["string", "null"],
@@ -16427,6 +16448,7 @@ const operationManifest = [
16427
16448
  "end_reason",
16428
16449
  "accepted_rule_version",
16429
16450
  "edited_on_accept",
16451
+ "accept_changes",
16430
16452
  "live",
16431
16453
  "delivery_paused",
16432
16454
  "activity",
@@ -16434,6 +16456,7 @@ const operationManifest = [
16434
16456
  "is_beneficiary",
16435
16457
  "granter",
16436
16458
  "beneficiary",
16459
+ "rule_name",
16437
16460
  "rule",
16438
16461
  "rule_id"
16439
16462
  ]
@@ -17869,6 +17892,11 @@ const operationManifest = [
17869
17892
  "description": "For the member asked, while pending: what accepting would share. Null otherwise. Whether it was accepted with changes is edited_on_accept on the share.",
17870
17893
  "type": ["string", "null"]
17871
17894
  },
17895
+ "accepted_english": {
17896
+ "default": null,
17897
+ "description": "When it was accepted with changes, for the member who asked and the member asked: the English that was accepted, beside english, which stays what was asked for. Null otherwise, and from a core-api release that predates the field. (The accepted English can match english when only the tree changed.)",
17898
+ "type": ["string", "null"]
17899
+ },
17872
17900
  "existing": {
17873
17901
  "description": "Present, as true, when the create carried an Idempotency-Key and you already had a pending request to this member asking exactly this (name, english, tree and message, naming the member the same way): that request is returned (200), and no second one is made or sent.",
17874
17902
  "type": "boolean",
@@ -17894,7 +17922,8 @@ const operationManifest = [
17894
17922
  "share_id",
17895
17923
  "message",
17896
17924
  "decline_reason",
17897
- "share_terms"
17925
+ "share_terms",
17926
+ "accepted_english"
17898
17927
  ]
17899
17928
  },
17900
17929
  "sdkName": "createEmailRuleRequest",
@@ -18078,6 +18107,11 @@ const operationManifest = [
18078
18107
  "share_terms": {
18079
18108
  "description": "For the member asked, while pending: what accepting would share. Null otherwise. Whether it was accepted with changes is edited_on_accept on the share.",
18080
18109
  "type": ["string", "null"]
18110
+ },
18111
+ "accepted_english": {
18112
+ "default": null,
18113
+ "description": "When it was accepted with changes, for the member who asked and the member asked: the English that was accepted, beside english, which stays what was asked for. Null otherwise, and from a core-api release that predates the field. (The accepted English can match english when only the tree changed.)",
18114
+ "type": ["string", "null"]
18081
18115
  }
18082
18116
  },
18083
18117
  "required": [
@@ -18099,7 +18133,8 @@ const operationManifest = [
18099
18133
  "share_id",
18100
18134
  "message",
18101
18135
  "decline_reason",
18102
- "share_terms"
18136
+ "share_terms",
18137
+ "accepted_english"
18103
18138
  ]
18104
18139
  },
18105
18140
  "sdkName": "declineEmailRuleRequest",
@@ -18111,7 +18146,7 @@ const operationManifest = [
18111
18146
  "binaryResponse": false,
18112
18147
  "bodyRequired": false,
18113
18148
  "command": "delete-email-rule",
18114
- "description": "Deletes a rule with its versions, its decisions and the access it granted. A share of it ends (end_reason rule_deleted), and the member who shared can still list what it handed over. The answer lists the shares it ended (ended_shares), and lists the unrevoked keys that still list it, which now read nothing through it (keys, other_keys; left out when they could not be read). The author or a reader of all the organization's mail may delete it; while it is shared, only the author or someone who manages members from the dashboard. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
18149
+ "description": "Deletes a rule: it is kept only as deleted, a rule nothing reads or changes again that grants no access and is listed only in its author's activity, and its decisions go with it. A share of it ends (end_reason rule_deleted), and the member who shared can still list what it handed over. The answer lists the shares it ended (ended_shares), and lists the unrevoked keys that still list it, which now read nothing through it (keys, other_keys; left out when they could not be read). The author or a reader of all the organization's mail may delete it; while it is shared, only the author or someone who manages members from the dashboard. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
18115
18150
  "hasJsonBody": false,
18116
18151
  "method": "DELETE",
18117
18152
  "operationId": "deleteEmailRule",
@@ -18176,7 +18211,7 @@ const operationManifest = [
18176
18211
  "binaryResponse": false,
18177
18212
  "bodyRequired": false,
18178
18213
  "command": "delete-email-rule-request",
18179
- "description": "Deletes a request you withdrew, for everyone who could see it. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
18214
+ "description": "Deletes a request you made that you withdrew or that was declined, for everyone who could see it. An accepted request stays: it is the record of who agreed to share. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
18180
18215
  "hasJsonBody": false,
18181
18216
  "method": "DELETE",
18182
18217
  "operationId": "deleteEmailRuleRequest",
@@ -18199,7 +18234,7 @@ const operationManifest = [
18199
18234
  "required": ["deleted"]
18200
18235
  },
18201
18236
  "sdkName": "deleteEmailRuleRequest",
18202
- "summary": "Delete a withdrawn rule request",
18237
+ "summary": "Delete a withdrawn or declined rule request",
18203
18238
  "tag": "Email Rules",
18204
18239
  "tagCommand": "email-rules"
18205
18240
  },
@@ -19342,6 +19377,11 @@ const operationManifest = [
19342
19377
  "share_terms": {
19343
19378
  "description": "For the member asked, while pending: what accepting would share. Null otherwise. Whether it was accepted with changes is edited_on_accept on the share.",
19344
19379
  "type": ["string", "null"]
19380
+ },
19381
+ "accepted_english": {
19382
+ "default": null,
19383
+ "description": "When it was accepted with changes, for the member who asked and the member asked: the English that was accepted, beside english, which stays what was asked for. Null otherwise, and from a core-api release that predates the field. (The accepted English can match english when only the tree changed.)",
19384
+ "type": ["string", "null"]
19345
19385
  }
19346
19386
  },
19347
19387
  "required": [
@@ -19363,7 +19403,8 @@ const operationManifest = [
19363
19403
  "share_id",
19364
19404
  "message",
19365
19405
  "decline_reason",
19366
- "share_terms"
19406
+ "share_terms",
19407
+ "accepted_english"
19367
19408
  ]
19368
19409
  },
19369
19410
  "sdkName": "getEmailRuleRequest",
@@ -19560,7 +19601,7 @@ const operationManifest = [
19560
19601
  "rule_deleted",
19561
19602
  null
19562
19603
  ],
19563
- "description": "Why it ended, once it has: stopped_by_granter, removed_by_beneficiary, stopped_by_admin or rule_deleted (the rule was deleted; the share keeps its record, and the rule is no longer shown). Null while it has not."
19604
+ "description": "Why it ended, once it has: stopped_by_granter, removed_by_beneficiary, stopped_by_admin or rule_deleted (the rule was deleted; the share keeps its record and rule_name, and the rule is no longer shown). Null while it has not."
19564
19605
  },
19565
19606
  "accepted_rule_version": {
19566
19607
  "type": "integer",
@@ -19570,6 +19611,22 @@ const operationManifest = [
19570
19611
  "type": "boolean",
19571
19612
  "description": "Whether the member who accepted changed the rule's English or tree before accepting (a new name does not count)."
19572
19613
  },
19614
+ "accept_changes": {
19615
+ "type": ["object", "null"],
19616
+ "properties": {
19617
+ "requested_english": {
19618
+ "type": "string",
19619
+ "description": "The English the member who asked asked for."
19620
+ },
19621
+ "accepted_english": {
19622
+ "type": "string",
19623
+ "description": "The English that was accepted. Can match requested_english when only the tree changed."
19624
+ }
19625
+ },
19626
+ "required": ["requested_english", "accepted_english"],
19627
+ "default": null,
19628
+ "description": "When edited_on_accept, for the member sharing their mail and the member it is shared with, live or not: what was asked for beside what was accepted. Null otherwise, and for anyone else."
19629
+ },
19573
19630
  "live": {
19574
19631
  "type": "boolean",
19575
19632
  "description": "Not ended, and both people are still members under the memberships that were recorded."
@@ -19613,7 +19670,7 @@ const operationManifest = [
19613
19670
  },
19614
19671
  "name": { "type": ["string", "null"] },
19615
19672
  "email": {
19616
- "description": "Sign-in email; null unless you can list member emails, this is you, or this is a live share with you.",
19673
+ "description": "Sign-in email; null unless you can list member emails, this is you, or the share is with you (live or not).",
19617
19674
  "type": ["string", "null"]
19618
19675
  },
19619
19676
  "active": {
@@ -19652,6 +19709,10 @@ const operationManifest = [
19652
19709
  "active"
19653
19710
  ]
19654
19711
  },
19712
+ "rule_name": {
19713
+ "description": "The rule's name, for anyone who can see the share. While the share is live, its current name; once it has ended, its name when it ended (a later rename is not shown), also after the rule is deleted. Null when the share is not live and no name was recorded as it ended (it ended before names were recorded, or one of its people is no longer a member), except for the member sharing their mail, who is told its current name.",
19714
+ "type": ["string", "null"]
19715
+ },
19655
19716
  "rule": {
19656
19717
  "type": ["object", "null"],
19657
19718
  "properties": {
@@ -19678,7 +19739,7 @@ const operationManifest = [
19678
19739
  "english",
19679
19740
  "updated_at"
19680
19741
  ],
19681
- "description": "The rule's name, state and description; null once the share is not live, except for the member sharing their mail."
19742
+ "description": "The rule's name, state and description; null once the share is not live, except for the member sharing their mail, and once the rule is deleted."
19682
19743
  },
19683
19744
  "rule_id": {
19684
19745
  "type": ["string", "null"],
@@ -19694,6 +19755,7 @@ const operationManifest = [
19694
19755
  "end_reason",
19695
19756
  "accepted_rule_version",
19696
19757
  "edited_on_accept",
19758
+ "accept_changes",
19697
19759
  "live",
19698
19760
  "delivery_paused",
19699
19761
  "activity",
@@ -19701,6 +19763,7 @@ const operationManifest = [
19701
19763
  "is_beneficiary",
19702
19764
  "granter",
19703
19765
  "beneficiary",
19766
+ "rule_name",
19704
19767
  "rule",
19705
19768
  "rule_id"
19706
19769
  ]
@@ -20248,6 +20311,11 @@ const operationManifest = [
20248
20311
  "share_terms": {
20249
20312
  "description": "For the member asked, while pending: what accepting would share. Null otherwise. Whether it was accepted with changes is edited_on_accept on the share.",
20250
20313
  "type": ["string", "null"]
20314
+ },
20315
+ "accepted_english": {
20316
+ "default": null,
20317
+ "description": "When it was accepted with changes, for the member who asked and the member asked: the English that was accepted, beside english, which stays what was asked for. Null otherwise, and from a core-api release that predates the field. (The accepted English can match english when only the tree changed.)",
20318
+ "type": ["string", "null"]
20251
20319
  }
20252
20320
  },
20253
20321
  "required": [
@@ -20269,7 +20337,8 @@ const operationManifest = [
20269
20337
  "share_id",
20270
20338
  "message",
20271
20339
  "decline_reason",
20272
- "share_terms"
20340
+ "share_terms",
20341
+ "accepted_english"
20273
20342
  ]
20274
20343
  }
20275
20344
  },
@@ -20491,7 +20560,7 @@ const operationManifest = [
20491
20560
  "type": ["string", "null"]
20492
20561
  },
20493
20562
  "email": {
20494
- "description": "Sign-in email; null unless you can list member emails or this is you.",
20563
+ "description": "Sign-in email: a rule over your mail always names who wrote it. Null only when they have none.",
20495
20564
  "type": ["string", "null"]
20496
20565
  }
20497
20566
  },
@@ -21201,7 +21270,7 @@ const operationManifest = [
21201
21270
  "rule_deleted",
21202
21271
  null
21203
21272
  ],
21204
- "description": "Why it ended, once it has: stopped_by_granter, removed_by_beneficiary, stopped_by_admin or rule_deleted (the rule was deleted; the share keeps its record, and the rule is no longer shown). Null while it has not."
21273
+ "description": "Why it ended, once it has: stopped_by_granter, removed_by_beneficiary, stopped_by_admin or rule_deleted (the rule was deleted; the share keeps its record and rule_name, and the rule is no longer shown). Null while it has not."
21205
21274
  },
21206
21275
  "accepted_rule_version": {
21207
21276
  "type": "integer",
@@ -21211,6 +21280,22 @@ const operationManifest = [
21211
21280
  "type": "boolean",
21212
21281
  "description": "Whether the member who accepted changed the rule's English or tree before accepting (a new name does not count)."
21213
21282
  },
21283
+ "accept_changes": {
21284
+ "type": ["object", "null"],
21285
+ "properties": {
21286
+ "requested_english": {
21287
+ "type": "string",
21288
+ "description": "The English the member who asked asked for."
21289
+ },
21290
+ "accepted_english": {
21291
+ "type": "string",
21292
+ "description": "The English that was accepted. Can match requested_english when only the tree changed."
21293
+ }
21294
+ },
21295
+ "required": ["requested_english", "accepted_english"],
21296
+ "default": null,
21297
+ "description": "When edited_on_accept, for the member sharing their mail and the member it is shared with, live or not: what was asked for beside what was accepted. Null otherwise, and for anyone else."
21298
+ },
21214
21299
  "live": {
21215
21300
  "type": "boolean",
21216
21301
  "description": "Not ended, and both people are still members under the memberships that were recorded."
@@ -21254,7 +21339,7 @@ const operationManifest = [
21254
21339
  },
21255
21340
  "name": { "type": ["string", "null"] },
21256
21341
  "email": {
21257
- "description": "Sign-in email; null unless you can list member emails, this is you, or this is a live share with you.",
21342
+ "description": "Sign-in email; null unless you can list member emails, this is you, or the share is with you (live or not).",
21258
21343
  "type": ["string", "null"]
21259
21344
  },
21260
21345
  "active": {
@@ -21293,6 +21378,10 @@ const operationManifest = [
21293
21378
  "active"
21294
21379
  ]
21295
21380
  },
21381
+ "rule_name": {
21382
+ "description": "The rule's name, for anyone who can see the share. While the share is live, its current name; once it has ended, its name when it ended (a later rename is not shown), also after the rule is deleted. Null when the share is not live and no name was recorded as it ended (it ended before names were recorded, or one of its people is no longer a member), except for the member sharing their mail, who is told its current name.",
21383
+ "type": ["string", "null"]
21384
+ },
21296
21385
  "rule": {
21297
21386
  "type": ["object", "null"],
21298
21387
  "properties": {
@@ -21319,7 +21408,7 @@ const operationManifest = [
21319
21408
  "english",
21320
21409
  "updated_at"
21321
21410
  ],
21322
- "description": "The rule's name, state and description; null once the share is not live, except for the member sharing their mail."
21411
+ "description": "The rule's name, state and description; null once the share is not live, except for the member sharing their mail, and once the rule is deleted."
21323
21412
  },
21324
21413
  "rule_id": {
21325
21414
  "type": ["string", "null"],
@@ -21335,6 +21424,7 @@ const operationManifest = [
21335
21424
  "end_reason",
21336
21425
  "accepted_rule_version",
21337
21426
  "edited_on_accept",
21427
+ "accept_changes",
21338
21428
  "live",
21339
21429
  "delivery_paused",
21340
21430
  "activity",
@@ -21342,6 +21432,7 @@ const operationManifest = [
21342
21432
  "is_beneficiary",
21343
21433
  "granter",
21344
21434
  "beneficiary",
21435
+ "rule_name",
21345
21436
  "rule",
21346
21437
  "rule_id"
21347
21438
  ]
@@ -21901,7 +21992,7 @@ const operationManifest = [
21901
21992
  "rule_deleted",
21902
21993
  null
21903
21994
  ],
21904
- "description": "Why it ended, once it has: stopped_by_granter, removed_by_beneficiary, stopped_by_admin or rule_deleted (the rule was deleted; the share keeps its record, and the rule is no longer shown). Null while it has not."
21995
+ "description": "Why it ended, once it has: stopped_by_granter, removed_by_beneficiary, stopped_by_admin or rule_deleted (the rule was deleted; the share keeps its record and rule_name, and the rule is no longer shown). Null while it has not."
21905
21996
  },
21906
21997
  "accepted_rule_version": {
21907
21998
  "type": "integer",
@@ -21911,6 +22002,22 @@ const operationManifest = [
21911
22002
  "type": "boolean",
21912
22003
  "description": "Whether the member who accepted changed the rule's English or tree before accepting (a new name does not count)."
21913
22004
  },
22005
+ "accept_changes": {
22006
+ "type": ["object", "null"],
22007
+ "properties": {
22008
+ "requested_english": {
22009
+ "type": "string",
22010
+ "description": "The English the member who asked asked for."
22011
+ },
22012
+ "accepted_english": {
22013
+ "type": "string",
22014
+ "description": "The English that was accepted. Can match requested_english when only the tree changed."
22015
+ }
22016
+ },
22017
+ "required": ["requested_english", "accepted_english"],
22018
+ "default": null,
22019
+ "description": "When edited_on_accept, for the member sharing their mail and the member it is shared with, live or not: what was asked for beside what was accepted. Null otherwise, and for anyone else."
22020
+ },
21914
22021
  "live": {
21915
22022
  "type": "boolean",
21916
22023
  "description": "Not ended, and both people are still members under the memberships that were recorded."
@@ -21954,7 +22061,7 @@ const operationManifest = [
21954
22061
  },
21955
22062
  "name": { "type": ["string", "null"] },
21956
22063
  "email": {
21957
- "description": "Sign-in email; null unless you can list member emails, this is you, or this is a live share with you.",
22064
+ "description": "Sign-in email; null unless you can list member emails, this is you, or the share is with you (live or not).",
21958
22065
  "type": ["string", "null"]
21959
22066
  },
21960
22067
  "active": {
@@ -21993,6 +22100,10 @@ const operationManifest = [
21993
22100
  "active"
21994
22101
  ]
21995
22102
  },
22103
+ "rule_name": {
22104
+ "description": "The rule's name, for anyone who can see the share. While the share is live, its current name; once it has ended, its name when it ended (a later rename is not shown), also after the rule is deleted. Null when the share is not live and no name was recorded as it ended (it ended before names were recorded, or one of its people is no longer a member), except for the member sharing their mail, who is told its current name.",
22105
+ "type": ["string", "null"]
22106
+ },
21996
22107
  "rule": {
21997
22108
  "type": ["object", "null"],
21998
22109
  "properties": {
@@ -22019,7 +22130,7 @@ const operationManifest = [
22019
22130
  "english",
22020
22131
  "updated_at"
22021
22132
  ],
22022
- "description": "The rule's name, state and description; null once the share is not live, except for the member sharing their mail."
22133
+ "description": "The rule's name, state and description; null once the share is not live, except for the member sharing their mail, and once the rule is deleted."
22023
22134
  },
22024
22135
  "rule_id": {
22025
22136
  "type": ["string", "null"],
@@ -22035,6 +22146,7 @@ const operationManifest = [
22035
22146
  "end_reason",
22036
22147
  "accepted_rule_version",
22037
22148
  "edited_on_accept",
22149
+ "accept_changes",
22038
22150
  "live",
22039
22151
  "delivery_paused",
22040
22152
  "activity",
@@ -22042,6 +22154,7 @@ const operationManifest = [
22042
22154
  "is_beneficiary",
22043
22155
  "granter",
22044
22156
  "beneficiary",
22157
+ "rule_name",
22045
22158
  "rule",
22046
22159
  "rule_id"
22047
22160
  ]
@@ -24743,6 +24856,11 @@ const operationManifest = [
24743
24856
  "share_terms": {
24744
24857
  "description": "For the member asked, while pending: what accepting would share. Null otherwise. Whether it was accepted with changes is edited_on_accept on the share.",
24745
24858
  "type": ["string", "null"]
24859
+ },
24860
+ "accepted_english": {
24861
+ "default": null,
24862
+ "description": "When it was accepted with changes, for the member who asked and the member asked: the English that was accepted, beside english, which stays what was asked for. Null otherwise, and from a core-api release that predates the field. (The accepted English can match english when only the tree changed.)",
24863
+ "type": ["string", "null"]
24746
24864
  }
24747
24865
  },
24748
24866
  "required": [
@@ -24764,7 +24882,8 @@ const operationManifest = [
24764
24882
  "share_id",
24765
24883
  "message",
24766
24884
  "decline_reason",
24767
- "share_terms"
24885
+ "share_terms",
24886
+ "accepted_english"
24768
24887
  ]
24769
24888
  },
24770
24889
  "sdkName": "withdrawEmailRuleRequest",
@@ -26992,7 +27111,7 @@ const operationManifest = [
26992
27111
  "type": "string"
26993
27112
  },
26994
27113
  {
26995
- "description": "Domain ids, comma-separated or with the key repeated, at most 50: only mail received at one of them. Only narrows: an id you cannot read, or of another organization, matches no mail and is not reported as unknown. `meta.domain_ids` echoes the list as given.",
27114
+ "description": "Domain ids, comma-separated or with the key repeated, at most 50: only mail received at one of them. A domain is matched by name within your organization: mail stored under an earlier record of a domain that was deleted and added again is included. Only narrows: an id you cannot read, or of another organization, matches no mail and is not reported as unknown. `meta.domain_ids` echoes the list as given.",
26996
27115
  "enum": null,
26997
27116
  "name": "domain_ids",
26998
27117
  "required": false,
@@ -27778,7 +27897,7 @@ const operationManifest = [
27778
27897
  "type": "string"
27779
27898
  },
27780
27899
  {
27781
- "description": "Domain ids, comma-separated or with the key repeated, at most 50: received mail at one of them, and with `direction` `outbound` or `any`, sent mail from an address at one of them. Only narrows: an id you cannot read, or of another organization, matches no mail and is not reported as unknown. `meta.domain_ids` echoes the list as given.",
27900
+ "description": "Domain ids, comma-separated or with the key repeated, at most 50: received mail at one of them, and with `direction` `outbound` or `any`, sent mail from an address at one of them. A domain is matched by name within your organization: mail stored under an earlier record of a domain that was deleted and added again is included. Only narrows: an id you cannot read, or of another organization, matches no mail and is not reported as unknown. `meta.domain_ids` echoes the list as given.",
27782
27901
  "enum": null,
27783
27902
  "name": "domain_ids",
27784
27903
  "required": false,
@@ -43887,7 +44006,7 @@ const operationManifest = [
43887
44006
  },
43888
44007
  "minItems": 1,
43889
44008
  "maxItems": 50,
43890
- "description": "Domain ids, at most 50: only received mail at one of them, tested on the ranked candidates, so a page can hold fewer than `limit` results. Received mail only: refused with corpus `outbound`, and the default corpus becomes `inbound`. Only narrows: an id you cannot read, or of another organization, matches no mail and is not reported as unknown. `meta.domain_ids` echoes the list as given."
44009
+ "description": "Domain ids, at most 50: only received mail at one of them, tested on the ranked candidates, so a page can hold fewer than `limit` results. Received mail only: refused with corpus `outbound`, and the default corpus becomes `inbound`. A domain is matched by name within your organization: mail stored under an earlier record of a domain that was deleted and added again is included. Only narrows: an id you cannot read, or of another organization, matches no mail and is not reported as unknown. `meta.domain_ids` echoes the list as given."
43891
44010
  }
43892
44011
  }
43893
44012
  },
@@ -54288,9 +54407,10 @@ function routeTable() {
54288
54407
  }
54289
54408
  function commandId(operation) {
54290
54409
  if (operation.access === "session") return void 0;
54291
- const preferred = PREFERRED_COMMANDS[operation.sdkName];
54410
+ const preferredName = PREFERRED_COMMANDS[operation.sdkName];
54411
+ const preferred = preferredName ? canonicalCommandId(preferredName) : void 0;
54292
54412
  if (preferred && knownCommands.has(preferred)) return preferred;
54293
- const generated = `${operation.tagCommand}:${operation.command}`;
54413
+ const generated = canonicalCommandId(`${operation.tagCommand}:${operation.command}`);
54294
54414
  const id = shortNames.get(generated) ?? generated;
54295
54415
  return knownCommands.has(id) ? id : void 0;
54296
54416
  }
@@ -54535,7 +54655,7 @@ const TOKEN_SKEW_MS = 6e4;
54535
54655
  /** Cached tokens for organizations other than the current one. */
54536
54656
  const MAX_CACHED_ORG_TOKENS = 20;
54537
54657
  const USER_LOGIN_EXPIRED_MESSAGE = "Saved Primitive CLI login expired or was revoked. Run `primitive login` to sign in again.";
54538
- const NO_CURRENT_ORG_MESSAGE = "No organization is selected for this login. Run `primitive orgs` to see where you can use the CLI, then `primitive org use <org>`.";
54658
+ const NO_CURRENT_ORG_MESSAGE = "No organization is selected for this login. Run `primitive org list` to see where you can use the CLI, then `primitive org use <org>`.";
54539
54659
  /**
54540
54660
  * The CLI login and the organization list report a person's stored role:
54541
54661
  * the largest built-in role (owner, admin or member) their access fully
@@ -54549,13 +54669,18 @@ function isBuiltInRoleKey(role) {
54549
54669
  }
54550
54670
  /** What the role key `restricted` stands for. */
54551
54671
  const RESTRICTED_ROLE_NOTE = "a template or custom role that does not fully include member, because it lacks some member permission (as Operator does) or reaches only some mailboxes";
54552
- /** A stored role key, labelled for what it is: "built-in role admin", "role restricted". */
54672
+ /** The built-in role /whoami reports for a stored role key. Display only. */
54673
+ function displayedRoleKey(role) {
54674
+ return role === "restricted" ? "member" : role;
54675
+ }
54676
+ /** A stored role key, using the same built-in name as /whoami. */
54553
54677
  function roleKeyLabel(role) {
54554
- return isBuiltInRoleKey(role) ? `built-in role ${role}` : `role ${role}`;
54678
+ const displayed = displayedRoleKey(role);
54679
+ return isBuiltInRoleKey(displayed) ? `built-in role ${displayed}` : `role ${displayed}`;
54555
54680
  }
54556
54681
  /** A stored role key for a sentence, saying what `restricted` stands for. */
54557
54682
  function roleKeyText(role) {
54558
- return role === "restricted" ? `role restricted (${RESTRICTED_ROLE_NOTE})` : roleKeyLabel(role);
54683
+ return role === "restricted" ? `built-in role member (${RESTRICTED_ROLE_NOTE}; this label does not grant member permissions)` : roleKeyLabel(role);
54559
54684
  }
54560
54685
  const REFUSAL_FALLBACK_MESSAGES = {
54561
54686
  not_a_member: "You are not a member of this organization.",
@@ -54915,7 +55040,7 @@ function matchOrg(selection, orgs) {
54915
55040
  const byName = orgs.filter((org) => (org.name ?? "").trim().toLowerCase() === wanted.toLowerCase());
54916
55041
  if (byName.length === 1) return byName[0];
54917
55042
  if (byName.length > 1) throw new Errors.CLIError(`More than one organization is named ${JSON.stringify(wanted)}. Use its id: ${byName.map((org) => org.id).join(", ")}.`, { exit: 1 });
54918
- throw new Errors.CLIError(`No organization matches ${JSON.stringify(wanted)}. Run \`primitive orgs\` to list yours.`, { exit: 1 });
55043
+ throw new Errors.CLIError(`No organization matches ${JSON.stringify(wanted)}. Run \`primitive org list\` to list yours.`, { exit: 1 });
54919
55044
  }
54920
55045
  /** Resolve an `--org` value to an organization id, listing orgs only for a name. */
54921
55046
  async function resolveOrgSelection(params) {
@@ -55725,8 +55850,8 @@ function pickSamples(samples, pick, source) {
55725
55850
  return pickNumbers(pick, samples.length, source).map((n) => samples[n - 1]);
55726
55851
  }
55727
55852
  /** The samples file flags: replace (create and update), add (update), and test. */
55728
- const SAMPLES_FILE_FLAG = "expectation-samples-file";
55729
- const ADD_SAMPLES_FILE_FLAG = "add-expectation-samples-file";
55853
+ const SAMPLES_FILE_FLAG = "samples-file";
55854
+ const ADD_SAMPLES_FILE_FLAG = "add-samples-file";
55730
55855
  const EXPECT_SAMPLES_FILE_FLAG = "expect-samples-file";
55731
55856
  const PICK_FLAG = "pick";
55732
55857
  /** The samples a samples file flag names, only those --pick chooses if given. */
@@ -55742,8 +55867,8 @@ function givenSamplesFlag(flags, names) {
55742
55867
  return given;
55743
55868
  }
55744
55869
  /**
55745
- * The body fields a samples file sets on create-email-rule and
55746
- * update-email-rule: expectation_samples (on update it replaces them) or, on
55870
+ * The body fields a samples file sets on create and
55871
+ * update: expectation_samples (on update it replaces them) or, on
55747
55872
  * update, add_expectation_samples. With --pick, only the samples it names.
55748
55873
  * Each is sent as savedSample gives it, without a look-alike's group.
55749
55874
  */
@@ -55754,16 +55879,16 @@ function samplesBodyFields(canAdd) {
55754
55879
  if (flag === null) return [];
55755
55880
  const path = flags[flag];
55756
55881
  const samples = readSamplesFile(path, flag, flags[PICK_FLAG]);
55757
- if (samples.length === 0 && !(canAdd && flag === "expectation-samples-file")) throw usageError$3(`--${flag} ${path} holds no samples.`);
55882
+ if (samples.length === 0 && !(canAdd && flag === "samples-file")) throw usageError$3(`--${flag} ${path} holds no samples.`);
55758
55883
  return [{
55759
55884
  flag: `--${flag}`,
55760
- property: flag === "add-expectation-samples-file" ? "add_expectation_samples" : "expectation_samples",
55885
+ property: flag === "add-samples-file" ? "add_expectation_samples" : "expectation_samples",
55761
55886
  value: samples.map(savedSample)
55762
55887
  }];
55763
55888
  };
55764
55889
  }
55765
55890
  /**
55766
- * The samples test-email-rule expects, from --expect-samples-file (only
55891
+ * The samples test expects, from --expect-samples-file (only
55767
55892
  * those --pick chooses if given), or null without the flag. They go in
55768
55893
  * expect.samples, each look-alike keeping its group, which the answer counts
55769
55894
  * samples by.
@@ -55838,7 +55963,7 @@ function lookAlikesReport(data) {
55838
55963
  // src/oclif/email-rule-scope-flags.ts
55839
55964
  const SCOPE_ADDRESS_FLAG = "scope-address";
55840
55965
  const SCOPE_DOMAIN_FLAG = "scope-domain";
55841
- const SCOPE_FLAG_NOTE = `Sends evaluation_scope selected unless --evaluation-scope or the body gives a scope. --${SCOPE_ADDRESS_FLAG} and --${SCOPE_DOMAIN_FLAG} set scope_selection as a whole, over any in --raw-body or --body-file, and a list not given is sent empty.`;
55966
+ const SCOPE_FLAG_NOTE = `Sends evaluation_scope selected unless --scope or the body gives a scope. --${SCOPE_ADDRESS_FLAG} and --${SCOPE_DOMAIN_FLAG} set scope_selection as a whole, over any in --raw-body or --body-file, and a list not given is sent empty.`;
55842
55967
  /**
55843
55968
  * The two flags, made anew for each command. Each value is its own flag
55844
55969
  * (`--scope-address a --scope-address b`) or a comma list, so a value after
@@ -55883,7 +56008,7 @@ function scopeList(values, flag) {
55883
56008
  /**
55884
56009
  * scope_selection from --scope-address and --scope-domain, or nothing when
55885
56010
  * neither was given, with evaluation_scope selected when neither
55886
- * --evaluation-scope nor `base` (the body --raw-body or --body-file gave)
56011
+ * --scope nor `base` (the body --raw-body or --body-file gave)
55887
56012
  * gives a scope.
55888
56013
  */
55889
56014
  function scopeSelectionBodyFields(flags, base) {
@@ -55900,7 +56025,7 @@ function scopeSelectionBodyFields(flags, base) {
55900
56025
  }
55901
56026
  }];
55902
56027
  const baseScope = base !== null && typeof base === "object" && !Array.isArray(base) ? base.evaluation_scope : void 0;
55903
- if (flags["evaluation-scope"] === void 0 && baseScope === void 0) fields.push({
56028
+ if (flags.scope === void 0 && baseScope === void 0) fields.push({
55904
56029
  flag: given,
55905
56030
  property: "evaluation_scope",
55906
56031
  value: "selected"
@@ -55947,11 +56072,11 @@ function parseEmailIdList(values, flag) {
55947
56072
  */
55948
56073
  function checkExpectations(value, label) {
55949
56074
  if (!isRecord$4(value)) throw usageError$1(`${label} must hold a JSON object such as {"match": ["<email-id>"], "no_match": ["<email-id>"]}.`);
55950
- if ("samples" in value) throw usageError$1(`${label} takes emails by id only; give made-up emails with ${label.startsWith("--expectations-file") ? "--expectation-samples-file" : "--expect-samples-file"}.`);
56075
+ if ("samples" in value) throw usageError$1(`${label} takes emails by id only; give made-up emails with ${label.startsWith("--expectations-file") ? "--samples-file" : "--expect-samples-file"}.`);
55951
56076
  return value;
55952
56077
  }
55953
56078
  /**
55954
- * `expect` for test-email-rule, from --expect-file or the id flags, with the
56079
+ * `expect` for test, from --expect-file or the id flags, with the
55955
56080
  * made-up emails --expect-samples-file holds in expect.samples.
55956
56081
  */
55957
56082
  function expectBodyFields(flags) {
@@ -55984,10 +56109,10 @@ function expectBodyFields(flags) {
55984
56109
  value: expect
55985
56110
  }];
55986
56111
  }
55987
- /** test-email-rule's flag that tests the emails an earlier answer tested. */
56112
+ /** test's flag that tests the emails an earlier answer tested. */
55988
56113
  const SAME_EMAILS_FLAG = "same-emails-as";
55989
56114
  /**
55990
- * `email_ids` for test-email-rule, from --same-emails-as: every email an
56115
+ * `email_ids` for test, from --same-emails-as: every email an
55991
56116
  * earlier test's answer, saved as it printed it, tested (its results'
55992
56117
  * email_id), so a second tree is tested over the same mail rather than over
55993
56118
  * whatever is newest by then.
@@ -55998,7 +56123,7 @@ function sameEmailsBodyFields(flags) {
55998
56123
  const saved = readJsonFileFlag(file, `--${SAME_EMAILS_FLAG}`);
55999
56124
  const answer = isRecord$4(saved) && isRecord$4(saved.data) ? saved.data : saved;
56000
56125
  const results = isRecord$4(answer) && Array.isArray(answer.results) ? answer.results : null;
56001
- if (!results) throw usageError$1(`--${SAME_EMAILS_FLAG} ${file} is not a saved test-email-rule answer: it has no results. Save one with test-email-rule --json > answer.json.`);
56126
+ if (!results) throw usageError$1(`--${SAME_EMAILS_FLAG} ${file} is not a saved test answer: it has no results. Save one with primitive email-rules test --json > answer.json.`);
56002
56127
  const ids = [...new Set(results.flatMap((result) => isRecord$4(result) && typeof result.email_id === "string" && isEmailId(result.email_id) ? [result.email_id.toLowerCase()] : []))];
56003
56128
  if (ids.length === 0) throw usageError$1(`--${SAME_EMAILS_FLAG} ${file} names no emails.`);
56004
56129
  return [{
@@ -56008,7 +56133,7 @@ function sameEmailsBodyFields(flags) {
56008
56133
  }];
56009
56134
  }
56010
56135
  /**
56011
- * `expectations` for create-email-rule and update-email-rule, from
56136
+ * `expectations` for create and update, from
56012
56137
  * --expectations-file. A file holding `null` removes the saved expectations
56013
56138
  * (the API takes that on update only).
56014
56139
  */
@@ -56326,7 +56451,7 @@ function windowLine(data, tested) {
56326
56451
  if (!window || !oldest || !newest) return [];
56327
56452
  return [`Tested ${plural$1(tested, "email", "emails")} received ${minuteUtc$1(oldest)} to ${minuteUtc$1(newest)}.`];
56328
56453
  }
56329
- /** The stderr report and exit code of a test-email-rule answer. */
56454
+ /** The stderr report and exit code of a test answer. */
56330
56455
  function testEmailRuleReport(data) {
56331
56456
  if (!isRecord$4(data)) return { lines: [] };
56332
56457
  const name = sampleNamer();
@@ -56370,7 +56495,7 @@ const EMAIL_RULE_OPERATION_EXTENSIONS = {
56370
56495
  }),
56371
56496
  [EXPECT_SAMPLES_FILE_FLAG]: Flags.string({ description: `${SAMPLES_FILE_SHAPE} Sets expect.samples, beside any emails by id; the answer judges each in expectations.samples, and the report names each sample N, its place from 1 among those sent. Like any expect, it replaces a saved rule's own expectations and samples for this test. ${EXPECTATION_FLAG_NOTE}` }),
56372
56497
  [PICK_FLAG]: Flags.string({ description: pickFlagHelp([EXPECT_SAMPLES_FILE_FLAG]) }),
56373
- [SAME_EMAILS_FLAG]: Flags.string({ description: "Test the same emails as an earlier test: a file holding what test-email-rule --json printed. Sets email_ids to its results' email_id, so two trees are tested over the same mail." }),
56498
+ [SAME_EMAILS_FLAG]: Flags.string({ description: "Test the same emails as an earlier test: a file holding what primitive email-rules test --json printed. Sets email_ids to its results' email_id, so two trees are tested over the same mail." }),
56374
56499
  ...scopeSelectionFlags()
56375
56500
  },
56376
56501
  bodyFields: (flags, base) => {
@@ -56391,8 +56516,8 @@ const EMAIL_RULE_OPERATION_EXTENSIONS = {
56391
56516
  },
56392
56517
  createEmailRule: {
56393
56518
  flags: {
56394
- "expectations-file": Flags.string({ description: "A JSON file holding the emails the rule must match and must not, such as {\"match\": [\"<email-id>\"], \"no_match\": [\"<email-id>\"]}. Sets expectations, over any in --body-file or --raw-body. A create judges them before saving only for a do_not_share rule created active, in expectations_check (passed, failed, undecided); test-email-rule --rule-id judges them otherwise." }),
56395
- [SAMPLES_FILE_FLAG]: Flags.string({ description: `${SAMPLES_FILE_SHAPE} Sets expectation_samples, over any in --body-file or --raw-body. A create judges them only for a do_not_share rule created active; test-email-rule --rule-id does otherwise.` }),
56519
+ "expectations-file": Flags.string({ description: "A JSON file holding the emails the rule must match and must not, such as {\"match\": [\"<email-id>\"], \"no_match\": [\"<email-id>\"]}. Sets expectations, over any in --body-file or --raw-body. A create judges them before saving only for a do_not_share rule created active, in expectations_check (passed, failed, undecided); test --rule-id judges them otherwise." }),
56520
+ [SAMPLES_FILE_FLAG]: Flags.string({ description: `${SAMPLES_FILE_SHAPE} Sets expectation_samples, over any in --body-file or --raw-body. A create judges them only for a do_not_share rule created active; test --rule-id does otherwise.` }),
56396
56521
  [PICK_FLAG]: Flags.string({ description: pickFlagHelp([SAMPLES_FILE_FLAG]) }),
56397
56522
  ...scopeSelectionFlags()
56398
56523
  },
@@ -56575,7 +56700,7 @@ function ruleListLines(data, all) {
56575
56700
  ])]);
56576
56701
  }
56577
56702
  /**
56578
- * Why a list-email-rules request was refused, in the words a person can act
56703
+ * Why a list request was refused, in the words a person can act
56579
56704
  * on, or undefined to keep the generic hint for the error code.
56580
56705
  */
56581
56706
  function listEmailRulesErrorHint(code, payload, flags = {}) {
@@ -56592,11 +56717,11 @@ function listEmailRulesErrorHint(code, payload, flags = {}) {
56592
56717
  default: return;
56593
56718
  }
56594
56719
  }
56595
- /** The empty-list note of list-email-rules, by whether --all was given. */
56720
+ /** The empty-list note of list, by whether --all was given. */
56596
56721
  function emptyRuleListHint(all) {
56597
56722
  return all ? "(no results) No rules in the organization match these filters." : "(no results) No rules you can see match. Owners and admins can list every rule in the organization with --all.";
56598
56723
  }
56599
- /** The API's page cap and default page size on list-email-rules. */
56724
+ /** The API's page cap and default page size on list. */
56600
56725
  const RULE_LIST_PAGE_MAX = 100;
56601
56726
  const RULE_LIST_DEFAULT_LIMIT = 50;
56602
56727
  const EMAIL_RULE_LISTING_EXTENSIONS = {
@@ -56748,7 +56873,7 @@ const GRANT_POINTER = "`primitive whoami --json --grant` shows which mail it rea
56748
56873
  * holder, which its holder checks as a share.
56749
56874
  */
56750
56875
  function rulesSentence(rules) {
56751
- return `A rule grants an email it matches when the email is evaluated, shortly after it arrives, while the rule is active, and the key reads that mail only while the rule stays active. Each id (${named(rules)}) is an email rule or a rule shared with the key's holder: a rule's author, signed in as themselves, can check it with \`primitive email-rules get-email-rule --id <id>\`, and a share's holder with \`primitive email-rules get-email-rule-share --id <id>\`.`;
56876
+ return `A rule grants an email it matches when the email is evaluated, shortly after it arrives, while the rule is active, and the key reads that mail only while the rule stays active. Each id (${named(rules)}) is an email rule or a rule shared with the key's holder: a rule's author, signed in as themselves, can check it with \`primitive email-rules get --id <id>\`, and a share's holder with \`primitive email-rules get-share --id <id>\`.`;
56752
56877
  }
56753
56878
  function holderOf(kind) {
56754
56879
  if (kind === "org_key" || kind === "function_key") return "key";
@@ -56762,7 +56887,7 @@ const NOUN = {
56762
56887
  unknown: "This credential"
56763
56888
  };
56764
56889
  /** A person also reads mail through rules colleagues shared with them, which sit beside the grant, not in it. */
56765
- const SHARED = "mail from email rules colleagues shared with you (`primitive email-rules list-email-rule-shares` lists them)";
56890
+ const SHARED = "mail from email rules colleagues shared with you (`primitive email-rules list-shares` lists them)";
56766
56891
  /** A connection key also reads member mailboxes its owner gave it, asked for by name. */
56767
56892
  const GIVEN = "any member mailbox its owner gave it (pass that mailbox with --recipient)";
56768
56893
  /** What the credential reads, as sentences for the hint, or null when it reads every mailbox. */
@@ -57041,6 +57166,13 @@ const FREE_TEXT_ALIASES = /* @__PURE__ */ new Set([
57041
57166
  "keywords",
57042
57167
  "filter"
57043
57168
  ]);
57169
+ const FLAG_REPAIRS = /* @__PURE__ */ new Map([
57170
+ ["evaluation-scope", ["scope"]],
57171
+ ["expectation-samples-file", ["samples-file"]],
57172
+ ["add-expectation-samples-file", ["add-samples-file"]],
57173
+ ["samples-file", ["expect-samples-file"]],
57174
+ ["expect-samples-file", ["samples-file"]]
57175
+ ]);
57044
57176
  function editDistance(left, right) {
57045
57177
  let previous = Array.from({ length: right.length + 1 }, (_, i) => i);
57046
57178
  for (let i = 0; i < left.length; i += 1) {
@@ -57057,6 +57189,9 @@ function editDistance(left, right) {
57057
57189
  function suggestFlag(unknown, valid) {
57058
57190
  const name = unknown.replace(/^-+/, "").split("=")[0]?.toLowerCase() ?? "";
57059
57191
  if (!name) return null;
57192
+ if (valid.includes(name)) return name;
57193
+ const repair = FLAG_REPAIRS.get(name)?.find((flag) => valid.includes(flag));
57194
+ if (repair) return repair;
57060
57195
  if (FREE_TEXT_ALIASES.has(name) && valid.includes("q")) return "q";
57061
57196
  let best = null;
57062
57197
  let bestDistance = Number.POSITIVE_INFINITY;
@@ -57078,7 +57213,7 @@ function withFlagSuggestion(error, valid) {
57078
57213
  if (!(error instanceof Error) || !error.message.startsWith("Nonexistent flag") || !Array.isArray(flags)) return error;
57079
57214
  const hints = flags.filter((flag) => typeof flag === "string").flatMap((flag) => {
57080
57215
  const match = suggestFlag(flag, valid);
57081
- return match ? [`${flag.split("=")[0]} is not a flag here; did you mean --${match}${match === "q" ? " (the free-text query)" : ""}?`] : [];
57216
+ return match ? [`${flag.split("=")[0]} is not a flag here; did you mean --${match}${match === "q" ? " (the free-text query)" : match === "expect-samples-file" ? " (one-off test samples)" : match === "samples-file" ? " (samples saved on the rule)" : ""}?`] : [];
57082
57217
  });
57083
57218
  if (hints.length === 0) return error;
57084
57219
  const [first, ...rest] = error.message.split("\n");
@@ -57716,7 +57851,7 @@ const MEMBER_INVITE_READS_ALL_MAIL = "In this organization every Member reads al
57716
57851
  /** The same refusal for any role above Member, which is assigning a role: the same advice, without the mail clause. */
57717
57852
  const ROLE_INVITE_NEEDS_DASHBOARD = "Inviting someone with a role other than Member or none is assigning that role, and only an invitation sent from the dashboard itself, by someone who can assign roles, can do it; a CLI request cannot, even with a step-up token. From the CLI you can invite them with --role none, where the organization can give limited roles, and once they have joined give them the role with `primitive roles-and-members set-member-role`, which needs roles:assign and an approval in the browser. Or invite them from the dashboard's Roles settings.";
57718
57853
  /**
57719
- * The hint for a refused invite-organization-member, or undefined when it is
57854
+ * The hint for a refused invite-member, or undefined when it is
57720
57855
  * not that refusal. That one carries no details; a refusal for a grant that
57721
57856
  * lacks a permission names it in its details, and is left to its own hint.
57722
57857
  */
@@ -59321,7 +59456,7 @@ function savedConnectedProfiles(configDir, exclude) {
59321
59456
  */
59322
59457
  async function otherProfiles(configDir, session, current) {
59323
59458
  if (session) try {
59324
- const { connectedProfilesForSession } = await import("./machine-session-Cvo9BqYB.js").then((n) => n.s);
59459
+ const { connectedProfilesForSession } = await import("./machine-session-cfgMKQ_U.js").then((n) => n.s);
59325
59460
  return {
59326
59461
  inSession: true,
59327
59462
  profiles: connectedProfilesForSession(configDir, session, current)
@@ -59445,7 +59580,7 @@ function sentListTable(rows) {
59445
59580
  const line = (row) => row.map((cell, i) => i === row.length - 1 ? cell : cell.padEnd(widths[i] ?? 0)).join(" ");
59446
59581
  return [line(header), ...cells.map(line)];
59447
59582
  }
59448
- /** What `sent list` prints on stderr after the JSON, without --json. */
59583
+ /** What `sent list` prints on stdout without --json. */
59449
59584
  function sentListLines(envelope) {
59450
59585
  const body = isRecord(envelope) ? envelope : {};
59451
59586
  const above = mineLine(body.meta);
@@ -60207,7 +60342,7 @@ const RESERVED_FLAG_NAMES = /* @__PURE__ */ new Set([
60207
60342
  ]);
60208
60343
  function bodyFieldFlag(field, aliases, generatedRetryId = false) {
60209
60344
  const common = {
60210
- description: generatedRetryId ? `Retry ID, generated when omitted. ${field.description || field.name}` : field.description || field.name,
60345
+ description: generatedRetryId ? `Retry ID, generated when omitted. ${field.description || field.name}` : canonicalCliText(field.description || field.name),
60211
60346
  ...aliases && aliases.length > 0 ? { aliases } : {}
60212
60347
  };
60213
60348
  if (field.kind === "boolean") return Flags.boolean({
@@ -60229,7 +60364,7 @@ function bodyFieldFlag(field, aliases, generatedRetryId = false) {
60229
60364
  });
60230
60365
  return Flags.string({
60231
60366
  ...common,
60232
- description: withLengthLimit(generatedRetryId ? common.description : field.description, field.maxLength) || field.name
60367
+ description: withLengthLimit(generatedRetryId ? common.description : canonicalCliText(field.description), field.maxLength) || field.name
60233
60368
  });
60234
60369
  }
60235
60370
  /**
@@ -60258,7 +60393,7 @@ function buildFlags(operation) {
60258
60393
  }),
60259
60394
  time: Flags.boolean({ description: TIME_FLAG_DESCRIPTION })
60260
60395
  };
60261
- if (!operation.binaryResponse) flags.json = Flags.boolean({ description: "Print exactly one JSON document on stdout, on success and on failure, and nothing on stderr: the API's response body (data, and meta with meta.cursor where the route sends it) plus the CLI's own summary, warnings, error and exit_code. Without --json, stdout is the data payload, and notes and the next cursor go to stderr." });
60396
+ if (!operation.binaryResponse) flags.json = Flags.boolean({ description: `Print exactly one JSON document on stdout, on success and on failure, and nothing on stderr: the API's response body (data, and meta with meta.cursor where the route sends it) plus the CLI's own summary, warnings, error and exit_code. Without --json, stdout is ${operation.sdkName === "listSentEmails" ? "a table" : "the data payload"}, and notes and the next cursor go to stderr.` });
60262
60397
  const positional = positionalPathParameter(operation);
60263
60398
  const pageMaximum = pagedLimitMaximum(operation);
60264
60399
  for (const parameter of [...operation.pathParams, ...operation.queryParams]) {
@@ -60280,7 +60415,7 @@ function buildFlags(operation) {
60280
60415
  const aliasesForOperation = OPERATION_FLAG_ALIASES[operation.sdkName];
60281
60416
  for (const field of bodyFields) {
60282
60417
  if (field.kind === "complex") continue;
60283
- const name = flagName(field.name);
60418
+ const name = canonicalBodyFlagName(operation.sdkName, field.name);
60284
60419
  if (RESERVED_FLAG_NAMES.has(name)) continue;
60285
60420
  if (flags[name] !== void 0) continue;
60286
60421
  flags[name] = bodyFieldFlag(field, aliasesForOperation?.[field.name], generatedRetryIds.has(field.name));
@@ -60449,7 +60584,7 @@ const OPERATION_HINTS = {
60449
60584
  searchMemories: "Tip: prefer `primitive memories search [prefix] [--metadata-only] [--function <function-id>]` for the common search path.",
60450
60585
  listEmails: "Tip: for a one-line-per-email table, `primitive emails latest --limit 100`.",
60451
60586
  listEndpoints: "Tip: without --json, a table on stderr after the JSON shows each endpoint's ENABLED and DELIVERING. DELIVERING is read from delivery.delivering, whether a webhook is being sent mail at all, not from enabled: an endpoint can be enabled and still not be delivering (its owner's key revoked, say), shown as no with the reason codes in parentheses. A webhook whose delivery could not be checked shows unknown, and a Function or pull endpoint shows -.",
60452
- startAgentSignup: "Tip: pass --terms-accepted. Capture the signup_token from the response and feed it to `primitive agent verify-agent-signup --signup-token <token> --verification-code <6-digit-code>` (the verify flag accepts --code as an alias). The high-level `primitive signup <email>` command walks an interactive user through both steps with friendlier prompts.",
60587
+ startAgentSignup: "Tip: pass --terms-accepted. Capture the signup_token from the response and feed it to `primitive agent verify-signup --signup-token <token> --verification-code <6-digit-code>` (the verify flag accepts --code as an alias). The high-level `primitive signup <email>` command walks an interactive user through both steps with friendlier prompts.",
60453
60588
  testEmailRule: "Tip: --expect-match and --expect-no-match (or --expect-file) set expect; without it, a saved rule's own expectations are judged. Exit 0 when every expectation passed, 1 when one failed or is undecided for good (or the request failed), and 3 when the only ones not passed can be decided by testing again later; with --json, error.code is expectations_failed or expectations_undecided, and exit_code and error, not the API's success, say whether the expectations passed.",
60454
60589
  verifyAgentSignup: "Tip: pass --verification-code <code> (or --code; both work). The response carries OAuth tokens but not your assigned inbox domain; run `primitive domains list` (or `primitive whoami`) after success to see the managed *.primitive.email address that routes to this account."
60455
60590
  };
@@ -60472,12 +60607,12 @@ function overLongBodyField(schema, body) {
60472
60607
  }
60473
60608
  }
60474
60609
  /** What a write that takes a compile answer reads from --body-file, said beside the generic help. */
60475
- const COMPILE_RULE = "the `rule` of a saved compile answer: `compile-email-rule ... --json | jq .data.rule > rule.json`";
60610
+ const COMPILE_RULE = "the `rule` of a saved compile answer: `compile ... --json | jq .data.rule > rule.json`";
60476
60611
  const BODY_FILE_HELP = {
60477
60612
  createEmailRule: `For this command, ${COMPILE_RULE}, with --name.`,
60478
60613
  updateEmailRule: `For a new version, ${COMPILE_RULE}; --name only to rename it.`,
60479
- createEmailRuleRequest: `For this command, ${COMPILE_RULE}, compiled without a scope (--evaluation-scope, --scope-address or --scope-domain), with --name and --target-email.`,
60480
- acceptEmailRuleRequest: `To change the rule as you accept it, ${COMPILE_RULE}, compiled without a scope (--evaluation-scope, --scope-address or --scope-domain).`
60614
+ createEmailRuleRequest: `For this command, ${COMPILE_RULE}, compiled without a scope (--scope, --scope-address or --scope-domain), with --name and --target-email.`,
60615
+ acceptEmailRuleRequest: `To change the rule as you accept it, ${COMPILE_RULE}, compiled without a scope (--scope, --scope-address or --scope-domain).`
60481
60616
  };
60482
60617
  const OPERATION_FLAG_ALIASES = { verifyAgentSignup: { verification_code: ["code"] } };
60483
60618
  const OPERATION_EXTRA_BODY_FLAGS = { addDomain: { "mail-relay": {
@@ -60564,7 +60699,7 @@ function createOperationCommand(operation) {
60564
60699
  const positional = positionalPathParameter(operation);
60565
60700
  const positionalFlag = positional ? parameterFlagName(operation.sdkName, positional.name) : void 0;
60566
60701
  class OperationCommand extends Command {
60567
- static description = fullDescription;
60702
+ static description = canonicalCliText(fullDescription);
60568
60703
  static helpInputs = operationHelpInputs(operation, bodyFieldFlagToProperty, positionalFlag);
60569
60704
  static flags = flags;
60570
60705
  static args = positional && positionalFlag ? { [positionalFlag]: Args.string({
@@ -60607,7 +60742,7 @@ function createOperationCommand(operation) {
60607
60742
  ...explicit,
60608
60743
  ...overrides
60609
60744
  };
60610
- else throw cliError(`--raw-body must be a JSON object when also passing per-field flags (got ${explicit === null ? "null" : Array.isArray(explicit) ? "array" : typeof explicit}); supplied per-field flags: ${Object.keys(overrides).map((p) => extensionFlagFor.get(p) ?? `--${flagName(p)}`).join(", ")}. Either drop --raw-body and rely on the per-field flags, or move every field into the JSON --raw-body and drop the flags.`);
60745
+ else throw cliError(`--raw-body must be a JSON object when also passing per-field flags (got ${explicit === null ? "null" : Array.isArray(explicit) ? "array" : typeof explicit}); supplied per-field flags: ${Object.keys(overrides).map((p) => extensionFlagFor.get(p) ?? `--${canonicalBodyFlagName(operation.sdkName, p)}`).join(", ")}. Either drop --raw-body and rely on the per-field flags, or move every field into the JSON --raw-body and drop the flags.`);
60611
60746
  } else body = explicit;
60612
60747
  }
60613
60748
  const bodyBeforeEventTypes = body;
@@ -60918,10 +61053,12 @@ function createOperationCommand(operation) {
60918
61053
  ...printed,
60919
61054
  error: report.error
60920
61055
  };
60921
- this.log(JSON.stringify(printed, null, 2));
61056
+ if (operation.sdkName === "listSentEmails" && !jsonOutput) {
61057
+ const lines = sentListLines(envelope);
61058
+ this.log(lines.length > 0 ? lines.join("\n") : "No sent emails to show.");
61059
+ } else this.log(JSON.stringify(printed, null, 2));
60922
61060
  if (reportError !== void 0) process.stderr.write(`Warning: ${operation.sdkName} succeeded but its report could not be built (${reportError}). The JSON above is the full answer; read it rather than the exit code.\n`);
60923
61061
  if (report && !jsonOutput) for (const line of report.lines) process.stderr.write(`${line}\n`);
60924
- if (operation.sdkName === "listSentEmails" && !jsonOutput) for (const line of sentListLines(envelope)) process.stderr.write(`${line}\n`);
60925
61062
  if (reportError !== void 0 && report?.exitCode && !jsonOutput) process.stderr.write(`The answer's expectations were not all shown to pass, so the command exits ${report.exitCode}.\n`);
60926
61063
  if (report?.exitCode) process.exitCode = report.exitCode;
60927
61064
  });
@@ -60932,7 +61069,7 @@ function createOperationCommand(operation) {
60932
61069
  const EMPTY_RESULT_HINTS = {
60933
61070
  listDeliveries: "(no results) No webhook deliveries logged yet. If you have an endpoint configured but expected to see test fires here: test deliveries from `primitive endpoints test` are NOT logged in this list, they're synchronous and visible only in the test-endpoint command's response. Real deliveries are logged when an event fans out to your endpoints: an inbound `email.received`, or a `sent_email.*` event for an endpoint that lists it in rules.event_types (they arrive within a few minutes of the result). If you have no endpoints, run `primitive endpoints list` to check.",
60934
61071
  listEndpoints: "(no results) No webhook endpoints configured. Add one with `primitive endpoints create --url <your-url>`.",
60935
- listDomains: "(no results) No domains on this account. Add one with `primitive domains add --domain <yourdomain.example>`.",
61072
+ listDomains: "(no results) No domains on this account. Add one with `primitive domains create --domain <yourdomain.example>`.",
60936
61073
  listFilters: "(no results) No filter rules configured.",
60937
61074
  listEmailRuleRequests: "(no results) No rule requests match. Without --box and --status only pending requests made to you are listed; `--box all --status any` lists every one you can see.",
60938
61075
  listEmailRuleShares: "(no results) No shares match. Without --box and --live only live shares made with you are listed; `--box all --live any` lists every one you can see.",
@@ -60955,6 +61092,6 @@ function emptyDeliveriesHint(sdkName, query) {
60955
61092
  return `(no results) No deliveries match ${flags.length === 1 ? flags[0] : `${flags.slice(0, -1).join(", ")} and ${flags[flags.length - 1]}`}. Test fires from \`primitive endpoints test\` are not logged here; real deliveries are, when an event fans out to the endpoint. Leave out ${flags.length === 1 ? flags[0] : "a filter"} to list more.`;
60956
61093
  }
60957
61094
  function canonicalizeCliReferences(description) {
60958
- return description.replaceAll("`primitive emails:latest`", "`primitive emails latest`").replaceAll("`primitive describe emails:get-email | jq '.responseSchema.properties'`", "`primitive describe emails:get | jq '.responseSchema.properties'`");
61095
+ return canonicalCliText(description).replaceAll("`primitive emails:latest`", "`primitive emails latest`").replaceAll("`primitive describe emails:get-email | jq '.responseSchema.properties'`", "`primitive describe emails:get | jq '.responseSchema.properties'`");
60959
61096
  }
60960
- export { interactionNextActions as $, loadSavedFocus as $t, openBrowser as A, credentialsFromUserLogin as An, thrownErrorExitCode as At, serverRelationship as B, setKnownCommands as Bn, detectRuntimeSession as Bt, approveThenRerunHint as C, createCliApiClient as Cn, sendErrorMessage as Ct, canOfferCopyHotkey as D, selectedOrgFromEnv as Dn, sentHistoryWindowStart as Dt, withApproval as E, resolveCliApiRequestConfig as En, sendWaitClampNotice as Et, formatMailWakeLine as F, roleKeyText as Fn, generatedAgentName as Ft, claimPendingMail as G, NO_FOCUS as Gt, wakeReadCommand as H, formatAlreadySentNotice as Ht, latestOwnOutbound as I, switchCurrentOrg as In, identitySuggestions as It, pendingMailPath as J, focusFlagValues as Jt, clearConsumedPendingMail as K, countFromMeta as Kt, readThreadContext as L, routeWarningLines as Ln, loadSkillLine as Lt, bareAddress as M, isBuiltInRoleKey as Mn, cliInvocation as Mt, describeWake as N, revokeUserLogin as Nn, connectNextSteps as Nt, formatBrowserLoginInstructions as O, CliOrgRefusedError as On, serializeErrorPayload as Ot, displayAddress as P, roleKeyLabel as Pn, defaultConnectionName as Pt, interactionHumanLine as Q, joinNames as Qt, sentInThread as R, sanitizeForTerminal as Rn, currentMailSessionKey as Rt, STEP_UP_TOKEN_FLAG_DESCRIPTION as S, createAuthenticatedCliApiClient as Sn, reportSendCommandResult as St, terminalApprovalIo as T, refuseOrgSelectionForProfile as Tn, sendOutcomeExitCode as Tt, wakeRecipientField as U, FOCUS_ENV as Ut, skillFirstLine as V, operationManifest as Vn, runtimeSessionVariableList as Vt, wakeRelationship as W, FOCUS_SERVER_SUPPORT as Wt, recordPendingMail as X, focusForCorpus as Xt, readPendingMail as Y, focusFlags as Yt, removePendingMail as Z, focusProfile as Zt, surfaceUnauthorizedHint as _, ATTACHMENT_WAIT_FLAG_DESCRIPTION as _n, formatPriorRepliesCheckSkipped as _t, createOperationCommand as a, resolveDomainNames as an, MAX_SEND_WAIT_TIMEOUT_MS as at, BROWSER_FLAG_DESCRIPTION as b, ConnectedAgentKeyRequiredError as bn, formatSendRecordFailureSummary as bt, formatErrorPayload as c, withFocusMeta as cn, assertValidIdempotencyKey as ct, isGrantRefusal as d, withFlagSuggestion as dn, checkPriorReplies as dt, manyDomainsSupported as en, readEmailInteraction as et, networkErrorHint as f, emptyEmailListHint as fn, classifySendError as ft, runWithTiming as g, isEmailId as gn, formatDeletedEarlierSendNotice as gt, refusesCredential as h, formatFact as hn, followUpCommandPrefix as ht, TIME_FLAG_DESCRIPTION as i, readReadableDomains as in, IDEMPOTENCY_KEY_FLAG_DESCRIPTION as it, explainPendingMailNotFound as j, fetchCliOrgs as jn, DEFAULT_ENROLL_NAME as jt, listenForCopyHotkey as k, RESTRICTED_ROLE_NOTE as kn, successfulSendOutcome as kt, hasControlCharacter as l, withoutFocus as ln, buildFollowUpCommand as lt, readTextFileFlag as m, readCallerMailFor as mn, excludeSignalReplies as mt, API_ERROR_CODES as n, oneDomainAtATimeError as nn, replyInteractionWarning as nt, extractErrorCode as o, resolveFocus as on, SEND_OUTCOME_HELP as ot, parameterFlagName as p, mailReach as pn, deriveSendIdempotencyKey as pt, clearReadPendingMail as q, focusEmptyHint as qt, OPERATION_PATH_FLAGS as r, queryScopesItself as rn, wakeInteractionSentence as rt, extractErrorPayload as s, saveFocus as sn, apiResultHttpStatus as st, API_BASE_URL_FLAG_DESCRIPTION as t, normalizeDomainNames as tn, replyExpectation as tt, headerFlagName as u, writeFocusLine as un, buildThrownSendFailureEnvelope as ut, takesStepUp as v, ATTACHMENT_WAIT_MAX_MS as vn, formatPriorRepliesWarning as vt, promptLine as w, refreshStoredCliCredentials as wn, sendIdentityFields as wt, STEP_UP_HEADER as x, SAVED_CLI_OAUTH_SESSION_EXPIRED_MESSAGE as xn, priorRepliesThatWentOut as xt, writeErrorWithHints as y, withAttachmentWait as yn, formatSendFailureSummary as yt, serverMuted as z, shownLine as zn, detectAgentRuntime as zt };
61097
+ export { wakeInteractionSentence as $, queryScopesItself as $t, displayAddress as A, revokeUserLogin as An, defaultConnectionName as At, wakeRelationship as B, FOCUS_SERVER_SUPPORT as Bt, canOfferCopyHotkey as C, selectedOrgFromEnv as Cn, sentHistoryWindowStart as Ct, explainPendingMailNotFound as D, displayedRoleKey as Dn, DEFAULT_ENROLL_NAME as Dt, openBrowser as E, credentialsFromUserLogin as En, thrownErrorExitCode as Et, serverMuted as F, sanitizeForTerminal as Fn, detectAgentRuntime as Ft, readPendingMail as G, focusFlags as Gt, clearConsumedPendingMail as H, countFromMeta as Ht, serverRelationship as I, shownLine as In, detectRuntimeSession as It, interactionHumanLine as J, joinNames as Jt, recordPendingMail as K, focusForCorpus as Kt, skillFirstLine as L, setKnownCommands as Ln, runtimeSessionVariableList as Lt, latestOwnOutbound as M, roleKeyText as Mn, identitySuggestions as Mt, readThreadContext as N, switchCurrentOrg as Nn, loadSkillLine as Nt, bareAddress as O, fetchCliOrgs as On, cliInvocation as Ot, sentInThread as P, routeWarningLines as Pn, currentMailSessionKey as Pt, replyInteractionWarning as Q, oneDomainAtATimeError as Qt, wakeReadCommand as R, operationManifest as Rn, formatAlreadySentNotice as Rt, withApproval as S, resolveCliApiRequestConfig as Sn, sendWaitClampNotice as St, listenForCopyHotkey as T, RESTRICTED_ROLE_NOTE as Tn, successfulSendOutcome as Tt, clearReadPendingMail as U, focusEmptyHint as Ut, claimPendingMail as V, NO_FOCUS as Vt, pendingMailPath as W, focusFlagValues as Wt, readEmailInteraction as X, manyDomainsSupported as Xt, interactionNextActions as Y, loadSavedFocus as Yt, replyExpectation as Z, normalizeDomainNames as Zt, STEP_UP_HEADER as _, SAVED_CLI_OAUTH_SESSION_EXPIRED_MESSAGE as _n, priorRepliesThatWentOut as _t, extractErrorCode as a, withoutFocus as an, buildFollowUpCommand as at, promptLine as b, refreshStoredCliCredentials as bn, sendIdentityFields as bt, hasControlCharacter as c, emptyEmailListHint as cn, classifySendError as ct, readTextFileFlag as d, formatFact as dn, followUpCommandPrefix as dt, readReadableDomains as en, IDEMPOTENCY_KEY_FLAG_DESCRIPTION as et, refusesCredential as f, isEmailId as fn, formatDeletedEarlierSendNotice as ft, BROWSER_FLAG_DESCRIPTION as g, ConnectedAgentKeyRequiredError as gn, formatSendRecordFailureSummary as gt, writeErrorWithHints as h, withAttachmentWait as hn, formatSendFailureSummary as ht, createOperationCommand as i, withFocusMeta as in, assertValidIdempotencyKey as it, formatMailWakeLine as j, roleKeyLabel as jn, generatedAgentName as jt, describeWake as k, isBuiltInRoleKey as kn, connectNextSteps as kt, isGrantRefusal as l, mailReach as ln, deriveSendIdempotencyKey as lt, surfaceUnauthorizedHint as m, ATTACHMENT_WAIT_MAX_MS as mn, formatPriorRepliesWarning as mt, API_ERROR_CODES as n, resolveFocus as nn, SEND_OUTCOME_HELP as nt, extractErrorPayload as o, writeFocusLine as on, buildThrownSendFailureEnvelope as ot, runWithTiming as p, ATTACHMENT_WAIT_FLAG_DESCRIPTION as pn, formatPriorRepliesCheckSkipped as pt, removePendingMail as q, focusProfile as qt, TIME_FLAG_DESCRIPTION as r, saveFocus as rn, apiResultHttpStatus as rt, formatErrorPayload as s, withFlagSuggestion as sn, checkPriorReplies as st, API_BASE_URL_FLAG_DESCRIPTION as t, resolveDomainNames as tn, MAX_SEND_WAIT_TIMEOUT_MS as tt, networkErrorHint as u, readCallerMailFor as un, excludeSignalReplies as ut, STEP_UP_TOKEN_FLAG_DESCRIPTION as v, createAuthenticatedCliApiClient as vn, reportSendCommandResult as vt, formatBrowserLoginInstructions as w, CliOrgRefusedError as wn, serializeErrorPayload as wt, terminalApprovalIo as x, refuseOrgSelectionForProfile as xn, sendOutcomeExitCode as xt, approveThenRerunHint as y, createCliApiClient as yn, sendErrorMessage as yt, wakeRecipientField as z, FOCUS_ENV as zt };