primcli 3.0.0-preview.18 → 3.0.0-preview.19

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-BIElQmDi.js";
4
- import { zt as detectAgentRuntime } from "../api-command-BlfqpBjp.js";
3
+ import { d as SESSION_UUID, t as notificationScope } from "../notify-session-06flGBgK.js";
4
+ import { zt as detectAgentRuntime } from "../api-command--2ZkNMvH.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";
@@ -3660,7 +3660,7 @@ const compileEmailRule = (options) => (options.client ?? client).post({
3660
3660
  /**
3661
3661
  * Test a rule against received mail
3662
3662
  *
3663
- * 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 with its kind, a saved rule by rule_id (its current version, as its author), rule_id with tree (that tree as the rule's next version, as its author, against its saved expectations; its author only), or a pending rule request by request_id (its rule as asked, as you, over your own mailboxes). 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. 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).
3663
+ * 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 with its kind, a saved rule by rule_id (its current version, as its author), rule_id with tree (that tree as the rule's next version, as its author, against its saved expectations; its author only), or a pending rule request by request_id (its rule as asked, as you, over your own mailboxes). 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. Without email_ids it tests the newest emails on the mail relay domains, 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).
3664
3664
  */
3665
3665
  const testEmailRule = (options) => (options.client ?? client).post({
3666
3666
  security: [{
@@ -6277,7 +6277,7 @@ function buildEmailSearchQuery(params) {
6277
6277
  if (params.filters.awaiting) query.awaiting = params.filters.awaiting;
6278
6278
  if (params.filters.automated !== void 0) query.automated = params.filters.automated ? "true" : "false";
6279
6279
  if (params.filters.body) query.body = params.filters.body;
6280
- if (params.filters.domainId) query.domain_id = params.filters.domainId;
6280
+ if (params.filters.domainId) query.domain_ids = params.filters.domainId;
6281
6281
  if (params.filters.from) query.from = params.filters.from;
6282
6282
  if (params.filters.hasAttachment !== void 0) query.has_attachment = params.filters.hasAttachment ? "true" : "false";
6283
6283
  if (params.filters.spamScoreGte !== void 0) query.spam_score_gte = params.filters.spamScoreGte;
@@ -6288,6 +6288,7 @@ function buildEmailSearchQuery(params) {
6288
6288
  if (params.since) query.date_from = params.since;
6289
6289
  if (params.cursor) query.cursor = params.cursor;
6290
6290
  if (params.count === false) query.count = "false";
6291
+ if (params.filters.focus) Object.assign(query, params.filters.focus);
6291
6292
  return query;
6292
6293
  }
6293
6294
  function encodeReceivedAtSearchCursor(email) {
@@ -6465,7 +6466,9 @@ async function fetchEmailSearchPage(params) {
6465
6466
  ok: true,
6466
6467
  cursor: envelope?.meta.cursor ?? cursorFromRows(rows),
6467
6468
  more: Boolean(envelope?.meta.cursor),
6468
- rows
6469
+ rows,
6470
+ total: typeof envelope?.meta.total === "number" ? envelope.meta.total : null,
6471
+ totalCapped: envelope?.meta.total_capped === true
6469
6472
  };
6470
6473
  }
6471
6474
  function sleep(ms) {
@@ -25983,4 +25986,4 @@ function repeatStopCommand(emailId) {
25983
25986
  if (!UUID.test(emailId)) throw new TypeError("emailId must be an email UUID");
25984
25987
  return `primitive repeat stop --id ${emailId.toLowerCase()}`;
25985
25988
  }
25986
- export { AUTOMATED_FLAG_DESCRIPTION as $, stopRepeatFromEmail as $n, getThread as $t, collectNewAcceptedEmails as A, putAgentContact as An, downloadEmailAttachmentPart as At, AWAITING_VALUES as B, runWakeSchedule as Bn, getEmail as Bt, parseRetryAfter as C, listSentAttachmentArchiveMembers as Cn, deleteContact as Ct, transientFailure as D, listWakeSchedules as Dn, deleteWakeSchedule as Dt, retryingOperation as E, listWakeDispatches as En, deleteWakeAuthorization as Et, lateMailReread as F, reorderRoutes as Fn, getAgentContactPolicy as Ft, ensureSearchReportsReplyState as G, sendEmail as Gn, getKey as Gt, ReplyStateUnsupportedError as H, searchEmails as Hn, getFunctionRouting as Ht, quoteDslValue as I, replyToEmail as In, getContact as It, hasReplyState as J, setMemory as Jn, getOutboundStatus as Jt, formatAwaitingCell as K, setFunctionRoute as Kn, getMemory as Kt, sinceFromFlags as L, resendAgentSignupVerification as Ln, getConversation as Lt, encodeReceivedAtSearchCursor as M, putContact as Mn, downloadSentAttachmentByFilename as Mt, fetchEmailSearchPage as N, redeemCreditCode as Nn, getAccessMode as Nt, waitOutRetryAfter as O, pollCliLogin as On, downloadEmailAttachmentArchiveMember as Ot, filtersFromFlags as P, removeDefaultNetworkMember as Pn, getAccount as Pt, AUTOMATED_FILTER_UNSUPPORTED_CODE as Q, startCliLogin as Qn, getSentEmail as Qt, sleep as R, revokeCredential as Rn, getCreditBalance as Rt, describeApiFailure as S, listRoutes as Sn, deleteAgentContact as St, retryTransient as T, listWakeAuthorizations as Tn, deleteRoute as Tt, assertAwaitingFilterRows as U, searchMemories as Un, getFunctionTestRunTrace as Ut, REPLY_STATE_UNSUPPORTED_CODE as V, sdk_gen_exports as Vn, getFunction as Vt, awaitingRejectedError as W, semanticSearch as Wn, getInboxStatus as Wt, queryUsesAwaiting as X, startAgentClaim as Xn, getRepeatingSend as Xt, isAwaitingRejectedError as Y, simulateRoute as Yn, getOwnGrant as Yt, replyStateSurfaceForOperation as Z, startAgentSignup as Zn, getSendFrom as Zt, isTrustedSender as _, listKeys as _n, createFunction as _t, REPEAT_IDLE_MAX_MINUTES as a, listAgentContacts as an, updateRepeatingSend as ar, ensureSearchReportsAutomated as at, WaitDeadlineReached as b, listRepeatingSends as bn, createWakeAuthorization as bt, classifySignalContent as c, listDefaultNetworkAgents as cn, updateWakeSchedule as cr, isAutomatedRejectedError as ct, parseRepeatTick as d, listEmailAttachmentArchiveMembers as dn, whoami as dr, cancelSentEmailByIdempotencyKey as dt, getWakeSchedule as en, testFunction as er, AUTOMATED_VALUES as et, preparePresenceAliveEmail as f, listEmails as fn, __exportAll as fr, checkDefaultNetworkContactAdmission as ft, isEmailReceivedEvent as g, listGroups as gn, createEndpoint as gt, sendPreparedSignal as h, listFunctions as hn, completeWebhookEvent as ht, REPEAT_EVERY_MAX_MINUTES as i, listAgentConnections as in, updateKey as ir, automatedSurfaceForOperation as it, cursorFromAcceptedRows as j, putAgentContactPolicy as jn, downloadSentAttachmentArchiveMember as jt, SINCE_VALUE_HELP as k, pullWebhookEvent as kn, downloadEmailAttachmentByFilename as kt, parseInteractionEnvelope as l, listDefaultNetworkMembers as ln, verifyAgentClaim as lr, addDefaultNetworkMember as lt, repeatStopCommand as m, listFunctionLogs as mn, cliLogout as mt, MAX_PRESENCE_ENVELOPE_BYTES as n, leaveOrganization as nn, updateDefaultNetworkMember as nr, assertAutomatedVerdict as nt, REPEAT_MAX_SENDS_MAX as o, listAgentNetworks as on, updateRoute as or, expectedAutomatedVerdicts as ot, prepareSignalEmail as p, listEndpoints as pn, checkSendability as pt, formatRepliesCell as q, setFunctionSecret as qn, getOrgRoutingTopology as qt, PRESENCE_PROBE_TEXT as r, listActivityObjects as rn, updateFunction as rr, automatedRejectedError as rt, buildRepeatStopBody as s, listContacts as sn, updateWakeAuthorization as sr, hasAutomatedVerdict as st, MAX_INTERACTION_BYTES as t, inviteAgentConnection as tn, unsetFunctionRoute as tr, AutomatedFilterUnsupportedError as tt, parsePresenceEnvelope as u, listDomains as un, verifyAgentSignup as ur, cancelSentEmail as ut, parseWebhookEvent as v, listMailboxAccess as vn, createKey as vt, pauseForTransientFailure as w, listSentEmails as wn, deleteMemory as wt, backoffDelay as x, listRoles as xn, createWakeSchedule as xt, parseFromHeader as y, listOrganizationPeople as yn, createRoute as yt, AWAITING_FLAG_DESCRIPTION as z, rotateKey as zn, getDefaultNetworkAgent as zt };
25989
+ export { AUTOMATED_VALUES as $, testFunction as $n, getWakeSchedule as $t, collectNewAcceptedEmails as A, putAgentContactPolicy as An, downloadSentAttachmentArchiveMember as At, REPLY_STATE_UNSUPPORTED_CODE as B, sdk_gen_exports as Bn, getFunction as Bt, parseRetryAfter as C, listSentEmails as Cn, deleteMemory as Ct, transientFailure as D, pollCliLogin as Dn, downloadEmailAttachmentArchiveMember as Dt, retryingOperation as E, listWakeSchedules as En, deleteWakeSchedule as Et, lateMailReread as F, replyToEmail as Fn, getContact as Ft, formatAwaitingCell as G, setFunctionRoute as Gn, getMemory as Gt, assertAwaitingFilterRows as H, searchMemories as Hn, getFunctionTestRunTrace as Ht, sinceFromFlags as I, resendAgentSignupVerification as In, getConversation as It, isAwaitingRejectedError as J, simulateRoute as Jn, getOwnGrant as Jt, formatRepliesCell as K, setFunctionSecret as Kn, getOrgRoutingTopology as Kt, sleep as L, revokeCredential as Ln, getCreditBalance as Lt, encodeReceivedAtSearchCursor as M, redeemCreditCode as Mn, getAccessMode as Mt, fetchEmailSearchPage as N, removeDefaultNetworkMember as Nn, getAccount as Nt, waitOutRetryAfter as O, pullWebhookEvent as On, downloadEmailAttachmentByFilename as Ot, filtersFromFlags as P, reorderRoutes as Pn, getAgentContactPolicy as Pt, AUTOMATED_FLAG_DESCRIPTION as Q, stopRepeatFromEmail as Qn, getThread as Qt, AWAITING_FLAG_DESCRIPTION as R, rotateKey as Rn, getDefaultNetworkAgent as Rt, describeApiFailure as S, listSentAttachmentArchiveMembers as Sn, deleteContact as St, retryTransient as T, listWakeDispatches as Tn, deleteWakeAuthorization as Tt, awaitingRejectedError as U, semanticSearch as Un, getInboxStatus as Ut, ReplyStateUnsupportedError as V, searchEmails as Vn, getFunctionRouting as Vt, ensureSearchReportsReplyState as W, sendEmail as Wn, getKey as Wt, replyStateSurfaceForOperation as X, startAgentSignup as Xn, getSendFrom as Xt, queryUsesAwaiting as Y, startAgentClaim as Yn, getRepeatingSend as Yt, AUTOMATED_FILTER_UNSUPPORTED_CODE as Z, startCliLogin as Zn, getSentEmail as Zt, isTrustedSender as _, listMailboxAccess as _n, createKey as _t, REPEAT_IDLE_MAX_MINUTES as a, listAgentNetworks as an, updateRoute as ar, expectedAutomatedVerdicts as at, WaitDeadlineReached as b, listRoles as bn, createWakeSchedule as bt, classifySignalContent as c, listDefaultNetworkMembers as cn, verifyAgentClaim as cr, addDefaultNetworkMember as ct, parseRepeatTick as d, listEmails as dn, __exportAll as dr, checkDefaultNetworkContactAdmission as dt, inviteAgentConnection as en, unsetFunctionRoute as er, AutomatedFilterUnsupportedError as et, preparePresenceAliveEmail as f, listEndpoints as fn, checkSendability as ft, isEmailReceivedEvent as g, listKeys as gn, createFunction as gt, sendPreparedSignal as h, listGroups as hn, createEndpoint as ht, REPEAT_EVERY_MAX_MINUTES as i, listAgentContacts as in, updateRepeatingSend as ir, ensureSearchReportsAutomated as it, cursorFromAcceptedRows as j, putContact as jn, downloadSentAttachmentByFilename as jt, SINCE_VALUE_HELP as k, putAgentContact as kn, downloadEmailAttachmentPart as kt, parseInteractionEnvelope as l, listDomains as ln, verifyAgentSignup as lr, cancelSentEmail as lt, repeatStopCommand as m, listFunctions as mn, completeWebhookEvent as mt, MAX_PRESENCE_ENVELOPE_BYTES as n, listActivityObjects as nn, updateFunction as nr, automatedRejectedError as nt, REPEAT_MAX_SENDS_MAX as o, listContacts as on, updateWakeAuthorization as or, hasAutomatedVerdict as ot, prepareSignalEmail as p, listFunctionLogs as pn, cliLogout as pt, hasReplyState as q, setMemory as qn, getOutboundStatus as qt, PRESENCE_PROBE_TEXT as r, listAgentConnections as rn, updateKey as rr, automatedSurfaceForOperation as rt, buildRepeatStopBody as s, listDefaultNetworkAgents as sn, updateWakeSchedule as sr, isAutomatedRejectedError as st, MAX_INTERACTION_BYTES as t, leaveOrganization as tn, updateDefaultNetworkMember as tr, assertAutomatedVerdict as tt, parsePresenceEnvelope as u, listEmailAttachmentArchiveMembers as un, whoami as ur, cancelSentEmailByIdempotencyKey as ut, parseWebhookEvent as v, listOrganizationPeople as vn, createRoute as vt, pauseForTransientFailure as w, listWakeAuthorizations as wn, deleteRoute as wt, backoffDelay as x, listRoutes as xn, deleteAgentContact as xt, parseFromHeader as y, listRepeatingSends as yn, createWakeAuthorization as yt, AWAITING_VALUES as z, runWakeSchedule as zn, getEmail as zt };
@@ -1,4 +1,4 @@
1
- import { T as retryTransient, _ as isTrustedSender, c as classifySignalContent } from "./repeats-Dj_o6c-X-b-Y0Ejun.js";
1
+ import { T as retryTransient, _ as isTrustedSender, c as classifySignalContent } from "./repeats-Dj_o6c-X-DTtFzwNd.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 { Bt as getEmail, Gn as sendEmail, S as describeApiFailure, gt as createEndpoint, h as sendPreparedSignal, p as prepareSignalEmail, wn as listSentEmails } from "./repeats-Dj_o6c-X-b-Y0Ejun.js";
2
- import { M as bareAddress, ft as classifySendError, kt as successfulSendOutcome, s as extractErrorPayload } from "./api-command-BlfqpBjp.js";
1
+ import { Cn as listSentEmails, S as describeApiFailure, Wn as sendEmail, h as sendPreparedSignal, ht as createEndpoint, p as prepareSignalEmail, zt as getEmail } from "./repeats-Dj_o6c-X-DTtFzwNd.js";
2
+ import { M as bareAddress, ft as classifySendError, kt as successfulSendOutcome, s as extractErrorPayload } from "./api-command--2ZkNMvH.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-CaiJJRMA.js";
5
+ import { i as readApiBeforeDeadline, n as isPlainChatReply, o as scopedChatSenderTrust } from "./scoped-chat-C7l2BSZr.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-BrSHlYS2.js
12
+ // ../sdk-node/dist/api-DgVlu1vY.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.18",
3
+ "version": "3.0.0-preview.19",
4
4
  "publishConfig": {
5
5
  "tag": "preview"
6
6
  },