primcli 1.71.0 → 1.72.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.
- package/README.md +115 -2
- package/dist/{api-command-B8C3jr7A.js → api-command-BrwPbyPP.js} +83 -15
- package/dist/{cli-config-DMszFbGn.js → cli-config--YTRdJ3t.js} +15 -4
- package/dist/{json-output-CEskSQJi.js → json-output-Ce10AsSb.js} +71 -3
- package/dist/{machine-session-BrTXqxK9.js → machine-session-Be6j29GE.js} +6 -4
- package/dist/{notify-session-JbFGcjiM.js → notify-session-Byt5sPWW.js} +1 -1
- package/dist/oclif/auto-signal-worker.js +2 -2
- package/dist/oclif/index.js +1304 -56
- package/dist/oclif/proxy-auto-detect.js +1 -1
- package/dist/oclif/receiver-heal.js +2 -2
- package/dist/oclif/root-signup-hint.js +1 -1
- package/dist/{signal-command-B2TZ8n9c.js → signal-command-DeEEZPbQ.js} +1 -1
- package/dist/skills/primitive-connect/SKILL.md +162 -355
- package/dist/skills/primitive-connect/references/collaboration.md +39 -2
- package/dist/skills/primitive-connect/references/communication.md +2 -2
- package/dist/skills/primitive-connect/references/connect.md +234 -0
- package/dist/skills/primitive-connect/references/contact-requests.md +3 -3
- package/dist/skills/primitive-connect/references/contacts.md +4 -4
- package/dist/skills/primitive-connect/references/conversations.md +4 -4
- package/dist/skills/primitive-connect/references/external-services.md +86 -0
- package/dist/skills/primitive-connect/references/manual-setup.md +2 -2
- package/dist/skills/primitive-connect/references/presence-and-receiving.md +5 -5
- package/dist/skills/primitive-connect/scripts/check-cli-capabilities.mjs +13 -4
- package/dist/skills/primitive-connect.json +13 -11
- package/man/primitive.1 +17 -3
- package/package.json +1 -1
package/dist/oclif/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { a as REPEAT_IDLE_MAX_MINUTES, b as parseWebhookEvent, d as parseRepeatTick, f as preparePresenceAliveEmail, i as REPEAT_EVERY_MAX_MINUTES, l as parseInteractionEnvelope$1, m as repeatStopCommand, o as REPEAT_MAX_SENDS_MAX, p as prepareSignalEmail, s as buildRepeatStopBody, u as parsePresenceEnvelope, v as isEmailReceivedEvent, x as parseFromHeader } from "../repeats-BL7ZC-_6-CKMKBlx7.js";
|
|
2
|
-
import { A as saveActiveChatState, C as resolveCliAuth, D as deleteChatState, E as chatStatePath, F as
|
|
3
|
-
import { $ as
|
|
2
|
+
import { A as saveActiveChatState, C as resolveCliAuth, D as deleteChatState, E as chatStatePath, F as agentProfileName, G as PrimitiveApiClient, I as agentProfilesDirectory, M as AGENT_PROFILE_ENV, N as AgentConnectionSetupError, O as loadActiveChatState, P as agentProfileDirectory, T as saveSignupCredentials, U as requireDefaultLoginProfile, _ as deleteCliCredentials, a as normalizeCliEnvironmentName, b as hasStoredCliLogin, c as resolveConfigEnvironment, g as credentialsPath, h as credentialsLockPath, i as loadCliConfig, j as AGENT_ADDRESS_ENV, k as loadChatConversationByLocalId, l as saveCliConfig, m as cliAccessTokenExpiresAt, n as deleteCliConfig, o as redactCliEnvironment, p as acquireCliCredentialsLock, r as emptyCliConfig, s as removeCliEnvironment, u as upsertCliEnvironment, v as deleteCliCredentialsLock, w as saveCliCredentials, x as loadCliCredentials, y as detectPrimitiveKeyEnvMisname, z as loadConnectedAgentProfile } from "../cli-config--YTRdJ3t.js";
|
|
3
|
+
import { $ as MAX_SEND_WAIT_TIMEOUT_MS, $n as listSentAttachmentArchiveMembers, $t as refreshStoredCliCredentials, A as formatMailWakeLine, An as getFunction, Ar as updateFunction, At as loadSkillLine, B as clearConsumedPendingMail, Bn as listAgentContacts, Bt as automatedRejectedError, C as hasReplyState, Cn as getAccount, Cr as startAgentClaim, Ct as thrownErrorExitCode, D as bareAddress, Dn as getCreditBalance, Dr as testFunction, E as explainPendingMailNotFound, En as getConversation, Er as stopRepeatFromEmail, Et as connectNextSteps, F as serverRelationship, Fn as getOrgRoutingTopology, Fr as verifyAgentClaim, Ft as AUTOMATED_FILTER_UNSUPPORTED_CODE, G as removePendingMail, Gn as listDomains, Gt as queryUsesAutomated, H as pendingMailPath, Ht as expectedAutomatedVerdicts, In as getRepeatingSend, Ir as verifyAgentSignup, It as AUTOMATED_FLAG_DESCRIPTION, J as readEmailInteraction, Jn as listEndpoints, Jt as withAttachmentWait, K as interactionHumanLine, Kn as listEmailAttachmentArchiveMembers, Kt as ATTACHMENT_WAIT_FLAG_DESCRIPTION, L as wakeReadCommand, Ln as getSentEmail, Lt as AUTOMATED_VALUES, M as readThreadContext, Mn as getFunctionTestRunTrace, Mr as updateRoute, Mt as formatAlreadySentNotice, N as sentInThread, Nn as getInboxStatus, Nr as updateWakeAuthorization, Nt as writeIdempotentReplayBannerIfReplay, O as describeWake, On as getDefaultNetworkAgent, Or as unsetFunctionRoute, Ot as generatedAgentName, P as serverMuted, Pn as getMemory, Pr as updateWakeSchedule, Pt as withFlagSuggestion, Q as IDEMPOTENCY_KEY_FLAG_DESCRIPTION, Qn as listRoutes, Qt as createCliApiClient, R as wakeRecipientField, Rn as getThread, Rt as AutomatedFilterUnsupportedError, S as formatRepliesCell, Sn as downloadSentAttachmentByFilename, Sr as simulateRoute, St as successfulSendOutcome, T as queryUsesAwaiting, Tr as startCliLogin, Tt as cliInvocation, U as readPendingMail, Un as listDefaultNetworkAgents, Ut as hasAutomatedVerdict, V as clearReadPendingMail, Vn as listAgentNetworks, Vt as ensureSearchReportsAutomated, W as recordPendingMail, Wn as listDefaultNetworkMembers, Wt as isAutomatedRejectedError, X as replyInteractionWarning, Xn as listFunctions, Y as replyExpectation, Yn as listFunctionLogs, Yt as ConnectedAgentKeyRequiredError, Zn as listRepeatingSends, Zt as createAuthenticatedCliApiClient, _ as ReplyStateUnsupportedError, _n as deleteWakeSchedule, _r as semanticSearch, _t as sendIdentityFields, a as extractErrorCode, an as cliLogout, ar as pullWebhookEvent, at as checkPriorReplies, b as ensureSearchReportsReplyState, br as setFunctionSecret, bt as sentHistoryWindowStart, c as hasControlCharacter$1, cn as createFunction, ct as excludeSignalReplies, d as runWithTiming, dn as createWakeSchedule, dr as reorderRoutes, dt as formatPriorRepliesCheckSkipped, en as resolveCliApiRequestConfig, er as listSentEmails, et as SEND_OUTCOME_HELP, f as surfaceUnauthorizedHint, fr as replyToEmail, ft as formatPriorRepliesWarning, g as REPLY_STATE_UNSUPPORTED_CODE, gn as deleteWakeAuthorization, gr as searchMemories, gt as reportSendCommandResult, h as AWAITING_VALUES, hn as deleteRoute, hr as searchEmails, ht as priorRepliesThatWentOut, i as createOperationCommand, in as checkDefaultNetworkContactAdmission, ir as pollCliLogin, it as buildThrownSendFailureEnvelope, j as latestOwnOutbound, jn as getFunctionRouting, jr as updateRepeatingSend, jt as currentMailSessionKey, k as displayAddress, kn as getEmail, kr as updateDefaultNetworkMember, kt as identitySuggestions, l as headerFlagName, ln as createRoute, lr as redeemCreditCode, lt as followUpCommandPrefix, m as AWAITING_FLAG_DESCRIPTION, mn as deleteMemory, mr as runWakeSchedule, mt as formatSendRecordFailureSummary, n as API_ERROR_CODES, nn as cancelSentEmail, nr as listWakeDispatches, nt as assertValidIdempotencyKey, o as extractErrorPayload, on as completeWebhookEvent, ot as classifySendError, p as writeErrorWithHints, pr as resendAgentSignupVerification, pt as formatSendFailureSummary, q as interactionNextActions, qn as listEmails, qt as ATTACHMENT_WAIT_MAX_MS, r as TIME_FLAG_DESCRIPTION, rn as cancelSentEmailByIdempotencyKey, rr as listWakeSchedules, rt as buildFollowUpCommand, s as formatErrorPayload, sn as createEndpoint, st as deriveSendIdempotencyKey, t as API_BASE_URL_FLAG_DESCRIPTION, tn as addDefaultNetworkMember, tr as listWakeAuthorizations, tt as apiResultHttpStatus, u as readTextFileFlag, un as createWakeAuthorization, ur as removeDefaultNetworkMember, ut as formatDeletedEarlierSendNotice, v as assertAwaitingFilterRows, vn as downloadEmailAttachmentArchiveMember, vr as sendEmail, vt as sendOutcomeExitCode, w as isAwaitingRejectedError, wn as getAgentContactPolicy, wr as startAgentSignup, x as formatAwaitingCell, xn as downloadSentAttachmentArchiveMember, xr as setMemory, xt as serializeErrorPayload, y as awaitingRejectedError, yn as downloadEmailAttachmentByFilename, yr as setFunctionRoute, yt as sendWaitClampNotice, z as wakeRelationship, zn as getWakeSchedule, zt as assertAutomatedVerdict } from "../api-command-BrwPbyPP.js";
|
|
4
4
|
import { S as resolveListenSubscription, _ as acquireListenLock, a as mailLockBusy, c as mailTime, d as readMailJson, f as removeMailFile, g as ListenStateError, h as writeMailJson, i as mailId, l as privateMailDirectory, m as withMailLock, o as mailObject, u as privateMailPermissions, x as normalizeListenOrigin, y as listenIdentity } from "../shared-mail-files-MwlVE90c.js";
|
|
5
|
-
import { _ as detectAgentRuntime, a as NotificationRetryError, b as installedVersion, c as readConversationStatusContent, d as defaultSessionSocket, f as NativeSessionDisconnectedError, g as connectSkillTarget, h as NotificationOutcomeUnknownError, i as notificationReceiptPage, l as SESSION_UUID$1, m as NativeSessionNotLoadedError, n as notificationSenders, o as isRoutineNotificationContent, p as NativeSessionError, r as openSessionNotifications, s as notificationPartReader, t as notificationScope, v as installConnectSkill, x as readBundledConnectSkill, y as installedConnectSkillFile } from "../notify-session-
|
|
6
|
-
import { $ as installClaudeWakeHook, A as evaluateContactPolicy, B as contactAddress, C as RECEIVER_MODES, Ct as withOwnerMemberAddress, D as NETWORK_ADMISSION_PENDING_RETRY_MS, E as ContactPolicyReadRetryError, F as disconnectAgent, G as connectAgent, H as runContactRequest, I as AddressNotesApiError, J as refusalAfterReplacement, K as readAgentInvitation, L as addressNoteTarget, M as AgentDisconnectError, N as claimOverRevokedSetup, O as NetworkAdmissionPendingError, P as clearRevokedAddresses, Q as releaseRegistrationsForProfile, R as runAddressNotesRequest, S as runAgentConnect, St as refreshOwnerMemberAddressPeriodically, T as verificationReplySubmitted, U as agentConnectionStatus, V as contactAgentAddress, W as agentInvitationHash, X as savedReceiver, Y as saveConnectionName, Z as MACHINE_RUNTIMES, _ as enrollmentResumes, _t as jsonIndentation, a as endSession, at as describeSessionHookItem, b as invitationProfileName, bt as writeManagedFile, c as pendingSessionDisconnects, ct as findOnPath, d as registerSession, dt as readClaudeSettings, et as recordHookMailCheck, f as retryPendingDisconnects, ft as repairClaudeHooks, g as enrollAgent, gt as inspectManagedBlock, h as staleSessionAgents, ht as MachineFileError, i as connectedProfilesForSession, it as describeSessionHookChange, j as canonicalContactSelector, k as createNotificationContactPolicy, l as psProcessInfo, lt as hasMachineSessionHooks, m as runDetached, mt as writeClaudeSettings, n as OMP_MAIN, nt as claudeConfigDir, o as headlessClaudeRun, ot as ensureHookLauncher, p as revokeStaleSessionAgents, pt as samePath, q as receiverStatusCommand, r as agentConnectionState, rt as currentCliLocation, st as ephemeralCliReason, t as HOOK_END_GRACE_MS, tt as boundSessionProfiles, u as readClaudeHookInput, ut as inspectClaudeHooks, v as connectWarnings, vt as readManagedFile, w as externalReceivingState, x as pollCheckCommand, xt as readHookLauncherWarning, y as defaultAgentProfileName, yt as upsertManagedBlock, z as ContactsApiError } from "../machine-session-
|
|
5
|
+
import { _ as detectAgentRuntime, a as NotificationRetryError, b as installedVersion, c as readConversationStatusContent, d as defaultSessionSocket, f as NativeSessionDisconnectedError, g as connectSkillTarget, h as NotificationOutcomeUnknownError, i as notificationReceiptPage, l as SESSION_UUID$1, m as NativeSessionNotLoadedError, n as notificationSenders, o as isRoutineNotificationContent, p as NativeSessionError, r as openSessionNotifications, s as notificationPartReader, t as notificationScope, v as installConnectSkill, x as readBundledConnectSkill, y as installedConnectSkillFile } from "../notify-session-Byt5sPWW.js";
|
|
6
|
+
import { $ as installClaudeWakeHook, A as evaluateContactPolicy, B as contactAddress, C as RECEIVER_MODES, Ct as withOwnerMemberAddress, D as NETWORK_ADMISSION_PENDING_RETRY_MS, E as ContactPolicyReadRetryError, F as disconnectAgent, G as connectAgent, H as runContactRequest, I as AddressNotesApiError, J as refusalAfterReplacement, K as readAgentInvitation, L as addressNoteTarget, M as AgentDisconnectError, N as claimOverRevokedSetup, O as NetworkAdmissionPendingError, P as clearRevokedAddresses, Q as releaseRegistrationsForProfile, R as runAddressNotesRequest, S as runAgentConnect, St as refreshOwnerMemberAddressPeriodically, T as verificationReplySubmitted, U as agentConnectionStatus, V as contactAgentAddress, W as agentInvitationHash, X as savedReceiver, Y as saveConnectionName, Z as MACHINE_RUNTIMES, _ as enrollmentResumes, _t as jsonIndentation, a as endSession, at as describeSessionHookItem, b as invitationProfileName, bt as writeManagedFile, c as pendingSessionDisconnects, ct as findOnPath, d as registerSession, dt as readClaudeSettings, et as recordHookMailCheck, f as retryPendingDisconnects, ft as repairClaudeHooks, g as enrollAgent, gt as inspectManagedBlock, h as staleSessionAgents, ht as MachineFileError, i as connectedProfilesForSession, it as describeSessionHookChange, j as canonicalContactSelector, k as createNotificationContactPolicy, l as psProcessInfo, lt as hasMachineSessionHooks, m as runDetached, mt as writeClaudeSettings, n as OMP_MAIN, nt as claudeConfigDir, o as headlessClaudeRun, ot as ensureHookLauncher, p as revokeStaleSessionAgents, pt as samePath, q as receiverStatusCommand, r as agentConnectionState, rt as currentCliLocation, st as ephemeralCliReason, t as HOOK_END_GRACE_MS, tt as boundSessionProfiles, u as readClaudeHookInput, ut as inspectClaudeHooks, v as connectWarnings, vt as readManagedFile, w as externalReceivingState, x as pollCheckCommand, xt as readHookLauncherWarning, y as defaultAgentProfileName, yt as upsertManagedBlock, z as ContactsApiError } from "../machine-session-Be6j29GE.js";
|
|
7
7
|
import { a as scopedChatSenderTrust, i as readBeforeDeadline, n as isPlainChatReply, o as presenceDisposition, r as isScopedChatReply, s as readPresenceProjection, t as isConnectedChatCredential } from "../scoped-chat-DTFkP360.js";
|
|
8
8
|
import { c as startBackgroundListen, i as backgroundListenToken, l as stopBackgroundListen, o as runBackgroundListen, r as backgroundListenStatus, u as verifyBackgroundListenTarget } from "../listen-background--0peztKE.js";
|
|
9
|
-
import { a as ensureSharedMailSubscription, c as isConnectedAgentKey, d as reserveSharedMailSubscription, f as followEmailConversation, g as EventReceiverError, h as EventConnection, i as sharedMailScope, l as createSharedMailWaiter, m as otherParticipants, n as reconcileChatSend, p as readConversationFollow, r as openSharedMailReceiver, s as AGENT_CONNECTION_REQUIRED_MESSAGE, t as sendSignal, u as openSharedMailStore } from "../signal-command-
|
|
9
|
+
import { a as ensureSharedMailSubscription, c as isConnectedAgentKey, d as reserveSharedMailSubscription, f as followEmailConversation, g as EventReceiverError, h as EventConnection, i as sharedMailScope, l as createSharedMailWaiter, m as otherParticipants, n as reconcileChatSend, p as readConversationFollow, r as openSharedMailReceiver, s as AGENT_CONNECTION_REQUIRED_MESSAGE, t as sendSignal, u as openSharedMailStore } from "../signal-command-DeEEZPbQ.js";
|
|
10
10
|
import { autoSignalEligible, dispatchAutoRead, dispatchAutoWorking, haltAutoWorking, isSentSignal, readWorkingLease, restoreAutoWorking } from "./auto-signals.js";
|
|
11
|
-
import { t as guardJsonOutputCommands } from "../json-output-
|
|
11
|
+
import { n as jsonOutputRequested, r as runStreamingJson, t as guardJsonOutputCommands } from "../json-output-Ce10AsSb.js";
|
|
12
12
|
import { Args, Command, Errors, Flags, ux } from "@oclif/core";
|
|
13
|
-
import { chmodSync, closeSync, constants, cpSync, existsSync, fstatSync, fsyncSync, linkSync, lstatSync, mkdirSync, openSync, readFileSync, readSync, readdirSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
13
|
+
import { appendFileSync, chmodSync, closeSync, constants, cpSync, existsSync, fstatSync, fsyncSync, linkSync, lstatSync, mkdirSync, openSync, readFileSync, readSync, readdirSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
14
14
|
import { createHash, randomUUID, scryptSync } from "node:crypto";
|
|
15
15
|
import path, { basename, dirname, join, relative, resolve, sep } from "node:path";
|
|
16
16
|
import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
@@ -10661,19 +10661,182 @@ const openapiDocument = {
|
|
|
10661
10661
|
"address_note_conflict",
|
|
10662
10662
|
"address_not_controlled",
|
|
10663
10663
|
"contact_conflict",
|
|
10664
|
-
"
|
|
10665
|
-
"
|
|
10666
|
-
"
|
|
10667
|
-
"
|
|
10664
|
+
"connection_removed",
|
|
10665
|
+
"connection_create_request_conflict",
|
|
10666
|
+
"connection_already_claimed",
|
|
10667
|
+
"connection_revoked",
|
|
10668
|
+
"connection_cleanup_pending",
|
|
10668
10669
|
"attachment_name_ambiguous",
|
|
10669
|
-
"
|
|
10670
|
+
"attachment_not_archive",
|
|
10670
10671
|
"archive_unsafe_path",
|
|
10671
10672
|
"archive_invalid",
|
|
10672
10673
|
"archive_unsupported",
|
|
10673
|
-
"
|
|
10674
|
+
"archive_limit_exceeded",
|
|
10674
10675
|
"archive_busy",
|
|
10676
|
+
"latest_message_mismatch",
|
|
10677
|
+
"latest_message_thread_unresolved",
|
|
10678
|
+
"thread_busy",
|
|
10679
|
+
"sent_mail_search_unavailable",
|
|
10680
|
+
"member_address_unavailable",
|
|
10681
|
+
"member_address_history_confirmation_required",
|
|
10682
|
+
"member_address_immutable",
|
|
10683
|
+
"member_address_domain_unavailable",
|
|
10684
|
+
"email_admission_unavailable",
|
|
10685
|
+
"pull_subscription_requires_agent_connection",
|
|
10686
|
+
"address_in_use",
|
|
10687
|
+
"address_not_owned",
|
|
10688
|
+
"address_owned_by_another_org",
|
|
10689
|
+
"agent_account_managed_domain_only",
|
|
10690
|
+
"agent_changed",
|
|
10691
|
+
"agent_limit",
|
|
10692
|
+
"agent_misconfigured",
|
|
10693
|
+
"agent_not_defined",
|
|
10694
|
+
"agent_not_found",
|
|
10695
|
+
"agent_unreachable",
|
|
10696
|
+
"already_claimed",
|
|
10697
|
+
"already_member",
|
|
10698
|
+
"bad_request",
|
|
10699
|
+
"body_not_supported",
|
|
10700
|
+
"build_failed",
|
|
10701
|
+
"builder_unavailable",
|
|
10702
|
+
"chunk_too_large",
|
|
10703
|
+
"chunks_missing",
|
|
10704
|
+
"claim_not_pending",
|
|
10705
|
+
"clerk_failed",
|
|
10706
|
+
"code_expired",
|
|
10707
|
+
"contact_request_invalid",
|
|
10708
|
+
"contact_request_not_ready",
|
|
10709
|
+
"contact_request_unauthenticated",
|
|
10710
|
+
"contact_request_unavailable",
|
|
10711
|
+
"cursor_expired",
|
|
10712
|
+
"delete_failed",
|
|
10713
|
+
"deploy_failed",
|
|
10714
|
+
"direct_delivery_failed",
|
|
10715
|
+
"direct_delivery_unavailable",
|
|
10716
|
+
"directory_limit",
|
|
10717
|
+
"dns_publication_failed",
|
|
10718
|
+
"dns_publication_pending",
|
|
10719
|
+
"dns_verification_failed",
|
|
10720
|
+
"download_token_expired",
|
|
10721
|
+
"download_token_invalid",
|
|
10722
|
+
"email_in_use",
|
|
10723
|
+
"embedding_provider_unavailable",
|
|
10724
|
+
"expired",
|
|
10725
|
+
"fresh_send_not_authorized",
|
|
10726
|
+
"function_effect_email_mismatch",
|
|
10727
|
+
"function_effect_mismatch",
|
|
10728
|
+
"function_forked",
|
|
10729
|
+
"function_github_linked",
|
|
10730
|
+
"function_not_deployed",
|
|
10731
|
+
"function_scope_forbidden",
|
|
10732
|
+
"handle_in_cooldown",
|
|
10733
|
+
"handle_reserved",
|
|
10734
|
+
"handle_taken",
|
|
10735
|
+
"hash_mismatch",
|
|
10736
|
+
"hipaa_mode_check_unavailable",
|
|
10737
|
+
"hipaa_mode_external_send_blocked",
|
|
10738
|
+
"idempotency_conflict",
|
|
10739
|
+
"invalid_code",
|
|
10675
10740
|
"invalid_cursor",
|
|
10676
|
-
"
|
|
10741
|
+
"invalid_email",
|
|
10742
|
+
"invalid_input",
|
|
10743
|
+
"invalid_payload_reference",
|
|
10744
|
+
"invalid_request",
|
|
10745
|
+
"invalid_step",
|
|
10746
|
+
"invalid_token",
|
|
10747
|
+
"invalid_topic_sources",
|
|
10748
|
+
"invitation_accepted",
|
|
10749
|
+
"invitation_changed",
|
|
10750
|
+
"invitation_pending",
|
|
10751
|
+
"invitation_sending",
|
|
10752
|
+
"invitation_unconfirmed",
|
|
10753
|
+
"invitations_pending",
|
|
10754
|
+
"mail_relay_unavailable",
|
|
10755
|
+
"mail_routing_conflict",
|
|
10756
|
+
"mail_topic_edit_conflict",
|
|
10757
|
+
"mail_topic_generation_conflict",
|
|
10758
|
+
"mailbox_not_found",
|
|
10759
|
+
"managed_build_failed",
|
|
10760
|
+
"managed_domain",
|
|
10761
|
+
"member_changed",
|
|
10762
|
+
"message_not_found",
|
|
10763
|
+
"name_taken",
|
|
10764
|
+
"network_member_excluded",
|
|
10765
|
+
"network_member_not_found",
|
|
10766
|
+
"network_peer_not_found",
|
|
10767
|
+
"network_view_denied",
|
|
10768
|
+
"no_code",
|
|
10769
|
+
"no_endpoint",
|
|
10770
|
+
"not_a_template_install",
|
|
10771
|
+
"not_claimable",
|
|
10772
|
+
"not_pending",
|
|
10773
|
+
"open_policy_not_allowed",
|
|
10774
|
+
"outbound_edge_rejected",
|
|
10775
|
+
"outbound_email_limit_exceeded",
|
|
10776
|
+
"outbound_relay_timeout",
|
|
10777
|
+
"payload_too_large",
|
|
10778
|
+
"presence_admission_busy",
|
|
10779
|
+
"presence_idempotency_conflict",
|
|
10780
|
+
"presence_probe_stale",
|
|
10781
|
+
"pro_plan_required",
|
|
10782
|
+
"project_changed",
|
|
10783
|
+
"protocol_unavailable",
|
|
10784
|
+
"publication_not_found",
|
|
10785
|
+
"publish_policy_denied",
|
|
10786
|
+
"recipient_changed",
|
|
10787
|
+
"recipient_suppressed",
|
|
10788
|
+
"registry_create_not_allowed",
|
|
10789
|
+
"registry_not_found",
|
|
10790
|
+
"rename_not_allowed",
|
|
10791
|
+
"resend_limit_exceeded",
|
|
10792
|
+
"resend_too_soon",
|
|
10793
|
+
"schedule_allowlist_not_provided",
|
|
10794
|
+
"schedule_sender_collision",
|
|
10795
|
+
"schedule_wake_disabled",
|
|
10796
|
+
"scheduled_payload_invalid",
|
|
10797
|
+
"search_unavailable",
|
|
10798
|
+
"semantic_search_not_enabled",
|
|
10799
|
+
"send_failed",
|
|
10800
|
+
"sender_not_authorized",
|
|
10801
|
+
"sent_email_tail_unavailable",
|
|
10802
|
+
"settlement_unresolved",
|
|
10803
|
+
"shared_parent_recipient",
|
|
10804
|
+
"shopping_binding_conflict",
|
|
10805
|
+
"shopping_decision_conflict",
|
|
10806
|
+
"shopping_identity_conflict",
|
|
10807
|
+
"shopping_not_found",
|
|
10808
|
+
"shopping_owner_mail_required",
|
|
10809
|
+
"shopping_package_not_found",
|
|
10810
|
+
"shopping_proposal_expired",
|
|
10811
|
+
"shopping_replay_conflict",
|
|
10812
|
+
"shopping_source_unavailable",
|
|
10813
|
+
"shopping_too_many_shipments",
|
|
10814
|
+
"shopping_tracking_invalid",
|
|
10815
|
+
"shopping_version_conflict",
|
|
10816
|
+
"shopping_wake_unavailable",
|
|
10817
|
+
"shredded",
|
|
10818
|
+
"sign_in_email_change_required",
|
|
10819
|
+
"signal_not_allowed",
|
|
10820
|
+
"signal_parent_not_ready",
|
|
10821
|
+
"signal_sender_unauthenticated",
|
|
10822
|
+
"slug_taken",
|
|
10823
|
+
"step_rejected",
|
|
10824
|
+
"storage_error",
|
|
10825
|
+
"storage_limit_exceeded",
|
|
10826
|
+
"template_unavailable",
|
|
10827
|
+
"template_update_failed",
|
|
10828
|
+
"terms_not_accepted",
|
|
10829
|
+
"too_many_attempts",
|
|
10830
|
+
"too_many_concurrent_builds",
|
|
10831
|
+
"too_many_resends",
|
|
10832
|
+
"topic_edit_too_large",
|
|
10833
|
+
"topic_generation_too_large",
|
|
10834
|
+
"unavailable",
|
|
10835
|
+
"unknown_chunk",
|
|
10836
|
+
"update_needs_input",
|
|
10837
|
+
"upstream_error",
|
|
10838
|
+
"usage_limit_exceeded",
|
|
10839
|
+
"vendor_unavailable"
|
|
10677
10840
|
]
|
|
10678
10841
|
},
|
|
10679
10842
|
"message": { "type": "string" },
|
|
@@ -18213,6 +18376,7 @@ const operationManifest = [
|
|
|
18213
18376
|
"path": "/account",
|
|
18214
18377
|
"pathParams": [],
|
|
18215
18378
|
"queryParams": [],
|
|
18379
|
+
"headerParams": [],
|
|
18216
18380
|
"requestSchema": null,
|
|
18217
18381
|
"responseSchema": {
|
|
18218
18382
|
"type": "object",
|
|
@@ -18306,6 +18470,7 @@ const operationManifest = [
|
|
|
18306
18470
|
"path": "/account/storage",
|
|
18307
18471
|
"pathParams": [],
|
|
18308
18472
|
"queryParams": [],
|
|
18473
|
+
"headerParams": [],
|
|
18309
18474
|
"requestSchema": null,
|
|
18310
18475
|
"responseSchema": {
|
|
18311
18476
|
"type": "object",
|
|
@@ -18376,6 +18541,7 @@ const operationManifest = [
|
|
|
18376
18541
|
"path": "/account/webhook-secret",
|
|
18377
18542
|
"pathParams": [],
|
|
18378
18543
|
"queryParams": [],
|
|
18544
|
+
"headerParams": [],
|
|
18379
18545
|
"requestSchema": null,
|
|
18380
18546
|
"responseSchema": {
|
|
18381
18547
|
"type": "object",
|
|
@@ -18401,6 +18567,7 @@ const operationManifest = [
|
|
|
18401
18567
|
"path": "/account/member-address",
|
|
18402
18568
|
"pathParams": [],
|
|
18403
18569
|
"queryParams": [],
|
|
18570
|
+
"headerParams": [],
|
|
18404
18571
|
"requestSchema": {
|
|
18405
18572
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
18406
18573
|
"type": "object",
|
|
@@ -18443,6 +18610,7 @@ const operationManifest = [
|
|
|
18443
18610
|
"path": "/account/webhook-secret/rotate",
|
|
18444
18611
|
"pathParams": [],
|
|
18445
18612
|
"queryParams": [],
|
|
18613
|
+
"headerParams": [],
|
|
18446
18614
|
"requestSchema": null,
|
|
18447
18615
|
"responseSchema": {
|
|
18448
18616
|
"type": "object",
|
|
@@ -18468,6 +18636,7 @@ const operationManifest = [
|
|
|
18468
18636
|
"path": "/account",
|
|
18469
18637
|
"pathParams": [],
|
|
18470
18638
|
"queryParams": [],
|
|
18639
|
+
"headerParams": [],
|
|
18471
18640
|
"requestSchema": {
|
|
18472
18641
|
"type": "object",
|
|
18473
18642
|
"additionalProperties": false,
|
|
@@ -18524,6 +18693,7 @@ const operationManifest = [
|
|
|
18524
18693
|
"path": "/whoami",
|
|
18525
18694
|
"pathParams": [],
|
|
18526
18695
|
"queryParams": [],
|
|
18696
|
+
"headerParams": [],
|
|
18527
18697
|
"requestSchema": null,
|
|
18528
18698
|
"responseSchema": {
|
|
18529
18699
|
"type": "object",
|
|
@@ -18577,6 +18747,7 @@ const operationManifest = [
|
|
|
18577
18747
|
"path": "/agent/accounts",
|
|
18578
18748
|
"pathParams": [],
|
|
18579
18749
|
"queryParams": [],
|
|
18750
|
+
"headerParams": [],
|
|
18580
18751
|
"requestSchema": {
|
|
18581
18752
|
"type": "object",
|
|
18582
18753
|
"additionalProperties": false,
|
|
@@ -18684,6 +18855,7 @@ const operationManifest = [
|
|
|
18684
18855
|
"path": "/agent/claim/link",
|
|
18685
18856
|
"pathParams": [],
|
|
18686
18857
|
"queryParams": [],
|
|
18858
|
+
"headerParams": [],
|
|
18687
18859
|
"requestSchema": {
|
|
18688
18860
|
"type": "object",
|
|
18689
18861
|
"additionalProperties": false,
|
|
@@ -18722,6 +18894,7 @@ const operationManifest = [
|
|
|
18722
18894
|
"path": "/agent/signup/resend",
|
|
18723
18895
|
"pathParams": [],
|
|
18724
18896
|
"queryParams": [],
|
|
18897
|
+
"headerParams": [],
|
|
18725
18898
|
"requestSchema": {
|
|
18726
18899
|
"type": "object",
|
|
18727
18900
|
"additionalProperties": false,
|
|
@@ -18774,6 +18947,7 @@ const operationManifest = [
|
|
|
18774
18947
|
"path": "/agent/claim/start",
|
|
18775
18948
|
"pathParams": [],
|
|
18776
18949
|
"queryParams": [],
|
|
18950
|
+
"headerParams": [],
|
|
18777
18951
|
"requestSchema": {
|
|
18778
18952
|
"type": "object",
|
|
18779
18953
|
"additionalProperties": false,
|
|
@@ -18814,6 +18988,7 @@ const operationManifest = [
|
|
|
18814
18988
|
"path": "/agent/signup/start",
|
|
18815
18989
|
"pathParams": [],
|
|
18816
18990
|
"queryParams": [],
|
|
18991
|
+
"headerParams": [],
|
|
18817
18992
|
"requestSchema": {
|
|
18818
18993
|
"type": "object",
|
|
18819
18994
|
"additionalProperties": false,
|
|
@@ -18890,6 +19065,7 @@ const operationManifest = [
|
|
|
18890
19065
|
"path": "/agent/claim/verify",
|
|
18891
19066
|
"pathParams": [],
|
|
18892
19067
|
"queryParams": [],
|
|
19068
|
+
"headerParams": [],
|
|
18893
19069
|
"requestSchema": {
|
|
18894
19070
|
"type": "object",
|
|
18895
19071
|
"additionalProperties": false,
|
|
@@ -18964,6 +19140,7 @@ const operationManifest = [
|
|
|
18964
19140
|
"path": "/agent/signup/verify",
|
|
18965
19141
|
"pathParams": [],
|
|
18966
19142
|
"queryParams": [],
|
|
19143
|
+
"headerParams": [],
|
|
18967
19144
|
"requestSchema": {
|
|
18968
19145
|
"type": "object",
|
|
18969
19146
|
"additionalProperties": false,
|
|
@@ -19079,6 +19256,7 @@ const operationManifest = [
|
|
|
19079
19256
|
"path": "/agent-connections/setup",
|
|
19080
19257
|
"pathParams": [],
|
|
19081
19258
|
"queryParams": [],
|
|
19259
|
+
"headerParams": [],
|
|
19082
19260
|
"requestSchema": null,
|
|
19083
19261
|
"responseSchema": null,
|
|
19084
19262
|
"sdkName": "agentConnectionSetup",
|
|
@@ -19097,6 +19275,13 @@ const operationManifest = [
|
|
|
19097
19275
|
"path": "/agent-connections/claim",
|
|
19098
19276
|
"pathParams": [],
|
|
19099
19277
|
"queryParams": [],
|
|
19278
|
+
"headerParams": [{
|
|
19279
|
+
"description": "Optional compatibility header. This operation does not guarantee response replay or safe retries through this header. Use the operation's documented recovery flow after an uncertain response.",
|
|
19280
|
+
"enum": null,
|
|
19281
|
+
"name": "Idempotency-Key",
|
|
19282
|
+
"required": false,
|
|
19283
|
+
"type": "string"
|
|
19284
|
+
}],
|
|
19100
19285
|
"requestSchema": {
|
|
19101
19286
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
19102
19287
|
"type": "object",
|
|
@@ -19309,6 +19494,13 @@ const operationManifest = [
|
|
|
19309
19494
|
"path": "/agent-connections",
|
|
19310
19495
|
"pathParams": [],
|
|
19311
19496
|
"queryParams": [],
|
|
19497
|
+
"headerParams": [{
|
|
19498
|
+
"description": "Optional compatibility header. This operation does not guarantee response replay or safe retries through this header. Use the operation's documented recovery flow after an uncertain response.",
|
|
19499
|
+
"enum": null,
|
|
19500
|
+
"name": "Idempotency-Key",
|
|
19501
|
+
"required": false,
|
|
19502
|
+
"type": "string"
|
|
19503
|
+
}],
|
|
19312
19504
|
"requestSchema": {
|
|
19313
19505
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
19314
19506
|
"type": "object",
|
|
@@ -19630,6 +19822,13 @@ const operationManifest = [
|
|
|
19630
19822
|
"type": "string"
|
|
19631
19823
|
}],
|
|
19632
19824
|
"queryParams": [],
|
|
19825
|
+
"headerParams": [{
|
|
19826
|
+
"description": "Optional compatibility header. This operation does not guarantee response replay or safe retries through this header. Use the operation's documented recovery flow after an uncertain response.",
|
|
19827
|
+
"enum": null,
|
|
19828
|
+
"name": "Idempotency-Key",
|
|
19829
|
+
"required": false,
|
|
19830
|
+
"type": "string"
|
|
19831
|
+
}],
|
|
19633
19832
|
"requestSchema": {
|
|
19634
19833
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
19635
19834
|
"type": "object",
|
|
@@ -19822,6 +20021,7 @@ const operationManifest = [
|
|
|
19822
20021
|
"type": "string"
|
|
19823
20022
|
}
|
|
19824
20023
|
],
|
|
20024
|
+
"headerParams": [],
|
|
19825
20025
|
"requestSchema": null,
|
|
19826
20026
|
"responseSchema": {
|
|
19827
20027
|
"type": "object",
|
|
@@ -19974,6 +20174,13 @@ const operationManifest = [
|
|
|
19974
20174
|
"type": "string"
|
|
19975
20175
|
}],
|
|
19976
20176
|
"queryParams": [],
|
|
20177
|
+
"headerParams": [{
|
|
20178
|
+
"description": "Optional client-supplied idempotency key. Retrying a request with the same key returns the original result instead of performing the action a second time; if omitted the server derives one from the canonical payload hash. Safe to retry network failures without duplicating side effects.",
|
|
20179
|
+
"enum": null,
|
|
20180
|
+
"name": "Idempotency-Key",
|
|
20181
|
+
"required": false,
|
|
20182
|
+
"type": "string"
|
|
20183
|
+
}],
|
|
19977
20184
|
"requestSchema": null,
|
|
19978
20185
|
"responseSchema": {
|
|
19979
20186
|
"type": "object",
|
|
@@ -20017,6 +20224,7 @@ const operationManifest = [
|
|
|
20017
20224
|
"type": "string"
|
|
20018
20225
|
}],
|
|
20019
20226
|
"queryParams": [],
|
|
20227
|
+
"headerParams": [],
|
|
20020
20228
|
"requestSchema": null,
|
|
20021
20229
|
"responseSchema": {
|
|
20022
20230
|
"type": "object",
|
|
@@ -20164,6 +20372,7 @@ const operationManifest = [
|
|
|
20164
20372
|
"type": "string"
|
|
20165
20373
|
}],
|
|
20166
20374
|
"queryParams": [],
|
|
20375
|
+
"headerParams": [],
|
|
20167
20376
|
"requestSchema": null,
|
|
20168
20377
|
"responseSchema": {
|
|
20169
20378
|
"type": "object",
|
|
@@ -20279,6 +20488,7 @@ const operationManifest = [
|
|
|
20279
20488
|
"path": "/agent-networks/default/contact-admission",
|
|
20280
20489
|
"pathParams": [],
|
|
20281
20490
|
"queryParams": [],
|
|
20491
|
+
"headerParams": [],
|
|
20282
20492
|
"requestSchema": {
|
|
20283
20493
|
"type": "object",
|
|
20284
20494
|
"description": "Check only a received email already stored for the bound recipient. The server verifies its sender against delivery evidence.",
|
|
@@ -20348,6 +20558,7 @@ const operationManifest = [
|
|
|
20348
20558
|
"type": "string"
|
|
20349
20559
|
}],
|
|
20350
20560
|
"queryParams": [],
|
|
20561
|
+
"headerParams": [],
|
|
20351
20562
|
"requestSchema": null,
|
|
20352
20563
|
"responseSchema": {
|
|
20353
20564
|
"type": "object",
|
|
@@ -20433,6 +20644,7 @@ const operationManifest = [
|
|
|
20433
20644
|
"path": "/agent-networks",
|
|
20434
20645
|
"pathParams": [],
|
|
20435
20646
|
"queryParams": [],
|
|
20647
|
+
"headerParams": [],
|
|
20436
20648
|
"requestSchema": null,
|
|
20437
20649
|
"responseSchema": {
|
|
20438
20650
|
"type": "array",
|
|
@@ -20508,6 +20720,7 @@ const operationManifest = [
|
|
|
20508
20720
|
"type": "string"
|
|
20509
20721
|
}
|
|
20510
20722
|
],
|
|
20723
|
+
"headerParams": [],
|
|
20511
20724
|
"requestSchema": null,
|
|
20512
20725
|
"responseSchema": {
|
|
20513
20726
|
"type": "array",
|
|
@@ -20621,6 +20834,7 @@ const operationManifest = [
|
|
|
20621
20834
|
"type": "string"
|
|
20622
20835
|
}
|
|
20623
20836
|
],
|
|
20837
|
+
"headerParams": [],
|
|
20624
20838
|
"requestSchema": null,
|
|
20625
20839
|
"responseSchema": {
|
|
20626
20840
|
"type": "array",
|
|
@@ -20745,6 +20959,7 @@ const operationManifest = [
|
|
|
20745
20959
|
"type": "string"
|
|
20746
20960
|
}],
|
|
20747
20961
|
"queryParams": [],
|
|
20962
|
+
"headerParams": [],
|
|
20748
20963
|
"requestSchema": null,
|
|
20749
20964
|
"responseSchema": {
|
|
20750
20965
|
"type": "object",
|
|
@@ -20776,6 +20991,7 @@ const operationManifest = [
|
|
|
20776
20991
|
"type": "string"
|
|
20777
20992
|
}],
|
|
20778
20993
|
"queryParams": [],
|
|
20994
|
+
"headerParams": [],
|
|
20779
20995
|
"requestSchema": {
|
|
20780
20996
|
"type": "object",
|
|
20781
20997
|
"description": "Set one or both independent discovery permissions.",
|
|
@@ -20942,6 +21158,7 @@ const operationManifest = [
|
|
|
20942
21158
|
"type": "string"
|
|
20943
21159
|
}
|
|
20944
21160
|
],
|
|
21161
|
+
"headerParams": [],
|
|
20945
21162
|
"requestSchema": null,
|
|
20946
21163
|
"responseSchema": {
|
|
20947
21164
|
"type": "object",
|
|
@@ -21749,6 +21966,7 @@ const operationManifest = [
|
|
|
21749
21966
|
"path": "/cli/logout",
|
|
21750
21967
|
"pathParams": [],
|
|
21751
21968
|
"queryParams": [],
|
|
21969
|
+
"headerParams": [],
|
|
21752
21970
|
"requestSchema": {
|
|
21753
21971
|
"type": "object",
|
|
21754
21972
|
"additionalProperties": false,
|
|
@@ -21794,6 +22012,7 @@ const operationManifest = [
|
|
|
21794
22012
|
"path": "/cli/login/poll",
|
|
21795
22013
|
"pathParams": [],
|
|
21796
22014
|
"queryParams": [],
|
|
22015
|
+
"headerParams": [],
|
|
21797
22016
|
"requestSchema": {
|
|
21798
22017
|
"type": "object",
|
|
21799
22018
|
"additionalProperties": false,
|
|
@@ -21881,6 +22100,7 @@ const operationManifest = [
|
|
|
21881
22100
|
"path": "/cli/signup/resend",
|
|
21882
22101
|
"pathParams": [],
|
|
21883
22102
|
"queryParams": [],
|
|
22103
|
+
"headerParams": [],
|
|
21884
22104
|
"requestSchema": {
|
|
21885
22105
|
"type": "object",
|
|
21886
22106
|
"additionalProperties": false,
|
|
@@ -21933,6 +22153,7 @@ const operationManifest = [
|
|
|
21933
22153
|
"path": "/cli/login/start",
|
|
21934
22154
|
"pathParams": [],
|
|
21935
22155
|
"queryParams": [],
|
|
22156
|
+
"headerParams": [],
|
|
21936
22157
|
"requestSchema": {
|
|
21937
22158
|
"type": "object",
|
|
21938
22159
|
"additionalProperties": false,
|
|
@@ -22004,6 +22225,7 @@ const operationManifest = [
|
|
|
22004
22225
|
"path": "/cli/signup/start",
|
|
22005
22226
|
"pathParams": [],
|
|
22006
22227
|
"queryParams": [],
|
|
22228
|
+
"headerParams": [],
|
|
22007
22229
|
"requestSchema": {
|
|
22008
22230
|
"type": "object",
|
|
22009
22231
|
"additionalProperties": false,
|
|
@@ -22080,6 +22302,7 @@ const operationManifest = [
|
|
|
22080
22302
|
"path": "/cli/signup/verify",
|
|
22081
22303
|
"pathParams": [],
|
|
22082
22304
|
"queryParams": [],
|
|
22305
|
+
"headerParams": [],
|
|
22083
22306
|
"requestSchema": {
|
|
22084
22307
|
"type": "object",
|
|
22085
22308
|
"additionalProperties": false,
|
|
@@ -22197,6 +22420,7 @@ const operationManifest = [
|
|
|
22197
22420
|
"required": true,
|
|
22198
22421
|
"type": "string"
|
|
22199
22422
|
}],
|
|
22423
|
+
"headerParams": [],
|
|
22200
22424
|
"requestSchema": null,
|
|
22201
22425
|
"responseSchema": {
|
|
22202
22426
|
"type": "object",
|
|
@@ -22232,6 +22456,7 @@ const operationManifest = [
|
|
|
22232
22456
|
"required": true,
|
|
22233
22457
|
"type": "string"
|
|
22234
22458
|
}],
|
|
22459
|
+
"headerParams": [],
|
|
22235
22460
|
"requestSchema": null,
|
|
22236
22461
|
"responseSchema": {
|
|
22237
22462
|
"type": "object",
|
|
@@ -22261,6 +22486,7 @@ const operationManifest = [
|
|
|
22261
22486
|
"type": "string"
|
|
22262
22487
|
}],
|
|
22263
22488
|
"queryParams": [],
|
|
22489
|
+
"headerParams": [],
|
|
22264
22490
|
"requestSchema": null,
|
|
22265
22491
|
"responseSchema": {
|
|
22266
22492
|
"type": "object",
|
|
@@ -22452,6 +22678,7 @@ const operationManifest = [
|
|
|
22452
22678
|
"type": "string"
|
|
22453
22679
|
}],
|
|
22454
22680
|
"queryParams": [],
|
|
22681
|
+
"headerParams": [],
|
|
22455
22682
|
"requestSchema": null,
|
|
22456
22683
|
"responseSchema": {
|
|
22457
22684
|
"type": "object",
|
|
@@ -22505,6 +22732,7 @@ const operationManifest = [
|
|
|
22505
22732
|
"path": "/contact-policy",
|
|
22506
22733
|
"pathParams": [],
|
|
22507
22734
|
"queryParams": [],
|
|
22735
|
+
"headerParams": [],
|
|
22508
22736
|
"requestSchema": null,
|
|
22509
22737
|
"responseSchema": {
|
|
22510
22738
|
"type": "object",
|
|
@@ -22608,6 +22836,7 @@ const operationManifest = [
|
|
|
22608
22836
|
"required": false,
|
|
22609
22837
|
"type": "integer"
|
|
22610
22838
|
}],
|
|
22839
|
+
"headerParams": [],
|
|
22611
22840
|
"requestSchema": null,
|
|
22612
22841
|
"responseSchema": {
|
|
22613
22842
|
"type": "array",
|
|
@@ -22698,6 +22927,7 @@ const operationManifest = [
|
|
|
22698
22927
|
"required": false,
|
|
22699
22928
|
"type": "integer"
|
|
22700
22929
|
}],
|
|
22930
|
+
"headerParams": [],
|
|
22701
22931
|
"requestSchema": null,
|
|
22702
22932
|
"responseSchema": {
|
|
22703
22933
|
"type": "array",
|
|
@@ -22766,6 +22996,7 @@ const operationManifest = [
|
|
|
22766
22996
|
"type": "string"
|
|
22767
22997
|
}],
|
|
22768
22998
|
"queryParams": [],
|
|
22999
|
+
"headerParams": [],
|
|
22769
23000
|
"requestSchema": { "oneOf": [{
|
|
22770
23001
|
"type": "object",
|
|
22771
23002
|
"additionalProperties": false,
|
|
@@ -22875,6 +23106,7 @@ const operationManifest = [
|
|
|
22875
23106
|
"type": "string"
|
|
22876
23107
|
}],
|
|
22877
23108
|
"queryParams": [],
|
|
23109
|
+
"headerParams": [],
|
|
22878
23110
|
"requestSchema": { "oneOf": [{
|
|
22879
23111
|
"type": "object",
|
|
22880
23112
|
"additionalProperties": false,
|
|
@@ -23138,6 +23370,7 @@ const operationManifest = [
|
|
|
23138
23370
|
"type": "string"
|
|
23139
23371
|
}],
|
|
23140
23372
|
"queryParams": [],
|
|
23373
|
+
"headerParams": [],
|
|
23141
23374
|
"requestSchema": { "oneOf": [{
|
|
23142
23375
|
"type": "object",
|
|
23143
23376
|
"additionalProperties": false,
|
|
@@ -23220,6 +23453,7 @@ const operationManifest = [
|
|
|
23220
23453
|
"path": "/contact-policy",
|
|
23221
23454
|
"pathParams": [],
|
|
23222
23455
|
"queryParams": [],
|
|
23456
|
+
"headerParams": [],
|
|
23223
23457
|
"requestSchema": { "oneOf": [{
|
|
23224
23458
|
"type": "object",
|
|
23225
23459
|
"additionalProperties": false,
|
|
@@ -23374,6 +23608,7 @@ const operationManifest = [
|
|
|
23374
23608
|
"path": "/credits/balance",
|
|
23375
23609
|
"pathParams": [],
|
|
23376
23610
|
"queryParams": [],
|
|
23611
|
+
"headerParams": [],
|
|
23377
23612
|
"requestSchema": null,
|
|
23378
23613
|
"responseSchema": {
|
|
23379
23614
|
"type": "object",
|
|
@@ -23472,6 +23707,13 @@ const operationManifest = [
|
|
|
23472
23707
|
"path": "/credits/redeem",
|
|
23473
23708
|
"pathParams": [],
|
|
23474
23709
|
"queryParams": [],
|
|
23710
|
+
"headerParams": [{
|
|
23711
|
+
"description": "Required client-supplied key: 1 to 200 printable ASCII\ncharacters, without spaces. Use a new key for each code you\nredeem and reuse it only to retry the same request.\n",
|
|
23712
|
+
"enum": null,
|
|
23713
|
+
"name": "Idempotency-Key",
|
|
23714
|
+
"required": true,
|
|
23715
|
+
"type": "string"
|
|
23716
|
+
}],
|
|
23475
23717
|
"requestSchema": {
|
|
23476
23718
|
"type": "object",
|
|
23477
23719
|
"additionalProperties": false,
|
|
@@ -23549,6 +23791,7 @@ const operationManifest = [
|
|
|
23549
23791
|
"path": "/domains",
|
|
23550
23792
|
"pathParams": [],
|
|
23551
23793
|
"queryParams": [],
|
|
23794
|
+
"headerParams": [],
|
|
23552
23795
|
"requestSchema": {
|
|
23553
23796
|
"type": "object",
|
|
23554
23797
|
"additionalProperties": false,
|
|
@@ -23699,6 +23942,7 @@ const operationManifest = [
|
|
|
23699
23942
|
"type": "string"
|
|
23700
23943
|
}],
|
|
23701
23944
|
"queryParams": [],
|
|
23945
|
+
"headerParams": [],
|
|
23702
23946
|
"requestSchema": null,
|
|
23703
23947
|
"responseSchema": {
|
|
23704
23948
|
"type": "object",
|
|
@@ -24251,6 +24495,7 @@ const operationManifest = [
|
|
|
24251
24495
|
"type": "string"
|
|
24252
24496
|
}],
|
|
24253
24497
|
"queryParams": [],
|
|
24498
|
+
"headerParams": [],
|
|
24254
24499
|
"requestSchema": null,
|
|
24255
24500
|
"responseSchema": null,
|
|
24256
24501
|
"sdkName": "deleteDomain",
|
|
@@ -24281,6 +24526,7 @@ const operationManifest = [
|
|
|
24281
24526
|
"required": false,
|
|
24282
24527
|
"type": "boolean"
|
|
24283
24528
|
}],
|
|
24529
|
+
"headerParams": [],
|
|
24284
24530
|
"requestSchema": null,
|
|
24285
24531
|
"responseSchema": null,
|
|
24286
24532
|
"sdkName": "downloadDomainZoneFile",
|
|
@@ -24299,6 +24545,7 @@ const operationManifest = [
|
|
|
24299
24545
|
"path": "/domains",
|
|
24300
24546
|
"pathParams": [],
|
|
24301
24547
|
"queryParams": [],
|
|
24548
|
+
"headerParams": [],
|
|
24302
24549
|
"requestSchema": null,
|
|
24303
24550
|
"responseSchema": {
|
|
24304
24551
|
"type": "array",
|
|
@@ -24470,6 +24717,7 @@ const operationManifest = [
|
|
|
24470
24717
|
"type": "string"
|
|
24471
24718
|
}],
|
|
24472
24719
|
"queryParams": [],
|
|
24720
|
+
"headerParams": [],
|
|
24473
24721
|
"requestSchema": {
|
|
24474
24722
|
"type": "object",
|
|
24475
24723
|
"additionalProperties": false,
|
|
@@ -24546,6 +24794,7 @@ const operationManifest = [
|
|
|
24546
24794
|
"type": "string"
|
|
24547
24795
|
}],
|
|
24548
24796
|
"queryParams": [],
|
|
24797
|
+
"headerParams": [],
|
|
24549
24798
|
"requestSchema": null,
|
|
24550
24799
|
"responseSchema": { "oneOf": [{
|
|
24551
24800
|
"type": "object",
|
|
@@ -24765,6 +25014,7 @@ const operationManifest = [
|
|
|
24765
25014
|
"type": "string"
|
|
24766
25015
|
}],
|
|
24767
25016
|
"queryParams": [],
|
|
25017
|
+
"headerParams": [],
|
|
24768
25018
|
"requestSchema": null,
|
|
24769
25019
|
"responseSchema": null,
|
|
24770
25020
|
"sdkName": "deleteEmail",
|
|
@@ -24789,6 +25039,7 @@ const operationManifest = [
|
|
|
24789
25039
|
"type": "string"
|
|
24790
25040
|
}],
|
|
24791
25041
|
"queryParams": [],
|
|
25042
|
+
"headerParams": [],
|
|
24792
25043
|
"requestSchema": null,
|
|
24793
25044
|
"responseSchema": {
|
|
24794
25045
|
"type": "object",
|
|
@@ -24832,6 +25083,7 @@ const operationManifest = [
|
|
|
24832
25083
|
"required": false,
|
|
24833
25084
|
"type": "string"
|
|
24834
25085
|
}],
|
|
25086
|
+
"headerParams": [],
|
|
24835
25087
|
"requestSchema": null,
|
|
24836
25088
|
"responseSchema": null,
|
|
24837
25089
|
"sdkName": "downloadAttachments",
|
|
@@ -24872,6 +25124,7 @@ const operationManifest = [
|
|
|
24872
25124
|
}
|
|
24873
25125
|
],
|
|
24874
25126
|
"queryParams": [],
|
|
25127
|
+
"headerParams": [],
|
|
24875
25128
|
"requestSchema": null,
|
|
24876
25129
|
"responseSchema": null,
|
|
24877
25130
|
"sdkName": "downloadEmailAttachmentArchiveMember",
|
|
@@ -24902,6 +25155,7 @@ const operationManifest = [
|
|
|
24902
25155
|
"required": true,
|
|
24903
25156
|
"type": "string"
|
|
24904
25157
|
}],
|
|
25158
|
+
"headerParams": [],
|
|
24905
25159
|
"requestSchema": null,
|
|
24906
25160
|
"responseSchema": null,
|
|
24907
25161
|
"sdkName": "downloadEmailAttachmentByFilename",
|
|
@@ -24934,6 +25188,7 @@ const operationManifest = [
|
|
|
24934
25188
|
"type": "integer"
|
|
24935
25189
|
}],
|
|
24936
25190
|
"queryParams": [],
|
|
25191
|
+
"headerParams": [],
|
|
24937
25192
|
"requestSchema": null,
|
|
24938
25193
|
"responseSchema": null,
|
|
24939
25194
|
"sdkName": "downloadEmailAttachmentPart",
|
|
@@ -24964,6 +25219,7 @@ const operationManifest = [
|
|
|
24964
25219
|
"required": false,
|
|
24965
25220
|
"type": "string"
|
|
24966
25221
|
}],
|
|
25222
|
+
"headerParams": [],
|
|
24967
25223
|
"requestSchema": null,
|
|
24968
25224
|
"responseSchema": null,
|
|
24969
25225
|
"sdkName": "downloadRawEmail",
|
|
@@ -24994,6 +25250,7 @@ const operationManifest = [
|
|
|
24994
25250
|
"required": false,
|
|
24995
25251
|
"type": "string"
|
|
24996
25252
|
}],
|
|
25253
|
+
"headerParams": [],
|
|
24997
25254
|
"requestSchema": null,
|
|
24998
25255
|
"responseSchema": {
|
|
24999
25256
|
"type": "object",
|
|
@@ -25174,6 +25431,7 @@ const operationManifest = [
|
|
|
25174
25431
|
"type": "string"
|
|
25175
25432
|
}],
|
|
25176
25433
|
"queryParams": [],
|
|
25434
|
+
"headerParams": [],
|
|
25177
25435
|
"requestSchema": null,
|
|
25178
25436
|
"responseSchema": {
|
|
25179
25437
|
"type": "object",
|
|
@@ -25772,6 +26030,7 @@ const operationManifest = [
|
|
|
25772
26030
|
"type": "string"
|
|
25773
26031
|
}],
|
|
25774
26032
|
"queryParams": [],
|
|
26033
|
+
"headerParams": [],
|
|
25775
26034
|
"requestSchema": null,
|
|
25776
26035
|
"responseSchema": {
|
|
25777
26036
|
"type": "object",
|
|
@@ -25956,6 +26215,7 @@ const operationManifest = [
|
|
|
25956
26215
|
"type": "string"
|
|
25957
26216
|
}
|
|
25958
26217
|
],
|
|
26218
|
+
"headerParams": [],
|
|
25959
26219
|
"requestSchema": null,
|
|
25960
26220
|
"responseSchema": {
|
|
25961
26221
|
"type": "array",
|
|
@@ -26267,6 +26527,7 @@ const operationManifest = [
|
|
|
26267
26527
|
"type": "string"
|
|
26268
26528
|
}],
|
|
26269
26529
|
"queryParams": [],
|
|
26530
|
+
"headerParams": [],
|
|
26270
26531
|
"requestSchema": null,
|
|
26271
26532
|
"responseSchema": {
|
|
26272
26533
|
"type": "object",
|
|
@@ -26497,6 +26758,7 @@ const operationManifest = [
|
|
|
26497
26758
|
"type": "string"
|
|
26498
26759
|
}
|
|
26499
26760
|
],
|
|
26761
|
+
"headerParams": [],
|
|
26500
26762
|
"requestSchema": null,
|
|
26501
26763
|
"responseSchema": {
|
|
26502
26764
|
"type": "array",
|
|
@@ -26873,6 +27135,7 @@ const operationManifest = [
|
|
|
26873
27135
|
"type": "string"
|
|
26874
27136
|
}],
|
|
26875
27137
|
"queryParams": [],
|
|
27138
|
+
"headerParams": [],
|
|
26876
27139
|
"requestSchema": {
|
|
26877
27140
|
"oneOf": [
|
|
26878
27141
|
{
|
|
@@ -27125,6 +27388,7 @@ const operationManifest = [
|
|
|
27125
27388
|
"path": "/endpoints",
|
|
27126
27389
|
"pathParams": [],
|
|
27127
27390
|
"queryParams": [],
|
|
27391
|
+
"headerParams": [],
|
|
27128
27392
|
"requestSchema": {
|
|
27129
27393
|
"type": "object",
|
|
27130
27394
|
"additionalProperties": false,
|
|
@@ -27344,6 +27608,7 @@ const operationManifest = [
|
|
|
27344
27608
|
"type": "string"
|
|
27345
27609
|
}],
|
|
27346
27610
|
"queryParams": [],
|
|
27611
|
+
"headerParams": [],
|
|
27347
27612
|
"requestSchema": null,
|
|
27348
27613
|
"responseSchema": null,
|
|
27349
27614
|
"sdkName": "deleteEndpoint",
|
|
@@ -27362,6 +27627,7 @@ const operationManifest = [
|
|
|
27362
27627
|
"path": "/endpoints",
|
|
27363
27628
|
"pathParams": [],
|
|
27364
27629
|
"queryParams": [],
|
|
27630
|
+
"headerParams": [],
|
|
27365
27631
|
"requestSchema": null,
|
|
27366
27632
|
"responseSchema": {
|
|
27367
27633
|
"type": "array",
|
|
@@ -27526,6 +27792,7 @@ const operationManifest = [
|
|
|
27526
27792
|
"type": "string"
|
|
27527
27793
|
}],
|
|
27528
27794
|
"queryParams": [],
|
|
27795
|
+
"headerParams": [],
|
|
27529
27796
|
"requestSchema": {
|
|
27530
27797
|
"type": "object",
|
|
27531
27798
|
"properties": { "wait_seconds": {
|
|
@@ -27660,6 +27927,7 @@ const operationManifest = [
|
|
|
27660
27927
|
"type": "string"
|
|
27661
27928
|
}],
|
|
27662
27929
|
"queryParams": [],
|
|
27930
|
+
"headerParams": [],
|
|
27663
27931
|
"requestSchema": null,
|
|
27664
27932
|
"responseSchema": {
|
|
27665
27933
|
"type": "object",
|
|
@@ -27701,6 +27969,7 @@ const operationManifest = [
|
|
|
27701
27969
|
"type": "string"
|
|
27702
27970
|
}],
|
|
27703
27971
|
"queryParams": [],
|
|
27972
|
+
"headerParams": [],
|
|
27704
27973
|
"requestSchema": {
|
|
27705
27974
|
"type": "object",
|
|
27706
27975
|
"additionalProperties": false,
|
|
@@ -27806,6 +28075,7 @@ const operationManifest = [
|
|
|
27806
28075
|
"type": "string"
|
|
27807
28076
|
}],
|
|
27808
28077
|
"queryParams": [],
|
|
28078
|
+
"headerParams": [],
|
|
27809
28079
|
"requestSchema": {
|
|
27810
28080
|
"type": "object",
|
|
27811
28081
|
"additionalProperties": false,
|
|
@@ -27991,6 +28261,7 @@ const operationManifest = [
|
|
|
27991
28261
|
"path": "/filters",
|
|
27992
28262
|
"pathParams": [],
|
|
27993
28263
|
"queryParams": [],
|
|
28264
|
+
"headerParams": [],
|
|
27994
28265
|
"requestSchema": {
|
|
27995
28266
|
"type": "object",
|
|
27996
28267
|
"additionalProperties": false,
|
|
@@ -28074,6 +28345,7 @@ const operationManifest = [
|
|
|
28074
28345
|
"type": "string"
|
|
28075
28346
|
}],
|
|
28076
28347
|
"queryParams": [],
|
|
28348
|
+
"headerParams": [],
|
|
28077
28349
|
"requestSchema": null,
|
|
28078
28350
|
"responseSchema": null,
|
|
28079
28351
|
"sdkName": "deleteFilter",
|
|
@@ -28092,6 +28364,7 @@ const operationManifest = [
|
|
|
28092
28364
|
"path": "/filters",
|
|
28093
28365
|
"pathParams": [],
|
|
28094
28366
|
"queryParams": [],
|
|
28367
|
+
"headerParams": [],
|
|
28095
28368
|
"requestSchema": null,
|
|
28096
28369
|
"responseSchema": {
|
|
28097
28370
|
"type": "array",
|
|
@@ -28157,6 +28430,7 @@ const operationManifest = [
|
|
|
28157
28430
|
"type": "string"
|
|
28158
28431
|
}],
|
|
28159
28432
|
"queryParams": [],
|
|
28433
|
+
"headerParams": [],
|
|
28160
28434
|
"requestSchema": {
|
|
28161
28435
|
"type": "object",
|
|
28162
28436
|
"additionalProperties": false,
|
|
@@ -28218,6 +28492,7 @@ const operationManifest = [
|
|
|
28218
28492
|
"path": "/functions",
|
|
28219
28493
|
"pathParams": [],
|
|
28220
28494
|
"queryParams": [],
|
|
28495
|
+
"headerParams": [],
|
|
28221
28496
|
"requestSchema": {
|
|
28222
28497
|
"type": "object",
|
|
28223
28498
|
"additionalProperties": false,
|
|
@@ -28294,6 +28569,7 @@ const operationManifest = [
|
|
|
28294
28569
|
"type": "string"
|
|
28295
28570
|
}],
|
|
28296
28571
|
"queryParams": [],
|
|
28572
|
+
"headerParams": [],
|
|
28297
28573
|
"requestSchema": {
|
|
28298
28574
|
"type": "object",
|
|
28299
28575
|
"additionalProperties": false,
|
|
@@ -28354,6 +28630,7 @@ const operationManifest = [
|
|
|
28354
28630
|
"path": "/org/secrets",
|
|
28355
28631
|
"pathParams": [],
|
|
28356
28632
|
"queryParams": [],
|
|
28633
|
+
"headerParams": [],
|
|
28357
28634
|
"requestSchema": {
|
|
28358
28635
|
"type": "object",
|
|
28359
28636
|
"additionalProperties": false,
|
|
@@ -28420,6 +28697,7 @@ const operationManifest = [
|
|
|
28420
28697
|
"type": "string"
|
|
28421
28698
|
}],
|
|
28422
28699
|
"queryParams": [],
|
|
28700
|
+
"headerParams": [],
|
|
28423
28701
|
"requestSchema": null,
|
|
28424
28702
|
"responseSchema": null,
|
|
28425
28703
|
"sdkName": "deleteFunction",
|
|
@@ -28450,6 +28728,7 @@ const operationManifest = [
|
|
|
28450
28728
|
"type": "string"
|
|
28451
28729
|
}],
|
|
28452
28730
|
"queryParams": [],
|
|
28731
|
+
"headerParams": [],
|
|
28453
28732
|
"requestSchema": null,
|
|
28454
28733
|
"responseSchema": null,
|
|
28455
28734
|
"sdkName": "deleteFunctionSecret",
|
|
@@ -28474,6 +28753,7 @@ const operationManifest = [
|
|
|
28474
28753
|
"type": "string"
|
|
28475
28754
|
}],
|
|
28476
28755
|
"queryParams": [],
|
|
28756
|
+
"headerParams": [],
|
|
28477
28757
|
"requestSchema": null,
|
|
28478
28758
|
"responseSchema": null,
|
|
28479
28759
|
"sdkName": "deleteOrgSecret",
|
|
@@ -28498,6 +28778,7 @@ const operationManifest = [
|
|
|
28498
28778
|
"type": "string"
|
|
28499
28779
|
}],
|
|
28500
28780
|
"queryParams": [],
|
|
28781
|
+
"headerParams": [],
|
|
28501
28782
|
"requestSchema": null,
|
|
28502
28783
|
"responseSchema": {
|
|
28503
28784
|
"type": "object",
|
|
@@ -28569,6 +28850,7 @@ const operationManifest = [
|
|
|
28569
28850
|
"type": "string"
|
|
28570
28851
|
}],
|
|
28571
28852
|
"queryParams": [],
|
|
28853
|
+
"headerParams": [],
|
|
28572
28854
|
"requestSchema": null,
|
|
28573
28855
|
"responseSchema": { "oneOf": [{
|
|
28574
28856
|
"type": "object",
|
|
@@ -28646,6 +28928,7 @@ const operationManifest = [
|
|
|
28646
28928
|
"type": "string"
|
|
28647
28929
|
}],
|
|
28648
28930
|
"queryParams": [],
|
|
28931
|
+
"headerParams": [],
|
|
28649
28932
|
"requestSchema": null,
|
|
28650
28933
|
"responseSchema": {
|
|
28651
28934
|
"type": "object",
|
|
@@ -29071,6 +29354,7 @@ const operationManifest = [
|
|
|
29071
29354
|
"path": "/functions/routing-topology",
|
|
29072
29355
|
"pathParams": [],
|
|
29073
29356
|
"queryParams": [],
|
|
29357
|
+
"headerParams": [],
|
|
29074
29358
|
"requestSchema": null,
|
|
29075
29359
|
"responseSchema": {
|
|
29076
29360
|
"type": "object",
|
|
@@ -29178,6 +29462,7 @@ const operationManifest = [
|
|
|
29178
29462
|
"required": false,
|
|
29179
29463
|
"type": "string"
|
|
29180
29464
|
}],
|
|
29465
|
+
"headerParams": [],
|
|
29181
29466
|
"requestSchema": null,
|
|
29182
29467
|
"responseSchema": {
|
|
29183
29468
|
"type": "object",
|
|
@@ -29262,6 +29547,7 @@ const operationManifest = [
|
|
|
29262
29547
|
"type": "string"
|
|
29263
29548
|
}],
|
|
29264
29549
|
"queryParams": [],
|
|
29550
|
+
"headerParams": [],
|
|
29265
29551
|
"requestSchema": null,
|
|
29266
29552
|
"responseSchema": {
|
|
29267
29553
|
"type": "object",
|
|
@@ -29312,6 +29598,7 @@ const operationManifest = [
|
|
|
29312
29598
|
"path": "/functions",
|
|
29313
29599
|
"pathParams": [],
|
|
29314
29600
|
"queryParams": [],
|
|
29601
|
+
"headerParams": [],
|
|
29315
29602
|
"requestSchema": null,
|
|
29316
29603
|
"responseSchema": {
|
|
29317
29604
|
"type": "array",
|
|
@@ -29376,6 +29663,7 @@ const operationManifest = [
|
|
|
29376
29663
|
"path": "/org/secrets",
|
|
29377
29664
|
"pathParams": [],
|
|
29378
29665
|
"queryParams": [],
|
|
29666
|
+
"headerParams": [],
|
|
29379
29667
|
"requestSchema": null,
|
|
29380
29668
|
"responseSchema": {
|
|
29381
29669
|
"type": "object",
|
|
@@ -29426,6 +29714,7 @@ const operationManifest = [
|
|
|
29426
29714
|
"type": "string"
|
|
29427
29715
|
}],
|
|
29428
29716
|
"queryParams": [],
|
|
29717
|
+
"headerParams": [],
|
|
29429
29718
|
"requestSchema": {
|
|
29430
29719
|
"type": "object",
|
|
29431
29720
|
"description": "Target for a route binding. Either a specific verified domain\n(scoped) or the org-wide fallback. Pass `takeover: true` to\ndeactivate any conflicting binding before installing this one.\n",
|
|
@@ -29556,6 +29845,7 @@ const operationManifest = [
|
|
|
29556
29845
|
"type": "string"
|
|
29557
29846
|
}],
|
|
29558
29847
|
"queryParams": [],
|
|
29848
|
+
"headerParams": [],
|
|
29559
29849
|
"requestSchema": {
|
|
29560
29850
|
"type": "object",
|
|
29561
29851
|
"additionalProperties": false,
|
|
@@ -29614,6 +29904,7 @@ const operationManifest = [
|
|
|
29614
29904
|
"type": "string"
|
|
29615
29905
|
}],
|
|
29616
29906
|
"queryParams": [],
|
|
29907
|
+
"headerParams": [],
|
|
29617
29908
|
"requestSchema": {
|
|
29618
29909
|
"type": "object",
|
|
29619
29910
|
"additionalProperties": false,
|
|
@@ -29672,6 +29963,7 @@ const operationManifest = [
|
|
|
29672
29963
|
"type": "string"
|
|
29673
29964
|
}],
|
|
29674
29965
|
"queryParams": [],
|
|
29966
|
+
"headerParams": [],
|
|
29675
29967
|
"requestSchema": {
|
|
29676
29968
|
"type": "object",
|
|
29677
29969
|
"properties": { "local_part": {
|
|
@@ -29761,6 +30053,7 @@ const operationManifest = [
|
|
|
29761
30053
|
"type": "string"
|
|
29762
30054
|
}],
|
|
29763
30055
|
"queryParams": [],
|
|
30056
|
+
"headerParams": [],
|
|
29764
30057
|
"requestSchema": null,
|
|
29765
30058
|
"responseSchema": {
|
|
29766
30059
|
"type": "object",
|
|
@@ -29792,6 +30085,7 @@ const operationManifest = [
|
|
|
29792
30085
|
"type": "string"
|
|
29793
30086
|
}],
|
|
29794
30087
|
"queryParams": [],
|
|
30088
|
+
"headerParams": [],
|
|
29795
30089
|
"requestSchema": {
|
|
29796
30090
|
"type": "object",
|
|
29797
30091
|
"additionalProperties": false,
|
|
@@ -29879,6 +30173,7 @@ const operationManifest = [
|
|
|
29879
30173
|
"path": "/inbox/status",
|
|
29880
30174
|
"pathParams": [],
|
|
29881
30175
|
"queryParams": [],
|
|
30176
|
+
"headerParams": [],
|
|
29882
30177
|
"requestSchema": null,
|
|
29883
30178
|
"responseSchema": {
|
|
29884
30179
|
"type": "object",
|
|
@@ -30095,6 +30390,13 @@ const operationManifest = [
|
|
|
30095
30390
|
"type": "string"
|
|
30096
30391
|
}
|
|
30097
30392
|
],
|
|
30393
|
+
"headerParams": [{
|
|
30394
|
+
"description": "Optional function id UUID used as the default scope when query\nscope parameters are omitted.\n",
|
|
30395
|
+
"enum": null,
|
|
30396
|
+
"name": "x-primitive-function-id",
|
|
30397
|
+
"required": false,
|
|
30398
|
+
"type": "string"
|
|
30399
|
+
}],
|
|
30098
30400
|
"requestSchema": null,
|
|
30099
30401
|
"responseSchema": {
|
|
30100
30402
|
"type": "object",
|
|
@@ -30164,6 +30466,13 @@ const operationManifest = [
|
|
|
30164
30466
|
"type": "string"
|
|
30165
30467
|
}
|
|
30166
30468
|
],
|
|
30469
|
+
"headerParams": [{
|
|
30470
|
+
"description": "Optional function id UUID used as the default scope when query\nscope parameters are omitted.\n",
|
|
30471
|
+
"enum": null,
|
|
30472
|
+
"name": "x-primitive-function-id",
|
|
30473
|
+
"required": false,
|
|
30474
|
+
"type": "string"
|
|
30475
|
+
}],
|
|
30167
30476
|
"requestSchema": null,
|
|
30168
30477
|
"responseSchema": {
|
|
30169
30478
|
"type": "object",
|
|
@@ -30350,6 +30659,13 @@ const operationManifest = [
|
|
|
30350
30659
|
"type": "string"
|
|
30351
30660
|
}
|
|
30352
30661
|
],
|
|
30662
|
+
"headerParams": [{
|
|
30663
|
+
"description": "Optional function id UUID used as the default scope when query\nscope parameters are omitted.\n",
|
|
30664
|
+
"enum": null,
|
|
30665
|
+
"name": "x-primitive-function-id",
|
|
30666
|
+
"required": false,
|
|
30667
|
+
"type": "string"
|
|
30668
|
+
}],
|
|
30353
30669
|
"requestSchema": null,
|
|
30354
30670
|
"responseSchema": {
|
|
30355
30671
|
"type": "array",
|
|
@@ -30476,6 +30792,13 @@ const operationManifest = [
|
|
|
30476
30792
|
"path": "/memories",
|
|
30477
30793
|
"pathParams": [],
|
|
30478
30794
|
"queryParams": [],
|
|
30795
|
+
"headerParams": [{
|
|
30796
|
+
"description": "Optional function id UUID used as the default scope when the body\ndoes not include `scope`. Ignored when `scope` is provided.\n",
|
|
30797
|
+
"enum": null,
|
|
30798
|
+
"name": "x-primitive-function-id",
|
|
30799
|
+
"required": false,
|
|
30800
|
+
"type": "string"
|
|
30801
|
+
}],
|
|
30479
30802
|
"requestSchema": {
|
|
30480
30803
|
"type": "object",
|
|
30481
30804
|
"additionalProperties": false,
|
|
@@ -30680,6 +31003,7 @@ const operationManifest = [
|
|
|
30680
31003
|
"path": "/x402/challenges",
|
|
30681
31004
|
"pathParams": [],
|
|
30682
31005
|
"queryParams": [],
|
|
31006
|
+
"headerParams": [],
|
|
30683
31007
|
"requestSchema": {
|
|
30684
31008
|
"type": "object",
|
|
30685
31009
|
"additionalProperties": false,
|
|
@@ -30876,6 +31200,13 @@ const operationManifest = [
|
|
|
30876
31200
|
"path": "/x402/email-challenges",
|
|
30877
31201
|
"pathParams": [],
|
|
30878
31202
|
"queryParams": [],
|
|
31203
|
+
"headerParams": [{
|
|
31204
|
+
"description": "Optional idempotency key. Retrying a request with the same key returns\nthe original result instead of repeating the side effect (for\n`createEmailChallenge`, re-sending the email).\n",
|
|
31205
|
+
"enum": null,
|
|
31206
|
+
"name": "idempotency-key",
|
|
31207
|
+
"required": false,
|
|
31208
|
+
"type": "string"
|
|
31209
|
+
}],
|
|
30879
31210
|
"requestSchema": {
|
|
30880
31211
|
"type": "object",
|
|
30881
31212
|
"additionalProperties": false,
|
|
@@ -31054,6 +31385,7 @@ const operationManifest = [
|
|
|
31054
31385
|
"type": "string"
|
|
31055
31386
|
}],
|
|
31056
31387
|
"queryParams": [],
|
|
31388
|
+
"headerParams": [],
|
|
31057
31389
|
"requestSchema": null,
|
|
31058
31390
|
"responseSchema": {
|
|
31059
31391
|
"type": "object",
|
|
@@ -31213,6 +31545,7 @@ const operationManifest = [
|
|
|
31213
31545
|
"path": "/x402/spend-policy",
|
|
31214
31546
|
"pathParams": [],
|
|
31215
31547
|
"queryParams": [],
|
|
31548
|
+
"headerParams": [],
|
|
31216
31549
|
"requestSchema": null,
|
|
31217
31550
|
"responseSchema": {
|
|
31218
31551
|
"type": "object",
|
|
@@ -31262,6 +31595,7 @@ const operationManifest = [
|
|
|
31262
31595
|
"path": "/x402/declined-payments",
|
|
31263
31596
|
"pathParams": [],
|
|
31264
31597
|
"queryParams": [],
|
|
31598
|
+
"headerParams": [],
|
|
31265
31599
|
"requestSchema": null,
|
|
31266
31600
|
"responseSchema": {
|
|
31267
31601
|
"type": "array",
|
|
@@ -31325,6 +31659,7 @@ const operationManifest = [
|
|
|
31325
31659
|
"path": "/x402/payout-addresses",
|
|
31326
31660
|
"pathParams": [],
|
|
31327
31661
|
"queryParams": [],
|
|
31662
|
+
"headerParams": [],
|
|
31328
31663
|
"requestSchema": null,
|
|
31329
31664
|
"responseSchema": {
|
|
31330
31665
|
"type": "array",
|
|
@@ -31390,6 +31725,7 @@ const operationManifest = [
|
|
|
31390
31725
|
"type": "string"
|
|
31391
31726
|
}],
|
|
31392
31727
|
"queryParams": [],
|
|
31728
|
+
"headerParams": [],
|
|
31393
31729
|
"requestSchema": {
|
|
31394
31730
|
"type": "object",
|
|
31395
31731
|
"additionalProperties": false,
|
|
@@ -31488,6 +31824,7 @@ const operationManifest = [
|
|
|
31488
31824
|
"path": "/x402/payout-addresses",
|
|
31489
31825
|
"pathParams": [],
|
|
31490
31826
|
"queryParams": [],
|
|
31827
|
+
"headerParams": [],
|
|
31491
31828
|
"requestSchema": {
|
|
31492
31829
|
"type": "object",
|
|
31493
31830
|
"additionalProperties": false,
|
|
@@ -31580,6 +31917,7 @@ const operationManifest = [
|
|
|
31580
31917
|
"path": "/x402/spend-policy",
|
|
31581
31918
|
"pathParams": [],
|
|
31582
31919
|
"queryParams": [],
|
|
31920
|
+
"headerParams": [],
|
|
31583
31921
|
"requestSchema": {
|
|
31584
31922
|
"type": "object",
|
|
31585
31923
|
"additionalProperties": false,
|
|
@@ -31652,6 +31990,7 @@ const operationManifest = [
|
|
|
31652
31990
|
"path": "/registries",
|
|
31653
31991
|
"pathParams": [],
|
|
31654
31992
|
"queryParams": [],
|
|
31993
|
+
"headerParams": [],
|
|
31655
31994
|
"requestSchema": {
|
|
31656
31995
|
"type": "object",
|
|
31657
31996
|
"properties": {
|
|
@@ -31721,6 +32060,7 @@ const operationManifest = [
|
|
|
31721
32060
|
"type": "string"
|
|
31722
32061
|
}],
|
|
31723
32062
|
"queryParams": [],
|
|
32063
|
+
"headerParams": [],
|
|
31724
32064
|
"requestSchema": {
|
|
31725
32065
|
"type": "object",
|
|
31726
32066
|
"properties": { "decision": {
|
|
@@ -31753,6 +32093,7 @@ const operationManifest = [
|
|
|
31753
32093
|
"path": "/agents",
|
|
31754
32094
|
"pathParams": [],
|
|
31755
32095
|
"queryParams": [],
|
|
32096
|
+
"headerParams": [],
|
|
31756
32097
|
"requestSchema": {
|
|
31757
32098
|
"type": "object",
|
|
31758
32099
|
"properties": {
|
|
@@ -31822,6 +32163,7 @@ const operationManifest = [
|
|
|
31822
32163
|
"type": "string"
|
|
31823
32164
|
}],
|
|
31824
32165
|
"queryParams": [],
|
|
32166
|
+
"headerParams": [],
|
|
31825
32167
|
"requestSchema": null,
|
|
31826
32168
|
"responseSchema": null,
|
|
31827
32169
|
"sdkName": "deleteRegistry",
|
|
@@ -31846,6 +32188,7 @@ const operationManifest = [
|
|
|
31846
32188
|
"type": "string"
|
|
31847
32189
|
}],
|
|
31848
32190
|
"queryParams": [],
|
|
32191
|
+
"headerParams": [],
|
|
31849
32192
|
"requestSchema": null,
|
|
31850
32193
|
"responseSchema": {
|
|
31851
32194
|
"type": "object",
|
|
@@ -31901,6 +32244,7 @@ const operationManifest = [
|
|
|
31901
32244
|
"type": "string"
|
|
31902
32245
|
}],
|
|
31903
32246
|
"queryParams": [],
|
|
32247
|
+
"headerParams": [],
|
|
31904
32248
|
"requestSchema": null,
|
|
31905
32249
|
"responseSchema": {
|
|
31906
32250
|
"type": "object",
|
|
@@ -31948,6 +32292,7 @@ const operationManifest = [
|
|
|
31948
32292
|
"path": "/registries",
|
|
31949
32293
|
"pathParams": [],
|
|
31950
32294
|
"queryParams": [],
|
|
32295
|
+
"headerParams": [],
|
|
31951
32296
|
"requestSchema": null,
|
|
31952
32297
|
"responseSchema": {
|
|
31953
32298
|
"type": "array",
|
|
@@ -32018,6 +32363,7 @@ const operationManifest = [
|
|
|
32018
32363
|
"required": false,
|
|
32019
32364
|
"type": "string"
|
|
32020
32365
|
}],
|
|
32366
|
+
"headerParams": [],
|
|
32021
32367
|
"requestSchema": null,
|
|
32022
32368
|
"responseSchema": {
|
|
32023
32369
|
"type": "array",
|
|
@@ -32084,6 +32430,7 @@ const operationManifest = [
|
|
|
32084
32430
|
"required": false,
|
|
32085
32431
|
"type": "integer"
|
|
32086
32432
|
}],
|
|
32433
|
+
"headerParams": [],
|
|
32087
32434
|
"requestSchema": null,
|
|
32088
32435
|
"responseSchema": {
|
|
32089
32436
|
"type": "array",
|
|
@@ -32134,6 +32481,7 @@ const operationManifest = [
|
|
|
32134
32481
|
"type": "string"
|
|
32135
32482
|
}],
|
|
32136
32483
|
"queryParams": [],
|
|
32484
|
+
"headerParams": [],
|
|
32137
32485
|
"requestSchema": {
|
|
32138
32486
|
"type": "object",
|
|
32139
32487
|
"description": "Publish an agent into a registry. When display_name is present the agent identity is defined (create-or-get by address) in the same call before publishing; omit the define fields to publish an already-defined agent.",
|
|
@@ -32227,6 +32575,7 @@ const operationManifest = [
|
|
|
32227
32575
|
"type": "string"
|
|
32228
32576
|
}],
|
|
32229
32577
|
"queryParams": [],
|
|
32578
|
+
"headerParams": [],
|
|
32230
32579
|
"requestSchema": null,
|
|
32231
32580
|
"responseSchema": {
|
|
32232
32581
|
"type": "object",
|
|
@@ -32288,6 +32637,7 @@ const operationManifest = [
|
|
|
32288
32637
|
"type": "string"
|
|
32289
32638
|
}],
|
|
32290
32639
|
"queryParams": [],
|
|
32640
|
+
"headerParams": [],
|
|
32291
32641
|
"requestSchema": null,
|
|
32292
32642
|
"responseSchema": null,
|
|
32293
32643
|
"sdkName": "unpublishAgent",
|
|
@@ -32312,6 +32662,7 @@ const operationManifest = [
|
|
|
32312
32662
|
"type": "string"
|
|
32313
32663
|
}],
|
|
32314
32664
|
"queryParams": [],
|
|
32665
|
+
"headerParams": [],
|
|
32315
32666
|
"requestSchema": {
|
|
32316
32667
|
"type": "object",
|
|
32317
32668
|
"minProperties": 1,
|
|
@@ -32367,6 +32718,7 @@ const operationManifest = [
|
|
|
32367
32718
|
"type": "string"
|
|
32368
32719
|
}],
|
|
32369
32720
|
"queryParams": [],
|
|
32721
|
+
"headerParams": [],
|
|
32370
32722
|
"requestSchema": null,
|
|
32371
32723
|
"responseSchema": null,
|
|
32372
32724
|
"sdkName": "deleteRepeatingSend",
|
|
@@ -32391,6 +32743,7 @@ const operationManifest = [
|
|
|
32391
32743
|
"type": "string"
|
|
32392
32744
|
}],
|
|
32393
32745
|
"queryParams": [],
|
|
32746
|
+
"headerParams": [],
|
|
32394
32747
|
"requestSchema": null,
|
|
32395
32748
|
"responseSchema": {
|
|
32396
32749
|
"type": "object",
|
|
@@ -32514,6 +32867,7 @@ const operationManifest = [
|
|
|
32514
32867
|
"required": false,
|
|
32515
32868
|
"type": "string"
|
|
32516
32869
|
}],
|
|
32870
|
+
"headerParams": [],
|
|
32517
32871
|
"requestSchema": null,
|
|
32518
32872
|
"responseSchema": {
|
|
32519
32873
|
"type": "array",
|
|
@@ -32634,6 +32988,7 @@ const operationManifest = [
|
|
|
32634
32988
|
"type": "string"
|
|
32635
32989
|
}],
|
|
32636
32990
|
"queryParams": [],
|
|
32991
|
+
"headerParams": [],
|
|
32637
32992
|
"requestSchema": {
|
|
32638
32993
|
"type": "object",
|
|
32639
32994
|
"additionalProperties": false,
|
|
@@ -32697,6 +33052,7 @@ const operationManifest = [
|
|
|
32697
33052
|
"type": "string"
|
|
32698
33053
|
}],
|
|
32699
33054
|
"queryParams": [],
|
|
33055
|
+
"headerParams": [],
|
|
32700
33056
|
"requestSchema": {
|
|
32701
33057
|
"type": "object",
|
|
32702
33058
|
"additionalProperties": false,
|
|
@@ -32850,6 +33206,7 @@ const operationManifest = [
|
|
|
32850
33206
|
"path": "/routes",
|
|
32851
33207
|
"pathParams": [],
|
|
32852
33208
|
"queryParams": [],
|
|
33209
|
+
"headerParams": [],
|
|
32853
33210
|
"requestSchema": {
|
|
32854
33211
|
"type": "object",
|
|
32855
33212
|
"additionalProperties": false,
|
|
@@ -32972,6 +33329,7 @@ const operationManifest = [
|
|
|
32972
33329
|
"type": "string"
|
|
32973
33330
|
}],
|
|
32974
33331
|
"queryParams": [],
|
|
33332
|
+
"headerParams": [],
|
|
32975
33333
|
"requestSchema": null,
|
|
32976
33334
|
"responseSchema": null,
|
|
32977
33335
|
"sdkName": "deleteRoute",
|
|
@@ -32990,6 +33348,7 @@ const operationManifest = [
|
|
|
32990
33348
|
"path": "/routes",
|
|
32991
33349
|
"pathParams": [],
|
|
32992
33350
|
"queryParams": [],
|
|
33351
|
+
"headerParams": [],
|
|
32993
33352
|
"requestSchema": null,
|
|
32994
33353
|
"responseSchema": {
|
|
32995
33354
|
"type": "array",
|
|
@@ -33068,6 +33427,7 @@ const operationManifest = [
|
|
|
33068
33427
|
"path": "/routes/reorder",
|
|
33069
33428
|
"pathParams": [],
|
|
33070
33429
|
"queryParams": [],
|
|
33430
|
+
"headerParams": [],
|
|
33071
33431
|
"requestSchema": {
|
|
33072
33432
|
"type": "object",
|
|
33073
33433
|
"additionalProperties": false,
|
|
@@ -33171,6 +33531,7 @@ const operationManifest = [
|
|
|
33171
33531
|
"path": "/routes/simulate",
|
|
33172
33532
|
"pathParams": [],
|
|
33173
33533
|
"queryParams": [],
|
|
33534
|
+
"headerParams": [],
|
|
33174
33535
|
"requestSchema": {
|
|
33175
33536
|
"type": "object",
|
|
33176
33537
|
"additionalProperties": false,
|
|
@@ -33292,6 +33653,7 @@ const operationManifest = [
|
|
|
33292
33653
|
"type": "string"
|
|
33293
33654
|
}],
|
|
33294
33655
|
"queryParams": [],
|
|
33656
|
+
"headerParams": [],
|
|
33295
33657
|
"requestSchema": {
|
|
33296
33658
|
"type": "object",
|
|
33297
33659
|
"additionalProperties": false,
|
|
@@ -33399,6 +33761,7 @@ const operationManifest = [
|
|
|
33399
33761
|
"path": "/semantic-search",
|
|
33400
33762
|
"pathParams": [],
|
|
33401
33763
|
"queryParams": [],
|
|
33764
|
+
"headerParams": [],
|
|
33402
33765
|
"requestSchema": {
|
|
33403
33766
|
"type": "object",
|
|
33404
33767
|
"properties": {
|
|
@@ -33631,6 +33994,7 @@ const operationManifest = [
|
|
|
33631
33994
|
"required": false,
|
|
33632
33995
|
"type": "integer"
|
|
33633
33996
|
}],
|
|
33997
|
+
"headerParams": [],
|
|
33634
33998
|
"requestSchema": null,
|
|
33635
33999
|
"responseSchema": {
|
|
33636
34000
|
"type": "object",
|
|
@@ -33741,6 +34105,7 @@ const operationManifest = [
|
|
|
33741
34105
|
"type": "string"
|
|
33742
34106
|
}],
|
|
33743
34107
|
"queryParams": [],
|
|
34108
|
+
"headerParams": [],
|
|
33744
34109
|
"requestSchema": null,
|
|
33745
34110
|
"responseSchema": {
|
|
33746
34111
|
"description": "Full sent-email record, including `body_text` and\n`body_html`. Returned by /sent-emails/{id}.\n",
|
|
@@ -34281,6 +34646,7 @@ const operationManifest = [
|
|
|
34281
34646
|
"path": "/sent-emails/cancel",
|
|
34282
34647
|
"pathParams": [],
|
|
34283
34648
|
"queryParams": [],
|
|
34649
|
+
"headerParams": [],
|
|
34284
34650
|
"requestSchema": {
|
|
34285
34651
|
"type": "object",
|
|
34286
34652
|
"additionalProperties": false,
|
|
@@ -34845,6 +35211,7 @@ const operationManifest = [
|
|
|
34845
35211
|
"type": "string"
|
|
34846
35212
|
}],
|
|
34847
35213
|
"queryParams": [],
|
|
35214
|
+
"headerParams": [],
|
|
34848
35215
|
"requestSchema": null,
|
|
34849
35216
|
"responseSchema": {
|
|
34850
35217
|
"type": "object",
|
|
@@ -34902,6 +35269,7 @@ const operationManifest = [
|
|
|
34902
35269
|
}
|
|
34903
35270
|
],
|
|
34904
35271
|
"queryParams": [],
|
|
35272
|
+
"headerParams": [],
|
|
34905
35273
|
"requestSchema": null,
|
|
34906
35274
|
"responseSchema": null,
|
|
34907
35275
|
"sdkName": "downloadSentAttachmentArchiveMember",
|
|
@@ -34932,6 +35300,7 @@ const operationManifest = [
|
|
|
34932
35300
|
"required": true,
|
|
34933
35301
|
"type": "string"
|
|
34934
35302
|
}],
|
|
35303
|
+
"headerParams": [],
|
|
34935
35304
|
"requestSchema": null,
|
|
34936
35305
|
"responseSchema": null,
|
|
34937
35306
|
"sdkName": "downloadSentAttachmentByFilename",
|
|
@@ -34964,6 +35333,7 @@ const operationManifest = [
|
|
|
34964
35333
|
"type": "integer"
|
|
34965
35334
|
}],
|
|
34966
35335
|
"queryParams": [],
|
|
35336
|
+
"headerParams": [],
|
|
34967
35337
|
"requestSchema": null,
|
|
34968
35338
|
"responseSchema": null,
|
|
34969
35339
|
"sdkName": "downloadSentAttachmentPart",
|
|
@@ -34982,6 +35352,7 @@ const operationManifest = [
|
|
|
34982
35352
|
"path": "/outbound/status",
|
|
34983
35353
|
"pathParams": [],
|
|
34984
35354
|
"queryParams": [],
|
|
35355
|
+
"headerParams": [],
|
|
34985
35356
|
"requestSchema": null,
|
|
34986
35357
|
"responseSchema": {
|
|
34987
35358
|
"type": "object",
|
|
@@ -35076,6 +35447,7 @@ const operationManifest = [
|
|
|
35076
35447
|
"path": "/send-permissions",
|
|
35077
35448
|
"pathParams": [],
|
|
35078
35449
|
"queryParams": [],
|
|
35450
|
+
"headerParams": [],
|
|
35079
35451
|
"requestSchema": null,
|
|
35080
35452
|
"responseSchema": {
|
|
35081
35453
|
"type": "array",
|
|
@@ -35211,6 +35583,7 @@ const operationManifest = [
|
|
|
35211
35583
|
"type": "string"
|
|
35212
35584
|
}],
|
|
35213
35585
|
"queryParams": [],
|
|
35586
|
+
"headerParams": [],
|
|
35214
35587
|
"requestSchema": null,
|
|
35215
35588
|
"responseSchema": {
|
|
35216
35589
|
"description": "Full sent-email record, including `body_text` and\n`body_html`. Returned by /sent-emails/{id}.\n",
|
|
@@ -35763,6 +36136,7 @@ const operationManifest = [
|
|
|
35763
36136
|
"type": "string"
|
|
35764
36137
|
}],
|
|
35765
36138
|
"queryParams": [],
|
|
36139
|
+
"headerParams": [],
|
|
35766
36140
|
"requestSchema": null,
|
|
35767
36141
|
"responseSchema": {
|
|
35768
36142
|
"type": "object",
|
|
@@ -35917,6 +36291,7 @@ const operationManifest = [
|
|
|
35917
36291
|
"type": "string"
|
|
35918
36292
|
}
|
|
35919
36293
|
],
|
|
36294
|
+
"headerParams": [],
|
|
35920
36295
|
"requestSchema": null,
|
|
35921
36296
|
"responseSchema": {
|
|
35922
36297
|
"type": "array",
|
|
@@ -36318,6 +36693,7 @@ const operationManifest = [
|
|
|
36318
36693
|
"type": "string"
|
|
36319
36694
|
}],
|
|
36320
36695
|
"queryParams": [],
|
|
36696
|
+
"headerParams": [],
|
|
36321
36697
|
"requestSchema": {
|
|
36322
36698
|
"type": "object",
|
|
36323
36699
|
"additionalProperties": false,
|
|
@@ -36604,6 +36980,7 @@ const operationManifest = [
|
|
|
36604
36980
|
"type": "string"
|
|
36605
36981
|
}],
|
|
36606
36982
|
"queryParams": [],
|
|
36983
|
+
"headerParams": [],
|
|
36607
36984
|
"requestSchema": {
|
|
36608
36985
|
"type": "object",
|
|
36609
36986
|
"additionalProperties": false,
|
|
@@ -37153,6 +37530,13 @@ const operationManifest = [
|
|
|
37153
37530
|
"path": "/send-mail",
|
|
37154
37531
|
"pathParams": [],
|
|
37155
37532
|
"queryParams": [],
|
|
37533
|
+
"headerParams": [{
|
|
37534
|
+
"description": "Optional customer-supplied idempotency key. If omitted, Primitive\nderives one from the canonical request payload and echoes the\neffective value in the `Idempotency-Key` response header.\n",
|
|
37535
|
+
"enum": null,
|
|
37536
|
+
"name": "Idempotency-Key",
|
|
37537
|
+
"required": false,
|
|
37538
|
+
"type": "string"
|
|
37539
|
+
}],
|
|
37156
37540
|
"requestSchema": {
|
|
37157
37541
|
"type": "object",
|
|
37158
37542
|
"additionalProperties": false,
|
|
@@ -37549,6 +37933,7 @@ const operationManifest = [
|
|
|
37549
37933
|
"type": "string"
|
|
37550
37934
|
}],
|
|
37551
37935
|
"queryParams": [],
|
|
37936
|
+
"headerParams": [],
|
|
37552
37937
|
"requestSchema": null,
|
|
37553
37938
|
"responseSchema": {
|
|
37554
37939
|
"type": "object",
|
|
@@ -37907,6 +38292,7 @@ const operationManifest = [
|
|
|
37907
38292
|
"type": "string"
|
|
37908
38293
|
}],
|
|
37909
38294
|
"queryParams": [],
|
|
38295
|
+
"headerParams": [],
|
|
37910
38296
|
"requestSchema": null,
|
|
37911
38297
|
"responseSchema": {
|
|
37912
38298
|
"type": "object",
|
|
@@ -37980,6 +38366,7 @@ const operationManifest = [
|
|
|
37980
38366
|
"type": "string"
|
|
37981
38367
|
}],
|
|
37982
38368
|
"queryParams": [],
|
|
38369
|
+
"headerParams": [],
|
|
37983
38370
|
"requestSchema": {
|
|
37984
38371
|
"type": "object",
|
|
37985
38372
|
"additionalProperties": false,
|
|
@@ -38104,6 +38491,7 @@ const operationManifest = [
|
|
|
38104
38491
|
"type": "integer"
|
|
38105
38492
|
}
|
|
38106
38493
|
],
|
|
38494
|
+
"headerParams": [],
|
|
38107
38495
|
"requestSchema": null,
|
|
38108
38496
|
"responseSchema": {
|
|
38109
38497
|
"type": "object",
|
|
@@ -38210,6 +38598,7 @@ const operationManifest = [
|
|
|
38210
38598
|
"type": "string"
|
|
38211
38599
|
}],
|
|
38212
38600
|
"queryParams": [],
|
|
38601
|
+
"headerParams": [],
|
|
38213
38602
|
"requestSchema": null,
|
|
38214
38603
|
"responseSchema": {
|
|
38215
38604
|
"type": "object",
|
|
@@ -38339,6 +38728,7 @@ const operationManifest = [
|
|
|
38339
38728
|
"path": "/wake/authorizations",
|
|
38340
38729
|
"pathParams": [],
|
|
38341
38730
|
"queryParams": [],
|
|
38731
|
+
"headerParams": [],
|
|
38342
38732
|
"requestSchema": {
|
|
38343
38733
|
"type": "object",
|
|
38344
38734
|
"additionalProperties": false,
|
|
@@ -38423,6 +38813,7 @@ const operationManifest = [
|
|
|
38423
38813
|
"path": "/wake/schedules",
|
|
38424
38814
|
"pathParams": [],
|
|
38425
38815
|
"queryParams": [],
|
|
38816
|
+
"headerParams": [],
|
|
38426
38817
|
"requestSchema": {
|
|
38427
38818
|
"type": "object",
|
|
38428
38819
|
"additionalProperties": false,
|
|
@@ -38550,6 +38941,7 @@ const operationManifest = [
|
|
|
38550
38941
|
"type": "string"
|
|
38551
38942
|
}],
|
|
38552
38943
|
"queryParams": [],
|
|
38944
|
+
"headerParams": [],
|
|
38553
38945
|
"requestSchema": null,
|
|
38554
38946
|
"responseSchema": null,
|
|
38555
38947
|
"sdkName": "deleteWakeAuthorization",
|
|
@@ -38574,6 +38966,7 @@ const operationManifest = [
|
|
|
38574
38966
|
"type": "string"
|
|
38575
38967
|
}],
|
|
38576
38968
|
"queryParams": [],
|
|
38969
|
+
"headerParams": [],
|
|
38577
38970
|
"requestSchema": null,
|
|
38578
38971
|
"responseSchema": null,
|
|
38579
38972
|
"sdkName": "deleteWakeSchedule",
|
|
@@ -38598,6 +38991,7 @@ const operationManifest = [
|
|
|
38598
38991
|
"type": "string"
|
|
38599
38992
|
}],
|
|
38600
38993
|
"queryParams": [],
|
|
38994
|
+
"headerParams": [],
|
|
38601
38995
|
"requestSchema": null,
|
|
38602
38996
|
"responseSchema": {
|
|
38603
38997
|
"type": "object",
|
|
@@ -38681,6 +39075,7 @@ const operationManifest = [
|
|
|
38681
39075
|
"required": false,
|
|
38682
39076
|
"type": "string"
|
|
38683
39077
|
}],
|
|
39078
|
+
"headerParams": [],
|
|
38684
39079
|
"requestSchema": null,
|
|
38685
39080
|
"responseSchema": {
|
|
38686
39081
|
"type": "array",
|
|
@@ -38743,6 +39138,7 @@ const operationManifest = [
|
|
|
38743
39138
|
"required": false,
|
|
38744
39139
|
"type": "integer"
|
|
38745
39140
|
}],
|
|
39141
|
+
"headerParams": [],
|
|
38746
39142
|
"requestSchema": null,
|
|
38747
39143
|
"responseSchema": {
|
|
38748
39144
|
"type": "array",
|
|
@@ -38798,6 +39194,7 @@ const operationManifest = [
|
|
|
38798
39194
|
"path": "/wake/schedules",
|
|
38799
39195
|
"pathParams": [],
|
|
38800
39196
|
"queryParams": [],
|
|
39197
|
+
"headerParams": [],
|
|
38801
39198
|
"requestSchema": null,
|
|
38802
39199
|
"responseSchema": {
|
|
38803
39200
|
"type": "array",
|
|
@@ -38884,6 +39281,7 @@ const operationManifest = [
|
|
|
38884
39281
|
"type": "string"
|
|
38885
39282
|
}],
|
|
38886
39283
|
"queryParams": [],
|
|
39284
|
+
"headerParams": [],
|
|
38887
39285
|
"requestSchema": null,
|
|
38888
39286
|
"responseSchema": {
|
|
38889
39287
|
"type": "object",
|
|
@@ -38911,6 +39309,7 @@ const operationManifest = [
|
|
|
38911
39309
|
"type": "string"
|
|
38912
39310
|
}],
|
|
38913
39311
|
"queryParams": [],
|
|
39312
|
+
"headerParams": [],
|
|
38914
39313
|
"requestSchema": {
|
|
38915
39314
|
"type": "object",
|
|
38916
39315
|
"additionalProperties": false,
|
|
@@ -38972,6 +39371,7 @@ const operationManifest = [
|
|
|
38972
39371
|
"type": "string"
|
|
38973
39372
|
}],
|
|
38974
39373
|
"queryParams": [],
|
|
39374
|
+
"headerParams": [],
|
|
38975
39375
|
"requestSchema": {
|
|
38976
39376
|
"type": "object",
|
|
38977
39377
|
"additionalProperties": false,
|
|
@@ -39146,6 +39546,7 @@ const operationManifest = [
|
|
|
39146
39546
|
"type": "string"
|
|
39147
39547
|
}
|
|
39148
39548
|
],
|
|
39549
|
+
"headerParams": [],
|
|
39149
39550
|
"requestSchema": null,
|
|
39150
39551
|
"responseSchema": {
|
|
39151
39552
|
"type": "array",
|
|
@@ -39253,6 +39654,7 @@ const operationManifest = [
|
|
|
39253
39654
|
"type": "string"
|
|
39254
39655
|
}],
|
|
39255
39656
|
"queryParams": [],
|
|
39657
|
+
"headerParams": [],
|
|
39256
39658
|
"requestSchema": null,
|
|
39257
39659
|
"responseSchema": {
|
|
39258
39660
|
"type": "object",
|
|
@@ -41164,12 +41566,73 @@ var AgentSessionEndCommand = class AgentSessionEndCommand extends Command {
|
|
|
41164
41566
|
}
|
|
41165
41567
|
};
|
|
41166
41568
|
//#endregion
|
|
41569
|
+
//#region src/oclif/session-agent-env.ts
|
|
41570
|
+
/**
|
|
41571
|
+
* Claude Code gives SessionStart hooks a file in CLAUDE_ENV_FILE and runs its
|
|
41572
|
+
* contents before every later Bash command in the session.
|
|
41573
|
+
*/
|
|
41574
|
+
const CLAUDE_ENV_FILE_ENV = "CLAUDE_ENV_FILE";
|
|
41575
|
+
const PLAIN_ADDRESS = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+$/;
|
|
41576
|
+
const ASSIGNS = (name) => new RegExp(`^\\s*(?:export\\s+)?${name}=`, "m");
|
|
41577
|
+
function sessionAgentEnvLines(profileName, address) {
|
|
41578
|
+
return [`export ${AGENT_PROFILE_ENV}=${profileName}`, `export ${AGENT_ADDRESS_ENV}=${address}`];
|
|
41579
|
+
}
|
|
41580
|
+
/**
|
|
41581
|
+
* Select a registered session's own agent for every later command in the
|
|
41582
|
+
* session by appending two export lines to CLAUDE_ENV_FILE. Writes only for a
|
|
41583
|
+
* profile that is saved and loads now, so a session is never pointed at a
|
|
41584
|
+
* profile that does not exist. Leaves the file alone when the session's
|
|
41585
|
+
* environment already sets PRIMITIVE_AGENT_PROFILE (even to the empty
|
|
41586
|
+
* opt-out value) or the file already assigns either variable. Never throws.
|
|
41587
|
+
*/
|
|
41588
|
+
function exportSessionAgentEnv(params) {
|
|
41589
|
+
const env = params.env ?? process.env;
|
|
41590
|
+
const envFile = env[CLAUDE_ENV_FILE_ENV]?.trim();
|
|
41591
|
+
if (!envFile) return "no_env_file";
|
|
41592
|
+
if (Object.hasOwn(env, "PRIMITIVE_AGENT_PROFILE")) return "explicit_env";
|
|
41593
|
+
try {
|
|
41594
|
+
const profileName = agentProfileName(params.profileName);
|
|
41595
|
+
const profile = loadConnectedAgentProfile(params.configDir, profileName);
|
|
41596
|
+
if (!profile || profile.agent_address.toLowerCase() !== params.address.toLowerCase() || !PLAIN_ADDRESS.test(profile.agent_address)) return "no_profile";
|
|
41597
|
+
let existing = "";
|
|
41598
|
+
try {
|
|
41599
|
+
existing = readFileSync(envFile, "utf8");
|
|
41600
|
+
} catch (error) {
|
|
41601
|
+
if (error.code !== "ENOENT") return "failed";
|
|
41602
|
+
}
|
|
41603
|
+
const lines = sessionAgentEnvLines(profileName, profile.agent_address);
|
|
41604
|
+
const present = existing.split(/\r?\n/);
|
|
41605
|
+
if (lines.every((line) => present.includes(line))) return "already_written";
|
|
41606
|
+
if (ASSIGNS("PRIMITIVE_AGENT_PROFILE").test(existing) || ASSIGNS("PRIMITIVE_AGENT_ADDRESS").test(existing)) return "env_file_conflict";
|
|
41607
|
+
const separator = existing && !existing.endsWith("\n") ? "\n" : "";
|
|
41608
|
+
appendFileSync(envFile, `${separator}${lines.join("\n")}\n`);
|
|
41609
|
+
return "written";
|
|
41610
|
+
} catch {
|
|
41611
|
+
return "failed";
|
|
41612
|
+
}
|
|
41613
|
+
}
|
|
41614
|
+
/**
|
|
41615
|
+
* "session_hook" when the selected profile is this Claude Code session's own
|
|
41616
|
+
* agent and PRIMITIVE_AGENT_ADDRESS names its address, which is what the
|
|
41617
|
+
* SessionStart hook exports; "env" for any other PRIMITIVE_AGENT_PROFILE.
|
|
41618
|
+
*/
|
|
41619
|
+
function agentIdentitySource(identity, env = process.env) {
|
|
41620
|
+
const session = env.CLAUDE_CODE_SESSION_ID?.trim().toLowerCase();
|
|
41621
|
+
return session && identity.profileName === `session-${session}` && env["PRIMITIVE_AGENT_ADDRESS"]?.trim().toLowerCase() === identity.agentAddress.toLowerCase() ? "session_hook" : "env";
|
|
41622
|
+
}
|
|
41623
|
+
//#endregion
|
|
41167
41624
|
//#region src/oclif/commands/agent-session-register.ts
|
|
41168
41625
|
/** A hook waits this long for registration before letting the session start. */
|
|
41169
41626
|
const HOOK_BUDGET_MS = 3e3;
|
|
41627
|
+
/** Outcomes whose profile is saved and connected, or was and is only unchecked. */
|
|
41628
|
+
const EXPORTABLE_STATUSES = /* @__PURE__ */ new Set([
|
|
41629
|
+
"registered",
|
|
41630
|
+
"already_registered",
|
|
41631
|
+
"offline"
|
|
41632
|
+
]);
|
|
41170
41633
|
var AgentSessionRegisterCommand = class AgentSessionRegisterCommand extends Command {
|
|
41171
41634
|
static summary = "Register this coding session with Primitive, once";
|
|
41172
|
-
static description = "Gives the current Claude Code, Codex or omp session an address in your organization using the saved member login, without a browser. Safe to run on every start and resume: a session that already has a profile is only re-verified, and a session that ended and starts again (for example `claude --resume`) keeps its agent and address, and a session whose agent was disconnected or removed never gets a second address. Each run also disconnects the agents of sessions on this machine that ended more than 30 days ago without starting again, only while their profile still holds the credential this command created. The session ID comes from CLAUDE_CODE_SESSION_ID (Claude), CODEX_THREAD_ID or CODEX_SESSION_ID (Codex), or --session. omp does not expose a session ID to commands, so omp sessions use one generated ID per running omp process, and receiving mail is not supported for them. The agent is named <runtime>-<repository> and gets a private AGENT_INFO note naming the runtime and repository when it has none. A connected Claude Code or Codex session also gets a private AGENT_RESUME note holding the one-line command that resumes it (`claude --resume <session>` or `codex resume <session>`), rewritten only when it changes; a failure to write it is reported as a warning and never fails the registration. Claude sessions receive mail through exact-session hooks; Codex through the native receiver. Non-interactive Claude runs (claude -p and SDK hosts, by CLAUDE_CODE_ENTRYPOINT) are skipped with status skipped_headless. Never blocks a session: every outcome, including no login or no network, exits 0 with a status. --hook reads Claude's or Codex's SessionStart hook input from stdin, returns within a few seconds and finishes slower work in the background.";
|
|
41635
|
+
static description = "Gives the current Claude Code, Codex or omp session an address in your organization using the saved member login, without a browser. Safe to run on every start and resume: a session that already has a profile is only re-verified, and a session that ended and starts again (for example `claude --resume`) keeps its agent and address, and a session whose agent was disconnected or removed never gets a second address. Each run also disconnects the agents of sessions on this machine that ended more than 30 days ago without starting again, only while their profile still holds the credential this command created. The session ID comes from CLAUDE_CODE_SESSION_ID (Claude), CODEX_THREAD_ID or CODEX_SESSION_ID (Codex), or --session. omp does not expose a session ID to commands, so omp sessions use one generated ID per running omp process, and receiving mail is not supported for them. The agent is named <runtime>-<repository> and gets a private AGENT_INFO note naming the runtime and repository when it has none. A connected Claude Code or Codex session also gets a private AGENT_RESUME note holding the one-line command that resumes it (`claude --resume <session>` or `codex resume <session>`), rewritten only when it changes; a failure to write it is reported as a warning and never fails the registration. Claude sessions receive mail through exact-session hooks; Codex through the native receiver. Non-interactive Claude runs (claude -p and SDK hosts, by CLAUDE_CODE_ENTRYPOINT) are skipped with status skipped_headless. Never blocks a session: every outcome, including no login or no network, exits 0 with a status. --hook reads Claude's or Codex's SessionStart hook input from stdin, returns within a few seconds and finishes slower work in the background. For Claude, once the session's profile is saved and connected, --hook also appends `export PRIMITIVE_AGENT_PROFILE=<profile>` and `export PRIMITIVE_AGENT_ADDRESS=<address>` to the file named by CLAUDE_ENV_FILE, so later commands in the session run as the session's agent; it writes nothing when the session already sets PRIMITIVE_AGENT_PROFILE (an empty value keeps the member login) or the file already assigns either variable.";
|
|
41173
41636
|
static examples = [
|
|
41174
41637
|
"<%= config.bin %> agent session-register --runtime codex --quiet",
|
|
41175
41638
|
"<%= config.bin %> agent session-register --runtime claude --json",
|
|
@@ -41185,7 +41648,8 @@ var AgentSessionRegisterCommand = class AgentSessionRegisterCommand extends Comm
|
|
|
41185
41648
|
cwd: Flags.string({ description: "Working directory used for the agent's name and AGENT_INFO; defaults to the current directory" }),
|
|
41186
41649
|
hook: Flags.boolean({ description: "Read Claude or Codex SessionStart hook JSON from stdin and finish in the background if registration is slow" }),
|
|
41187
41650
|
json: Flags.boolean({ description: "Print the result as JSON" }),
|
|
41188
|
-
quiet: Flags.boolean({ description: "Print nothing" })
|
|
41651
|
+
quiet: Flags.boolean({ description: "Print nothing" }),
|
|
41652
|
+
"export-env": Flags.boolean({ hidden: true })
|
|
41189
41653
|
};
|
|
41190
41654
|
async run() {
|
|
41191
41655
|
const { flags } = await this.parse(AgentSessionRegisterCommand);
|
|
@@ -41204,7 +41668,8 @@ var AgentSessionRegisterCommand = class AgentSessionRegisterCommand extends Comm
|
|
|
41204
41668
|
"--session",
|
|
41205
41669
|
input.sessionId,
|
|
41206
41670
|
...input.cwd ? ["--cwd", input.cwd] : [],
|
|
41207
|
-
"--quiet"
|
|
41671
|
+
"--quiet",
|
|
41672
|
+
...runtime === "claude" && process.env["CLAUDE_ENV_FILE"]?.trim() ? ["--export-env"] : []
|
|
41208
41673
|
],
|
|
41209
41674
|
env: {
|
|
41210
41675
|
...process.env,
|
|
@@ -41222,6 +41687,11 @@ var AgentSessionRegisterCommand = class AgentSessionRegisterCommand extends Comm
|
|
|
41222
41687
|
cwd: flags.cwd,
|
|
41223
41688
|
cliPath: process.argv[1] ?? ""
|
|
41224
41689
|
});
|
|
41690
|
+
if (flags["export-env"] && runtime === "claude" && result.session && result.profile && result.address && EXPORTABLE_STATUSES.has(result.status) && !result.receiverHeld && connectedProfilesForSession(this.config.configDir, result.session, result.profile).length === 0) exportSessionAgentEnv({
|
|
41691
|
+
configDir: this.config.configDir,
|
|
41692
|
+
profileName: result.profile,
|
|
41693
|
+
address: result.address
|
|
41694
|
+
});
|
|
41225
41695
|
const { status, ...rest } = result;
|
|
41226
41696
|
const identity = status === "registered" && result.profile ? identitySuggestions({
|
|
41227
41697
|
invocation: cliInvocation(process.argv[1]),
|
|
@@ -43122,6 +43592,17 @@ function deriveChatSubject(body) {
|
|
|
43122
43592
|
function isVerifiedDomain(domain) {
|
|
43123
43593
|
return domain.is_active === true;
|
|
43124
43594
|
}
|
|
43595
|
+
/**
|
|
43596
|
+
* A selected agent always sends as its own address. An explicit --from that
|
|
43597
|
+
* names any other address fails before anything is sent; the same address,
|
|
43598
|
+
* with or without a display name, is accepted.
|
|
43599
|
+
*/
|
|
43600
|
+
function assertAgentFromAddress(from, connectedAgent) {
|
|
43601
|
+
if (from === void 0 || !connectedAgent) return;
|
|
43602
|
+
const parsed = parseFromHeader(from);
|
|
43603
|
+
if (parsed.ok && parsed.value.address.toLowerCase() === connectedAgent.agentAddress.toLowerCase()) return;
|
|
43604
|
+
throw new Errors.CLIError(`--from ${from} is not this agent's address; omit --from to send as ${connectedAgent.agentAddress}.`, { exit: 1 });
|
|
43605
|
+
}
|
|
43125
43606
|
async function pickDefaultFromAddress(apiClient, authFailureContext) {
|
|
43126
43607
|
if (authFailureContext.auth.connectedAgent) return authFailureContext.auth.connectedAgent.agentAddress;
|
|
43127
43608
|
if (isConnectedChatCredential(authFailureContext.auth.apiKey)) throw new Errors.CLIError("Connected agents must pass --from with their connected email address.", { exit: 1 });
|
|
@@ -46139,6 +46620,12 @@ var EmailsAttachmentMembersCommand = class EmailsAttachmentMembersCommand extend
|
|
|
46139
46620
|
the path the listing reports. stdout then carries only its bytes,
|
|
46140
46621
|
unless --output names a file.
|
|
46141
46622
|
|
|
46623
|
+
The listing is JSON with or without --json; --json is accepted like on
|
|
46624
|
+
every other command, and with it a failure prints one JSON document on
|
|
46625
|
+
stdout (the error with exit_code) and nothing on stderr. --envelope
|
|
46626
|
+
prints the full response envelope instead of only the listing. Neither
|
|
46627
|
+
applies to a --member download, whose output is the file's bytes.
|
|
46628
|
+
|
|
46142
46629
|
The server refuses archives that are not zip or tar, that hold an
|
|
46143
46630
|
unsafe path (absolute, "..", backslashes and similar), or that exceed
|
|
46144
46631
|
its size, entry-count or compression-ratio limits. Each refusal exits 1
|
|
@@ -46147,7 +46634,8 @@ var EmailsAttachmentMembersCommand = class EmailsAttachmentMembersCommand extend
|
|
|
46147
46634
|
static examples = [
|
|
46148
46635
|
"<%= config.bin %> emails attachment-members <email-id> logs.zip",
|
|
46149
46636
|
"<%= config.bin %> emails attachment-members <email-id> 0 --member logs/run.txt --output run.txt",
|
|
46150
|
-
"<%= config.bin %> emails attachment-members <sent-email-id> bundle.tar.gz --sent"
|
|
46637
|
+
"<%= config.bin %> emails attachment-members <sent-email-id> bundle.tar.gz --sent",
|
|
46638
|
+
"<%= config.bin %> emails attachment-members <email-id> logs.zip --json"
|
|
46151
46639
|
];
|
|
46152
46640
|
static args = {
|
|
46153
46641
|
id: Args.string({
|
|
@@ -46161,7 +46649,15 @@ var EmailsAttachmentMembersCommand = class EmailsAttachmentMembersCommand extend
|
|
|
46161
46649
|
};
|
|
46162
46650
|
static flags = {
|
|
46163
46651
|
...sharedFlags,
|
|
46164
|
-
member: Flags.string({ description: "Download the file at this path inside the archive, as the listing reports it." })
|
|
46652
|
+
member: Flags.string({ description: "Download the file at this path inside the archive, as the listing reports it." }),
|
|
46653
|
+
json: Flags.boolean({
|
|
46654
|
+
description: "Print exactly one JSON document on stdout, on success and on failure, and nothing on stderr. On success it is the listing, as without --json (or the full envelope with --envelope); a failure prints the error with exit_code. Not for --member downloads or --output.",
|
|
46655
|
+
exclusive: ["member", "output"]
|
|
46656
|
+
}),
|
|
46657
|
+
envelope: Flags.boolean({
|
|
46658
|
+
description: "Print the full response envelope instead of only the listing. Not for --member downloads.",
|
|
46659
|
+
exclusive: ["member"]
|
|
46660
|
+
})
|
|
46165
46661
|
};
|
|
46166
46662
|
async run() {
|
|
46167
46663
|
const { args, flags } = await this.parse(EmailsAttachmentMembersCommand);
|
|
@@ -46203,7 +46699,8 @@ var EmailsAttachmentMembersCommand = class EmailsAttachmentMembersCommand extend
|
|
|
46203
46699
|
reportFailure(this, context, result.error);
|
|
46204
46700
|
return;
|
|
46205
46701
|
}
|
|
46206
|
-
const
|
|
46702
|
+
const envelope = result.data;
|
|
46703
|
+
const listing = flags.envelope ? envelope ?? null : envelope?.data;
|
|
46207
46704
|
const text = `${JSON.stringify(listing, null, 2)}\n`;
|
|
46208
46705
|
if (flags.output) writeFileSync(flags.output, text);
|
|
46209
46706
|
else process.stdout.write(text);
|
|
@@ -46985,7 +47482,7 @@ const ID_DISPLAY_WIDTH_FULL = 36;
|
|
|
46985
47482
|
const RECEIVED_DISPLAY_WIDTH = 19;
|
|
46986
47483
|
const AWAITING_DISPLAY_WIDTH = 8;
|
|
46987
47484
|
const REPLIES_DISPLAY_WIDTH = 7;
|
|
46988
|
-
function truncate$
|
|
47485
|
+
function truncate$3(value, width) {
|
|
46989
47486
|
if (value.length <= width) return value.padEnd(width);
|
|
46990
47487
|
return `${value.slice(0, width - 3)}...`;
|
|
46991
47488
|
}
|
|
@@ -47000,12 +47497,12 @@ function pickIdWidth(isTty) {
|
|
|
47000
47497
|
return isTty ? ID_DISPLAY_WIDTH_SHORT : ID_DISPLAY_WIDTH_FULL;
|
|
47001
47498
|
}
|
|
47002
47499
|
function formatRow$1(email, idWidth) {
|
|
47003
|
-
const id = truncate$
|
|
47500
|
+
const id = truncate$3(email.id.slice(0, idWidth), idWidth);
|
|
47004
47501
|
const received = formatReceivedAt(email.received_at);
|
|
47005
|
-
const from = truncate$
|
|
47006
|
-
const to = truncate$
|
|
47007
|
-
const subjectCol = truncate$
|
|
47008
|
-
return `${id} ${received} ${from} ${to} ${truncate$
|
|
47502
|
+
const from = truncate$3(email.sender ?? "", ADDRESS_DISPLAY_WIDTH);
|
|
47503
|
+
const to = truncate$3(email.recipient ?? "", ADDRESS_DISPLAY_WIDTH);
|
|
47504
|
+
const subjectCol = truncate$3((email.subject ?? "").replace(/\s+/g, " "), SUBJECT_DISPLAY_WIDTH);
|
|
47505
|
+
return `${id} ${received} ${from} ${to} ${truncate$3(formatAwaitingCell(email), AWAITING_DISPLAY_WIDTH)} ${truncate$3(formatRepliesCell(email), REPLIES_DISPLAY_WIDTH)} ${subjectCol}`;
|
|
47009
47506
|
}
|
|
47010
47507
|
function formatHeader$1(idWidth) {
|
|
47011
47508
|
return `${"ID".padEnd(idWidth)} ${"RECEIVED (UTC)".padEnd(RECEIVED_DISPLAY_WIDTH)} ${"FROM".padEnd(ADDRESS_DISPLAY_WIDTH)} ${"TO".padEnd(ADDRESS_DISPLAY_WIDTH)} ${"AWAITING".padEnd(AWAITING_DISPLAY_WIDTH)} ${"REPLIES".padEnd(REPLIES_DISPLAY_WIDTH)} SUBJECT`;
|
|
@@ -47162,7 +47659,9 @@ var EmailsWaitCommand = class EmailsWaitCommand extends Command {
|
|
|
47162
47659
|
the window. Matching requires the exact sent ID, receiving address, and an
|
|
47163
47660
|
authenticated peer. Interaction attachments and incomplete replies remain
|
|
47164
47661
|
pending for inspection. JSONL contains each matching email detail; --table
|
|
47165
|
-
prints compact rows.
|
|
47662
|
+
prints compact rows. --json prints the same JSONL and also reports a
|
|
47663
|
+
timeout or error as one final JSON line instead of text on stderr. A plain
|
|
47664
|
+
reply does not prove task completion.
|
|
47166
47665
|
|
|
47167
47666
|
Connected waits share an address event subscription and recover replies with
|
|
47168
47667
|
exact-parent search. They never scan inbox history. Additional content
|
|
@@ -47174,6 +47673,7 @@ var EmailsWaitCommand = class EmailsWaitCommand extends Command {
|
|
|
47174
47673
|
"<%= config.bin %> emails wait --to test@example.com",
|
|
47175
47674
|
"<%= config.bin %> emails wait --subject verify --number 5 --timeout 120",
|
|
47176
47675
|
"<%= config.bin %> emails wait --q 'domain:example.com' --table",
|
|
47676
|
+
"<%= config.bin %> emails wait --from peer@example.com --number 3 --json",
|
|
47177
47677
|
"<%= config.bin %> emails wait --awaiting you --include-existing",
|
|
47178
47678
|
"<%= config.bin %> emails wait --awaiting you --automated false"
|
|
47179
47679
|
];
|
|
@@ -47212,6 +47712,10 @@ var EmailsWaitCommand = class EmailsWaitCommand extends Command {
|
|
|
47212
47712
|
description: "Exit successfully after this many matching emails",
|
|
47213
47713
|
min: 1
|
|
47214
47714
|
}),
|
|
47715
|
+
json: Flags.boolean({
|
|
47716
|
+
description: "Print newline-delimited JSON: one object per matching email as it arrives (the same email summary as the default output, with id, sender, recipient, subject, received_at and thread_id among its fields). On a timeout or error, one last line is an object with error {code, message}, exit_code and, when there were any, warnings; a timeout adds matched, the number of emails printed, and uses code \"wait_timeout\". Nothing is written to stderr. Exit codes are unchanged.",
|
|
47717
|
+
exclusive: ["table"]
|
|
47718
|
+
}),
|
|
47215
47719
|
"page-size": Flags.integer({
|
|
47216
47720
|
default: 50,
|
|
47217
47721
|
description: `Emails to fetch per poll (1-100)`,
|
|
@@ -47224,7 +47728,10 @@ var EmailsWaitCommand = class EmailsWaitCommand extends Command {
|
|
|
47224
47728
|
"spam-score-gte": Flags.integer({ description: "Only match emails with spam score greater than or equal to this value" }),
|
|
47225
47729
|
"spam-score-lt": Flags.integer({ description: "Only match emails with spam score below this value" }),
|
|
47226
47730
|
subject: Flags.string({ description: "Full-text subject filter" }),
|
|
47227
|
-
table: Flags.boolean({
|
|
47731
|
+
table: Flags.boolean({
|
|
47732
|
+
description: "Print a human-readable table instead of JSONL",
|
|
47733
|
+
exclusive: ["json"]
|
|
47734
|
+
}),
|
|
47228
47735
|
timeout: Flags.integer({
|
|
47229
47736
|
default: DEFAULT_WAIT_TIMEOUT_SECONDS$2,
|
|
47230
47737
|
description: "Seconds to wait before exiting nonzero; 0 waits forever",
|
|
@@ -47232,7 +47739,18 @@ var EmailsWaitCommand = class EmailsWaitCommand extends Command {
|
|
|
47232
47739
|
}),
|
|
47233
47740
|
to: Flags.string({ description: "Recipient address or domain; connected waits derive it from the referenced send" })
|
|
47234
47741
|
};
|
|
47742
|
+
timedOut;
|
|
47235
47743
|
async run() {
|
|
47744
|
+
if (!jsonOutputRequested(this.argv)) return this.wait();
|
|
47745
|
+
await runStreamingJson(() => this.wait(), () => this.timedOut && {
|
|
47746
|
+
error: {
|
|
47747
|
+
code: "wait_timeout",
|
|
47748
|
+
message: this.timedOut.message
|
|
47749
|
+
},
|
|
47750
|
+
fields: { matched: this.timedOut.matched }
|
|
47751
|
+
});
|
|
47752
|
+
}
|
|
47753
|
+
async wait() {
|
|
47236
47754
|
const { flags } = await this.parse(EmailsWaitCommand);
|
|
47237
47755
|
const { apiClient, auth, baseUrlOverridden } = await createAuthenticatedCliApiClient({
|
|
47238
47756
|
apiKey: flags["api-key"],
|
|
@@ -47339,7 +47857,12 @@ var EmailsWaitCommand = class EmailsWaitCommand extends Command {
|
|
|
47339
47857
|
if (deadline !== null && Date.now() >= deadline) break;
|
|
47340
47858
|
await sleep$2(flags.interval * 1e3);
|
|
47341
47859
|
}
|
|
47342
|
-
|
|
47860
|
+
const message = `Timed out waiting for ${flags.number} matching email${flags.number === 1 ? "" : "s"}; received ${matched}.`;
|
|
47861
|
+
this.timedOut = {
|
|
47862
|
+
matched,
|
|
47863
|
+
message
|
|
47864
|
+
};
|
|
47865
|
+
process.stderr.write(`${message}\n`);
|
|
47343
47866
|
process.exitCode = 1;
|
|
47344
47867
|
}
|
|
47345
47868
|
};
|
|
@@ -48633,7 +49156,7 @@ const PRIMITIVE_TEAM_AUTHOR = {
|
|
|
48633
49156
|
url: "https://primitive.dev"
|
|
48634
49157
|
};
|
|
48635
49158
|
const SDK_VERSION_RANGE = "^2.0.0";
|
|
48636
|
-
const CLI_VERSION_RANGE = "^1.
|
|
49159
|
+
const CLI_VERSION_RANGE = "^1.72.0";
|
|
48637
49160
|
const ESBUILD_VERSION_RANGE = "^0.27.0";
|
|
48638
49161
|
function renderHandler() {
|
|
48639
49162
|
return `// env.PRIMITIVE_API_KEY, env.PRIMITIVE_WEBHOOK_SECRET, and
|
|
@@ -50471,7 +50994,7 @@ const INBOX_NEXT_EXIT_CODE_HELP = `Exit codes:
|
|
|
50471
50994
|
- 5: nothing awaits your reply (with --wait: still nothing when --timeout elapsed).`;
|
|
50472
50995
|
const SCAN_PAGE_SIZE = 100;
|
|
50473
50996
|
const DEFAULT_WAIT_TIMEOUT_SECONDS = 300;
|
|
50474
|
-
const MAX_LONG_POLL_SECONDS = 30;
|
|
50997
|
+
const MAX_LONG_POLL_SECONDS$1 = 30;
|
|
50475
50998
|
const EPOCH_CURSOR = "1970-01-01T00:00:00.000000Z|00000000-0000-4000-8000-000000000000";
|
|
50476
50999
|
/** An API call failed; carries the error payload for printing. */
|
|
50477
51000
|
var InboxNextApiError = class extends Error {
|
|
@@ -50484,7 +51007,7 @@ var InboxNextApiError = class extends Error {
|
|
|
50484
51007
|
this.name = "InboxNextApiError";
|
|
50485
51008
|
}
|
|
50486
51009
|
};
|
|
50487
|
-
function str(value) {
|
|
51010
|
+
function str$1(value) {
|
|
50488
51011
|
return typeof value === "string" && value !== "" ? value : null;
|
|
50489
51012
|
}
|
|
50490
51013
|
/** The server's verdict from a row, or null when it did not report one. */
|
|
@@ -50500,12 +51023,12 @@ function serverAutomated(row) {
|
|
|
50500
51023
|
function toInboxNextEmail(detail) {
|
|
50501
51024
|
return {
|
|
50502
51025
|
id: String(detail.id),
|
|
50503
|
-
thread_id: str(detail.thread_id),
|
|
50504
|
-
message_id: str(detail.message_id),
|
|
50505
|
-
received_at: str(detail.received_at),
|
|
50506
|
-
from: str(detail.from_header) ?? str(detail.from_email),
|
|
50507
|
-
from_email: str(detail.from_email),
|
|
50508
|
-
to: str(detail.recipient) ?? str(detail.to_email),
|
|
51026
|
+
thread_id: str$1(detail.thread_id),
|
|
51027
|
+
message_id: str$1(detail.message_id),
|
|
51028
|
+
received_at: str$1(detail.received_at),
|
|
51029
|
+
from: str$1(detail.from_header) ?? str$1(detail.from_email),
|
|
51030
|
+
from_email: str$1(detail.from_email),
|
|
51031
|
+
to: str$1(detail.recipient) ?? str$1(detail.to_email),
|
|
50509
51032
|
subject: typeof detail.subject === "string" ? detail.subject : null,
|
|
50510
51033
|
awaiting: detail.awaiting,
|
|
50511
51034
|
reply_count: detail.reply_count,
|
|
@@ -50650,7 +51173,7 @@ async function findNextAwaiting(params) {
|
|
|
50650
51173
|
for (const row of page.rows) {
|
|
50651
51174
|
if (row.awaiting !== "you") continue;
|
|
50652
51175
|
if (needsNoReply(row)) continue;
|
|
50653
|
-
const id = str(row.id);
|
|
51176
|
+
const id = str$1(row.id);
|
|
50654
51177
|
if (!id) continue;
|
|
50655
51178
|
const detailResult = await api.getEmail({
|
|
50656
51179
|
client: params.apiClient.client,
|
|
@@ -50735,8 +51258,8 @@ async function countAutomatedAwaiting(params) {
|
|
|
50735
51258
|
*/
|
|
50736
51259
|
async function baselineCursor(params) {
|
|
50737
51260
|
const newest = (await listPage(params.api ?? DEFAULT_API, params.apiClient, { limit: 1 })).rows[0];
|
|
50738
|
-
const createdAt = str(newest?.created_at);
|
|
50739
|
-
const id = str(newest?.id);
|
|
51261
|
+
const createdAt = str$1(newest?.created_at);
|
|
51262
|
+
const id = str$1(newest?.id);
|
|
50740
51263
|
return createdAt && id ? `${createdAt}|${id}` : EPOCH_CURSOR;
|
|
50741
51264
|
}
|
|
50742
51265
|
/**
|
|
@@ -50747,7 +51270,7 @@ async function waitForActivity(params) {
|
|
|
50747
51270
|
return (await listPage(params.api ?? DEFAULT_API, params.apiClient, {
|
|
50748
51271
|
limit: SCAN_PAGE_SIZE,
|
|
50749
51272
|
since: params.since,
|
|
50750
|
-
wait: Math.max(0, Math.min(MAX_LONG_POLL_SECONDS, params.seconds))
|
|
51273
|
+
wait: Math.max(0, Math.min(MAX_LONG_POLL_SECONDS$1, params.seconds))
|
|
50751
51274
|
})).cursor ?? params.since;
|
|
50752
51275
|
}
|
|
50753
51276
|
function toJson(result, bin) {
|
|
@@ -50970,7 +51493,7 @@ var InboxNextCommand = class InboxNextCommand extends Command {
|
|
|
50970
51493
|
await this.printResult(result, bin, flags, apiClient);
|
|
50971
51494
|
return;
|
|
50972
51495
|
}
|
|
50973
|
-
const remainingMs = deadline === null ? MAX_LONG_POLL_SECONDS * 1e3 : deadline - Date.now();
|
|
51496
|
+
const remainingMs = deadline === null ? MAX_LONG_POLL_SECONDS$1 * 1e3 : deadline - Date.now();
|
|
50974
51497
|
if (remainingMs <= 0) {
|
|
50975
51498
|
await this.printResult(result, bin, flags, apiClient);
|
|
50976
51499
|
return;
|
|
@@ -51057,7 +51580,7 @@ function formatInboxDate(value) {
|
|
|
51057
51580
|
const pad = (n) => String(n).padStart(2, "0");
|
|
51058
51581
|
return `${d.getUTCFullYear()}-${pad(d.getUTCMonth() + 1)}-${pad(d.getUTCDate())} ${pad(d.getUTCHours())}:${pad(d.getUTCMinutes())}:${pad(d.getUTCSeconds())} UTC`;
|
|
51059
51582
|
}
|
|
51060
|
-
function truncate$
|
|
51583
|
+
function truncate$2(value, width) {
|
|
51061
51584
|
if (value.length <= width) return value.padEnd(width);
|
|
51062
51585
|
return `${value.slice(0, width - 3)}...`;
|
|
51063
51586
|
}
|
|
@@ -51107,7 +51630,7 @@ function formatDomainHeader() {
|
|
|
51107
51630
|
}
|
|
51108
51631
|
function formatDomainRow(domain) {
|
|
51109
51632
|
return [
|
|
51110
|
-
truncate$
|
|
51633
|
+
truncate$2(domain.domain, DOMAIN_DISPLAY_WIDTH),
|
|
51111
51634
|
statusText(domain.status).padEnd(STATUS_DISPLAY_WIDTH),
|
|
51112
51635
|
yesNo(domain.receiving_ready).padEnd(BOOL_DISPLAY_WIDTH),
|
|
51113
51636
|
yesNo(domain.processing_ready).padEnd(BOOL_DISPLAY_WIDTH),
|
|
@@ -59892,6 +60415,76 @@ function resolveMessageBodies(input) {
|
|
|
59892
60415
|
};
|
|
59893
60416
|
}
|
|
59894
60417
|
//#endregion
|
|
60418
|
+
//#region src/oclif/send-options.ts
|
|
60419
|
+
/**
|
|
60420
|
+
* Options shared by `send` and `reply` that map straight onto request
|
|
60421
|
+
* fields: custom headers (`--header`) and, for `send`, a schedule time
|
|
60422
|
+
* (`--scheduled-at`). Only the shape is checked here. Which header names
|
|
60423
|
+
* are allowed, and how far ahead a send may be scheduled, are the
|
|
60424
|
+
* server's rules, and its `validation_error` says what to change.
|
|
60425
|
+
*/
|
|
60426
|
+
const HEADER_FLAG_DESCRIPTION = "Extra header to send, as `Name: value` or `Name=value`. Repeatable, once per name (names compare case-insensitively), at most 25. The server decides which names are allowed: Auto-Submitted, Precedence, X-Auto-Response-Suppress, or a custom X- name that is not credential-like and not in a reserved family; a refused name is a validation_error. Values are 1 to 200 printable ASCII characters. Custom headers are sent as spelled and are not DKIM-signed.";
|
|
60427
|
+
const HEADER_NAME = /^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$/;
|
|
60428
|
+
const HEADER_EXAMPLE = "--header \"X-Campaign-Id: spring-sale\"";
|
|
60429
|
+
function headerError(message) {
|
|
60430
|
+
return new Errors.CLIError(message, { exit: 2 });
|
|
60431
|
+
}
|
|
60432
|
+
/**
|
|
60433
|
+
* Parse repeated `--header` values into the request's `headers` object.
|
|
60434
|
+
* Each value is `Name: value` or `Name=value`, split at the first `:` or
|
|
60435
|
+
* `=` (a header name holds neither, so the value may). Returns undefined
|
|
60436
|
+
* when no header was passed.
|
|
60437
|
+
*/
|
|
60438
|
+
function parseHeaderFlags(values) {
|
|
60439
|
+
if (values === void 0 || values.length === 0) return void 0;
|
|
60440
|
+
const headers = {};
|
|
60441
|
+
const seen = /* @__PURE__ */ new Map();
|
|
60442
|
+
for (const entry of values) {
|
|
60443
|
+
const separator = entry.search(/[:=]/);
|
|
60444
|
+
if (separator === -1) throw headerError(`--header expects "Name: value" or "Name=value" (got ${JSON.stringify(entry)}). Example: ${HEADER_EXAMPLE}`);
|
|
60445
|
+
if (hasControlCharacter$1(entry)) throw headerError(`--header ${JSON.stringify(entry)} has a control character (such as a line break). Names and values are printable ASCII.`);
|
|
60446
|
+
const name = entry.slice(0, separator).trim();
|
|
60447
|
+
const value = entry.slice(separator + 1).trim();
|
|
60448
|
+
if (!HEADER_NAME.test(name)) throw headerError(`--header name ${JSON.stringify(name)} is not a header name: use letters and digits joined by single hyphens, such as X-Campaign-Id. Example: ${HEADER_EXAMPLE}`);
|
|
60449
|
+
if (value === "") throw headerError(`--header ${name} has no value. Example: ${HEADER_EXAMPLE}`);
|
|
60450
|
+
const key = name.toLowerCase();
|
|
60451
|
+
const earlier = seen.get(key);
|
|
60452
|
+
if (earlier !== void 0) throw headerError(earlier === name ? `--header ${name} is given more than once. Pass each header once.` : `--header ${earlier} and ${name} name the same header (names compare case-insensitively). Pass each header once.`);
|
|
60453
|
+
seen.set(key, name);
|
|
60454
|
+
headers[name] = value;
|
|
60455
|
+
}
|
|
60456
|
+
return headers;
|
|
60457
|
+
}
|
|
60458
|
+
/**
|
|
60459
|
+
* One readable line for a `validation_error` on a request that carried
|
|
60460
|
+
* custom headers or a schedule time, so the server's reason is not
|
|
60461
|
+
* buried in the JSON error. Null for any other error, or when the
|
|
60462
|
+
* request carried neither.
|
|
60463
|
+
*/
|
|
60464
|
+
function sendOptionsValidationHint(payload, sent) {
|
|
60465
|
+
if (sent.headers === void 0 && sent.scheduledAt === void 0) return null;
|
|
60466
|
+
if (extractErrorCode(payload) !== "validation_error") return null;
|
|
60467
|
+
const message = (payload && typeof payload === "object" && "error" in payload ? payload.error : payload)?.message;
|
|
60468
|
+
if (typeof message !== "string" || message.trim() === "") return null;
|
|
60469
|
+
const reason = message.trim();
|
|
60470
|
+
const advice = [];
|
|
60471
|
+
if (sent.headers !== void 0 && /header/i.test(reason)) advice.push("Check the --header names and values; --help lists which names are allowed.");
|
|
60472
|
+
if (sent.scheduledAt !== void 0 && /schedul/i.test(reason)) advice.push("--scheduled-at must be in the future and at most 30 days out.");
|
|
60473
|
+
return [`The API refused the request: ${reason}`, ...advice].join(" ");
|
|
60474
|
+
}
|
|
60475
|
+
const ISO_INSTANT_WITH_ZONE = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:\d{2})$/i;
|
|
60476
|
+
/** True for an ISO 8601 date and time with Z or a numeric UTC offset. */
|
|
60477
|
+
function isIsoInstantWithZone(value) {
|
|
60478
|
+
return ISO_INSTANT_WITH_ZONE.test(value) && !Number.isNaN(Date.parse(value));
|
|
60479
|
+
}
|
|
60480
|
+
const SCHEDULED_AT_FLAG_DESCRIPTION = "Send later instead of now: an ISO 8601 time with Z or a numeric UTC offset, such as 2026-10-09T17:00:00Z or 2026-10-09T13:00:00-04:00. The server requires it to be in the future and at most 30 days out. The send is recorded with status scheduled and goes out at that time; cancel it before then with `primitive sent cancel --id <id>` or `primitive sent cancel --idempotency-key <key>`. Cannot be combined with --wait, --wait-timeout-ms, --attachment, --fyi or --if-latest-message-id.";
|
|
60481
|
+
/** Validate `--scheduled-at` before any request. */
|
|
60482
|
+
function assertScheduledAt(value) {
|
|
60483
|
+
const trimmed = value.trim();
|
|
60484
|
+
if (!isIsoInstantWithZone(trimmed)) throw new Errors.CLIError("--scheduled-at must be an ISO 8601 time with a time zone, such as 2026-10-09T17:00:00Z or 2026-10-09T13:00:00-04:00.", { exit: 2 });
|
|
60485
|
+
return trimmed;
|
|
60486
|
+
}
|
|
60487
|
+
//#endregion
|
|
59895
60488
|
//#region src/oclif/thread-latest-inbound.ts
|
|
59896
60489
|
var ThreadResolutionError = class extends Error {};
|
|
59897
60490
|
/**
|
|
@@ -59999,7 +60592,8 @@ var ReplyCommand = class ReplyCommand extends Command {
|
|
|
59999
60592
|
"<%= config.bin %> reply --id <inbound-email-id> --from 'Support <support@example.com>' --body 'Thanks!'",
|
|
60000
60593
|
"<%= config.bin %> reply --thread <thread-id> --body 'Answering the latest message.'",
|
|
60001
60594
|
"<%= config.bin %> reply --id <inbound-email-id> --fyi --body 'Done, merged. No action needed.'",
|
|
60002
|
-
"<%= config.bin %> reply --id <inbound-email-id> --all --body 'Answering everyone on this email.'"
|
|
60595
|
+
"<%= config.bin %> reply --id <inbound-email-id> --all --body 'Answering everyone on this email.'",
|
|
60596
|
+
"<%= config.bin %> reply --id <inbound-email-id> --body 'Ticket updated.' --header 'X-Ticket-Id: 4821'"
|
|
60003
60597
|
];
|
|
60004
60598
|
static flags = {
|
|
60005
60599
|
"api-key": Flags.string({
|
|
@@ -60048,6 +60642,10 @@ var ReplyCommand = class ReplyCommand extends Command {
|
|
|
60048
60642
|
"if-latest-message-id": Flags.string({ description: "Send only if this message id is still the newest message in the thread, as your credential sees it (received or sent, in the order messages joined the thread). Otherwise nothing is sent and the command exits 1 with error code latest_message_mismatch and the current newest id in error.details.latest_message_id. Pass latest_message_id from `primitive emails conversation`. Cannot be combined with a repeat." }),
|
|
60049
60643
|
wait: Flags.boolean({ description: "Block until the receiving MTA returns an outcome. Without --wait, the call returns once Primitive has accepted the reply for delivery." }),
|
|
60050
60644
|
"idempotency-key": Flags.string({ description: IDEMPOTENCY_KEY_FLAG_DESCRIPTION }),
|
|
60645
|
+
header: Flags.string({
|
|
60646
|
+
description: HEADER_FLAG_DESCRIPTION,
|
|
60647
|
+
multiple: true
|
|
60648
|
+
}),
|
|
60051
60649
|
json: Flags.boolean({ description: "Emit one outcome envelope { outcome, exit_code, outcome_message, sent_email_id, idempotency_key, sent, http_status, error, follow_up_commands, prior_replies, prior_replies_check } on stdout for every outcome, including failures, with nothing on stderr. Without --json, stdout is the send record as before." }),
|
|
60052
60650
|
time: Flags.boolean({ description: TIME_FLAG_DESCRIPTION }),
|
|
60053
60651
|
...repeatFlags([
|
|
@@ -60101,6 +60699,7 @@ var ReplyCommand = class ReplyCommand extends Command {
|
|
|
60101
60699
|
});
|
|
60102
60700
|
if (bodies.kind === "error") throw new Errors.CLIError(bodies.message);
|
|
60103
60701
|
if (flags["idempotency-key"] !== void 0) this.idempotencyKey = assertValidIdempotencyKey(flags["idempotency-key"]);
|
|
60702
|
+
const customHeaders = parseHeaderFlags(flags.header);
|
|
60104
60703
|
await runWithTiming(flags.time, async () => {
|
|
60105
60704
|
const { apiClient, auth, baseUrlOverridden } = await createAuthenticatedCliApiClient({
|
|
60106
60705
|
apiKey: flags["api-key"],
|
|
@@ -60111,6 +60710,7 @@ var ReplyCommand = class ReplyCommand extends Command {
|
|
|
60111
60710
|
configDir: this.config.configDir,
|
|
60112
60711
|
connectedAgent: auth.connectedAgent
|
|
60113
60712
|
});
|
|
60713
|
+
assertAgentFromAddress(flags.from, auth.connectedAgent);
|
|
60114
60714
|
const attachments = readAttachmentFiles(flags.attachment);
|
|
60115
60715
|
const repeat = repeatFromFlags(flags);
|
|
60116
60716
|
const receivingSince = (/* @__PURE__ */ new Date()).toISOString();
|
|
@@ -60161,6 +60761,7 @@ var ReplyCommand = class ReplyCommand extends Command {
|
|
|
60161
60761
|
fyi: true,
|
|
60162
60762
|
...bodies.body !== void 0 ? { body_text: bodies.body.trimEnd() } : {},
|
|
60163
60763
|
...flags.from !== void 0 ? { from: flags.from } : {},
|
|
60764
|
+
...customHeaders !== void 0 ? { headers: customHeaders } : {},
|
|
60164
60765
|
in_reply_to_email_id: emailId,
|
|
60165
60766
|
...flags["if-latest-message-id"] !== void 0 ? { if_latest_message_id: flags["if-latest-message-id"] } : {}
|
|
60166
60767
|
} : {
|
|
@@ -60168,6 +60769,7 @@ var ReplyCommand = class ReplyCommand extends Command {
|
|
|
60168
60769
|
...flags.from !== void 0 ? { from: flags.from } : {},
|
|
60169
60770
|
...flags.all ? { reply_all: true } : {},
|
|
60170
60771
|
...repeat !== void 0 ? { repeat } : {},
|
|
60772
|
+
...customHeaders !== void 0 ? { headers: customHeaders } : {},
|
|
60171
60773
|
...flags["if-latest-message-id"] !== void 0 ? { if_latest_message_id: flags["if-latest-message-id"] } : {},
|
|
60172
60774
|
in_reply_to_email_id: emailId
|
|
60173
60775
|
});
|
|
@@ -60196,6 +60798,7 @@ var ReplyCommand = class ReplyCommand extends Command {
|
|
|
60196
60798
|
...flags.wait !== void 0 ? { wait: flags.wait } : {},
|
|
60197
60799
|
...flags.all ? { reply_all: true } : {},
|
|
60198
60800
|
...repeat !== void 0 ? { repeat } : {},
|
|
60801
|
+
...customHeaders !== void 0 ? { headers: customHeaders } : {},
|
|
60199
60802
|
...flags["if-latest-message-id"] !== void 0 ? { if_latest_message_id: flags["if-latest-message-id"] } : {}
|
|
60200
60803
|
};
|
|
60201
60804
|
const halted = await haltAutoWorking(this.config.configDir, {
|
|
@@ -60229,6 +60832,8 @@ var ReplyCommand = class ReplyCommand extends Command {
|
|
|
60229
60832
|
onApiError: (errorPayload) => {
|
|
60230
60833
|
writeErrorWithHints(errorPayload);
|
|
60231
60834
|
writeRepeatErrorHint(errorPayload);
|
|
60835
|
+
const optionsHint = sendOptionsValidationHint(errorPayload, { headers: customHeaders });
|
|
60836
|
+
if (optionsHint) process.stderr.write(`${optionsHint}\n`);
|
|
60232
60837
|
surfaceUnauthorizedHint({
|
|
60233
60838
|
auth,
|
|
60234
60839
|
baseUrlOverridden,
|
|
@@ -60726,7 +61331,7 @@ const SOURCE_WIDTH = 4;
|
|
|
60726
61331
|
const SUBJECT_WIDTH = 40;
|
|
60727
61332
|
const FROM_WIDTH = 26;
|
|
60728
61333
|
const SNIPPET_WIDTH = 60;
|
|
60729
|
-
function truncate(value, width) {
|
|
61334
|
+
function truncate$1(value, width) {
|
|
60730
61335
|
if (value.length <= width) return value.padEnd(width);
|
|
60731
61336
|
return `${value.slice(0, width - 3)}...`;
|
|
60732
61337
|
}
|
|
@@ -60734,7 +61339,7 @@ function sourceLabel(t) {
|
|
|
60734
61339
|
return t === "inbound_email" ? "in" : "out";
|
|
60735
61340
|
}
|
|
60736
61341
|
function formatRow(r) {
|
|
60737
|
-
return `${r.score.toFixed(3).padStart(SCORE_WIDTH)} ${sourceLabel(r.source_type).padEnd(SOURCE_WIDTH)} ${truncate((r.subject ?? "").replace(/\s+/g, " "), SUBJECT_WIDTH)} ${truncate(r.from ?? "", FROM_WIDTH)} ${truncate((r.snippets[0]?.text ?? "").replace(/\s+/g, " "), SNIPPET_WIDTH)}`;
|
|
61342
|
+
return `${r.score.toFixed(3).padStart(SCORE_WIDTH)} ${sourceLabel(r.source_type).padEnd(SOURCE_WIDTH)} ${truncate$1((r.subject ?? "").replace(/\s+/g, " "), SUBJECT_WIDTH)} ${truncate$1(r.from ?? "", FROM_WIDTH)} ${truncate$1((r.snippets[0]?.text ?? "").replace(/\s+/g, " "), SNIPPET_WIDTH)}`;
|
|
60738
61343
|
}
|
|
60739
61344
|
function formatHeader() {
|
|
60740
61345
|
return `${"SCORE".padStart(SCORE_WIDTH)} ${"SRC".padEnd(SOURCE_WIDTH)} ${"SUBJECT".padEnd(SUBJECT_WIDTH)} ${"FROM".padEnd(FROM_WIDTH)} EXCERPT`;
|
|
@@ -61132,6 +61737,11 @@ var SendCommand = class SendCommand extends Command {
|
|
|
61132
61737
|
--from defaults to agent@<your-first-verified-outbound-domain> when omitted.
|
|
61133
61738
|
--subject defaults to the first line of the body when omitted.
|
|
61134
61739
|
--attachment attaches a file; repeat it to attach multiple files.
|
|
61740
|
+
--header adds a custom header such as "X-Campaign-Id: spring-sale";
|
|
61741
|
+
repeat it for more. The server decides which names are allowed.
|
|
61742
|
+
--scheduled-at sends at a later time instead of now. The summary
|
|
61743
|
+
then says the message is scheduled and how to cancel it with
|
|
61744
|
+
\`primitive sent cancel\`.
|
|
61135
61745
|
--fyi (with --in-reply-to) sends an informational acknowledgement of
|
|
61136
61746
|
that message that receivers do not wake for. To answer an inbound
|
|
61137
61747
|
email you received, prefer \`primitive reply --id <id> --fyi\`.
|
|
@@ -61159,6 +61769,8 @@ var SendCommand = class SendCommand extends Command {
|
|
|
61159
61769
|
"<%= config.bin %> send --to alice@example.com --html '<p>Hello!</p>'",
|
|
61160
61770
|
"<%= config.bin %> send --to alice@example.com --cc bob@example.com --bcc audit@example.com --body 'Loop bob in; audit copy stays hidden.'",
|
|
61161
61771
|
"<%= config.bin %> send --to alice@example.com --body 'Confirmed' --wait",
|
|
61772
|
+
"<%= config.bin %> send --to alice@example.com --body 'Spring sale' --header 'X-Campaign-Id: spring-sale' --header 'Auto-Submitted: auto-generated'",
|
|
61773
|
+
"<%= config.bin %> send --to alice@example.com --body 'Reminder: standup' --scheduled-at 2026-10-09T17:00:00Z --idempotency-key standup-2026-10-09",
|
|
61162
61774
|
"<%= config.bin %> send --to alice@example.com --in-reply-to '<parent@example.com>' --fyi --body 'Deployed. No action needed.'",
|
|
61163
61775
|
"<%= config.bin %> send --to inbox@your-managed-domain.primitive.email --body 'self-loop smoke test' --wait # any *.primitive.email address routes back to the sending account; useful for proving outbound + inbound work end-to-end"
|
|
61164
61776
|
];
|
|
@@ -61217,6 +61829,20 @@ var SendCommand = class SendCommand extends Command {
|
|
|
61217
61829
|
min: 1
|
|
61218
61830
|
}),
|
|
61219
61831
|
"idempotency-key": Flags.string({ description: IDEMPOTENCY_KEY_FLAG_DESCRIPTION }),
|
|
61832
|
+
header: Flags.string({
|
|
61833
|
+
description: HEADER_FLAG_DESCRIPTION,
|
|
61834
|
+
multiple: true
|
|
61835
|
+
}),
|
|
61836
|
+
"scheduled-at": Flags.string({
|
|
61837
|
+
description: SCHEDULED_AT_FLAG_DESCRIPTION,
|
|
61838
|
+
exclusive: [
|
|
61839
|
+
"wait",
|
|
61840
|
+
"wait-timeout-ms",
|
|
61841
|
+
"attachment",
|
|
61842
|
+
"fyi",
|
|
61843
|
+
"if-latest-message-id"
|
|
61844
|
+
]
|
|
61845
|
+
}),
|
|
61220
61846
|
json: Flags.boolean({ description: "Emit one outcome envelope { outcome, exit_code, outcome_message, sent_email_id, idempotency_key, sent, http_status, error, follow_up_commands } on stdout for every outcome, including failures, with nothing on stderr. Without --json, stdout is the send record as before." }),
|
|
61221
61847
|
time: Flags.boolean({ description: TIME_FLAG_DESCRIPTION }),
|
|
61222
61848
|
...repeatFlags([
|
|
@@ -61266,6 +61892,8 @@ var SendCommand = class SendCommand extends Command {
|
|
|
61266
61892
|
});
|
|
61267
61893
|
if (bodies.kind === "error") throw new Errors.CLIError(bodies.message);
|
|
61268
61894
|
if (flags["idempotency-key"] !== void 0) this.idempotencyKey = assertValidIdempotencyKey(flags["idempotency-key"]);
|
|
61895
|
+
const customHeaders = parseHeaderFlags(flags.header);
|
|
61896
|
+
const scheduledAt = flags["scheduled-at"] === void 0 ? void 0 : assertScheduledAt(flags["scheduled-at"]);
|
|
61269
61897
|
const attachments = readAttachmentFiles(flags.attachment);
|
|
61270
61898
|
const repeat = repeatFromFlags(flags);
|
|
61271
61899
|
await runWithTiming(flags.time, async () => {
|
|
@@ -61283,6 +61911,7 @@ var SendCommand = class SendCommand extends Command {
|
|
|
61283
61911
|
baseUrlOverridden,
|
|
61284
61912
|
configDir: this.config.configDir
|
|
61285
61913
|
};
|
|
61914
|
+
assertAgentFromAddress(flags.from, auth.connectedAgent);
|
|
61286
61915
|
const from = flags.from ?? await pickDefaultFromAddress(apiClient, authFailureContext);
|
|
61287
61916
|
const subject = flags.subject ?? (bodies.body ? deriveSubject(bodies.body) : flags.fyi ? "Re: Your message" : "Message");
|
|
61288
61917
|
const plainContent = {
|
|
@@ -61295,7 +61924,8 @@ var SendCommand = class SendCommand extends Command {
|
|
|
61295
61924
|
to: flags.to,
|
|
61296
61925
|
...flags.cc !== void 0 ? { cc: flags.cc } : {},
|
|
61297
61926
|
...flags.bcc !== void 0 ? { bcc: flags.bcc } : {},
|
|
61298
|
-
subject
|
|
61927
|
+
subject,
|
|
61928
|
+
...customHeaders !== void 0 ? { headers: customHeaders } : {}
|
|
61299
61929
|
};
|
|
61300
61930
|
const requestedWait = flags["wait-timeout-ms"];
|
|
61301
61931
|
const waitTimeoutMs = requestedWait === void 0 ? void 0 : Math.min(requestedWait, MAX_SEND_WAIT_TIMEOUT_MS);
|
|
@@ -61306,7 +61936,8 @@ var SendCommand = class SendCommand extends Command {
|
|
|
61306
61936
|
...flags["if-latest-message-id"] !== void 0 ? { if_latest_message_id: flags["if-latest-message-id"] } : {},
|
|
61307
61937
|
...flags.wait !== void 0 ? { wait: flags.wait } : {},
|
|
61308
61938
|
...waitTimeoutMs !== void 0 ? { wait_timeout_ms: waitTimeoutMs } : {},
|
|
61309
|
-
...repeat !== void 0 ? { repeat } : {}
|
|
61939
|
+
...repeat !== void 0 ? { repeat } : {},
|
|
61940
|
+
...scheduledAt !== void 0 ? { scheduled_at: scheduledAt } : {}
|
|
61310
61941
|
};
|
|
61311
61942
|
const idempotencyKey = this.idempotencyKey ?? deriveSendIdempotencyKey("send", flags.fyi ? {
|
|
61312
61943
|
...envelope,
|
|
@@ -61337,10 +61968,13 @@ var SendCommand = class SendCommand extends Command {
|
|
|
61337
61968
|
...content,
|
|
61338
61969
|
...threading
|
|
61339
61970
|
};
|
|
61340
|
-
const halted = await haltAutoWorking(this.config.configDir, {
|
|
61971
|
+
const halted = scheduledAt === void 0 ? await haltAutoWorking(this.config.configDir, {
|
|
61341
61972
|
peers: [flags.to],
|
|
61342
61973
|
profileName: auth.connectedAgent?.profileName
|
|
61343
|
-
}, flags.fyi ? "fyi" : "reply")
|
|
61974
|
+
}, flags.fyi ? "fyi" : "reply") : {
|
|
61975
|
+
configDir: this.config.configDir,
|
|
61976
|
+
stops: []
|
|
61977
|
+
};
|
|
61344
61978
|
const attemptStartedAtIso = (/* @__PURE__ */ new Date()).toISOString();
|
|
61345
61979
|
this.attemptStartedAtIso = attemptStartedAtIso;
|
|
61346
61980
|
this.sendRequestStarted = true;
|
|
@@ -61361,6 +61995,11 @@ var SendCommand = class SendCommand extends Command {
|
|
|
61361
61995
|
onApiError: (errorPayload) => {
|
|
61362
61996
|
writeErrorWithHints(errorPayload);
|
|
61363
61997
|
writeRepeatErrorHint(errorPayload);
|
|
61998
|
+
const optionsHint = sendOptionsValidationHint(errorPayload, {
|
|
61999
|
+
headers: customHeaders,
|
|
62000
|
+
scheduledAt
|
|
62001
|
+
});
|
|
62002
|
+
if (optionsHint) process.stderr.write(`${optionsHint}\n`);
|
|
61364
62003
|
surfaceUnauthorizedHint({
|
|
61365
62004
|
...authFailureContext,
|
|
61366
62005
|
payload: errorPayload
|
|
@@ -61391,7 +62030,6 @@ function formatCanceledSend(send) {
|
|
|
61391
62030
|
if (send.client_idempotency_key) parts.push(`Idempotency-Key ${send.client_idempotency_key} is free to use again.`);
|
|
61392
62031
|
return parts.join(" ");
|
|
61393
62032
|
}
|
|
61394
|
-
const ISO_INSTANT_WITH_ZONE = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:\d{2})$/i;
|
|
61395
62033
|
var SentCancelCommand = class SentCancelCommand extends Command {
|
|
61396
62034
|
static summary = "Cancel a scheduled send";
|
|
61397
62035
|
static description = "Cancel a send that is still scheduled, by its id or by the Idempotency-Key you sent it with. Nothing is sent, the record is kept with status `canceled`, and the key is released so it can schedule a new send. A send the scheduler has already picked up, or one already sent, canceled or failed, cannot be canceled and the command exits 1 with its current status. A connected agent can cancel only its own sends.";
|
|
@@ -61427,7 +62065,7 @@ var SentCancelCommand = class SentCancelCommand extends Command {
|
|
|
61427
62065
|
const key = flags["idempotency-key"]?.trim();
|
|
61428
62066
|
if (key !== void 0 && key.length === 0) this.error("--idempotency-key must not be empty.", { exit: 2 });
|
|
61429
62067
|
const createdBefore = flags["created-before"];
|
|
61430
|
-
if (createdBefore !== void 0 &&
|
|
62068
|
+
if (createdBefore !== void 0 && !isIsoInstantWithZone(createdBefore)) this.error("--created-before must be an ISO 8601 time with a time zone, such as 2026-10-20T14:00:00Z.", { exit: 2 });
|
|
61431
62069
|
const { apiClient, auth, baseUrlOverridden } = await createAuthenticatedCliApiClient({
|
|
61432
62070
|
apiKey: flags["api-key"],
|
|
61433
62071
|
apiBaseUrl: flags["api-base-url"],
|
|
@@ -62235,6 +62873,609 @@ var ThreadsMutedCommand = class ThreadsMutedCommand extends Command {
|
|
|
62235
62873
|
}
|
|
62236
62874
|
};
|
|
62237
62875
|
//#endregion
|
|
62876
|
+
//#region src/oclif/verification-extract.ts
|
|
62877
|
+
const CODE_KEYWORD = /\b(?:verification|verify|verifying|one[- ]?time|otp|passcode|pass code|security code|login code|log[- ]?in code|sign[- ]?in code|access code|auth(?:entication)? code|confirmation code|confirm|code|pin|2fa|two[- ]factor|launch code)\b/i;
|
|
62878
|
+
const NOT_A_CODE = /\b(?:order|invoice|receipt|total|subtotal|amount|price|paid|charged|phone|tel|call|fax|mobile|ref|reference|ticket|case|account|acct|customer|member|zip|postal|suite|ste|po box|tracking|transaction|txn|item|sku|qty|quantity|street|st|ave|avenue|blvd|road|rd|floor)\b|[#$€£¥]/i;
|
|
62879
|
+
const NON_CODE_PHRASES = /\b(?:zip|postal|post|area|promo(?:tional)?|discount|coupon|country|dial(?:ing)?|tracking|sort|bank|swift|product|source|referral|gift)\s+codes?\b/gi;
|
|
62880
|
+
function lastMatchIndex(regex, text) {
|
|
62881
|
+
const global = new RegExp(regex.source, "gi");
|
|
62882
|
+
let last = -1;
|
|
62883
|
+
for (const match of text.matchAll(global)) last = match.index ?? last;
|
|
62884
|
+
return last;
|
|
62885
|
+
}
|
|
62886
|
+
const DURATION_AFTER = /^\s?(?:s|secs?|seconds?|mins?|minutes?|h|hrs?|hours?|days?)\b/i;
|
|
62887
|
+
const DURATION_GLOBAL = /\b\d+\s?(?:s|secs?|seconds?|mins?|minutes?|h|hrs?|hours?|days?)\b/gi;
|
|
62888
|
+
const CURRENCY_AFTER = /^\s?(?:usd|eur|gbp|cad|aud|dollars|euros)\b/i;
|
|
62889
|
+
const PHONE = /(?:\+?\d{1,3}[\s.-])?(?:\(\d{2,4}\)\s?|\d{3}[\s.-])\d{3}[\s.-]\d{4}\b/g;
|
|
62890
|
+
const URL_IN_TEXT = /\b(?:https?:\/\/|www\.)[^\s<>"']+/gi;
|
|
62891
|
+
const EMAIL_ADDRESS = /[\w.+-]+@[\w-]+(?:\.[\w-]+)+/g;
|
|
62892
|
+
const CODE_PATTERNS = [
|
|
62893
|
+
{
|
|
62894
|
+
form: "spaced-digits",
|
|
62895
|
+
regex: /(?<![\w])\d(?: \d){3,7}(?![\w]| \d)/g
|
|
62896
|
+
},
|
|
62897
|
+
{
|
|
62898
|
+
form: "split-digits",
|
|
62899
|
+
regex: /(?<![\w$€£¥#@/]|\d[.,]|\d[ -])\d{3,4}[ -]\d{3,4}(?![\w%]|[.,]\d|[ -]\d)/g
|
|
62900
|
+
},
|
|
62901
|
+
{
|
|
62902
|
+
form: "digits",
|
|
62903
|
+
regex: /(?<![\w$€£¥#@/]|\d[.,]|\d-)\d{4,8}(?![\w%]|[.,]\d|-\d)/g
|
|
62904
|
+
},
|
|
62905
|
+
{
|
|
62906
|
+
form: "alnum",
|
|
62907
|
+
regex: /(?<![\w#@/.-])(?=[A-Z0-9]*\d)(?=[A-Z0-9]*[A-Z])[A-Z0-9]{5,10}(?![\w/-])/g
|
|
62908
|
+
},
|
|
62909
|
+
{
|
|
62910
|
+
form: "dashed",
|
|
62911
|
+
regex: /(?<![\w#@/.-])[A-Z0-9]{3,4}-[A-Z0-9]{3,4}(?![\w/]|-[A-Z0-9])/g
|
|
62912
|
+
}
|
|
62913
|
+
];
|
|
62914
|
+
function blank(match) {
|
|
62915
|
+
return match.replace(/[^\n]/g, " ");
|
|
62916
|
+
}
|
|
62917
|
+
/** Normalised lines the code scan reads: subject first, then the body. */
|
|
62918
|
+
function codeLines(subject, body) {
|
|
62919
|
+
return `${subject ?? ""}\n\n${body}`.replace(/\r\n?/g, "\n").replace(NON_CODE_PHRASES, (match) => "#".repeat(match.length)).replace(/[ \t]/g, " ").replace(URL_IN_TEXT, blank).replace(EMAIL_ADDRESS, blank).replace(PHONE, blank).split("\n");
|
|
62920
|
+
}
|
|
62921
|
+
function previousContent(lines, index, count) {
|
|
62922
|
+
const out = [];
|
|
62923
|
+
for (let i = index - 1; i >= 0 && out.length < count; i--) if (lines[i].trim() !== "") out.push(lines[i]);
|
|
62924
|
+
return out;
|
|
62925
|
+
}
|
|
62926
|
+
const NEXT_LINE_LABEL = /^\s*(?:is|was|[-:=(])?\s*(?:your|the|this)?\b.{0,30}?\b(?:code|passcode|otp|pin)\b/i;
|
|
62927
|
+
/** The next line labels the code above it and supplies no code of its own. */
|
|
62928
|
+
function isLabelBelow(line) {
|
|
62929
|
+
return line !== null && NEXT_LINE_LABEL.test(line) && !/\d{4,}|\b(?=[A-Z0-9-]*\d)[A-Z0-9][A-Z0-9-]{3,}\b/.test(line.replace(DURATION_GLOBAL, " "));
|
|
62930
|
+
}
|
|
62931
|
+
function nextContent(lines, index) {
|
|
62932
|
+
for (let i = index + 1; i < lines.length; i++) if (lines[i].trim() !== "") return lines[i];
|
|
62933
|
+
return null;
|
|
62934
|
+
}
|
|
62935
|
+
function scoreCode(candidate, lines, mentionsCode) {
|
|
62936
|
+
const line = lines[candidate.line];
|
|
62937
|
+
const before = line.slice(0, candidate.start);
|
|
62938
|
+
const near30 = before.slice(-30);
|
|
62939
|
+
const after = line.slice(candidate.end);
|
|
62940
|
+
const near = before.slice(-40);
|
|
62941
|
+
let score = 0;
|
|
62942
|
+
if (CODE_KEYWORD.test(near)) score += 12;
|
|
62943
|
+
else if (CODE_KEYWORD.test(before)) score += 8;
|
|
62944
|
+
else if (CODE_KEYWORD.test(after.slice(0, 40))) score += 10;
|
|
62945
|
+
else if (previousContent(lines, candidate.line, 2).some((l) => CODE_KEYWORD.test(l))) score += 7;
|
|
62946
|
+
else if (after.trim() === "" && isLabelBelow(nextContent(lines, candidate.line))) score += 7;
|
|
62947
|
+
else return null;
|
|
62948
|
+
if (mentionsCode) score += 2;
|
|
62949
|
+
if (line.trim() === candidate.raw) score += 4;
|
|
62950
|
+
const digits = candidate.value.replace(/\D/g, "").length;
|
|
62951
|
+
if (candidate.form === "digits" || candidate.form === "split-digits") score += digits === 6 ? 3 : 1;
|
|
62952
|
+
else if (candidate.form === "spaced-digits") score += digits === 6 ? 2 : 0;
|
|
62953
|
+
else if (candidate.form === "alnum") score += 1;
|
|
62954
|
+
const negative = lastMatchIndex(NOT_A_CODE, near30);
|
|
62955
|
+
if (negative >= 0 && negative > lastMatchIndex(CODE_KEYWORD, near30)) score -= 15;
|
|
62956
|
+
if (CURRENCY_AFTER.test(after)) score -= 15;
|
|
62957
|
+
if (DURATION_AFTER.test(after)) score -= 15;
|
|
62958
|
+
if (candidate.form === "digits" && /^(?:19|20)\d\d$/.test(candidate.value)) score -= 6;
|
|
62959
|
+
if (candidate.form === "dashed" && !/\d/.test(candidate.value) && score < 12) score -= 10;
|
|
62960
|
+
return score;
|
|
62961
|
+
}
|
|
62962
|
+
function dropContained(candidates) {
|
|
62963
|
+
return candidates.filter((c) => !candidates.some((other) => other !== c && other.line === c.line && other.start <= c.start && other.end >= c.end && other.end - other.start > c.end - c.start));
|
|
62964
|
+
}
|
|
62965
|
+
/** Below this, a candidate has no keyword evidence and is not reported. */
|
|
62966
|
+
const MIN_CODE_SCORE = 8;
|
|
62967
|
+
/**
|
|
62968
|
+
* The verification or one-time code in an email, with spaces and dashes
|
|
62969
|
+
* between groups removed ("123 456" -> "123456"), or null when none is found.
|
|
62970
|
+
*/
|
|
62971
|
+
function extractVerificationCode(email) {
|
|
62972
|
+
const fromText = email.text?.trim() ? codeInBody(email.subject, email.text) : null;
|
|
62973
|
+
if (fromText !== null) return fromText;
|
|
62974
|
+
return codeInBody(email.subject, email.html?.trim() ? htmlToText(email.html) : "");
|
|
62975
|
+
}
|
|
62976
|
+
function codeInBody(subject, body) {
|
|
62977
|
+
const lines = codeLines(subject, body);
|
|
62978
|
+
const mentionsCode = lines.some((line) => CODE_KEYWORD.test(line));
|
|
62979
|
+
const found = [];
|
|
62980
|
+
lines.forEach((line, index) => {
|
|
62981
|
+
for (const { form, regex } of CODE_PATTERNS) for (const match of line.matchAll(regex)) {
|
|
62982
|
+
const start = match.index ?? 0;
|
|
62983
|
+
const raw = match[0];
|
|
62984
|
+
const value = raw.replace(/[ -]/g, "");
|
|
62985
|
+
if (value.length < 4 || value.length > 10) continue;
|
|
62986
|
+
found.push({
|
|
62987
|
+
value,
|
|
62988
|
+
raw,
|
|
62989
|
+
form,
|
|
62990
|
+
line: index,
|
|
62991
|
+
start,
|
|
62992
|
+
end: start + raw.length,
|
|
62993
|
+
score: 0
|
|
62994
|
+
});
|
|
62995
|
+
}
|
|
62996
|
+
});
|
|
62997
|
+
let best = null;
|
|
62998
|
+
for (const candidate of dropContained(found)) {
|
|
62999
|
+
const score = scoreCode(candidate, lines, mentionsCode);
|
|
63000
|
+
if (score === null) continue;
|
|
63001
|
+
candidate.score = score;
|
|
63002
|
+
if (candidate.score >= MIN_CODE_SCORE && (best === null || candidate.score > best.score)) best = candidate;
|
|
63003
|
+
}
|
|
63004
|
+
return best?.value ?? null;
|
|
63005
|
+
}
|
|
63006
|
+
const ANCHOR = /<a\b[^>]*?\shref\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>"']+))[^>]*>([\s\S]*?)<\/a\s*>/gi;
|
|
63007
|
+
const HREF_ENTITIES = {
|
|
63008
|
+
"&": "&",
|
|
63009
|
+
"&": "&",
|
|
63010
|
+
"&": "&",
|
|
63011
|
+
""": "\"",
|
|
63012
|
+
""": "\"",
|
|
63013
|
+
""": "\"",
|
|
63014
|
+
"'": "'",
|
|
63015
|
+
"'": "'",
|
|
63016
|
+
"'": "'"
|
|
63017
|
+
};
|
|
63018
|
+
/** Decode the entities an href carries, in one pass so none is decoded twice. */
|
|
63019
|
+
function decodeHref(value) {
|
|
63020
|
+
return value.trim().replace(/&(?:amp|quot|apos|#0*(?:38|34|39)|#x0*(?:26|22|27));/gi, (match) => {
|
|
63021
|
+
const key = match.toLowerCase().replace(/^&#(x?)0+/, "&#$1");
|
|
63022
|
+
return HREF_ENTITIES[key] ?? match;
|
|
63023
|
+
});
|
|
63024
|
+
}
|
|
63025
|
+
function anchorLabel(html) {
|
|
63026
|
+
return htmlToText(html).replace(/\s+/g, " ").trim();
|
|
63027
|
+
}
|
|
63028
|
+
function trimUrl(url) {
|
|
63029
|
+
return url.replace(/[).,;:!?'"\]>]+$/, "");
|
|
63030
|
+
}
|
|
63031
|
+
function linkCandidates(email) {
|
|
63032
|
+
const out = [];
|
|
63033
|
+
if (email.html?.trim()) for (const match of email.html.matchAll(ANCHOR)) {
|
|
63034
|
+
const href = decodeHref(match[1] ?? match[2] ?? match[3] ?? "");
|
|
63035
|
+
out.push({
|
|
63036
|
+
url: href,
|
|
63037
|
+
label: anchorLabel(match[4] ?? "")
|
|
63038
|
+
});
|
|
63039
|
+
}
|
|
63040
|
+
if (email.text?.trim()) {
|
|
63041
|
+
const lines = email.text.replace(/\r\n?/g, "\n").split("\n");
|
|
63042
|
+
lines.forEach((line, index) => {
|
|
63043
|
+
for (const match of line.matchAll(/\bhttps?:\/\/[^\s<>"']+/gi)) {
|
|
63044
|
+
const url = trimUrl(match[0]);
|
|
63045
|
+
const label = [line.replace(match[0], " "), ...previousContent(lines, index, 1)].join(" ").replace(/\s+/g, " ").trim();
|
|
63046
|
+
out.push({
|
|
63047
|
+
url,
|
|
63048
|
+
label
|
|
63049
|
+
});
|
|
63050
|
+
}
|
|
63051
|
+
});
|
|
63052
|
+
}
|
|
63053
|
+
return out;
|
|
63054
|
+
}
|
|
63055
|
+
const TRACKING_KEYS = [
|
|
63056
|
+
"url",
|
|
63057
|
+
"u",
|
|
63058
|
+
"q",
|
|
63059
|
+
"target",
|
|
63060
|
+
"redirect",
|
|
63061
|
+
"redirect_url",
|
|
63062
|
+
"dest",
|
|
63063
|
+
"destination",
|
|
63064
|
+
"link",
|
|
63065
|
+
"r"
|
|
63066
|
+
];
|
|
63067
|
+
const TRACKING_HOST = /(?:^|\.)(?:click|clicks|track|tracking|trk|links?|email|e|ct|t)\.|safelinks\.protection\.outlook\.com$|urldefense\.|sendgrid\.net$|mailgun\.|mandrillapp\.com$|list-manage\.com$|hubspotlinks\.com$|awstrack\.me$|mjt\.lu$|^(?:www\.)?google\.com$/i;
|
|
63068
|
+
const TRACKING_PATH = /(?:^|\/)(?:c|cl|l|r|t|click|clicks|track|redirect|url)\/?$/i;
|
|
63069
|
+
/**
|
|
63070
|
+
* The destination of an obvious click-tracking redirect whose target is
|
|
63071
|
+
* embedded whole as a query parameter; otherwise the URL unchanged.
|
|
63072
|
+
*/
|
|
63073
|
+
function unwrapTrackingRedirect(url) {
|
|
63074
|
+
let parsed;
|
|
63075
|
+
try {
|
|
63076
|
+
parsed = new URL(url);
|
|
63077
|
+
} catch {
|
|
63078
|
+
return url;
|
|
63079
|
+
}
|
|
63080
|
+
if (!TRACKING_HOST.test(parsed.hostname) && !TRACKING_PATH.test(parsed.pathname)) return url;
|
|
63081
|
+
for (const key of TRACKING_KEYS) {
|
|
63082
|
+
const value = parsed.searchParams.get(key);
|
|
63083
|
+
if (value && /^https?:\/\/[^\s]+$/i.test(value)) try {
|
|
63084
|
+
new URL(value);
|
|
63085
|
+
return value;
|
|
63086
|
+
} catch {
|
|
63087
|
+
return url;
|
|
63088
|
+
}
|
|
63089
|
+
}
|
|
63090
|
+
return url;
|
|
63091
|
+
}
|
|
63092
|
+
const SKIP_TOKENS = /* @__PURE__ */ new Set([
|
|
63093
|
+
"unsubscribe",
|
|
63094
|
+
"unsub",
|
|
63095
|
+
"optout",
|
|
63096
|
+
"preferences",
|
|
63097
|
+
"privacy",
|
|
63098
|
+
"terms",
|
|
63099
|
+
"legal",
|
|
63100
|
+
"help",
|
|
63101
|
+
"support",
|
|
63102
|
+
"faq",
|
|
63103
|
+
"feedback",
|
|
63104
|
+
"policy",
|
|
63105
|
+
"cookies",
|
|
63106
|
+
"abuse"
|
|
63107
|
+
]);
|
|
63108
|
+
const SKIP_LABEL = /\b(?:opt[- ]out|manage (?:your )?(?:preferences|notifications|subscriptions|email settings)|view (?:this (?:email|message) )?(?:in (?:your |a )?browser|online)|web version|contact us|report (?:this|abuse))\b/i;
|
|
63109
|
+
const SOCIAL_HOST = /(?:^|\.)(?:twitter\.com|x\.com|facebook\.com|fb\.com|instagram\.com|linkedin\.com|youtube\.com|youtu\.be|tiktok\.com|pinterest\.com|threads\.net|discord\.gg|apps\.apple\.com|play\.google\.com)$/i;
|
|
63110
|
+
const IMAGE_PATH = /\.(?:png|gif|jpe?g|svg|webp|ico)$/i;
|
|
63111
|
+
const LABEL_POSITIVE = /\b(?:verify|verification|confirm|confirmation|sign[- ]?in|sign me in|log[- ]?in|magic|activate|activation|reset|validate|authenticate|authorize|accept (?:the )?invit\w*|join|get started|continue)\b/i;
|
|
63112
|
+
const NEGATED_LABEL = /\b(?:did ?n[o']t|didn't|not you|wasn't you|was not you|ignore)\b/i;
|
|
63113
|
+
const URL_POSITIVE = /(?:verify|verification|confirm|signin|sign-in|sign_in|login|log-in|log_in|magic|activate|activation|reset|validate|auth|callback|invite|accept)/i;
|
|
63114
|
+
function urlTokens(parsed) {
|
|
63115
|
+
return `${parsed.hostname} ${parsed.pathname}`.toLowerCase().split(/[^a-z0-9]+/).filter(Boolean);
|
|
63116
|
+
}
|
|
63117
|
+
function scoreLink(candidate) {
|
|
63118
|
+
const url = unwrapTrackingRedirect(candidate.url);
|
|
63119
|
+
let parsed;
|
|
63120
|
+
try {
|
|
63121
|
+
parsed = new URL(url);
|
|
63122
|
+
} catch {
|
|
63123
|
+
return null;
|
|
63124
|
+
}
|
|
63125
|
+
if (parsed.protocol !== "https:" && parsed.protocol !== "http:") return null;
|
|
63126
|
+
if (SOCIAL_HOST.test(parsed.hostname)) return null;
|
|
63127
|
+
if (IMAGE_PATH.test(parsed.pathname)) return null;
|
|
63128
|
+
const labelTokens = candidate.label.toLowerCase().split(/[^a-z0-9]+/);
|
|
63129
|
+
if (urlTokens(parsed).some((t) => SKIP_TOKENS.has(t)) || labelTokens.some((t) => SKIP_TOKENS.has(t)) || SKIP_LABEL.test(candidate.label)) return null;
|
|
63130
|
+
let score = 0;
|
|
63131
|
+
if (LABEL_POSITIVE.test(candidate.label)) score += 6;
|
|
63132
|
+
if (NEGATED_LABEL.test(candidate.label)) score -= 4;
|
|
63133
|
+
if (URL_POSITIVE.test(`${parsed.pathname}${parsed.search}`)) score += 4;
|
|
63134
|
+
else if (URL_POSITIVE.test(parsed.hostname)) score += 2;
|
|
63135
|
+
if (/[?&/=][A-Za-z0-9_-]{24,}/.test(`${parsed.pathname}${parsed.search}`)) score += 1;
|
|
63136
|
+
if (parsed.protocol === "http:") score -= 1;
|
|
63137
|
+
return score;
|
|
63138
|
+
}
|
|
63139
|
+
/**
|
|
63140
|
+
* The most likely verification, sign-in, confirm or magic link in an email,
|
|
63141
|
+
* with an obvious click-tracking wrapper removed, or null when no link has
|
|
63142
|
+
* evidence of being one.
|
|
63143
|
+
*/
|
|
63144
|
+
function extractVerificationLink(email) {
|
|
63145
|
+
let best = null;
|
|
63146
|
+
for (const candidate of linkCandidates(email)) {
|
|
63147
|
+
const score = scoreLink(candidate);
|
|
63148
|
+
if (score === null || score < 4) continue;
|
|
63149
|
+
if (best === null || score > best.score) best = {
|
|
63150
|
+
url: unwrapTrackingRedirect(candidate.url),
|
|
63151
|
+
score
|
|
63152
|
+
};
|
|
63153
|
+
}
|
|
63154
|
+
return best?.url ?? null;
|
|
63155
|
+
}
|
|
63156
|
+
//#endregion
|
|
63157
|
+
//#region src/oclif/commands/wait.ts
|
|
63158
|
+
/** Exit codes. 2 is oclif's invalid-flags exit. */
|
|
63159
|
+
const WAIT_EXIT_CODES = {
|
|
63160
|
+
found: 0,
|
|
63161
|
+
error: 1,
|
|
63162
|
+
timeout: 5,
|
|
63163
|
+
notFound: 6
|
|
63164
|
+
};
|
|
63165
|
+
const MAX_LONG_POLL_SECONDS = 30;
|
|
63166
|
+
const TAIL_PAGE_SIZE = 100;
|
|
63167
|
+
const EXISTING_PAGE_SIZE = 50;
|
|
63168
|
+
const PRINTED_BODY_CHARS = 1200;
|
|
63169
|
+
const JSON_TEXT_CHARS = 4e3;
|
|
63170
|
+
/**
|
|
63171
|
+
* Seconds from "90", "90s", "5m", "1h" or "1m30s". 0 waits forever. Throws
|
|
63172
|
+
* on anything else.
|
|
63173
|
+
*/
|
|
63174
|
+
function parseWaitDuration(value) {
|
|
63175
|
+
const text = value.trim().toLowerCase();
|
|
63176
|
+
if (/^\d+$/.test(text)) return Number(text);
|
|
63177
|
+
const match = /^(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?$/.exec(text);
|
|
63178
|
+
if (!match || text === "") throw new Error(`--timeout must be a duration such as 90s, 5m, 1h or plain seconds; got "${value}".`);
|
|
63179
|
+
const [, h, m, s] = match;
|
|
63180
|
+
return Number(h ?? 0) * 3600 + Number(m ?? 0) * 60 + Number(s ?? 0);
|
|
63181
|
+
}
|
|
63182
|
+
/**
|
|
63183
|
+
* Whether any of an email's sender addresses matches `--from`. A value with
|
|
63184
|
+
* an @ matches that address exactly; a bare domain ("github.com" or
|
|
63185
|
+
* "@github.com") matches any address at it or at its subdomains.
|
|
63186
|
+
*/
|
|
63187
|
+
function senderMatches(filter, addresses) {
|
|
63188
|
+
const wanted = filter.trim().toLowerCase();
|
|
63189
|
+
const domainOnly = wanted.startsWith("@") || !wanted.includes("@");
|
|
63190
|
+
const domain = wanted.replace(/^@/, "");
|
|
63191
|
+
return addresses.some((raw) => {
|
|
63192
|
+
const address = raw?.trim().toLowerCase();
|
|
63193
|
+
if (!address) return false;
|
|
63194
|
+
if (!domainOnly) return address === wanted;
|
|
63195
|
+
const at = address.lastIndexOf("@");
|
|
63196
|
+
const own = at >= 0 ? address.slice(at + 1) : "";
|
|
63197
|
+
return own === domain || own.endsWith(`.${domain}`);
|
|
63198
|
+
});
|
|
63199
|
+
}
|
|
63200
|
+
function str(value) {
|
|
63201
|
+
return typeof value === "string" && value !== "" ? value : null;
|
|
63202
|
+
}
|
|
63203
|
+
function subjectMatches(filter, subject) {
|
|
63204
|
+
return (str(subject) ?? "").toLowerCase().includes(filter.toLowerCase());
|
|
63205
|
+
}
|
|
63206
|
+
/** Cheap checks on a list row, before its detail is read. */
|
|
63207
|
+
function rowMayMatch(row, filters) {
|
|
63208
|
+
if (row.status !== "accepted" && row.status !== "completed") return false;
|
|
63209
|
+
if (presenceDisposition(row) !== "ordinary") return false;
|
|
63210
|
+
if (filters.subject && !subjectMatches(filters.subject, row.subject)) return false;
|
|
63211
|
+
if (filters.thread && str(row.thread_id) !== filters.thread) return false;
|
|
63212
|
+
return true;
|
|
63213
|
+
}
|
|
63214
|
+
function detailMatches(detail, filters) {
|
|
63215
|
+
if (filters.from && !senderMatches(filters.from, [detail.from_email, detail.sender])) return false;
|
|
63216
|
+
if (filters.subject && !subjectMatches(filters.subject, detail.subject)) return false;
|
|
63217
|
+
if (filters.thread && (detail.thread_id ?? null) !== filters.thread) return false;
|
|
63218
|
+
if (filters.replyTo && (detail.reply_to_sent_email_id ?? "").toLowerCase() !== filters.replyTo.toLowerCase()) return false;
|
|
63219
|
+
return true;
|
|
63220
|
+
}
|
|
63221
|
+
function truncate(text, max) {
|
|
63222
|
+
return text.length <= max ? {
|
|
63223
|
+
text,
|
|
63224
|
+
cut: false
|
|
63225
|
+
} : {
|
|
63226
|
+
text: `${text.slice(0, max).trimEnd()}...`,
|
|
63227
|
+
cut: true
|
|
63228
|
+
};
|
|
63229
|
+
}
|
|
63230
|
+
function waitJson(detail, options) {
|
|
63231
|
+
const compact = buildEmailCompact(detail);
|
|
63232
|
+
const body = truncate(compact.body_text, JSON_TEXT_CHARS);
|
|
63233
|
+
const extractInput = {
|
|
63234
|
+
subject: detail.subject,
|
|
63235
|
+
text: detail.body_text,
|
|
63236
|
+
html: detail.body_html
|
|
63237
|
+
};
|
|
63238
|
+
return {
|
|
63239
|
+
id: detail.id,
|
|
63240
|
+
thread_id: compact.thread_id,
|
|
63241
|
+
from: compact.from,
|
|
63242
|
+
to: compact.to,
|
|
63243
|
+
subject: compact.subject,
|
|
63244
|
+
received_at: compact.received_at,
|
|
63245
|
+
text: body.text,
|
|
63246
|
+
text_truncated: body.cut,
|
|
63247
|
+
...options.code ? { code: extractVerificationCode(extractInput) } : {},
|
|
63248
|
+
...options.link ? { link: extractVerificationLink(extractInput) } : {}
|
|
63249
|
+
};
|
|
63250
|
+
}
|
|
63251
|
+
function formatWaitEmail(email, bin) {
|
|
63252
|
+
const body = truncate(email.text, PRINTED_BODY_CHARS);
|
|
63253
|
+
const lines = [
|
|
63254
|
+
`From: ${email.from}`,
|
|
63255
|
+
`Subject: ${email.subject ?? "(no subject)"}`,
|
|
63256
|
+
`Received: ${email.received_at}`,
|
|
63257
|
+
`ID: ${email.id}`,
|
|
63258
|
+
"",
|
|
63259
|
+
body.text || "(no text)"
|
|
63260
|
+
];
|
|
63261
|
+
if (body.cut || email.text_truncated) lines.push("", `Full email: ${bin} emails get --id ${email.id}`);
|
|
63262
|
+
lines.push("", `Reply: ${bin} reply --id ${email.id} --body "..."`);
|
|
63263
|
+
return sanitizeForTerminal(lines.join("\n"));
|
|
63264
|
+
}
|
|
63265
|
+
async function listRows(apiClient, query) {
|
|
63266
|
+
const result = await listEmails({
|
|
63267
|
+
client: apiClient.client,
|
|
63268
|
+
query,
|
|
63269
|
+
responseStyle: "fields"
|
|
63270
|
+
});
|
|
63271
|
+
if (result.error) throw new InboxNextApiError("GET /emails", extractErrorPayload(result.error));
|
|
63272
|
+
const envelope = result.data;
|
|
63273
|
+
return {
|
|
63274
|
+
rows: (envelope?.data ?? []).filter((row) => row !== null && typeof row === "object"),
|
|
63275
|
+
cursor: envelope?.meta?.cursor ?? null
|
|
63276
|
+
};
|
|
63277
|
+
}
|
|
63278
|
+
async function readDetail(apiClient, id) {
|
|
63279
|
+
const result = await getEmail({
|
|
63280
|
+
client: apiClient.client,
|
|
63281
|
+
path: { id },
|
|
63282
|
+
responseStyle: "fields"
|
|
63283
|
+
});
|
|
63284
|
+
if (result.error) {
|
|
63285
|
+
const payload = extractErrorPayload(result.error);
|
|
63286
|
+
if (extractErrorCode(payload) === "not_found") return null;
|
|
63287
|
+
throw new InboxNextApiError(`GET /emails/${id}`, payload);
|
|
63288
|
+
}
|
|
63289
|
+
const detail = result.data?.data;
|
|
63290
|
+
return detail !== null && typeof detail === "object" ? detail : null;
|
|
63291
|
+
}
|
|
63292
|
+
async function firstMatch(apiClient, rows, filters, seen) {
|
|
63293
|
+
for (const row of rows) {
|
|
63294
|
+
const id = str(row.id);
|
|
63295
|
+
if (!id || seen.has(id)) continue;
|
|
63296
|
+
seen.add(id);
|
|
63297
|
+
if (!rowMayMatch(row, filters)) continue;
|
|
63298
|
+
const detail = await readDetail(apiClient, id);
|
|
63299
|
+
if (detail && detailMatches(detail, filters)) return detail;
|
|
63300
|
+
}
|
|
63301
|
+
return null;
|
|
63302
|
+
}
|
|
63303
|
+
function arrivedSince(row, threshold) {
|
|
63304
|
+
const at = Date.parse(str(row.created_at) ?? str(row.received_at) ?? "");
|
|
63305
|
+
return Number.isFinite(at) && at >= threshold;
|
|
63306
|
+
}
|
|
63307
|
+
/**
|
|
63308
|
+
* Block until an email matching `filters` arrives (or, with
|
|
63309
|
+
* `includeExisting`, is among the newest already received). Returns null at
|
|
63310
|
+
* the deadline.
|
|
63311
|
+
*/
|
|
63312
|
+
async function waitForEmail(params) {
|
|
63313
|
+
const { apiClient, filters, deadline } = params;
|
|
63314
|
+
const seen = /* @__PURE__ */ new Set();
|
|
63315
|
+
let since = await baselineCursor({ apiClient });
|
|
63316
|
+
const recent = await listRows(apiClient, { limit: EXISTING_PAGE_SIZE });
|
|
63317
|
+
const early = await firstMatch(apiClient, recent.rows.filter((row) => arrivedSince(row, params.startedAt)).reverse(), filters, seen);
|
|
63318
|
+
if (early) return early;
|
|
63319
|
+
if (params.includeExisting) {
|
|
63320
|
+
const found = await firstMatch(apiClient, recent.rows, filters, seen);
|
|
63321
|
+
if (found) return found;
|
|
63322
|
+
}
|
|
63323
|
+
for (;;) {
|
|
63324
|
+
const remainingMs = deadline === null ? MAX_LONG_POLL_SECONDS * 1e3 : deadline - Date.now();
|
|
63325
|
+
if (remainingMs <= 0) return null;
|
|
63326
|
+
const startedAt = Date.now();
|
|
63327
|
+
const page = await listRows(apiClient, {
|
|
63328
|
+
limit: TAIL_PAGE_SIZE,
|
|
63329
|
+
since,
|
|
63330
|
+
wait: Math.max(0, Math.min(MAX_LONG_POLL_SECONDS, Math.floor(remainingMs / 1e3)))
|
|
63331
|
+
});
|
|
63332
|
+
const found = await firstMatch(apiClient, page.rows, filters, seen);
|
|
63333
|
+
if (found) return found;
|
|
63334
|
+
if (page.rows.length > 0 && page.cursor) {
|
|
63335
|
+
since = page.cursor;
|
|
63336
|
+
continue;
|
|
63337
|
+
}
|
|
63338
|
+
if (Date.now() - startedAt < 1e3) await sleep$2(Math.max(0, Math.min(1e3, remainingMs)));
|
|
63339
|
+
}
|
|
63340
|
+
}
|
|
63341
|
+
function describeFilters(filters) {
|
|
63342
|
+
const parts = [
|
|
63343
|
+
filters.from ? `from ${filters.from}` : null,
|
|
63344
|
+
filters.subject ? `with subject containing "${filters.subject}"` : null,
|
|
63345
|
+
filters.thread ? `in thread ${filters.thread}` : null,
|
|
63346
|
+
filters.replyTo ? `replying to ${filters.replyTo}` : null
|
|
63347
|
+
].filter(Boolean);
|
|
63348
|
+
return parts.length > 0 ? ` ${parts.join(" ")}` : "";
|
|
63349
|
+
}
|
|
63350
|
+
var WaitCommand = class WaitCommand extends Command {
|
|
63351
|
+
static summary = "Wait for the next email to you and print it, its code or its link";
|
|
63352
|
+
static description = `Wait for the next email to this identity and print it. Made for sign-ups and logins: use your address with a service, then let this command pick the code or link out of the email it sends.
|
|
63353
|
+
|
|
63354
|
+
Only mail that arrives after the command starts matches, unless --include-existing also lets one of the newest 50 emails match. The identity is the one the CLI resolves: a connected agent profile receives only its own address's mail; a member login receives any inbound mail in the organization.
|
|
63355
|
+
|
|
63356
|
+
--from takes an address (exact match) or a bare domain: github.com matches any sender at github.com or its subdomains. It is checked against the From address and the envelope sender, which the sender controls; it narrows the wait, it does not prove who sent the mail.
|
|
63357
|
+
|
|
63358
|
+
--code prints only the verification or one-time code, with spaces or dashes between its groups removed. --link prints only the most likely verification, sign-in, confirm, magic or reset link, with an obvious click-tracking wrapper removed. Without either, the email is printed: sender, subject, time, its ID and the start of its text, ready for \`primitive reply --id <id>\`. --json prints one object with id, thread_id, from, to, subject, received_at, text and, when asked, code and link (null when none was found).
|
|
63359
|
+
|
|
63360
|
+
Exit codes:
|
|
63361
|
+
- 0: a matching email arrived and was printed.
|
|
63362
|
+
- 1: error (API failure or authentication).
|
|
63363
|
+
- 2: invalid flags or arguments.
|
|
63364
|
+
- 5: no matching email arrived before --timeout.
|
|
63365
|
+
- 6: the email arrived but had no code (--code) or link (--link); its ID is printed on stderr.`;
|
|
63366
|
+
static examples = [
|
|
63367
|
+
{
|
|
63368
|
+
description: "Sign up with your address, then read the code",
|
|
63369
|
+
command: "<%= config.bin %> wait --from github.com --code"
|
|
63370
|
+
},
|
|
63371
|
+
{
|
|
63372
|
+
description: "Click through a magic sign-in link",
|
|
63373
|
+
command: "<%= config.bin %> wait --from vercel.com --link"
|
|
63374
|
+
},
|
|
63375
|
+
{
|
|
63376
|
+
description: "Wait up to 90 seconds for a specific subject",
|
|
63377
|
+
command: "<%= config.bin %> wait --subject \"verify your email\" --timeout 90s"
|
|
63378
|
+
},
|
|
63379
|
+
{
|
|
63380
|
+
description: "Machine-readable, code included",
|
|
63381
|
+
command: "<%= config.bin %> wait --from stripe.com --code --json"
|
|
63382
|
+
},
|
|
63383
|
+
{
|
|
63384
|
+
description: "The code already arrived before you started waiting",
|
|
63385
|
+
command: "<%= config.bin %> wait --from slack.com --code --include-existing"
|
|
63386
|
+
}
|
|
63387
|
+
];
|
|
63388
|
+
static flags = {
|
|
63389
|
+
"api-key": Flags.string({
|
|
63390
|
+
description: "Primitive API key override (defaults to PRIMITIVE_API_KEY or saved OAuth login credentials)",
|
|
63391
|
+
env: "PRIMITIVE_API_KEY"
|
|
63392
|
+
}),
|
|
63393
|
+
"api-base-url": Flags.string({
|
|
63394
|
+
description: "Override the primary API base URL. Internal testing only; not documented to customers.",
|
|
63395
|
+
env: "PRIMITIVE_API_BASE_URL",
|
|
63396
|
+
hidden: true
|
|
63397
|
+
}),
|
|
63398
|
+
from: Flags.string({ description: "Sender address, or a domain matching any sender at it or its subdomains (github.com)" }),
|
|
63399
|
+
subject: Flags.string({ description: "Only match emails whose subject contains this text (case-insensitive)" }),
|
|
63400
|
+
thread: Flags.string({ description: "Only match emails in this thread ID" }),
|
|
63401
|
+
"reply-to": Flags.string({ description: "Only match replies to this sent email ID" }),
|
|
63402
|
+
timeout: Flags.string({
|
|
63403
|
+
default: "5m",
|
|
63404
|
+
description: "How long to wait: 90s, 5m, 1h or plain seconds; 0 waits forever"
|
|
63405
|
+
}),
|
|
63406
|
+
code: Flags.boolean({ description: "Print only the verification or one-time code" }),
|
|
63407
|
+
link: Flags.boolean({ description: "Print only the verification or sign-in link" }),
|
|
63408
|
+
json: Flags.boolean({ description: "Print one JSON object for the email" }),
|
|
63409
|
+
"include-existing": Flags.boolean({ description: "Also match the newest 50 emails already received" })
|
|
63410
|
+
};
|
|
63411
|
+
async run() {
|
|
63412
|
+
const startedAt = Date.now();
|
|
63413
|
+
const { flags } = await this.parse(WaitCommand);
|
|
63414
|
+
let timeoutSeconds;
|
|
63415
|
+
try {
|
|
63416
|
+
timeoutSeconds = parseWaitDuration(flags.timeout);
|
|
63417
|
+
} catch (error) {
|
|
63418
|
+
this.error(error instanceof Error ? error.message : String(error), { exit: 2 });
|
|
63419
|
+
}
|
|
63420
|
+
const filters = {
|
|
63421
|
+
from: flags.from?.trim() || void 0,
|
|
63422
|
+
subject: flags.subject?.trim() || void 0,
|
|
63423
|
+
thread: flags.thread?.trim() || void 0,
|
|
63424
|
+
replyTo: flags["reply-to"]?.trim() || void 0
|
|
63425
|
+
};
|
|
63426
|
+
const { apiClient, auth, baseUrlOverridden } = await createAuthenticatedCliApiClient({
|
|
63427
|
+
apiKey: flags["api-key"],
|
|
63428
|
+
apiBaseUrl: flags["api-base-url"],
|
|
63429
|
+
configDir: this.config.configDir
|
|
63430
|
+
});
|
|
63431
|
+
const deadline = timeoutSeconds === 0 ? null : Date.now() + timeoutSeconds * 1e3;
|
|
63432
|
+
if (process.stderr.isTTY) {
|
|
63433
|
+
const to = auth.connectedAgent?.agentAddress;
|
|
63434
|
+
process.stderr.write(`Waiting${timeoutSeconds === 0 ? "" : ` up to ${flags.timeout}`} for mail${to ? ` to ${to}` : ""}${describeFilters(filters)}...\n`);
|
|
63435
|
+
}
|
|
63436
|
+
let detail;
|
|
63437
|
+
try {
|
|
63438
|
+
detail = await waitForEmail({
|
|
63439
|
+
apiClient,
|
|
63440
|
+
filters,
|
|
63441
|
+
includeExisting: flags["include-existing"],
|
|
63442
|
+
deadline,
|
|
63443
|
+
startedAt
|
|
63444
|
+
});
|
|
63445
|
+
} catch (error) {
|
|
63446
|
+
if (!(error instanceof InboxNextApiError)) throw error;
|
|
63447
|
+
writeErrorWithHints(error.payload);
|
|
63448
|
+
surfaceUnauthorizedHint({
|
|
63449
|
+
auth,
|
|
63450
|
+
baseUrlOverridden,
|
|
63451
|
+
configDir: this.config.configDir,
|
|
63452
|
+
payload: error.payload
|
|
63453
|
+
});
|
|
63454
|
+
process.exitCode = WAIT_EXIT_CODES.error;
|
|
63455
|
+
return;
|
|
63456
|
+
}
|
|
63457
|
+
if (!detail) {
|
|
63458
|
+
process.stderr.write(`Timed out after ${flags.timeout} with no matching email${describeFilters(filters)}.\n`);
|
|
63459
|
+
process.exitCode = WAIT_EXIT_CODES.timeout;
|
|
63460
|
+
return;
|
|
63461
|
+
}
|
|
63462
|
+
const email = waitJson(detail, {
|
|
63463
|
+
code: flags.code,
|
|
63464
|
+
link: flags.link
|
|
63465
|
+
});
|
|
63466
|
+
const missing = [flags.code && !email.code ? "code" : null, flags.link && !email.link ? "link" : null].filter((item) => item !== null);
|
|
63467
|
+
if (flags.json) this.log(JSON.stringify(email));
|
|
63468
|
+
else if (flags.code || flags.link) {
|
|
63469
|
+
if (flags.code && email.code) this.log(email.code);
|
|
63470
|
+
if (flags.link && email.link) this.log(sanitizeForTerminal(email.link));
|
|
63471
|
+
} else this.log(formatWaitEmail(email, this.config.bin));
|
|
63472
|
+
if (missing.length > 0) {
|
|
63473
|
+
process.stderr.write(`No verification ${missing.join(" or ")} found in email ${email.id}; read it with: ${this.config.bin} emails get --id ${email.id}\n`);
|
|
63474
|
+
process.exitCode = WAIT_EXIT_CODES.notFound;
|
|
63475
|
+
}
|
|
63476
|
+
}
|
|
63477
|
+
};
|
|
63478
|
+
//#endregion
|
|
62238
63479
|
//#region src/oclif/commands/wake-authorizations-create.ts
|
|
62239
63480
|
var WakeAuthorizationsCreateCommand = class WakeAuthorizationsCreateCommand extends Command {
|
|
62240
63481
|
static description = "Grant a sender domain (and optionally an address and command set) permission to wake a target function.";
|
|
@@ -62880,7 +64121,7 @@ function formatWhoamiSummary(account, managedInboxDomain) {
|
|
|
62880
64121
|
var WhoamiCommand = class WhoamiCommand extends Command {
|
|
62881
64122
|
static description = `Print the account currently authenticated by saved OAuth credentials or an explicit API key. For account credentials this is a live credentials smoke test. Use account whoami for the authenticated caller, their assigned member address and an address suggestion; account provision-member-address --address <email> saves your chosen personal address.
|
|
62882
64123
|
|
|
62883
|
-
With PRIMITIVE_AGENT_PROFILE selected, print the saved connected-agent identity offline. This does not verify live authentication, app pairing, or listener readiness. Inspect the receiver separately: the output names the command for the profile's receiver mode (agent connect --status for Claude hook and poll receivers, listen --status --notify-session for a native listener).
|
|
64124
|
+
With PRIMITIVE_AGENT_PROFILE selected, print the saved connected-agent identity offline, with no API call. The first line is the agent's email address alone; --json adds address, profile and source (session_hook when the selected profile is this Claude Code session's own agent exported by the session start hook, env otherwise). This does not verify live authentication, app pairing, or listener readiness. Inspect the receiver separately: the output names the command for the profile's receiver mode (agent connect --status for Claude hook and poll receivers, listen --status --notify-session for a native listener).
|
|
62884
64125
|
|
|
62885
64126
|
The default output is a concise human summary. Pass --json for the full /account response or the explicit offline connected-agent identity envelope.`;
|
|
62886
64127
|
static summary = "Print the live account or saved connected-agent identity";
|
|
@@ -62916,13 +64157,18 @@ var WhoamiCommand = class WhoamiCommand extends Command {
|
|
|
62916
64157
|
const statusCommand = `${cliInvocation(process.argv[1])} agent connect --profile ${identity.profileName} --status --json`;
|
|
62917
64158
|
const receiver = receiverStatusCommand(this.config.configDir, identity.profileName);
|
|
62918
64159
|
const guidance = `Saved identity only. Live authentication, app pairing, and receiving readiness are not verified. Inspect the ${receiver.mode === "external" ? "Claude hook receiver" : receiver.mode === "poll" ? "poll receiver" : "receiver"} with \`${receiver.command}\`.`;
|
|
64160
|
+
const source = agentIdentitySource(identity);
|
|
64161
|
+
const selectedBy = source === "session_hook" ? `this Claude Code session's start hook (PRIMITIVE_AGENT_PROFILE=${identity.profileName})` : `PRIMITIVE_AGENT_PROFILE=${identity.profileName}`;
|
|
62919
64162
|
this.log(flags.json ? JSON.stringify({
|
|
64163
|
+
address: identity.agentAddress,
|
|
64164
|
+
profile: identity.profileName,
|
|
64165
|
+
source,
|
|
62920
64166
|
auth_method: "agent_connection",
|
|
62921
64167
|
verification: "offline",
|
|
62922
64168
|
identity,
|
|
62923
64169
|
status_command: statusCommand,
|
|
62924
64170
|
guidance
|
|
62925
|
-
}, null, 2) :
|
|
64171
|
+
}, null, 2) : `${identity.agentAddress}\nSelected by: ${selectedBy}. Prefix a command with \`PRIMITIVE_AGENT_PROFILE=\` to run it as the member login instead.\nSaved connected-agent profile: ${identity.profileName}\nAgent address: ${identity.agentAddress}\nOwner personal address (send reports here): ${identity.ownerMemberAddress ?? "unknown; reply to the member who wrote to you"}\nControl address (setup and presence only): ${identity.ownerAddress}\nAPI origin: ${identity.apiBaseUrl}\n${guidance}\nSaved profile status: ${statusCommand}`);
|
|
62926
64172
|
return;
|
|
62927
64173
|
}
|
|
62928
64174
|
if (isConnectedChatCredential(auth.apiKey)) throw new Errors.CLIError("This connection credential cannot inspect an account. Select its saved profile with PRIMITIVE_AGENT_PROFILE to inspect the connected identity offline.", { exit: 1 });
|
|
@@ -63024,6 +64270,7 @@ function renderFishCompletion(binName) {
|
|
|
63024
64270
|
for (const operation of topicOperations) {
|
|
63025
64271
|
lines.push(`complete -c ${binName} -f -n '__fish_${binName}_topic_needs_subcommand ${fishEscape(topic)}' -a '${fishEscape(operation.command)}' -d '${fishEscape(operation.summary ?? `${operation.method} ${operation.path}`)}'`);
|
|
63026
64272
|
for (const parameter of [...operation.pathParams, ...operation.queryParams]) lines.push(`complete -c ${binName} -n '${operationCondition(operation).replace(BIN_PLACEHOLDER, binName)}' -l '${fishEscape(parameter.name.replace(/_/g, "-"))}' -r -d '${fishEscape(parameter.description ?? parameter.name)}'`);
|
|
64273
|
+
for (const parameter of operation.headerParams) lines.push(`complete -c ${binName} -n '${operationCondition(operation).replace(BIN_PLACEHOLDER, binName)}' -l '${fishEscape(headerFlagName(parameter.name))}' -r -d '${fishEscape(parameter.description ?? parameter.name)}'`);
|
|
63027
64274
|
lines.push(`complete -c ${binName} -n '${operationCondition(operation).replace(BIN_PLACEHOLDER, binName)}' -l 'api-key' -r -d 'Primitive API key override (defaults to PRIMITIVE_API_KEY or saved OAuth login credentials)'`);
|
|
63028
64275
|
if (!operation.binaryResponse) lines.push(`complete -c ${binName} -n '${operationCondition(operation).replace(BIN_PLACEHOLDER, binName)}' -l 'envelope' -d 'Print the full response envelope, including pagination metadata'`);
|
|
63029
64276
|
if (operation.hasJsonBody) lines.push(`complete -c ${binName} -n '${operationCondition(operation).replace(BIN_PLACEHOLDER, binName)}' -l 'body' -r -d 'JSON request body'`, `complete -c ${binName} -n '${operationCondition(operation).replace(BIN_PLACEHOLDER, binName)}' -l 'body-file' -r -d 'Path to a JSON file used as the request body'`);
|
|
@@ -63400,6 +64647,7 @@ const COMMANDS = {
|
|
|
63400
64647
|
"domains:download-domain-zone-file": DomainsZoneFileCommand,
|
|
63401
64648
|
"inbox:setup": InboxSetupCommand,
|
|
63402
64649
|
"inbox:next": InboxNextCommand,
|
|
64650
|
+
wait: WaitCommand,
|
|
63403
64651
|
listen: ListenCommand,
|
|
63404
64652
|
"listen:init": ListenInitCommand,
|
|
63405
64653
|
"listen:pending": ListenPendingCommand,
|