@oxygen-agent/cli 1.1036.6 → 1.1037.21
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/admin.js +48 -0
- package/node_modules/@oxygen/shared/dist/sequences/bulk-email-pacing.d.ts +8 -3
- package/node_modules/@oxygen/shared/dist/sequences/bulk-email-pacing.js +10 -4
- package/node_modules/@oxygen/shared/dist/sequences/email-delivery.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/sequences/email-delivery.js +1 -1
- 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
package/dist/commands/admin.js
CHANGED
|
@@ -387,6 +387,27 @@ export function registerAdminFamily(program, handleAsyncAction, binaryName) {
|
|
|
387
387
|
const organization = readOption(options.organization) ?? "";
|
|
388
388
|
const sequence = readOption(options.sequence) ?? "";
|
|
389
389
|
await handleAsyncAction("admin ses tenants resend-preview", options, () => requestOxygen(`/api/cli/admin/ses/tenants/${encodeURIComponent(organization)}/resend-preview?sequence_id=${encodeURIComponent(sequence)}`));
|
|
390
|
+
}))
|
|
391
|
+
.addCommand(new Command("resend")
|
|
392
|
+
.description("Resend one newsletter's failed emails to exactly the recipients resend-preview counts. --expect is that count; a different count refuses. They leave at the workspace's normal pace. Resume a paused domain first.")
|
|
393
|
+
.requiredOption("--organization <uuid>", "Control organization UUID.")
|
|
394
|
+
.requiredOption("--sequence <uuid>", "The newsletter's Sequence UUID.")
|
|
395
|
+
.requiredOption("--expect <n>", "The recipient count resend-preview showed.")
|
|
396
|
+
.option("--json", "Print a JSON envelope.")
|
|
397
|
+
.action(async (options) => {
|
|
398
|
+
const organization = readOption(options.organization) ?? "";
|
|
399
|
+
await handleAsyncAction("admin ses tenants resend", options, () => {
|
|
400
|
+
const expected = Number(readOption(options.expect));
|
|
401
|
+
if (!Number.isInteger(expected) || expected < 1) {
|
|
402
|
+
throw new OxygenError("invalid_request", "--expect must be the recipient count resend-preview showed, 1 or more.", {
|
|
403
|
+
details: { expect: options.expect }, exitCode: 2,
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
return requestOxygen(`/api/cli/admin/ses/tenants/${encodeURIComponent(organization)}/resend`, {
|
|
407
|
+
method: "POST",
|
|
408
|
+
body: { sequence_id: readOption(options.sequence), expected },
|
|
409
|
+
});
|
|
410
|
+
});
|
|
390
411
|
}))
|
|
391
412
|
.addCommand(sesTenantStatusCommand("pause", "Pause a workspace's newsletter sending until someone resumes it.", true, handleAsyncAction))
|
|
392
413
|
.addCommand(sesTenantStatusCommand("resume", "Resume a paused workspace's newsletter sending.", false, handleAsyncAction))
|
|
@@ -404,6 +425,19 @@ export function registerAdminFamily(program, handleAsyncAction, binaryName) {
|
|
|
404
425
|
const organization = readOption(options.organization) ?? "";
|
|
405
426
|
return requestOxygen(`/api/cli/admin/ses/tenants/${encodeURIComponent(organization)}`, { method: "POST", body: { action: "set-allowance", value } });
|
|
406
427
|
});
|
|
428
|
+
}))
|
|
429
|
+
.addCommand(new Command("set-send-at-once")
|
|
430
|
+
.description("Let a workspace send newsletters at once: up to this many emails leave in minutes, skipping the warm-up spread and first-send hold. Daily caps and bounce/complaint pauses still apply.")
|
|
431
|
+
.requiredOption("--organization <uuid>", "Control organization UUID.")
|
|
432
|
+
.option("--value <emails>", "Emails that may leave at once, 1 or more.")
|
|
433
|
+
.option("--clear", "Remove the override; the warm-up applies again.")
|
|
434
|
+
.option("--json", "Print a JSON envelope.")
|
|
435
|
+
.action(async (options) => {
|
|
436
|
+
await handleAsyncAction("admin ses tenants set-send-at-once", options, () => {
|
|
437
|
+
const value = readSendAtOnceValue(options.value, options.clear === true);
|
|
438
|
+
const organization = readOption(options.organization) ?? "";
|
|
439
|
+
return requestOxygen(`/api/cli/admin/ses/tenants/${encodeURIComponent(organization)}`, { method: "POST", body: { action: "set-send-at-once", value } });
|
|
440
|
+
});
|
|
407
441
|
}))));
|
|
408
442
|
}
|
|
409
443
|
/** `--value` (a whole number, 0 allowed) or `--clear` (null), exactly one. */
|
|
@@ -420,6 +454,20 @@ function readAllowanceValue(value, clear) {
|
|
|
420
454
|
}
|
|
421
455
|
return parsed;
|
|
422
456
|
}
|
|
457
|
+
/** `--value` (a whole number, 1 or more) or `--clear` (null), exactly one. */
|
|
458
|
+
function readSendAtOnceValue(value, clear) {
|
|
459
|
+
const trimmed = value?.trim();
|
|
460
|
+
if (clear === Boolean(trimmed)) {
|
|
461
|
+
throw new OxygenError("invalid_request", "Pass exactly one of --value <emails> or --clear.", { exitCode: 2 });
|
|
462
|
+
}
|
|
463
|
+
if (clear)
|
|
464
|
+
return null;
|
|
465
|
+
const parsed = Number(trimmed);
|
|
466
|
+
if (!Number.isInteger(parsed) || parsed < 1) {
|
|
467
|
+
throw new OxygenError("invalid_request", "--value must be a whole number of emails, 1 or more.", { details: { value }, exitCode: 2 });
|
|
468
|
+
}
|
|
469
|
+
return parsed;
|
|
470
|
+
}
|
|
423
471
|
function sesTenantStatusCommand(action, description, needsReason, handleAsyncAction) {
|
|
424
472
|
const command = new Command(action)
|
|
425
473
|
.description(description)
|
|
@@ -26,11 +26,11 @@ export declare const BULK_EMAIL_PACING: {
|
|
|
26
26
|
* complaint or a few bounces never stop a workspace. `pause` stops the workspace
|
|
27
27
|
* until someone resumes it; `block` is abuse and only staff unblock it. The rates
|
|
28
28
|
* match the release slice (`email-delivery.ts`): 0.3% is Gmail's spam line, 5%
|
|
29
|
-
* where SES opens a review.
|
|
29
|
+
* where SES opens a review. Hard bounces pause at 3% (Philipp, 2026-11-09; was 2%).
|
|
30
30
|
*/
|
|
31
31
|
export declare const BULK_EMAIL_WORKSPACE_LIMITS: {
|
|
32
32
|
readonly pause: {
|
|
33
|
-
readonly bounceRate: 0.
|
|
33
|
+
readonly bounceRate: 0.03;
|
|
34
34
|
readonly minBounces: 5;
|
|
35
35
|
readonly complaintRate: 0.0008;
|
|
36
36
|
readonly minComplaints: 2;
|
|
@@ -53,10 +53,15 @@ export declare function bulkEmailWorkspaceVerdict(input: {
|
|
|
53
53
|
export declare function bulkEmailWarmupDay(firstSendAt: Date | null, now: Date): number;
|
|
54
54
|
/** The proven-volume multiplier on a warm-up day. */
|
|
55
55
|
export declare function bulkEmailGrowth(warmupDay: number): number;
|
|
56
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* Emails that may go out at once: the larger of the quick allowance and the
|
|
58
|
+
* proven volume times the day's growth, or the staff send-at-once override
|
|
59
|
+
* when that is larger (it only ever raises).
|
|
60
|
+
*/
|
|
57
61
|
export declare function bulkEmailImmediateAllowance(input: {
|
|
58
62
|
provenVolume: number;
|
|
59
63
|
warmupDay: number;
|
|
64
|
+
sendAtOnceOverride?: number | null;
|
|
60
65
|
}): number;
|
|
61
66
|
/**
|
|
62
67
|
* Hours a send is spread over: 0 when the send, together with what the workspace
|
|
@@ -30,10 +30,10 @@ export const BULK_EMAIL_PACING = {
|
|
|
30
30
|
* complaint or a few bounces never stop a workspace. `pause` stops the workspace
|
|
31
31
|
* until someone resumes it; `block` is abuse and only staff unblock it. The rates
|
|
32
32
|
* match the release slice (`email-delivery.ts`): 0.3% is Gmail's spam line, 5%
|
|
33
|
-
* where SES opens a review.
|
|
33
|
+
* where SES opens a review. Hard bounces pause at 3% (Philipp, 2026-11-09; was 2%).
|
|
34
34
|
*/
|
|
35
35
|
export const BULK_EMAIL_WORKSPACE_LIMITS = {
|
|
36
|
-
pause: { bounceRate: 0.
|
|
36
|
+
pause: { bounceRate: 0.03, minBounces: 5, complaintRate: 0.0008, minComplaints: 2 },
|
|
37
37
|
block: { bounceRate: 0.05, minBounces: 10, complaintRate: 0.003, minComplaints: 3 },
|
|
38
38
|
};
|
|
39
39
|
/** The workspace's verdict for a window of sends, hard bounces and complaints. */
|
|
@@ -61,10 +61,16 @@ export function bulkEmailGrowth(warmupDay) {
|
|
|
61
61
|
const day = Math.min(Math.max(1, Math.floor(warmupDay)), warmupDays);
|
|
62
62
|
return growth.first + ((growth.last - growth.first) * (day - 1)) / (warmupDays - 1);
|
|
63
63
|
}
|
|
64
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* Emails that may go out at once: the larger of the quick allowance and the
|
|
66
|
+
* proven volume times the day's growth, or the staff send-at-once override
|
|
67
|
+
* when that is larger (it only ever raises).
|
|
68
|
+
*/
|
|
65
69
|
export function bulkEmailImmediateAllowance(input) {
|
|
66
70
|
const proven = Math.max(0, Math.floor(input.provenVolume));
|
|
67
|
-
|
|
71
|
+
const earned = Math.max(BULK_EMAIL_PACING.quickEmails, Math.floor(proven * bulkEmailGrowth(input.warmupDay)));
|
|
72
|
+
const override = input.sendAtOnceOverride;
|
|
73
|
+
return override !== null && override !== undefined && Number.isFinite(override) ? Math.max(earned, Math.floor(override)) : earned;
|
|
68
74
|
}
|
|
69
75
|
/**
|
|
70
76
|
* Hours a send is spread over: 0 when the send, together with what the workspace
|
|
@@ -133,7 +133,7 @@ export declare function bulkEmailCredits(emails: number): number;
|
|
|
133
133
|
export declare const RELEASE_SLICE_FRACTION = 0.05;
|
|
134
134
|
export declare const RELEASE_SLICE_MINIMUM = 50;
|
|
135
135
|
export declare const RELEASE_SLICE_HOLD_MS: number;
|
|
136
|
-
export declare const RELEASE_MAX_HARD_BOUNCE_RATE = 0.
|
|
136
|
+
export declare const RELEASE_MAX_HARD_BOUNCE_RATE = 0.03;
|
|
137
137
|
export declare const RELEASE_MAX_COMPLAINT_RATE = 0.0008;
|
|
138
138
|
export declare const RELEASE_BLOCK_HARD_BOUNCE_RATE = 0.05;
|
|
139
139
|
export declare const RELEASE_BLOCK_COMPLAINT_RATE = 0.003;
|
|
@@ -227,7 +227,7 @@ export function bulkEmailCredits(emails) {
|
|
|
227
227
|
export const RELEASE_SLICE_FRACTION = 0.05;
|
|
228
228
|
export const RELEASE_SLICE_MINIMUM = 50;
|
|
229
229
|
export const RELEASE_SLICE_HOLD_MS = 3 * 60 * 60 * 1000;
|
|
230
|
-
export const RELEASE_MAX_HARD_BOUNCE_RATE = 0.
|
|
230
|
+
export const RELEASE_MAX_HARD_BOUNCE_RATE = 0.03;
|
|
231
231
|
export const RELEASE_MAX_COMPLAINT_RATE = 0.0008;
|
|
232
232
|
export const RELEASE_BLOCK_HARD_BOUNCE_RATE = 0.05;
|
|
233
233
|
export const RELEASE_BLOCK_COMPLAINT_RATE = 0.003;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const OXYGEN_BUILD_VERSION = "1.
|
|
1
|
+
export declare const OXYGEN_BUILD_VERSION = "1.1037.21";
|
|
@@ -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.1037.21";
|
|
@@ -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.1013.
|
|
52
|
+
export const OXYGEN_MINIMUM_CLI_VERSION = "1.1013.94";
|
|
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";
|