@oxygen-agent/cli 1.1046.47 → 1.1046.51

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 CHANGED
@@ -34,4 +34,4 @@ oxygen update
34
34
 
35
35
  For product documentation, visit https://oxygen-agent.com/docs. For support, visit https://oxygen-agent.com.
36
36
 
37
- Version: 1.1046.47
37
+ Version: 1.1046.51
@@ -3,6 +3,8 @@ export declare const PLACEMENT_REPORT_WAIT_MS: number;
3
3
  export declare const INCOMPLETE_PLACEMENT_MESSAGE = "This test is incomplete. Available seed results are shown.";
4
4
  /** Machine-readable reason on a report settled because the vendor closed seeds before our probe left. */
5
5
  export declare const SEEDS_CLOSED_BEFORE_SEND = "seeds_closed_before_send";
6
+ /** Machine-readable reason on a report settled because no seed received a probe whose send was never confirmed. */
7
+ export declare const SEED_DELIVERY_UNCONFIRMED = "seed_delivery_unconfirmed";
6
8
  export declare function placementReportDeadline(provider: string, results: unknown): string | null;
7
9
  export declare function placementReportExpired(provider: string, results: unknown, now?: number): boolean;
8
10
  /**
@@ -13,5 +15,12 @@ export declare function placementReportExpired(provider: string, results: unknow
13
15
  * Date.parse truncates them to milliseconds.
14
16
  */
15
17
  export declare function placementSeedsClosedBeforeSend(provider: string, currentResults: unknown, pollResults: unknown): boolean;
18
+ /**
19
+ * True when the seed send was never confirmed (receipt `uncertain`) and every seed
20
+ * row reports no receipt (T-463). Such misses cannot tell a blocked probe from one
21
+ * that never left the mailbox, so they measure nothing. Without seed rows there is
22
+ * no evidence either way and a supplier score stands.
23
+ */
24
+ export declare function placementUnconfirmedSendNeverReceived(provider: string, currentResults: unknown, pollResults: unknown): boolean;
16
25
  /** Customer copy follows the persisted settlement receipt, never an inferred balance. */
17
26
  export declare function placementRefundMessage(value: unknown): string;
@@ -3,21 +3,30 @@ export const PLACEMENT_REPORT_WAIT_MS = 2 * 60 * 60 * 1000;
3
3
  export const INCOMPLETE_PLACEMENT_MESSAGE = "This test is incomplete. Available seed results are shown.";
4
4
  /** Machine-readable reason on a report settled because the vendor closed seeds before our probe left. */
5
5
  export const SEEDS_CLOSED_BEFORE_SEND = "seeds_closed_before_send";
6
- /** Confirmed EmailGuard seed-send time in epoch ms, or null without valid send evidence. */
7
- function confirmedSendMs(provider, results) {
6
+ /** Machine-readable reason on a report settled because no seed received a probe whose send was never confirmed. */
7
+ export const SEED_DELIVERY_UNCONFIRMED = "seed_delivery_unconfirmed";
8
+ function seedReceipt(provider, results) {
8
9
  if (provider !== "emailguard" || !results || typeof results !== "object")
9
10
  return null;
10
11
  const receipt = results.seed_delivery;
11
- if (!receipt || typeof receipt !== "object")
12
- return null;
13
- const send = receipt;
14
- if (send.status !== "sent" || typeof send.sent_at !== "string")
12
+ return receipt && typeof receipt === "object" && !Array.isArray(receipt) ? receipt : null;
13
+ }
14
+ /**
15
+ * EmailGuard seed-send time in epoch ms, or null without send evidence: a confirmed
16
+ * send's `sent_at`, or, when the transport's outcome is unknown (the outbound job
17
+ * ended `uncertain` and is never retried), the time that verdict was recorded. The
18
+ * report then decides whether the probe landed.
19
+ */
20
+ function seedSendMs(provider, results) {
21
+ const send = seedReceipt(provider, results);
22
+ const at = send?.status === "sent" ? send.sent_at : send?.status === "uncertain" ? send.uncertain_at : null;
23
+ if (typeof at !== "string")
15
24
  return null;
16
- const sent = Date.parse(send.sent_at);
25
+ const sent = Date.parse(at);
17
26
  return Number.isFinite(sent) ? sent : null;
18
27
  }
19
28
  export function placementReportDeadline(provider, results) {
20
- const sent = confirmedSendMs(provider, results);
29
+ const sent = seedSendMs(provider, results);
21
30
  return sent === null ? null : new Date(sent + PLACEMENT_REPORT_WAIT_MS).toISOString();
22
31
  }
23
32
  export function placementReportExpired(provider, results, now = Date.now()) {
@@ -35,7 +44,7 @@ const NOT_RECEIVED_FOLDERS = new Set(["missing", "not_received", "not_found"]);
35
44
  * Date.parse truncates them to milliseconds.
36
45
  */
37
46
  export function placementSeedsClosedBeforeSend(provider, currentResults, pollResults) {
38
- const sent = confirmedSendMs(provider, currentResults);
47
+ const sent = seedSendMs(provider, currentResults);
39
48
  if (sent === null || !pollResults || typeof pollResults !== "object")
40
49
  return false;
41
50
  const emails = pollResults.emails;
@@ -54,6 +63,27 @@ export function placementSeedsClosedBeforeSend(provider, currentResults, pollRes
54
63
  return Number.isFinite(closed) && closed < sent;
55
64
  });
56
65
  }
66
+ const RECEIVED = new Set(["email_received", "received"]);
67
+ /**
68
+ * True when the seed send was never confirmed (receipt `uncertain`) and every seed
69
+ * row reports no receipt (T-463). Such misses cannot tell a blocked probe from one
70
+ * that never left the mailbox, so they measure nothing. Without seed rows there is
71
+ * no evidence either way and a supplier score stands.
72
+ */
73
+ export function placementUnconfirmedSendNeverReceived(provider, currentResults, pollResults) {
74
+ if (seedReceipt(provider, currentResults)?.status !== "uncertain")
75
+ return false;
76
+ const emails = pollResults && typeof pollResults === "object" ? pollResults.emails : null;
77
+ if (!Array.isArray(emails) || emails.length === 0)
78
+ return false;
79
+ return !emails.some((value) => {
80
+ if (!value || typeof value !== "object")
81
+ return false;
82
+ const row = value;
83
+ return typeof row.status === "string" && RECEIVED.has(row.status.toLowerCase())
84
+ && typeof row.folder === "string" && !NOT_RECEIVED_FOLDERS.has(row.folder.toLowerCase());
85
+ });
86
+ }
57
87
  /** Customer copy follows the persisted settlement receipt, never an inferred balance. */
58
88
  export function placementRefundMessage(value) {
59
89
  if (!value || typeof value !== "object")
@@ -1 +1 @@
1
- export declare const OXYGEN_BUILD_VERSION = "1.1046.47";
1
+ export declare const OXYGEN_BUILD_VERSION = "1.1046.51";
@@ -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.1046.47";
2
+ export const OXYGEN_BUILD_VERSION = "1.1046.51";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxygen-agent/cli",
3
- "version": "1.1046.47",
3
+ "version": "1.1046.51",
4
4
  "private": false,
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",