primcli 3.0.0-preview.19 → 3.0.0-preview.20
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 +15 -1
- package/dist/{api-command--2ZkNMvH.js → api-command-DXiAX_N2.js} +2147 -328
- package/dist/help-inputs-NGARVZL_.js +109 -0
- package/dist/{json-output-saHY68hr.js → json-output-xgN0ZLWP.js} +11 -1
- package/dist/{machine-session-ADcw9uJm.js → machine-session-Cvo9BqYB.js} +4 -4
- package/dist/{notify-session-06flGBgK.js → notify-session-C8USviF_.js} +2 -2
- package/dist/oclif/auto-signal-worker.js +3 -3
- package/dist/oclif/auto-signals.js +1 -1
- package/dist/oclif/command-not-found.js +69 -21
- package/dist/oclif/help.js +65 -11
- package/dist/oclif/index.js +1421 -613
- package/dist/oclif/proxy-auto-detect.js +1 -1
- package/dist/oclif/receiver-heal.js +2 -2
- package/dist/{repeats-Dj_o6c-X-DTtFzwNd.js → repeats-Dj_o6c-X-CliyH3ge.js} +64 -4
- package/dist/retry-ids-04ZPJCZY.js +59 -0
- package/dist/{scoped-chat-C7l2BSZr.js → scoped-chat-CUy0Ta_y.js} +1 -1
- package/dist/{signal-command-D6oaza1W.js → signal-command-DHwFky03.js} +4 -4
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { N as agentProfileDirectory, P as agentProfileName, R as loadConnectedAgentProfile, j as AGENT_PROFILE_ENV } from "../cli-config-Ms_0vNjq.js";
|
|
2
2
|
import { a as backgroundListenStatus, i as backgroundListenRestartable, s as claimBackgroundListenRestart, t as BACKGROUND_LISTEN_RELAUNCH_ENV } from "../listen-background-DyBYca28.js";
|
|
3
|
-
import { d as SESSION_UUID, t as notificationScope } from "../notify-session-
|
|
4
|
-
import { zt as detectAgentRuntime } from "../api-command
|
|
3
|
+
import { d as SESSION_UUID, t as notificationScope } from "../notify-session-C8USviF_.js";
|
|
4
|
+
import { zt as detectAgentRuntime } from "../api-command-DXiAX_N2.js";
|
|
5
5
|
import { d as readMailJson } from "../shared-mail-files-BAQSGxxz.js";
|
|
6
6
|
import { join } from "node:path";
|
|
7
7
|
import { spawn } from "node:child_process";
|
|
@@ -141,6 +141,7 @@ var sdk_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
141
141
|
getEmailRuleObjection: () => getEmailRuleObjection,
|
|
142
142
|
getEmailRuleRequest: () => getEmailRuleRequest,
|
|
143
143
|
getEmailRuleScope: () => getEmailRuleScope,
|
|
144
|
+
getEmailRuleSettings: () => getEmailRuleSettings,
|
|
144
145
|
getEmailRuleShare: () => getEmailRuleShare,
|
|
145
146
|
getEmailRuleVocabulary: () => getEmailRuleVocabulary,
|
|
146
147
|
getEndpoint: () => getEndpoint,
|
|
@@ -345,6 +346,7 @@ var sdk_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
345
346
|
updateEmailNotificationPreferences: () => updateEmailNotificationPreferences,
|
|
346
347
|
updateEmailNotificationSettings: () => updateEmailNotificationSettings,
|
|
347
348
|
updateEmailRule: () => updateEmailRule,
|
|
349
|
+
updateEmailRuleSettings: () => updateEmailRuleSettings,
|
|
348
350
|
updateEndpoint: () => updateEndpoint,
|
|
349
351
|
updateFilter: () => updateFilter,
|
|
350
352
|
updateFunction: () => updateFunction,
|
|
@@ -3643,7 +3645,7 @@ const getEmailRuleVocabulary = (options) => (options?.client ?? client).get({
|
|
|
3643
3645
|
/**
|
|
3644
3646
|
* Compile a rule description
|
|
3645
3647
|
*
|
|
3646
|
-
* Turns a plain-English description of which received emails to match into a rule over the column contract: rule, exactly the body create (with a name), update and the tests take, with an explanation of what it matches, the assumptions made, and warnings for what the columns cannot express. Where the columns fall short it adds up to five yes/no questions, asked only after the conditions match; they read the subject, the new text and attachment file names,
|
|
3648
|
+
* Turns a plain-English description of which received emails to match into a rule over the column contract: rule, exactly the body create (with a name), update and the tests take, with an explanation of what it matches, the assumptions made, and warnings for what the columns cannot express. Where the columns fall short it adds up to five yes/no questions, asked only after the conditions match; they read the subject, the new text and attachment file names, and text read from PDF and image attachments where attachment reading is active for the organization. Nothing is read or saved: a scope given is carried into rule, and a test says how much mail the rule matches. include_sql returns the SQL it renders to. kind do_not_share compiles for recall. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
|
|
3647
3649
|
*/
|
|
3648
3650
|
const compileEmailRule = (options) => (options.client ?? client).post({
|
|
3649
3651
|
security: [{
|
|
@@ -3660,7 +3662,7 @@ const compileEmailRule = (options) => (options.client ?? client).post({
|
|
|
3660
3662
|
/**
|
|
3661
3663
|
* Test a rule against received mail
|
|
3662
3664
|
*
|
|
3663
|
-
* Runs a rule over received mail and reports what it would decide for each email (matched, near_miss, no_match, unclassified, skipped or not_found), with a summary of how each top-level condition and question decided. Test an unsaved tree with its kind, a saved rule by rule_id (its current version, as its author), rule_id with tree (that tree as the rule's next version, as its author, against its saved expectations; its author only), or a pending rule request by request_id (its rule as asked, as you, over your own mailboxes). It reads only mail its author can read and its scope covers. A rule you see only because it covers your own mailboxes runs as you, over only those. Without email_ids it tests the newest emails on the mail relay domains, at most 200 and none older than 30 days, plus any expected ones. Unclassified emails over 2 hours old are classified first unless classify_missing is false. It records no decision and grants nothing, and stops at about 90 seconds. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
|
|
3665
|
+
* Runs a rule over received mail and reports what it would decide for each email (matched, near_miss, no_match, unclassified, skipped or not_found), with a summary of how each top-level condition and question decided. Test an unsaved tree with its kind, a saved rule by rule_id (its current version, as its author), rule_id with tree (that tree as the rule's next version, as its author, against its saved expectations; its author only), or a pending rule request by request_id (its rule as asked, as you, over your own mailboxes; with tree, that tree as your edit of it, and changes against the rule as asked). It reads only mail its author can read and its scope covers. A rule you see only because it covers your own mailboxes runs as you, over only those. Without email_ids it tests the newest emails on the mail relay domains, at most 200 and none older than 30 days, plus any expected ones. Unclassified emails over 2 hours old are classified first unless classify_missing is false. It records no decision and grants nothing, and stops at about 90 seconds. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
|
|
3664
3666
|
*/
|
|
3665
3667
|
const testEmailRule = (options) => (options.client ?? client).post({
|
|
3666
3668
|
security: [{
|
|
@@ -3711,7 +3713,7 @@ const testEmailRuleOnSample = (options) => (options.client ?? client).post({
|
|
|
3711
3713
|
/**
|
|
3712
3714
|
* List rules
|
|
3713
3715
|
*
|
|
3714
|
-
* The rules the caller can see,
|
|
3716
|
+
* The rules the caller can see, most recently changed first: their own, or every member's rules for a caller who reads the whole organization's mail. With all=true, every rule in the organization whoever wrote it, each with receivers, for owners and admins signed in themselves. Each carries its scope and current_version, not the version's text (GET /email-rules/{id}). author, mailbox, kind and state filter either list; a page filtered by mailbox may hold fewer rules than limit while meta.cursor continues. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
|
|
3715
3717
|
*/
|
|
3716
3718
|
const listEmailRules = (options) => (options?.client ?? client).get({
|
|
3717
3719
|
security: [{
|
|
@@ -4801,6 +4803,8 @@ const getDelivery = (options) => (options.client ?? client).get({
|
|
|
4801
4803
|
...options
|
|
4802
4804
|
});
|
|
4803
4805
|
/**
|
|
4806
|
+
* List organization invitations
|
|
4807
|
+
*
|
|
4804
4808
|
* Requires a current human organization owner or administrator. Machine credentials are refused. Invitations grant the chosen role, Member by default, only after verified acceptance through the sign-in or sign-up flow. Other organization memberships and project access are unchanged. Delivery accepted means submitted, not inbox delivery. Reuse request_id after an uncertain response.
|
|
4805
4809
|
*/
|
|
4806
4810
|
const listOrganizationInvitations = (options) => (options?.client ?? client).get({
|
|
@@ -4812,6 +4816,8 @@ const listOrganizationInvitations = (options) => (options?.client ?? client).get
|
|
|
4812
4816
|
...options
|
|
4813
4817
|
});
|
|
4814
4818
|
/**
|
|
4819
|
+
* Invite a person to the organization
|
|
4820
|
+
*
|
|
4815
4821
|
* Requires a current human organization owner or administrator. Machine credentials are refused. Invitations grant the chosen role, Member by default, only after verified acceptance through the sign-in or sign-up flow. Other organization memberships and project access are unchanged. Delivery accepted means submitted, not inbox delivery. Reuse request_id after an uncertain response.
|
|
4816
4822
|
*/
|
|
4817
4823
|
const inviteOrganizationMember = (options) => (options.client ?? client).post({
|
|
@@ -4827,6 +4833,8 @@ const inviteOrganizationMember = (options) => (options.client ?? client).post({
|
|
|
4827
4833
|
}
|
|
4828
4834
|
});
|
|
4829
4835
|
/**
|
|
4836
|
+
* Revoke an organization invitation
|
|
4837
|
+
*
|
|
4830
4838
|
* Requires a current human organization owner or administrator. Machine credentials are refused. Invitations grant the chosen role, Member by default, only after verified acceptance through the sign-in or sign-up flow. Other organization memberships and project access are unchanged. Delivery accepted means submitted, not inbox delivery. Reuse request_id after an uncertain response.
|
|
4831
4839
|
*/
|
|
4832
4840
|
const revokeOrganizationInvitation = (options) => (options.client ?? client).delete({
|
|
@@ -4838,6 +4846,8 @@ const revokeOrganizationInvitation = (options) => (options.client ?? client).del
|
|
|
4838
4846
|
...options
|
|
4839
4847
|
});
|
|
4840
4848
|
/**
|
|
4849
|
+
* List organization members
|
|
4850
|
+
*
|
|
4841
4851
|
* Requires a current human organization membership, or an org-wide API key: a super admin key, or a custom key with no addresses or domains whose grant holds members:read. A key lists members as the person it belongs to, at that person's live grant, and only while that person still holds members:read. Narrowed, Function and connected keys are refused. A caller holding members:read also gets each person's mail_access. No local paths or existing conversation history are shared.
|
|
4842
4852
|
*/
|
|
4843
4853
|
const listOrganizationPeople = (options) => (options?.client ?? client).get({
|
|
@@ -4849,6 +4859,8 @@ const listOrganizationPeople = (options) => (options?.client ?? client).get({
|
|
|
4849
4859
|
...options
|
|
4850
4860
|
});
|
|
4851
4861
|
/**
|
|
4862
|
+
* List accessible projects
|
|
4863
|
+
*
|
|
4852
4864
|
* Requires a current human organization membership. Machine credentials are refused. Results are scoped to current project access. No local paths or existing conversation history are shared.
|
|
4853
4865
|
*/
|
|
4854
4866
|
const listProjects = (options) => (options?.client ?? client).get({
|
|
@@ -4860,6 +4872,8 @@ const listProjects = (options) => (options?.client ?? client).get({
|
|
|
4860
4872
|
...options
|
|
4861
4873
|
});
|
|
4862
4874
|
/**
|
|
4875
|
+
* Create a shared project
|
|
4876
|
+
*
|
|
4863
4877
|
* Requires a current human organization membership. Machine credentials are refused. Results are scoped to current project access. No local paths or existing conversation history are shared.
|
|
4864
4878
|
*/
|
|
4865
4879
|
const createProject = (options) => (options.client ?? client).post({
|
|
@@ -4875,6 +4889,8 @@ const createProject = (options) => (options.client ?? client).post({
|
|
|
4875
4889
|
}
|
|
4876
4890
|
});
|
|
4877
4891
|
/**
|
|
4892
|
+
* Delete a shared project
|
|
4893
|
+
*
|
|
4878
4894
|
* Requires a current human organization membership. Machine credentials are refused. Results are scoped to current project access. No local paths or existing conversation history are shared.
|
|
4879
4895
|
*/
|
|
4880
4896
|
const deleteProject = (options) => (options.client ?? client).delete({
|
|
@@ -4886,6 +4902,8 @@ const deleteProject = (options) => (options.client ?? client).delete({
|
|
|
4886
4902
|
...options
|
|
4887
4903
|
});
|
|
4888
4904
|
/**
|
|
4905
|
+
* Get a shared project
|
|
4906
|
+
*
|
|
4889
4907
|
* Requires a current human organization membership. Machine credentials are refused. Results are scoped to current project access. No local paths or existing conversation history are shared.
|
|
4890
4908
|
*/
|
|
4891
4909
|
const getProject = (options) => (options.client ?? client).get({
|
|
@@ -4897,6 +4915,8 @@ const getProject = (options) => (options.client ?? client).get({
|
|
|
4897
4915
|
...options
|
|
4898
4916
|
});
|
|
4899
4917
|
/**
|
|
4918
|
+
* Update a shared project
|
|
4919
|
+
*
|
|
4900
4920
|
* Requires a current human organization membership. Machine credentials are refused. Results are scoped to current project access. No local paths or existing conversation history are shared.
|
|
4901
4921
|
*/
|
|
4902
4922
|
const updateProject = (options) => (options.client ?? client).put({
|
|
@@ -4912,6 +4932,8 @@ const updateProject = (options) => (options.client ?? client).put({
|
|
|
4912
4932
|
}
|
|
4913
4933
|
});
|
|
4914
4934
|
/**
|
|
4935
|
+
* List project invitations
|
|
4936
|
+
*
|
|
4915
4937
|
* Requires a current human organization membership. Machine credentials are refused. Results are scoped to current project access. No local paths or existing conversation history are shared.
|
|
4916
4938
|
*/
|
|
4917
4939
|
const listProjectInvitations = (options) => (options.client ?? client).get({
|
|
@@ -4923,6 +4945,8 @@ const listProjectInvitations = (options) => (options.client ?? client).get({
|
|
|
4923
4945
|
...options
|
|
4924
4946
|
});
|
|
4925
4947
|
/**
|
|
4948
|
+
* Invite a person to a project
|
|
4949
|
+
*
|
|
4926
4950
|
* Requires a current human organization membership. Machine credentials are refused. Results are scoped to current project access. No local paths or existing conversation history are shared.
|
|
4927
4951
|
*/
|
|
4928
4952
|
const inviteProjectMember = (options) => (options.client ?? client).post({
|
|
@@ -4938,6 +4962,8 @@ const inviteProjectMember = (options) => (options.client ?? client).post({
|
|
|
4938
4962
|
}
|
|
4939
4963
|
});
|
|
4940
4964
|
/**
|
|
4965
|
+
* Revoke a project invitation
|
|
4966
|
+
*
|
|
4941
4967
|
* Requires a current human organization membership. Machine credentials are refused. Results are scoped to current project access. No local paths or existing conversation history are shared.
|
|
4942
4968
|
*/
|
|
4943
4969
|
const revokeProjectInvitation = (options) => (options.client ?? client).delete({
|
|
@@ -5424,6 +5450,40 @@ const updateSearchSettings = (options) => (options.client ?? client).put({
|
|
|
5424
5450
|
}
|
|
5425
5451
|
});
|
|
5426
5452
|
/**
|
|
5453
|
+
* Get the email rule attachment setting
|
|
5454
|
+
*
|
|
5455
|
+
* Whether the organization lets email rules read PDF and image attachments, and whether that is active: it also needs email rules to be enabled for the organization (available) and HIPAA mode off. A missing setting reads as off.
|
|
5456
|
+
*
|
|
5457
|
+
* Person only: a dashboard session or the person's own OAuth token (the CLI or an app they connected). API keys, agent connection keys and agents are refused.
|
|
5458
|
+
*/
|
|
5459
|
+
const getEmailRuleSettings = (options) => (options?.client ?? client).get({
|
|
5460
|
+
security: [{
|
|
5461
|
+
scheme: "bearer",
|
|
5462
|
+
type: "http"
|
|
5463
|
+
}],
|
|
5464
|
+
url: "/email-rule-settings",
|
|
5465
|
+
...options
|
|
5466
|
+
});
|
|
5467
|
+
/**
|
|
5468
|
+
* Change the email rule attachment setting
|
|
5469
|
+
*
|
|
5470
|
+
* Turn on or off whether email rules read PDF and image attachments. When on, each such attachment is read once by a hosted model and its text is given to the email classifier and to the questions of the organization's email rules, so it is a person's decision. Turning it on is refused with 409 under HIPAA mode (hipaa_mode) or while email rules are not enabled for the organization (not_available). Turning it off is always allowed.
|
|
5471
|
+
*
|
|
5472
|
+
* Person only: a dashboard session, or the person's own OAuth token with a step-up token for purpose `org_settings.write` in the Primitive-Step-Up header. Without one an OAuth token is answered 403 step_up_required, whose details carry the dashboard URL that issues it (or 403 grant_forbidden when the person's role could not do it anyway). The person's role must hold email_rule_settings:manage. API keys and agent connection keys are refused. An agent acting for the person is refused unless it carries a step-up token the person issued in the dashboard.
|
|
5473
|
+
*/
|
|
5474
|
+
const updateEmailRuleSettings = (options) => (options.client ?? client).put({
|
|
5475
|
+
security: [{
|
|
5476
|
+
scheme: "bearer",
|
|
5477
|
+
type: "http"
|
|
5478
|
+
}],
|
|
5479
|
+
url: "/email-rule-settings",
|
|
5480
|
+
...options,
|
|
5481
|
+
headers: {
|
|
5482
|
+
...options.body !== void 0 && { "Content-Type": "application/json" },
|
|
5483
|
+
...options.headers
|
|
5484
|
+
}
|
|
5485
|
+
});
|
|
5486
|
+
/**
|
|
5427
5487
|
* Get the organization's email notification settings
|
|
5428
5488
|
*
|
|
5429
5489
|
* Every kind of notification email Primitive sends the organization's members, and who may turn it off. Each kind lists its label and description, its class, whether it needs an entitlement and whether the organization has it, the organization's mode (null for platform_required) and the modes it may choose, and whether the calling member gets it and may change that.
|
|
@@ -25986,4 +26046,4 @@ function repeatStopCommand(emailId) {
|
|
|
25986
26046
|
if (!UUID.test(emailId)) throw new TypeError("emailId must be an email UUID");
|
|
25987
26047
|
return `primitive repeat stop --id ${emailId.toLowerCase()}`;
|
|
25988
26048
|
}
|
|
25989
|
-
export { AUTOMATED_VALUES as $,
|
|
26049
|
+
export { AUTOMATED_VALUES as $, stopRepeatFromEmail as $n, getThread as $t, collectNewAcceptedEmails as A, putAgentContact as An, downloadSentAttachmentArchiveMember as At, REPLY_STATE_UNSUPPORTED_CODE as B, runWakeSchedule as Bn, getEndpoint as Bt, parseRetryAfter as C, listSentAttachmentArchiveMembers as Cn, deleteMemory as Ct, transientFailure as D, listWakeSchedules as Dn, downloadEmailAttachmentArchiveMember as Dt, retryingOperation as E, listWakeDispatches as En, deleteWakeSchedule as Et, lateMailReread as F, reorderRoutes as Fn, getContact as Ft, formatAwaitingCell as G, sendEmail as Gn, getKey as Gt, assertAwaitingFilterRows as H, searchEmails as Hn, getFunctionRouting as Ht, sinceFromFlags as I, replyToEmail as In, getConversation as It, isAwaitingRejectedError as J, setMemory as Jn, getOutboundStatus as Jt, formatRepliesCell as K, setFunctionRoute as Kn, getMemory as Kt, sleep as L, resendAgentSignupVerification as Ln, getCreditBalance as Lt, encodeReceivedAtSearchCursor as M, putContact as Mn, getAccessMode as Mt, fetchEmailSearchPage as N, redeemCreditCode as Nn, getAccount as Nt, waitOutRetryAfter as O, pollCliLogin as On, downloadEmailAttachmentByFilename as Ot, filtersFromFlags as P, removeDefaultNetworkMember as Pn, getAgentContactPolicy as Pt, AUTOMATED_FLAG_DESCRIPTION as Q, startCliLogin as Qn, getSentEmail as Qt, AWAITING_FLAG_DESCRIPTION as R, revokeCredential as Rn, getDefaultNetworkAgent as Rt, describeApiFailure as S, listRoutes as Sn, deleteContact as St, retryTransient as T, listWakeAuthorizations as Tn, deleteWakeAuthorization as Tt, awaitingRejectedError as U, searchMemories as Un, getFunctionTestRunTrace as Ut, ReplyStateUnsupportedError as V, sdk_gen_exports as Vn, getFunction as Vt, ensureSearchReportsReplyState as W, semanticSearch as Wn, getInboxStatus as Wt, replyStateSurfaceForOperation as X, startAgentClaim as Xn, getRepeatingSend as Xt, queryUsesAwaiting as Y, simulateRoute as Yn, getOwnGrant as Yt, AUTOMATED_FILTER_UNSUPPORTED_CODE as Z, startAgentSignup as Zn, getSendFrom as Zt, isTrustedSender as _, listKeys as _n, createKey as _t, REPEAT_IDLE_MAX_MINUTES as a, listAgentContacts as an, updateRepeatingSend as ar, expectedAutomatedVerdicts as at, WaitDeadlineReached as b, listRepeatingSends as bn, createWakeSchedule as bt, classifySignalContent as c, listDefaultNetworkAgents as cn, updateWakeSchedule as cr, addDefaultNetworkMember as ct, parseRepeatTick as d, listEmailAttachmentArchiveMembers as dn, whoami as dr, checkDefaultNetworkContactAdmission as dt, getWakeSchedule as en, testFunction as er, AutomatedFilterUnsupportedError as et, preparePresenceAliveEmail as f, listEmails as fn, __exportAll as fr, checkSendability as ft, isEmailReceivedEvent as g, listGroups as gn, createFunction as gt, sendPreparedSignal as h, listFunctions as hn, createEndpoint as ht, REPEAT_EVERY_MAX_MINUTES as i, listAgentConnections as in, updateKey as ir, ensureSearchReportsAutomated as it, cursorFromAcceptedRows as j, putAgentContactPolicy as jn, downloadSentAttachmentByFilename as jt, SINCE_VALUE_HELP as k, pullWebhookEvent as kn, downloadEmailAttachmentPart as kt, parseInteractionEnvelope as l, listDefaultNetworkMembers as ln, verifyAgentClaim as lr, cancelSentEmail as lt, repeatStopCommand as m, listFunctionLogs as mn, completeWebhookEvent as mt, MAX_PRESENCE_ENVELOPE_BYTES as n, leaveOrganization as nn, updateDefaultNetworkMember as nr, automatedRejectedError as nt, REPEAT_MAX_SENDS_MAX as o, listAgentNetworks as on, updateRoute as or, hasAutomatedVerdict as ot, prepareSignalEmail as p, listEndpoints as pn, cliLogout as pt, hasReplyState as q, setFunctionSecret as qn, getOrgRoutingTopology as qt, PRESENCE_PROBE_TEXT as r, listActivityObjects as rn, updateFunction as rr, automatedSurfaceForOperation as rt, buildRepeatStopBody as s, listContacts as sn, updateWakeAuthorization as sr, isAutomatedRejectedError as st, MAX_INTERACTION_BYTES as t, inviteAgentConnection as tn, unsetFunctionRoute as tr, assertAutomatedVerdict as tt, parsePresenceEnvelope as u, listDomains as un, verifyAgentSignup as ur, cancelSentEmailByIdempotencyKey as ut, parseWebhookEvent as v, listMailboxAccess as vn, createRoute as vt, pauseForTransientFailure as w, listSentEmails as wn, deleteRoute as wt, backoffDelay as x, listRoles as xn, deleteAgentContact as xt, parseFromHeader as y, listOrganizationPeople as yn, createWakeAuthorization as yt, AWAITING_VALUES as z, rotateKey as zn, getEmail as zt };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
function object(value) {
|
|
3
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
4
|
+
}
|
|
5
|
+
/** Only explicit annotations on UUID input fields enable defaults. */
|
|
6
|
+
function retryIdFields(schema) {
|
|
7
|
+
if (!object(schema) || !object(schema.properties)) return [];
|
|
8
|
+
return Object.entries(schema.properties).filter(([, property]) => object(property) && property["x-primitive-retry-id"] === true && property.type === "string" && property.format === "uuid").map(([name]) => name);
|
|
9
|
+
}
|
|
10
|
+
function prepareRetryIds(schema, body, bodyFlagToProperty, generate = randomUUID) {
|
|
11
|
+
if (body !== void 0 && !object(body)) return {
|
|
12
|
+
body,
|
|
13
|
+
ids: []
|
|
14
|
+
};
|
|
15
|
+
const flags = new Map([...bodyFlagToProperty].map(([flag, property]) => [property, `--${flag}`]));
|
|
16
|
+
let prepared = body;
|
|
17
|
+
const ids = [];
|
|
18
|
+
for (const field of retryIdFields(schema)) {
|
|
19
|
+
if (object(prepared) && Object.hasOwn(prepared, field)) continue;
|
|
20
|
+
if (prepared === body) prepared = { ...object(body) ? body : {} };
|
|
21
|
+
const value = generate();
|
|
22
|
+
Object.defineProperty(prepared, field, {
|
|
23
|
+
value,
|
|
24
|
+
enumerable: true,
|
|
25
|
+
configurable: true,
|
|
26
|
+
writable: true
|
|
27
|
+
});
|
|
28
|
+
ids.push({
|
|
29
|
+
field,
|
|
30
|
+
flag: flags.get(field) ?? null,
|
|
31
|
+
json_path: /^[A-Za-z_][A-Za-z0-9_]*$/.test(field) ? `$.${field}` : `$[${JSON.stringify(field)}]`,
|
|
32
|
+
value,
|
|
33
|
+
source: "generated"
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
body: prepared,
|
|
38
|
+
ids
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
const generatedIds = /* @__PURE__ */ new WeakMap();
|
|
42
|
+
/** Store metadata per invocation, never on a shared command class or alias. */
|
|
43
|
+
function rememberRetryIds(command, ids) {
|
|
44
|
+
if (ids.length) generatedIds.set(command, ids);
|
|
45
|
+
else generatedIds.delete(command);
|
|
46
|
+
}
|
|
47
|
+
function takeRetryIds(command) {
|
|
48
|
+
const ids = generatedIds.get(command) ?? [];
|
|
49
|
+
generatedIds.delete(command);
|
|
50
|
+
return ids;
|
|
51
|
+
}
|
|
52
|
+
function writeRetryIdNotice(ids) {
|
|
53
|
+
for (const id of ids) {
|
|
54
|
+
const reference = id.flag ?? id.json_path;
|
|
55
|
+
const retry = id.flag ? `with ${id.flag} ${id.value}` : `with ${id.json_path} set to this value in your JSON body`;
|
|
56
|
+
process.stderr.write(`Retry ID (${reference}): ${id.value}\nRetry the same operation and inputs ${retry}.\n`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
export { writeRetryIdNotice as a, takeRetryIds as i, rememberRetryIds as n, retryIdFields as r, prepareRetryIds as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as retryTransient, _ as isTrustedSender, c as classifySignalContent } from "./repeats-Dj_o6c-X-
|
|
1
|
+
import { T as retryTransient, _ as isTrustedSender, c as classifySignalContent } from "./repeats-Dj_o6c-X-CliyH3ge.js";
|
|
2
2
|
// src/oclif/presence-provenance.ts
|
|
3
3
|
function readPresenceProjection(detail) {
|
|
4
4
|
if (!detail || typeof detail !== "object") return null;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { M as bareAddress, ft as classifySendError, kt as successfulSendOutcome, s as extractErrorPayload } from "./api-command
|
|
1
|
+
import { Gn as sendEmail, S as describeApiFailure, h as sendPreparedSignal, ht as createEndpoint, p as prepareSignalEmail, wn as listSentEmails, zt as getEmail } from "./repeats-Dj_o6c-X-CliyH3ge.js";
|
|
2
|
+
import { M as bareAddress, ft as classifySendError, kt as successfulSendOutcome, s as extractErrorPayload } from "./api-command-DXiAX_N2.js";
|
|
3
3
|
import { recordSentSignal } from "./oclif/auto-signals.js";
|
|
4
4
|
import { _ as acquireListenLock, c as mailTime, d as readMailJson, f as removeMailFile, h as writeMailJson, i as mailId, l as privateMailDirectory, m as withMailLock, n as invalidSharedMail, o as mailObject, p as syncMailDirectory, r as mailAddress, s as mailString, t as SharedMailStateError, v as compareListenProcessIdentity, x as listenProcessIdentity, y as listenIdentity } from "./shared-mail-files-BAQSGxxz.js";
|
|
5
|
-
import { i as readApiBeforeDeadline, n as isPlainChatReply, o as scopedChatSenderTrust } from "./scoped-chat-
|
|
5
|
+
import { i as readApiBeforeDeadline, n as isPlainChatReply, o as scopedChatSenderTrust } from "./scoped-chat-CUy0Ta_y.js";
|
|
6
6
|
import { n as tryOwnSharedMail, r as waitForSharedMailChange, t as readSharedMailOwner } from "./shared-mail-watch-BAPMsFNv.js";
|
|
7
7
|
import { Errors } from "@oclif/core";
|
|
8
8
|
import { opendirSync } from "node:fs";
|
|
9
9
|
import { createHash, randomUUID, scryptSync } from "node:crypto";
|
|
10
10
|
import { dirname, join } from "node:path";
|
|
11
11
|
import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
12
|
-
// ../sdk-node/dist/api-
|
|
12
|
+
// ../sdk-node/dist/api-DgSs0mmn.js
|
|
13
13
|
const jsonBodySerializer = { bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value) };
|
|
14
14
|
function createSseClient({ onRequest, onSseError, onSseEvent, responseTransformer, responseValidator, sseDefaultRetryDelay, sseMaxRetryAttempts, sseMaxRetryDelay, sseSleepFn, url, ...options }) {
|
|
15
15
|
let lastEventId;
|