primcli 1.70.0 → 1.71.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { S as __exportAll, _ as WEBHOOK_EVENT_TYPES, g as SENT_EMAIL_EVENT_TYPES } from "./repeats-BL7ZC-_6-BZ-MphTV.js";
1
+ import { S as __exportAll, _ as WEBHOOK_EVENT_TYPES, g as SENT_EMAIL_EVENT_TYPES } from "./repeats-BL7ZC-_6-CKMKBlx7.js";
2
2
  import { C as resolveCliAuth, F as agentProfilesDirectory, G as createClient, H as requireDefaultLoginProfile, K as createConfig, N as agentProfileDirectory, R as loadConnectedAgentProfile, S as normalizeApiBaseUrl, T as saveSignupCredentials, W as PrimitiveApiClient, _ as deleteCliCredentials, c as resolveConfigEnvironment, d as validateCliHeaderName, f as validateCliHeaderValue, i as loadCliConfig, j as AGENT_PROFILE_ENV, m as cliAccessTokenExpiresAt, p as acquireCliCredentialsLock, w as saveCliCredentials, x as loadCliCredentials, y as detectPrimitiveKeyEnvMisname } from "./cli-config-DMszFbGn.js";
3
3
  import { h as writeMailJson, m as withMailLock, p as syncMailDirectory, u as privateMailPermissions } from "./shared-mail-files-MwlVE90c.js";
4
4
  import { Command, Errors, Flags } from "@oclif/core";
@@ -15,6 +15,7 @@ var sdk_gen_exports = /* @__PURE__ */ __exportAll({
15
15
  agentConnectionSetup: () => agentConnectionSetup,
16
16
  awaitReply: () => awaitReply,
17
17
  cancelSentEmail: () => cancelSentEmail,
18
+ cancelSentEmailByIdempotencyKey: () => cancelSentEmailByIdempotencyKey,
18
19
  checkDefaultNetworkContactAdmission: () => checkDefaultNetworkContactAdmission,
19
20
  checkDomainDns: () => checkDomainDns,
20
21
  claimAgentConnection: () => claimAgentConnection,
@@ -55,8 +56,12 @@ var sdk_gen_exports = /* @__PURE__ */ __exportAll({
55
56
  discardEmailContent: () => discardEmailContent,
56
57
  downloadAttachments: () => downloadAttachments,
57
58
  downloadDomainZoneFile: () => downloadDomainZoneFile,
59
+ downloadEmailAttachmentArchiveMember: () => downloadEmailAttachmentArchiveMember,
60
+ downloadEmailAttachmentByFilename: () => downloadEmailAttachmentByFilename,
58
61
  downloadEmailAttachmentPart: () => downloadEmailAttachmentPart,
59
62
  downloadRawEmail: () => downloadRawEmail,
63
+ downloadSentAttachmentArchiveMember: () => downloadSentAttachmentArchiveMember,
64
+ downloadSentAttachmentByFilename: () => downloadSentAttachmentByFilename,
60
65
  downloadSentAttachmentPart: () => downloadSentAttachmentPart,
61
66
  getAccount: () => getAccount,
62
67
  getAgent: () => getAgent,
@@ -91,12 +96,14 @@ var sdk_gen_exports = /* @__PURE__ */ __exportAll({
91
96
  listAgentConnections: () => listAgentConnections,
92
97
  listAgentContacts: () => listAgentContacts,
93
98
  listAgentNetworks: () => listAgentNetworks,
99
+ listChanges: () => listChanges,
94
100
  listContacts: () => listContacts,
95
101
  listDeclinedPayments: () => listDeclinedPayments,
96
102
  listDefaultNetworkAgents: () => listDefaultNetworkAgents,
97
103
  listDefaultNetworkMembers: () => listDefaultNetworkMembers,
98
104
  listDeliveries: () => listDeliveries,
99
105
  listDomains: () => listDomains,
106
+ listEmailAttachmentArchiveMembers: () => listEmailAttachmentArchiveMembers,
100
107
  listEmails: () => listEmails,
101
108
  listEndpoints: () => listEndpoints,
102
109
  listFilters: () => listFilters,
@@ -110,6 +117,7 @@ var sdk_gen_exports = /* @__PURE__ */ __exportAll({
110
117
  listRegistryRequests: () => listRegistryRequests,
111
118
  listRepeatingSends: () => listRepeatingSends,
112
119
  listRoutes: () => listRoutes,
120
+ listSentAttachmentArchiveMembers: () => listSentAttachmentArchiveMembers,
113
121
  listSentEmails: () => listSentEmails,
114
122
  listTemplates: () => listTemplates,
115
123
  listWakeAuthorizations: () => listWakeAuthorizations,
@@ -887,6 +895,45 @@ const downloadEmailAttachmentPart = (options) => (options.client ?? client).get(
887
895
  ...options
888
896
  });
889
897
  /**
898
+ * Download one received email attachment by filename
899
+ *
900
+ * Returns the same bytes as downloadEmailAttachmentPart, selecting the attachment by its exact filename. The path form `/emails/{id}/attachments/{filename}` also works for any name that is not digits only, which that form reads as a part_index. When several attachments share the filename the response is 409 attachment_name_ambiguous with every matching part_index, and nothing is returned. Authenticate with an organization API key, an authorized organization OAuth token, or an address-bound agent connection key. A connected agent reads only mail received at its own address. Function credentials are not supported. Discarded content is unavailable.
901
+ */
902
+ const downloadEmailAttachmentByFilename = (options) => (options.client ?? client).get({
903
+ security: [{
904
+ scheme: "bearer",
905
+ type: "http"
906
+ }],
907
+ url: "/emails/{id}/attachments",
908
+ ...options
909
+ });
910
+ /**
911
+ * List the files inside a received zip or tar attachment
912
+ *
913
+ * Lists the regular files inside a zip, tar or tar.gz attachment with each one's path, decoded size and SHA-256. The format is detected from the content. Unsafe paths refuse the whole archive, and resource limits bound the work (see the 413 and 422 responses). Authenticate with an organization API key, an authorized organization OAuth token, or an address-bound agent connection key. A connected agent reads only mail received at its own address. Function credentials are not supported. Discarded content is unavailable.
914
+ */
915
+ const listEmailAttachmentArchiveMembers = (options) => (options.client ?? client).get({
916
+ security: [{
917
+ scheme: "bearer",
918
+ type: "http"
919
+ }],
920
+ url: "/emails/{id}/attachments/{attachment}/members",
921
+ ...options
922
+ });
923
+ /**
924
+ * Download one file from inside a received zip or tar attachment
925
+ *
926
+ * Returns the decoded bytes of one regular file inside a zip, tar or tar.gz attachment, by its listed path. The archive's structure, every member path and every limit are checked as for the listing, but only the requested file is decoded and verified (its zip CRC-32, and X-Content-SHA256 of the bytes returned); list the archive to have every file decoded. Authenticate with an organization API key, an authorized organization OAuth token, or an address-bound agent connection key. A connected agent reads only mail received at its own address. Function credentials are not supported. Discarded content is unavailable.
927
+ */
928
+ const downloadEmailAttachmentArchiveMember = (options) => (options.client ?? client).get({
929
+ security: [{
930
+ scheme: "bearer",
931
+ type: "http"
932
+ }],
933
+ url: "/emails/{id}/attachments/{attachment}/members/{path}",
934
+ ...options
935
+ });
936
+ /**
890
937
  * Download one sent email attachment
891
938
  *
892
939
  * Pending service release. This contract does not establish live availability.
@@ -909,6 +956,45 @@ const downloadSentAttachmentPart = (options) => (options.client ?? client).get({
909
956
  ...options
910
957
  });
911
958
  /**
959
+ * Download one sent email attachment by filename
960
+ *
961
+ * Returns the same bytes as downloadSentAttachmentPart, selecting the attachment by its exact filename. The path form `/sent-emails/{id}/attachments/{filename}` also works for any name that is not digits only, which that form reads as a part_index. When several attachments share the filename the response is 409 attachment_name_ambiguous with every matching part_index, and nothing is returned. Authenticate with an organization API key, an authorized organization OAuth token, or an address-bound agent connection key. A connected agent reads only mail sent from its own address. Function credentials are not supported. Discarded content is unavailable.
962
+ */
963
+ const downloadSentAttachmentByFilename = (options) => (options.client ?? client).get({
964
+ security: [{
965
+ scheme: "bearer",
966
+ type: "http"
967
+ }],
968
+ url: "/sent-emails/{id}/attachments",
969
+ ...options
970
+ });
971
+ /**
972
+ * List the files inside a sent zip or tar attachment
973
+ *
974
+ * Lists the regular files inside a zip, tar or tar.gz attachment with each one's path, decoded size and SHA-256. The format is detected from the content. Unsafe paths refuse the whole archive, and resource limits bound the work (see the 413 and 422 responses). Authenticate with an organization API key, an authorized organization OAuth token, or an address-bound agent connection key. A connected agent reads only mail sent from its own address. Function credentials are not supported. Discarded content is unavailable.
975
+ */
976
+ const listSentAttachmentArchiveMembers = (options) => (options.client ?? client).get({
977
+ security: [{
978
+ scheme: "bearer",
979
+ type: "http"
980
+ }],
981
+ url: "/sent-emails/{id}/attachments/{attachment}/members",
982
+ ...options
983
+ });
984
+ /**
985
+ * Download one file from inside a sent zip or tar attachment
986
+ *
987
+ * Returns the decoded bytes of one regular file inside a zip, tar or tar.gz attachment, by its listed path. The archive's structure, every member path and every limit are checked as for the listing, but only the requested file is decoded and verified (its zip CRC-32, and X-Content-SHA256 of the bytes returned); list the archive to have every file decoded. Authenticate with an organization API key, an authorized organization OAuth token, or an address-bound agent connection key. A connected agent reads only mail sent from its own address. Function credentials are not supported. Discarded content is unavailable.
988
+ */
989
+ const downloadSentAttachmentArchiveMember = (options) => (options.client ?? client).get({
990
+ security: [{
991
+ scheme: "bearer",
992
+ type: "http"
993
+ }],
994
+ url: "/sent-emails/{id}/attachments/{attachment}/members/{path}",
995
+ ...options
996
+ });
997
+ /**
912
998
  * Stop the repeat behind a received message
913
999
  *
914
1000
  * Called by the recipient of a repeating send: the connected agent's own
@@ -1990,6 +2076,42 @@ const agentConnectionSetup = (options) => (options?.client ?? client).get({
1990
2076
  ...options
1991
2077
  });
1992
2078
  /**
2079
+ * Long-poll what changed
2080
+ *
2081
+ * One feed of small invalidations (ids and kinds) for everything an app keeps a snapshot of: inbound mail, sent mail, the member's conversation read state, the agent directory and presence, and the credential's own access. Non-consumptive and replayable: any number of devices can read the same cursor independently.
2082
+ *
2083
+ * Start with `since=start` (or no `since`): it returns an empty page whose `next_cursor` is a baseline. Take it BEFORE the initial list reads; every change that commits after it is delivered, including ones those reads already reflect. Then call with `since=<next_cursor>&wait=20` in a loop. Changes come oldest first in commit order, at least once: a write that commits late is never skipped, because positions are assigned at commit.
2084
+ *
2085
+ * Every change is scoped to what this credential's full reads would show: a connected agent sees only its own mail, its own sends and sends it provably received; mail held for sender authentication is announced only when released; read state reaches only the member it belongs to; agent changes reach members and agents allowed to view the network; organization API keys receive no agent changes. Function credentials cannot call this.
2086
+ *
2087
+ * Changes are kept 7 days. A cursor answers 410 `cursor_expired` only when changes after it were pruned (an idle cursor stays valid); rebuild the snapshots from `since=start`.
2088
+ */
2089
+ const listChanges = (options) => (options?.client ?? client).get({
2090
+ security: [{
2091
+ scheme: "bearer",
2092
+ type: "http"
2093
+ }],
2094
+ url: "/changes",
2095
+ ...options
2096
+ });
2097
+ /**
2098
+ * Cancel a scheduled send by idempotency key
2099
+ *
2100
+ * Cancels the still-scheduled send created with this `Idempotency-Key` (matched exactly), as `POST /sent-emails/{id}/cancel` does, and releases the key. 404 `not_found`: no send this credential can act on was created with the key. 409 `not_scheduled`: the send holding the key is no longer scheduled; `error.details` names its `sent_email_id` and `status` (`canceled` if already canceled). Pass `created_before` on a retry so it cannot reach a newer send that reused the released key. A connected agent can cancel any scheduled send from its own address, whoever created it, and no other.
2101
+ */
2102
+ const cancelSentEmailByIdempotencyKey = (options) => (options.client ?? client).post({
2103
+ security: [{
2104
+ scheme: "bearer",
2105
+ type: "http"
2106
+ }],
2107
+ url: "/sent-emails/cancel",
2108
+ ...options,
2109
+ headers: {
2110
+ ...options.body !== void 0 && { "Content-Type": "application/json" },
2111
+ ...options.headers
2112
+ }
2113
+ });
2114
+ /**
1993
2115
  * Cancel a scheduled send
1994
2116
  *
1995
2117
  * Cancels a STILL-SCHEDULED send (status `scheduled`), moving it
@@ -3517,7 +3639,13 @@ async function createAuthenticatedCliApiClient(params) {
3517
3639
  const ATTACHMENT_WAIT_OPERATIONS = /* @__PURE__ */ new Set([
3518
3640
  "downloadAttachments",
3519
3641
  "downloadEmailAttachmentPart",
3520
- "downloadSentAttachmentPart"
3642
+ "downloadSentAttachmentPart",
3643
+ "downloadEmailAttachmentByFilename",
3644
+ "downloadSentAttachmentByFilename",
3645
+ "downloadEmailAttachmentArchiveMember",
3646
+ "downloadSentAttachmentArchiveMember",
3647
+ "listEmailAttachmentArchiveMembers",
3648
+ "listSentAttachmentArchiveMembers"
3521
3649
  ]);
3522
3650
  /** Longest a download command waits for attachment content, in total. */
3523
3651
  const ATTACHMENT_WAIT_MAX_MS = 6e4;
@@ -3891,6 +4019,63 @@ function withFlagSuggestion(error, valid) {
3891
4019
  return error;
3892
4020
  }
3893
4021
  //#endregion
4022
+ //#region src/oclif/from-verified-filter.ts
4023
+ /**
4024
+ * The `from_verified` filter on GET /emails and GET /emails/search: the
4025
+ * `from_verified=true|false` parameter (`--from-verified`) and the
4026
+ * `from_verified:` search term.
4027
+ *
4028
+ * `from_verified` says whether the From domain was authenticated when the
4029
+ * email arrived. A filter on it is a trust decision, so a server that does
4030
+ * not apply it must fail loudly: rows returned for `--from-verified true`
4031
+ * that do not all carry `from_verified: true` are refused instead of being
4032
+ * printed as if they were authenticated mail.
4033
+ */
4034
+ const FROM_VERIFIED_FILTER_UNSUPPORTED_CODE = "from_verified_filter_unsupported";
4035
+ var FromVerifiedFilterUnsupportedError = class extends Error {
4036
+ code = FROM_VERIFIED_FILTER_UNSUPPORTED_CODE;
4037
+ constructor(detail) {
4038
+ super(`The server did not apply the \`from_verified\` filter: ${detail} Nothing was printed. Upgrade to a server that returns \`from_verified\`, or drop the filter.`);
4039
+ this.name = "FromVerifiedFilterUnsupportedError";
4040
+ }
4041
+ };
4042
+ const FROM_VERIFIED_SURFACES = {
4043
+ listEmails: "GET /emails",
4044
+ searchEmails: "GET /emails/search"
4045
+ };
4046
+ const TERM = /(?:^|\s)from_verified:("?)(true|false)\1(?=\s|$)/gi;
4047
+ const PHRASE = /(^|\s)(?:(?!from_verified:)[A-Za-z_][\w.-]*:)?"(?:[^"\\]|\\.)*"/gi;
4048
+ /** The `from_verified:` values a search query asks for, in order. */
4049
+ function fromVerifiedTermsInQuery(q) {
4050
+ if (typeof q !== "string") return [];
4051
+ return [...q.replace(PHRASE, "$1 ").matchAll(TERM)].map((match) => match[2]?.toLowerCase() === "true");
4052
+ }
4053
+ /**
4054
+ * For the generated `emails list` / `emails search` commands: the surface
4055
+ * name and the values every row must have when this call filtered on
4056
+ * `from_verified`, else null.
4057
+ */
4058
+ function fromVerifiedExpectation(sdkName, query) {
4059
+ const surface = FROM_VERIFIED_SURFACES[sdkName];
4060
+ if (!surface || !query) return null;
4061
+ const expected = fromVerifiedTermsInQuery(typeof query.q === "string" ? query.q : void 0);
4062
+ if (query.from_verified === "true") expected.push(true);
4063
+ if (query.from_verified === "false") expected.push(false);
4064
+ return expected.length > 0 ? {
4065
+ surface,
4066
+ expected
4067
+ } : null;
4068
+ }
4069
+ /** Throw unless every row carries `from_verified` with every expected value. */
4070
+ function assertFromVerifiedRows(rows, expectation) {
4071
+ const wrong = rows.filter((row) => {
4072
+ if (row === null || typeof row !== "object") return true;
4073
+ const value = row.from_verified;
4074
+ return typeof value !== "boolean" || expectation.expected.some((expected) => expected !== value);
4075
+ }).length;
4076
+ if (wrong > 0) throw new FromVerifiedFilterUnsupportedError(`${expectation.surface} returned ${wrong} of ${rows.length} email${rows.length === 1 ? "" : "s"} without the requested \`from_verified\` value.`);
4077
+ }
4078
+ //#endregion
3894
4079
  //#region src/oclif/idempotent-replay-banner.ts
3895
4080
  /**
3896
4081
  * If `data` carries `idempotent_replay: true`, write a stderr notice
@@ -4107,7 +4292,7 @@ const SEND_OUTCOME_HELP = `Outcomes and exit codes, shared by chat, chat reply,
4107
4292
  - exit 0 replied: chat only. The message was sent and a reply arrived.
4108
4293
  - exit 0 sent: accepted for delivery. A queued status counts as sent.
4109
4294
  - exit 0 already_sent: an identical earlier send exists (or was deleted: HTTP 410 sent_email_deleted). Nothing new went out. Do not resend.
4110
- - exit 1 not_sent: the API rejected the request (HTTP 400, 401, 402, 403, 404, 413, 422 or 429), the command failed before sending, or the send record has status agent_failed, gate_denied or canceled. Nothing went out.
4295
+ - exit 1 not_sent: the API rejected the request (HTTP 400, 401, 402, 403, 404, 413, 422 or 429, or, from --if-latest-message-id, 409 latest_message_mismatch, 422 latest_message_thread_unresolved or 503 thread_busy), the command failed before sending, or the send record has status agent_failed, gate_denied or canceled. Nothing went out.
4111
4296
  - exit 2: invalid flags or arguments. Nothing went out.
4112
4297
  - exit 3 sent_awaiting_reply: chat only. Sent, but no reply before the timeout. Wait; do not resend.
4113
4298
  - exit 4 uncertain: transport error, conflict, server error, or a send record with status unknown. It may or may not have gone out. Reconcile with primitive sent get --idempotency-key <key> (the key is in the --json envelope) before retrying.`;
@@ -4118,6 +4303,8 @@ function sendFailureOutcome(httpStatus) {
4118
4303
  return httpStatus !== void 0 && DEFINITIVE_SEND_REJECTION_STATUSES.includes(httpStatus) ? "not_sent" : "uncertain";
4119
4304
  }
4120
4305
  const SENT_EMAIL_DELETED_CODE = "sent_email_deleted";
4306
+ const LATEST_MESSAGE_MISMATCH_CODE = "latest_message_mismatch";
4307
+ const THREAD_BUSY_CODE = "thread_busy";
4121
4308
  function errorPayloadCode(payload) {
4122
4309
  if (payload === null || typeof payload !== "object") return void 0;
4123
4310
  const code = payload.code;
@@ -4128,7 +4315,10 @@ function isDeletedEarlierSend(httpStatus, errorPayload) {
4128
4315
  }
4129
4316
  /** Classify an API error from a send request. */
4130
4317
  function classifySendError(httpStatus, errorPayload) {
4131
- return isDeletedEarlierSend(httpStatus, errorPayload) ? "already_sent" : sendFailureOutcome(httpStatus);
4318
+ if (isDeletedEarlierSend(httpStatus, errorPayload)) return "already_sent";
4319
+ if (httpStatus === 409 && errorPayloadCode(errorPayload) === LATEST_MESSAGE_MISMATCH_CODE) return "not_sent";
4320
+ if (httpStatus === 503 && errorPayloadCode(errorPayload) === THREAD_BUSY_CODE) return "not_sent";
4321
+ return sendFailureOutcome(httpStatus);
4132
4322
  }
4133
4323
  function formatDeletedEarlierSendNotice() {
4134
4324
  return "Already sent: an earlier send matching this request went out and its record was later deleted, so the API refused this one (HTTP 410 sent_email_deleted). Nothing new was sent. Do not resend or change the idempotency key to get around this.";
@@ -5361,7 +5551,7 @@ function savedConnectedProfiles(configDir, exclude) {
5361
5551
  */
5362
5552
  async function otherProfiles(configDir, session, current) {
5363
5553
  if (session) try {
5364
- const { connectedProfilesForSession } = await import("./machine-session-CKmn5bvB.js").then((n) => n.s);
5554
+ const { connectedProfilesForSession } = await import("./machine-session-BrTXqxK9.js").then((n) => n.s);
5365
5555
  return {
5366
5556
  inSession: true,
5367
5557
  profiles: connectedProfilesForSession(configDir, session, current)
@@ -6142,6 +6332,7 @@ function createOperationCommand(operation) {
6142
6332
  const query = collectValues(operation.queryParams, parsedFlags);
6143
6333
  const replyStateSurface = replyStateSurfaceForOperation(operation.sdkName, query);
6144
6334
  const automatedSurface = automatedSurfaceForOperation(operation.sdkName, query);
6335
+ const fromVerified = fromVerifiedExpectation(operation.sdkName, query);
6145
6336
  const callOperation = () => operationFn({
6146
6337
  body,
6147
6338
  client: apiClient.client,
@@ -6220,6 +6411,14 @@ function createOperationCommand(operation) {
6220
6411
  process.exitCode = 1;
6221
6412
  return;
6222
6413
  }
6414
+ if (fromVerified) try {
6415
+ assertFromVerifiedRows(Array.isArray(envelope?.data) ? envelope.data : [], fromVerified);
6416
+ } catch (error) {
6417
+ if (!(error instanceof FromVerifiedFilterUnsupportedError)) throw error;
6418
+ process.stderr.write(`${error.message}\n`);
6419
+ process.exitCode = 1;
6420
+ return;
6421
+ }
6223
6422
  const jsonOutput = parsedFlags.json === true;
6224
6423
  const withEnvelope = parsedFlags.envelope === true;
6225
6424
  const cursor = envelope?.meta?.cursor;
@@ -6276,4 +6475,4 @@ function canonicalizeCliReferences(description) {
6276
6475
  return description.replaceAll("`primitive emails:latest`", "`primitive emails latest`").replaceAll("`primitive describe emails:get-email | jq '.responseSchema.properties'`", "`primitive describe emails:get | jq '.responseSchema.properties'`");
6277
6476
  }
6278
6477
  //#endregion
6279
- export { apiResultHttpStatus as $, replyToEmail as $n, completeWebhookEvent as $t, readThreadContext as A, listAgentNetworks as An, formatAlreadySentNotice as At, pendingMailPath as B, listRoutes as Bn, expectedAutomatedVerdicts as Bt, queryUsesAwaiting as C, getMemory as Cn, verifyAgentSignup as Cr, cliInvocation as Ct, displayAddress as D, getThread as Dn, identitySuggestions as Dt, describeWake as E, getSentEmail as En, generatedAgentName as Et, wakeReadCommand as F, listEmails as Fn, AUTOMATED_VALUES as Ft, interactionNextActions as G, pollCliLogin as Gn, SAVED_CLI_OAUTH_SESSION_EXPIRED_MESSAGE as Gt, recordPendingMail as H, listWakeAuthorizations as Hn, isAutomatedRejectedError as Ht, wakeRecipientField as I, listEndpoints as In, AutomatedFilterUnsupportedError as It, replyInteractionWarning as J, putAgentContactPolicy as Jn, refreshStoredCliCredentials as Jt, readEmailInteraction as K, pullWebhookEvent as Kn, createAuthenticatedCliApiClient as Kt, wakeRelationship as L, listFunctionLogs as Ln, assertAutomatedVerdict as Lt, serverMuted as M, listDefaultNetworkAgents as Mn, withFlagSuggestion as Mt, serverRelationship as N, listDefaultNetworkMembers as Nn, AUTOMATED_FILTER_UNSUPPORTED_CODE as Nt, formatMailWakeLine as O, getWakeSchedule as On, loadSkillLine as Ot, skillFirstLine as P, listDomains as Pn, AUTOMATED_FLAG_DESCRIPTION as Pt, SEND_OUTCOME_HELP as Q, reorderRoutes as Qn, cliLogout as Qt, clearConsumedPendingMail as R, listFunctions as Rn, automatedRejectedError as Rt, isAwaitingRejectedError as S, getInboxStatus as Sn, verifyAgentClaim as Sr, DEFAULT_ENROLL_NAME as St, bareAddress$1 as T, getRepeatingSend as Tn, defaultConnectionName as Tt, removePendingMail as U, listWakeDispatches as Un, queryUsesAutomated as Ut, readPendingMail as V, listSentEmails as Vn, hasAutomatedVerdict as Vt, interactionHumanLine as W, listWakeSchedules as Wn, ConnectedAgentKeyRequiredError as Wt, IDEMPOTENCY_KEY_FLAG_DESCRIPTION as X, redeemCreditCode as Xn, addDefaultNetworkMember as Xt, wakeInteractionSentence as Y, putContact as Yn, resolveCliApiRequestConfig as Yt, MAX_SEND_WAIT_TIMEOUT_MS as Z, removeDefaultNetworkMember as Zn, checkDefaultNetworkContactAdmission as Zt, awaitingRejectedError as _, getDefaultNetworkAgent as _n, updateFunction as _r, sendWaitClampNotice as _t, extractErrorCode as a, deleteAgentContact as an, sendEmail as ar, deriveSendIdempotencyKey as at, formatRepliesCell as b, getFunctionRouting as bn, updateWakeAuthorization as br, successfulSendOutcome as bt, readTextFileFlag as c, deleteRoute as cn, setMemory as cr, formatDeletedEarlierSendNotice as ct, writeErrorWithHints as d, downloadEmailAttachmentPart as dn, startAgentSignup as dr, formatSendFailureSummary as dt, createEndpoint as en, resendAgentSignupVerification as er, assertValidIdempotencyKey as et, AWAITING_FLAG_DESCRIPTION as f, getAccount as fn, startCliLogin as fr, formatSendRecordFailureSummary as ft, assertAwaitingFilterRows as g, getCreditBalance as gn, updateDefaultNetworkMember as gr, sendOutcomeExitCode as gt, ReplyStateUnsupportedError as h, getConversation as hn, unsetFunctionRoute as hr, sendIdentityFields as ht, createOperationCommand as i, createWakeSchedule as in, semanticSearch as ir, classifySendError as it, sentInThread as j, listContacts as jn, writeIdempotentReplayBannerIfReplay as jt, latestOwnOutbound as k, listAgentContacts as kn, currentMailSessionKey as kt, runWithTiming as l, deleteWakeAuthorization as ln, simulateRoute as lr, formatPriorRepliesCheckSkipped as lt, REPLY_STATE_UNSUPPORTED_CODE as m, getContact as mn, testFunction as mr, reportSendCommandResult as mt, API_ERROR_CODES as n, createRoute as nn, searchEmails as nr, buildThrownSendFailureEnvelope as nt, extractErrorPayload as o, deleteContact as on, setFunctionRoute as or, excludeSignalReplies as ot, AWAITING_VALUES as p, getAgentContactPolicy as pn, stopRepeatFromEmail as pr, priorRepliesThatWentOut as pt, replyExpectation as q, putAgentContact as qn, createCliApiClient as qt, TIME_FLAG_DESCRIPTION as r, createWakeAuthorization as rn, searchMemories as rr, checkPriorReplies as rt, formatErrorPayload as s, deleteMemory as sn, setFunctionSecret as sr, followUpCommandPrefix as st, API_BASE_URL_FLAG_DESCRIPTION as t, createFunction as tn, runWakeSchedule as tr, buildFollowUpCommand as tt, surfaceUnauthorizedHint as u, deleteWakeSchedule as un, startAgentClaim as ur, formatPriorRepliesWarning as ut, ensureSearchReportsReplyState as v, getEmail as vn, updateRepeatingSend as vr, sentHistoryWindowStart as vt, explainPendingMailNotFound as w, getOrgRoutingTopology as wn, connectNextSteps as wt, hasReplyState as x, getFunctionTestRunTrace as xn, updateWakeSchedule as xr, thrownErrorExitCode as xt, formatAwaitingCell as y, getFunction as yn, updateRoute as yr, serializeErrorPayload as yt, clearReadPendingMail as z, listRepeatingSends as zn, ensureSearchReportsAutomated as zt };
6478
+ export { apiResultHttpStatus as $, listWakeAuthorizations as $n, addDefaultNetworkMember as $t, readThreadContext as A, getFunctionTestRunTrace as An, updateRoute as Ar, formatAlreadySentNotice as At, pendingMailPath as B, listContacts as Bn, expectedAutomatedVerdicts as Bt, queryUsesAwaiting as C, getContact as Cn, startCliLogin as Cr, cliInvocation as Ct, displayAddress as D, getEmail as Dn, updateDefaultNetworkMember as Dr, identitySuggestions as Dt, describeWake as E, getDefaultNetworkAgent as En, unsetFunctionRoute as Er, generatedAgentName as Et, wakeReadCommand as F, getSentEmail as Fn, AUTOMATED_VALUES as Ft, interactionNextActions as G, listEmails as Gn, ATTACHMENT_WAIT_MAX_MS as Gt, recordPendingMail as H, listDefaultNetworkMembers as Hn, isAutomatedRejectedError as Ht, wakeRecipientField as I, getThread as In, AutomatedFilterUnsupportedError as It, replyInteractionWarning as J, listFunctions as Jn, SAVED_CLI_OAUTH_SESSION_EXPIRED_MESSAGE as Jt, readEmailInteraction as K, listEndpoints as Kn, withAttachmentWait as Kt, wakeRelationship as L, getWakeSchedule as Ln, assertAutomatedVerdict as Lt, serverMuted as M, getMemory as Mn, updateWakeSchedule as Mr, withFlagSuggestion as Mt, serverRelationship as N, getOrgRoutingTopology as Nn, verifyAgentClaim as Nr, AUTOMATED_FILTER_UNSUPPORTED_CODE as Nt, formatMailWakeLine as O, getFunction as On, updateFunction as Or, loadSkillLine as Ot, skillFirstLine as P, getRepeatingSend as Pn, verifyAgentSignup as Pr, AUTOMATED_FLAG_DESCRIPTION as Pt, SEND_OUTCOME_HELP as Q, listSentEmails as Qn, resolveCliApiRequestConfig as Qt, clearConsumedPendingMail as R, listAgentContacts as Rn, automatedRejectedError as Rt, isAwaitingRejectedError as S, getAgentContactPolicy as Sn, startAgentSignup as Sr, DEFAULT_ENROLL_NAME as St, bareAddress$1 as T, getCreditBalance as Tn, testFunction as Tr, defaultConnectionName as Tt, removePendingMail as U, listDomains as Un, queryUsesAutomated as Ut, readPendingMail as V, listDefaultNetworkAgents as Vn, hasAutomatedVerdict as Vt, interactionHumanLine as W, listEmailAttachmentArchiveMembers as Wn, ATTACHMENT_WAIT_FLAG_DESCRIPTION as Wt, IDEMPOTENCY_KEY_FLAG_DESCRIPTION as X, listRoutes as Xn, createCliApiClient as Xt, wakeInteractionSentence as Y, listRepeatingSends as Yn, createAuthenticatedCliApiClient as Yt, MAX_SEND_WAIT_TIMEOUT_MS as Z, listSentAttachmentArchiveMembers as Zn, refreshStoredCliCredentials as Zt, awaitingRejectedError as _, downloadEmailAttachmentByFilename as _n, setFunctionRoute as _r, sendWaitClampNotice as _t, extractErrorCode as a, createEndpoint as an, putAgentContactPolicy as ar, deriveSendIdempotencyKey as at, formatRepliesCell as b, downloadSentAttachmentByFilename as bn, simulateRoute as br, successfulSendOutcome as bt, readTextFileFlag as c, createWakeAuthorization as cn, removeDefaultNetworkMember as cr, formatDeletedEarlierSendNotice as ct, writeErrorWithHints as d, deleteContact as dn, resendAgentSignupVerification as dr, formatSendFailureSummary as dt, cancelSentEmail as en, listWakeDispatches as er, assertValidIdempotencyKey as et, AWAITING_FLAG_DESCRIPTION as f, deleteMemory as fn, runWakeSchedule as fr, formatSendRecordFailureSummary as ft, assertAwaitingFilterRows as g, downloadEmailAttachmentArchiveMember as gn, sendEmail as gr, sendOutcomeExitCode as gt, ReplyStateUnsupportedError as h, deleteWakeSchedule as hn, semanticSearch as hr, sendIdentityFields as ht, createOperationCommand as i, completeWebhookEvent as in, putAgentContact as ir, classifySendError as it, sentInThread as j, getInboxStatus as jn, updateWakeAuthorization as jr, writeIdempotentReplayBannerIfReplay as jt, latestOwnOutbound as k, getFunctionRouting as kn, updateRepeatingSend as kr, currentMailSessionKey as kt, runWithTiming as l, createWakeSchedule as ln, reorderRoutes as lr, formatPriorRepliesCheckSkipped as lt, REPLY_STATE_UNSUPPORTED_CODE as m, deleteWakeAuthorization as mn, searchMemories as mr, reportSendCommandResult as mt, API_ERROR_CODES as n, checkDefaultNetworkContactAdmission as nn, pollCliLogin as nr, buildThrownSendFailureEnvelope as nt, extractErrorPayload as o, createFunction as on, putContact as or, excludeSignalReplies as ot, AWAITING_VALUES as p, deleteRoute as pn, searchEmails as pr, priorRepliesThatWentOut as pt, replyExpectation as q, listFunctionLogs as qn, ConnectedAgentKeyRequiredError as qt, TIME_FLAG_DESCRIPTION as r, cliLogout as rn, pullWebhookEvent as rr, checkPriorReplies as rt, formatErrorPayload as s, createRoute as sn, redeemCreditCode as sr, followUpCommandPrefix as st, API_BASE_URL_FLAG_DESCRIPTION as t, cancelSentEmailByIdempotencyKey as tn, listWakeSchedules as tr, buildFollowUpCommand as tt, surfaceUnauthorizedHint as u, deleteAgentContact as un, replyToEmail as ur, formatPriorRepliesWarning as ut, ensureSearchReportsReplyState as v, downloadEmailAttachmentPart as vn, setFunctionSecret as vr, sentHistoryWindowStart as vt, explainPendingMailNotFound as w, getConversation as wn, stopRepeatFromEmail as wr, connectNextSteps as wt, hasReplyState as x, getAccount as xn, startAgentClaim as xr, thrownErrorExitCode as xt, formatAwaitingCell as y, downloadSentAttachmentArchiveMember as yn, setMemory as yr, serializeErrorPayload as yt, clearReadPendingMail as z, listAgentNetworks as zn, ensureSearchReportsAutomated as zt };
@@ -1,9 +1,9 @@
1
- import { S as __exportAll } from "./repeats-BL7ZC-_6-BZ-MphTV.js";
1
+ import { S as __exportAll } from "./repeats-BL7ZC-_6-CKMKBlx7.js";
2
2
  import { B as parseOwnerMemberAddress, F as agentProfilesDirectory, I as connectedAgentIdentity, L as connectedApiBaseUrl, M as AgentConnectionSetupError, N as agentProfileDirectory, P as agentProfileName, R as loadConnectedAgentProfile, U as saveConnectedAgentProfile, V as profileAlreadyConnectedMessage, W as PrimitiveApiClient, j as AGENT_PROFILE_ENV, x as loadCliCredentials, z as parseConnectedAgentProfile } from "./cli-config-DMszFbGn.js";
3
- import { Ct as cliInvocation, Jn as putAgentContactPolicy, Jt as refreshStoredCliCredentials, Pn as listDomains, Tt as defaultConnectionName, Vn as listSentEmails, Yn as putContact, an as deleteAgentContact, ar as sendEmail, jn as listContacts, kn as listAgentContacts, mn as getContact, nr as searchEmails, on as deleteContact, pn as getAgentContactPolicy, qn as putAgentContact, vn as getEmail } from "./api-command-C58Oh38I.js";
3
+ import { Bn as listContacts, Cn as getContact, Ct as cliInvocation, Dn as getEmail, Qn as listSentEmails, Rn as listAgentContacts, Sn as getAgentContactPolicy, Tt as defaultConnectionName, Un as listDomains, Zt as refreshStoredCliCredentials, ar as putAgentContactPolicy, dn as deleteContact, gr as sendEmail, ir as putAgentContact, or as putContact, pr as searchEmails, un as deleteAgentContact } from "./api-command-B8C3jr7A.js";
4
4
  import { _ as acquireListenLock, c as mailTime, d as readMailJson, f as removeMailFile, g as ListenStateError, h as writeMailJson, i as mailId, l as privateMailDirectory, o as mailObject, r as mailAddress, s as mailString } from "./shared-mail-files-MwlVE90c.js";
5
- import { _ as detectAgentRuntime, a as NotificationRetryError, d as defaultSessionSocket, f as NativeSessionDisconnectedError, l as SESSION_UUID, t as notificationScope, u as connectNativeSession, v as installConnectSkill, x as readBundledConnectSkill } from "./notify-session-CVZtEboh.js";
6
- import { a as scopedChatSenderTrust } from "./scoped-chat-Dsark9hm.js";
5
+ import { _ as detectAgentRuntime, a as NotificationRetryError, d as defaultSessionSocket, f as NativeSessionDisconnectedError, l as SESSION_UUID, t as notificationScope, u as connectNativeSession, v as installConnectSkill, x as readBundledConnectSkill } from "./notify-session-JbFGcjiM.js";
6
+ import { a as scopedChatSenderTrust } from "./scoped-chat-DTFkP360.js";
7
7
  import { l as stopBackgroundListen, r as backgroundListenStatus } from "./listen-background--0peztKE.js";
8
8
  import { t as readSharedMailOwner } from "./shared-mail-watch-DtKpsgg8.js";
9
9
  import { accessSync, chmodSync, closeSync, constants, copyFileSync, existsSync, fsyncSync, lstatSync, mkdirSync, openSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, rmdirSync, statSync, unlinkSync, writeFileSync } from "node:fs";
@@ -1,5 +1,5 @@
1
- import { b as parseWebhookEvent, c as classifySignalContent, v as isEmailReceivedEvent, y as isTrustedSender } from "./repeats-BL7ZC-_6-BZ-MphTV.js";
2
- import { F as wakeReadCommand, P as skillFirstLine, Y as wakeInteractionSentence, dn as downloadEmailAttachmentPart } from "./api-command-C58Oh38I.js";
1
+ import { b as parseWebhookEvent, c as classifySignalContent, v as isEmailReceivedEvent, y as isTrustedSender } from "./repeats-BL7ZC-_6-CKMKBlx7.js";
2
+ import { F as wakeReadCommand, P as skillFirstLine, Y as wakeInteractionSentence, vn as downloadEmailAttachmentPart } from "./api-command-B8C3jr7A.js";
3
3
  import { _ as acquireListenLock, g as ListenStateError, y as listenIdentity } from "./shared-mail-files-MwlVE90c.js";
4
4
  import { closeSync, copyFileSync, existsSync, fsyncSync, lstatSync, mkdirSync, openSync, opendirSync, readFileSync, readdirSync, readlinkSync, renameSync, rmSync, statSync, symlinkSync, unlinkSync, writeFileSync } from "node:fs";
5
5
  import { createHash, randomUUID, scryptSync } from "node:crypto";
@@ -1,6 +1,6 @@
1
- import { A as readThreadContext, En as getSentEmail, Kt as createAuthenticatedCliApiClient } from "../api-command-C58Oh38I.js";
1
+ import { A as readThreadContext, Fn as getSentEmail, Yt as createAuthenticatedCliApiClient } from "../api-command-B8C3jr7A.js";
2
2
  import { _ as acquireListenLock } from "../shared-mail-files-MwlVE90c.js";
3
- import { t as sendSignal } from "../signal-command-Dy_oub7_.js";
3
+ import { t as sendSignal } from "../signal-command-B2TZ8n9c.js";
4
4
  import { AUTO_SIGNAL_KIND_ENV, AUTO_WORKING_RENEW_MS, autoSignalsDisabled, clearWorkingSending, markWorkingSending, readAutoClaim, readWorkingLease, recordRenewer, stopWorkingLease, writeWorkingLease } from "./auto-signals.js";
5
5
  import { join } from "node:path";
6
6
  import { homedir } from "node:os";
@@ -1,5 +1,5 @@
1
1
  import { d as readMailJson, h as writeMailJson, i as mailId, l as privateMailDirectory, r as mailAddress } from "../shared-mail-files-MwlVE90c.js";
2
- import { a as scopedChatSenderTrust, n as isPlainChatReply } from "../scoped-chat-Dsark9hm.js";
2
+ import { a as scopedChatSenderTrust, n as isPlainChatReply } from "../scoped-chat-DTFkP360.js";
3
3
  import { existsSync, readFileSync, readdirSync, unlinkSync, writeFileSync } from "node:fs";
4
4
  import { randomUUID } from "node:crypto";
5
5
  import { join } from "node:path";