primcli 3.0.0-preview.13 → 3.0.0-preview.14
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-D5Tj9C-K.js → api-command-BTOIanV1.js} +781 -27
- package/dist/{machine-session-BMr-zPLx.js → machine-session-BTkDAKda.js} +4 -4
- package/dist/{notify-session-cIUz_kxR.js → notify-session-b_0jyPIk.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 +1427 -285
- package/dist/oclif/receiver-heal.js +2 -2
- package/dist/{repeats-Dj_o6c-X-ykfsraq6.js → repeats-Dj_o6c-X-B7sSj0oc.js} +74 -2
- package/dist/{scoped-chat-DVSsLSRw.js → scoped-chat-Cqmn-k7q.js} +1 -1
- package/dist/{signal-command-gpH2AhIi.js → signal-command-ewPBzvjU.js} +4 -4
- package/package.json +1 -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 {
|
|
3
|
+
import { d as SESSION_UUID, t as notificationScope } from "../notify-session-b_0jyPIk.js";
|
|
4
|
+
import { Rt as detectAgentRuntime } from "../api-command-BTOIanV1.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";
|
|
@@ -132,6 +132,8 @@ var sdk_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
132
132
|
getDelivery: () => getDelivery,
|
|
133
133
|
getDomainAgentAuthorization: () => getDomainAgentAuthorization,
|
|
134
134
|
getEmail: () => getEmail,
|
|
135
|
+
getEmailNotificationPreferences: () => getEmailNotificationPreferences,
|
|
136
|
+
getEmailNotificationSettings: () => getEmailNotificationSettings,
|
|
135
137
|
getEmailReadable: () => getEmailReadable,
|
|
136
138
|
getEmailRule: () => getEmailRule,
|
|
137
139
|
getEmailRuleCoveringMe: () => getEmailRuleCoveringMe,
|
|
@@ -339,6 +341,8 @@ var sdk_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
339
341
|
updateCredentialPolicy: () => updateCredentialPolicy,
|
|
340
342
|
updateDefaultNetworkMember: () => updateDefaultNetworkMember,
|
|
341
343
|
updateDomain: () => updateDomain,
|
|
344
|
+
updateEmailNotificationPreferences: () => updateEmailNotificationPreferences,
|
|
345
|
+
updateEmailNotificationSettings: () => updateEmailNotificationSettings,
|
|
342
346
|
updateEmailRule: () => updateEmailRule,
|
|
343
347
|
updateEndpoint: () => updateEndpoint,
|
|
344
348
|
updateFilter: () => updateFilter,
|
|
@@ -3612,7 +3616,7 @@ const getWebhookDeliveryStats = (options) => (options?.client ?? client).get({
|
|
|
3612
3616
|
/**
|
|
3613
3617
|
* List what you created, or what you were asked
|
|
3614
3618
|
*
|
|
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
|
|
3619
|
+
* The objects the caller created, newest first, each with where it stands now, including ones since disabled, deleted or revoked where the object keeps a row: Functions, endpoints, Function triggers, pull subscriptions, recipient routes, filters, wake schedules, repeating sends and scheduled sends. An API key, an app or an agent sees what it created itself; a webhook given to an API key lists under that key. A person (a dashboard session, or their own Primitive CLI or app login) sees what they created through any credential of theirs, each item naming it, and also their API keys, personal agents, email rules, rule requests and objections to rules over their mail (objections only on the dashboard or the Primitive CLI). Each kind is listed only if the caller could list it through that kind's own route; a kind it could not is named in withheld, with no count. Ids, names and states only: never a webhook URL or mail content. Needs activity:read_self. With relation=asked it lists instead what other members asked of the person, open or answered: the rule requests made to them, and the objections to rules they wrote, under their current membership, each naming the member who asked or objected in created_through. A key, an app or an agent has none, and gets both kinds in withheld. With relation=concerning it lists instead what other members did that concerns the person's own mail: each time a rule started covering one of their mailboxes, saved a new version, or changed who receives its matches 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.
|
|
3616
3620
|
*/
|
|
3617
3621
|
const listActivityObjects = (options) => (options?.client ?? client).get({
|
|
3618
3622
|
security: [{
|
|
@@ -5402,6 +5406,74 @@ const updateSearchSettings = (options) => (options.client ?? client).put({
|
|
|
5402
5406
|
}
|
|
5403
5407
|
});
|
|
5404
5408
|
/**
|
|
5409
|
+
* Get the organization's email notification settings
|
|
5410
|
+
*
|
|
5411
|
+
* Every kind of notification email Primitive sends the organization's members, and who may turn it off. Each kind lists its label and description, its class, whether it needs an entitlement and whether the organization has it, the organization's mode (null for platform_required) and the modes it may choose, and whether the calling member gets it and may change that.
|
|
5412
|
+
*
|
|
5413
|
+
* Person only: a dashboard session or the person's own OAuth token (the CLI or an app they connected). API keys, agent connection keys and agents are refused.
|
|
5414
|
+
*/
|
|
5415
|
+
const getEmailNotificationSettings = (options) => (options?.client ?? client).get({
|
|
5416
|
+
security: [{
|
|
5417
|
+
scheme: "bearer",
|
|
5418
|
+
type: "http"
|
|
5419
|
+
}],
|
|
5420
|
+
url: "/email-notification-settings",
|
|
5421
|
+
...options
|
|
5422
|
+
});
|
|
5423
|
+
/**
|
|
5424
|
+
* Change the organization's email notification settings
|
|
5425
|
+
*
|
|
5426
|
+
* Set the organization's mode for one or more kinds: off (nobody gets it), optional_on (each member gets it unless they turn it off), optional_off (only members who turn it on get it) or required (every member gets it). Kinds left out keep their mode. An unknown kind is refused with 400 (validation_error, details.reason unknown_kind). A platform_required kind is refused with 409 (conflict, details.reason platform_required), and required for an optional kind with 409 (conflict, details.reason mode_not_allowed); nothing is changed. Answers the settings as they now stand. Each kind lists its label and description, its class, whether it needs an entitlement and whether the organization has it, the organization's mode (null for platform_required) and the modes it may choose, and whether the calling member gets it and may change that.
|
|
5427
|
+
*
|
|
5428
|
+
* Person only: a dashboard session, or the person's own OAuth token with a step-up token for purpose `org_settings.write` in the Primitive-Step-Up header. Without one an OAuth token is answered 403 step_up_required, whose details carry the dashboard URL that issues it (or 403 grant_forbidden when the person's role could not do it anyway). The person's role must hold notification_policy:manage. API keys and agent connection keys are refused. An agent acting for the person is refused unless it carries a step-up token the person issued in the dashboard.
|
|
5429
|
+
*/
|
|
5430
|
+
const updateEmailNotificationSettings = (options) => (options.client ?? client).put({
|
|
5431
|
+
security: [{
|
|
5432
|
+
scheme: "bearer",
|
|
5433
|
+
type: "http"
|
|
5434
|
+
}],
|
|
5435
|
+
url: "/email-notification-settings",
|
|
5436
|
+
...options,
|
|
5437
|
+
headers: {
|
|
5438
|
+
...options.body !== void 0 && { "Content-Type": "application/json" },
|
|
5439
|
+
...options.headers
|
|
5440
|
+
}
|
|
5441
|
+
});
|
|
5442
|
+
/**
|
|
5443
|
+
* Get my email notification preferences
|
|
5444
|
+
*
|
|
5445
|
+
* The notification emails the calling member gets, and which of them they may turn on or off. Each kind lists its label and description, its class, whether it needs an entitlement and whether the organization has it, the organization's mode (null for platform_required) and the modes it may choose, and whether the calling member gets it and may change that.
|
|
5446
|
+
*
|
|
5447
|
+
* Person only: a dashboard session or the person's own OAuth token (the CLI or an app they connected). The person's role must hold notifications:manage. API keys, agent connection keys and agents are refused.
|
|
5448
|
+
*/
|
|
5449
|
+
const getEmailNotificationPreferences = (options) => (options?.client ?? client).get({
|
|
5450
|
+
security: [{
|
|
5451
|
+
scheme: "bearer",
|
|
5452
|
+
type: "http"
|
|
5453
|
+
}],
|
|
5454
|
+
url: "/email-notification-preferences",
|
|
5455
|
+
...options
|
|
5456
|
+
});
|
|
5457
|
+
/**
|
|
5458
|
+
* Change my email notification preferences
|
|
5459
|
+
*
|
|
5460
|
+
* Turn one or more kinds on or off for the calling member. Only a kind whose organization mode is optional_on or optional_off can be changed: a platform_required kind, one the organization requires, and one it turned off are refused with 409 (conflict, details.reason not_member_choice, details.org_mode saying which), and nothing is changed. An unknown kind is refused with 400. Answers the preferences as they now stand. Each kind lists its label and description, its class, whether it needs an entitlement and whether the organization has it, the organization's mode (null for platform_required) and the modes it may choose, and whether the calling member gets it and may change that.
|
|
5461
|
+
*
|
|
5462
|
+
* Person only: a dashboard session or the person's own OAuth token (the CLI or an app they connected). The person's role must hold notifications:manage. API keys, agent connection keys and agents are refused.
|
|
5463
|
+
*/
|
|
5464
|
+
const updateEmailNotificationPreferences = (options) => (options.client ?? client).put({
|
|
5465
|
+
security: [{
|
|
5466
|
+
scheme: "bearer",
|
|
5467
|
+
type: "http"
|
|
5468
|
+
}],
|
|
5469
|
+
url: "/email-notification-preferences",
|
|
5470
|
+
...options,
|
|
5471
|
+
headers: {
|
|
5472
|
+
...options.body !== void 0 && { "Content-Type": "application/json" },
|
|
5473
|
+
...options.headers
|
|
5474
|
+
}
|
|
5475
|
+
});
|
|
5476
|
+
/**
|
|
5405
5477
|
* List roles
|
|
5406
5478
|
*
|
|
5407
5479
|
* 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.
|
|
@@ -25862,4 +25934,4 @@ function repeatStopCommand(emailId) {
|
|
|
25862
25934
|
if (!UUID.test(emailId)) throw new TypeError("emailId must be an email UUID");
|
|
25863
25935
|
return `primitive repeat stop --id ${emailId.toLowerCase()}`;
|
|
25864
25936
|
}
|
|
25865
|
-
export {
|
|
25937
|
+
export { isTrustedSender as $, setMemory as $n, getOwnGrant as $t, filtersFromFlags as A, listWakeAuthorizations as An, deleteWakeAuthorization as At, awaitingRejectedError as B, reorderRoutes as Bn, getContact as Bt, transientFailure as C, listMailboxAccess as Cn, createRoute as Ct, cursorFromAcceptedRows as D, listRoutes as Dn, deleteContact as Dt, collectNewAcceptedEmails as E, listRoles as En, deleteAgentContact as Et, AWAITING_FLAG_DESCRIPTION as F, putAgentContact as Fn, downloadSentAttachmentArchiveMember as Ft, isAwaitingRejectedError as G, runWakeSchedule as Gn, getFunction as Gt, formatAwaitingCell as H, resendAgentSignupVerification as Hn, getCreditBalance as Ht, AWAITING_VALUES as I, putAgentContactPolicy as In, downloadSentAttachmentByFilename as It, EMAIL_RULE_OBJECTION_EVENT_TYPES as J, searchMemories as Jn, getInboxStatus as Jt, queryUsesAwaiting as K, sdk_gen_exports as Kn, getFunctionRouting as Kt, REPLY_STATE_UNSUPPORTED_CODE as L, putContact as Ln, getAccessMode as Lt, quoteDslValue as M, listWakeSchedules as Mn, downloadEmailAttachmentArchiveMember as Mt, sinceFromFlags as N, pollCliLogin as Nn, downloadEmailAttachmentByFilename as Nt, encodeReceivedAtSearchCursor as O, listSentAttachmentArchiveMembers as On, deleteMemory as Ot, sleep as P, pullWebhookEvent as Pn, downloadEmailAttachmentPart as Pt, isEmailReceivedEvent as Q, setFunctionSecret as Qn, getOutboundStatus as Qt, ReplyStateUnsupportedError as R, redeemCreditCode as Rn, getAccount as Rt, retryingOperation as S, listKeys as Sn, createKey as St, SINCE_VALUE_HELP as T, listRepeatingSends as Tn, createWakeSchedule as Tt, formatRepliesCell as U, revokeCredential as Un, getDefaultNetworkAgent as Ut, ensureSearchReportsReplyState as V, replyToEmail as Vn, getConversation as Vt, hasReplyState as W, rotateKey as Wn, getEmail as Wt, SENT_EMAIL_EVENT_TYPES as X, sendEmail as Xn, getMemory as Xt, EMAIL_RULE_REQUEST_EVENT_TYPES as Y, semanticSearch as Yn, getKey as Yt, WEBHOOK_EVENT_TYPES as Z, setFunctionRoute as Zn, getOrgRoutingTopology as Zt, backoffDelay as _, listEmails as _n, __exportAll as _r, checkSendability as _t, REPEAT_IDLE_MAX_MINUTES as a, inviteAgentConnection as an, testFunction as ar, AutomatedFilterUnsupportedError as at, pauseForTransientFailure as b, listFunctions as bn, createEndpoint as bt, classifySignalContent as c, listAgentConnections as cn, updateFunction as cr, automatedSurfaceForOperation as ct, parseRepeatTick as d, listContacts as dn, updateRoute as dr, hasAutomatedVerdict as dt, getRepeatingSend as en, simulateRoute as er, parseWebhookEvent as et, preparePresenceAliveEmail as f, listDefaultNetworkAgents as fn, updateWakeAuthorization as fr, isAutomatedRejectedError as ft, WaitDeadlineReached as g, listEmailRuleResults as gn, whoami as gr, checkDefaultNetworkContactAdmission as gt, sendPreparedSignal as h, listEmailAttachmentArchiveMembers as hn, verifyAgentSignup as hr, cancelSentEmailByIdempotencyKey as ht, REPEAT_EVERY_MAX_MINUTES as i, getWakeSchedule as in, stopRepeatFromEmail as ir, AUTOMATED_VALUES as it, lateMailReread as j, listWakeDispatches as jn, deleteWakeSchedule as jt, fetchEmailSearchPage as k, listSentEmails as kn, deleteRoute as kt, parseInteractionEnvelope as l, listAgentContacts as ln, updateKey as lr, ensureSearchReportsAutomated as lt, repeatStopCommand as m, listDomains as mn, verifyAgentClaim as mr, cancelSentEmail as mt, MAX_PRESENCE_ENVELOPE_BYTES as n, getSentEmail as nn, startAgentSignup as nr, AUTOMATED_FILTER_UNSUPPORTED_CODE as nt, REPEAT_MAX_SENDS_MAX as o, leaveOrganization as on, unsetFunctionRoute as or, assertAutomatedVerdict as ot, prepareSignalEmail as p, listDefaultNetworkMembers as pn, updateWakeSchedule as pr, addDefaultNetworkMember as pt, replyStateSurfaceForOperation as q, searchEmails as qn, getFunctionTestRunTrace as qt, PRESENCE_PROBE_TEXT as r, getThread as rn, startCliLogin as rr, AUTOMATED_FLAG_DESCRIPTION as rt, buildRepeatStopBody as s, listActivityObjects as sn, updateDefaultNetworkMember as sr, automatedRejectedError as st, MAX_INTERACTION_BYTES as t, getSendFrom as tn, startAgentClaim as tr, parseFromHeader as tt, parsePresenceEnvelope as u, listAgentNetworks as un, updateRepeatingSend as ur, expectedAutomatedVerdicts as ut, describeApiFailure as v, listEndpoints as vn, cliLogout as vt, waitOutRetryAfter as w, listOrganizationPeople as wn, createWakeAuthorization as wt, retryTransient as x, listGroups as xn, createFunction as xt, parseRetryAfter as y, listFunctionLogs as yn, completeWebhookEvent as yt, assertAwaitingFilterRows as z, removeDefaultNetworkMember as zn, getAgentContactPolicy as zt };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $ as isTrustedSender, c as classifySignalContent, x as retryTransient } from "./repeats-Dj_o6c-X-B7sSj0oc.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 {
|
|
2
|
-
import {
|
|
1
|
+
import { Wt as getEmail, Xn as sendEmail, bt as createEndpoint, h as sendPreparedSignal, kn as listSentEmails, p as prepareSignalEmail, v as describeApiFailure } from "./repeats-Dj_o6c-X-B7sSj0oc.js";
|
|
2
|
+
import { M as bareAddress, Ot as successfulSendOutcome, ft as classifySendError, s as extractErrorPayload } from "./api-command-BTOIanV1.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-Cqmn-k7q.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-Cwf_avYJ.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;
|