primcli 3.0.0-preview.8 → 3.0.0-preview.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{api-command-TUwewvqZ.js → api-command-DugUWmZH.js} +679 -112
- package/dist/{machine-session-DNnNhhFr.js → machine-session-Cre9Mt_2.js} +4 -4
- package/dist/{notify-session-CeIflLIX.js → notify-session-DHqBICIk.js} +2 -2
- package/dist/oclif/auto-signal-worker.js +3 -3
- package/dist/oclif/auto-signals.js +1 -1
- package/dist/oclif/index.js +930 -296
- package/dist/oclif/receiver-heal.js +2 -2
- package/dist/{repeats-Dj_o6c-X-DNbrLjEF.js → repeats-Dj_o6c-X-DqcHvqvW.js} +50 -8
- package/dist/{scoped-chat-Dd3P8Q-m.js → scoped-chat-BpUAgX4g.js} +1 -1
- package/dist/{signal-command-DZQemE9I.js → signal-command-B66YR0-A.js} +4 -4
- package/package.json +4 -1
|
@@ -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-
|
|
4
|
-
import { Lt as detectAgentRuntime } from "../api-command-
|
|
3
|
+
import { d as SESSION_UUID, t as notificationScope } from "../notify-session-DHqBICIk.js";
|
|
4
|
+
import { Lt as detectAgentRuntime } from "../api-command-DugUWmZH.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";
|
|
@@ -131,6 +131,7 @@ var sdk_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
131
131
|
getEmail: () => getEmail,
|
|
132
132
|
getEmailReadable: () => getEmailReadable,
|
|
133
133
|
getEmailRule: () => getEmailRule,
|
|
134
|
+
getEmailRuleCoveringMe: () => getEmailRuleCoveringMe,
|
|
134
135
|
getEmailRuleRequest: () => getEmailRuleRequest,
|
|
135
136
|
getEmailRuleScope: () => getEmailRuleScope,
|
|
136
137
|
getEmailRuleShare: () => getEmailRuleShare,
|
|
@@ -200,6 +201,7 @@ var sdk_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
200
201
|
listDomains: () => listDomains,
|
|
201
202
|
listEmailAttachmentArchiveMembers: () => listEmailAttachmentArchiveMembers,
|
|
202
203
|
listEmailRuleDecisions: () => listEmailRuleDecisions,
|
|
204
|
+
listEmailRuleDecisionsOnMyMail: () => listEmailRuleDecisionsOnMyMail,
|
|
203
205
|
listEmailRuleRequests: () => listEmailRuleRequests,
|
|
204
206
|
listEmailRuleResults: () => listEmailRuleResults,
|
|
205
207
|
listEmailRuleScopeOptions: () => listEmailRuleScopeOptions,
|
|
@@ -207,6 +209,7 @@ var sdk_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
207
209
|
listEmailRuleShares: () => listEmailRuleShares,
|
|
208
210
|
listEmailRuleVersions: () => listEmailRuleVersions,
|
|
209
211
|
listEmailRules: () => listEmailRules,
|
|
212
|
+
listEmailRulesCoveringMe: () => listEmailRulesCoveringMe,
|
|
210
213
|
listEmails: () => listEmails,
|
|
211
214
|
listEndpoints: () => listEndpoints,
|
|
212
215
|
listFilters: () => listFilters,
|
|
@@ -639,7 +642,7 @@ const getAccount = (options) => (options?.client ?? client).get({
|
|
|
639
642
|
/**
|
|
640
643
|
* Update account settings
|
|
641
644
|
*
|
|
642
|
-
* Update the
|
|
645
|
+
* Update the organization's spam threshold (spam_threshold) and whether an email's content is discarded once a webhook confirms receipt (discard_content_on_webhook_confirmed), the opt-in POST /emails/{id}/discard-content needs.
|
|
643
646
|
*/
|
|
644
647
|
const updateAccount = (options) => (options.client ?? client).patch({
|
|
645
648
|
security: [{
|
|
@@ -3626,7 +3629,7 @@ const getEmailRuleVocabulary = (options) => (options?.client ?? client).get({
|
|
|
3626
3629
|
/**
|
|
3627
3630
|
* Compile a rule description
|
|
3628
3631
|
*
|
|
3629
|
-
* Turns a plain-English description of which received emails to match into a rule tree over the published column contract, with a plain-English explanation of what it matches, the assumptions made, and warnings for anything the columns cannot express. Where the columns fall short the rule may carry up to five yes/no questions, asked about an email only after its conditions match. Nothing is saved. A rule with no questions has its conditions counted, read only, over the caller's recent classified mail (what a test of it covers by default): breadth is that count, and a warning says when it matches nearly all of it. The SQL the rule renders to is returned only when include_sql is true. kind do_not_share compiles a do-not-share rule for recall: conditions only as narrow as the description says, the judgement of what it describes put into questions, and with nothing a column decides for certain, conditions that hold for every 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.
|
|
3632
|
+
* Turns a plain-English description of which received emails to match into a rule tree over the published column contract, with a plain-English explanation of what it matches, the assumptions made, and warnings for anything the columns cannot express. Where the columns fall short the rule may carry up to five yes/no questions, asked about an email only after its conditions match; they read its subject, its new text and its attachments' file names, never what is inside an attachment, and warnings say when a question mentions attachments. Nothing is saved. A rule with no questions has its conditions counted, read only, over the caller's recent classified mail (what a test of it covers by default): breadth is that count, and a warning says when it matches nearly all of it. The SQL the rule renders to is returned only when include_sql is true. kind do_not_share compiles a do-not-share rule for recall: conditions only as narrow as the description says, the judgement of what it describes put into questions, and with nothing a column decides for certain, conditions that hold for every 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.
|
|
3630
3633
|
*/
|
|
3631
3634
|
const compileEmailRule = (options) => (options.client ?? client).post({
|
|
3632
3635
|
security: [{
|
|
@@ -3658,9 +3661,9 @@ const testEmailRule = (options) => (options.client ?? client).post({
|
|
|
3658
3661
|
}
|
|
3659
3662
|
});
|
|
3660
3663
|
/**
|
|
3661
|
-
* Write look-alike emails a rule should not match
|
|
3664
|
+
* Write look-alike emails a rule should or should not match
|
|
3662
3665
|
*
|
|
3663
|
-
* Writes made-up emails that come close to what a grant rule describes
|
|
3666
|
+
* 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.
|
|
3664
3667
|
*/
|
|
3665
3668
|
const generateLookAlikes = (options) => (options.client ?? client).post({
|
|
3666
3669
|
security: [{
|
|
@@ -3780,7 +3783,7 @@ const listEmailRuleDecisions = (options) => (options.client ?? client).get({
|
|
|
3780
3783
|
/**
|
|
3781
3784
|
* List every rule's result on an email
|
|
3782
3785
|
*
|
|
3783
|
-
*
|
|
3786
|
+
* 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); 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.
|
|
3784
3787
|
*/
|
|
3785
3788
|
const listEmailRuleResults = (options) => (options.client ?? client).get({
|
|
3786
3789
|
security: [{
|
|
@@ -3978,7 +3981,7 @@ const listGivenEmailRuleShares = (options) => (options?.client ?? client).get({
|
|
|
3978
3981
|
/**
|
|
3979
3982
|
* End a rule share
|
|
3980
3983
|
*
|
|
3981
|
-
* Stops sharing. Either person on the share can do this, or an owner or admin who manages members. The share is kept, marked as ended. This needs no mail access and does not depend on the email rules feature. An owner or admin not on the share must use a dashboard session. Otherwise use your own session, or an OAuth or CLI token that acts with your full access: API keys and agent keys are refused.
|
|
3984
|
+
* Stops sharing; the rule itself is left unchanged, as the answer's note says. Either person on the share can do this, or an owner or admin who manages members. The share is kept, marked as ended. This needs no mail access and does not depend on the email rules feature. An owner or admin not on the share must use a dashboard session. Otherwise use your own session, or an OAuth or CLI token that acts with your full access: API keys and agent keys are refused.
|
|
3982
3985
|
*/
|
|
3983
3986
|
const endEmailRuleShare = (options) => (options.client ?? client).delete({
|
|
3984
3987
|
security: [{
|
|
@@ -4015,6 +4018,45 @@ const listEmailRuleShareEmails = (options) => (options.client ?? client).get({
|
|
|
4015
4018
|
...options
|
|
4016
4019
|
});
|
|
4017
4020
|
/**
|
|
4021
|
+
* List the rules over your mail
|
|
4022
|
+
*
|
|
4023
|
+
* 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). You do not see the other inboxes and domains its scope names, its saved expectations, or the keys, shares and webhooks that use it. 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.
|
|
4024
|
+
*/
|
|
4025
|
+
const listEmailRulesCoveringMe = (options) => (options?.client ?? client).get({
|
|
4026
|
+
security: [{
|
|
4027
|
+
scheme: "bearer",
|
|
4028
|
+
type: "http"
|
|
4029
|
+
}],
|
|
4030
|
+
url: "/email-rules/covering-me",
|
|
4031
|
+
...options
|
|
4032
|
+
});
|
|
4033
|
+
/**
|
|
4034
|
+
* Get a rule over your mail
|
|
4035
|
+
*
|
|
4036
|
+
* 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). You do not see the other inboxes and domains its scope names, its saved expectations, or the keys, shares and webhooks that use 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.
|
|
4037
|
+
*/
|
|
4038
|
+
const getEmailRuleCoveringMe = (options) => (options.client ?? client).get({
|
|
4039
|
+
security: [{
|
|
4040
|
+
scheme: "bearer",
|
|
4041
|
+
type: "http"
|
|
4042
|
+
}],
|
|
4043
|
+
url: "/email-rules/covering-me/{id}",
|
|
4044
|
+
...options
|
|
4045
|
+
});
|
|
4046
|
+
/**
|
|
4047
|
+
* List what a rule decided about your mail
|
|
4048
|
+
*
|
|
4049
|
+
* 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.
|
|
4050
|
+
*/
|
|
4051
|
+
const listEmailRuleDecisionsOnMyMail = (options) => (options.client ?? client).get({
|
|
4052
|
+
security: [{
|
|
4053
|
+
scheme: "bearer",
|
|
4054
|
+
type: "http"
|
|
4055
|
+
}],
|
|
4056
|
+
url: "/email-rules/covering-me/{id}/decisions",
|
|
4057
|
+
...options
|
|
4058
|
+
});
|
|
4059
|
+
/**
|
|
4018
4060
|
* Get a domain's Agent Authorization status
|
|
4019
4061
|
*
|
|
4020
4062
|
* Whether the domain publishes an Agent Authorization (`_agents`) TXT record that lets agents on Primitive email it, read from DNS with the same engine the send path uses (an answer may be up to five minutes old): published (a record authorizes them), published_unauthorized (a record exists but does not), not_set_up (no record, the default) or inconclusive (the lookup could not tell; retry). The domain is one of the organization's, verified or pending; a credential confined to some mailboxes sees only the domains its scope covers. Needs domains:read.
|
|
@@ -5220,7 +5262,7 @@ const updateSearchSettings = (options) => (options.client ?? client).put({
|
|
|
5220
5262
|
/**
|
|
5221
5263
|
* List roles
|
|
5222
5264
|
*
|
|
5223
|
-
* Every role in the organization (built-in, template copies and custom roles), with how many members and groups hold each, the templates not yet copied, and whether roles can be assigned now. `unassigned` describes role restricted on a member with no role_id, which is not a role and is never in `roles`.
|
|
5265
|
+
* Every role in the organization (built-in, template copies and custom roles), with how many members and groups hold each, the templates not yet copied, and whether roles can be assigned now. `unassigned` describes role restricted on a member with no role_id, which is not a role and is never in `roles`. Needs members:read (owners, admins, members and roles that grant it); API keys are refused.
|
|
5224
5266
|
*/
|
|
5225
5267
|
const listRoles = (options) => (options?.client ?? client).get({
|
|
5226
5268
|
security: [{
|
|
@@ -5323,7 +5365,7 @@ const leaveOrganization = (options) => (options?.client ?? client).post({
|
|
|
5323
5365
|
/**
|
|
5324
5366
|
* Get the mailbox access mode
|
|
5325
5367
|
*
|
|
5326
|
-
* Whole-org or delegated mailbox access. Holders of roles:assign also get the preview of a switch (every item that needs a decision, each with the decision_options it takes, worded for what the switch does) and the decisions made, plus notices: member and group domain entries that delegated mode keeps off personal mailboxes, each with how many it leaves out. Notices are informational, never decided, and never hold the switch (notices_truncated past 500, notices_unavailable when they could not be read). In whole-org mode it also lists narrowed_agents: every live agent connection the switch narrows to an own-address key (personal agents of members, and shared agents), informational in the same way (narrowed_agents_truncated past 500, narrowed_agents_unavailable when they could not be read).
|
|
5368
|
+
* Whole-org or delegated mailbox access. Holders of roles:assign also get the preview of a switch (every item that needs a decision, each with the decision_options it takes, worded for what the switch does) and the decisions made, plus notices: member and group domain entries that delegated mode keeps off personal mailboxes, each with how many it leaves out. Notices are informational, never decided, and never hold the switch (notices_truncated past 500, notices_unavailable when they could not be read). In whole-org mode it also lists narrowed_agents: every live agent connection the switch narrows to an own-address key (personal agents of members, and shared agents), informational in the same way (narrowed_agents_truncated past 500, narrowed_agents_unavailable when they could not be read). Needs members:read (owners, admins, members and roles that grant it); API keys are refused.
|
|
5327
5369
|
*/
|
|
5328
5370
|
const getAccessMode = (options) => (options?.client ?? client).get({
|
|
5329
5371
|
security: [{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Z as isTrustedSender, b as retryTransient, c as classifySignalContent } from "./repeats-Dj_o6c-X-
|
|
1
|
+
import { Z as isTrustedSender, b as retryTransient, c as classifySignalContent } from "./repeats-Dj_o6c-X-DqcHvqvW.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 { Dn as listSentEmails, Ht as getEmail, Jn as sendEmail, _ as describeApiFailure, h as sendPreparedSignal, p as prepareSignalEmail, vt as createEndpoint } from "./repeats-Dj_o6c-X-
|
|
2
|
-
import { Dt as successfulSendOutcome, dt as classifySendError, j as bareAddress, s as extractErrorPayload } from "./api-command-
|
|
1
|
+
import { Dn as listSentEmails, Ht as getEmail, Jn as sendEmail, _ as describeApiFailure, h as sendPreparedSignal, p as prepareSignalEmail, vt as createEndpoint } from "./repeats-Dj_o6c-X-DqcHvqvW.js";
|
|
2
|
+
import { Dt as successfulSendOutcome, dt as classifySendError, j as bareAddress, s as extractErrorPayload } from "./api-command-DugUWmZH.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-
|
|
5
|
+
import { i as readApiBeforeDeadline, n as isPlainChatReply, o as scopedChatSenderTrust } from "./scoped-chat-BpUAgX4g.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-
|
|
12
|
+
// ../sdk-node/dist/api-0hVC21_i.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "primcli",
|
|
3
|
-
"version": "3.0.0-preview.
|
|
3
|
+
"version": "3.0.0-preview.9",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"tag": "preview"
|
|
6
6
|
},
|
|
@@ -191,6 +191,9 @@
|
|
|
191
191
|
"email-rules": {
|
|
192
192
|
"description": "Rules written in plain English that pick out received mail"
|
|
193
193
|
},
|
|
194
|
+
"email-rule-oversight": {
|
|
195
|
+
"description": "The email rules that reach your own mailboxes, whoever wrote them, read-only"
|
|
196
|
+
},
|
|
194
197
|
"routes": {
|
|
195
198
|
"description": "Manage recipient routes. Bind an address pattern to an endpoint or function: `primitive routes add alice@d --function <id>`, `primitive routes list`, `primitive routes test <recipient>`, `primitive routes remove <id>`."
|
|
196
199
|
},
|