primcli 3.0.0-preview.11 → 3.0.0-preview.12

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,4 @@
1
- import { B as ensureSearchReportsReplyState, Gn as sdk_gen_exports, J as EMAIL_RULE_REQUEST_EVENT_TYPES, K as replyStateSurfaceForOperation, L as ReplyStateUnsupportedError, Qt as getOwnGrant, R as assertAwaitingFilterRows, Ut as getEmail, W as isAwaitingRejectedError, X as WEBHOOK_EVENT_TYPES, Y as SENT_EMAIL_EVENT_TYPES, _n as listEndpoints, at as assertAutomatedVerdict, ct as ensureSearchReportsAutomated, dt as isAutomatedRejectedError, it as AutomatedFilterUnsupportedError, lt as expectedAutomatedVerdicts, nn as getThread, ot as automatedRejectedError, q as EMAIL_RULE_OBJECTION_EVENT_TYPES, st as automatedSurfaceForOperation, v as parseRetryAfter, z as awaitingRejectedError } from "./repeats-Dj_o6c-X-ChTwFlyB.js";
1
+ import { B as ensureSearchReportsReplyState, Gn as sdk_gen_exports, J as EMAIL_RULE_REQUEST_EVENT_TYPES, K as replyStateSurfaceForOperation, L as ReplyStateUnsupportedError, Qt as getOwnGrant, R as assertAwaitingFilterRows, Ut as getEmail, W as isAwaitingRejectedError, X as WEBHOOK_EVENT_TYPES, Y as SENT_EMAIL_EVENT_TYPES, _n as listEndpoints, at as assertAutomatedVerdict, ct as ensureSearchReportsAutomated, dt as isAutomatedRejectedError, it as AutomatedFilterUnsupportedError, lt as expectedAutomatedVerdicts, nn as getThread, ot as automatedRejectedError, q as EMAIL_RULE_OBJECTION_EVENT_TYPES, st as automatedSurfaceForOperation, v as parseRetryAfter, z as awaitingRejectedError } from "./repeats-Dj_o6c-X-wjmw2Jbx.js";
2
2
  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
3
  import "./oclif/global-org-flag.js";
4
4
  import { a as thrownErrorBody } from "./json-output-ch756TXV.js";
@@ -780,7 +780,7 @@ const operationManifest = [
780
780
  "binaryResponse": false,
781
781
  "bodyRequired": false,
782
782
  "command": "list-activity-objects",
783
- "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 or saved a new version while 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.",
783
+ "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 or saved a new version while 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: until the notices record a rule starting to cover you, the first page lists that rule as pending (pending_complete says whether that check finished), and as_of says about when the notices last looked. For what covers you now, read GET /email-rules/covering-me.",
784
784
  "hasJsonBody": false,
785
785
  "method": "GET",
786
786
  "operationId": "listActivityObjects",
@@ -820,7 +820,7 @@ const operationManifest = [
820
820
  },
821
821
  {
822
822
  "default": 50,
823
- "description": "Objects per page, from 1 to 200; defaults to 50.",
823
+ "description": "Objects per page, from 1 to 200; defaults to 50. With relation=concerning the first page may also hold pending items beyond it.",
824
824
  "enum": null,
825
825
  "maximum": 200,
826
826
  "minimum": 1,
@@ -863,7 +863,7 @@ const operationManifest = [
863
863
  },
864
864
  "state": {
865
865
  "type": "string",
866
- "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), and for a coverage notice what it told: started (a rule began covering your mailbox), new_version, or baseline (it already covered you when notices began)."
866
+ "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), and for a coverage notice what it told: started (a rule began covering your mailbox), new_version, or baseline (it already covered you when notices began). pending: a rule started covering your mailbox and the notices have not recorded that start yet (a restart within an hour of the last start notice is recorded without a new one); its id is then the rule's, and created_at when the rule last changed."
867
867
  },
868
868
  "created_at": {
869
869
  "type": "string",
@@ -942,6 +942,15 @@ const operationManifest = [
942
942
  "next_cursor": {
943
943
  "description": "Pass as cursor to read the next page; null on the last page. A page can hold fewer items than limit, or none, while next_cursor is set.",
944
944
  "type": ["string", "null"]
945
+ },
946
+ "as_of": {
947
+ "type": ["string", "null"],
948
+ "format": "date-time",
949
+ "description": "With relation=concerning only: about when the notices last looked at your organization; null if never or unread. Coverage since may have no notice yet."
950
+ },
951
+ "pending_complete": {
952
+ "description": "With relation=concerning, on the first page only: whether the check for rules that started covering you without their start notice (state pending, listed ahead of the notices and beyond limit) was finished. false: some may be missing. Absent where there is nothing to check.",
953
+ "type": "boolean"
945
954
  }
946
955
  },
947
956
  "required": [
@@ -6689,6 +6698,35 @@ const operationManifest = [
6689
6698
  "format": "uuid",
6690
6699
  "description": "With `group=message`: the send of this message, when you can read it (under a connected agent key, only its own sends)."
6691
6700
  },
6701
+ "imported": {
6702
+ "type": ["object", "null"],
6703
+ "description": "Historical acquisition; never sender or SMTP delivery proof. Null for live mail. Excluded from live tails and deltas.",
6704
+ "required": [
6705
+ "from",
6706
+ "method",
6707
+ "verification",
6708
+ "at"
6709
+ ],
6710
+ "properties": {
6711
+ "from": {
6712
+ "type": "string",
6713
+ "enum": ["google_workspace"]
6714
+ },
6715
+ "method": {
6716
+ "type": "string",
6717
+ "enum": ["primitive_direct"]
6718
+ },
6719
+ "verification": {
6720
+ "type": "string",
6721
+ "enum": ["provider_fetched"]
6722
+ },
6723
+ "at": {
6724
+ "type": "string",
6725
+ "format": "date-time",
6726
+ "description": "When Primitive acquired this historical message."
6727
+ }
6728
+ }
6729
+ },
6692
6730
  "snippet": {
6693
6731
  "type": ["string", "null"],
6694
6732
  "maxLength": 200,
@@ -6711,6 +6749,7 @@ const operationManifest = [
6711
6749
  "automated_reasons",
6712
6750
  "from_verified",
6713
6751
  "from_header_email",
6752
+ "imported",
6714
6753
  "snippet"
6715
6754
  ]
6716
6755
  }, {
@@ -9473,7 +9512,7 @@ const operationManifest = [
9473
9512
  "binaryResponse": false,
9474
9513
  "bodyRequired": false,
9475
9514
  "command": "get-key",
9476
- "description": "One key's metadata, never its secret, with whether it works now (status). A revoked key whose record is kept is answered too, with status revoked, revoked_at and revoked_by, under the same access rules as a key that works: one the caller may not read is 404, revoked or not. Its grant's mail_scope.depth is raw only when the key holds mail.raw:read and its scope lists an address or a domain, otherwise content. A rule the key lists that reads nothing any more (a deleted rule, or a share that ended) is listed under grant.mail_scope.ended_rules, each with its id and reason (rule_deleted or share_ended), and not under rules. The person needs access to the whole organization's mail. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Contact Primitive to turn them on.\n\nPerson only: a dashboard session or the person's own Primitive CLI token; no other OAuth app. The person's role must hold keys:read. API keys, agent connection keys and agents are refused.",
9515
+ "description": "One key's metadata, never its secret, with whether it works now (status). A revoked key whose record is kept is answered too, with status revoked, revoked_at and revoked_by, under the same access rules as a key that works: one the caller may not read is 404, revoked or not. Its grant's mail_scope.depth is raw only when the key holds mail.raw:read and its scope lists an address or a domain, otherwise content. A rule the key lists that reads nothing any more (a deleted rule, or a share that ended) is listed under grant.mail_scope.ended_rules, each with its id and reason (rule_deleted or share_ended), and not under rules. grant.mail_scope.rule_versions gives each rule it lists directly its current_version, state and version_saved_at. The person needs access to the whole organization's mail. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Contact Primitive to turn them on.\n\nPerson only: a dashboard session or the person's own Primitive CLI token; no other OAuth app. The person's role must hold keys:read. API keys, agent connection keys and agents are refused.",
9477
9516
  "hasJsonBody": false,
9478
9517
  "method": "GET",
9479
9518
  "operationId": "getKey",
@@ -9566,6 +9605,24 @@ const operationManifest = [
9566
9605
  "rotated_to": {
9567
9606
  "description": "The id of the newest key rotated from this key that the caller may read; null until it is rotated, or when the caller may read no key rotated from it. A revoked one is still named: GET /v1/keys/{id} answers it.",
9568
9607
  "type": ["string", "null"]
9608
+ },
9609
+ "address_warnings": {
9610
+ "type": "array",
9611
+ "items": {
9612
+ "type": "object",
9613
+ "properties": {
9614
+ "address": { "type": "string" },
9615
+ "reason": { "type": "string" },
9616
+ "description": { "type": "string" }
9617
+ },
9618
+ "required": [
9619
+ "address",
9620
+ "reason",
9621
+ "description"
9622
+ ],
9623
+ "additionalProperties": {}
9624
+ },
9625
+ "description": "Notes on the key's grant, worked out from it on every read: whole_mailbox, an address or domain listed beside email rules, which the key reads in full; no_send_address, with address empty, a key that can send but lists only email rules. The notes that need the organization's mailboxes and domains (member_address, unowned_domain) are given only when the grant is written. Only rules not deleted and shares not ended count. Empty, or absent, for a key on a template, and empty for a revoked key."
9569
9626
  }
9570
9627
  },
9571
9628
  "required": [
@@ -10300,6 +10357,24 @@ const operationManifest = [
10300
10357
  "agent_address",
10301
10358
  "person"
10302
10359
  ]
10360
+ },
10361
+ "address_warnings": {
10362
+ "type": "array",
10363
+ "items": {
10364
+ "type": "object",
10365
+ "properties": {
10366
+ "address": { "type": "string" },
10367
+ "reason": { "type": "string" },
10368
+ "description": { "type": "string" }
10369
+ },
10370
+ "required": [
10371
+ "address",
10372
+ "reason",
10373
+ "description"
10374
+ ],
10375
+ "additionalProperties": {}
10376
+ },
10377
+ "description": "Notes on the key's grant, worked out from it on every read: whole_mailbox, an address or domain listed beside email rules, which the key reads in full; no_send_address, with address empty, a key that can send but lists only email rules. The notes that need the organization's mailboxes and domains (member_address, unowned_domain) are given only when the grant is written. Only rules not deleted and shares not ended count. Empty, or absent, for a key on a template, and empty for a revoked key."
10303
10378
  }
10304
10379
  },
10305
10380
  "required": [
@@ -10339,7 +10414,7 @@ const operationManifest = [
10339
10414
  "binaryResponse": false,
10340
10415
  "bodyRequired": false,
10341
10416
  "command": "list-keys",
10342
- "description": "Key metadata, never a secret: name, prefix, grant, creator, last use, expiry, suspension and whether each key works now (status). Revoked keys are left out unless include_revoked is true, which lists them too with status revoked, revoked_at and revoked_by, under the same access rules as keys that work. A grant's mail_scope.depth is raw only when the key holds mail.raw:read and its scope lists an address or a domain, otherwise content. A rule the key lists that reads nothing any more (a deleted rule, or a share that ended) is listed under grant.mail_scope.ended_rules, each with its id and reason (rule_deleted or share_ended), and not under rules. The person needs access to the whole organization's mail. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Contact Primitive to turn them on.\n\nPerson only: a dashboard session or the person's own Primitive CLI token; no other OAuth app. The person's role must hold keys:read. API keys, agent connection keys and agents are refused.",
10417
+ "description": "Key metadata, never a secret: name, prefix, grant, creator, last use, expiry, suspension and whether each key works now (status). Revoked keys are left out unless include_revoked is true, which lists them too with status revoked, revoked_at and revoked_by, under the same access rules as keys that work. A grant's mail_scope.depth is raw only when the key holds mail.raw:read and its scope lists an address or a domain, otherwise content. A rule the key lists that reads nothing any more (a deleted rule, or a share that ended) is listed under grant.mail_scope.ended_rules, each with its id and reason (rule_deleted or share_ended), and not under rules. grant.mail_scope.rule_versions gives each rule it lists directly its current_version, state and version_saved_at. The person needs access to the whole organization's mail. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Contact Primitive to turn them on.\n\nPerson only: a dashboard session or the person's own Primitive CLI token; no other OAuth app. The person's role must hold keys:read. API keys, agent connection keys and agents are refused.",
10343
10418
  "hasJsonBody": false,
10344
10419
  "method": "GET",
10345
10420
  "operationId": "listKeys",
@@ -10443,6 +10518,24 @@ const operationManifest = [
10443
10518
  "rotated_to": {
10444
10519
  "description": "The id of the newest key rotated from this key that the caller may read; null until it is rotated, or when the caller may read no key rotated from it. A revoked one is still named: GET /v1/keys/{id} answers it.",
10445
10520
  "type": ["string", "null"]
10521
+ },
10522
+ "address_warnings": {
10523
+ "type": "array",
10524
+ "items": {
10525
+ "type": "object",
10526
+ "properties": {
10527
+ "address": { "type": "string" },
10528
+ "reason": { "type": "string" },
10529
+ "description": { "type": "string" }
10530
+ },
10531
+ "required": [
10532
+ "address",
10533
+ "reason",
10534
+ "description"
10535
+ ],
10536
+ "additionalProperties": {}
10537
+ },
10538
+ "description": "Notes on the key's grant, worked out from it on every read: whole_mailbox, an address or domain listed beside email rules, which the key reads in full; no_send_address, with address empty, a key that can send but lists only email rules. The notes that need the organization's mailboxes and domains (member_address, unowned_domain) are given only when the grant is written. Only rules not deleted and shares not ended count. Empty, or absent, for a key on a template, and empty for a revoked key."
10446
10539
  }
10447
10540
  },
10448
10541
  "required": [
@@ -12955,7 +13048,7 @@ const operationManifest = [
12955
13048
  "binaryResponse": false,
12956
13049
  "bodyRequired": false,
12957
13050
  "command": "accept-email-rule-objection",
12958
- "description": "Accepts a pending objection to a rule you wrote: turns the rule off (state draft), as updating it would, and records the objection accepted, together. You can turn the rule on again later. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature. Only on your own dashboard session or the Primitive CLI.",
13051
+ "description": "Accepts a pending objection to a rule you wrote: turns the rule off (state draft), as updating it would, and records the objection accepted, together. You can turn the rule on again later. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.",
12959
13052
  "hasJsonBody": false,
12960
13053
  "method": "POST",
12961
13054
  "operationId": "acceptEmailRuleObjection",
@@ -13092,7 +13185,7 @@ const operationManifest = [
13092
13185
  "binaryResponse": false,
13093
13186
  "bodyRequired": true,
13094
13187
  "command": "create-email-rule-objection",
13095
- "description": "Asks the author of a rule that covers one of your own mailboxes now to turn it off. Only a rule that covers you now: one you see only because it once decided on your mail cannot be objected to. An objection is seen by the member who made it, the rule's author and the organization's owners and admins. It stays pending until the rule's author accepts it, turning the rule off, or declines it, or the member who made it withdraws it, which clears its message. It never changes after that. You may have one pending objection per rule and 50 in all, and object to the same rule again only 10 minutes after you last did, whatever became of it. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature. Only on your own dashboard session or the Primitive CLI.",
13188
+ "description": "Asks the author of a rule that covers one of your own mailboxes now to turn it off. Only a rule that covers you now: one you see only because it once decided on your mail cannot be objected to. An objection is seen by the member who made it, the rule's author and the organization's owners and admins. It stays pending until the rule's author accepts it, turning the rule off, or declines it, or the member who made it withdraws it, which clears its message. It never changes after that. You may have one pending objection per rule and 50 in all, and object to the same rule again only 10 minutes after you last did, whatever became of it. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.",
13096
13189
  "hasJsonBody": true,
13097
13190
  "method": "POST",
13098
13191
  "operationId": "createEmailRuleObjection",
@@ -13240,7 +13333,7 @@ const operationManifest = [
13240
13333
  "binaryResponse": false,
13241
13334
  "bodyRequired": false,
13242
13335
  "command": "decline-email-rule-objection",
13243
- "description": "Declines a pending objection to a rule you wrote, optionally saying why; the rule stays as it is. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature. Only on your own dashboard session or the Primitive CLI.",
13336
+ "description": "Declines a pending objection to a rule you wrote, optionally saying why; the rule stays as it is. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.",
13244
13337
  "hasJsonBody": true,
13245
13338
  "method": "POST",
13246
13339
  "operationId": "declineEmailRuleObjection",
@@ -13386,7 +13479,7 @@ const operationManifest = [
13386
13479
  "binaryResponse": false,
13387
13480
  "bodyRequired": false,
13388
13481
  "command": "get-email-rule-covering-me",
13389
- "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, and the member each belongs to, or the organization. You do not see which keys, webhooks or shares they are (no ids, names, prefixes or URLs), the other inboxes and domains its scope names, or its saved expectations. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature. Only on your own dashboard session or the Primitive CLI.",
13482
+ "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. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.",
13390
13483
  "hasJsonBody": false,
13391
13484
  "method": "GET",
13392
13485
  "operationId": "getEmailRuleCoveringMe",
@@ -13530,7 +13623,7 @@ const operationManifest = [
13530
13623
  },
13531
13624
  "required": ["owner", "count"]
13532
13625
  },
13533
- "description": "API keys that work now (not revoked, expired or suspended) whose access lists the rule, or its live share: they read what it matches. Owner: the member who holds each, or the organization."
13626
+ "description": "API keys that work now (not revoked, expired or suspended) and hold mail:read, whose access lists the rule or its live share. Owner: who holds each, or the organization."
13534
13627
  },
13535
13628
  "webhooks": {
13536
13629
  "type": "array",
@@ -13571,11 +13664,21 @@ const operationManifest = [
13571
13664
  "count": {
13572
13665
  "type": "integer",
13573
13666
  "exclusiveMinimum": 0
13667
+ },
13668
+ "hosts": {
13669
+ "description": "Distinct sites they deliver to (a host's registrable domain, or a tunnel, preview or function service alone), sorted, at most 10; \"unknown host\" (last) for any that cannot be named.",
13670
+ "type": "array",
13671
+ "items": { "type": "string" }
13672
+ },
13673
+ "hosts_not_listed": {
13674
+ "description": "Hosts past those listed.",
13675
+ "type": "integer",
13676
+ "minimum": 0
13574
13677
  }
13575
13678
  },
13576
13679
  "required": ["owner", "count"]
13577
13680
  },
13578
- "description": "Webhooks that are sent what it matches: those whose key, as delivery acts as it, lists the rule or its live share (owner: the member who holds that key, or the organization), and the webhooks of the member the rule is shared with (owner: that member)."
13681
+ "description": "Webhooks taking received mail, bounces or reports that are sent what it matches: those of the key delivery acts as, when it lists the rule or its live share (owner: its holder, or the organization), and those of the member it is shared with (owner: that member)."
13579
13682
  },
13580
13683
  "shares": {
13581
13684
  "type": "array",
@@ -13612,7 +13715,7 @@ const operationManifest = [
13612
13715
  },
13613
13716
  "required": ["beneficiary", "count"]
13614
13717
  },
13615
- "description": "The rule's live share, if it has one (a rule is shared at most once): the member it gives what it matches to."
13718
+ "description": "The rule's live share (at most one), by its member, if they can read it and it is among their newest 20 shares."
13616
13719
  }
13617
13720
  },
13618
13721
  "required": [
@@ -13730,7 +13833,7 @@ const operationManifest = [
13730
13833
  "binaryResponse": false,
13731
13834
  "bodyRequired": false,
13732
13835
  "command": "get-email-rule-objection",
13733
- "description": "One objection you can see. An objection is seen by the member who made it, the rule's author and the organization's owners and admins. It stays pending until the rule's author accepts it, turning the rule off, or declines it, or the member who made it withdraws it, which clears its message. It never changes after that. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature. Only on your own dashboard session or the Primitive CLI.",
13836
+ "description": "One objection you can see. An objection is seen by the member who made it, the rule's author and the organization's owners and admins. It stays pending until the rule's author accepts it, turning the rule off, or declines it, or the member who made it withdraws it, which clears its message. It never changes after that. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.",
13734
13837
  "hasJsonBody": false,
13735
13838
  "method": "GET",
13736
13839
  "operationId": "getEmailRuleObjection",
@@ -13861,7 +13964,7 @@ const operationManifest = [
13861
13964
  "binaryResponse": false,
13862
13965
  "bodyRequired": false,
13863
13966
  "command": "list-email-rule-decisions-on-my-mail",
13864
- "description": "What a rule that covers your mailboxes, or decided on your mail, decided about mail at your own mailboxes, newest first: never about anyone else's mail. Each decision is in the words of the version that made it, which can be earlier than the current one: the questions it asked about that email (question_answers) and the columns its conditions read (parts). Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature. Only on your own dashboard session or the Primitive CLI.",
13967
+ "description": "What a rule that covers your mailboxes, or decided on your mail, decided about mail at your own mailboxes, newest first: never about anyone else's mail. Each decision is in the words of the version that made it, which can be earlier than the current one: the questions it asked about that email (question_answers) and the columns its conditions read (parts). Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.",
13865
13968
  "hasJsonBody": false,
13866
13969
  "method": "GET",
13867
13970
  "operationId": "listEmailRuleDecisionsOnMyMail",
@@ -13984,7 +14087,7 @@ const operationManifest = [
13984
14087
  "binaryResponse": false,
13985
14088
  "bodyRequired": false,
13986
14089
  "command": "list-email-rule-objections",
13987
- "description": "Objections you made, objections to rules you wrote, or every objection you can see, newest first. An objection is seen by the member who made it, the rule's author and the organization's owners and admins. It stays pending until the rule's author accepts it, turning the rule off, or declines it, or the member who made it withdraws it, which clears its message. It never changes after that. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature. Only on your own dashboard session or the Primitive CLI.",
14090
+ "description": "Objections you made, objections to rules you wrote, or every objection you can see, newest first. An objection is seen by the member who made it, the rule's author and the organization's owners and admins. It stays pending until the rule's author accepts it, turning the rule off, or declines it, or the member who made it withdraws it, which clears its message. It never changes after that. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.",
13988
14091
  "hasJsonBody": false,
13989
14092
  "method": "GET",
13990
14093
  "operationId": "listEmailRuleObjections",
@@ -14154,7 +14257,7 @@ const operationManifest = [
14154
14257
  "binaryResponse": false,
14155
14258
  "bodyRequired": false,
14156
14259
  "command": "list-email-rules-covering-me",
14157
- "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): one whose author reads all your mail (author scope, for an author who reads the organization's mail or holds an access entry for your mailbox), or one that names your mailbox or its domain (selected). 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, and the member each belongs to, or the organization. You do not see which keys, webhooks or shares they are (no ids, names, prefixes or URLs), the other inboxes and domains its scope names, or its saved expectations. 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. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature. Only on your own dashboard session or the Primitive CLI.",
14260
+ "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): one whose author reads all your mail (author scope, for an author who reads the organization's mail or holds an access entry for your mailbox), or one that names your mailbox or its domain (selected). 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. 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. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.",
14158
14261
  "hasJsonBody": false,
14159
14262
  "method": "GET",
14160
14263
  "operationId": "listEmailRulesCoveringMe",
@@ -14302,7 +14405,7 @@ const operationManifest = [
14302
14405
  },
14303
14406
  "required": ["owner", "count"]
14304
14407
  },
14305
- "description": "API keys that work now (not revoked, expired or suspended) whose access lists the rule, or its live share: they read what it matches. Owner: the member who holds each, or the organization."
14408
+ "description": "API keys that work now (not revoked, expired or suspended) and hold mail:read, whose access lists the rule or its live share. Owner: who holds each, or the organization."
14306
14409
  },
14307
14410
  "webhooks": {
14308
14411
  "type": "array",
@@ -14343,11 +14446,21 @@ const operationManifest = [
14343
14446
  "count": {
14344
14447
  "type": "integer",
14345
14448
  "exclusiveMinimum": 0
14449
+ },
14450
+ "hosts": {
14451
+ "description": "Distinct sites they deliver to (a host's registrable domain, or a tunnel, preview or function service alone), sorted, at most 10; \"unknown host\" (last) for any that cannot be named.",
14452
+ "type": "array",
14453
+ "items": { "type": "string" }
14454
+ },
14455
+ "hosts_not_listed": {
14456
+ "description": "Hosts past those listed.",
14457
+ "type": "integer",
14458
+ "minimum": 0
14346
14459
  }
14347
14460
  },
14348
14461
  "required": ["owner", "count"]
14349
14462
  },
14350
- "description": "Webhooks that are sent what it matches: those whose key, as delivery acts as it, lists the rule or its live share (owner: the member who holds that key, or the organization), and the webhooks of the member the rule is shared with (owner: that member)."
14463
+ "description": "Webhooks taking received mail, bounces or reports that are sent what it matches: those of the key delivery acts as, when it lists the rule or its live share (owner: its holder, or the organization), and those of the member it is shared with (owner: that member)."
14351
14464
  },
14352
14465
  "shares": {
14353
14466
  "type": "array",
@@ -14384,7 +14497,7 @@ const operationManifest = [
14384
14497
  },
14385
14498
  "required": ["beneficiary", "count"]
14386
14499
  },
14387
- "description": "The rule's live share, if it has one (a rule is shared at most once): the member it gives what it matches to."
14500
+ "description": "The rule's live share (at most one), by its member, if they can read it and it is among their newest 20 shares."
14388
14501
  }
14389
14502
  },
14390
14503
  "required": [
@@ -14423,7 +14536,7 @@ const operationManifest = [
14423
14536
  "binaryResponse": false,
14424
14537
  "bodyRequired": false,
14425
14538
  "command": "withdraw-email-rule-objection",
14426
- "description": "Withdraws a pending objection you made, and clears its message. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature. Only on your own dashboard session or the Primitive CLI.",
14539
+ "description": "Withdraws a pending objection you made, and clears its message. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.",
14427
14540
  "hasJsonBody": false,
14428
14541
  "method": "POST",
14429
14542
  "operationId": "withdrawEmailRuleObjection",
@@ -14560,7 +14673,7 @@ const operationManifest = [
14560
14673
  "binaryResponse": false,
14561
14674
  "bodyRequired": false,
14562
14675
  "command": "accept-email-rule-request",
14563
- "description": "Writes the rule as yours, over your own mailboxes only, turns it on, and shares what it matches from now on with the member who asked: each email in full with its attachments, but never raw. It does not go back through mail already received. Send no body to accept it as asked, or change it first with english and tree together (and an explanation, or the server writes one). Because this gives your mail to someone else, it is limited to the dashboard and the Primitive CLI: other OAuth apps and agent tokens are refused. Before accepting, test it on your mail: pass the request's tree to POST /v1/email-rules/test. To try it on an email that has not arrived, pass the request's tree to POST /v1/email-rules/test-sample with one you make up, or have look-alikes written (POST /v1/email-rules/look-alikes with request_id); neither stores anything. expectation_samples are kept on the rule it writes. Accepting also needs mail:share_own. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.",
14676
+ "description": "Writes the rule as yours, over your own mailboxes only, turns it on, and shares what it matches from now on with the member who asked: each email in full with its attachments, but never raw. It does not go back through mail already received. Send no body to accept it as asked, or change it first with english and tree together (and an explanation, or the server writes one). Because this gives your mail to someone else, it is limited to the dashboard and the Primitive CLI: other OAuth apps and agent tokens are refused. Before accepting, test it on your mail: pass the request's tree to POST /v1/email-rules/test. To try it on an email that has not arrived, pass the request's tree to POST /v1/email-rules/test-sample with one you make up, or have look-alikes written (POST /v1/email-rules/look-alikes with request_id); neither stores anything. expectation_samples are kept on the rule it writes. Accepting also needs mail:share_own. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
14564
14677
  "hasJsonBody": true,
14565
14678
  "method": "POST",
14566
14679
  "operationId": "acceptEmailRuleRequest",
@@ -14678,6 +14791,30 @@ const operationManifest = [
14678
14791
  "required": ["checked", "matched"]
14679
14792
  }, { "type": "null" }]
14680
14793
  },
14794
+ "conditions_breadth": {
14795
+ "description": "Ignored.",
14796
+ "anyOf": [{
14797
+ "type": "object",
14798
+ "properties": {
14799
+ "checked": {
14800
+ "type": "integer",
14801
+ "minimum": 0,
14802
+ "description": "Classified emails the conditions were decided for: of the newest 200 from the last 30 days in your own mailboxes (for a grant rule, those you may share), the ones you can still read."
14803
+ },
14804
+ "matched": {
14805
+ "type": "integer",
14806
+ "minimum": 0,
14807
+ "description": "Of those, how many they hold for (for a do-not-share rule, one they cannot decide counts)."
14808
+ }
14809
+ },
14810
+ "required": ["checked", "matched"]
14811
+ }, { "type": "null" }]
14812
+ },
14813
+ "kind": {
14814
+ "description": "Only grant.",
14815
+ "type": "string",
14816
+ "const": "grant"
14817
+ },
14681
14818
  "expectation_samples": {
14682
14819
  "description": "Made-up emails the rule must match or not, such as look-alikes it must never match, kept on the rule this accept writes.",
14683
14820
  "minItems": 1,
@@ -15355,7 +15492,7 @@ const operationManifest = [
15355
15492
  "binaryResponse": false,
15356
15493
  "bodyRequired": true,
15357
15494
  "command": "check-email-rule-request-target",
15358
- "description": "Says, before you ask, whether a member could accept a rule request now under their role, and if not, which permission their role lacks. Nothing is sent and nothing is recorded. Needs members:read, as listing members and their roles does. At most 60 checks an hour. Name them by user id, or by their member mailbox address or verified work email (counted with asking: at most 30 lookups by address an hour). Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.",
15495
+ "description": "Says, before you ask, whether a member could accept a rule request now under their role, and if not, which permission their role lacks. Nothing is sent and nothing is recorded. Needs members:read, as listing members and their roles does. At most 60 checks an hour. Name them by user id, or by their member mailbox address or verified work email (counted with asking: at most 30 lookups by address an hour). Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
15359
15496
  "hasJsonBody": true,
15360
15497
  "method": "POST",
15361
15498
  "operationId": "checkEmailRuleRequestTarget",
@@ -15437,7 +15574,7 @@ const operationManifest = [
15437
15574
  "binaryResponse": false,
15438
15575
  "bodyRequired": true,
15439
15576
  "command": "compile-email-rule",
15440
- "description": "Turns a plain-English description of which received emails to match into a rule tree over the column contract, with an explanation of what it matches, the assumptions made, and warnings for what the columns cannot express. Where the columns fall short it adds up to five yes/no questions, asked only after the conditions match; they read the subject, the new text and attachment file names, never attachment contents. Nothing is saved. For a rule with no questions, breadth counts, read only, how much of your recent classified mail its conditions match. include_sql returns the SQL it renders to. kind do_not_share compiles for recall. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.",
15577
+ "description": "Turns a plain-English description of which received emails to match into a rule tree over the column contract, with an explanation of what it matches, the assumptions made, and warnings for what the columns cannot express. Where the columns fall short it adds up to five yes/no questions, asked only after the conditions match; they read the subject, the new text and attachment file names, never attachment contents. Nothing is saved. For a rule with no questions, breadth counts, read only, how much of your recent classified mail its conditions match; for a grant rule with questions, conditions_breadth counts its conditions alone. include_sql returns the SQL it renders to. kind do_not_share compiles for recall. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
15441
15578
  "hasJsonBody": true,
15442
15579
  "method": "POST",
15443
15580
  "operationId": "compileEmailRule",
@@ -15520,12 +15657,17 @@ const operationManifest = [
15520
15657
  "warnings": {
15521
15658
  "type": "array",
15522
15659
  "items": { "type": "string" },
15523
- "description": "Parts of the description the column contract cannot express, and how the rule handles them. It also has notes on reading automated, from_mailing_list or sender_relationship, a sender address the description does not give, and a grant worded as a prohibition. When the rule has no questions and its conditions hold for all of the caller's recent classified mail (what a test of it covers by default), or for at least 90% of at least 20 emails, the first warning says so. That count is not made for a caller whose access shows headers only, or who could not run a test of the rule, and may also be skipped when the compile ran long or the count fails."
15660
+ "description": "Parts of the description the column contract cannot express, how the rule handles them, and the compiler's own notes on the rule (the Email Rules docs list them). When the rule has no questions and its conditions hold for nearly all of your recent mail (see breadth), or it is a grant rule whose conditions alone hold for over 20% of at least 20 emails (see conditions_breadth), the first warning says so."
15524
15661
  },
15525
15662
  "compiled_by": {
15526
15663
  "type": "string",
15527
15664
  "description": "An opaque name for the version of the rule compiler that produced the rule, such as rule-compiler-v1. Send it back as compiled_by when you save the rule."
15528
15665
  },
15666
+ "kind": {
15667
+ "description": "The kind it was compiled for. Send it with the tree to a test.",
15668
+ "type": "string",
15669
+ "enum": ["grant", "do_not_share"]
15670
+ },
15529
15671
  "breadth": {
15530
15672
  "description": "How many of your recent emails its conditions hold for, counted over your own mailboxes whatever scope you save it with, warning or not. Null when not counted in full: a rule with questions, headers-only access, no test of it possible as you, or a count that failed or ran out of time. Writes ignore it, so a compile answer (without include_sql) can be sent back unchanged.",
15531
15673
  "anyOf": [{
@@ -15545,6 +15687,25 @@ const operationManifest = [
15545
15687
  "required": ["checked", "matched"]
15546
15688
  }, { "type": "null" }]
15547
15689
  },
15690
+ "conditions_breadth": {
15691
+ "description": "For a grant rule with questions, breadth counted on its conditions alone: the emails its questions are asked about. Null for any other rule, or when not counted in full (as breadth).",
15692
+ "anyOf": [{
15693
+ "type": "object",
15694
+ "properties": {
15695
+ "checked": {
15696
+ "type": "integer",
15697
+ "minimum": 0,
15698
+ "description": "Classified emails the conditions were decided for: of the newest 200 from the last 30 days in your own mailboxes (for a grant rule, those you may share), the ones you can still read."
15699
+ },
15700
+ "matched": {
15701
+ "type": "integer",
15702
+ "minimum": 0,
15703
+ "description": "Of those, how many they hold for (for a do-not-share rule, one they cannot decide counts)."
15704
+ }
15705
+ },
15706
+ "required": ["checked", "matched"]
15707
+ }, { "type": "null" }]
15708
+ },
15548
15709
  "sql": {
15549
15710
  "description": "Present only when include_sql was true.",
15550
15711
  "type": "object",
@@ -15579,7 +15740,7 @@ const operationManifest = [
15579
15740
  "binaryResponse": false,
15580
15741
  "bodyRequired": true,
15581
15742
  "command": "create-email-rule",
15582
- "description": "Saves a rule as version 1 from a compile response or a tree you wrote, checked against the column contract. It starts in observe (recorded, nothing granted or blocked) unless state is draft, or active for a do_not_share rule. You are its author, and it never reaches mail you cannot read. evaluation_scope is own_mailboxes unless you name author or selected (scope_selection names only what you can read). expectations are judged in expectations_check. kind do_not_share blocks sharing what it matches; a key cannot list it (details.reason rule_blocks_sharing). Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.",
15743
+ "description": "Saves a rule as version 1 from a compile response or a tree you wrote, checked against the column contract. It starts in observe (recorded, nothing granted or blocked) unless state is draft, or active for a do_not_share rule. You are its author, and it never reaches mail you cannot read. evaluation_scope is own_mailboxes unless you name author or selected (scope_selection names only what you can read). expectations are judged in expectations_check. kind do_not_share blocks sharing what it matches; a key cannot list it (details.reason rule_blocks_sharing). Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
15583
15744
  "hasJsonBody": true,
15584
15745
  "method": "POST",
15585
15746
  "operationId": "createEmailRule",
@@ -15869,6 +16030,25 @@ const operationManifest = [
15869
16030
  },
15870
16031
  "required": ["checked", "matched"]
15871
16032
  }, { "type": "null" }]
16033
+ },
16034
+ "conditions_breadth": {
16035
+ "description": "Ignored.",
16036
+ "anyOf": [{
16037
+ "type": "object",
16038
+ "properties": {
16039
+ "checked": {
16040
+ "type": "integer",
16041
+ "minimum": 0,
16042
+ "description": "Classified emails the conditions were decided for: of the newest 200 from the last 30 days in your own mailboxes (for a grant rule, those you may share), the ones you can still read."
16043
+ },
16044
+ "matched": {
16045
+ "type": "integer",
16046
+ "minimum": 0,
16047
+ "description": "Of those, how many they hold for (for a do-not-share rule, one they cannot decide counts)."
16048
+ }
16049
+ },
16050
+ "required": ["checked", "matched"]
16051
+ }, { "type": "null" }]
15872
16052
  }
15873
16053
  },
15874
16054
  "required": [
@@ -16292,6 +16472,10 @@ const operationManifest = [
16292
16472
  "endpoints",
16293
16473
  "shares_ended"
16294
16474
  ]
16475
+ },
16476
+ "notice": {
16477
+ "description": "After a write that saved a version of an active rule keys or webhooks read without checking it first: what it changes, and how to have the next one checked.",
16478
+ "type": "string"
16295
16479
  }
16296
16480
  },
16297
16481
  "required": [
@@ -16315,7 +16499,7 @@ const operationManifest = [
16315
16499
  "binaryResponse": false,
16316
16500
  "bodyRequired": true,
16317
16501
  "command": "create-email-rule-request",
16318
- "description": "Asks another member of the organization for a rule over their own mail, from a compile response or a tree you wrote. Name them by user id, or by their member mailbox address, or by their verified work email if you can list members (at most 30 lookups by address an hour). Nothing is evaluated or shared until they accept, and they may change the rule first. A message (up to 500 characters, fixed once sent) tells them why you ask. At most 5 pending requests to one member and 50 in all. With members:read the answer says whether they can accept it under their role (target_can_accept, target_warning); POST /v1/email-rule-requests/target-check checks first. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.",
16502
+ "description": "Asks another member of the organization for a rule over their own mail, from a compile response or a tree you wrote. Name them by user id, or by their member mailbox address, or by their verified work email if you can list members (at most 30 lookups by address an hour). Nothing is evaluated or shared until they accept, and they may change the rule first. A message (up to 500 characters, fixed once sent) tells them why you ask. At most 5 pending requests to one member and 50 in all. With members:read the answer says whether they can accept it under their role (target_can_accept, target_warning); POST /v1/email-rule-requests/target-check checks first. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
16319
16503
  "hasJsonBody": true,
16320
16504
  "method": "POST",
16321
16505
  "operationId": "createEmailRuleRequest",
@@ -16444,6 +16628,30 @@ const operationManifest = [
16444
16628
  },
16445
16629
  "required": ["checked", "matched"]
16446
16630
  }, { "type": "null" }]
16631
+ },
16632
+ "conditions_breadth": {
16633
+ "description": "Ignored.",
16634
+ "anyOf": [{
16635
+ "type": "object",
16636
+ "properties": {
16637
+ "checked": {
16638
+ "type": "integer",
16639
+ "minimum": 0,
16640
+ "description": "Classified emails the conditions were decided for: of the newest 200 from the last 30 days in your own mailboxes (for a grant rule, those you may share), the ones you can still read."
16641
+ },
16642
+ "matched": {
16643
+ "type": "integer",
16644
+ "minimum": 0,
16645
+ "description": "Of those, how many they hold for (for a do-not-share rule, one they cannot decide counts)."
16646
+ }
16647
+ },
16648
+ "required": ["checked", "matched"]
16649
+ }, { "type": "null" }]
16650
+ },
16651
+ "kind": {
16652
+ "description": "Only grant.",
16653
+ "type": "string",
16654
+ "const": "grant"
16447
16655
  }
16448
16656
  },
16449
16657
  "required": [
@@ -16659,7 +16867,7 @@ const operationManifest = [
16659
16867
  "binaryResponse": false,
16660
16868
  "bodyRequired": false,
16661
16869
  "command": "decline-email-rule-request",
16662
- "description": "Declines a pending request made to you. Nothing is written but the decision and, if you give one, its reason (reason, up to 500 characters), which the member who asked sees with the request. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.",
16870
+ "description": "Declines a pending request made to you. Nothing is written but the decision and, if you give one, its reason (reason, up to 500 characters), which the member who asked sees with the request. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
16663
16871
  "hasJsonBody": true,
16664
16872
  "method": "POST",
16665
16873
  "operationId": "declineEmailRuleRequest",
@@ -16889,7 +17097,7 @@ const operationManifest = [
16889
17097
  "binaryResponse": false,
16890
17098
  "bodyRequired": false,
16891
17099
  "command": "delete-email-rule",
16892
- "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 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, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.",
17100
+ "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 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).",
16893
17101
  "hasJsonBody": false,
16894
17102
  "method": "DELETE",
16895
17103
  "operationId": "deleteEmailRule",
@@ -16954,7 +17162,7 @@ const operationManifest = [
16954
17162
  "binaryResponse": false,
16955
17163
  "bodyRequired": false,
16956
17164
  "command": "delete-email-rule-request",
16957
- "description": "Deletes a request you withdrew, for everyone who could see it. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.",
17165
+ "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).",
16958
17166
  "hasJsonBody": false,
16959
17167
  "method": "DELETE",
16960
17168
  "operationId": "deleteEmailRuleRequest",
@@ -17021,7 +17229,7 @@ const operationManifest = [
17021
17229
  "binaryResponse": false,
17022
17230
  "bodyRequired": true,
17023
17231
  "command": "generate-look-alikes",
17024
- "description": "Writes made-up emails that come close to what a grant rule describes, and reports what the rule decides for each, as test-sample would. Most should not match (expected no_match): business near misses from its senders and topic (kind other: an all-clear, a reply with nothing new, a related document, another subject) and private mail (a personal medical bill, pay for named people, a personal purchase, personal banking or tax). By default a third, rounded down, are near cases it should match (expected match, kind other). failed means the rule decided one against expected. Nothing is stored and no mail is read. Keep them, with their expected, with add_expectation_samples, or for a request with the accept's expectation_samples. Limited to 20 an hour per member. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.",
17232
+ "description": "Writes made-up emails that come close to what a grant rule describes, and reports what the rule decides for each, as test-sample would. Most should not match (expected no_match): business near misses from its senders and topic (kind other: an all-clear, a reply with nothing new, a related document, another subject) and private mail (a personal medical bill, pay for named people, a personal purchase, personal banking or tax). By default a third, rounded down, are near cases it should match (expected match, kind other). failed means the rule decided one against expected. Nothing is stored and no mail is read. Keep them, with their expected, with add_expectation_samples, or for a request with the accept's expectation_samples. Limited to 20 an hour per member. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
17025
17233
  "hasJsonBody": true,
17026
17234
  "method": "POST",
17027
17235
  "operationId": "generateLookAlikes",
@@ -17173,7 +17381,16 @@ const operationManifest = [
17173
17381
  "type": ["integer", "null"],
17174
17382
  "exclusiveMinimum": 0
17175
17383
  },
17176
- "vocabulary": { "type": "string" }
17384
+ "vocabulary": { "type": "string" },
17385
+ "kind": {
17386
+ "description": "The kind it was tested as.",
17387
+ "type": "string",
17388
+ "enum": ["grant", "do_not_share"]
17389
+ },
17390
+ "note": {
17391
+ "description": "Present when a tree was sent without kind, so it was tested as grant.",
17392
+ "type": "string"
17393
+ }
17177
17394
  },
17178
17395
  "required": [
17179
17396
  "id",
@@ -17341,7 +17558,7 @@ const operationManifest = [
17341
17558
  "binaryResponse": false,
17342
17559
  "bodyRequired": false,
17343
17560
  "command": "get-email-rule",
17344
- "description": "A rule, its scope (evaluation_scope, and scope_selection for a selected rule), its current version and its saved expectations. The current version's text (english, tree, explanation, assumptions, warnings) is under current, and current_version is its number. What the scope comes to for its author now is GET /email-rules/{id}/scope. The SQL the version renders to is included only when include_sql is true. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.",
17561
+ "description": "A rule, its scope (evaluation_scope, and scope_selection for a selected rule), its current version and its saved expectations. The current version's text (english, tree, explanation, assumptions, warnings) is under current, and current_version is its number. What the scope comes to for its author now is GET /email-rules/{id}/scope. The SQL the version renders to is included only when include_sql is true. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
17345
17562
  "hasJsonBody": false,
17346
17563
  "method": "GET",
17347
17564
  "operationId": "getEmailRule",
@@ -17699,7 +17916,7 @@ const operationManifest = [
17699
17916
  "binaryResponse": false,
17700
17917
  "bodyRequired": false,
17701
17918
  "command": "get-email-rule-request",
17702
- "description": "A rule request: the rule as proposed, who made it and to whom, and whether each of them is still a member. A request is visible to the member who made it, the member it was made to, and the organization's owners and admins. If you are the member asked, you can try the rule as proposed before answering: pass the request's tree to POST /v1/email-rules/test to test it on mail you have received. To try it on an email that has not arrived, pass the request's tree to POST /v1/email-rules/test-sample with one you make up, or have look-alikes written (POST /v1/email-rules/look-alikes with request_id); neither stores anything. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.",
17919
+ "description": "A rule request: the rule as proposed, who made it and to whom, and whether each of them is still a member. A request is visible to the member who made it, the member it was made to, and the organization's owners and admins. If you are the member asked, you can try the rule as proposed before answering: pass the request's tree to POST /v1/email-rules/test to test it on mail you have received. To try it on an email that has not arrived, pass the request's tree to POST /v1/email-rules/test-sample with one you make up, or have look-alikes written (POST /v1/email-rules/look-alikes with request_id); neither stores anything. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
17703
17920
  "hasJsonBody": false,
17704
17921
  "method": "GET",
17705
17922
  "operationId": "getEmailRuleRequest",
@@ -17914,7 +18131,7 @@ const operationManifest = [
17914
18131
  "binaryResponse": false,
17915
18132
  "bodyRequired": false,
17916
18133
  "command": "get-email-rule-scope",
17917
- "description": "Whose mail the rule runs over, and what that comes to now: a rule never reaches further than what its author can read when it runs, so what a selected rule names and its author can no longer read stops matching. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.",
18134
+ "description": "Whose mail the rule runs over, and what that comes to now: a rule never reaches further than what its author can read when it runs, so what a selected rule names and its author can no longer read stops matching. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
17918
18135
  "hasJsonBody": false,
17919
18136
  "method": "GET",
17920
18137
  "operationId": "getEmailRuleScope",
@@ -18047,7 +18264,7 @@ const operationManifest = [
18047
18264
  "binaryResponse": false,
18048
18265
  "bodyRequired": false,
18049
18266
  "command": "get-email-rule-share",
18050
- "description": "One share. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.",
18267
+ "description": "One share. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
18051
18268
  "hasJsonBody": false,
18052
18269
  "method": "GET",
18053
18270
  "operationId": "getEmailRuleShare",
@@ -18230,7 +18447,7 @@ const operationManifest = [
18230
18447
  "binaryResponse": false,
18231
18448
  "bodyRequired": false,
18232
18449
  "command": "get-email-rule-vocabulary",
18233
- "description": "What a rule tree you write yourself can say: each column of the current vocabulary with its type, source, meaning, operators and the value each takes, options, and whether it takes min_confidence; and the tree's limits, its stored size included. Built from the checks a saved or tested tree must pass. A tree is {version: tree_version, vocabulary: version, when, questions}. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.",
18450
+ "description": "What a rule tree you write yourself can say: each column of the current vocabulary with its type, source, meaning, operators and the value each takes, options, and whether it takes min_confidence; and the tree's limits, its stored size included. Built from the checks a saved or tested tree must pass. A tree is {version: tree_version, vocabulary: version, when, questions}. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
18234
18451
  "hasJsonBody": false,
18235
18452
  "method": "GET",
18236
18453
  "operationId": "getEmailRuleVocabulary",
@@ -18404,7 +18621,7 @@ const operationManifest = [
18404
18621
  "binaryResponse": false,
18405
18622
  "bodyRequired": false,
18406
18623
  "command": "list-email-rule-decisions",
18407
- "description": "What the rule decided for each email it was evaluated against, newest first: whether it matched, whether it nearly did, how each part decided and the answers to its questions, with which email it was (from_address, subject, received_at). Only decisions on emails the caller can read are listed. With matched, only matches (true) or only the rest (false). Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.",
18624
+ "description": "What the rule decided for each email it was evaluated against, newest first: whether it matched, whether it nearly did, how each part decided and the answers to its questions, with which email it was (from_address, subject, received_at). Only decisions on emails the caller can read are listed. With matched, only matches (true) or only the rest (false). Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
18408
18625
  "hasJsonBody": false,
18409
18626
  "method": "GET",
18410
18627
  "operationId": "listEmailRuleDecisions",
@@ -18560,7 +18777,7 @@ const operationManifest = [
18560
18777
  "binaryResponse": false,
18561
18778
  "bodyRequired": false,
18562
18779
  "command": "list-email-rule-requests",
18563
- "description": "Rule requests, newest first: those made to you (box incoming, the default), those you made (outgoing), or every one you can see (all). Pending ones by default; status decided lists accepted, declined and withdrawn ones, and any lists both. A request is visible to the member who made it, the member it was made to, and the organization's owners and admins. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.",
18780
+ "description": "Rule requests, newest first: those made to you (box incoming, the default), those you made (outgoing), or every one you can see (all). Pending ones by default; status decided lists accepted, declined and withdrawn ones, and any lists both. A request is visible to the member who made it, the member it was made to, and the organization's owners and admins. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
18564
18781
  "hasJsonBody": false,
18565
18782
  "method": "GET",
18566
18783
  "operationId": "listEmailRuleRequests",
@@ -18814,7 +19031,7 @@ const operationManifest = [
18814
19031
  "binaryResponse": false,
18815
19032
  "bodyRequired": false,
18816
19033
  "command": "list-email-rule-results",
18817
- "description": "What each rule you can see decided about this email (matched, not matched, or not run), in the words of the deciding version. A do_not_share rule that matched it blocks sharing while active; earlier shares stay. Only a caller who can read the email gets an answer. classification is every fact the classifier read, as rule conditions read it. At most 50 rules are listed, results first; not_listed counts the rest. Another member's rule that decided on your own mail is listed read_only (dashboard and CLI only), with who receives what it shares (receivers) while it covers you; hidden counts deciding rules you cannot see. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.",
19034
+ "description": "What each rule you can see decided about this email (matched, not matched, or not run), in the words of the deciding version. A do_not_share rule that matched it blocks sharing while active; earlier shares stay. Only a caller who can read the email gets an answer. classification is every fact the classifier read, as rule conditions read it. At most 50 rules are listed, results first; not_listed counts the rest. Another member's rule that decided on your own mail is listed read_only (dashboard and CLI only), with who receives what it shares (receivers) while it covers you; hidden counts deciding rules you cannot see. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
18818
19035
  "hasJsonBody": false,
18819
19036
  "method": "GET",
18820
19037
  "operationId": "listEmailRuleResults",
@@ -19116,7 +19333,7 @@ const operationManifest = [
19116
19333
  },
19117
19334
  "required": ["owner", "count"]
19118
19335
  },
19119
- "description": "API keys that work now (not revoked, expired or suspended) whose access lists the rule, or its live share: they read what it matches. Owner: the member who holds each, or the organization."
19336
+ "description": "API keys that work now (not revoked, expired or suspended) and hold mail:read, whose access lists the rule or its live share. Owner: who holds each, or the organization."
19120
19337
  },
19121
19338
  "webhooks": {
19122
19339
  "type": "array",
@@ -19157,11 +19374,21 @@ const operationManifest = [
19157
19374
  "count": {
19158
19375
  "type": "integer",
19159
19376
  "exclusiveMinimum": 0
19377
+ },
19378
+ "hosts": {
19379
+ "description": "Distinct sites they deliver to (a host's registrable domain, or a tunnel, preview or function service alone), sorted, at most 10; \"unknown host\" (last) for any that cannot be named.",
19380
+ "type": "array",
19381
+ "items": { "type": "string" }
19382
+ },
19383
+ "hosts_not_listed": {
19384
+ "description": "Hosts past those listed.",
19385
+ "type": "integer",
19386
+ "minimum": 0
19160
19387
  }
19161
19388
  },
19162
19389
  "required": ["owner", "count"]
19163
19390
  },
19164
- "description": "Webhooks that are sent what it matches: those whose key, as delivery acts as it, lists the rule or its live share (owner: the member who holds that key, or the organization), and the webhooks of the member the rule is shared with (owner: that member)."
19391
+ "description": "Webhooks taking received mail, bounces or reports that are sent what it matches: those of the key delivery acts as, when it lists the rule or its live share (owner: its holder, or the organization), and those of the member it is shared with (owner: that member)."
19165
19392
  },
19166
19393
  "shares": {
19167
19394
  "type": "array",
@@ -19198,7 +19425,7 @@ const operationManifest = [
19198
19425
  },
19199
19426
  "required": ["beneficiary", "count"]
19200
19427
  },
19201
- "description": "The rule's live share, if it has one (a rule is shared at most once): the member it gives what it matches to."
19428
+ "description": "The rule's live share (at most one), by its member, if they can read it and it is among their newest 20 shares."
19202
19429
  }
19203
19430
  },
19204
19431
  "required": [
@@ -19291,7 +19518,7 @@ const operationManifest = [
19291
19518
  "binaryResponse": false,
19292
19519
  "bodyRequired": false,
19293
19520
  "command": "list-email-rule-scope-options",
19294
- "description": "How much the caller can read, and the inboxes and domains the caller can read, which is what they may name when a rule runs over selected inboxes and domains. For a caller who reads the whole organization, addresses lists the inboxes known as someone's (member addresses, members' verified work emails at the organization's domains, agents' addresses and inboxes with shared access), not every address that receives mail: may_name_unlisted says when an address that is not listed, such as an inbox nobody has claimed, may be named too. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.",
19521
+ "description": "How much the caller can read, and the inboxes and domains the caller can read, which is what they may name when a rule runs over selected inboxes and domains. For a caller who reads the whole organization, addresses lists the inboxes known as someone's (member addresses, members' verified work emails at the organization's domains, agents' addresses and inboxes with shared access), not every address that receives mail: may_name_unlisted says when an address that is not listed, such as an inbox nobody has claimed, may be named too. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
19295
19522
  "hasJsonBody": false,
19296
19523
  "method": "GET",
19297
19524
  "operationId": "listEmailRuleScopeOptions",
@@ -19401,6 +19628,34 @@ const operationManifest = [
19401
19628
  "items": {
19402
19629
  "type": "object",
19403
19630
  "properties": {
19631
+ "imported": {
19632
+ "type": ["object", "null"],
19633
+ "properties": {
19634
+ "from": {
19635
+ "type": "string",
19636
+ "const": "google_workspace"
19637
+ },
19638
+ "method": {
19639
+ "type": "string",
19640
+ "const": "primitive_direct"
19641
+ },
19642
+ "verification": {
19643
+ "type": "string",
19644
+ "const": "provider_fetched"
19645
+ },
19646
+ "at": {
19647
+ "type": "string",
19648
+ "format": "date-time"
19649
+ }
19650
+ },
19651
+ "required": [
19652
+ "from",
19653
+ "method",
19654
+ "verification",
19655
+ "at"
19656
+ ],
19657
+ "default": null
19658
+ },
19404
19659
  "delivery_report": {
19405
19660
  "type": ["object", "null"],
19406
19661
  "properties": {
@@ -19638,6 +19893,7 @@ const operationManifest = [
19638
19893
  }
19639
19894
  },
19640
19895
  "required": [
19896
+ "imported",
19641
19897
  "id",
19642
19898
  "message_id",
19643
19899
  "domain_id",
@@ -19676,7 +19932,7 @@ const operationManifest = [
19676
19932
  "binaryResponse": false,
19677
19933
  "bodyRequired": false,
19678
19934
  "command": "list-email-rule-shares",
19679
- "description": "Lists rules shared with you, rules you share, or every share you can see. A share is visible to its two people and the organization's owners and admins. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.",
19935
+ "description": "Lists rules shared with you, rules you share, or every share you can see. A share is visible to its two people and the organization's owners and admins. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
19680
19936
  "hasJsonBody": false,
19681
19937
  "method": "GET",
19682
19938
  "operationId": "listEmailRuleShares",
@@ -19898,7 +20154,7 @@ const operationManifest = [
19898
20154
  "binaryResponse": false,
19899
20155
  "bodyRequired": false,
19900
20156
  "command": "list-email-rule-versions",
19901
- "description": "A rule's versions as they were written: what each one's conditions and questions were, so a decision can be read against the version that made it. Without versions, every version newest first, a page at a time (meta.cursor). With versions, only those named, oldest first; numbers that are not versions of the rule are left out. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.",
20157
+ "description": "A rule's versions as they were written: what each one's conditions and questions were, so a decision can be read against the version that made it. Without versions, every version newest first, a page at a time (meta.cursor). With versions, only those named, oldest first; numbers that are not versions of the rule are left out. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
19902
20158
  "hasJsonBody": false,
19903
20159
  "method": "GET",
19904
20160
  "operationId": "listEmailRuleVersions",
@@ -20036,7 +20292,7 @@ const operationManifest = [
20036
20292
  "binaryResponse": false,
20037
20293
  "bodyRequired": false,
20038
20294
  "command": "list-email-rules",
20039
- "description": "The rules the caller can see, newest first: their own, or every member's rules for a caller who reads the whole organization's mail. Each carries its scope (evaluation_scope, and scope_selection for a selected rule) and current_version, but not the version's text: read that under current from GET /email-rules/{id}. With matched_email_id, only the rules that matched that email. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.",
20295
+ "description": "The rules the caller can see, newest first: their own, or every member's rules for a caller who reads the whole organization's mail. Each carries its scope (evaluation_scope, and scope_selection for a selected rule) and current_version, but not the version's text: read that under current from GET /email-rules/{id}. With matched_email_id, only the rules that matched that email. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
20040
20296
  "hasJsonBody": false,
20041
20297
  "method": "GET",
20042
20298
  "operationId": "listEmailRules",
@@ -20404,7 +20660,7 @@ const operationManifest = [
20404
20660
  "binaryResponse": false,
20405
20661
  "bodyRequired": true,
20406
20662
  "command": "test-email-rule",
20407
- "description": "Runs a rule over received mail and reports what it would decide for each email (matched, near_miss, no_match, unclassified, skipped or not_found), with a summary of how each top-level condition and question decided. Test an unsaved tree, or a saved rule by rule_id (its current version, as its author). It reads only mail its author can read and its scope covers. Without email_ids it tests the newest emails, at most 200 and none older than 30 days, plus any expected ones. Unclassified emails over 2 hours old are classified first unless classify_missing is false. It records no decision and grants nothing, and stops at about 90 seconds. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.",
20663
+ "description": "Runs a rule over received mail and reports what it would decide for each email (matched, near_miss, no_match, unclassified, skipped or not_found), with a summary of how each top-level condition and question decided. Test an unsaved tree, or a saved rule by rule_id (its current version, as its author). It reads only mail its author can read and its scope covers. A rule you see only because it covers your own mailboxes runs as you, over only those, from the dashboard or the Primitive CLI. Without email_ids it tests the newest emails, at most 200 and none older than 30 days, plus any expected ones. Unclassified emails over 2 hours old are classified first unless classify_missing is false. It records no decision and grants nothing, and stops at about 90 seconds. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
20408
20664
  "hasJsonBody": true,
20409
20665
  "method": "POST",
20410
20666
  "operationId": "testEmailRule",
@@ -20490,7 +20746,7 @@ const operationManifest = [
20490
20746
  "description": "For a selected rule: inboxes, and domains (each address at them the author reads); each one you can read."
20491
20747
  },
20492
20748
  "rule_id": {
20493
- "description": "A saved rule you can see. Its current version is tested, with its author's access.",
20749
+ "description": "A saved rule you can see. Its current version is tested, with its author's access; one you see only because it covers your mailboxes, with yours, over only those (dashboard or Primitive CLI only).",
20494
20750
  "type": "string",
20495
20751
  "format": "uuid"
20496
20752
  },
@@ -20657,7 +20913,16 @@ const operationManifest = [
20657
20913
  "type": ["integer", "null"],
20658
20914
  "exclusiveMinimum": 0
20659
20915
  },
20660
- "vocabulary": { "type": "string" }
20916
+ "vocabulary": { "type": "string" },
20917
+ "kind": {
20918
+ "description": "The kind it was tested as.",
20919
+ "type": "string",
20920
+ "enum": ["grant", "do_not_share"]
20921
+ },
20922
+ "note": {
20923
+ "description": "Present when a tree was sent without kind, so it was tested as grant.",
20924
+ "type": "string"
20925
+ }
20661
20926
  },
20662
20927
  "required": [
20663
20928
  "id",
@@ -21182,7 +21447,7 @@ const operationManifest = [
21182
21447
  "binaryResponse": false,
21183
21448
  "bodyRequired": true,
21184
21449
  "command": "test-email-rule-on-sample",
21185
- "description": "Reports what a rule would decide for an email you describe (sender, recipients, subject, plain text, attachment types; optionally automated, from a mailing list, and a spam score), classified and decided as received mail would be. A rule reading a spam score you gave none for decides on none (unset_columns). Nothing is stored. Test an unsaved tree or a saved rule by rule_id. The answer includes what the classifier read. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.",
21450
+ "description": "Reports what a rule would decide for an email you describe (sender, recipients, subject, plain text, attachment types; optionally automated, from a mailing list, and a spam score), classified and decided as received mail would be. A rule reading a spam score you gave none for decides on none (unset_columns). Nothing is stored. Test an unsaved tree or a saved rule by rule_id. The answer includes what the classifier read. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
21186
21451
  "hasJsonBody": true,
21187
21452
  "method": "POST",
21188
21453
  "operationId": "testEmailRuleOnSample",
@@ -21380,7 +21645,16 @@ const operationManifest = [
21380
21645
  "type": ["integer", "null"],
21381
21646
  "exclusiveMinimum": 0
21382
21647
  },
21383
- "vocabulary": { "type": "string" }
21648
+ "vocabulary": { "type": "string" },
21649
+ "kind": {
21650
+ "description": "The kind it was tested as.",
21651
+ "type": "string",
21652
+ "enum": ["grant", "do_not_share"]
21653
+ },
21654
+ "note": {
21655
+ "description": "Present when a tree was sent without kind, so it was tested as grant.",
21656
+ "type": "string"
21657
+ }
21384
21658
  },
21385
21659
  "required": [
21386
21660
  "id",
@@ -21529,7 +21803,7 @@ const operationManifest = [
21529
21803
  "binaryResponse": false,
21530
21804
  "bodyRequired": true,
21531
21805
  "command": "update-email-rule",
21532
- "description": "Renames the rule, saves a new version (english and tree together; earlier versions stay) or restores one (restore_version), changes its state (draft is off; observe; active), its scope (evaluation_scope, with scope_selection when selected) or its saved expectations (judged in expectations_check). Anyone but its author who sees it may only set state draft, and while it is shared only if they manage members from the dashboard. A scope change saves a new version; a shared rule keeps its scope, and a kind never changes. A saved version takes effect at once. if_version refuses a write once a version was saved since you read it; if_revision, once anything changed. Without if_expectations_pass a version is saved even when its expectations fail. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.",
21806
+ "description": "Renames the rule, saves a new version (english and tree together; earlier versions stay) or restores one (restore_version), changes its state (draft is off; observe; active), its scope (evaluation_scope, with scope_selection when selected) or its saved expectations (judged in expectations_check). Anyone but its author who sees it may only set state draft, and while it is shared only if they manage members from the dashboard. A scope change saves a new version; a shared rule keeps its scope, and a kind never changes. A saved version takes effect at once. if_version refuses a write once a version was saved since you read it; if_revision, once anything changed. Without if_expectations_pass a version is saved even when its expectations fail, except on an active rule keys or webhooks read: that write is checked first unless if_expectations_pass is false. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
21533
21807
  "hasJsonBody": true,
21534
21808
  "method": "PATCH",
21535
21809
  "operationId": "updateEmailRule",
@@ -21650,6 +21924,30 @@ const operationManifest = [
21650
21924
  "required": ["checked", "matched"]
21651
21925
  }, { "type": "null" }]
21652
21926
  },
21927
+ "conditions_breadth": {
21928
+ "description": "Ignored.",
21929
+ "anyOf": [{
21930
+ "type": "object",
21931
+ "properties": {
21932
+ "checked": {
21933
+ "type": "integer",
21934
+ "minimum": 0,
21935
+ "description": "Classified emails the conditions were decided for: of the newest 200 from the last 30 days in your own mailboxes (for a grant rule, those you may share), the ones you can still read."
21936
+ },
21937
+ "matched": {
21938
+ "type": "integer",
21939
+ "minimum": 0,
21940
+ "description": "Of those, how many they hold for (for a do-not-share rule, one they cannot decide counts)."
21941
+ }
21942
+ },
21943
+ "required": ["checked", "matched"]
21944
+ }, { "type": "null" }]
21945
+ },
21946
+ "kind": {
21947
+ "description": "Must be the rule's own (400 kind_mismatch).",
21948
+ "type": "string",
21949
+ "enum": ["grant", "do_not_share"]
21950
+ },
21653
21951
  "evaluation_scope": {
21654
21952
  "type": "string",
21655
21953
  "enum": [
@@ -21932,7 +22230,7 @@ const operationManifest = [
21932
22230
  "maximum": 2147483647
21933
22231
  },
21934
22232
  "if_expectations_pass": {
21935
- "description": "true: judge the rule as this write leaves it (new tree, restored version, new scope, or the version it activates) against the expectations it leaves, as POST /email-rules/test would, before saving; it can take as long as a test. Failed: 409 expectations_failed; on emails the rule cannot read: 409 expectations_unreadable; undecided: 409 expectations_undecided (each with details.expectations_check); none to judge: 400 no_expectations. Refused writes save nothing; a pass saves unless the rule moved meanwhile (409 email_rule_conflict). Only writes that save a version or activate the rule are judged.",
22233
+ "description": "true: judge the rule as this write leaves it (new tree, restored version, new scope, or the version it activates) against the expectations it leaves, as POST /email-rules/test would, before saving; it can take as long as a test. Failed: 409 expectations_failed; on emails the rule cannot read: 409 expectations_unreadable; undecided: 409 expectations_undecided (each with details.expectations_check); none to judge: 400 no_expectations. Refused writes save nothing; a pass saves unless the rule moved meanwhile (409 email_rule_conflict). Only writes that save a version or activate the rule are judged. Omitted: judged as with true when the write saves a version or changes the scope of an active rule that API keys or webhooks read and that has expectations. false: never judged first.",
21936
22234
  "type": "boolean"
21937
22235
  },
21938
22236
  "restore_version": {
@@ -22358,6 +22656,10 @@ const operationManifest = [
22358
22656
  "endpoints",
22359
22657
  "shares_ended"
22360
22658
  ]
22659
+ },
22660
+ "notice": {
22661
+ "description": "After a write that saved a version of an active rule keys or webhooks read without checking it first: what it changes, and how to have the next one checked.",
22662
+ "type": "string"
22361
22663
  }
22362
22664
  },
22363
22665
  "required": [
@@ -22381,7 +22683,7 @@ const operationManifest = [
22381
22683
  "binaryResponse": false,
22382
22684
  "bodyRequired": false,
22383
22685
  "command": "withdraw-email-rule-request",
22384
- "description": "Withdraws a pending request you made. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.",
22686
+ "description": "Withdraws a pending request you made. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
22385
22687
  "hasJsonBody": false,
22386
22688
  "method": "POST",
22387
22689
  "operationId": "withdrawEmailRuleRequest",
@@ -23078,6 +23380,35 @@ const operationManifest = [
23078
23380
  },
23079
23381
  "description": "Attachment metadata for this message, each item as its own detail read reports it: `parsed.attachments` on `/emails/{id}` for inbound, `attachments` on `/sent-emails/{id}` for outbound, in the same order. Empty when there are none or an inbound message has no parsed content. No bytes or download URLs; download a part with `/emails/{id}/attachments/{part_index}` or `/sent-emails/{id}/attachments/{part_index}`."
23080
23382
  },
23383
+ "imported": {
23384
+ "type": ["object", "null"],
23385
+ "description": "Historical acquisition; never sender or SMTP delivery proof. Null for live mail. Excluded from live tails and deltas.",
23386
+ "required": [
23387
+ "from",
23388
+ "method",
23389
+ "verification",
23390
+ "at"
23391
+ ],
23392
+ "properties": {
23393
+ "from": {
23394
+ "type": "string",
23395
+ "enum": ["google_workspace"]
23396
+ },
23397
+ "method": {
23398
+ "type": "string",
23399
+ "enum": ["primitive_direct"]
23400
+ },
23401
+ "verification": {
23402
+ "type": "string",
23403
+ "enum": ["provider_fetched"]
23404
+ },
23405
+ "at": {
23406
+ "type": "string",
23407
+ "format": "date-time",
23408
+ "description": "When Primitive acquired this historical message."
23409
+ }
23410
+ }
23411
+ },
23081
23412
  "copies": {
23082
23413
  "type": "array",
23083
23414
  "items": {
@@ -23941,6 +24272,35 @@ const operationManifest = [
23941
24272
  }
23942
24273
  }
23943
24274
  },
24275
+ "imported": {
24276
+ "type": ["object", "null"],
24277
+ "description": "Historical acquisition; never sender or SMTP delivery proof. Null for live mail. Excluded from live tails and deltas.",
24278
+ "required": [
24279
+ "from",
24280
+ "method",
24281
+ "verification",
24282
+ "at"
24283
+ ],
24284
+ "properties": {
24285
+ "from": {
24286
+ "type": "string",
24287
+ "enum": ["google_workspace"]
24288
+ },
24289
+ "method": {
24290
+ "type": "string",
24291
+ "enum": ["primitive_direct"]
24292
+ },
24293
+ "verification": {
24294
+ "type": "string",
24295
+ "enum": ["provider_fetched"]
24296
+ },
24297
+ "at": {
24298
+ "type": "string",
24299
+ "format": "date-time",
24300
+ "description": "When Primitive acquired this historical message."
24301
+ }
24302
+ }
24303
+ },
23944
24304
  "snippet": {
23945
24305
  "type": ["string", "null"],
23946
24306
  "maxLength": 200,
@@ -23970,6 +24330,7 @@ const operationManifest = [
23970
24330
  "from_verified",
23971
24331
  "from_header_email",
23972
24332
  "from_name",
24333
+ "imported",
23973
24334
  "snippet"
23974
24335
  ]
23975
24336
  },
@@ -24030,6 +24391,7 @@ const operationManifest = [
24030
24391
  "type": "object",
24031
24392
  "description": "What an inbound email says, as plain text, with the fields that identify it.",
24032
24393
  "required": [
24394
+ "imported",
24033
24395
  "id",
24034
24396
  "thread_id",
24035
24397
  "received_at",
@@ -24050,6 +24412,35 @@ const operationManifest = [
24050
24412
  "attachments"
24051
24413
  ],
24052
24414
  "properties": {
24415
+ "imported": {
24416
+ "type": ["object", "null"],
24417
+ "description": "Historical acquisition; never sender or SMTP delivery proof. Null for live mail. Excluded from live tails and deltas.",
24418
+ "required": [
24419
+ "from",
24420
+ "method",
24421
+ "verification",
24422
+ "at"
24423
+ ],
24424
+ "properties": {
24425
+ "from": {
24426
+ "type": "string",
24427
+ "enum": ["google_workspace"]
24428
+ },
24429
+ "method": {
24430
+ "type": "string",
24431
+ "enum": ["primitive_direct"]
24432
+ },
24433
+ "verification": {
24434
+ "type": "string",
24435
+ "enum": ["provider_fetched"]
24436
+ },
24437
+ "at": {
24438
+ "type": "string",
24439
+ "format": "date-time",
24440
+ "description": "When Primitive acquired this historical message."
24441
+ }
24442
+ }
24443
+ },
24053
24444
  "id": {
24054
24445
  "type": "string",
24055
24446
  "format": "uuid",
@@ -24854,6 +25245,35 @@ const operationManifest = [
24854
25245
  "format": "uuid",
24855
25246
  "description": "With `group=message`: the send of this message, when you can read it (under a connected agent key, only its own sends)."
24856
25247
  },
25248
+ "imported": {
25249
+ "type": ["object", "null"],
25250
+ "description": "Historical acquisition; never sender or SMTP delivery proof. Null for live mail. Excluded from live tails and deltas.",
25251
+ "required": [
25252
+ "from",
25253
+ "method",
25254
+ "verification",
25255
+ "at"
25256
+ ],
25257
+ "properties": {
25258
+ "from": {
25259
+ "type": "string",
25260
+ "enum": ["google_workspace"]
25261
+ },
25262
+ "method": {
25263
+ "type": "string",
25264
+ "enum": ["primitive_direct"]
25265
+ },
25266
+ "verification": {
25267
+ "type": "string",
25268
+ "enum": ["provider_fetched"]
25269
+ },
25270
+ "at": {
25271
+ "type": "string",
25272
+ "format": "date-time",
25273
+ "description": "When Primitive acquired this historical message."
25274
+ }
25275
+ }
25276
+ },
24857
25277
  "snippet": {
24858
25278
  "type": ["string", "null"],
24859
25279
  "maxLength": 200,
@@ -24876,6 +25296,7 @@ const operationManifest = [
24876
25296
  "automated_reasons",
24877
25297
  "from_verified",
24878
25298
  "from_header_email",
25299
+ "imported",
24879
25300
  "snippet"
24880
25301
  ]
24881
25302
  }
@@ -25515,6 +25936,35 @@ const operationManifest = [
25515
25936
  "format": "uuid",
25516
25937
  "description": "With `group=message`: the send of this message, when you can read it (under a connected agent key, only its own sends)."
25517
25938
  },
25939
+ "imported": {
25940
+ "type": ["object", "null"],
25941
+ "description": "Historical acquisition; never sender or SMTP delivery proof. Null for live mail. Excluded from live tails and deltas.",
25942
+ "required": [
25943
+ "from",
25944
+ "method",
25945
+ "verification",
25946
+ "at"
25947
+ ],
25948
+ "properties": {
25949
+ "from": {
25950
+ "type": "string",
25951
+ "enum": ["google_workspace"]
25952
+ },
25953
+ "method": {
25954
+ "type": "string",
25955
+ "enum": ["primitive_direct"]
25956
+ },
25957
+ "verification": {
25958
+ "type": "string",
25959
+ "enum": ["provider_fetched"]
25960
+ },
25961
+ "at": {
25962
+ "type": "string",
25963
+ "format": "date-time",
25964
+ "description": "When Primitive acquired this historical message."
25965
+ }
25966
+ }
25967
+ },
25518
25968
  "snippet": {
25519
25969
  "type": ["string", "null"],
25520
25970
  "maxLength": 200,
@@ -25537,6 +25987,7 @@ const operationManifest = [
25537
25987
  "automated_reasons",
25538
25988
  "from_verified",
25539
25989
  "from_header_email",
25990
+ "imported",
25540
25991
  "snippet"
25541
25992
  ]
25542
25993
  }, {
@@ -25995,7 +26446,7 @@ const operationManifest = [
25995
26446
  }
25996
26447
  }
25997
26448
  },
25998
- "responseSchema": {
26449
+ "responseSchema": { "allOf": [{
25999
26450
  "type": "object",
26000
26451
  "properties": {
26001
26452
  "recipient": {
@@ -26261,7 +26712,28 @@ const operationManifest = [
26261
26712
  "failure_count",
26262
26713
  "consecutive_fails"
26263
26714
  ]
26264
- },
26715
+ }, {
26716
+ "type": "object",
26717
+ "properties": { "warnings": {
26718
+ "description": "For a webhook (kind http). same_path_as_another_endpoint: another webhook you can see, on and not deleted, sends to the same scheme, host and path with any query string, so each email both receive is delivered twice; endpoint_id names it (at most 5, newest first). The URL is never echoed. Empty when none; absent when it could not be checked (a caller who may not read endpoints, or a failed read). Other codes may be added.",
26719
+ "type": "array",
26720
+ "items": {
26721
+ "type": "object",
26722
+ "properties": {
26723
+ "code": { "type": "string" },
26724
+ "message": { "type": "string" },
26725
+ "endpoint_id": {
26726
+ "description": "The other webhook a same_path_as_another_endpoint warning names.",
26727
+ "type": "string",
26728
+ "format": "uuid",
26729
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
26730
+ }
26731
+ },
26732
+ "required": ["code", "message"],
26733
+ "additionalProperties": {}
26734
+ }
26735
+ } }
26736
+ }] },
26265
26737
  "sdkName": "createEndpoint",
26266
26738
  "summary": "Create a webhook endpoint",
26267
26739
  "tag": "Endpoints",
@@ -38924,7 +39396,7 @@ const operationManifest = [
38924
39396
  "binaryResponse": false,
38925
39397
  "bodyRequired": false,
38926
39398
  "command": "get-relay-auto-join",
38927
- "description": "Whether someone who proves an address on the organization's mail relay domain with Google Workspace joins automatically, and with what access. `option` is null when auto-join is off and an invitation is required; `options` lists the choices. Answers 404 `feature_disabled` unless the organization has mail relay.",
39399
+ "description": "Whether someone who proves an address on the organization's mail relay domain with Google Workspace joins automatically. Auto-joined people have no mail access until an owner or admin assigns a role. `option` is null when auto-join is off and an invitation is required; legacy mail-grant settings read as `no_access`. `options` lists the choices. Answers 404 `feature_disabled` unless the organization has mail relay.",
38928
39400
  "hasJsonBody": false,
38929
39401
  "method": "GET",
38930
39402
  "operationId": "getRelayAutoJoin",
@@ -39733,7 +40205,7 @@ const operationManifest = [
39733
40205
  "binaryResponse": false,
39734
40206
  "bodyRequired": true,
39735
40207
  "command": "set-relay-auto-join",
39736
- "description": "`option` is a choice's id from the GET, or null to require an invitation (turning it off needs only members:manage). Choosing an option answers 404 `feature_disabled` unless the organization has mail relay, 400 `validation_error` for an id that is not one of the choices, 403 `grant_forbidden` unless the caller is an owner or admin who can assign roles and send invitations and covers the role the option gives, 409 `role_key_taken` when a custom role already holds that role's key, and 409 `role_assignment_unavailable` when the organization cannot be given that role yet. Person only: a dashboard session, or the person's own OAuth or CLI token with a session step-up of purpose `relay_auto_join.write` (the person confirms at the step_up_url a 403 step_up_required answer carries, which names this client, then send the token in the Primitive-Step-Up header; the token works only with the client it was confirmed for). Needs members:manage, and roles:assign to turn it on. API keys are refused.",
40208
+ "description": "`option` is a choice's id from the GET, or null to require an invitation (turning it off needs only members:manage). Auto-joined people have no mail access until an owner or admin assigns a role; legacy mail-grant choices cannot be selected. Choosing an option answers 404 `feature_disabled` unless the organization has mail relay, 400 `validation_error` for an id outside the current catalog, 403 `grant_forbidden` without owner or admin assignment authority, and 409 `role_assignment_unavailable` when the restricted role cannot be assigned yet. Person only: a dashboard session, or the person's own OAuth or CLI token with a session step-up of purpose `relay_auto_join.write` (the person confirms at the step_up_url a 403 step_up_required answer carries, which names this client, then send the token in the Primitive-Step-Up header; the token works only with the client it was confirmed for). Needs members:manage, and roles:assign to turn it on. API keys are refused.",
39737
40209
  "hasJsonBody": true,
39738
40210
  "method": "PUT",
39739
40211
  "operationId": "setRelayAutoJoin",
@@ -55058,7 +55530,7 @@ function savedConnectedProfiles(configDir, exclude) {
55058
55530
  */
55059
55531
  async function otherProfiles(configDir, session, current) {
55060
55532
  if (session) try {
55061
- const { connectedProfilesForSession } = await import("./machine-session-D39TUEGF.js").then((n) => n.s);
55533
+ const { connectedProfilesForSession } = await import("./machine-session-DkXYR62a.js").then((n) => n.s);
55062
55534
  return {
55063
55535
  inSession: true,
55064
55536
  profiles: connectedProfilesForSession(configDir, session, current)