@oxygen-agent/cli 1.1045.26 → 1.1046.47
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 +1 -1
- package/dist/commands/mailboxes.js +3 -3
- package/dist/commands/senders.js +15 -8
- package/dist/commands/suppressions.js +3 -1
- package/node_modules/@oxygen/shared/dist/messages/linkedin-classification-scope.d.ts +34 -0
- package/node_modules/@oxygen/shared/dist/messages/linkedin-classification-scope.js +37 -0
- package/node_modules/@oxygen/shared/dist/sequences/dnc-rules.d.ts +19 -0
- package/node_modules/@oxygen/shared/dist/sequences/dnc-rules.js +21 -0
- package/node_modules/@oxygen/shared/dist/sequences/email-dsn.js +22 -0
- package/node_modules/@oxygen/shared/dist/version.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/version.generated.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/version.generated.js +1 -1
- package/node_modules/@oxygen/shared/dist/version.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -843,13 +843,13 @@ export function registerMailboxesFamily(program, handleAsyncAction) {
|
|
|
843
843
|
: requestOxygen(`/api/cli/mailboxes/sync?${new URLSearchParams({ mailbox }).toString()}`));
|
|
844
844
|
}))
|
|
845
845
|
.addCommand(new Command("connect-oauth")
|
|
846
|
-
.description("Connect Gmail/Microsoft 365 with --vendor composio to import all mail into Unibox and business activity into CRM. The recurring rate is 100 credits per standard mailbox-month or 25 for Entra, including history, sync and analysis; previews cost 0, with no extra execution fee. Before consent, inspect current monthly connection prices and first-debit timing with billing commitments --view connection-prices --json. Quote a standard mailbox count with billing estimate --mailboxes <n> --json; the managed preview shows the listed rate; an unavailable managed Gmail connection directs you to OXYGEN support, and an unavailable managed Microsoft connection offers OXYGEN's own sign-in (--vendor oxygen --authorization-mode individual) as an explicit, sending-only choice. Managed OAuth requires provider rollout readiness and exact registered addresses, max 10. Use mailboxes sync for progress and pause/resume/disconnect. Composio uses individual owner consent only. Native --vendor oxygen retains its existing polling; full history/CRM requires managed reconnection. Warm-up retains its existing eligibility and pricing. Preview by default; pass --approved only after reviewing exact candidates. --vendor oxygen requires an exact address list and never discovers a domain directory. For --vendor oxygen only, Microsoft supports --authorization-mode tenant (one administrator approval, up to 500 exact selected addresses, recommended for dedicated sending tenants) or individual (one account sign-in per mailbox, max 10 per run, recommended for ordinary company/personal mailboxes). For Microsoft's built-in roles, tenant mode requires a Global Administrator or Privileged Role Administrator because it requests the Microsoft Graph application Mail.Send and Mail.Read permissions; Application Administrator and Cloud Application Administrator cannot consent to Microsoft Graph application roles. Microsoft's application grant is tenant-wide at the provider; OXYGEN—not Microsoft—enforces the selected-address boundary at verification and send time unless the tenant separately configures Exchange Application RBAC. For non-managed Microsoft mailboxes, native-send approval does not authorize OXYGEN Warm-up: every mailbox still needs its own `mailboxes warmup microsoft` Outlook consent before standalone enrollment. Connecting authorization does not change whether a mailbox is active or disabled. Google uses individual OAuth; --google-smtp with vendor=oxygen explicitly previews full-mail SMTP OAuth consent. Source tokens, passwords, authenticator seeds, and one-time codes never transfer. Managed authorization paths remain available through their vendor options.")
|
|
846
|
+
.description("Connect Gmail/Microsoft 365 with --vendor composio to import all mail into Unibox and business activity into CRM. The recurring rate is 100 credits per standard mailbox-month or 25 for Entra, including history, sync and analysis; previews cost 0, with no extra execution fee. Before consent, inspect current monthly connection prices and first-debit timing with billing commitments --view connection-prices --json. Quote a standard mailbox count with billing estimate --mailboxes <n> --json; the managed preview shows the listed rate; an unavailable managed Gmail connection directs you to OXYGEN support, and an unavailable managed Microsoft connection offers OXYGEN's own sign-in (--vendor oxygen --authorization-mode individual) as an explicit, sending-only choice. Managed OAuth requires provider rollout readiness and exact registered addresses, max 10. Use mailboxes sync for progress and pause/resume/disconnect. Composio uses individual owner consent only. Native --vendor oxygen retains its existing polling; full history/CRM requires managed reconnection. Warm-up retains its existing eligibility and pricing. Preview by default; pass --approved only after reviewing exact candidates. --vendor oxygen requires an exact address list and never discovers a domain directory. For --vendor oxygen only, Microsoft supports --authorization-mode tenant (one administrator approval, up to 500 exact selected addresses, recommended for dedicated sending tenants) or individual (one account sign-in per mailbox, max 10 per run, recommended for ordinary company/personal mailboxes). For Microsoft's built-in roles, tenant mode requires a Global Administrator or Privileged Role Administrator because it requests the Microsoft Graph application Mail.Send and Mail.Read permissions; Application Administrator and Cloud Application Administrator cannot consent to Microsoft Graph application roles. Microsoft's application grant is tenant-wide at the provider; OXYGEN—not Microsoft—enforces the selected-address boundary at verification and send time unless the tenant separately configures Exchange Application RBAC. For non-managed Microsoft mailboxes, native-send approval does not authorize OXYGEN Warm-up: every mailbox still needs its own `mailboxes warmup microsoft` Outlook consent before standalone enrollment. Connecting authorization does not change whether a mailbox is active or disabled. Google uses individual OAuth; --google-smtp with vendor=oxygen or vendor=inboxkit explicitly previews full-mail SMTP OAuth consent. Source tokens, passwords, authenticator seeds, and one-time codes never transfer. Managed authorization paths remain available through their vendor options.")
|
|
847
847
|
.addHelpText("after", "\nDocs: https://oxygen-agent.com/docs/providers/mailboxes\n")
|
|
848
848
|
.option("--provider <provider>", "Mailbox provider: google or microsoft.")
|
|
849
849
|
.option("--vendor <vendor>", "Authorization path: composio for customer-owned Gmail/Microsoft 365 with managed consent, history and CRM; oxygen for native/tenant consent; zapmail (default) or inboxkit for provisioned inboxes.")
|
|
850
850
|
.option("--mailboxes <list>", "Comma-separated exact mailbox addresses. Required for vendor=composio (max 10) or vendor=oxygen (tenant mode max 500; individual mode max 10).")
|
|
851
851
|
.option("--authorization-mode <mode>", "vendor=oxygen only: auto, tenant, or individual. Tenant is Microsoft-only and never scans the directory.")
|
|
852
|
-
.option("--google-smtp", "oxygen
|
|
852
|
+
.option("--google-smtp", "google with vendor oxygen or inboxkit: request full-mail OAuth access for SMTP XOAUTH2 (inboxkit re-asks managed mailboxes that lack it). Preview scopes before approval.")
|
|
853
853
|
.option("--domains <list>", "Comma-separated sending domains to limit an inboxkit run to. Omit to cover every domain in the pool.")
|
|
854
854
|
.option("--no-canary", "inboxkit only: fan out to every eligible mailbox on a domain that has never connected one, instead of firing a single canary first.")
|
|
855
855
|
.option("--connection <id>", "Zapmail connection id. Defaults to the org's active Zapmail connection.")
|
|
@@ -1272,7 +1272,7 @@ export function registerMailboxesFamily(program, handleAsyncAction) {
|
|
|
1272
1272
|
});
|
|
1273
1273
|
}))
|
|
1274
1274
|
.addCommand(new Command("reconnect")
|
|
1275
|
-
.description("Manual repair for an existing live paid seat when automatic credential repair is disabled, exhausted, or needs a new credential: push the mailbox's CURRENT credential to its warmup provider. Use this when a new app password is needed because the old one was rotated or revoked (the provider reporting 'Username and Password not accepted'): re-import the new credential with `mailboxes import`, then run this. It costs 0 credits and leaves your warmup subscription and its renewal date exactly as they are — you do NOT need to disable and re-enable warmup, which would charge a second month. The provider cannot change a stored password in place, so the inbox's warmup history restarts from day 1. Targets the whole pool unless --mailboxes is given.")
|
|
1275
|
+
.description("Manual repair for an existing live paid seat when automatic credential repair is disabled, exhausted, or needs a new credential: push the mailbox's CURRENT credential to its warmup provider. Use this when a new app password is needed because the old one was rotated or revoked (the provider reporting 'Username and Password not accepted'): re-import the new credential with `mailboxes import`, then run this. It costs 0 credits and leaves your warmup subscription and its renewal date exactly as they are — you do NOT need to disable and re-enable warmup, which would charge a second month. The provider cannot change a stored password in place, so the inbox's warmup history restarts from day 1. A Microsoft inbox has no password: for a managed InboxKit one, reconnect replaces the seat through a fresh native export; a consent-connected one is refused. Targets the whole pool unless --mailboxes is given.")
|
|
1276
1276
|
.option("--mailboxes <list>", "Comma-separated mailbox ids or addresses. Omit for the whole pool.")
|
|
1277
1277
|
.option("--json", "Print a JSON envelope.")
|
|
1278
1278
|
.action(async (options) => {
|
package/dist/commands/senders.js
CHANGED
|
@@ -77,24 +77,31 @@ export function registerSendersFamily(program, handleAsyncAction) {
|
|
|
77
77
|
});
|
|
78
78
|
}))
|
|
79
79
|
.addCommand(new Command("inbox-scope")
|
|
80
|
-
.description("Inspect or change which LinkedIn conversations OXYGEN stores for one sender. Scope changes are internal and zero-credit: they do not sync LinkedIn or send a message.")
|
|
80
|
+
.description("Inspect or change which LinkedIn conversations OXYGEN stores for one sender, and which of them AI reply classification covers. Scope changes are internal and zero-credit: they do not sync LinkedIn or send a message.")
|
|
81
81
|
.addCommand(new Command("get")
|
|
82
|
-
.description("Show whether a sender syncs only OXYGEN-started conversations or its entire LinkedIn inbox.")
|
|
82
|
+
.description("Show whether a sender syncs only OXYGEN-started conversations or its entire LinkedIn inbox, and which chats AI reply classification covers.")
|
|
83
83
|
.argument("<id>", "Sender account id, connection id, or Unipile account id.")
|
|
84
84
|
.option("--json", "Print a JSON envelope.")
|
|
85
85
|
.action(async (id, options) => {
|
|
86
86
|
await handleAsyncAction("senders inbox-scope get", options, () => requestOxygen(`/api/cli/senders/${encodeURIComponent(id)}/inbox-scope`));
|
|
87
87
|
}))
|
|
88
88
|
.addCommand(new Command("set")
|
|
89
|
-
.description("Set LinkedIn inbox privacy. oxygen_initiated hides and stops ingesting unrelated chats; all opts into the full inbox. This internal, zero-credit change does not trigger a provider sync or send a message. Existing stored messages are not deleted.")
|
|
89
|
+
.description("Set LinkedIn inbox privacy (--scope), which stored chats AI reply classification covers (--classify), or both. oxygen_initiated hides and stops ingesting unrelated chats; all opts into the full inbox. This internal, zero-credit change does not trigger a provider sync or send a message. Existing stored messages are not deleted.")
|
|
90
90
|
.argument("<id>", "Sender account id, connection id, or Unipile account id.")
|
|
91
|
-
.
|
|
91
|
+
.option("--scope <scope>", "oxygen_initiated or all.")
|
|
92
|
+
.option("--classify <scope>", "Which stored chats AI reply classification triages (each classified chat uses credits): all (default), oxygen_initiated (chats OXYGEN started and chats with leads of your Sequences on this account; other chats stay in Unibox unclassified at no cost) or off (none; a campaign that pauses the company on reply then keeps it paused until you resume it). Applies to new messages.")
|
|
92
93
|
.option("--json", "Print a JSON envelope.")
|
|
93
94
|
.action(async (id, options) => {
|
|
94
|
-
await handleAsyncAction("senders inbox-scope set", options, () =>
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
await handleAsyncAction("senders inbox-scope set", options, () => {
|
|
96
|
+
const scope = readOption(options.scope);
|
|
97
|
+
const classify = readOption(options.classify);
|
|
98
|
+
if (!scope && !classify)
|
|
99
|
+
throw new Error("Provide --scope, --classify, or both.");
|
|
100
|
+
return requestOxygen(`/api/cli/senders/${encodeURIComponent(id)}/inbox-scope`, {
|
|
101
|
+
method: "PATCH",
|
|
102
|
+
body: { ...(scope ? { scope } : {}), ...(classify ? { classification_scope: classify } : {}) },
|
|
103
|
+
});
|
|
104
|
+
});
|
|
98
105
|
})))
|
|
99
106
|
.addCommand(new Command("proxy-country")
|
|
100
107
|
.description("Move a LinkedIn sender's automatic proxy to another country without reconnecting. The account picks a proxy there at once when one is free; otherwise its sequences stay paused and each `senders sync` asks again. Zero credits.")
|
|
@@ -47,6 +47,7 @@ export function registerSuppressionsFamily(program, handleAsyncAction) {
|
|
|
47
47
|
.requiredOption("--rule <key>", "Rule key from `policy show` (e.g. linkedin_reply, whatsapp_reply, email_hard_bounce, reply_status:not_interested).")
|
|
48
48
|
.requiredOption("--effect <effect>", "off (do nothing), stop_only (end this enrollment only) or suppress (also add to the do-not-contact list).")
|
|
49
49
|
.option("--reason <reason>", "Reason stamped on the list entry when the rule suppresses. Defaults to the rule's own.")
|
|
50
|
+
.option("--applies-to <which>", "linkedin_reply only: all (every inbound message, the default) or enrolled (only someone enrolled in a Sequence on that LinkedIn account, so people who write to you by hand are not added). Omitted keeps the current choice.")
|
|
50
51
|
.option("--json", "Print a JSON envelope.")
|
|
51
52
|
.action(async (options) => {
|
|
52
53
|
await handleAsyncAction("suppressions policy set", options, () => {
|
|
@@ -57,9 +58,10 @@ export function registerSuppressionsFamily(program, handleAsyncAction) {
|
|
|
57
58
|
if (!effect)
|
|
58
59
|
throw new Error("--effect is required.");
|
|
59
60
|
const reason = readOption(options.reason);
|
|
61
|
+
const appliesTo = readOption(options.appliesTo);
|
|
60
62
|
return requestOxygen("/api/cli/suppressions/policy", {
|
|
61
63
|
method: "POST",
|
|
62
|
-
body: { rule, effect, ...(reason ? { reason } : {}) },
|
|
64
|
+
body: { rule, effect, ...(reason ? { reason } : {}), ...(appliesTo ? { applies_to: appliesTo } : {}) },
|
|
63
65
|
});
|
|
64
66
|
});
|
|
65
67
|
}))
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which stored chats of a LinkedIn account the paid reply classifier triages
|
|
3
|
+
* (Tim's support autopilot, 2026-11-16, T-452; the email twin is
|
|
4
|
+
* email-classification-scope.ts, T-316). Inbox scope decides which chats enter
|
|
5
|
+
* OXYGEN; this decides which of those cost a classification.
|
|
6
|
+
*
|
|
7
|
+
* - `all` (default): every chat the inbox scope admits, as before this setting.
|
|
8
|
+
* - `oxygen_initiated`: chats OXYGEN started (the chats an `oxygen_initiated`
|
|
9
|
+
* inbox shows) and chats with a lead of a Sequence on this account (what
|
|
10
|
+
* reply-stop counts as a campaign reply). Chats someone started by hand stay
|
|
11
|
+
* in Unibox unclassified, at no cost.
|
|
12
|
+
* - `off`: none. A campaign that pauses the company on reply then keeps that
|
|
13
|
+
* company paused until someone resumes it, since no classification decides it.
|
|
14
|
+
*
|
|
15
|
+
* An unclassified chat gets no AI status, so no reply draft, hot-lead
|
|
16
|
+
* notification, reply-classification do-not-contact rule or CRM lead-stage move
|
|
17
|
+
* (a message from someone already in the CRM is still logged on their record).
|
|
18
|
+
* Reply-stop and the `linkedin_reply` do-not-contact rule never depend on
|
|
19
|
+
* classification. tenant-db's `dmClassificationInScopeSql` is the SQL twin.
|
|
20
|
+
*/
|
|
21
|
+
export declare const LINKEDIN_CLASSIFICATION_SCOPES: readonly ["all", "oxygen_initiated", "off"];
|
|
22
|
+
export type LinkedInClassificationScope = (typeof LINKEDIN_CLASSIFICATION_SCOPES)[number];
|
|
23
|
+
/** Sender-account metadata key holding an explicit choice. */
|
|
24
|
+
export declare const LINKEDIN_CLASSIFICATION_SCOPE_KEY = "classification_scope";
|
|
25
|
+
export type LinkedInClassificationScopeView = {
|
|
26
|
+
scope: LinkedInClassificationScope;
|
|
27
|
+
/** `setting` when someone chose it; `default` otherwise. */
|
|
28
|
+
source: "setting" | "default";
|
|
29
|
+
};
|
|
30
|
+
export declare function isLinkedInClassificationScope(value: unknown): value is LinkedInClassificationScope;
|
|
31
|
+
/** The scope a LinkedIn account's chats are classified under. An unknown stored value reads as the default. */
|
|
32
|
+
export declare function resolveLinkedInClassificationScope(metadata: Record<string, unknown> | null | undefined): LinkedInClassificationScopeView;
|
|
33
|
+
/** One customer-facing sentence per scope for the CLI/MCP envelope. */
|
|
34
|
+
export declare const LINKEDIN_CLASSIFICATION_SCOPE_BEHAVIOR: Record<LinkedInClassificationScope, string>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which stored chats of a LinkedIn account the paid reply classifier triages
|
|
3
|
+
* (Tim's support autopilot, 2026-11-16, T-452; the email twin is
|
|
4
|
+
* email-classification-scope.ts, T-316). Inbox scope decides which chats enter
|
|
5
|
+
* OXYGEN; this decides which of those cost a classification.
|
|
6
|
+
*
|
|
7
|
+
* - `all` (default): every chat the inbox scope admits, as before this setting.
|
|
8
|
+
* - `oxygen_initiated`: chats OXYGEN started (the chats an `oxygen_initiated`
|
|
9
|
+
* inbox shows) and chats with a lead of a Sequence on this account (what
|
|
10
|
+
* reply-stop counts as a campaign reply). Chats someone started by hand stay
|
|
11
|
+
* in Unibox unclassified, at no cost.
|
|
12
|
+
* - `off`: none. A campaign that pauses the company on reply then keeps that
|
|
13
|
+
* company paused until someone resumes it, since no classification decides it.
|
|
14
|
+
*
|
|
15
|
+
* An unclassified chat gets no AI status, so no reply draft, hot-lead
|
|
16
|
+
* notification, reply-classification do-not-contact rule or CRM lead-stage move
|
|
17
|
+
* (a message from someone already in the CRM is still logged on their record).
|
|
18
|
+
* Reply-stop and the `linkedin_reply` do-not-contact rule never depend on
|
|
19
|
+
* classification. tenant-db's `dmClassificationInScopeSql` is the SQL twin.
|
|
20
|
+
*/
|
|
21
|
+
export const LINKEDIN_CLASSIFICATION_SCOPES = ["all", "oxygen_initiated", "off"];
|
|
22
|
+
/** Sender-account metadata key holding an explicit choice. */
|
|
23
|
+
export const LINKEDIN_CLASSIFICATION_SCOPE_KEY = "classification_scope";
|
|
24
|
+
export function isLinkedInClassificationScope(value) {
|
|
25
|
+
return typeof value === "string" && LINKEDIN_CLASSIFICATION_SCOPES.includes(value);
|
|
26
|
+
}
|
|
27
|
+
/** The scope a LinkedIn account's chats are classified under. An unknown stored value reads as the default. */
|
|
28
|
+
export function resolveLinkedInClassificationScope(metadata) {
|
|
29
|
+
const stored = metadata?.[LINKEDIN_CLASSIFICATION_SCOPE_KEY];
|
|
30
|
+
return isLinkedInClassificationScope(stored) ? { scope: stored, source: "setting" } : { scope: "all", source: "default" };
|
|
31
|
+
}
|
|
32
|
+
/** One customer-facing sentence per scope for the CLI/MCP envelope. */
|
|
33
|
+
export const LINKEDIN_CLASSIFICATION_SCOPE_BEHAVIOR = {
|
|
34
|
+
all: "AI reply classification (credits per classified chat) runs on every stored LinkedIn chat with a new message.",
|
|
35
|
+
oxygen_initiated: "AI reply classification runs only on chats OXYGEN started and chats with leads of your Sequences on this account. Other chats stay in Unibox unclassified at no cost: no AI status, reply draft, hot-lead notification or CRM lead-stage move.",
|
|
36
|
+
off: "No AI reply classification on this account: no AI status, reply draft, hot-lead notification or CRM lead-stage move, and a campaign that pauses the company on reply keeps that company paused until you resume it.",
|
|
37
|
+
};
|
|
@@ -43,6 +43,18 @@
|
|
|
43
43
|
export declare const DNC_RULE_EFFECTS: readonly ["off", "stop_only", "suppress"];
|
|
44
44
|
export type DncRuleEffect = (typeof DNC_RULE_EFFECTS)[number];
|
|
45
45
|
export declare const DNC_RULE_EFFECT_LABELS: Record<DncRuleEffect, string>;
|
|
46
|
+
/**
|
|
47
|
+
* Which inbound messages a reply rule counts (Tim's support autopilot,
|
|
48
|
+
* 2026-11-16, T-452). `all` is every inbound message, as the rule always
|
|
49
|
+
* worked. `enrolled` counts only a message from someone enrolled in a Sequence
|
|
50
|
+
* on the receiving account before it arrived (the match reply-stop uses), so a
|
|
51
|
+
* workspace syncing its whole LinkedIn inbox does not put everyone who writes
|
|
52
|
+
* to it by hand on the do-not-contact list. Stored in `dnc_rules.metadata`.
|
|
53
|
+
*/
|
|
54
|
+
export declare const DNC_RULE_APPLIES_TO: readonly ["all", "enrolled"];
|
|
55
|
+
export type DncRuleAppliesTo = (typeof DNC_RULE_APPLIES_TO)[number];
|
|
56
|
+
export declare const DNC_RULE_APPLIES_TO_LABELS: Record<DncRuleAppliesTo, string>;
|
|
57
|
+
export declare function isDncRuleAppliesTo(value: unknown): value is DncRuleAppliesTo;
|
|
46
58
|
/**
|
|
47
59
|
* Which ledger a rule writes when it resolves to `suppress`. This decides which
|
|
48
60
|
* reason enum the configured reason is validated against, so a rule can never be
|
|
@@ -70,6 +82,11 @@ export type DncRuleDefinition = {
|
|
|
70
82
|
* behaving like `off`.
|
|
71
83
|
*/
|
|
72
84
|
allowedEffects: readonly DncRuleEffect[];
|
|
85
|
+
/**
|
|
86
|
+
* Which messages the rule may be limited to. Absent means `all` only: only a
|
|
87
|
+
* caller that can tell an enrolled lead's message apart offers `enrolled`.
|
|
88
|
+
*/
|
|
89
|
+
appliesToOptions?: readonly DncRuleAppliesTo[];
|
|
73
90
|
/** Surfaces must warn before this rule is set below `suppress`. See the header. */
|
|
74
91
|
compliance?: boolean;
|
|
75
92
|
/** Grouping for the surfaces. */
|
|
@@ -110,6 +127,8 @@ export declare function replyStatusRule(label: {
|
|
|
110
127
|
}): DncRuleDefinition;
|
|
111
128
|
/** The builtin definition for a key, or null when the key is not a builtin. */
|
|
112
129
|
export declare function builtinDncRule(key: string): DncRuleDefinition | null;
|
|
130
|
+
/** The `applies_to` values a rule accepts; every rule accepts `all`. */
|
|
131
|
+
export declare function allowedDncRuleAppliesTo(rule: DncRuleDefinition): readonly DncRuleAppliesTo[];
|
|
113
132
|
export declare function isDncRuleEffect(value: unknown): value is DncRuleEffect;
|
|
114
133
|
/**
|
|
115
134
|
* Resolve a stored rule key to its definition. A `reply_status:*` key resolves even
|
|
@@ -46,6 +46,22 @@ export const DNC_RULE_EFFECT_LABELS = {
|
|
|
46
46
|
stop_only: "Stop this enrollment only",
|
|
47
47
|
suppress: "Stop and add to do-not-contact",
|
|
48
48
|
};
|
|
49
|
+
/**
|
|
50
|
+
* Which inbound messages a reply rule counts (Tim's support autopilot,
|
|
51
|
+
* 2026-11-16, T-452). `all` is every inbound message, as the rule always
|
|
52
|
+
* worked. `enrolled` counts only a message from someone enrolled in a Sequence
|
|
53
|
+
* on the receiving account before it arrived (the match reply-stop uses), so a
|
|
54
|
+
* workspace syncing its whole LinkedIn inbox does not put everyone who writes
|
|
55
|
+
* to it by hand on the do-not-contact list. Stored in `dnc_rules.metadata`.
|
|
56
|
+
*/
|
|
57
|
+
export const DNC_RULE_APPLIES_TO = ["all", "enrolled"];
|
|
58
|
+
export const DNC_RULE_APPLIES_TO_LABELS = {
|
|
59
|
+
all: "Any message",
|
|
60
|
+
enrolled: "Only Sequence leads",
|
|
61
|
+
};
|
|
62
|
+
export function isDncRuleAppliesTo(value) {
|
|
63
|
+
return typeof value === "string" && DNC_RULE_APPLIES_TO.includes(value);
|
|
64
|
+
}
|
|
49
65
|
/**
|
|
50
66
|
* Which ledger a rule writes when it resolves to `suppress`. This decides which
|
|
51
67
|
* reason enum the configured reason is validated against, so a rule can never be
|
|
@@ -124,6 +140,7 @@ export const DNC_BUILTIN_RULES = [
|
|
|
124
140
|
defaultEffect: "suppress",
|
|
125
141
|
defaultReason: "replied",
|
|
126
142
|
allowedEffects: ALL_EFFECTS,
|
|
143
|
+
appliesToOptions: DNC_RULE_APPLIES_TO,
|
|
127
144
|
group: "automatic",
|
|
128
145
|
},
|
|
129
146
|
{
|
|
@@ -199,6 +216,10 @@ const BUILTIN_BY_KEY = new Map(DNC_BUILTIN_RULES.map((rule) => [rule.key, rule])
|
|
|
199
216
|
export function builtinDncRule(key) {
|
|
200
217
|
return BUILTIN_BY_KEY.get(key) ?? null;
|
|
201
218
|
}
|
|
219
|
+
/** The `applies_to` values a rule accepts; every rule accepts `all`. */
|
|
220
|
+
export function allowedDncRuleAppliesTo(rule) {
|
|
221
|
+
return rule.appliesToOptions ?? ["all"];
|
|
222
|
+
}
|
|
202
223
|
export function isDncRuleEffect(value) {
|
|
203
224
|
return typeof value === "string" && DNC_RULE_EFFECTS.includes(value);
|
|
204
225
|
}
|
|
@@ -160,6 +160,14 @@ const NO_SUCH_USER_TEXT = new RegExp(`${INVALID_RECIPIENT_TEXT.source}|${INVALID
|
|
|
160
160
|
// Exchange/Outlook headline: "<local> wasn't found at <domain>." It is the
|
|
161
161
|
// receiving directory's verdict only when it names the report's own recipient.
|
|
162
162
|
const EXCHANGE_RECIPIENT_NOT_FOUND = /(?:^|[\s>])([^\s@<>"'()]+)\s+wasn['’]t found at\s+([a-z0-9-]+(?:\.[a-z0-9-]+)+)/gi;
|
|
163
|
+
// Exchange Online's directory-based edge blocking answers an address missing from
|
|
164
|
+
// the receiving directory with exactly this reply, before any spam filtering
|
|
165
|
+
// (Microsoft: "The recipient's address doesn't exist"). Gmail and on-premises
|
|
166
|
+
// Exchange reports of it never carry the headline above. Only the reply stamped by
|
|
167
|
+
// Exchange Online on its own line (AS(...), aka.ms/EXOSmtpErrors, an outlook.com
|
|
168
|
+
// server) is that verdict; the same words elsewhere, or "Relay Access Denied", are not.
|
|
169
|
+
// Both gaps are bounded: an unbounded tail rescans a long line from every 5.4.1.
|
|
170
|
+
const EXCHANGE_DIRECTORY_REJECTION = /\b5\.4\.1\b[^\n]{0,120}?Recipient address rejected:[ \t]*Access denied\b[^\n]{0,200}?(?:\bAS\(\d+\)|aka\.ms\/EXOSmtpErrors|\.outlook\.com\b)/i;
|
|
163
171
|
const PROVIDER_REJECTED_TEXT = /(message rejected|has been blocked|\bblocked\b|\bbanned\b|\bspam\b|local policy violation|unsolicited|reputation)/i;
|
|
164
172
|
const TRANSIENT_TEXT = /(temporar|will retry|try again later|rate ?limit|throttl)/i;
|
|
165
173
|
// Greedy address capture: the character class already stops at whitespace and
|
|
@@ -190,6 +198,14 @@ function readProvider(from, haystack) {
|
|
|
190
198
|
return "microsoft";
|
|
191
199
|
return "unknown";
|
|
192
200
|
}
|
|
201
|
+
function isExchangeDirectoryRejection(haystack) {
|
|
202
|
+
// A folded header field continues on indented lines: read it as one reply.
|
|
203
|
+
const lines = haystack.replace(/\r?\n[ \t]+/g, " ").split("\n");
|
|
204
|
+
// A machine-readable Diagnostic-Code is the reply itself; quoted prose elsewhere is not.
|
|
205
|
+
const diagnostics = lines.filter(line => /^[ \t]*Diagnostic-Code[ \t]*:/i.test(line));
|
|
206
|
+
return (diagnostics.length ? diagnostics : lines)
|
|
207
|
+
.some(line => EXCHANGE_DIRECTORY_REJECTION.test(line) && !PROVIDER_REJECTED_TEXT.test(line));
|
|
208
|
+
}
|
|
193
209
|
function namesExchangeRecipientNotFound(haystack, recipient) {
|
|
194
210
|
if (!recipient)
|
|
195
211
|
return false;
|
|
@@ -222,6 +238,12 @@ function readKind(subject, haystack, hasBody, enhancedCode, recipient) {
|
|
|
222
238
|
return "delayed";
|
|
223
239
|
if (NO_SUCH_DOMAIN_CODE.test(enhancedCode))
|
|
224
240
|
return "no_such_user";
|
|
241
|
+
// Solvism, 2026-11-16 (T-467): an on-premises Exchange relay's Dutch report of
|
|
242
|
+
// Exchange Online's "550 5.4.1 Recipient address rejected: Access denied" stopped
|
|
243
|
+
// the enrollment without a bounce or suppression. 110 of 113 such production
|
|
244
|
+
// reports in 60 days lacked the Outlook headline, 90 of them sent from Gmail.
|
|
245
|
+
if (enhancedCode === "5.4.1" && isExchangeDirectoryRejection(haystack))
|
|
246
|
+
return "no_such_user";
|
|
225
247
|
// SignalFisher, 2026-10-22: Exchange's "554 5.4.14 Hop count exceeded" for
|
|
226
248
|
// malpertuis@intracen.org carried "malpertuis wasn't found at intracen.org";
|
|
227
249
|
// the receiving directory does not know the address. A routing status needs
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const OXYGEN_BUILD_VERSION = "1.
|
|
1
|
+
export declare const OXYGEN_BUILD_VERSION = "1.1046.47";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// GENERATED by scripts/ci/version-stamp.mjs from VERSION + git history. Do not edit; do not commit.
|
|
2
|
-
export const OXYGEN_BUILD_VERSION = "1.
|
|
2
|
+
export const OXYGEN_BUILD_VERSION = "1.1046.47";
|
|
@@ -49,7 +49,7 @@ export const OXYGEN_VERSION = OXYGEN_BUILD_VERSION;
|
|
|
49
49
|
// Since 2026-09-28 the release-preparation step advances this literal to the
|
|
50
50
|
// highest CLI version published on npm for at least 30 days. It never lowers
|
|
51
51
|
// the floor. The source change lands on dev before the next production release.
|
|
52
|
-
export const OXYGEN_MINIMUM_CLI_VERSION = "1.1014.
|
|
52
|
+
export const OXYGEN_MINIMUM_CLI_VERSION = "1.1014.1219";
|
|
53
53
|
// The internal GEO export first gains required pagination in this dev version.
|
|
54
54
|
// Earlier pilot clients would save a partial file without its continuation.
|
|
55
55
|
export const GEO_EXPORT_MINIMUM_CLI_VERSION = "1.1013.0";
|