@oxygen-agent/cli 1.1014.1696 → 1.1014.1870
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/admin-primary-providers-render.js +7 -2
- package/dist/command-families/program.js +4 -0
- package/dist/command-families/tables/register-relations.js +3 -2
- package/dist/command-manifest.js +14 -2
- package/dist/command-support.js +1 -1
- package/dist/commands/admin.js +82 -1
- package/dist/commands/billing.js +1 -1
- package/dist/commands/columns.js +2 -1
- package/dist/commands/copilot.js +29 -7
- package/dist/commands/domains.js +7 -0
- package/dist/commands/email-assets.d.ts +3 -0
- package/dist/commands/email-assets.js +78 -0
- package/dist/commands/email-templates.d.ts +3 -0
- package/dist/commands/email-templates.js +101 -0
- package/dist/commands/enrich-column.js +2 -1
- package/dist/commands/managed-inboxes.js +26 -1
- package/dist/commands/sequences.js +47 -12
- package/dist/commands/subscriptions.d.ts +2 -4
- package/dist/commands/subscriptions.js +297 -51
- package/dist/commands/table-runs.js +2 -1
- package/dist/sequence-start-at.d.ts +7 -0
- package/dist/sequence-start-at.js +21 -0
- package/dist/sequences-brand-kit-command.d.ts +28 -0
- package/dist/sequences-brand-kit-command.js +83 -0
- package/dist/sequences-content-commands.d.ts +28 -0
- package/dist/sequences-content-commands.js +176 -0
- package/dist/sequences-newsletter-commands.d.ts +6 -0
- package/dist/sequences-newsletter-commands.js +108 -0
- package/dist/sequences-test-send-command.d.ts +3 -0
- package/dist/sequences-test-send-command.js +47 -0
- package/node_modules/@oxygen/formula/dist/evaluate.js +2 -4
- package/node_modules/@oxygen/formula/dist/expression.d.ts +7 -5
- package/node_modules/@oxygen/formula/dist/expression.js +26 -4
- package/node_modules/@oxygen/formula/dist/formula-functions.d.ts +6 -0
- package/node_modules/@oxygen/formula/dist/formula-functions.js +55 -0
- package/node_modules/@oxygen/shared/dist/billing.d.ts +2 -2
- package/node_modules/@oxygen/shared/dist/billing.js +5 -7
- package/node_modules/@oxygen/shared/dist/bulk-email-pacing.d.ts +105 -0
- package/node_modules/@oxygen/shared/dist/bulk-email-pacing.js +125 -0
- package/node_modules/@oxygen/shared/dist/capability-discovery.d.ts +29 -0
- package/node_modules/@oxygen/shared/dist/capability-discovery.js +174 -10
- package/node_modules/@oxygen/shared/dist/contracts/clay-migration.d.ts +1 -0
- package/node_modules/@oxygen/shared/dist/contracts/clay-migration.js +28 -2
- package/node_modules/@oxygen/shared/dist/contracts/copilot-attachment-read.d.ts +24 -0
- package/node_modules/@oxygen/shared/dist/contracts/copilot-attachment-read.js +7 -0
- package/node_modules/@oxygen/shared/dist/contracts/teammates.js +6 -1
- package/node_modules/@oxygen/shared/dist/diagnostic-spool.js +90 -14
- package/node_modules/@oxygen/shared/dist/email-brand-kit.d.ts +108 -0
- package/node_modules/@oxygen/shared/dist/email-brand-kit.js +214 -0
- package/node_modules/@oxygen/shared/dist/email-delivery.d.ts +10 -0
- package/node_modules/@oxygen/shared/dist/email-delivery.js +14 -0
- package/node_modules/@oxygen/shared/dist/email-documents.d.ts +61 -0
- package/node_modules/@oxygen/shared/dist/email-documents.js +143 -0
- package/node_modules/@oxygen/shared/dist/email-dsn.js +52 -10
- package/node_modules/@oxygen/shared/dist/email-html-sanitize.d.ts +23 -0
- package/node_modules/@oxygen/shared/dist/email-html-sanitize.js +96 -0
- package/node_modules/@oxygen/shared/dist/email-subscriptions.d.ts +63 -1
- package/node_modules/@oxygen/shared/dist/email-subscriptions.js +149 -1
- package/node_modules/@oxygen/shared/dist/email-unsubscribe-token.d.ts +41 -2
- package/node_modules/@oxygen/shared/dist/email-unsubscribe-token.js +50 -1
- package/node_modules/@oxygen/shared/dist/external-write-policy.js +5 -1
- package/node_modules/@oxygen/shared/dist/group-commit-queue.d.ts +34 -0
- package/node_modules/@oxygen/shared/dist/group-commit-queue.js +103 -0
- package/node_modules/@oxygen/shared/dist/listed-website-platforms.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/listed-website-platforms.js +26 -0
- package/node_modules/@oxygen/shared/dist/newsletter-analytics.d.ts +90 -0
- package/node_modules/@oxygen/shared/dist/newsletter-analytics.js +28 -0
- package/node_modules/@oxygen/shared/dist/newsletter-test-send.d.ts +20 -0
- package/node_modules/@oxygen/shared/dist/newsletter-test-send.js +46 -0
- package/node_modules/@oxygen/shared/dist/object-storage.d.ts +11 -0
- package/node_modules/@oxygen/shared/dist/object-storage.js +12 -0
- package/node_modules/@oxygen/shared/dist/plan-band.d.ts +9 -0
- package/node_modules/@oxygen/shared/dist/plan-band.js +17 -0
- package/node_modules/@oxygen/shared/dist/plan-capabilities.d.ts +4 -2
- package/node_modules/@oxygen/shared/dist/plan-capabilities.js +12 -1
- package/node_modules/@oxygen/shared/dist/plan-limits-view.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/plan-limits-view.js +3 -0
- package/node_modules/@oxygen/shared/dist/pricing-snapshot.generated.d.ts +5 -0
- package/node_modules/@oxygen/shared/dist/pricing-snapshot.generated.js +5 -0
- package/node_modules/@oxygen/shared/dist/product-analytics-events.d.ts +29 -0
- package/node_modules/@oxygen/shared/dist/product-analytics-events.js +29 -0
- package/node_modules/@oxygen/shared/dist/provider-balance-signal.js +7 -0
- package/node_modules/@oxygen/shared/dist/sending-domain-faults.d.ts +21 -0
- package/node_modules/@oxygen/shared/dist/sending-domain-faults.js +53 -0
- package/node_modules/@oxygen/shared/dist/sending-domain-rollout.d.ts +24 -1
- package/node_modules/@oxygen/shared/dist/sending-domain-rollout.js +51 -4
- package/node_modules/@oxygen/shared/dist/sequence-failures.d.ts +10 -1
- package/node_modules/@oxygen/shared/dist/sequence-failures.js +68 -6
- package/node_modules/@oxygen/shared/dist/sequence-lifecycle.d.ts +34 -3
- package/node_modules/@oxygen/shared/dist/sequence-lifecycle.js +57 -4
- package/node_modules/@oxygen/shared/dist/sequence-template.d.ts +17 -0
- package/node_modules/@oxygen/shared/dist/sequence-template.js +0 -0
- package/node_modules/@oxygen/shared/dist/sequences.d.ts +41 -0
- package/node_modules/@oxygen/shared/dist/sequences.js +86 -4
- package/node_modules/@oxygen/shared/dist/ses-identity-policy.d.ts +19 -0
- package/node_modules/@oxygen/shared/dist/ses-identity-policy.js +54 -0
- package/node_modules/@oxygen/shared/dist/skill-play-routing.d.ts +22 -0
- package/node_modules/@oxygen/shared/dist/skill-play-routing.js +75 -0
- package/node_modules/@oxygen/shared/dist/skill-plays.generated.d.ts +5 -0
- package/node_modules/@oxygen/shared/dist/skill-plays.generated.js +269 -0
- package/node_modules/@oxygen/shared/dist/spend-safety.d.ts +7 -0
- package/node_modules/@oxygen/shared/dist/spend-safety.js +7 -0
- package/node_modules/@oxygen/shared/dist/table-limits.d.ts +6 -4
- package/node_modules/@oxygen/shared/dist/table-limits.js +6 -4
- package/node_modules/@oxygen/shared/dist/teammates.js +2 -1
- package/node_modules/@oxygen/shared/dist/user-capability-routing.js +15 -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/workspace-event-catalog.js +2 -2
- package/node_modules/@oxygen/shared/package.json +5 -0
- package/package.json +2 -2
|
@@ -117,7 +117,7 @@ export function registerManagedInboxesFamily(program, handleAsyncAction) {
|
|
|
117
117
|
.description("Buy managed monthly inboxes on a new domain or your existing Cloudflare domain. Use --existing-domain for Cloudflare: the read-only preview shows ownership, occupancy, DNS scope and blockers, with zero registration charge. --max-per-domain saves a stricter limit with the approved order, including existing addresses; later additions honor it. Preview does not save the limit or change workspace data. WITHOUT --approved this prints a priced PREVIEW with a quote_id (nothing ordered, nothing charged); re-run with --approved --quote <id> to place the order. OXYGEN Warm-up defaults on for Google, Microsoft, and Azure when available: preview and approved responses carry `warmup_activation` with the exact `mailboxes` and `scope=warmup_only`; it is null when warmup is disabled or unavailable. For InboxKit, Google carries `transport=inboxkit_managed_google_handoff`; Microsoft/Azure carries `transport=inboxkit_sequencer_export`. Both carry `mailbox_credentials_required=false` and `native_send_oauth_separate=true`, so managed warm-up needs no customer-supplied OAuth or mailbox password. Google retrieves the existing managed credential only during activation and never persists or returns it; Microsoft/Azure uses native export. Native sending authorization is separate and may still be required before OXYGEN can send. Verify each exact address with `mailboxes oauth-health --json`; InboxKit's unattended Google domain approval usually lands within minutes and the worker keeps retrying, so a waiting row is not a reason to ask the customer to sign in. This order authorizes automatic OXYGEN Warm-up activation after provisioning, so no second `mailboxes warmup enable` approval is needed. The preview shows the price in force: from the 2026-09 repricing date a Google Workspace or Microsoft 365 inbox is one flat mailbox line plus the 100-credit mailbox connection, warm-up included, which `connection_monthly_credits` shows and your balance reserves once the inbox connects (400 credits a month all-in at the committed price), and an Azure/Entra tenant is one flat hosting charge for its domain (4,000 credits/$40 a month) plus each inbox's 25-credit ($0.25) Sequencer connection with warm-up included: 6,500 credits/$65 monthly for 100 inboxes; `managed-inboxes list --json` reports the prices in force under `prices`. Domains are priced from the vendor's LIVE domain price, and any price below vendor cost is refused. A domain you bought on its own through Oxygen (`domains buy`) takes its first inboxes here too: the preview says `domain_source: owned`, nothing is registered again and `one_off_credits` is 0 (Google, Microsoft or Azure; omit --years). To add mailboxes to a domain that already has inboxes use `managed-inboxes add-inboxes`.")
|
|
118
118
|
.argument("[domain]", "Sending domain to register + host the mailboxes (e.g. send.acme.com), or one you already bought through Oxygen. May also be passed as --domain.")
|
|
119
119
|
.option("--domain <domain>", "Sending domain (alternative to the positional argument).")
|
|
120
|
-
.
|
|
120
|
+
.option("--provider <provider>", "Mailbox PLATFORM: google, microsoft, or azure. (google/microsoft cap at 5 mailboxes per domain; azure allows 100.) Required unless --connect-only.")
|
|
121
121
|
.option("--vendor <vendor>", "Pin the vendor: inboxkit. Omit to let OXYGEN choose. A named vendor with no credential FAILS rather than falling back to another.")
|
|
122
122
|
.option("--sender <id>", "Sender profile id (from `oxygen senders profiles list`) that OWNS every mailbox in this order: its first name, last name, and profile picture are stamped on each one, so you never retype them. A sender profile is one person's sending identity — their LinkedIn/WhatsApp accounts and email inboxes under one name and photo. One sender can own several natural addresses on the same domain (see --locals); do not invent people or pad a requested count with numbered aliases. Any first_name/last_name/profile_picture_url in --mailboxes/--file is dropped for the sender's own values.")
|
|
123
123
|
.option("--locals <list>", "Natural local parts for the real sender; avoid numbered suffixes unless explicitly requested, e.g. `--locals talia,talia.rosen,t.rosen` on send.acme.com orders talia@, talia.rosen@, and t.rosen@ — all owned by that one person. Requires --sender, because a bare local part carries no name and the vendor's stamp is permanent.")
|
|
@@ -129,6 +129,9 @@ export function registerManagedInboxesFamily(program, handleAsyncAction) {
|
|
|
129
129
|
.option("--dns-cleanup-records <ids>", "Optional standalone cleanup: preview deletion of these comma-separated email DNS record IDs; buys nothing. An approved existing-domain order already removes the records its preview lists.")
|
|
130
130
|
.addOption(new Option("--dns-cleanup-approved", "Delete only the reviewed email records without buying; requires --dns-cleanup-records and --dns-cleanup-hash. Request a fresh purchase quote afterward.").conflicts("approved"))
|
|
131
131
|
.option("--dns-cleanup-hash <hash>", "The plan_hash from the exact DNS cleanup preview, required to delete records.")
|
|
132
|
+
.addOption(new Option("--connect-only", "With --existing-domain: connect the domain to your existing inbox-provider workspace WITHOUT buying mailboxes, for 0 credits. Without --connect-approved it is a read-only preview listing the email DNS records approval removes and a signature.").conflicts(["approved", "dnsCleanupRecords"]))
|
|
133
|
+
.option("--connect-approved", "Apply the reviewed connect-only preview: remove exactly its listed email DNS records and connect the domain with no mailboxes. Requires --connect-only and --connect-signature.")
|
|
134
|
+
.option("--connect-signature <signature>", "The signature from the exact connect-only preview, required with --connect-approved.")
|
|
132
135
|
.option("--years <n>", "Years to register a new domain for (1-10). Omit for existing domains.")
|
|
133
136
|
.option("--redirect-url <url>", "Where the domain's web root redirects. Defaults to your workspace's company website; editable later with `oxygen domains forwarding set`.")
|
|
134
137
|
.option("--billing <path>", "Path to a JSON file with the registrant/WHOIS contact (first_name, last_name, phone, country, city, state, address_line_one, postal_code). Required on your FIRST order; later orders reuse the registrant already on file.")
|
|
@@ -146,6 +149,28 @@ export function registerManagedInboxesFamily(program, handleAsyncAction) {
|
|
|
146
149
|
const provider = readOption(options.provider);
|
|
147
150
|
if (!domain)
|
|
148
151
|
throw new Error("--domain is required.");
|
|
152
|
+
const connectSignature = readOption(options.connectSignature);
|
|
153
|
+
if ((options.connectApproved || connectSignature) && !options.connectOnly) {
|
|
154
|
+
throw new OxygenError("invalid_request", "--connect-approved and --connect-signature require --connect-only.", { exitCode: 2 });
|
|
155
|
+
}
|
|
156
|
+
if (options.connectOnly) {
|
|
157
|
+
if (!options.existingDomain || (options.connectApproved && !connectSignature)) {
|
|
158
|
+
throw new OxygenError("invalid_request", "--connect-only requires --existing-domain; --connect-approved also requires the preview's --connect-signature.", { exitCode: 2 });
|
|
159
|
+
}
|
|
160
|
+
const vendor = readOption(options.vendor);
|
|
161
|
+
return requestOxygen("/api/cli/managed-inboxes/subscribe", {
|
|
162
|
+
method: "POST",
|
|
163
|
+
body: {
|
|
164
|
+
domain,
|
|
165
|
+
existing_domain: true,
|
|
166
|
+
...(vendor ? { vendor } : {}),
|
|
167
|
+
connect_only: {
|
|
168
|
+
approved: options.connectApproved === true,
|
|
169
|
+
...(connectSignature ? { signature: connectSignature } : {}),
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
});
|
|
173
|
+
}
|
|
149
174
|
if (!provider)
|
|
150
175
|
throw new Error("--provider is required (google, microsoft, or azure).");
|
|
151
176
|
// No --count/--prefix here, deliberately: that shorthand can only
|
|
@@ -3,7 +3,12 @@ import { parseJsonObject, readNonNegativeInt, readPositiveInt } from "../cli-val
|
|
|
3
3
|
import { ansi, collectRepeatable, handleReadActionWithLens, parseJsonValue, readCreditCeilingOrZero, readCsvOption, readJsonFileValue, readPositiveNumber, readPublishingPostText, renderTextTable, splitCommaList } from "../command-support.js";
|
|
4
4
|
import { addContractFlags, readContractFlags } from "../contract-flags.js";
|
|
5
5
|
import { requestOxygen } from "../http-client.js";
|
|
6
|
+
import { sequencesBrandKitCommand } from "../sequences-brand-kit-command.js";
|
|
7
|
+
import { sequencesContentCommand } from "../sequences-content-commands.js";
|
|
8
|
+
import { formatNewsletterStatsLines, readNewsletterIntervalFlag, sequencesRecipientsCommand } from "../sequences-newsletter-commands.js";
|
|
9
|
+
import { sequencesTestSendCommand } from "../sequences-test-send-command.js";
|
|
6
10
|
import { networkMiningHostServed } from "../network-mining-host.js";
|
|
11
|
+
import { parseStartAtFlag } from "../sequence-start-at.js";
|
|
7
12
|
import { parseWorkingDaysOption } from "../sender-limits-flags.js";
|
|
8
13
|
import { isRecord, readOption } from "../util.js";
|
|
9
14
|
import { OxygenError, success } from "@oxygen/shared/cli-result";
|
|
@@ -576,6 +581,10 @@ function formatSequenceChannelFunnels(funnels, replies) {
|
|
|
576
581
|
const channels = ["linkedin", "email", "whatsapp"].filter((channel) => isRecord(byChannel[channel]));
|
|
577
582
|
if (channels.length === 0)
|
|
578
583
|
return [];
|
|
584
|
+
// OXYGEN offers no open tracking, so on such a deployment every channel's
|
|
585
|
+
// opens are not_supported and the column would read n/a on every row (Tim,
|
|
586
|
+
// 2026-10-22: hide it). It stays while any channel can report opens.
|
|
587
|
+
const showOpened = channels.some((channel) => stringValue(recordValue(recordValue(recordValue(byChannel[channel]).coverage).opened).state) !== "not_supported");
|
|
579
588
|
const rows = channels.map((channel) => {
|
|
580
589
|
const funnel = recordValue(byChannel[channel]);
|
|
581
590
|
const invites = recordValue(funnel.invites);
|
|
@@ -585,13 +594,13 @@ function formatSequenceChannelFunnels(funnels, replies) {
|
|
|
585
594
|
numberText(funnel.sends),
|
|
586
595
|
numericValue(invites.sent) === null ? "n/a" : `${numberText(invites.accepted)}/${numberText(invites.sent)}`,
|
|
587
596
|
funnelMetricText(funnel, "delivered"),
|
|
588
|
-
funnelMetricText(funnel, "opened"),
|
|
597
|
+
...(showOpened ? [funnelMetricText(funnel, "opened")] : []),
|
|
589
598
|
funnelMetricText(funnel, "replied"),
|
|
590
599
|
funnelRateText(funnel, "replyRate", "replied"),
|
|
591
600
|
funnelMetricText(funnel, "positiveReplied"),
|
|
592
601
|
];
|
|
593
602
|
});
|
|
594
|
-
const lines = ["", ...renderTextTable(["CHANNEL", "PEOPLE", "SENDS", "ACCEPTED", "DELIVERED", "OPENED", "REPLIED", "REPLY RATE", "POSITIVE"], rows)];
|
|
603
|
+
const lines = ["", ...renderTextTable(["CHANNEL", "PEOPLE", "SENDS", "ACCEPTED", "DELIVERED", ...(showOpened ? ["OPENED"] : []), "REPLIED", "REPLY RATE", "POSITIVE"], rows)];
|
|
595
604
|
// Name the remedy once per distinct gap rather than once per row.
|
|
596
605
|
const remedies = new Map();
|
|
597
606
|
for (const channel of channels) {
|
|
@@ -688,6 +697,7 @@ function formatSequenceStatsHealth(data) {
|
|
|
688
697
|
["Replies", numberText(stats.totalReplies ?? stats.replied)],
|
|
689
698
|
]));
|
|
690
699
|
}
|
|
700
|
+
lines.push(...formatNewsletterStatsLines(data.newsletter));
|
|
691
701
|
const link = stringValue(data.web_url) ?? stringValue(data.deepLink);
|
|
692
702
|
if (link)
|
|
693
703
|
lines.push("", link);
|
|
@@ -760,7 +770,12 @@ function operationalStateText(sequence, operational) {
|
|
|
760
770
|
if (!state)
|
|
761
771
|
return null;
|
|
762
772
|
// The server's own `lifecycle`; the shared helper covers a server that predates it.
|
|
763
|
-
const
|
|
773
|
+
const settings = isRecord(sequence.settings) ? sequence.settings : null;
|
|
774
|
+
const lifecycle = stringValue(sequence.lifecycle) ?? sequenceDisplayStatus(stringValue(sequence.status) ?? "", state, settings);
|
|
775
|
+
if (lifecycle === "scheduled") {
|
|
776
|
+
const startAt = stringValue(settings?.start_at);
|
|
777
|
+
return `${state} (scheduled${startAt ? ` for ${startAt}` : ""})`;
|
|
778
|
+
}
|
|
764
779
|
return lifecycle === "completed" ? `${state} (completed)` : state;
|
|
765
780
|
}
|
|
766
781
|
/** A listed Sequence's launch warnings (e.g. two sending schedules), one line each. */
|
|
@@ -1342,7 +1357,7 @@ export function registerSequencesFamily(program, handleAsyncAction) {
|
|
|
1342
1357
|
.description("List sequences with persisted launch status kept separate from current operational state. Fleet counts report marked-active versus operationally-live (active with nonterminal work), and rows explain flowing, paced, paused, blocked, degraded, drained, or empty work without SQL. An active sequence whose every lead has finished shows drained (completed); leads enrolled into it later are contacted on its next dispatch tick. --stats joins each row's LIFETIME funnel.")
|
|
1343
1358
|
.option("--status <status>", "Filter by status: draft, active, paused, or archived.")
|
|
1344
1359
|
.addOption(new Option("--operational-state <state>", "Filter by current work state; fleet counts remain unfiltered: empty, drained, never_started (enrolled leads, never launched), blocked, degraded, flowing, paced, or paused (work waiting on a paused sequence).").choices(["empty", "drained", "never_started", "blocked", "degraded", "flowing", "paced", "paused"]))
|
|
1345
|
-
.addOption(new Option("--lifecycle <lifecycle>", "Filter by the lifecycle a person reads; fleet counts remain unfiltered: draft, active, completed (active, every lead finished), paused, or archived.").choices([...SEQUENCE_LIFECYCLES]))
|
|
1360
|
+
.addOption(new Option("--lifecycle <lifecycle>", "Filter by the lifecycle a person reads; fleet counts remain unfiltered: draft, scheduled (active, start_at still ahead), active, completed (active, every lead finished), paused, or archived.").choices([...SEQUENCE_LIFECYCLES]))
|
|
1346
1361
|
.addOption(new Option("--channel <channel>", "Only sequences carrying this channel.").choices(["email", "linkedin", "whatsapp"]))
|
|
1347
1362
|
.option("--tag <tag>", "Only sequences carrying this workspace tag (see `oxygen tags list`).")
|
|
1348
1363
|
.option("--stats", "Attach lifetime stats per sequence (a stats pass per row — slower on large workspaces)."), SEQUENCE_LIST_PROJECTION_CONTRACT)
|
|
@@ -1672,8 +1687,8 @@ export function registerSequencesFamily(program, handleAsyncAction) {
|
|
|
1672
1687
|
.option("--bounce-protection <json>", "Sequence bounce policy JSON (partial updates merge): enabled=true, warning_rate=.02, pause_rate=.03, min_sends=20, window_days=7. Hard bounces / accepted sends in the rolling window; pauses this sequence, not the fleet. Rates are fractions; mailbox protection is separate.")
|
|
1673
1688
|
.option("--auto-optimize", "Enable the sequence-wide A/B auto-winner (default on).")
|
|
1674
1689
|
.option("--no-auto-optimize", "Disable the sequence-wide A/B auto-winner; manual variant decisions stay available.")
|
|
1675
|
-
.option("--reply-to-stop-text <text>", "Optional first-touch email footer (max 500 characters);
|
|
1676
|
-
.option("--include-unsubscribe", "Add an unsubscribe option to emails, the same as the Sending settings switch: a visible
|
|
1690
|
+
.option("--reply-to-stop-text <text>", "Optional first-touch email footer (max 500 characters); with the unsubscribe option on, plain-text emails show it in place of the link. Empty clears.")
|
|
1691
|
+
.option("--include-unsubscribe", "Add an unsubscribe option to emails, the same as the Sending settings switch: a visible opt-out (HTML a linked Unsubscribe label; plain text the --reply-to-stop-text line, else a default opt-out line, never the URL) plus one-click headers that mail apps show as an Unsubscribe button, both on first-touch cold emails; in-thread follow-ups carry neither. Zapbox sends (mailboxes imported from Zapmail, `transport: \"zapbox\"` in `mailboxes list --json`) carry the link only. Off by default. Use --reply-to-stop-text for an optional first-touch email footer. `sequences update` can switch on the link or the headers alone.")
|
|
1677
1692
|
.option("--no-include-unsubscribe", "Turn off both the visible unsubscribe link and the one-click headers.")
|
|
1678
1693
|
.option("--tracking-opens", "Opt in to open tracking (default off). Requires a verified tracking domain and deployment tracking secret.")
|
|
1679
1694
|
.option("--no-tracking-opens", "Turn OFF the open pixel for this sequence's native email sends (a deliverability knob — a pixel is spam-filter surface).")
|
|
@@ -1822,12 +1837,12 @@ export function registerSequencesFamily(program, handleAsyncAction) {
|
|
|
1822
1837
|
.option("--bounce-protection <json>", "Sequence bounce policy JSON (partial updates merge): enabled=true, warning_rate=.02, pause_rate=.03, min_sends=20, window_days=7. Hard bounces / accepted sends in the rolling window; pauses this sequence, not the fleet. Rates are fractions; mailbox protection is separate.")
|
|
1823
1838
|
.option("--auto-optimize", "Turn the A/B auto-winner on (the default): every step with variants is judged on replies, pausing losers once each variant has 100 sends and 5 replies, unless the step sets its own auto_optimize.")
|
|
1824
1839
|
.option("--no-auto-optimize", "Disable the sequence-wide A/B auto-winner; manual variant decisions stay available.")
|
|
1825
|
-
.option("--reply-to-stop-text <text>", "Optional first-touch email footer (max 500 characters);
|
|
1826
|
-
.option("--include-unsubscribe", "Add an unsubscribe option to emails, the same as the Sending settings switch: a visible
|
|
1840
|
+
.option("--reply-to-stop-text <text>", "Optional first-touch email footer (max 500 characters); with the unsubscribe option on, plain-text emails show it in place of the link. Empty clears.")
|
|
1841
|
+
.option("--include-unsubscribe", "Add an unsubscribe option to emails, the same as the Sending settings switch: a visible opt-out (HTML a linked Unsubscribe label; plain text the --reply-to-stop-text line, else a default opt-out line, never the URL) plus one-click headers that mail apps show as an Unsubscribe button, both on first-touch cold emails; in-thread follow-ups carry neither. Zapbox sends (mailboxes imported from Zapmail, `transport: \"zapbox\"` in `mailboxes list --json`) carry the link only. Off by default. Use --reply-to-stop-text for an optional first-touch email footer.")
|
|
1827
1842
|
.option("--no-include-unsubscribe", "Turn off both the visible unsubscribe link and the one-click headers.")
|
|
1828
1843
|
.option("--include-unsubscribe-headers", "Only the one-click unsubscribe headers (default off); --include-unsubscribe turns on the headers and the visible link together.")
|
|
1829
1844
|
.option("--no-include-unsubscribe-headers", "Omit one-click headers.")
|
|
1830
|
-
.option("--include-unsubscribe-link", "Only the visible recipient-bound unsubscribe footer on first-touch cold emails (default off; --include-unsubscribe adds the one-click headers too).
|
|
1845
|
+
.option("--include-unsubscribe-link", "Only the visible recipient-bound unsubscribe footer on first-touch cold emails (default off; --include-unsubscribe adds the one-click headers too). HTML messages show a linked Unsubscribe label; plain-text messages show the --reply-to-stop-text line, else a default opt-out line, instead of the URL.")
|
|
1831
1846
|
.option("--no-include-unsubscribe-link", "Turn the visible unsubscribe footer OFF. Future first-touch emails send the authored body unchanged; existing suppression records remain enforced.")
|
|
1832
1847
|
.option("--tracking-opens", "Opt in to open tracking (default off). Requires a verified tracking domain and deployment tracking secret.")
|
|
1833
1848
|
.option("--no-tracking-opens", "Turn OFF the open pixel for this sequence's native email sends (a deliverability knob — a pixel is spam-filter surface).")
|
|
@@ -2038,6 +2053,7 @@ export function registerSequencesFamily(program, handleAsyncAction) {
|
|
|
2038
2053
|
.option("--max-live-sends <n>", "Total live-send and CRM-write ceiling across channels, including LinkedIn invites/messages (positive integer). Required for email, WhatsApp, or crm_task steps; guided LinkedIn binds its positive cap in launch_review.")
|
|
2039
2054
|
.option("--launch-review-json <json>", "Guided onboarding: echo the exact preview.launch_review (digest, expiry, positive action ceiling and nonnegative credit cap). Changed inputs require a new preview.")
|
|
2040
2055
|
.option("--launch-review-file <path>", "Read the exact launch_review object from a JSON file instead of --launch-review-json.")
|
|
2056
|
+
.option("--at <time>", "Schedule a draft's start: an ISO timestamp with a timezone (2026-11-02T09:00:00Z) or \"in 30m\" / \"in 2h\" / \"in 3d\", at most 30 days ahead. With --approved it activates now and sends nothing before then (lifecycle scheduled); cancel with `sequences unschedule`.")
|
|
2041
2057
|
.option("--dry-run", "Activate the sequence (status draft → active, startedAt set) in dry-run mode: every step advances with simulated actions — no sends, CRM writes, provider calls, or credits. This is NOT the preview: `sequences start` with no flags is the side-effect-free launch preview. A later live start (--approved) restarts those leads from the first step so they are contacted for real, except deleted source rows, a person another live campaign contacts under exclude_contacted, and older duplicates of a person.")
|
|
2042
2058
|
.option("--json", "Print a JSON envelope.")
|
|
2043
2059
|
.action(async (sequence, options) => {
|
|
@@ -2051,6 +2067,7 @@ export function registerSequencesFamily(program, handleAsyncAction) {
|
|
|
2051
2067
|
: options.launchReviewJson !== undefined ? parseJsonObject(options.launchReviewJson) : undefined;
|
|
2052
2068
|
if (launchReview !== undefined && !isRecord(launchReview))
|
|
2053
2069
|
throw new OxygenError("invalid_request", "The launch review must be the exact object returned by the preview.", { exitCode: 2 });
|
|
2070
|
+
const startAt = options.at === undefined ? undefined : parseStartAtFlag(options.at);
|
|
2054
2071
|
return requestOxygen(`/api/cli/sequences/${encodeURIComponent(sequence)}/start`, {
|
|
2055
2072
|
method: "POST",
|
|
2056
2073
|
body: {
|
|
@@ -2059,6 +2076,7 @@ export function registerSequencesFamily(program, handleAsyncAction) {
|
|
|
2059
2076
|
...(maxCredits !== undefined ? { max_credits: maxCredits } : {}),
|
|
2060
2077
|
...(maxLiveSends !== undefined ? { max_live_sends: maxLiveSends } : {}),
|
|
2061
2078
|
...(launchReview !== undefined ? { launch_review: launchReview } : {}),
|
|
2079
|
+
...(startAt !== undefined ? { start_at: startAt } : {}),
|
|
2062
2080
|
},
|
|
2063
2081
|
});
|
|
2064
2082
|
});
|
|
@@ -2147,6 +2165,15 @@ export function registerSequencesFamily(program, handleAsyncAction) {
|
|
|
2147
2165
|
await handleAsyncAction("sequences pause", options, () => requestOxygen(`/api/cli/sequences/${encodeURIComponent(sequence)}/status`, {
|
|
2148
2166
|
method: "POST", body: { status: "paused" },
|
|
2149
2167
|
}));
|
|
2168
|
+
}))
|
|
2169
|
+
.addCommand(new Command("unschedule")
|
|
2170
|
+
.description("Cancel a scheduled start (`sequences start --at`) before it comes: the Sequence returns to draft, its leads to pending, and the start time is cleared. Refused once the start has come or anything was planned; pause it then. Repeating it changes nothing.")
|
|
2171
|
+
.argument("<sequence>", "Sequence id or slug.")
|
|
2172
|
+
.option("--json", "Print a JSON envelope.")
|
|
2173
|
+
.action(async (sequence, options) => {
|
|
2174
|
+
await handleAsyncAction("sequences unschedule", options, () => requestOxygen(`/api/cli/sequences/${encodeURIComponent(sequence)}/unschedule`, {
|
|
2175
|
+
method: "POST", body: {},
|
|
2176
|
+
}));
|
|
2150
2177
|
}))
|
|
2151
2178
|
.addCommand(new Command("resume")
|
|
2152
2179
|
.description("Resume a paused sequence. A campaign paused at its live send cap pauses again at once: raise the cap and resume in one step with `sequences start <sequence> --max-live-sends <n>` (preview, then --approved).")
|
|
@@ -2440,12 +2467,17 @@ export function registerSequencesFamily(program, handleAsyncAction) {
|
|
|
2440
2467
|
});
|
|
2441
2468
|
}))
|
|
2442
2469
|
.addCommand(new Command("stats")
|
|
2443
|
-
.description("Show one sequence's persisted launch status and current operational state separately, including reasons, open work, lifetime sent/terminal-failed/deferral counts, and the funnel. Today's completed sends, reservations and remaining capacity appear in the default output and daily_budget. operational.reasons carries why work is waiting (outside_send_window, mailbox_spacing, daily_send_cap_reached, ...). For a per-day send series use `sequences analytics --sequence <id> --range <window>`.")
|
|
2470
|
+
.description("Show one sequence's persisted launch status and current operational state separately, including reasons, open work, lifetime sent/terminal-failed/deferral counts, and the funnel. Today's completed sends, reservations and remaining capacity appear in the default output and daily_budget. operational.reasons carries why work is waiting (outside_send_window, mailbox_spacing, daily_send_cap_reached, ...). For a per-day send series use `sequences analytics --sequence <id> --range <window>`. A newsletter (sending-domain Sequence) adds a newsletter block: delivered, estimated opens, clicks per link, bounces, complaints, unsubscribes and a first-week timeline; per-recipient status is `sequences recipients`.")
|
|
2444
2471
|
.argument("<sequence>", "Sequence id or slug.")
|
|
2472
|
+
.option("--interval <hour|day>", "Newsletter timeline buckets over the first 7 days (default day).")
|
|
2445
2473
|
.option("--json", "Print a JSON envelope.")
|
|
2446
2474
|
.action(async (sequence, options) => {
|
|
2447
|
-
await handleReadActionWithLens("sequences stats", options, () =>
|
|
2475
|
+
await handleReadActionWithLens("sequences stats", options, () => {
|
|
2476
|
+
const interval = readNewsletterIntervalFlag(options.interval);
|
|
2477
|
+
return requestOxygen(`/api/cli/sequences/${encodeURIComponent(sequence)}/stats${interval ? `?interval=${interval}` : ""}`);
|
|
2478
|
+
}, formatSequenceStatsHealth);
|
|
2448
2479
|
}))
|
|
2480
|
+
.addCommand(sequencesRecipientsCommand())
|
|
2449
2481
|
.addCommand(new Command("esp")
|
|
2450
2482
|
.description("ESP breakdown of this sequence's email sending scope: which provider each enrolled lead's mail routes through (google/microsoft, plus named gateways like Proofpoint/Mimecast and non-matchable hosts), folded against your sending mailbox pool. Shows how many leads the CURRENT --esp-matching mode would defer before you turn it on. Resolves domains from MX + SPF (0 credits, DNS only) and caches the result, warming the send path. Preview before flipping strict/prefer.")
|
|
2451
2483
|
.argument("<sequence>", "Sequence id or slug.")
|
|
@@ -2480,5 +2512,8 @@ export function registerSequencesFamily(program, handleAsyncAction) {
|
|
|
2480
2512
|
.option("--json", "Print a JSON envelope.")
|
|
2481
2513
|
.action(async (sequence, options) => {
|
|
2482
2514
|
await handleSequenceVariantsAction(sequence, options);
|
|
2483
|
-
}))
|
|
2515
|
+
}))
|
|
2516
|
+
.addCommand(sequencesContentCommand(handleAsyncAction))
|
|
2517
|
+
.addCommand(sequencesBrandKitCommand(handleAsyncAction))
|
|
2518
|
+
.addCommand(sequencesTestSendCommand(handleAsyncAction)));
|
|
2484
2519
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { ExtractedCommandActionHandler } from "../command-support.js";
|
|
2
|
+
import { type EmailContactImportRow } from "@oxygen/shared/email-subscriptions";
|
|
2
3
|
import { Command } from "commander";
|
|
3
|
-
type ImportEntry =
|
|
4
|
-
email: string;
|
|
5
|
-
person_id?: string;
|
|
6
|
-
};
|
|
4
|
+
type ImportEntry = EmailContactImportRow;
|
|
7
5
|
/** Read --file as JSON (by extension or content) or as CSV with an email column. */
|
|
8
6
|
export declare function readSubscriptionImportFile(path: string): ImportEntry[];
|
|
9
7
|
export declare function registerSubscriptionsFamily(program: Command, handleAsyncAction: ExtractedCommandActionHandler): void;
|