primcli 3.0.0-preview.11 → 3.0.0-preview.13

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,7 +1,7 @@
1
1
  import { N as agentProfileDirectory, P as agentProfileName, R as loadConnectedAgentProfile, j as AGENT_PROFILE_ENV } from "../cli-config-Ms_0vNjq.js";
2
2
  import { a as backgroundListenStatus, i as backgroundListenRestartable, s as claimBackgroundListenRestart, t as BACKGROUND_LISTEN_RELAUNCH_ENV } from "../listen-background-DyBYca28.js";
3
- import { d as SESSION_UUID, t as notificationScope } from "../notify-session-DcFHxUL9.js";
4
- import { Lt as detectAgentRuntime } from "../api-command-CkMEFiBL.js";
3
+ import { d as SESSION_UUID, t as notificationScope } from "../notify-session-cIUz_kxR.js";
4
+ import { Lt as detectAgentRuntime } from "../api-command-D5Tj9C-K.js";
5
5
  import { d as readMailJson } from "../shared-mail-files-BAQSGxxz.js";
6
6
  import { join } from "node:path";
7
7
  import { spawn } from "node:child_process";
@@ -182,6 +182,7 @@ var sdk_gen_exports = /* @__PURE__ */ __exportAll({
182
182
  getWakeSchedule: () => getWakeSchedule,
183
183
  getWebhookDeliveryStats: () => getWebhookDeliveryStats,
184
184
  getWebhookSecret: () => getWebhookSecret,
185
+ importGoogleMailMessage: () => importGoogleMailMessage,
185
186
  installTemplate: () => installTemplate,
186
187
  inviteAgentConnection: () => inviteAgentConnection,
187
188
  inviteOrganizationMember: () => inviteOrganizationMember,
@@ -213,6 +214,7 @@ var sdk_gen_exports = /* @__PURE__ */ __exportAll({
213
214
  listEmailRuleShareEmails: () => listEmailRuleShareEmails,
214
215
  listEmailRuleShares: () => listEmailRuleShares,
215
216
  listEmailRuleVersions: () => listEmailRuleVersions,
217
+ listEmailRuleVersionsCoveringMe: () => listEmailRuleVersionsCoveringMe,
216
218
  listEmailRules: () => listEmailRules,
217
219
  listEmailRulesCoveringMe: () => listEmailRulesCoveringMe,
218
220
  listEmails: () => listEmails,
@@ -268,6 +270,7 @@ var sdk_gen_exports = /* @__PURE__ */ __exportAll({
268
270
  putContact: () => putContact,
269
271
  putContactPolicy: () => putContactPolicy,
270
272
  reaffirmFunctionRuntimeKey: () => reaffirmFunctionRuntimeKey,
273
+ reconcileGoogleMailImport: () => reconcileGoogleMailImport,
271
274
  redeemCreditCode: () => redeemCreditCode,
272
275
  redeployFunction: () => redeployFunction,
273
276
  releaseSentEmail: () => releaseSentEmail,
@@ -3609,7 +3612,7 @@ const getWebhookDeliveryStats = (options) => (options?.client ?? client).get({
3609
3612
  /**
3610
3613
  * List what you created, or what you were asked
3611
3614
  *
3612
- * 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.
3615
+ * 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.
3613
3616
  */
3614
3617
  const listActivityObjects = (options) => (options?.client ?? client).get({
3615
3618
  security: [{
@@ -3622,7 +3625,7 @@ const listActivityObjects = (options) => (options?.client ?? client).get({
3622
3625
  /**
3623
3626
  * Read the column catalog
3624
3627
  *
3625
- * 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.
3628
+ * 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).
3626
3629
  */
3627
3630
  const getEmailRuleVocabulary = (options) => (options?.client ?? client).get({
3628
3631
  security: [{
@@ -3635,7 +3638,7 @@ const getEmailRuleVocabulary = (options) => (options?.client ?? client).get({
3635
3638
  /**
3636
3639
  * Compile a rule description
3637
3640
  *
3638
- * 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.
3641
+ * 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 the recent classified mail in evaluation_scope (by default your own mailboxes) 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).
3639
3642
  */
3640
3643
  const compileEmailRule = (options) => (options.client ?? client).post({
3641
3644
  security: [{
@@ -3652,7 +3655,7 @@ const compileEmailRule = (options) => (options.client ?? client).post({
3652
3655
  /**
3653
3656
  * Test a rule against received mail
3654
3657
  *
3655
- * 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.
3658
+ * 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).
3656
3659
  */
3657
3660
  const testEmailRule = (options) => (options.client ?? client).post({
3658
3661
  security: [{
@@ -3669,7 +3672,7 @@ const testEmailRule = (options) => (options.client ?? client).post({
3669
3672
  /**
3670
3673
  * Write look-alike emails a rule should or should not match
3671
3674
  *
3672
- * 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.
3675
+ * 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).
3673
3676
  */
3674
3677
  const generateLookAlikes = (options) => (options.client ?? client).post({
3675
3678
  security: [{
@@ -3686,7 +3689,7 @@ const generateLookAlikes = (options) => (options.client ?? client).post({
3686
3689
  /**
3687
3690
  * Test a rule against a made-up email
3688
3691
  *
3689
- * 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.
3692
+ * Reports what a rule would decide for an email you describe (sender, recipients, subject, plain text, attachment types and file names; 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).
3690
3693
  */
3691
3694
  const testEmailRuleOnSample = (options) => (options.client ?? client).post({
3692
3695
  security: [{
@@ -3703,7 +3706,7 @@ const testEmailRuleOnSample = (options) => (options.client ?? client).post({
3703
3706
  /**
3704
3707
  * List rules
3705
3708
  *
3706
- * 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.
3709
+ * 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).
3707
3710
  */
3708
3711
  const listEmailRules = (options) => (options?.client ?? client).get({
3709
3712
  security: [{
@@ -3716,7 +3719,7 @@ const listEmailRules = (options) => (options?.client ?? client).get({
3716
3719
  /**
3717
3720
  * Create a rule
3718
3721
  *
3719
- * 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.
3722
+ * 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).
3720
3723
  */
3721
3724
  const createEmailRule = (options) => (options.client ?? client).post({
3722
3725
  security: [{
@@ -3733,7 +3736,7 @@ const createEmailRule = (options) => (options.client ?? client).post({
3733
3736
  /**
3734
3737
  * Delete a rule
3735
3738
  *
3736
- * 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.
3739
+ * 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), says whom with (share_notice), and lists the unrevoked keys that still list it, which now read nothing through it (keys, other_keys; left out when they could not be read). The author or a reader of all the organization's mail may delete it; while it is shared, only the author or someone who manages members from the dashboard. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
3737
3740
  */
3738
3741
  const deleteEmailRule = (options) => (options.client ?? client).delete({
3739
3742
  security: [{
@@ -3746,7 +3749,7 @@ const deleteEmailRule = (options) => (options.client ?? client).delete({
3746
3749
  /**
3747
3750
  * Read a rule
3748
3751
  *
3749
- * 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.
3752
+ * 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).
3750
3753
  */
3751
3754
  const getEmailRule = (options) => (options.client ?? client).get({
3752
3755
  security: [{
@@ -3759,7 +3762,7 @@ const getEmailRule = (options) => (options.client ?? client).get({
3759
3762
  /**
3760
3763
  * Change a rule
3761
3764
  *
3762
- * 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.
3765
+ * 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).
3763
3766
  */
3764
3767
  const updateEmailRule = (options) => (options.client ?? client).patch({
3765
3768
  security: [{
@@ -3776,7 +3779,7 @@ const updateEmailRule = (options) => (options.client ?? client).patch({
3776
3779
  /**
3777
3780
  * List a rule's decisions
3778
3781
  *
3779
- * 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.
3782
+ * 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).
3780
3783
  */
3781
3784
  const listEmailRuleDecisions = (options) => (options.client ?? client).get({
3782
3785
  security: [{
@@ -3789,7 +3792,7 @@ const listEmailRuleDecisions = (options) => (options.client ?? client).get({
3789
3792
  /**
3790
3793
  * List every rule's result on an email
3791
3794
  *
3792
- * 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.
3795
+ * 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).
3793
3796
  */
3794
3797
  const listEmailRuleResults = (options) => (options.client ?? client).get({
3795
3798
  security: [{
@@ -3802,7 +3805,7 @@ const listEmailRuleResults = (options) => (options.client ?? client).get({
3802
3805
  /**
3803
3806
  * Read versions of a rule
3804
3807
  *
3805
- * 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.
3808
+ * 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).
3806
3809
  */
3807
3810
  const listEmailRuleVersions = (options) => (options.client ?? client).get({
3808
3811
  security: [{
@@ -3815,7 +3818,7 @@ const listEmailRuleVersions = (options) => (options.client ?? client).get({
3815
3818
  /**
3816
3819
  * Read what a rule covers
3817
3820
  *
3818
- * 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.
3821
+ * 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).
3819
3822
  */
3820
3823
  const getEmailRuleScope = (options) => (options.client ?? client).get({
3821
3824
  security: [{
@@ -3828,7 +3831,7 @@ const getEmailRuleScope = (options) => (options.client ?? client).get({
3828
3831
  /**
3829
3832
  * List what a rule can cover
3830
3833
  *
3831
- * 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.
3834
+ * 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).
3832
3835
  */
3833
3836
  const listEmailRuleScopeOptions = (options) => (options?.client ?? client).get({
3834
3837
  security: [{
@@ -3841,7 +3844,7 @@ const listEmailRuleScopeOptions = (options) => (options?.client ?? client).get({
3841
3844
  /**
3842
3845
  * List rule requests
3843
3846
  *
3844
- * 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.
3847
+ * 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).
3845
3848
  */
3846
3849
  const listEmailRuleRequests = (options) => (options?.client ?? client).get({
3847
3850
  security: [{
@@ -3854,7 +3857,7 @@ const listEmailRuleRequests = (options) => (options?.client ?? client).get({
3854
3857
  /**
3855
3858
  * Ask a member for a rule
3856
3859
  *
3857
- * 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.
3860
+ * 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).
3858
3861
  */
3859
3862
  const createEmailRuleRequest = (options) => (options.client ?? client).post({
3860
3863
  security: [{
@@ -3871,7 +3874,7 @@ const createEmailRuleRequest = (options) => (options.client ?? client).post({
3871
3874
  /**
3872
3875
  * Check whether a member can accept a rule request
3873
3876
  *
3874
- * 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.
3877
+ * 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).
3875
3878
  */
3876
3879
  const checkEmailRuleRequestTarget = (options) => (options.client ?? client).post({
3877
3880
  security: [{
@@ -3888,7 +3891,7 @@ const checkEmailRuleRequestTarget = (options) => (options.client ?? client).post
3888
3891
  /**
3889
3892
  * Delete a withdrawn rule request
3890
3893
  *
3891
- * 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.
3894
+ * 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).
3892
3895
  */
3893
3896
  const deleteEmailRuleRequest = (options) => (options.client ?? client).delete({
3894
3897
  security: [{
@@ -3901,7 +3904,7 @@ const deleteEmailRuleRequest = (options) => (options.client ?? client).delete({
3901
3904
  /**
3902
3905
  * Read a rule request
3903
3906
  *
3904
- * 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.
3907
+ * 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).
3905
3908
  */
3906
3909
  const getEmailRuleRequest = (options) => (options.client ?? client).get({
3907
3910
  security: [{
@@ -3914,7 +3917,7 @@ const getEmailRuleRequest = (options) => (options.client ?? client).get({
3914
3917
  /**
3915
3918
  * Decline a rule request
3916
3919
  *
3917
- * 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.
3920
+ * 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).
3918
3921
  */
3919
3922
  const declineEmailRuleRequest = (options) => (options.client ?? client).post({
3920
3923
  security: [{
@@ -3931,7 +3934,7 @@ const declineEmailRuleRequest = (options) => (options.client ?? client).post({
3931
3934
  /**
3932
3935
  * Withdraw a rule request
3933
3936
  *
3934
- * 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.
3937
+ * 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).
3935
3938
  */
3936
3939
  const withdrawEmailRuleRequest = (options) => (options.client ?? client).post({
3937
3940
  security: [{
@@ -3944,7 +3947,7 @@ const withdrawEmailRuleRequest = (options) => (options.client ?? client).post({
3944
3947
  /**
3945
3948
  * Accept a rule request
3946
3949
  *
3947
- * 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.
3950
+ * 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).
3948
3951
  */
3949
3952
  const acceptEmailRuleRequest = (options) => (options.client ?? client).post({
3950
3953
  security: [{
@@ -3961,7 +3964,7 @@ const acceptEmailRuleRequest = (options) => (options.client ?? client).post({
3961
3964
  /**
3962
3965
  * List rule shares
3963
3966
  *
3964
- * 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.
3967
+ * 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).
3965
3968
  */
3966
3969
  const listEmailRuleShares = (options) => (options?.client ?? client).get({
3967
3970
  security: [{
@@ -4000,7 +4003,7 @@ const endEmailRuleShare = (options) => (options.client ?? client).delete({
4000
4003
  /**
4001
4004
  * Get a rule share
4002
4005
  *
4003
- * 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.
4006
+ * 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).
4004
4007
  */
4005
4008
  const getEmailRuleShare = (options) => (options.client ?? client).get({
4006
4009
  security: [{
@@ -4026,7 +4029,7 @@ const listEmailRuleShareEmails = (options) => (options.client ?? client).get({
4026
4029
  /**
4027
4030
  * List the rules over your mail
4028
4031
  *
4029
- * 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.
4032
+ * 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.
4030
4033
  */
4031
4034
  const listEmailRulesCoveringMe = (options) => (options?.client ?? client).get({
4032
4035
  security: [{
@@ -4039,7 +4042,7 @@ const listEmailRulesCoveringMe = (options) => (options?.client ?? client).get({
4039
4042
  /**
4040
4043
  * Get a rule over your mail
4041
4044
  *
4042
- * 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.
4045
+ * 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.
4043
4046
  */
4044
4047
  const getEmailRuleCoveringMe = (options) => (options.client ?? client).get({
4045
4048
  security: [{
@@ -4052,7 +4055,7 @@ const getEmailRuleCoveringMe = (options) => (options.client ?? client).get({
4052
4055
  /**
4053
4056
  * List what a rule decided about your mail
4054
4057
  *
4055
- * 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.
4058
+ * 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.
4056
4059
  */
4057
4060
  const listEmailRuleDecisionsOnMyMail = (options) => (options.client ?? client).get({
4058
4061
  security: [{
@@ -4063,9 +4066,22 @@ const listEmailRuleDecisionsOnMyMail = (options) => (options.client ?? client).g
4063
4066
  ...options
4064
4067
  });
4065
4068
  /**
4069
+ * Read versions of a rule over your mail
4070
+ *
4071
+ * The versions of a rule that covers one of your own mailboxes now that applied to your mail: its current version and each earlier one that decided on mail at your own mailboxes, so a decision can be read in the words of the version that made it. Each has what the covering view shows of a version: its wording, tree, explanation and assumptions. A version that did neither is not listed. Without versions, newest first, a page at a time (meta.cursor); with versions, only those named that are listed, oldest first. 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.
4072
+ */
4073
+ const listEmailRuleVersionsCoveringMe = (options) => (options.client ?? client).get({
4074
+ security: [{
4075
+ scheme: "bearer",
4076
+ type: "http"
4077
+ }],
4078
+ url: "/email-rules/covering-me/{id}/versions",
4079
+ ...options
4080
+ });
4081
+ /**
4066
4082
  * List objections
4067
4083
  *
4068
- * 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.
4084
+ * Objections you made and objections to rules you wrote (by default), only one of the two, 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.
4069
4085
  */
4070
4086
  const listEmailRuleObjections = (options) => (options?.client ?? client).get({
4071
4087
  security: [{
@@ -4078,7 +4094,7 @@ const listEmailRuleObjections = (options) => (options?.client ?? client).get({
4078
4094
  /**
4079
4095
  * Object to a rule over your mail
4080
4096
  *
4081
- * 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.
4097
+ * 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.
4082
4098
  */
4083
4099
  const createEmailRuleObjection = (options) => (options.client ?? client).post({
4084
4100
  security: [{
@@ -4095,7 +4111,7 @@ const createEmailRuleObjection = (options) => (options.client ?? client).post({
4095
4111
  /**
4096
4112
  * Get an objection
4097
4113
  *
4098
- * 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.
4114
+ * 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.
4099
4115
  */
4100
4116
  const getEmailRuleObjection = (options) => (options.client ?? client).get({
4101
4117
  security: [{
@@ -4108,7 +4124,7 @@ const getEmailRuleObjection = (options) => (options.client ?? client).get({
4108
4124
  /**
4109
4125
  * Withdraw an objection
4110
4126
  *
4111
- * 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.
4127
+ * 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.
4112
4128
  */
4113
4129
  const withdrawEmailRuleObjection = (options) => (options.client ?? client).post({
4114
4130
  security: [{
@@ -4121,7 +4137,7 @@ const withdrawEmailRuleObjection = (options) => (options.client ?? client).post(
4121
4137
  /**
4122
4138
  * Decline an objection to your rule
4123
4139
  *
4124
- * 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.
4140
+ * 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.
4125
4141
  */
4126
4142
  const declineEmailRuleObjection = (options) => (options.client ?? client).post({
4127
4143
  security: [{
@@ -4138,7 +4154,7 @@ const declineEmailRuleObjection = (options) => (options.client ?? client).post({
4138
4154
  /**
4139
4155
  * Accept an objection to your rule
4140
4156
  *
4141
- * 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.
4157
+ * 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.
4142
4158
  */
4143
4159
  const acceptEmailRuleObjection = (options) => (options.client ?? client).post({
4144
4160
  security: [{
@@ -4192,6 +4208,40 @@ const claimVanityInboxName = (options) => (options.client ?? client).post({
4192
4208
  }
4193
4209
  });
4194
4210
  /**
4211
+ * Import one historical Google Workspace message
4212
+ *
4213
+ * Requires the organization email_import entitlement, granted by staff. Only the configured current owner, using a full personal session or verified first-party CLI, may import into the configured primary mailbox. Primitive verifies the transient provider token and fetches RAW content itself. No raw uploads or client provenance are accepted. Sent, draft, spam and trash messages are skipped. Historical mail appears in normal history without live delivery effects. An indeterminate response requires retrying the same provider ID. User provider credentials are never stored or queued.
4214
+ */
4215
+ const importGoogleMailMessage = (options) => (options.client ?? client).post({
4216
+ security: [{
4217
+ scheme: "bearer",
4218
+ type: "http"
4219
+ }],
4220
+ url: "/mail-imports/google/messages",
4221
+ ...options,
4222
+ headers: {
4223
+ ...options.body !== void 0 && { "Content-Type": "application/json" },
4224
+ ...options.headers
4225
+ }
4226
+ });
4227
+ /**
4228
+ * Reconcile scoped historical import attempts
4229
+ *
4230
+ * The same configured owner may recover expired attempts after the email_import entitlement is revoked. Recovery does not require that entitlement. Selects only server-owned manifests for the configured mailbox/account/policy. No provider token, object keys, prefixes or email IDs are accepted. Unsettled uploads remain unresolved and charged; this operation does not promise automatic cleanup after a process dies.
4231
+ */
4232
+ const reconcileGoogleMailImport = (options) => (options.client ?? client).post({
4233
+ security: [{
4234
+ scheme: "bearer",
4235
+ type: "http"
4236
+ }],
4237
+ url: "/mail-imports/google/reconcile",
4238
+ ...options,
4239
+ headers: {
4240
+ ...options.body !== void 0 && { "Content-Type": "application/json" },
4241
+ ...options.headers
4242
+ }
4243
+ });
4244
+ /**
4195
4245
  * Send a read, working or typing signal about an email
4196
4246
  *
4197
4247
  * Builds and sends the standard signal email about this received email: one `interaction.json` part (read/1, working/1 or typing/1 naming the email's Message-ID) plus only the fixed fallback text, threaded to it. It goes only to the email's authenticated sender, never to Reply-To or other recipients. Receivers see it as `fyi: true`, and the sender sees it as `peer_signal_on_my_last` (typing is not reported there). Refused (422) for a signal, interaction or other structured email, for an unauthenticated sender, and while the email is still being processed. Each call is a new signal with fresh ids; a read retried with the same Idempotency-Key rebuilds the identical message and dedupes.
@@ -5086,7 +5136,7 @@ const getKeyBuilder = (options) => (options?.client ?? client).get({
5086
5136
  /**
5087
5137
  * List API keys
5088
5138
  *
5089
- * 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.
5139
+ * 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.
5090
5140
  *
5091
5141
  * Person 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.
5092
5142
  */
@@ -5139,7 +5189,7 @@ const rotateKey = (options) => (options.client ?? client).post({
5139
5189
  /**
5140
5190
  * Get an API key
5141
5191
  *
5142
- * 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.
5192
+ * 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.
5143
5193
  *
5144
5194
  * Person 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.
5145
5195
  */
@@ -5504,7 +5554,7 @@ const decideAccessMode = (options) => (options.client ?? client).post({
5504
5554
  /**
5505
5555
  * Get the auto-join setting
5506
5556
  *
5507
- * 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.
5557
+ * 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.
5508
5558
  */
5509
5559
  const getRelayAutoJoin = (options) => (options?.client ?? client).get({
5510
5560
  security: [{
@@ -5517,7 +5567,7 @@ const getRelayAutoJoin = (options) => (options?.client ?? client).get({
5517
5567
  /**
5518
5568
  * Change the auto-join setting
5519
5569
  *
5520
- * `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.
5570
+ * `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.
5521
5571
  */
5522
5572
  const setRelayAutoJoin = (options) => (options.client ?? client).put({
5523
5573
  security: [{
@@ -1,4 +1,4 @@
1
- import { Q as isTrustedSender, b as retryTransient, c as classifySignalContent } from "./repeats-Dj_o6c-X-ChTwFlyB.js";
1
+ import { Q as isTrustedSender, b as retryTransient, c as classifySignalContent } from "./repeats-Dj_o6c-X-ykfsraq6.js";
2
2
  // src/oclif/presence-provenance.ts
3
3
  function readPresenceProjection(detail) {
4
4
  if (!detail || typeof detail !== "object") return null;
@@ -1,15 +1,15 @@
1
- import { On as listSentEmails, Ut as getEmail, Yn as sendEmail, _ as describeApiFailure, h as sendPreparedSignal, p as prepareSignalEmail, yt as createEndpoint } from "./repeats-Dj_o6c-X-ChTwFlyB.js";
2
- import { Dt as successfulSendOutcome, dt as classifySendError, j as bareAddress, s as extractErrorPayload } from "./api-command-CkMEFiBL.js";
1
+ import { On as listSentEmails, Ut as getEmail, Yn as sendEmail, _ as describeApiFailure, h as sendPreparedSignal, p as prepareSignalEmail, yt as createEndpoint } from "./repeats-Dj_o6c-X-ykfsraq6.js";
2
+ import { Dt as successfulSendOutcome, dt as classifySendError, j as bareAddress, s as extractErrorPayload } from "./api-command-D5Tj9C-K.js";
3
3
  import { recordSentSignal } from "./oclif/auto-signals.js";
4
4
  import { _ as acquireListenLock, c as mailTime, d as readMailJson, f as removeMailFile, h as writeMailJson, i as mailId, l as privateMailDirectory, m as withMailLock, n as invalidSharedMail, o as mailObject, p as syncMailDirectory, r as mailAddress, s as mailString, t as SharedMailStateError, v as compareListenProcessIdentity, x as listenProcessIdentity, y as listenIdentity } from "./shared-mail-files-BAQSGxxz.js";
5
- import { i as readApiBeforeDeadline, n as isPlainChatReply, o as scopedChatSenderTrust } from "./scoped-chat-DVhJu-DF.js";
5
+ import { i as readApiBeforeDeadline, n as isPlainChatReply, o as scopedChatSenderTrust } from "./scoped-chat-DVSsLSRw.js";
6
6
  import { n as tryOwnSharedMail, r as waitForSharedMailChange, t as readSharedMailOwner } from "./shared-mail-watch-BAPMsFNv.js";
7
7
  import { Errors } from "@oclif/core";
8
8
  import { opendirSync } from "node:fs";
9
9
  import { createHash, randomUUID, scryptSync } from "node:crypto";
10
10
  import { dirname, join } from "node:path";
11
11
  import { setTimeout as setTimeout$1 } from "node:timers/promises";
12
- // ../sdk-node/dist/api-9aB3Rn9o.js
12
+ // ../sdk-node/dist/api-C54bhvOz.js
13
13
  const jsonBodySerializer = { bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value) };
14
14
  function createSseClient({ onRequest, onSseError, onSseEvent, responseTransformer, responseValidator, sseDefaultRetryDelay, sseMaxRetryAttempts, sseMaxRetryDelay, sseSleepFn, url, ...options }) {
15
15
  let lastEventId;
package/man/primitive.1 CHANGED
@@ -43,8 +43,9 @@ line then; add
43
43
  .B --envelope
44
44
  to get the full response envelope, with the pagination cursor in
45
45
  .B meta.cursor
46
- and empty-result hints in
47
- .BR summary .
46
+ and, in
47
+ .BR summary ,
48
+ empty-result hints and what a list's default filters left out.
48
49
  .B primitive listen
49
50
  streams JSONL and is not covered by this rule.
50
51
  .SH LOCAL WEBHOOK EVENTS
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "primcli",
3
- "version": "3.0.0-preview.11",
3
+ "version": "3.0.0-preview.13",
4
4
  "publishConfig": {
5
5
  "tag": "preview"
6
6
  },
@@ -204,7 +204,7 @@
204
204
  "description": "Manage repeating sends you created with `primitive send` or `primitive reply` and --repeat-every. Use `primitive repeats list|get|pause|resume|cancel`."
205
205
  },
206
206
  "changes": {
207
- "description": "Long-poll one replayable feed of what changed. Use `primitive changes list --since start` for a baseline, then `--since <next_cursor> --wait 20`; add `--expand message` to inline each message and `--address a@x,b@y` to keep only mail to or from those addresses."
207
+ "description": "Long-poll a replayable feed of mail, send, thread mute and read-state, agent and access changes, for a login or key with changes:read. Use `primitive changes list --since start` for a baseline, then `--since <next_cursor> --wait 20`; add `--expand message` to inline each message and `--address a@x,b@y` to keep only mail to or from those addresses. Rule requests and rules over your mail are in `primitive activity asked` and `primitive activity concerning`."
208
208
  },
209
209
  "repeating-sends": {
210
210
  "description": "Generated API operations for repeating sends. Prefer `primitive repeats ...` (sender) and `primitive repeat stop` (recipient)."