@oxygen-agent/cli 1.1011.1091 → 1.1012.2

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.
Files changed (49) hide show
  1. package/README.md +1 -1
  2. package/dist/command-manifest.d.ts +3 -1
  3. package/dist/command-manifest.js +11 -0
  4. package/dist/customer-operation-commands.js +1 -1
  5. package/dist/index.js +57 -31
  6. package/dist/transcript.js +1 -1
  7. package/node_modules/@oxygen/formula/dist/expression.js +16 -0
  8. package/node_modules/@oxygen/shared/dist/attempt-provenance.d.ts +8 -0
  9. package/node_modules/@oxygen/shared/dist/attempt-provenance.js +15 -0
  10. package/node_modules/@oxygen/shared/dist/byok-connect.js +2 -0
  11. package/node_modules/@oxygen/shared/dist/capability-discovery.d.ts +2 -1
  12. package/node_modules/@oxygen/shared/dist/capability-discovery.js +28 -4
  13. package/node_modules/@oxygen/shared/dist/contracts/browser-operations.js +2 -2
  14. package/node_modules/@oxygen/shared/dist/contracts/customer-operations.js +3 -3
  15. package/node_modules/@oxygen/shared/dist/contracts/geo.d.ts +2 -0
  16. package/node_modules/@oxygen/shared/dist/contracts/geo.js +138 -0
  17. package/node_modules/@oxygen/shared/dist/contracts/operations.js +4 -3
  18. package/node_modules/@oxygen/shared/dist/contracts/table-row-removal.d.ts +8 -0
  19. package/node_modules/@oxygen/shared/dist/contracts/table-row-removal.js +10 -4
  20. package/node_modules/@oxygen/shared/dist/cost-estimate.d.ts +6 -0
  21. package/node_modules/@oxygen/shared/dist/cost-estimate.js +23 -8
  22. package/node_modules/@oxygen/shared/dist/enrichment-intents.js +2 -1
  23. package/node_modules/@oxygen/shared/dist/external-effect-arming.d.ts +54 -0
  24. package/node_modules/@oxygen/shared/dist/external-effect-arming.js +90 -0
  25. package/node_modules/@oxygen/shared/dist/geo.d.ts +247 -0
  26. package/node_modules/@oxygen/shared/dist/geo.js +314 -0
  27. package/node_modules/@oxygen/shared/dist/linkedin-countries.d.ts +9 -0
  28. package/node_modules/@oxygen/shared/dist/linkedin-countries.js +1 -1
  29. package/node_modules/@oxygen/shared/dist/managed-email-branding.d.ts +15 -0
  30. package/node_modules/@oxygen/shared/dist/managed-email-branding.js +81 -0
  31. package/node_modules/@oxygen/shared/dist/pricing-sheet.d.ts +20 -24
  32. package/node_modules/@oxygen/shared/dist/pricing-sheet.js +15 -16
  33. package/node_modules/@oxygen/shared/dist/pricing-snapshot.generated.d.ts +3 -3
  34. package/node_modules/@oxygen/shared/dist/pricing-snapshot.generated.js +3 -3
  35. package/node_modules/@oxygen/shared/dist/product-doctrine.js +6 -5
  36. package/node_modules/@oxygen/shared/dist/recipes.d.ts +1 -1
  37. package/node_modules/@oxygen/shared/dist/recipes.js +1 -0
  38. package/node_modules/@oxygen/shared/dist/repricing.d.ts +4 -14
  39. package/node_modules/@oxygen/shared/dist/repricing.js +25 -64
  40. package/node_modules/@oxygen/shared/dist/research-depth.d.ts +11 -0
  41. package/node_modules/@oxygen/shared/dist/research-depth.js +7 -0
  42. package/node_modules/@oxygen/shared/dist/version.d.ts +1 -1
  43. package/node_modules/@oxygen/shared/dist/version.generated.d.ts +1 -1
  44. package/node_modules/@oxygen/shared/dist/version.generated.js +1 -1
  45. package/node_modules/@oxygen/shared/dist/version.js +1 -1
  46. package/node_modules/@oxygen/shared/dist/whatsapp-sender-limits.d.ts +46 -0
  47. package/node_modules/@oxygen/shared/dist/whatsapp-sender-limits.js +51 -1
  48. package/node_modules/@oxygen/shared/package.json +10 -0
  49. package/package.json +1 -1
@@ -38,9 +38,59 @@ export const WHATSAPP_SENDER_LIMIT_MAXIMUMS = {
38
38
  min_action_spacing_seconds: 3600,
39
39
  action_spacing_jitter_seconds: 1800,
40
40
  };
41
+ /** OXYGEN policy, not a provider-published guarantee of account safety. */
42
+ export const WHATSAPP_WARMUP_RAMP = [
43
+ { throughDay: 2, cap: 5 },
44
+ { throughDay: 6, cap: 10 },
45
+ { throughDay: 13, cap: 15 },
46
+ ];
47
+ export const WHATSAPP_WARMUP_FULL_CAP = WHATSAPP_SENDER_LIMIT_MAXIMUMS.messages_per_day;
48
+ export const WHATSAPP_CONNECTION_COOLDOWN_MS = 24 * 60 * 60 * 1000;
49
+ export const WHATSAPP_WARMUP_DAY_BASIS = "elapsed_24_hour_periods";
50
+ export function whatsAppRampCapForDay(day) {
51
+ return WHATSAPP_WARMUP_RAMP.find((step) => day <= step.throughDay)?.cap ?? WHATSAPP_WARMUP_FULL_CAP;
52
+ }
53
+ export function whatsAppWarmupDay(anchor, now = new Date()) {
54
+ if (!anchor || !Number.isFinite(anchor.getTime()))
55
+ return 0;
56
+ return Math.max(0, Math.floor((now.getTime() - anchor.getTime()) / WHATSAPP_CONNECTION_COOLDOWN_MS));
57
+ }
58
+ /** Poll timestamps never advance this clock; legacy mirrors retain their creation time. */
59
+ export function whatsAppConnectionCooldown(sender, now = new Date()) {
60
+ const raw = sender.metadata?.whatsapp_session_connected_at ?? sender.createdAt;
61
+ const at = raw instanceof Date ? raw : typeof raw === "string" ? new Date(raw) : null;
62
+ if (!at || !Number.isFinite(at.getTime())) {
63
+ return { session_connected_at: null, outreach_resume_at: null, blocked: true };
64
+ }
65
+ const resume = new Date(at.getTime() + WHATSAPP_CONNECTION_COOLDOWN_MS);
66
+ return { session_connected_at: at.toISOString(), outreach_resume_at: resume.toISOString(), blocked: now < resume };
67
+ }
68
+ /** Stored reads expose the same elapsed-day policy that dispatch enforces. */
69
+ export function whatsAppWarmupStatus(sender, now = new Date()) {
70
+ const day = whatsAppWarmupDay(sender.warmupStartedAt, now);
71
+ const configured = resolveWhatsAppSenderLimits(sender.limitOverrides).messages_per_day;
72
+ const ramp = whatsAppRampCapForDay(day);
73
+ return {
74
+ warmup_started_at: sender.warmupStartedAt && Number.isFinite(sender.warmupStartedAt.getTime()) ? sender.warmupStartedAt.toISOString() : null,
75
+ warmup_day: day,
76
+ day_basis: WHATSAPP_WARMUP_DAY_BASIS,
77
+ ramp_cap_today: ramp,
78
+ configured_daily_cap: configured,
79
+ effective_daily_cap: Math.min(configured, ramp),
80
+ ramp: [
81
+ ...WHATSAPP_WARMUP_RAMP.map((step, index) => ({
82
+ from_day: index === 0 ? 0 : WHATSAPP_WARMUP_RAMP[index - 1].throughDay + 1,
83
+ through_day: step.throughDay, messages_per_day: Math.min(configured, step.cap),
84
+ })),
85
+ { from_day: 14, through_day: null, messages_per_day: configured },
86
+ ],
87
+ connection_cooldown_hours: 24,
88
+ ...whatsAppConnectionCooldown(sender, now),
89
+ };
90
+ }
41
91
  /** What each WhatsApp limit counts, for MCP and CLI help. */
42
92
  export const WHATSAPP_SENDER_LIMIT_NOTES = {
43
- messages_per_day: "Daily WhatsApp messages across direct warm traffic and opted-in Sequence actions; the warm-up ceiling (5, 10, 15, 20 by account age) wins when lower.",
93
+ messages_per_day: "Daily WhatsApp messages across direct warm traffic and opted-in Sequence actions. Ramp: days 0–2: 5; 3–6: 10; 7–13: 15; 14+: configured cap (20 default, 40 maximum). New outreach waits 24 hours after connection or reconnection.",
44
94
  likes_per_day: "Daily reactions.",
45
95
  messages_reads_per_day: "Chat and message-history reads.",
46
96
  relations_reads_per_day: "Chat-list reads.",
@@ -6,6 +6,11 @@
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
8
8
  "exports": {
9
+ "./external-write-policy": {
10
+ "types": "./dist/external-write-policy.d.ts",
11
+ "import": "./dist/external-write-policy.js",
12
+ "default": "./dist/external-write-policy.js"
13
+ },
9
14
  "./knowledge-vault-markdown": {
10
15
  "types": "./dist/knowledge-vault-markdown.d.ts",
11
16
  "import": "./dist/knowledge-vault-markdown.js",
@@ -196,6 +201,11 @@
196
201
  "import": "./dist/pricing-sheet.js",
197
202
  "default": "./dist/pricing-sheet.js"
198
203
  },
204
+ "./research-depth": {
205
+ "types": "./dist/research-depth.d.ts",
206
+ "import": "./dist/research-depth.js",
207
+ "default": "./dist/research-depth.js"
208
+ },
199
209
  "./copilot-plan": {
200
210
  "types": "./dist/copilot-plan.d.ts",
201
211
  "import": "./dist/copilot-plan.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxygen-agent/cli",
3
- "version": "1.1011.1091",
3
+ "version": "1.1012.2",
4
4
  "private": false,
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",